]> git.pld-linux.org Git - packages/chef.git/blob - chef.spec
use github tarball to build
[packages/chef.git] / chef.spec
1 # NOTE:
2 # - check releases here: https://downloads.chef.io/chef-client/debian/
3 #   the versions tagged in github are somewhat newer, perhaps dev-releases
4
5 # Conditional build:
6 %bcond_with     tests           # build without tests
7
8 Summary:        A systems integration framework, built to bring the benefits of configuration management to your entire infrastructure
9 Name:           chef
10 Version:        12.10.24
11 Release:        0.2
12 License:        Apache v2.0
13 Group:          Networking/Admin
14 Source0:        https://github.com/chef/chef/archive/v%{version}/%{name}-%{version}.tar.gz
15 # Source0-md5:  2390cdbde7445ccc288992401ed62f08
16 Source2:        %{name}.tmpfiles
17 Source3:        https://raw.github.com/stevendanna/knife-hacks/master/shell/knife_completion.sh
18 # Source3-md5:  a4c1e41370be8088a59ddb3b2e7ea397
19 Patch0:         platform-pld.patch
20 Patch1:         FHS.patch
21 Patch2:         poldek.patch
22 Patch3:         https://github.com/glensc/chef/compare/pld-knife-boostrap.patch
23 # Patch3-md5:   8ff0fdfde6dc90018698775bf8f13062
24 Patch4:         optional-plist.patch
25 URL:            https://wiki.opscode.com/display/chef/
26 BuildRequires:  rpm-rubyprov
27 BuildRequires:  rpmbuild(macros) >= 1.673
28 BuildRequires:  sed >= 4.0
29 %if %{with tests}
30 BuildRequires:  ruby-rack
31 BuildRequires:  ruby-rake
32 BuildRequires:  ruby-rspec-core < 2.15
33 BuildRequires:  ruby-rspec-core >= 2.14.0
34 BuildRequires:  ruby-rspec-expectations < 2.15
35 BuildRequires:  ruby-rspec-expectations >= 2.14.0
36 BuildRequires:  ruby-rspec-mocks < 2.15
37 BuildRequires:  ruby-rspec-mocks >= 2.14.0
38 BuildRequires:  ruby-rspec_junit_formatter
39 %endif
40 Requires:       lsb-release
41 Requires:       poldek >= 0.30
42 Requires:       ruby >= 1:1.9.3.429-4
43 Requires:       ruby-chef-config = %{version}-%{release}
44 Requires:       ruby-diff-lcs < 2
45 Requires:       ruby-diff-lcs >= 1.2.4
46 Requires:       ruby-erubis < 3
47 Requires:       ruby-erubis >= 2.7.0-3
48 Requires:       ruby-ffi-yajl < 2
49 Requires:       ruby-ffi-yajl >= 1.0
50 Requires:       ruby-highline < 2
51 Requires:       ruby-highline >= 1.6.9
52 Requires:       ruby-json <= 1.8.1
53 Requires:       ruby-json >= 1.4.4
54 Requires:       ruby-mime-types < 2
55 Requires:       ruby-mime-types >= 1.16
56 Requires:       ruby-mixlib-authentication < 2
57 Requires:       ruby-mixlib-authentication >= 1.3.0-2
58 Requires:       ruby-mixlib-cli < 2
59 Requires:       ruby-mixlib-cli >= 1.4
60 Requires:       ruby-mixlib-config < 3
61 Requires:       ruby-mixlib-config >= 2.0
62 Requires:       ruby-mixlib-log < 2
63 Requires:       ruby-mixlib-log >= 1.6.0-2
64 Requires:       ruby-mixlib-shellout >= 1.4
65 Requires:       ruby-net-ssh < 3
66 Requires:       ruby-net-ssh >= 2.6
67 Requires:       ruby-net-ssh-multi < 2
68 Requires:       ruby-net-ssh-multi >= 1.1
69 Requires:       ruby-ohai < 8
70 Requires:       ruby-ohai >= 6.0
71 Requires:       ruby-rest-client >= 1.0.4
72 Requires:       ruby-rubygems
73 Requires:       ruby-yajl < 2
74 Requires:       ruby-yajl >= 1.1
75 Suggests:       chef-zero >= 2.1.4
76 Suggests:       ruby-plist >= 3.1.0
77 BuildArch:      noarch
78 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
79
80 # do not generate python dependency, yum support is optional
81 %define         _noautoreqfiles %{ruby_vendorlibdir}/chef/provider/package/yum-dump.py
82
83 %description
84 A systems integration framework, built to bring the benefits of
85 configuration management to your entire infrastructure.
86
87 %package -n ruby-chef-config
88 Summary:        Chef's default configuration and config loading
89 Group:          Development/Languages
90 Requires:       ruby-fuzzyurl < 0.9
91 Requires:       ruby-fuzzyurl >= 0.8.0
92 Requires:       ruby-mixlib-config < 3
93 Requires:       ruby-mixlib-config >= 2.0
94 Requires:       ruby-mixlib-shellout < 3
95 Requires:       ruby-mixlib-shellout >= 2.0
96
97 %description -n ruby-chef-config
98 Chef's default configuration and config loading.
99
100 %package -n bash-completion-knife
101 Summary:        bash-completion for knife
102 Summary(pl.UTF-8):      bashowe uzupełnianie nazw dla knifea
103 Group:          Applications/Shells
104 Requires:       %{name} >= 0.10
105 Requires:       bash-completion >= 2.0
106
107 %description -n bash-completion-knife
108 This package provides bash-completion for knife.
109
110 %description -n bash-completion-knife -l pl.UTF-8
111 Pakiet ten dostarcza bashowe uzupełnianie nazw dla knifea.
112
113 %package -n knife
114 Summary:        knife - Chef Server API client utility
115 Group:          Networking/Admin
116 Requires:       %{name} = %{version}-%{release}
117
118 %description -n knife
119 Knife is a command-line utility used to manage data on a Chef server
120 through the HTTP(S) API. Knife is organized into groups of subcommands
121 centered around the various object types in Chef. Each category of
122 subcommand is documented in its own manual page.
123
124 %prep
125 %setup -q
126 #%patch0 -p1 # UPDATE
127 %patch1 -p1
128 %patch2 -p1
129 %patch3 -p1
130 %patch4 -p1
131
132 %{__sed} -i -e '1 s,#!.*ruby,#!%{__ruby},' bin/*
133
134 %ifos linux
135 # those do not match s.executables from .gemspec
136 rm bin/chef-service-manager
137 rm bin/chef-windows-service
138 %endif
139
140 # cleanup backups after patching
141 find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
142
143 grep --exclude-dir=spec --exclude-dir=distro --exclude=CHANGELOG.md -r /var/chef . && exit 1
144
145 %build
146 %if %{with tests}
147 rspec spec
148 %endif
149
150 %install
151 rm -rf $RPM_BUILD_ROOT
152 install -d $RPM_BUILD_ROOT{%{_sysconfdir}/%{name},%{_bindir},%{_mandir}/man1,%{systemdtmpfilesdir}} \
153         $RPM_BUILD_ROOT%{ruby_vendorlibdir}/chef/reporting \
154         $RPM_BUILD_ROOT/var/{run/%{name},cache/%{name},lib/%{name}/{roles,data_bags,environments,reports,backup}}
155
156 # chef
157 cp -a lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir}
158 cp -a bin/* $RPM_BUILD_ROOT%{_bindir}
159 cp -a distro/common/man/* $RPM_BUILD_ROOT%{_mandir}
160 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/README.md
161
162 # chef-config
163 cp -a chef-config/lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir}
164
165 cp -p %{SOURCE2} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf
166
167 install -d $RPM_BUILD_ROOT%{bash_compdir}
168 cp -p %{SOURCE3} $RPM_BUILD_ROOT%{bash_compdir}/knife
169
170 %clean
171 rm -rf $RPM_BUILD_ROOT
172
173 %files
174 %defattr(644,root,root,755)
175 %doc README.md CONTRIBUTING.md
176 %dir %{_sysconfdir}/%{name}
177 %attr(755,root,root) %{_bindir}/chef-apply
178 %attr(755,root,root) %{_bindir}/chef-client
179 %attr(755,root,root) %{_bindir}/chef-shell
180 %attr(755,root,root) %{_bindir}/chef-solo
181 %{_mandir}/man1/chef-shell.1*
182 %{_mandir}/man8/chef-apply.8*
183 %{_mandir}/man8/chef-client.8*
184 %{_mandir}/man8/chef-solo.8*
185 %{ruby_vendorlibdir}/chef.rb
186 %{ruby_vendorlibdir}/chef
187 %exclude %{ruby_vendorlibdir}/chef/knife
188 %exclude %{ruby_vendorlibdir}/chef/application/knife.rb
189 %exclude %{ruby_vendorlibdir}/chef/chef_fs/knife.rb
190 %exclude %{ruby_vendorlibdir}/chef/knife.rb
191 %{systemdtmpfilesdir}/chef.conf
192
193 %dir /var/lib/%{name}
194 %dir /var/lib/%{name}/roles
195 %dir /var/lib/%{name}/data_bags
196 %dir /var/lib/%{name}/environments
197 %dir /var/lib/%{name}/reports
198 %dir %attr(750,root,root) /var/lib/%{name}/backup
199
200 %dir /var/cache/%{name}
201 %dir /var/run/%{name}
202
203 %files -n ruby-chef-config
204 %defattr(644,root,root,755)
205 %{ruby_vendorlibdir}/chef-config.rb
206 %{ruby_vendorlibdir}/chef-config
207
208 %files -n knife
209 %defattr(644,root,root,755)
210 %attr(755,root,root) %{_bindir}/knife
211 %{ruby_vendorlibdir}/chef/knife.rb
212 %{ruby_vendorlibdir}/chef/knife
213 %{ruby_vendorlibdir}/chef/application/knife.rb
214 %{ruby_vendorlibdir}/chef/chef_fs/knife.rb
215 %{_mandir}/man1/knife-bootstrap.1*
216 %{_mandir}/man1/knife-client.1*
217 %{_mandir}/man1/knife-configure.1*
218 %{_mandir}/man1/knife-cookbook-site.1*
219 %{_mandir}/man1/knife-cookbook.1*
220 %{_mandir}/man1/knife-data-bag.1*
221 %{_mandir}/man1/knife-delete.1*
222 %{_mandir}/man1/knife-deps.1*
223 %{_mandir}/man1/knife-diff.1*
224 %{_mandir}/man1/knife-download.1*
225 %{_mandir}/man1/knife-edit.1*
226 %{_mandir}/man1/knife-environment.1*
227 %{_mandir}/man1/knife-exec.1*
228 %{_mandir}/man1/knife-index-rebuild.1*
229 %{_mandir}/man1/knife-list.1*
230 %{_mandir}/man1/knife-node.1*
231 %{_mandir}/man1/knife-raw.1*
232 %{_mandir}/man1/knife-recipe-list.1*
233 %{_mandir}/man1/knife-role.1*
234 %{_mandir}/man1/knife-search.1*
235 %{_mandir}/man1/knife-serve.1*
236 %{_mandir}/man1/knife-show.1*
237 %{_mandir}/man1/knife-ssh.1*
238 %{_mandir}/man1/knife-ssl-check.1*
239 %{_mandir}/man1/knife-ssl-fetch.1*
240 %{_mandir}/man1/knife-status.1*
241 %{_mandir}/man1/knife-tag.1*
242 %{_mandir}/man1/knife-upload.1*
243 %{_mandir}/man1/knife-user.1*
244 %{_mandir}/man1/knife-xargs.1*
245 %{_mandir}/man1/knife.1*
246
247 %files -n bash-completion-knife
248 %defattr(644,root,root,755)
249 %{bash_compdir}/knife
This page took 0.329625 seconds and 4 git commands to generate.