Update puppet spec to 3.0.2

This patch updates the puppet spec for upstream version 3.0.2. Puppet
3.0.2 includes service management files for systemd, which ships with
F17, so this updates the spec to include systemd conditionals where
applicable. Several deprecated manpages and executables, including
everything Puppet shipped in %{_sbindir}, are removed in Puppet 3.0.x as
well; This commit updates the spec as such. The patch for commit a71208b
is removed as its in the 3.0.2 source. Per existing comments, the
deprecated puppetstoredconfigclean.rb script is removed. Additionally,
the patch for preserving timestamps in install.rb is removed, as this
has been merged into upstream. Puppet 3.0.2 requires ruby >= 1.8.7 and
facter >= 1.6.6, so updated BuildRequires and Requires are added for
these. A new requires of hiera >= 1.0.0 is added as well. Puppet >=
3.0.0 also entirely absorbed the source of the package hiera-puppet, so
this is obsoleted and provided here. Finally, the built-in mongrel
support is removed in puppet 3.x, so the reference to it is removed in
the spec.

Signed-off-by: Moses Mendoza <moses@puppetlabs.com>
Signed-off-by: Michael Stahnke <stahnma@puppetlabs.com>
epel9
Moses Mendoza 12 years ago committed by Michael Stahnke
parent e6d8c53229
commit 56cea4008a

@ -1,87 +0,0 @@
From cfce8cf0baa7a96498f0ddc2c46170ed38c9aea7 Mon Sep 17 00:00:00 2001
From: Todd Zullinger <tmz@pobox.com>
Date: Thu, 12 Jul 2012 00:34:28 -0400
Subject: [PATCH/puppet] Preserve timestamps when installing files
Without the preserve option, ruby's FileUtils.install method uses the
current time for all installed files. For backup systems, package
installs, and general pedantic sysadmins, preserving timestamps makes a
small improvement in the world.
---
install.rb | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/install.rb b/install.rb
index a55d929..c77edff 100755
--- a/install.rb
+++ b/install.rb
@@ -84,7 +84,7 @@ def do_configs(configs, target, strip = 'conf/')
if $haveftools
File.install(cf, ocf, 0644, true)
else
- FileUtils.install(cf, ocf, {:mode => 0644, :verbose => true})
+ FileUtils.install(cf, ocf, {:mode => 0644, :preserve => true, :verbose => true})
end
end
@@ -94,7 +94,7 @@ def do_configs(configs, target, strip = 'conf/')
if $haveftools
File.install(src_dll, dst_dll, 0644, true)
else
- FileUtils.install(src_dll, dst_dll, {:mode => 0644, :verbose => true})
+ FileUtils.install(src_dll, dst_dll, {:mode => 0644, :preserve => true, :verbose => true})
end
require 'win32/registry'
@@ -130,7 +130,7 @@ def do_libs(libs, strip = 'lib/')
else
FileUtils.makedirs(op, {:mode => 0755, :verbose => true})
FileUtils.chmod(0755, op)
- FileUtils.install(lf, olf, {:mode => 0644, :verbose => true})
+ FileUtils.install(lf, olf, {:mode => 0644, :preserve => true, :verbose => true})
end
end
end
@@ -146,7 +146,7 @@ def do_man(man, strip = 'man/')
else
FileUtils.makedirs(om, {:mode => 0755, :verbose => true})
FileUtils.chmod(0755, om)
- FileUtils.install(mf, omf, {:mode => 0644, :verbose => true})
+ FileUtils.install(mf, omf, {:mode => 0644, :preserve => true, :verbose => true})
end
gzip = %x{which gzip}
gzip.chomp!
@@ -420,12 +420,12 @@ def install_binfile(from, op_file, target)
installed_wrapper = false
if File.exists?("#{from}.bat")
- FileUtils.install("#{from}.bat", File.join(target, "#{op_file}.bat"), :mode => 0755, :verbose => true)
+ FileUtils.install("#{from}.bat", File.join(target, "#{op_file}.bat"), :mode => 0755, :preserve => true, :verbose => true)
installed_wrapper = true
end
if File.exists?("#{from}.cmd")
- FileUtils.install("#{from}.cmd", File.join(target, "#{op_file}.cmd"), :mode => 0755, :verbose => true)
+ FileUtils.install("#{from}.cmd", File.join(target, "#{op_file}.cmd"), :mode => 0755, :preserve => true, :verbose => true)
installed_wrapper = true
end
@@ -439,13 +439,13 @@ set RUBY_BIN=%RUBY_BIN:\\=/%
"%RUBY_BIN%ruby.exe" -x "%RUBY_BIN%puppet" %*
EOS
File.open(tmp_file2.path, "w") { |cw| cw.puts cwv }
- FileUtils.install(tmp_file2.path, File.join(target, "#{op_file}.bat"), :mode => 0755, :verbose => true)
+ FileUtils.install(tmp_file2.path, File.join(target, "#{op_file}.bat"), :mode => 0755, :preserve => true, :verbose => true)
tmp_file2.unlink
installed_wrapper = true
end
end
- FileUtils.install(tmp_file.path, File.join(target, op_file), :mode => 0755, :verbose => true)
+ FileUtils.install(tmp_file.path, File.join(target, op_file), :mode => 0755, :preserve => true, :verbose => true)
tmp_file.unlink
end
--
1.7.6

@ -1,31 +0,0 @@
From a71208ba651d96d2ac9792c5358f10231a140e10 Mon Sep 17 00:00:00 2001
From: Daniel Pittman <daniel@puppetlabs.com>
Date: Fri, 9 Mar 2012 14:43:02 -0800
Subject: [PATCH/puppet] Ruby 1.9.3 has a different error when `require`
fails.
The text of the error message when load fails has changed, resulting in the
test failing. This adapts that to catch the different versions, allowing this
to pass in all cases.
Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>
---
lib/puppet/provider/confine.rb | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/lib/puppet/provider/confine.rb b/lib/puppet/provider/confine.rb
index 6825def..b28d07d 100644
--- a/lib/puppet/provider/confine.rb
+++ b/lib/puppet/provider/confine.rb
@@ -25,7 +25,7 @@ class Puppet::Provider::Confine
begin
require "puppet/provider/confine/#{name}"
rescue LoadError => detail
- unless detail.to_s =~ /No such file/i
+ unless detail.to_s =~ /No such file|cannot load such file/i
warn "Could not load confine test '#{name}': #{detail}"
end
# Could not find file
--
1.7.6

@ -1,18 +0,0 @@
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.18 (Darwin)
Comment: GPGTools - http://gpgtools.org
iQIcBAABAgAGBQJP/JQ9AAoJEBBUt6JL1uwwko0P/igNdI01Lkss73TaRRSGiJcF
dLSSqyNjrgyiAoZkBTlyL7qPf76l5t7qhzO6cjj6q64e5yaGfZAbr65d4LhIGs7Z
fcpzC4MpRhcaZKTqp9864Fhwd0UC/rzMAMaR1bRkSLVgcR0F6WXDcoclnwcRZXb5
e6b51JI85G0lyQB95Gq0SIUZQ/n8OsMDC/IhLpJLCbZIw7jRB1hciFPL6SuMGFlK
Zw+3ZpMwWGOpLU0bxLL6Nw54vVwJDf1pq/Upi+EChPdkzJQw2rZR0qwDlavNd6Ax
mEBwFyBOQ/mEiIRZslQk/TYQ+xuq3eCSk11E3ZJ+VDx2h7T4mqdEdZRoYmwliGOW
EXR/+QmB7Jqmgi0Ue0Y1LYUsydHKvXYTeR8R/wmm4O3qD8CTQ0SxbsemO78o/dp0
pM++wMjoAKO5vyZ0/3k+kblIzXy+BYdzeqThZArMhV5q3iIm5daYSegyIA4RCSgG
mnyTGtaSQRQP685gwGdlF9P1kfrhnvw7UK2HW3WDsmkZh9lGlKSM3stwlB4FgXGu
9OAFFhRVh23Ka5B6CAXBqIdXvjz3LOmKKalxcRwR36UEaJZ4OIlTDMAmbXofOvHq
YbR0dWBovVMUn7N9vMC5AosOXApbQWNQINW2th21KV4lNvzc76bi3j5iTMsBKARE
qNhzL1TXuJYNPUv88UxJ
=mjJz
-----END PGP SIGNATURE-----

@ -0,0 +1,18 @@
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.18 (Darwin)
Comment: GPGTools - http://gpgtools.org
iQIcBAABAgAGBQJQ24gaAAoJEBBUt6JL1uwwFBQP/Rnl+wuQW9cq7MC3JCGpNwNn
8RkUvEnFCCzvomfRd7LXhzJ4b/X0EPQNr5Kr3VNEDpHJgekLdddb+NJRec22FXnV
TV11sf6meeDBYMyYm0tz1+OXjW+eBLklRVtM9eHzP6B8OTcfmreGBGtMMexQkgch
QYVZYL8g4v9464K5KJ8kU+5Wa9vXfulfMNz0sPAcjCWaqu6whE+LoCd29pWkBhGf
q14fqmKJK2A8V8FyGrcUn/v6Pg2vLizS5gmna+1w7tHGfyDViKA9U4lj0nA/Y7/n
NISQk0l0VXlsrFoUtk3+TaOvAzvO0fQ3opwELvLsyBf+76JUZZqgbfUaNtk1l7sY
PR4plQRJ2hDIzKOvEkonnqHe8OnSTw0S3mdCxq8oVF5VUvgynpw3YNIfLrWVArNW
Zzskz/nfyD/oaJDimwi+JdgLcEInUJWws98ElgaLOBb43reirNXAgYCXl53jwf/e
dzOIyspL9OmrISoff0hvH2lP6RmJ5mX30KaIkNN0St9fhg/9dmI1NGB3vwiEJwyq
GdHd+j3ViZsgMW2nC2Wi258Wk6zMvNWKn+7rYWmaeZwwTLSYECI7oRtshuFKYirz
TpcIRBFuBbgoSX1rrt0DFhB6sQRzbDPaLl4DMeUdRw5OK+EkKVurfbenhkLqMO//
IQJbtEkNKqARBCpvuyKY
=ljH5
-----END PGP SIGNATURE-----

@ -8,30 +8,32 @@
%global puppet_libdir %(ruby -rrbconfig -e 'puts RbConfig::CONFIG["sitelibdir"]') %global puppet_libdir %(ruby -rrbconfig -e 'puts RbConfig::CONFIG["sitelibdir"]')
%endif %endif
%global confdir conf/redhat # F-17 also ships with systemd; package/use systemd files in this case
%if 0%{?fedora} >= 17
%global _with_systemd 1
%else
%global _with_systemd 0
%endif
%global confdir ext/redhat
%global ruby_version %(ruby -rrbconfig -e 'puts RbConfig::CONFIG["ruby_version"]') %global ruby_version %(ruby -rrbconfig -e 'puts RbConfig::CONFIG["ruby_version"]')
Name: puppet Name: puppet
Version: 2.7.18 Version: 3.0.2
Release: 1%{?dist} Release: 1%{?dist}
Summary: A network tool for managing many disparate systems Summary: A network tool for managing many disparate systems
License: ASL 2.0 License: ASL 2.0
URL: http://puppetlabs.com URL: http://puppetlabs.com
Source0: http://downloads.puppetlabs.com/%{name}/%{name}-%{version}.tar.gz Source0: http://downloads.puppetlabs.com/%{name}/%{name}-%{version}.tar.gz
Source1: http://downloads.puppetlabs.com/%{name}/%{name}-%{version}.tar.gz.asc Source1: http://downloads.puppetlabs.com/%{name}/%{name}-%{version}.tar.gz.asc
Source2: puppetstoredconfigclean.rb Source2: puppet-nm-dispatcher
Source3: puppet-nm-dispatcher
# https://projects.puppetlabs.com/issues/11325
# https://github.com/puppetlabs/puppet/commit/a71208ba
Patch0: 0001-Ruby-1.9.3-has-a-different-error-when-require-fails.patch
Patch1: 0001-Preserve-timestamps-when-installing-files.patch
Group: System Environment/Base Group: System Environment/Base
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: facter >= 1.5 BuildRequires: facter >= 1.6.6
BuildRequires: ruby >= 1.8.5 BuildRequires: ruby >= 1.8.7
%if 0%{?fedora} || 0%{?rhel} >= 5 %if 0%{?fedora} || 0%{?rhel} >= 5
BuildArch: noarch BuildArch: noarch
@ -51,17 +53,28 @@ Requires: ruby(shadow)
%endif %endif
%endif %endif
Requires: facter >= 1.5 Requires: facter >= 1.6.6
Requires: hiera >= 1.0.0
Obsoletes: hiera-puppet < 1.0.0-2
Provides: hiera-puppet = %{version}-%{release}
# Puppet 3.x drops ruby 1.8.5 support and adds ruby 1.9 support
%if "%{ruby_version}" == "1.8" %if "%{ruby_version}" == "1.8"
Requires: ruby >= 1.8.5 Requires: ruby >= 1.8.7
%endif %endif
%{!?_without_augeas:Requires: ruby(augeas)} %{!?_without_augeas:Requires: ruby(augeas)}
Requires(pre): shadow-utils Requires(pre): shadow-utils
%if 0%{?_with_systemd}
Requires(post): systemd
Requires(preun): systemd
Requires(postun): systemd
%else
Requires(post): chkconfig Requires(post): chkconfig
Requires(preun): chkconfig Requires(preun): chkconfig
Requires(preun): initscripts Requires(preun): initscripts
Requires(postun): initscripts Requires(postun): initscripts
%endif
%description %description
Puppet lets you centrally manage every important aspect of your system using a Puppet lets you centrally manage every important aspect of your system using a
@ -73,10 +86,16 @@ along with obviously discrete elements like packages, services, and files.
Group: System Environment/Base Group: System Environment/Base
Summary: Server for the puppet system management tool Summary: Server for the puppet system management tool
Requires: puppet = %{version}-%{release} Requires: puppet = %{version}-%{release}
%if 0%{?_with_systemd}
Requires(post): systemd
Requires(preun): systemd
Requires(postun): systemd
%else
Requires(post): chkconfig Requires(post): chkconfig
Requires(preun): chkconfig Requires(preun): chkconfig
Requires(preun): initscripts Requires(preun): initscripts
Requires(postun): initscripts Requires(postun): initscripts
%endif
%description server %description server
Provides the central puppet server daemon which provides manifests to clients. Provides the central puppet server daemon which provides manifests to clients.
@ -84,9 +103,7 @@ The server can also function as a certificate authority and file server.
%prep %prep
%setup -q %setup -q
%patch0 -p1 patch -s -p1 < %{confdir}/rundir-perms.patch
%patch1 -p1
patch -s -p1 < conf/redhat/rundir-perms.patch
# Fix some rpmlint complaints # Fix some rpmlint complaints
for f in mac_dscl.pp mac_dscl_revert.pp \ for f in mac_dscl.pp mac_dscl_revert.pp \
@ -94,7 +111,7 @@ for f in mac_dscl.pp mac_dscl_revert.pp \
sed -i -e'1d' examples/$f sed -i -e'1d' examples/$f
chmod a-x examples/$f chmod a-x examples/$f
done done
for f in external/nagios.rb network/http_server/mongrel.rb relationship.rb; do for f in external/nagios.rb relationship.rb; do
sed -i -e '1d' lib/puppet/$f sed -i -e '1d' lib/puppet/$f
done done
chmod +x ext/puppet-load.rb ext/regexp_nodes/regexp_nodes.rb chmod +x ext/puppet-load.rb ext/regexp_nodes/regexp_nodes.rb
@ -117,36 +134,26 @@ install -d -m0755 %{buildroot}%{_datadir}/%{name}/modules
install -d -m0755 %{buildroot}%{_localstatedir}/lib/puppet install -d -m0755 %{buildroot}%{_localstatedir}/lib/puppet
install -d -m0755 %{buildroot}%{_localstatedir}/run/puppet install -d -m0755 %{buildroot}%{_localstatedir}/run/puppet
install -d -m0750 %{buildroot}%{_localstatedir}/log/puppet install -d -m0750 %{buildroot}%{_localstatedir}/log/puppet
%if 0%{?_with_systemd}
%{__install} -d -m0755 %{buildroot}%{_unitdir}
install -Dp -m0644 ext/systemd/puppetagent.service %{buildroot}%{_unitdir}/puppetagent.service
install -Dp -m0644 ext/systemd/puppetmaster.service %{buildroot}%{_unitdir}/puppetmaster.service
%else
install -Dp -m0644 %{confdir}/client.sysconfig %{buildroot}%{_sysconfdir}/sysconfig/puppet install -Dp -m0644 %{confdir}/client.sysconfig %{buildroot}%{_sysconfdir}/sysconfig/puppet
install -Dp -m0755 %{confdir}/client.init %{buildroot}%{_initrddir}/puppet install -Dp -m0755 %{confdir}/client.init %{buildroot}%{_initrddir}/puppet
install -Dp -m0644 %{confdir}/server.sysconfig %{buildroot}%{_sysconfdir}/sysconfig/puppetmaster install -Dp -m0644 %{confdir}/server.sysconfig %{buildroot}%{_sysconfdir}/sysconfig/puppetmaster
install -Dp -m0755 %{confdir}/server.init %{buildroot}%{_initrddir}/puppetmaster install -Dp -m0755 %{confdir}/server.init %{buildroot}%{_initrddir}/puppetmaster
install -Dp -m0755 %{confdir}/queue.init %{buildroot}%{_initrddir}/puppetqueue
%endif
install -Dp -m0644 %{confdir}/fileserver.conf %{buildroot}%{_sysconfdir}/puppet/fileserver.conf install -Dp -m0644 %{confdir}/fileserver.conf %{buildroot}%{_sysconfdir}/puppet/fileserver.conf
install -Dp -m0644 %{confdir}/puppet.conf %{buildroot}%{_sysconfdir}/puppet/puppet.conf install -Dp -m0644 %{confdir}/puppet.conf %{buildroot}%{_sysconfdir}/puppet/puppet.conf
install -Dp -m0644 %{confdir}/logrotate %{buildroot}%{_sysconfdir}/logrotate.d/puppet install -Dp -m0644 %{confdir}/logrotate %{buildroot}%{_sysconfdir}/logrotate.d/puppet
# We need something for these ghosted files, otherwise rpmbuild
# will complain loudly. They won't be included in the binary packages
touch %{buildroot}%{_sysconfdir}/puppet/puppetmasterd.conf
touch %{buildroot}%{_sysconfdir}/puppet/puppetca.conf
touch %{buildroot}%{_sysconfdir}/puppet/puppetd.conf
# Replace redundant man pages with links to the canonical man page
pushd %{buildroot}%{_mandir}/man8 >/dev/null
ln -svf puppet-cert.8.gz puppetca.8.gz
ln -svf puppet-queue.8.gz puppetqd.8.gz
ln -svf puppet-kick.8.gz puppetrun.8.gz
ln -svf puppet-describe.8.gz pi.8.gz
ln -svf puppet-master.8.gz puppetmasterd.8.gz
ln -svf puppet-filebucket.8.gz filebucket.8.gz
ln -svf puppet-agent.8.gz puppetd.8.gz
ln -svf puppet-doc.8.gz puppetdoc.8.gz
ln -svf puppet-resource.8.gz ralsh.8.gz
popd >/dev/null
# Install a NetworkManager dispatcher script to pickup changes to # Install a NetworkManager dispatcher script to pickup changes to
# /etc/resolv.conf and such (https://bugzilla.redhat.com/532085). # /etc/resolv.conf and such (https://bugzilla.redhat.com/532085).
install -Dpv %{SOURCE3} \ install -Dpv %{SOURCE2} \
%{buildroot}%{_sysconfdir}/NetworkManager/dispatcher.d/98-%{name} %{buildroot}%{_sysconfdir}/NetworkManager/dispatcher.d/98-%{name}
# Install the ext/ directory to %%{_datadir}/%%{name} # Install the ext/ directory to %%{_datadir}/%%{name}
@ -154,12 +161,10 @@ install -d %{buildroot}%{_datadir}/%{name}
cp -a ext/ %{buildroot}%{_datadir}/%{name} cp -a ext/ %{buildroot}%{_datadir}/%{name}
# emacs and vim bits are installed elsewhere # emacs and vim bits are installed elsewhere
rm -rf %{buildroot}%{_datadir}/%{name}/ext/{emacs,vim} rm -rf %{buildroot}%{_datadir}/%{name}/ext/{emacs,vim}
# remove misc packaging artifacts in source not applicable to rpm
# The puppetstoredconfigclean script was removed now that puppet node clean rm -rf %{buildroot}%{_datadir}/%{name}/ext/{gentoo,freebsd,solaris,suse,windows,osx,ips,debian}
# does this job and more. For folks that were using this, let's provide the rm -f %{buildroot}%{_datadir}/%{name}/ext/{build_defaults.yaml,project_data.yaml}
# script and give them a hint to use puppet node clean. Remove this for the rm -f %{buildroot}%{_datadir}/%{name}/ext/redhat/*.init
# next major release after 2.7.
install -pv %{SOURCE2} %{buildroot}%{_datadir}/%{name}/ext/
# Install emacs mode files # Install emacs mode files
emacsdir=%{buildroot}%{_datadir}/emacs/site-lisp emacsdir=%{buildroot}%{_datadir}/emacs/site-lisp
@ -179,27 +184,28 @@ echo "D /var/run/%{name} 0755 %{name} %{name} -" > \
%{buildroot}%{_sysconfdir}/tmpfiles.d/%{name}.conf %{buildroot}%{_sysconfdir}/tmpfiles.d/%{name}.conf
%endif %endif
# Create puppet modules directory for puppet module tool
mkdir -p %{buildroot}%{_sysconfdir}/%{name}/modules
%files %files
%defattr(-, root, root, 0755) %defattr(-, root, root, 0755)
%doc CHANGELOG LICENSE README.md examples %doc LICENSE README.md examples
%{_bindir}/pi
%{_bindir}/puppet %{_bindir}/puppet
%{_bindir}/ralsh %{_bindir}/extlookup2hiera
%{_bindir}/filebucket
%{_bindir}/puppetdoc
%{_sbindir}/puppetca
%{_sbindir}/puppetd
%{puppet_libdir}/* %{puppet_libdir}/*
%if 0%{?_with_systemd}
%{_unitdir}/puppetagent.service
%else
%{_initrddir}/puppet %{_initrddir}/puppet
%config(noreplace) %{_sysconfdir}/sysconfig/puppet
%endif
%dir %{_sysconfdir}/puppet %dir %{_sysconfdir}/puppet
%dir %{_sysconfdir}/%{name}/modules
%if 0%{?fedora} >= 15 %if 0%{?fedora} >= 15
%config(noreplace) %{_sysconfdir}/tmpfiles.d/%{name}.conf %config(noreplace) %{_sysconfdir}/tmpfiles.d/%{name}.conf
%endif %endif
%config(noreplace) %{_sysconfdir}/sysconfig/puppet
%config(noreplace) %{_sysconfdir}/puppet/puppet.conf %config(noreplace) %{_sysconfdir}/puppet/puppet.conf
%config(noreplace) %{_sysconfdir}/puppet/auth.conf %config(noreplace) %{_sysconfdir}/puppet/auth.conf
%ghost %config(noreplace,missingok) %{_sysconfdir}/puppet/puppetca.conf
%ghost %config(noreplace,missingok) %{_sysconfdir}/puppet/puppetd.conf
%config(noreplace) %{_sysconfdir}/logrotate.d/puppet %config(noreplace) %{_sysconfdir}/logrotate.d/puppet
%dir %{_sysconfdir}/NetworkManager %dir %{_sysconfdir}/NetworkManager
%dir %{_sysconfdir}/NetworkManager/dispatcher.d %dir %{_sysconfdir}/NetworkManager/dispatcher.d
@ -213,33 +219,54 @@ echo "D /var/run/%{name} 0755 %{name} %{name} -" > \
%attr(-, puppet, puppet) %{_localstatedir}/run/puppet %attr(-, puppet, puppet) %{_localstatedir}/run/puppet
%attr(0750, puppet, puppet) %{_localstatedir}/log/puppet %attr(0750, puppet, puppet) %{_localstatedir}/log/puppet
%attr(-, puppet, puppet) %{_localstatedir}/lib/puppet %attr(-, puppet, puppet) %{_localstatedir}/lib/puppet
# Exclude man pages from the server package
%exclude %{_mandir}/man8/puppet-kick.8.gz
%exclude %{_mandir}/man8/puppet-master.8.gz
%exclude %{_mandir}/man8/puppet-queue.8.gz
%exclude %{_mandir}/man8/puppetmasterd.8.gz
%exclude %{_mandir}/man8/puppetqd.8.gz
%exclude %{_mandir}/man8/puppetrun.8.gz
%{_mandir}/man5/puppet.conf.5.gz %{_mandir}/man5/puppet.conf.5.gz
%{_mandir}/man8/*.8.gz %{_mandir}/man8/puppet.8.gz
%{_mandir}/man8/puppet-agent.8.gz
%{_mandir}/man8/puppet-apply.8.gz
%{_mandir}/man8/puppet-catalog.8.gz
%{_mandir}/man8/puppet-describe.8.gz
%{_mandir}/man8/puppet-ca.8.gz
%{_mandir}/man8/puppet-cert.8.gz
%{_mandir}/man8/puppet-certificate.8.gz
%{_mandir}/man8/puppet-certificate_request.8.gz
%{_mandir}/man8/puppet-certificate_revocation_list.8.gz
%{_mandir}/man8/puppet-config.8.gz
%{_mandir}/man8/puppet-device.8.gz
%{_mandir}/man8/puppet-doc.8.gz
%{_mandir}/man8/puppet-facts.8.gz
%{_mandir}/man8/puppet-file.8.gz
%{_mandir}/man8/puppet-filebucket.8.gz
%{_mandir}/man8/puppet-help.8.gz
%{_mandir}/man8/puppet-inspect.8.gz
%{_mandir}/man8/puppet-instrumentation_data.8.gz
%{_mandir}/man8/puppet-instrumentation_listener.8.gz
%{_mandir}/man8/puppet-instrumentation_probe.8.gz
%{_mandir}/man8/puppet-key.8.gz
%{_mandir}/man8/puppet-man.8.gz
%{_mandir}/man8/puppet-module.8.gz
%{_mandir}/man8/puppet-node.8.gz
%{_mandir}/man8/puppet-parser.8.gz
%{_mandir}/man8/puppet-plugin.8.gz
%{_mandir}/man8/puppet-report.8.gz
%{_mandir}/man8/puppet-resource.8.gz
%{_mandir}/man8/puppet-resource_type.8.gz
%{_mandir}/man8/puppet-secret_agent.8.gz
%{_mandir}/man8/puppet-status.8.gz
%files server %files server
%defattr(-, root, root, 0755) %defattr(-, root, root, 0755)
%{_sbindir}/puppetmasterd %if 0%{?_with_systemd}
%{_sbindir}/puppetrun %{_unitdir}/puppetmaster.service
%{_sbindir}/puppetqd %else
%{_initrddir}/puppetmaster %{_initrddir}/puppetmaster
%{_initrddir}/puppetqueue
%config(noreplace) %{_sysconfdir}/sysconfig/puppetmaster
%endif
%config(noreplace) %{_sysconfdir}/puppet/fileserver.conf %config(noreplace) %{_sysconfdir}/puppet/fileserver.conf
%dir %{_sysconfdir}/puppet/manifests %dir %{_sysconfdir}/puppet/manifests
%config(noreplace) %{_sysconfdir}/sysconfig/puppetmaster
%ghost %config(noreplace,missingok) %{_sysconfdir}/puppet/puppetmasterd.conf
# Ensure that man pages listed here are excluded from the main package
%{_mandir}/man8/puppet-kick.8.gz %{_mandir}/man8/puppet-kick.8.gz
%{_mandir}/man8/puppet-master.8.gz %{_mandir}/man8/puppet-master.8.gz
%{_mandir}/man8/puppet-queue.8.gz %{_mandir}/man8/puppet-queue.8.gz
%{_mandir}/man8/puppetmasterd.8.gz
%{_mandir}/man8/puppetqd.8.gz
%{_mandir}/man8/puppetrun.8.gz
# Fixed uid/gid were assigned in bz 472073 (Fedora), 471918 (RHEL-5), # Fixed uid/gid were assigned in bz 472073 (Fedora), 471918 (RHEL-5),
# and 471919 (RHEL-4) # and 471919 (RHEL-4)
@ -255,37 +282,81 @@ fi
exit 0 exit 0
%post %post
%if 0%{?_with_systemd}
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
%else
/sbin/chkconfig --add puppet || : /sbin/chkconfig --add puppet || :
%endif
%post server %post server
%if 0%{?_with_systemd}
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
%else
/sbin/chkconfig --add puppetmaster || : /sbin/chkconfig --add puppetmaster || :
%endif
%preun %preun
%if 0%{?_with_systemd}
if [ "$1" -eq 0 ] ; then
/bin/systemctl --no-reload disable puppetagent.service > /dev/null 2>&1 || :
/bin/systemctl stop puppetagent.service > /dev/null 2>&1 || :
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
fi
%else
if [ "$1" = 0 ] ; then if [ "$1" = 0 ] ; then
/sbin/service puppet stop >/dev/null 2>&1 /sbin/service puppet stop >/dev/null 2>&1
/sbin/chkconfig --del puppet || : /sbin/chkconfig --del puppet || :
fi fi
%endif
%preun server %preun server
%if 0%{?_with_systemd}
if [ $1 -eq 0 ] ; then
/bin/systemctl --no-reload disable puppetmaster.service > /dev/null 2>&1 || :
/bin/systemctl stop puppetmaster.service > /dev/null 2>&1 || :
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
fi
%else
if [ "$1" = 0 ] ; then if [ "$1" = 0 ] ; then
/sbin/service puppetmaster stop >/dev/null 2>&1 /sbin/service puppetmaster stop >/dev/null 2>&1
/sbin/chkconfig --del puppetmaster || : /sbin/chkconfig --del puppetmaster || :
fi fi
%endif
%postun %postun
%if 0%{?_with_systemd}
if [ $1 -ge 1 ] ; then
/bin/systemctl try-restart puppetagent.service >/dev/null 2>&1 || :
fi
%else
if [ "$1" -ge 1 ]; then if [ "$1" -ge 1 ]; then
/sbin/service puppet condrestart >/dev/null 2>&1 || : /sbin/service puppet condrestart >/dev/null 2>&1 || :
fi fi
%endif
%postun server %postun server
%if 0%{?_with_systemd}
if [ $1 -ge 1 ] ; then
/bin/systemctl try-restart puppetmaster.service >/dev/null 2>&1 || :
fi
%else
if [ "$1" -ge 1 ]; then if [ "$1" -ge 1 ]; then
/sbin/service puppetmaster condrestart >/dev/null 2>&1 || : /sbin/service puppetmaster condrestart >/dev/null 2>&1 || :
fi fi
%endif
%clean %clean
rm -rf %{buildroot} rm -rf %{buildroot}
%changelog %changelog
* Tue Oct 30 2012 Moses Mendoza <moses@puppetlabs.com> - 3.0.2-1
- Update to 3.0.2
- Update new dependencies (ruby >= 1.8.7, facter >= 1.6.6, hiera >= 1.0.0)
- Update for manpage and file changes in upstream
- Add conditionals for systemd service management
- Remove 0001-Ruby-1.9.3-has-a-different-error-when-require-fails.patch
- Remove 0001-Preserve-timestamps-when-installing-files.patch
* Wed Jul 11 2012 Todd Zullinger <tmz@pobox.com> - 2.7.18-1 * Wed Jul 11 2012 Todd Zullinger <tmz@pobox.com> - 2.7.18-1
- Update to 2.7.17, fixes CVE-2012-3864, CVE-2012-3865, CVE-2012-3866, - Update to 2.7.17, fixes CVE-2012-3864, CVE-2012-3865, CVE-2012-3866,
CVE-2012-3867 CVE-2012-3867

@ -1,109 +0,0 @@
#!/usr/bin/env ruby
# Script to clean up stored configs for (a) given host(s)
#
# Credits:
# Script was taken from http://reductivelabs.com/trac/puppet/attachment/wiki/UsingStoredConfiguration/kill_node_in_storedconfigs_db.rb (link no longer valid),
# which haven been initially posted by James Turnbull
# duritong adapted and improved the script a bit.
require 'getoptlong'
require 'puppet'
require 'puppet/rails'
config = Puppet[:config]
def printusage(error_code)
puts "Usage: #{$0} [ list of hostnames as stored in hosts table ]"
puts "\n Options:"
puts "--config <puppet config file>"
exit(error_code)
end
# Print a deprecation notice, pointing to puppet node clean the supported
# method of cleaning nodes in puppet >= 2.7. Unfortunately, puppet node clean
# removes far more than just storedconfig data.
puts "\nTHIS SCRIPT IS DEPRECATED."
puts "'puppet node clean' replaces it, but also removes certificates and reports.\n\n"
opts = GetoptLong.new(
[ "--config", "-c", GetoptLong::REQUIRED_ARGUMENT ],
[ "--help", "-h", GetoptLong::NO_ARGUMENT ],
[ "--usage", "-u", GetoptLong::NO_ARGUMENT ],
[ "--version", "-v", GetoptLong::NO_ARGUMENT ]
)
begin
opts.each do |opt, arg|
case opt
when "--config"
config = arg
when "--help"
printusage(0)
when "--usage"
printusage(0)
when "--version"
puts "#{Puppet.version}"
exit
end
end
rescue GetoptLong::InvalidOption => detail
$stderr.puts "Try '#{$0} --help'"
exit(1)
end
printusage(1) unless ARGV.size > 0
if config != Puppet[:config]
Puppet[:config]=config
Puppet.settings.parse
end
master = Puppet.settings.instance_variable_get(:@values)[:master]
main = Puppet.settings.instance_variable_get(:@values)[:main]
db_config = main.merge(master)
# get default values
[:master, :main, :rails].each do |section|
Puppet.settings.params(section).each do |key|
db_config[key] ||= Puppet[key]
end
end
adapter = db_config[:dbadapter]
args = {:adapter => adapter, :log_level => db_config[:rails_loglevel]}
case adapter
when "sqlite3"
args[:dbfile] = db_config[:dblocation]
when "mysql", "mysql2", "postgresql"
args[:host] = db_config[:dbserver] unless db_config[:dbserver].to_s.empty?
args[:username] = db_config[:dbuser] unless db_config[:dbuser].to_s.empty?
args[:password] = db_config[:dbpassword] unless db_config[:dbpassword].to_s.empty?
args[:database] = db_config[:dbname] unless db_config[:dbname].to_s.empty?
args[:port] = db_config[:dbport] unless db_config[:dbport].to_s.empty?
socket = db_config[:dbsocket]
args[:socket] = socket unless socket.to_s.empty?
else
raise ArgumentError, "Invalid db adapter #{adapter}"
end
args[:database] = "puppet" unless not args[:database].to_s.empty?
ActiveRecord::Base.establish_connection(args)
ARGV.each do |hostname|
if @host = Puppet::Rails::Host.find_by_name(hostname.strip)
print "Removing #{hostname} from storedconfig..."
$stdout.flush
@host.destroy
puts "done."
else
puts "Error: Can't find host #{hostname}."
end
end
exit 0
Loading…
Cancel
Save