Bug #198

puppet does not have a manpage

Added by Redmine Admin over 5 years ago. Updated about 1 year ago.

Status:Closed Start date:
Priority:Normal Due date:
Assignee:Luke Kanies % Done:

0%

Category:documentation
Target version:-
Affected Puppet version:2.6.1 Branch:
Keywords:man manpage
Votes: 0

Description

Seeing this, http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/109214 I’m sure it’s already on a TODO list somewhere, though I didn’t see it in Trac.

For short term purposes, I’ve had great success writing a small POD file (even for non Perl apps, no source, just POD) and running pod2man on it.

pod2man —center=“foosball” —release=“” foosball.pod | gzip -c > foosball.1.gz


Related issues

related to Facter - Feature #5205: facter does not have a manpage Code Insufficient 11/04/2010

History

Updated by Redmine Admin over 5 years ago

Adding submitter info.

Updated by Luke Kanies over 5 years ago

The problem is that rdoc2usage doesn’t generate a man file, it just generates plain text. This is as opposed to pod2man, which actually generates correctly formatted input to troff or whatever.

If you have Rdoc::usage installed, you can call puppet —help to get something like a man page, but you’ll still have to pipe the output through your READER. I’m not real fond of the tool, but I haven’t had the time to submit patches back.

Updated by Redmine Admin over 5 years ago

See also: http://www.gnu.org/software/help2man/

I haven’t tried it, but coreutils uses it.

Updated by Luke Kanies over 5 years ago

I just tried help2man and its output, at least combined with the output of rdoc2usage, looks horrible.

I’d love it if someone would work on this problem, because we definitely need some way to generate man pages from inline documentation.

Updated by Redmine Admin over 5 years ago

I was showing puppet to my colegue the other day and his comment was

“The documentation is not very good. The commands don’t even have a man page …”.

So a lot of people make the first contac with a new tool from man pages. I looked at help2man and it expects sections to be in this format

Usage: bla bla bla

Examples: help the poor

whereas RDOc::usage gives something like

USAGE

===== bla bla bla

EXAMPLES

======== help the poor

so it should not be to dificult to filter the RDOC output and get —help option that plays well with help2man.

Updated by Benjamin Kite about 5 years ago

  • Status changed from 1 to 2

Updated by Benjamin Kite about 5 years ago

I’ve written a static NROFF man page for puppet with the current configuration options, but the installation scripts aren’t set up to install it yet.

The man page should be generated dynamically from the documentation embedded in the code, and at that time, it will probably be more appropriate to have the page (or pages) installed into ${PUPPET_HOME}/man/man8

One question that should be considered in the long term is whether or not it would be better to have documentation for each executable rather than one document covering all of the executables.

Leaving the ticket open and assigned until we can decide on that.

Updated by David Narayan almost 5 years ago

I’ve started a wiki page (ManPages) to work out a specification for this issue.

Updated by James Turnbull about 4 years ago

  • Status changed from 2 to 1

I’ve made a go of this in my repo – it’s in two commits:

commit:e5888af8848e5e54821a1a238c4b4af253160afa in branch ticket_198 commit:5a0388f654f3bdbe099ecf05099f441c243fda67 in branch ticket_198

You need to have the rst2man.py DocUtils module installed in your path. The module is available from:

http://docutils.sourceforge.net/sandbox/manpage-writer/

Updated by James Turnbull about 4 years ago

The author of rst2man.py took some feedback and updated the tool fixing the issues with creating puppet.conf man page.

  1. In commit commit:d8991abac0b5302fe4202940b637dc4477d5e44e in branch ticket_198 I’ve updated install.rb to create a puppet.conf man page.

  2. In commit commit:f335dc31f11f4bed80e91df041febdca6e33d3c2 in branch ticket_198 I’ve changed defaults.rb to remove some syntax that we were unable to convert to nroff – this mostly changed one of the RST HTML linking forms. You can see if you think it’ll be alright but I think its a minor detail.

  3. Lastly, and mostly due to my short-sighted branching of master rather than 0.24.x, to ensure correct creation of man pages some of the documentation fixes I’ve submitted to 0.24.x are needed. Not sure how you want to handle this but generally if the functionality can wait to 0.25.x then this will be fine when you merge and I’ll make a note to test it.

  4. The man page creation is currently enabled in install.rb – you can easily disable it by commenting out the line:

build_man(bins) if [[InstallOptions]].man

Updated by Luke Kanies about 4 years ago

  • Status changed from 1 to Closed
  • 7 set to fixed

Pushed into the master branch.

Updated by James Turnbull about 4 years ago

  • Status changed from Closed to 4
  • 7 deleted (fixed)

Luke – I’ve pushed an update to this:

commit:4ede432f4da9bb5529830f7a5c022a3245219303 in master.

It has cleaned up the code and added proper error handling (which I worked out how to use this morning with begin-rescue). Apologies whilst my Ruby improves.

Updated by James Turnbull about 4 years ago

  • Status changed from 4 to 1

Updated by Luke Kanies about 4 years ago

  • Status changed from 1 to Closed
  • 7 set to fixed

pushed.

Updated by Garrett Honeycutt over 1 year ago

  • Status changed from Closed to Re-opened
  • Target version deleted (0.25.0)
  • Affected Puppet version changed from 0.25.4 to 2.6.1
  • Keywords set to man manpage

The puppet man page appears to be a one line static entry. Our goal should be to have it dynamically generated.

I suggest that we take the approach that git uses, since it correlates well with the puppet commands.

Here is a snippet from man -k git

git                  (7)  - the stupid content tracker
git                 (rpm) - Core git tools
git-add              (1)  - Add file contents to the index
git-am               (1)  - Apply a series of patches from a mailbox
git-annotate         (1)  - Annotate file lines with commit info
git-apply            (1)  - Apply a patch on a git index file and a working tree

We could have entries for puppet, puppet-apply, puppet-resource, etc.

Updated by Nigel Kersten about 1 year ago

  • Status changed from Re-opened to Closed

Garret, if you want to change the current man page behavior, please open a new ticket.

Also available in: Atom PDF