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