]>
Commit | Line | Data |
---|---|---|
4613dfe7 ER |
1 | # NOTE: |
2 | # - check releases here: https://github.com/opscode/chef/releases | |
3 | ||
8354a17e ER |
4 | # Conditional build: |
5 | %bcond_with tests # build without tests | |
6 | ||
e307965b ER |
7 | Summary: A systems integration framework, built to bring the benefits of configuration management to your entire infrastructure |
8 | Name: chef | |
a6477451 ER |
9 | Version: 12.10.24 |
10 | Release: 0.1 | |
e307965b | 11 | License: Apache v2.0 |
aabebe0b | 12 | Group: Networking/Admin |
e307965b | 13 | Source0: http://rubygems.org/downloads/%{name}-%{version}.gem |
a6477451 | 14 | # Source0-md5: 43819ee38d7cb40ea5578b74d87af1c7 |
16f49c06 ER |
15 | Source1: http://rubygems.org/downloads/%{name}-config-%{version}.gem |
16 | # Source1-md5: c0515424c9122e4e0c561d6a4b267123 | |
02d95ccd | 17 | Source2: %{name}.tmpfiles |
5c13348f ER |
18 | Source3: https://raw.github.com/stevendanna/knife-hacks/master/shell/knife_completion.sh |
19 | # Source3-md5: a4c1e41370be8088a59ddb3b2e7ea397 | |
7abbc83b | 20 | Patch0: platform-pld.patch |
bc8e6547 | 21 | Patch1: FHS.patch |
0e535bd2 | 22 | Patch2: poldek.patch |
7fbe09ae | 23 | Patch3: https://github.com/glensc/chef/compare/pld-knife-boostrap.patch |
33efc2f8 | 24 | # Patch3-md5: 8ff0fdfde6dc90018698775bf8f13062 |
fce4f0b8 | 25 | Patch4: optional-plist.patch |
4613dfe7 | 26 | URL: https://wiki.opscode.com/display/chef/ |
303651f6 | 27 | BuildRequires: rpm-rubyprov |
5c13348f | 28 | BuildRequires: rpmbuild(macros) >= 1.673 |
68cfa14e ER |
29 | BuildRequires: sed >= 4.0 |
30 | %if %{with tests} | |
31 | BuildRequires: ruby-rack | |
32 | BuildRequires: ruby-rake | |
5165006a ER |
33 | BuildRequires: ruby-rspec-core < 2.15 |
34 | BuildRequires: ruby-rspec-core >= 2.14.0 | |
35 | BuildRequires: ruby-rspec-expectations < 2.15 | |
36 | BuildRequires: ruby-rspec-expectations >= 2.14.0 | |
37 | BuildRequires: ruby-rspec-mocks < 2.15 | |
38 | BuildRequires: ruby-rspec-mocks >= 2.14.0 | |
39 | BuildRequires: ruby-rspec_junit_formatter | |
68cfa14e | 40 | %endif |
97e7edae | 41 | Requires: lsb-release |
31feaf16 | 42 | Requires: poldek >= 0.30 |
f0820095 | 43 | Requires: ruby >= 1:1.9.3.429-4 |
16f49c06 | 44 | Requires: ruby-chef-config = %{version}-%{release} |
e8757686 | 45 | Requires: ruby-diff-lcs < 2 |
e8757686 | 46 | Requires: ruby-diff-lcs >= 1.2.4 |
5165006a | 47 | Requires: ruby-erubis < 3 |
bf7e149a | 48 | Requires: ruby-erubis >= 2.7.0-3 |
7798c5f4 ER |
49 | Requires: ruby-ffi-yajl < 2 |
50 | Requires: ruby-ffi-yajl >= 1.0 | |
5165006a | 51 | Requires: ruby-highline < 2 |
2a1bbc08 | 52 | Requires: ruby-highline >= 1.6.9 |
5165006a | 53 | Requires: ruby-json <= 1.8.1 |
2a1bbc08 | 54 | Requires: ruby-json >= 1.4.4 |
e8757686 ER |
55 | Requires: ruby-mime-types < 2 |
56 | Requires: ruby-mime-types >= 1.16 | |
5165006a | 57 | Requires: ruby-mixlib-authentication < 2 |
bf7e149a | 58 | Requires: ruby-mixlib-authentication >= 1.3.0-2 |
5165006a ER |
59 | Requires: ruby-mixlib-cli < 2 |
60 | Requires: ruby-mixlib-cli >= 1.4 | |
e8757686 ER |
61 | Requires: ruby-mixlib-config < 3 |
62 | Requires: ruby-mixlib-config >= 2.0 | |
5165006a | 63 | Requires: ruby-mixlib-log < 2 |
b337cd8c | 64 | Requires: ruby-mixlib-log >= 1.6.0-2 |
24ed2278 | 65 | Requires: ruby-mixlib-shellout >= 1.4 |
5165006a | 66 | Requires: ruby-net-ssh < 3 |
2a1bbc08 | 67 | Requires: ruby-net-ssh >= 2.6 |
5165006a ER |
68 | Requires: ruby-net-ssh-multi < 2 |
69 | Requires: ruby-net-ssh-multi >= 1.1 | |
24ed2278 | 70 | Requires: ruby-ohai < 8 |
e8757686 | 71 | Requires: ruby-ohai >= 6.0 |
2a1bbc08 | 72 | Requires: ruby-rest-client >= 1.0.4 |
bce16be1 | 73 | Requires: ruby-rubygems |
5165006a | 74 | Requires: ruby-yajl < 2 |
2a1bbc08 | 75 | Requires: ruby-yajl >= 1.1 |
7798c5f4 | 76 | Suggests: chef-zero >= 2.1.4 |
fce4f0b8 | 77 | Suggests: ruby-plist >= 3.1.0 |
e307965b ER |
78 | BuildArch: noarch |
79 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
80 | ||
820f7abc ER |
81 | # do not generate python dependency, yum support is optional |
82 | %define _noautoreqfiles %{ruby_vendorlibdir}/chef/provider/package/yum-dump.py | |
83 | ||
e307965b ER |
84 | %description |
85 | A systems integration framework, built to bring the benefits of | |
86 | configuration management to your entire infrastructure. | |
87 | ||
16f49c06 ER |
88 | %package -n ruby-chef-config |
89 | Summary: Chef's default configuration and config loading | |
90 | Group: Development/Languages | |
91 | Requires: ruby-fuzzyurl < 0.9 | |
92 | Requires: ruby-fuzzyurl >= 0.8.0 | |
93 | Requires: ruby-mixlib-config < 3 | |
94 | Requires: ruby-mixlib-config >= 2.0 | |
95 | Requires: ruby-mixlib-shellout < 3 | |
96 | Requires: ruby-mixlib-shellout >= 2.0 | |
97 | ||
98 | %description -n ruby-chef-config | |
99 | Chef's default configuration and config loading. | |
100 | ||
5c13348f ER |
101 | %package -n bash-completion-knife |
102 | Summary: bash-completion for knife | |
103 | Summary(pl.UTF-8): bashowe uzupełnianie nazw dla knifea | |
104 | Group: Applications/Shells | |
105 | Requires: %{name} >= 0.10 | |
106 | Requires: bash-completion >= 2.0 | |
107 | ||
108 | %description -n bash-completion-knife | |
109 | This package provides bash-completion for knife. | |
110 | ||
111 | %description -n bash-completion-knife -l pl.UTF-8 | |
112 | Pakiet ten dostarcza bashowe uzupełnianie nazw dla knifea. | |
113 | ||
be8cf7bb ER |
114 | %package -n knife |
115 | Summary: knife - Chef Server API client utility | |
aabebe0b | 116 | Group: Networking/Admin |
be8cf7bb ER |
117 | Requires: %{name} = %{version}-%{release} |
118 | ||
119 | %description -n knife | |
120 | Knife is a command-line utility used to manage data on a Chef server | |
121 | through the HTTP(S) API. Knife is organized into groups of subcommands | |
122 | centered around the various object types in Chef. Each category of | |
123 | subcommand is documented in its own manual page. | |
124 | ||
e307965b | 125 | %prep |
16f49c06 ER |
126 | # chef-config |
127 | %setup -qcT -a1 | |
128 | set -- * | |
129 | install -d chef-config | |
130 | mv "$@" chef-config | |
131 | # chef | |
132 | %setup -qcTD -a0 | |
5e5186a8 | 133 | gzip -d metadata |
16f49c06 | 134 | |
c8ed2d9c | 135 | #%patch0 -p1 # UPDATE |
bc8e6547 | 136 | %patch1 -p1 |
31feaf16 | 137 | %patch2 -p1 |
7fbe09ae | 138 | %patch3 -p1 |
fce4f0b8 | 139 | %patch4 -p1 |
e307965b | 140 | |
68cfa14e ER |
141 | %{__sed} -i -e '1 s,#!.*ruby,#!%{__ruby},' bin/* |
142 | ||
5165006a ER |
143 | # cleanup backups after patching |
144 | find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f | |
145 | ||
146 | grep --exclude-dir=spec --exclude-dir=distro -r /var/chef . && exit 1 | |
147 | ||
8354a17e ER |
148 | %build |
149 | %if %{with tests} | |
150 | rspec spec | |
151 | %endif | |
152 | ||
e307965b ER |
153 | %install |
154 | rm -rf $RPM_BUILD_ROOT | |
f972dda7 ER |
155 | install -d $RPM_BUILD_ROOT{%{_sysconfdir}/%{name},%{_bindir},%{_mandir}/man1,%{systemdtmpfilesdir}} \ |
156 | $RPM_BUILD_ROOT%{ruby_vendorlibdir}/chef/reporting \ | |
66e54417 | 157 | $RPM_BUILD_ROOT/var/{run/%{name},cache/%{name},lib/%{name}/{roles,data_bags,environments,reports,backup}} |
66164e90 | 158 | |
16f49c06 | 159 | # chef |
68cfa14e | 160 | cp -a lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir} |
e307965b | 161 | cp -a bin/* $RPM_BUILD_ROOT%{_bindir} |
958b507e | 162 | cp -a distro/common/man/* $RPM_BUILD_ROOT%{_mandir} |
23fa8236 | 163 | %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/README.md |
e307965b | 164 | |
16f49c06 ER |
165 | # chef-config |
166 | cp -a chef-config/lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir} | |
167 | ||
02d95ccd | 168 | cp -p %{SOURCE2} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf |
303651f6 | 169 | |
5c13348f ER |
170 | install -d $RPM_BUILD_ROOT%{bash_compdir} |
171 | cp -p %{SOURCE3} $RPM_BUILD_ROOT%{bash_compdir}/knife | |
172 | ||
bce16be1 ER |
173 | %clean |
174 | rm -rf $RPM_BUILD_ROOT | |
175 | ||
e307965b ER |
176 | %files |
177 | %defattr(644,root,root,755) | |
2a1bbc08 | 178 | %doc README.md CONTRIBUTING.md |
303651f6 | 179 | %dir %{_sysconfdir}/%{name} |
2a1bbc08 | 180 | %attr(755,root,root) %{_bindir}/chef-apply |
e307965b | 181 | %attr(755,root,root) %{_bindir}/chef-client |
2a1bbc08 | 182 | %attr(755,root,root) %{_bindir}/chef-shell |
e307965b | 183 | %attr(755,root,root) %{_bindir}/chef-solo |
958b507e | 184 | %{_mandir}/man1/chef-shell.1* |
8eb00d5a | 185 | %{_mandir}/man8/chef-apply.8* |
be8cf7bb ER |
186 | %{_mandir}/man8/chef-client.8* |
187 | %{_mandir}/man8/chef-solo.8* | |
188 | %{ruby_vendorlibdir}/chef.rb | |
189 | %{ruby_vendorlibdir}/chef | |
190 | %exclude %{ruby_vendorlibdir}/chef/knife | |
191 | %exclude %{ruby_vendorlibdir}/chef/application/knife.rb | |
192 | %exclude %{ruby_vendorlibdir}/chef/chef_fs/knife.rb | |
193 | %exclude %{ruby_vendorlibdir}/chef/knife.rb | |
194 | %{systemdtmpfilesdir}/chef.conf | |
195 | ||
196 | %dir /var/lib/%{name} | |
197 | %dir /var/lib/%{name}/roles | |
198 | %dir /var/lib/%{name}/data_bags | |
199 | %dir /var/lib/%{name}/environments | |
66e54417 | 200 | %dir /var/lib/%{name}/reports |
7e5aff6c | 201 | %dir %attr(750,root,root) /var/lib/%{name}/backup |
be8cf7bb ER |
202 | |
203 | %dir /var/cache/%{name} | |
204 | %dir /var/run/%{name} | |
205 | ||
16f49c06 ER |
206 | %files -n ruby-chef-config |
207 | %defattr(644,root,root,755) | |
208 | %{ruby_vendorlibdir}/chef-config.rb | |
209 | %{ruby_vendorlibdir}/chef-config | |
210 | ||
be8cf7bb ER |
211 | %files -n knife |
212 | %defattr(644,root,root,755) | |
213 | %attr(755,root,root) %{_bindir}/knife | |
214 | %{ruby_vendorlibdir}/chef/knife.rb | |
215 | %{ruby_vendorlibdir}/chef/knife | |
216 | %{ruby_vendorlibdir}/chef/application/knife.rb | |
217 | %{ruby_vendorlibdir}/chef/chef_fs/knife.rb | |
958b507e ER |
218 | %{_mandir}/man1/knife-bootstrap.1* |
219 | %{_mandir}/man1/knife-client.1* | |
220 | %{_mandir}/man1/knife-configure.1* | |
221 | %{_mandir}/man1/knife-cookbook-site.1* | |
222 | %{_mandir}/man1/knife-cookbook.1* | |
223 | %{_mandir}/man1/knife-data-bag.1* | |
23fa8236 ER |
224 | %{_mandir}/man1/knife-delete.1* |
225 | %{_mandir}/man1/knife-deps.1* | |
226 | %{_mandir}/man1/knife-diff.1* | |
227 | %{_mandir}/man1/knife-download.1* | |
228 | %{_mandir}/man1/knife-edit.1* | |
958b507e ER |
229 | %{_mandir}/man1/knife-environment.1* |
230 | %{_mandir}/man1/knife-exec.1* | |
23fa8236 ER |
231 | %{_mandir}/man1/knife-index-rebuild.1* |
232 | %{_mandir}/man1/knife-list.1* | |
958b507e | 233 | %{_mandir}/man1/knife-node.1* |
23fa8236 ER |
234 | %{_mandir}/man1/knife-raw.1* |
235 | %{_mandir}/man1/knife-recipe-list.1* | |
958b507e ER |
236 | %{_mandir}/man1/knife-role.1* |
237 | %{_mandir}/man1/knife-search.1* | |
96f87093 | 238 | %{_mandir}/man1/knife-serve.1* |
23fa8236 | 239 | %{_mandir}/man1/knife-show.1* |
958b507e | 240 | %{_mandir}/man1/knife-ssh.1* |
96f87093 ER |
241 | %{_mandir}/man1/knife-ssl-check.1* |
242 | %{_mandir}/man1/knife-ssl-fetch.1* | |
958b507e ER |
243 | %{_mandir}/man1/knife-status.1* |
244 | %{_mandir}/man1/knife-tag.1* | |
23fa8236 ER |
245 | %{_mandir}/man1/knife-upload.1* |
246 | %{_mandir}/man1/knife-user.1* | |
247 | %{_mandir}/man1/knife-xargs.1* | |
958b507e | 248 | %{_mandir}/man1/knife.1* |
303651f6 | 249 | |
5c13348f ER |
250 | %files -n bash-completion-knife |
251 | %defattr(644,root,root,755) | |
252 | %{bash_compdir}/knife |