]> git.pld-linux.org Git - packages/chef.git/blob - chef.spec
ad102ee91f4e2ecd6302da51299e61be335bad70
[packages/chef.git] / chef.spec
1 # NOTE:
2 # - check releases here: https://github.com/opscode/chef/releases
3
4 # Conditional build:
5 %bcond_with     tests           # build without tests
6
7 Summary:        A systems integration framework, built to bring the benefits of configuration management to your entire infrastructure
8 Name:           chef
9 Version:        14.1.21
10 Release:        0.1
11 License:        Apache v2.0
12 Group:          Networking/Admin
13 Source0:        https://github.com/chef/chef/archive/v%{version}/%{name}-%{version}.tar.gz
14 # Source0-md5:  b67966a9b9e6c0a5947a604239267415
15 Source2:        %{name}.tmpfiles
16 Source3:        https://raw.github.com/stevendanna/knife-hacks/master/shell/knife_completion.sh
17 # Source3-md5:  a4c1e41370be8088a59ddb3b2e7ea397
18 Patch0:         platform-pld.patch
19 Patch1:         FHS.patch
20 Patch2:         poldek.patch
21 Patch3:         https://github.com/glensc/chef/compare/pld-knife-boostrap.patch
22 # Patch3-md5:   9bc4b39952e6bc326b16207cd6a59141
23 Patch4:         optional-plist.patch
24 URL:            https://www.chef.io/
25 BuildRequires:  rpm-rubyprov
26 BuildRequires:  rpmbuild(macros) >= 1.673
27 BuildRequires:  sed >= 4.0
28 %if %{with tests}
29 BuildRequires:  ruby-rack
30 BuildRequires:  ruby-rake
31 BuildRequires:  ruby-rspec-core < 2.15
32 BuildRequires:  ruby-rspec-core >= 2.14.0
33 BuildRequires:  ruby-rspec-expectations < 2.15
34 BuildRequires:  ruby-rspec-expectations >= 2.14.0
35 BuildRequires:  ruby-rspec-mocks < 2.15
36 BuildRequires:  ruby-rspec-mocks >= 2.14.0
37 BuildRequires:  ruby-rspec_junit_formatter
38 %endif
39 Requires:       lsb-release
40 Requires:       poldek >= 0.30
41 Requires:       ruby >= 1:2.4.0
42 Requires:       ruby-diff-lcs < 2
43 Requires:       ruby-diff-lcs >= 1.2.4
44 Requires:       ruby-erubis < 3
45 Requires:       ruby-erubis >= 2.7.0-3
46 Requires:       ruby-ffi < 1.9.22
47 Requires:       ruby-ffi-yajl >= 2.2
48 Requires:       ruby-highline < 2
49 Requires:       ruby-highline >= 1.6.9
50 Requires:       ruby-json <= 1.8.3.1
51 Requires:       ruby-json >= 1.4.4
52 Requires:       ruby-mime-types < 2
53 Requires:       ruby-mime-types >= 1.16
54 Requires:       ruby-mixlib-authentication >= 2.0
55 Requires:       ruby-mixlib-cli < 2
56 Requires:       ruby-mixlib-cli >= 1.7
57 Requires:       ruby-mixlib-config < 3
58 Requires:       ruby-mixlib-config >= 2.0
59 Requires:       ruby-mixlib-log >= 2.0.3
60 Requires:       ruby-mixlib-shellout >= 2.0
61 Requires:       ruby-net-ssh >= 4.2
62 Requires:       ruby-net-ssh-multi < 2
63 Requires:       ruby-net-ssh-multi >= 1.2.1
64 Requires:       ruby-ohai >= 14.0
65 Requires:       ruby-rest-client >= 1.0.4
66 Requires:       ruby-rubygems
67 Requires:       ruby-yajl < 2
68 Requires:       ruby-yajl >= 1.1
69 Suggests:       chef-zero >= 2.1.4
70 Suggests:       ruby-plist >= 3.1.0
71 #addressable >= 0
72 #bundler >= 1.10
73 #chef-config = 14.1.12
74 #chef-zero >= 13.0
75 #iniparse ~> 1.4
76 #iso8601 ~> 0.9.1
77 #mixlib-archive ~> 0.4
78 #net-sftp >= 2.1.2, ~> 2.1
79 #plist ~> 3.2
80 #proxifier ~> 1.0
81 #rspec-core ~> 3.5
82 #rspec-expectations ~> 3.5
83 #rspec_junit_formatter ~> 0.2.0
84 #rspec-mocks ~> 3.5
85 #serverspec ~> 2.7
86 #specinfra ~> 2.10
87 #syslog-logger ~> 1.6
88 #uuidtools ~> 2.1.5
89 BuildArch:      noarch
90 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
91
92 # do not generate python dependency, yum support is optional
93 %define         _noautoreqfiles %{ruby_vendorlibdir}/chef/provider/package/yum-dump.py
94
95 %description
96 A systems integration framework, built to bring the benefits of
97 configuration management to your entire infrastructure.
98
99 %package -n bash-completion-knife
100 Summary:        bash-completion for knife
101 Summary(pl.UTF-8):      bashowe uzupełnianie nazw dla knifea
102 Group:          Applications/Shells
103 Requires:       %{name} >= 0.10
104 Requires:       bash-completion >= 2.0
105
106 %description -n bash-completion-knife
107 This package provides bash-completion for knife.
108
109 %description -n bash-completion-knife -l pl.UTF-8
110 Pakiet ten dostarcza bashowe uzupełnianie nazw dla knifea.
111
112 %package -n knife
113 Summary:        knife - Chef Server API client utility
114 Group:          Networking/Admin
115 Requires:       %{name} = %{version}-%{release}
116
117 %description -n knife
118 Knife is a command-line utility used to manage data on a Chef server
119 through the HTTP(S) API. Knife is organized into groups of subcommands
120 centered around the various object types in Chef. Each category of
121 subcommand is documented in its own manual page.
122
123 %prep
124 %setup -q
125 #%patch0 -p1
126 #%patch1 -p1
127 #%patch2 -p1
128 #%patch3 -p1
129 #%patch4 -p1
130
131 %{__sed} -i -e '1 s,#!.*ruby,#!%{__ruby},' bin/*
132
133 # cleanup backups after patching
134 find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
135
136 #grep --exclude-dir=spec --exclude-dir=distro -r /var/chef . && exit 1
137
138 %build
139 %if %{with tests}
140 rspec spec
141 %endif
142
143 %install
144 rm -rf $RPM_BUILD_ROOT
145 install -d $RPM_BUILD_ROOT{%{_sysconfdir}/%{name},%{_bindir},%{_mandir}/man1,%{systemdtmpfilesdir}} \
146         $RPM_BUILD_ROOT%{ruby_vendorlibdir}/chef/reporting \
147         $RPM_BUILD_ROOT/var/{run/%{name},cache/%{name},lib/%{name}/{roles,data_bags,environments,backup}}
148
149 cp -a lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir}
150 cp -a bin/* $RPM_BUILD_ROOT%{_bindir}
151
152 cp -p %{SOURCE2} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf
153
154 install -d $RPM_BUILD_ROOT%{bash_compdir}
155 cp -p %{SOURCE3} $RPM_BUILD_ROOT%{bash_compdir}/knife
156
157 %clean
158 rm -rf $RPM_BUILD_ROOT
159
160 %files
161 %defattr(644,root,root,755)
162 %doc README.md CONTRIBUTING.md
163 %dir %{_sysconfdir}/%{name}
164 %attr(755,root,root) %{_bindir}/chef-apply
165 %attr(755,root,root) %{_bindir}/chef-client
166 %attr(755,root,root) %{_bindir}/chef-resource-inspector
167 %attr(755,root,root) %{_bindir}/chef-service-manager
168 %attr(755,root,root) %{_bindir}/chef-shell
169 %attr(755,root,root) %{_bindir}/chef-solo
170 %attr(755,root,root) %{_bindir}/chef-windows-service
171 %{ruby_vendorlibdir}/chef.rb
172 %{ruby_vendorlibdir}/chef
173 %exclude %{ruby_vendorlibdir}/chef/knife
174 %exclude %{ruby_vendorlibdir}/chef/application/knife.rb
175 %exclude %{ruby_vendorlibdir}/chef/chef_fs/knife.rb
176 %exclude %{ruby_vendorlibdir}/chef/knife.rb
177 %{systemdtmpfilesdir}/chef.conf
178
179 %dir /var/lib/%{name}
180 %dir /var/lib/%{name}/roles
181 %dir /var/lib/%{name}/data_bags
182 %dir /var/lib/%{name}/environments
183 %dir %attr(750,root,root) /var/lib/%{name}/backup
184
185 %dir /var/cache/%{name}
186 %dir /var/run/%{name}
187
188 %files -n knife
189 %defattr(644,root,root,755)
190 %attr(755,root,root) %{_bindir}/knife
191 %{ruby_vendorlibdir}/chef/knife.rb
192 %{ruby_vendorlibdir}/chef/knife
193 %{ruby_vendorlibdir}/chef/application/knife.rb
194 %{ruby_vendorlibdir}/chef/chef_fs/knife.rb
195
196 %files -n bash-completion-knife
197 %defattr(644,root,root,755)
198 %{bash_compdir}/knife
This page took 0.104908 seconds and 2 git commands to generate.