I have come across a number of packages with a line in their debian/rules like: ifeq (,$(findstring nodocs, $(DEB_BUILD_OPTIONS))) This should be "nodoc", according to the "nodoc" entry in https://wiki.debian.org/BuildProfileSpec#Registered_profile_names It would be good to check for this error.
tags 1070770 patch thanks I've created a patch on Salsa that creates a new Lintian check for this. https://salsa.debian.org/lintian/lintian/-/merge_requests/504 Cheers,
I've added a bunch of suggestions/comments to the patch: the erroneous check in debian/rules is for the DEB_BUILD_OPTIONS setting rather than the DEB_BUILD_PROFILES setting, so it should refer to "options" rather than "profiles", even though the description for the "nodoc" option appears on the BuildProfilesSpec wiki page! I also suggest one tweak to the regex. Best wishes, Julian
Julian Gilbey <jdg@debian.org>: This mostly looks like a typo and I am kinda sure that you'd find typos like this all over many places. I am a bit unsure if checks for this is something we as a new lintian warning is something that we even need? Louis-Philippe Véronneau <pollo@debian.org>: And if we do -- I checked the MR and it does not look extensible. If in future there comes another class of typos, it will result in a new patch of this kind. Instead, is it possible to have a list of offending terms like this in a data list and warn the user about them via a lintian warning? For instance, we have data/fields/obsolete-packages for listing obsolete packages and showing the user about the obsolete packages and their replacements. Do you think a similar implementation for this (data/fields/bad-buildprofiles ?) makes sense? Best, Nilesh
Hi Nilesh, Perhaps, perhaps not. It's not something that's easily spotted by eye unless you're explicitly looking for it. Now *that's* a really nice approach. But here I'd suggest doing the opposite: checking for valid build options (and note: this is a check for DEB_BUILD_OPTIONS, not for DEB_BUILD_PROFILES). There is a very short list of standard build options: those listed in dpkg-buildpackage(1) (parallel=n, nocheck, noopt, nostrip, terse, hardening=..., reproducible=..., abi=..., future=..., qa=..., optimize=..., sanitize=...) and https://wiki.debian.org/BuildProfileSpec: nodoc Best wishes, Julian
+1 Andrius
Hi Julian! I concur. Thanks also to Andrius for +1. If Pollo/Andrius would like to work on it and/or open a MR, I will be happy to review (and merge). Best, Nilesh
On 2024-06-02 19:49, Louis-Philippe Véronneau wrote:> Sounds like a plan. I made the changed you proposed and also made sure Great, thanks a lot. I reviewed the code and I think it is good to be merged as is. Tag name is appropriate and future-proof for other checks for DEB_BUILD_OPTIONS. Thanks, Andrius