sdk: SDK manpages bad-whatis-entry
Describe the bug
Manpages for multi-level commands for dotnet violate Debian’s lintian rule for use by whatis and apropos.
To Reproduce
I’m not sure how to reproduce this directly, but I do know attempting to build 6.0.102 from https://github.com/dotnet/installer making use of debmake and sbuild, at the end of a successful build, every man, with exception to dotnet-vstest.1, and dotnet.1 give a lintian warning of bad-whatis-entry, as the name for the multi-level commands are space separated, while it is suggested they be separated instead by an underscore, so they can be properly discovered by whatis and apropos. As an example, if I am understanding this correctly, for dotnet-add-package.1, instead of the line \f[C]dotnet add package\f[R]..., it should be \f[C]dotnet_add_package\f[R]....
Further technical details
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 19 (8 by maintainers)
After trying this myself, I found that it wasn’t quite as simple as I thought. The
dscfile also contains hashes and sizes of the archive files. After manually updating that with the new hash and file size, I was able to run it. The result shows all thebad-whatis-entrymessages gone, with only thegroff-messageremaining, all mostly the same, as well as one new one fordotnet.1.gz.I’m not sure how much of an issue these are. They all appear to be related to tables possibly being too large for a display. However, with the rather large terminal screen size that I have, I don’t see any issue with the pages. Even when using XTerm in order to get a smaller terminal screen size (as I’m not sure how native terminal can be resized, and, for some reason, I can’t resize QTerminal), it is still legible enough.
Here is the source package, made up of three files. The two
.zipfiles are not actually zip files, I just added the extension to it so that it could be uploaded. Thedotnet-sdk-manpages_1.0.0.orig.tar.gzfile contains the manpages from source build 6.0.102 with the patch from the PR applied. Ideally, you would replace that with a file with the same name and same internal directory layout with updated files. I was able to runsbuildwith only these three files by runningsbuild dotnet-sdk-manpages_1.0.0-1.dsc -d unstable, while already having an sbuild schroot of Debian unstable already set up. Alternatively, you can extract the contents ofdotnet-sdk-manpages_1.0.0.orig.tar.gzanddotnet-sdk-manpages_1.0.0-1.debian.tar.xzinto the same directory and just runsbuildfrom that directory. I’m sure you can also use another build system, such asdebuild,pbuild, ordpkg-buildpackage. If lintian is not automatically run after the build, you can manually run lintian specifying the produced deb package. dotnet-sdk-manpages_1.0.0.orig.tar.gz dotnet-sdk-manpages_1.0.0-1.debian.tar.xz.zip dotnet-sdk-manpages_1.0.0-1.dsc.zipAfter building with the manpage patch, the warning list from lintian when doing a
documenation/manualcheck has been reduced significantly.As far as the
groff-messagetag, it appears to me this is caused by the tables in the manpage. Not really sure if there is a fix for this. As far as the remainingbad-whatis-entrywarnings, four entries remain, and, from what I can tell, these are the issues. First, withdotnet-environment-variablesanddotnet-new-sdk-templates, there does not appear to be a name section. Also, these do not appear to be user commands, thus, would be more appropriate to put then in section 7 rather than 1. Not sure how difficult that would be. Also, when I checked a few man pages that I already had installed in section 7 (apparmor(7)anddeb-version(7)), they both had name sections, with the same formatting. Thus, it is probably a good idea to still have a name section generated, even though there is no command to run. The issue withdotnet-install-scriptsis that it is documenting multiple different commands with the same description, and is being separated by a|, whereas the recommendation in this case is to separate the entries with,. Finally, withdotnet-new-update, the-between the commands and descriptions is missing. Not sure if these fixes can be done by updating the script, or if this requires changes to the source documentation, or if, ultimately, it is decided these fixes aren’t warranted, in which case, I will add an ignore for the tag in these specific cases.Also, one oddity I noticed with choosing to use
-to separate subcommands, usingdotnet-new-listas an example, as the command isdotnet new --list, the name appears asdotnet-new---list. I don’t consider this a problem, but I raise it just in case anyone else does.Also, I think I may have a way to quickly test for this by setting up a debian source package containing only the man pages. This should allow quickly building the pages into a deb package using either
sbuild,debuild,pbuild, or whatever is your prefered debian package builder, and then run lintian (possibly automatically) on the resulting package. As it does not have to deal with a 2 hour build time, as well as not having to check some 100k files, I would say this method would be much quicker and more iterative. I should be able to create a quick source package that will do that if it will help with testing and development.I believe these are all generated via a pandoc script that was contributed to the repo. @omajid is this something you can look into? would it be a matter of extending the python scrubber script?
@TheJayMann is there an easy way to run
debmake/sbuildso that we could prevent regressions in this area? or is it something that we’d have to leave to thedotnet/installerlevel?