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