diff mbox series

[1/2] coreutils: Fix file-rdeps for single-binary

Message ID 7d13d6ecafaaf0f06955156bcd9e19b61a92ea80.1747206852.git.liezhi.yang@windriver.com
State Accepted, archived
Commit 5174ec4a82a66b49ff7a8988ab52731b775bffb6
Headers show
Series [1/2] coreutils: Fix file-rdeps for single-binary | expand

Commit Message

Robert Yang May 14, 2025, 7:17 a.m. UTC
From: Robert Yang <liezhi.yang@windriver.com>

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 <liezhi.yang@windriver.com>
---
 meta/recipes-core/coreutils/coreutils_9.6.bb | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

Comments

Marko, Peter May 14, 2025, 7:25 a.m. UTC | #1
> -----Original Message-----
> From: openembedded-core@lists.openembedded.org <openembedded-
> core@lists.openembedded.org> On Behalf Of Robert Yang via
> lists.openembedded.org
> Sent: Wednesday, May 14, 2025 9:17
> To: openembedded-core@lists.openembedded.org
> Cc: liezhi.yang@windriver.com
> Subject: [OE-core] [PATCH 1/2] coreutils: Fix file-rdeps for single-binary
> 
> From: Robert Yang <liezhi.yang@windriver.com>
> 
> 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 <liezhi.yang@windriver.com>
> ---
>  meta/recipes-core/coreutils/coreutils_9.6.bb | 9 ++++++++-
>  1 file changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/meta/recipes-core/coreutils/coreutils_9.6.bb b/meta/recipes-
> core/coreutils/coreutils_9.6.bb
> index 6e1867f3e4..c9fd3719d5 100644
> --- a/meta/recipes-core/coreutils/coreutils_9.6.bb
> +++ b/meta/recipes-core/coreutils/coreutils_9.6.bb
> @@ -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

> +        fi
> +    done
> +
>      # handle multilib
>      sed -i s:@libdir@:${libdir}:g ${D}${PTEST_PATH}/run-ptest
>  }
> --
> 2.49.0
Robert Yang May 14, 2025, 8:41 a.m. UTC | #2
On 5/14/25 15:25, Marko, Peter wrote:
> 
> 
>> -----Original Message-----
>> From: openembedded-core@lists.openembedded.org <openembedded-
>> core@lists.openembedded.org> On Behalf Of Robert Yang via
>> lists.openembedded.org
>> Sent: Wednesday, May 14, 2025 9:17
>> To: openembedded-core@lists.openembedded.org
>> Cc: liezhi.yang@windriver.com
>> Subject: [OE-core] [PATCH 1/2] coreutils: Fix file-rdeps for single-binary
>>
>> From: Robert Yang <liezhi.yang@windriver.com>
>>
>> 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 <liezhi.yang@windriver.com>
>> ---
>>   meta/recipes-core/coreutils/coreutils_9.6.bb | 9 ++++++++-
>>   1 file changed, 8 insertions(+), 1 deletion(-)
>>
>> diff --git a/meta/recipes-core/coreutils/coreutils_9.6.bb b/meta/recipes-
>> core/coreutils/coreutils_9.6.bb
>> index 6e1867f3e4..c9fd3719d5 100644
>> --- a/meta/recipes-core/coreutils/coreutils_9.6.bb
>> +++ b/meta/recipes-core/coreutils/coreutils_9.6.bb
>> @@ -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

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

> 
>> +        fi
>> +    done
>> +
>>       # handle multilib
>>       sed -i s:@libdir@:${libdir}:g ${D}${PTEST_PATH}/run-ptest
>>   }
>> --
>> 2.49.0
>
Randy MacLeod May 16, 2025, 6:20 p.m. UTC | #3
On 2025-05-14 4:41 a.m., Robert Yang via lists.openembedded.org wrote:
>
>
> On 5/14/25 15:25, Marko, Peter wrote:
>>
>>
>>> -----Original Message-----
>>> From: openembedded-core@lists.openembedded.org <openembedded-
>>> core@lists.openembedded.org> On Behalf Of Robert Yang via
>>> lists.openembedded.org
>>> Sent: Wednesday, May 14, 2025 9:17
>>> To: openembedded-core@lists.openembedded.org
>>> Cc: liezhi.yang@windriver.com
>>> Subject: [OE-core] [PATCH 1/2] coreutils: Fix file-rdeps for 
>>> single-binary
>>>
>>> From: Robert Yang <liezhi.yang@windriver.com>
>>>
>>> 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 <liezhi.yang@windriver.com>
>>> ---
>>>   meta/recipes-core/coreutils/coreutils_9.6.bb | 9 ++++++++-
>>>   1 file changed, 8 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/meta/recipes-core/coreutils/coreutils_9.6.bb 
>>> b/meta/recipes-
>>> core/coreutils/coreutils_9.6.bb
>>> index 6e1867f3e4..c9fd3719d5 100644
>>> --- a/meta/recipes-core/coreutils/coreutils_9.6.bb
>>> +++ b/meta/recipes-core/coreutils/coreutils_9.6.bb
>>> @@ -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
>
> 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



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


>
>>
>>> +        fi
>>> +    done
>>> +
>>>       # handle multilib
>>>       sed -i s:@libdir@:${libdir}:g ${D}${PTEST_PATH}/run-ptest
>>>   }
>>> -- 
>>> 2.49.0
>>
> pLK@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:openembedded-core+owner@lists.openembedded.org
> Unsubscribe:https://lists.openembedded.org/g/openembedded-core/unsub [randy.macleod@windriver.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
diff mbox series

Patch

diff --git a/meta/recipes-core/coreutils/coreutils_9.6.bb b/meta/recipes-core/coreutils/coreutils_9.6.bb
index 6e1867f3e4..c9fd3719d5 100644
--- a/meta/recipes-core/coreutils/coreutils_9.6.bb
+++ b/meta/recipes-core/coreutils/coreutils_9.6.bb
@@ -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
 }