Remove automake patch that changes path to test-driver
cover Remove automake patch that changes path to test-driver
From: Ola x Nilsson <[email protected]>
Fixes [YOCTO #15635]
The automake patch
"Set relative to top_builddir path in Makefile to access" sets the default path of test-driver to $(top_builddir)/$(config_aux_dir) instead of the normal $(top_srcdir)/$(config_aux_dir).
This breaks check test for Automake projects in generated images.
To reproduce, use core-image-kernel-dev with git added.
git clone https://git.kernel.org/pub/scm/linux/kernel/git/kay/libabc.git
(cd libabc && ./autogen.sh)
mkdir build
cd build
../libabc/configure CFLAGS='-g -O0' --prefix=/usr --sysconfdir=/etc --libdir=/usr/lib make check
/bin/sh: ./build-aux/test-driver: No such file or directory
Removing the patch makes the checks complete successfully.
Some ptests depend on this patch to find test-driver. They need to be addressed individually. In all cases I've found so far this is just another sed substitution and should work even before removing the patch.
I have not verified the ptests in meta-openembedded yet, but I'm working on it.
Ola x Nilsson (5):
attr: Fix the ptest path to test-driver
sed: Fix the ptest path to test-driver
parted: Fix the ptest path to test-driver
strace: Fix the ptest path to test-driver
automake: Remove patch that changes path to test-driver
...top_builddir-path-in-Makefile-to-acc.patch | 50 ------------------- .../automake/automake_1.17.bb | 1 - meta/recipes-devtools/strace/strace_6.11.bb | 4 +- meta/recipes-extended/parted/parted_3.6.bb | 16 +++--- meta/recipes-extended/sed/sed_4.9.bb | 1 + meta/recipes-support/attr/attr.inc | 11 ++-- 6 files changed, 20 insertions(+), 63 deletions(-) delete mode 100644 meta/recipes-devtools/automake/automake/0005-Set-relative-to-top_builddir-path-in-Makefile-to-acc.patch
Signature · 1 line
2.39.5
RFC PATCH 1/5 attr: Fix the ptest path to test-driver
From: Ola x Nilsson <[email protected]>
Add a sed substitution for ${PTEST_PATH}/Makefile that transforms
TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/build-aux/test-driver
to
TEST_LOG_DRIVER = $(SHELL) $(top_builddir)/build-aux/test-driver
which is where the test-driver script can be found when installed.
There used to be an oe-core automake patch to do this, but it broke non-ptest use of automake.
Relates to [YOCTO #15635]
--- meta/recipes-support/attr/attr.inc | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-)
meta/recipes-support/attr/attr.inc +7 -4
@@ -42,10 +42,13 @@ do_install_ptest() { -e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \ -i ${D}${PTEST_PATH}/Makefile - sed -i "s|^srcdir =.*|srcdir = \.|g" ${D}${PTEST_PATH}/Makefile - sed -i "s|^abs_srcdir =.*|abs_srcdir = \.|g" ${D}${PTEST_PATH}/Makefile - sed -i "s|^abs_top_srcdir =.*|abs_top_srcdir = \.\.|g" ${D}${PTEST_PATH}/Makefile - sed -i "s|^Makefile:.*|Makefile:|g" ${D}${PTEST_PATH}/Makefile + sed -e "s|^srcdir =.*|srcdir = .|" \ + -e "s|^abs_srcdir =.*|abs_srcdir = .|" \ + -e "s|^abs_top_srcdir =.*|abs_top_srcdir = ..|" \ + -e "s|^Makefile:.*|Makefile:|" \ + -e "/^TEST_LOG_DRIVER =/s|(top_srcdir)|(top_builddir)|" \ + -i ${D}${PTEST_PATH}/Makefile + cp -rf ${S}/build-aux/ ${D}${PTEST_PATH} cp -rf ${S}/test/ ${D}${PTEST_PATH} }
Signature · 1 line
2.39.5
Re: [OE-core] [RFC PATCH 1/5] attr: Fix the ptest path to test-driver
Quoted 8 lines · Ola x Nilsson via lists.openembedded.org
From: Ola x Nilsson <[email protected]>
Add a sed substitution for ${PTEST_PATH}/Makefile that transforms
TEST_LOG_DRIVER= $(SHELL) $(top_srcdir)/build-aux/test-driver to
TEST_LOG_DRIVER = $(SHELL) $(top_builddir)/build-aux/test-driver which is where the test-driver script can be found when installed.
Quoted 7 lines
There used to be an oe-core automake patch to do this, but it broke non-ptest use of automake.
Relates to [YOCTO #15635]
---
meta/recipes-support/attr/attr.inc | 11 +++++++----1 file changed, 7 insertions(+), 4 deletions(-)
Your patches are missing Signed-off-by lines. There is also a consistent ptest failure in acl:
https://valkyrie.yoctoproject.org/#/builders/61/builds/366
https://valkyrie.yoctoproject.org/#/builders/73/builds/366
https://valkyrie.yoctoproject.org/#/builders/73/builds/367
Cheers,
Richard
Re: [OE-core] [RFC PATCH 1/5] attr: Fix the ptest path to test-driver
Quoted 17 lines · Richard Purdie
Quoted 8 lines · Ola x Nilsson via lists.openembedded.org
From: Ola x Nilsson <[email protected]>
Add a sed substitution for ${PTEST_PATH}/Makefile that transforms
TEST_LOG_DRIVER= $(SHELL) $(top_srcdir)/build-aux/test-driver to
TEST_LOG_DRIVER = $(SHELL) $(top_builddir)/build-aux/test-driver which is where the test-driver script can be found when installed.Quoted 7 lines
There used to be an oe-core automake patch to do this, but it broke non-ptest use of automake.
Relates to [YOCTO #15635]
---
meta/recipes-support/attr/attr.inc | 11 +++++++----1 file changed, 7 insertions(+), 4 deletions(-)
Quoted 6 lines
Your patches are missing Signed-off-by lines. There is also a consistent ptest failure in acl:
https://valkyrie.yoctoproject.org/#/builders/61/builds/366
https://valkyrie.yoctoproject.org/#/builders/73/builds/366
https://valkyrie.yoctoproject.org/#/builders/73/builds/367
I've found two recipes in meta-openembedded where ptests will fail if the patch is removed. Patches for those were just sent to openembedded-devel.
I don't understand the issue with acl. The error in the log looks just like if the updated sed substitution was not done. I have not been able to reproduce this, but I'll keep trying.
I've resent the series as v2 with Signed-off-by lines, but no other changes.
/Ola
RFC PATCH 2/5 sed: Fix the ptest path to test-driver
In reply to [email protected]From: Ola x Nilsson <[email protected]>
Add a sed substitution for ${PTEST_PATH}/Makefile that transforms
SH_LOG_DRIVER = $(SHELL) $(top_srcdir)/build-aux/test-driver PL_LOG_DRIVER = $(SHELL) $(top_srcdir)/build-aux/test-driver
to
SH_LOG_DRIVER = $(SHELL) $(top_builddir)/build-aux/test-driver PL_LOG_DRIVER = $(SHELL) $(top_builddir)/build-aux/test-driver
which is where the test-driver script can be found when installed.
There used to be an oe-core automake patch to do this, but it broke non-ptest use of automake.
Relates to [YOCTO #15635]
--- meta/recipes-extended/sed/sed_4.9.bb | 1 + 1 file changed, 1 insertion(+)
meta/recipes-extended/sed/sed_4.9.bb +1 -0
@@ -59,6 +59,7 @@ do_install_ptest() { -e 's:abs_srcdir =.*:abs_srcdir = ..:g' \ -e 's:top_srcdir =.*:top_srcdir = ..:g' \ -e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \ + -e "/^\(PL\|SH\)_LOG_DRIVER =/s|(top_srcdir)|(top_builddir)|" \ -i ${D}${PTEST_PATH}/Makefile }
Signature · 1 line
2.39.5
RFC PATCH 3/5 parted: Fix the ptest path to test-driver
In reply to [email protected]From: Ola x Nilsson <[email protected]>
Add a sed substitution for ${PTEST_PATH}/tests/Makefile that transforms
SH_LOG_DRIVER = $(SHELL) $(top_srcdir)/build-aux/test-driver
to
SH_LOG_DRIVER = $(SHELL) $(top_builddir)/build-aux/test-driver
which is where the test-driver script can be found when installed.
There used to be an oe-core automake patch to do this, but it broke non-ptest use of automake.
Relates to [YOCTO #15635]
--- meta/recipes-extended/parted/parted_3.6.bb | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-)
meta/recipes-extended/parted/parted_3.6.bb +9 -7
@@ -35,13 +35,15 @@ do_install_ptest() { cp ${B}/tests/Makefile $t/tests/ mkdir $t/lib cp ${B}/lib/config.h $t/lib - sed -i "s|^VERSION.*|VERSION = ${PV}|g" $t/tests/Makefile - sed -i "s|^srcdir =.*|srcdir = \.|g" $t/tests/Makefile - sed -i "s|^abs_srcdir =.*|abs_srcdir = \.|g" $t/tests/Makefile - sed -i "s|^abs_top_srcdir =.*|abs_top_srcdir = "${PTEST_PATH}"|g" $t/tests/Makefile - sed -i "s|^abs_top_builddir =.*|abs_top_builddir = "${PTEST_PATH}"|g" $t/tests/Makefile - sed -i "s|^Makefile:.*|Makefile:|g" $t/tests/Makefile - sed -i "/^BUILDINFO.*$/d" $t/tests/Makefile + sed -e "s|^VERSION.*|VERSION = ${PV}|g" \ + -e "s|^srcdir =.*|srcdir = \.|g" \ + -e "s|^abs_srcdir =.*|abs_srcdir = \.|g" \ + -e "s|^abs_top_srcdir =.*|abs_top_srcdir = "${PTEST_PATH}"|g" \ + -e "s|^abs_top_builddir =.*|abs_top_builddir = "${PTEST_PATH}"|g" \ + -e "/^SH_LOG_DRIVER =/s|(top_srcdir)|(top_builddir)|" \ + -e "s|^Makefile:.*|Makefile:|g" \ + -e "/^BUILDINFO.*$/d" \ + -i $t/tests/Makefile for i in print-align print-max print-flags dup-clobber duplicate fs-resize; \ do cp ${B}/tests/.libs/$i $t/tests/; \ done
Signature · 1 line
2.39.5
RFC PATCH 4/5 strace: Fix the ptest path to test-driver
In reply to [email protected]From: Ola x Nilsson <[email protected]>
Add a sed substitution for ${PTEST_PATH}/tests/Makefile that transforms
TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/build-aux/test-driver
to
TEST_LOG_DRIVER = $(SHELL) $(top_builddir)/build-aux/test-driver
which is where the test-driver script can be found when installed.
There used to be an oe-core automake patch to do this, but it broke non-ptest use of automake.
Relates to [YOCTO #15635]
--- meta/recipes-devtools/strace/strace_6.11.bb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
meta/recipes-devtools/strace/strace_6.11.bb +3 -1
@@ -45,7 +45,9 @@ do_install_ptest() { mkdir -p ${D}${PTEST_PATH}/src install -m 755 ${S}/build-aux/test-driver ${D}${PTEST_PATH}/build-aux/ install -m 644 ${B}/src/config.h ${D}${PTEST_PATH}/src/ - sed -i -e '/^src/s/strace.*[0-9]/ptest/' ${D}/${PTEST_PATH}/${TESTDIR}/Makefile + sed -e '/^src/s/strace.*[0-9]/ptest/' \ + -e "/^TEST_LOG_DRIVER =/s|(top_srcdir)|(top_builddir)|" \ + -i ${D}/${PTEST_PATH}/${TESTDIR}/Makefile } RDEPENDS:${PN}-ptest += "make coreutils grep gawk sed locale-base-en-us"
Signature · 1 line
2.39.5
RFC PATCH 5/5 automake: Remove patch that changes path to test-driver
In reply to [email protected]From: Ola x Nilsson <[email protected]>
The patch "Set relative to top_builddir path in Makefile to access" sets the default path of test-driver to $(top_builddir)/$(config_aux_dir) instead of the normal $(top_srcdir)/$(config_aux_dir).
This breaks check test for Automake projects in generated images, and probably other places like SDKs.
A typical error would be
/bin/sh: ./build-aux/test-driver: No such file or directory
Removing the patch makes such checks complete successfully.
Fixes [YOCTO #15635]
--- ...top_builddir-path-in-Makefile-to-acc.patch | 50 ------------------- .../automake/automake_1.17.bb | 1 - 2 files changed, 51 deletions(-) delete mode 100644 meta/recipes-devtools/automake/automake/0005-Set-relative-to-top_builddir-path-in-Makefile-to-acc.patch
meta/recipes-devtools/automake/automake/0005-Set-relative-to-top_builddir-path-in-Makefile-to-acc.patch deleted +0 -50
@@ -1,50 +0,0 @@ -From 4f576c10613b43cbbfcdf5a451d893faecd6fea9 Mon Sep 17 00:00:00 2001 -From: Adrian Calianu <[email protected]> -Date: Thu, 25 Feb 2016 16:08:04 +0100 -Subject: [PATCH 5/6] Set relative to top_builddir path in Makefile to access - test-driver - -Signed-off-by: Adrian Calianu <[email protected]> -Upstream-Status: Inappropriate [specific to oe-core target ptest installation] -Bug-Report: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=19042 ---- - bin/automake.in | 9 ++++++++- - 1 file changed, 8 insertions(+), 1 deletion(-) - -diff --git a/bin/automake.in b/bin/automake.in -index 18626de..3aa8706 100644 ---- a/bin/automake.in -+++ b/bin/automake.in -@@ -325,6 +325,9 @@ my $config_aux_dir_set_in_configure_ac = 0; - # $AM_CONFIG_AUX_DIR is prefixed with $(top_srcdir), so it can be used - # in Makefiles. - my $am_config_aux_dir = ''; -+# Directory used at runtime like running test-driver that should not -+# depend on $(top_srcdir) -+my $am_config_rt_aux_dir = ''; - - # Directory to search for AC_LIBSOURCE files, as set by AC_CONFIG_LIBOBJ_DIR - # in configure.ac. -@@ -4917,7 +4920,7 @@ sub handle_per_suffix_test - { - require_conf_file ("parallel-tests", FOREIGN, 'test-driver'); - define_variable ("${pfx}LOG_DRIVER", -- "\$(SHELL) $am_config_aux_dir/test-driver", -+ "\$(SHELL) $am_config_rt_aux_dir/test-driver", - INTERNAL); - } - my $driver = '$(' . $pfx . 'LOG_DRIVER)'; -@@ -7554,6 +7557,10 @@ sub locate_aux_dir () - $am_config_aux_dir = - '$(top_srcdir)' . ($config_aux_dir eq '.' ? "" : "/$config_aux_dir"); - $am_config_aux_dir =~ s,/*$,,; -+ -+ $am_config_rt_aux_dir = -+ '$(top_builddir)' . ($config_aux_dir eq '.' ? "" : "/$config_aux_dir"); -+ $am_config_rt_aux_dir =~ s,/*$,,; - } - - --- -2.39.2 -
meta/recipes-devtools/automake/automake_1.17.bb +0 -1
@@ -23,7 +23,6 @@ SRC_URI += "\ file://0002-automake-Update-for-python.m4-to-respect-libdir.patch \ file://0003-build-fix-race-in-parallel-builds.patch \ file://0004-Add-a-new-distro-feature-ptest.patch \ - file://0005-Set-relative-to-top_builddir-path-in-Makefile-to-acc.patch \ file://0006-automake-Remove-delays-in-configure-scripts-using-au.patch \ "
Signature · 1 line
2.39.5
Thanks, this seems reasonable.
Alex
Quoted 62 lines · Ola x Nilsson via lists.openembedded.org
From: Ola x Nilsson <[email protected]>
Fixes [YOCTO #15635]
The automake patch
"Set relative totop_builddirpath inMakefileto access" sets the default path oftest-driverto$(top_builddir)/$(config_aux_dir)instead of the normal$(top_srcdir)/$(config_aux_dir).This breaks
check testfor Automake projects in generated images.To reproduce, use core-image-kernel-dev with git added.
git clone https://git.kernel.org/pub/scm/linux/kernel/git/kay/libabc.git
(cd libabc && ./autogen.sh)
mkdir build
cd build
../libabc/configure CFLAGS='-g -O0' --prefix=/usr --sysconfdir=/etc --libdir=/usr/lib make check
/bin/sh: ./build-aux/test-driver: No such file or directoryRemoving the patch makes the checks complete successfully.
Some ptests depend on this patch to find test-driver. They need to be addressed individually. In all cases I've found so far this is just another sed substitution and should work even before removing the patch.
I have not verified the ptests in meta-openembedded yet, but I'm working on it.
Ola x Nilsson (5):
attr: Fix the ptest path to test-driver
sed: Fix the ptest path to test-driver
parted: Fix the ptest path to test-driver
strace: Fix the ptest path to test-driver
automake: Remove patch that changes path to test-driver...top_builddir-path-in-Makefile-to-acc.patch | 50 ------------------- .../automake/automake_1.17.bb | 1 - meta/recipes-devtools/strace/strace_6.11.bb | 4 +- meta/recipes-extended/parted/parted_3.6.bb | 16 +++--- meta/recipes-extended/sed/sed_4.9.bb | 1 + meta/recipes-support/attr/attr.inc | 11 ++-- 6 files changed, 20 insertions(+), 63 deletions(-) delete mode 100644 meta/recipes-devtools/automake/automake/0005-Set-relative-to-top_builddir-path-in-Makefile-to-acc.patch--
2.39.5-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#206937): https://lists.openembedded.org/g/openembedded-core/message/206937
Mute This Topic: https://lists.openembedded.org/mt/109511699/1686489
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-