coreutils: Fix issues for ptest + single-binary
cover coreutils: Fix issues for ptest + single-binary
From: Robert Yang <[email protected]>
The following changes since commit c695edcc33ecd5bc01b5fc91ce08a87475a9ace9:
linux/cve-exclusion: Update exclusions after kernel update (2025-05-13 10:32:39 +0100)
are available in the Git repository at:
https://github.com/robertlinux/yocto rbt/cu
https://github.com/robertlinux/yocto/tree/rbt/cu
Robert Yang (2):
coreutils: Fix file-rdeps for single-binary
coreutils: Drop 0001-local.mk-fix-cross-compiling-problem.patch
...local.mk-fix-cross-compiling-problem.patch | 26 ------------------- meta/recipes-core/coreutils/coreutils_9.6.bb | 12 ++++++--- 2 files changed, 8 insertions(+), 30 deletions(-) delete mode 100644 meta/recipes-core/coreutils/coreutils/0001-local.mk-fix-cross-compiling-problem.patch
Signature · 1 line
2.49.0
PATCH 1/2 coreutils: Fix file-rdeps for single-binary
From: Robert Yang <[email protected]>
Fixed:
DISTRO_FEATURES:append = " ptest" PACKAGECONFIG:append:pn-coreutils = " single-binary"
$ bitbake coreutils ERROR: coreutils-9.6-r0 do_package_qa: QA Issue: /usr/lib/coreutils/ptest/src/yes contained in package coreutils-ptest requires /path/to//tmp/work/core2-64-poky-linux/coreutils/9.6/build/src/coreutils, but no providers found in RDEPENDS:coreutils-ptest? [file-rdeps]
--- meta/recipes-core/coreutils/coreutils_9.6.bb | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
meta/recipes-core/coreutils/coreutils_9.6.bb +8 -1
@@ -211,7 +211,14 @@ do_install_ptest () { # Tweak test d_type-check to use python3 instead of python sed -i "1s@.*@#!/usr/bin/python3@" ${D}${PTEST_PATH}/tests/d_type-check - + + # Fix for single-binary + for prog in ${D}${PTEST_PATH}/src/*; do + if [ -f $prog ]; then + sed -i "1s@#!.*/src/coreutils @#!/usr/bin/coreutils @" $prog + fi + done + # handle multilib sed -i s:@libdir@:${libdir}:g ${D}${PTEST_PATH}/run-ptest }
Signature · 1 line
2.49.0
RE: [OE-core] [PATCH 1/2] coreutils: Fix file-rdeps for single-binary
Quoted 34 lines
-----Original Message-----
From: [email protected] <openembedded- [email protected]> On Behalf Of Robert Yang via lists.openembedded.org
Sent: Wednesday, May 14, 2025 9:17
To: [email protected]
Cc: [email protected]
Subject: [OE-core] [PATCH 1/2] coreutils: Fix file-rdeps for single-binaryFrom: Robert Yang <[email protected]>
Fixed:
DISTRO_FEATURES:append = " ptest" PACKAGECONFIG:append:pn-coreutils = " single-binary"$ bitbake coreutils ERROR: coreutils-9.6-r0 do_package_qa: QA Issue: /usr/lib/coreutils/ptest/src/yes contained in package coreutils-ptest requires /path/to//tmp/work/core2-64-poky- linux/coreutils/9.6/build/src/coreutils, but no providers found in RDEPENDS:coreutils-ptest? [file-rdeps]Signed-off-by Robert Yang <[email protected]>--- meta/recipes-core/coreutils/coreutils_9.6.bb | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)meta/recipes- renamed from meta/recipes-core/coreutils/coreutils_9.6.bb +0
-0core/coreutils/coreutils_9.6.bb
index6e1867f3e4..c9fd3719d5100644
meta/recipes-core/coreutils/coreutils_9.6.bb do_install_ptest () { · line 218
Quoted 9 lines
meta/recipes-core/coreutils/coreutils_9.6.bb +5
-1@@ -211,7 +211,14 @@ do_install_ptest () { # Tweak test d_type-check to use python3 instead of python sed -i "1s@.*@#!/usr/bin/python3@" ${D}${PTEST_PATH}/tests/d_type-check - + + # Fix for single-binary + for prog in ${D}${PTEST_PATH}/src/*; do + if [ -f $prog ]; then + sed -i "1s@#!.*/src/coreutils @#!/usr/bin/coreutils @" $prog
This should have ${bindir} instead of hardcoded /usr/bin
Quoted 8 lines
meta/recipes-core/coreutils/coreutils_9.6.bb +3
-1+ fi + done + # handle multilib sed -i s:@libdir@:${libdir}:g ${D}${PTEST_PATH}/run-ptest } --2.49.0
Re: [OE-core] [PATCH 1/2] coreutils: Fix file-rdeps for single-binary
Quoted 35 lines · Peter
Quoted 35 lines
-----Original Message-----
From: [email protected] <openembedded- [email protected]> On Behalf Of Robert Yang via lists.openembedded.org
Sent: Wednesday, May 14, 2025 9:17
To: [email protected]
Cc: [email protected]
Subject: [OE-core] [PATCH 1/2] coreutils: Fix file-rdeps for single-binaryFrom: Robert Yang <[email protected]>
Fixed:
DISTRO_FEATURES:append = " ptest" PACKAGECONFIG:append:pn-coreutils = " single-binary"$ bitbake coreutils ERROR: coreutils-9.6-r0 do_package_qa: QA Issue: /usr/lib/coreutils/ptest/src/yes contained in package coreutils-ptest requires /path/to//tmp/work/core2-64-poky- linux/coreutils/9.6/build/src/coreutils, but no providers found in RDEPENDS:coreutils-ptest? [file-rdeps]Signed-off-by Robert Yang <[email protected]>--- meta/recipes-core/coreutils/coreutils_9.6.bb | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)meta/recipes- renamed from meta/recipes-core/coreutils/coreutils_9.6.bb +0
-0core/coreutils/coreutils_9.6.bb
index6e1867f3e4..c9fd3719d5100644meta/recipes-core/coreutils/coreutils_9.6.bb +0
-0@@ -211,7 +211,14 @@ do_install_ptest () {
Quoted 10 lines
meta/recipes-core/coreutils/coreutils_9.6.bb do_install_ptest () { · line 218
Quoted 8 lines
meta/recipes-core/coreutils/coreutils_9.6.bb +5
-1# Tweak test d_type-check to use python3 instead of python sed -i "1s@.*@#!/usr/bin/python3@" ${D}${PTEST_PATH}/tests/d_type-check - + + # Fix for single-binary + for prog in ${D}${PTEST_PATH}/src/*; do + if [ -f $prog ]; then + sed -i "1s@#!.*/src/coreutils @#!/usr/bin/coreutils @" $progThis should have ${bindir} instead of hardcoded
/usr/bin
Yes, you're right, fixed in the PULL:
+ # Fix for single-binary
+ for prog in ${D}${PTEST_PATH}/src/*; do
+ if [ -f $prog ]; then
+ sed -i "1s@#!.*/src/coreutils @#!${bindir}/coreutils @" $prog
+ fi
+ done
https://github.com/robertlinux/yocto rbt/cu
https://github.com/robertlinux/yocto/tree/rbt/cu
Robert Yang (2):
coreutils: Fix file-rdeps for single-binary
coreutils: Drop 0001-local.mk-fix-cross-compiling-problem.patch
// Robert
Quoted 10 lines
Quoted 9 lines
meta/recipes-core/coreutils/coreutils_9.6.bb +3
-1+ fi + done + # handle multilib sed -i s:@libdir@:${libdir}:g ${D}${PTEST_PATH}/run-ptest } --2.49.0
Re: [OE-core] [PATCH 1/2] coreutils: Fix file-rdeps for single-binary
Quoted 62 lines · Robert Yang via lists.openembedded.org
Quoted 35 lines · Peter
Quoted 35 lines
-----Original Message-----
From: [email protected] <openembedded- [email protected]> On Behalf Of Robert Yang via lists.openembedded.org
Sent: Wednesday, May 14, 2025 9:17
To: [email protected]
Cc: [email protected]
Subject: [OE-core] [PATCH 1/2] coreutils: Fix file-rdeps for single-binaryFrom: Robert Yang <[email protected]>
Fixed:
DISTRO_FEATURES:append = " ptest" PACKAGECONFIG:append:pn-coreutils = " single-binary"$ bitbake coreutils ERROR: coreutils-9.6-r0 do_package_qa: QA Issue: /usr/lib/coreutils/ptest/src/yes contained in package coreutils-ptest requires /path/to//tmp/work/core2-64-poky- linux/coreutils/9.6/build/src/coreutils, but no providers found in RDEPENDS:coreutils-ptest? [file-rdeps]Signed-off-by Robert Yang <[email protected]>---
meta/recipes-core/coreutils/coreutils_9.6.bb | 9 ++++++++-1 file changed, 8 insertions(+), 1 deletion(-)meta/recipes- renamed from meta/recipes-core/coreutils/coreutils_9.6.bb +0
-0core/coreutils/coreutils_9.6.bb
index6e1867f3e4..c9fd3719d5100644meta/recipes-core/coreutils/coreutils_9.6.bb +0
-0@@ -211,7 +211,14 @@ do_install_ptest () {Quoted 11 lines
Quoted 9 lines
meta/recipes-core/coreutils/coreutils_9.6.bb +0
-0# Tweak test d_type-check to use python3 instead of pythonsed -i "1s@.*@#!/usr/bin/python3@" ${D}${PTEST_PATH}/tests/d_type-check
meta/recipes-core/coreutils/coreutils_9.6.bb +5
-1- + + # Fix for single-binary + for prog in ${D}${PTEST_PATH}/src/*; do + if [ -f $prog ]; then + sed -i "1s@#!.*/src/coreutils @#!/usr/bin/coreutils @"$prog
This should have ${bindir} instead of hardcoded
/usr/binYes, you're right, fixed in the PULL:
+ # Fix for single-binary
+ for prog in ${D}${PTEST_PATH}/src/*; do
+ if [ -f $prog ]; then
+ sed -i "1s@#!.*/src/coreutils @#!${bindir}/coreutils @" $prog
+ fi
+ done
Quoted 8 lines
https://github.com/robertlinux/yocto rbt/cu
https://github.com/robertlinux/yocto/tree/rbt/cuRobert Yang (2):
coreutils: Fix file-rdeps for single-binary
coreutils: Drop 0001-local.mk-fix-cross-compiling-problem.patch// Robert
See the thread from Ovidiu:
https://lists.openembedded.org/g/openembedded-core/message/216382
where he took a similar approach and I asked for some comments and rather than using sed, changing the build-aux/gen-single-binary.sh script
or using coreutils' configure option that can generate symlinks:
--enable-single-binary=shebangs|symlinks
../Randy
Quoted 21 lines
Quoted 11 lines
Quoted 10 lines
+ fi
+ done
+# handle multilib sed -i s:@libdir@:${libdir}:g ${D}${PTEST_PATH}/run-ptest }Signature · 1 line
2.49.0pLK@tY:ATbOf1"dW
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#216487):https://lists.openembedded.org/g/openembedded-core/message/216487 Mute This Topic:https://lists.openembedded.org/mt/113104706/3616765
Group Owner:[email protected] Unsubscribe:https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Signature · 2 lines
# Randy MacLeod # Wind River Linux
Re: [OE-core] [PATCH 1/2] coreutils: Fix file-rdeps for single-binary
In reply to Robert YangHi Robert,
Quoted 15 lines · Robert Yang via lists.openembedded.org
Quoted 15 lines
-----Original Message-----
Quoted 14 lines
From: [email protected] <openembedded- [email protected]> On Behalf Of Robert Yang via lists.openembedded.org
Sent: Wednesday, May 14, 2025 9:17
To: [email protected]
Cc: [email protected]
Subject: [OE-core] [PATCH 1/2] coreutils: Fix file-rdeps for single-binaryFrom: Robert Yang <[email protected]>
Fixed:
DISTRO_FEATURES:append = " ptest" PACKAGECONFIG:append:pn-coreutils = " single-binary"
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
$ bitbake coreutils ERROR: coreutils-9.6-r0 do_package_qa: QA Issue: /usr/lib/coreutils/ptest/src/yes contained in package coreutils-ptest requires /path/to//tmp/work/core2-64-poky- linux/coreutils/9.6/build/src/coreutils, but no providers found in RDEPENDS:coreutils-ptest? [file-rdeps]
I noticed that this patch was merged. It fixes the coreutils-ptest build itself, but the sdk fails to build with this simple setup:
local.conf:
DISTRO_FEATURES:append = " ptest" PACKAGECONFIG:append:pn-coreutils = " single-binary" IMAGE_INSTALL:append = " coreutils coreutils-ptest"
bitbake core-image-minimal -c populate_sdk
...
Added oe-repo repo from tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0/oe-sdk-repo
User-Agent: falling back to 'libdnf': could not detect OS or basearch
repo: using cache for: oe-repo
oe-repo: using metadata from Tue 20 May 2025 07:24:39 AM UTC.
Last metadata expiration check: 0:00:01 ago on Tue 20 May 2025 08:25:20 AM UTC.
--> Starting dependency resolution
--> Finished dependency resolution
Error:
Problem: package target-sdk-provides-dummy-1.0-r0.sdk_provides_dummy_target from oe-repo conflicts with coreutils provided by coreutils-9.6-r0.core2_64 from oe-repo
- package target-sdk-provides-dummy-1.0-r0.sdk_provides_dummy_target from oe-repo conflicts with /usr/bin/env provided by coreutils-9.6-r0.core2_64 from oe-repo
- package target-sdk-provides-dummy-1.0-r0.sdk_provides_dummy_target from oe-repo obsoletes coreutils provided by coreutils-9.6-r0.core2_64 from oe-repo
- package coreutils-ptest-9.6-r0.core2_64 from oe-repo requires /usr/bin/coreutils, but none of the providers can be installed
- conflicting requests
(try to add '--allowerasing' to command line to replace conflicting packages or '--skip-broken' to skip uninstallable packages)
Replacing the hardcoded /usr/bin/coreutils shebangs with "/usr/bin/env coreutils -S" seems to fix this.
Thanks,
Ovidiu
PATCH 2/2 coreutils: Drop 0001-local.mk-fix-cross-compiling-problem.patch
In reply to [email protected]From: Robert Yang <[email protected]>
The patch is used for fixing:
| Makefile:3418: *** Recursive variable 'INSTALL' references itself (eventually). Stop.
Now the code and check and set that correctly:
if CROSS_COMPILINGcu_install_program = @INSTALL@
elsecu_install_program = src/ginstall
endif
So just drop the patch.
And also remove the ginstall hack to fix ptest case failure when single-binary is enabled, I can't find the reason on why it was needed from git log.
Fixed:
install: missing file operand
Try 'install --help' for more information.
* Reproducer:
DISTRO_FEATURES:append = " ptest" EXTRA_IMAGE_FEATURES:append = " ptest-pkgs" IMAGE_INSTALL:append = " coreutils" PACKAGECONFIG:append:pn-coreutils = " single-binary"
$ bitbake core-image-sato $ runqemu tmp/deploy/images/qemux86-64/ nographic kvm
On target:
$ cd /usr/lib/coreutils/ptest $ ./run-ptest ============================================================================ Testsuite summary for GNU coreutils 9.6 ============================================================================ TOTAL: 655 PASS: 529 SKIP: 126 XFAIL: 0 FAIL: 0 XPASS: 0 ERROR: 0 ============================================================================ make[1]: Leaving directory '/usr/lib/coreutils/ptest'
--- ...local.mk-fix-cross-compiling-problem.patch | 26 ------------------- meta/recipes-core/coreutils/coreutils_9.6.bb | 3 --- 2 files changed, 29 deletions(-) delete mode 100644 meta/recipes-core/coreutils/coreutils/0001-local.mk-fix-cross-compiling-problem.patch
meta/recipes-core/coreutils/coreutils/0001-local.mk-fix-cross-compiling-problem.patch deleted +0 -26
@@ -1,26 +0,0 @@ -From 7cb2d20cfa2a27191255031d231cd41917dcffe8 Mon Sep 17 00:00:00 2001 -From: Chen Qi <[email protected]> -Date: Mon, 26 Dec 2016 16:10:35 +0800 -Subject: [PATCH] local.mk: fix cross compiling problem - -We meet the following error when cross compiling. -| Makefile:3418: *** Recursive variable 'INSTALL' references itself (eventually). Stop. -This patch fixes this problem. - -Upstream-Status: Pending - -Signed-off-by: Chen Qi <[email protected]> ---- - src/local.mk | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/local.mk b/src/local.mk -index 96ee941..cdd47d6 100644 ---- a/src/local.mk -+++ b/src/local.mk -@@ -704,4 +704,4 @@ cu_install_program = @INSTALL@ - else - cu_install_program = src/ginstall - endif --INSTALL = $(cu_install_program) -c -+INSTALL_PROGRAM = $(cu_install_program)
meta/recipes-core/coreutils/coreutils_9.6.bb +0 -3
@@ -15,7 +15,6 @@ inherit autotools gettext texinfo SRC_URI = "${GNU_MIRROR}/coreutils/${BP}.tar.xz \ file://remove-usr-local-lib-from-m4.patch \ - file://0001-local.mk-fix-cross-compiling-problem.patch \ file://intermittent-testfailure.patch \ file://0001-ls-fix-crash-with-context.patch \ file://0001-cksum-port-to-32-bit-uint_fast32_t.patch \
@@ -184,7 +183,6 @@ RRECOMMENDS:${PN}-dev += "${DEVDEPS}" do_install_ptest () { install -d ${D}${PTEST_PATH}/tests cp -r ${S}/tests/* ${D}${PTEST_PATH}/tests - sed -i 's/ginstall/install/g' `grep -R ginstall ${D}${PTEST_PATH}/tests | awk -F: '{print $1}' | uniq` install -d ${D}${PTEST_PATH}/build-aux install ${S}/build-aux/test-driver ${D}${PTEST_PATH}/build-aux/ install -Dm 0644 ${B}/lib/config.h ${D}${PTEST_PATH}/lib/config.h
@@ -198,7 +196,6 @@ do_install_ptest () { sed -i '/^abs_srcdir/s/= .*$/= \$\{PWD\}/g' ${D}${PTEST_PATH}/Makefile sed -i '/^abs_top_builddir/s/= .*$/= \$\{PWD\}/g' ${D}${PTEST_PATH}/Makefile sed -i '/^abs_top_srcdir/s/= .*$/= \$\{PWD\}/g' ${D}${PTEST_PATH}/Makefile - sed -i '/^built_programs/s/ginstall/install/g' ${D}${PTEST_PATH}/Makefile sed -i '/^CC =/s/ --sysroot=.*recipe-sysroot/ /g' ${D}${PTEST_PATH}/Makefile sed -i '/^BUILD_LDFLAGS =/d' ${D}${PTEST_PATH}/Makefile chmod -R 777 ${D}${PTEST_PATH}
Signature · 1 line
2.49.0