@@ -64,9 +64,6 @@ RDEPENDS:${PN} = "${@["", "busybox-inittab"][(d.getVar('VIRTUAL-RUNTIME_init_man
inherit cml1 systemd update-rc.d ptest
-# busybox's unzip test case needs zip command, which busybox itself does not provide
-RDEPENDS:${PN}-ptest = "zip"
-
# internal helper
def busybox_cfg(feature, tokens, cnf, rem):
if type(tokens) == type(""):
@@ -383,6 +380,9 @@ do_install_ptest () {
sort ${B}/.config > ${D}${PTEST_PATH}/.config
ln -s ${base_bindir}/busybox ${D}${PTEST_PATH}/busybox
sed -i -e 's|LIBC="<libc>"|LIBC=${TCLIBC}|g' ${D}${PTEST_PATH}/run-ptest
+
+ # This can be removed when 0001-testsuite-provide-good-reference-.zip-file is merged upstream
+ install -m644 ${UNPACKDIR}/unzip_good.zip ${D}${PTEST_PATH}/testsuite/
}
inherit update-alternatives
new file mode 100644
@@ -0,0 +1,42 @@
+From a3faa33f5c660c37eb5c92b5ce5e8d5581a6fdf1 Mon Sep 17 00:00:00 2001
+From: Ross Burton <ross.burton@arm.com>
+Date: Mon, 30 Nov 2026 22:28:21 +0000
+Subject: [PATCH] testsuite: provide good reference .zip file
+X-ARM-No-Footer: NoDisclaimer
+
+X-ARM-No-Footer: NoDisclaimer
+
+Instead of expecting the build host to have a 'zip' binary, provide a
+tiny reference zip file in the test suite.
+
+Upstream-Status: Submitted [https://lists.busybox.net/pipermail/busybox/2026-December/092671.html]
+Signed-off-by: Ross Burton <ross.burton@arm.com>
+---
+ testsuite/unzip.tests | 11 +----------
+ 1 file changed, 1 insertion(+), 10 deletions(-)
+
+diff --git a/testsuite/unzip.tests b/testsuite/unzip.tests
+index 6d8e01d..9d63bde 100755
+--- a/testsuite/unzip.tests
++++ b/testsuite/unzip.tests
+@@ -16,19 +16,10 @@
+ mkdir temp
+ cd temp || exit $?
+
+-# Create test file to work with.
+-
+-mkdir foo
+-touch foo/bar
+-zip foo.zip foo foo/bar > /dev/null
+-rm -f foo/bar
+-rmdir foo
+-
+ # Test that unzipping just foo doesn't create bar.
+-testing "unzip (subdir only)" "unzip -q foo.zip foo/ && test -d foo && test ! -f foo/bar && echo yes" "yes\n" "" ""
++testing "unzip (subdir only)" "unzip -q ../unzip_good.zip foo/ && test -d foo && test ! -f foo/bar && echo yes" "yes\n" "" ""
+
+ rmdir foo
+-rm foo.zip
+
+ # File containing some damaged encrypted stream
+ optional FEATURE_UNZIP_CDF CONFIG_UNICODE_SUPPORT UUDECODE
@@ -61,6 +61,8 @@ SRC_URI = "https://busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \
file://CVE-2024-58251.patch \
file://CVE-2026-38754.patch \
file://CVE-2026-136411.patch \
+ file://0001-testsuite-provide-good-reference-.zip-file.patch \
+ file://unzip_good.zip;unpack=0 \
"
SRC_URI:append:libc-musl = " file://musl.cfg"
SRC_URI:append:x86-64 = " file://sha_accel.cfg"
new file mode 100644
The unzip test case currently constructs a zip file at runtime. Instead, provide a small and known good zip file so we don't need zip to run the tests. The patch is split into a patch and a literal .zip in SRC_URI because GNU patch can't apply git binary diffs. When this patch is upstreamed we can remove both the .patch and .zip. Signed-off-by: Ross Burton <ross.burton@arm.com> --- meta/recipes-core/busybox/busybox.inc | 6 +-- ...ite-provide-good-reference-.zip-file.patch | 42 ++++++++++++++++++ meta/recipes-core/busybox/busybox_1.38.0.bb | 2 + .../recipes-core/busybox/files/unzip_good.zip | Bin 0 -> 300 bytes 4 files changed, 47 insertions(+), 3 deletions(-) create mode 100644 meta/recipes-core/busybox/busybox/0001-testsuite-provide-good-reference-.zip-file.patch create mode 100644 meta/recipes-core/busybox/files/unzip_good.zip GIT binary patch literal 300 zcmWIWW@h1H00HIAb+KRulwe_yVMxo**AEThWMDq@oi`hVODnh;7+KiL7#P4r08ZWP zP~Az1MfeS1WRhdX<p2q&Qv?|PI)a!G=dePYgW(k1Cb2WXOk!Zz(r5=Y3G6gnhOx4N PEMx-0=|H+3#9;sc$sI1b literal 0 HcmV?d00001