]>
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 | |
02366efb | 9 | Version: 11.12.2 |
5165006a | 10 | Release: 1 |
e307965b ER |
11 | License: Apache v2.0 |
12 | Group: Development/Languages | |
e307965b | 13 | Source0: http://rubygems.org/downloads/%{name}-%{version}.gem |
02366efb | 14 | # Source0-md5: 40743d92b81c62abddd647912fcd31e3 |
5cb2f1b0 | 15 | Source1: %{name}.rb |
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 |
31feaf16 | 21 | Patch2: https://github.com/glensc/chef/compare/poldek.patch |
ffde0717 | 22 | # Patch2-md5: 8fd92d572b7ebce759e9034097bfc399 |
7fbe09ae | 23 | Patch3: https://github.com/glensc/chef/compare/pld-knife-boostrap.patch |
d261b596 | 24 | # Patch3-md5: bfc884469fad7b5aa46341402be5fccd |
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 |
e8757686 | 43 | Requires: ruby-diff-lcs < 2 |
e8757686 | 44 | Requires: ruby-diff-lcs >= 1.2.4 |
5165006a ER |
45 | Requires: ruby-erubis < 3 |
46 | Requires: ruby-erubis >= 2.7 | |
47 | Requires: ruby-highline < 2 | |
2a1bbc08 | 48 | Requires: ruby-highline >= 1.6.9 |
5165006a | 49 | Requires: ruby-json <= 1.8.1 |
2a1bbc08 | 50 | Requires: ruby-json >= 1.4.4 |
e8757686 ER |
51 | Requires: ruby-mime-types < 2 |
52 | Requires: ruby-mime-types >= 1.16 | |
5165006a ER |
53 | Requires: ruby-mixlib-authentication < 2 |
54 | Requires: ruby-mixlib-authentication >= 1.3 | |
55 | Requires: ruby-mixlib-cli < 2 | |
56 | Requires: ruby-mixlib-cli >= 1.4 | |
e8757686 ER |
57 | Requires: ruby-mixlib-config < 3 |
58 | Requires: ruby-mixlib-config >= 2.0 | |
5165006a ER |
59 | Requires: ruby-mixlib-log < 2 |
60 | Requires: ruby-mixlib-log >= 1.3 | |
61 | Requires: ruby-mixlib-shellout < 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 |
5165006a | 69 | Requires: ruby-rest-client < 1.7.0 |
2a1bbc08 | 70 | Requires: ruby-rest-client >= 1.0.4 |
bce16be1 | 71 | Requires: ruby-rubygems |
5165006a | 72 | Requires: ruby-yajl < 2 |
2a1bbc08 | 73 | Requires: ruby-yajl >= 1.1 |
24ed2278 | 74 | Suggests: chef-zero >= 2.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 | |
100 | Group: Development/Languages | |
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 |
e307965b | 116 | |
68cfa14e ER |
117 | %{__sed} -i -e '1 s,#!.*ruby,#!%{__ruby},' bin/* |
118 | ||
5165006a ER |
119 | # cleanup backups after patching |
120 | find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f | |
121 | ||
122 | grep --exclude-dir=spec --exclude-dir=distro -r /var/chef . && exit 1 | |
123 | ||
8354a17e ER |
124 | %build |
125 | %if %{with tests} | |
126 | rspec spec | |
127 | %endif | |
128 | ||
e307965b ER |
129 | %install |
130 | rm -rf $RPM_BUILD_ROOT | |
f972dda7 ER |
131 | install -d $RPM_BUILD_ROOT{%{_sysconfdir}/%{name},%{_bindir},%{_mandir}/man1,%{systemdtmpfilesdir}} \ |
132 | $RPM_BUILD_ROOT%{ruby_vendorlibdir}/chef/reporting \ | |
133 | $RPM_BUILD_ROOT/var/{run/%{name},cache/%{name},lib/%{name}/{roles,data_bags,environments,backup}} | |
66164e90 | 134 | |
68cfa14e | 135 | cp -a lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir} |
e307965b | 136 | cp -a bin/* $RPM_BUILD_ROOT%{_bindir} |
958b507e | 137 | cp -a distro/common/man/* $RPM_BUILD_ROOT%{_mandir} |
23fa8236 | 138 | %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/README.md |
e307965b | 139 | |
5cb2f1b0 | 140 | cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/chef.rb |
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} |
5cb2f1b0 | 153 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/chef.rb |
2a1bbc08 | 154 | %attr(755,root,root) %{_bindir}/chef-apply |
e307965b | 155 | %attr(755,root,root) %{_bindir}/chef-client |
f0820095 | 156 | %attr(755,root,root) %{_bindir}/chef-service-manager |
2a1bbc08 | 157 | %attr(755,root,root) %{_bindir}/chef-shell |
e307965b | 158 | %attr(755,root,root) %{_bindir}/chef-solo |
e307965b | 159 | %attr(755,root,root) %{_bindir}/shef |
958b507e | 160 | %{_mandir}/man1/chef-shell.1* |
be8cf7bb ER |
161 | %{_mandir}/man8/chef-client.8* |
162 | %{_mandir}/man8/chef-solo.8* | |
163 | %{ruby_vendorlibdir}/chef.rb | |
164 | %{ruby_vendorlibdir}/chef | |
165 | %exclude %{ruby_vendorlibdir}/chef/knife | |
166 | %exclude %{ruby_vendorlibdir}/chef/application/knife.rb | |
167 | %exclude %{ruby_vendorlibdir}/chef/chef_fs/knife.rb | |
168 | %exclude %{ruby_vendorlibdir}/chef/knife.rb | |
169 | %{systemdtmpfilesdir}/chef.conf | |
170 | ||
171 | %dir /var/lib/%{name} | |
172 | %dir /var/lib/%{name}/roles | |
173 | %dir /var/lib/%{name}/data_bags | |
174 | %dir /var/lib/%{name}/environments | |
7e5aff6c | 175 | %dir %attr(750,root,root) /var/lib/%{name}/backup |
be8cf7bb ER |
176 | |
177 | %dir /var/cache/%{name} | |
178 | %dir /var/run/%{name} | |
179 | ||
180 | %files -n knife | |
181 | %defattr(644,root,root,755) | |
182 | %attr(755,root,root) %{_bindir}/knife | |
183 | %{ruby_vendorlibdir}/chef/knife.rb | |
184 | %{ruby_vendorlibdir}/chef/knife | |
185 | %{ruby_vendorlibdir}/chef/application/knife.rb | |
186 | %{ruby_vendorlibdir}/chef/chef_fs/knife.rb | |
958b507e ER |
187 | %{_mandir}/man1/knife-bootstrap.1* |
188 | %{_mandir}/man1/knife-client.1* | |
189 | %{_mandir}/man1/knife-configure.1* | |
190 | %{_mandir}/man1/knife-cookbook-site.1* | |
191 | %{_mandir}/man1/knife-cookbook.1* | |
192 | %{_mandir}/man1/knife-data-bag.1* | |
23fa8236 ER |
193 | %{_mandir}/man1/knife-delete.1* |
194 | %{_mandir}/man1/knife-deps.1* | |
195 | %{_mandir}/man1/knife-diff.1* | |
196 | %{_mandir}/man1/knife-download.1* | |
197 | %{_mandir}/man1/knife-edit.1* | |
958b507e ER |
198 | %{_mandir}/man1/knife-environment.1* |
199 | %{_mandir}/man1/knife-exec.1* | |
23fa8236 ER |
200 | %{_mandir}/man1/knife-index-rebuild.1* |
201 | %{_mandir}/man1/knife-list.1* | |
958b507e | 202 | %{_mandir}/man1/knife-node.1* |
23fa8236 ER |
203 | %{_mandir}/man1/knife-raw.1* |
204 | %{_mandir}/man1/knife-recipe-list.1* | |
958b507e ER |
205 | %{_mandir}/man1/knife-role.1* |
206 | %{_mandir}/man1/knife-search.1* | |
23fa8236 | 207 | %{_mandir}/man1/knife-show.1* |
958b507e ER |
208 | %{_mandir}/man1/knife-ssh.1* |
209 | %{_mandir}/man1/knife-status.1* | |
210 | %{_mandir}/man1/knife-tag.1* | |
23fa8236 ER |
211 | %{_mandir}/man1/knife-upload.1* |
212 | %{_mandir}/man1/knife-user.1* | |
213 | %{_mandir}/man1/knife-xargs.1* | |
958b507e | 214 | %{_mandir}/man1/knife.1* |
303651f6 | 215 | |
5c13348f ER |
216 | %files -n bash-completion-knife |
217 | %defattr(644,root,root,755) | |
218 | %{bash_compdir}/knife |