Debian Bug report logs - #627534
dh manpage: wrong/misleading example about build-{arch, indep}

version graph

Package: debhelper; Maintainer for debhelper is Debhelper Maintainers <debhelper-devel@lists.alioth.debian.org>; Source for debhelper is src:debhelper.

Reported by: Jakub Wilk <jwilk@debian.org>

Date: Sat, 21 May 2011 18:21:02 UTC

Severity: normal

Found in version debhelper/8.1.6

Fixed in version debhelper/8.9.0

Done: Joey Hess <joeyh@debian.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, jwilk@debian.org, Joey Hess <joeyh@debian.org>:
Bug#627534; Package debhelper. (Sat, 21 May 2011 18:21:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jakub Wilk <jwilk@debian.org>:
New Bug report received and forwarded. Copy sent to jwilk@debian.org, Joey Hess <joeyh@debian.org>. (Sat, 21 May 2011 18:21:04 GMT) Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Jakub Wilk <jwilk@debian.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: dh manpage: wrong/misleading example about build-{arch, indep}
Date: Sat, 21 May 2011 19:53:16 +0200
Package: debhelper
Version: 8.1.6
Severity: normal

Quoting dh manual page:

>Finally, remember that you are not limited to using override targets in 
>the rules file when using dh.

True. But IME people are very prone to do it wrong.

>You can also explicitly define any of the regular rules file targets 
>when it makes sense to do so. A common reason to do this is if your 
>package needs different build-arch and build-indep targets. For 
>example, a package with a long document build process can put it in 
>build-indep to avoid build daemons redundantly building the 
>documentation.

The status quo is that build daemons don't use build-* targets...

>    #!/usr/bin/make -f
>    %:
>            dh $@
>    
>    build: build-arch build-indep ;
>    build-indep:
>            $(MAKE) docs
>    build-arch:
>            $(MAKE) bins

...but even if they did, this example would be incorrect. An autobuilder 
calls "./debian/rules binary-arch", which calls "dh binary-arch", which 
calls dh_auto_build, which does not care how the "build" target is 
defined.

-- 
Jakub Wilk




Information forwarded to debian-bugs-dist@lists.debian.org, Joey Hess <joeyh@debian.org>:
Bug#627534; Package debhelper. (Sat, 21 May 2011 20:36:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Raphael Hertzog <hertzog@debian.org>:
Extra info received and forwarded to list. Copy sent to Joey Hess <joeyh@debian.org>. (Sat, 21 May 2011 20:36:02 GMT) Full text and rfc822 format available.

Message #10 received at 627534@bugs.debian.org (full text, mbox):

From: Raphael Hertzog <hertzog@debian.org>
To: Jakub Wilk <jwilk@debian.org>
Cc: 627534@bugs.debian.org
Subject: Re: dh manpage: wrong/misleading example about build-{arch, indep}
Date: Sat, 21 May 2011 22:32:42 +0200
Hi,

On Sat, 21 May 2011, Jakub Wilk wrote:
> >   #!/usr/bin/make -f
> >   %:
> >           dh $@
> >   build: build-arch build-indep ;
> >   build-indep:
> >           $(MAKE) docs
> >   build-arch:
> >           $(MAKE) bins
> 
> ...but even if they did, this example would be incorrect. An
> autobuilder calls "./debian/rules binary-arch", which calls "dh
> binary-arch", which calls dh_auto_build, which does not care how the
> "build" target is defined.

Huh? I think you're wrong.

autobuilders call "dpkg-buildpackage -B" which runs "debian/rules build"
followed by "fakeroot debian/rules binary-arch".

This difference between "build" and "binary{,-arch,-indep}" is nothing new
and dpkg-buildpackage always called both.

While the above example brings no benefits until we have proper support
for build-{arch,indep}, I think it's perfectly ok...

Cheers,
-- 
Raphaël Hertzog ◈ Debian Developer

Follow my Debian News ▶ http://RaphaelHertzog.com (English)
                      ▶ http://RaphaelHertzog.fr (Français)




Information forwarded to debian-bugs-dist@lists.debian.org, Joey Hess <joeyh@debian.org>:
Bug#627534; Package debhelper. (Sat, 21 May 2011 20:45:06 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jakub Wilk <jwilk@debian.org>:
Extra info received and forwarded to list. Copy sent to Joey Hess <joeyh@debian.org>. (Sat, 21 May 2011 20:45:06 GMT) Full text and rfc822 format available.

Message #15 received at 627534@bugs.debian.org (full text, mbox):

From: Jakub Wilk <jwilk@debian.org>
To: 627534@bugs.debian.org
Cc: Raphael Hertzog <hertzog@debian.org>
Subject: Re: dh manpage: wrong/misleading example about build-{arch, indep}
Date: Sat, 21 May 2011 22:42:32 +0200
* Raphael Hertzog <hertzog@debian.org>, 2011-05-21, 22:32:
>>>   #!/usr/bin/make -f
>>>   %:
>>>           dh $@
>>>   build: build-arch build-indep ;
>>>   build-indep:
>>>           $(MAKE) docs
>>>   build-arch:
>>>           $(MAKE) bins
>>
>>...but even if they did, this example would be incorrect. An 
>>autobuilder calls "./debian/rules binary-arch", which calls "dh 
>>binary-arch", which calls dh_auto_build, which does not care how the 
>>"build" target is defined.
>
>Huh? I think you're wrong.
>
>autobuilders call "dpkg-buildpackage -B" which runs "debian/rules build"
>followed by "fakeroot debian/rules binary-arch".
>
>This difference between "build" and "binary{,-arch,-indep}" is nothing new
>and dpkg-buildpackage always called both.

Oh, I didn't say that dpkg-buildpackage doesn't call "debian/rules 
build". I does, but it's not very relevant here.

My point was: dpkg-buildpackage also calls "debian/rules binary-arch", 
which will typically do all the work we were trying to avoid by defining
separate build-indep and build-arch targets.

-- 
Jakub Wilk




Information forwarded to debian-bugs-dist@lists.debian.org, Joey Hess <joeyh@debian.org>:
Bug#627534; Package debhelper. (Sun, 22 May 2011 20:30:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Anton Gladky <gladky.anton@gmail.com>:
Extra info received and forwarded to list. Copy sent to Joey Hess <joeyh@debian.org>. (Sun, 22 May 2011 20:30:04 GMT) Full text and rfc822 format available.

Message #20 received at 627534@bugs.debian.org (full text, mbox):

From: Anton Gladky <gladky.anton@gmail.com>
To: debian-mentors@lists.debian.org
Cc: 627534@bugs.debian.org
Subject: Re: override_dh_auto_configure not called
Date: Sun, 22 May 2011 22:26:27 +0200
I have solved the problem by this way:

=============================
#! /usr/bin/make -f
%:
	dh $@

binary-indep:
	dh --before dh_auto_build $@
	$(MAKE) doc
	dh --after dh_auto_build $@

binary-arch:
	dh --before dh_auto_build $@
	$(MAKE) bins
	dh --after dh_auto_build $@

binary: binary-indep binary-arch
=============================

I do not know, is this correct or not, but it works...

Anton

>>
>>              #!/usr/bin/make -f
>>              %:
>>                      dh $@
>>
>>              build: build-arch build-indep ;
>>              build-indep:
>>                      $(MAKE) docs
>>              build-arch:
>>                      $(MAKE) bins
>
> Unfortunately, this example is incorrect: http://bugs.debian.org/627534
>
> --
> Jakub Wilk




Information forwarded to debian-bugs-dist@lists.debian.org, Joey Hess <joeyh@debian.org>:
Bug#627534; Package debhelper. (Mon, 23 May 2011 06:33:11 GMT) Full text and rfc822 format available.

Acknowledgement sent to Raphael Hertzog <hertzog@debian.org>:
Extra info received and forwarded to list. Copy sent to Joey Hess <joeyh@debian.org>. (Mon, 23 May 2011 06:33:11 GMT) Full text and rfc822 format available.

Message #25 received at 627534@bugs.debian.org (full text, mbox):

From: Raphael Hertzog <hertzog@debian.org>
To: 627534@bugs.debian.org
Subject: Re: dh manpage: wrong/misleading example about build-{arch, indep}
Date: Sun, 22 May 2011 14:31:25 +0200
On Sat, 21 May 2011, Jakub Wilk wrote:
> My point was: dpkg-buildpackage also calls "debian/rules
> binary-arch", which will typically do all the work we were trying to
> avoid by defining separate build-indep and build-arch targets.

Currently, yes. But since dpkg-buildpackage calls debian/rules build,
we're not avoiding anything at all. It just means that dh will also have
to be updated to benefit from the separation at some point...

And given everything ought to be makefile-based, calling the build a
second time should be a no-op right now.

So I don't see what's so wrong. Clearly it has no benefit right now, but
it's also not wrong in the general case.

Cheers,
-- 
Raphaël Hertzog ◈ Debian Developer

Follow my Debian News ▶ http://RaphaelHertzog.com (English)
                      ▶ http://RaphaelHertzog.fr (Français)




Added tag(s) pending. Request was from Joey Hess <joeyh@debian.org> to control@bugs.debian.org. (Sat, 28 May 2011 16:51:19 GMT) Full text and rfc822 format available.

Reply sent to Joey Hess <joeyh@debian.org>:
You have taken responsibility. (Fri, 24 Jun 2011 18:51:10 GMT) Full text and rfc822 format available.

Notification sent to Jakub Wilk <jwilk@debian.org>:
Bug acknowledged by developer. (Fri, 24 Jun 2011 18:51:10 GMT) Full text and rfc822 format available.

Message #32 received at 627534-close@bugs.debian.org (full text, mbox):

From: Joey Hess <joeyh@debian.org>
To: 627534-close@bugs.debian.org
Subject: Bug#627534: fixed in debhelper 8.9.0
Date: Fri, 24 Jun 2011 18:47:09 +0000
Source: debhelper
Source-Version: 8.9.0

We believe that the bug you reported is fixed in the latest version of
debhelper, which is due to be installed in the Debian FTP archive:

debhelper_8.9.0.dsc
  to main/d/debhelper/debhelper_8.9.0.dsc
debhelper_8.9.0.tar.gz
  to main/d/debhelper/debhelper_8.9.0.tar.gz
debhelper_8.9.0_all.deb
  to main/d/debhelper/debhelper_8.9.0_all.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 627534@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Joey Hess <joeyh@debian.org> (supplier of updated debhelper package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Fri, 24 Jun 2011 14:28:52 -0400
Source: debhelper
Binary: debhelper
Architecture: source all
Version: 8.9.0
Distribution: unstable
Urgency: low
Maintainer: Joey Hess <joeyh@debian.org>
Changed-By: Joey Hess <joeyh@debian.org>
Description: 
 debhelper  - helper programs for debian/rules
Closes: 541458 544844 627534 627737 628053 629139 630826
Changes: 
 debhelper (8.9.0) unstable; urgency=low
 .
   * dh: In v9, any standard rules file targets, including build-arch,
     build-indep, build, install, etc, can be defined in debian/rules
     without needing to explicitly tell make the dependencies between
     the targets. Closes: #629139
     (Thanks, Roger Leigh)
   * dh_auto_configure: In v9, does not include the source package name
     in --libexecdir when using autoconf. Closes: #541458
   * dh_auto_build, dh_auto_configure, dh: Set environment variables
     listed by dpkg-buildflags --export. Any environment variables that
     are already set to other values will not be changed.
     Closes: #544844
   * dh_movefiles: Optimise use of xargs. Closes: #627737
   * Correct docs about multiarch and v9. Closes: #630826
   * Fix example. Closes: #627534
   * Fix error message. Closes: #628053
   * dh_auto_configure: If there is a problem with cmake, display
     the CMakeCache.txt.
Checksums-Sha1: 
 04fc16f2247506059765f2031a7982269705020a 1568 debhelper_8.9.0.dsc
 a24326c4c2c0984783be408a90e857375f399c3a 383819 debhelper_8.9.0.tar.gz
 ca13253bfa8a960fd628a3fd3921eb679cba2d9d 559388 debhelper_8.9.0_all.deb
Checksums-Sha256: 
 d6fb5dfeaacadc5574c619560d950a623261ad229848a2bf1e02bad7ae89939b 1568 debhelper_8.9.0.dsc
 c9a1c2ceb4fcccd794199d738314f52cce9248ef24f360a1a101622df0b766c2 383819 debhelper_8.9.0.tar.gz
 35767a7c9937d103fddfcc7f810667509c26797150704a5f9ac511770d1fbf1f 559388 debhelper_8.9.0_all.deb
Files: 
 0dc2ec18b832d0aad04f680427d6d7c6 1568 devel optional debhelper_8.9.0.dsc
 0b3dbca729105330453f05498b71c288 383819 devel optional debhelper_8.9.0.tar.gz
 e4ccb25e81e935053d9aed5c0a9a66d2 559388 devel optional debhelper_8.9.0_all.deb

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

iQIVAwUBTgTYK8kQ2SIlEuPHAQhASA/8DAvEwz+nTdaJvJSZzpwqCrWYmClBtbdb
qdn0xbDBgGwHjbchoTGMX07HgWJWEC0SOBnGrtD8krUfHpOFJML+jgnsBjTEg5KW
A293CYxdHcXgWyhEEpbUbD++hmWlF2F4tWU1hWRg2y3pFf8sY1b7TIfv7RdETpsJ
h2FXW3a1EO1zCdc0EJPmcN3bZg+++ZKxjOLp9p9i1xwwd8sC2tz4cCkxdkNFLWsD
FZ+NQrDQLa4AT9s7lFUvb1VEaL/H7OXGioKP97eoj91DKUumMBmMuSTkEi5PLjGT
IBIwzdEdgwtdUi+4lnuz+dr7+Fbm7TVA6RyP6NLrLUXfCIO15vXyUdbwaNTJNnS9
xtH21+HWGq5W898CQcYXHegBiUQtt4vyfQF2N36UMTHPreih92P6ipnGtAWSup2P
jXAK2bDUEeyjbdHwR5CgfodCzNMVravJRuv/Z2vs91kwewSWKDNG9ctcjbhnbvTp
D/1GbFdVZd9OFfU+NXL8KpJwCmZOAHwo/E5nS373zb59KTz2287l0xx+TUJo5j7A
bclLjMZYUBnsMptaESozaEz4m9W8CN0TumSy/jqZBuMvTKRoJzP67IQv1RgYkFnc
ecI3a+a96fek6coyXpmpoIm5u09YuhlRpdQV9U1gigCD1dkCohhm3ITWiowrTqbw
CGqB7k2E8h8=
=/n9E
-----END PGP SIGNATURE-----





Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Tue, 02 Aug 2011 07:33:07 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Wed Apr 23 07:25:29 2014; Machine Name: buxtehude.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.