]>
Commit | Line | Data |
---|---|---|
4613dfe7 | 1 | # NOTE: |
10b8ffc4 ER |
2 | # - check releases here: https://downloads.chef.io/chef-client/debian/ |
3 | # the versions tagged in github are somewhat newer, perhaps dev-releases | |
4613dfe7 | 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 | |
bfe4b1fa | 10 | Version: 14.1.36 |
f3c9999f | 11 | Release: 4 |
e307965b | 12 | License: Apache v2.0 |
aabebe0b | 13 | Group: Networking/Admin |
27cfe329 | 14 | Source0: https://github.com/chef/chef/archive/v%{version}/%{name}-%{version}.tar.gz |
bfe4b1fa | 15 | # Source0-md5: 442169a1a824b3335376a88723e133a0 |
02d95ccd | 16 | Source2: %{name}.tmpfiles |
5c13348f ER |
17 | Source3: https://raw.github.com/stevendanna/knife-hacks/master/shell/knife_completion.sh |
18 | # Source3-md5: a4c1e41370be8088a59ddb3b2e7ea397 | |
7abbc83b | 19 | Patch0: platform-pld.patch |
bc8e6547 | 20 | Patch1: FHS.patch |
0e535bd2 | 21 | Patch2: poldek.patch |
7fbe09ae | 22 | Patch3: https://github.com/glensc/chef/compare/pld-knife-boostrap.patch |
33efc2f8 | 23 | # Patch3-md5: 8ff0fdfde6dc90018698775bf8f13062 |
fce4f0b8 | 24 | Patch4: optional-plist.patch |
64a8eb69 | 25 | Patch5: gemdeps.patch |
8540e2f5 | 26 | Patch6: rubygems.patch |
f3c9999f | 27 | Patch7: 7994.patch |
c7e18403 | 28 | URL: https://www.chef.io/ |
303651f6 | 29 | BuildRequires: rpm-rubyprov |
5c13348f | 30 | BuildRequires: rpmbuild(macros) >= 1.673 |
68cfa14e ER |
31 | BuildRequires: sed >= 4.0 |
32 | %if %{with tests} | |
33 | BuildRequires: ruby-rack | |
34 | BuildRequires: ruby-rake | |
5165006a ER |
35 | BuildRequires: ruby-rspec-core < 2.15 |
36 | BuildRequires: ruby-rspec-core >= 2.14.0 | |
37 | BuildRequires: ruby-rspec-expectations < 2.15 | |
38 | BuildRequires: ruby-rspec-expectations >= 2.14.0 | |
39 | BuildRequires: ruby-rspec-mocks < 2.15 | |
40 | BuildRequires: ruby-rspec-mocks >= 2.14.0 | |
41 | BuildRequires: ruby-rspec_junit_formatter | |
68cfa14e | 42 | %endif |
97e7edae | 43 | Requires: lsb-release |
31feaf16 | 44 | Requires: poldek >= 0.30 |
f0820095 | 45 | Requires: ruby >= 1:1.9.3.429-4 |
16f49c06 | 46 | Requires: ruby-chef-config = %{version}-%{release} |
bf7e149a | 47 | Requires: ruby-erubis >= 2.7.0-3 |
a18fec1c | 48 | Requires: ruby-json |
e8757686 ER |
49 | Requires: ruby-mime-types < 2 |
50 | Requires: ruby-mime-types >= 1.16 | |
e8757686 ER |
51 | Requires: ruby-mixlib-config < 3 |
52 | Requires: ruby-mixlib-config >= 2.0 | |
2a1bbc08 | 53 | Requires: ruby-rest-client >= 1.0.4 |
bce16be1 | 54 | Requires: ruby-rubygems |
7798c5f4 | 55 | Suggests: chef-zero >= 2.1.4 |
fce4f0b8 | 56 | Suggests: ruby-plist >= 3.1.0 |
e307965b ER |
57 | BuildArch: noarch |
58 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
59 | ||
820f7abc ER |
60 | # do not generate python dependency, yum support is optional |
61 | %define _noautoreqfiles %{ruby_vendorlibdir}/chef/provider/package/yum-dump.py | |
62 | ||
e307965b ER |
63 | %description |
64 | A systems integration framework, built to bring the benefits of | |
65 | configuration management to your entire infrastructure. | |
66 | ||
16f49c06 ER |
67 | %package -n ruby-chef-config |
68 | Summary: Chef's default configuration and config loading | |
69 | Group: Development/Languages | |
16f49c06 ER |
70 | |
71 | %description -n ruby-chef-config | |
72 | Chef's default configuration and config loading. | |
73 | ||
5c13348f ER |
74 | %package -n bash-completion-knife |
75 | Summary: bash-completion for knife | |
76 | Summary(pl.UTF-8): bashowe uzupełnianie nazw dla knifea | |
77 | Group: Applications/Shells | |
78 | Requires: %{name} >= 0.10 | |
79 | Requires: bash-completion >= 2.0 | |
80 | ||
81 | %description -n bash-completion-knife | |
82 | This package provides bash-completion for knife. | |
83 | ||
84 | %description -n bash-completion-knife -l pl.UTF-8 | |
85 | Pakiet ten dostarcza bashowe uzupełnianie nazw dla knifea. | |
86 | ||
be8cf7bb ER |
87 | %package -n knife |
88 | Summary: knife - Chef Server API client utility | |
aabebe0b | 89 | Group: Networking/Admin |
be8cf7bb ER |
90 | Requires: %{name} = %{version}-%{release} |
91 | ||
92 | %description -n knife | |
93 | Knife is a command-line utility used to manage data on a Chef server | |
94 | through the HTTP(S) API. Knife is organized into groups of subcommands | |
95 | centered around the various object types in Chef. Each category of | |
96 | subcommand is documented in its own manual page. | |
97 | ||
e307965b | 98 | %prep |
303651f6 | 99 | %setup -q |
a8f01bdc JR |
100 | %patch0 -p1 |
101 | %patch1 -p1 | |
102 | %patch2 -p1 | |
103 | %patch3 -p1 | |
104 | %patch4 -p1 | |
64a8eb69 | 105 | %patch5 -p1 |
8540e2f5 | 106 | %patch6 -p1 |
f3c9999f | 107 | %patch7 -p1 |
e307965b | 108 | |
68cfa14e ER |
109 | %{__sed} -i -e '1 s,#!.*ruby,#!%{__ruby},' bin/* |
110 | ||
10b8ffc4 ER |
111 | %ifos linux |
112 | # those do not match s.executables from .gemspec | |
113 | rm bin/chef-service-manager | |
114 | rm bin/chef-windows-service | |
115 | %endif | |
116 | ||
4530c37b ER |
117 | # don't package this, a maintainer's rake task |
118 | rm chef-config/lib/chef-config/package_task.rb | |
119 | ||
5165006a ER |
120 | # cleanup backups after patching |
121 | find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f | |
122 | ||
10b8ffc4 | 123 | grep --exclude-dir=spec --exclude-dir=distro --exclude=CHANGELOG.md -r /var/chef . && exit 1 |
5165006a | 124 | |
8354a17e | 125 | %build |
1dc7ecda ER |
126 | # make gemspec self-contained |
127 | %__gem_helper spec-dump %{name}.gemspec | |
128 | ||
8354a17e ER |
129 | %if %{with tests} |
130 | rspec spec | |
131 | %endif | |
132 | ||
1dc7ecda ER |
133 | cd chef-config |
134 | # make gemspec self-contained | |
135 | %__gem_helper spec-dump %{name}-config.gemspec | |
136 | ||
e307965b ER |
137 | %install |
138 | rm -rf $RPM_BUILD_ROOT | |
4e5a0fdf | 139 | install -d $RPM_BUILD_ROOT{%{_sysconfdir}/%{name},%{_bindir},%{systemdtmpfilesdir}} \ |
f972dda7 | 140 | $RPM_BUILD_ROOT%{ruby_vendorlibdir}/chef/reporting \ |
1dc7ecda | 141 | $RPM_BUILD_ROOT%{ruby_specdir} \ |
66e54417 | 142 | $RPM_BUILD_ROOT/var/{run/%{name},cache/%{name},lib/%{name}/{roles,data_bags,environments,reports,backup}} |
66164e90 | 143 | |
16f49c06 | 144 | # chef |
68cfa14e | 145 | cp -a lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir} |
e307965b | 146 | cp -a bin/* $RPM_BUILD_ROOT%{_bindir} |
1dc7ecda | 147 | cp -p chef-%{version}.gemspec $RPM_BUILD_ROOT%{ruby_specdir} |
e307965b | 148 | |
16f49c06 ER |
149 | # chef-config |
150 | cp -a chef-config/lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir} | |
1dc7ecda | 151 | cp -p chef-config/chef-config-%{version}.gemspec $RPM_BUILD_ROOT%{ruby_specdir} |
e307965b | 152 | |
02d95ccd | 153 | cp -p %{SOURCE2} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf |
303651f6 | 154 | |
5c13348f ER |
155 | install -d $RPM_BUILD_ROOT%{bash_compdir} |
156 | cp -p %{SOURCE3} $RPM_BUILD_ROOT%{bash_compdir}/knife | |
157 | ||
bce16be1 ER |
158 | %clean |
159 | rm -rf $RPM_BUILD_ROOT | |
160 | ||
e307965b ER |
161 | %files |
162 | %defattr(644,root,root,755) | |
2a1bbc08 | 163 | %doc README.md CONTRIBUTING.md |
303651f6 | 164 | %dir %{_sysconfdir}/%{name} |
2a1bbc08 | 165 | %attr(755,root,root) %{_bindir}/chef-apply |
e307965b | 166 | %attr(755,root,root) %{_bindir}/chef-client |
27cfe329 | 167 | %attr(755,root,root) %{_bindir}/chef-resource-inspector |
2a1bbc08 | 168 | %attr(755,root,root) %{_bindir}/chef-shell |
e307965b | 169 | %attr(755,root,root) %{_bindir}/chef-solo |
be8cf7bb ER |
170 | %{ruby_vendorlibdir}/chef.rb |
171 | %{ruby_vendorlibdir}/chef | |
1dc7ecda | 172 | %{ruby_specdir}/chef-%{version}.gemspec |
be8cf7bb ER |
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 | |
66e54417 | 183 | %dir /var/lib/%{name}/reports |
7e5aff6c | 184 | %dir %attr(750,root,root) /var/lib/%{name}/backup |
be8cf7bb ER |
185 | |
186 | %dir /var/cache/%{name} | |
187 | %dir /var/run/%{name} | |
188 | ||
16f49c06 ER |
189 | %files -n ruby-chef-config |
190 | %defattr(644,root,root,755) | |
191 | %{ruby_vendorlibdir}/chef-config.rb | |
192 | %{ruby_vendorlibdir}/chef-config | |
1dc7ecda | 193 | %{ruby_specdir}/chef-config-%{version}.gemspec |
16f49c06 | 194 | |
be8cf7bb ER |
195 | %files -n knife |
196 | %defattr(644,root,root,755) | |
197 | %attr(755,root,root) %{_bindir}/knife | |
198 | %{ruby_vendorlibdir}/chef/knife.rb | |
199 | %{ruby_vendorlibdir}/chef/knife | |
200 | %{ruby_vendorlibdir}/chef/application/knife.rb | |
201 | %{ruby_vendorlibdir}/chef/chef_fs/knife.rb | |
303651f6 | 202 | |
5c13348f ER |
203 | %files -n bash-completion-knife |
204 | %defattr(644,root,root,755) | |
205 | %{bash_compdir}/knife |