Can we require build-arch/indep targets for lenny? - Debian

This is a discussion on Can we require build-arch/indep targets for lenny? - Debian ; Hi, I would like to gather up some momentum for a policy change. Namely that the build-arch/indep targets in debian/rules become required instead of being optional. The reason for this is that dpkg-buildpackage can't reliable detect the existance of the ...

+ Reply to Thread
Page 1 of 4 1 2 3 ... LastLast
Results 1 to 20 of 65

Thread: Can we require build-arch/indep targets for lenny?

  1. Can we require build-arch/indep targets for lenny?

    Hi,

    I would like to gather up some momentum for a policy change. Namely
    that the build-arch/indep targets in debian/rules become required
    instead of being optional.

    The reason for this is that dpkg-buildpackage can't reliable detect
    the existance of the build-arch/indep targets and must call 'build'
    instead. This forces every source to compile both architecture
    specific and architecture independent code on all buildds and
    increases the Build-Depends of packages a lot.


    Current status:

    I asked Lucas Nussbaum to rebuild all of debian with dpkg-buildpackage
    patched to call 'build-arch'. Here is the result:

    7326 packages rebuilt (all packages not Architecture:all)
    1727 built successfully
    5463 failed to build with a "no rule to make" error.
    136 failed for other reasons (unsat builddeps, etc)

    That means that only about 25% of debian package have a build-arch
    target. So there is still a long way to got.



    Possible upgrade paths:

    1) Change policy now making 75% of package RC buggy instantly.

    This sounds horrible but the fix is trivial and there is still a
    long time to lenny to fix it.

    2) Enforce the target for all new uploads and change policy once we
    exceed XX%.

    The unstable/experimental buildds could be patched to call
    'build-arch' instead of build making any upload without
    'build-arch' FTBFS. The security buildds would be left
    as is so nothing old breaks.

    3) Require 'build-arch/indep' with Standards-Version x.y.z

    Every source has a Standards-Version entry. dpkg-buildpackage could
    call 'build-arch' if the standards version is new enough and fall
    back to 'build' for older versions.

    The options can be combined for maximum effect.


    How to fix your own package:

    The minimal change to debian/rules would be to replace 'build:' with
    'build%:'. But that doesn't always work (e.g. not with cdbs).

    The next smallest change is to add 'build-%: build' to
    debian/rules. That always works.

    If you actualy have different things to build for arch and indep then
    you are missing the benefits though with the above solutions. If you
    have such a case then the recommended way in policy is the right
    solution. Create 'build-arch' and 'build-indep' targets with the
    respective build rules and have 'build' depend on both.

    If you don't then you can also create 'build-arch' and 'build-indep'
    targets that depend on 'build' if you don't like the pattern matching
    'build-%' above.

    MfG
    Goswin


    --
    To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

  2. Re: Can we require build-arch/indep targets for lenny?

    Hi,

    Goswin von Brederlow wrote:

    > I would like to gather up some momentum for a policy change. Namely
    > that the build-arch/indep targets in debian/rules become required
    > instead of being optional.


    FWIW, I think that would be a good thing (I remember a discussion with
    you on -mentors on Build-Depends v.s. Build-Depends-Indep whose outcome
    was that the real problem was that build-arch and build-indep are
    optional).

    --
    Florent


    --
    To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

  3. Re: Can we require build-arch/indep targets for lenny?

    Goswin von Brederlow wrote:
    > I would like to gather up some momentum for a policy change. Namely
    > that the build-arch/indep targets in debian/rules become required
    > instead of being optional.

    Wouldn't looking for the output
    make: *** No rule to make target `build-arch'. Stop.
    and then defaulting to make build be an option?

    > Possible upgrade paths:

    4) Make build-arch/indep recommended and have lintian issue a warning.

    Kind regards

    T.
    --
    Thomas Viehmann, http://thomas.viehmann.net/


    --
    To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

  4. Re: Can we require build-arch/indep targets for lenny?

    On Monday 18 June 2007 04:30:55 am Goswin von Brederlow wrote:
    > Hi,
    >
    > I would like to gather up some momentum for a policy change. Namely
    > that the build-arch/indep targets in debian/rules become required
    > instead of being optional.
    >
    > The reason for this is that dpkg-buildpackage can't reliable detect
    > the existance of the build-arch/indep targets and must call 'build'
    > instead. This forces every source to compile both architecture
    > specific and architecture independent code on all buildds and
    > increases the Build-Depends of packages a lot.


    How about instead requiring something like: the build-arch target must return
    successfully or with a status of 2 (the standard make error status
    for "target not found"), and in the latter case the build target must return
    successfully. That is, if Build-Depends but not necessarily
    Build-Depends-Indep are installed, the shell snippet

    debian/rules build-arch || (test $? -eq 2 && debian/rules build)

    must work and exit with a status of 0.

    This would make it possible for dpkg-buildpackage -B to be reliable while
    allowing most (or even all?) of the current packages to stay as they are
    until maintainers can add the recommended build-arch target.
    --
    Daniel Schepler


    --
    To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

  5. Re: Can we require build-arch/indep targets for lenny?

    On Mon, Jun 18, 2007 at 10:30:55AM +0200, Goswin von Brederlow wrote:
    > Hi,
    >
    > I would like to gather up some momentum for a policy change. Namely
    > that the build-arch/indep targets in debian/rules become required
    > instead of being optional.
    >
    > The reason for this is that dpkg-buildpackage can't reliable detect
    > the existance of the build-arch/indep targets and must call 'build'
    > instead. This forces every source to compile both architecture
    > specific and architecture independent code on all buildds and
    > increases the Build-Depends of packages a lot.


    I suggest anyone reread the bug log for #218893 that give a
    full account of the problem before commenting.

    My preference is for the dpkg maintainers to apply the patch in the
    buglog #229357, or at least reply to it.

    Cheers,
    --
    Bill.

    Imagine a large red swirl here.


    --
    To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

  6. Re: Can we require build-arch/indep targets for lenny?

    On Mon, Jun 18, 2007 at 04:40:26PM +0200, Thomas Viehmann wrote:
    > Goswin von Brederlow wrote:
    > >I would like to gather up some momentum for a policy change. Namely
    > >that the build-arch/indep targets in debian/rules become required
    > >instead of being optional.

    > Wouldn't looking for the output
    > make: *** No rule to make target `build-arch'. Stop.
    > and then defaulting to make build be an option?


    make: *** Er is geen regel om 'build-arch' te maken. Gestopt.

    Yes, you can use LC_ALL=C, but some people do strange things to their
    environment. The point is that parsing output that isn't meant for
    machine consumption is usually a bad idea.

    OTOH, this is trivial:

    build-indep: build
    build-arch: build
    build:
    foo
    bar
    baz

    --
    Home is where you have to wash the dishes.
    -- #debian-devel, Freenode, 2004-09-22


    --
    To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

  7. Re: Can we require build-arch/indep targets for lenny?

    On Mon, Jun 18, 2007 at 12:25:38PM -0400, Daniel Schepler wrote:
    > How about instead requiring something like: the build-arch target must return
    > successfully or with a status of 2 (the standard make error status
    > for "target not found"), and in the latter case the build target must return
    > successfully. That is, if Build-Depends but not necessarily
    > Build-Depends-Indep are installed, the shell snippet
    >
    > debian/rules build-arch || (test $? -eq 2 && debian/rules build)
    >
    > must work and exit with a status of 0.
    >
    > This would make it possible for dpkg-buildpackage -B to be reliable while
    > allowing most (or even all?) of the current packages to stay as they are
    > until maintainers can add the recommended build-arch target.


    That has been tried, but it didn't work for some reason.

    --
    Home is where you have to wash the dishes.
    -- #debian-devel, Freenode, 2004-09-22


    --
    To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

  8. Re: Can we require build-arch/indep targets for lenny?

    Daniel Schepler writes:

    > On Monday 18 June 2007 04:30:55 am Goswin von Brederlow wrote:
    >> Hi,
    >>
    >> I would like to gather up some momentum for a policy change. Namely
    >> that the build-arch/indep targets in debian/rules become required
    >> instead of being optional.
    >>
    >> The reason for this is that dpkg-buildpackage can't reliable detect
    >> the existance of the build-arch/indep targets and must call 'build'
    >> instead. This forces every source to compile both architecture
    >> specific and architecture independent code on all buildds and
    >> increases the Build-Depends of packages a lot.

    >
    > How about instead requiring something like: the build-arch target must return
    > successfully or with a status of 2 (the standard make error status
    > for "target not found"), and in the latter case the build target must return
    > successfully. That is, if Build-Depends but not necessarily
    > Build-Depends-Indep are installed, the shell snippet


    That is already required by policy.

    What is missing is that nothing else may return an error of 2 and I
    think that is a bad idea to require.

    > debian/rules build-arch || (test $? -eq 2 && debian/rules build)
    >
    > must work and exit with a status of 0.


    Which causes double builds in case something fails with error 2.

    > This would make it possible for dpkg-buildpackage -B to be reliable while
    > allowing most (or even all?) of the current packages to stay as they are
    > until maintainers can add the recommended build-arch target.


    The target has been recommended for years. But nobody is adding it
    because it can't be used reliably by the tools.

    MfG
    Goswin


    --
    To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

  9. Re: Can we require build-arch/indep targets for lenny?

    Wouter Verhelst writes:

    > On Mon, Jun 18, 2007 at 04:40:26PM +0200, Thomas Viehmann wrote:
    >> Goswin von Brederlow wrote:
    >> >I would like to gather up some momentum for a policy change. Namely
    >> >that the build-arch/indep targets in debian/rules become required
    >> >instead of being optional.

    >> Wouldn't looking for the output
    >> make: *** No rule to make target `build-arch'. Stop.
    >> and then defaulting to make build be an option?

    >
    > make: *** Er is geen regel om 'build-arch' te maken. Gestopt.
    >
    > Yes, you can use LC_ALL=C, but some people do strange things to their
    > environment. The point is that parsing output that isn't meant for
    > machine consumption is usually a bad idea.


    Better to check for error code 2. But again, it isn't definitiv.

    You would get some false positive.

    > OTOH, this is trivial:
    >
    > build-indep: build
    > build-arch: build
    > build:
    > foo
    > bar
    > baz


    Indeed.

    MfG
    Goswin


    --
    To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

  10. Re: Can we require build-arch/indep targets for lenny?

    Bill Allombert writes:

    > On Mon, Jun 18, 2007 at 10:30:55AM +0200, Goswin von Brederlow wrote:
    >> Hi,
    >>
    >> I would like to gather up some momentum for a policy change. Namely
    >> that the build-arch/indep targets in debian/rules become required
    >> instead of being optional.
    >>
    >> The reason for this is that dpkg-buildpackage can't reliable detect
    >> the existance of the build-arch/indep targets and must call 'build'
    >> instead. This forces every source to compile both architecture
    >> specific and architecture independent code on all buildds and
    >> increases the Build-Depends of packages a lot.

    >
    > I suggest anyone reread the bug log for #218893 that give a
    > full account of the problem before commenting.
    >
    > My preference is for the dpkg maintainers to apply the patch in the
    > buglog #229357, or at least reply to it.
    >
    > Cheers,


    Which are both DEAD. Both decided by indecision and silence to not
    act.

    So do we call the tech committe to force a decision?


    As a note I don't think it is the dpkg maintainers choice to make
    here. They can veto on the feasibility and on the implementation, the
    technical aspect, but I think the debian developers as a whole have
    the right to make policy that even dpkg maintainers must follow.

    MfG
    Goswin


    --
    To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

  11. Re: Can we require build-arch/indep targets for lenny?

    On Mon, Jun 18, 2007 at 04:40:26PM +0200, Thomas Viehmann wrote:
    > Wouldn't looking for the output
    > make: *** No rule to make target `build-arch'. Stop.
    > and then defaulting to make build be an option?


    This was discussed and rejected back when the build-* targets were proposed.

    --
    Antti-Juhani Kaijanaho, Jyväskylä
    http://antti-juhani.kaijanaho.fi/newblog/

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.6 (GNU/Linux)

    iD8DBQFGd6IiHsI32VNFhOgRAkgYAJwKNE66WeM/DmaRNe/gzEluftC4uwCeICrS
    xtFbQDDdpsdalf4Rzy3Snqg=
    =wTM2
    -----END PGP SIGNATURE-----


  12. Re: Can we require build-arch/indep targets for lenny?

    On Tue, Jun 19, 2007 at 11:18:18AM +0200, Goswin von Brederlow wrote:
    > So do we call the tech committe to force a decision?


    Perhaps you could try talking to the people concerned (not via a bug,
    perhaps on IRC or in person or private mail) first?

    Simon.

    --
    [ If at first you don't succeed, destroy all evidence that you tried. ]


    --
    To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

  13. Re: Can we require build-arch/indep targets for lenny?

    On Tue, Jun 19, 2007 at 03:04:30PM +0100, Simon Huggins wrote:
    > On Tue, Jun 19, 2007 at 11:18:18AM +0200, Goswin von Brederlow wrote:
    > > So do we call the tech committe to force a decision?

    >
    > Perhaps you could try talking to the people concerned (not via a bug,
    > perhaps on IRC or in person or private mail) first?


    In 3 years and a half, I had the time to try all of that...
    So I will try something new: an online petition:

    If you would like bug #229357 to get an answer, please
    send a signed email to the buglog.

    At least, I would feel less alone.

    Cheers,
    --
    Bill.

    Imagine a large red swirl here.


    --
    To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

  14. Re: Can we require build-arch/indep targets for lenny?

    On Tue, Jun 19, 2007 at 10:47:24AM +0200, Goswin von Brederlow wrote:
    > > debian/rules build-arch || (test $? -eq 2 && debian/rules build)
    > >
    > > must work and exit with a status of 0.

    >
    > Which causes double builds in case something fails with error 2.


    How often does something fail with error 2? Can someone try that over
    the whole archive, and produce a statistic?

    I'm thinking we are being too concerned with what seems likely to be
    a corner case. It makes sense to either substantiate that concern or
    ignore it; this kind of a limbo is pointless.

    --
    2. That which causes joy or happiness.


    --
    To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

  15. Re: Can we require build-arch/indep targets for lenny?

    Bill Allombert writes ("Re: Can we require build-arch/indep targets for lenny?"):
    > In 3 years and a half, I had the time to try all of that...
    > So I will try something new: an online petition:
    >
    > If you would like bug #229357 to get an answer, please
    > send a signed email to the buglog.


    Please, this is no way to carry on.

    > At least, I would feel less alone.


    FWIW, I agree with you. I think the proposed `Build-Options' source
    control field is a sensible addition and the bug should be implemented
    immediately.

    Obviously the dpkg developers are rather busy at the moment. I think
    that the right thing to do is to offer to NMU.

    While we are at it we should write a specification for Build-Options,
    something like:

    The Build-Options field appears (only) in the first stanza in
    debian/control. It gives a whitespace-separated list of options.
    The meanings of these options is defined in policy.

    Any package processing tool may act only on options which it
    recognises. Unknown tokens must be ignored.

    Currently only the following token is defined:

    * build-arch
    Declares that the package supports all of the following
    build targets: `build-indep', `build-arch', `binary-indep',
    `binary-arch'.

    Ian.


    --
    To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

  16. Re: Can we require build-arch/indep targets for lenny?

    On Tue, Jun 26, 2007 at 02:33:26PM +0100, Ian Jackson wrote:
    > Bill Allombert writes ("Re: Can we require build-arch/indep targets for lenny?"):
    > > In 3 years and a half, I had the time to try all of that...
    > > So I will try something new: an online petition:
    > >
    > > If you would like bug #229357 to get an answer, please
    > > send a signed email to the buglog.

    >
    > Please, this is no way to carry on.


    Ironically, you are the only one to do that so far, the fact that you
    did not sign your post notwithstanding.

    > > At least, I would feel less alone.

    >
    > FWIW, I agree with you. I think the proposed `Build-Options' source
    > control field is a sensible addition and the bug should be implemented
    > immediately.
    >
    > Obviously the dpkg developers are rather busy at the moment. I think
    > that the right thing to do is to offer to NMU.


    So I hereby offer to do a NMU by applying this patch.

    > While we are at it we should write a specification for Build-Options,
    > something like:
    >
    > The Build-Options field appears (only) in the first stanza in
    > debian/control. It gives a whitespace-separated list of options.
    > The meanings of these options is defined in policy.
    >
    > Any package processing tool may act only on options which it
    > recognises. Unknown tokens must be ignored.
    >
    > Currently only the following token is defined:
    >
    > * build-arch
    > Declares that the package supports all of the following
    > build targets: `build-indep', `build-arch', `binary-indep',
    > `binary-arch'.


    Note: binary-indep and binary-arch are already mandatory according to
    Debian policy 4.9.

    The specification are included in the patch to debian-policy in bug
    #218893, msgid <20031112203546.GI3260@seventeen>, specifically

    +
    + Build-Options
    +


    + The syntax is a list of options separated by
    + commas that are implemented in the build process.
    + The following options are defined:
    +
    + build-arch The optional targets "build-arch"
    + and "build-indep" are implemented by debian/rules
    + as defined in .

    +

    +


    +


    Thanks for yours answer,
    --
    Bill.

    Imagine a large red swirl here.


    --
    To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

  17. Re: Can we require build-arch/indep targets for lenny?

    Ian Jackson wrote:
    > While we are at it we should write a specification for Build-Options,
    > something like:
    >
    > The Build-Options field appears (only) in the first stanza in
    > debian/control. It gives a whitespace-separated list of options.
    > The meanings of these options is defined in policy.
    >
    > Any package processing tool may act only on options which it
    > recognises. Unknown tokens must be ignored.
    >
    > Currently only the following token is defined:
    >
    > * build-arch
    > Declares that the package supports all of the following
    > build targets: `build-indep', `build-arch', `binary-indep',
    > `binary-arch'.


    Funny, I'd forgotten this was ever proposed before, and was planning to
    propose adding a Build-Options field for entirely other, though fully
    compatible reasons. Which suggests that the name and format are well
    chosen.

    I think it would also be useful to include 'nostrip' and 'noopt' in the
    Build-Options field, as a way to indicate that the package implements
    those DEB_BUILD_OPTIONS. I also have some Evil Plans for other things
    that can go in Build-Options, but they're not ready yet and would be OT
    in this thread.

    --
    see shy jo

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.6 (GNU/Linux)

    iD8DBQFGgZ7sd8HHehbQuO8RAulXAKC4soRdQPTuVPfH4Yzojy EyRimEPwCfSHie
    bCH7JRUiNAiCrU4FAaLzMsc=
    =pzeo
    -----END PGP SIGNATURE-----


  18. Re: Can we require build-arch/indep targets for lenny?

    Bill Allombert wrote:
    > + The syntax is a list of options separated by
    > + commas that are implemented in the build process.
    > + The following options are defined:


    If commas are used as delimiters, it should use ", " as the delimiter
    for consistency with other fields using commas as delimiters. Since
    debian/control has both space and comma-delimited fields, I have no real
    preference which is chosen.

    Also, I like Ian's language about all unknown fields being ignored.

    --
    see shy jo

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.6 (GNU/Linux)

    iD8DBQFGgZ/Id8HHehbQuO8RAgbCAJ0QQ2itQCq63tnqJ/PeKFDz6SwgRQCffQfS
    sSg7BFEjtMJMbWH4CbWrg8k=
    =qOud
    -----END PGP SIGNATURE-----


  19. Re: Can we require build-arch/indep targets for lenny?

    Joey Hess writes:

    > I think it would also be useful to include 'nostrip' and 'noopt' in the
    > Build-Options field, as a way to indicate that the package implements
    > those DEB_BUILD_OPTIONS.


    parallel=n as well, while we're at it.

    --
    Russ Allbery (rra@debian.org)


    --
    To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

  20. Re: Can we require build-arch/indep targets for lenny?

    On Tue, Jun 26, 2007, Joey Hess wrote:
    > I think it would also be useful to include 'nostrip' and 'noopt' in the
    > Build-Options field, as a way to indicate that the package implements
    > those DEB_BUILD_OPTIONS. I also have some Evil Plans for other things
    > that can go in Build-Options, but they're not ready yet and would be OT
    > in this thread.


    Why not promote these to requirements in a particular policy version
    instead? I fear we will have to list 10 Build-Options in all packages
    in a couple of years.

    --
    Loïc Minier


    --
    To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

+ Reply to Thread
Page 1 of 4 1 2 3 ... LastLast