From: Alejandro Hernandez Samaniego Date: Tue, 4 Aug 2026 22:04:54 +0000 (+0000) Subject: ptest.bbclass: strip build machine triplet from installed ptest Makefiles X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6aebec069c25486e8a17d91e7708fbb85e36fa19;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git ptest.bbclass: strip build machine triplet from installed ptest Makefiles 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 Signed-off-by: Richard Purdie --- 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' \