bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bash: Please make bash build reproducibly


From: Ximin Luo
Subject: Re: bash: Please make bash build reproducibly
Date: Tue, 7 Jun 2016 12:26:58 +0200

Control: tags -1 + patch

I've attached the full Debian patch to make bash 4.3-14 reproducible, that 
includes Reiner's from above.

It also includes *fixing a bug in upstream bash*, which currently 
does-not-appear-in-the-wild *only because* distros already happen to be working 
around it. But upstream really should fix it - i.e. to fix the PGRP_PIPE check 
in configure/configure.ac to account for Linux 4+.

I decided to just set PGRP_PIPE unconditionally in configure.ac and configure, 
because I figure nobody will ever again use linux 0, 1 or 2 so it's not worth 
the extra complexity (which only gives a minor performance gain anyway, as 
opposed to having *incorrect behaviour*). Upstream is free to choose whichever 
behaviour he wants - either this simpler version, or the more complex version 
from my previous email quoted below. Both are correct, if I understand right, 
and when either is applied to upstream, all distros (including Debian) can drop 
our specific patches for PGRP_PIPE.

To re-iterate again, this does not solve the longer-term issue of "installing 
config.h is bad".

Ximin

Ximin Luo:
> (Chet, your specific attention is required for this email, please)
> 
> Ximin Luo:
>> On Sat, 28 May 2016 13:38:35 +0200 Reiner Herrmann <reiner@reiner-h.de> 
>> wrote:
>>> After that, the only remaining issue is that the included header file
>>> /usr/include/bash/config.h varies depending on the kernel version used
>>> during build [1] (with kernel <4, PGRP_PIPE is defined).
>>
>> For this particular example, we can just patch this out, i.e. remove it from 
>> the installed config.h. Debian already forces PGRP_PIPE 1 in config-bot.h, 
>> which config.h includes at the end.
>>
> 
> I dug into this a bit more and it looks like the cause of the difference is 
> this snippet from configure.ac:
> 
> linux*)     LOCAL_LDFLAGS=-rdynamic      # allow dynamic loading
>         case "`uname -r`" in
>         2.[[456789]]*|3*)   AC_DEFINE(PGRP_PIPE) ;;
>         esac ;;
> 
> 
> This was added between bash-3.0.16 and bash-3.1, way before Linux 4 came out. 
> So I wonder if this snippet should instead be:
> 
> linux*)     LOCAL_LDFLAGS=-rdynamic      # allow dynamic loading
>         case "`uname -r`" in
>         1.*|2.[[0123]]*) true ;;
>         *) AC_DEFINE(PGRP_PIPE) ;;
>         esac ;;
> 
> to set this for all future kernels? Then Debian (and probably other distros) 
> could get rid of our patch, too.
> 
> However, the question still remains why config.h is installed into the 
> end-user system, and if bash-built-with-linux-5 required PGRP_PIPE to be 
> *undefined*, we would still have a reproducibility problem.
> 
> Ximin
> 


-- 
GPG: ed25519/56034877E1F87C35
GPG: rsa4096/1318EFAC5FBBDBCE
git://github.com/infinity0/pubkeys.git

Attachment: bash_4.3-14_4.3-14.0~reproducible1.debdiff
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]