2 # - check releases here: https://github.com/opscode/chef/releases
5 %bcond_with tests # build without tests
7 Summary: A systems integration framework, built to bring the benefits of configuration management to your entire infrastructure
12 Group: Networking/Admin
13 Source0: https://github.com/chef/chef/archive/v%{version}/%{name}-%{version}.tar.gz
14 # Source0-md5: b67966a9b9e6c0a5947a604239267415
15 Source2: %{name}.tmpfiles
16 Source3: https://raw.github.com/stevendanna/knife-hacks/master/shell/knife_completion.sh
17 # Source3-md5: a4c1e41370be8088a59ddb3b2e7ea397
18 Patch0: platform-pld.patch
21 Patch3: https://github.com/glensc/chef/compare/pld-knife-boostrap.patch
22 # Patch3-md5: 9bc4b39952e6bc326b16207cd6a59141
23 Patch4: optional-plist.patch
24 URL: https://www.chef.io/
25 BuildRequires: rpm-rubyprov
26 BuildRequires: rpmbuild(macros) >= 1.673
27 BuildRequires: sed >= 4.0
29 BuildRequires: ruby-rack
30 BuildRequires: ruby-rake
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
40 Requires: poldek >= 0.30
41 Requires: ruby >= 1:2.4.0
42 Requires: ruby-diff-lcs < 2
43 Requires: ruby-diff-lcs >= 1.2.4
44 Requires: ruby-erubis < 3
45 Requires: ruby-erubis >= 2.7.0-3
46 Requires: ruby-ffi < 1.9.22
47 Requires: ruby-ffi-yajl >= 2.2
48 Requires: ruby-highline < 2
49 Requires: ruby-highline >= 1.6.9
50 Requires: ruby-json <= 1.8.3.1
51 Requires: ruby-json >= 1.4.4
52 Requires: ruby-mime-types < 2
53 Requires: ruby-mime-types >= 1.16
54 Requires: ruby-mixlib-authentication >= 2.0
55 Requires: ruby-mixlib-cli < 2
56 Requires: ruby-mixlib-cli >= 1.7
57 Requires: ruby-mixlib-config < 3
58 Requires: ruby-mixlib-config >= 2.0
59 Requires: ruby-mixlib-log >= 2.0.3
60 Requires: ruby-mixlib-shellout >= 2.0
61 Requires: ruby-net-ssh >= 4.2
62 Requires: ruby-net-ssh-multi < 2
63 Requires: ruby-net-ssh-multi >= 1.2.1
64 Requires: ruby-ohai >= 14.0
65 Requires: ruby-rest-client >= 1.0.4
66 Requires: ruby-rubygems
67 Requires: ruby-yajl < 2
68 Requires: ruby-yajl >= 1.1
69 Suggests: chef-zero >= 2.1.4
70 Suggests: ruby-plist >= 3.1.0
73 #chef-config = 14.1.12
77 #mixlib-archive ~> 0.4
78 #net-sftp >= 2.1.2, ~> 2.1
82 #rspec-expectations ~> 3.5
83 #rspec_junit_formatter ~> 0.2.0
90 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
92 # do not generate python dependency, yum support is optional
93 %define _noautoreqfiles %{ruby_vendorlibdir}/chef/provider/package/yum-dump.py
96 A systems integration framework, built to bring the benefits of
97 configuration management to your entire infrastructure.
99 %package -n bash-completion-knife
100 Summary: bash-completion for knife
101 Summary(pl.UTF-8): bashowe uzupełnianie nazw dla knifea
102 Group: Applications/Shells
103 Requires: %{name} >= 0.10
104 Requires: bash-completion >= 2.0
106 %description -n bash-completion-knife
107 This package provides bash-completion for knife.
109 %description -n bash-completion-knife -l pl.UTF-8
110 Pakiet ten dostarcza bashowe uzupełnianie nazw dla knifea.
113 Summary: knife - Chef Server API client utility
114 Group: Networking/Admin
115 Requires: %{name} = %{version}-%{release}
117 %description -n knife
118 Knife is a command-line utility used to manage data on a Chef server
119 through the HTTP(S) API. Knife is organized into groups of subcommands
120 centered around the various object types in Chef. Each category of
121 subcommand is documented in its own manual page.
131 %{__sed} -i -e '1 s,#!.*ruby,#!%{__ruby},' bin/*
133 # cleanup backups after patching
134 find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
136 #grep --exclude-dir=spec --exclude-dir=distro -r /var/chef . && exit 1
144 rm -rf $RPM_BUILD_ROOT
145 install -d $RPM_BUILD_ROOT{%{_sysconfdir}/%{name},%{_bindir},%{_mandir}/man1,%{systemdtmpfilesdir}} \
146 $RPM_BUILD_ROOT%{ruby_vendorlibdir}/chef/reporting \
147 $RPM_BUILD_ROOT/var/{run/%{name},cache/%{name},lib/%{name}/{roles,data_bags,environments,backup}}
149 cp -a lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir}
150 cp -a bin/* $RPM_BUILD_ROOT%{_bindir}
152 cp -p %{SOURCE2} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf
154 install -d $RPM_BUILD_ROOT%{bash_compdir}
155 cp -p %{SOURCE3} $RPM_BUILD_ROOT%{bash_compdir}/knife
158 rm -rf $RPM_BUILD_ROOT
161 %defattr(644,root,root,755)
162 %doc README.md CONTRIBUTING.md
163 %dir %{_sysconfdir}/%{name}
164 %attr(755,root,root) %{_bindir}/chef-apply
165 %attr(755,root,root) %{_bindir}/chef-client
166 %attr(755,root,root) %{_bindir}/chef-resource-inspector
167 %attr(755,root,root) %{_bindir}/chef-service-manager
168 %attr(755,root,root) %{_bindir}/chef-shell
169 %attr(755,root,root) %{_bindir}/chef-solo
170 %attr(755,root,root) %{_bindir}/chef-windows-service
171 %{ruby_vendorlibdir}/chef.rb
172 %{ruby_vendorlibdir}/chef
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
179 %dir /var/lib/%{name}
180 %dir /var/lib/%{name}/roles
181 %dir /var/lib/%{name}/data_bags
182 %dir /var/lib/%{name}/environments
183 %dir %attr(750,root,root) /var/lib/%{name}/backup
185 %dir /var/cache/%{name}
186 %dir /var/run/%{name}
189 %defattr(644,root,root,755)
190 %attr(755,root,root) %{_bindir}/knife
191 %{ruby_vendorlibdir}/chef/knife.rb
192 %{ruby_vendorlibdir}/chef/knife
193 %{ruby_vendorlibdir}/chef/application/knife.rb
194 %{ruby_vendorlibdir}/chef/chef_fs/knife.rb
196 %files -n bash-completion-knife
197 %defattr(644,root,root,755)
198 %{bash_compdir}/knife