]> git.pld-linux.org Git - packages/chef.git/blob - chef.spec
update to 11.14.2
[packages/chef.git] / chef.spec
1 # NOTE:
2 # - check releases here: https://github.com/opscode/chef/releases
3
4 # Conditional build:
5 %bcond_with     tests           # build without tests
6
7 Summary:        A systems integration framework, built to bring the benefits of configuration management to your entire infrastructure
8 Name:           chef
9 Version:        11.14.2
10 Release:        0.1
11 License:        Apache v2.0
12 Group:          Networking/Admin
13 Source0:        http://rubygems.org/downloads/%{name}-%{version}.gem
14 # Source0-md5:  9eac2363456e27b02b2ad753d5b92085
15 Source1:        %{name}.rb
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 URL:            https://wiki.opscode.com/display/chef/
25 BuildRequires:  rpm-rubyprov
26 BuildRequires:  rpmbuild(macros) >= 1.673
27 BuildRequires:  sed >= 4.0
28 %if %{with tests}
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
38 %endif
39 Requires:       lsb-release
40 Requires:       poldek >= 0.30
41 Requires:       ruby >= 1:1.9.3.429-4
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-highline < 2
47 Requires:       ruby-highline >= 1.6.9
48 Requires:       ruby-json <= 1.8.1
49 Requires:       ruby-json >= 1.4.4
50 Requires:       ruby-mime-types < 2
51 Requires:       ruby-mime-types >= 1.16
52 Requires:       ruby-mixlib-authentication < 2
53 Requires:       ruby-mixlib-authentication >= 1.3.0-2
54 Requires:       ruby-mixlib-cli < 2
55 Requires:       ruby-mixlib-cli >= 1.4
56 Requires:       ruby-mixlib-config < 3
57 Requires:       ruby-mixlib-config >= 2.0
58 Requires:       ruby-mixlib-log < 2
59 Requires:       ruby-mixlib-log >= 1.6.0-2
60 Requires:       ruby-mixlib-shellout < 2
61 Requires:       ruby-mixlib-shellout >= 1.4
62 Requires:       ruby-net-ssh < 3
63 Requires:       ruby-net-ssh >= 2.6
64 Requires:       ruby-net-ssh-multi < 2
65 Requires:       ruby-net-ssh-multi >= 1.1
66 Requires:       ruby-ohai < 8
67 Requires:       ruby-ohai >= 6.0
68 Requires:       ruby-rest-client < 1.7.0
69 Requires:       ruby-rest-client >= 1.0.4
70 Requires:       ruby-rubygems
71 Requires:       ruby-yajl < 2
72 Requires:       ruby-yajl >= 1.1
73 Suggests:       chef-zero >= 2.0
74 BuildArch:      noarch
75 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
76
77 # do not generate python dependency, yum support is optional
78 %define         _noautoreqfiles %{ruby_vendorlibdir}/chef/provider/package/yum-dump.py
79
80 %description
81 A systems integration framework, built to bring the benefits of
82 configuration management to your entire infrastructure.
83
84 %package -n bash-completion-knife
85 Summary:        bash-completion for knife
86 Summary(pl.UTF-8):      bashowe uzupełnianie nazw dla knifea
87 Group:          Applications/Shells
88 Requires:       %{name} >= 0.10
89 Requires:       bash-completion >= 2.0
90
91 %description -n bash-completion-knife
92 This package provides bash-completion for knife.
93
94 %description -n bash-completion-knife -l pl.UTF-8
95 Pakiet ten dostarcza bashowe uzupełnianie nazw dla knifea.
96
97 %package -n knife
98 Summary:        knife - Chef Server API client utility
99 Group:          Networking/Admin
100 Requires:       %{name} = %{version}-%{release}
101
102 %description -n knife
103 Knife is a command-line utility used to manage data on a Chef server
104 through the HTTP(S) API. Knife is organized into groups of subcommands
105 centered around the various object types in Chef. Each category of
106 subcommand is documented in its own manual page.
107
108 %prep
109 %setup -q
110 gzip -d metadata
111 %patch0 -p1
112 %patch1 -p1
113 %patch2 -p1
114 %patch3 -p1
115
116 %{__sed} -i -e '1 s,#!.*ruby,#!%{__ruby},' bin/*
117
118 # cleanup backups after patching
119 find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
120
121 grep --exclude-dir=spec --exclude-dir=distro -r /var/chef . && exit 1
122
123 %build
124 %if %{with tests}
125 rspec spec
126 %endif
127
128 %install
129 rm -rf $RPM_BUILD_ROOT
130 install -d $RPM_BUILD_ROOT{%{_sysconfdir}/%{name},%{_bindir},%{_mandir}/man1,%{systemdtmpfilesdir}} \
131         $RPM_BUILD_ROOT%{ruby_vendorlibdir}/chef/reporting \
132         $RPM_BUILD_ROOT/var/{run/%{name},cache/%{name},lib/%{name}/{roles,data_bags,environments,backup}}
133
134 cp -a lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir}
135 cp -a bin/* $RPM_BUILD_ROOT%{_bindir}
136 cp -a distro/common/man/* $RPM_BUILD_ROOT%{_mandir}
137 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/README.md
138
139 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/chef.rb
140 cp -p %{SOURCE2} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf
141
142 install -d $RPM_BUILD_ROOT%{bash_compdir}
143 cp -p %{SOURCE3} $RPM_BUILD_ROOT%{bash_compdir}/knife
144
145 %clean
146 rm -rf $RPM_BUILD_ROOT
147
148 %files
149 %defattr(644,root,root,755)
150 %doc README.md CONTRIBUTING.md
151 %dir %{_sysconfdir}/%{name}
152 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/chef.rb
153 %attr(755,root,root) %{_bindir}/chef-apply
154 %attr(755,root,root) %{_bindir}/chef-client
155 %attr(755,root,root) %{_bindir}/chef-service-manager
156 %attr(755,root,root) %{_bindir}/chef-shell
157 %attr(755,root,root) %{_bindir}/chef-solo
158 %attr(755,root,root) %{_bindir}/shef
159 %{_mandir}/man1/chef-shell.1*
160 %{_mandir}/man8/chef-client.8*
161 %{_mandir}/man8/chef-solo.8*
162 %{ruby_vendorlibdir}/chef.rb
163 %{ruby_vendorlibdir}/chef
164 %exclude %{ruby_vendorlibdir}/chef/knife
165 %exclude %{ruby_vendorlibdir}/chef/application/knife.rb
166 %exclude %{ruby_vendorlibdir}/chef/chef_fs/knife.rb
167 %exclude %{ruby_vendorlibdir}/chef/knife.rb
168 %{systemdtmpfilesdir}/chef.conf
169
170 %dir /var/lib/%{name}
171 %dir /var/lib/%{name}/roles
172 %dir /var/lib/%{name}/data_bags
173 %dir /var/lib/%{name}/environments
174 %dir %attr(750,root,root) /var/lib/%{name}/backup
175
176 %dir /var/cache/%{name}
177 %dir /var/run/%{name}
178
179 %files -n knife
180 %defattr(644,root,root,755)
181 %attr(755,root,root) %{_bindir}/knife
182 %{ruby_vendorlibdir}/chef/knife.rb
183 %{ruby_vendorlibdir}/chef/knife
184 %{ruby_vendorlibdir}/chef/application/knife.rb
185 %{ruby_vendorlibdir}/chef/chef_fs/knife.rb
186 %{_mandir}/man1/knife-bootstrap.1*
187 %{_mandir}/man1/knife-client.1*
188 %{_mandir}/man1/knife-configure.1*
189 %{_mandir}/man1/knife-cookbook-site.1*
190 %{_mandir}/man1/knife-cookbook.1*
191 %{_mandir}/man1/knife-data-bag.1*
192 %{_mandir}/man1/knife-delete.1*
193 %{_mandir}/man1/knife-deps.1*
194 %{_mandir}/man1/knife-diff.1*
195 %{_mandir}/man1/knife-download.1*
196 %{_mandir}/man1/knife-edit.1*
197 %{_mandir}/man1/knife-environment.1*
198 %{_mandir}/man1/knife-exec.1*
199 %{_mandir}/man1/knife-index-rebuild.1*
200 %{_mandir}/man1/knife-list.1*
201 %{_mandir}/man1/knife-node.1*
202 %{_mandir}/man1/knife-raw.1*
203 %{_mandir}/man1/knife-recipe-list.1*
204 %{_mandir}/man1/knife-role.1*
205 %{_mandir}/man1/knife-search.1*
206 %{_mandir}/man1/knife-serve.1*
207 %{_mandir}/man1/knife-show.1*
208 %{_mandir}/man1/knife-ssh.1*
209 %{_mandir}/man1/knife-ssl-check.1*
210 %{_mandir}/man1/knife-ssl-fetch.1*
211 %{_mandir}/man1/knife-status.1*
212 %{_mandir}/man1/knife-tag.1*
213 %{_mandir}/man1/knife-upload.1*
214 %{_mandir}/man1/knife-user.1*
215 %{_mandir}/man1/knife-xargs.1*
216 %{_mandir}/man1/knife.1*
217
218 %files -n bash-completion-knife
219 %defattr(644,root,root,755)
220 %{bash_compdir}/knife
This page took 0.062623 seconds and 4 git commands to generate.