1 |
Name: puppet3 |
2 |
Version: 3.1.1 |
3 |
Release: %mkrel 2 |
4 |
Summary: System Automation and Configuration Management Software |
5 |
License: Apache Software License |
6 |
Group: Monitoring |
7 |
URL: http://www.puppetlabs.com/ |
8 |
Source0: http://puppetlabs.com/downloads/puppet/puppet-%{version}.tar.gz |
9 |
Patch0: 0001-18781-Be-more-tolerant-of-old-clients-in-WEBrick-ser.patch |
10 |
Source102: puppet-tmpfiles.conf |
11 |
BuildArch: noarch |
12 |
BuildRequires: ruby |
13 |
BuildRequires: facter |
14 |
Requires: facter |
15 |
Requires: ruby-hiera |
16 |
Suggests: vim-puppet |
17 |
Suggests: emacs-puppet |
18 |
Requires(post): systemd >= %{systemd_required_version} |
19 |
Requires(pre): rpm-helper |
20 |
Requires(post): rpm-helper |
21 |
Requires(preun):rpm-helper |
22 |
Conflicts: puppet |
23 |
|
24 |
%description |
25 |
Puppet lets you centrally manage every important aspect of your system using a |
26 |
cross-platform specification language that manages all the separate elements |
27 |
normally aggregated in different files, like users, cron jobs, and hosts, |
28 |
along with obviously discrete elements like packages, services, and files. |
29 |
|
30 |
This package provide the puppet client daemon. |
31 |
|
32 |
%package server |
33 |
Group: Monitoring |
34 |
Summary: Server for the puppet system management tool |
35 |
Requires: %{name} = %{version} |
36 |
Requires(post): rpm-helper |
37 |
Requires(preun):rpm-helper |
38 |
Conflicts: puppet-server |
39 |
|
40 |
%description server |
41 |
Provides the central puppet server daemon (puppetmaster) which provides |
42 |
manifests to clients. |
43 |
The server can also function as a certificate authority and file server. |
44 |
|
45 |
%package -n vim-puppet |
46 |
Group: Editors |
47 |
Summary: Syntax highlighting for puppet manifests in vim |
48 |
|
49 |
%description -n vim-puppet |
50 |
The vim-puppet package provides filetype detection and syntax highlighting for |
51 |
puppet manifests (files ending with ".pp"). |
52 |
|
53 |
%package -n emacs-puppet |
54 |
Group: Editors |
55 |
Summary: Syntax highlighting for puppet manifests in emacs |
56 |
|
57 |
%description -n emacs-puppet |
58 |
The emacs-puppet package provides filetype detection and syntax highlighting for |
59 |
puppet manifests (files ending with ".pp"). |
60 |
|
61 |
%prep |
62 |
%setup -q -n puppet-%{version} |
63 |
%patch0 -p1 |
64 |
|
65 |
# Fix some rpmlint complaints |
66 |
for f in mac_automount.pp mcx_dock_absent.pp mcx_dock_default.pp \ |
67 |
mcx_dock_full.pp mcx_dock_invalid.pp mcx_nogroup.pp \ |
68 |
mcx_notexists_absent.pp; do |
69 |
sed -i -e'1d' examples/$f |
70 |
chmod a-x examples/$f |
71 |
done |
72 |
for f in external/nagios.rb relationship.rb; do |
73 |
sed -i -e '1d' lib/puppet/$f |
74 |
done |
75 |
chmod +x ext/puppet-load.rb ext/regexp_nodes/regexp_nodes.rb |
76 |
|
77 |
%build |
78 |
|
79 |
%install |
80 |
rm -rf %{buildroot} |
81 |
|
82 |
ruby install.rb \ |
83 |
--destdir=%{buildroot} \ |
84 |
--sitelibdir=%{ruby_vendorlibdir} \ |
85 |
--quick \ |
86 |
--no-rdoc |
87 |
|
88 |
install -d -m 0755 %{buildroot}%{_sysconfdir}/puppet/manifests |
89 |
install -d -m 0755 %{buildroot}%{_sysconfdir}/puppet/modules |
90 |
install -d -m 0755 %{buildroot}%{_datadir}/puppet/modules |
91 |
install -d -m 0755 %{buildroot}%{_localstatedir}/lib/puppet |
92 |
install -d -m 0755 %{buildroot}%{_localstatedir}/log/puppet |
93 |
|
94 |
install -D -m 644 ext/systemd/puppetagent.service \ |
95 |
%{buildroot}%{_unitdir}/puppetagent.service |
96 |
install -D -m 644 ext/systemd/puppetmaster.service \ |
97 |
%{buildroot}%{_unitdir}/puppetmaster.service |
98 |
|
99 |
install -D -m 644 ext/redhat/fileserver.conf \ |
100 |
%{buildroot}%{_sysconfdir}/puppet/fileserver.conf |
101 |
install -D -m 644 ext/redhat/puppet.conf \ |
102 |
%{buildroot}%{_sysconfdir}/puppet/puppet.conf |
103 |
install -D -m 644 ext/redhat/logrotate \ |
104 |
%{buildroot}%{_sysconfdir}/logrotate.d/puppet |
105 |
install -D -m 644 %{SOURCE102} %{buildroot}%{_tmpfilesdir}/puppet.conf |
106 |
|
107 |
install -d %{buildroot}%{_datadir}/puppet |
108 |
cp -a ext/ %{buildroot}%{_datadir}/puppet |
109 |
# emacs and vim bits are installed elsewhere |
110 |
rm -rf %{buildroot}%{_datadir}/puppet/ext/{emacs,vim} |
111 |
# remove misc packaging artifacts in source not applicable to rpm |
112 |
rm -rf %{buildroot}%{_datadir}/puppet/ext/{gentoo,freebsd,solaris,suse,windows,osx,ips,debian} |
113 |
rm -f %{buildroot}%{_datadir}/puppet/ext/{build_defaults.yaml,project_data.yaml} |
114 |
rm -f %{buildroot}%{_datadir}/puppet/ext/redhat/*.init |
115 |
|
116 |
# vim syntax file |
117 |
vimdir=%{buildroot}%{_datadir}/vim |
118 |
install -D -m 644 ext/vim/syntax/puppet.vim $vimdir/syntax/puppet.vim |
119 |
install -D -m 644 ext/vim/ftdetect/puppet.vim $vimdir/ftdetect/puppet.vim |
120 |
|
121 |
# emacs syntax file |
122 |
emacsdir=%{buildroot}%{_datadir}/emacs/site-lisp |
123 |
install -D -m 644 ext/emacs/puppet-mode.el $emacsdir/puppet-mode.el |
124 |
install -D -m 644 ext/emacs/puppet-mode-init.el \ |
125 |
$emacsdir/site-start.d/puppet-mode-init.el |
126 |
|
127 |
# logcheck files |
128 |
logcheckdir=%{buildroot}%{_sysconfdir}/logcheck/ |
129 |
install -D -m 644 ext/logcheck/puppet $logcheckdir/ignore.d.server/puppet |
130 |
install -D -m 644 ext/logcheck/puppet $logcheckdir/ignore.d.workstation/puppet |
131 |
|
132 |
%pre |
133 |
%_pre_useradd puppet %{_localstatedir}/lib/puppet /sbin/nologin |
134 |
|
135 |
%post |
136 |
%_tmpfilescreate puppet |
137 |
%_post_service puppetagent |
138 |
|
139 |
%preun |
140 |
%_preun_service puppetagent |
141 |
|
142 |
%post server |
143 |
%_post_service puppetmaster |
144 |
|
145 |
%preun server |
146 |
%_preun_service puppetmaster |
147 |
|
148 |
%files |
149 |
%doc LICENSE README.md examples |
150 |
%dir %{_sysconfdir}/puppet |
151 |
%dir %{_sysconfdir}/puppet/modules |
152 |
%config(noreplace) %{_sysconfdir}/puppet/puppet.conf |
153 |
%config(noreplace) %{_sysconfdir}/puppet/auth.conf |
154 |
%config(noreplace) %{_sysconfdir}/logrotate.d/puppet |
155 |
%{_sysconfdir}/logcheck/ignore.d.workstation/puppet |
156 |
%{_sysconfdir}/logcheck/ignore.d.server/puppet |
157 |
%{_tmpfilesdir}/puppet.conf |
158 |
%{_unitdir}/puppetagent.service |
159 |
%{_bindir}/puppet |
160 |
%{_bindir}/extlookup2hiera |
161 |
%{ruby_vendorlibdir}/hiera |
162 |
%{ruby_vendorlibdir}/hiera_puppet.rb |
163 |
%{ruby_vendorlibdir}/puppet |
164 |
%{ruby_vendorlibdir}/puppet.rb |
165 |
%{ruby_vendorlibdir}/semver.rb |
166 |
%{_datadir}/puppet |
167 |
%attr(-,puppet,puppet) %{_localstatedir}/log/puppet |
168 |
%attr(-,puppet,puppet) %{_localstatedir}/lib/puppet |
169 |
%{_mandir}/man5/puppet.conf.5.* |
170 |
%{_mandir}/man8/puppet.8.* |
171 |
%{_mandir}/man8/puppet-agent.8.* |
172 |
%{_mandir}/man8/puppet-apply.8.* |
173 |
%{_mandir}/man8/puppet-catalog.8.* |
174 |
%{_mandir}/man8/puppet-describe.8.* |
175 |
%{_mandir}/man8/puppet-ca.8.* |
176 |
%{_mandir}/man8/puppet-cert.8.* |
177 |
%{_mandir}/man8/puppet-certificate.8.* |
178 |
%{_mandir}/man8/puppet-certificate_request.8.* |
179 |
%{_mandir}/man8/puppet-certificate_revocation_list.8.* |
180 |
%{_mandir}/man8/puppet-config.8.* |
181 |
%{_mandir}/man8/puppet-device.8.* |
182 |
%{_mandir}/man8/puppet-doc.8.* |
183 |
%{_mandir}/man8/puppet-facts.8.* |
184 |
%{_mandir}/man8/puppet-file.8.* |
185 |
%{_mandir}/man8/puppet-filebucket.8.* |
186 |
%{_mandir}/man8/puppet-help.8.* |
187 |
%{_mandir}/man8/puppet-inspect.8.* |
188 |
%{_mandir}/man8/puppet-instrumentation_data.8.* |
189 |
%{_mandir}/man8/puppet-instrumentation_listener.8.* |
190 |
%{_mandir}/man8/puppet-instrumentation_probe.8.* |
191 |
%{_mandir}/man8/puppet-key.8.* |
192 |
%{_mandir}/man8/puppet-man.8.* |
193 |
%{_mandir}/man8/puppet-module.8.* |
194 |
%{_mandir}/man8/puppet-node.8.* |
195 |
%{_mandir}/man8/puppet-parser.8.* |
196 |
%{_mandir}/man8/puppet-plugin.8.* |
197 |
%{_mandir}/man8/puppet-report.8.* |
198 |
%{_mandir}/man8/puppet-resource.8.* |
199 |
%{_mandir}/man8/puppet-resource_type.8.* |
200 |
%{_mandir}/man8/puppet-secret_agent.8.* |
201 |
%{_mandir}/man8/puppet-status.8.* |
202 |
%{_mandir}/man8/extlookup2hiera.8.* |
203 |
|
204 |
%files server |
205 |
%{_unitdir}/puppetmaster.service |
206 |
%config(noreplace) %{_sysconfdir}/puppet/fileserver.conf |
207 |
%dir %{_sysconfdir}/puppet/manifests |
208 |
%{_mandir}/man8/puppet-kick.8.* |
209 |
%{_mandir}/man8/puppet-master.8.* |
210 |
%{_mandir}/man8/puppet-queue.8.* |
211 |
|
212 |
%files -n vim-puppet |
213 |
%{_datadir}/vim/syntax/puppet.vim |
214 |
%{_datadir}/vim/ftdetect/puppet.vim |
215 |
|
216 |
%files -n emacs-puppet |
217 |
%{_datadir}/emacs/site-lisp/puppet-mode.el |
218 |
%{_datadir}/emacs/site-lisp/site-start.d/puppet-mode-init.el |