From: Alejandro Hernandez <alhe@linux.microsoft.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH 2/4] ptest.bbclass: strip build machine triplet from installed ptest Makefiles
Date: Tue, 4 Aug 2026 22:04:54 +0000 [thread overview]
Message-ID: <20260804220456.2342710-2-alhe@linux.microsoft.com> (raw)
In-Reply-To: <20260804220456.2342710-1-alhe@linux.microsoft.com>
do_install_ptest_base already rewrites HOSTTOOLS_DIR and WORKDIR
references out of installed ptest Makefiles, but automake-generated
Makefiles (as shipped by strace-ptest, gnutls-ptest and others) also
carry six autoconf-generated variables that encode the *build
machine*, not the target:
build_triplet, build_alias, build, build_cpu, build_vendor, build_os
Those values differ across autobuilder workers (typical values are
build=x86_64-pc-linux-gnu, build_alias=x86_64-linux, build_vendor=pc),
causing corresponding -ptest packages to fail the reproducibility
selftest.
Add sed rules to blank the RHS of each of those assignments, plus the
matching automake helper lines `set build_triplet` and
`set build_alias`, and extend PTEST_BUILD_HOST_FILES to include
site.exp (also autoconf-generated with the same variables).
Verified locally: before this change strace-ptest carried
`build_triplet = x86_64-pc-linux-gnu`, `build = x86_64-pc-linux-gnu`,
`build_alias = x86_64-linux`, `build_cpu = x86_64`,
`build_vendor = pc`, `build_os = linux-gnu`; after this change all six
lines have an empty RHS.
Assisted-by: AI - OpenAI
Signed-off-by: Alejandro Hernandez <alhe@linux.microsoft.com>
---
meta/classes-recipe/ptest.bbclass | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/meta/classes-recipe/ptest.bbclass b/meta/classes-recipe/ptest.bbclass
index 64c4bb9788..0f80fbc1d8 100644
--- a/meta/classes-recipe/ptest.bbclass
+++ b/meta/classes-recipe/ptest.bbclass
@@ -9,7 +9,7 @@ DESCRIPTION:${PN}-ptest ?= "${DESCRIPTION} \
This package contains a test directory ${PTEST_PATH} for package test purposes."
PTEST_PATH ?= "${libdir}/${BPN}/ptest"
-PTEST_BUILD_HOST_FILES ?= "Makefile"
+PTEST_BUILD_HOST_FILES ?= "Makefile site.exp"
PTEST_BUILD_HOST_PATTERN ?= ""
PTEST_PARALLEL_MAKE ?= "${PARALLEL_MAKE}"
PTEST_PARALLEL_MAKEINST ?= "${PARALLEL_MAKEINST}"
@@ -69,6 +69,14 @@ do_install_ptest_base() {
sed -e 's#${HOSTTOOLS_DIR}/*##g' \
-e 's#${WORKDIR}/*=#.=#g' \
-e 's#${WORKDIR}/*##g' \
+ -e 's#^\(build_triplet[[:space:]]*=\).*#\1#' \
+ -e 's#^\(build_alias[[:space:]]*=\).*#\1#' \
+ -e 's#^\(build[[:space:]]*=\).*#\1#' \
+ -e 's#^\(build_cpu[[:space:]]*=\).*#\1#' \
+ -e 's#^\(build_vendor[[:space:]]*=\).*#\1#' \
+ -e 's#^\(build_os[[:space:]]*=\).*#\1#' \
+ -e 's#^\(set build_triplet\).*#\1#' \
+ -e 's#^\(set build_alias\).*#\1#' \
-i $installed_ptest_file
if [ -n "${PTEST_BUILD_HOST_PATTERN}" ]; then
sed -E '/${PTEST_BUILD_HOST_PATTERN}/d' \
--
2.43.0
next prev parent reply other threads:[~2026-08-04 22:05 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-04 22:04 [PATCH 1/4] libtool: strip build system triplet from installed libtool script Alejandro Hernandez
2026-08-04 22:04 ` Alejandro Hernandez [this message]
2026-08-04 22:04 ` [PATCH 3/4] python_pep517.bbclass: always export _PYTHON_HOST_PLATFORM for wheel tag Alejandro Hernandez
2026-08-06 12:26 ` [OE-core] " Richard Purdie
2026-08-06 15:51 ` Alejandro Hernandez
2026-08-06 16:09 ` Richard Purdie
2026-08-06 17:28 ` Alejandro Hernandez
2026-08-04 22:04 ` [PATCH 4/4] bitbake.conf, rust-common.bbclass: include RUST_BUILD_SYS in the task hash Alejandro Hernandez
2026-08-06 5:58 ` [OE-core] " Mathieu Dubois-Briand
2026-08-06 15:53 ` Alejandro Hernandez
2026-08-06 12:53 ` Richard Purdie
2026-08-06 15:50 ` Alejandro Hernandez
2026-08-06 16:12 ` Richard Purdie
[not found] ` <18C8B9671621C916.3417489@lists.openembedded.org>
2026-08-05 4:16 ` Alejandro Hernandez
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260804220456.2342710-2-alhe@linux.microsoft.com \
--to=alhe@linux.microsoft.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox