-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi James,
James Turnbull wrote: > Thanks for this - I don't have a build services account. Can you please > provide a Git branch or email the diff to the list? The relevant patch against puppet would be simply deleting the conf/suse directory. However, this should not be done until my patch for the SUSE packages is accepted by the maintainers. I'll go ahead and attach the SUSE package diff between my branch and the system:management project's version (note that it is not in conventional diff format) for your convenience. Regards, Noah - -- Noah Fontes Transtruct Foundation http://www.transtruct.org/ Phone: +1 816 867 0001 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAkp/cHcACgkQhitK+HuUQJTdNACfciAwmk3SRG/xTuAQj6W/P7/I SOYAn08aMs81MN7iRuDi4fBz4IwX15/y =RfFg -----END PGP SIGNATURE----- --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/puppet-dev?hl=en -~----------~----~----~----~------~----~------~--~---
changes files: -------------- ++++++ new changes file: --- puppet.changes +++ puppet.changes +------------------------------------------------------------------- +Sun Aug 9 19:43:03 CEST 2009 - [email protected] + +- Fix build on SLES 9. +- Enable puppet and puppet-server services by default. + +------------------------------------------------------------------- +Sat Aug 8 22:59:05 CEST 2009 - [email protected] + +- Fix a lot of relevant warnings from rpmlint. +- Build on OpenSUSE 11.1 correctly. +- Rename puppetmaster init scripts to puppet-server to correspond to the package name. + new: ---- conf.puppet-server.init conf.puppet.init puppet.changes spec files: ----------- --- puppet.spec --- puppet.spec @@ -1,6 +1,5 @@ %{!?ruby_sitelibdir: %define ruby_sitelibdir %(ruby -rrbconfig -e 'puts Config::CONFIG["sitelibdir"]')} %define pbuild %{_builddir}/%{name}-%{version} -%define suseconfdir conf/suse %define confdir conf/redhat Summary: A network tool for managing many disparate systems @@ -11,16 +10,21 @@ Group: Productivity/Networking/System URL: http://reductivelabs.com/projects/puppet/ -Source: http://reductivelabs.com/downloads/puppet/%{name}-%{version}.tgz +Source0: http://reductivelabs.com/downloads/puppet/%{name}-%{version}.tgz +Source1: conf.puppet.init +Source2: conf.puppet-server.init +PreReq: %{insserv_prereq} %{fillup_prereq} Requires: ruby >= 1.8.1 Requires: facter >= 1.1.4 Requires: cron +# SuSE versions prior to 10.0 don't support the Suggests tag +%if %suse_version >= 1000 +Suggests: logrotate +%endif BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: ruby >= 1.8.1 -Packager: Martin Vuk <[email protected]> - %description Puppet lets you centrally manage every important aspect of your system using a cross-platform specification language that manages all the separate elements @@ -45,7 +49,6 @@ done %install -%{__rm} -rf %{buildroot} %{__install} -d -m0755 %{buildroot}%{_sbindir} %{__install} -d -m0755 %{buildroot}%{_bindir} %{__install} -d -m0755 %{buildroot}%{ruby_sitelibdir} @@ -59,18 +62,18 @@ %{__mv} %{buildroot}%{_sbindir}/puppetrun %{buildroot}%{_bindir}/puppetrun %{__install} -Dp -m0644 %{pbuild}/lib/puppet.rb %{buildroot}%{ruby_sitelibdir}/puppet.rb %{__cp} -a %{pbuild}/lib/puppet %{buildroot}%{ruby_sitelibdir} -find %{buildroot}%{ruby_sitelibdir} -type f -perm +ugo+x -print0 | xargs -0 -r %{__chmod} a-x -%{__install} -Dp -m0644 %{confdir}/client.sysconfig %{buildroot}%{_sysconfdir}/sysconfig/puppet -%{__install} -Dp -m0755 %{suseconfdir}/client.init %{buildroot}%{_initrddir}/puppet -%{__install} -Dp -m0644 %{confdir}/server.sysconfig %{buildroot}%{_sysconfdir}/sysconfig/puppetmaster -%{__install} -Dp -m0755 %{suseconfdir}/server.init %{buildroot}%{_initrddir}/puppetmaster +find %{buildroot}%{ruby_sitelibdir} -type f -perm +ugo+x -exec chmod a-x '{}' \; +%{__install} -Dp -m0644 %{confdir}/client.sysconfig %{buildroot}/var/adm/fillup-templates/sysconfig.puppet +%{__install} -Dp -m0755 %SOURCE1 %{buildroot}%{_initrddir}/puppet +%{__install} -Dp -m0644 %{confdir}/server.sysconfig %{buildroot}/var/adm/fillup-templates/sysconfig.puppet-server +%{__install} -Dp -m0755 %SOURCE2 %{buildroot}%{_initrddir}/puppet-server %{__install} -Dp -m0644 %{confdir}/fileserver.conf %{buildroot}%{_sysconfdir}/puppet/fileserver.conf %{__install} -Dp -m0644 %{confdir}/puppet.conf %{buildroot}%{_sysconfdir}/puppet/puppet.conf #%{__ln_s} puppet.conf %{buildroot}%{_sysconfdir}/puppet/puppetmasterd.conf #%{__ln_s} puppet.conf %{buildroot}%{_sysconfdir}/puppet/puppetca.conf %{__install} -Dp -m0644 %{confdir}/logrotate %{buildroot}%{_sysconfdir}/logrotate.d/puppet %{__ln_s} %{_initrddir}/puppet %{buildroot}%{_sbindir}/rcpuppet -%{__ln_s} %{_initrddir}/puppetmaster %{buildroot}%{_sbindir}/rcpuppetmaster +%{__ln_s} %{_initrddir}/puppet-server %{buildroot}%{_sbindir}/rcpuppet-server %files %defattr(-, root, root, 0755) @@ -81,11 +84,12 @@ %{_sbindir}/rcpuppet %{ruby_sitelibdir}/* %{_initrddir}/puppet -%config(noreplace) %{_sysconfdir}/sysconfig/puppet +/var/adm/fillup-templates/sysconfig.puppet %config(noreplace) %{_sysconfdir}/puppet/puppet.conf %doc CHANGELOG COPYING LICENSE README examples %exclude %{_sbindir}/puppetdoc %config(noreplace) %{_sysconfdir}/logrotate.d/puppet +%dir %{_sysconfdir}/puppet # These need to be owned by puppet so the server can # write to them %attr(-, puppet, puppet) %{_localstatedir}/run/puppet @@ -95,12 +99,14 @@ %files server %defattr(-, root, root, 0755) %{_sbindir}/puppetmasterd -%{_sbindir}/rcpuppetmaster +%{_sbindir}/rcpuppet-server %{_bindir}/puppetrun -%{_initrddir}/puppetmaster +%{_initrddir}/puppet-server %config(noreplace) %{_sysconfdir}/puppet/* -%config(noreplace) %{_sysconfdir}/sysconfig/puppetmaster +%exclude %{_sysconfdir}/puppet/puppet.conf +/var/adm/fillup-templates/sysconfig.puppet-server %{_sbindir}/puppetca +%dir %{_sysconfdir}/puppet %pre /usr/sbin/groupadd -r puppet 2>/dev/null || : @@ -108,33 +114,38 @@ -s /sbin/nologin -r -d /var/puppet puppet 2> /dev/null || : %post -/sbin/chkconfig --add puppet -exit 0 +%{fillup_and_insserv -y puppet} %post server -/sbin/chkconfig --add puppetmaster +%{fillup_and_insserv -n -y puppet-server} %preun -if [ "$1" = 0 ] ; then - /sbin/service puppet stop > /dev/null 2>&1 - /sbin/chkconfig --del puppet -fi +%stop_on_removal puppet %preun server -if [ "$1" = 0 ] ; then - /sbin/service puppetmaster stop > /dev/null 2>&1 - /sbin/chkconfig --del puppetmaster -fi +%stop_on_removal puppet-server + +%postun +%restart_on_update puppet +%{insserv_cleanup} %postun server -if [ "$1" -ge 1 ]; then - /sbin/service puppetmaster try-restart > /dev/null 2>&1 -fi +%restart_on_update puppet-server +%{insserv_cleanup} %clean %{__rm} -rf %{buildroot} %changelog +* Sun Aug 9 2009 Noah Fontes <[email protected]> +- Fix build on SLES 9. +- Enable puppet and puppet-server services by default. + +* Sat Aug 8 2009 Noah Fontes <[email protected]> +- Fix a lot of relevant warnings from rpmlint. +- Build on OpenSUSE 11.1 correctly. +- Rename puppetmaster init scripts to puppet-server to correspond to the package name. + * Wed Apr 22 2009 Leo Eraly <[email protected]> - 0.24.8 - New version. other changes: -------------- ++++++ conf.puppet-server.init (new) --- conf.puppet-server.init +++ conf.puppet-server.init +#!/bin/bash +# puppet-server This shell script enables the puppetmaster server. +# +# Author: Duane Griffin <[email protected]> +# Martin Vuk <[email protected]> (SuSE support) +# Noah Fontes <[email protected]> +# +# chkconfig: - 65 45 +# +# description: Server for the puppet system management tool. +# processname: puppetmaster + +### BEGIN INIT INFO +# Provides: puppet-server +# Required-Start: $local_fs $remote_fs $network $syslog +# Required-Stop: $local_fs $remote_fs $network $syslog +# Default-Start: 3 4 5 +# Default-Stop: 0 1 2 6 +# Short-Description: puppet-server +# Description: Server for the puppet system management tool. +### END INIT INFO + +# Shell functions sourced from /etc/rc.status: +# rc_check check and set local and overall rc status +# rc_status check and set local and overall rc status +# rc_status -v ditto but be verbose in local rc status +# rc_status -v -r ditto and clear the local rc status +# rc_failed set local and overall rc status to failed +# rc_reset clear local rc status (overall remains) +# rc_exit exit appropriate to overall rc status +lockfile=/var/lock/subsys/puppet-server +pidfile=/var/run/puppet/puppet-server.pid +# Source function library. +[ -f /etc/rc.status ] && . /etc/rc.status +[ -f /etc/sysconfig/puppet-server ] && . /etc/sysconfig/puppet-server + +[ -z "$PUPPETMASTER_MANIFEST" ] && PUPPETMASTER_MANIFEST=/etc/puppet/manifests/site.pp +[ -z "$PUPPETMASTER_LOG" ] && PUPPETMASTER_LOG="/var/log/puppet/puppetmaster.log" +PUPPETMASTER_OPTS=" + --manifest=$PUPPETMASTER_MANIFEST \ + --logdest=${PUPPETMASTER_LOG} \ + ${PUPPETMASTER_EXTRA_OPTS}" +PUPPET_OPTS="" +[ -n "${PUPPET_SERVER}" ] && PUPPET_OPTS="--server=${PUPPET_SERVER}" +[ -n "$PUPPET_LOG" ] && PUPPET_OPTS="${PUPPET_OPTS} --logdest=${PUPPET_LOG}" +[ -n "$PUPPET_PORT" ] && PUPPET_OPTS="${PUPPET_OPTS} --port=${PUPPET_PORT}" + +prog=puppetmasterd +PUPPETMASTER=/usr/sbin/$prog + +start() { + echo -n $"Starting puppetmaster: " + + echo + return $RETVAL +} +# First reset status of this service +rc_reset + +# Return values acc. to LSB for all commands but status: +# 0 - success +# 1 - misc error +# 2 - invalid or excess args +# 3 - unimplemented feature (e.g. reload) +# 4 - insufficient privilege +# 5 - program not installed +# 6 - program not configured +# +# Note that starting an already running service, stopping +# or restarting a not-running service as well as the restart +# with force-reload (in case signalling is not supported) are +# considered a success. + +case "$1" in + start) + echo -n "Starting puppetmaster services." + ## Start daemon with startproc(8). If this fails + ## the echo return value is set appropriate. + + # startproc should return 0, even if service is + # already running to match LSB spec. + # Confirm the manifest exists + if [ -r $PUPPETMASTER_MANIFEST ]; then + startproc $PUPPETMASTER $PUPPETMASTER_OPTS && touch "$lockfile" + else + rc_failed + echo "Manifest does not exist: $PUPPETMASTER_MANIFEST" + fi + # Remember status and be verbose + rc_status -v + ;; + stop) + echo -n "Shutting down puppetmaster:" + ## Stop daemon with killproc(8) and if this fails + ## set echo the echo return value. + + killproc -QUIT $PUPPETMASTER && rm -f ${lockfile} ${pidfile} + + # Remember status and be verbose + rc_status -v + ;; + try-restart) + ## Stop the service and if this succeeds (i.e. the + ## service was running before), start it again. + $0 status >/dev/null && $0 restart + + # Remember status and be quiet + rc_status + ;; + restart) + ## Stop the service and regardless of whether it was + ## running or not, start it again. + $0 stop + $0 start + + # Remember status and be quiet + rc_status + ;; + force-reload) + ## Signal the daemon to reload its config. Most daemons + ## do this on signal 1 (SIGHUP). + ## If it does not support it, restart. + + echo -n "Reload service puppet" + ## if it supports it: + killproc -HUP $PUPPETMASTER + rc_status -v + ;; + reload) + ## Like force-reload, but if daemon does not support + ## signalling, do nothing (!) + + # If it supports signalling: + echo -n "Reload puppet services." + killproc -HUP $PUPPETMASTER + rc_status -v + ;; + status) + echo -n "Checking for service puppetmaster: " + ## Check status with checkproc(8), if process is running + ## checkproc will return with exit status 0. + + # Status has a slightly different for the status command: + # 0 - service running + # 1 - service dead, but /var/run/ pid file exists + # 2 - service dead, but /var/lock/ lock file exists + # 3 - service not running + + # NOTE: checkproc returns LSB compliant status values. + checkproc $PUPPETMASTER + rc_status -v + ;; + *) + echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload}" + exit 1 +esac +rc_exit ++++++ conf.puppet.init (new) --- conf.puppet.init +++ conf.puppet.init +#!/bin/bash +# puppet Init script for running the puppet client daemon +# +# Author: Duane Griffin <[email protected]> +# David Lutterkort <[email protected]> +# Martin Vuk <[email protected]> (SuSE support) +# Noah Fontes <[email protected]> +# +# chkconfig: - 98 02 +# +# description: Enables periodic system configuration checks through puppet. +# processname: puppet +# config: /etc/sysconfig/puppet + +### BEGIN INIT INFO +# Provides: puppet +# Required-Start: $local_fs $remote_fs $network $syslog +# Required-Stop: $local_fs $remote_fs $network $syslog +# Should-Start: puppet-server +# Should-Stop: puppet-server +# Default-Start: 3 4 5 +# Default-Stop: 0 1 2 6 +# Short-Description: puppet +# Description: Enables periodic system configuration checks through puppet. +### END INIT INFO + +# Shell functions sourced from /etc/rc.status: +# rc_check check and set local and overall rc status +# rc_status check and set local and overall rc status +# rc_status -v ditto but be verbose in local rc status +# rc_status -v -r ditto and clear the local rc status +# rc_failed set local and overall rc status to failed +# rc_reset clear local rc status (overall remains) +# rc_exit exit appropriate to overall rc status +[ -f /etc/rc.status ] && . /etc/rc.status +[ -f /etc/sysconfig/puppet ] && . /etc/sysconfig/puppet +lockfile=${LOCKFILE-/var/lock/subsys/puppet} +pidfile=${PIDFILE-/var/run/puppet.pid} +puppetd=${PUPPETD-/usr/sbin/puppetd} + +PUPPET_OPTS="" +[ -n "${PUPPET_SERVER}" ] && PUPPET_OPTS="--server=${PUPPET_SERVER}" +[ -n "$PUPPET_LOG" ] && PUPPET_OPTS="${PUPPET_OPTS} --logdest=${PUPPET_LOG}" +[ -n "$PUPPET_PORT" ] && PUPPET_OPTS="${PUPPET_OPTS} --port=${PUPPET_PORT}" + +# First reset status of this service +rc_reset + +# Return values acc. to LSB for all commands but status: +# 0 - success +# 1 - misc error +# 2 - invalid or excess args +# 3 - unimplemented feature (e.g. reload) +# 4 - insufficient privilege +# 5 - program not installed +# 6 - program not configured +# +# Note that starting an already running service, stopping +# or restarting a not-running service as well as the restart +# with force-reload (in case signalling is not supported) are +# considered a success. + +case "$1" in + start) + echo -n "Starting puppet services." + ## Start daemon with startproc(8). If this fails + ## the echo return value is set appropriate. + + # startproc should return 0, even if service is + # already running to match LSB spec. + startproc $puppetd ${PUPPET_OPTS} ${PUPPET_EXTRA_OPTS} && touch ${lockfile} + # Remember status and be verbose + rc_status -v + ;; + stop) + echo -n "Shutting down puppet:" + ## Stop daemon with killproc(8) and if this fails + ## set echo the echo return value. + + killproc -QUIT $puppetd && rm -f ${lockfile} ${pidfile} + + # Remember status and be verbose + rc_status -v + ;; + try-restart) + ## Stop the service and if this succeeds (i.e. the + ## service was running before), start it again. + $0 status >/dev/null && $0 restart + + # Remember status and be quiet + rc_status + ;; + restart) + ## Stop the service and regardless of whether it was + ## running or not, start it again. + $0 stop + $0 start + + # Remember status and be quiet + rc_status + ;; + force-reload) + ## Signal the daemon to reload its config. Most daemons + ## do this on signal 1 (SIGHUP). + ## If it does not support it, restart. + + echo -n "Reload service puppet" + ## if it supports it: + killproc -HUP $puppetd + rc_status -v + ;; + reload) + ## Like force-reload, but if daemon does not support + ## signalling, do nothing (!) + + # If it supports signalling: + echo -n "Reload puppet services." + killproc -HUP $puppetd + rc_status -v + ;; + status) + echo -n "Checking for service puppetd: " + ## Check status with checkproc(8), if process is running + ## checkproc will return with exit status 0. + + # Status has a slightly different for the status command: + # 0 - service running + # 1 - service dead, but /var/run/ pid file exists + # 2 - service dead, but /var/lock/ lock file exists + # 3 - service not running + + # NOTE: checkproc returns LSB compliant status values. + checkproc $puppetd + rc_status -v + ;; + once) + shift + $puppetd -o ${PUPPET_OPTS} ${PUPPET_EXTRA_OPTS} $@ + ;; + *) + echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload|once}" + exit 1 +esac +rc_exit
