summaryrefslogtreecommitdiffstats
path: root/puppet.spec
diff options
context:
space:
mode:
Diffstat (limited to 'puppet.spec')
-rw-r--r--puppet.spec80
1 files changed, 67 insertions, 13 deletions
diff --git a/puppet.spec b/puppet.spec
index 5943e70..b00f5a5 100644
--- a/puppet.spec
+++ b/puppet.spec
@@ -5,13 +5,19 @@
%global confdir conf/redhat
Name: puppet
-Version: 0.25.5
+Version: 2.6.6
Release: 1%{?dist}
Summary: A network tool for managing many disparate systems
-License: GPLv2+
+License: GPLv2
URL: http://puppetlabs.com
Source0: http://puppetlabs.com/downloads/%{name}/%{name}-%{version}.tar.gz
Source1: http://puppetlabs.com/downloads/%{name}/%{name}-%{version}.tar.gz.sign
+# http://projects.puppetlabs.com/issues/5428
+Patch0: 0001-5428-More-fully-stub-Puppet-Resource-Reference-for-u.patch
+# http://projects.puppetlabs.com/issues/4922
+Patch1: 0001-4922-Don-t-truncate-remotely-sourced-files-on-404.patch
+# http://projects.puppetlabs.com/issues/5073
+Patch2: 0001-5073-Download-plugins-even-if-you-re-filtering-on-ta.patch
Group: System Environment/Base
@@ -27,11 +33,11 @@ Requires: ruby-shadow
%endif
# Pull in ruby selinux bindings where available
-%if 0%{?fedora} >= 12 || 0%{?rhel} >= 6
-%{!?_without_selinux:Requires: ruby(selinux)}
+%if 0%{?fedora} || 0%{?rhel} >= 6
+%{!?_without_selinux:Requires: ruby(selinux), libselinux-utils}
%else
-%if 0%{?fedora} || 0%{?rhel} >= 5
-%{!?_without_selinux:Requires: libselinux-ruby}
+%if 0%{?rhel} && 0%{?rhel} == 5
+%{!?_without_selinux:Requires: libselinux-ruby, libselinux-utils}
%endif
%endif
@@ -66,7 +72,11 @@ The server can also function as a certificate authority and file server.
%prep
%setup -q
-patch -p1 < conf/redhat/rundir-perms.patch
+%patch0 -p1
+%patch1 -p1
+%patch2 -p1
+patch -s -p1 < conf/redhat/rundir-perms.patch
+
%build
# Fix some rpmlint complaints
@@ -91,6 +101,7 @@ rm -rf %{buildroot}
ruby install.rb --destdir=%{buildroot} --quick --no-rdoc
install -d -m0755 %{buildroot}%{_sysconfdir}/puppet/manifests
+install -d -m0755 %{buildroot}%{_datadir}/%{name}/modules
install -d -m0755 %{buildroot}%{_localstatedir}/lib/puppet
install -d -m0755 %{buildroot}%{_localstatedir}/run/puppet
install -d -m0750 %{buildroot}%{_localstatedir}/log/puppet
@@ -100,7 +111,6 @@ install -Dp -m0644 %{confdir}/server.sysconfig %{buildroot}%{_sysconfdir}/syscon
install -Dp -m0755 %{confdir}/server.init %{buildroot}%{_initrddir}/puppetmaster
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 conf/auth.conf %{buildroot}%{_sysconfdir}/puppet/auth.conf
install -Dp -m0644 %{confdir}/logrotate %{buildroot}%{_sysconfdir}/logrotate.d/puppet
# We need something for these ghosted files, otherwise rpmbuild
@@ -126,6 +136,13 @@ vimdir=%{buildroot}%{_datadir}/vim/vimfiles
install -Dp -m0644 ext/vim/ftdetect/puppet.vim $vimdir/ftdetect/puppet.vim
install -Dp -m0644 ext/vim/syntax/puppet.vim $vimdir/syntax/puppet.vim
+%if 0%{?fedora} >= 15
+# Setup tmpfiles.d config
+mkdir mkdir -p %{buildroot}%{_sysconfdir}/tmpfiles.d
+echo "D /var/run/%{name} 0755 %{name} %{name} -" > \
+ %{buildroot}%{_sysconfdir}/tmpfiles.d/%{name}.conf
+%endif
+
%files
%defattr(-, root, root, 0755)
%doc CHANGELOG COPYING LICENSE README README.queueing examples
@@ -139,6 +156,9 @@ install -Dp -m0644 ext/vim/syntax/puppet.vim $vimdir/syntax/puppet.vim
%{ruby_sitelibdir}/*
%{_initrddir}/puppet
%dir %{_sysconfdir}/puppet
+%if 0%{?fedora} >= 15
+%config(noreplace) %{_sysconfdir}/tmpfiles.d/%{name}.conf
+%endif
%config(noreplace) %{_sysconfdir}/sysconfig/puppet
%config(noreplace) %{_sysconfdir}/puppet/puppet.conf
%config(noreplace) %{_sysconfdir}/puppet/auth.conf
@@ -183,27 +203,48 @@ install -Dp -m0644 ext/vim/syntax/puppet.vim $vimdir/syntax/puppet.vim
getent group puppet &>/dev/null || groupadd -r puppet -g 52 &>/dev/null
getent passwd puppet &>/dev/null || \
useradd -r -u 52 -g puppet -d %{_localstatedir}/lib/puppet -s /sbin/nologin \
- -c "Puppet" puppet &>/dev/null || :
+ -c "Puppet" puppet &>/dev/null
# ensure that old setups have the right puppet home dir
if [ $1 -gt 1 ] ; then
- usermod -d %{_localstatedir}/lib/puppet puppet &>/dev/null || :
+ usermod -d %{_localstatedir}/lib/puppet puppet &>/dev/null
fi
+exit 0
%post
/sbin/chkconfig --add puppet || :
+if [ "$1" -ge 1 ]; then
+ # The pidfile changed from 0.25.x to 2.6.x, handle upgrades without leaving
+ # the old process running.
+ oldpid="%{_localstatedir}/run/puppet/puppetd.pid"
+ newpid="%{_localstatedir}/run/puppet/agent.pid"
+ if [ -s "$oldpid" -a ! -s "$newpid" ]; then
+ (kill $(< "$oldpid") && rm -f "$oldpid" && \
+ /sbin/service puppet start) >/dev/null 2>&1 || :
+ fi
+fi
%post server
/sbin/chkconfig --add puppetmaster || :
+if [ "$1" -ge 1 ]; then
+ # The pidfile changed from 0.25.x to 2.6.x, handle upgrades without leaving
+ # the old process running.
+ oldpid="%{_localstatedir}/run/puppet/puppetmasterd.pid"
+ newpid="%{_localstatedir}/run/puppet/master.pid"
+ if [ -s "$oldpid" -a ! -s "$newpid" ]; then
+ (kill $(< "$oldpid") && rm -f "$oldpid" && \
+ /sbin/service puppetmaster start) >/dev/null 2>&1 || :
+ fi
+fi
%preun
if [ "$1" = 0 ] ; then
- /sbin/service puppet stop > /dev/null 2>&1
+ /sbin/service puppet stop >/dev/null 2>&1
/sbin/chkconfig --del puppet || :
fi
%preun server
if [ "$1" = 0 ] ; then
- /sbin/service puppetmaster stop > /dev/null 2>&1
+ /sbin/service puppetmaster stop >/dev/null 2>&1
/sbin/chkconfig --del puppetmaster || :
fi
@@ -214,13 +255,26 @@ fi
%postun server
if [ "$1" -ge 1 ]; then
- /sbin/service puppetmaster condrestart > /dev/null 2>&1 || :
+ /sbin/service puppetmaster condrestart >/dev/null 2>&1 || :
fi
%clean
rm -rf %{buildroot}
%changelog
+* Wed Mar 16 2011 Todd Zullinger <tmz@pobox.com> - 2.6.6-1
+- Update to 2.6.6
+- Ensure %%pre exits cleanly
+- Fix License tag, puppet is now GPLv2 only
+- Create and own /usr/share/puppet/modules (#615432)
+- Properly restart puppet agent/master daemons on upgrades from 0.25.x
+- Require libselinux-utils when selinux support is enabled
+- Support tmpfiles.d for Fedora >= 15 (#656677)
+- Apply a few upstream fixes for 0.25.5 regressions
+
+* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.25.5-2
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
+
* Mon May 17 2010 Todd Zullinger <tmz@pobox.com> - 0.25.5-1
- Update to 0.25.5
- Adjust selinux conditional for EL-6