diff options
author | lutter <lutter@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-02-09 01:40:58 +0000 |
---|---|---|
committer | lutter <lutter@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-02-09 01:40:58 +0000 |
commit | 8c02ffde9c07b817597fd17f67047ed310cbdfcc (patch) | |
tree | ee42354ac27b46ce7bb85e9531d474258bb88495 | |
parent | d629a80e14129fb51c662d41920a5389113af0c9 (diff) | |
download | puppet-8c02ffde9c07b817597fd17f67047ed310cbdfcc.tar.gz puppet-8c02ffde9c07b817597fd17f67047ed310cbdfcc.tar.xz puppet-8c02ffde9c07b817597fd17f67047ed310cbdfcc.zip |
Adapt specfile to the fact that puppetmaster now automatically runs as user puppet. Add default config files that send logs to /var/log/puppet.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@893 980ebf18-57e1-0310-9a29-db15c13687c0
-rw-r--r-- | conf/redhat/client.init | 6 | ||||
-rw-r--r-- | conf/redhat/client.sysconfig | 2 | ||||
-rw-r--r-- | conf/redhat/logrotate | 8 | ||||
-rw-r--r-- | conf/redhat/puppet.spec | 26 | ||||
-rw-r--r-- | conf/redhat/puppetd.conf | 5 | ||||
-rw-r--r-- | conf/redhat/puppetmasterd.conf | 5 | ||||
-rw-r--r-- | conf/redhat/server.init | 6 |
7 files changed, 50 insertions, 8 deletions
diff --git a/conf/redhat/client.init b/conf/redhat/client.init index 016b7b547..2e0a5c741 100644 --- a/conf/redhat/client.init +++ b/conf/redhat/client.init @@ -15,7 +15,7 @@ export PATH [ -f /etc/sysconfig/puppet ] && . /etc/sysconfig/puppet lockfile=${LOCKFILE-/var/lock/subsys/puppet} -pidfile=${PIDFILE-/var/run/puppet.pid} +pidfile=${PIDFILE-/var/run/puppet/puppet.pid} puppetd=${PUPPETD-/usr/sbin/puppetd} RETVAL=0 @@ -28,7 +28,7 @@ PUPPET_OPTS="" [ -n "$PUPPET_PORT" ] && PUPPET_OPTS="${PUPPET_OPTS} --port=${PUPPET_PORT}" start() { - echo -n $"Starting puppetd: " + echo -n $"Starting puppet: " daemon $puppetd ${PUPPET_OPTS} ${PUPPET_EXTRA_OPTS} RETVAL=$? echo @@ -37,7 +37,7 @@ start() { } stop() { - echo -n $"Stopping puppetd: " + echo -n $"Stopping puppet: " killproc $puppetd RETVAL=$? echo diff --git a/conf/redhat/client.sysconfig b/conf/redhat/client.sysconfig index cfe065b33..4806b86ab 100644 --- a/conf/redhat/client.sysconfig +++ b/conf/redhat/client.sysconfig @@ -5,7 +5,7 @@ #PUPPET_PORT=8140 # Where to log to. Specify syslog to send log messages to the system log. -#PUPPET_LOG=syslog +PUPPET_LOG=/var/log/puppet/puppet.log # You may specify other parameters to the puppet client here #PUPPET_EXTRA_OPTS=--waitforcert=500 diff --git a/conf/redhat/logrotate b/conf/redhat/logrotate new file mode 100644 index 000000000..01765baf5 --- /dev/null +++ b/conf/redhat/logrotate @@ -0,0 +1,8 @@ +/var/log/puppet/*log { + missingok + create 0644 puppet puppet + postrotate + [ -e /etc/init.d/puppetmaster ] && /etc/init.d/puppetmaster condrestart >/dev/null 2>&1 || true + [ -e /etc/init.d/puppet ] && /etc/init.d/puppet condrestart > /dev/null 2>&1 || true + endscript +} diff --git a/conf/redhat/puppet.spec b/conf/redhat/puppet.spec index bd5c173dc..b56052144 100644 --- a/conf/redhat/puppet.spec +++ b/conf/redhat/puppet.spec @@ -5,7 +5,7 @@ Summary: A network tool for managing many disparate systems Name: puppet Version: 0.13.0 -Release: 1%{?dist} +Release: 3%{?dist} License: GPL Group: System Environment/Base @@ -43,6 +43,8 @@ The server can also function as a certificate authority and file server. %{__install} -d -m0755 %{buildroot}%{_sysconfdir}/puppet/manifests %{__install} -d -m0755 %{buildroot}%{_docdir}/%{name}-%{version} %{__install} -d -m0755 %{buildroot}%{_localstatedir}/puppet +%{__install} -d -m0755 %{buildroot}%{_localstatedir}/run/puppet +%{__install} -d -m0755 %{buildroot}%{_localstatedir}/log/puppet %{__install} -Dp -m0755 %{_pbuild}/bin/* %{buildroot}%{_sbindir} %{__mv} %{buildroot}%{_sbindir}/puppet %{buildroot}%{_bindir}/puppet %{__install} -Dp -m0644 %{_pbuild}/lib/puppet.rb %{buildroot}%{rubylibdir}/puppet.rb @@ -52,6 +54,9 @@ The server can also function as a certificate authority and file server. %{__install} -Dp -m0644 %{confdir}/server.sysconfig %{buildroot}%{_sysconfdir}/sysconfig/puppetmaster %{__install} -Dp -m0755 %{confdir}/server.init %{buildroot}%{_initrddir}/puppetmaster %{__install} -Dp -m0644 %{confdir}/fileserver.conf %{buildroot}%{_sysconfdir}/puppet/fileserver.conf +%{__install} -Dp -m0644 %{confdir}/puppetd.conf %{buildroot}%{_sysconfdir}/puppet/puppetd.conf +%{__install} -Dp -m0644 %{confdir}/puppetmasterd.conf %{buildroot}%{_sysconfdir}/puppet/puppetmasterd.conf +%{__install} -Dp -m0644 %{confdir}/logrotate %{buildroot}%{_sysconfdir}/logrotate.d/puppet %files %defattr(-, root, root, 0755) @@ -61,8 +66,14 @@ The server can also function as a certificate authority and file server. %{_localstatedir}/puppet %{_initrddir}/puppet %config(noreplace) %{_sysconfdir}/sysconfig/puppet +%config(noreplace) %{_sysconfdir}/puppet/puppetd.conf %doc CHANGELOG COPYING LICENSE README TODO examples %exclude %{_sbindir}/puppetdoc +%config(noreplace) %{_sysconfdir}/logrotate.d/puppet +# These need to be owned by puppet so the server can +# write to them +%attr(-, puppet, puppet) %{_localstatedir}/run/puppet +%attr(-, puppet, puppet) %{_localstatedir}/log/puppet %files server %{_sbindir}/puppetmasterd @@ -70,9 +81,16 @@ The server can also function as a certificate authority and file server. %config(noreplace) %{_sysconfdir}/puppet/* %config(noreplace) %{_sysconfdir}/sysconfig/puppetmaster %config(noreplace) %{_sysconfdir}/puppet/fileserver.conf +%config(noreplace) %{_sysconfdir}/puppet/puppetmasterd.conf %{_sbindir}/cf2puppet %{_sbindir}/puppetca +%pre +# Use uid 317 - we need to find out how to properly assign +# uid's for system users +/usr/sbin/useradd -c "Puppet" -u 317 \ + -s /sbin/nologin -r -d /var/puppet puppet 2> /dev/null || : + %post touch %{_localstatedir}/log/puppet.log /sbin/chkconfig --add puppet @@ -104,6 +122,12 @@ fi %{__rm} -rf %{buildroot} %changelog +* Wed Feb 8 2006 David Lutterkort <dlutter@redhat.com> - 0.13.0-3 +- Fix puppetd.conf + +* Wed Feb 8 2006 David Lutterkort <dlutter@redhat.com> - 0.13.0-2 +- Changes to run puppetmaster as user puppet + * Mon Feb 6 2006 David Lutterkort <dlutter@redhat.com> - 0.13.0-1 - Don't mark initscripts as config files diff --git a/conf/redhat/puppetd.conf b/conf/redhat/puppetd.conf new file mode 100644 index 000000000..6891daec4 --- /dev/null +++ b/conf/redhat/puppetd.conf @@ -0,0 +1,5 @@ +[puppetd] +# Make sure all log messages are sent to the right directory +# This directory must be writable by the puppet user +logdir=/var/log/puppet +rundir=/var/run/puppet diff --git a/conf/redhat/puppetmasterd.conf b/conf/redhat/puppetmasterd.conf new file mode 100644 index 000000000..1eeeab542 --- /dev/null +++ b/conf/redhat/puppetmasterd.conf @@ -0,0 +1,5 @@ +[puppetmasterd] +# Make sure all log messages are sent to the right directory +# This directory must be writable by the puppet user +logdir=/var/log/puppet +rundir=/var/run/puppet diff --git a/conf/redhat/server.init b/conf/redhat/server.init index 029f5fa7d..d732f24f7 100644 --- a/conf/redhat/server.init +++ b/conf/redhat/server.init @@ -21,7 +21,7 @@ if [ -f /etc/sysconfig/puppetmaster ]; then fi [ -z "$PUPPETMASTER_MANIFEST" ] && PUPPETMASTER_MANIFEST=/etc/puppet/manifests/site.pp -[ -z "$PUPPETMASTER_LOG" ] && PUPPETMASTER_LOG="/var/log/puppetmaster.log" +[ -z "$PUPPETMASTER_LOG" ] && PUPPETMASTER_LOG="/var/log/puppet/puppetmaster.log" PUPPETMASTER_OPTS=" --manifest=$PUPPETMASTER_MANIFEST \ --logdest=${PUPPETMASTER_LOG} \ @@ -33,7 +33,7 @@ prog=puppetmasterd PUPPETMASTER=/usr/sbin/$prog start() { - echo -n $"Starting $prog: " + echo -n $"Starting puppetmaster: " # Confirm the manifest exists if [ -r $PUPPETMASTER_MANIFEST ]; then @@ -52,7 +52,7 @@ start() { } stop() { - echo -n $"Stopping $prog: " + echo -n $"Stopping puppetmaster: " killproc $PUPPETMASTER RETVAL=$? echo |