[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, experimental, updated. debian/2.6.8-1-844-g7ec39d5

nfagerlund nick.fagerlund at gmail.com
Tue May 10 08:04:54 UTC 2011


The following commit has been merged in the experimental branch:
commit dac032d589862a9f5c2f054aaf17686bf96f0c09
Author: nfagerlund <nick.fagerlund at gmail.com>
Date:   Wed Feb 16 18:36:33 2011 -0800

    (#1204) Make rake gen_manpages output puppet-{application} manpages
    
    The manpage generator can now make manpages for the modern executable in
    addition to the legacy executables. The section for the legacy
    names should be deleted upon the release of 2.8.0.

diff --git a/tasks/rake/manpages.rake b/tasks/rake/manpages.rake
index 752a6a7..f48e57c 100644
--- a/tasks/rake/manpages.rake
+++ b/tasks/rake/manpages.rake
@@ -5,23 +5,33 @@ task :gen_manpages do
 
   sbins = Dir.glob(%w{sbin/*})
   bins  = Dir.glob(%w{bin/*})
-  
+  applications  = Dir.glob(%w{lib/puppet/application/*})
   # Locate ronn
   ronn = %x{which ronn}
   ronn.chomp!
+
   # Create puppet.conf.5 man page
   %x{RUBYLIB=./lib:$RUBYLIB bin/puppetdoc --reference configuration > ./man/man5/puppetconf.5.ronn}
   %x{#{ronn} --manual="Puppet manual" --organization="Puppet Labs, LLC" -r ./man/man5/puppetconf.5.ronn}
   File.move("./man/man5/puppetconf.5", "./man/man5/puppet.conf.5")
   File.unlink("./man/man5/puppetconf.5.ronn")
 
-  # Create binary man pages
+  # Create LEGACY binary man pages (i.e. delete me for 2.8.0)
   binary = bins + sbins
   binary.each do |bin|
-    b = bin.gsub( /(bin|sbin)\//, "")
+    b = bin.gsub( /^s?bin\//, "")
     %x{RUBYLIB=./lib:$RUBYLIB #{bin} --help > ./man/man8/#{b}.8.ronn}
     %x{#{ronn} --manual="Puppet manual" --organization="Puppet Labs, LLC" -r ./man/man8/#{b}.8.ronn}
     File.unlink("./man/man8/#{b}.8.ronn")
   end
-  
+
+  # Create modern binary man pages
+  applications.each do |app|
+    app.gsub!( /^lib\/puppet\/application\/(.*?)\.rb/, '\1')
+    %x{RUBYLIB=./lib:$RUBYLIB bin/puppet #{app} --help > ./man/man8/puppet-#{app}.8.ronn}
+    %x{#{ronn} --manual="Puppet manual" --organization="Puppet Labs, LLC" -r ./man/man8/puppet-#{app}.8.ronn}
+    File.unlink("./man/man8/puppet-#{app}.8.ronn")
+  end
+
+
 end
\ No newline at end of file

-- 
Puppet packaging for Debian



More information about the Pkg-puppet-devel mailing list