]> git.pld-linux.org Git - packages/chef.git/blob - chef.spec
Fix --no-ri patch
[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:        14.1.21
10 Release:        3
11 License:        Apache v2.0
12 Group:          Networking/Admin
13 Source0:        https://github.com/chef/chef/archive/v%{version}/%{name}-%{version}.tar.gz
14 # Source0-md5:  b67966a9b9e6c0a5947a604239267415
15 Source2:        %{name}.tmpfiles
16 Source3:        https://raw.github.com/stevendanna/knife-hacks/master/shell/knife_completion.sh
17 # Source3-md5:  a4c1e41370be8088a59ddb3b2e7ea397
18 Patch0:         platform-pld.patch
19 Patch1:         FHS.patch
20 Patch2:         poldek.patch
21 Patch3:         https://github.com/glensc/chef/compare/pld-knife-boostrap.patch
22 # Patch3-md5:   9bc4b39952e6bc326b16207cd6a59141
23 Patch4:         optional-plist.patch
24 URL:            https://www.chef.io/
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:2.4.0
42 Requires:       ruby-addressable >= 0
43 Requires:       ruby-bundler >= 1.10
44 Requires:       ruby-chef-config = %{version}
45 Requires:       ruby-diff-lcs >= 1.2.4
46 Requires:       ruby-diff-lcs < 2
47 Requires:       ruby-erubis >= 2.7.0-3
48 Requires:       ruby-erubis < 3
49 Requires:       ruby-ffi >= 1.9.22
50 Requires:       ruby-ffi < 2
51 Requires:       ruby-ffi-yajl >= 2.2
52 Requires:       ruby-ffi-yajl < 3
53 Requires:       ruby-highline >= 1.6.9
54 Requires:       ruby-highline < 2
55 Requires:       ruby-iniparse >= 1.4
56 Requires:       ruby-iniparse < 2
57 Requires:       ruby-iso8601 >= 0.9.1
58 Requires:       ruby-iso8601 < 0.10
59 Requires:       ruby-mixlib-archive >= 0.4
60 Requires:       ruby-mixlib-archive < 1
61 Requires:       ruby-mixlib-authentication >= 2.0
62 Requires:       ruby-mixlib-authentication < 3
63 Requires:       ruby-mixlib-cli >= 1.7
64 Requires:       ruby-mixlib-cli < 2
65 Requires:       ruby-mixlib-log >= 2.0.3
66 Requires:       ruby-mixlib-log < 3
67 Requires:       ruby-mixlib-shellout >= 2.0
68 Requires:       ruby-mixlib-shellout < 3
69 Requires:       ruby-net-sftp >= 2.1.2
70 Requires:       ruby-net-sftp < 3
71 Requires:       ruby-net-ssh >= 4.2
72 Requires:       ruby-net-ssh-multi >= 1.2.1
73 Requires:       ruby-net-ssh-multi < 2
74 Requires:       ruby-ohai >= 14.0
75 Requires:       ruby-ohai < 15
76 Requires:       ruby-proxifier >= 1.0
77 Requires:       ruby-proxifier < 2
78 Requires:       ruby-rspec-core >= 3.5
79 Requires:       ruby-rspec-core < 4
80 Requires:       ruby-rspec-expectations >= 3.5
81 Requires:       ruby-rspec-expectations < 4
82 Requires:       ruby-rspec_junit_formatter >= 0.2.0
83 Requires:       ruby-rspec-mocks >= 3.5
84 Requires:       ruby-rspec-mocks < 4
85 Requires:       ruby-rubygems
86 Requires:       ruby-serverspec >= 2.7
87 Requires:       ruby-serverspec < 3
88 Requires:       ruby-specinfra >= 2.10
89 Requires:       ruby-specinfra < 3
90 Requires:       ruby-syslog-logger >= 1.6
91 Requires:       ruby-syslog-logger < 2
92 Requires:       ruby-uuidtools >= 2.1.5
93 Requires:       ruby-uuidtools < 2.2
94 Suggests:       chef-zero >= 13.0
95 Suggests:       ruby-plist >= 3.2
96 BuildArch:      noarch
97 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
98
99 # do not generate python dependency, yum support is optional
100 %define         _noautoreqfiles %{ruby_vendorlibdir}/chef/provider/package/yum-dump.py
101
102 %description
103 A systems integration framework, built to bring the benefits of
104 configuration management to your entire infrastructure.
105
106 %package -n bash-completion-knife
107 Summary:        bash-completion for knife
108 Summary(pl.UTF-8):      bashowe uzupełnianie nazw dla knifea
109 Group:          Applications/Shells
110 Requires:       %{name} >= 0.10
111 Requires:       bash-completion >= 2.0
112
113 %description -n bash-completion-knife
114 This package provides bash-completion for knife.
115
116 %description -n bash-completion-knife -l pl.UTF-8
117 Pakiet ten dostarcza bashowe uzupełnianie nazw dla knifea.
118
119 %package -n knife
120 Summary:        knife - Chef Server API client utility
121 Group:          Networking/Admin
122 Requires:       %{name} = %{version}-%{release}
123
124 %description -n knife
125 Knife is a command-line utility used to manage data on a Chef server
126 through the HTTP(S) API. Knife is organized into groups of subcommands
127 centered around the various object types in Chef. Each category of
128 subcommand is documented in its own manual page.
129
130 %prep
131 %setup -q
132 %patch0 -p1
133 %patch1 -p1
134 %patch2 -p1
135 %patch3 -p1
136 %patch4 -p1
137
138 %{__sed} -i -e '1 s,#!.*ruby,#!%{__ruby},' bin/*
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 -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,backup}}
155
156 cp -a lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir}
157 cp -a bin/* $RPM_BUILD_ROOT%{_bindir}
158
159 cp -p %{SOURCE2} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf
160
161 install -d $RPM_BUILD_ROOT%{bash_compdir}
162 cp -p %{SOURCE3} $RPM_BUILD_ROOT%{bash_compdir}/knife
163
164 %clean
165 rm -rf $RPM_BUILD_ROOT
166
167 %files
168 %defattr(644,root,root,755)
169 %doc README.md CONTRIBUTING.md
170 %dir %{_sysconfdir}/%{name}
171 %attr(755,root,root) %{_bindir}/chef-apply
172 %attr(755,root,root) %{_bindir}/chef-client
173 %attr(755,root,root) %{_bindir}/chef-resource-inspector
174 %attr(755,root,root) %{_bindir}/chef-service-manager
175 %attr(755,root,root) %{_bindir}/chef-shell
176 %attr(755,root,root) %{_bindir}/chef-solo
177 %attr(755,root,root) %{_bindir}/chef-windows-service
178 %{ruby_vendorlibdir}/chef.rb
179 %{ruby_vendorlibdir}/chef
180 %exclude %{ruby_vendorlibdir}/chef/knife
181 %exclude %{ruby_vendorlibdir}/chef/application/knife.rb
182 %exclude %{ruby_vendorlibdir}/chef/chef_fs/knife.rb
183 %exclude %{ruby_vendorlibdir}/chef/knife.rb
184 %{systemdtmpfilesdir}/chef.conf
185
186 %dir /var/lib/%{name}
187 %dir /var/lib/%{name}/roles
188 %dir /var/lib/%{name}/data_bags
189 %dir /var/lib/%{name}/environments
190 %dir %attr(750,root,root) /var/lib/%{name}/backup
191
192 %dir /var/cache/%{name}
193 %dir /var/run/%{name}
194
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
202
203 %files -n bash-completion-knife
204 %defattr(644,root,root,755)
205 %{bash_compdir}/knife
This page took 0.049543 seconds and 3 git commands to generate.