#458 Man page guidelines update
Closed: Fixed None Opened 9 years ago by msuchy.

I would suggest to add to
https://fedoraproject.org/wiki/Packaging:ScriptletSnippets
New section for man pages and put there this suggested scriptlet:

{{{
%install
install -D -m 644 foo.1 %{buildroot}%{_mandir}/man1/foo.1

%files
%{_mandir}/man1/foo.1*
}}}

There is no need to gzip man page manually. RPM will do that automatically. In fact that is reason why you should put * at the end of name in %files section, because rpm itself decide which compression format will be used.

If you are unsure which section you should use, please consult {{{man man}}} which describe meaning of man1 to man9.

And it would be nice to reference this scriptlet from
http://fedoraproject.org/wiki/Packaging:Guidelines#Man_pages


From today's meeting (http://meetbot.fedoraproject.org/fedora-meeting-1/2014-10-02/fpc.2014-10-02-16.00.txt):

#458 Man page scriplets (geppetto, 16:39:28)
* LINK: https://fedorahosted.org/fpc/ticket/458 (geppetto, 16:39:29)
* ACTION: Tibbs to write changes for policy: #458 Man page scriplets
(geppetto, 16:49:17)

Here's what I whipped up, to clean up the language a bit and added information about compression.

As man pages are the traditional method of getting help on a unix system, packages
should contain them for all executables. If some man pages are absent, packagers should work with
upstream to add them. It is also occasionally possible to find pages
created by other distributions; those are often useful as a starting point.

When installing man pages, note that they should be installed uncompressed as the
build system will compress them as needed. The compression method may
change, so it is important to reference the pages in the '''%files''' section with
a pattern that takes this into account:

{{{
%files
%{_mandir}/man1/foo.1*
}}}

Man page guideline draft in comment 2 is approved (+1:7, 0:0, -1:0)

For shame, it was my text and I didn't write it up. I added a new section to the main guidelines for this; the scriptletsnippets page was certainly not the right place.

Announcement text:

A guideline was added concerning the need for all executables to have manpages, and clarifying that they should be installed uncompressed.

Login to comment on this ticket.

Metadata