[Pkg-puppet-devel] Fwd: [Puppet-dev] [PATCH/puppet 1/1] Fixes #3460 - Makes Puppet FHS compliant by moving /var/puppet to /var/lib/puppet

Nigel Kersten nigel at explanatorygap.net
Wed Mar 31 15:27:53 UTC 2010


huzzah!


---------- Forwarded message ----------
From: James Turnbull <james at lovedthanlost.net>
Date: Tue, Mar 30, 2010 at 6:40 PM
Subject: [Puppet-dev] [PATCH/puppet 1/1] Fixes #3460 - Makes Puppet
FHS compliant by moving /var/puppet to /var/lib/puppet
To: puppet-dev at googlegroups.com



Signed-off-by: James Turnbull <james at lovedthanlost.net>
---
 conf/gentoo/puppet/puppet.conf        |    1 -
 conf/redhat/puppet.conf               |    1 -
 conf/solaris/smf/svc-puppetd          |    2 +-
 conf/solaris/smf/svc-puppetmasterd    |    2 +-
 conf/suse/puppet.spec                 |    2 +-
 examples/etc/puppet/fileserver.conf   |   10 +++++-----
 ext/nagios/check_puppet.rb            |    2 +-
 ext/regexp_nodes/regexp_nodes.rb      |    6 +++---
 lib/puppet/defaults.rb                |    2 +-
 lib/puppet/reference/configuration.rb |    2 +-
 10 files changed, 14 insertions(+), 16 deletions(-)

diff --git a/conf/gentoo/puppet/puppet.conf b/conf/gentoo/puppet/puppet.conf
index 70dcb02..1473540 100644
--- a/conf/gentoo/puppet/puppet.conf
+++ b/conf/gentoo/puppet/puppet.conf
@@ -1,6 +1,5 @@
 [main]
    # Where Puppet stores dynamic and growing data.
-    # The default value is '/var/puppet'.
    vardir = /var/lib/puppet

    # The Puppet log directory.
diff --git a/conf/redhat/puppet.conf b/conf/redhat/puppet.conf
index 70dcb02..1473540 100644
--- a/conf/redhat/puppet.conf
+++ b/conf/redhat/puppet.conf
@@ -1,6 +1,5 @@
 [main]
    # Where Puppet stores dynamic and growing data.
-    # The default value is '/var/puppet'.
    vardir = /var/lib/puppet

    # The Puppet log directory.
diff --git a/conf/solaris/smf/svc-puppetd b/conf/solaris/smf/svc-puppetd
index 251b044..9036b50 100755
--- a/conf/solaris/smf/svc-puppetd
+++ b/conf/solaris/smf/svc-puppetd
@@ -12,7 +12,7 @@ exec_prefix=/opt/csw
 sysconfdir=/opt/csw/etc
 sbindir=/opt/csw/sbin

-pidfile=/var/puppet/run/puppetd.pid
+pidfile=/var/lib/puppet/run/puppetd.pid

 case "$1" in
 start)
diff --git a/conf/solaris/smf/svc-puppetmasterd
b/conf/solaris/smf/svc-puppetmasterd
index 684344b..34f5a62 100755
--- a/conf/solaris/smf/svc-puppetmasterd
+++ b/conf/solaris/smf/svc-puppetmasterd
@@ -8,7 +8,7 @@ exec_prefix=/opt/csw
 sysconfdir=/opt/csw/etc
 sbindir=/opt/csw/sbin

-pidfile=/var/puppet/run/puppetmasterd.pid
+pidfile=/var/lib/puppet/run/puppetmasterd.pid

 case "$1" in
 start)
diff --git a/conf/suse/puppet.spec b/conf/suse/puppet.spec
index 9d317f8..1d08f3d 100644
--- a/conf/suse/puppet.spec
+++ b/conf/suse/puppet.spec
@@ -99,7 +99,7 @@ find %{buildroot}%{ruby_sitelibdir} -type f -perm
+ugo+x -print0 | xargs -0 -r %
 %pre
 /usr/sbin/groupadd -r puppet 2>/dev/null || :
 /usr/sbin/useradd -g puppet -c "Puppet" \
-    -s /sbin/nologin -r -d /var/puppet puppet 2> /dev/null || :
+    -s /sbin/nologin -r -d /var/lib/puppet puppet 2> /dev/null || :

 %post
 /sbin/chkconfig --add puppet
diff --git a/examples/etc/puppet/fileserver.conf
b/examples/etc/puppet/fileserver.conf
index 32dfcdd..163ce12 100644
--- a/examples/etc/puppet/fileserver.conf
+++ b/examples/etc/puppet/fileserver.conf
@@ -2,12 +2,12 @@

 [dist]
    path /dist
-    allow *.madstop.com
+    allow *.puppetlabs.com

 [plugins]
-    path /var/puppet/plugins
-    allow *.madstop.com
+    path /var/lib/puppet/plugins
+    allow *.puppetlabs.com

 [facts]
-    path /var/puppet/facts
-    allow *.madstop.com
+    path /var/lib/puppet/facts
+    allow *.puppetlabs.com
diff --git a/ext/nagios/check_puppet.rb b/ext/nagios/check_puppet.rb
index 00d9ac9..c569566 100755
--- a/ext/nagios/check_puppet.rb
+++ b/ext/nagios/check_puppet.rb
@@ -11,7 +11,7 @@ class CheckPuppet

    # default options
    OPTIONS = {
-        :statefile => "/var/puppet/state/state.yaml",
+        :statefile => "/var/lib/puppet/state/state.yaml",
        :process   => "puppetd",
        :interval  => 30,
    }
diff --git a/ext/regexp_nodes/regexp_nodes.rb b/ext/regexp_nodes/regexp_nodes.rb
index 1f4fdbc..a9e7ed6 100644
--- a/ext/regexp_nodes/regexp_nodes.rb
+++ b/ext/regexp_nodes/regexp_nodes.rb
@@ -43,14 +43,14 @@ require 'set'
 # set up some nice logging
 require 'logger'
 # XXX flip this for production vs local sandbox
-# $LOG = Logger.new("/var/puppet/log/extnodes.log")
+# $LOG = Logger.new("/var/lib/puppet/log/extnodes.log")
 # $LOG.level = Logger::FATAL
 $LOG = Logger.new($stderr)
 $LOG.level = Logger::DEBUG

 # paths for files we use will be relative to this directory
 # XXX flip this for production vs local sandbox
-# WORKINGDIR = "/var/puppet/bin"
+# WORKINGDIR = "/var/lib/puppet/bin"
 WORKINGDIR = Dir.pwd

 # This class holds all the methods for creating and accessing the properties
@@ -154,7 +154,7 @@ class ExternalNode
    # directories to get the parameter name, then use the names of the files
    # contained in there for the values of those parameters.
    #
-    # ex: cat /var/puppet/bin/parameters/environment/production
+    # ex: cat /var/lib/puppet/bin/parameters/environment/production
    # ^prodweb
    # would set parameters["environment"] = "production" for prodweb001
    def match_parameters(fullpath)
diff --git a/lib/puppet/defaults.rb b/lib/puppet/defaults.rb
index 5901d19..e78b20f 100644
--- a/lib/puppet/defaults.rb
+++ b/lib/puppet/defaults.rb
@@ -16,7 +16,7 @@ module Puppet
    else
        # Else, use system-wide directories.
        conf = "/etc/puppet"
-        var = "/var/puppet"
+        var = "/var/lib/puppet"
    end

    self.setdefaults(:main,
diff --git a/lib/puppet/reference/configuration.rb
b/lib/puppet/reference/configuration.rb
index 60cbb86..477b9a7 100644
--- a/lib/puppet/reference/configuration.rb
+++ b/lib/puppet/reference/configuration.rb
@@ -25,7 +25,7 @@ config =
Puppet::Util::Reference.newreference(:configuration, :depth => 1, :doc
        str += ""
        val = object.default
        if name.to_s == "vardir"
-            val = "/var/puppet"
+            val = "/var/lib/puppet"
        elsif name.to_s == "confdir"
            val = "/etc/puppet"
        end
--
1.6.6.1

--
You received this message because you are subscribed to the Google
Groups "Puppet Developers" group.
To post to this group, send email to puppet-dev at googlegroups.com.
To unsubscribe from this group, send email to
puppet-dev+unsubscribe at googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/puppet-dev?hl=en.



More information about the Pkg-puppet-devel mailing list