From patchwork Thu Dec 18 17:42:43 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 76934 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 4D0D0D6E2CC for ; Thu, 18 Dec 2025 17:42:58 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.2579.1766079773940705287 for ; Thu, 18 Dec 2025 09:42:54 -0800 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 558CFFEC for ; Thu, 18 Dec 2025 09:42:46 -0800 (PST) Received: from cesw-amp-gbt-1s-m12830-04.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 14A843F73F for ; Thu, 18 Dec 2025 09:42:52 -0800 (PST) From: Ross Burton To: openembedded-core@lists.openembedded.org Subject: [PATCH 1/5] scripts/makefile-getvar: be more resilient Date: Thu, 18 Dec 2025 17:42:43 +0000 Message-ID: <20251218174248.2580279-1-ross.burton@arm.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 18 Dec 2025 17:42:58 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/228128 Check that we've been passed enough arguments (at least the Makefile and one variable), and that the Makefile specified is actually a file. Signed-off-by: Ross Burton --- scripts/makefile-getvar | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/scripts/makefile-getvar b/scripts/makefile-getvar index 4a07055e687..e8a98327667 100755 --- a/scripts/makefile-getvar +++ b/scripts/makefile-getvar @@ -11,9 +11,20 @@ set -eu +if [ $# -lt 2 ]; then + echo "Get a variable's value from a Makefile:" + echo "$ makefile-getvar Makefile VARIABLE VARIABLE ..." + exit 0 +fi + MAKEFILE=$1 shift +if [ ! -f $MAKEFILE ]; then + echo $MAKEFILE is not a file + exit 1 +fi + for VARIABLE in $*; do make -f - $VARIABLE.var < X-Patchwork-Id: 76935 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 4E657D6E2CA for ; Thu, 18 Dec 2025 17:42:58 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.2580.1766079774619189231 for ; Thu, 18 Dec 2025 09:42:54 -0800 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 00E8D106F for ; Thu, 18 Dec 2025 09:42:47 -0800 (PST) Received: from cesw-amp-gbt-1s-m12830-04.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 BC6833F73F for ; Thu, 18 Dec 2025 09:42:53 -0800 (PST) From: Ross Burton To: openembedded-core@lists.openembedded.org Subject: [PATCH 2/5] libseccomp: allow out-of-tree builds Date: Thu, 18 Dec 2025 17:42:44 +0000 Message-ID: <20251218174248.2580279-2-ross.burton@arm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251218174248.2580279-1-ross.burton@arm.com> References: <20251218174248.2580279-1-ross.burton@arm.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 18 Dec 2025 17:42:58 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/228129 Out of tree builds appear to work fine, so use them. This means updating do_install_ptest so that it correctly uses S or B as appropriate. Signed-off-by: Ross Burton --- .../libseccomp/libseccomp_2.6.0.bb | 38 +++++++++++-------- 1 file changed, 23 insertions(+), 15 deletions(-) diff --git a/meta/recipes-support/libseccomp/libseccomp_2.6.0.bb b/meta/recipes-support/libseccomp/libseccomp_2.6.0.bb index 998f1b5548d..dd56391e1ff 100644 --- a/meta/recipes-support/libseccomp/libseccomp_2.6.0.bb +++ b/meta/recipes-support/libseccomp/libseccomp_2.6.0.bb @@ -14,7 +14,7 @@ SRC_URI = "git://github.com/seccomp/libseccomp.git;branch=release-2.6;protocol=h file://run-ptest \ " -inherit autotools-brokensep pkgconfig ptest features_check +inherit autotools pkgconfig ptest features_check inherit_defer ${@bb.utils.contains('PACKAGECONFIG', 'python', 'python3native', '', d)} @@ -31,27 +31,35 @@ do_compile_ptest() { do_install_ptest() { install -d ${D}${PTEST_PATH}/tests - install -d ${D}${PTEST_PATH}/tools - for file in $(find tests/* -executable -type f); do - install -m 744 ${S}/${file} ${D}/${PTEST_PATH}/tests + for file in $(find ${S}/tests/* -executable -type f); do + install -m 744 $file ${D}/${PTEST_PATH}/tests done - for file in $(find tests/*.tests -type f); do - install -m 744 ${S}/${file} ${D}/${PTEST_PATH}/tests + for file in $(find ${B}/tests/* -executable -type f); do + install -m 744 $file ${D}/${PTEST_PATH}/tests done - for file in $(find tests/*.pfc -type f); do - install -m 644 ${S}/${file} ${D}/${PTEST_PATH}/tests + for file in $(find ${S}/tests/*.tests -type f); do + install -m 744 $file ${D}/${PTEST_PATH}/tests + done + for file in $(find ${S}/tests/*.pfc -type f); do + install -m 644 $file ${D}/${PTEST_PATH}/tests done install -m 644 ${S}/tests/valgrind_test.supp ${D}/${PTEST_PATH}/tests - for file in $(find tools/* -executable -type f); do - install -m 744 ${S}/${file} ${D}/${PTEST_PATH}/tools + + install -d ${D}${PTEST_PATH}/tools + for file in $(find ${S}/tools/* -executable -type f); do + install -m 744 $file ${D}/${PTEST_PATH}/tools + done + for file in $(find ${B}/tools/* -executable -type f); do + install -m 744 $file ${D}/${PTEST_PATH}/tools done # Overwrite libtool wrappers with real executables - for file in $(find tools/.libs/* -executable -type f); do - install -m 744 ${S}/${file} ${D}/${PTEST_PATH}/tools + for file in $(find ${B}/tools/.libs/* -executable -type f); do + install -m 744 $file ${D}/${PTEST_PATH}/tools done - # fix python shebang - sed -i -e 's@cmd /usr/bin/env python @cmd /usr/bin/env python3 @' ${D}/${PTEST_PATH}/tests/regression - sed -i -e 's@^#!/usr/bin/env python$@#!/usr/bin/env python3@' ${D}/${PTEST_PATH}/tests/*.py + + # fix python shebang + sed -i -e 's@cmd /usr/bin/env python @cmd /usr/bin/env python3 @' ${D}/${PTEST_PATH}/tests/regression + sed -i -e 's@^#!/usr/bin/env python$@#!/usr/bin/env python3@' ${D}/${PTEST_PATH}/tests/*.py } FILES:${PN} = "${bindir} ${libdir}/${BPN}.so* ${PYTHON_SITEPACKAGES_DIR}/" From patchwork Thu Dec 18 17:42:45 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 76938 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 4FC72D6E2D1 for ; Thu, 18 Dec 2025 17:42:58 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.2581.1766079775118076692 for ; Thu, 18 Dec 2025 09:42:55 -0800 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 9DCE5FEC for ; Thu, 18 Dec 2025 09:42:47 -0800 (PST) Received: from cesw-amp-gbt-1s-m12830-04.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 663263F73F for ; Thu, 18 Dec 2025 09:42:54 -0800 (PST) From: Ross Burton To: openembedded-core@lists.openembedded.org Subject: [PATCH 3/5] libseccomp: use libtool to install test binaries Date: Thu, 18 Dec 2025 17:42:45 +0000 Message-ID: <20251218174248.2580279-3-ross.burton@arm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251218174248.2580279-1-ross.burton@arm.com> References: <20251218174248.2580279-1-ross.burton@arm.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 18 Dec 2025 17:42:58 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/228130 Instead of installing the libtool wrapper scripts and hoping that the real binaries are in .libs/, just use libtool to install the binaries directly. This will relink if needed, and removes any assumptions about file locations. Signed-off-by: Ross Burton --- .../libseccomp/libseccomp_2.6.0.bb | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/meta/recipes-support/libseccomp/libseccomp_2.6.0.bb b/meta/recipes-support/libseccomp/libseccomp_2.6.0.bb index dd56391e1ff..2c06824a799 100644 --- a/meta/recipes-support/libseccomp/libseccomp_2.6.0.bb +++ b/meta/recipes-support/libseccomp/libseccomp_2.6.0.bb @@ -32,13 +32,13 @@ do_compile_ptest() { do_install_ptest() { install -d ${D}${PTEST_PATH}/tests for file in $(find ${S}/tests/* -executable -type f); do - install -m 744 $file ${D}/${PTEST_PATH}/tests - done - for file in $(find ${B}/tests/* -executable -type f); do - install -m 744 $file ${D}/${PTEST_PATH}/tests + install $file ${D}/${PTEST_PATH}/tests done for file in $(find ${S}/tests/*.tests -type f); do - install -m 744 $file ${D}/${PTEST_PATH}/tests + install $file ${D}/${PTEST_PATH}/tests + done + for file in $(find ${B}/tests/* -executable -type f); do + ${B}/libtool --mode=install install $file ${D}/${PTEST_PATH}/tests done for file in $(find ${S}/tests/*.pfc -type f); do install -m 644 $file ${D}/${PTEST_PATH}/tests @@ -47,14 +47,10 @@ do_install_ptest() { install -d ${D}${PTEST_PATH}/tools for file in $(find ${S}/tools/* -executable -type f); do - install -m 744 $file ${D}/${PTEST_PATH}/tools + install $file ${D}/${PTEST_PATH}/tools done for file in $(find ${B}/tools/* -executable -type f); do - install -m 744 $file ${D}/${PTEST_PATH}/tools - done - # Overwrite libtool wrappers with real executables - for file in $(find ${B}/tools/.libs/* -executable -type f); do - install -m 744 $file ${D}/${PTEST_PATH}/tools + ${B}/libtool --mode=install install $file ${D}/${PTEST_PATH}/tools done # fix python shebang From patchwork Thu Dec 18 17:42:46 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 76936 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 5A4A8D6E2D2 for ; Thu, 18 Dec 2025 17:42:58 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.2571.1766079775847351343 for ; Thu, 18 Dec 2025 09:42:56 -0800 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 55233FEC for ; Thu, 18 Dec 2025 09:42:48 -0800 (PST) Received: from cesw-amp-gbt-1s-m12830-04.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 120F53F73F for ; Thu, 18 Dec 2025 09:42:54 -0800 (PST) From: Ross Burton To: openembedded-core@lists.openembedded.org Subject: [PATCH 4/5] libseccomp: remove redundant FILES Date: Thu, 18 Dec 2025 17:42:46 +0000 Message-ID: <20251218174248.2580279-4-ross.burton@arm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251218174248.2580279-1-ross.burton@arm.com> References: <20251218174248.2580279-1-ross.burton@arm.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 18 Dec 2025 17:42:58 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/228131 Remove FILES entries that are already either in the default, or now redundant. Signed-off-by: Ross Burton --- meta/recipes-support/libseccomp/libseccomp_2.6.0.bb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/meta/recipes-support/libseccomp/libseccomp_2.6.0.bb b/meta/recipes-support/libseccomp/libseccomp_2.6.0.bb index 2c06824a799..9bbdc6b833b 100644 --- a/meta/recipes-support/libseccomp/libseccomp_2.6.0.bb +++ b/meta/recipes-support/libseccomp/libseccomp_2.6.0.bb @@ -58,8 +58,7 @@ do_install_ptest() { sed -i -e 's@^#!/usr/bin/env python$@#!/usr/bin/env python3@' ${D}/${PTEST_PATH}/tests/*.py } -FILES:${PN} = "${bindir} ${libdir}/${BPN}.so* ${PYTHON_SITEPACKAGES_DIR}/" -FILES:${PN}-dbg += "${libdir}/${PN}/tests/.debug/* ${libdir}/${PN}/tools/.debug" +FILES:${PN} += "${PYTHON_SITEPACKAGES_DIR}/" RDEPENDS:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'python', 'python3', '', d)}" RDEPENDS:${PN}-ptest = "coreutils bash" From patchwork Thu Dec 18 17:42:47 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 76937 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 633A3D6E2D8 for ; Thu, 18 Dec 2025 17:42:58 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.2581.1766079775118076692 for ; Thu, 18 Dec 2025 09:42:56 -0800 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 F387E106F for ; Thu, 18 Dec 2025 09:42:48 -0800 (PST) Received: from cesw-amp-gbt-1s-m12830-04.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 BB4423F73F for ; Thu, 18 Dec 2025 09:42:55 -0800 (PST) From: Ross Burton To: openembedded-core@lists.openembedded.org Subject: [PATCH 5/5] libexif: rewrite ptest handling Date: Thu, 18 Dec 2025 17:42:47 +0000 Message-ID: <20251218174248.2580279-5-ross.burton@arm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251218174248.2580279-1-ross.burton@arm.com> References: <20251218174248.2580279-1-ross.burton@arm.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 18 Dec 2025 17:42:58 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/228132 What started as replacing the installation of libtool wrapper scripts ended up being a rewrite of the ptest integration. There are only ~15 tests so we can install the binaries with libtool, extract the test names from the Makefile, and just run them with a few lines of shell. Signed-off-by: Ross Burton --- .../recipes-support/libexif/libexif/run-ptest | 34 +++++++++++++++++-- .../recipes-support/libexif/libexif_0.6.25.bb | 21 ++++-------- 2 files changed, 38 insertions(+), 17 deletions(-) diff --git a/meta/recipes-support/libexif/libexif/run-ptest b/meta/recipes-support/libexif/libexif/run-ptest index 2d23159eb03..6a50f64822a 100644 --- a/meta/recipes-support/libexif/libexif/run-ptest +++ b/meta/recipes-support/libexif/libexif/run-ptest @@ -1,3 +1,33 @@ -#!/bin/sh +#! /bin/sh -make -o Makefile runtest-TESTS +all=0 +passed=0 +failed=0 +skipped=0 + +for t in @TESTS@; do + "./$t" + case "$?" in + 0) + echo "PASS: $t" + passed=$((passed + 1)) + ;; + 77) + echo "SKIP: $t" + skipped=$((skipped + 1)) + ;; + *) + echo "FAIL: $t" + failed=$((failed + 1)) + ;; + esac + all=$((all + 1)) +done + +if [ "$failed" -eq 0 ]; then + echo "All $all tests passed ($skipped skipped)" + exit 0 +else + echo "$failed of $all tests failed ($skipped skipped)" + exit 1 +fi diff --git a/meta/recipes-support/libexif/libexif_0.6.25.bb b/meta/recipes-support/libexif/libexif_0.6.25.bb index 59c22753d04..c57855303f4 100644 --- a/meta/recipes-support/libexif/libexif_0.6.25.bb +++ b/meta/recipes-support/libexif/libexif_0.6.25.bb @@ -23,25 +23,16 @@ do_compile_ptest() { } do_install_ptest() { - install ${B}/test/test*[!\.o] ${D}${PTEST_PATH} - for f in ${D}${PTEST_PATH}/test*; do - sed -i "s/\(LD_LIBRARY_PATH=\).*\(:\$LD_LIBRARY_PATH\)\"/\1.\2/" $f - done - - install ${B}/test/Makefile ${D}${PTEST_PATH} - sed -i -e "/^srcdir/c srcdir = \$\{PWD\}" ${D}${PTEST_PATH}/Makefile - - install -d ${D}${PTEST_PATH}/nls - install ${B}/test/nls/*[!\.o] ${D}${PTEST_PATH}/nls - install -d ${D}${PTEST_PATH}/.libs - install ${B}/test/.libs/* ${D}${PTEST_PATH}/.libs - install ${S}/test/*.sh ${D}${PTEST_PATH} + for file in $(find ${B}/test/test-* -executable -type f); do + ${B}/libtool --mode=install install $file ${D}/${PTEST_PATH} + done + install -d ${D}${PTEST_PATH}/testdata install ${S}/test/testdata/* ${D}${PTEST_PATH}/testdata + + sed -i -e "s/@TESTS@/$(makefile-getvar ${B}/test/Makefile TESTS)/" ${D}${PTEST_PATH}/run-ptest } -RDEPENDS:${PN}-ptest += "make bash" - BBCLASSEXTEND = "native nativesdk"