Best unofficial Apache Server developers community
Username
Forgot password?
Sign in with Twitter account
Sign in with Facebook account
List archives

PATCH/puppet 1/1] Fixes errant Trac references in documentation

PATCH/puppet 1/1] Fixes errant Trac references in documentation
(340 lines)
PATCH/puppet 1/1] Fix #4238 - if should match undef as ''
(240 lines)
Jul 14, 2010
James Turnbull
James Turnbull
Signed-off-by: James Turnbull <jam### @lovedthanlost.net>
---
 examples/modules/sample-module/README.txt          |    2 +-
 .../lib/puppet/parser/functions/hostname_to_dn.rb  |    2 +-
 ext/extlookup.rb                                   |    2 +-
 ext/regexp_nodes/regexp_nodes.rb                   |    2 +-
 lib/puppet/parser/functions/inline_template.rb     |    2 +-
 .../provider/nameservice/directoryservice.rb       |    2 +-
 lib/puppet/provider/package/pkgdmg.rb              |    2 +-
 lib/puppet/reference/providers.rb                  |    2 +-
 lib/puppet/util/command_line/filebucket            |    2 +-
 lib/puppet/util/command_line/puppet                |    2 +-
 lib/puppet/util/command_line/puppetd               |    2 +-
 lib/puppet/util/command_line/puppetmasterd         |    2 +-
 lib/puppet/util/command_line/puppetqd              |    2 +-
 lib/puppet/util/command_line/ralsh                 |    2 +-
 man/man8/filebucket.8                              |    2 +-
 man/man8/puppet.8                                  |    2 +-
 man/man8/puppetd.8                                 |    2 +-
 man/man8/puppetmasterd.8                           |    2 +-
 man/man8/puppetqd.8                                |    2 +-
 man/man8/ralsh.8                                   |    2 +-
 20 files changed, 20 insertions(+), 20 deletions(-)

diff --git a/examples/modules/sample-module/README.txt
b/examples/modules/sample-module/README.txt
index ee4b820..cd35c83 100644
--- a/examples/modules/sample-module/README.txt
+++ b/examples/modules/sample-module/README.txt
@@ -13,5 +13,5 @@ Note the consistent naming of files for
Puppet::Util::Autoload
 
 Reference Documents:
 http://reductivelabs.com/trac/puppet/wiki/ModuleOrganisation
-http://reductivelabs.com/trac/puppet/...gYourOwnFunctions
+http://docs.puppetlabs.com/guides/custom_functions.html
 http://reductivelabs.com/trac/puppet/wiki/FunctionReference
diff --git
a/examples/modules/sample-module/lib/puppet/parser/functions/hostname_to_dn.rb
b/examples/modules/sample-module/lib/puppet/parser/functions/hostname_to_dn.rb
index 34ab280..fe4e549 100644
---
a/examples/modules/sample-module/lib/puppet/parser/functions/hostname_to_dn.rb
+++
b/examples/modules/sample-module/lib/puppet/parser/functions/hostname_to_dn.rb
@@ -27,7 +27,7 @@
 
 # Jeff McCune <jeff.m### @northstarlabs.net>
 # 2007-08-14
-# See: http://reductivelabs.com/trac/puppet/...gYourOwnFunctions
+# See: http://docs.puppetlabs.com/guides/custom_functions.html
 
 module Puppet::Parser::Functions
   newfunction(:hostname_to_dn, :type => :rvalue, :doc => "Given
'foo.bar.com', return 'dc=foo,dc=bar,dc=com'.") do |args|
diff --git a/ext/extlookup.rb b/ext/extlookup.rb
index b72fc12..d87583b 100644
--- a/ext/extlookup.rb
+++ b/ext/extlookup.rb
@@ -74,7 +74,7 @@
 # need to edit a load of manifests to do simple things like adjust a
desired version number.
 #
 # For more information on installing and writing your own custom
functions see:
-#    http://reductivelabs.com/trac/puppet/...gYourOwnFunctions
+#    http://docs.puppetlabs.com/guides/custom_functions.html
 #
 # For further help contact Volcane on #puppet
 require 'csv'
diff --git a/ext/regexp_nodes/regexp_nodes.rb
b/ext/regexp_nodes/regexp_nodes.rb
index e234985..8712155 100644
--- a/ext/regexp_nodes/regexp_nodes.rb
+++ b/ext/regexp_nodes/regexp_nodes.rb
@@ -2,7 +2,7 @@
 
 # = Synopsis
 # This is an external node classifier script, after
-# http://reductivelabs.com/trac/puppet/wiki/ExternalNodes
+# http://docs.puppetlabs.com/guides/external_nodes.html
 #
 # = Usage
 # regexp_nodes.rb <host>
diff --git a/lib/puppet/parser/functions/inline_template.rb
b/lib/puppet/parser/functions/inline_template.rb
index 11d980f..46e0003 100644
--- a/lib/puppet/parser/functions/inline_template.rb
+++ b/lib/puppet/parser/functions/inline_template.rb
@@ -1,6 +1,6 @@
 Puppet::Parser::Functions::newfunction(:inline_template, :type =>
:rvalue, :doc =>
   "Evaluate a template string and return its value.  See `the templating
docs
-  </trac/puppet/wiki/PuppetTemplating>`_ for more information. 
Note that
+  <http://docs.puppetlabs.com/guides/templating.html>`_ for more
information.  Note that
   if multiple template strings are specified, their output is all
concatenated
   and returned as the output of the function.") do |vals|
     require 'erb'
diff --git a/lib/puppet/provider/nameservice/directoryservice.rb
b/lib/puppet/provider/nameservice/directoryservice.rb
index 76fc466..965a2aa 100644
--- a/lib/puppet/provider/nameservice/directoryservice.rb
+++ b/lib/puppet/provider/nameservice/directoryservice.rb
@@ -41,7 +41,7 @@ class DirectoryService <
Puppet::Provider::NameService
 
   # JJM 2007-07-25: This map is used to map NameService attributes to
their
   #     corresponding DirectoryService attribute names.
-  #     See: http://images.apple.com/server/docs/Open_Directory_v10.4.pdf
+  #     See: http://images.apple.com/server/docs.Open_Directory_v10.4.pdf
   # JJM: Note, this is de-coupled from the Puppet::Type, and must
   #     be actively maintained.  There may also be collisions with
different
   #     types (Users, Groups, Mounts, Hosts, etc...)
diff --git a/lib/puppet/provider/package/pkgdmg.rb
b/lib/puppet/provider/package/pkgdmg.rb
index 4506fbf..39e377d 100644
--- a/lib/puppet/provider/package/pkgdmg.rb
+++ b/lib/puppet/provider/package/pkgdmg.rb
@@ -29,7 +29,7 @@ require 'puppet/provider/package'
 require 'facter/util/plist'
 
 Puppet::Type.type(:package).provide :pkgdmg, :parent =>
Puppet::Provider::Package do
-  desc "Package management based on Apple's Installer.app and
DiskUtility.app.  This package works by checking the contents of a DMG
image for Apple pkg or mpkg files. Any number of pkg or mpkg files may
exist in the root directory of the DMG file system. Sub directories are not
checked for packages.  See `the wiki docs
</trac/puppet/wiki/DmgPackages>` for more detail."
+  desc "Package management based on Apple's Installer.app and
DiskUtility.app.  This package works by checking the contents of a DMG
image for Apple pkg or mpkg files. Any number of pkg or mpkg files may
exist in the root directory of the DMG file system. Sub directories are not
checked for packages.  See `the wiki docs
<http://projects.puppetlabs.com/projec...Dmg_Patterns>`
for more detail."
 
   confine :operatingsystem => :darwin
   defaultfor :operatingsystem => :darwin
diff --git a/lib/puppet/reference/providers.rb
b/lib/puppet/reference/providers.rb
index a0f1063..ef33a55 100644
--- a/lib/puppet/reference/providers.rb
+++ b/lib/puppet/reference/providers.rb
@@ -95,7 +95,7 @@ providers = Puppet::Util::Reference.newreference
:providers, :title => "Provider
 
     ret += h(type.name.to_s + "_", 2)
 
-    ret += ".. _#{type.name}:
#{"http://reductivelabs.com/trac/puppet/...ence##{type.name}"}\n\n"
+    ret += ".. _#{type.name}:
#{"http://docs.puppetlabs.com/references...html##{type.name}"}\n\n"
     ret += option("Default provider", default)
     ret += doctable(headers, table_data)
 
diff --git a/lib/puppet/util/command_line/filebucket
b/lib/puppet/util/command_line/filebucket
index ba9d8cd..8302d7b 100755
--- a/lib/puppet/util/command_line/filebucket
+++ b/lib/puppet/util/command_line/filebucket
@@ -53,7 +53,7 @@
 # parameter, so you can specify '--ssldir <directory>' as an
argument.
 #
 # See the configuration file documentation at
-# http://reductivelabs.com/trac/puppet/...gurationReference for
+# http://docs.puppetlabs.com/references...onfiguration.html for
 # the full list of acceptable parameters. A commented list of all
 # configuration options can also be generated by running puppet with
 # '--genconfig'.
diff --git a/lib/puppet/util/command_line/puppet
b/lib/puppet/util/command_line/puppet
index f65ef90..7b6c0ae 100755
--- a/lib/puppet/util/command_line/puppet
+++ b/lib/puppet/util/command_line/puppet
@@ -22,7 +22,7 @@
 # parameter, so you can specify '--ssldir <directory>' as an
argument.
 #
 # See the configuration file documentation at
-# http://reductivelabs.com/trac/puppet/...gurationReference for
+# http://docs.puppetlabs.com/references...onfiguration.html for
 # the full list of acceptable parameters. A commented list of all
 # configuration options can also be generated by running puppet with
 # '--genconfig'.
diff --git a/lib/puppet/util/command_line/puppetd
b/lib/puppet/util/command_line/puppetd
index 3af2fda..571b154 100755
--- a/lib/puppet/util/command_line/puppetd
+++ b/lib/puppet/util/command_line/puppetd
@@ -69,7 +69,7 @@
 # parameter, so you can specify '--server <servername>' as an
argument.
 #
 # See the configuration file documentation at
-# http://reductivelabs.com/trac/puppet/...gurationReference for
+# http://docs.puppetlabs.com/references...onfiguration.html for
 # the full list of acceptable parameters. A commented list of all
 # configuration options can also be generated by running puppet agent
with
 # '--genconfig'.
diff --git a/lib/puppet/util/command_line/puppetmasterd
b/lib/puppet/util/command_line/puppetmasterd
index c58612c..74efb38 100755
--- a/lib/puppet/util/command_line/puppetmasterd
+++ b/lib/puppet/util/command_line/puppetmasterd
@@ -21,7 +21,7 @@
 # parameter, so you can specify '--ssldir <directory>' as an
argument.
 #
 # See the configuration file documentation at
-# http://reductivelabs.com/trac/puppet/...gurationReference for
+# http://docs.puppetlabs.com/references...onfiguration.html for
 # the full list of acceptable parameters. A commented list of all
 # configuration options can also be generated by running puppetmasterdd
with
 # '--genconfig'.
diff --git a/lib/puppet/util/command_line/puppetqd
b/lib/puppet/util/command_line/puppetqd
index 439db5c..48fc952 100755
--- a/lib/puppet/util/command_line/puppetqd
+++ b/lib/puppet/util/command_line/puppetqd
@@ -20,7 +20,7 @@
 # parameter, so you can specify '--server <servername>' as an
argument.
 #
 # See the configuration file documentation at
-# http://reductivelabs.com/trac/puppet/...gurationReference for
+# http://docs.puppetlabs.com/references...onfiguration.html for
 # the full list of acceptable parameters. A commented list of all
 # configuration options can also be generated by running puppetd with
 # '--genconfig'.
diff --git a/lib/puppet/util/command_line/ralsh
b/lib/puppet/util/command_line/ralsh
index b866ede..68ad92d 100755
--- a/lib/puppet/util/command_line/ralsh
+++ b/lib/puppet/util/command_line/ralsh
@@ -34,7 +34,7 @@
 # parameter, so you can specify '--ssldir <directory>' as an
argument.
 #
 # See the configuration file documentation at
-# http://reductivelabs.com/trac/puppet/...gurationReference for
+# http://docs.puppetlabs.com/references...onfiguration.html for
 # the full list of acceptable parameters. A commented list of all
 # configuration options can also be generated by running puppet with
 # '--genconfig'.
diff --git a/man/man8/filebucket.8 b/man/man8/filebucket.8
index de2dee7..2cfc82c 100644
--- a/man/man8/filebucket.8
+++ b/man/man8/filebucket.8
@@ -64,7 +64,7 @@ configuration parameter, so you can specify
\(aq\-\-ssldir <directory>\(aq as an
 argument.
 .sp
 See the configuration file documentation at
-\fI\%http://reductivelabs.com/trac/puppet/...gurationReference\fP
for the
+\fI\%http://docs/puppetlabs.com/references...iguration.html\fP
for the
 full list of acceptable parameters. A commented list of all
 configuration options can also be generated by running puppet with
 \(aq\-\-genconfig\(aq.
diff --git a/man/man8/puppet.8 b/man/man8/puppet.8
index 02176ce..d34711b 100644
--- a/man/man8/puppet.8
+++ b/man/man8/puppet.8
@@ -30,7 +30,7 @@ configuration parameter, so you can specify
\(aq\-\-ssldir <directory>\(aq as an
 argument.
 .sp
 See the configuration file documentation at
-\fI\%http://reductivelabs.com/trac/puppet/...gurationReference\fP
for the
+\fI\%http://docs/puppetlabs.com/references...iguration.html\fP
for the
 full list of acceptable parameters. A commented list of all
 configuration options can also be generated by running puppet with
 \(aq\-\-genconfig\(aq.
diff --git a/man/man8/puppetd.8 b/man/man8/puppetd.8
index c2d5cb5..a913531 100644
--- a/man/man8/puppetd.8
+++ b/man/man8/puppetd.8
@@ -66,7 +66,7 @@ configuration parameter, so you can specify
\(aq\-\-server <servername>\(aq as
 an argument.
 .sp
 See the configuration file documentation at
-\fI\%http://reductivelabs.com/trac/puppet/...gurationReference\fP
for the
+\fI\%http://docs/puppetlabs.com/references...iguration.html\fP
for the
 full list of acceptable parameters. A commented list of all
 configuration options can also be generated by running puppetd with
 \(aq\-\-genconfig\(aq.
diff --git a/man/man8/puppetmasterd.8 b/man/man8/puppetmasterd.8
index 5bfea2e..680e505 100644
--- a/man/man8/puppetmasterd.8
+++ b/man/man8/puppetmasterd.8
@@ -29,7 +29,7 @@ configuration parameter, so you can specify
\(aq\-\-ssldir <directory>\(aq as an
 argument.
 .sp
 See the configuration file documentation at
-\fI\%http://reductivelabs.com/trac/puppet/...gurationReference\fP
for the
+\fI\%http://docs/puppetlabs.com/references...iguration.html\fP
for the
 full list of acceptable parameters. A commented list of all
 configuration options can also be generated by running puppetmasterdd
 with \(aq\-\-genconfig\(aq.
diff --git a/man/man8/puppetqd.8 b/man/man8/puppetqd.8
index bf08f2b..2da8b98 100644
--- a/man/man8/puppetqd.8
+++ b/man/man8/puppetqd.8
@@ -24,7 +24,7 @@ configuration parameter, so you can specify
\(aq\-\-server <servername>\(aq as
 an argument.
 .sp
 See the configuration file documentation at
-\fI\%http://reductivelabs.com/trac/puppet/...gurationReference\fP
for the
+\fI\%http://docs/puppetlabs.com/references...iguration.html\fP
for the
 full list of acceptable parameters. A commented list of all
 configuration options can also be generated by running puppetd with
 \(aq\-\-genconfig\(aq.
diff --git a/man/man8/ralsh.8 b/man/man8/ralsh.8
index 98892e0..8380b88 100644
--- a/man/man8/ralsh.8
+++ b/man/man8/ralsh.8
@@ -42,7 +42,7 @@ configuration parameter, so you can specify
\(aq\-\-ssldir <directory>\(aq as an
 argument.
 .sp
 See the configuration file documentation at
-\fI\%http://reductivelabs.com/trac/puppet/...gurationReference\fP
for the
+\fI\%http://docs/puppetlabs.com/references...iguration.html\fP
for the
 full list of acceptable parameters. A commented list of all
 configuration options can also be generated by running puppet with
 \(aq\-\-genconfig\(aq.






Reply
Similar Threads
PATCH/puppet 1/1] Fixes errant Trac references in documentation
Signed-off-by: James Turnbull <jam### @lovedthanlost.net>
---
 examples/modules/sample-module/README.txt          |    2 +-
 .../lib/puppet/parser/functions/hostname_to_dn.rb  |    2 +-
 ext/extlookup.rb                                   |    2 +-
 ext/regexp_nodes/regexp_nodes.rb                   |    2 +-
 lib/puppet/parser/functions/inline_template.rb     |    2 +-
 lib/puppet/provider/package/pkgdmg.rb              |    2 +-
 lib/puppet/reference/providers.rb                  |    2 +-
 lib/puppet/util/command_line/filebucket            |    2 +-
 lib/puppet/util/command_line/puppet                |    2 +-
 lib/puppet/util/command_line/puppetd               |    2 +-
 lib/puppet/util/command_line/puppetmasterd         |    2 +-
 lib/puppet/util/command_line/puppetqd              |    2 +-
 lib/puppet/util/command_line/ralsh                 |    2 +-
 man/man8/filebucket.8                              |    2 +-
 man/man8/puppet.8                                  |    2 +-
 man/man8/puppetd.8                                 |    2 +-
 man/man8/puppetmasterd.8                           |    2 +-
 man/man8/puppetqd.8                                |    2 +-
 man/man8/ralsh.8                                   |    2 +-
 19 files changed, 19 insertions(+), 19 deletions(-)

diff --git a/examples/modules/sample-module/README.txt
b/examples/modules/sample-module/README.txt
index ee4b820..bdced62 100644
--- a/examples/modules/sample-module/README.txt
+++ b/examples/modules/sample-module/README.txt
@@ -13,5 +13,5 @@ Note the consistent naming of files for
Puppet::Util::Autoload
 
 Reference Documents:
 http://reductivelabs.com/trac/puppet/wiki/ModuleOrganisation
-http://reductivelabs.com/trac/puppet/...gYourOwnFunctions
+http://docs/puppetlabs.com/guides/custom_functions.html
 http://reductivelabs.com/trac/puppet/wiki/FunctionReference
diff --git
a/examples/modules/sample-module/lib/puppet/parser/functions/hostname_to_dn.rb
b/examples/modules/sample-module/lib/puppet/parser/functions/hostname_to_dn.rb
index 34ab280..8c6fb3c 100644
---
a/examples/modules/sample-module/lib/puppet/parser/functions/hostname_to_dn.rb
+++
b/examples/modules/sample-module/lib/puppet/parser/functions/hostname_to_dn.rb
@@ -27,7 +27,7 @@
 
 # Jeff McCune <jeff.### @northstarlabs.net>
 # 2007-08-14
-# See: http://reductivelabs.com/trac/puppet/...gYourOwnFunctions
+# See: http://docs/puppetlabs.com/guides/custom_functions.html
 
 module Puppet::Parser::Functions
   newfunction(:hostname_to_dn, :type => :rvalue, :doc => "Given
'foo.bar.com', return 'dc=foo,dc=bar,dc=com'.") do |args|
diff --git a/ext/extlookup.rb b/ext/extlookup.rb
index b72fc12..b732812 100644
--- a/ext/extlookup.rb
+++ b/ext/extlookup.rb
@@ -74,7 +74,7 @@
 # need to edit a load of manifests to do simple things like adjust a
desired version number.
 #
 # For more information on installing and writing your own custom
functions see:
-#    http://reductivelabs.com/trac/puppet/...gYourOwnFunctions
+#    http://docs/puppetlabs.com/guides/custom_functions.html
 #
 # For further help contact Volcane on #puppet
 require 'csv'
diff --git a/ext/regexp_nodes/regexp_nodes.rb
b/ext/regexp_nodes/regexp_nodes.rb
index e234985..e5a787e 100644
--- a/ext/regexp_nodes/regexp_nodes.rb
+++ b/ext/regexp_nodes/regexp_nodes.rb
@@ -2,7 +2,7 @@
 
 # = Synopsis
 # This is an external node classifier script, after
-# http://reductivelabs.com/trac/puppet/wiki/ExternalNodes
+# http://docs/puppetlabs.com/guides/external_nodes.html
 #
 # = Usage
 # regexp_nodes.rb <host>
diff --git a/lib/puppet/parser/functions/inline_template.rb
b/lib/puppet/parser/functions/inline_template.rb
index 11d980f..3aac51e 100644
--- a/lib/puppet/parser/functions/inline_template.rb
+++ b/lib/puppet/parser/functions/inline_template.rb
@@ -1,6 +1,6 @@
 Puppet::Parser::Functions::newfunction(:inline_template, :type =>
:rvalue, :doc =>
   "Evaluate a template string and return its value.  See `the templating
docs
-  </trac/puppet/wiki/PuppetTemplating>`_ for more information. 
Note that
+  <http://docs/puppetlabs.com/guides/templating.html>`_ for more
information.  Note that
   if multiple template strings are specified, their output is all
concatenated
   and returned as the output of the function.") do |vals|
     require 'erb'
diff --git a/lib/puppet/provider/package/pkgdmg.rb
b/lib/puppet/provider/package/pkgdmg.rb
index 4506fbf..39e377d 100644
--- a/lib/puppet/provider/package/pkgdmg.rb
+++ b/lib/puppet/provider/package/pkgdmg.rb
@@ -29,7 +29,7 @@ require 'puppet/provider/package'
 require 'facter/util/plist'
 
 Puppet::Type.type(:package).provide :pkgdmg, :parent =>
Puppet::Provider::Package do
-  desc "Package management based on Apple's Installer.app and
DiskUtility.app.  This package works by checking the contents of a DMG
image for Apple pkg or mpkg files. Any number of pkg or mpkg files may
exist in the root directory of the DMG file system. Sub directories are not
checked for packages.  See `the wiki docs
</trac/puppet/wiki/DmgPackages>` for more detail."
+  desc "Package management based on Apple's Installer.app and
DiskUtility.app.  This package works by checking the contents of a DMG
image for Apple pkg or mpkg files. Any number of pkg or mpkg files may
exist in the root directory of the DMG file system. Sub directories are not
checked for packages.  See `the wiki docs
<http://projects.puppetlabs.com/projec...Dmg_Patterns>`
for more detail."
 
   confine :operatingsystem => :darwin
   defaultfor :operatingsystem => :darwin
diff --git a/lib/puppet/reference/providers.rb
b/lib/puppet/reference/providers.rb
index a0f1063..bac536b 100644
--- a/lib/puppet/reference/providers.rb
+++ b/lib/puppet/reference/providers.rb
@@ -95,7 +95,7 @@ providers = Puppet::Util::Reference.newreference
:providers, :title => "Provider
 
     ret += h(type.name.to_s + "_", 2)
 
-    ret += ".. _#{type.name}:
#{"http://reductivelabs.com/trac/puppet/...ence##{type.name}"}\n\n"
+    ret += ".. _#{type.name}:
#{"http://docs/puppetlabs.com/references...html##{type.name}"}\n\n"
     ret += option("Default provider", default)
     ret += doctable(headers, table_data)
 
diff --git a/lib/puppet/util/command_line/filebucket
b/lib/puppet/util/command_line/filebucket
index ba9d8cd..f262818 100755
--- a/lib/puppet/util/command_line/filebucket
+++ b/lib/puppet/util/command_line/filebucket
@@ -53,7 +53,7 @@
 # parameter, so you can specify '--ssldir <directory>' as an
argument.
 #
 # See the configuration file documentation at
-# http://reductivelabs.com/trac/puppet/...gurationReference for
+# http://docs/puppetlabs.com/references...onfiguration.html for
 # the full list of acceptable parameters. A commented list of all
 # configuration options can also be generated by running puppet with
 # '--genconfig'.
diff --git a/lib/puppet/util/command_line/puppet
b/lib/puppet/util/command_line/puppet
index f65ef90..4952108 100755
--- a/lib/puppet/util/command_line/puppet
+++ b/lib/puppet/util/command_line/puppet
@@ -22,7 +22,7 @@
 # parameter, so you can specify '--ssldir <directory>' as an
argument.
 #
 # See the configuration file documentation at
-# http://reductivelabs.com/trac/puppet/...gurationReference for
+# http://docs/puppetlabs.com/references...onfiguration.html for
 # the full list of acceptable parameters. A commented list of all
 # configuration options can also be generated by running puppet with
 # '--genconfig'.
diff --git a/lib/puppet/util/command_line/puppetd
b/lib/puppet/util/command_line/puppetd
index 3af2fda..e394734 100755
--- a/lib/puppet/util/command_line/puppetd
+++ b/lib/puppet/util/command_line/puppetd
@@ -69,7 +69,7 @@
 # parameter, so you can specify '--server <servername>' as an
argument.
 #
 # See the configuration file documentation at
-# http://reductivelabs.com/trac/puppet/...gurationReference for
+# http://docs/puppetlabs.com/references...onfiguration.html for
 # the full list of acceptable parameters. A commented list of all
 # configuration options can also be generated by running puppet agent
with
 # '--genconfig'.
diff --git a/lib/puppet/util/command_line/puppetmasterd
b/lib/puppet/util/command_line/puppetmasterd
index c58612c..4d94fef 100755
--- a/lib/puppet/util/command_line/puppetmasterd
+++ b/lib/puppet/util/command_line/puppetmasterd
@@ -21,7 +21,7 @@
 # parameter, so you can specify '--ssldir <directory>' as an
argument.
 #
 # See the configuration file documentation at
-# http://reductivelabs.com/trac/puppet/...gurationReference for
+# http://docs/puppetlabs.com/references...onfiguration.html for
 # the full list of acceptable parameters. A commented list of all
 # configuration options can also be generated by running puppetmasterdd
with
 # '--genconfig'.
diff --git a/lib/puppet/util/command_line/puppetqd
b/lib/puppet/util/command_line/puppetqd
index 439db5c..78a940a 100755
--- a/lib/puppet/util/command_line/puppetqd
+++ b/lib/puppet/util/command_line/puppetqd
@@ -20,7 +20,7 @@
 # parameter, so you can specify '--server <servername>' as an
argument.
 #
 # See the configuration file documentation at
-# http://reductivelabs.com/trac/puppet/...gurationReference for
+# http://docs/puppetlabs.com/references...onfiguration.html for
 # the full list of acceptable parameters. A commented list of all
 # configuration options can also be generated by running puppetd with
 # '--genconfig'.
diff --git a/lib/puppet/util/command_line/ralsh
b/lib/puppet/util/command_line/ralsh
index b866ede..a89a1eb 100755
--- a/lib/puppet/util/command_line/ralsh
+++ b/lib/puppet/util/command_line/ralsh
@@ -34,7 +34,7 @@
 # parameter, so you can specify '--ssldir <directory>' as an
argument.
 #
 # See the configuration file documentation at
-# http://reductivelabs.com/trac/puppet/...gurationReference for
+# http://docs/puppetlabs.com/references...onfiguration.html for
 # the full list of acceptable parameters. A commented list of all
 # configuration options can also be generated by running puppet with
 # '--genconfig'.
diff --git a/man/man8/filebucket.8 b/man/man8/filebucket.8
index de2dee7..2cfc82c 100644
--- a/man/man8/filebucket.8
+++ b/man/man8/filebucket.8
@@ -64,7 +64,7 @@ configuration parameter, so you can specify
\(aq\-\-ssldir <directory>\(aq as an
 argument.
 .sp
 See the configuration file documentation at
-\fI\%http://reductivelabs.com/trac/puppet/...gurationReference\fP
for the
+\fI\%http://docs/puppetlabs.com/references...onfiguration.html\fP
for the
 full list of acceptable parameters. A commented list of all
 configuration options can also be generated by running puppet with
 \(aq\-\-genconfig\(aq.
diff --git a/man/man8/puppet.8 b/man/man8/puppet.8
index 02176ce..d34711b 100644
--- a/man/man8/puppet.8
+++ b/man/man8/puppet.8
@@ -30,7 +30,7 @@ configuration parameter, so you can specify
\(aq\-\-ssldir <directory>\(aq as an
 argument.
 .sp
 See the configuration file documentation at
-\fI\%http://reductivelabs.com/trac/puppet/...gurationReference\fP
for the
+\fI\%http://docs/puppetlabs.com/references...onfiguration.html\fP
for the
 full list of acceptable parameters. A commented list of all
 configuration options can also be generated by running puppet with
 \(aq\-\-genconfig\(aq.
diff --git a/man/man8/puppetd.8 b/man/man8/puppetd.8
index c2d5cb5..a913531 100644
--- a/man/man8/puppetd.8
+++ b/man/man8/puppetd.8
@@ -66,7 +66,7 @@ configuration parameter, so you can specify
\(aq\-\-server <servername>\(aq as
 an argument.
 .sp
 See the configuration file documentation at
-\fI\%http://reductivelabs.com/trac/puppet/...gurationReference\fP
for the
+\fI\%http://docs/puppetlabs.com/references...onfiguration.html\fP
for the
 full list of acceptable parameters. A commented list of all
 configuration options can also be generated by running puppetd with
 \(aq\-\-genconfig\(aq.
diff --git a/man/man8/puppetmasterd.8 b/man/man8/puppetmasterd.8
index 5bfea2e..680e505 100644
--- a/man/man8/puppetmasterd.8
+++ b/man/man8/puppetmasterd.8
@@ -29,7 +29,7 @@ configuration parameter, so you can specify
\(aq\-\-ssldir <directory>\(aq as an
 argument.
 .sp
 See the configuration file documentation at
-\fI\%http://reductivelabs.com/trac/puppet/...gurationReference\fP
for the
+\fI\%http://docs/puppetlabs.com/references...onfiguration.html\fP
for the
 full list of acceptable parameters. A commented list of all
 configuration options can also be generated by running puppetmasterdd
 with \(aq\-\-genconfig\(aq.
diff --git a/man/man8/puppetqd.8 b/man/man8/puppetqd.8
index bf08f2b..2da8b98 100644
--- a/man/man8/puppetqd.8
+++ b/man/man8/puppetqd.8
@@ -24,7 +24,7 @@ configuration parameter, so you can specify
\(aq\-\-server <servername>\(aq as
 an argument.
 .sp
 See the configuration file documentation at
-\fI\%http://reductivelabs.com/trac/puppet/...gurationReference\fP
for the
+\fI\%http://docs/puppetlabs.com/references...onfiguration.html\fP
for the
 full list of acceptable parameters. A commented list of all
 configuration options can also be generated by running puppetd with
 \(aq\-\-genconfig\(aq.
diff --git a/man/man8/ralsh.8 b/man/man8/ralsh.8
index 98892e0..8380b88 100644
--- a/man/man8/ralsh.8
+++ b/man/man8/ralsh.8
@@ -42,7 +42,7 @@ configuration parameter, so you can specify
\(aq\-\-ssldir <directory>\(aq as an
 argument.
 .sp
 See the configuration file documentation at
-\fI\%http://reductivelabs.com/trac/puppet/...gurationReference\fP
for the
+\fI\%http://docs/puppetlabs.com/references...onfiguration.html\fP
for the
 full list of acceptable parameters. A commented list of all
 configuration options can also be generated by running puppet with
 \(aq\-\-genconfig\(aq.






PATCH/puppet 1/1] [#4370] Fixes extlookup precedence getting overwritten between runs
We found the gsub! in extlookup was actually modifying the value for
extlookup_precedence, so the next node to call it just got the
interpolated value from the first run.

We did two things in the code to prevent this:
1. We returned a dup of the ast string object so that modifying it
wouldn’t change puppet’s state. We didn’t do this for all possible
return values because we depend on using the original ast array object
to do array concatenation
2. We fixed extlookup to not do a destructive gsub

Reviewed by: Jesse Wolfe

Signed-off-by: Matt Robinson <mat### @puppetlabs.com>
---
 lib/puppet/parser/ast/function.rb            |    1 -
 lib/puppet/parser/ast/leaf.rb                |    2 +-
 lib/puppet/parser/functions/extlookup.rb     |   16 ++++++
PATCH/puppet 1/1] [#3656] Serializing arrays of references
My previous fix for #3656 missed the case where a "require" attribute
(or other graph-ish attribute) had multiple values. This patch
generalizes that fix to the multiple-value case.

Signed-off-by: Jesse Wolfe <jes5### @gmail.com>
---
 lib/puppet/resource.rb     |   17 ++++++++++++-----
 spec/unit/resource_spec.rb |    7 +++++++
 2 files changed, 19 insertions(+), 5 deletions(-)

diff --git a/lib/puppet/resource.rb b/lib/puppet/resource.rb
index 9894f2f..31237e3 100644
--- a/lib/puppet/resource.rb
+++ b/lib/puppet/resource.rb
@@ -60,11 +60,8 @@ class Puppet::Resource
 
       # Don't duplicate the title as the namevar
       next hash if param == namevar and value == title
-      if value.is_a? Puppet::Resource
-        hash[param] = value.to_s
-      else
-        hash[param] = value
-      end
+
+      hash[param] = Puppet::Resource.value_to_pson_data(value)
       hash
     end
 
@@ -73,6 +70,16 @@ class Puppet::Resource
     data
   end
 
+  def self.value_to_pson_data(value)
+    if value.is_a? Array
+      value.map{|v| value_to_pson_data(v) }
+    elsif value.is_a? Puppet::Resource
+      value.to_s
+    else
+      value
+    end
+  end
+
   def to_pson(*args)
     to_pson_data_hash.to_pson(*args)
   end
diff --git a/spec/unit/resource_spec.rb b/spec/unit/resource_spec.rb
index aff3816..95f0dd0 100755
--- a/spec/unit/resource_spec.rb
+++ b/spec/unit/resource_spec.rb
@@ -687,6 +687,13 @@ describe Puppet::Resource do
       result = Puppet::Resource.from_pson(PSON.parse(resource.to_pson))
       result[:requires].should == "File[/bar]"
     end
+
+    it "should serialize multiple relationships as arrays of reference
strings" do
+      resource = Puppet::Resource.new("File", "/foo")
+      resource[:requires] = [Puppet::Resource.new("File", "/bar"),
Puppet::Resource.new("File", "/baz")]
+      result = Puppet::Resource.from_pson(PSON.parse(resource.to_pson))
+      result[:requires].should == [ "File[/bar]",  "File[/baz]" ]
+    end
   end
 
   describe "when converting from pson" do






PATCH/puppet 1/1] [#4264] Fix failing specs run as root due to missing puppet group
These specs 'use' some settings which create directories belonging
to the 'service' user/group. If the default service group doesn't
exist, these fail. This patch explicitly sets the service group to
the gid of the process, which is known to be accessible by the user.

Signed-off-by: Nick Lewis <ni### @puppetlabs.com>
---
 .../indirector/bucket_file/rest_spec.rb            |    1 +
 .../indirector/certificate/rest_spec.rb            |    1 +
 .../indirector/certificate_request/rest_spec.rb    |    1 +
 .../certificate_revocation_list/rest_spec.rb       |    1 +
 spec/integration/indirector/report/rest_spec.rb    |    1 +
 spec/integration/indirector/rest_spec.rb           |    1 +
 spec/integration/network/server/webrick_spec.rb    |    1 +
 spec/integration/ssl/certificate_authority_spec.rb |    1 +
 spec/integration/ssl/certificate_request_spec.rb   |    1 +
 .../ssl/certificate_revocation_list_spec.rb        |    1 +
 spec/integration/ssl/host_spec.rb                  |    1 +
 11 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/spec/integration/indirector/bucket_file/rest_spec.rb
b/spec/integration/indirector/bucket_file/rest_spec.rb
index 4d90a8c..dc10faa 100644
--- a/spec/integration/indirector/bucket_file/rest_spec.rb
+++ b/spec/integration/indirector/bucket_file/rest_spec.rb
@@ -17,6 +17,7 @@ describe "Filebucket REST Terminus" do
 
     Puppet.settings[:confdir] = @dir
     Puppet.settings[:vardir] = @dir
+    Puppet.settings[:group] = Process.gid
     Puppet.settings[:server] = "127.0.0.1"
     Puppet.settings[:masterport] = "34343"
 
diff --git a/spec/integration/indirector/certificate/rest_spec.rb
b/spec/integration/indirector/certificate/rest_spec.rb
index 356a7d3..58aa96c 100755
--- a/spec/integration/indirector/certificate/rest_spec.rb
+++ b/spec/integration/indirector/certificate/rest_spec.rb
@@ -17,6 +17,7 @@ describe "Certificate REST Terminus" do
 
     Puppet.settings[:confdir] = @dir
     Puppet.settings[:vardir] = @dir
+    Puppet.settings[:group] = Process.gid
     Puppet.settings[:server] = "127.0.0.1"
     Puppet.settings[:masterport] = "34343"
 
diff --git a/spec/integration/indirector/certificate_request/rest_spec.rb
b/spec/integration/indirector/certificate_request/rest_spec.rb
index 2c98ef6..c718b78 100755
--- a/spec/integration/indirector/certificate_request/rest_spec.rb
+++ b/spec/integration/indirector/certificate_request/rest_spec.rb
@@ -19,6 +19,7 @@ describe "Certificate Request REST Terminus" do
 
     Puppet.settings[:confdir] = @dir
     Puppet.settings[:vardir] = @dir
+    Puppet.settings[:group] = Process.gid
     Puppet.settings[:server] = "127.0.0.1"
     Puppet.settings[:masterport] = "34343"
 
diff --git
a/spec/integration/indirector/certificate_revocation_list/rest_spec.rb
b/spec/integration/indirector/certificate_revocation_list/rest_spec.rb
index 62a2f80..86f2b01 100755
--- a/spec/integration/indirector/certificate_revocation_list/rest_spec.rb
+++ b/spec/integration/indirector/certificate_revocation_list/rest_spec.rb
@@ -17,6 +17,7 @@ describe "Certificate REST Terminus" do
 
     Puppet.settings[:confdir] = @dir
     Puppet.settings[:vardir] = @dir
+    Puppet.settings[:group] = Process.gid
     Puppet.settings[:server] = "127.0.0.1"
     Puppet.settings[:masterport] = "34343"
 
diff --git a/spec/integration/indirector/report/rest_spec.rb
b/spec/integration/indirector/report/rest_spec.rb
index 089f8fd..fdc2189 100644
--- a/spec/integration/indirector/report/rest_spec.rb
+++ b/spec/integration/indirector/report/rest_spec.rb
@@ -17,6 +17,7 @@ describe "Report REST Terminus" do
 
     Puppet.settings[:confdir] = @dir
     Puppet.settings[:vardir] = @dir
+    Puppet.settings[:group] = Process.gid
     Puppet.settings[:server] = "127.0.0.1"
     Puppet.settings[:masterport] = "34343"
 
diff --git a/spec/integration/indirector/rest_spec.rb
b/spec/integration/indirector/rest_spec.rb
index e904839..14e9e95 100755
--- a/spec/integration/indirector/rest_spec.rb
+++ b/spec/integration/indirector/rest_spec.rb
@@ -39,6 +39,7 @@ describe Puppet::Indirector::REST do
 
     Puppet.settings[:confdir] = @dir
     Puppet.settings[:vardir] = @dir
+    Puppet.settings[:group] = Process.gid
     Puppet.settings[:server] = "127.0.0.1"
     Puppet.settings[:masterport] = "34343"
 
diff --git a/spec/integration/network/server/webrick_spec.rb
b/spec/integration/network/server/webrick_spec.rb
index 2809df7..2b14dfb 100755
--- a/spec/integration/network/server/webrick_spec.rb
+++ b/spec/integration/network/server/webrick_spec.rb
@@ -18,6 +18,7 @@ describe Puppet::Network::Server do
 
       Puppet.settings[:confdir] = @dir
       Puppet.settings[:vardir] = @dir
+      Puppet.settings[:group] = Process.gid
 
       Puppet::SSL::Host.ca_location = :local
 
diff --git a/spec/integration/ssl/certificate_authority_spec.rb
b/spec/integration/ssl/certificate_authority_spec.rb
index be82b5f..fca17b4 100755
--- a/spec/integration/ssl/certificate_authority_spec.rb
+++ b/spec/integration/ssl/certificate_authority_spec.rb
@@ -17,6 +17,7 @@ describe Puppet::SSL::CertificateAuthority do
 
     Puppet.settings[:confdir] = @dir
     Puppet.settings[:vardir] = @dir
+    Puppet.settings[:group] = Process.gid
 
     Puppet::SSL::Host.ca_location = :local
     @ca = Puppet::SSL::CertificateAuthority.new
diff --git a/spec/integration/ssl/certificate_request_spec.rb
b/spec/integration/ssl/certificate_request_spec.rb
index 365ecce..8426b9d 100755
--- a/spec/integration/ssl/certificate_request_spec.rb
+++ b/spec/integration/ssl/certificate_request_spec.rb
@@ -21,6 +21,7 @@ describe Puppet::SSL::CertificateRequest do
 
     Puppet.settings[:confdir] = @dir
     Puppet.settings[:vardir] = @dir
+    Puppet.settings[:group] = Process.gid
 
     Puppet::SSL::Host.ca_location = :none
 
diff --git a/spec/integration/ssl/certificate_revocation_list_spec.rb
b/spec/integration/ssl/certificate_revocation_list_spec.rb
index 127654c..44eee36 100755
--- a/spec/integration/ssl/certificate_revocation_list_spec.rb
+++ b/spec/integration/ssl/certificate_revocation_list_spec.rb
@@ -17,6 +17,7 @@ describe Puppet::SSL::CertificateRevocationList do
 
     Puppet.settings[:confdir] = @dir
     Puppet.settings[:vardir] = @dir
+    Puppet.settings[:group] = Process.gid
 
     Puppet::SSL::Host.ca_location = :local
   end
diff --git a/spec/integration/ssl/host_spec.rb
b/spec/integration/ssl/host_spec.rb
index 9b4152e..05862df 100755
--- a/spec/integration/ssl/host_spec.rb
+++ b/spec/integration/ssl/host_spec.rb
@@ -17,6 +17,7 @@ describe Puppet::SSL::Host do
 
     Puppet.settings[:confdir] = @dir
     Puppet.settings[:vardir] = @dir
+    Puppet.settings[:group] = Process.gid
 
     Puppet::SSL::Host.ca_location = :local
 






PATCH/puppet] [#4219] Install misses command_line dir, puppet $app --help fails
---
 install.rb |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/install.rb b/install.rb
index d35aaa0..b06ec09 100755
--- a/install.rb
+++ b/install.rb
@@ -84,7 +84,7 @@ bins  = glob(%w{bin/*})
 rdoc  = glob(%w{bin/* sbin/* lib/**/*.rb README README-library CHANGELOG
TODO Install}).reject { |e| e=~ /\.(bat|cmd)$/ }
 ri    = glob(%w{bin/*.rb sbin/* lib/**/*.rb}).reject { |e| e=~
/\.(bat|cmd)$/ }
 man   = glob(%w{man/man[0-9]/*})
-libs  = glob(%w{lib/**/*.rb lib/**/*.py})
+libs  = glob(%w{lib/**/*.rb lib/**/*.py lib/puppet/util/command_line/*})
 tests = glob(%w{test/**/*.rb})
 
 def do_bins(bins, target, strip = 's?bin/')








PATCH/puppet 1/1] [#4247] storeconfigs was calling Puppet::Parser::Resource.new with the wrong argu
When the interface to Puppet::Resource changed, its subclass
Puppet::Parser::Resource was also affected. One case of initializing
those objects did not get updated when the code changed, causing
storeconfigs to break.

Also, this patch adds a error message that would have made it easier to
catch this problem (as puppet could consume all memory and die trying to
print the old error message)

Signed-off-by: Jesse Wolfe <jes5### @gmail.com>
---
 lib/puppet/rails/resource.rb     |    6 +++---
 lib/puppet/resource.rb           |    3 +++
 spec/unit/rails/resource_spec.rb |   16 ++++++++++++++++
 spec/unit/resource_spec.rb       |    6 ++++++
 4 files changed, 28 insertions(+), 3 deletions(-)

diff --git a/lib/puppet/rails/resource.rb b/lib/puppet/rails/resource.rb
index a5cdd0c..cac9de2 100644
--- a/lib/puppet/rails/resource.rb
+++ b/lib/puppet/rails/resource.rb
@@ -212,16 +212,16 @@ class Puppet::Rails::Resource <
ActiveRecord::Base
     end
     hash[:scope] = scope
     hash[:source] = scope.source
-    hash[:params] = []
+    hash[:parameters] = []
     names = []
     self.param_names.each do |pname|
       # We can get the same name multiple times because of how the
       # db layout works.
       next if names.include?(pname.name)
       names << pname.name
-      hash[:params] << pname.to_resourceparam(self, scope.source)
+      hash[:parameters] << pname.to_resourceparam(self,
scope.source)
     end
-    obj = Puppet::Parser::Resource.new(hash)
+    obj = Puppet::Parser::Resource.new(hash["type"], hash["title"], hash)
 
     # Store the ID, so we can check if we're re-collecting the same
resource.
     obj.rails_id = self.id
diff --git a/lib/puppet/resource.rb b/lib/puppet/resource.rb
index 31237e3..d68e0ee 100644
--- a/lib/puppet/resource.rb
+++ b/lib/puppet/resource.rb
@@ -409,6 +409,9 @@ class Puppet::Resource
     if    (argtitle || argtype) =~ /^([^\[\]]+)\[(.+)\]$/m then [ $1,    
            $2            ]
     elsif argtitle                                         then [
argtype,            argtitle      ]
     elsif argtype.is_a?(Puppet::Type)                      then [
argtype.class.name, argtype.title ]
+    elsif argtype.is_a?(Hash)                              then
+      raise ArgumentError, "Puppet::Resource.new does not take a hash as
the first argument. "+
+        "Did you mean (#{(argtype[:type] || argtype["type"]).inspect},
#{(argtype[:title] || argtype["title"]).inspect }) ?"
     else raise ArgumentError, "No title provided and #{argtype.inspect}
is not a valid resource reference"
     end
   end
diff --git a/spec/unit/rails/resource_spec.rb
b/spec/unit/rails/resource_spec.rb
index ac74693..08deda6 100755
--- a/spec/unit/rails/resource_spec.rb
+++ b/spec/unit/rails/resource_spec.rb
@@ -104,4 +104,20 @@ describe "Puppet::Rails::Resource" do
       @resource.merge_parameters(merge_resource)
     end
   end
+
+  describe "#to_resource" do
+    it "should instantiate a Puppet::Parser::Resource" do
+      scope = stub "scope", :source => nil
+
+      @resource = Puppet::Rails::Resource.new
+      @resource.stubs(:attributes).returns({
+        "restype" => 'notify',
+        "title"   => 'hello'
+      })
+      @resource.stubs(:param_names).returns([])
+
+      @resource.to_resource(scope).should be_a(Puppet::Parser::Resource)
+
+    end
+  end
 end
diff --git a/spec/unit/resource_spec.rb b/spec/unit/resource_spec.rb
index 95f0dd0..204a2b0 100755
--- a/spec/unit/resource_spec.rb
+++ b/spec/unit/resource_spec.rb
@@ -98,6 +98,12 @@ describe Puppet::Resource do
     lambda { Puppet::Resource.new("foo") }.should
raise_error(ArgumentError)
   end
 
+  it "should fail if the title is a hash and the type is not a valid
resource reference string" do
+    lambda { Puppet::Resource.new({:type => "foo", :title =>
"bar"}) }.should raise_error(ArgumentError,
+      'Puppet::Resource.new does not take a hash as the first argument.
Did you mean ("foo", "bar") ?'
+    )
+  end
+
   it "should be able to produce a backward-compatible reference array" do
     Puppet::Resource.new("foobar", "/f").to_trans_ref.should == %w{Foobar
/f}
   end






PATCH/puppet 1/1] Fix #4348 - Puppet doc single manifest broken
The refactoring of using environment instances instead of strings
for initializing the parser, rdoc wasn't updated, thus was unable
to initialize the parser.

Signed-off-by: Brice Figureau <brice-pupp### @daysofwonder.com>
---
 lib/puppet/util/rdoc.rb     |    2 +-
 spec/unit/util/rdoc_spec.rb |   13 +++++++++++++
 2 files changed, 14 insertions(+), 1 deletions(-)

diff --git a/lib/puppet/util/rdoc.rb b/lib/puppet/util/rdoc.rb
index 4a80b06..085d8ec 100644
--- a/lib/puppet/util/rdoc.rb
+++ b/lib/puppet/util/rdoc.rb
@@ -41,7 +41,7 @@ module Puppet::Util::RDoc
   def manifestdoc(files)
     Puppet[:ignoreimport] = true
     files.select { |f| FileTest.file?(f) }.each do |f|
-      parser = Puppet::Parser::Parser.new(:environment =>
Puppet[:environment])
+      parser =
Puppet::Parser::Parser.new(Puppet::Node::Environment.new(Puppet[:environment]))
       parser.file = f
       ast = parser.parse
       output(f, ast)
diff --git a/spec/unit/util/rdoc_spec.rb b/spec/unit/util/rdoc_spec.rb
index 65df261..58c2034 100755
--- a/spec/unit/util/rdoc_spec.rb
+++ b/spec/unit/util/rdoc_spec.rb
@@ -75,6 +75,19 @@ describe Puppet::Util::RDoc do
       Puppet::Util::RDoc.manifestdoc([])
     end
 
+    it "should use a parser with the correct environment" do
+      FileTest.stubs(:file?).returns(true)
+      Puppet::Util::RDoc.stubs(:output)
+
+      parser = stub_everything
+      Puppet::Parser::Parser.stubs(:new).with{ |env|
env.is_a?(Puppet::Node::Environment) }.returns(parser)
+
+      parser.expects(:file=).with("file")
+      parser.expects(:parse)
+
+      Puppet::Util::RDoc.manifestdoc(["file"])
+    end
+
     it "should puppet parse all given files" do
       FileTest.stubs(:file?).returns(true)
       Puppet::Util::RDoc.stubs(:output)






PATCH/puppet 1/3] conf/redhat: Rebase rundir-perms patch
---
 conf/redhat/rundir-perms.patch |   26 +++++++++++++
PATCH/puppet 0/4] Some random puppet fix for JRuby
Hi,

Here is the first stab of JRuby Puppet compatibility.
There looks to be more thread issue (the last ones I found are
parser functions initializations), which will be addressed in
subsequent patches.

No patch in this serie have tests, because they most deal with
threading issues that can be reproduced only under JRuby.

Please review,
Brice

Brice Figureau (4):
  JRuby doesn't implement Process.maxgroups
  Fix #4244 - Cached Attributes is not thread safe
  Fix race condition in rack autoloading of request/response
  Fix #4245 - default insertion of ACL is not thread safe

 lib/puppet/network/http/rack.rb       |    3 +++
 lib/puppet/network/rest_authconfig.rb |    9 ++++++---
 lib/puppet/util/cacher.rb             |   31 +++++++++++++++++++++
Announcing Puppet REST API documentation
Puppet finally has some API docs thanks to the hard work of Matt
Robinson (*crowd goes wild*).  You can find the initial documentation at:

http://docs.puppetlabs.com/guides/rest_api.html

We'd really welcome input and feedback on them and what else you'd like
to see:

http://projects.puppetlabs.com/projects/puppet-docs

Thanks

James Turnbull







PATCH/puppet 1/1] [#4347] run_mode was colliding with --mode for "puppet doc"
The run_mode value was incorrectly getting stored to Puppet[:mode], which
was confusing the optparser for applications that declare a --mode
parameter.

Signed-off-by: Jesse Wolfe <jes### @gmail.com>
---
 lib/puppet/application.rb |    2 +-
 lib/puppet/defaults.rb    |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/puppet/application.rb b/lib/puppet/application.rb
index 0a8fbc1..2fec38b 100644
--- a/lib/puppet/application.rb
+++ b/lib/puppet/application.rb
@@ -285,7 +285,7 @@ class Application
       Puppet.settings.set_value(:name, Puppet.application_name.to_s,
:mutable_defaults)
       Puppet.settings.set_value(:logdir, Puppet.run_mode.logopts,
:mutable_defaults)
       Puppet.settings.set_value(:rundir, Puppet.run_mode.run_dir,
:mutable_defaults)
-      Puppet.settings.set_value(:mode, Puppet.run_mode.name.to_s,
:mutable_defaults)
+      Puppet.settings.set_value(:run_mode, Puppet.run_mode.name.to_s,
:mutable_defaults)
     end
 
     require 'puppet'
diff --git a/lib/puppet/defaults.rb b/lib/puppet/defaults.rb
index 84e2d93..0de5f20 100644
--- a/lib/puppet/defaults.rb
+++ b/lib/puppet/defaults.rb
@@ -7,7 +7,7 @@ module Puppet
     :vardir => [Puppet.run_mode.var_dir, "Where Puppet stores dynamic
and growing data.  The default for this parameter is calculated specially,
like `confdir`_."],
     :name => [Puppet.application_name.to_s, "The name of the
application, if we are running as one.  The
       default is essentially $0 without the path or ``.rb``."],
-    :mode => [Puppet.run_mode.name.to_s, "The effective 'run mode' of
the application: master, agent, or user."]
+    :run_mode => [Puppet.run_mode.name.to_s, "The effective 'run mode'
of the application: master, agent, or user."]
   )
 
   setdefaults(:main, :logdir => Puppet.run_mode.logopts)






DO NOT REPLY Documentation patch for setclasspath.sh
https://issues.apache.org/bugzilla/show_bug.cgi?id=49182

Mark Thomas <mar### @apache.org> changed:

           What    |Removed                     |Added

PATCH/puppet 1/1] Possible fix for #4297
This fix is based on refactoring Jesse's empirically derived solution
guided by
the assumption that #4297 was introduced / exposed by the fix for #4270; I
do
not have a global understanding of the code here, but am just making an
adjustment that 1) slightly reduces the code complexity, 2) doesn't appear
to
break anything, 3) empirically fixes the observed problem, 4) makes since
in
that resource classes shouldn't have to consult a passed-in scope to find
their
own namespaces.

Basically, I'm fixing what I believe was a thinko in a patch that I don't
fully
understand.

Signed-off-by: Markus Roberts <Mark### @reality.com>
---
 lib/puppet/resource/type.rb |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/puppet/resource/type.rb b/lib/puppet/resource/type.rb
index 85c0979..c27a89a 100644
--- a/lib/puppet/resource/type.rb
+++ b/lib/puppet/resource/type.rb
@@ -179,7 +179,7 @@ class Puppet::Resource::Type
 
     unless @parent_type
       raise "Must pass scope to parent_type when called first time"
unless scope
-      unless @parent_type =
scope.environment.known_resource_types.send("find_#{type}",
scope.namespaces, parent)
+      unless @parent_type =
scope.environment.known_resource_types.send("find_#{type}", [names],
parent)
         fail Puppet::ParseError, "Could not find parent resource type
'#{parent}' of type #{type} in #{scope.environment}"
       end
     end






PATCH/puppet 1/1] This commit resolves:
created init provider method self.get_services
  - accepts an array of filenames to exclude when retrieving services.

added unit tests to verify that I can specify files to exclude.

Signed-off-by: Dan Bode <d### @reductivelabs.com>
---
 lib/puppet/provider/service/init.rb       |    9 +++++--
 lib/puppet/provider/service/redhat.rb     |    5 ++++
 spec/unit/provider/service/init_spec.rb   |   35
+++++++++++++++++++++++++++++
 spec/unit/provider/service/redhat_spec.rb |   19 +++++++++++++++
 4 files changed, 65 insertions(+), 3 deletions(-)

diff --git a/lib/puppet/provider/service/init.rb
b/lib/puppet/provider/service/init.rb
index c05a326..58b7f91 100755
--- a/lib/puppet/provider/service/init.rb
+++ b/lib/puppet/provider/service/init.rb
@@ -28,11 +28,13 @@ Puppet::Type.type(:service).provide :init, :parent
=> :base do
 
     # List all services of this type.
     def self.instances
-        self.defpath = [self.defpath] unless self.defpath.is_a? Array
+        get_services(self.defpath)
+    end
 
+    def self.get_services(defpath, exclude=[])
+        defpath = [defpath] unless defpath.is_a? Array
         instances = []
-
-        self.defpath.each do |path|
+        defpath.each do |path|
             unless FileTest.directory?(path)
                 Puppet.debug "Service path %s does not exist" % path
                 next
@@ -47,6 +49,7 @@ Puppet::Type.type(:service).provide :init, :parent =>
:base do
             Dir.entries(path).each do |name|
                 fullpath = File.join(path, name)
                 next if name =~ /^\./
+                next if exclude.include? name 
                 next if not FileTest.executable?(fullpath)
                 instances << new(:name => name, :path =>
path)
             end
diff --git a/lib/puppet/provider/service/redhat.rb
b/lib/puppet/provider/service/redhat.rb
index 45a9074..065efe6 100755
--- a/lib/puppet/provider/service/redhat.rb
+++ b/lib/puppet/provider/service/redhat.rb
@@ -11,6 +11,11 @@ Puppet::Type.type(:service).provide :redhat, :parent
=> :init, :source => :init
 
     defaultfor :operatingsystem => [:redhat, :fedora, :suse, :centos,
:sles, :oel, :ovm]
 
+    def self.instances
+        # this exclude list is all from /sbin/service (5.x), but I did
not exclude kudzu
+        self.get_services(['/etc/init.d/'], ['functions', 'halt',
'killall', 'single', 'linuxconf'])
+    end
+
     def self.defpath
         superclass.defpath
     end
diff --git a/spec/unit/provider/service/init_spec.rb
b/spec/unit/provider/service/init_spec.rb
index 32bfaa2..cabd090 100755
--- a/spec/unit/provider/service/init_spec.rb
+++ b/spec/unit/provider/service/init_spec.rb
@@ -10,6 +10,7 @@ provider_class =
Puppet::Type.type(:service).provider(:init)
 describe provider_class do
 
     before :each do
+        @class = Puppet::Type.type(:service).provider(:init)
         @resource = stub 'resource'
         @resource.stubs(:[]).returns(nil)
         @resource.stubs(:[]).with(:name).returns "myservice"
@@ -22,6 +23,40 @@ describe provider_class do
         @provider.resource = @resource
     end
 
+    describe "when getting all service instances" do
+        before :each do 
+            @services = ['one', 'two', 'three', 'four']
+            Dir.stubs(:entries).returns @services
+            FileTest.stubs(:directory?).returns(true)
+            FileTest.stubs(:executable?).returns(true)
+            @class.stubs(:defpath).returns('tmp')
+        end
+        it "should return instances for all services" do
+            @services.each do |inst|
+                @class.expects(:new).with({:name => inst, :path =>
@class.defpath}).returns("#{inst}_instance")
+            end
+            results = @services.collect {|x| "#{x}_instance"}
+            @class.instances.should == results
+        end
+        it "should omit an array of services from exclude list" do
+            exclude = ['two', 'four']
+            (@services-exclude).each do |inst|
+                @class.expects(:new).with({:name => inst, :path =>
@class.defpath}).returns("#{inst}_instance")
+            end
+            results = (@services-exclude).collect {|x| "#{x}_instance"}
+            @class.get_services(@class.defpath, exclude).should ==
results
+        end
+        it "should omit a single service from the exclude list" do
+            exclude = 'two'
+            (@services-exclude.to_a).each do |inst|
+                @class.expects(:new).with({:name => inst, :path =>
@class.defpath}).returns("#{inst}_instance")
+            end
+            results = @services.reject{|x| x==exclude }.collect {|x|
"#{x}_instance"}
+            @class.get_services(@class.defpath, exclude).should ==
results
+        end
+        it "should use defpath" do
+        end
+    end
 
     describe "when searching for the init script" do
         it "should discard paths that do not exist" do
diff --git a/spec/unit/provider/service/redhat_spec.rb
b/spec/unit/provider/service/redhat_spec.rb
index 47997dc..840b192 100755
--- a/spec/unit/provider/service/redhat_spec.rb
+++ b/spec/unit/provider/service/redhat_spec.rb
@@ -10,6 +10,7 @@ provider_class =
Puppet::Type.type(:service).provider(:redhat)
 describe provider_class do
 
     before :each do
+        @class = Puppet::Type.type(:service).provider(:redhat)
         @resource = stub 'resource'
         @resource.stubs(:[]).returns(nil)
         @resource.stubs(:[]).with(:name).returns "myservice"
@@ -19,6 +20,24 @@ describe provider_class do
         FileTest.stubs(:file?).with('/sbin/service').returns true
         FileTest.stubs(:executable?).with('/sbin/service').returns true
     end
+    
+    # test self.instances
+    describe "when getting all service instances" do
+        before :each do 
+            @services = ['one', 'two', 'three', 'four', 'kudzu',
'functions', 'halt', 'killall', 'single', 'linuxconf']
+            @not_services = ['functions', 'halt', 'killall', 'single',
'linuxconf']
+            Dir.stubs(:entries).returns @services
+            FileTest.stubs(:directory?).returns(true)
+            FileTest.stubs(:executable?).returns(true)
+        end
+        it "should return instances for all services" do
+            (@services-@not_services).each do |inst|
+                @class.expects(:new).with({:name => inst, :path =>
'/etc/init.d/'}).returns("#{inst}_instance")
+            end
+            results = (@services-@not_services).collect {|x|
"#{x}_instance"}
+            @class.instances.should == results
+        end
+    end
 
     it "should have an enabled? method" do
         @provider.should respond_to(:enabled?)






Re: [PATCH/puppet 1/1] extlookup() is a builtin
hey,

There was some reports from joe-mac on irc that it's behaving
inconsistently on 2.6, giving different results between different runs.

I hacked at the code a bit to add a 4th option that will enable copious
amount of debug messages to be printed to hopefully help sort this out.

We should attempt to merge these I gues and ask someone who has 2.6 going
to test, maybe Joe has some time?

----- "Jesse A Wolfe" <jes5### @gmail.com> wrote:

 > Don't we have to move the extlookup code into
 > lib/puppet/parser/functions or something too? (I don't know the
 > answer, but it seems likely).
 
 I did!
 
 > rename from ext/extlookup.rb
 > rename to lib/puppet/parser/functions/
 extlookup.rb
 
 
 On Fri, Jul 23, 2010 at 2:35 PM, Markus Roberts <
 mar### @puppetlabs.com > wrote:
 
 
 Don't we have to move the extlookup code into
 lib/puppet/parser/functions or something too? (I don't know the
 answer, but it seems likely).
 
 -- Markus
 
PATCH/puppet 1/1] extlookup() is a builtin
This patch promotes extlookup() to being a builtin function.
It also adds test and makes some minor tweaks to the code.
The behavior of extlookup has been left unchanged.

Signed-off-by: Jesse Wolfe <jes### @gmail.com>
---
 {ext => lib/puppet/parser/functions}/extlookup.rb |   24 ++----
 spec/unit/parser/functions/extlookup_spec.rb      |   85
+++++++++++++++++++++
 2 files changed, 93 insertions(+), 16 deletions(-)
 rename {ext => lib/puppet/parser/functions}/extlookup.rb (92%)
 create mode 100755 spec/unit/parser/functions/extlookup_spec.rb

diff --git a/ext/extlookup.rb b/lib/puppet/parser/functions/extlookup.rb
similarity index 92%
rename from ext/extlookup.rb
rename to lib/puppet/parser/functions/extlookup.rb
index d87583b..ee230e7 100644
--- a/ext/extlookup.rb
+++ b/lib/puppet/parser/functions/extlookup.rb
@@ -82,11 +82,11 @@ require 'csv'
 module Puppet::Parser::Functions
   newfunction(:extlookup, :type => :rvalue) do |args|
     key = args[0]
-    default = "_ExtUNSET_"
-    datafile = "_ExtUNSET_"
 
-    default = args[1] if args[1]
-    datafile = args[2] if args[2]
+    default  = args[1]
+    datafile = args[2]
+
+    raise Puppet::ParseError, ("extlookup(): wrong number of arguments
(#{args.length}; must be <= 3)") if args.length > 3
 
     extlookup_datadir = lookupvar('extlookup_datadir')
     extlookup_precedence = Array.new
@@ -123,12 +123,13 @@ module Puppet::Parser::Functions
       datafiles << extlookup_datadir + "/#{d}.csv"
     end
 
-    desired = "_ExtUNSET_"
+    desired = nil
 
     datafiles.each do |file|
+      parser = Puppet::Parser::Parser.new(environment)
       parser.watch_file(file) if File.exists?(file)
 
-      if desired == "_ExtUNSET_"
+      if desired.nil?
         if File.exists?(file)
           result = CSV.read(file).find_all do |r|
             r[0] == key
@@ -167,15 +168,6 @@ module Puppet::Parser::Functions
       end
     end
 
-    # don't accidently return nil's and such rather throw a parse error
-    if desired == "_ExtUNSET_" && default == "_ExtUNSET_"
-      raise Puppet::ParseError, "No match found for '#{key}' in any data
file during extlookup()"
-    else
-      desired = default if desired == "_ExtUNSET_"
-    end
-
-    desired
+    desired || default or raise Puppet::ParseError, "No match found for
'#{key}' in any data file during extlookup()"
   end
 end
-
-# vi:tabstop=4:expandtab:ai
diff --git a/spec/unit/parser/functions/extlookup_spec.rb
b/spec/unit/parser/functions/extlookup_spec.rb
new file mode 100755
index 0000000..bf28803
--- /dev/null
+++ b/spec/unit/parser/functions/extlookup_spec.rb
@@ -0,0 +1,85 @@
+#! /usr/bin/env ruby
+
+require File.dirname(__FILE__) + '/../../../spec_helper'
+require 'tempfile'
+
+describe "the extlookup function" do
+
+  before :each do
+    @scope = Puppet::Parser::Scope.new
+    
+   
@scope.stubs(:environment).returns(Puppet::Node::Environment.new('production'))
+  end
+
+  it "should exist" do
+    Puppet::Parser::Functions.function("extlookup").should ==
"function_extlookup"
+  end
+
+  it "should raise a ParseError if there is less than 1 arguments" do
+    lambda { @scope.function_extlookup([]) }.should(
raise_error(Puppet::ParseError))
+  end
+
+  it "should raise a ParseError if there is more than 3 arguments" do
+    lambda { @scope.function_extlookup(["foo", "bar", "baz", "gazonk"])
}.should( raise_error(Puppet::ParseError))
+  end
+
+  it "should return the default" do
+    result = @scope.function_extlookup([ "key", "default"])
+    result.should == "default"
+  end
+
+  it "should lookup the key in a supplied datafile" do
+    t = Tempfile.new('extlookup.csv') do
+      t.puts 'key,value'
+      t.puts 'nonkey,nonvalue'
+      t.close
+
+      result = @scope.function_extlookup([ "key", "default", t.path])
+      result.should == "value"
+    end
+  end
+
+  it "should return an array if the datafile contains more than two
columns" do
+    t = Tempfile.new('extlookup.csv') do
+      t.puts 'key,value1,value2'
+      t.puts 'nonkey,nonvalue,nonvalue'
+      t.close
+
+      result = @scope.function_extlookup([ "key", "default", t.path])
+      result.should == ["value1", "value2"]
+    end
+  end
+
+  it "should raise an error if there's no matching key and no default" do
+    t = Tempfile.new('extlookup.csv') do
+      t.puts 'key,value'
+      t.puts 'nonkey,nonvalue'
+      t.close
+
+      result = @scope.function_extlookup([ "key", nil, t.path])
+      result.should == "value"
+    end
+  end
+
+  describe "should look in $extlookup_datadir for data files listed by
$extlookup_precedence" do
+    before do 
+      @scope.stubs(:lookupvar).with('extlookup_datadir').returns("/tmp")
+     
@scope.stubs(:lookupvar).with('extlookup_precedence').returns(["one","two"])
+      File.open("/tmp/one.csv","w"){|one| one.puts "key,value1" }
+      File.open("/tmp/two.csv","w") do |two|
+        two.puts "key,value2"
+        two.puts "key2,value_two"
+      end
+    end
+
+    it "when the key is in the first file" do
+      result = @scope.function_extlookup([ "key" ])
+      result.should == "value1"
+    end
+
+    it "when the key is in the second file" do
+      result = @scope.function_extlookup([ "key2" ])
+      result.should == "value_two"
+    end
+  end
+end






PATCH/puppet 1/3] vim: added elsif
Signed-off-by: Marc Fournier <marc.fo### @camptocamp.com>
---
 ext/vim/syntax/puppet.vim |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/ext/vim/syntax/puppet.vim b/ext/vim/syntax/puppet.vim
index 80cd91c..81efa92 100644
--- a/ext/vim/syntax/puppet.vim
+++ b/ext/vim/syntax/puppet.vim
@@ -68,7 +68,7 @@ syn match   puppetNotVariable   "\\$\w\+" contained
 syn match   puppetNotVariable   "\\${\w\+}" contained
 
 syn keyword puppetKeyword       import inherits include
-syn keyword puppetControl       case default if else
+syn keyword puppetControl       case default if else elsif
 syn keyword puppetSpecial       true false undef
 
 " comments last overriding everything else






PATCH/puppet 0/3] Updates to Red Hat config files
These are a few minor updates to the conf/redhat files for 2.6.0.  The
last patch is something I've submitted previously but hasn't been
included yet.

Todd Zullinger (3):
  conf/redhat: Rebase rundir-perms patch
  conf/redhat: Update conf/init files for single binary
  conf/redhat: Consistently pass pidfile option to daemon, killproc,
    and status

 conf/redhat/client.init        |   19 +++++++++++--------
 conf/redhat/puppet.conf        |    2 +-
 conf/redhat/rundir-perms.patch |   26 +++++++++++++
PATCH/puppet 2/2] Bandaid for #4285 -- :name vs <namevar>
We sometimes refer to the namevar as its name and sometimes as :name; there
is
no consistant pattern in the code for when this is done one way or the
other.
This problem was exposed by the composite namevar refactor; the present
patch
adjusts the crucial routine to work with either.

Signed-off-by: Markus Roberts <Mar### @reality.com>
---
 lib/puppet/resource.rb |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/lib/puppet/resource.rb b/lib/puppet/resource.rb
index 55874ae..ca7c212 100644
--- a/lib/puppet/resource.rb
+++ b/lib/puppet/resource.rb
@@ -217,7 +217,11 @@ class Puppet::Resource
   end
 
   def uniqueness_key
-    self.to_hash.values_at(*key_attributes.sort_by { |k| k.to_s })
+    # Temporary kludge to deal with inconsistant use patters
+    h = self.to_hash
+    h[namevar] ||= h[:name]
+    h[:name]   ||= h[namevar]
+    h.values_at(*key_attributes.sort_by { |k| k.to_s })
   end
 
   def key_attributes






PATCH/puppet 1/1] Fix for 4314 -- Need to allow '-' in class name for refs
I almost changed this to correspond to the lexer pattern ([a-z0-9][-\w]*)
but
that isn't quite right either (it would reintroduce the '::' problem). 
Another
option I considered was [^\[]+, but that has it's own problems.  In the
end I
just made the minimal change, adding '-' to the acceptable characters.

Signed-off-by: Markus Roberts <Mar### @reality.com>
---
 lib/puppet/resource/catalog.rb |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/puppet/resource/catalog.rb
b/lib/puppet/resource/catalog.rb
index 4b4342d..a8668d8 100644
--- a/lib/puppet/resource/catalog.rb
+++ b/lib/puppet/resource/catalog.rb
@@ -57,7 +57,7 @@ class Puppet::Resource::Catalog < Puppet::SimpleGraph
   end
 
   def title_key_for_ref( ref )
-    ref =~ /^([\w:]+)\[(.*)\]$/m
+    ref =~ /^([-\w:]+)\[(.*)\]$/m
     [$1, $2]
   end