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