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