]> git.pld-linux.org Git - packages/chef.git/blame - chef.spec
Merge branch 'chef-14'
[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
bfe4b1fa 10Version: 14.1.36
aae3007f 11Release: 1
e307965b 12License: Apache v2.0
aabebe0b 13Group: Networking/Admin
27cfe329 14Source0: https://github.com/chef/chef/archive/v%{version}/%{name}-%{version}.tar.gz
bfe4b1fa 15# Source0-md5: 442169a1a824b3335376a88723e133a0
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
c7e18403 26URL: https://www.chef.io/
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
a18fec1c 46Requires: ruby-json
e8757686
ER
47Requires: ruby-mime-types < 2
48Requires: ruby-mime-types >= 1.16
e8757686
ER
49Requires: ruby-mixlib-config < 3
50Requires: ruby-mixlib-config >= 2.0
2a1bbc08 51Requires: ruby-rest-client >= 1.0.4
bce16be1 52Requires: ruby-rubygems
7798c5f4 53Suggests: chef-zero >= 2.1.4
fce4f0b8 54Suggests: ruby-plist >= 3.1.0
e307965b
ER
55BuildArch: noarch
56BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
57
820f7abc
ER
58# do not generate python dependency, yum support is optional
59%define _noautoreqfiles %{ruby_vendorlibdir}/chef/provider/package/yum-dump.py
60
e307965b
ER
61%description
62A systems integration framework, built to bring the benefits of
63configuration management to your entire infrastructure.
64
16f49c06
ER
65%package -n ruby-chef-config
66Summary: Chef's default configuration and config loading
67Group: Development/Languages
16f49c06
ER
68
69%description -n ruby-chef-config
70Chef's default configuration and config loading.
71
5c13348f
ER
72%package -n bash-completion-knife
73Summary: bash-completion for knife
74Summary(pl.UTF-8): bashowe uzupełnianie nazw dla knifea
75Group: Applications/Shells
76Requires: %{name} >= 0.10
77Requires: bash-completion >= 2.0
78
79%description -n bash-completion-knife
80This package provides bash-completion for knife.
81
82%description -n bash-completion-knife -l pl.UTF-8
83Pakiet ten dostarcza bashowe uzupełnianie nazw dla knifea.
84
be8cf7bb
ER
85%package -n knife
86Summary: knife - Chef Server API client utility
aabebe0b 87Group: Networking/Admin
be8cf7bb
ER
88Requires: %{name} = %{version}-%{release}
89
90%description -n knife
91Knife is a command-line utility used to manage data on a Chef server
92through the HTTP(S) API. Knife is organized into groups of subcommands
93centered around the various object types in Chef. Each category of
94subcommand is documented in its own manual page.
95
e307965b 96%prep
303651f6 97%setup -q
a8f01bdc
JR
98%patch0 -p1
99%patch1 -p1
100%patch2 -p1
101%patch3 -p1
102%patch4 -p1
64a8eb69 103%patch5 -p1
e307965b 104
68cfa14e
ER
105%{__sed} -i -e '1 s,#!.*ruby,#!%{__ruby},' bin/*
106
10b8ffc4
ER
107%ifos linux
108# those do not match s.executables from .gemspec
109rm bin/chef-service-manager
110rm bin/chef-windows-service
111%endif
112
4530c37b
ER
113# don't package this, a maintainer's rake task
114rm chef-config/lib/chef-config/package_task.rb
115
5165006a
ER
116# cleanup backups after patching
117find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
118
10b8ffc4 119grep --exclude-dir=spec --exclude-dir=distro --exclude=CHANGELOG.md -r /var/chef . && exit 1
5165006a 120
8354a17e 121%build
1dc7ecda
ER
122# make gemspec self-contained
123%__gem_helper spec-dump %{name}.gemspec
124
8354a17e
ER
125%if %{with tests}
126rspec spec
127%endif
128
1dc7ecda
ER
129cd chef-config
130# make gemspec self-contained
131%__gem_helper spec-dump %{name}-config.gemspec
132
e307965b
ER
133%install
134rm -rf $RPM_BUILD_ROOT
4e5a0fdf 135install -d $RPM_BUILD_ROOT{%{_sysconfdir}/%{name},%{_bindir},%{systemdtmpfilesdir}} \
f972dda7 136 $RPM_BUILD_ROOT%{ruby_vendorlibdir}/chef/reporting \
1dc7ecda 137 $RPM_BUILD_ROOT%{ruby_specdir} \
66e54417 138 $RPM_BUILD_ROOT/var/{run/%{name},cache/%{name},lib/%{name}/{roles,data_bags,environments,reports,backup}}
66164e90 139
16f49c06 140# chef
68cfa14e 141cp -a lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir}
e307965b 142cp -a bin/* $RPM_BUILD_ROOT%{_bindir}
1dc7ecda 143cp -p chef-%{version}.gemspec $RPM_BUILD_ROOT%{ruby_specdir}
e307965b 144
16f49c06
ER
145# chef-config
146cp -a chef-config/lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir}
1dc7ecda 147cp -p chef-config/chef-config-%{version}.gemspec $RPM_BUILD_ROOT%{ruby_specdir}
e307965b 148
02d95ccd 149cp -p %{SOURCE2} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf
303651f6 150
5c13348f
ER
151install -d $RPM_BUILD_ROOT%{bash_compdir}
152cp -p %{SOURCE3} $RPM_BUILD_ROOT%{bash_compdir}/knife
153
bce16be1
ER
154%clean
155rm -rf $RPM_BUILD_ROOT
156
e307965b
ER
157%files
158%defattr(644,root,root,755)
2a1bbc08 159%doc README.md CONTRIBUTING.md
303651f6 160%dir %{_sysconfdir}/%{name}
2a1bbc08 161%attr(755,root,root) %{_bindir}/chef-apply
e307965b 162%attr(755,root,root) %{_bindir}/chef-client
27cfe329 163%attr(755,root,root) %{_bindir}/chef-resource-inspector
2a1bbc08 164%attr(755,root,root) %{_bindir}/chef-shell
e307965b 165%attr(755,root,root) %{_bindir}/chef-solo
be8cf7bb
ER
166%{ruby_vendorlibdir}/chef.rb
167%{ruby_vendorlibdir}/chef
1dc7ecda 168%{ruby_specdir}/chef-%{version}.gemspec
be8cf7bb
ER
169%exclude %{ruby_vendorlibdir}/chef/knife
170%exclude %{ruby_vendorlibdir}/chef/application/knife.rb
171%exclude %{ruby_vendorlibdir}/chef/chef_fs/knife.rb
172%exclude %{ruby_vendorlibdir}/chef/knife.rb
173%{systemdtmpfilesdir}/chef.conf
174
175%dir /var/lib/%{name}
176%dir /var/lib/%{name}/roles
177%dir /var/lib/%{name}/data_bags
178%dir /var/lib/%{name}/environments
66e54417 179%dir /var/lib/%{name}/reports
7e5aff6c 180%dir %attr(750,root,root) /var/lib/%{name}/backup
be8cf7bb
ER
181
182%dir /var/cache/%{name}
183%dir /var/run/%{name}
184
16f49c06
ER
185%files -n ruby-chef-config
186%defattr(644,root,root,755)
187%{ruby_vendorlibdir}/chef-config.rb
188%{ruby_vendorlibdir}/chef-config
1dc7ecda 189%{ruby_specdir}/chef-config-%{version}.gemspec
16f49c06 190
be8cf7bb
ER
191%files -n knife
192%defattr(644,root,root,755)
193%attr(755,root,root) %{_bindir}/knife
194%{ruby_vendorlibdir}/chef/knife.rb
195%{ruby_vendorlibdir}/chef/knife
196%{ruby_vendorlibdir}/chef/application/knife.rb
197%{ruby_vendorlibdir}/chef/chef_fs/knife.rb
303651f6 198
5c13348f
ER
199%files -n bash-completion-knife
200%defattr(644,root,root,755)
201%{bash_compdir}/knife
This page took 0.067744 seconds and 4 git commands to generate.