]>
Commit | Line | Data |
---|---|---|
8354a17e ER |
1 | # |
2 | # Conditional build: | |
3 | %bcond_with tests # build without tests | |
4 | ||
e307965b ER |
5 | Summary: A systems integration framework, built to bring the benefits of configuration management to your entire infrastructure |
6 | Name: chef | |
0769c463 | 7 | Version: 11.6.2 |
5c13348f | 8 | Release: 7 |
e307965b ER |
9 | License: Apache v2.0 |
10 | Group: Development/Languages | |
e307965b | 11 | Source0: http://rubygems.org/downloads/%{name}-%{version}.gem |
0769c463 | 12 | # Source0-md5: 8db9eb4b3c75be30e8125ea4eedd3f01 |
5cb2f1b0 | 13 | Source1: %{name}.rb |
02d95ccd | 14 | Source2: %{name}.tmpfiles |
5c13348f ER |
15 | Source3: https://raw.github.com/stevendanna/knife-hacks/master/shell/knife_completion.sh |
16 | # Source3-md5: a4c1e41370be8088a59ddb3b2e7ea397 | |
7abbc83b | 17 | Patch0: platform-pld.patch |
bc8e6547 | 18 | Patch1: FHS.patch |
31feaf16 | 19 | Patch2: https://github.com/glensc/chef/compare/poldek.patch |
3f49fa87 | 20 | # Patch2-md5: 5a0fc35de33910b41cba4e87dcb4bf9a |
7fbe09ae | 21 | Patch3: https://github.com/glensc/chef/compare/pld-knife-boostrap.patch |
4852435c | 22 | # Patch3-md5: 8ff0fdfde6dc90018698775bf8f13062 |
2a1bbc08 | 23 | URL: http://wiki.opscode.com/display/chef |
303651f6 | 24 | BuildRequires: rpm-rubyprov |
5c13348f | 25 | BuildRequires: rpmbuild(macros) >= 1.673 |
68cfa14e ER |
26 | BuildRequires: sed >= 4.0 |
27 | %if %{with tests} | |
8354a17e | 28 | BuildRequires: ruby-abstract |
f0820095 ER |
29 | BuildRequires: ruby-chef-zero < 2 |
30 | BuildRequires: ruby-chef-zero >= 1.4 | |
8354a17e | 31 | BuildRequires: ruby-mixlib-authentication >= 1.3.0 |
55a45456 | 32 | BuildRequires: ruby-net-ssh-multi >= 1.1.0 |
f0820095 ER |
33 | BuildRequires: ruby-puma < 2 |
34 | BuildRequires: ruby-puma >= 1.6 | |
68cfa14e ER |
35 | BuildRequires: ruby-rack |
36 | BuildRequires: ruby-rake | |
8354a17e | 37 | #BuildRequires: ruby-rdoc |
55a45456 | 38 | BuildRequires: ruby-rest-client >= 1.0.4 |
68cfa14e ER |
39 | BuildRequires: ruby-rspec-core >= 2.12.0 |
40 | BuildRequires: ruby-rspec-expectations >= 2.12.0 | |
41 | BuildRequires: ruby-rspec-mocks >= 2.12.0 | |
8354a17e ER |
42 | #BuildRequires: ruby-rspec_junit_formatter |
43 | #BuildRequires: ruby-sdoc | |
68cfa14e | 44 | %endif |
3bda27fd | 45 | Requires: diffutils |
bb312a69 | 46 | Requires: iproute2 |
97e7edae | 47 | Requires: lsb-release |
31feaf16 | 48 | Requires: poldek >= 0.30 |
f0820095 | 49 | Requires: ruby >= 1:1.9.3.429-4 |
bce16be1 | 50 | Requires: ruby-erubis |
2a1bbc08 | 51 | Requires: ruby-highline >= 1.6.9 |
2a1bbc08 ER |
52 | Requires: ruby-json >= 1.4.4 |
53 | Requires: ruby-mixlib-authentication >= 1.3.0 | |
54 | Requires: ruby-mixlib-cli >= 1.3.0 | |
bce16be1 ER |
55 | Requires: ruby-mixlib-config >= 1.1.2 |
56 | Requires: ruby-mixlib-log >= 1.3.0 | |
2a1bbc08 ER |
57 | Requires: ruby-mixlib-shellout |
58 | Requires: ruby-net-ssh >= 2.6 | |
59 | Requires: ruby-net-ssh-multi >= 1.1.0 | |
60 | Requires: ruby-ohai >= 0.6.0 | |
2a1bbc08 | 61 | Requires: ruby-rest-client >= 1.0.4 |
bce16be1 | 62 | Requires: ruby-rubygems |
2a1bbc08 | 63 | Requires: ruby-yajl >= 1.1 |
e307965b ER |
64 | BuildArch: noarch |
65 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
66 | ||
820f7abc ER |
67 | # do not generate python dependency, yum support is optional |
68 | %define _noautoreqfiles %{ruby_vendorlibdir}/chef/provider/package/yum-dump.py | |
69 | ||
e307965b ER |
70 | %description |
71 | A systems integration framework, built to bring the benefits of | |
72 | configuration management to your entire infrastructure. | |
73 | ||
5c13348f ER |
74 | %package -n bash-completion-knife |
75 | Summary: bash-completion for knife | |
76 | Summary(pl.UTF-8): bashowe uzupełnianie nazw dla knifea | |
77 | Group: Applications/Shells | |
78 | Requires: %{name} >= 0.10 | |
79 | Requires: bash-completion >= 2.0 | |
80 | ||
81 | %description -n bash-completion-knife | |
82 | This package provides bash-completion for knife. | |
83 | ||
84 | %description -n bash-completion-knife -l pl.UTF-8 | |
85 | Pakiet ten dostarcza bashowe uzupełnianie nazw dla knifea. | |
86 | ||
e307965b | 87 | %prep |
303651f6 | 88 | %setup -q |
7abbc83b | 89 | %patch0 -p1 |
bc8e6547 | 90 | %patch1 -p1 |
31feaf16 | 91 | %patch2 -p1 |
7fbe09ae | 92 | %patch3 -p1 |
e307965b | 93 | |
a58665ad ER |
94 | grep --exclude-dir=spec --exclude-dir=distro -r /var/chef . && exit 1 |
95 | ||
68cfa14e ER |
96 | %{__sed} -i -e '1 s,#!.*ruby,#!%{__ruby},' bin/* |
97 | ||
8354a17e ER |
98 | %build |
99 | %if %{with tests} | |
100 | rspec spec | |
101 | %endif | |
102 | ||
e307965b ER |
103 | %install |
104 | rm -rf $RPM_BUILD_ROOT | |
02d95ccd | 105 | install -d $RPM_BUILD_ROOT{%{ruby_vendorlibdir},%{_bindir},%{_mandir}/man1,%{systemdtmpfilesdir}} \ |
e3f1b868 | 106 | $RPM_BUILD_ROOT{%{_sysconfdir}/%{name},/var/{run/%{name},cache/%{name},lib/%{name}/{roles,data_bags,environments,backup}}} |
66164e90 | 107 | |
68cfa14e | 108 | cp -a lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir} |
e307965b | 109 | cp -a bin/* $RPM_BUILD_ROOT%{_bindir} |
958b507e | 110 | cp -a distro/common/man/* $RPM_BUILD_ROOT%{_mandir} |
e307965b | 111 | |
5cb2f1b0 | 112 | cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/chef.rb |
02d95ccd | 113 | cp -p %{SOURCE2} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf |
303651f6 | 114 | |
5c13348f ER |
115 | install -d $RPM_BUILD_ROOT%{bash_compdir} |
116 | cp -p %{SOURCE3} $RPM_BUILD_ROOT%{bash_compdir}/knife | |
117 | ||
bce16be1 ER |
118 | %clean |
119 | rm -rf $RPM_BUILD_ROOT | |
120 | ||
e307965b ER |
121 | %files |
122 | %defattr(644,root,root,755) | |
2a1bbc08 | 123 | %doc README.md CONTRIBUTING.md |
303651f6 | 124 | %dir %{_sysconfdir}/%{name} |
5cb2f1b0 | 125 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/chef.rb |
2a1bbc08 | 126 | %attr(755,root,root) %{_bindir}/chef-apply |
e307965b | 127 | %attr(755,root,root) %{_bindir}/chef-client |
f0820095 | 128 | %attr(755,root,root) %{_bindir}/chef-service-manager |
2a1bbc08 | 129 | %attr(755,root,root) %{_bindir}/chef-shell |
e307965b ER |
130 | %attr(755,root,root) %{_bindir}/chef-solo |
131 | %attr(755,root,root) %{_bindir}/knife | |
132 | %attr(755,root,root) %{_bindir}/shef | |
958b507e ER |
133 | %{_mandir}/man1/chef-shell.1* |
134 | %{_mandir}/man1/knife-bootstrap.1* | |
135 | %{_mandir}/man1/knife-client.1* | |
136 | %{_mandir}/man1/knife-configure.1* | |
137 | %{_mandir}/man1/knife-cookbook-site.1* | |
138 | %{_mandir}/man1/knife-cookbook.1* | |
139 | %{_mandir}/man1/knife-data-bag.1* | |
140 | %{_mandir}/man1/knife-environment.1* | |
141 | %{_mandir}/man1/knife-exec.1* | |
142 | %{_mandir}/man1/knife-index.1* | |
143 | %{_mandir}/man1/knife-node.1* | |
144 | %{_mandir}/man1/knife-role.1* | |
145 | %{_mandir}/man1/knife-search.1* | |
146 | %{_mandir}/man1/knife-ssh.1* | |
147 | %{_mandir}/man1/knife-status.1* | |
148 | %{_mandir}/man1/knife-tag.1* | |
149 | %{_mandir}/man1/knife.1* | |
150 | %{_mandir}/man8/chef-client.8* | |
151 | %{_mandir}/man8/chef-expander.8* | |
152 | %{_mandir}/man8/chef-expanderctl.8* | |
153 | %{_mandir}/man8/chef-server-webui.8* | |
154 | %{_mandir}/man8/chef-server.8* | |
155 | %{_mandir}/man8/chef-solo.8* | |
156 | %{_mandir}/man8/chef-solr.8* | |
68cfa14e ER |
157 | %{ruby_vendorlibdir}/chef.rb |
158 | %{ruby_vendorlibdir}/chef | |
02d95ccd | 159 | %{systemdtmpfilesdir}/chef.conf |
303651f6 | 160 | |
bc8e6547 | 161 | %dir /var/lib/%{name} |
66164e90 ER |
162 | %dir /var/lib/%{name}/roles |
163 | %dir /var/lib/%{name}/data_bags | |
164 | %dir /var/lib/%{name}/environments | |
e3f1b868 | 165 | %dir %attr(750,root,root) /var/lib/%{name}/backup |
66164e90 | 166 | |
bc8e6547 | 167 | %dir /var/cache/%{name} |
02d95ccd | 168 | %dir /var/run/%{name} |
5c13348f ER |
169 | |
170 | %files -n bash-completion-knife | |
171 | %defattr(644,root,root,755) | |
172 | %{bash_compdir}/knife |