Web lists-archives.com

Re: DEB_BUILD_OPTIONS vs DEB_BUILD_PROFILES: What is right and what is wrong?




Hi,

Quoting Axel Beckert (2019-01-06 01:39:09)
> while trying to get the nocheck build profile working, I stumbled over
> some discrepancies between
> 
> * Debian Policy §4.9.1,
> * dpkg-buildflags (behaviour + man page), and
> * lintian's long description of the tag
>   override_dh_auto_test-does-not-check-DEB_BUILD_OPTIONS.
> 
> [...]
> 
> So now I wonder: what is wrong and needs to be fixed?
> 
> A) lintian by mixing up build tags and build profiles? (Maybe this
>    mentioning of build profiles was overseen when fixing #889746.)

I assume this to be the case.

> B) dpkg-buildpackages by not setting nocheck in DEB_BUILD_OPTIONS?

This could be brought to the dpkg maintainers.

> C) debian-policy (and #889746 + lintian as a followup issue) by
>    documenting DEB_BUILD_OPTIONS and DEB_BUILD_PROFILES both mixed
>    under DEB_BUILD_OPTIONS?
> D) Something completely different like dh or so?
> 
> Or am I just missing something totally essential and don't see the
> forest for the trees?
> 
> And a more general question, especially in case A:
> 
> If I want to build something with the build-profile nocheck, do I
> really have to set DEB_BUILD_OPTIONS myself separately to "nocheck" in
> addition to "-Pnocheck"? That sounds very counterintuitive to me…

I fear you currently have to manually set DEB_BUILD_OPTIONS=nocheck in addition
to -Pnocheck. The reason is, that currently no tool sets
DEB_BUILD_OPTIONS=nocheck if the nocheck build profile is active. This could be
changed in the future but I know of no such efforts right now.

Also refer to the current documentation of the nocheck build profile under [1].
It says:

> No test suite should be run, and build dependencies used only for that
> purpose should be ignored. Builds that set this profile must also add nocheck
> to DEB_BUILD_OPTIONS

The only alternative I see that would make this more convenient, would be if we
rewrite all affected d/rules file to check DEB_BUILD_OPTIONS *and*
DEB_BUILD_PROFILES when deciding whether or not to run the test suite. You
already discovered that this would be *a lot* of them.

There is a similar issue with the nodoc build profile where one must also
currently manually supply DEB_BUILD_OPTIONS=nodoc additionally.

Thanks!

cheers, josch

[1] https://wiki.debian.org/BuildProfileSpec

Attachment: signature.asc
Description: signature