diff mbox series

bitbake.conf: add "xz" to HOSTTOOLS

Message ID 20230503095239.2487980-1-michael.opdenacker@bootlin.com
State New
Headers show
Series bitbake.conf: add "xz" to HOSTTOOLS | expand

Commit Message

Michael Opdenacker May 3, 2023, 9:52 a.m. UTC
From: Michael Opdenacker <michael.opdenacker@bootlin.com>

xz is necessary to extract the uninative binary shims

Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
---
 meta/conf/bitbake.conf | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Richard Purdie May 3, 2023, 10:47 a.m. UTC | #1
On Wed, 2023-05-03 at 11:52 +0200, Michael Opdenacker via
lists.openembedded.org wrote:
> From: Michael Opdenacker <michael.opdenacker@bootlin.com>
> 
> xz is necessary to extract the uninative binary shims
> 
> Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
> ---
>  meta/conf/bitbake.conf | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
> index afd9e2f552..2a6aefc01a 100644
> --- a/meta/conf/bitbake.conf
> +++ b/meta/conf/bitbake.conf
> @@ -529,7 +529,7 @@ HOSTTOOLS += " \
>      python3 pzstd ranlib readelf readlink realpath rm rmdir rpcgen sed seq sh \
>      sha1sum sha224sum sha256sum sha384sum sha512sum \
>      sleep sort split stat strings strip tail tar tee test touch tr true uname \
> -    uniq wc wget which xargs zstd \
> +    uniq wc wget which xargs xz zstd \
>  "
>  
>  # Tools needed to run testimage runtime image testing

I don't quite understand, how is this working today without this?

Cheers,

Richard
Michael Opdenacker May 3, 2023, 12:39 p.m. UTC | #2
On 03.05.23 at 12:47, Richard Purdie wrote:
> On Wed, 2023-05-03 at 11:52 +0200, Michael Opdenacker via
> lists.openembedded.org wrote:
>> From: Michael Opdenacker <michael.opdenacker@bootlin.com>
>>
>> xz is necessary to extract the uninative binary shims
>>
>> Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
>> ---
>>   meta/conf/bitbake.conf | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
>> index afd9e2f552..2a6aefc01a 100644
>> --- a/meta/conf/bitbake.conf
>> +++ b/meta/conf/bitbake.conf
>> @@ -529,7 +529,7 @@ HOSTTOOLS += " \
>>       python3 pzstd ranlib readelf readlink realpath rm rmdir rpcgen sed seq sh \
>>       sha1sum sha224sum sha256sum sha384sum sha512sum \
>>       sleep sort split stat strings strip tail tar tee test touch tr true uname \
>> -    uniq wc wget which xargs zstd \
>> +    uniq wc wget which xargs xz zstd \
>>   "
>>   
>>   # Tools needed to run testimage runtime image testing
> I don't quite understand, how is this working today without this?


At least on Ubuntu, the "xz-utils" package is pulled by 
"build-essential", so everyone on Ubuntu always has "xz".

Then, we I ran my tests on a fresh Fedora container, bitbake didn't warn 
me but "xz" was missing, but this prevented the uninative shim from 
being installed. It seems that at least on Fedora, "xz" isn't pulled by 
the other host tools we install.

I guess most people has "xz" anyway, which could explain why this wasn't 
reported before.

By the way, just wondering... What do we need "perl" for ?

Cheers
Michael.
Alexander Kanavin May 3, 2023, 12:42 p.m. UTC | #3
On Wed, 3 May 2023 at 14:39, Michael Opdenacker via
lists.openembedded.org
<michael.opdenacker=bootlin.com@lists.openembedded.org> wrote:
> Then, we I ran my tests on a fresh Fedora container, bitbake didn't warn
> me but "xz" was missing, but this prevented the uninative shim from
> being installed. It seems that at least on Fedora, "xz" isn't pulled by
> the other host tools we install.
>
> I guess most people has "xz" anyway, which could explain why this wasn't
> reported before.

HOSTTOOLS is used to filter tools from the host in $PATH, at least in
bitbake tasks, so is uninative extractor bypassing that somehow then?

Alex
Richard Purdie May 3, 2023, 1:24 p.m. UTC | #4
On Wed, 2023-05-03 at 14:42 +0200, Alexander Kanavin wrote:
> On Wed, 3 May 2023 at 14:39, Michael Opdenacker via
> lists.openembedded.org
> <michael.opdenacker=bootlin.com@lists.openembedded.org> wrote:
> > Then, we I ran my tests on a fresh Fedora container, bitbake didn't warn
> > me but "xz" was missing, but this prevented the uninative shim from
> > being installed. It seems that at least on Fedora, "xz" isn't pulled by
> > the other host tools we install.
> > 
> > I guess most people has "xz" anyway, which could explain why this wasn't
> > reported before.
> 
> HOSTTOOLS is used to filter tools from the host in $PATH, at least in
> bitbake tasks, so is uninative extractor bypassing that somehow then?

The uninative code calls tar from the host. It then probably depends
upon how tar has been configured and whether it calls xz or uses a
library?

I'm guessing in the context of uninative, PATH hasn't been locked down
yet.

I think we probably should add xz to HOSTTOOLS at this point but it
probably does also mean we should change ASSUME_PROVIDED and there are
some things with an xz dependency which will need to use xz-
replacement-native since they probably need library components and not
just xz itself.

Cheers,

Richard
diff mbox series

Patch

diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index afd9e2f552..2a6aefc01a 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -529,7 +529,7 @@  HOSTTOOLS += " \
     python3 pzstd ranlib readelf readlink realpath rm rmdir rpcgen sed seq sh \
     sha1sum sha224sum sha256sum sha384sum sha512sum \
     sleep sort split stat strings strip tail tar tee test touch tr true uname \
-    uniq wc wget which xargs zstd \
+    uniq wc wget which xargs xz zstd \
 "
 
 # Tools needed to run testimage runtime image testing