logo

live-bootstrap

Mirror of <https://github.com/fosslinux/live-bootstrap>
commit: 50417514de5027c721314e47f613356ad3f20db4
parent a6630ffb67e0b9525992db6172e202abcaa79c34
Author: Bastian Bittorf <bb@npl.de>
Date:   Thu, 15 Apr 2021 11:56:27 +0000

fixes bash build.
fixes: https://github.com/fosslinux/live-bootstrap/issues/99

in my usecase (qemu, kernel 3.18.140) around 50% of
all builds are failing with a wrong binary hash.
the culprit is a varying generation of 'pipesize.h' during:

```
/bin/sh ./psize.sh > pipesize.h
```

normally generated 'pipesize.h' looks like:
```
/*
* pipesize.h
*
* This file is automatically generated by psize.sh
* Do not edit!
*/

 #define PIPESIZE 65536
```

in the error case the last line has 512 instead of 65536.
With this change we use a fixed output of the large PIPESIZE.

Diffstat:

Msysa/bash-5.1/bash-5.1.sh8+++++---
1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/sysa/bash-5.1/bash-5.1.sh b/sysa/bash-5.1/bash-5.1.sh @@ -1,5 +1,6 @@ # SPDX-FileCopyrightText: 2021 Paul Dersey <pdersey@gmail.com> # SPDX-FileCopyrightText: 2021 Andrius Štikonas <andrius@stikonas.eu> +# SPDX-FileCopyrightText: 2021 Bastian Bittorf <bb@npl.de> # # SPDX-License-Identifier: GPL-3.0-or-later @@ -11,9 +12,10 @@ src_prepare() { rm configure autoconf-2.61 - # Without this bash build can be non-deterministic when using - # our old bash 2.05b which was built with Mes C library. - sed -i 's/sleep 3/sleep 3; sync/' builtins/psize.sh + # avoid non-deterministic build: + printf '%s\n%s\n' \ + '#!/bin/sh' \ + 'echo "#define PIPESIZE 65536"' >builtins/psize.sh } src_configure() {