Debian Bug report logs - #651966
class/langcore.mk: DEB_BUILD_MAINT_OPTIONS not passed to dpkg-buildflags

version graph

Package: cdbs; Maintainer for cdbs is CDBS Hackers <build-common-hackers@lists.alioth.debian.org>; Source for cdbs is src:cdbs.

Reported by: Simon Ruderich <simon@ruderich.org>

Date: Tue, 13 Dec 2011 17:06:02 UTC

Severity: important

Tags: patch

Fixed in version cdbs/0.4.106

Done: Jonas Smedegaard <dr@jones.dk>

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, simon@ruderich.org, CDBS Hackers <build-common-hackers@lists.alioth.debian.org>:
Bug#651966; Package cdbs. (Tue, 13 Dec 2011 17:06:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Simon Ruderich <simon@ruderich.org>:
New Bug report received and forwarded. Copy sent to simon@ruderich.org, CDBS Hackers <build-common-hackers@lists.alioth.debian.org>. (Tue, 13 Dec 2011 17:06:05 GMT) Full text and rfc822 format available.

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

From: Simon Ruderich <simon@ruderich.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: class/langcore.mk: DEB_BUILD_MAINT_OPTIONS not passed to dpkg-buildflags
Date: Tue, 13 Dec 2011 18:05:13 +0100
[Message part 1 (text/plain, inline)]
Package: cdbs
Severity: important
Tags: patch

Hello,

To modify hardening flags dpkg-buildflags uses the
DEB_BUILD_MAINT_OPTIONS environmental variable. For example to
enable all hardening flags the maintainer can set it in
debian/rules:

    export DEB_BUILD_MAINT_OPTIONS=hardening=+all

    include /usr/share/cdbs/1/...
    ...

But $(shell ...) doesn't inherit exported variables, thus at the
moment it's not possible to use DEB_BUILD_MAINT_OPTIONS to modify
dpkg-buildflags hardening flags in cdbs.

The attached patch fixes this and passes DEB_BUILD_MAINT_OPTIONS
to dpkg-buildflags, but I'm not sure if it's the best way to do
it.

Regards,
Simon

-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 3.1.0-1-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
[cdbs-dpkg-buildflags.patch (text/x-diff, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org, CDBS Hackers <build-common-hackers@lists.alioth.debian.org>:
Bug#651966; Package cdbs. (Tue, 13 Dec 2011 18:24:07 GMT) Full text and rfc822 format available.

Acknowledgement sent to 651966@bugs.debian.org:
Extra info received and forwarded to list. Copy sent to CDBS Hackers <build-common-hackers@lists.alioth.debian.org>. (Tue, 13 Dec 2011 18:24:07 GMT) Full text and rfc822 format available.

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

From: Jonas Smedegaard <dr@jones.dk>
To: Simon Ruderich <simon@ruderich.org>, 651966@bugs.debian.org
Subject: Re: [Build-common-hackers] Bug#651966: class/langcore.mk: DEB_BUILD_MAINT_OPTIONS not passed to dpkg-buildflags
Date: Wed, 14 Dec 2011 01:20:54 +0700
[Message part 1 (text/plain, inline)]
On 11-12-13 at 06:05pm, Simon Ruderich wrote:
> Package: cdbs
> Severity: important
> Tags: patch
> 
> Hello,
> 
> To modify hardening flags dpkg-buildflags uses the
> DEB_BUILD_MAINT_OPTIONS environmental variable. For example to
> enable all hardening flags the maintainer can set it in
> debian/rules:
> 
>     export DEB_BUILD_MAINT_OPTIONS=hardening=+all
> 
>     include /usr/share/cdbs/1/...
>     ...
> 
> But $(shell ...) doesn't inherit exported variables, thus at the
> moment it's not possible to use DEB_BUILD_MAINT_OPTIONS to modify
> dpkg-buildflags hardening flags in cdbs.

Why is this severity important?


 - Jonas

-- 
 * Jonas Smedegaard - idealist & Internet-arkitekt
 * Tlf.: +45 40843136  Website: http://dr.jones.dk/

 [x] quote me freely  [ ] ask before reusing  [ ] keep private
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, CDBS Hackers <build-common-hackers@lists.alioth.debian.org>:
Bug#651966; Package cdbs. (Tue, 13 Dec 2011 19:39:06 GMT) Full text and rfc822 format available.

Acknowledgement sent to Simon Ruderich <simon@ruderich.org>:
Extra info received and forwarded to list. Copy sent to CDBS Hackers <build-common-hackers@lists.alioth.debian.org>. (Tue, 13 Dec 2011 19:39:06 GMT) Full text and rfc822 format available.

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

From: Simon Ruderich <simon@ruderich.org>
To: 651966@bugs.debian.org
Subject: Re: [Build-common-hackers] Bug#651966: class/langcore.mk: DEB_BUILD_MAINT_OPTIONS not passed to dpkg-buildflags
Date: Tue, 13 Dec 2011 20:32:05 +0100
[Message part 1 (text/plain, inline)]
On Wed, Dec 14, 2011 at 01:20:54AM +0700, Jonas Smedegaard wrote:
> Why is this severity important?

I thought not being able to set hardening flags in any cdbs
package is an important issue. Please change it if the priority
isn't correct.

Regards,
Simon
-- 
+ privacy is necessary
+ using gnupg http://gnupg.org
+ public key id: 0x92FEFDB7E44C32F9
[Message part 2 (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, CDBS Hackers <build-common-hackers@lists.alioth.debian.org>:
Bug#651966; Package cdbs. (Wed, 14 Dec 2011 03:15:15 GMT) Full text and rfc822 format available.

Acknowledgement sent to 651966@bugs.debian.org:
Extra info received and forwarded to list. Copy sent to CDBS Hackers <build-common-hackers@lists.alioth.debian.org>. (Wed, 14 Dec 2011 03:15:15 GMT) Full text and rfc822 format available.

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

From: Jonas Smedegaard <dr@jones.dk>
To: Simon Ruderich <simon@ruderich.org>, 651966@bugs.debian.org
Subject: Re: [Build-common-hackers] Bug#651966: Bug#651966: class/langcore.mk: DEB_BUILD_MAINT_OPTIONS not passed to dpkg-buildflags
Date: Wed, 14 Dec 2011 10:13:48 +0700
[Message part 1 (text/plain, inline)]
On 11-12-13 at 08:32pm, Simon Ruderich wrote:
> On Wed, Dec 14, 2011 at 01:20:54AM +0700, Jonas Smedegaard wrote:
> > Why is this severity important?
> 
> I thought not being able to set hardening flags in any cdbs package is 
> an important issue. Please change it if the priority isn't correct.

I did not mean to imply that severity was wrong.  Just wondered *if* it 
was wrong :-)

Thanks for the clarification.


 - Jonas

-- 
 * Jonas Smedegaard - idealist & Internet-arkitekt
 * Tlf.: +45 40843136  Website: http://dr.jones.dk/

 [x] quote me freely  [ ] ask before reusing  [ ] keep private
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, CDBS Hackers <build-common-hackers@lists.alioth.debian.org>:
Bug#651966; Package cdbs. (Wed, 14 Dec 2011 07:21: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 CDBS Hackers <build-common-hackers@lists.alioth.debian.org>. (Wed, 14 Dec 2011 07:21:03 GMT) Full text and rfc822 format available.

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

From: Raphael Hertzog <hertzog@debian.org>
To: Simon Ruderich <simon@ruderich.org>, 651966@bugs.debian.org
Subject: Re: Bug#651966: class/langcore.mk: DEB_BUILD_MAINT_OPTIONS not passed to dpkg-buildflags
Date: Wed, 14 Dec 2011 08:17:12 +0100
Hi,

On Tue, 13 Dec 2011, Simon Ruderich wrote:
> The attached patch fixes this and passes DEB_BUILD_MAINT_OPTIONS
> to dpkg-buildflags, but I'm not sure if it's the best way to do
> it.

The attached patch is not enough. There are other variables that are
important.

Please check /usr/share/dpkg/buildflags.mk as an example of how this
should be done.

Better, I suggest that you rely on dpkg-dev doing the work for you and
that you just include this Makefile and use the standard variables.

Cheers,
-- 
Raphaël Hertzog ◈ Debian Developer

Pre-order a copy of the Debian Administrator's Handbook and help
liberate it: http://debian-handbook.info/liberation/




Information forwarded to debian-bugs-dist@lists.debian.org, CDBS Hackers <build-common-hackers@lists.alioth.debian.org>:
Bug#651966; Package cdbs. (Wed, 14 Dec 2011 11:48:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to 651966@bugs.debian.org:
Extra info received and forwarded to list. Copy sent to CDBS Hackers <build-common-hackers@lists.alioth.debian.org>. (Wed, 14 Dec 2011 11:48:12 GMT) Full text and rfc822 format available.

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

From: Jonas Smedegaard <dr@jones.dk>
To: Raphael Hertzog <hertzog@debian.org>, 651966@bugs.debian.org
Cc: Simon Ruderich <simon@ruderich.org>
Subject: Re: [Build-common-hackers] Bug#651966: class/langcore.mk: DEB_BUILD_MAINT_OPTIONS not passed to dpkg-buildflags
Date: Wed, 14 Dec 2011 18:44:38 +0700
[Message part 1 (text/plain, inline)]
Hi Raphael,

On 11-12-14 at 08:17am, Raphael Hertzog wrote:
> On Tue, 13 Dec 2011, Simon Ruderich wrote:
> > The attached patch fixes this and passes DEB_BUILD_MAINT_OPTIONS to 
> > dpkg-buildflags, but I'm not sure if it's the best way to do it.
> 
> The attached patch is not enough. There are other variables that are 
> important.
> 
> Please check /usr/share/dpkg/buildflags.mk as an example of how this 
> should be done.
> 
> Better, I suggest that you rely on dpkg-dev doing the work for you and 
> that you just include this Makefile and use the standard variables.

Thanks for your attention to this.

I am unsure what you suggest above - do you suggest that CDBS not mess 
with variables at all, or that the proposed patch not be used at all?


 - Jonas

-- 
 * Jonas Smedegaard - idealist & Internet-arkitekt
 * Tlf.: +45 40843136  Website: http://dr.jones.dk/

 [x] quote me freely  [ ] ask before reusing  [ ] keep private
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, CDBS Hackers <build-common-hackers@lists.alioth.debian.org>:
Bug#651966; Package cdbs. (Wed, 14 Dec 2011 14:01:15 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 CDBS Hackers <build-common-hackers@lists.alioth.debian.org>. (Wed, 14 Dec 2011 14:01:16 GMT) Full text and rfc822 format available.

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

From: Raphael Hertzog <hertzog@debian.org>
To: 651966@bugs.debian.org
Cc: Simon Ruderich <simon@ruderich.org>
Subject: Re: [Build-common-hackers] Bug#651966: class/langcore.mk: DEB_BUILD_MAINT_OPTIONS not passed to dpkg-buildflags
Date: Wed, 14 Dec 2011 14:09:21 +0100
Hi,

On Wed, 14 Dec 2011, Jonas Smedegaard wrote:
> On 11-12-14 at 08:17am, Raphael Hertzog wrote:
> > On Tue, 13 Dec 2011, Simon Ruderich wrote:
> > > The attached patch fixes this and passes DEB_BUILD_MAINT_OPTIONS to 
> > > dpkg-buildflags, but I'm not sure if it's the best way to do it.
> > 
> > The attached patch is not enough. There are other variables that are 
> > important.
> > 
> > Please check /usr/share/dpkg/buildflags.mk as an example of how this 
> > should be done.
> > 
> > Better, I suggest that you rely on dpkg-dev doing the work for you and 
> > that you just include this Makefile and use the standard variables.
> 
> Thanks for your attention to this.
> 
> I am unsure what you suggest above - do you suggest that CDBS not mess 
> with variables at all, or that the proposed patch not be used at all?

I suggest that the patch be reworked to not redo what
/usr/share/dpkg/buildflags.mk already does correctly and to find a way
to reuse /usr/share/dpkg/buildflags.mk.

Unfortunately the interface of /usr/share/dpkg/buildflags.mk means that
CFLAGS/CXXFLAGS/CPPFLAGS/LDFLAGS/FFLAGS are directly modified so you if
you want to store their values in other variables, you might have to backup
the values before including that Makefile and restore them afterwards.

(Of course, if you find this too messy, feel free to find another way to
nicely resolve the problem :-))

Cheers,
-- 
Raphaël Hertzog ◈ Debian Developer

Pre-order a copy of the Debian Administrator's Handbook and help
liberate it: http://debian-handbook.info/liberation/




Reply sent to Jonas Smedegaard <dr@jones.dk>:
You have taken responsibility. (Thu, 08 Mar 2012 04:06:12 GMT) Full text and rfc822 format available.

Notification sent to Simon Ruderich <simon@ruderich.org>:
Bug acknowledged by developer. (Thu, 08 Mar 2012 04:06:16 GMT) Full text and rfc822 format available.

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

From: Jonas Smedegaard <dr@jones.dk>
To: 651966-close@bugs.debian.org
Subject: Bug#651966: fixed in cdbs 0.4.106
Date: Thu, 08 Mar 2012 04:02:54 +0000
Source: cdbs
Source-Version: 0.4.106

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

cdbs_0.4.106.dsc
  to main/c/cdbs/cdbs_0.4.106.dsc
cdbs_0.4.106.tar.gz
  to main/c/cdbs/cdbs_0.4.106.tar.gz
cdbs_0.4.106_all.deb
  to main/c/cdbs/cdbs_0.4.106_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 651966@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Jonas Smedegaard <dr@jones.dk> (supplier of updated cdbs 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: SHA512

Format: 1.8
Date: Thu, 08 Mar 2012 04:06:35 +0100
Source: cdbs
Binary: cdbs
Architecture: source all
Version: 0.4.106
Distribution: unstable
Urgency: low
Maintainer: CDBS Hackers <build-common-hackers@lists.alioth.debian.org>
Changed-By: Jonas Smedegaard <dr@jones.dk>
Description: 
 cdbs       - common build system for Debian packages
Closes: 642950 651964 651966 661983
Changes: 
 cdbs (0.4.106) unstable; urgency=low
 .
   * Fix set libexecdir to /usr/lib (not /usr/lib/$pkg) in
     autotools-vars.mk.
     Closes: bug#661983. Thanks to Rémi Denis-Courmont.
   * Fix strip PD libraries below per-package install dirs (only for
     single-binary-package below debian/tmp).
     Closes: Bug#661983. Thanks to Felipe Sateler.
   * Fix set CPPFLAGS (not bogus CPPLAGS) in langcore.mk.
     Closes: bug#651964. Thanks (again) to Simon Ruderich and Moritz
     Muehlenhoff.
   * Fix create cruft subdirs before using them in utils.mk. Bump
     resolved build-dependency on cdbs as cruft handling was completely
     broken previously.
   * Handle FFLAGS in langcore.mk.
   * Re-issue news about changes to compiler flags:
     + LDFLAGS was broken when previously announced (in 0.4.103).
     + FFLAGS in also handled now.
     + Advertise use of /usr/share/dpkg/buildflags.mk, now supported
       but explicitly required as it clashes with flags explicitly set or
       unset locally in rules files.
       Closes: bug#651966, #642950. Thanks to Simon Ruderich and Raphael
       Hertzog.
   * Fix Makefile.am to use pkglibexec_SCRIPTS and avoid libexecdir.
   * Update autotools (with autoreconf -f -i).
   * Update copyright file:
     + Fix double-indent copyright lines.
     + Extend copyright years for automade files.
     + Add copyright holders for Makefile.in files.
Checksums-Sha1: 
 4a0b61f771136a7e675f1206e5476be133c02c9d 1833 cdbs_0.4.106.dsc
 6b6cb266bec1de6082ad09a45312caa47e892cee 266417 cdbs_0.4.106.tar.gz
 6be6bd33e42b7bdf7b9d9af14b731d7d2a35cbe9 79404 cdbs_0.4.106_all.deb
Checksums-Sha256: 
 28752f2d1a117d9c4e98d25e925bac0fd5d6bcc7cc76b06fa6249fd7f6d0d49a 1833 cdbs_0.4.106.dsc
 10e3d8959be7161913abe8b8124884f0eada4c801e2d0bb20509b052d2915718 266417 cdbs_0.4.106.tar.gz
 1e2562c4cfd6739ff426377397df5e4a91b4d6941c5b32e47f83359926d3fbdd 79404 cdbs_0.4.106_all.deb
Files: 
 950c76889b71245e0e81d3f8ddde1c3c 1833 devel optional cdbs_0.4.106.dsc
 f820afeafd518e95ad3d5c8864e36274 266417 devel optional cdbs_0.4.106.tar.gz
 ea24c71a7612aadac793faa30b412c99 79404 devel optional cdbs_0.4.106_all.deb

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

iQIcBAEBCgAGBQJPWC4ZAAoJECx8MUbBoAEhFd0P/2mH6clEqU5CcDNGAm4oKh9D
Y7Fd2vEEyvW0PZEJoj6p5RSEGBVrBfP2INpB45voDRrR4t9AljaZTkVvwPz4B3Hu
XqJfRgstiEY7PGfZgeW6W3vHnnqnl+4MVldtzFjSns3SA1Ckl7cU4BvO4a8cVb4s
21/z9tXeMrzKQdwqFQyJe4K70ZiyvEBDAtg5Rzev0Er/saM8jKvEEt0Msc+9/qht
BNdZ0040BlrFXBSO2K+ZAcdChXh5zz1vbdfBqGRleqZCiQ5jjEFBiKjUyP5db1aU
TTFx6bV1YVneqiE9iLFVdKZq132TgeulhUtSpoMUrAdrv8eeADQ/2Wfu68FXX1B7
dSoP5FM9KKbNvDGEK5SgRLzqg9oSQIw2pum8jyQ8amIUk2SJ95D4flkErlcYsglo
YYNz4zgzIBG34rNukOWnWlW3Qk79ExPs5VmO1k7Nf7bq0myBzB+N8n2YVzFStEyt
RuqpZSgpeheTfKf90Rk3oqqw6oQchDpQW2MazVQfYhv2xcwdEYGqbvW3NyuWER8c
KROcc6vSnwp8qzfyI7ge9HTYF5mIJETuIquhUWIltpYCLit7dE6HZQnquV9w1sPz
fHQkH9eekZkO5ARwXAXJ7chjclzXWXsHXCOWlx7EKi10tK14kWXAZZmWD5A+ibqC
94L80VGl2ocGpwZwnIOf
=6knZ
-----END PGP SIGNATURE-----





Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Mon, 16 Apr 2012 07:38:12 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: Thu Apr 17 04:04:46 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.