• Bug#872808: [debian-policy] nocheck DEB_BUILD_OPTIONS DEB_BUILD_PROFILE

    From Bastien =?UTF-8?Q?ROUCARI=C3=88S?=@21:1/5 to All on Mon Aug 21 16:40:04 2017
    XPost: linux.debian.bugs.dist

    Package: debian-policy
    Version: 4.0.1.0
    Severity: normal

    I think the following patch is needed even if profiles are not fully specified. Maybe an example about nodoc and help2man will also help. The nocheck should check both BUILD_OPTIONS and BUILD_PROFILES. It will help when implementing as policy profiles

    diff --git a/policy/ch-source.rst b/policy/ch-source.rst
    index f706a13..d3d868c 100644
    --- a/policy/ch-source.rst
    +++ b/policy/ch-source.rst
    @@ -465,7 +465,8 @@ The meaning of the following tags has been standardized:

    ``nocheck``
    This tag says to not run any build-time test suite provided by the
    - package.
    + package. This tag could be also specified using
    + ``DEB_BUILD_PROFILES`` variable with nocheck flag

    ``nodoc``
    This tag says to skip any build steps that only generate package
    @@ -531,7 +532,7 @@ order to make it work for your package.

    build:
    # ...
    - ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
    + ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS $DEB_BUILD_PROFILES)))
    # Code to run the package test suite.
    endif


    -----BEGIN PGP SIGNATURE-----

    iQIzBAABCgAdFiEEXQGHuUCiRbrXsPVqADoaLapBCF8FAlma4h8ACgkQADoaLapB CF/6exAAg7Qk/srU/q2n/lqnyxmPRM2sN8BXzDyrl7GDx3TGbyTMlVBTJxVxMGvS RH0NiETxU62yTes8oqLX3wsQ9LJSxD33Exo20XH1Of8t/SpcIijnejuvOlwaWSM2 ooPoMBIgX5Azs2hd85BO6282dGU11HXPiFcv9WRpqjvbILkZyYTKZH/sGj9WRIuf
    2ffUn
  • From Jonathan Nieder@21:1/5 to All on Mon Aug 21 22:20:01 2017
    XPost: linux.debian.bugs.dist

    Hi Bastien,

    Bastien ROUCARIÈS wrote:

    I think the following patch is needed even if profiles are not fully specified.
    Maybe an example about nodoc and help2man will also help. The nocheck should check both BUILD_OPTIONS and BUILD_PROFILES. It will help when implementing as
    policy profiles

    diff --git a/policy/ch-source.rst b/policy/ch-source.rst
    index f706a13..d3d868c 100644
    --- a/policy/ch-source.rst
    +++ b/policy/ch-source.rst
    @@ -465,7 +465,8 @@ The meaning of the following tags has been standardized:

    ``nocheck``
    This tag says to not run any build-time test suite provided by the
    - package.
    + package. This tag could be also specified using
    + ``DEB_BUILD_PROFILES`` variable with nocheck flag

    ``nodoc``
    This tag says to skip any build steps that only generate package
    @@ -531,7 +532,7 @@ order to make it work for your package.

    build:
    # ...
    - ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
    + ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS $DEB_BUILD_PROFILES)))
    # Code to run the package test suite.
    endif

    I am all for starting small in documenting build profiles (perhaps by documenting DEB_BUILD_PROFILES before the Build-Depends syntax) but it
    is possible to go too small. This patch doesn't give context for what DEB_BUILD_PROFILES means and it makes policy harder to understand.

    In other words, if a patch
    - described what a build profile is
    - explained the DEB_BUILD_PROFILES environment variable
    - listed which values in that variable are required to be supported

    then that would already be enough for me to second it. This patch
    doesn't do that.

    Do you mind if I merge this with bug#757760?

    Thanks,
    Jonathan

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From roucaries bastien@21:1/5 to Jonathan Nieder on Mon Aug 21 23:30:03 2017
    XPost: linux.debian.bugs.dist

    On Mon, Aug 21, 2017 at 9:14 PM, Jonathan Nieder <jrnieder@gmail.com> wrote:
    Hi Bastien,

    Bastien ROUCARIÈS wrote:

    I think the following patch is needed even if profiles are not fully specified.
    Maybe an example about nodoc and help2man will also help. The nocheck should >> check both BUILD_OPTIONS and BUILD_PROFILES. It will help when implementing as
    policy profiles

    diff --git a/policy/ch-source.rst b/policy/ch-source.rst
    index f706a13..d3d868c 100644
    --- a/policy/ch-source.rst
    +++ b/policy/ch-source.rst
    @@ -465,7 +465,8 @@ The meaning of the following tags has been standardized: >>
    ``nocheck``
    This tag says to not run any build-time test suite provided by the
    - package.
    + package. This tag could be also specified using
    + ``DEB_BUILD_PROFILES`` variable with nocheck flag

    ``nodoc``
    This tag says to skip any build steps that only generate package
    @@ -531,7 +532,7 @@ order to make it work for your package.

    build:
    # ...
    - ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
    + ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS $DEB_BUILD_PROFILES)))
    # Code to run the package test suite.
    endif

    I am all for starting small in documenting build profiles (perhaps by documenting DEB_BUILD_PROFILES before the Build-Depends syntax) but it
    is possible to go too small. This patch doesn't give context for what DEB_BUILD_PROFILES means and it makes policy harder to understand.

    In other words, if a patch
    - described what a build profile is
    - explained the DEB_BUILD_PROFILES environment variable
    - listed which values in that variable are required to be supported

    then that would already be enough for me to second it. This patch
    doesn't do that.

    Do you mind if I merge this with bug#757760?

    Feel free to do

    Thanks,
    Jonathan

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Ghislain Vaillant@21:1/5 to helmut@subdivi.de on Wed Aug 23 21:30:01 2017
    XPost: linux.debian.bugs.dist

    On Mon, 21 Aug 2017 16:07:13 +0200 Helmut Grohne <helmut@subdivi.de> wrote:
    On Mon, Aug 21, 2017 at 03:37:35PM +0200, Bastien ROUCARIÈS wrote:
    index f706a13..d3d868c 100644
    --- a/policy/ch-source.rst
    +++ b/policy/ch-source.rst
    @@ -465,7 +465,8 @@ The meaning of the following tags has been standardized:

    ``nocheck``
    This tag says to not run any build-time test suite provided by the
    - package.
    + package. This tag could be also specified using
    + ``DEB_BUILD_PROFILES`` variable with nocheck flag

    ``nodoc``
    This tag says to skip any build steps that only generate package

    The build profile spec[1] says that you must add nocheck to
    DEB_BUILD_OPTIONS when adding the nocheck profile.

    @@ -531,7 +532,7 @@ order to make it work for your package.

    build:
    # ...
    - ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
    + ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS $DEB_BUILD_PROFILES)))
    # Code to run the package test suite.
    endif


    This is unnecessary by the above comment.

    I also suspect that given DEB_BUILD_PROFILES=nocheck implies DEB_BUILD_OPTIONS=nocheck, the same should be true for nodoc?

    Ghis

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Helmut Grohne@21:1/5 to Ghislain Vaillant on Thu Aug 24 09:10:02 2017
    XPost: linux.debian.bugs.dist

    On Wed, Aug 23, 2017 at 07:23:14PM +0100, Ghislain Vaillant wrote:
    I also suspect that given DEB_BUILD_PROFILES=nocheck implies DEB_BUILD_OPTIONS=nocheck, the same should be true for nodoc?

    Like DEB_BUILD_PROFILES=nocheck does *not* imply
    DEB_BUILD_OPTIONS=nocheck (you must set the latter explicitly), DEB_BUILD_PROFILES=nodoc does *not* imply DEB_BUILD_OPTIONS=nodoc.

    In general, I think that this historic split into options and profiles
    is unfortunate. If we were to restart now, we'd likely remove nocheck,
    nodoc and maybe also nostrip from DEB_BUILD_OPTIONS and use
    DEB_BUILD_PROFILES exclusively. That's not where we are unfortunately.

    Arguably, the same responsibility we require for nocheck should be
    applied to nodoc. Given that the nodoc option has a much lower adoption,
    I am in favour of simply deprecating it. We should also remove the
    "nodocs" option from the archive while at it.

    Furthermore, I question the usefulness of nodoc. Since -doc packages are generally arch:all, most often you can skip them by doing an arch-only
    build. In the cases where documentation is stuffed into arch:any
    packages, the option modifies package contents. As such, you can no
    longer tell whether your modified package correctly satisfies its
    reverse dependencies (that may use parts of the documentation other than /usr/share/doc/<pkg>). As such the nodoc option/profile is generally
    considered "unsafe". Given that you cannot simply rebuild the world with
    nodoc active, I have yet to encounter a practical use of nodoc. It
    seems to be a futile exercise in increasing complexity at present.

    Whatever the outcome to the relevant questions is, consensus is not what
    we have now.

    Helmut

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)