[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, master, updated. debian/2.6.0-2-104-g203dd6f

Mathias Gug mathias.gug at canonical.com
Thu Aug 19 21:59:41 UTC 2010


The following commit has been merged in the master branch:
commit b60fc18d440ad92ba9161344c6bd9ba68b9b67e9
Author: Mathias Gug <mathias.gug at canonical.com>
Date:   Wed Aug 18 18:39:03 2010 -0400

    Etckeeper integration (Closes: #571127)
    
    etckeeper integration (Closes: #571127)
    [server-lucid-puppet-etckeeper-integration]:
      + debian/etckeeper-commit-post, debian/etckeeper-commit-pre:
         Call "etckeeper commit" before and after catalog runs.
         Silently bail out if etckeeper is not available.
      + debian/puppet.conf: Call out to the etckeeper hooks using
         the prerun_command and postrun_command hooks.
      + debian/rules: Install the etckeeper hook scripts in /etc/puppet.
      + debian/README.Debian: add note about etckeeper integration.
      + debian/control: the puppet package suggests etckeeper.

diff --git a/debian/README.Debian b/debian/README.Debian
new file mode 100644
index 0000000..8710d22
--- /dev/null
+++ b/debian/README.Debian
@@ -0,0 +1,8 @@
+puppet for Debian
+------------------
+
+The default puppet configuration in Debian will automatically integrate with
+etckeeper if etckeeper is installed. puppet will automatically commit any
+changes made to files in /etc via etckeeper before and after its run.
+
+ -- Mathias Gug <mathiaz at ubuntu.com>  Wed, 18 Aug 2010 15:06:06 -0400
diff --git a/debian/changelog b/debian/changelog
index b2d9918..331ed42 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -9,6 +9,16 @@ puppet (2.6.1~rc2-1) UNRELEASED; urgency=low
       system library.
   * Fix init service provider to correctly check the status of services
     using upstart jobs (LP: #551544).
+  * etckeeper integration (Closes: #571127)
+    [server-lucid-puppet-etckeeper-integration]:
+    + debian/etckeeper-commit-post, debian/etckeeper-commit-pre:
+       Call "etckeeper commit" before and after catalog runs.
+       Silently bail out if etckeeper is not available.
+    + debian/puppet.conf: Call out to the etckeeper hooks using 
+       the prerun_command and postrun_command hooks.
+    + debian/rules: Install the etckeeper hook scripts in /etc/puppet.
+    + debian/README.Debian: add note about etckeeper integration.
+    + debian/control: the puppet package suggests etckeeper.
 
  -- Mathias Gug <mathiaz at ubuntu.com>  Wed, 18 Aug 2010 15:06:06 -0400
 
diff --git a/debian/control b/debian/control
index dddb7e4..3211672 100644
--- a/debian/control
+++ b/debian/control
@@ -14,7 +14,7 @@ Package: puppet
 Architecture: all
 Depends: ${misc:Depends}, ruby1.8, libxmlrpc-ruby, libopenssl-ruby, libshadow-ruby1.8, adduser, facter, lsb-base, puppet-common (= ${binary:Version})
 Recommends: rdoc, libaugeas-ruby1.8
-Suggests: puppet-el, vim-puppet, libselinux-ruby1.8
+Suggests: puppet-el, vim-puppet, libselinux-ruby1.8, etckeeper
 Description: Centralized configuration management - agent startup and compatibility scripts
  This package contains the startup script and compatbility scripts for the
  puppet agent, which is the process responsible for configuring the local node.
diff --git a/debian/puppet.conf b/debian/puppet.conf
index 681969c..1d040a9 100644
--- a/debian/puppet.conf
+++ b/debian/puppet.conf
@@ -5,3 +5,5 @@ ssldir=/var/lib/puppet/ssl
 rundir=/var/run/puppet
 factpath=$vardir/lib/facter
 templatedir=$confdir/templates
+prerun_command=/etc/puppet/etckeeper-commit-pre
+postrun_command=/etc/puppet/etckeeper-commit-post
diff --git a/debian/rules b/debian/rules
index 0c4688e..e1fa328 100755
--- a/debian/rules
+++ b/debian/rules
@@ -67,6 +67,12 @@ install: build
 	$(INSTALL) -m0644 ext/emacs/puppet-mode.el			\
 		$(CURDIR)/debian/puppet-el/usr/share/emacs/site-lisp/puppet-mode.el
 
+        # etckeeper integration
+	$(INSTALL) -m0755 debian/etckeeper-commit-pre   \
+		$(CURDIR)/debian/puppet/etc/puppet/etckeeper-commit-pre
+	$(INSTALL) -m0755 debian/etckeeper-commit-post  \
+		$(CURDIR)/debian/puppet/etc/puppet/etckeeper-commit-post
+
 	# Install the rack README as README.rack
 	$(INSTALL) -m0644 ext/rack/README \
 		$(CURDIR)/debian/puppetmaster/usr/share/doc/puppetmaster/README.rack
diff --git a/etckeeper-commit-post b/etckeeper-commit-post
new file mode 100644
index 0000000..489b2bd
--- /dev/null
+++ b/etckeeper-commit-post
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
+
+which etckeeper > /dev/null 2>&1 || exit 0
+
+etckeeper commit "committing changes in /etc after puppet catalog run"
+
+# Failure of etckeeper should not be fatal.
+exit 0
diff --git a/etckeeper-commit-pre b/etckeeper-commit-pre
new file mode 100644
index 0000000..a66fb62
--- /dev/null
+++ b/etckeeper-commit-pre
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
+
+which etckeeper > /dev/null 2>&1 || exit 0
+
+etckeeper commit "saving uncommitted changes in /etc prior to puppet catalog run"
+
+# Failure of etckeeper should not be fatal.
+exit 0

-- 
Puppet packaging for Debian



More information about the Pkg-puppet-devel mailing list