]> git.pld-linux.org Git - packages/chef.git/blob - chef.spec
package chef/reporting dir
[packages/chef.git] / chef.spec
1 #
2 # NOTE:
3 # - check releases here: https://github.com/opscode/chef/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:        11.8.2
11 Release:        2
12 License:        Apache v2.0
13 Group:          Development/Languages
14 Source0:        http://rubygems.org/downloads/%{name}-%{version}.gem
15 # Source0-md5:  7d3c2e8b98ec8df050d92686f1429d8f
16 Source1:        %{name}.rb
17 Source2:        %{name}.tmpfiles
18 Source3:        https://raw.github.com/stevendanna/knife-hacks/master/shell/knife_completion.sh
19 # Source3-md5:  a4c1e41370be8088a59ddb3b2e7ea397
20 Patch0:         platform-pld.patch
21 Patch1:         FHS.patch
22 Patch2:         https://github.com/glensc/chef/compare/poldek.patch
23 # Patch2-md5:   8fd92d572b7ebce759e9034097bfc399
24 Patch3:         https://github.com/glensc/chef/compare/pld-knife-boostrap.patch
25 # Patch3-md5:   bfc884469fad7b5aa46341402be5fccd
26 URL:            https://wiki.opscode.com/display/chef/
27 BuildRequires:  rpm-rubyprov
28 BuildRequires:  rpmbuild(macros) >= 1.673
29 BuildRequires:  sed >= 4.0
30 %if %{with tests}
31 BuildRequires:  ruby-abstract
32 BuildRequires:  ruby-mixlib-authentication >= 1.3.0
33 BuildRequires:  ruby-net-ssh-multi >= 1.1.0
34 BuildRequires:  ruby-rack
35 BuildRequires:  ruby-rake
36 #BuildRequires: ruby-rdoc
37 BuildRequires:  ruby-rest-client >= 1.0.4
38 BuildRequires:  ruby-rspec-core < 2.14
39 BuildRequires:  ruby-rspec-core >= 2.13.0
40 BuildRequires:  ruby-rspec-expectations < 2.14
41 BuildRequires:  ruby-rspec-expectations >= 2.13.0
42 BuildRequires:  ruby-rspec-mocks < 2.14
43 BuildRequires:  ruby-rspec-mocks >= 2.13.0
44 #BuildRequires: ruby-rspec_junit_formatter
45 #BuildRequires: ruby-sdoc
46 %endif
47 Requires:       lsb-release
48 Requires:       poldek >= 0.30
49 Requires:       ruby >= 1:1.9.3.429-4
50 Requires:       ruby-diff-lcs < 2
51 Requires:       ruby-diff-lcs >= 1.2
52 Requires:       ruby-diff-lcs >= 1.2.4
53 Requires:       ruby-erubis
54 Requires:       ruby-highline >= 1.6.9
55 Requires:       ruby-json >= 1.4.4
56 Requires:       ruby-mime-types < 2
57 Requires:       ruby-mime-types >= 1.16
58 Requires:       ruby-mixlib-authentication >= 1.3.0
59 Requires:       ruby-mixlib-cli >= 1.3.0
60 Requires:       ruby-mixlib-config < 3
61 Requires:       ruby-mixlib-config >= 2.0
62 Requires:       ruby-mixlib-log >= 1.3.0
63 Requires:       ruby-mixlib-shellout >= 1.2
64 Requires:       ruby-net-ssh >= 2.6
65 Requires:       ruby-net-ssh-multi >= 1.1.0
66 Requires:       ruby-ohai < 7
67 Requires:       ruby-ohai >= 6.0
68 Requires:       ruby-rest-client >= 1.0.4
69 Requires:       ruby-rubygems
70 Requires:       ruby-yajl >= 1.1
71 Suggests:       chef-zero >= 1.6.2
72 BuildArch:      noarch
73 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
74
75 # do not generate python dependency, yum support is optional
76 %define         _noautoreqfiles %{ruby_vendorlibdir}/chef/provider/package/yum-dump.py
77
78 %description
79 A systems integration framework, built to bring the benefits of
80 configuration management to your entire infrastructure.
81
82 %package -n bash-completion-knife
83 Summary:        bash-completion for knife
84 Summary(pl.UTF-8):      bashowe uzupełnianie nazw dla knifea
85 Group:          Applications/Shells
86 Requires:       %{name} >= 0.10
87 Requires:       bash-completion >= 2.0
88
89 %description -n bash-completion-knife
90 This package provides bash-completion for knife.
91
92 %description -n bash-completion-knife -l pl.UTF-8
93 Pakiet ten dostarcza bashowe uzupełnianie nazw dla knifea.
94
95 %package -n knife
96 Summary:        knife - Chef Server API client utility
97 Group:          Development/Languages
98 Requires:       %{name} = %{version}-%{release}
99
100 %description -n knife
101 Knife is a command-line utility used to manage data on a Chef server
102 through the HTTP(S) API. Knife is organized into groups of subcommands
103 centered around the various object types in Chef. Each category of
104 subcommand is documented in its own manual page.
105
106 %prep
107 %setup -q
108 %patch0 -p1
109 %patch1 -p1
110 %patch2 -p1
111 %patch3 -p1
112
113 grep --exclude-dir=spec --exclude-dir=distro -r /var/chef . && exit 1
114
115 %{__sed} -i -e '1 s,#!.*ruby,#!%{__ruby},' bin/*
116
117 %build
118 %if %{with tests}
119 rspec spec
120 %endif
121
122 %install
123 rm -rf $RPM_BUILD_ROOT
124 install -d $RPM_BUILD_ROOT{%{_sysconfdir}/%{name},%{_bindir},%{_mandir}/man1,%{systemdtmpfilesdir}} \
125         $RPM_BUILD_ROOT%{ruby_vendorlibdir}/chef/reporting \
126         $RPM_BUILD_ROOT/var/{run/%{name},cache/%{name},lib/%{name}/{roles,data_bags,environments,backup}}
127
128 cp -a lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir}
129 cp -a bin/* $RPM_BUILD_ROOT%{_bindir}
130 cp -a distro/common/man/* $RPM_BUILD_ROOT%{_mandir}
131 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/README.md
132
133 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/chef.rb
134 cp -p %{SOURCE2} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf
135
136 install -d $RPM_BUILD_ROOT%{bash_compdir}
137 cp -p %{SOURCE3} $RPM_BUILD_ROOT%{bash_compdir}/knife
138
139 %clean
140 rm -rf $RPM_BUILD_ROOT
141
142 %files
143 %defattr(644,root,root,755)
144 %doc README.md CONTRIBUTING.md
145 %dir %{_sysconfdir}/%{name}
146 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/chef.rb
147 %attr(755,root,root) %{_bindir}/chef-apply
148 %attr(755,root,root) %{_bindir}/chef-client
149 %attr(755,root,root) %{_bindir}/chef-service-manager
150 %attr(755,root,root) %{_bindir}/chef-shell
151 %attr(755,root,root) %{_bindir}/chef-solo
152 %attr(755,root,root) %{_bindir}/shef
153 %{_mandir}/man1/chef-shell.1*
154 %{_mandir}/man8/chef-client.8*
155 %{_mandir}/man8/chef-solo.8*
156 %{ruby_vendorlibdir}/chef.rb
157 %{ruby_vendorlibdir}/chef
158 %exclude %{ruby_vendorlibdir}/chef/knife
159 %exclude %{ruby_vendorlibdir}/chef/application/knife.rb
160 %exclude %{ruby_vendorlibdir}/chef/chef_fs/knife.rb
161 %exclude %{ruby_vendorlibdir}/chef/knife.rb
162 %{systemdtmpfilesdir}/chef.conf
163
164 %dir /var/lib/%{name}
165 %dir /var/lib/%{name}/roles
166 %dir /var/lib/%{name}/data_bags
167 %dir /var/lib/%{name}/environments
168
169 %dir /var/cache/%{name}
170 %dir /var/run/%{name}
171
172 %files -n knife
173 %defattr(644,root,root,755)
174 %attr(755,root,root) %{_bindir}/knife
175 %{ruby_vendorlibdir}/chef/knife.rb
176 %{ruby_vendorlibdir}/chef/knife
177 %{ruby_vendorlibdir}/chef/application/knife.rb
178 %{ruby_vendorlibdir}/chef/chef_fs/knife.rb
179 %{_mandir}/man1/knife-bootstrap.1*
180 %{_mandir}/man1/knife-client.1*
181 %{_mandir}/man1/knife-configure.1*
182 %{_mandir}/man1/knife-cookbook-site.1*
183 %{_mandir}/man1/knife-cookbook.1*
184 %{_mandir}/man1/knife-data-bag.1*
185 %{_mandir}/man1/knife-delete.1*
186 %{_mandir}/man1/knife-deps.1*
187 %{_mandir}/man1/knife-diff.1*
188 %{_mandir}/man1/knife-download.1*
189 %{_mandir}/man1/knife-edit.1*
190 %{_mandir}/man1/knife-environment.1*
191 %{_mandir}/man1/knife-exec.1*
192 %{_mandir}/man1/knife-index-rebuild.1*
193 %{_mandir}/man1/knife-list.1*
194 %{_mandir}/man1/knife-node.1*
195 %{_mandir}/man1/knife-raw.1*
196 %{_mandir}/man1/knife-recipe-list.1*
197 %{_mandir}/man1/knife-role.1*
198 %{_mandir}/man1/knife-search.1*
199 %{_mandir}/man1/knife-show.1*
200 %{_mandir}/man1/knife-ssh.1*
201 %{_mandir}/man1/knife-status.1*
202 %{_mandir}/man1/knife-tag.1*
203 %{_mandir}/man1/knife-upload.1*
204 %{_mandir}/man1/knife-user.1*
205 %{_mandir}/man1/knife-xargs.1*
206 %{_mandir}/man1/knife.1*
207
208 %dir /var/lib/%{name}
209 %dir /var/lib/%{name}/roles
210 %dir /var/lib/%{name}/data_bags
211 %dir /var/lib/%{name}/environments
212 %dir %attr(750,root,root) /var/lib/%{name}/backup
213
214 %dir /var/cache/%{name}
215 %dir /var/run/%{name}
216
217 %files -n bash-completion-knife
218 %defattr(644,root,root,755)
219 %{bash_compdir}/knife
This page took 0.090788 seconds and 4 git commands to generate.