busybox: Fix reproducibility

The ensures that globbing results in same order irrespective of shell in
use

(From OE-Core rev: b5bb7b5499b7a1ece9ef6592166709fecd5e6935)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit fdeee94fa78f91613850500b209b75a6608241d0)
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Khem Raj
2021-05-03 16:16:51 -07:00
committed by Richard Purdie
parent 34161a0513
commit 75ea23a238
2 changed files with 29 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
From bff7f16f7f41de8df67beb03722f235828ef2249 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 3 May 2021 15:48:19 -0700
Subject: [PATCH] gen_build_files: Use C locale when calling sed on globbed files
sort order is different based on chosen locale and also default shell
being bash or dash
This sets the environment variable LC_ALL to the value C, which will
enforce bytewise sorting, irrespective of the shell
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
scripts/gen_build_files.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/scripts/gen_build_files.sh
+++ b/scripts/gen_build_files.sh
@@ -4,6 +4,8 @@
# but users complain that many sed implementations
# are misinterpreting --.
+export LC_ALL=C
+
test $# -ge 2 || { echo "Syntax: $0 SRCTREE OBJTREE"; exit 1; }
# cd to objtree

View File

@@ -47,6 +47,7 @@ SRC_URI = "https://busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \
file://rev.cfg \
file://pgrep.cfg \
file://0001-decompress_gunzip-Fix-DoS-if-gzip-is-corrupt.patch \
file://0001-gen_build_files-Use-C-locale-when-calling-sed-on-glo.patch \
"
SRC_URI_append_libc-musl = " file://musl.cfg "