Skip to contentSkip to conversation

bitbake.conf: Enable ipv6/acl/xattr for nativesdk

PATCH In review Richard Purdie 2 participants 3 messages Nov 6, 2024 – Nov 7, 2024

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 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.

---
v2 - Handle mingw which doesn't support acl/attr

 meta/conf/bitbake.conf | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
meta/conf/bitbake.conf +2 -1
index 14e761e2e7e..02bbf0e7a52 100644
@@ -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
#1 lore raw
Quoted 25 lines

-----Original Message-----
From: [email protected] <[email protected]> On Behalf Of Richard Purdie
Sent: den 6 november 2024 11:10
To: [email protected]
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.

---
v2 - Handle mingw which doesn't support acl/attr

 meta/conf/bitbake.conf | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
meta/conf/bitbake.conf +0 -0
index 14e761e2e7e..02bbf0e7a52 100644

meta/conf/bitbake.conf IMAGE_FEATURES += "${EXTRA_IMAGE_FEATURES}" · line 920

Quoted 6 lines
meta/conf/bitbake.conf +2 -1
@@ -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}"

meta/conf/bitbake.conf IMAGE_FEATURES += "${EXTRA_IMAGE_FEATURES}" · line 923

Quoted 3 lines
meta/conf/bitbake.conf +0 -0
 # Normally target distro features will not be applied to native builds:
 # Native distro features on this list will use the target feature value

//Peter

#2 lore raw
Quoted 35 lines · Peter Kjellerstedt
Quoted 28 lines

-----Original Message-----
From: [email protected] <[email protected]> On Behalf Of Richard Purdie
Sent: den 6 november 2024 11:10
To: [email protected]
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.

---
v2 - Handle mingw which doesn't support acl/attr

 meta/conf/bitbake.conf | 3 ++-

 1 file changed, 2 insertions(+), 1 deletion(-)
meta/conf/bitbake.conf +0 -0
index 14e761e2e7e..02bbf0e7a52 100644
@@ -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"

meta/conf/bitbake.conf IMAGE_FEATURES += "${EXTRA_IMAGE_FEATURES}" · line 920

Quoted 3 lines
meta/conf/bitbake.conf +2 -1
-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.:

Quoted 5 lines

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.

Quoted 6 lines

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