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