]> git.pld-linux.org Git - packages/chef.git/blob - chef.spec
up to 14.13.16
[packages/chef.git] / chef.spec
1 # NOTE:
2 # - check releases here: https://downloads.chef.io/chef-client/debian/
3 #   the versions tagged in github are somewhat newer, perhaps dev-releases
4
5 # Conditional build:
6 %bcond_with     tests           # build without tests
7
8 Summary:        A systems integration framework, built to bring the benefits of configuration management to your entire infrastructure
9 Name:           chef
10 Version:        14.13.16
11 Release:        1
12 License:        Apache v2.0
13 Group:          Networking/Admin
14 Source0:        https://github.com/chef/chef/archive/v%{version}/%{name}-%{version}.tar.gz
15 # Source0-md5:  67898b54b1a9f74fcc2f0d28d357c4c0
16 Source2:        %{name}.tmpfiles
17 Source3:        https://raw.github.com/stevendanna/knife-hacks/master/shell/knife_completion.sh
18 # Source3-md5:  a4c1e41370be8088a59ddb3b2e7ea397
19 Patch0:         platform-pld.patch
20 Patch1:         FHS.patch
21 Patch2:         poldek.patch
22 Patch3:         https://github.com/glensc/chef/compare/pld-knife-boostrap.patch
23 # Patch3-md5:   8ff0fdfde6dc90018698775bf8f13062
24 Patch4:         optional-plist.patch
25 Patch5:         gemdeps.patch
26 Patch6:         rubygems.patch
27 URL:            https://www.chef.io/
28 BuildRequires:  rpm-rubyprov
29 BuildRequires:  rpmbuild(macros) >= 1.673
30 BuildRequires:  sed >= 4.0
31 %if %{with tests}
32 BuildRequires:  ruby-rack
33 BuildRequires:  ruby-rake
34 BuildRequires:  ruby-rspec-core < 2.15
35 BuildRequires:  ruby-rspec-core >= 2.14.0
36 BuildRequires:  ruby-rspec-expectations < 2.15
37 BuildRequires:  ruby-rspec-expectations >= 2.14.0
38 BuildRequires:  ruby-rspec-mocks < 2.15
39 BuildRequires:  ruby-rspec-mocks >= 2.14.0
40 BuildRequires:  ruby-rspec_junit_formatter
41 %endif
42 Requires:       lsb-release
43 Requires:       poldek >= 0.30
44 Requires:       ruby >= 1:1.9.3.429-4
45 Requires:       ruby-chef-config = %{version}-%{release}
46 Requires:       ruby-erubis >= 2.7.0-3
47 Requires:       ruby-json
48 Requires:       ruby-mime-types < 2
49 Requires:       ruby-mime-types >= 1.16
50 Requires:       ruby-mixlib-config < 3
51 Requires:       ruby-mixlib-config >= 2.0
52 Requires:       ruby-rest-client >= 1.0.4
53 Requires:       ruby-rubygems
54 Suggests:       chef-zero >= 2.1.4
55 Suggests:       ruby-plist >= 3.1.0
56 BuildArch:      noarch
57 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
58
59 # do not generate python dependency, yum support is optional
60 %define         _noautoreqfiles %{ruby_vendorlibdir}/chef/provider/package/yum-dump.py
61
62 %description
63 A systems integration framework, built to bring the benefits of
64 configuration management to your entire infrastructure.
65
66 %package -n ruby-chef-config
67 Summary:        Chef's default configuration and config loading
68 Group:          Development/Languages
69
70 %description -n ruby-chef-config
71 Chef's default configuration and config loading.
72
73 %package -n bash-completion-knife
74 Summary:        bash-completion for knife
75 Summary(pl.UTF-8):      bashowe uzupełnianie nazw dla knifea
76 Group:          Applications/Shells
77 Requires:       %{name} >= 0.10
78 Requires:       bash-completion >= 2.0
79
80 %description -n bash-completion-knife
81 This package provides bash-completion for knife.
82
83 %description -n bash-completion-knife -l pl.UTF-8
84 Pakiet ten dostarcza bashowe uzupełnianie nazw dla knifea.
85
86 %package -n knife
87 Summary:        knife - Chef Server API client utility
88 Group:          Networking/Admin
89 Requires:       %{name} = %{version}-%{release}
90
91 %description -n knife
92 Knife is a command-line utility used to manage data on a Chef server
93 through the HTTP(S) API. Knife is organized into groups of subcommands
94 centered around the various object types in Chef. Each category of
95 subcommand is documented in its own manual page.
96
97 %prep
98 %setup -q
99 %patch0 -p1
100 %patch1 -p1
101 %patch2 -p1
102 %patch3 -p1
103 %patch4 -p1
104 %patch5 -p1
105 %patch6 -p1
106
107 %{__sed} -i -e '1 s,#!.*ruby,#!%{__ruby},' bin/*
108
109 %ifos linux
110 # those do not match s.executables from .gemspec
111 rm bin/chef-service-manager
112 rm bin/chef-windows-service
113 %endif
114
115 # cleanup backups after patching
116 find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
117
118 grep --exclude-dir=spec --exclude-dir=distro --exclude=CHANGELOG.md -r /var/chef . && exit 1
119
120 %build
121 # make gemspec self-contained
122 %__gem_helper spec-dump %{name}.gemspec
123
124 %if %{with tests}
125 rspec spec
126 %endif
127
128 cd chef-config
129 # make gemspec self-contained
130 %__gem_helper spec-dump %{name}-config.gemspec
131
132 %install
133 rm -rf $RPM_BUILD_ROOT
134 install -d $RPM_BUILD_ROOT{%{_sysconfdir}/%{name},%{_bindir},%{systemdtmpfilesdir}} \
135         $RPM_BUILD_ROOT%{ruby_vendorlibdir}/chef/reporting \
136         $RPM_BUILD_ROOT%{ruby_specdir} \
137         $RPM_BUILD_ROOT/var/{run/%{name},cache/%{name},lib/%{name}/{roles,data_bags,environments,reports,backup}}
138
139 # chef
140 cp -a lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir}
141 cp -a bin/* $RPM_BUILD_ROOT%{_bindir}
142 cp -p chef-%{version}.gemspec $RPM_BUILD_ROOT%{ruby_specdir}
143
144 # chef-config
145 cp -a chef-config/lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir}
146 cp -p chef-config/chef-config-%{version}.gemspec $RPM_BUILD_ROOT%{ruby_specdir}
147
148 cp -p %{SOURCE2} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf
149
150 install -d $RPM_BUILD_ROOT%{bash_compdir}
151 cp -p %{SOURCE3} $RPM_BUILD_ROOT%{bash_compdir}/knife
152
153 %clean
154 rm -rf $RPM_BUILD_ROOT
155
156 %files
157 %defattr(644,root,root,755)
158 %doc README.md CONTRIBUTING.md
159 %dir %{_sysconfdir}/%{name}
160 %attr(755,root,root) %{_bindir}/chef-apply
161 %attr(755,root,root) %{_bindir}/chef-client
162 %attr(755,root,root) %{_bindir}/chef-resource-inspector
163 %attr(755,root,root) %{_bindir}/chef-shell
164 %attr(755,root,root) %{_bindir}/chef-solo
165 %{ruby_vendorlibdir}/chef.rb
166 %{ruby_vendorlibdir}/chef
167 %{ruby_specdir}/chef-%{version}.gemspec
168 %exclude %{ruby_vendorlibdir}/chef/knife
169 %exclude %{ruby_vendorlibdir}/chef/application/knife.rb
170 %exclude %{ruby_vendorlibdir}/chef/chef_fs/knife.rb
171 %exclude %{ruby_vendorlibdir}/chef/knife.rb
172 %{systemdtmpfilesdir}/chef.conf
173
174 %dir /var/lib/%{name}
175 %dir /var/lib/%{name}/roles
176 %dir /var/lib/%{name}/data_bags
177 %dir /var/lib/%{name}/environments
178 %dir /var/lib/%{name}/reports
179 %dir %attr(750,root,root) /var/lib/%{name}/backup
180
181 %dir /var/cache/%{name}
182 %dir /var/run/%{name}
183
184 %files -n ruby-chef-config
185 %defattr(644,root,root,755)
186 %{ruby_vendorlibdir}/chef-config.rb
187 %{ruby_vendorlibdir}/chef-config
188 %{ruby_specdir}/chef-config-%{version}.gemspec
189
190 %files -n knife
191 %defattr(644,root,root,755)
192 %attr(755,root,root) %{_bindir}/knife
193 %{ruby_vendorlibdir}/chef/knife.rb
194 %{ruby_vendorlibdir}/chef/knife
195 %{ruby_vendorlibdir}/chef/application/knife.rb
196 %{ruby_vendorlibdir}/chef/chef_fs/knife.rb
197
198 %files -n bash-completion-knife
199 %defattr(644,root,root,755)
200 %{bash_compdir}/knife
This page took 0.056977 seconds and 3 git commands to generate.