summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTodd Zullinger <tmz@pobox.com>2008-10-02 08:10:05 -0400
committerTodd Zullinger <tmz@pobox.com>2008-10-02 08:10:05 -0400
commitd813d4a3c774e213e7926da58529b462fdbead42 (patch)
treeb3ed890e5e9481cff13ba5accc9533f868c2a653
parent657b9c6f8795bae609ab6120bb5cfb6ddea9e328 (diff)
downloadpuppet-package.git~-devel.zip
puppet-package.git~-devel.tar.gz
puppet-package.git~-devel.tar.xz
Create puppet user/group according to Fedora packaging guidelinesHEADdevel
-rw-r--r--puppet.spec12
1 files changed, 8 insertions, 4 deletions
diff --git a/puppet.spec b/puppet.spec
index a3529f3..6b196f7 100644
--- a/puppet.spec
+++ b/puppet.spec
@@ -23,6 +23,7 @@ Requires: ruby-shadow
Requires: facter >= 1.1.4
Requires: ruby >= 1.8.1
+Requires(pre): shadow-utils
Requires(post): chkconfig
Requires(preun): chkconfig
Requires(preun): initscripts
@@ -147,11 +148,13 @@ touch %{buildroot}%{_sysconfdir}/puppet/puppetd.conf
%doc %{_mandir}/man8/puppetrun.8.gz
%pre
-/usr/sbin/groupadd -r puppet 2>/dev/null || :
-/usr/sbin/useradd -g puppet -c "Puppet" \
- -s /sbin/nologin -r -d /var/lib/puppet puppet 2> /dev/null || :
+getent group puppet >/dev/null || groupadd -r puppet
+getent passwd puppet >/dev/null || \
+useradd -r -g puppet -d %{_localstatedir}/lib/puppet -s /sbin/nologin \
+ -c "Puppet" puppet || :
+# ensure that old setups have the right puppet home dir
if [ $1 -gt 1 ] ; then
- /usr/sbin/usermod -d /var/lib/puppet puppet || :
+ usermod -d %{_localstatedir}/lib/puppet puppet || :
fi
%post
@@ -192,6 +195,7 @@ rm -rf %{buildroot}
- Require chkconfig and initstripts for preun, post, and postun scripts
- Conditionally restart puppet in %%postun
- Ensure %%preun, %%post, and %%postun scripts exit cleanly
+- Create puppet user/group according to Fedora packaging guidelines
- Quiet a few rpmlint complaints
- Remove useless %%pbuild macro
- Make specfile more like the Fedora/EPEL template