]>
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 | |
27cfe329 | 9 | Version: 14.1.21 |
c2803501 | 10 | Release: 2 |
e307965b | 11 | License: Apache v2.0 |
aabebe0b | 12 | Group: Networking/Admin |
27cfe329 JR |
13 | Source0: https://github.com/chef/chef/archive/v%{version}/%{name}-%{version}.tar.gz |
14 | # Source0-md5: b67966a9b9e6c0a5947a604239267415 | |
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 |
27cfe329 | 22 | # Patch3-md5: 9bc4b39952e6bc326b16207cd6a59141 |
fce4f0b8 | 23 | Patch4: optional-plist.patch |
c7e18403 | 24 | URL: https://www.chef.io/ |
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 |
27cfe329 | 41 | Requires: ruby >= 1:2.4.0 |
d2f68b79 JR |
42 | Requires: ruby-addressable >= 0 |
43 | Requires: ruby-diff-lcs >= 1.3 | |
bf7e149a | 44 | Requires: ruby-erubis >= 2.7.0-3 |
d2f68b79 JR |
45 | Requires: ruby-erubis < 3 |
46 | Requires: ruby-ffi < 1.9.23 | |
27cfe329 | 47 | Requires: ruby-ffi-yajl >= 2.2 |
2a1bbc08 | 48 | Requires: ruby-highline >= 1.6.9 |
d2f68b79 JR |
49 | Requires: ruby-highline < 2 |
50 | Requires: ruby-iniparse >= 1.4 | |
51 | Requires: ruby-iniparse < 2 | |
52 | Requires: ruby-iso8601 >= 0.9.1 | |
53 | Requires: ruby-iso8601 < 0.10 | |
54 | Requires: ruby-json >= 2.1.0 | |
55 | Requires: ruby-mixlib-archive >= 0.4 | |
56 | Requires: ruby-mixlib-archive < 1 | |
27cfe329 | 57 | Requires: ruby-mixlib-authentication >= 2.0 |
27cfe329 | 58 | Requires: ruby-mixlib-cli >= 1.7 |
e8757686 | 59 | Requires: ruby-mixlib-config >= 2.0 |
d2f68b79 | 60 | Requires: ruby-mixlib-config < 3 |
27cfe329 JR |
61 | Requires: ruby-mixlib-log >= 2.0.3 |
62 | Requires: ruby-mixlib-shellout >= 2.0 | |
d2f68b79 JR |
63 | Requires: ruby-net-sftp >= 2.1.2 |
64 | Requires: ruby-net-sftp < 3 | |
27cfe329 | 65 | Requires: ruby-net-ssh >= 4.2 |
27cfe329 | 66 | Requires: ruby-net-ssh-multi >= 1.2.1 |
d2f68b79 JR |
67 | Requires: ruby-net-ssh-multi < 2 |
68 | Requires: ruby-ohai >= 13.0 | |
69 | Requires: ruby-proxifier >= 1.0 | |
70 | Requires: ruby-proxifier < 2 | |
2a1bbc08 | 71 | Requires: ruby-rest-client >= 1.0.4 |
d2f68b79 JR |
72 | Requires: ruby-rspec-core >= 3.5 |
73 | Requires: ruby-rspec-core < 4 | |
74 | Requires: ruby-rspec-expectations >= 3.5 | |
75 | Requires: ruby-rspec-expectations < 4 | |
76 | Requires: ruby-rspec_junit_formatter >= 0.2.0 | |
d2f68b79 JR |
77 | Requires: ruby-rspec-mocks >= 3.5 |
78 | Requires: ruby-rspec-mocks < 4 | |
bce16be1 | 79 | Requires: ruby-rubygems |
d2f68b79 JR |
80 | Requires: ruby-serverspec >= 2.7 |
81 | Requires: ruby-serverspec < 3 | |
82 | Requires: ruby-specinfra >= 2.10 | |
83 | Requires: ruby-specinfra < 3 | |
84 | Requires: ruby-syslog-logger >= 1.6 | |
85 | Requires: ruby-syslog-logger < 2 | |
86 | Requires: ruby-uuidtools >= 2.1.5 | |
87 | Requires: ruby-uuidtools < 2.2 | |
2a1bbc08 | 88 | Requires: ruby-yajl >= 1.1 |
d2f68b79 JR |
89 | Requires: ruby-yajl < 2 |
90 | Suggests: chef-zero >= 13.0 | |
91 | Suggests: ruby-plist >= 3.2 | |
e307965b ER |
92 | BuildArch: noarch |
93 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
94 | ||
820f7abc ER |
95 | # do not generate python dependency, yum support is optional |
96 | %define _noautoreqfiles %{ruby_vendorlibdir}/chef/provider/package/yum-dump.py | |
97 | ||
e307965b ER |
98 | %description |
99 | A systems integration framework, built to bring the benefits of | |
100 | configuration management to your entire infrastructure. | |
101 | ||
5c13348f ER |
102 | %package -n bash-completion-knife |
103 | Summary: bash-completion for knife | |
104 | Summary(pl.UTF-8): bashowe uzupełnianie nazw dla knifea | |
105 | Group: Applications/Shells | |
106 | Requires: %{name} >= 0.10 | |
107 | Requires: bash-completion >= 2.0 | |
108 | ||
109 | %description -n bash-completion-knife | |
110 | This package provides bash-completion for knife. | |
111 | ||
112 | %description -n bash-completion-knife -l pl.UTF-8 | |
113 | Pakiet ten dostarcza bashowe uzupełnianie nazw dla knifea. | |
114 | ||
be8cf7bb ER |
115 | %package -n knife |
116 | Summary: knife - Chef Server API client utility | |
aabebe0b | 117 | Group: Networking/Admin |
be8cf7bb ER |
118 | Requires: %{name} = %{version}-%{release} |
119 | ||
120 | %description -n knife | |
121 | Knife is a command-line utility used to manage data on a Chef server | |
122 | through the HTTP(S) API. Knife is organized into groups of subcommands | |
123 | centered around the various object types in Chef. Each category of | |
124 | subcommand is documented in its own manual page. | |
125 | ||
e307965b | 126 | %prep |
303651f6 | 127 | %setup -q |
a8f01bdc JR |
128 | %patch0 -p1 |
129 | %patch1 -p1 | |
130 | %patch2 -p1 | |
131 | %patch3 -p1 | |
132 | %patch4 -p1 | |
e307965b | 133 | |
68cfa14e ER |
134 | %{__sed} -i -e '1 s,#!.*ruby,#!%{__ruby},' bin/* |
135 | ||
5165006a ER |
136 | # cleanup backups after patching |
137 | find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f | |
138 | ||
27cfe329 | 139 | #grep --exclude-dir=spec --exclude-dir=distro -r /var/chef . && exit 1 |
5165006a | 140 | |
8354a17e ER |
141 | %build |
142 | %if %{with tests} | |
143 | rspec spec | |
144 | %endif | |
145 | ||
e307965b ER |
146 | %install |
147 | rm -rf $RPM_BUILD_ROOT | |
f972dda7 ER |
148 | install -d $RPM_BUILD_ROOT{%{_sysconfdir}/%{name},%{_bindir},%{_mandir}/man1,%{systemdtmpfilesdir}} \ |
149 | $RPM_BUILD_ROOT%{ruby_vendorlibdir}/chef/reporting \ | |
150 | $RPM_BUILD_ROOT/var/{run/%{name},cache/%{name},lib/%{name}/{roles,data_bags,environments,backup}} | |
66164e90 | 151 | |
68cfa14e | 152 | cp -a lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir} |
e307965b | 153 | cp -a bin/* $RPM_BUILD_ROOT%{_bindir} |
e307965b | 154 | |
02d95ccd | 155 | cp -p %{SOURCE2} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf |
303651f6 | 156 | |
5c13348f ER |
157 | install -d $RPM_BUILD_ROOT%{bash_compdir} |
158 | cp -p %{SOURCE3} $RPM_BUILD_ROOT%{bash_compdir}/knife | |
159 | ||
bce16be1 ER |
160 | %clean |
161 | rm -rf $RPM_BUILD_ROOT | |
162 | ||
e307965b ER |
163 | %files |
164 | %defattr(644,root,root,755) | |
2a1bbc08 | 165 | %doc README.md CONTRIBUTING.md |
303651f6 | 166 | %dir %{_sysconfdir}/%{name} |
2a1bbc08 | 167 | %attr(755,root,root) %{_bindir}/chef-apply |
e307965b | 168 | %attr(755,root,root) %{_bindir}/chef-client |
27cfe329 | 169 | %attr(755,root,root) %{_bindir}/chef-resource-inspector |
f0820095 | 170 | %attr(755,root,root) %{_bindir}/chef-service-manager |
2a1bbc08 | 171 | %attr(755,root,root) %{_bindir}/chef-shell |
e307965b | 172 | %attr(755,root,root) %{_bindir}/chef-solo |
27cfe329 | 173 | %attr(755,root,root) %{_bindir}/chef-windows-service |
be8cf7bb ER |
174 | %{ruby_vendorlibdir}/chef.rb |
175 | %{ruby_vendorlibdir}/chef | |
176 | %exclude %{ruby_vendorlibdir}/chef/knife | |
177 | %exclude %{ruby_vendorlibdir}/chef/application/knife.rb | |
178 | %exclude %{ruby_vendorlibdir}/chef/chef_fs/knife.rb | |
179 | %exclude %{ruby_vendorlibdir}/chef/knife.rb | |
180 | %{systemdtmpfilesdir}/chef.conf | |
181 | ||
182 | %dir /var/lib/%{name} | |
183 | %dir /var/lib/%{name}/roles | |
184 | %dir /var/lib/%{name}/data_bags | |
185 | %dir /var/lib/%{name}/environments | |
7e5aff6c | 186 | %dir %attr(750,root,root) /var/lib/%{name}/backup |
be8cf7bb ER |
187 | |
188 | %dir /var/cache/%{name} | |
189 | %dir /var/run/%{name} | |
190 | ||
191 | %files -n knife | |
192 | %defattr(644,root,root,755) | |
193 | %attr(755,root,root) %{_bindir}/knife | |
194 | %{ruby_vendorlibdir}/chef/knife.rb | |
195 | %{ruby_vendorlibdir}/chef/knife | |
196 | %{ruby_vendorlibdir}/chef/application/knife.rb | |
197 | %{ruby_vendorlibdir}/chef/chef_fs/knife.rb | |
303651f6 | 198 | |
5c13348f ER |
199 | %files -n bash-completion-knife |
200 | %defattr(644,root,root,755) | |
201 | %{bash_compdir}/knife |