summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/recipes-core/busybox/busybox.inc1
-rw-r--r--meta/recipes-core/busybox/busybox/0001-busybox-Add-awk-gsub-erroneous-word-start-match-test.patch28
-rw-r--r--meta/recipes-core/busybox/busybox_1.37.0.bb2
-rw-r--r--meta/recipes-core/busybox/files/run-ptest2
4 files changed, 32 insertions, 1 deletions
diff --git a/meta/recipes-core/busybox/busybox.inc b/meta/recipes-core/busybox/busybox.inc
index 4ebaeb92c9..c203f2f8f1 100644
--- a/meta/recipes-core/busybox/busybox.inc
+++ b/meta/recipes-core/busybox/busybox.inc
@@ -371,6 +371,7 @@ do_install_ptest () {
371 rm -rf ${D}${PTEST_PATH}/testsuite/wget 371 rm -rf ${D}${PTEST_PATH}/testsuite/wget
372 sort ${B}/.config > ${D}${PTEST_PATH}/.config 372 sort ${B}/.config > ${D}${PTEST_PATH}/.config
373 ln -s ${base_bindir}/busybox ${D}${PTEST_PATH}/busybox 373 ln -s ${base_bindir}/busybox ${D}${PTEST_PATH}/busybox
374 sed -i -e 's|LIBC="<libc>"|LIBC=${TCLIBC}|g' ${D}${PTEST_PATH}/run-ptest
374} 375}
375 376
376inherit update-alternatives 377inherit update-alternatives
diff --git a/meta/recipes-core/busybox/busybox/0001-busybox-Add-awk-gsub-erroneous-word-start-match-test.patch b/meta/recipes-core/busybox/busybox/0001-busybox-Add-awk-gsub-erroneous-word-start-match-test.patch
new file mode 100644
index 0000000000..18e57a87be
--- /dev/null
+++ b/meta/recipes-core/busybox/busybox/0001-busybox-Add-awk-gsub-erroneous-word-start-match-test.patch
@@ -0,0 +1,28 @@
1From 7ee04187bd59acc922982fb49e76ba6c39dd8a91 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sun, 11 May 2025 08:36:54 -0700
4Subject: [PATCH] busybox: Add awk gsub erroneous word start match test to know fails on musl
5
6Musl does not implement this BSD extension REG_STARTEND and the test states
7that it will fail without this extention, therefore guard it with SKIP_KNOWN_BUGS
8so it can be ignored.
9
10Upstream-Status: Submitted [https://lists.busybox.net/pipermail/busybox/2025-July/091623.html]
11Signed-off-by: Khem Raj <raj.khem@gmail.com>
12---
13 testsuite/awk.tests | 2 +-
14 1 file changed, 1 insertion(+), 1 deletion(-)
15
16diff --git a/testsuite/awk.tests b/testsuite/awk.tests
17index be25f6696..c56e217e8 100755
18--- a/testsuite/awk.tests
19+++ b/testsuite/awk.tests
20@@ -612,7 +612,7 @@ b
21 # Currently we use REG_STARTEND ("This flag is a BSD extension, not present in POSIX")
22 # to implement the code to handle this correctly, but if your libc has no REG_STARTEND,
23 # the alternative code mishandles this case.
24-testing 'awk gsub erroneous word start match' \
25+test x"$LIBC" != x"musl" && testing 'awk gsub erroneous word start match' \
26 "awk 'BEGIN { a=\"abc\"; gsub(/\<b*/,\"\",a); print a }'" \
27 'abc\n' \
28 '' ''
diff --git a/meta/recipes-core/busybox/busybox_1.37.0.bb b/meta/recipes-core/busybox/busybox_1.37.0.bb
index 9f7ded3354..bec25348b8 100644
--- a/meta/recipes-core/busybox/busybox_1.37.0.bb
+++ b/meta/recipes-core/busybox/busybox_1.37.0.bb
@@ -55,7 +55,9 @@ SRC_URI = "https://busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \
55 file://0003-start-stop-false.patch \ 55 file://0003-start-stop-false.patch \
56 file://0001-archival-disallow-path-traversals-CVE-2023-39810.patch \ 56 file://0001-archival-disallow-path-traversals-CVE-2023-39810.patch \
57 file://0001-hwclock-Check-for-SYS_settimeofday-before-calling-sy.patch \ 57 file://0001-hwclock-Check-for-SYS_settimeofday-before-calling-sy.patch \
58 file://0001-busybox-Add-awk-gsub-erroneous-word-start-match-test.patch \
58 " 59 "
59SRC_URI:append:libc-musl = " file://musl.cfg" 60SRC_URI:append:libc-musl = " file://musl.cfg"
60SRC_URI:append:x86-64 = " file://sha_accel.cfg" 61SRC_URI:append:x86-64 = " file://sha_accel.cfg"
62
61SRC_URI[tarball.sha256sum] = "3311dff32e746499f4df0d5df04d7eb396382d7e108bb9250e7b519b837043a4" 63SRC_URI[tarball.sha256sum] = "3311dff32e746499f4df0d5df04d7eb396382d7e108bb9250e7b519b837043a4"
diff --git a/meta/recipes-core/busybox/files/run-ptest b/meta/recipes-core/busybox/files/run-ptest
index 76873c9de2..957af36099 100644
--- a/meta/recipes-core/busybox/files/run-ptest
+++ b/meta/recipes-core/busybox/files/run-ptest
@@ -4,6 +4,6 @@ current_path=$(readlink -f $0)
4export bindir=$(dirname $current_path) 4export bindir=$(dirname $current_path)
5export PATH=$bindir/bin:$PATH 5export PATH=$bindir/bin:$PATH
6export SKIP_KNOWN_BUGS=1 6export SKIP_KNOWN_BUGS=1
7 7export LIBC="<libc>"
8cd testsuite || exit 1 8cd testsuite || exit 1
9LANG=C.UTF-8 ./runtest -v | sed -r 's/^(SKIPPED|UNTESTED):/SKIP:/' 9LANG=C.UTF-8 ./runtest -v | sed -r 's/^(SKIPPED|UNTESTED):/SKIP:/'