diff options
| author | Khem Raj <raj.khem@gmail.com> | 2021-05-03 16:16:51 -0700 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-05-04 22:48:17 +0100 |
| commit | 5a0679cb7589cdc40bc60b28a4a7756c43e72cf1 (patch) | |
| tree | 07df1198478c98e451a9413e85b4c19345d7ea26 | |
| parent | 30f3691c3f6fa5a7448220a58b67b4ee6ac9fdff (diff) | |
| download | poky-5a0679cb7589cdc40bc60b28a4a7756c43e72cf1.tar.gz | |
busybox: Fix reproducibility
The ensures that globbing results in same order irrespective of shell in
use
(From OE-Core rev: fdeee94fa78f91613850500b209b75a6608241d0)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -rw-r--r-- | meta/recipes-core/busybox/busybox/0001-gen_build_files-Use-C-locale-when-calling-sed-on-glo.patch | 28 | ||||
| -rw-r--r-- | meta/recipes-core/busybox/busybox_1.33.0.bb | 1 |
2 files changed, 29 insertions, 0 deletions
diff --git a/meta/recipes-core/busybox/busybox/0001-gen_build_files-Use-C-locale-when-calling-sed-on-glo.patch b/meta/recipes-core/busybox/busybox/0001-gen_build_files-Use-C-locale-when-calling-sed-on-glo.patch new file mode 100644 index 0000000000..e0a22c5bb3 --- /dev/null +++ b/meta/recipes-core/busybox/busybox/0001-gen_build_files-Use-C-locale-when-calling-sed-on-glo.patch | |||
| @@ -0,0 +1,28 @@ | |||
| 1 | From bff7f16f7f41de8df67beb03722f235828ef2249 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Mon, 3 May 2021 15:48:19 -0700 | ||
| 4 | Subject: [PATCH] gen_build_files: Use C locale when calling sed on globbed files | ||
| 5 | |||
| 6 | sort order is different based on chosen locale and also default shell | ||
| 7 | being bash or dash | ||
| 8 | |||
| 9 | This sets the environment variable LC_ALL to the value C, which will | ||
| 10 | enforce bytewise sorting, irrespective of the shell | ||
| 11 | |||
| 12 | Upstream-Status: Pending | ||
| 13 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 14 | --- | ||
| 15 | scripts/gen_build_files.sh | 2 +- | ||
| 16 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 17 | |||
| 18 | --- a/scripts/gen_build_files.sh | ||
| 19 | +++ b/scripts/gen_build_files.sh | ||
| 20 | @@ -4,6 +4,8 @@ | ||
| 21 | # but users complain that many sed implementations | ||
| 22 | # are misinterpreting --. | ||
| 23 | |||
| 24 | +export LC_ALL=C | ||
| 25 | + | ||
| 26 | test $# -ge 2 || { echo "Syntax: $0 SRCTREE OBJTREE"; exit 1; } | ||
| 27 | |||
| 28 | # cd to objtree | ||
diff --git a/meta/recipes-core/busybox/busybox_1.33.0.bb b/meta/recipes-core/busybox/busybox_1.33.0.bb index a92fa2fe5f..c334c42000 100644 --- a/meta/recipes-core/busybox/busybox_1.33.0.bb +++ b/meta/recipes-core/busybox/busybox_1.33.0.bb | |||
| @@ -48,6 +48,7 @@ SRC_URI = "https://busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \ | |||
| 48 | file://rev.cfg \ | 48 | file://rev.cfg \ |
| 49 | file://pgrep.cfg \ | 49 | file://pgrep.cfg \ |
| 50 | file://0001-decompress_gunzip-Fix-DoS-if-gzip-is-corrupt.patch \ | 50 | file://0001-decompress_gunzip-Fix-DoS-if-gzip-is-corrupt.patch \ |
| 51 | file://0001-gen_build_files-Use-C-locale-when-calling-sed-on-glo.patch \ | ||
| 51 | " | 52 | " |
| 52 | SRC_URI_append_libc-musl = " file://musl.cfg " | 53 | SRC_URI_append_libc-musl = " file://musl.cfg " |
| 53 | 54 | ||
