diff mbox series

[v2] bitbake.conf: Enable ipv6/acl/xattr for nativesdk

Message ID 20241106100957.2905277-1-richard.purdie@linuxfoundation.org
State Accepted, archived
Commit e86686cbdbaf5368fae0a490d52a043f8ed4fa0f
Headers show
Series [v2] bitbake.conf: Enable ipv6/acl/xattr for nativesdk | expand

Commit Message

Richard Purdie Nov. 6, 2024, 10:09 a.m. UTC
I was surprised to realise our buildtools doesn't support IPv6 which breaks
usage in our own autobuilder, let alone anywhere else.

Enable ipv6 in our SDKs and enable acl/xattr as well before we have the same
kind of issues with those, these features are now common on most linux systems
and we should be defaulting to including them.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
v2 - Handle mingw which doesn't support acl/attr

 meta/conf/bitbake.conf | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Peter Kjellerstedt Nov. 6, 2024, 10:39 p.m. UTC | #1
> -----Original Message-----
> From: openembedded-core@lists.openembedded.org <openembedded-core@lists.openembedded.org> On Behalf Of Richard Purdie
> Sent: den 6 november 2024 11:10
> To: openembedded-core@lists.openembedded.org
> Subject: [OE-core] [PATCH v2] bitbake.conf: Enable ipv6/acl/xattr for nativesdk
> 
> I was surprised to realise our buildtools doesn't support IPv6 which breaks
> usage in our own autobuilder, let alone anywhere else.
> 
> Enable ipv6 in our SDKs and enable acl/xattr as well before we have the same
> kind of issues with those, these features are now common on most linux systems
> and we should be defaulting to including them.
> 
> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
> ---
> v2 - Handle mingw which doesn't support acl/attr
> 
>  meta/conf/bitbake.conf | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
> index 14e761e2e7e..02bbf0e7a52 100644
> --- a/meta/conf/bitbake.conf
> +++ b/meta/conf/bitbake.conf
> @@ -916,7 +916,8 @@ IMAGE_FEATURES += "${EXTRA_IMAGE_FEATURES}"
>  # Native distro features (will always be used for -native, even if they
>  # are not enabled for target)
>  DISTRO_FEATURES_NATIVE ?= "acl x11 ipv6 xattr"
> -DISTRO_FEATURES_NATIVESDK ?= "x11"
> +DISTRO_FEATURES_NATIVESDK ?= "acl x11 ipv6 xattr"
> +DISTRO_FEATURES_NATIVESDK:mingw32 = "x11 ipv6"

While I know you do not like :remove in OE-Core, isn't this a case where it 
should be used? I.e.:

DISTRO_FEATURES_NATIVESDK:remove:mingw32 = "acl xattr"

Otherwise someone doing DISTRO_FEATURES_NATIVESDK += "foobar" in their 
configuration will get a very unexpected result if they are building for 
mingw32 after the above is integrated.

An alternative would be:

DISTRO_FEATURES_NATIVE_DEFAULT = "acl x11 ipv6 xattr"
DISTRO_FEATURES_NATIVE_DEFAULT:mingw32 = "x11 ipv6"
DISTRO_FEATURES_NATIVE ?= "${DISTRO_FEATURES_NATIVE_DEFAULT}"
DISTRO_FEATURES_NATIVESDK ?= "${DISTRO_FEATURES_NATIVE_DEFAULT}"

>  
>  # Normally target distro features will not be applied to native builds:
>  # Native distro features on this list will use the target feature value

//Peter
Richard Purdie Nov. 7, 2024, 10:39 a.m. UTC | #2
On Wed, 2024-11-06 at 22:39 +0000, Peter Kjellerstedt wrote:
> > -----Original Message-----
> > From: openembedded-core@lists.openembedded.org <openembedded-core@lists.openembedded.org> On Behalf Of Richard Purdie
> > Sent: den 6 november 2024 11:10
> > To: openembedded-core@lists.openembedded.org
> > Subject: [OE-core] [PATCH v2] bitbake.conf: Enable ipv6/acl/xattr for nativesdk
> > 
> > I was surprised to realise our buildtools doesn't support IPv6 which breaks
> > usage in our own autobuilder, let alone anywhere else.
> > 
> > Enable ipv6 in our SDKs and enable acl/xattr as well before we have the same
> > kind of issues with those, these features are now common on most linux systems
> > and we should be defaulting to including them.
> > 
> > Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
> > ---
> > v2 - Handle mingw which doesn't support acl/attr
> > 
> >  meta/conf/bitbake.conf | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> > 
> > diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
> > index 14e761e2e7e..02bbf0e7a52 100644
> > --- a/meta/conf/bitbake.conf
> > +++ b/meta/conf/bitbake.conf
> > @@ -916,7 +916,8 @@ IMAGE_FEATURES += "${EXTRA_IMAGE_FEATURES}"
> >  # Native distro features (will always be used for -native, even if they
> >  # are not enabled for target)
> >  DISTRO_FEATURES_NATIVE ?= "acl x11 ipv6 xattr"
> > -DISTRO_FEATURES_NATIVESDK ?= "x11"
> > +DISTRO_FEATURES_NATIVESDK ?= "acl x11 ipv6 xattr"
> > +DISTRO_FEATURES_NATIVESDK:mingw32 = "x11 ipv6"
> 
> While I know you do not like :remove in OE-Core, isn't this a case where it 
> should be used? I.e.:
> 
> DISTRO_FEATURES_NATIVESDK:remove:mingw32 = "acl xattr"
> 
> Otherwise someone doing DISTRO_FEATURES_NATIVESDK += "foobar" in their 
> configuration will get a very unexpected result if they are building for 
> mingw32 after the above is integrated.

We have this problem in a lot of cases and as you know, I'm deeply
unhappy with the way our variables work in this regard but I'm not sure
how to improve things.

Adding :remove basically can't be undone and therefore I'm very
reluctant to do it, particularly in core.

I tried to pick the lesser of several bad options.

> An alternative would be:
> 
> DISTRO_FEATURES_NATIVE_DEFAULT = "acl x11 ipv6 xattr"
> DISTRO_FEATURES_NATIVE_DEFAULT:mingw32 = "x11 ipv6"
> DISTRO_FEATURES_NATIVE ?= "${DISTRO_FEATURES_NATIVE_DEFAULT}"
> DISTRO_FEATURES_NATIVESDK ?= "${DISTRO_FEATURES_NATIVE_DEFAULT}"

I do not want to do this every time we declare a variable :(

Cheers,

Richard
diff mbox series

Patch

diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index 14e761e2e7e..02bbf0e7a52 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -916,7 +916,8 @@  IMAGE_FEATURES += "${EXTRA_IMAGE_FEATURES}"
 # Native distro features (will always be used for -native, even if they
 # are not enabled for target)
 DISTRO_FEATURES_NATIVE ?= "acl x11 ipv6 xattr"
-DISTRO_FEATURES_NATIVESDK ?= "x11"
+DISTRO_FEATURES_NATIVESDK ?= "acl x11 ipv6 xattr"
+DISTRO_FEATURES_NATIVESDK:mingw32 = "x11 ipv6"
 
 # Normally target distro features will not be applied to native builds:
 # Native distro features on this list will use the target feature value