summaryrefslogtreecommitdiffstats
path: root/lib/puppet/util
diff options
context:
space:
mode:
authorMatt Robinson <matt@puppetlabs.com>2011-02-02 16:47:53 -0800
committerMatt Robinson <matt@puppetlabs.com>2011-02-02 16:47:53 -0800
commitd4a468543f1f06d44efdb7e375284b0e65260caf (patch)
tree2dff58c6e2af2cd682a1143af8494ee4bdf99964 /lib/puppet/util
parent6d9cae2e9ca6a56506f679db02ba9abb30a4df91 (diff)
parent876d0503dd93329a73e7f335c10a47330d745293 (diff)
downloadpuppet-d4a468543f1f06d44efdb7e375284b0e65260caf.tar.gz
puppet-d4a468543f1f06d44efdb7e375284b0e65260caf.tar.xz
puppet-d4a468543f1f06d44efdb7e375284b0e65260caf.zip
Merge branch '2.6.x' into next
* 2.6.x: (46 commits) Augmentation of tests for prior commit Fix to fix for #5755 -- backref serialization issues in zaml Fixed #5564 - Added some more fqdn_rand documentation Fixed #4968 - Updated list of options turned on by --test in documentation (#5061) - allow special hostclass/define variables to be evaluated as defaults. (#6107) Fix an error when auditing a file with empty content Remove already initialized constant warning from file_spec.rb tests (#5566) Treat source only File checksums as syntax errors when used with content Rename variable used in File type validation to be more clear Remove invalid "timestamp" and "time", and add missing "ctime" File checksum types. Remove order dependency when specifying source and checksum on File type Bug #5755 -- ZAML generates extra newline in some hash backreferences. bug #5681 -- code fix to handle AIX mount output Bug #5681 -- parse AIX mount command output. Spec for #5681 to allow parsing of AIX mount output in mount provider Fixed #6091 - Changed POSIX path matching to allow multiple leading slashes Bug #6091 -- test leading double-slash in filenames are allowed. Fixed #6071 - Fixed typo and improved exec path error message Fixed #6061 - Allowed -1 as password min/max age Bug #6061 -- verify that negative {min,max}_password_age are accepted. ... Manually Resolved Conflicts: lib/puppet/util/zaml.rb spec/unit/util/zaml_spec.rb
Diffstat (limited to 'lib/puppet/util')
-rw-r--r--lib/puppet/util/checksums.rb14
-rwxr-xr-xlib/puppet/util/command_line/puppetca4
-rwxr-xr-xlib/puppet/util/command_line/puppetd14
-rwxr-xr-xlib/puppet/util/command_line/puppetdoc4
-rwxr-xr-xlib/puppet/util/command_line/puppetmasterd9
-rw-r--r--lib/puppet/util/reference.rb11
-rw-r--r--lib/puppet/util/settings.rb2
7 files changed, 36 insertions, 22 deletions
diff --git a/lib/puppet/util/checksums.rb b/lib/puppet/util/checksums.rb
index 6fdf14ecf..e129301e6 100644
--- a/lib/puppet/util/checksums.rb
+++ b/lib/puppet/util/checksums.rb
@@ -68,7 +68,9 @@ module Puppet::Util::Checksums
nil
end
- alias :ctime_stream :mtime_stream
+ def mtime(content)
+ ""
+ end
# Calculate a checksum using Digest::SHA1.
def sha1(content)
@@ -108,6 +110,12 @@ module Puppet::Util::Checksums
File.stat(filename).send(:ctime)
end
+ alias :ctime_stream :mtime_stream
+
+ def ctime(content)
+ ""
+ end
+
# Return a "no checksum"
def none_file(filename)
""
@@ -119,6 +127,10 @@ module Puppet::Util::Checksums
""
end
+ def none(content)
+ ""
+ end
+
private
# Perform an incremental checksum on a file.
diff --git a/lib/puppet/util/command_line/puppetca b/lib/puppet/util/command_line/puppetca
index 9aa7e907c..317d99881 100755
--- a/lib/puppet/util/command_line/puppetca
+++ b/lib/puppet/util/command_line/puppetca
@@ -27,7 +27,7 @@
# parameter, so you can specify '--ssldir <directory>' as an argument.
#
# See the configuration file documentation at
-# http://reductivelabs.com/projects/puppet/reference/configref.html for
+# http://docs.puppetlabs.com/references/stable/configuration.html for
# the full list of acceptable parameters. A commented list of all
# configuration options can also be generated by running puppet cert with
# '--genconfig'.
@@ -45,7 +45,7 @@
# Remove all files related to a host from puppet cert's storage. This is
# useful when rebuilding hosts, since new certificate signing requests
# will only be honored if puppet cert does not have a copy of a signed
-# certificate for that host. The certificate of the host remains valid.
+# certificate for that host. The certificate of the host is also revoked.
# If '--all' is specified then all host certificates, both signed and
# unsigned, will be removed.
#
diff --git a/lib/puppet/util/command_line/puppetd b/lib/puppet/util/command_line/puppetd
index cb8589c5f..71b28429b 100755
--- a/lib/puppet/util/command_line/puppetd
+++ b/lib/puppet/util/command_line/puppetd
@@ -11,7 +11,7 @@
#
# puppet agent [-D|--daemonize|--no-daemonize] [-d|--debug]
# [--detailed-exitcodes] [--disable] [--enable]
-# [-h|--help] [--fqdn <host name>] [-l|--logdest syslog|<file>|console]
+# [-h|--help] [--certname <host name>] [-l|--logdest syslog|<file>|console]
# [-o|--onetime] [--serve <handler>] [-t|--test] [--noop]
# [--digest <digest>] [--fingerprint] [-V|--version]
# [-v|--verbose] [-w|--waitforcert <seconds>]
@@ -113,10 +113,11 @@
#
# +puppet agent+ exits after executing this.
#
-# fqdn::
-# Set the fully-qualified domain name of the client. This is only used for
-# certificate purposes, but can be used to override the discovered hostname.
-# If you need to use this flag, it is generally an indication of a setup problem.
+# certname::
+# Set the certname (unique ID) of the client. The master reads this unique
+# identifying string, which is usually set to the node's fully-qualified domain
+# name, to determine which configurations the node will receive. Use this option
+# to debug setup problems or implement unusual node identification schemes.
#
# help::
# Print this help message
@@ -150,7 +151,8 @@
#
# test::
# Enable the most common options used for testing. These are +onetime+,
-# +verbose+, +ignorecache, +no-daemonize+, and +no-usecacheonfailure+.
+# +verbose+, +ignorecache, +no-daemonize+, +no-usecacheonfailure+,
+# +detailed-exit-codes+, +no-splay+, and +show_diff+.
#
# noop::
# Use +noop+ mode where the daemon runs in a no-op or dry-run mode. This is useful
diff --git a/lib/puppet/util/command_line/puppetdoc b/lib/puppet/util/command_line/puppetdoc
index 8f24ea5ef..45a9c6518 100755
--- a/lib/puppet/util/command_line/puppetdoc
+++ b/lib/puppet/util/command_line/puppetdoc
@@ -37,7 +37,7 @@
# Specifies the directory where to output the rdoc documentation in 'rdoc' mode.
#
# mode::
-# Determine the output mode. Valid modes are 'text', 'trac', 'pdf' and 'rdoc'. The 'pdf' mode creates PDF formatted files in the /tmp directory. The default mode is 'text'. In 'rdoc' mode you must provide 'manifests-path'
+# Determine the output mode. Valid modes are 'text', 'pdf' and 'rdoc'. The 'pdf' mode creates PDF formatted files in the /tmp directory. The default mode is 'text'. In 'rdoc' mode you must provide 'manifests-path'
#
# reference::
# Build a particular reference. Get a list of references by running +puppet doc --list+.
@@ -47,7 +47,7 @@
#
# = Example
#
-# $ puppet doc -r type > /tmp/type_reference.rst
+# $ puppet doc -r type > /tmp/type_reference.markdown
# or
# $ puppet doc --outputdir /tmp/rdoc --mode rdoc /path/to/manifests
# or
diff --git a/lib/puppet/util/command_line/puppetmasterd b/lib/puppet/util/command_line/puppetmasterd
index baf8a7581..445169820 100755
--- a/lib/puppet/util/command_line/puppetmasterd
+++ b/lib/puppet/util/command_line/puppetmasterd
@@ -9,6 +9,7 @@
#
# puppet master [-D|--daemonize|--no-daemonize] [-d|--debug] [-h|--help]
# [-l|--logdest <file>|console|syslog] [-v|--verbose] [-V|--version]
+# [--compile <nodename>] [--apply <catalog>]
#
# = Description
#
@@ -49,6 +50,14 @@
# version::
# Print the puppet version number and exit.
#
+# compile::
+# Capability to compile a catalogue and output it in JSON from the Puppet master. Uses
+# facts contained in the $vardir/yaml/ directory to compile the catalog.
+#
+# apply::
+# Capability to apply JSON catalog (such as one generated with --compile). You can either specify
+# a JSON file or pipe in JSON from standard input.
+#
# = Example
#
# puppet master
diff --git a/lib/puppet/util/reference.rb b/lib/puppet/util/reference.rb
index 95efeb1c1..a4921ed2a 100644
--- a/lib/puppet/util/reference.rb
+++ b/lib/puppet/util/reference.rb
@@ -120,16 +120,11 @@ class Puppet::Util::Reference
str += "\n\n"
end
- # Remove all trac links.
- def strip_trac(text)
- text.gsub(/`\w+\s+([^`]+)`:trac:/) { |m| $1 }
- end
-
def text
puts output
end
- def to_rest(withcontents = true)
+ def to_markdown(withcontents = true)
# First the header
text = h(@title, 1)
text += "\n\n**This page is autogenerated; any changes will get overwritten** *(last generated on #{Time.now.to_s})*\n\n"
@@ -142,8 +137,4 @@ class Puppet::Util::Reference
text
end
-
- def to_text(withcontents = true)
- strip_trac(to_rest(withcontents))
- end
end
diff --git a/lib/puppet/util/settings.rb b/lib/puppet/util/settings.rb
index ca4ecda35..626ed20eb 100644
--- a/lib/puppet/util/settings.rb
+++ b/lib/puppet/util/settings.rb
@@ -593,7 +593,7 @@ if @config.include?(:run_mode)
end
eachsection do |section|
persection(section) do |obj|
- str += obj.to_config + "\n" unless ReadOnly.include? obj.name
+ str += obj.to_config + "\n" unless ReadOnly.include? obj.name or obj.name == :genconfig
end
end