From 809150fc9eb9ef990b1b397060db134f0923e774 Mon Sep 17 00:00:00 2001 From: Gunnar Wrobel Date: Wed, 9 Apr 2008 08:49:09 +0000 Subject: Added my own variant of app-admin/puppet with a LDAP specific patch. svn path=/stable/; revision=826 --- app-admin/puppet/ChangeLog | 90 ++++++++++ app-admin/puppet/Manifest | 11 ++ app-admin/puppet/files/50puppet-mode-gentoo.el | 8 + app-admin/puppet/files/puppet-0.23.2-gentoo.patch | 182 +++++++++++++++++++++ app-admin/puppet/files/puppet-0.24.1-gentoo.patch | 144 ++++++++++++++++ app-admin/puppet/files/puppet-0.24.1-service.patch | 14 ++ app-admin/puppet/files/puppet-0.24.2-gentoo.patch | 12 ++ .../puppet/files/puppet-0.24.4-stack_ldap.patch | 53 ++++++ app-admin/puppet/files/puppetmaster.init | 50 ++++++ app-admin/puppet/metadata.xml | 8 + app-admin/puppet/puppet-0.24.4-r1.ebuild | 118 +++++++++++++ 11 files changed, 690 insertions(+) create mode 100644 app-admin/puppet/ChangeLog create mode 100644 app-admin/puppet/Manifest create mode 100644 app-admin/puppet/files/50puppet-mode-gentoo.el create mode 100644 app-admin/puppet/files/puppet-0.23.2-gentoo.patch create mode 100644 app-admin/puppet/files/puppet-0.24.1-gentoo.patch create mode 100644 app-admin/puppet/files/puppet-0.24.1-service.patch create mode 100644 app-admin/puppet/files/puppet-0.24.2-gentoo.patch create mode 100644 app-admin/puppet/files/puppet-0.24.4-stack_ldap.patch create mode 100755 app-admin/puppet/files/puppetmaster.init create mode 100644 app-admin/puppet/metadata.xml create mode 100644 app-admin/puppet/puppet-0.24.4-r1.ebuild diff --git a/app-admin/puppet/ChangeLog b/app-admin/puppet/ChangeLog new file mode 100644 index 0000000..849d542 --- /dev/null +++ b/app-admin/puppet/ChangeLog @@ -0,0 +1,90 @@ +# ChangeLog for app-admin/puppet +# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/app-admin/puppet/ChangeLog,v 1.13 2008/04/03 16:30:02 matsuu Exp $ + +*puppet-0.24.4 (03 Apr 2008) + + 03 Apr 2008; MATSUU Takuto +puppet-0.24.4.ebuild: + Version bumped, bug #215425. + +*puppet-0.24.3 (20 Mar 2008) + + 20 Mar 2008; MATSUU Takuto -puppet-0.24.1.ebuild, + -puppet-0.24.2.ebuild, +puppet-0.24.3.ebuild: + Version bumped, bug #214085. + Removed old versions. + +*puppet-0.24.2 (05 Mar 2008) + + 05 Mar 2008; MATSUU Takuto + +files/puppet-0.24.2-gentoo.patch, +files/puppetmaster.init, + +puppet-0.24.2.ebuild: + Version bumped, bug #212262. + Fixed /etc/init.d/puppetmaster, bug #211910. + +*puppet-0.24.1-r1 (07 Feb 2008) + + 07 Feb 2008; MATSUU Takuto + +files/puppet-0.24.1-service.patch, +puppet-0.24.1-r1.ebuild: + Added vim-syntax USE flag, bug #208399. + Fixed ensure running services issue, bug #209218. + +*puppet-0.24.1 (07 Jan 2008) + + 07 Jan 2008; MATSUU Takuto + +files/puppet-0.24.1-gentoo.patch, -puppet-0.22.4-r1.ebuild, + -puppet-0.23.0-r1.ebuild, -puppet-0.23.2.ebuild, +puppet-0.24.1.ebuild: + Version bumped. + Removed old versions. + +*puppet-0.23.2-r1 (08 Dec 2007) + + 08 Dec 2007; MATSUU Takuto + +files/50puppet-mode-gentoo.el, +files/puppet-0.23.2-gentoo.patch, + metadata.xml, -puppet-0.22.4.ebuild, -puppet-0.23.0.ebuild, + +puppet-0.23.2-r1.ebuild: + Fixed some bugs and cleanup, bug #190840 + maintainership takeover. + Removed old versions. + +*puppet-0.23.2 (07 Aug 2007) + + 07 Aug 2007; masatomo +puppet-0.23.2.ebuild: + Version bump. + +*puppet-0.23.0-r1 (06 Aug 2007) +*puppet-0.22.4-r1 (06 Aug 2007) + + 06 Aug 2007; Masatomo Nakano +puppet-0.22.4-r1.ebuild, + +puppet-0.23.0-r1.ebuild: + Fixed initial owner/permission problem reported in bug #187883. + +*puppet-0.23.0 (08 Jul 2007) + + 08 Jul 2007; masatomo -puppet-0.22.3.ebuild, + +puppet-0.23.0.ebuild: + Version bump + +*puppet-0.22.4 (02 May 2007) + + 02 May 2007; Masatomo Nakano -puppet-0.22.1.ebuild, + -puppet-0.22.2.ebuild, +puppet-0.22.4.ebuild: + Version bump. + +*puppet-0.22.3 (28 Mar 2007) + + 28 Mar 2007; Masatomo Nakano +puppet-0.22.3.ebuild: + Version bump. + +*puppet-0.22.2 (20 Mar 2007) + + 20 Mar 2007; Masatomo Nakano +puppet-0.22.2.ebuild: + Version bump. + +*puppet-0.22.1 (17 Mar 2007) + + 17 Mar 2007; Masatomo Nakano +metadata.xml, + +puppet-0.22.1.ebuild: + Initial import. Ebuild submitted by Jose Gonzalez Gomez + . #146712 + diff --git a/app-admin/puppet/Manifest b/app-admin/puppet/Manifest new file mode 100644 index 0000000..ee887a9 --- /dev/null +++ b/app-admin/puppet/Manifest @@ -0,0 +1,11 @@ +AUX 50puppet-mode-gentoo.el 257 RMD160 c8ee412f60fed83c44091bb56d18e200bb0c7e03 SHA1 208a9a008dec0de89839c71e4d3a86c08be6931d SHA256 1dbae981327dd736b9e0b0a63be0bc6bf662eeb51506da60394f9c9a9b314fde +AUX puppet-0.23.2-gentoo.patch 7957 RMD160 cecf241522ad4400a942762e327496f0f8834a7f SHA1 352fbaeeccd479592a7447bf5bd106154de3c01a SHA256 4449467bd7b145bc42a019609c36afdfc8b1f6f35c60f59191d01475be165575 +AUX puppet-0.24.1-gentoo.patch 5898 RMD160 ad378ccb4e99f488b1a0b0a2e5f240b85fe577f3 SHA1 32abbc5b3fa07ba10a217623f12f13b3531ecff5 SHA256 0dd2837574e9007c3cf8900f94d8f3a8550dab94d13209077c2fe9729c9d3c67 +AUX puppet-0.24.1-service.patch 528 RMD160 8b3dc4ef4db1d3880ba5cb225f4dde87156ce6d3 SHA1 e0ac3359b297ac6fb780e5280bc7249062564c80 SHA256 87255fd26a5f21f4121a76ba46c5f666d17c49145ef67fbbc1183b7d5af8152d +AUX puppet-0.24.2-gentoo.patch 628 RMD160 9149d2b68a82a87dc4bcdae3ef5608ca0f152973 SHA1 d7bd432ef27be9dc14dc4e37b8302659caa0f3f4 SHA256 abc592df144baec0c93cc90459ab273fe2aec9f195670ca5dba5d8bc4e6ee886 +AUX puppet-0.24.4-stack_ldap.patch 1857 RMD160 5d679ce8c40d8b8ca7f779b5c0aea9c263029da7 SHA1 5e272008821b28258d39bd0a3066d0b91cd2dfe1 SHA256 6c908a4e35b284529afb2e781707f1f11db4d5ceb27626cb3b5fbb5c29c26dc7 +AUX puppetmaster.init 1373 RMD160 b93140bf89a0bd179719c393087325db7fa3f822 SHA1 42627b01ae8e847f2b34b89c973a26220c722bd8 SHA256 f7ec6b2d66f5ac82ad867817f658e53b349d139876222c6f8c306ba2ae65fcaa +DIST puppet-0.24.4.tgz 652572 RMD160 e675d27216dfeb3717c8140d3c89625e6be351e9 SHA1 e79671d8765e08df93c6a4c76b198467c3e13a7a SHA256 0d54f6db7cf1210d123264bcb35b07b36837ebc12a4f2bd01aee6127836adfb9 +EBUILD puppet-0.24.4-r1.ebuild 3343 RMD160 f345099e3391a7d0bd08e39294223c122862e144 SHA1 7a8cd8cc9f4aca15a48e22f4e0893b449dd491a9 SHA256 c241384f84d29a0544e39eac58d4bc26068db7fdb26ca0ed8795411ec64c37a7 +MISC ChangeLog 2756 RMD160 9f99a06a6aa3a5d38adc3fa59278cad42c973189 SHA1 d30e389ba6540aaca2b8d830b37e4ebf5d972ab0 SHA256 e1182ec8de14d2198a061748e142f6f9a817f7dced04a9a044dffd286b3244ba +MISC metadata.xml 222 RMD160 23efe87c16ebc9fbeb91e894ab372cc3bb66bc49 SHA1 a5d1e2317ae207bbd664aebe986687948fdd984a SHA256 38ef3457fd14e6872985f0e100fde79d0b8a9dbc4fc39ceef780c8c5abc5f337 diff --git a/app-admin/puppet/files/50puppet-mode-gentoo.el b/app-admin/puppet/files/50puppet-mode-gentoo.el new file mode 100644 index 0000000..8f551bf --- /dev/null +++ b/app-admin/puppet/files/50puppet-mode-gentoo.el @@ -0,0 +1,8 @@ +;; +;; Setup puppet-mode for autoloading + +;;; puppet-mode site-lisp configuration + +(add-to-list 'load-path "@SITELISP@") +(autoload 'puppet-mode "puppet-mode" "Major mode for editing puppet manifests") +(add-to-list 'auto-mode-alist '("\\.pp$" . puppet-mode)) diff --git a/app-admin/puppet/files/puppet-0.23.2-gentoo.patch b/app-admin/puppet/files/puppet-0.23.2-gentoo.patch new file mode 100644 index 0000000..ec30064 --- /dev/null +++ b/app-admin/puppet/files/puppet-0.23.2-gentoo.patch @@ -0,0 +1,182 @@ +diff -Naur puppet-0.23.2.orig/conf/gentoo/puppet/puppet.conf puppet-0.23.2/conf/gentoo/puppet/puppet.conf +--- puppet-0.23.2.orig/conf/gentoo/puppet/puppet.conf 1970-01-01 09:00:00.000000000 +0900 ++++ puppet-0.23.2/conf/gentoo/puppet/puppet.conf 2007-12-07 18:41:41.000000000 +0900 +@@ -0,0 +1,29 @@ ++[main] ++ # Where Puppet stores dynamic and growing data. ++ # The default value is '/var/puppet'. ++ vardir = /var/lib/puppet ++ ++ # The Puppet log directory. ++ # The default value is '$vardir/log'. ++ logdir = /var/log/puppet ++ ++ # Where Puppet PID files are kept. ++ # The default value is '$vardir/run'. ++ rundir = /var/run/puppet ++ ++ # Where SSL certificates are kept. ++ # The default value is '$confdir/ssl'. ++ ssldir = $vardir/ssl ++ ++[puppetd] ++ # The file in which puppetd stores a list of the classes ++ # associated with the retrieved configuratiion. Can be loaded in ++ # the separate ``puppet`` executable using the ``--loadclasses`` ++ # option. ++ # The default value is '$confdir/classes.txt'. ++ classfile = $vardir/classes.txt ++ ++ # Where puppetd caches the local configuration. An ++ # extension indicating the cache format is added automatically. ++ # The default value is '$confdir/localconfig'. ++ localconfig = $vardir/localconfig +diff -Naur puppet-0.23.2.orig/conf/gentoo/puppet/puppetca.conf puppet-0.23.2/conf/gentoo/puppet/puppetca.conf +--- puppet-0.23.2.orig/conf/gentoo/puppet/puppetca.conf 2007-06-18 07:06:39.000000000 +0900 ++++ puppet-0.23.2/conf/gentoo/puppet/puppetca.conf 1970-01-01 09:00:00.000000000 +0900 +@@ -1,29 +0,0 @@ +-[puppet] +- # Where Puppet stores dynamic and growing data. +- # The default value is '/var/puppet'. +- vardir = /var/lib/puppet +- +- # The Puppet log directory. +- # The default value is '$vardir/log'. +- logdir = /var/log/puppet +- +- # Where Puppet PID files are kept. +- # The default value is '$vardir/run'. +- rundir = /var/run/puppet +- +- # Where SSL certificates are kept. +- # The default value is '$confdir/ssl'. +- ssldir = $vardir/ssl +- +-[puppetd] +- # The file in which puppetd stores a list of the classes +- # associated with the retrieved configuratiion. Can be loaded in +- # the separate ``puppet`` executable using the ``--loadclasses`` +- # option. +- # The default value is '$confdir/classes.txt'. +- classfile = $vardir/classes.txt +- +- # Where puppetd caches the local configuration. An +- # extension indicating the cache format is added automatically. +- # The default value is '$confdir/localconfig'. +- localconfig = $vardir/localconfig +diff -Naur puppet-0.23.2.orig/conf/gentoo/puppet/puppetd.conf puppet-0.23.2/conf/gentoo/puppet/puppetd.conf +--- puppet-0.23.2.orig/conf/gentoo/puppet/puppetd.conf 2007-06-18 07:06:39.000000000 +0900 ++++ puppet-0.23.2/conf/gentoo/puppet/puppetd.conf 1970-01-01 09:00:00.000000000 +0900 +@@ -1,29 +0,0 @@ +-[puppet] +- # Where Puppet stores dynamic and growing data. +- # The default value is '/var/puppet'. +- vardir = /var/lib/puppet +- +- # The Puppet log directory. +- # The default value is '$vardir/log'. +- logdir = /var/log/puppet +- +- # Where Puppet PID files are kept. +- # The default value is '$vardir/run'. +- rundir = /var/run/puppet +- +- # Where SSL certificates are kept. +- # The default value is '$confdir/ssl'. +- ssldir = $vardir/ssl +- +-[puppetd] +- # The file in which puppetd stores a list of the classes +- # associated with the retrieved configuratiion. Can be loaded in +- # the separate ``puppet`` executable using the ``--loadclasses`` +- # option. +- # The default value is '$confdir/classes.txt'. +- classfile = $vardir/classes.txt +- +- # Where puppetd caches the local configuration. An +- # extension indicating the cache format is added automatically. +- # The default value is '$confdir/localconfig'. +- localconfig = $vardir/localconfig +diff -Naur puppet-0.23.2.orig/conf/gentoo/puppet/puppetmasterd.conf puppet-0.23.2/conf/gentoo/puppet/puppetmasterd.conf +--- puppet-0.23.2.orig/conf/gentoo/puppet/puppetmasterd.conf 2007-06-18 07:06:39.000000000 +0900 ++++ puppet-0.23.2/conf/gentoo/puppet/puppetmasterd.conf 1970-01-01 09:00:00.000000000 +0900 +@@ -1,29 +0,0 @@ +-[puppet] +- # Where Puppet stores dynamic and growing data. +- # The default value is '/var/puppet'. +- vardir = /var/lib/puppet +- +- # The Puppet log directory. +- # The default value is '$vardir/log'. +- logdir = /var/log/puppet +- +- # Where Puppet PID files are kept. +- # The default value is '$vardir/run'. +- rundir = /var/run/puppet +- +- # Where SSL certificates are kept. +- # The default value is '$confdir/ssl'. +- ssldir = $vardir/ssl +- +-[puppetd] +- # The file in which puppetd stores a list of the classes +- # associated with the retrieved configuratiion. Can be loaded in +- # the separate ``puppet`` executable using the ``--loadclasses`` +- # option. +- # The default value is '$confdir/classes.txt'. +- classfile = $vardir/classes.txt +- +- # Where puppetd caches the local configuration. An +- # extension indicating the cache format is added automatically. +- # The default value is '$confdir/localconfig'. +- localconfig = $vardir/localconfig +diff -Naur puppet-0.23.2.orig/lib/puppet/provider/package/portage.rb puppet-0.23.2/lib/puppet/provider/package/portage.rb +--- puppet-0.23.2.orig/lib/puppet/provider/package/portage.rb 2007-06-20 08:07:35.000000000 +0900 ++++ puppet-0.23.2/lib/puppet/provider/package/portage.rb 2007-12-07 18:46:49.000000000 +0900 +@@ -10,8 +10,8 @@ + defaultfor :operatingsystem => :gentoo + + def self.instances +- result_format = /(\S+) (\S+) \[(.*)\] \[[^0-9]*([^\s:]*)(:\S*)?\] ([\S]*) (.*)/ +- result_fields = [:category, :name, :ensure, :version_available, :slot, :vendor, :description] ++ result_format = /(\S+) (\S+) \[([^\[]*)(\[[^\]]*\])?\] \[[^0-9]*([^\s:\[]*)(\[[^\]]*\])?(:\S*)?\] ([\S]*) (.*)/ ++ result_fields = [:category, :name, :ensure, :ensure_overlay, :version_available, :overlay, :slot, :vendor, :description] + + search_format = "{installedversionsshort} [] [] {}" + +@@ -55,7 +55,7 @@ + + # The common package name format. + def package_name +- "%s/%s" % [@resource[:category], @resource[:name]] ++ @resource[:category] ? "%s/%s" % [@resource[:category], @resource[:name]] : @resource[:name] + end + + def uninstall +@@ -67,11 +67,11 @@ + end + + def query +- result_format = /(\S+) (\S+) \[(.*)\] \[[^0-9]*([^\s:]*)(:\S*)?\] ([\S]*) (.*)/ +- result_fields = [:category, :name, :ensure, :version_available, :slot, :vendor, :description] ++ result_format = /(\S+) (\S+) \[([^\[]*)(\[[^\]]*\])?\] \[[^0-9]*([^\s:\[]*)(\[[^\]]*\])?(:\S*)?\] ([\S]*) (.*)/ ++ result_fields = [:category, :name, :ensure, :ensure_overlay, :version_available, :overlay, :slot, :vendor, :description] + + search_field = @resource[:category] ? "--category-name" : "--name" +- search_value = @resource[:category] ? package_name : @resource[:name] ++ search_value = package_name + search_format = " [] [] " + + begin +diff -Naur puppet-0.23.2.orig/lib/puppet/provider/service/gentoo.rb puppet-0.23.2/lib/puppet/provider/service/gentoo.rb +--- puppet-0.23.2.orig/lib/puppet/provider/service/gentoo.rb 2007-06-18 07:06:39.000000000 +0900 ++++ puppet-0.23.2/lib/puppet/provider/service/gentoo.rb 2007-12-07 18:41:41.000000000 +0900 +@@ -29,7 +29,7 @@ + return :false unless line + + # If it's enabled then it will print output showing service | runlevel +- if output =~ /#{@resource[:name]}\s*|\s*default/ ++ if output =~ /#{@resource[:name]}\s*\|\s*default/ + return :true + else + return :false diff --git a/app-admin/puppet/files/puppet-0.24.1-gentoo.patch b/app-admin/puppet/files/puppet-0.24.1-gentoo.patch new file mode 100644 index 0000000..fba9ca2 --- /dev/null +++ b/app-admin/puppet/files/puppet-0.24.1-gentoo.patch @@ -0,0 +1,144 @@ +diff -Naur puppet-0.24.1.orig/conf/gentoo/puppet/puppet.conf puppet-0.24.1/conf/gentoo/puppet/puppet.conf +--- puppet-0.24.1.orig/conf/gentoo/puppet/puppet.conf 1970-01-01 09:00:00.000000000 +0900 ++++ puppet-0.24.1/conf/gentoo/puppet/puppet.conf 2008-01-07 23:24:05.000000000 +0900 +@@ -0,0 +1,29 @@ ++[main] ++ # Where Puppet stores dynamic and growing data. ++ # The default value is '/var/puppet'. ++ vardir = /var/lib/puppet ++ ++ # The Puppet log directory. ++ # The default value is '$vardir/log'. ++ logdir = /var/log/puppet ++ ++ # Where Puppet PID files are kept. ++ # The default value is '$vardir/run'. ++ rundir = /var/run/puppet ++ ++ # Where SSL certificates are kept. ++ # The default value is '$confdir/ssl'. ++ ssldir = $vardir/ssl ++ ++[puppetd] ++ # The file in which puppetd stores a list of the classes ++ # associated with the retrieved configuratiion. Can be loaded in ++ # the separate ``puppet`` executable using the ``--loadclasses`` ++ # option. ++ # The default value is '$confdir/classes.txt'. ++ classfile = $vardir/classes.txt ++ ++ # Where puppetd caches the local configuration. An ++ # extension indicating the cache format is added automatically. ++ # The default value is '$confdir/localconfig'. ++ localconfig = $vardir/localconfig +diff -Naur puppet-0.24.1.orig/conf/gentoo/puppet/puppetca.conf puppet-0.24.1/conf/gentoo/puppet/puppetca.conf +--- puppet-0.24.1.orig/conf/gentoo/puppet/puppetca.conf 2007-11-01 04:44:27.000000000 +0900 ++++ puppet-0.24.1/conf/gentoo/puppet/puppetca.conf 1970-01-01 09:00:00.000000000 +0900 +@@ -1,29 +0,0 @@ +-[puppet] +- # Where Puppet stores dynamic and growing data. +- # The default value is '/var/puppet'. +- vardir = /var/lib/puppet +- +- # The Puppet log directory. +- # The default value is '$vardir/log'. +- logdir = /var/log/puppet +- +- # Where Puppet PID files are kept. +- # The default value is '$vardir/run'. +- rundir = /var/run/puppet +- +- # Where SSL certificates are kept. +- # The default value is '$confdir/ssl'. +- ssldir = $vardir/ssl +- +-[puppetd] +- # The file in which puppetd stores a list of the classes +- # associated with the retrieved configuratiion. Can be loaded in +- # the separate ``puppet`` executable using the ``--loadclasses`` +- # option. +- # The default value is '$confdir/classes.txt'. +- classfile = $vardir/classes.txt +- +- # Where puppetd caches the local configuration. An +- # extension indicating the cache format is added automatically. +- # The default value is '$confdir/localconfig'. +- localconfig = $vardir/localconfig +diff -Naur puppet-0.24.1.orig/conf/gentoo/puppet/puppetd.conf puppet-0.24.1/conf/gentoo/puppet/puppetd.conf +--- puppet-0.24.1.orig/conf/gentoo/puppet/puppetd.conf 2007-11-01 04:44:27.000000000 +0900 ++++ puppet-0.24.1/conf/gentoo/puppet/puppetd.conf 1970-01-01 09:00:00.000000000 +0900 +@@ -1,29 +0,0 @@ +-[puppet] +- # Where Puppet stores dynamic and growing data. +- # The default value is '/var/puppet'. +- vardir = /var/lib/puppet +- +- # The Puppet log directory. +- # The default value is '$vardir/log'. +- logdir = /var/log/puppet +- +- # Where Puppet PID files are kept. +- # The default value is '$vardir/run'. +- rundir = /var/run/puppet +- +- # Where SSL certificates are kept. +- # The default value is '$confdir/ssl'. +- ssldir = $vardir/ssl +- +-[puppetd] +- # The file in which puppetd stores a list of the classes +- # associated with the retrieved configuratiion. Can be loaded in +- # the separate ``puppet`` executable using the ``--loadclasses`` +- # option. +- # The default value is '$confdir/classes.txt'. +- classfile = $vardir/classes.txt +- +- # Where puppetd caches the local configuration. An +- # extension indicating the cache format is added automatically. +- # The default value is '$confdir/localconfig'. +- localconfig = $vardir/localconfig +diff -Naur puppet-0.24.1.orig/conf/gentoo/puppet/puppetmasterd.conf puppet-0.24.1/conf/gentoo/puppet/puppetmasterd.conf +--- puppet-0.24.1.orig/conf/gentoo/puppet/puppetmasterd.conf 2007-11-01 04:44:27.000000000 +0900 ++++ puppet-0.24.1/conf/gentoo/puppet/puppetmasterd.conf 1970-01-01 09:00:00.000000000 +0900 +@@ -1,29 +0,0 @@ +-[puppet] +- # Where Puppet stores dynamic and growing data. +- # The default value is '/var/puppet'. +- vardir = /var/lib/puppet +- +- # The Puppet log directory. +- # The default value is '$vardir/log'. +- logdir = /var/log/puppet +- +- # Where Puppet PID files are kept. +- # The default value is '$vardir/run'. +- rundir = /var/run/puppet +- +- # Where SSL certificates are kept. +- # The default value is '$confdir/ssl'. +- ssldir = $vardir/ssl +- +-[puppetd] +- # The file in which puppetd stores a list of the classes +- # associated with the retrieved configuratiion. Can be loaded in +- # the separate ``puppet`` executable using the ``--loadclasses`` +- # option. +- # The default value is '$confdir/classes.txt'. +- classfile = $vardir/classes.txt +- +- # Where puppetd caches the local configuration. An +- # extension indicating the cache format is added automatically. +- # The default value is '$confdir/localconfig'. +- localconfig = $vardir/localconfig +diff -Naur puppet-0.24.1.orig/lib/puppet/provider/service/gentoo.rb puppet-0.24.1/lib/puppet/provider/service/gentoo.rb +--- puppet-0.24.1.orig/lib/puppet/provider/service/gentoo.rb 2007-11-01 04:44:27.000000000 +0900 ++++ puppet-0.24.1/lib/puppet/provider/service/gentoo.rb 2008-01-07 23:24:10.000000000 +0900 +@@ -29,7 +29,7 @@ + return :false unless line + + # If it's enabled then it will print output showing service | runlevel +- if output =~ /#{@resource[:name]}\s*|\s*default/ ++ if output =~ /#{@resource[:name]}\s*\|\s*default/ + return :true + else + return :false diff --git a/app-admin/puppet/files/puppet-0.24.1-service.patch b/app-admin/puppet/files/puppet-0.24.1-service.patch new file mode 100644 index 0000000..e7aed5a --- /dev/null +++ b/app-admin/puppet/files/puppet-0.24.1-service.patch @@ -0,0 +1,14 @@ +diff -Naur puppet-0.24.1.orig/lib/puppet/provider/service/gentoo.rb puppet-0.24.1/lib/puppet/provider/service/gentoo.rb +--- puppet-0.24.1.orig/lib/puppet/provider/service/gentoo.rb 2007-11-01 04:44:27.000000000 +0900 ++++ puppet-0.24.1/lib/puppet/provider/service/gentoo.rb 2008-02-08 01:41:22.000000000 +0900 +@@ -8,6 +8,10 @@ + + defaultfor :operatingsystem => :gentoo + ++ def self.defpath ++ superclass.defpath ++ end ++ + def disable + begin + output = update :del, @resource[:name], :default diff --git a/app-admin/puppet/files/puppet-0.24.2-gentoo.patch b/app-admin/puppet/files/puppet-0.24.2-gentoo.patch new file mode 100644 index 0000000..e9eccdd --- /dev/null +++ b/app-admin/puppet/files/puppet-0.24.2-gentoo.patch @@ -0,0 +1,12 @@ +diff -Naur puppet-0.24.2.orig/lib/puppet/provider/service/gentoo.rb puppet-0.24.2/lib/puppet/provider/service/gentoo.rb +--- puppet-0.24.2.orig/lib/puppet/provider/service/gentoo.rb 2008-03-04 01:32:37.000000000 +0900 ++++ puppet-0.24.2/lib/puppet/provider/service/gentoo.rb 2008-03-06 00:53:20.000000000 +0900 +@@ -33,7 +33,7 @@ + return :false unless line + + # If it's enabled then it will print output showing service | runlevel +- if output =~ /#{@resource[:name]}\s*|\s*default/ ++ if output =~ /#{@resource[:name]}\s*\|\s*default/ + return :true + else + return :false diff --git a/app-admin/puppet/files/puppet-0.24.4-stack_ldap.patch b/app-admin/puppet/files/puppet-0.24.4-stack_ldap.patch new file mode 100644 index 0000000..6d0f3e3 --- /dev/null +++ b/app-admin/puppet/files/puppet-0.24.4-stack_ldap.patch @@ -0,0 +1,53 @@ +--- ldap.rb.orig 2008-04-07 16:34:43.314125000 +0200 ++++ ldap.rb 2008-04-07 17:34:18.645503750 +0200 +@@ -15,6 +15,11 @@ + return nil unless information = super + node = Puppet::Node.new(name) + ++ information[:stacked].each do |value| ++ param = value.split('=', 2) ++ information[:parameters][param[0]] = param[1] unless information[:parameters].include?(param[0]) ++ end ++ + parent_info = nil + parent = information[:parent] + parents = [name] +@@ -30,6 +35,10 @@ + raise Puppet::Error.new("Could not find parent node '%s'" % parent) + end + information[:classes] += parent_info[:classes] ++ parent_info[:stacked].each do |value| ++ param = value.split('=', 2) ++ information[:parameters][param[0]] = param[1] unless information[:parameters].include?(param[0]) ++ end + parent_info[:parameters].each do |param, value| + # Specifically test for whether it's set, so false values are handled + # correctly. +@@ -55,6 +64,12 @@ + end + end + ++ # The attributes that Puppet will stack as array over the full ++ # hierarchy. ++ def stacked_attributes ++ Puppet[:ldapstackedattrs].split(/\s*,\s*/) ++ end ++ + # Process the found entry. We assume that we don't just want the + # ldap object. + def process(name, entry) +@@ -78,6 +93,14 @@ + end + } + ++ result[:stacked] = [] ++ stacked_attributes.each { |attr| ++ if values = entry.vals(attr) ++ result[:stacked] = result[:stacked] + values ++ end ++ } ++ ++ + result[:parameters] = entry.to_hash.inject({}) do |hash, ary| + if ary[1].length == 1 + hash[ary[0]] = ary[1].shift diff --git a/app-admin/puppet/files/puppetmaster.init b/app-admin/puppet/files/puppetmaster.init new file mode 100755 index 0000000..09def2a --- /dev/null +++ b/app-admin/puppet/files/puppetmaster.init @@ -0,0 +1,50 @@ +#!/sbin/runscript +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +depend() { + need net + before puppet + use dns logger +} + +checkconfig() { + if [[ ! -d "${PUPPETMASTER_PID_DIR}" ]] ; then + eerror "Please make sure PUPPETMASTER_PID_DIR is defined and points to a existing directory" + return 1 + fi + + local site_manifest="/etc/puppet/manifests/site.pp" + [[ -n "${PUPPETMASTER_MANIFEST}" ]] && site_manifest="${PUPPETMASTER_MANIFEST}" + + if [ ! -f "${site_manifest}" ] ; then + eerror "Please create ${site_manifest} before running puppet" + return 1 + fi + + return 0 +} + +start() { + checkconfig || return $? + + local options="" + [[ -n "${PUPPETMASTER_MANIFEST}" ]] && options="${options} --manifest=${PUPPETMASTER_MANIFEST}" + [[ -n "${PUPPETMASTER_LOG}" ]] && options="${options} --logdest=${PUPPETMASTER_LOG}" + [[ -n "${PUPPETMASTER_EXTRA_OPTS}" ]] && options="${options} ${PUPPETMASTER_EXTRA_OPTS}" + + ebegin "Starting puppetmaster" + start-stop-daemon --start --quiet --exec /usr/bin/puppetmasterd \ + -- ${options} + eend $? "Failed to start puppetmaster" +} + +stop() { + ebegin "Stopping puppetmaster" + start-stop-daemon --stop --quiet \ + --pidfile ${PUPPETMASTER_PID_DIR}/puppetmasterd.pid + local ret=$? + eend ${ret} "Failed to stop puppetmaster" + rm -f ${PUPPETMASTER_PID_DIR}/puppetmasterd.pid + return ${ret} +} diff --git a/app-admin/puppet/metadata.xml b/app-admin/puppet/metadata.xml new file mode 100644 index 0000000..70313d2 --- /dev/null +++ b/app-admin/puppet/metadata.xml @@ -0,0 +1,8 @@ + + + +no-herd + + matsuu@gentoo.org + + diff --git a/app-admin/puppet/puppet-0.24.4-r1.ebuild b/app-admin/puppet/puppet-0.24.4-r1.ebuild new file mode 100644 index 0000000..f4b9d67 --- /dev/null +++ b/app-admin/puppet/puppet-0.24.4-r1.ebuild @@ -0,0 +1,118 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-admin/puppet/puppet-0.24.4.ebuild,v 1.1 2008/04/03 16:30:02 matsuu Exp $ + +inherit elisp-common eutils ruby + +DESCRIPTION="A system automation and configuration management software" +HOMEPAGE="http://reductivelabs.com/projects/puppet/index.html" +SRC_URI="http://reductivelabs.com/downloads/${PN}/${P}.tgz" + +LICENSE="GPL-2" +SLOT="0" +IUSE="emacs vim-syntax" +KEYWORDS="~x86 ~amd64" + +DEPEND="emacs? ( virtual/emacs )" +RDEPEND="${DEPEND} + >=dev-ruby/facter-1.3.5 + >=app-portage/eix-0.9.4" + +USE_RUBY="ruby18" + +SITEFILE="50${PN}-mode-gentoo.el" + +pkg_setup() { + built_with_use virtual/ruby ipv6 || \ + die "Ruby must be built with ipv6 support, otherwise puppet will not be able to run" + + enewgroup puppet || die "Problem creating group puppet" + enewuser puppet -1 -1 /var/lib/puppet puppet || die "Problem creating user puppet" +} + +src_unpack() { + unpack ${A} + cd "${S}" + + epatch "${FILESDIR}"/${PN}-0.24.2-gentoo.patch + epatch "${FILESDIR}"/${PN}-0.24.4-stack_ldap.patch +} + +src_compile() { + if use emacs ; then + elisp-compile ext/emacs/puppet-mode.el || die "elisp-compile failed" + fi +} + +src_install() { + DESTDIR="${D}" ruby_einstall "$@" || die + DESTDIR="${D}" erubydoc + + # Installation of init scripts and configuration + # bug #211910 + #doinitd conf/gentoo/init.d/puppetmaster + newinitd "${FILESDIR}"/puppetmaster.init puppetmaster + doconfd conf/gentoo/conf.d/puppetmaster + doinitd conf/gentoo/init.d/puppet + doconfd conf/gentoo/conf.d/puppet + + # Initial configuration files + keepdir /etc/puppet/manifests + insinto /etc/puppet + doins conf/gentoo/puppet/* + + # Location of log and data files + keepdir /var/run/puppet + keepdir /var/log/puppet + keepdir /var/lib/puppet/ssl + keepdir /var/lib/puppet/files + fowners -R puppet:puppet /var/{run,log,lib}/puppet + + if use emacs ; then + elisp-install ${PN} ext/emacs/puppet-mode.el* || die "elisp-install failed" + elisp-site-file-install "${FILESDIR}/${SITEFILE}" + fi + + if use vim-syntax ; then + insinto /usr/share/vim/vimfiles/syntax; doins ext/vim/syntax/puppet.vim + insinto /usr/share/vim/vimfiles/ftdetect; doins ext/vim/ftdetect/puppet.vim + fi + + # ext and examples files + for f in $(find ext examples -type f) ; do + docinto $(dirname ${f}) + dodoc ${f} + done +} + +pkg_postinst() { + elog + elog "Please, *don't* include the --ask option in EMERGE_EXTRA_OPTS as this could" + elog "cause puppet to hang while installing packages." + elog + elog "Puppet uses eix to get information about currently installed packages," + elog "so please keep the eix metadata cache updated so puppet is able to properly" + elog "handle package installations." + elog + elog "Currently puppet only supports adding and removing services to the default" + elog "runlevel, if you want to add/remove a service from another runlevel you may" + elog "do so using symlinking." + elog + + if [ \ + -f "${ROOT}/etc/puppet/puppetd.conf" -o \ + -f "${ROOT}/etc/puppet/puppetmaster.conf" -o \ + -f "${ROOT}/etc/puppet/puppetca.conf" \ + ] ; then + elog + elog "Please remove deprecated config files." + elog " /etc/puppet/puppetca.conf" + elog " /etc/puppet/puppetd.conf" + elog " /etc/puppet/puppetmasterd.conf" + elog + fi + use emacs && elisp-site-regen +} +pkg_postrm() { + use emacs && elisp-site-regen +} -- cgit v1.2.3-65-gdbad