From 83f878e2304595f803e105abb9b5e77d7ce3272a Mon Sep 17 00:00:00 2001 From: James Turnbull Date: Mon, 29 Nov 2010 18:37:44 +1100 Subject: Renamed Reductive to Puppet I swear I've done this before. *confused* --- ext/nagios/naggen | 2 +- ext/puppet-test | 2 +- lib/puppet/util/command_line/filebucket | 2 +- lib/puppet/util/command_line/pi | 2 +- lib/puppet/util/command_line/puppet | 2 +- lib/puppet/util/command_line/puppetca | 2 +- lib/puppet/util/command_line/puppetd | 2 +- lib/puppet/util/command_line/puppetdoc | 4 ++-- lib/puppet/util/command_line/puppetmasterd | 2 +- lib/puppet/util/command_line/puppetqd | 2 +- lib/puppet/util/command_line/puppetrun | 2 +- lib/puppet/util/command_line/ralsh | 2 +- man/man8/filebucket.8 | 2 +- man/man8/pi.8 | 2 +- man/man8/puppetca.8 | 2 +- man/man8/puppetd.8 | 2 +- man/man8/puppetdoc.8 | 4 ++-- man/man8/puppetmasterd.8 | 2 +- man/man8/puppetqd.8 | 2 +- man/man8/puppetrun.8 | 2 +- man/man8/ralsh.8 | 2 +- test/test | 2 +- 22 files changed, 24 insertions(+), 24 deletions(-) diff --git a/ext/nagios/naggen b/ext/nagios/naggen index a9e04c47a..c6ca15a55 100755 --- a/ext/nagios/naggen +++ b/ext/nagios/naggen @@ -63,7 +63,7 @@ # # = Copyright # -# Copyright (c) 2009 Reductive Labs, LLC +# Copyright (c) 2009 Puppet Labs, LLC # Licensed under the GPL 2 require 'puppet' diff --git a/ext/puppet-test b/ext/puppet-test index 61397e74b..f2648c9ee 100755 --- a/ext/puppet-test +++ b/ext/puppet-test @@ -90,7 +90,7 @@ # # = Copyright # -# Copyright (c) 2005, 2006 Reductive Labs, LLC +# Copyright (c) 2005, 2006 Puppet Labs, LLC # Licensed under the GNU Public License # Do an initial trap, so that cancels don't get a stack trace. diff --git a/lib/puppet/util/command_line/filebucket b/lib/puppet/util/command_line/filebucket index 8302d7b12..34b01508e 100755 --- a/lib/puppet/util/command_line/filebucket +++ b/lib/puppet/util/command_line/filebucket @@ -91,7 +91,7 @@ # # = Copyright # -# Copyright (c) 2005 Reductive Labs, LLC +# Copyright (c) 2005 Puppet Labs, LLC # Licensed under the GNU Public License #Puppet::Application[:filebucket].run diff --git a/lib/puppet/util/command_line/pi b/lib/puppet/util/command_line/pi index ae3c46e9a..3d80eea8f 100755 --- a/lib/puppet/util/command_line/pi +++ b/lib/puppet/util/command_line/pi @@ -42,7 +42,7 @@ # # = Copyright # -# Copyright (c) 2005 Reductive Labs, LLC +# Copyright (c) 2005 Puppet Labs, LLC # Licensed under the GNU Public License #Puppet::Application[:describe].run diff --git a/lib/puppet/util/command_line/puppet b/lib/puppet/util/command_line/puppet index 7b6c0ae7f..e75b92af8 100755 --- a/lib/puppet/util/command_line/puppet +++ b/lib/puppet/util/command_line/puppet @@ -63,7 +63,7 @@ # # = Copyright # -# Copyright (c) 2005 Reductive Labs, LLC +# Copyright (c) 2005 Puppet Labs, LLC # Licensed under the GNU Public License #Puppet::Application[:apply].run diff --git a/lib/puppet/util/command_line/puppetca b/lib/puppet/util/command_line/puppetca index 4f1a88da5..9aa7e907c 100755 --- a/lib/puppet/util/command_line/puppetca +++ b/lib/puppet/util/command_line/puppetca @@ -104,7 +104,7 @@ # # = Copyright # -# Copyright (c) 2005 Reductive Labs, LLC +# Copyright (c) 2005 Puppet Labs, LLC # Licensed under the GNU Public License #Puppet::Application[:cert].run diff --git a/lib/puppet/util/command_line/puppetd b/lib/puppet/util/command_line/puppetd index 571b15486..cb8589c5f 100755 --- a/lib/puppet/util/command_line/puppetd +++ b/lib/puppet/util/command_line/puppetd @@ -180,7 +180,7 @@ # # = Copyright # -# Copyright (c) 2005, 2006 Reductive Labs, LLC +# Copyright (c) 2005, 2006 Puppet Labs, LLC # Licensed under the GNU Public License #Puppet::Application[:agent].run diff --git a/lib/puppet/util/command_line/puppetdoc b/lib/puppet/util/command_line/puppetdoc index 0fa1830d6..8f24ea5ef 100755 --- a/lib/puppet/util/command_line/puppetdoc +++ b/lib/puppet/util/command_line/puppetdoc @@ -3,7 +3,7 @@ # # = Synopsis # -# Generate a reference for all Puppet types. Largely meant for internal Reductive +# Generate a reference for all Puppet types. Largely meant for internal Puppet # Labs use. # # = Usage @@ -61,7 +61,7 @@ # # = Copyright # -# Copyright (c) 2005-2007 Reductive Labs, LLC +# Copyright (c) 2005-2007 Puppet Labs, LLC # Licensed under the GNU Public License #Puppet::Application[:doc].run diff --git a/lib/puppet/util/command_line/puppetmasterd b/lib/puppet/util/command_line/puppetmasterd index 74efb3818..baf8a7581 100755 --- a/lib/puppet/util/command_line/puppetmasterd +++ b/lib/puppet/util/command_line/puppetmasterd @@ -59,7 +59,7 @@ # # = Copyright # -# Copyright (c) 2005 Reductive Labs, LLC +# Copyright (c) 2005 Puppet Labs, LLC # Licensed under the GNU Public License #Puppet::Application[:master].run diff --git a/lib/puppet/util/command_line/puppetqd b/lib/puppet/util/command_line/puppetqd index 48fc952bd..81963d537 100755 --- a/lib/puppet/util/command_line/puppetqd +++ b/lib/puppet/util/command_line/puppetqd @@ -47,7 +47,7 @@ # # = Copyright # -# Copyright (c) 2009 Reductive Labs, LLC +# Copyright (c) 2009 Puppet Labs, LLC # Licensed under the GNU Public License #Puppet::Application[:queue].run diff --git a/lib/puppet/util/command_line/puppetrun b/lib/puppet/util/command_line/puppetrun index 27cd775b9..7eba3b2c4 100755 --- a/lib/puppet/util/command_line/puppetrun +++ b/lib/puppet/util/command_line/puppetrun @@ -120,7 +120,7 @@ # # = Copyright # -# Copyright (c) 2005 Reductive Labs, LLC +# Copyright (c) 2005 Puppet Labs, LLC # Licensed under the GNU Public License #Puppet::Application[:kick].run diff --git a/lib/puppet/util/command_line/ralsh b/lib/puppet/util/command_line/ralsh index 83338fcbc..5c1f719e2 100755 --- a/lib/puppet/util/command_line/ralsh +++ b/lib/puppet/util/command_line/ralsh @@ -83,7 +83,7 @@ # # = Copyright # -# Copyright (c) 2005-2007 Reductive Labs, LLC +# Copyright (c) 2005-2007 Puppet Labs, LLC # Licensed under the GNU Public License #Puppet::Application[:resource].run diff --git a/man/man8/filebucket.8 b/man/man8/filebucket.8 index 60a6eb28e..59afc2ed3 100644 --- a/man/man8/filebucket.8 +++ b/man/man8/filebucket.8 @@ -102,4 +102,4 @@ server: The server to send the file to, instead of locally\. verbose: Print extra information\. . .P -version: Print version information\.puppet filebucket \-b /tmp/filebucket /my/fileLuke KaniesCopyright (c) 2005 Reductive Labs, LLC Licensed under the GNU Public License +version: Print version information\.puppet filebucket \-b /tmp/filebucket /my/fileLuke KaniesCopyright (c) 2005 Puppet Labs, LLC Licensed under the GNU Public License diff --git a/man/man8/pi.8 b/man/man8/pi.8 index e8f5ab531..b70a128e7 100644 --- a/man/man8/pi.8 +++ b/man/man8/pi.8 @@ -14,4 +14,4 @@ list: List all types meta: List all metaparameters . .P -short: List only parameters without detailpuppet describe \-\-list puppet describe file \-\-providers puppet describe user \-s \-mDavid LutterkortCopyright (c) 2005 Reductive Labs, LLC Licensed under the GNU Public License +short: List only parameters without detailpuppet describe \-\-list puppet describe file \-\-providers puppet describe user \-s \-mDavid LutterkortCopyright (c) 2005 Puppet Labs, LLC Licensed under the GNU Public License diff --git a/man/man8/puppetca.8 b/man/man8/puppetca.8 index 17369aa20..62fa7a5bf 100644 --- a/man/man8/puppetca.8 +++ b/man/man8/puppetca.8 @@ -166,4 +166,4 @@ verify: Verify the named certificate against the local CA .fi . .IP "" 0 -$ puppet cert \-l culain\.madstop\.com $ puppet cert \-s culain\.madstop\.comLuke KaniesCopyright (c) 2005 Reductive Labs, LLC Licensed under the GNU Public License +$ puppet cert \-l culain\.madstop\.com $ puppet cert \-s culain\.madstop\.comLuke KaniesCopyright (c) 2005 Puppet Labs, LLC Licensed under the GNU Public License diff --git a/man/man8/puppetd.8 b/man/man8/puppetd.8 index 32aede791..861137553 100644 --- a/man/man8/puppetd.8 +++ b/man/man8/puppetd.8 @@ -280,4 +280,4 @@ waitforcert: This option only matters for daemons that do not yet .fi . .IP "" 0 -puppet agent \-\-server puppet\.domain\.comLuke KaniesCopyright (c) 2005, 2006 Reductive Labs, LLC Licensed under the GNU Public License +puppet agent \-\-server puppet\.domain\.comLuke KaniesCopyright (c) 2005, 2006 Puppet Labs, LLC Licensed under the GNU Public License diff --git a/man/man8/puppetdoc.8 b/man/man8/puppetdoc.8 index 5fc01c2ba..47df0e764 100644 --- a/man/man8/puppetdoc.8 +++ b/man/man8/puppetdoc.8 @@ -2,7 +2,7 @@ .\" http://github.com/rtomayko/ronn/tree/0.7.3 . .TH "PUPPETDOC" "8" "August 2010" "" "" -Generate a reference for all Puppet types\. Largely meant for internal Reductive Labs use\.puppet doc [\-a|\-\-all] [\-h|\-\-help] [\-o|\-\-outputdir \fIrdoc outputdir\fR] [\-m|\-\-mode \fItext|pdf|rdoc\fR] +Generate a reference for all Puppet types\. Largely meant for internal Puppet Labs use\.puppet doc [\-a|\-\-all] [\-h|\-\-help] [\-o|\-\-outputdir \fIrdoc outputdir\fR] [\-m|\-\-mode \fItext|pdf|rdoc\fR] . .IP "" 4 . @@ -105,4 +105,4 @@ $ puppet doc /etc/puppet/manifests/site\.pp or . .P -$ puppet doc \-m pdf \-r configurationLuke KaniesCopyright (c) 2005\-2007 Reductive Labs, LLC Licensed under the GNU Public License +$ puppet doc \-m pdf \-r configurationLuke KaniesCopyright (c) 2005\-2007 Puppet Labs, LLC Licensed under the GNU Public License diff --git a/man/man8/puppetmasterd.8 b/man/man8/puppetmasterd.8 index 3ae567a69..dde93a3d6 100644 --- a/man/man8/puppetmasterd.8 +++ b/man/man8/puppetmasterd.8 @@ -49,4 +49,4 @@ logdest: Where to send messages\. Choose between syslog, the verbose: Enable verbosity\. . .P -version: Print the puppet version number and exit\.puppet masterLuke KaniesCopyright (c) 2005 Reductive Labs, LLC Licensed under the GNU Public License +version: Print the puppet version number and exit\.puppet masterLuke KaniesCopyright (c) 2005 Puppet Labs, LLC Licensed under the GNU Public License diff --git a/man/man8/puppetqd.8 b/man/man8/puppetqd.8 index 137a13af3..f630c74a5 100644 --- a/man/man8/puppetqd.8 +++ b/man/man8/puppetqd.8 @@ -17,4 +17,4 @@ help: Print this help message verbose: Turn on verbose reporting\. . .P -version: Print the puppet version number and exit\.puppet queueLuke KaniesCopyright (c) 2009 Reductive Labs, LLC Licensed under the GNU Public License +version: Print the puppet version number and exit\.puppet queueLuke KaniesCopyright (c) 2009 Puppet Labs, LLC Licensed under the GNU Public License diff --git a/man/man8/puppetrun.8 b/man/man8/puppetrun.8 index b3c27c3a7..09fa31b15 100644 --- a/man/man8/puppetrun.8 +++ b/man/man8/puppetrun.8 @@ -170,4 +170,4 @@ test: Print the hosts you would connect to but do not ping:: . .P -Do a ICMP echo against the target host\. Skip hosts that don\'t respond to ping\.sudo puppet kick \-p 10 \-t remotefile \-t webserver host1 host2Luke KaniesCopyright (c) 2005 Reductive Labs, LLC Licensed under the GNU Public License +Do a ICMP echo against the target host\. Skip hosts that don\'t respond to ping\.sudo puppet kick \-p 10 \-t remotefile \-t webserver host1 host2Luke KaniesCopyright (c) 2005 Puppet Labs, LLC Licensed under the GNU Public License diff --git a/man/man8/ralsh.8 b/man/man8/ralsh.8 index e387e2324..bdc81e90a 100644 --- a/man/man8/ralsh.8 +++ b/man/man8/ralsh.8 @@ -82,4 +82,4 @@ Print extra information\.This example uses \fBpuppet resource\fR to return Puppe .fi . .IP "" 0 -Luke KaniesCopyright (c) 2005\-2007 Reductive Labs, LLC Licensed under the GNU Public License +Luke KaniesCopyright (c) 2005\-2007 Puppet Labs, LLC Licensed under the GNU Public License diff --git a/test/test b/test/test index 097885751..c8b9b08ef 100755 --- a/test/test +++ b/test/test @@ -68,7 +68,7 @@ # # = Copyright # -# Copyright (c) 2005 Reductive Labs, LLC +# Copyright (c) 2005 Puppet Labs, LLC # Licensed under the GNU Public License require 'find' -- cgit From 779fea867a9e23ad48cd877a88756cc5792e9e0c Mon Sep 17 00:00:00 2001 From: Nigel Kersten Date: Mon, 15 Nov 2010 12:36:34 -0800 Subject: (#5304) Use internal_name rather than real_name for maillist provider We've switched to using list_lists --bare which shows the internal_name rather than "real_name", which is the authoritative identifier. Doing this also means we have less output to scrub, so the code is simpler. Signed-off-by: Nigel Kersten --- lib/puppet/provider/maillist/mailman.rb | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/lib/puppet/provider/maillist/mailman.rb b/lib/puppet/provider/maillist/mailman.rb index 4fdc20a69..633642af7 100755 --- a/lib/puppet/provider/maillist/mailman.rb +++ b/lib/puppet/provider/maillist/mailman.rb @@ -2,11 +2,11 @@ require 'puppet/provider/parsedfile' Puppet::Type.type(:maillist).provide(:mailman) do if [ "CentOS", "RedHat", "Fedora" ].any? { |os| Facter.value(:operatingsystem) == os } - commands :list_lists => "/usr/lib/mailman/bin/list_lists", :rmlist => "/usr/lib/mailman/bin/rmlist", :newlist => "/usr/lib/mailman/bin/newlist" + commands :list_lists => "/usr/lib/mailman/bin/list_lists --bare", :rmlist => "/usr/lib/mailman/bin/rmlist", :newlist => "/usr/lib/mailman/bin/newlist" commands :mailman => "/usr/lib/mailman/mail/mailman" else # This probably won't work for non-Debian installs, but this path is sure not to be in the PATH. - commands :list_lists => "list_lists", :rmlist => "rmlist", :newlist => "newlist" + commands :list_lists => "list_lists --bare", :rmlist => "rmlist", :newlist => "newlist" commands :mailman => "/var/lib/mailman/mail/mailman" end @@ -14,10 +14,9 @@ Puppet::Type.type(:maillist).provide(:mailman) do # Return a list of existing mailman instances. def self.instances - list_lists.split("\n").reject { |line| line.include?("matching mailing lists") }.collect do |line| - name, description = line.sub(/^\s+/, '').sub(/\s+$/, '').split(/\s+-\s+/) - description = :absent if description.include?("no description available") - new(:ensure => :present, :name => name, :description => description) + list_lists.split("\n").collect do |line| + name = line.strip + new(:ensure => :present, :name => name) end end -- cgit From eee1a9cdaa5cab6222c8e6ab087d319f976fa4e3 Mon Sep 17 00:00:00 2001 From: Nigel Kersten Date: Tue, 30 Nov 2010 14:19:04 -0800 Subject: (#5424) Ship auth.conf as part of installing from source Add --configdir which defaults to /etc/puppet Add --no-configs to suppress config file installation. We're only shipping auth.conf at this stage, but in the future we may start shipping other config files. --- install.rb | 45 ++++++++++++++++++++++++++++++++++++++------- 1 file changed, 38 insertions(+), 7 deletions(-) diff --git a/install.rb b/install.rb index f7541c854..7627a8d11 100755 --- a/install.rb +++ b/install.rb @@ -79,6 +79,7 @@ def glob(list) end # Set these values to what you want installed. +configs = glob(%w{conf/auth.conf}) sbins = glob(%w{sbin/*}) bins = glob(%w{bin/*}) rdoc = glob(%w{bin/* sbin/* lib/**/*.rb README README-library CHANGELOG TODO Install}).reject { |e| e=~ /\.(bat|cmd)$/ } @@ -87,6 +88,14 @@ man = glob(%w{man/man[0-9]/*}) libs = glob(%w{lib/**/*.rb lib/**/*.py lib/puppet/util/command_line/*}) tests = glob(%w{test/**/*.rb}) +def do_configs(configs, target, strip = 'conf/') + Dir.mkdir(target) unless File.directory? target + configs.each do |cf| + ocf = File.join(InstallOptions.config_dir, cf.gsub(/#{strip}/, '')) + File.install(cf, ocf, 0644, true) + end +end + def do_bins(bins, target, strip = 's?bin/') Dir.mkdir(target) unless File.directory? target bins.each do |bf| @@ -157,6 +166,8 @@ end def prepare_installation $operatingsystem = Facter["operatingsystem"].value + InstallOptions.configs = true + # Only try to do docs if we're sure they have rdoc if $haverdoc InstallOptions.rdoc = true @@ -193,9 +204,15 @@ def prepare_installation opts.on('--[no-]tests', 'Prevents the execution of unit tests.', 'Default on.') do |ontest| InstallOptions.tests = ontest end + opts.on('--[no-]configs', 'Prevents the installation of config files', 'Default off.') do |ontest| + InstallOptions.configs = ontest + end opts.on('--destdir[=OPTIONAL]', 'Installation prefix for all targets', 'Default essentially /') do |destdir| InstallOptions.destdir = destdir end + opts.on('--configdir[=OPTIONAL]', 'Installation directory for config files', 'Default /etc/puppet') do |configdir| + InstallOptions.configdir = configdir + end opts.on('--bindir[=OPTIONAL]', 'Installation directory for binaries', 'overrides Config::CONFIG["bindir"]') do |bindir| InstallOptions.bindir = bindir end @@ -209,15 +226,17 @@ def prepare_installation InstallOptions.mandir = mandir end opts.on('--quick', 'Performs a quick installation. Only the', 'installation is done.') do |quick| - InstallOptions.rdoc = false - InstallOptions.ri = false - InstallOptions.tests = false + InstallOptions.rdoc = false + InstallOptions.ri = false + InstallOptions.tests = false + InstallOptions.configs = true end opts.on('--full', 'Performs a full installation. All', 'optional installation steps are run.') do |full| - InstallOptions.rdoc = true - InstallOptions.man = true - InstallOptions.ri = true - InstallOptions.tests = true + InstallOptions.rdoc = true + InstallOptions.man = true + InstallOptions.ri = true + InstallOptions.tests = true + InstallOptions.configs = true end opts.separator("") opts.on_tail('--help', "Shows this help text.") do @@ -243,6 +262,12 @@ def prepare_installation Config::CONFIG['sbindir'] = "/usr/sbin" end + if not InstallOptions.configdir.nil? + configdir = InstallOptions.configdir + else + configdir = "/etc/puppet" + end + if not InstallOptions.bindir.nil? bindir = InstallOptions.bindir else @@ -277,22 +302,26 @@ def prepare_installation # To be deprecated once people move over to using --destdir option if (destdir = ENV['DESTDIR']) + configdir = "#{destdir}#{configdir}" bindir = "#{destdir}#{bindir}" sbindir = "#{destdir}#{sbindir}" mandir = "#{destdir}#{mandir}" sitelibdir = "#{destdir}#{sitelibdir}" + FileUtils.makedirs(configdir) if InstallOptions.configs FileUtils.makedirs(bindir) FileUtils.makedirs(sbindir) FileUtils.makedirs(mandir) FileUtils.makedirs(sitelibdir) # This is the new way forward elsif (destdir = InstallOptions.destdir) + configdir = "#{destdir}#{configdir}" bindir = "#{destdir}#{bindir}" sbindir = "#{destdir}#{sbindir}" mandir = "#{destdir}#{mandir}" sitelibdir = "#{destdir}#{sitelibdir}" + FileUtils.makedirs(configdir) if InstallOptions.configs FileUtils.makedirs(bindir) FileUtils.makedirs(sbindir) FileUtils.makedirs(mandir) @@ -303,6 +332,7 @@ def prepare_installation InstallOptions.tmp_dirs = tmpdirs.compact InstallOptions.site_dir = sitelibdir + InstallOptions.config_dir = configdir InstallOptions.bin_dir = bindir InstallOptions.sbin_dir = sbindir InstallOptions.lib_dir = libdir @@ -459,6 +489,7 @@ prepare_installation #build_rdoc(rdoc) if InstallOptions.rdoc #build_ri(ri) if InstallOptions.ri #build_man(bins, sbins) if InstallOptions.man +do_configs(configs, InstallOptions.config_dir) if InstallOptions.configs do_bins(sbins, InstallOptions.sbin_dir) do_bins(bins, InstallOptions.bin_dir) do_libs(libs) -- cgit From 19f38794ecb5ce55b7850e77bdab919bb33c7ce3 Mon Sep 17 00:00:00 2001 From: Paul Berry Date: Wed, 24 Nov 2010 15:32:32 -0800 Subject: Disable remote ralsh by default Changed the default auth.conf so that accesses to "/resource" are no longer allowed. This means that to use "puppet resource -H" you will need to configure the target machine to enable access to the "/resource" URLs. --- lib/puppet/network/rest_authconfig.rb | 1 - spec/unit/network/rest_authconfig_spec.rb | 1 - 2 files changed, 2 deletions(-) diff --git a/lib/puppet/network/rest_authconfig.rb b/lib/puppet/network/rest_authconfig.rb index 82d5a9de2..7abe06956 100644 --- a/lib/puppet/network/rest_authconfig.rb +++ b/lib/puppet/network/rest_authconfig.rb @@ -17,7 +17,6 @@ module Puppet { :acl => "/certificate/", :method => :find, :authenticated => false }, { :acl => "/certificate_request", :method => [:find, :save], :authenticated => false }, { :acl => "/status", :method => [:find], :authenticated => true }, - { :acl => "/resource", :method => [:find, :save, :search], :authenticated => true }, ] def self.main diff --git a/spec/unit/network/rest_authconfig_spec.rb b/spec/unit/network/rest_authconfig_spec.rb index 351f3f040..06436e723 100755 --- a/spec/unit/network/rest_authconfig_spec.rb +++ b/spec/unit/network/rest_authconfig_spec.rb @@ -17,7 +17,6 @@ describe Puppet::Network::RestAuthConfig do { :acl => "/certificate/", :method => :find, :authenticated => false }, { :acl => "/certificate_request", :method => [:find, :save], :authenticated => false }, { :acl => "/status", :method => [:find], :authenticated => true }, - { :acl => "/resource", :method => [:find, :save, :search], :authenticated => true }, ] before :each do -- cgit From 76890a534640e077083785ba1321e76b7c4745ca Mon Sep 17 00:00:00 2001 From: James Turnbull Date: Thu, 2 Dec 2010 06:53:17 +1100 Subject: Revert "(#5304) Use internal_name rather than real_name for maillist provider" This reverts commit 779fea867a9e23ad48cd877a88756cc5792e9e0c. --- lib/puppet/provider/maillist/mailman.rb | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/puppet/provider/maillist/mailman.rb b/lib/puppet/provider/maillist/mailman.rb index 633642af7..4fdc20a69 100755 --- a/lib/puppet/provider/maillist/mailman.rb +++ b/lib/puppet/provider/maillist/mailman.rb @@ -2,11 +2,11 @@ require 'puppet/provider/parsedfile' Puppet::Type.type(:maillist).provide(:mailman) do if [ "CentOS", "RedHat", "Fedora" ].any? { |os| Facter.value(:operatingsystem) == os } - commands :list_lists => "/usr/lib/mailman/bin/list_lists --bare", :rmlist => "/usr/lib/mailman/bin/rmlist", :newlist => "/usr/lib/mailman/bin/newlist" + commands :list_lists => "/usr/lib/mailman/bin/list_lists", :rmlist => "/usr/lib/mailman/bin/rmlist", :newlist => "/usr/lib/mailman/bin/newlist" commands :mailman => "/usr/lib/mailman/mail/mailman" else # This probably won't work for non-Debian installs, but this path is sure not to be in the PATH. - commands :list_lists => "list_lists --bare", :rmlist => "rmlist", :newlist => "newlist" + commands :list_lists => "list_lists", :rmlist => "rmlist", :newlist => "newlist" commands :mailman => "/var/lib/mailman/mail/mailman" end @@ -14,9 +14,10 @@ Puppet::Type.type(:maillist).provide(:mailman) do # Return a list of existing mailman instances. def self.instances - list_lists.split("\n").collect do |line| - name = line.strip - new(:ensure => :present, :name => name) + list_lists.split("\n").reject { |line| line.include?("matching mailing lists") }.collect do |line| + name, description = line.sub(/^\s+/, '').sub(/\s+$/, '').split(/\s+-\s+/) + description = :absent if description.include?("no description available") + new(:ensure => :present, :name => name, :description => description) end end -- cgit From 3f9f37984d1ac5f3ddcc83bf2b1facdb6df6dacd Mon Sep 17 00:00:00 2001 From: James Turnbull Date: Thu, 2 Dec 2010 06:55:11 +1100 Subject: Updated CHANGELOG and version for 2.6.4 --- CHANGELOG | 9 +++++++++ lib/puppet.rb | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index 78483351c..c3135031b 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,14 @@ +2.6.4 +===== +76890a5 Revert "(#5304) Use internal_name rather than real_name for maillist provider" +19f3879 Disable remote ralsh by default +eee1a9c (#5424) Ship auth.conf as part of installing from source +779fea8 (#5304) Use internal_name rather than real_name for maillist provider +83f878e Renamed Reductive to Puppet + 2.6.3 ===== +53bb805 Incremented CHANGELOG for 2.6.3 184733c [#5322] (#5322) Remove spec file that adds little value and causes failures 178c2a6 Fix test failures that fixing #4726 exposed. 74b6c09 (#4726) Fix RRD legacy support diff --git a/lib/puppet.rb b/lib/puppet.rb index 78fb5138b..a58d3c801 100644 --- a/lib/puppet.rb +++ b/lib/puppet.rb @@ -24,7 +24,7 @@ require 'puppet/util/run_mode' # it's also a place to find top-level commands like 'debug' module Puppet - PUPPETVERSION = '2.6.3' + PUPPETVERSION = '2.6.4' def Puppet.version PUPPETVERSION -- cgit From af6e08c0a59db951502d0cf8c0ca24f5001e92f1 Mon Sep 17 00:00:00 2001 From: Nigel Kersten Date: Mon, 15 Nov 2010 12:36:34 -0800 Subject: (#5304) Use internal_name rather than real_name for maillist provider We've switched to using list_lists --bare which shows the internal_name rather than "real_name", which is the authoritative identifier. Doing this also means we have less output to scrub, so the code is simpler. Modified by Markus as-per discussion with Nigel. Signed-off-by: Nigel Kersten --- lib/puppet/provider/maillist/mailman.rb | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/puppet/provider/maillist/mailman.rb b/lib/puppet/provider/maillist/mailman.rb index 4fdc20a69..e070a25dd 100755 --- a/lib/puppet/provider/maillist/mailman.rb +++ b/lib/puppet/provider/maillist/mailman.rb @@ -14,11 +14,9 @@ Puppet::Type.type(:maillist).provide(:mailman) do # Return a list of existing mailman instances. def self.instances - list_lists.split("\n").reject { |line| line.include?("matching mailing lists") }.collect do |line| - name, description = line.sub(/^\s+/, '').sub(/\s+$/, '').split(/\s+-\s+/) - description = :absent if description.include?("no description available") - new(:ensure => :present, :name => name, :description => description) - end + list_lists('--bare'). + split("\n"). + collect { |line| new(:ensure => :present, :name => line.strip) } end # Prefetch our list list, yo. -- cgit