]>
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 |
b6745d8f | 11 | Release: 0.4 |
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} |
bf7e149a | 44 | Requires: ruby-erubis >= 2.7.0-3 |
5165006a | 45 | Requires: ruby-json <= 1.8.1 |
2a1bbc08 | 46 | Requires: ruby-json >= 1.4.4 |
e8757686 ER |
47 | Requires: ruby-mime-types < 2 |
48 | Requires: ruby-mime-types >= 1.16 | |
bf7e149a | 49 | Requires: ruby-mixlib-authentication >= 1.3.0-2 |
e8757686 ER |
50 | Requires: ruby-mixlib-config < 3 |
51 | Requires: ruby-mixlib-config >= 2.0 | |
b337cd8c | 52 | Requires: ruby-mixlib-log >= 1.6.0-2 |
b6745d8f | 53 | Requires: ruby-ohai < 9 |
2a1bbc08 | 54 | Requires: ruby-rest-client >= 1.0.4 |
bce16be1 | 55 | Requires: ruby-rubygems |
7798c5f4 | 56 | Suggests: chef-zero >= 2.1.4 |
fce4f0b8 | 57 | Suggests: ruby-plist >= 3.1.0 |
e307965b ER |
58 | BuildArch: noarch |
59 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
60 | ||
820f7abc ER |
61 | # do not generate python dependency, yum support is optional |
62 | %define _noautoreqfiles %{ruby_vendorlibdir}/chef/provider/package/yum-dump.py | |
63 | ||
e307965b ER |
64 | %description |
65 | A systems integration framework, built to bring the benefits of | |
66 | configuration management to your entire infrastructure. | |
67 | ||
16f49c06 ER |
68 | %package -n ruby-chef-config |
69 | Summary: Chef's default configuration and config loading | |
70 | Group: Development/Languages | |
16f49c06 ER |
71 | |
72 | %description -n ruby-chef-config | |
73 | Chef's default configuration and config loading. | |
74 | ||
5c13348f ER |
75 | %package -n bash-completion-knife |
76 | Summary: bash-completion for knife | |
77 | Summary(pl.UTF-8): bashowe uzupełnianie nazw dla knifea | |
78 | Group: Applications/Shells | |
79 | Requires: %{name} >= 0.10 | |
80 | Requires: bash-completion >= 2.0 | |
81 | ||
82 | %description -n bash-completion-knife | |
83 | This package provides bash-completion for knife. | |
84 | ||
85 | %description -n bash-completion-knife -l pl.UTF-8 | |
86 | Pakiet ten dostarcza bashowe uzupełnianie nazw dla knifea. | |
87 | ||
be8cf7bb ER |
88 | %package -n knife |
89 | Summary: knife - Chef Server API client utility | |
aabebe0b | 90 | Group: Networking/Admin |
be8cf7bb ER |
91 | Requires: %{name} = %{version}-%{release} |
92 | ||
93 | %description -n knife | |
94 | Knife is a command-line utility used to manage data on a Chef server | |
95 | through the HTTP(S) API. Knife is organized into groups of subcommands | |
96 | centered around the various object types in Chef. Each category of | |
97 | subcommand is documented in its own manual page. | |
98 | ||
e307965b | 99 | %prep |
10b8ffc4 | 100 | %setup -q |
c8ed2d9c | 101 | #%patch0 -p1 # UPDATE |
bc8e6547 | 102 | %patch1 -p1 |
31feaf16 | 103 | %patch2 -p1 |
7fbe09ae | 104 | %patch3 -p1 |
fce4f0b8 | 105 | %patch4 -p1 |
e307965b | 106 | |
68cfa14e ER |
107 | %{__sed} -i -e '1 s,#!.*ruby,#!%{__ruby},' bin/* |
108 | ||
10b8ffc4 ER |
109 | %ifos linux |
110 | # those do not match s.executables from .gemspec | |
111 | rm bin/chef-service-manager | |
112 | rm bin/chef-windows-service | |
113 | %endif | |
114 | ||
5165006a ER |
115 | # cleanup backups after patching |
116 | find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f | |
117 | ||
10b8ffc4 | 118 | grep --exclude-dir=spec --exclude-dir=distro --exclude=CHANGELOG.md -r /var/chef . && exit 1 |
5165006a | 119 | |
8354a17e | 120 | %build |
1dc7ecda ER |
121 | # make gemspec self-contained |
122 | %__gem_helper spec-dump %{name}.gemspec | |
123 | ||
8354a17e ER |
124 | %if %{with tests} |
125 | rspec spec | |
126 | %endif | |
127 | ||
1dc7ecda ER |
128 | cd chef-config |
129 | # make gemspec self-contained | |
130 | %__gem_helper spec-dump %{name}-config.gemspec | |
131 | ||
e307965b ER |
132 | %install |
133 | rm -rf $RPM_BUILD_ROOT | |
f972dda7 ER |
134 | install -d $RPM_BUILD_ROOT{%{_sysconfdir}/%{name},%{_bindir},%{_mandir}/man1,%{systemdtmpfilesdir}} \ |
135 | $RPM_BUILD_ROOT%{ruby_vendorlibdir}/chef/reporting \ | |
1dc7ecda | 136 | $RPM_BUILD_ROOT%{ruby_specdir} \ |
66e54417 | 137 | $RPM_BUILD_ROOT/var/{run/%{name},cache/%{name},lib/%{name}/{roles,data_bags,environments,reports,backup}} |
66164e90 | 138 | |
16f49c06 | 139 | # chef |
68cfa14e | 140 | cp -a lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir} |
e307965b | 141 | cp -a bin/* $RPM_BUILD_ROOT%{_bindir} |
958b507e | 142 | cp -a distro/common/man/* $RPM_BUILD_ROOT%{_mandir} |
1dc7ecda | 143 | cp -p chef-%{version}.gemspec $RPM_BUILD_ROOT%{ruby_specdir} |
23fa8236 | 144 | %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/README.md |
e307965b | 145 | |
16f49c06 ER |
146 | # chef-config |
147 | cp -a chef-config/lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir} | |
1dc7ecda | 148 | cp -p chef-config/chef-config-%{version}.gemspec $RPM_BUILD_ROOT%{ruby_specdir} |
16f49c06 | 149 | |
02d95ccd | 150 | cp -p %{SOURCE2} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf |
303651f6 | 151 | |
5c13348f ER |
152 | install -d $RPM_BUILD_ROOT%{bash_compdir} |
153 | cp -p %{SOURCE3} $RPM_BUILD_ROOT%{bash_compdir}/knife | |
154 | ||
bce16be1 ER |
155 | %clean |
156 | rm -rf $RPM_BUILD_ROOT | |
157 | ||
e307965b ER |
158 | %files |
159 | %defattr(644,root,root,755) | |
2a1bbc08 | 160 | %doc README.md CONTRIBUTING.md |
303651f6 | 161 | %dir %{_sysconfdir}/%{name} |
2a1bbc08 | 162 | %attr(755,root,root) %{_bindir}/chef-apply |
e307965b | 163 | %attr(755,root,root) %{_bindir}/chef-client |
2a1bbc08 | 164 | %attr(755,root,root) %{_bindir}/chef-shell |
e307965b | 165 | %attr(755,root,root) %{_bindir}/chef-solo |
958b507e | 166 | %{_mandir}/man1/chef-shell.1* |
8eb00d5a | 167 | %{_mandir}/man8/chef-apply.8* |
be8cf7bb ER |
168 | %{_mandir}/man8/chef-client.8* |
169 | %{_mandir}/man8/chef-solo.8* | |
170 | %{ruby_vendorlibdir}/chef.rb | |
171 | %{ruby_vendorlibdir}/chef | |
1dc7ecda | 172 | %{ruby_specdir}/chef-%{version}.gemspec |
be8cf7bb ER |
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 | |
66e54417 | 183 | %dir /var/lib/%{name}/reports |
7e5aff6c | 184 | %dir %attr(750,root,root) /var/lib/%{name}/backup |
be8cf7bb ER |
185 | |
186 | %dir /var/cache/%{name} | |
187 | %dir /var/run/%{name} | |
188 | ||
16f49c06 ER |
189 | %files -n ruby-chef-config |
190 | %defattr(644,root,root,755) | |
191 | %{ruby_vendorlibdir}/chef-config.rb | |
192 | %{ruby_vendorlibdir}/chef-config | |
1dc7ecda | 193 | %{ruby_specdir}/chef-config-%{version}.gemspec |
16f49c06 | 194 | |
be8cf7bb ER |
195 | %files -n knife |
196 | %defattr(644,root,root,755) | |
197 | %attr(755,root,root) %{_bindir}/knife | |
198 | %{ruby_vendorlibdir}/chef/knife.rb | |
199 | %{ruby_vendorlibdir}/chef/knife | |
200 | %{ruby_vendorlibdir}/chef/application/knife.rb | |
201 | %{ruby_vendorlibdir}/chef/chef_fs/knife.rb | |
958b507e ER |
202 | %{_mandir}/man1/knife-bootstrap.1* |
203 | %{_mandir}/man1/knife-client.1* | |
204 | %{_mandir}/man1/knife-configure.1* | |
205 | %{_mandir}/man1/knife-cookbook-site.1* | |
206 | %{_mandir}/man1/knife-cookbook.1* | |
207 | %{_mandir}/man1/knife-data-bag.1* | |
23fa8236 ER |
208 | %{_mandir}/man1/knife-delete.1* |
209 | %{_mandir}/man1/knife-deps.1* | |
210 | %{_mandir}/man1/knife-diff.1* | |
211 | %{_mandir}/man1/knife-download.1* | |
212 | %{_mandir}/man1/knife-edit.1* | |
958b507e ER |
213 | %{_mandir}/man1/knife-environment.1* |
214 | %{_mandir}/man1/knife-exec.1* | |
23fa8236 ER |
215 | %{_mandir}/man1/knife-index-rebuild.1* |
216 | %{_mandir}/man1/knife-list.1* | |
958b507e | 217 | %{_mandir}/man1/knife-node.1* |
23fa8236 ER |
218 | %{_mandir}/man1/knife-raw.1* |
219 | %{_mandir}/man1/knife-recipe-list.1* | |
958b507e ER |
220 | %{_mandir}/man1/knife-role.1* |
221 | %{_mandir}/man1/knife-search.1* | |
96f87093 | 222 | %{_mandir}/man1/knife-serve.1* |
23fa8236 | 223 | %{_mandir}/man1/knife-show.1* |
958b507e | 224 | %{_mandir}/man1/knife-ssh.1* |
96f87093 ER |
225 | %{_mandir}/man1/knife-ssl-check.1* |
226 | %{_mandir}/man1/knife-ssl-fetch.1* | |
958b507e ER |
227 | %{_mandir}/man1/knife-status.1* |
228 | %{_mandir}/man1/knife-tag.1* | |
23fa8236 ER |
229 | %{_mandir}/man1/knife-upload.1* |
230 | %{_mandir}/man1/knife-user.1* | |
231 | %{_mandir}/man1/knife-xargs.1* | |
958b507e | 232 | %{_mandir}/man1/knife.1* |
303651f6 | 233 | |
5c13348f ER |
234 | %files -n bash-completion-knife |
235 | %defattr(644,root,root,755) | |
236 | %{bash_compdir}/knife |