]>
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 | |
4e5a0fdf | 10 | Version: 14.1.21 |
a18fec1c | 11 | Release: 0.3 |
e307965b | 12 | License: Apache v2.0 |
aabebe0b | 13 | Group: Networking/Admin |
10b8ffc4 | 14 | Source0: https://github.com/chef/chef/archive/v%{version}/%{name}-%{version}.tar.gz |
4e5a0fdf | 15 | # Source0-md5: b67966a9b9e6c0a5947a604239267415 |
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 |
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} | |
31 | BuildRequires: ruby-rack | |
32 | BuildRequires: ruby-rake | |
5165006a ER |
33 | BuildRequires: ruby-rspec-core < 2.15 |
34 | BuildRequires: ruby-rspec-core >= 2.14.0 | |
35 | BuildRequires: ruby-rspec-expectations < 2.15 | |
36 | BuildRequires: ruby-rspec-expectations >= 2.14.0 | |
37 | BuildRequires: ruby-rspec-mocks < 2.15 | |
38 | BuildRequires: ruby-rspec-mocks >= 2.14.0 | |
39 | BuildRequires: ruby-rspec_junit_formatter | |
68cfa14e | 40 | %endif |
97e7edae | 41 | Requires: lsb-release |
31feaf16 | 42 | Requires: poldek >= 0.30 |
f0820095 | 43 | Requires: ruby >= 1:1.9.3.429-4 |
16f49c06 | 44 | Requires: ruby-chef-config = %{version}-%{release} |
bf7e149a | 45 | Requires: ruby-erubis >= 2.7.0-3 |
a18fec1c | 46 | Requires: ruby-json |
e8757686 ER |
47 | Requires: ruby-mime-types < 2 |
48 | Requires: ruby-mime-types >= 1.16 | |
bf7e149a | 49 | Requires: ruby-mixlib-authentication >= 1.3.0-2 |
e8757686 ER |
50 | Requires: ruby-mixlib-config < 3 |
51 | Requires: ruby-mixlib-config >= 2.0 | |
b337cd8c | 52 | Requires: ruby-mixlib-log >= 1.6.0-2 |
b6745d8f | 53 | Requires: ruby-ohai < 9 |
2a1bbc08 | 54 | Requires: ruby-rest-client >= 1.0.4 |
bce16be1 | 55 | Requires: ruby-rubygems |
7798c5f4 | 56 | Suggests: chef-zero >= 2.1.4 |
fce4f0b8 | 57 | Suggests: ruby-plist >= 3.1.0 |
e307965b ER |
58 | BuildArch: noarch |
59 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
60 | ||
820f7abc ER |
61 | # do not generate python dependency, yum support is optional |
62 | %define _noautoreqfiles %{ruby_vendorlibdir}/chef/provider/package/yum-dump.py | |
63 | ||
e307965b ER |
64 | %description |
65 | A systems integration framework, built to bring the benefits of | |
66 | configuration management to your entire infrastructure. | |
67 | ||
16f49c06 ER |
68 | %package -n ruby-chef-config |
69 | Summary: Chef's default configuration and config loading | |
70 | Group: Development/Languages | |
16f49c06 ER |
71 | |
72 | %description -n ruby-chef-config | |
73 | Chef's default configuration and config loading. | |
74 | ||
5c13348f ER |
75 | %package -n bash-completion-knife |
76 | Summary: bash-completion for knife | |
77 | Summary(pl.UTF-8): bashowe uzupełnianie nazw dla knifea | |
78 | Group: Applications/Shells | |
79 | Requires: %{name} >= 0.10 | |
80 | Requires: bash-completion >= 2.0 | |
81 | ||
82 | %description -n bash-completion-knife | |
83 | This package provides bash-completion for knife. | |
84 | ||
85 | %description -n bash-completion-knife -l pl.UTF-8 | |
86 | Pakiet ten dostarcza bashowe uzupełnianie nazw dla knifea. | |
87 | ||
be8cf7bb ER |
88 | %package -n knife |
89 | Summary: knife - Chef Server API client utility | |
aabebe0b | 90 | Group: Networking/Admin |
be8cf7bb ER |
91 | Requires: %{name} = %{version}-%{release} |
92 | ||
93 | %description -n knife | |
94 | Knife is a command-line utility used to manage data on a Chef server | |
95 | through the HTTP(S) API. Knife is organized into groups of subcommands | |
96 | centered around the various object types in Chef. Each category of | |
97 | subcommand is documented in its own manual page. | |
98 | ||
e307965b | 99 | %prep |
10b8ffc4 | 100 | %setup -q |
c8ed2d9c | 101 | #%patch0 -p1 # UPDATE |
bc8e6547 | 102 | %patch1 -p1 |
31feaf16 | 103 | %patch2 -p1 |
7fbe09ae | 104 | %patch3 -p1 |
fce4f0b8 | 105 | %patch4 -p1 |
64a8eb69 | 106 | %patch5 -p1 |
e307965b | 107 | |
68cfa14e ER |
108 | %{__sed} -i -e '1 s,#!.*ruby,#!%{__ruby},' bin/* |
109 | ||
10b8ffc4 ER |
110 | %ifos linux |
111 | # those do not match s.executables from .gemspec | |
112 | rm bin/chef-service-manager | |
113 | rm bin/chef-windows-service | |
114 | %endif | |
115 | ||
4530c37b ER |
116 | # don't package this, a maintainer's rake task |
117 | rm chef-config/lib/chef-config/package_task.rb | |
118 | ||
5165006a ER |
119 | # cleanup backups after patching |
120 | find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f | |
121 | ||
10b8ffc4 | 122 | grep --exclude-dir=spec --exclude-dir=distro --exclude=CHANGELOG.md -r /var/chef . && exit 1 |
5165006a | 123 | |
8354a17e | 124 | %build |
1dc7ecda ER |
125 | # make gemspec self-contained |
126 | %__gem_helper spec-dump %{name}.gemspec | |
127 | ||
8354a17e ER |
128 | %if %{with tests} |
129 | rspec spec | |
130 | %endif | |
131 | ||
1dc7ecda ER |
132 | cd chef-config |
133 | # make gemspec self-contained | |
134 | %__gem_helper spec-dump %{name}-config.gemspec | |
135 | ||
e307965b ER |
136 | %install |
137 | rm -rf $RPM_BUILD_ROOT | |
4e5a0fdf | 138 | install -d $RPM_BUILD_ROOT{%{_sysconfdir}/%{name},%{_bindir},%{systemdtmpfilesdir}} \ |
f972dda7 | 139 | $RPM_BUILD_ROOT%{ruby_vendorlibdir}/chef/reporting \ |
1dc7ecda | 140 | $RPM_BUILD_ROOT%{ruby_specdir} \ |
66e54417 | 141 | $RPM_BUILD_ROOT/var/{run/%{name},cache/%{name},lib/%{name}/{roles,data_bags,environments,reports,backup}} |
66164e90 | 142 | |
16f49c06 | 143 | # chef |
68cfa14e | 144 | cp -a lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir} |
e307965b | 145 | cp -a bin/* $RPM_BUILD_ROOT%{_bindir} |
1dc7ecda | 146 | cp -p chef-%{version}.gemspec $RPM_BUILD_ROOT%{ruby_specdir} |
e307965b | 147 | |
16f49c06 ER |
148 | # chef-config |
149 | cp -a chef-config/lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir} | |
1dc7ecda | 150 | cp -p chef-config/chef-config-%{version}.gemspec $RPM_BUILD_ROOT%{ruby_specdir} |
16f49c06 | 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 |
4e5a0fdf | 166 | %attr(755,root,root) %{_bindir}/chef-resource-inspector |
2a1bbc08 | 167 | %attr(755,root,root) %{_bindir}/chef-shell |
e307965b | 168 | %attr(755,root,root) %{_bindir}/chef-solo |
be8cf7bb ER |
169 | %{ruby_vendorlibdir}/chef.rb |
170 | %{ruby_vendorlibdir}/chef | |
1dc7ecda | 171 | %{ruby_specdir}/chef-%{version}.gemspec |
be8cf7bb ER |
172 | %exclude %{ruby_vendorlibdir}/chef/knife |
173 | %exclude %{ruby_vendorlibdir}/chef/application/knife.rb | |
174 | %exclude %{ruby_vendorlibdir}/chef/chef_fs/knife.rb | |
175 | %exclude %{ruby_vendorlibdir}/chef/knife.rb | |
176 | %{systemdtmpfilesdir}/chef.conf | |
177 | ||
178 | %dir /var/lib/%{name} | |
179 | %dir /var/lib/%{name}/roles | |
180 | %dir /var/lib/%{name}/data_bags | |
181 | %dir /var/lib/%{name}/environments | |
66e54417 | 182 | %dir /var/lib/%{name}/reports |
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 | ||
16f49c06 ER |
188 | %files -n ruby-chef-config |
189 | %defattr(644,root,root,755) | |
190 | %{ruby_vendorlibdir}/chef-config.rb | |
191 | %{ruby_vendorlibdir}/chef-config | |
1dc7ecda | 192 | %{ruby_specdir}/chef-config-%{version}.gemspec |
16f49c06 | 193 | |
be8cf7bb ER |
194 | %files -n knife |
195 | %defattr(644,root,root,755) | |
196 | %attr(755,root,root) %{_bindir}/knife | |
197 | %{ruby_vendorlibdir}/chef/knife.rb | |
198 | %{ruby_vendorlibdir}/chef/knife | |
199 | %{ruby_vendorlibdir}/chef/application/knife.rb | |
200 | %{ruby_vendorlibdir}/chef/chef_fs/knife.rb | |
303651f6 | 201 | |
5c13348f ER |
202 | %files -n bash-completion-knife |
203 | %defattr(644,root,root,755) | |
204 | %{bash_compdir}/knife |