[packages/puppet] use 755 for rundir perms (patch from ext/redhat/rundir-perms.patch)

glen glen at pld-linux.org
Wed May 1 14:11:19 CEST 2013


commit 806f39e5e68158f12a65b4398ab5f90748c354f1
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Wed May 1 15:10:33 2013 +0300

    use 755 for rundir perms (patch from ext/redhat/rundir-perms.patch)

 puppet.spec        | 11 ++++++++---
 rundir-perms.patch | 28 ++++++++++++++++++++++++++++
 2 files changed, 36 insertions(+), 3 deletions(-)
---
diff --git a/puppet.spec b/puppet.spec
index c77c36a..c27f4a8 100644
--- a/puppet.spec
+++ b/puppet.spec
@@ -1,17 +1,16 @@
 # TODO
 # for man - rst2man.py needed (docutils snap?)
-# - puppet user/group
-# - initscripts
 Summary:	A network tool for managing many disparate systems
 Name:		puppet
 Version:	3.1.1
-Release:	0.7
+Release:	0.8
 License:	Apache v2.0
 Group:		Networking/Admin
 Source0:	http://puppetlabs.com/downloads/puppet/%{name}-%{version}.tar.gz
 # Source0-md5:	e942079612703a460a9fdb52e6bcae4a
 Patch0:		install-p.patch
 Patch1:		ruby19.patch
+Patch2:		rundir-perms.patch
 URL:		http://www.puppetlabs.com/
 BuildRequires:	docutils
 BuildRequires:	rpm-rubyprov
@@ -67,6 +66,7 @@ Vim syntax for puppet .pp files
 %setup -q
 #%patch0 -p1
 #%patch1 -p1
+%patch2 -p1
 
 %install
 rm -rf $RPM_BUILD_ROOT
@@ -163,6 +163,11 @@ fi
 %attr(754,root,root) /etc/rc.d/init.d/puppet
 %{systemdtmpfilesdir}/puppet.conf
 
+# These need to be owned by puppet so the server can write to them.
+%dir %attr(755,puppet,puppet) %{_localstatedir}/run/%{name}
+%dir %attr(755,puppet,puppet) %{_localstatedir}/log/%{name}
+%dir %{_localstatedir}/lib/%{name}
+
 %files server
 %defattr(644,root,root,755)
 %dir %{_sysconfdir}/%{name}/manifests
diff --git a/rundir-perms.patch b/rundir-perms.patch
new file mode 100644
index 0000000..25d1fcf
--- /dev/null
+++ b/rundir-perms.patch
@@ -0,0 +1,28 @@
+From c181799a30427966cbe028fde7b390cac9cf44e9 Mon Sep 17 00:00:00 2001
+From: Matthaus Litteken <matthaus at puppetlabs.com>
+Date: Fri, 4 May 2012 10:59:26 -0700
+Subject: [PATCH] Tighten rundir perms (rhbz #495096)
+
+The loose default permissions are not required for Red Hat systems
+installed via rpm packages because the packages create the required
+service user/group.
+---
+ lib/puppet/defaults.rb |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/lib/puppet/defaults.rb b/lib/puppet/defaults.rb
+index dc498e7..eef36d2 100644
+--- a/lib/puppet/defaults.rb
++++ b/lib/puppet/defaults.rb
+@@ -84,7 +84,7 @@ module Puppet
+     :rundir => {
+       :default  => nil,
+       :type     => :directory,
+-      :mode     => 01777,
++      :mode     => 0755,
+       :desc     => "Where Puppet PID files are kept."
+     },
+     :genconfig => {
+-- 
+1.7.7.6
+
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/puppet.git/commitdiff/806f39e5e68158f12a65b4398ab5f90748c354f1



More information about the pld-cvs-commit mailing list