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