Skip to contentSkip to conversation

drbdmanage lintian warnings

Drbd-dev Dietmar Maurer 2 participants 4 messages May 11, 2015 – May 12, 2015 DRBD driver

lore
Share & tools
lore
#0 lore raw

I compile my own debian package on jessie, but get many lintian warnings about man pages:

# lintian drbdmanage_0.34-1_amd64.deb
warning: the authors of lintian do not recommend running it with root
privileges!
W: drbdmanage: manpage-has-bad-whatis-entry
usr/share/man/man8/dm-add-resource.8.gz
W: drbdmanage: manpage-section-mismatch
usr/share/man/man8/dm-add-resource.8.gz:2 8 != ADD-RESOURCE
W: drbdmanage: manpage-has-bad-whatis-entry
usr/share/man/man8/dm-add-volume.8.gz
W: drbdmanage: manpage-section-mismatch usr/share/man/man8/dm-add-volume.8.gz:2
8 != ADD-VOLUME
W: drbdmanage: manpage-has-bad-whatis-entry usr/share/man/man8/dm-assign.8.gz
W: drbdmanage: manpage-has-bad-whatis-entry
usr/share/man/man8/dm-assignments.8.gz
W: drbdmanage: manpage-has-bad-whatis-entry usr/share/man/man8/dm-attach.8.gz
...

Can someone reproduce that?

#1 lore raw
Quoted 20 lines · Dietmar Maurer

I compile my own debian package on jessie, but get many lintian warnings about man pages:

# lintian drbdmanage_0.34-1_amd64.deb
warning: the authors of lintian do not recommend running it with root
privileges!
W: drbdmanage: manpage-has-bad-whatis-entry
usr/share/man/man8/dm-add-resource.8.gz
W: drbdmanage: manpage-section-mismatch
usr/share/man/man8/dm-add-resource.8.gz:2 8 != ADD-RESOURCE
W: drbdmanage: manpage-has-bad-whatis-entry
usr/share/man/man8/dm-add-volume.8.gz
W: drbdmanage: manpage-section-mismatch usr/share/man/man8/dm-add-volume.8.gz:2
8 != ADD-VOLUME
W: drbdmanage: manpage-has-bad-whatis-entry usr/share/man/man8/dm-assign.8.gz
W: drbdmanage: manpage-has-bad-whatis-entry
usr/share/man/man8/dm-assignments.8.gz
W: drbdmanage: manpage-has-bad-whatis-entry usr/share/man/man8/dm-attach.8.gz
...
Quoted 1 line

Can someone reproduce that?

Yes.

The man-pages are autogenerated (see setup.py) and the process is not perfect. Patches welcome. ;-)

Regards, rck

#2 lore raw
Quoted 1 line · Roland Kammerer

Patches welcome. ;-)

See attached patch. It fixes the bulk of the lintian warnings. There are still some other unrelated manpage errors left that would need a closer look (e.g. command string too long).

Regards, rck

From 88ef35ee774bf66184937c68de5a373a352d7e6e Mon Sep 17 00:00:00 2001
From: Roland Kammerer <[email protected]>
Date: Mon, 11 May 2015 11:53:16 +0200
Subject: [PATCH] man-pages: Fixed some lintian warnings

This fixes the "manpage-has-bad-wahtis-entry" warnings.

---
 setup.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
setup.py +4 -1
index 900f9c9..d8faa99 100755
@@ -98,7 +98,7 @@ class BuildManCommand(Command):
             if os.path.isfile(outfile):
                 continue
             print "Generating %s ..." % (outfile)
-            mangen = ["help2man", "-n", toplevel, '-s', '8',
+            mangen = ["help2man", "-n", toplevel, '-s', mansection,
                       '--version-string=%s' % (get_version()), "-N",
                       '"./drbdmanage_client.py %s"' % (toplevel)]
 
@@ -106,6 +106,9 @@ class BuildManCommand(Command):
             manpage = subprocess.check_output(toexec, shell=True)
             manpage = manpage.replace(replace[0], replace[1])
             manpage = manpage.replace(replace[0].upper(), replace[1].upper())
+            manpage = manpage.replace(toplevel.upper(), mansection)
+            manpage = manpage.replace("%s %s" % (replace[1], toplevel),
+                                      "%s_%s" % (replace[1], toplevel))
             with gzip.open(outfile, 'wb') as f:
                 f.write(manpage)
 
Signature · 1 line
2.1.4
#3 lore raw
Quoted 3 lines

See attached patch. It fixes the bulk of the lintian warnings. There are still some other unrelated manpage errors left that would need a closer look (e.g. command string too long).

Many thanks, that fixes almost all warnings.