]>
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 JR |
9 | Version: 14.1.21 |
10 | Release: 0.1 | |
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 |
e8757686 | 42 | Requires: ruby-diff-lcs < 2 |
e8757686 | 43 | Requires: ruby-diff-lcs >= 1.2.4 |
5165006a | 44 | Requires: ruby-erubis < 3 |
bf7e149a | 45 | Requires: ruby-erubis >= 2.7.0-3 |
27cfe329 JR |
46 | Requires: ruby-ffi < 1.9.22 |
47 | Requires: ruby-ffi-yajl >= 2.2 | |
5165006a | 48 | Requires: ruby-highline < 2 |
2a1bbc08 | 49 | Requires: ruby-highline >= 1.6.9 |
6ac88c59 | 50 | Requires: ruby-json <= 1.8.3.1 |
2a1bbc08 | 51 | Requires: ruby-json >= 1.4.4 |
e8757686 ER |
52 | Requires: ruby-mime-types < 2 |
53 | Requires: ruby-mime-types >= 1.16 | |
27cfe329 | 54 | Requires: ruby-mixlib-authentication >= 2.0 |
5165006a | 55 | Requires: ruby-mixlib-cli < 2 |
27cfe329 | 56 | Requires: ruby-mixlib-cli >= 1.7 |
e8757686 ER |
57 | Requires: ruby-mixlib-config < 3 |
58 | Requires: ruby-mixlib-config >= 2.0 | |
27cfe329 JR |
59 | Requires: ruby-mixlib-log >= 2.0.3 |
60 | Requires: ruby-mixlib-shellout >= 2.0 | |
61 | Requires: ruby-net-ssh >= 4.2 | |
5165006a | 62 | Requires: ruby-net-ssh-multi < 2 |
27cfe329 JR |
63 | Requires: ruby-net-ssh-multi >= 1.2.1 |
64 | Requires: ruby-ohai >= 14.0 | |
2a1bbc08 | 65 | Requires: ruby-rest-client >= 1.0.4 |
bce16be1 | 66 | Requires: ruby-rubygems |
5165006a | 67 | Requires: ruby-yajl < 2 |
2a1bbc08 | 68 | Requires: ruby-yajl >= 1.1 |
7798c5f4 | 69 | Suggests: chef-zero >= 2.1.4 |
fce4f0b8 | 70 | Suggests: ruby-plist >= 3.1.0 |
27cfe329 JR |
71 | #addressable >= 0 |
72 | #bundler >= 1.10 | |
73 | #chef-config = 14.1.12 | |
74 | #chef-zero >= 13.0 | |
75 | #iniparse ~> 1.4 | |
76 | #iso8601 ~> 0.9.1 | |
77 | #mixlib-archive ~> 0.4 | |
78 | #net-sftp >= 2.1.2, ~> 2.1 | |
79 | #plist ~> 3.2 | |
80 | #proxifier ~> 1.0 | |
81 | #rspec-core ~> 3.5 | |
82 | #rspec-expectations ~> 3.5 | |
83 | #rspec_junit_formatter ~> 0.2.0 | |
84 | #rspec-mocks ~> 3.5 | |
85 | #serverspec ~> 2.7 | |
86 | #specinfra ~> 2.10 | |
87 | #syslog-logger ~> 1.6 | |
88 | #uuidtools ~> 2.1.5 | |
e307965b ER |
89 | BuildArch: noarch |
90 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
91 | ||
820f7abc ER |
92 | # do not generate python dependency, yum support is optional |
93 | %define _noautoreqfiles %{ruby_vendorlibdir}/chef/provider/package/yum-dump.py | |
94 | ||
e307965b ER |
95 | %description |
96 | A systems integration framework, built to bring the benefits of | |
97 | configuration management to your entire infrastructure. | |
98 | ||
5c13348f ER |
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 | |
105 | ||
106 | %description -n bash-completion-knife | |
107 | This package provides bash-completion for knife. | |
108 | ||
109 | %description -n bash-completion-knife -l pl.UTF-8 | |
110 | Pakiet ten dostarcza bashowe uzupełnianie nazw dla knifea. | |
111 | ||
be8cf7bb ER |
112 | %package -n knife |
113 | Summary: knife - Chef Server API client utility | |
aabebe0b | 114 | Group: Networking/Admin |
be8cf7bb ER |
115 | Requires: %{name} = %{version}-%{release} |
116 | ||
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. | |
122 | ||
e307965b | 123 | %prep |
303651f6 | 124 | %setup -q |
a8f01bdc JR |
125 | %patch0 -p1 |
126 | %patch1 -p1 | |
127 | %patch2 -p1 | |
128 | %patch3 -p1 | |
129 | %patch4 -p1 | |
e307965b | 130 | |
68cfa14e ER |
131 | %{__sed} -i -e '1 s,#!.*ruby,#!%{__ruby},' bin/* |
132 | ||
5165006a ER |
133 | # cleanup backups after patching |
134 | find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f | |
135 | ||
27cfe329 | 136 | #grep --exclude-dir=spec --exclude-dir=distro -r /var/chef . && exit 1 |
5165006a | 137 | |
8354a17e ER |
138 | %build |
139 | %if %{with tests} | |
140 | rspec spec | |
141 | %endif | |
142 | ||
e307965b ER |
143 | %install |
144 | rm -rf $RPM_BUILD_ROOT | |
f972dda7 ER |
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}} | |
66164e90 | 148 | |
68cfa14e | 149 | cp -a lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir} |
e307965b | 150 | cp -a bin/* $RPM_BUILD_ROOT%{_bindir} |
e307965b | 151 | |
02d95ccd | 152 | cp -p %{SOURCE2} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf |
303651f6 | 153 | |
5c13348f ER |
154 | install -d $RPM_BUILD_ROOT%{bash_compdir} |
155 | cp -p %{SOURCE3} $RPM_BUILD_ROOT%{bash_compdir}/knife | |
156 | ||
bce16be1 ER |
157 | %clean |
158 | rm -rf $RPM_BUILD_ROOT | |
159 | ||
e307965b ER |
160 | %files |
161 | %defattr(644,root,root,755) | |
2a1bbc08 | 162 | %doc README.md CONTRIBUTING.md |
303651f6 | 163 | %dir %{_sysconfdir}/%{name} |
2a1bbc08 | 164 | %attr(755,root,root) %{_bindir}/chef-apply |
e307965b | 165 | %attr(755,root,root) %{_bindir}/chef-client |
27cfe329 | 166 | %attr(755,root,root) %{_bindir}/chef-resource-inspector |
f0820095 | 167 | %attr(755,root,root) %{_bindir}/chef-service-manager |
2a1bbc08 | 168 | %attr(755,root,root) %{_bindir}/chef-shell |
e307965b | 169 | %attr(755,root,root) %{_bindir}/chef-solo |
27cfe329 | 170 | %attr(755,root,root) %{_bindir}/chef-windows-service |
be8cf7bb ER |
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 | |
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 | |
7e5aff6c | 183 | %dir %attr(750,root,root) /var/lib/%{name}/backup |
be8cf7bb ER |
184 | |
185 | %dir /var/cache/%{name} | |
186 | %dir /var/run/%{name} | |
187 | ||
188 | %files -n knife | |
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 | |
303651f6 | 195 | |
5c13348f ER |
196 | %files -n bash-completion-knife |
197 | %defattr(644,root,root,755) | |
198 | %{bash_compdir}/knife |