]> git.pld-linux.org Git - packages/chef.git/blame - chef.spec
fix optional plist
[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
41f40411 11Release: 0.8
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
64a8eb69 25Patch5: gemdeps.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}
bf7e149a 45Requires: ruby-erubis >= 2.7.0-3
5165006a 46Requires: ruby-json <= 1.8.1
2a1bbc08 47Requires: ruby-json >= 1.4.4
e8757686
ER
48Requires: ruby-mime-types < 2
49Requires: ruby-mime-types >= 1.16
bf7e149a 50Requires: ruby-mixlib-authentication >= 1.3.0-2
e8757686
ER
51Requires: ruby-mixlib-config < 3
52Requires: ruby-mixlib-config >= 2.0
b337cd8c 53Requires: ruby-mixlib-log >= 1.6.0-2
b6745d8f 54Requires: ruby-ohai < 9
2a1bbc08 55Requires: ruby-rest-client >= 1.0.4
bce16be1 56Requires: ruby-rubygems
7798c5f4 57Suggests: chef-zero >= 2.1.4
fce4f0b8 58Suggests: ruby-plist >= 3.1.0
e307965b
ER
59BuildArch: noarch
60BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
61
820f7abc
ER
62# do not generate python dependency, yum support is optional
63%define _noautoreqfiles %{ruby_vendorlibdir}/chef/provider/package/yum-dump.py
64
e307965b
ER
65%description
66A systems integration framework, built to bring the benefits of
67configuration management to your entire infrastructure.
68
16f49c06
ER
69%package -n ruby-chef-config
70Summary: Chef's default configuration and config loading
71Group: Development/Languages
16f49c06
ER
72
73%description -n ruby-chef-config
74Chef's default configuration and config loading.
75
5c13348f
ER
76%package -n bash-completion-knife
77Summary: bash-completion for knife
78Summary(pl.UTF-8): bashowe uzupełnianie nazw dla knifea
79Group: Applications/Shells
80Requires: %{name} >= 0.10
81Requires: bash-completion >= 2.0
82
83%description -n bash-completion-knife
84This package provides bash-completion for knife.
85
86%description -n bash-completion-knife -l pl.UTF-8
87Pakiet ten dostarcza bashowe uzupełnianie nazw dla knifea.
88
be8cf7bb
ER
89%package -n knife
90Summary: knife - Chef Server API client utility
aabebe0b 91Group: Networking/Admin
be8cf7bb
ER
92Requires: %{name} = %{version}-%{release}
93
94%description -n knife
95Knife is a command-line utility used to manage data on a Chef server
96through the HTTP(S) API. Knife is organized into groups of subcommands
97centered around the various object types in Chef. Each category of
98subcommand is documented in its own manual page.
99
e307965b 100%prep
10b8ffc4 101%setup -q
c8ed2d9c 102#%patch0 -p1 # UPDATE
bc8e6547 103%patch1 -p1
31feaf16 104%patch2 -p1
7fbe09ae 105%patch3 -p1
fce4f0b8 106%patch4 -p1
64a8eb69 107%patch5 -p1
e307965b 108
68cfa14e
ER
109%{__sed} -i -e '1 s,#!.*ruby,#!%{__ruby},' bin/*
110
10b8ffc4
ER
111%ifos linux
112# those do not match s.executables from .gemspec
113rm bin/chef-service-manager
114rm bin/chef-windows-service
115%endif
116
4530c37b
ER
117# don't package this, a maintainer's rake task
118rm chef-config/lib/chef-config/package_task.rb
119
5165006a
ER
120# cleanup backups after patching
121find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
122
10b8ffc4 123grep --exclude-dir=spec --exclude-dir=distro --exclude=CHANGELOG.md -r /var/chef . && exit 1
5165006a 124
8354a17e 125%build
1dc7ecda
ER
126# make gemspec self-contained
127%__gem_helper spec-dump %{name}.gemspec
128
8354a17e
ER
129%if %{with tests}
130rspec spec
131%endif
132
1dc7ecda
ER
133cd chef-config
134# make gemspec self-contained
135%__gem_helper spec-dump %{name}-config.gemspec
136
e307965b
ER
137%install
138rm -rf $RPM_BUILD_ROOT
f972dda7
ER
139install -d $RPM_BUILD_ROOT{%{_sysconfdir}/%{name},%{_bindir},%{_mandir}/man1,%{systemdtmpfilesdir}} \
140 $RPM_BUILD_ROOT%{ruby_vendorlibdir}/chef/reporting \
1dc7ecda 141 $RPM_BUILD_ROOT%{ruby_specdir} \
66e54417 142 $RPM_BUILD_ROOT/var/{run/%{name},cache/%{name},lib/%{name}/{roles,data_bags,environments,reports,backup}}
66164e90 143
16f49c06 144# chef
68cfa14e 145cp -a lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir}
e307965b 146cp -a bin/* $RPM_BUILD_ROOT%{_bindir}
958b507e 147cp -a distro/common/man/* $RPM_BUILD_ROOT%{_mandir}
1dc7ecda 148cp -p chef-%{version}.gemspec $RPM_BUILD_ROOT%{ruby_specdir}
23fa8236 149%{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/README.md
e307965b 150
16f49c06
ER
151# chef-config
152cp -a chef-config/lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir}
1dc7ecda 153cp -p chef-config/chef-config-%{version}.gemspec $RPM_BUILD_ROOT%{ruby_specdir}
16f49c06 154
02d95ccd 155cp -p %{SOURCE2} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf
303651f6 156
5c13348f
ER
157install -d $RPM_BUILD_ROOT%{bash_compdir}
158cp -p %{SOURCE3} $RPM_BUILD_ROOT%{bash_compdir}/knife
159
bce16be1
ER
160%clean
161rm -rf $RPM_BUILD_ROOT
162
e307965b
ER
163%files
164%defattr(644,root,root,755)
2a1bbc08 165%doc README.md CONTRIBUTING.md
303651f6 166%dir %{_sysconfdir}/%{name}
2a1bbc08 167%attr(755,root,root) %{_bindir}/chef-apply
e307965b 168%attr(755,root,root) %{_bindir}/chef-client
2a1bbc08 169%attr(755,root,root) %{_bindir}/chef-shell
e307965b 170%attr(755,root,root) %{_bindir}/chef-solo
958b507e 171%{_mandir}/man1/chef-shell.1*
8eb00d5a 172%{_mandir}/man8/chef-apply.8*
be8cf7bb
ER
173%{_mandir}/man8/chef-client.8*
174%{_mandir}/man8/chef-solo.8*
175%{ruby_vendorlibdir}/chef.rb
176%{ruby_vendorlibdir}/chef
1dc7ecda 177%{ruby_specdir}/chef-%{version}.gemspec
be8cf7bb
ER
178%exclude %{ruby_vendorlibdir}/chef/knife
179%exclude %{ruby_vendorlibdir}/chef/application/knife.rb
180%exclude %{ruby_vendorlibdir}/chef/chef_fs/knife.rb
181%exclude %{ruby_vendorlibdir}/chef/knife.rb
182%{systemdtmpfilesdir}/chef.conf
183
184%dir /var/lib/%{name}
185%dir /var/lib/%{name}/roles
186%dir /var/lib/%{name}/data_bags
187%dir /var/lib/%{name}/environments
66e54417 188%dir /var/lib/%{name}/reports
7e5aff6c 189%dir %attr(750,root,root) /var/lib/%{name}/backup
be8cf7bb
ER
190
191%dir /var/cache/%{name}
192%dir /var/run/%{name}
193
16f49c06
ER
194%files -n ruby-chef-config
195%defattr(644,root,root,755)
196%{ruby_vendorlibdir}/chef-config.rb
197%{ruby_vendorlibdir}/chef-config
1dc7ecda 198%{ruby_specdir}/chef-config-%{version}.gemspec
16f49c06 199
be8cf7bb
ER
200%files -n knife
201%defattr(644,root,root,755)
202%attr(755,root,root) %{_bindir}/knife
203%{ruby_vendorlibdir}/chef/knife.rb
204%{ruby_vendorlibdir}/chef/knife
205%{ruby_vendorlibdir}/chef/application/knife.rb
206%{ruby_vendorlibdir}/chef/chef_fs/knife.rb
958b507e
ER
207%{_mandir}/man1/knife-bootstrap.1*
208%{_mandir}/man1/knife-client.1*
209%{_mandir}/man1/knife-configure.1*
210%{_mandir}/man1/knife-cookbook-site.1*
211%{_mandir}/man1/knife-cookbook.1*
212%{_mandir}/man1/knife-data-bag.1*
23fa8236
ER
213%{_mandir}/man1/knife-delete.1*
214%{_mandir}/man1/knife-deps.1*
215%{_mandir}/man1/knife-diff.1*
216%{_mandir}/man1/knife-download.1*
217%{_mandir}/man1/knife-edit.1*
958b507e
ER
218%{_mandir}/man1/knife-environment.1*
219%{_mandir}/man1/knife-exec.1*
23fa8236
ER
220%{_mandir}/man1/knife-index-rebuild.1*
221%{_mandir}/man1/knife-list.1*
958b507e 222%{_mandir}/man1/knife-node.1*
23fa8236
ER
223%{_mandir}/man1/knife-raw.1*
224%{_mandir}/man1/knife-recipe-list.1*
958b507e
ER
225%{_mandir}/man1/knife-role.1*
226%{_mandir}/man1/knife-search.1*
96f87093 227%{_mandir}/man1/knife-serve.1*
23fa8236 228%{_mandir}/man1/knife-show.1*
958b507e 229%{_mandir}/man1/knife-ssh.1*
96f87093
ER
230%{_mandir}/man1/knife-ssl-check.1*
231%{_mandir}/man1/knife-ssl-fetch.1*
958b507e
ER
232%{_mandir}/man1/knife-status.1*
233%{_mandir}/man1/knife-tag.1*
23fa8236
ER
234%{_mandir}/man1/knife-upload.1*
235%{_mandir}/man1/knife-user.1*
236%{_mandir}/man1/knife-xargs.1*
958b507e 237%{_mandir}/man1/knife.1*
303651f6 238
5c13348f
ER
239%files -n bash-completion-knife
240%defattr(644,root,root,755)
241%{bash_compdir}/knife
This page took 0.130898 seconds and 4 git commands to generate.