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