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