13

I recently saw https://lintian.debian.org/tags/binary-without-manpage.html and it shows around 14k manpages which are missing.

This means it's more than likely that some of the binary packages (not libraries) have missing manpages. How do I get a list of installed binary packages/applications (NOT libraries) which don't have manpages? I might know some and start contributing a bit towards that.

3 Answers 3

16

You can list all binary without man page through manpage-alert command

manpage-alert - check for binaries without corresponding manpages

DESCRIPTION

   manpage-alert  searches the given list of paths for binaries without cor‐
   responding manpages.

   If no paths are specified on the command line, the path list  /bin  /sbin
   /usr/bin /usr/sbin /usr/games will be assumed
1
  • 2
    didn't know it was part of devscripts package, thanx.
    – shirish
    Jan 15, 2017 at 21:36
5

While manpage-alert does do what you ask for, you should note that the list in the link from your question is generated by a different process, which is the following check in Lintian:

https://github.com/Debian/lintian/blob/master/checks/manpages.pm

So it can be produced by calling lintian with the -T binary-without-manpage option (and other options to select the packages that you want to check).

1
  • didn't know about that, thanx.
    – shirish
    Jan 15, 2017 at 22:43
4

Thanks to the accepted answer, it was interesting to learn about the existence of utility manpage-alert, part of the devscripts package, which is actually a shell script.

I tried to install devscripts but I got a prompt to install around 70MB of dependencies, so I skipped.

Downloading the devscripts deb package (apt download devscripts), extracting the deb and taking a closer look to manpage-alert script, the whole story "under the hood" is that this alert script runs the command:

man -w -S 1:8:6 <file> (w=show location -S 1:8:6 limits man search in sections 1,8 and 6).

This operation is performed in all the files recursively under directories /bin, /sbin, /usr/bin, /usr/sbin, and /usr/games.

Moreover, redirecting man to 2>&1 and also redirecting to >/dev/null, if a file has a valid man page location nothing is printed, but if man complains for a "no manual entry" then this message is printed.
Author of manpage-alert is further stripping man error message from "see man 7 undocumented for help" message and keeps only the first line = No manual entry for xxxx.

As a result, the following few lines will give a similar print of binaries missing man pages without installing devscripts package:

F=( "/bin/*" "/sbin/*" "/usr/bin/*" "/usr/sbin/*" "/usr/games/*" )
for f in ${F[@]};do 
  for ff in $f;do
    if ! mp=$(man -w -S 1:8:6 "${ff##*/}" 2>&1 >/dev/null);then 
       echo "$mp" |grep -v "man 7 undocumented" #man 7 undocumented is printed in a separate line.
    fi
  done
done

PS: ${ff##*/} keeps only the command name stripping the path /usr/bin/ or /bin/ or whatever

Above can also run as one-liner:

gv@debi64:$ F=( "/bin/*" "/sbin/*" "/usr/bin/*" "/usr/sbin/*" "/usr/games/*" );for f in ${F[@]};do for ff in $f;do if ! mp=$(man -w -S 1:6:8 "${ff##*/}" 2>&1 >/dev/null);then echo "$mp" |grep -v "man 7 undocumented";fi;done;done

No manual entry for ntfsmove
No manual entry for ipmaddr
No manual entry for iptunnel
^C

PS: You can of course install devscripts since a lot of nice utilities / scripts are included. I just like to know what runs under the hood :-)

2
  • There are lots ofinteresting packages in devscripts, for e.g. dch, rmadison, wnpp-check and some others, just didn't know about this one. It's well worth it. I doubt it will be a bashscript as debian has been trying to remove bashisms and rely on plain shell scripts which are more easily from one xterm to another.
    – shirish
    Jan 16, 2017 at 13:51
  • @shirish Taking a closer look, original manpage-alert script begins with #!/bin/sh -e Jan 16, 2017 at 14:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .