diff mbox series

[2/3] bitbake.conf: add getopt to HOSTTOOLS

Message ID 20240902094117.31156-3-mikko.rapeli@linaro.org
State New
Headers show
Series systemd uki support | expand

Commit Message

Mikko Rapeli Sept. 2, 2024, 9:41 a.m. UTC
Needed by systemd-tools-native

Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org>
---
 meta/conf/bitbake.conf | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Peter Kjellerstedt Sept. 2, 2024, 10:09 a.m. UTC | #1
> -----Original Message-----
> From: openembedded-core@lists.openembedded.org <openembedded-core@lists.openembedded.org> On Behalf Of Mikko Rapeli
> Sent: den 2 september 2024 11:41
> To: openembedded-core@lists.openembedded.org
> Cc: Mikko Rapeli <mikko.rapeli@linaro.org>
> Subject: [OE-core] [PATCH 2/3] bitbake.conf: add getopt to HOSTTOOLS

You are adding getent, not getopt.

> 
> Needed by systemd-tools-native
> 
> Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org>
> ---
>  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 d8252c5b82..a8c630e7f8 100644
> --- a/meta/conf/bitbake.conf
> +++ b/meta/conf/bitbake.conf
> @@ -511,7 +511,7 @@ HOSTTOOLS_DIR = "${TMPDIR}/hosttools"
>  HOSTTOOLS += " \
>      [ ar as awk basename bash bunzip2 bzip2 cat chgrp chmod chown chrpath cmp comm cp cpio \
>      cpp cut date dd diff diffstat dirname du echo egrep env expand expr false \
> -    fgrep file find flock g++ gawk gcc getconf getopt git grep gunzip gzip \
> +    fgrep file find flock g++ gawk getent gcc getconf getopt git grep gunzip gzip \

Keep the commands sorted.

>      head hostname iconv id install ld ldd ln ls lz4c make md5sum mkdir mkfifo mknod \
>      mktemp mv nm objcopy objdump od patch perl pr printf pwd \
>      python3 pzstd ranlib readelf readlink realpath rm rmdir rpcgen sed seq sh \
> --
> 2.34.1

//Peter
Alexander Kanavin Sept. 2, 2024, 10:15 a.m. UTC | #2
Also, can't this be supplied with DEPENDS? Adding to HOSTTOOLS to
cater to needs of a single recipe is not a good thing.

Alex

On Mon, 2 Sept 2024 at 12:10, Peter Kjellerstedt via
lists.openembedded.org
<peter.kjellerstedt=axis.com@lists.openembedded.org> wrote:
>
> > -----Original Message-----
> > From: openembedded-core@lists.openembedded.org <openembedded-core@lists.openembedded.org> On Behalf Of Mikko Rapeli
> > Sent: den 2 september 2024 11:41
> > To: openembedded-core@lists.openembedded.org
> > Cc: Mikko Rapeli <mikko.rapeli@linaro.org>
> > Subject: [OE-core] [PATCH 2/3] bitbake.conf: add getopt to HOSTTOOLS
>
> You are adding getent, not getopt.
>
> >
> > Needed by systemd-tools-native
> >
> > Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org>
> > ---
> >  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 d8252c5b82..a8c630e7f8 100644
> > --- a/meta/conf/bitbake.conf
> > +++ b/meta/conf/bitbake.conf
> > @@ -511,7 +511,7 @@ HOSTTOOLS_DIR = "${TMPDIR}/hosttools"
> >  HOSTTOOLS += " \
> >      [ ar as awk basename bash bunzip2 bzip2 cat chgrp chmod chown chrpath cmp comm cp cpio \
> >      cpp cut date dd diff diffstat dirname du echo egrep env expand expr false \
> > -    fgrep file find flock g++ gawk gcc getconf getopt git grep gunzip gzip \
> > +    fgrep file find flock g++ gawk getent gcc getconf getopt git grep gunzip gzip \
>
> Keep the commands sorted.
>
> >      head hostname iconv id install ld ldd ln ls lz4c make md5sum mkdir mkfifo mknod \
> >      mktemp mv nm objcopy objdump od patch perl pr printf pwd \
> >      python3 pzstd ranlib readelf readlink realpath rm rmdir rpcgen sed seq sh \
> > --
> > 2.34.1
>
> //Peter
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#204070): https://lists.openembedded.org/g/openembedded-core/message/204070
> Mute This Topic: https://lists.openembedded.org/mt/108223986/1686489
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [alex.kanavin@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
Mikko Rapeli Sept. 2, 2024, 10:15 a.m. UTC | #3
Hi,

On Mon, Sep 02, 2024 at 10:09:54AM +0000, Peter Kjellerstedt wrote:
> > -----Original Message-----
> > From: openembedded-core@lists.openembedded.org <openembedded-core@lists.openembedded.org> On Behalf Of Mikko Rapeli
> > Sent: den 2 september 2024 11:41
> > To: openembedded-core@lists.openembedded.org
> > Cc: Mikko Rapeli <mikko.rapeli@linaro.org>
> > Subject: [OE-core] [PATCH 2/3] bitbake.conf: add getopt to HOSTTOOLS
> 
> You are adding getent, not getopt.

Thanks, can't even blame autocorrect...

Cheers,

-Mikko

> > Needed by systemd-tools-native
> > 
> > Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org>
> > ---
> >  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 d8252c5b82..a8c630e7f8 100644
> > --- a/meta/conf/bitbake.conf
> > +++ b/meta/conf/bitbake.conf
> > @@ -511,7 +511,7 @@ HOSTTOOLS_DIR = "${TMPDIR}/hosttools"
> >  HOSTTOOLS += " \
> >      [ ar as awk basename bash bunzip2 bzip2 cat chgrp chmod chown chrpath cmp comm cp cpio \
> >      cpp cut date dd diff diffstat dirname du echo egrep env expand expr false \
> > -    fgrep file find flock g++ gawk gcc getconf getopt git grep gunzip gzip \
> > +    fgrep file find flock g++ gawk getent gcc getconf getopt git grep gunzip gzip \
> 
> Keep the commands sorted.
> 
> >      head hostname iconv id install ld ldd ln ls lz4c make md5sum mkdir mkfifo mknod \
> >      mktemp mv nm objcopy objdump od patch perl pr printf pwd \
> >      python3 pzstd ranlib readelf readlink realpath rm rmdir rpcgen sed seq sh \
> > --
> > 2.34.1
> 
> //Peter
>
Mikko Rapeli Sept. 2, 2024, 10:27 a.m. UTC | #4
Hi,

On Mon, Sep 02, 2024 at 12:15:02PM +0200, Alexander Kanavin wrote:
> Also, can't this be supplied with DEPENDS? Adding to HOSTTOOLS to
> cater to needs of a single recipe is not a good thing.

On Debian/Ubuntu getent is part of libc-bin package which is marked
essential so installed basically everywhere by default. The systemd
side meson build script was failing without it. I can try to check
if there some config etc way to disable the dependency.

Or if this causes problems then I can move this to "usage instructions"
of ukify.bbclass.

Cheers,

-Mikko
Alexander Kanavin Sept. 2, 2024, 10:34 a.m. UTC | #5
On Mon, 2 Sept 2024 at 12:27, Mikko Rapeli <mikko.rapeli@linaro.org> wrote:
> On Debian/Ubuntu getent is part of libc-bin package which is marked
> essential so installed basically everywhere by default. The systemd
> side meson build script was failing without it. I can try to check
> if there some config etc way to disable the dependency.
>
> Or if this causes problems then I can move this to "usage instructions"
> of ukify.bbclass.

getent is obtaining host-specific information and before we even allow
it, it would be good to know how and why it's used in the build. Would
it result in host contamination?

I'm also curious to know why we even need to run the build process, if
do_install only copies a script out of ${S}? I guess all these points
should be addressed when you switch over to existing recipe (which
indeed is only a trivial script copy).

Alex
Mikko Rapeli Sept. 2, 2024, 10:35 a.m. UTC | #6
Hi,

On Mon, Sep 02, 2024 at 01:27:05PM +0300, Mikko Rapeli via lists.openembedded.org wrote:
> Hi,
> 
> On Mon, Sep 02, 2024 at 12:15:02PM +0200, Alexander Kanavin wrote:
> > Also, can't this be supplied with DEPENDS? Adding to HOSTTOOLS to
> > cater to needs of a single recipe is not a good thing.
> 
> On Debian/Ubuntu getent is part of libc-bin package which is marked
> essential so installed basically everywhere by default. The systemd
> side meson build script was failing without it. I can try to check
> if there some config etc way to disable the dependency.
> 
> Or if this causes problems then I can move this to "usage instructions"
> of ukify.bbclass.

Dropping systemd-tools-native change since systemd-boot-native already provides
the ukify script and doesn't call into meson so this patch is not needed
afterall.

Cheers,

-Mikko
diff mbox series

Patch

diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index d8252c5b82..a8c630e7f8 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -511,7 +511,7 @@  HOSTTOOLS_DIR = "${TMPDIR}/hosttools"
 HOSTTOOLS += " \
     [ ar as awk basename bash bunzip2 bzip2 cat chgrp chmod chown chrpath cmp comm cp cpio \
     cpp cut date dd diff diffstat dirname du echo egrep env expand expr false \
-    fgrep file find flock g++ gawk gcc getconf getopt git grep gunzip gzip \
+    fgrep file find flock g++ gawk getent gcc getconf getopt git grep gunzip gzip \
     head hostname iconv id install ld ldd ln ls lz4c make md5sum mkdir mkfifo mknod \
     mktemp mv nm objcopy objdump od patch perl pr printf pwd \
     python3 pzstd ranlib readelf readlink realpath rm rmdir rpcgen sed seq sh \