From patchwork Tue Sep 5 13:35:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 29981 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id D37C5C83F33 for ; Tue, 5 Sep 2023 13:35:52 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.21580.1693920949034999523 for ; Tue, 05 Sep 2023 06:35:49 -0700 Authentication-Results: mx.groups.io; dkim=none (message not signed); spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: ross.burton@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 7822911FB; Tue, 5 Sep 2023 06:36:26 -0700 (PDT) Received: from oss-tx204.lab.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id EBD023F67D; Tue, 5 Sep 2023 06:35:47 -0700 (PDT) From: ross.burton@arm.com To: openembedded-core@lists.openembedded.org Cc: nd@arm.com Subject: [PATCH] busybox: remove coreutils dependency in busybox-ptest Date: Tue, 5 Sep 2023 14:35:45 +0100 Message-Id: <20230905133545.1286448-1-ross.burton@arm.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 05 Sep 2023 13:35:52 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/187214 From: Ross Burton A dependency on coreutils was added to busybox-ptest in oe-core 658c5ed to fix a test failure. The failure is because one of the start-stop-daemon tests is known to fail if /bin/false is busybox. Instead of failing, we can check if /bin/false is a symlink to busybox and skip the test if so. [ YOCTO #15068 ] Signed-off-by: Ross Burton --- meta/recipes-core/busybox/busybox.inc | 2 +- .../busybox/busybox/start-stop-false.patch | 31 +++++++++++++++++++ meta/recipes-core/busybox/busybox_1.36.1.bb | 1 + 3 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-core/busybox/busybox/start-stop-false.patch diff --git a/meta/recipes-core/busybox/busybox.inc b/meta/recipes-core/busybox/busybox.inc index 582d87949e9..f5d7c3f9c8f 100644 --- a/meta/recipes-core/busybox/busybox.inc +++ b/meta/recipes-core/busybox/busybox.inc @@ -56,7 +56,7 @@ 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 coreutils" +RDEPENDS:${PN}-ptest = "zip" # internal helper def busybox_cfg(feature, tokens, cnf, rem): diff --git a/meta/recipes-core/busybox/busybox/start-stop-false.patch b/meta/recipes-core/busybox/busybox/start-stop-false.patch new file mode 100644 index 00000000000..c2955b9c06b --- /dev/null +++ b/meta/recipes-core/busybox/busybox/start-stop-false.patch @@ -0,0 +1,31 @@ +Upstream-Status: Pending +Signed-off-by: Ross Burton + +diff --git a/testsuite/start-stop-daemon.tests b/testsuite/start-stop-daemon.tests +index 0757b1288..aa6e9cc41 100755 +--- a/testsuite/start-stop-daemon.tests ++++ b/testsuite/start-stop-daemon.tests +@@ -27,10 +27,18 @@ testing "start-stop-daemon without -x and -a" \ + # but at least it checks that pathname to exec() is correct + # + # NB: this fails if /bin/false is a busybox symlink: +-# busybox looks at argv[0] and says "qwerty: applet not found" +-testing "start-stop-daemon with both -x and -a" \ +- 'start-stop-daemon -S -x /bin/false -a qwerty false 2>&1; echo $?' \ +- "1\n" \ +- "" "" ++# busybox looks at argv[0] and says "qwerty: applet not found", so ++# skip the test if false is busybox. ++case $(readlink /bin/false) in ++ *busybox*) ++ echo "SKIPPED: start-stop-daemon with both -x and -a (need non-busybox false)" ++ ;; ++ *) ++ testing "start-stop-daemon with both -x and -a" \ ++ 'start-stop-daemon -S -x /bin/false -a qwerty false 2>&1; echo $?' \ ++ "1\n" \ ++ "" "" ++ ;; ++esac + + exit $FAILCOUNT diff --git a/meta/recipes-core/busybox/busybox_1.36.1.bb b/meta/recipes-core/busybox/busybox_1.36.1.bb index 968dce65e45..06eb9eb9996 100644 --- a/meta/recipes-core/busybox/busybox_1.36.1.bb +++ b/meta/recipes-core/busybox/busybox_1.36.1.bb @@ -49,6 +49,7 @@ SRC_URI = "https://busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \ file://0001-sysctl-ignore-EIO-of-stable_secret-below-proc-sys-ne.patch \ file://0001-libbb-sockaddr2str-ensure-only-printable-characters-.patch \ file://0002-nslookup-sanitize-all-printed-strings-with-printable.patch \ + file://start-stop-false.patch \ " SRC_URI:append:libc-musl = " file://musl.cfg " # TODO http://lists.busybox.net/pipermail/busybox/2023-January/090078.html