pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/sysutils/puppet Update sysutils/puppet to 0.24.9.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/8a2e1174046b
branches:  trunk
changeset: 570887:8a2e1174046b
user:      taca <taca%pkgsrc.org@localhost>
date:      Thu Feb 04 16:22:02 2010 +0000

description:
Update sysutils/puppet to 0.24.9.

* Add LICENSE.
* Add patches for CVE-2009-3564 from puppet's repositry.
* puppet user/group handling which commented out now.
* Some other pkgsrc tweak.

0.24.9
    Fix for temporary file issues
    (https://bugzilla.redhat.com/show_bug.cgi?id=502881)

diffstat:

 sysutils/puppet/Makefile         |  35 +++++++++++++++++++++++++-----
 sysutils/puppet/PLIST            |  22 +++++++++---------
 sysutils/puppet/distinfo         |  10 +++++---
 sysutils/puppet/patches/patch-ae |  20 +++++++++++++++++
 sysutils/puppet/patches/patch-af |  46 ++++++++++++++++++++++++++++++++++++++++
 5 files changed, 112 insertions(+), 21 deletions(-)

diffs (204 lines):

diff -r 55bbf97714e5 -r 8a2e1174046b sysutils/puppet/Makefile
--- a/sysutils/puppet/Makefile  Thu Feb 04 16:15:14 2010 +0000
+++ b/sysutils/puppet/Makefile  Thu Feb 04 16:22:02 2010 +0000
@@ -1,17 +1,16 @@
-# $NetBSD: Makefile,v 1.8 2010/01/27 19:51:55 joerg Exp $
+# $NetBSD: Makefile,v 1.9 2010/02/04 16:22:02 taca Exp $
 
-DISTNAME=              puppet-0.24.8
+DISTNAME=              puppet-0.24.9
 CATEGORIES=            sysutils
+MASTER_SITES=          http://reductivelabs.com/downloads/gems/
 
 MAINTAINER=            tonnerre%NetBSD.org@localhost
 HOMEPAGE=              http://www.reductivelabs.com/projects/puppet/
-MASTER_SITES=          http://reductivelabs.com/downloads/gems/
 COMMENT=               Configuration management framework written in Ruby
+LICENSE=               gnu-gpl-v2
 
 PKG_DESTDIR_SUPPORT=   user-destdir
 
-.include "../../mk/bsd.prefs.mk"
-
 DEPENDS+=              ${RUBY_PKGPREFIX}-facter>=1.3.8:../../sysutils/ruby-facter
 
 GEM_BUILD=             gemspec
@@ -25,7 +24,7 @@
 SUBST_FILES.prefix+=   lib/puppet/defaults.rb spec/unit/util/selinux.rb
 SUBST_FILES.prefix+=   bin/puppetrun bin/puppet bin/puppetdoc
 SUBST_FILES.prefix+=   ext/puppetstoredconfigclean.rb ext/puppetlast
-SUBST_FILES.prefix+=   examples/puppetmasterd.conf man/man8/puppet.8
+SUBST_FILES.prefix+=   man/man8/puppet.8
 SUBST_FILES.prefix+=   conf/solaris/smf/puppetd.xml
 SUBST_FILES.prefix+=   conf/solaris/smf/puppetmasterd.xml
 SUBST_FILES.prefix+=   man/man8/puppetrun.8 man/man8/puppet.conf.8
@@ -35,10 +34,31 @@
 EGDIR=                 ${PREFIX}/share/examples/${PKGBASE}
 CONF_FILES=            ${EGDIR}/puppet.conf ${PKG_SYSCONFDIR}/puppet.conf
 
+## Since these users are needed only for puppet server,
+## puppet-server package should be created.
+#SUBST_CLASSES+=               user
+#SUBST_STAGE.user=     post-patch
+#SUBST_FILES.user=     lib/puppet/defaults.rb
+#SUBST_SED.user=               -e "s|@PUPPET_GROUP@|${PUPPET_GROUP}|g"
+#SUBST_SED.user+=      -e "s|@PUPPET_USER@|${PUPPET_USER}|g"
+#
+#PKG_GROUPS_VARS=              PUPPET_GROUP
+#PKG_USERS_VARS=                       PUPPET_USER
+#
+#PKG_GROUPS=                   ${PUPPET_GROUP}
+#PKG_USERS=                    ${PUPPET_USER}:${PUPPET_GROUP}
+#PKG_GECOS.${PUPPET_USER}=       Puppet configuration management pseudo-user
+
 PLIST_VARS+=           sunos
 
+BUILD_DEFS+=           VARBASE
 INSTALLATION_DIRS+=    ${EGDIR}
 
+.include "../../mk/bsd.prefs.mk"
+
+#PUPPET_GROUP?=                puppet
+#PUPPET_USER?=         puppet
+
 .if ${OPSYS} == "SunOS"
 INSTALLATION_DIRS+=    lib/svc/method ${EGDIR}/svc
 CONF_DIRS+=            ${VARBASE}/svc/manifest
@@ -48,6 +68,9 @@
 .endif
 
 pre-build:
+       cd ${WRKSRC} && ${FIND} . -type f -exec ${CHMOD} g-w {} \;
+       cd ${WRKSRC} && \
+               ${FIND} lib/puppet spec test -type f -exec ${CHMOD} -x {} \;
        cd ${WRKSRC} && ${RUBY} -Ilib bin/puppetmasterd                 \
                --confdir=${PKG_SYSCONFDIR:Q} --rundir=${VARBASE:Q}/run \
                --genconfig |                                           \
diff -r 55bbf97714e5 -r 8a2e1174046b sysutils/puppet/PLIST
--- a/sysutils/puppet/PLIST     Thu Feb 04 16:15:14 2010 +0000
+++ b/sysutils/puppet/PLIST     Thu Feb 04 16:22:02 2010 +0000
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.8 2009/11/28 23:39:18 dholland Exp $
+@comment $NetBSD: PLIST,v 1.9 2010/02/04 16:22:02 taca Exp $
 bin/puppet
 bin/puppetca
 bin/puppetd
@@ -531,16 +531,16 @@
 ${GEM_LIBDIR}/lib/puppet/util/uri_helper.rb
 ${GEM_LIBDIR}/lib/puppet/util/user_attr.rb
 ${GEM_LIBDIR}/lib/puppet/util/warnings.rb
-${GEM_LIBDIR}/man/man8/filebucket.8.gz
-${GEM_LIBDIR}/man/man8/pi.8.gz
-${GEM_LIBDIR}/man/man8/puppet.8.gz
-${GEM_LIBDIR}/man/man8/puppet.conf.8.gz
-${GEM_LIBDIR}/man/man8/puppetca.8.gz
-${GEM_LIBDIR}/man/man8/puppetd.8.gz
-${GEM_LIBDIR}/man/man8/puppetdoc.8.gz
-${GEM_LIBDIR}/man/man8/puppetmasterd.8.gz
-${GEM_LIBDIR}/man/man8/puppetrun.8.gz
-${GEM_LIBDIR}/man/man8/ralsh.8.gz
+${GEM_LIBDIR}/man/man8/filebucket.8
+${GEM_LIBDIR}/man/man8/pi.8
+${GEM_LIBDIR}/man/man8/puppet.8
+${GEM_LIBDIR}/man/man8/puppet.conf.8
+${GEM_LIBDIR}/man/man8/puppetca.8
+${GEM_LIBDIR}/man/man8/puppetd.8
+${GEM_LIBDIR}/man/man8/puppetdoc.8
+${GEM_LIBDIR}/man/man8/puppetmasterd.8
+${GEM_LIBDIR}/man/man8/puppetrun.8
+${GEM_LIBDIR}/man/man8/ralsh.8
 ${GEM_LIBDIR}/spec/Rakefile
 ${GEM_LIBDIR}/spec/integration/checksum.rb
 ${GEM_LIBDIR}/spec/integration/defaults.rb
diff -r 55bbf97714e5 -r 8a2e1174046b sysutils/puppet/distinfo
--- a/sysutils/puppet/distinfo  Thu Feb 04 16:15:14 2010 +0000
+++ b/sysutils/puppet/distinfo  Thu Feb 04 16:22:02 2010 +0000
@@ -1,8 +1,10 @@
-$NetBSD: distinfo,v 1.5 2009/11/11 12:21:52 tonnerre Exp $
+$NetBSD: distinfo,v 1.6 2010/02/04 16:22:02 taca Exp $
 
-SHA1 (puppet-0.24.8.gem) = c7a01a2f5a339769c1c4d3aa375ce3cd917e4fca
-RMD160 (puppet-0.24.8.gem) = 98175142fb973a58fd174ec747a56aa248383a1b
-Size (puppet-0.24.8.gem) = 1100800 bytes
+SHA1 (puppet-0.24.9.gem) = 6acbfe7ee3dc7ac6c8716ea481633abfc3001a3a
+RMD160 (puppet-0.24.9.gem) = a80835bac5ab862038bfa2f6a367ff31c70e547a
+Size (puppet-0.24.9.gem) = 1101312 bytes
 SHA1 (patch-aa) = 3ecd66f1b16c906672d505b01c9f916334613e39
 SHA1 (patch-ab) = b08aa80de75d0c7d2321dee34accebe05ad70684
 SHA1 (patch-ac) = 150ef40f2097fecf8bd9b0096d84432246ba3701
+SHA1 (patch-ae) = 001fcf7deab2e42694f5541fce6c1fca3194c267
+SHA1 (patch-af) = 4c1916ec3626c5ac38bf7ab4f1f49cdd4cda40cd
diff -r 55bbf97714e5 -r 8a2e1174046b sysutils/puppet/patches/patch-ae
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/puppet/patches/patch-ae  Thu Feb 04 16:22:02 2010 +0000
@@ -0,0 +1,20 @@
+$NetBSD: patch-ae,v 1.1 2010/02/04 16:22:02 taca Exp $
+
+Fix for CVE-2009-3564.
+
+--- lib/puppet/util.rb.orig    2010-02-03 01:16:24.000000000 +0000
++++ lib/puppet/util.rb
+@@ -58,10 +58,11 @@ module Util
+             end
+             unless Puppet::Util::SUIDManager.uid == user
+                 begin
++                    Puppet::Util::SUIDManager.initgroups(user)
+                     Puppet::Util::SUIDManager.uid = user 
+                     Puppet::Util::SUIDManager.euid = user 
+-                rescue
+-                    $stderr.puts "could not change to user %s" % user
++                rescue => detail
++                    $stderr.puts "Could not change to user %s: %s" % [user, detail]
+                     exit(74)
+                 end
+             end
diff -r 55bbf97714e5 -r 8a2e1174046b sysutils/puppet/patches/patch-af
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/puppet/patches/patch-af  Thu Feb 04 16:22:02 2010 +0000
@@ -0,0 +1,46 @@
+$NetBSD: patch-af,v 1.1 2010/02/04 16:22:02 taca Exp $
+
+Fix for CVE-2009-3564.
+
+--- lib/puppet/util/suidmanager.rb.orig        2010-02-03 01:16:24.000000000 +0000
++++ lib/puppet/util/suidmanager.rb
+@@ -7,7 +7,7 @@ module Puppet::Util::SUIDManager
+     extend Forwardable
+ 
+     to_delegate_to_process = [ :euid=, :euid, :egid=, :egid,
+-                               :uid=, :uid, :gid=, :gid ]
++                               :uid=, :uid, :gid=, :gid, :groups=, :groups ]
+ 
+     to_delegate_to_process.each do |method|
+         def_delegator Process, method
+@@ -26,13 +26,16 @@ module Puppet::Util::SUIDManager
+         # We set both because some programs like to drop privs, i.e. bash.
+         old_uid, old_gid = self.uid, self.gid
+         old_euid, old_egid = self.euid, self.egid
++        old_groups = self.groups
+         begin
+             self.egid = convert_xid :gid, new_gid if new_gid
++            self.initgroups(convert_xid(:uid, new_uid)) if new_uid
+             self.euid = convert_xid :uid, new_uid if new_uid
+   
+             yield
+         ensure
+             self.euid, self.egid = old_euid, old_egid
++            self.groups = old_groups
+         end
+     end
+     module_function :asuser
+@@ -49,6 +52,13 @@ module Puppet::Util::SUIDManager
+     end
+     module_function :convert_xid
+ 
++    # Initialize supplementary groups
++    def initgroups(user)
++        require 'etc'
++        Process.initgroups(Etc.getpwuid(user).name, Process.gid)
++    end
++
++    module_function :initgroups
+ 
+     def run_and_capture(command, new_uid=nil, new_gid=nil)
+         output = Puppet::Util.execute(command, :failonfail => false, :uid => new_uid, :gid => new_gid)



Home | Main Index | Thread Index | Old Index