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 #4485 -- single quoted strings should not treat \n as new line

Re: Setting a user's password with puppet
(38 lines)
Documentation contribution opportunity - Please help!
(55 lines)
Aug 9, 2010
Markus Roberts
Markus Roberts
This is the rest of the change for #4303; James and I discussed various
ways the solution to that ticket needed to be extended but, as neither of
us
committed code, nothing changed.  This is the least implact extension,
which
mimics the behaviour of prior versions.

It leaves open the question: should '\\x' start with a single or double
backslash?  If, as now, '\\x' starts with a double backslash (i.e. single
quote
is the only escapable characterin single quoted strings) a string ending
in a
backslash can not be represented in a single quoted string.

Signed-off-by: Markus Roberts <Mar### @reality.com>
---
 lib/puppet/parser/lexer.rb     |   22 +++++++++++
Reply
Tags: changemimicsextensionimplact
Messages in this thread
Similar Threads
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/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 +-
 .../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.






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] Fixes #4300 - Adjusted Solaris service files
Signed-off-by: James Turnbull <ja### @lovedthanlost.net>
---
 conf/solaris/smf/svc-puppetd       |    2 +-
 conf/solaris/smf/svc-puppetmasterd |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/conf/solaris/smf/svc-puppetd b/conf/solaris/smf/svc-puppetd
index 9036b50..b6cf057 100755
--- a/conf/solaris/smf/svc-puppetd
+++ b/conf/solaris/smf/svc-puppetd
@@ -12,7 +12,7 @@ exec_prefix=/opt/csw
 sysconfdir=/opt/csw/etc
 sbindir=/opt/csw/sbin
 
-pidfile=/var/lib/puppet/run/puppetd.pid
+pidfile=/var/lib/puppet/run/agent.pid
 
 case "$1" in
 start)
diff --git a/conf/solaris/smf/svc-puppetmasterd
b/conf/solaris/smf/svc-puppetmasterd
index 34f5a62..80e3d46 100755
--- a/conf/solaris/smf/svc-puppetmasterd
+++ b/conf/solaris/smf/svc-puppetmasterd
@@ -8,7 +8,7 @@ exec_prefix=/opt/csw
 sysconfdir=/opt/csw/etc
 sbindir=/opt/csw/sbin
 
-pidfile=/var/lib/puppet/run/puppetmasterd.pid
+pidfile=/var/lib/puppet/run/master.pid
 
 case "$1" in
 start)






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] Fix for #4303 -- reverting to old escaping in '-strings
Single quoted used to allow escape on single quotes and pass all other
characters through without comment; now the do again.

Signed-off-by: Markus Roberts <Mark### @reality.com>
---
 lib/puppet/parser/lexer.rb     |    9 ++++-----
 spec/unit/parser/lexer_spec.rb |    3 +++
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/lib/puppet/parser/lexer.rb b/lib/puppet/parser/lexer.rb
index 1e10ff9..aa04f17 100644
--- a/lib/puppet/parser/lexer.rb
+++ b/lib/puppet/parser/lexer.rb
@@ -221,7 +221,7 @@ class Puppet::Parser::Lexer
   TOKENS.add_token :RETURN, "\n", :skip => true, :incr_line =>
true, :skip_text => true
 
   TOKENS.add_token :SQUOTE, "'" do |lexer, value|
-    [TOKENS[:STRING], lexer.slurpstring(value).first ]
+    [TOKENS[:STRING],
lexer.slurpstring(value,["'"],:ignore_invalid_esapes).first ]
   end
 
   DQ_initial_token_types      = {'$' => :DQPRE,'"' => :STRING}
@@ -517,8 +517,7 @@ class Puppet::Parser::Lexer
 
   # we've encountered the start of a string...
   # slurp in the rest of the string and return it
-  Valid_escapes_in_strings = %w{ \\  $ ' " n t s }+["\n"]
-  def slurpstring(terminators)
+  def slurpstring(terminators,escapes=%w{ \\  $ ' " n t s
}+["\n"],ignore_invalid_escapes=false)
     # we search for the next quote that isn't preceded by a
     # backslash; the caret is there to match empty strings
     str = @scanner.scan_until(/([^\\]|^)[#{terminators}]/) or lex_error
"Unclosed quote after '#{last}' in '#{rest}'"
@@ -529,10 +528,10 @@ class Puppet::Parser::Lexer
       when 't'; "\t"
       when 's'; " "
       else
-        if Valid_escapes_in_strings.include? ch and not (ch == '"' and
terminators == "'")
+        if escapes.include? ch
           ch
         else
-          Puppet.warning "Unrecognised escape sequence '\\#{ch}'#{file
&& " in file #{file}"}#{line && " at line #{line}"}"
+          Puppet.warning "Unrecognised escape sequence '\\#{ch}'#{file
&& " in file #{file}"}#{line && " at line #{line}"}" unless
ignore_invalid_escapes
           "\\#{ch}"
         end
       end
diff --git a/spec/unit/parser/lexer_spec.rb
b/spec/unit/parser/lexer_spec.rb
index d3d2a0a..a85d1b2 100755
--- a/spec/unit/parser/lexer_spec.rb
+++ b/spec/unit/parser/lexer_spec.rb
@@ -410,6 +410,9 @@ describe Puppet::Parser::Lexer,"when lexing strings"
do
     %q{'single quoted string')}                                     =>
[[:STRING,'single quoted string']],
     %q{"double quoted string"}                                      =>
[[:STRING,'double quoted string']],
     %q{'single quoted string with an escaped "\\'"'}                =>
[[:STRING,'single quoted string with an escaped "\'"']],
+    %q{'single quoted string with an escaped "\$"'}                 =>
[[:STRING,'single quoted string with an escaped "\$"']],
+    %q{'single quoted string with an escaped "\."'}                 =>
[[:STRING,'single quoted string with an escaped "\."']],
+    %q{'single quoted string with an escaped "\\\\"'}               =>
[[:STRING,'single quoted string with an escaped "\\\\"']],
     %q{"string with an escaped '\\"'"}                              =>
[[:STRING,"string with an escaped '\"'"]],
     %q{"string with an escaped '\\$'"}                              =>
[[:STRING,"string with an escaped '$'"]],
     %q{"string with $v (but no braces)"}                            =>
[[:DQPRE,"string with "],[:VARIABLE,'v'],[:DQPOST,' (but no braces)']],






PATCH/puppet 2/3] conf/redhat: Update conf/init files for single binary
---
 conf/redhat/client.init |    2 +-
 conf/redhat/puppet.conf |    2 +-
 conf/redhat/server.init |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/conf/redhat/client.init b/conf/redhat/client.init
index 0c98383..04e0d27 100644
--- a/conf/redhat/client.init
+++ b/conf/redhat/client.init
@@ -15,7 +15,7 @@ export PATH
 
 [ -f /etc/sysconfig/puppet ] && . /etc/sysconfig/puppet
 lockfile=${LOCKFILE-/var/lock/subsys/puppet}
-pidfile=${PIDFILE-/var/run/puppet/puppetd.pid}
+pidfile=${PIDFILE-/var/run/puppet/agent.pid}
 puppetd=${PUPPETD-/usr/sbin/puppetd}
 RETVAL=0
 
diff --git a/conf/redhat/puppet.conf b/conf/redhat/puppet.conf
index d35593f..47501a3 100644
--- a/conf/redhat/puppet.conf
+++ b/conf/redhat/puppet.conf
@@ -11,7 +11,7 @@
     # The default value is '$confdir/ssl'.
     ssldir = $vardir/ssl
 
-[puppetd]
+[agent]
     # 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``
diff --git a/conf/redhat/server.init b/conf/redhat/server.init
index 4f44206..3d2897d 100644
--- a/conf/redhat/server.init
+++ b/conf/redhat/server.init
@@ -13,7 +13,7 @@ PATH=/usr/bin:/sbin:/bin:/usr/sbin
 export PATH
 
 lockfile=/var/lock/subsys/puppetmaster
-pidfile=/var/run/puppet/puppetmasterd.pid
+pidfile=/var/run/puppet/master.pid
 
 # Source function library.
 . /etc/rc.d/init.d/functions






PATCH 00/10]: More fixes to the core drivers
This patch series fixes a number of bugs I came across while testing out
various drivers with condor.  The fixes are explained in the individual
patches.

Chris Lalancette



Re: Camel-csv 2.2.0: reading a single line csv file
I have committed a modification in camel bindy to be able to work with
",".
that means that we use as separator the double quotes --> '","' 

See test class
https://svn.apache.org/repos/asf/came...marshallTest.java


to have an example 

KR,

Charles

Claus Ibsen-2 wrote:
 
 On Tue, May 4, 2010 at 5:19 PM, Claus Ibsen
<claus.### @gmail.com> wrote:
> Hi
>
> On Tue, May 4, 2010 at 8:57 AM, Attilio Donà
<attili### @gmail.com>
> wrote:
>>
>> Hi all,
>>
>> I've to read a csv file and I want use camel to do this.
Camel bindy
>> seems
>> to me that doesn't know the csv convention that a field
separator can be
>> a
>> character field using double quotes:
>>
>> "contains,  comma", "another field"
>>
>
> Yeah that would be good to be able to do with camel-bindy. Do you
mind
> creating a JIRA ticket?
>
 
 I have created the JIRA ticket
 https://issues.apache.org/activemq/browse/CAMEL-2691
 
 
>
>> So the adopted solution is camel-csv.
>>
>> Using camel-csv to parse the csv file as in the camel manual
works only
>> if
>> the csv file has more than one line of data:
>>
>> // Some comments here
>> public void doHandleCsvData(List> csvData)
>> {
>>    // do magic here as in the manual if the file as more
than one row of
>> data
>> }
>>
>> If the csv file has 1 row the parameter passed to the method
bean
>> doHandleCsvData is a List.
>>
>> As a quick workaround, instead of using parametrized
generics, it is
>> possible to do something like this:
>>
>>
>>         public void modelsCsvFile(Exchange exchange) {
>>                 List csvData = (List)
exchange.getIn().getBody();
>>
>>                 if
(csvData.get(0).getClass().equals(String.class)) {
>>                         log.debug("single row
file");
>>
>>                         Vendor vendor =
>> vendorDAO.bind((String)csvData.get(0));
>>                         Model model = new
Model(vendor,
>> (String)csvData.get(1));
>>                         modelDAO.bind(model);
>>                         return;
>>                 }
>>
>>                 for (List row : (List)csvData) {
>>                         log.debug("read [{}]
[{}]", row.get(0),
>> row.get(1));
>>
>>                         Vendor vendor =
>> vendorDAO.bind((String)row.get(0));
>>                         Model model = new
Model(vendor,
>> (String)row.get(1));
>>                         modelDAO.bind(model);
>>
>>                 }
>>
>> Attilio
>>
>> --
>> View this message in context:
>>
http://old.nabble.com/Camel-csv-2.2.0...740p28443740.html
>> Sent from the Camel - Users mailing list archive at
Nabble.com.
>>
>
>
>
> --
> Claus Ibsen
> Apache Camel Committer
>
> Author of Camel in Action: http://www.manning.com/ibsen/
> Open Source Integration: http://fusesource.com
> Blog: http://davsclaus.blogspot.com/
> Twitter: http://twitter.com/davsclaus
>
 
 
 
 -- 
 Claus Ibsen
 Apache Camel Committer
 
 Author of Camel in Action: http://www.manning.com/ibsen/
 Open Source Integration: http://fusesource.com
 Blog: http://davsclaus.blogspot.com/
 Twitter: http://twitter.com/davsclaus
 
 


-----
Charles Moulliard
SOA Architect

My Blog :  http://cmoulliard.blogspot.com/ http://cmoulliard.blogspot.com/
 




Re: Camel-csv 2.2.0: reading a single line csv file
Do you want also that the CSV generated contain double quotes like
"xxxx","yyyy " ?

KR,

charles

Claus Ibsen-2 wrote:
 
 Hi
 
 On Tue, May 4, 2010 at 8:57 AM, Attilio Donà
<attilio### @gmail.com>
 wrote:
>
> Hi all,
>
> I've to read a csv file and I want use camel to do this. Camel
bindy
> seems
> to me that doesn't know the csv convention that a field separator
can be
> a
> character field using double quotes:
>
> "contains,  comma", "another field"
>
 
 Yeah that would be good to be able to do with camel-bindy. Do you
mind
 creating a JIRA ticket?
 
 
> So the adopted solution is camel-csv.
>
> Using camel-csv to parse the csv file as in the camel manual
works only
> if
> the csv file has more than one line of data:
>
> // Some comments here
> public void doHandleCsvData(List> csvData)
> {
>    // do magic here as in the manual if the file as more than
one row of
> data
> }
>
> If the csv file has 1 row the parameter passed to the method bean
> doHandleCsvData is a List.
>
> As a quick workaround, instead of using parametrized generics, it
is
> possible to do something like this:
>
>
>         public void modelsCsvFile(Exchange exchange) {
>                 List csvData = (List)
exchange.getIn().getBody();
>
>                 if
(csvData.get(0).getClass().equals(String.class)) {
>                         log.debug("single row file");
>
>                         Vendor vendor =
> vendorDAO.bind((String)csvData.get(0));
>                         Model model = new
Model(vendor,
> (String)csvData.get(1));
>                         modelDAO.bind(model);
>                         return;
>                 }
>
>                 for (List row : (List)csvData) {
>                         log.debug("read [{}] [{}]",
row.get(0),
> row.get(1));
>
>                         Vendor vendor =
> vendorDAO.bind((String)row.get(0));
>                         Model model = new
Model(vendor,
> (String)row.get(1));
>                         modelDAO.bind(model);
>
>                 }
>
> Attilio
>
> --
> View this message in context:
>
http://old.nabble.com/Camel-csv-2.2.0...740p28443740.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
 
 
 
 -- 
 Claus Ibsen
 Apache Camel Committer
 
 Author of Camel in Action: http://www.manning.com/ibsen/
 Open Source Integration: http://fusesource.com
 Blog: http://davsclaus.blogspot.com/
 Twitter: http://twitter.com/davsclaus
 
 


-----
Charles Moulliard
SOA Architect

My Blog :  http://cmoulliard.blogspot.com/ http://cmoulliard.blogspot.com/
 




PATCH/puppet 1/1] [#4397]+[#4344] Move type-name resolution out of Puppet::Resource into the AST re
Move type-name resolution out of Puppet::Resource into the AST resources.
Move find_resource_type out of Puppet::Resource into Scope
Thus, never pass unqualified type names to Puppet::Resource objects.
Thus, Puppet::Resource objects don't need the namespace property,
and Puppet::Resource objects never consult the harddrive to look for
.pp files that might contain their type definitions,
Thus, performance is improved.

Also removes the temporary fix for #4257 that caused #4397
(The code was too eager to look for a class in the topscope)

Paired-With: Paul Berry <pa### @puppetlabs.com>
Signed-off-by: Jesse Wolfe <jes### @gmail.com>
---
 lib/puppet/parser/ast/resource.rb               |    6 +-
 lib/puppet/parser/ast/resource_reference.rb     |   25 ++++-
 lib/puppet/parser/resource.rb                   |    6 +-
 lib/puppet/parser/scope.rb                      |   14 +++
 lib/puppet/resource.rb                          |  128 +++
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 1/1] [#4467] Make Puppet Master respect facts_terminus settings
* Remove hard-coded facts terminus in master
* Change facts_terminus default to 'yaml' for master and 'facter' for
  everything else.

Paired-with: Matt Robinson <ma### @puppetlabs.com>
Signed-off-by: Rein Henrichs <re### @puppetlabs.com>
---
 lib/puppet/application/master.rb       |    3 ---
 lib/puppet/defaults.rb                 |    2 +-
 spec/unit/indirector/node/ldap_spec.rb |    4 ----
 spec/unit/node/facts_spec.rb           |   15 +++++++++++++--
 4 files changed, 14 insertions(+), 10 deletions(-)

diff --git a/lib/puppet/application/master.rb
b/lib/puppet/application/master.rb
index 777a50e..fde4749 100644
--- a/lib/puppet/application/master.rb
+++ b/lib/puppet/application/master.rb
@@ -138,9 +138,6 @@ class Puppet::Application::Master <
Puppet::Application
 
     Puppet.settings.use :main, :master, :ssl
 
-    # A temporary solution, to at least make the master work for now.
-    Puppet::Node::Facts.terminus_class = :yaml
-
     # Cache our nodes in yaml.  Currently not configurable.
     Puppet::Node.cache_class = :yaml
 
diff --git a/lib/puppet/defaults.rb b/lib/puppet/defaults.rb
index 84e2d93..3c79439 100644
--- a/lib/puppet/defaults.rb
+++ b/lib/puppet/defaults.rb
@@ -115,7 +115,7 @@ module Puppet
     :node_terminus => ["plain", "Where to find information about
nodes."],
     :catalog_terminus => ["compiler", "Where to get node catalogs. 
This is useful to change if, for instance,
       you'd like to pre-compile catalogs and store them in memcached or
some other easily-accessed store."],
-    :facts_terminus => ["facter", "Where to get node facts."],
+    :facts_terminus => [Puppet.application_name.to_s == "master" ?
'yaml' : 'facter', "The node facts terminus."],
     :httplog => { :default => "$logdir/http.log",
       :owner => "root",
       :mode => 0640,
diff --git a/spec/unit/indirector/node/ldap_spec.rb
b/spec/unit/indirector/node/ldap_spec.rb
index f9c5efa..a5f14fc 100755
--- a/spec/unit/indirector/node/ldap_spec.rb
+++ b/spec/unit/indirector/node/ldap_spec.rb
@@ -5,10 +5,6 @@ require File.dirname(__FILE__) + '/../../../spec_helper'
 require 'puppet/indirector/node/ldap'
 
 describe Puppet::Node::Ldap do
-  before do
-    Puppet::Node::Facts.stubs(:terminus_class).returns :yaml
-  end
-
   describe "when searching for a single node" do
     before :each do
       @searcher = Puppet::Node::Ldap.new
diff --git a/spec/unit/node/facts_spec.rb b/spec/unit/node/facts_spec.rb
index a2f4ab9..394db79 100755
--- a/spec/unit/node/facts_spec.rb
+++ b/spec/unit/node/facts_spec.rb
@@ -88,9 +88,20 @@ describe Puppet::Node::Facts, "when indirecting" do
       @facts.save
     end
 
-    it "should default to the 'facter' terminus" do
-      Puppet::Node::Facts.indirection.terminus_class.should == :facter
+    describe "when the Puppet application is 'master'" do
+      it "should default to the 'yaml' terminus" do
+        pending "Cannot test the behavior of defaults in defaults.rb"
+        # Puppet::Node::Facts.indirection.terminus_class.should == :yaml
+      end
     end
+
+    describe "when the Puppet application is not 'master'" do
+      it "should default to the 'facter' terminus" do
+        pending "Cannot test the behavior of defaults in defaults.rb"
+        # Puppet::Node::Facts.indirection.terminus_class.should ==
:facter
+      end
+    end
+
   end
 
   describe "when storing and retrieving" do






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] added md5 support as requested in http://serverfault.com/questions/166199/puppet-
From: Alice Kærast <kaer### @newscloud.com>


Signed-off-by: James Turnbull <ja### @lovedthanlost.net>
---
 lib/puppet/parser/functions/md5.rb |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
 create mode 100644 lib/puppet/parser/functions/md5.rb

diff --git a/lib/puppet/parser/functions/md5.rb
b/lib/puppet/parser/functions/md5.rb
new file mode 100644
index 0000000..f7a4f72
--- /dev/null
+++ b/lib/puppet/parser/functions/md5.rb
@@ -0,0 +1,5 @@
+Puppet::Parser::Functions::newfunction(:md5, :type => :rvalue, :doc
=> "Returns a MD5 hash value from a provided string.") do |args|
+      require 'md5'
+
+      Digest::MD5.hexdigest(args[0])
+end






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 +++++++++++++++++++++
PATCH/puppet 1/1] [#4298] Puppet apply prints an error if the file to apply doesn't exist
Also warns you it's skipping files if you pass it more than one file to
apply.

Reviewed-by: Nick Lewis <nic### @puppetlabs.com>
Signed-off-by: Matt Robinson <ma### @puppetlabs.com>
---
 lib/puppet/application/apply.rb     |    5 ++++-
 spec/unit/application/apply_spec.rb |   24 +++++++++++++++++++++---
 2 files changed, 25 insertions(+), 4 deletions(-)

diff --git a/lib/puppet/application/apply.rb
b/lib/puppet/application/apply.rb
index bb4186d..152b754 100644
--- a/lib/puppet/application/apply.rb
+++ b/lib/puppet/application/apply.rb
@@ -78,7 +78,10 @@ class Puppet::Application::Apply <
Puppet::Application
     if options[:code] or command_line.args.length == 0
       Puppet[:code] = options[:code] || STDIN.read
     else
-      Puppet[:manifest] = command_line.args.shift
+      manifest = command_line.args.shift
+      raise "Could not find file #{manifest}" unless
File.exist?(manifest)
+      Puppet.warning("Only one file can be applied per run.  Skipping
#{command_line.args.join(', ')}") if command_line.args.size > 0
+      Puppet[:manifest] = manifest
     end
 
     # Collect our facts.
diff --git a/spec/unit/application/apply_spec.rb
b/spec/unit/application/apply_spec.rb
index 0b00d1a..8c53136 100755
--- a/spec/unit/application/apply_spec.rb
+++ b/spec/unit/application/apply_spec.rb
@@ -3,6 +3,7 @@
 require File.dirname(__FILE__) + '/../../spec_helper'
 
 require 'puppet/application/apply'
+require 'puppet/file_bucket/dipper'
 
 describe Puppet::Application::Apply do
   before :each do
@@ -53,7 +54,6 @@ describe Puppet::Application::Apply do
       Puppet.stubs(:trap)
       Puppet::Log.stubs(:level=)
       Puppet.stubs(:parse_config)
-      require 'lib/puppet/file_bucket/dipper'
       Puppet::FileBucket::Dipper.stubs(:new)
       STDIN.stubs(:read)
 
@@ -212,7 +212,8 @@ describe Puppet::Application::Apply do
         @apply.main
       end
 
-      it "should set the manifest if some files are passed on command
line" do
+      it "should set the manifest if a file is passed on command line and
the file exists" do
+        File.stubs(:exist?).with('site.pp').returns true
         @apply.command_line.stubs(:args).returns(['site.pp'])
 
         Puppet.expects(:[]=).with(:manifest,"site.pp")
@@ -220,6 +221,23 @@ describe Puppet::Application::Apply do
         @apply.main
       end
 
+      it "should raise an error if a file is passed on command line and
the file does not exist" do
+        File.stubs(:exist?).with('noexist.pp').returns false
+        @apply.command_line.stubs(:args).returns(['noexist.pp'])
+        lambda { @apply.main }.should raise_error(RuntimeError, 'Could
not find file noexist.pp')
+      end
+
+      it "should set the manifest to the first file and warn other files
will be skipped" do
+        File.stubs(:exist?).with('starwarsIV').returns true
+        File.expects(:exist?).with('starwarsI').never
+        @apply.command_line.stubs(:args).returns(['starwarsIV',
'starwarsI', 'starwarsII'])
+
+        Puppet.expects(:[]=).with(:manifest,"starwarsIV")
+        Puppet.expects(:warning).with('Only one file can be applied per
run.  Skipping starwarsI, starwarsII')
+
+        @apply.main
+      end
+
       it "should collect the node facts" do
         Puppet::Node::Facts.expects(:find).returns(@facts)
 
@@ -232,7 +250,7 @@ describe Puppet::Application::Apply do
         lambda { @apply.main }.should raise_error
       end
 
-      it "should find the node" do
+      it "should look for the node" do
         Puppet::Node.expects(:find).returns(@node)
 
         @apply.main






Using double-quoted string to a variable
I am trying to get CSVDataSetConfig to read a file and store each line to a
variable. It works fine when the file doesn't have any quotes in the text.
It works with single quotes as well. But when I have double quotes in the
text, I get the following exception in JMeter log. Is there a work around
for this? Thanks for your help.

2010/06/08 18:59:41 INFO  - jmeter.services.FileServer: Stored: msgs.txt
2010/06/08 18:59:41 ERROR - jmeter.config.CSVDataSet: java.io.IOException:
Cannot have quote-char in plain field:[<?xml version
="]