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