Debian Bug report logs - #560070
dpkg: please stop setting CFLAGS etc. environment variables

version graph

Package: dpkg-dev; Maintainer for dpkg-dev is Dpkg Developers <debian-dpkg@lists.debian.org>; Source for dpkg-dev is src:dpkg.

Reported by: Bill Allombert <Bill.Allombert@math.u-bordeaux1.fr>

Date: Tue, 8 Dec 2009 17:51:01 UTC

Severity: normal

Merged with 571420, 586691

Found in versions dpkg/1.14.18, dpkg/1.14.29, dpkg/1.15.5, dpkg/1.15.7

Fixed in version dpkg/1.16.1

Done: Guillem Jover <guillem@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, Dpkg Developers <debian-dpkg@lists.debian.org>:
Bug#560070; Package dpkg-dev. (Tue, 08 Dec 2009 17:51:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Bill Allombert <Bill.Allombert@math.u-bordeaux1.fr>:
New Bug report received and forwarded. Copy sent to Dpkg Developers <debian-dpkg@lists.debian.org>. (Tue, 08 Dec 2009 17:51:04 GMT) Full text and rfc822 format available.

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

From: Bill Allombert <Bill.Allombert@math.u-bordeaux1.fr>
To: submit@bugs.debian.org
Subject: dpkg: please stop setting CFLAGS etc. environment variables
Date: Tue, 8 Dec 2009 17:08:15 +0100
[Message part 1 (text/plain, inline)]
Package: dpkg-dev
Version: 1.15.5

Hello dpkg developers,

dpkg-buildpackages set a bunch of general purpose environment variables before
calling debian/rules (CFLAGS, CXXFLAGS, FFLAGS, LDFLAGS, MFLAGS, etc.).

This cause some packages to build differently with dpkg-buildpackages or
with 'debian/rules binary' and there is no consensus in Debian that it is
a correct thing for dpkg-buildpackages to do, and there are no documentation
how packages are supposed to deal with them and deal with builds done by
'debian/rules binary'.

Please change dpkg not to set them for standard Debian builds.

Cheers,
-- 
Bill. <ballombe@debian.org>

Imagine a large red swirl here. 
[signature.asc (application/pgp-signature, inline)]

Forcibly Merged 560070 571420. Request was from Raphael Hertzog <hertzog@debian.org> to control@bugs.debian.org. (Fri, 26 Feb 2010 06:45:07 GMT) Full text and rfc822 format available.

Added tag(s) pending. Request was from Raphaël Hertzog <hertzog@debian.org> to control@bugs.debian.org. (Sun, 11 Apr 2010 18:51:03 GMT) Full text and rfc822 format available.

Message sent on to Bill Allombert <Bill.Allombert@math.u-bordeaux1.fr>:
Bug#560070. (Sun, 11 Apr 2010 18:51:20 GMT) Full text and rfc822 format available.

Message #12 received at 560070-submitter@bugs.debian.org (full text, mbox):

From: Raphaël Hertzog <hertzog@debian.org>
To: 560070-submitter@bugs.debian.org
Subject: Bug#560070 marked as pending
Date: Sun, 11 Apr 2010 18:48:42 +0000
tag 560070 pending
thanks

Hello,

Bug #560070 reported by you has been fixed in the Git repository. You can
see the changelog below, and you can check the diff of the fix at:

    http://git.debian.org/?p=dpkg/dpkg.git;a=commitdiff;h=9dc0466

---
commit 9dc0466a5e300dde0cf23a77aaa609b05b628242
Author: Raphaël Hertzog <hertzog@debian.org>
Date:   Fri Apr 9 17:46:15 2010 +0200

    dpkg-buildflags: new script to retrieve compilation flags during package build
    
    Forcing the value of compilation flags through environment variables set
    by dpkg-buildpackages has not been very successful up to now and suffered
    from the fact that calling debian/rules directly could lead to a different
    build than what dpkg-buildpackage would have done.
    
    This commit is the start of a new solution: dpkg-buildflags is a tool that
    package maintainers are supposed to use in order to retrieve compilation
    flags. It offers a way to control their default values at the distribution
    level while still allowing customizations by users who recompile the
    source packages.

diff --git a/debian/changelog b/debian/changelog
index 43a1451..0e0d0e9 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -20,6 +20,11 @@ dpkg (1.15.6.2) UNRELEASED; urgency=low
   * Tigthen the regex used by dpkg-source to match the component name of
     supplementary tarballs so that undercore (_) are not allowed as it was
     supposed to be.
+  * Introduce a new script called dpkg-buildflags: its purpose is to retrieve
+    compilation flags and it should be used within debian/rules to pass
+    the right compilation flags to the build process. dpkg-builpackage still
+    exports them to not break packages currently relying on them but packages
+    should now start using dpkg-buildflags instead. Closes: #560070
 
   [ Updated dpkg translations ]
   * German (Sven Joachim).




Reply sent to Guillem Jover <guillem@debian.org>:
You have taken responsibility. (Wed, 21 Apr 2010 03:36:16 GMT) Full text and rfc822 format available.

Notification sent to Bill Allombert <Bill.Allombert@math.u-bordeaux1.fr>:
Bug acknowledged by developer. (Wed, 21 Apr 2010 03:36:16 GMT) Full text and rfc822 format available.

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

From: Guillem Jover <guillem@debian.org>
To: 560070-close@bugs.debian.org
Subject: Bug#560070: fixed in dpkg 1.15.7
Date: Wed, 21 Apr 2010 03:34:28 +0000
Source: dpkg
Source-Version: 1.15.7

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

dpkg-dev_1.15.7_all.deb
  to main/d/dpkg/dpkg-dev_1.15.7_all.deb
dpkg_1.15.7.dsc
  to main/d/dpkg/dpkg_1.15.7.dsc
dpkg_1.15.7.tar.bz2
  to main/d/dpkg/dpkg_1.15.7.tar.bz2
dpkg_1.15.7_amd64.deb
  to main/d/dpkg/dpkg_1.15.7_amd64.deb
dselect_1.15.7_amd64.deb
  to main/d/dpkg/dselect_1.15.7_amd64.deb
libdpkg-dev_1.15.7_amd64.deb
  to main/d/dpkg/libdpkg-dev_1.15.7_amd64.deb
libdpkg-perl_1.15.7_all.deb
  to main/d/dpkg/libdpkg-perl_1.15.7_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 560070@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Guillem Jover <guillem@debian.org> (supplier of updated dpkg 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: SHA1

Format: 1.8
Date: Wed, 21 Apr 2010 04:05:55 +0200
Source: dpkg
Binary: libdpkg-dev dpkg dpkg-dev libdpkg-perl dselect
Architecture: source amd64 all
Version: 1.15.7
Distribution: unstable
Urgency: low
Maintainer: Dpkg Developers <debian-dpkg@lists.debian.org>
Changed-By: Guillem Jover <guillem@debian.org>
Description: 
 dpkg       - Debian package management system
 dpkg-dev   - Debian package development tools
 dselect    - Debian package management front-end
 libdpkg-dev - Debian package management static library
 libdpkg-perl - Dpkg perl modules
Closes: 514316 546577 553928 556889 559519 560070 568566 574599 575706 575891 577756 578162
Changes: 
 dpkg (1.15.7) unstable; urgency=low
 .
   [ Raphaël Hertzog ]
   * Clarify the plan concerning dpkg-source, debian/source/format and
     the default source format in dpkg-source(1). Add a warning
     in dpkg-source to invite people to always create debian/source/format.
     We deprecate the fallback to "1.0" (it's there for backwards compatibility
     only) and debian/source/format is going to be mandatory at some point in
     the future. Closes: #553928
   * Add .gitattributes to list of files ignored by dpkg-source.
   * Document most common warnings and errors of dpkg-source in its manual
     page.
   * Let dpkg-source read options from debian/source/local-options as well but
     do not include that file in the generated source package.
   * Improve explanation of --all option in dpkg-parsechangelog(1). Thanks to
     Jari Aalto. Closes: #575706
   * Fix dpkg to not lose package metadata on filesystems where readdir()
     returns new files added after the opendir() call, btrfs in particular
     triggered the problematic behaviour. Closes: #575891
   * Tigthen the regex used by dpkg-source to match the component name of
     supplementary tarballs so that undercore (_) are not allowed as it was
     supposed to be.
   * Introduce a new script called dpkg-buildflags: its purpose is to retrieve
     compilation flags and it should be used within debian/rules to pass
     the right compilation flags to the build process. dpkg-builpackage still
     exports them to not break packages currently relying on them but packages
     should now start using dpkg-buildflags instead. Closes: #560070
   * For Ubuntu set default value of LDFLAGS to -Wl,-Bsymbolic-functions.
   * Cleanup some old Conflicts/Replaces, thanks to Helge Kreutzmann.
   * Modify dselect to treat all unknown package as known and marked for purge.
     This is a temporary work-around so that dselect doesn't try to reinstall
     packages of priority > standard that were removed or not installed. Thanks
     to Robert Luderda for the patch. Closes: #559519, #556889
   * dpkg now exports DPKG_MAINTSCRIPT_NAME to maintainer scripts with the
     type of maintainer script currently running (preinst, postinst, prerm,
     postrm). Closes: #546577
   * dpkg now exports DPKG_LIBDIR to maintainer scripts pointing to the
     private directory containing internal programs like the upcoming
     maintscript-helper.
   * Add $DPKG_LIBDIR/maintscript-helper program that can be used in
     maintainer scripts to perform common operations working around
     current dpkg limitations: first version supports removing obsolete
     conffiles and renaming conffiles. Closes: #514316
   * Fix "dpkg-scansources -e", it was calling a non-existing function.
     Closes: #578162
   * Add new script dpkg-mergechangelogs to do 3-way merges of Debian
     changelogs. Add libalgorithm-merge-perl to Recommends for the
     benefit of this script.
 .
   [ Colin Watson ]
   * Modern tar files typically use NormalFile1 rather than NormalFile0 for
     file objects. A typo meant that the former never triggered rename
     deferral. Closes: #577756
   * Use the new list of files on rename deferral instead of old one, so that
     newly added files get installed.
 .
   [ Guillem Jover ]
   * Report deferred trigger errors on status-fd. Closes: #574599
     Thanks to Michael Vogt <michael.vogt@ubuntu.com>.
   * When creating hard links to normal files on extraction use the .dpkg-new
     filename for source as the file is not yet in place due to the rename
     deferral. Thanks to Colin Watson for the initial patch.
   * Do not output the Package-Type field on udeb.
   * Fix versioned Replaces to not produce file overwrite errors on downgrades.
     Closes: #568566
   * Fix installation of replaced and replacing packages in reverse order
     (first the replacing then the replaced) for which the replaced package
     is supposed to get disappeared, to disappear the correct package and not
     lose track of the ownership of the replaced files.
 .
   [ Updated dpkg translations ]
   * German (Sven Joachim).
 .
   [ Updated dselect translations ]
   * German (Sven Joachim).
 .
   [ Updated man page translations ]
   * German (Helge Kreutzmann).
 .
   [ Updated scripts translations ]
   * German (Helge Kreutzmann).
Checksums-Sha1: 
 2f096f1027105eb1a9950692cda75d338c4b52c7 1213 dpkg_1.15.7.dsc
 fdf14a74370fb9daac4a67d703f6e60c20eaec51 4872332 dpkg_1.15.7.tar.bz2
 ccc84900a91c120d260153f3095a43445013548e 371632 libdpkg-dev_1.15.7_amd64.deb
 41ab7052b7d606749f434dc519388b6d1821ae22 2062348 dpkg_1.15.7_amd64.deb
 4a5fbbf048151f1468a00155cf13daa0ce6aea86 828512 dselect_1.15.7_amd64.deb
 6760d76f7b085b8e2c2d7f6dfec4d69984413823 648164 dpkg-dev_1.15.7_all.deb
 6a28af1efa9b249a4536b4cc10d8e61d9dfb9925 578192 libdpkg-perl_1.15.7_all.deb
Checksums-Sha256: 
 d8d261e40d6d0f48dd39dee867cfcb0eb2385423fc9ee5948657a6785406bddd 1213 dpkg_1.15.7.dsc
 f8d0a779361f3fd7f89a138cd632a4ab47f62ca1ccd0f393f2e81be899605e4f 4872332 dpkg_1.15.7.tar.bz2
 e8470ce90649f17a05f1e9d47e440ae2568feb0946e514431ba579130afe9378 371632 libdpkg-dev_1.15.7_amd64.deb
 077c270b0f31181081751b8a66a98a9ca598d1b64a689218e882d2841f8b6bbe 2062348 dpkg_1.15.7_amd64.deb
 0e0d45a5001dcbafbfb36b789b3c6316ddd7cb4d9d4d4cf847912a7273932aa7 828512 dselect_1.15.7_amd64.deb
 ca757de11c7a65791e67d807068ef5d592605dbce7632ed4b83d94715fb9acd0 648164 dpkg-dev_1.15.7_all.deb
 05fc8150c8b8ea29315d8a5f1a48d8cb7453d1ce1a95a3af492f3e8acec7461d 578192 libdpkg-perl_1.15.7_all.deb
Files: 
 2df9bfed2c1c2342da2196925ab597fb 1213 admin required dpkg_1.15.7.dsc
 f4638fd8a623aa48efd62b48644b1ab3 4872332 admin required dpkg_1.15.7.tar.bz2
 508f4f97ac08d1e23f98fad3801535fe 371632 libdevel optional libdpkg-dev_1.15.7_amd64.deb
 c9d13d664114569a3884721f52a2b8b5 2062348 admin required dpkg_1.15.7_amd64.deb
 ca86a0334edbbaef23354ada093473a6 828512 admin optional dselect_1.15.7_amd64.deb
 e850c25f7e57b1b570181b94522259de 648164 utils optional dpkg-dev_1.15.7_all.deb
 2ff2c47b5e043f0704b90b1245fb3614 578192 perl optional libdpkg-perl_1.15.7_all.deb

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

iEYEARECAAYFAkvOZUkACgkQuW9ciZ2SjJt4TgCeNn227r3zWFjOyy/12jo6WH9z
XLwAoNjTBZAyEb30antcMbFdZvgtP1h8
=egWK
-----END PGP SIGNATURE-----





Reply sent to Guillem Jover <guillem@debian.org>:
You have taken responsibility. (Wed, 21 Apr 2010 03:36:17 GMT) Full text and rfc822 format available.

Notification sent to Jussi Hakala <jussi.hakala@hut.fi>:
Bug acknowledged by developer. (Wed, 21 Apr 2010 03:36:17 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Dpkg Developers <debian-dpkg@lists.debian.org>:
Bug#560070; Package dpkg-dev. (Wed, 21 Apr 2010 09:45:07 GMT) Full text and rfc822 format available.

Acknowledgement sent to Bill Allombert <Bill.Allombert@math.u-bordeaux1.fr>:
Extra info received and forwarded to list. Copy sent to Dpkg Developers <debian-dpkg@lists.debian.org>. (Wed, 21 Apr 2010 09:45:07 GMT) Full text and rfc822 format available.

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

From: Bill Allombert <Bill.Allombert@math.u-bordeaux1.fr>
To: 560070@bugs.debian.org
Subject: Re: Bug#560070: fixed in dpkg 1.15.7
Date: Wed, 21 Apr 2010 11:16:52 +0200
>    [ Raphaël Hertzog ]
>    * Introduce a new script called dpkg-buildflags: its purpose is to retrieve
>      compilation flags and it should be used within debian/rules to pass
>      the right compilation flags to the build process. dpkg-builpackage still
>      exports them to not break packages currently relying on them but packages
>      should now start using dpkg-buildflags instead. Closes: #560070

So this does not actually fix this bug ?

Cheers,
Bill.

> From: Bill Allombert <Bill.Allombert@math.u-bordeaux1.fr>
> To: submit@bugs.debian.org
> Subject: dpkg: please stop setting CFLAGS etc. environment variables
> 
> Package: dpkg-dev
> Version: 1.15.5
> 
> Hello dpkg developers,
> 
> dpkg-buildpackages set a bunch of general purpose environment variables before
> calling debian/rules (CFLAGS, CXXFLAGS, FFLAGS, LDFLAGS, MFLAGS, etc.).
> 
> This cause some packages to build differently with dpkg-buildpackages or
> with 'debian/rules binary' and there is no consensus in Debian that it is
> a correct thing for dpkg-buildpackages to do, and there are no documentation
> how packages are supposed to deal with them and deal with builds done by
> 'debian/rules binary'.
> 
> Please change dpkg not to set them for standard Debian builds.
> 
> Cheers,
-- 
Bill. <ballombe@debian.org>

Imagine a large red swirl here. 




Information forwarded to debian-bugs-dist@lists.debian.org, Dpkg Developers <debian-dpkg@lists.debian.org>:
Bug#560070; Package dpkg-dev. (Mon, 03 May 2010 19:30:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Regid Ichira <gl2n30y06arv2@hotmail.com>:
Extra info received and forwarded to list. Copy sent to Dpkg Developers <debian-dpkg@lists.debian.org>. (Mon, 03 May 2010 19:30:03 GMT) Full text and rfc822 format available.

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

From: Regid Ichira <gl2n30y06arv2@hotmail.com>
To: <560070@bugs.debian.org>
Subject: Just wondering what is the relation between DEB_BUILD_OPTIONS and dpkg-buildflags
Date: Mon, 3 May 2010 21:26:30 +0200
I think DEB_BUILD_OPTIONS is in policy.  Isn't dpkg-buildflags and
DEB_BUILD_OPTIONS interfering with each other?
 		 	   		  
_________________________________________________________________
Hotmail: Powerful Free email with security by Microsoft.
https://signup.live.com/signup.aspx?id=60969



Information forwarded to debian-bugs-dist@lists.debian.org, Dpkg Developers <debian-dpkg@lists.debian.org>:
Bug#560070; Package dpkg-dev. (Mon, 03 May 2010 19:39:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jonathan Nieder <jrnieder@gmail.com>:
Extra info received and forwarded to list. Copy sent to Dpkg Developers <debian-dpkg@lists.debian.org>. (Mon, 03 May 2010 19:39:03 GMT) Full text and rfc822 format available.

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

From: Jonathan Nieder <jrnieder@gmail.com>
To: Regid Ichira <gl2n30y06arv2@hotmail.com>, 560070@bugs.debian.org
Subject: Re: Just wondering what is the relation between DEB_BUILD_OPTIONS and dpkg-buildflags
Date: Mon, 3 May 2010 14:36:47 -0500
Hi Regid,

Regid Ichira wrote:

> I think DEB_BUILD_OPTIONS is in policy.  Isn't dpkg-buildflags and
> DEB_BUILD_OPTIONS interfering with each other?

No, because dpkg-buildflags respects DEB_BUILD_OPTIONS.

Hope that helps,
Jonathan




Information forwarded to debian-bugs-dist@lists.debian.org, Dpkg Developers <debian-dpkg@lists.debian.org>:
Bug#560070; Package dpkg-dev. (Wed, 12 May 2010 19:24:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jonathan Nieder <jrnieder@gmail.com>:
Extra info received and forwarded to list. Copy sent to Dpkg Developers <debian-dpkg@lists.debian.org>. (Wed, 12 May 2010 19:24:04 GMT) Full text and rfc822 format available.

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

From: Jonathan Nieder <jrnieder@gmail.com>
To: Bill Allombert <Bill.Allombert@math.u-bordeaux1.fr>
Cc: 560070@bugs.debian.org
Subject: Re: dpkg: please stop setting CFLAGS etc. environment variables
Date: Wed, 12 May 2010 14:22:23 -0500
found 560070 dpkg/1.15.7
quit

Bill Allombert wrote:

>>    [ Raphaël Hertzog ]
>>    * Introduce a new script called dpkg-buildflags: its purpose is to retrieve
>>      compilation flags and it should be used within debian/rules to pass
>>      the right compilation flags to the build process. dpkg-builpackage still
>>      exports them to not break packages currently relying on them but packages
>>      should now start using dpkg-buildflags instead. Closes: #560070
>
> So this does not actually fix this bug ?

No, though it might bring us closer to a fix.  Thanks for noticing.

Cheers,
Jonathan




Bug Marked as found in versions dpkg/1.15.7; no longer marked as fixed in versions dpkg/1.15.7 and reopened. Request was from Jonathan Nieder <jrnieder@gmail.com> to control@bugs.debian.org. (Wed, 12 May 2010 19:24:12 GMT) Full text and rfc822 format available.

Forcibly Merged 560070 571420 586691. Request was from Raphael Hertzog <hertzog@debian.org> to control@bugs.debian.org. (Tue, 22 Jun 2010 04:51:09 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Dpkg Developers <debian-dpkg@lists.debian.org>:
Bug#560070; Package dpkg-dev. (Tue, 22 Jun 2010 10:33:06 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ian Jackson <Ian.Jackson@eu.citrix.com>:
Extra info received and forwarded to list. Copy sent to Dpkg Developers <debian-dpkg@lists.debian.org>. (Tue, 22 Jun 2010 10:33:07 GMT) Full text and rfc822 format available.

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

From: Ian Jackson <Ian.Jackson@eu.citrix.com>
To: Raphael Hertzog <hertzog@debian.org>
Cc: 560070@bugs.debian.org, 560070-submitter@bugs.debian.org
Subject: Re: Bug#586691: dpkg-buildpackage and LDFLAGS etc.
Date: Tue, 22 Jun 2010 11:19:27 +0100
Raphael Hertzog writes ("Re: Bug#586691: dpkg-buildpackage and LDFLAGS etc."):
> forcemerge 560070 586691
> thanks
...
> We have dpkg-buildflags nowadays for this.

Thanks.  I have just read #560070.  Can I request that #560070 be
fixed in a stable release update ?

> We're migrating to a situation where packages are supposed to use
> dpkg-buildflags to set the flags themselves rather than having them
> set by dpkg-buildpackage but until it's more widespread we keep them
> in the environment.

I'm sorry, but I disagree with this approach.  It is not right to do a
continue doing a broken thing (one which can actually break package
builds) "for compatibility" !

Ian.




Message sent on to Bill Allombert <Bill.Allombert@math.u-bordeaux1.fr>:
Bug#560070. (Tue, 22 Jun 2010 10:33:16 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Dpkg Developers <debian-dpkg@lists.debian.org>:
Bug#560070; Package dpkg-dev. (Tue, 22 Jun 2010 12:27:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Guillem Jover <guillem@debian.org>:
Extra info received and forwarded to list. Copy sent to Dpkg Developers <debian-dpkg@lists.debian.org>. (Tue, 22 Jun 2010 12:27:03 GMT) Full text and rfc822 format available.

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

From: Guillem Jover <guillem@debian.org>
To: Ian Jackson <Ian.Jackson@eu.citrix.com>, 560070@bugs.debian.org
Subject: Re: Bug#560070: Bug#586691: dpkg-buildpackage and LDFLAGS etc.
Date: Tue, 22 Jun 2010 14:25:54 +0200
Hi!

On Tue, 2010-06-22 at 11:19:27 +0100, Ian Jackson wrote:
> Raphael Hertzog writes ("Re: Bug#586691: dpkg-buildpackage and LDFLAGS etc."):
> > forcemerge 560070 586691
> > thanks
> ...
> > We have dpkg-buildflags nowadays for this.

> Thanks.  I have just read #560070.  Can I request that #560070 be
> fixed in a stable release update ?

Unfortunately I don't think that would be acceptable for a stable
update, as some maintainers started relying on dpkg-buildpackage's
behaviour of setting those flags and stopped setting them in their
rules files. So there's a chance of regressions. If someone were to
test build the whole archive and compare results, then the SRM might
be amenable to consider it.

> > We're migrating to a situation where packages are supposed to use
> > dpkg-buildflags to set the flags themselves rather than having them
> > set by dpkg-buildpackage but until it's more widespread we keep them
> > in the environment.
> 
> I'm sorry, but I disagree with this approach.  It is not right to do a
> continue doing a broken thing (one which can actually break package
> builds) "for compatibility" !

Right, I agree with this. More so when we have dpkg-buildflags now.
Keeping setting the flags just entrenches the current situation and
makes it worse, as I see from time to time in changelogs, maintainers
are removing the setting of the flags from debian/rules.

I mentioned I wanted to revert the setting of the flags in a thread in
debian-devel [0] some time ago, I don't remember exactly, but I think
after discussing with Raphaël, we decided to postpone it until an
alternative solution to the centralized variable setting was provided.
The time has clearly come now, though.

regards,
guillem

<http://lists.debian.org/debian-devel/2009/05/msg00044.html>




Information forwarded to debian-bugs-dist@lists.debian.org, Dpkg Developers <debian-dpkg@lists.debian.org>:
Bug#560070; Package dpkg-dev. (Wed, 23 Jun 2010 06:06: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 Dpkg Developers <debian-dpkg@lists.debian.org>. (Wed, 23 Jun 2010 06:06:02 GMT) Full text and rfc822 format available.

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

From: Raphael Hertzog <hertzog@debian.org>
To: Guillem Jover <guillem@debian.org>, 560070@bugs.debian.org
Cc: Ian Jackson <Ian.Jackson@eu.citrix.com>
Subject: Re: Bug#560070: Bug#586691: dpkg-buildpackage and LDFLAGS etc.
Date: Wed, 23 Jun 2010 08:01:24 +0200
On Tue, 22 Jun 2010, Guillem Jover wrote:
> Unfortunately I don't think that would be acceptable for a stable
> update, as some maintainers started relying on dpkg-buildpackage's
> behaviour of setting those flags and stopped setting them in their
> rules files. So there's a chance of regressions. If someone were to
> test build the whole archive and compare results, then the SRM might
> be amenable to consider it.

IMO it's time lost for almost no gain. I won't pursue this and I don't
think it would right.

> > I'm sorry, but I disagree with this approach.  It is not right to do a
> > continue doing a broken thing (one which can actually break package
> > builds) "for compatibility" !
> 
> Right, I agree with this. More so when we have dpkg-buildflags now.
> Keeping setting the flags just entrenches the current situation and
> makes it worse, as I see from time to time in changelogs, maintainers
> are removing the setting of the flags from debian/rules.
> 
> I mentioned I wanted to revert the setting of the flags in a thread in
> debian-devel [0] some time ago, I don't remember exactly, but I think
> after discussing with Raphaël, we decided to postpone it until an
> alternative solution to the centralized variable setting was provided.
> The time has clearly come now, though.

No, the time has not yet come, we're at the end of the squeeze cycle,
we're not supposed to make such important changes. We should do it
at the start of squeeze+1.

And I expect "dh" to make use of dpkg-buildflags to somehow export
the variables to the build system, I don't know how it will
do it, but if it exports them to the environment then by not dropping the
variables right now we're avoiding the second step for those packages:
- variable set by /usr/bin/dpkg-buildpackage
- variable not set
- variable set by /usr/bin/dh

Cheers,
-- 
Raphaël Hertzog

Like what I do? Sponsor me: http://ouaza.com/wp/2010/01/05/5-years-of-freexian/
My Debian goals: http://ouaza.com/wp/2010/01/09/debian-related-goals-for-2010/




Information forwarded to debian-bugs-dist@lists.debian.org, Dpkg Developers <debian-dpkg@lists.debian.org>:
Bug#560070; Package dpkg-dev. (Wed, 14 Jul 2010 12:57:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Bill Allombert <Bill.Allombert@math.u-bordeaux1.fr>:
Extra info received and forwarded to list. Copy sent to Dpkg Developers <debian-dpkg@lists.debian.org>. (Wed, 14 Jul 2010 12:57:02 GMT) Full text and rfc822 format available.

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

From: Bill Allombert <Bill.Allombert@math.u-bordeaux1.fr>
To: Ian Jackson <Ian.Jackson@eu.citrix.com>, 560070-quiet@bugs.debian.org
Cc: Raphael Hertzog <hertzog@debian.org>, 560070@bugs.debian.org, 560070-submitter@bugs.debian.org
Subject: Re: Bug#560070: Bug#586691: dpkg-buildpackage and LDFLAGS etc.
Date: Wed, 14 Jul 2010 14:56:15 +0200
On Tue, Jun 22, 2010 at 11:19:27AM +0100, Ian Jackson wrote:
> Raphael Hertzog writes ("Re: Bug#586691: dpkg-buildpackage and LDFLAGS etc."):
> > forcemerge 560070 586691
> > thanks
> ...
> > We have dpkg-buildflags nowadays for this.
> 
> Thanks.  I have just read #560070.  Can I request that #560070 be
> fixed in a stable release update ?

I do not think it is possible because some debian/rules files were changed to rely on the
new behaviour. lenny might not build correclty without that bug.

> > We're migrating to a situation where packages are supposed to use
> > dpkg-buildflags to set the flags themselves rather than having them
> > set by dpkg-buildpackage but until it's more widespread we keep them
> > in the environment.
> 
> I'm sorry, but I disagree with this approach.  It is not right to do a
> continue doing a broken thing (one which can actually break package
> builds) "for compatibility" !

I agree. This should be fixed before the archive test rebuild for squeeze are performed.
When that bug is fixed, we can start experimenting with dpkg-buildflags, but not before.

Cheers,
-- 
Bill. <ballombe@debian.org>

Imagine a large red swirl here. 




Information stored :
Bug#560070; Package dpkg-dev. (Wed, 14 Jul 2010 12:57:06 GMT) Full text and rfc822 format available.

Acknowledgement sent to Bill Allombert <Bill.Allombert@math.u-bordeaux1.fr>:
Extra info received and filed, but not forwarded. (Wed, 14 Jul 2010 12:57:06 GMT) Full text and rfc822 format available.

Message sent on to Bill Allombert <Bill.Allombert@math.u-bordeaux1.fr>:
Bug#560070. (Wed, 14 Jul 2010 12:57:08 GMT) Full text and rfc822 format available.

Message sent on to Bill Allombert <Bill.Allombert@math.u-bordeaux1.fr>:
Bug#560070. (Wed, 14 Jul 2010 16:39:10 GMT) Full text and rfc822 format available.

Message #80 received at 560070-submitter@bugs.debian.org (full text, mbox):

From: Jonathan Nieder <jrnieder@gmail.com>
To: Raphael Hertzog <hertzog@debian.org>
Cc: Guillem Jover <guillem@debian.org>, 560070-submitter@bugs.debian.org, Ian Jackson <Ian.Jackson@eu.citrix.com>
Subject: Re: dpkg-buildpackage and LDFLAGS etc.
Date: Wed, 14 Jul 2010 11:35:13 -0500
Raphael Hertzog wrote:

> No, the time has not yet come, we're at the end of the squeeze cycle,
> we're not supposed to make such important changes. We should do it
> at the start of squeeze+1.

Isn’t that a kind of question for the release team to decide?




Message sent on to Bill Allombert <Bill.Allombert@math.u-bordeaux1.fr>:
Bug#560070. (Wed, 14 Jul 2010 18:33:14 GMT) Full text and rfc822 format available.

Message #83 received at 560070-submitter@bugs.debian.org (full text, mbox):

From: Jonathan Nieder <jrnieder@gmail.com>
To: Raphael Hertzog <hertzog@debian.org>
Cc: Guillem Jover <guillem@debian.org>, 560070-submitter@bugs.debian.org, Ian Jackson <Ian.Jackson@eu.citrix.com>, 544844@bugs.debian.org
Subject: Re: Bug#560070: dpkg-buildpackage and LDFLAGS etc.
Date: Wed, 14 Jul 2010 13:31:12 -0500
Jonathan Nieder wrote:

> Isn’t that a kind of question for the release team to decide?

To clarify: if you are worried about debian/rules as produced
by e.g. dh_make, that is a different story; I can understand
holding off until debhelper learns to do something reasonable with
DEB_BUILD_OPTIONS=noopt.  And yes, that might mean waiting until
squeeze+1.

It would be nice to know what would break if dpkg-dev stopped
exporting CFLAGS.  Is there someone out there with hardware capable of
quickly rebuilding some representative subset of the archive to
determine that?

Sorry for the noise,
Jonathan




Message sent on to Bill Allombert <Bill.Allombert@math.u-bordeaux1.fr>:
Bug#560070. (Tue, 27 Jul 2010 06:36:05 GMT) Full text and rfc822 format available.

Message #86 received at 560070-submitter@bugs.debian.org (full text, mbox):

From: Raphael Hertzog <hertzog@debian.org>
To: Jonathan Nieder <jrnieder@gmail.com>
Cc: Guillem Jover <guillem@debian.org>, 560070-submitter@bugs.debian.org, Ian Jackson <Ian.Jackson@eu.citrix.com>, 544844@bugs.debian.org
Subject: Re: Bug#560070: dpkg-buildpackage and LDFLAGS etc.
Date: Tue, 27 Jul 2010 08:33:31 +0200
Hi,

On Wed, 14 Jul 2010, Jonathan Nieder wrote:
> It would be nice to know what would break if dpkg-dev stopped
> exporting CFLAGS.  Is there someone out there with hardware capable of
> quickly rebuilding some representative subset of the archive to
> determine that?

Lucas Nussbaum has access to Grid5000 and regularly does full rebuilds.
Feel free to cooperate with him to gather any useful information.

But be aware that not all failures are catched at build time.

Cheers,
-- 
Raphaël Hertzog ◈ Debian Developer ◈ [Flattr=20693]

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




Information stored :
Bug#560070; Package dpkg-dev. (Tue, 27 Jul 2010 12:57:09 GMT) Full text and rfc822 format available.

Acknowledgement sent to Bill Allombert <Bill.Allombert@math.u-bordeaux1.fr>:
Extra info received and filed, but not forwarded. (Tue, 27 Jul 2010 12:57:09 GMT) Full text and rfc822 format available.

Message #91 received at 560070-quiet@bugs.debian.org (full text, mbox):

From: Bill Allombert <Bill.Allombert@math.u-bordeaux1.fr>
To: Raphael Hertzog <hertzog@debian.org>, 560070-quiet@bugs.debian.org
Cc: Jonathan Nieder <jrnieder@gmail.com>, Guillem Jover <guillem@debian.org>, 560070-submitter@bugs.debian.org, Ian Jackson <Ian.Jackson@eu.citrix.com>, 544844@bugs.debian.org
Subject: Re: Bug#560070: dpkg-buildpackage and LDFLAGS etc.o
Date: Tue, 27 Jul 2010 14:54:13 +0200
On Tue, Jul 27, 2010 at 08:33:31AM +0200, Raphael Hertzog wrote:
> Hi,
> 
> On Wed, 14 Jul 2010, Jonathan Nieder wrote:
> > It would be nice to know what would break if dpkg-dev stopped
> > exporting CFLAGS.  Is there someone out there with hardware capable of
> > quickly rebuilding some representative subset of the archive to
> > determine that?
> 
> Lucas Nussbaum has access to Grid5000 and regularly does full rebuilds.
> Feel free to cooperate with him to gather any useful information.
> 
> But be aware that not all failures are catched at build time.

This also all true for the current situation. The bugs caused by exporting
CFLAGS that are not yet fixed are certainly in greater number than the bugs
that would be added by removing CFLAGS, even without considering that packages 
that depend on CFLAGS being set are not policy-compliant anyway.

Cheers,
-- 
Bill. <ballombe@debian.org>

Imagine a large red swirl here. 




Message sent on to Bill Allombert <Bill.Allombert@math.u-bordeaux1.fr>:
Bug#560070. (Tue, 27 Jul 2010 12:57:11 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Dpkg Developers <debian-dpkg@lists.debian.org>:
Bug#560070; Package dpkg-dev. (Sun, 08 May 2011 10:30:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Bill Allombert <Bill.Allombert@math.u-bordeaux1.fr>:
Extra info received and forwarded to list. Copy sent to Dpkg Developers <debian-dpkg@lists.debian.org>. (Sun, 08 May 2011 10:30:04 GMT) Full text and rfc822 format available.

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

From: Bill Allombert <Bill.Allombert@math.u-bordeaux1.fr>
To: 560070@bugs.debian.org
Subject: Re: Bug#560070: dpkg: please stop setting CFLAGS etc. environment variables
Date: Sun, 8 May 2011 12:27:40 +0200
[Message part 1 (text/plain, inline)]
Hello Dpkg maintainers,

Could you fix this issue soon so that it does not interfer with the release of Wheezy ?

Thanks,
-- 
Bill. <ballombe@debian.org>

Imagine a large red swirl here. 
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Dpkg Developers <debian-dpkg@lists.debian.org>:
Bug#560070; Package dpkg-dev. (Mon, 09 May 2011 09:51:16 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jonathan Nieder <jrnieder@gmail.com>:
Extra info received and forwarded to list. Copy sent to Dpkg Developers <debian-dpkg@lists.debian.org>. (Mon, 09 May 2011 09:51:20 GMT) Full text and rfc822 format available.

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

From: Jonathan Nieder <jrnieder@gmail.com>
To: 544844@bugs.debian.org
Cc: Bill Allombert <Bill.Allombert@math.u-bordeaux1.fr>, 560070@bugs.debian.org
Subject: Re: dpkg: please stop setting CFLAGS etc. environment variables
Date: Mon, 9 May 2011 04:48:35 -0500
Bill Allombert wrote:

> Hello Dpkg maintainers,
>
> Could you fix this issue soon so that it does not interfer with the
> release of Wheezy ?

Sounds good to me.  Raphaël, Joey, any thoughts?

-- >8 --
Subject: dpkg-buildpackage: do not export build flags

For over 10 years policy has required packages to set compiler flags
such as CFLAGS based on settings in DEB_BUILD_OPTIONS, not the values
inherited from dpkg-buildpackage.  Stop exporting such variables from
dpkg-buildpackage, so packages relying on the exported variables can
be caught early in the wheezy release cycle and we can be sure
packages build correctly when using debian/rules directly.

(Often a good way to set CFLAGS reasonably is with makefile snippets
like "CFLAGS := -Wall $(dpkg-buildflags --get CFLAGS)".)

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
 man/dpkg-buildpackage.1      |    8 +++-----
 scripts/dpkg-buildpackage.pl |    8 --------
 2 files changed, 3 insertions(+), 13 deletions(-)

diff --git a/man/dpkg-buildpackage.1 b/man/dpkg-buildpackage.1
index 6460e51..698bff4 100644
--- a/man/dpkg-buildpackage.1
+++ b/man/dpkg-buildpackage.1
@@ -231,15 +231,13 @@ Show the version and exit.
 Even if \fBdpkg\-buildpackage\fP export some variables, \fBdebian/rules\fP
 should not rely on their presence and should instead use the
 respective interface to retrieve the needed values.
+Versions of \fBdpkg\-buildpackage\fP before 1.16.1 also exported
+compiler flags such as \fBCFLAGS\fP with values as returned
+by \fBdpkg\-buildflags\fP.
 .SS Variables set by dpkg-architecture
 \fBdpkg\-architecture\fP is called with the \fB\-a\fP and \fB\-t\fP
 parameters forwarded. Any variable that is output by its \fB\-s\fP
 option is integrated in the build environment.
-.SS Compiler flags
-The \fBCFLAGS\fP, \fBCXXFLAGS\fP, \fBFFLAGS\fP, \fBCPPFLAGS\fP
-and \fBLDFLAGS\fP environment variables are set to the values
-that \fBdpkg\-buildflags\fP returned. See its manual page for more
-information.
 .
 .SH BUGS
 It should be possible to specify spaces and shell metacharacters in
diff --git a/scripts/dpkg-buildpackage.pl b/scripts/dpkg-buildpackage.pl
index aaea544..6eb241a 100755
--- a/scripts/dpkg-buildpackage.pl
+++ b/scripts/dpkg-buildpackage.pl
@@ -294,14 +294,6 @@ if (defined $parallel) {
     $build_opts->export();
 }
 
-my $build_flags = Dpkg::BuildFlags->new();
-$build_flags->load_config();
-foreach my $flag ($build_flags->list()) {
-    $ENV{$flag} = $build_flags->get($flag);
-    printf(_g("%s: export %s from dpkg-buildflags (origin: %s): %s\n"),
-	   $progname, $flag, $build_flags->get_origin($flag), $ENV{$flag});
-}
-
 my $cwd = cwd();
 my $dir = basename($cwd);
 
-- 
1.7.5.1





Information forwarded to debian-bugs-dist@lists.debian.org, Dpkg Developers <debian-dpkg@lists.debian.org>:
Bug#560070; Package dpkg-dev. (Mon, 09 May 2011 10:09:13 GMT) Full text and rfc822 format available.

Acknowledgement sent to Modestas Vainius <modax@debian.org>:
Extra info received and forwarded to list. Copy sent to Dpkg Developers <debian-dpkg@lists.debian.org>. (Mon, 09 May 2011 10:09:14 GMT) Full text and rfc822 format available.

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

From: Modestas Vainius <modax@debian.org>
To: Jonathan Nieder <jrnieder@gmail.com>, 544844@bugs.debian.org
Cc: Bill Allombert <Bill.Allombert@math.u-bordeaux1.fr>, 560070@bugs.debian.org
Subject: Re: Bug#544844: dpkg: please stop setting CFLAGS etc. environment variables
Date: Mon, 9 May 2011 13:05:15 +0300
[Message part 1 (text/plain, inline)]
Hello,

On pirmadienis 09 Gegužė 2011 12:48:35 Jonathan Nieder wrote:
> Bill Allombert wrote:
> > Hello Dpkg maintainers,
> > 
> > Could you fix this issue soon so that it does not interfer with the
> > release of Wheezy ?
> 
> Sounds good to me.  Raphaël, Joey, any thoughts?
> 
> -- >8 --
> Subject: dpkg-buildpackage: do not export build flags
> 
> For over 10 years policy has required packages to set compiler flags
> such as CFLAGS based on settings in DEB_BUILD_OPTIONS, not the values
> inherited from dpkg-buildpackage.  Stop exporting such variables from
> dpkg-buildpackage, so packages relying on the exported variables can
> be caught early in the wheezy release cycle and we can be sure
> packages build correctly when using debian/rules directly.

All examples of "minimal" dh rules have been recommending contrary all this 
time. Many packages will be broken unless this is dealt with in dh. 
Personally, I don't see why this can't be fixed in dh at new compat level 
(with an dh option to disable this auto-export of buildflags). 99,9% of 
packages will have to use dpkg-buildflags anyway so it is just pointless to 
have $(dpkg-buildflags --export=make) in each and every minimal dh rules file.

> (Often a good way to set CFLAGS reasonably is with makefile snippets
> like "CFLAGS := -Wall $(dpkg-buildflags --get CFLAGS)".)

I don't think this scales well. Something like $(dpkg-buildflags --
export=make) would be better to suggest. IMHO, project shall decide on clear 
recommendations how to proceed.

-- 
Modestas Vainius <modax@debian.org>
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Dpkg Developers <debian-dpkg@lists.debian.org>:
Bug#560070; Package dpkg-dev. (Mon, 09 May 2011 10:39:56 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jonathan Nieder <jrnieder@gmail.com>:
Extra info received and forwarded to list. Copy sent to Dpkg Developers <debian-dpkg@lists.debian.org>. (Mon, 09 May 2011 10:40:03 GMT) Full text and rfc822 format available.

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

From: Jonathan Nieder <jrnieder@gmail.com>
To: Modestas Vainius <modax@debian.org>
Cc: 544844@bugs.debian.org, Bill Allombert <Bill.Allombert@math.u-bordeaux1.fr>, 560070@bugs.debian.org
Subject: Re: dpkg: please stop setting CFLAGS etc. environment variables
Date: Mon, 9 May 2011 05:34:31 -0500
Modestas Vainius wrote:

> All examples of "minimal" dh rules have been recommending contrary all this 
> time.

Also, where I said "policy has required" I should have said just
recommended.

> Many packages will be broken unless this is dealt with in dh. 
> Personally, I don't see why this can't be fixed in dh at new compat level 
> (with an dh option to disable this auto-export of buildflags). 99,9% of 
> packages will have to use dpkg-buildflags anyway so it is just pointless to 
> have $(dpkg-buildflags --export=make) in each and every minimal dh rules file.

Yes, I agree with you (hence the cc to Bug#560070).

Thinking more clearly about it, I wonder if dpkg-buildpackage has to
stop exporting those variables soon after all.  Maybe there could be
an option or envvar to stop exporting them (to help people test their
packages) and they could continue to be exported by default to support
old packages, just like the dpkg-architecture variables are.

The big downside: if the architecture variables are any indication of
what to expect, new maintainers would use the exported compiler flags.
It's too subtle.

In any scenario, I think debhelper is the place to make the first
step. :(




Information forwarded to debian-bugs-dist@lists.debian.org, Dpkg Developers <debian-dpkg@lists.debian.org>:
Bug#560070; Package dpkg-dev. (Mon, 09 May 2011 10:40:08 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jonathan Nieder <jrnieder@gmail.com>:
Extra info received and forwarded to list. Copy sent to Dpkg Developers <debian-dpkg@lists.debian.org>. (Mon, 09 May 2011 10:40:09 GMT) Full text and rfc822 format available.

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

From: Jonathan Nieder <jrnieder@gmail.com>
To: Modestas Vainius <modax@debian.org>
Cc: 544844@bugs.debian.org, Bill Allombert <Bill.Allombert@math.u-bordeaux1.fr>, 560070@bugs.debian.org
Subject: Re: dpkg: please stop setting CFLAGS etc. environment variables
Date: Mon, 9 May 2011 05:37:00 -0500
Modestas Vainius wrote:

> I don't think this scales well. Something like $(dpkg-buildflags --
> export=make) would be better to suggest. IMHO, project shall decide on clear 
> recommendations how to proceed.

Side note: I don't know how to do that with GNU make, actually.
$(shell ...) works for one variable, but it converts newlines to
spaces.  In the spirit you suggest, the simplest way might be
something like

 configure-stamp:
	set -e; \
	eval "$$(dpkg-buildflags --export=sh)"; \
	CFLAGS="-Wall $$CFLAGS"; \
	./configure ...

In my own work I have been using

 CFLAGS := -Wall $(shell dpkg-buildflags --get CFLAGS)

which has some advantages over --export=sh:

 - it can be overridden on the "debian/rules" command line;
 - it allows me to easily pass the flags explicit on the configure
   command line instead of through the environment;
 - I can easily read and manipulate CFLAGS before passing it on;
 - it does not affect flags other than CFLAGS, so the effect
   gets well tested and the use case is obvious to me (unlike LDFLAGS
   et al).




Information forwarded to debian-bugs-dist@lists.debian.org, Dpkg Developers <debian-dpkg@lists.debian.org>:
Bug#560070; Package dpkg-dev. (Mon, 09 May 2011 10:45:35 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 Dpkg Developers <debian-dpkg@lists.debian.org>. (Mon, 09 May 2011 10:45:35 GMT) Full text and rfc822 format available.

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

From: Raphael Hertzog <hertzog@debian.org>
To: Jonathan Nieder <jrnieder@gmail.com>, 560070@bugs.debian.org
Cc: Modestas Vainius <modax@debian.org>, 544844@bugs.debian.org, Bill Allombert <Bill.Allombert@math.u-bordeaux1.fr>
Subject: Re: Bug#560070: dpkg: please stop setting CFLAGS etc. environment variables
Date: Mon, 9 May 2011 12:44:28 +0200
On Mon, 09 May 2011, Jonathan Nieder wrote:
> In any scenario, I think debhelper is the place to make the first
> step. :(

Yes. I did not really need a patch to rip out the environment variables,
what I need is some assurance that we're not reverting uselessly.

And for this, it would be nice to have an answer of how people should deal
with it in debhelper. So please prepare a patch for debhelper instead.

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, Dpkg Developers <debian-dpkg@lists.debian.org>:
Bug#560070; Package dpkg-dev. (Mon, 09 May 2011 13:33:06 GMT) Full text and rfc822 format available.

Acknowledgement sent to Bill Allombert <Bill.Allombert@math.u-bordeaux1.fr>:
Extra info received and forwarded to list. Copy sent to Dpkg Developers <debian-dpkg@lists.debian.org>. (Mon, 09 May 2011 13:33:06 GMT) Full text and rfc822 format available.

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

From: Bill Allombert <Bill.Allombert@math.u-bordeaux1.fr>
To: Jonathan Nieder <jrnieder@gmail.com>
Cc: 544844@bugs.debian.org, 560070@bugs.debian.org
Subject: Re: dpkg: please stop setting CFLAGS etc. environment variables
Date: Mon, 9 May 2011 15:01:13 +0200
On Mon, May 09, 2011 at 04:48:35AM -0500, Jonathan Nieder wrote:
> diff --git a/man/dpkg-buildpackage.1 b/man/dpkg-buildpackage.1
> index 6460e51..698bff4 100644
> --- a/man/dpkg-buildpackage.1
> +++ b/man/dpkg-buildpackage.1
> @@ -231,15 +231,13 @@ Show the version and exit.
>  Even if \fBdpkg\-buildpackage\fP export some variables, \fBdebian/rules\fP
>  should not rely on their presence and should instead use the
>  respective interface to retrieve the needed values.
> +Versions of \fBdpkg\-buildpackage\fP before 1.16.1 also exported
> +compiler flags such as \fBCFLAGS\fP with values as returned
> +by \fBdpkg\-buildflags\fP.

I think you should state the range of version, e.g.

+Versions of \fBdpkg\-buildpackage\fP between 1.14.17 and 1.16.1 also exported
+compiler flags such as \fBCFLAGS\fP with values as returned
+by \fBdpkg\-buildflags\fP.

Cheers,
-- 
Bill. <ballombe@debian.org>

Imagine a large red swirl here. 




Information forwarded to debian-bugs-dist@lists.debian.org, Dpkg Developers <debian-dpkg@lists.debian.org>:
Bug#560070; Package dpkg-dev. (Tue, 24 May 2011 19:51:07 GMT) Full text and rfc822 format available.

Acknowledgement sent to Bill Allombert <Bill.Allombert@math.u-bordeaux1.fr>:
Extra info received and forwarded to list. Copy sent to Dpkg Developers <debian-dpkg@lists.debian.org>. (Tue, 24 May 2011 19:51:08 GMT) Full text and rfc822 format available.

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

From: Bill Allombert <Bill.Allombert@math.u-bordeaux1.fr>
To: Raphael Hertzog <hertzog@debian.org>
Cc: Jonathan Nieder <jrnieder@gmail.com>, 560070@bugs.debian.org, Modestas Vainius <modax@debian.org>, 544844@bugs.debian.org
Subject: Re: Bug#560070: dpkg: please stop setting CFLAGS etc. environment variables
Date: Tue, 24 May 2011 21:46:26 +0200
On Mon, May 09, 2011 at 12:44:28PM +0200, Raphael Hertzog wrote:
> On Mon, 09 May 2011, Jonathan Nieder wrote:
> > In any scenario, I think debhelper is the place to make the first
> > step. :(
> 
> Yes. I did not really need a patch to rip out the environment variables,
> what I need is some assurance that we're not reverting uselessly.
> 
> And for this, it would be nice to have an answer of how people should deal
> with it in debhelper. So please prepare a patch for debhelper instead.

Joey Hess answer #10 to 544844 makes clear that fixing 560070 automatically fix
544844, so there is no patches to prepare nor any need to wait for debhelper.

fix this bug is enough
 
Cheers,
-- 
Bill. <ballombe@debian.org>

Imagine a large red swirl here. 




Added tag(s) pending. Request was from Raphaël Hertzog <hertzog@debian.org> to control@bugs.debian.org. (Mon, 11 Jul 2011 07:39:06 GMT) Full text and rfc822 format available.

Message sent on to Bill Allombert <Bill.Allombert@math.u-bordeaux1.fr>:
Bug#560070. (Mon, 11 Jul 2011 07:39:19 GMT) Full text and rfc822 format available.

Message #139 received at 560070-submitter@bugs.debian.org (full text, mbox):

From: Raphaël Hertzog <hertzog@debian.org>
To: 560070-submitter@bugs.debian.org
Subject: Bug#560070 marked as pending
Date: Mon, 11 Jul 2011 07:31:18 +0000
tag 560070 pending
thanks

Hello,

Bug #560070 reported by you has been fixed in the Git repository. You can
see the changelog below, and you can check the diff of the fix at:

    http://git.debian.org/?p=dpkg/dpkg.git;a=commitdiff;h=14f134d

---
commit 14f134d403c022046d38a6abb8be0fee7fb63355
Author: Raphaël Hertzog <hertzog@debian.org>
Date:   Thu Jul 7 10:30:20 2011 +0200

    dpkg-buildpackage: no longer exports the compiler flags
    
    Packages must directly call dpkg-buildflags to retrieve them.
    
    dpkg-buildpackage still prints the flags that are returned by
    dpkg-buildflags because it's useful for debugging purpose and for
    identifying an unclean build environment.

diff --git a/debian/changelog b/debian/changelog
index 601d397..7c8baee 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -60,6 +60,8 @@ dpkg (1.16.1) UNRELEASED; urgency=low
   * Fix a small typo in dpkg-source(1). Closes: #632937
   * Reword the description of dpkg-source --before-build and --after-build
     to be clearer. Closes: #608260
+  * dpkg-buildpackage no longer exports the compiler flags. Closes: #560070
+    Packages must directly call dpkg-buildflags to retrieve them.
 
   [ Guillem Jover ]
   * Install deb-src-control(5) man pages in dpkg-dev. Closes: #620520




Information forwarded to debian-bugs-dist@lists.debian.org, Dpkg Developers <debian-dpkg@lists.debian.org>:
Bug#560070; Package dpkg-dev. (Sun, 07 Aug 2011 06:27:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Sven Joachim <svenjoac@gmx.de>:
Extra info received and forwarded to list. Copy sent to Dpkg Developers <debian-dpkg@lists.debian.org>. (Sun, 07 Aug 2011 06:27:03 GMT) Full text and rfc822 format available.

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

From: Sven Joachim <svenjoac@gmx.de>
To: 560070@bugs.debian.org, debhelper@packages.debian.org
Subject: Fix for #560070 broken by debhelper 8.9.4
Date: Sun, 07 Aug 2011 08:24:35 +0200
Hi folks,

with this change from dpkg-dev git:

,----
|   * dpkg-buildpackage no longer exports the compiler flags. Closes: #560070
|     Packages must directly call dpkg-buildflags to retrieve them.
`----

and the following from debhelper 8.9.4:

,----
|   * dpkg-buildflags is only used to set environment in v9, to avoid
|     re-breaking packages that were already broken a first time by
|     dpkg-buildpackage unconditionally setting the environment, and
|     worked around that by unsetting variables in the rules file.
|     (Example: numpy)
`----

, compiler flags are not set at all for packages using dh-style rules
files, unless those packages are upgraded to debhelper compatibility
level 9.  That does not seem to be an acceptable outcome.

Cheers,
       Sven




Information forwarded to debian-bugs-dist@lists.debian.org, Dpkg Developers <debian-dpkg@lists.debian.org>:
Bug#560070; Package dpkg-dev. (Sun, 07 Aug 2011 07:27:03 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 Dpkg Developers <debian-dpkg@lists.debian.org>. (Sun, 07 Aug 2011 07:27:03 GMT) Full text and rfc822 format available.

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

From: Raphael Hertzog <hertzog@debian.org>
To: Sven Joachim <svenjoac@gmx.de>, 560070@bugs.debian.org
Cc: debhelper@packages.debian.org
Subject: Re: Bug#560070: Fix for #560070 broken by debhelper 8.9.4
Date: Sun, 7 Aug 2011 09:18:49 +0200
On Sun, 07 Aug 2011, Sven Joachim wrote:
> |   * dpkg-buildflags is only used to set environment in v9, to avoid
> |     re-breaking packages that were already broken a first time by
> |     dpkg-buildpackage unconditionally setting the environment, and
> |     worked around that by unsetting variables in the rules file.
> |     (Example: numpy)

Urgh, I did not see that.

Joey, once the new dpkg is in unstable, can we revert this and get the
packages fixed to use the proper dpkg-buildflags interface to adjust
the flags to avoid the failure?

Because in my opinion, it's much more important to have a wide usage of
dpkg-buildflags. You don't know how many packages are broken or no longer
policy compliant because they were relying on those environment
variables...

> , compiler flags are not set at all for packages using dh-style rules
> files, unless those packages are upgraded to debhelper compatibility
> level 9.  That does not seem to be an acceptable outcome.

I understand the motivation and it's probably a good choice until
dpkg-buildflags has everything required to return the flags desired
by the package maintainer.

But once dpkg-buildflags has all the features required, I agree it
should not stay that way.

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, Dpkg Developers <debian-dpkg@lists.debian.org>:
Bug#560070; Package dpkg-dev. (Sun, 07 Aug 2011 12:54:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Joey Hess <joeyh@debian.org>:
Extra info received and forwarded to list. Copy sent to Dpkg Developers <debian-dpkg@lists.debian.org>. (Sun, 07 Aug 2011 12:54:15 GMT) Full text and rfc822 format available.

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

From: Joey Hess <joeyh@debian.org>
To: Sven Joachim <svenjoac@gmx.de>
Cc: 560070@bugs.debian.org, debhelper@packages.debian.org
Subject: Re: Fix for #560070 broken by debhelper 8.9.4
Date: Sun, 7 Aug 2011 08:50:32 -0400
[Message part 1 (text/plain, inline)]
Sven Joachim wrote:
> Hi folks,
> 
> with this change from dpkg-dev git:
> 
> ,----
> |   * dpkg-buildpackage no longer exports the compiler flags. Closes: #560070
> |     Packages must directly call dpkg-buildflags to retrieve them.
> `----
> 
> and the following from debhelper 8.9.4:
> 
> ,----
> |   * dpkg-buildflags is only used to set environment in v9, to avoid
> |     re-breaking packages that were already broken a first time by
> |     dpkg-buildpackage unconditionally setting the environment, and
> |     worked around that by unsetting variables in the rules file.
> |     (Example: numpy)
> `----
> 
> , compiler flags are not set at all for packages using dh-style rules
> files, unless those packages are upgraded to debhelper compatibility
> level 9.  That does not seem to be an acceptable outcome.

It's Not My Problem. Build flags are also not set for packages not using dh.

-- 
see shy jo
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Dpkg Developers <debian-dpkg@lists.debian.org>:
Bug#560070; Package dpkg-dev. (Sun, 07 Aug 2011 12:54:47 GMT) Full text and rfc822 format available.

Acknowledgement sent to Joey Hess <joeyh@debian.org>:
Extra info received and forwarded to list. Copy sent to Dpkg Developers <debian-dpkg@lists.debian.org>. (Sun, 07 Aug 2011 12:54:55 GMT) Full text and rfc822 format available.

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

From: Joey Hess <joeyh@debian.org>
To: Raphael Hertzog <hertzog@debian.org>
Cc: Sven Joachim <svenjoac@gmx.de>, 560070@bugs.debian.org, debhelper@packages.debian.org
Subject: Re: Bug#560070: Fix for #560070 broken by debhelper 8.9.4
Date: Sun, 7 Aug 2011 08:52:18 -0400
[Message part 1 (text/plain, inline)]
Raphael Hertzog wrote:
> Joey, once the new dpkg is in unstable, can we revert this and get the
> packages fixed to use the proper dpkg-buildflags interface to adjust
> the flags to avoid the failure?
> 
> Because in my opinion, it's much more important to have a wide usage of
> dpkg-buildflags. You don't know how many packages are broken or no longer
> policy compliant because they were relying on those environment
> variables...

If you don't know that, then you cannot turn of dpkg-buildpackage's use
of dpkg-buildflags. I and others have repeatedly told you that is
probably the case.

-- 
see shy jo
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Dpkg Developers <debian-dpkg@lists.debian.org>:
Bug#560070; Package dpkg-dev. (Sun, 07 Aug 2011 13:18:15 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jonathan Nieder <jrnieder@gmail.com>:
Extra info received and forwarded to list. Copy sent to Dpkg Developers <debian-dpkg@lists.debian.org>. (Sun, 07 Aug 2011 13:18:15 GMT) Full text and rfc822 format available.

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

From: Jonathan Nieder <jrnieder@gmail.com>
To: Joey Hess <joeyh@debian.org>
Cc: 560070@bugs.debian.org, Sven Joachim <svenjoac@gmx.de>, debhelper@packages.debian.org
Subject: Re: Fix for #560070 broken by debhelper 8.9.4
Date: Sun, 7 Aug 2011 08:17:29 -0500
Joey Hess wrote:
> Sven Joachim wrote:

>> , compiler flags are not set at all for packages using dh-style rules
>> files, unless those packages are upgraded to debhelper compatibility
>> level 9.  That does not seem to be an acceptable outcome.
>
> It's Not My Problem. Build flags are also not set for packages not using dh.

That could mean one of several things:

 A. Packages using debhelper compatibility levels below 9 should just
    bite the bullet and use

	DPKG_EXPORT_BUILDFLAGS = 1
	-include /usr/share/dpkg/buildflags.mk

 B. Packages using debhelper compatibility levels below 9 are unwise.
    They should switch to compatibility level 9 asap.

 C. This change to dpkg-buildpackage without enough time to adjust
    packages would be a mistake and should be reverted.

I find (A) believable enough, except it involves changing a _lot_ of
packages.




Information forwarded to debian-bugs-dist@lists.debian.org, Dpkg Developers <debian-dpkg@lists.debian.org>:
Bug#560070; Package dpkg-dev. (Sun, 07 Aug 2011 15:03:16 GMT) Full text and rfc822 format available.

Acknowledgement sent to Sven Joachim <svenjoac@gmx.de>:
Extra info received and forwarded to list. Copy sent to Dpkg Developers <debian-dpkg@lists.debian.org>. (Sun, 07 Aug 2011 15:03:16 GMT) Full text and rfc822 format available.

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

From: Sven Joachim <svenjoac@gmx.de>
To: Jonathan Nieder <jrnieder@gmail.com>
Cc: Joey Hess <joeyh@debian.org>, 560070@bugs.debian.org, debhelper@packages.debian.org
Subject: Re: Fix for #560070 broken by debhelper 8.9.4
Date: Sun, 07 Aug 2011 17:01:24 +0200
On 2011-08-07 15:17 +0200, Jonathan Nieder wrote:

> Joey Hess wrote:
>> Sven Joachim wrote:
>
>>> , compiler flags are not set at all for packages using dh-style rules
>>> files, unless those packages are upgraded to debhelper compatibility
>>> level 9.  That does not seem to be an acceptable outcome.
>>
>> It's Not My Problem. Build flags are also not set for packages not using dh.

True, but those should not have relied on the buildflags being set for
them.  And dh recommends a 3-line rules file as default.

> That could mean one of several things:
>
>  A. Packages using debhelper compatibility levels below 9 should just
>     bite the bullet and use
>
> 	DPKG_EXPORT_BUILDFLAGS = 1
> 	-include /usr/share/dpkg/buildflags.mk
>
>  B. Packages using debhelper compatibility levels below 9 are unwise.
>     They should switch to compatibility level 9 asap.
>
>  C. This change to dpkg-buildpackage without enough time to adjust
>     packages would be a mistake and should be reverted.
>
> I find (A) believable enough, except it involves changing a _lot_ of
> packages.

Only (C) makes any kind of sense to me in the medium term, but this
means that #560070 is not going to be fixed any time soon.  Which is
also the point of Joey's other reply.

Sven




Information forwarded to debian-bugs-dist@lists.debian.org, Dpkg Developers <debian-dpkg@lists.debian.org>:
Bug#560070; Package dpkg-dev. (Sun, 07 Aug 2011 18:45:03 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 Dpkg Developers <debian-dpkg@lists.debian.org>. (Sun, 07 Aug 2011 18:45:03 GMT) Full text and rfc822 format available.

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

From: Raphael Hertzog <hertzog@debian.org>
To: Joey Hess <joeyh@debian.org>
Cc: Sven Joachim <svenjoac@gmx.de>, 560070@bugs.debian.org, debhelper@packages.debian.org
Subject: Re: Bug#560070: Fix for #560070 broken by debhelper 8.9.4
Date: Sun, 7 Aug 2011 20:40:29 +0200
On Sun, 07 Aug 2011, Joey Hess wrote:
> Raphael Hertzog wrote:
> > Joey, once the new dpkg is in unstable, can we revert this and get the
> > packages fixed to use the proper dpkg-buildflags interface to adjust
> > the flags to avoid the failure?
> > 
> > Because in my opinion, it's much more important to have a wide usage of
> > dpkg-buildflags. You don't know how many packages are broken or no longer
> > policy compliant because they were relying on those environment
> > variables...
> 
> If you don't know that, then you cannot turn of dpkg-buildpackage's use
> of dpkg-buildflags. I and others have repeatedly told you that is
> probably the case.

We also don't really want to keep indefinitely something that was
recognized by many as a mistake. So yes, there's going to some breakage
but I wanted to limit it to the packages who are not using any modern
helper. By limiting the debhelper change to compat v9, this will no longer
be true.

I don't plan to go backwards now. We'll see how it turns out. In any case,
the next dpkg upload will come with a d-d-a announce.

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, Dpkg Developers <debian-dpkg@lists.debian.org>:
Bug#560070; Package dpkg-dev. (Mon, 08 Aug 2011 07:18:36 GMT) Full text and rfc822 format available.

Acknowledgement sent to Modestas Vainius <modax@debian.org>:
Extra info received and forwarded to list. Copy sent to Dpkg Developers <debian-dpkg@lists.debian.org>. (Mon, 08 Aug 2011 07:18:36 GMT) Full text and rfc822 format available.

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

From: Modestas Vainius <modax@debian.org>
To: Joey Hess <joeyh@debian.org>
Cc: Sven Joachim <svenjoac@gmx.de>, 560070@bugs.debian.org, debhelper@packages.debian.org
Subject: Re: Fix for #560070 broken by debhelper 8.9.4
Date: Mon, 8 Aug 2011 10:05:13 +0300
On 2011 m. rugpjūčio 7 d., sekmadienis 15:50:32 Joey Hess wrote:
> Sven Joachim wrote:
> > Hi folks,
> > 
> > with this change from dpkg-dev git:
> > 
> > ,----
> > 
> > |   * dpkg-buildpackage no longer exports the compiler flags. Closes:
> > |   #560070
> > |   
> > |     Packages must directly call dpkg-buildflags to retrieve them.
> > 
> > `----
> > 
> > and the following from debhelper 8.9.4:
> > 
> > ,----
> > 
> > |   * dpkg-buildflags is only used to set environment in v9, to avoid
> > |   
> > |     re-breaking packages that were already broken a first time by
> > |     dpkg-buildpackage unconditionally setting the environment, and
> > |     worked around that by unsetting variables in the rules file.
> > |     (Example: numpy)
> > 
> > `----
> > 
> > , compiler flags are not set at all for packages using dh-style rules
> > files, unless those packages are upgraded to debhelper compatibility
> > level 9.  That does not seem to be an acceptable outcome.
> 
> It's Not My Problem. Build flags are also not set for packages not using
> dh.

I don't think it is a fair statement. Examples of minimal dh rules all over 
the place in your blog, debhelper package and dh manual page DO NOT have build 
flags handling. It is true that it's the result of inappropriate dpkg-
buildpackage behaviour but it's still a bad practise pushed debhelper from the 
advent of dh so you should feel at least a bit responsible.

I don't know the details what broke in the numpy package, but maybe a better 
solution could be found (dh-only?) for all compat levels...




Information forwarded to debian-bugs-dist@lists.debian.org, Dpkg Developers <debian-dpkg@lists.debian.org>:
Bug#560070; Package dpkg-dev. (Mon, 08 Aug 2011 13:00:22 GMT) Full text and rfc822 format available.

Acknowledgement sent to Joey Hess <joeyh@debian.org>:
Extra info received and forwarded to list. Copy sent to Dpkg Developers <debian-dpkg@lists.debian.org>. (Mon, 08 Aug 2011 13:00:26 GMT) Full text and rfc822 format available.

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

From: Joey Hess <joeyh@debian.org>
To: Modestas Vainius <modax@debian.org>
Cc: Sven Joachim <svenjoac@gmx.de>, 560070@bugs.debian.org, debhelper@packages.debian.org
Subject: Re: Fix for #560070 broken by debhelper 8.9.4
Date: Mon, 8 Aug 2011 08:55:37 -0400
[Message part 1 (text/plain, inline)]
Modestas Vainius wrote:
> I don't think it is a fair statement. Examples of minimal dh rules all over 
> the place in your blog, debhelper package and dh manual page DO NOT have build 
> flags handling. It is true that it's the result of inappropriate dpkg-
> buildpackage behaviour but it's still a bad practise pushed debhelper from the 
> advent of dh so you should feel at least a bit responsible.

This has nothing to do with dh. No example rules file *ever* shipped
with debhelper has included build flag handling. Contrary to popular
belief, most packages get this right without having flags forced.

(The only exception to this is noopt handling, which could still be
enabled outside v9 mode.)

-- 
see shy jo
[signature.asc (application/pgp-signature, inline)]

Reply sent to Guillem Jover <guillem@debian.org>:
You have taken responsibility. (Fri, 23 Sep 2011 05:21:29 GMT) Full text and rfc822 format available.

Notification sent to Bill Allombert <Bill.Allombert@math.u-bordeaux1.fr>:
Bug acknowledged by developer. (Fri, 23 Sep 2011 05:21:29 GMT) Full text and rfc822 format available.

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

From: Guillem Jover <guillem@debian.org>
To: 560070-close@bugs.debian.org
Subject: Bug#560070: fixed in dpkg 1.16.1
Date: Fri, 23 Sep 2011 05:17:20 +0000
Source: dpkg
Source-Version: 1.16.1

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

dpkg-dev_1.16.1_all.deb
  to main/d/dpkg/dpkg-dev_1.16.1_all.deb
dpkg_1.16.1.dsc
  to main/d/dpkg/dpkg_1.16.1.dsc
dpkg_1.16.1.tar.bz2
  to main/d/dpkg/dpkg_1.16.1.tar.bz2
dpkg_1.16.1_amd64.deb
  to main/d/dpkg/dpkg_1.16.1_amd64.deb
dselect_1.16.1_amd64.deb
  to main/d/dpkg/dselect_1.16.1_amd64.deb
libdpkg-dev_1.16.1_amd64.deb
  to main/d/dpkg/libdpkg-dev_1.16.1_amd64.deb
libdpkg-perl_1.16.1_all.deb
  to main/d/dpkg/libdpkg-perl_1.16.1_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 560070@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Guillem Jover <guillem@debian.org> (supplier of updated dpkg 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: SHA1

Format: 1.8
Date: Fri, 23 Sep 2011 06:00:11 +0200
Source: dpkg
Binary: libdpkg-dev dpkg dpkg-dev libdpkg-perl dselect
Architecture: source amd64 all
Version: 1.16.1
Distribution: unstable
Urgency: low
Maintainer: Dpkg Developers <debian-dpkg@lists.debian.org>
Changed-By: Guillem Jover <guillem@debian.org>
Description: 
 dpkg       - Debian package management system
 dpkg-dev   - Debian package development tools
 dselect    - Debian package management front-end
 libdpkg-dev - Debian package management static library
 libdpkg-perl - Dpkg perl modules
Closes: 147583 231089 245322 293280 308082 454694 489771 525160 526774 552123 560070 560251 603435 604241 606839 608260 610940 615899 616609 619131 620312 620490 620520 621066 622094 626684 627462 628055 628726 629582 630533 630996 631435 631439 631494 631547 631757 631808 632168 632937 633539 633627 634510 634961 635467 635683 636700 637096 637564 638291 639229 639997 640198 640298 641834
Changes: 
 dpkg (1.16.1) unstable; urgency=low
 .
   [ Raphaël Hertzog ]
   * Dpkg::Deps: Implement new "reset" method and bump module version to 1.01
     due to this.
   * Improved description of --search in dpkg-query(1). Closes: #621066
     Thanks to Lars Buitinck <larsmans@gmail.com> for the patch.
   * Let update-alternatives fsync() its administrative files before
     moving them in place to avoid empty files with some filesystems.
     LP: #344019
   * Tighten the regexp used by dpkg-source to ignore the .pc directory of
     quilt. Thanks to Mike Hommey for noticing the problem.
   * Change behaviour of dpkg-source's --extend-diff-ignore to also
     extend the current diff-ignore if it has already been set.
   * Fix dependency checking code to consider a dependency on a virtual
     package provided by a package in triggers-pending status as satisfied.
   * Do not fail when encountering a pre-dependency in triggers-awaited state,
     instead process the awaited triggers. Closes: #526774
   * "any" no longer hides "all" in the Architecture field of a .dsc.
   * Fix dpkg --remove to really remove the triggers from the various
     internal files in /var/lib/dpkg/info/triggers/. Closes: #525160
   * Avoid a perl warning in dpkg-gensymbols when no symbols file has been
     generated (because it would have been empty). Closes: #626684
   * Re-enable the Package-List field but drop the Architecture column since we
     have no clear use case yet. It can always be added later on.
     Also drop the source line since it duplicates other fields.
     Closes: #619131
   * Add the extraction part of Dpkg::Source::Package to the supported API.
     Useful to extract source packages without having to depend on dpkg-source
     (and hence dpkg-dev).
   * Add the Dpkg::Vendor module to the supported API. Useful for lintian
     when dpkg-dev is absent.
   * Check presence of required parameters in dpkg-vendor. Closes: #628726
     Thanks to Niels Thykier <niels@thykier.net> for the patch.
   * Avoid a Perl warning in dpkg-buildflags when HOME is not set.
     Closes: #635467
   * dpkg-source can now also use debian/source/local-patch-header (that is not
     included in the generated source package) instead of
     debian/source/patch-header. Closes: #629582
   * Changed dpkg-source --after-build to automatically unapply patches that it
     has applied during --before-build.
   * Fix two possible causes for the assertion failure "pigp->trigpend_head".
     LP: #798793, #424358 Closes: #560251
   * Use "special" instead of "particular" to qualify the "3.0 (custom)" format
     in dpkg-source(1). Closes: #631435
   * Add some supplementary checks to ensure debian/control has the required
     fields. Closes: #631439
   * dpkg-gensymbols(1): document syntax of comments. Closes: #630996
   * Allow empty lines in symbols files to better delimit multiple libraries.
     Thanks to Cyril Brulebois <kibi@debian.org> for the patch.
   * dpkg: if "prerm upgrade" fails when downgrading, do not try to run
     "prerm failed-upgrade" with the prerm of the oldest prerm, it can't work
     around a bug of a newer prerm anyway.
   * dpkg: support new "interest-noawait" and "activate-noawait" trigger
     directives.
   * dpkg-buildflags(1): make it clear that DEB_*_(SET|APPEND) environment
     variables are meant for users and should not be used by packages.
   * update-alternatives: do not allow to reuse a slave link in another
     slave alternative. Closes: #631547
   * Improve dpkg-source's logic to identify ignored files. Closes: #632168
   * Fix a small typo in dpkg-source(1). Closes: #632937
   * Reword the description of dpkg-source --before-build and --after-build
     to be clearer. Closes: #608260
   * dpkg-buildpackage no longer exports the compiler flags. Closes: #560070
     Packages must directly call dpkg-buildflags to retrieve them.
   * dpkg-buildflags supports a prepend command to modify the build
     flags. Particularly useful for package maintainers who don't want
     their supplementary flags to take precedence over user submitted
     flags.
   * Add new --dump action to dpkg-buildflags and make it the default action.
     Closes: #603435
   * dpkg-mergechangelogs now checks the return value of the close() call.
     Thanks to Niels Thykier <niels@thykier.net> for the patch. Closes: #633539
   * Similar changes to dpkg-shlibdeps and dpkg-gencontrol, also by Niels.
   * Fix update-alternatives to not remove a real file when dropping a
     symlink for a slave that's not provided by the new current choice.
     Closes: #633627
   * Improve dpkg-source's error message complaining about the lack
     of the upstream tarball. Closes: #634510
   * Add some common makefile snippets for use in rules files in
     /usr/share/dpkg/: default.mk, architecture.mk, buildflags.mk, pkg-info.mk,
     vendor.mk Closes: #606839
   * Fix the dpkg-divert test-suite to also skip test that would fail if run
     under root. Closes: #634961
   * Change merge conflict separators created by dpkg-mergechangelogs to match
     the usual norm of being composed of 7 characters. LP: #815700
   * With source format 2.0 and 3.0 (quilt), dpkg-source now fails by default
     when upstream changes have not been recorded in a quilt patch. The new
     --commit operation can be used to properly record the changes before-hand.
     LP: #797839
     And it fails before installing the automatic patch in debian/patches/
     Closes: #615899
   * dpkg-buildflags now supports "--export=configure" to output compilation
     flags on a single line with double quotes as delimiter of the various
     values. It also uses DEB_<flag>_MAINT_<op> to let the maintainer
     extend the build flags to use. Last but not least, it can now also strip
     options from the returned build flags.
   * Fix possible segfault of dpkg in findbreakcycle(). LP: #733414
   * dpkg-source now properly cleans up the temporary tarball generated for
     native formats in case of unexpected interruption. Closes: #631494
   * Fix simplification logic of union dependencies. Closes: #637564
   * Fix dpkg's handling of a hardlink pointing to a conffile. Closes: #638291
   * Add example of extend-diff-ignore's usage in dpkg-source(1).
     Closes: #640198
   * dpkg-buildflags now returns hardening flags by default. Closes: #489771
     They can be individually enabled/disabled via DEB_BUILD_MAINT_OPTIONS,
     see dpkg-buildflags(1). Thanks to Kees Cook for his help.
 .
   [ Guillem Jover ]
   * Install deb-src-control(5) man pages in dpkg-dev. Closes: #620520
   * Add ‘.gitmodules’ to the default dpkg-source ignore lists. Closes: #620490
   * Document in dpkg-query(1) man page that on --listfiles each list of
     files per package name is separated by a blank line. Same goes for
     --status and --print-avail.
   * Use execvp(3) unconditionally in command_exec(). Making the call always
     fallback to use the system shell in case of error, such as with empty
     maintainer scripts. Thanks to Jonathan Nieder <jrnieder@gmail.com>.
     Closes: #622094
   * Improve deb-split(5) format description by splitting debian-split
     member contents into a list.
   * Switch to debhelper compatibility level 7.
     - Use dh_prep instead of deprecated “dh_clean -k”.
   * Bump Standards-Version to 3.9.2 (no changes needed).
   * Generate filenames following current conventions on “dpkg-split --join”,
     by including the architecture in the debian-split member of a split
     package and using underscores to separate filename parts.
   * Support conffiles with spaces when diffing them. Closes: #147583
   * Allow installing packages with bogus versions with new
     --force-bad-version.
   * Do not fail when unpacking a diverted hardlink. Closes: #245322
     Based on a patch by Christopher Baines <cbaines8@gmail.com>.
   * Document in dpkg-deb(1) that --fsys-tarfile will always process the
     input archive sequentially. Closes: #616609
   * Remove long non-functional --new and --old dpkg-deb option handling
     from dpkg which were being treated as dpkg commands.
   * Remove reference to --nocheck dpkg-deb option from dpkg man page as
     the latter does not pass it to the former.
   * Clarify the current dpkg behaviour when running the dpkg-deb and
     dpkg-query back-ends, of not passing through back-end specific options
     when running them from dpkg. Closes: #610940
   * Use “unselected” as an adjective in dpkg output messages instead of
     “deselected”. Closes: #231089
   * Clarify exit status in dpkg-split and start-stop-daemon --help output.
   * Clarify “EXIT STATUS” section in man pages by using a table.
   * Add a --status command to start-stop-daemon returning LSB Init Script
     status action exit codes.
   * Add start-stop-daemon process name kernel limits for Solaris, NetBSD,
     OpenBSD, FreeBSD and Darwin.
   * On package removal, keep only directories actually containing conffiles,
     and not directories just matching the substring in the conffile or the
     directory itself. Thanks to Ondřej Surý <ondrej@debian.org>.
   * On purge correctly remove symlinks acting as directories, when they are
     not being used by any other package's files.
   * Do not lose track of parent directories on removal so that they can
     be properly cleaned up on purge if not used by any other package.
     Based on a patch by Ondřej Surý <ondrej@debian.org>. Closes: #454694
   * Add ‘.hgsigs’ to the default dpkg-source ignore lists.
     Based on a patch by Jakub Wilk <jwilk@debian.org>. Closes: #627462
   * Do not allow blank lines in field values. Closes: #308082
   * Do not warn on missing architecture on packages in config-files state,
     but then make sure the architecture field is usable. Closes: #604241
   * Run du with --apparent-size when generating the Installed-Size field in
     dpkg-gencontrol to get consistent results independent of build system.
     Thanks to Ludovic Brenta <ludovic@ludovic-brenta.org>. Closes: #630533
   * Do not fail to unpack shared directories missing on the file system
     from packages being replaced by other packages. Closes: #631808
   * Do not require programs to define thisname, provide two new functions
     to handle the program name (dpkg_set_progname and dpkg_get_progname).
     Closes: #631757
   * Man pages cleanup:
     - Rename “USAGE” dselect(1) section to “ACTIONS” and clarify they can
       be performed interactively or from command line.
     - Add missing built-in methods to dselect(1).
     - Add missing escaping to field dashes in deb-control(5).
     - Use dashes instead of underscores for variable text.
     - Clarify that several front-end fields are not dselect specific in
       dpkg-query(1).
     - Use [option...] instead of [options] and friends.
     - Use italics or bold instead of surrounding the text with <>.
     - Correctly format text with bold and italics.
     - Use minus signs and hyphens consistently in man pages.
     - Fix reference to /etc/dpkg/dselect.cfg.d instead of dpkg.cfg.d in
       dselect(1).
     - Add missing optional group|gid --chuid argument in start-stop-daemon(8).
   * Refer to Sources and Packages files as part of a repository instead of
     as being of exclusive use or owned by APT, which has never been the case.
   * Unify somewhat dpkg-maintscript-helper --help output with other commands.
   * Add build-indep and build-arch targets as aliases for build in
     debian/rules.
   * Use the perl interpreter found by configure to call dpkg-architecture.pl
     in the m4 DPKG_ARCHITECTURE macro.
   * Add new --verbose option to dpkg-deb and change --extract to honour it.
     Closes: #293280
   * Add new --raw-extract option to dpkg-deb combining --control and
     --extract. Closes: #552123
   * Defer hardlink renames so that there's never a point were the new
     file contents are accessible from the final path before they have
     been fsync()ed and cannot be executed causing ETXTBSY when trying
     to open the to be installed paths for writing.
     Thanks to Jonathan Nieder <jrnieder@gmail.com>. Closes: #635683
   * Clarify the default dpkg-deb compression-levels on the man page.
   * Clarify dpkg --update-avail usage error message. Closes: #628055
   * Change Dpkg::Compression default values depending on the compressor
     used, and as such dpkg-source inherits this functionality.
     Prompted by Timo Juhani Lindfors <timo.lindfors@iki.fi>.
   * Print an actual error or warning message instead of assert()ing on
     readlink()/stat() size discrepancies. Closes: #639229
   * Update alternative links only if they change. This allows for a
     read-only file system and a writable database. Closes: #636700
     Based on a patch by Salvatore Bonaccorso <carnil@debian.org>.
   * Fix double “error:” string in dpkg missing PATH error output.
     Closes: #639997
   * Do not warn on strange timestamps when unpacking with dpkg-deb.
     Closes: #640298
   * Reduce dpkg-trigger binary size by refactoring libdpkg modules so that
     it does not end up pulling triglib.
   * Reduce dpkg-deb binary size by refectoring libdpkg modules so that it
     does not end up pulling triglib.
   * Do not fail on --compare-version when generating parse warnings.
     Existing packages with invalid versions should not fail on their
     maintainer scripts due to that.
   * Use the user name (instead of the user id) when setting the supplementary
     groups in start-stop-daemon. Closes: #641834
   * Use --srcdir and --destdir po4a options, and bump Build-Depends version
     to 0.36.4.
 .
   [ Updated dpkg translations ]
   * German (Sven Joachim). Closes: #620312
   * Swedish (Peter Krefting).
   * French (Christian Perrier).
 .
   [ Updated man page translations ]
   * French (Christian Perrier).
   * German (Helge Kreutzmann) including improvement by "Flo".
   * Swedish (Peter Krefting).
 .
   [ Updated scripts translations ]
   * French (Christian Perrier, Sylvestre Ledru). Closes: #637096
   * German (Helge Kreutzmann).
   * Swedish (Peter Krefting).
Checksums-Sha1: 
 d8d9d5a8a9f134459987f5b187527c303498e902 1364 dpkg_1.16.1.dsc
 9e8176c88fe2b31782ddae6d0a8f599c7e540e8d 5432348 dpkg_1.16.1.tar.bz2
 a830d5633da7a96d5208a6f8a7a97e24865e7913 552790 libdpkg-dev_1.16.1_amd64.deb
 470de180ac9fa5c95abfcf30a4d9a46cab269107 2218686 dpkg_1.16.1_amd64.deb
 6e6ddbb681d1bbbb971299932f99d43a35f33750 1006884 dselect_1.16.1_amd64.deb
 b8394b2dfd4291ff206dec00e53c723fa0be902e 923836 dpkg-dev_1.16.1_all.deb
 7940dc852c11e3a386ce014cd39ab7ce30e34f30 806604 libdpkg-perl_1.16.1_all.deb
Checksums-Sha256: 
 3f1649796856228545ba610df340b47b923a31f6ebe8765c8f48e1dac7f11391 1364 dpkg_1.16.1.dsc
 f9363628a6fa1c24a1e9c41bd8977f9d5a7010bfca3ac9a6f8bf500e7e8df52b 5432348 dpkg_1.16.1.tar.bz2
 96910fa1ed1371aa2b9e3147eecdf67e4e5f61fe7d7aaa97c27254f55a92c56d 552790 libdpkg-dev_1.16.1_amd64.deb
 d0e9691aa05c1b2567b06df0856ea05a211234e40dbc955e0266fa45fb32370c 2218686 dpkg_1.16.1_amd64.deb
 4a1c44c98791f1aa1b59bfc4890a3f6aeef70319f930e1ca9b7354ede8e78125 1006884 dselect_1.16.1_amd64.deb
 885d13576b93262151b5e920dd8971072668c0bd36b103ab0e82b97fcef52fcd 923836 dpkg-dev_1.16.1_all.deb
 b6fa511f2b059a85e3d5938c73a5805893a28438785a974bf0e46a53dc5da975 806604 libdpkg-perl_1.16.1_all.deb
Files: 
 c1e7858da79770b64427a99cc628889c 1364 admin required dpkg_1.16.1.dsc
 b94c9ed2493fd9dbb53a96f2e7f674ce 5432348 admin required dpkg_1.16.1.tar.bz2
 99bbb9c901e7462d06472a27ffb6d67f 552790 libdevel optional libdpkg-dev_1.16.1_amd64.deb
 bed79ea34df74b42ebbc2ed13d3ed4cb 2218686 admin required dpkg_1.16.1_amd64.deb
 bd018624eca8f1cf04a0b588a6338622 1006884 admin optional dselect_1.16.1_amd64.deb
 78c00b38545303cf8c8fcd4dd83f30a3 923836 utils optional dpkg-dev_1.16.1_all.deb
 f604975f555da4f710167be2b0d468f7 806604 perl optional libdpkg-perl_1.16.1_all.deb

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

iEYEARECAAYFAk58Dr0ACgkQuW9ciZ2SjJtZVwCgkPiancaq9ojJ2L0b8uEEjSC7
87YAoKtmUCgXZS/CfakXx860t2ijO84f
=Cq2h
-----END PGP SIGNATURE-----





Reply sent to Guillem Jover <guillem@debian.org>:
You have taken responsibility. (Fri, 23 Sep 2011 05:21:30 GMT) Full text and rfc822 format available.

Notification sent to Jussi Hakala <jussi.hakala@hut.fi>:
Bug acknowledged by developer. (Fri, 23 Sep 2011 05:21:30 GMT) Full text and rfc822 format available.

Reply sent to Guillem Jover <guillem@debian.org>:
You have taken responsibility. (Fri, 23 Sep 2011 05:21:30 GMT) Full text and rfc822 format available.

Notification sent to Ian Jackson <Ian.Jackson@eu.citrix.com>:
Bug acknowledged by developer. (Fri, 23 Sep 2011 05:21:30 GMT) Full text and rfc822 format available.

Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Mon, 31 Oct 2011 07:33:54 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: Mon Apr 21 02:49:53 2014; Machine Name: beach.debian.org

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