[Build-common-hackers] Bug#712729: The fix for this breaks other packages
fsateler at debian.org
Wed Sep 3 19:37:01 UTC 2014
On Wed, Sep 3, 2014 at 3:32 PM, Jonas Smedegaard <dr at jones.dk> wrote:
> Quoting Felipe Sateler (2014-09-03 20:47:58)
>> Control: reopen -1
>> Control: severity -1 serious
>> On Thu, 21 Aug 2014 22:04:00 +0000 Jonas Smedegaard <dr at jones.dk> wrote:
>>> * Fix preserve compiler flags set using DEB_* environment
>>> variables, in langcore.mk.
>>> Closes: bug#712729. Thanks to Simon Ruderich, Emilio Pozuelo
>>> Monfort and Markus.
>> This change introduces a bug: packages with names that are illegal
>> shell variable names. For an example, see pulseaudio. This change
>> results in build flags not being applied.
>> The filter needs to be smarter.Perhaps only exporting the variables
>> that look like the ones in the buildflags manpage should be exported:
>> allvars = $(filter DEB_%,$(.VARIABLES))
>> filt = $(foreach suf,APPEND PREPEND SET STRIP OPTIONS,$(filter
>> exp = $(foreach flag,$(filt),$(flag)="$($(flag))")
>> Please fix this asap, as this change is breaking other packages.
>>  https://buildd.debian.org/status/fetch.php?pkg=pulseaudio&arch=kfreebsd-i386&ver=5.0-11&stamp=1409110310
> Could you please elaborate on this - e.g. on the concrete example.
> Sorry, I looked at that build log but failed to extract what failed and
> how it relates to the change in CDBS - I do *not* suspect that your
> findings are wrong, merely that I need it spelled out with bigger
The change proposed by Simon prepends every variable known to make
that starts with DEB_ , along with its value, to the invocation of
dpkg-buildflags. The problem is that some make variable names are
illegal as shell variable names. Like for example
DEB_DBG_PACKAGE_pulseaudio-module-zeroconf, which is not a valid shell
variable name. So the invocation expands to something like:
<moreflags> dpkg-buildflags --get CFLAGS
And that cannot be parsed by the shell.
More information about the Build-common-hackers