Message ID | 20230710095800.2033309-1-p.lobacz@welotec.com |
---|---|
State | New |
Headers | show |
Series | [1/3] bitbake.conf: add acl and xattr distro native features support | expand |
Hi Piotr, This is a great patchset, thanks for chasing all the loose ends. Until the patches for opkg have landed we can apply them to our recipes, so feel free to send a patch to the opkg/opkg-utils recipes to do that. Also some form of test would be essential. Something along the lines of adding to an image a test recipe which has both ACLs and arbitrary xattrs set, and then boot the image and verify that the attrs actually exist. Although I guess you could just build an ext4 of the image and then use debug2fs to probe it. That would be a little more complex to write, but doesn’t mean booting the image. Ross > On 10 Jul 2023, at 10:57, Piotr Łobacz via lists.openembedded.org <p.lobacz=welotec.com@lists.openembedded.org> wrote: > > Include support for ACLs and extended file attributes for native > builds, depending on which distro target features has been turned > on. > > Signed-off-by: Piotr Łobacz <p.lobacz@welotec.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 9625a6fef4..da01e9b66f 100644 > --- a/meta/conf/bitbake.conf > +++ b/meta/conf/bitbake.conf > @@ -904,7 +904,7 @@ 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 ?= "x11 ipv6 xattr" > +DISTRO_FEATURES_NATIVE ?= "x11 ipv6 ${@bb.utils.filter('DISTRO_FEATURES', 'acl xattr', d)}" > DISTRO_FEATURES_NATIVESDK ?= "x11" > > # Normally target distro features will not be applied to native builds: > -- > 2.34.1 > > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#184063): https://lists.openembedded.org/g/openembedded-core/message/184063 > Mute This Topic: https://lists.openembedded.org/mt/100054733/6875888 > Group Owner: openembedded-core+owner@lists.openembedded.org > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [ross.burton@arm.com] > -=-=-=-=-=-=-=-=-=-=-=- >
Hi Ross, Alex has written that he will take care of it today, but ofcourse I can additionally apply paches in oe-core layer as well today evening. Regarding additional tests we need to apply them ASAP. BR Piotr
On Mon, 10 Jul 2023 at 11:59, Piotr Łobacz <p.lobacz@welotec.com> wrote: > # Native distro features (will always be used for -native, even if they > # are not enabled for target) > -DISTRO_FEATURES_NATIVE ?= "x11 ipv6 xattr" > +DISTRO_FEATURES_NATIVE ?= "x11 ipv6 ${@bb.utils.filter('DISTRO_FEATURES', 'acl xattr', d)}" > DISTRO_FEATURES_NATIVESDK ?= "x11" > > # Normally target distro features will not be applied to native builds: ... and the next lines after that are: # Native distro features on this list will use the target feature value DISTRO_FEATURES_FILTER_NATIVE ?= "api-documentation debuginfod opengl wayland" So you can simply add acl/xattr to DISTRO_FEATURES_FILTER_NATIVE instead, which is purpose-made for the use case. Alex
Hi Alex, I have changed this patch accordingly to your suggestions
Hi Ross, I have added patches to oe-core for opkg-utils and opkg. On opkg-devel Alex has also mentioned to do that as he will apply these patches to the newest versions of opkg and opkg-utils. BR Piotr
On Mon, 2023-07-10 at 11:57 +0200, Piotr Łobacz wrote: > Include support for ACLs and extended file attributes for native > builds, depending on which distro target features has been turned > on. > > Signed-off-by: Piotr Łobacz <p.lobacz@welotec.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 9625a6fef4..da01e9b66f 100644 > --- a/meta/conf/bitbake.conf > +++ b/meta/conf/bitbake.conf > @@ -904,7 +904,7 @@ 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 ?= "x11 ipv6 xattr" > +DISTRO_FEATURES_NATIVE ?= "x11 ipv6 ${@bb.utils.filter('DISTRO_FEATURES', 'acl xattr', d)}" > DISTRO_FEATURES_NATIVESDK ?= "x11" > > # Normally target distro features will not be applied to native builds: Is there much benefit to making it depend on the target config? I'm wondering if we should enable acl support in native distro tooling unconditionally in the same way we already do for xattr? That should just cause some minor build dependencies if I understand correctly? Cheers, Richard
Generally we need these in native, otherwise ACLs and xattrs are not being preserved as packages are being built on native with usage of native tools which actually need the support for these functionalities as well... BR Piotr
On Wed, 2023-07-12 at 12:18 +0000, Piotr Łobacz wrote: > > Generally we need these in native, otherwise ACLs and xattrs are not > being preserved as packages are being built on native with usage of > native tools which actually need the support for these > functionalities as well... Agreed, so should be not just set: DISTRO_FEATURES_NATIVE ?= "x11 ipv6 xattr acl" ? Cheers, Richard
It was before, but Alexander has written something like this: ... and the next lines after that are: # Native distro features on this list will use the target feature value DISTRO_FEATURES_FILTER_NATIVE ?= "api-documentation debuginfod opengl wayland" So you can simply add acl/xattr to DISTRO_FEATURES_FILTER_NATIVE instead, which is purpose-made for the use case. Alex BR Piotr
On Wed, 2023-07-12 at 12:32 +0000, Piotr Łobacz wrote: > > It was before, but Alexander has written something like this: > > > > > > ... and the next lines after that are: > > # Native distro features on this list will use the target feature > > value > > DISTRO_FEATURES_FILTER_NATIVE ?= "api-documentation debuginfod > > opengl wayland" > > > > So you can simply add acl/xattr to DISTRO_FEATURES_FILTER_NATIVE > > instead, which is purpose-made for the use case. > > > > > > Alex If we want to make it inherit from the target settings, then yes, this is the way to do it. I'm wondering if we should just enable it unconditionally which is simpler. Cheers, Richard
Guys, the decision is up to you. My first decision was to use it directly in DISTRO_FEATURES_FILTER with this, but also conditionally. Probably this is why Alex has written to move it to DISTRO_FEATURES_FILTER_NATIVE instead of using it with this bb.utils.contains BR Piotr
On 12 Jul 2023, at 13:38, Piotr Łobacz via lists.openembedded.org <p.lobacz=welotec.com@lists.openembedded.org> wrote: > > Guys, the decision is up to you. My first decision was to use it directly in DISTRO_FEATURES_FILTER with this, but also conditionally. > > Probably this is why Alex has written to move it to DISTRO_FEATURES_FILTER_NATIVE instead of using it with this bb.utils.contains FWIW, I’m with RP: just enable for native. The build dependencies are trivial and it’s one less way things can change and cause problems. Ross
Ok i’ll change that than. BR Piotr Wysyłane z aplikacji Outlook dla systemu iOS<https://aka.ms/o0ukef>
On Wed, 2023-07-12 at 12:50 +0000, Ross Burton wrote: > On 12 Jul 2023, at 13:38, Piotr Łobacz via lists.openembedded.org > <p.lobacz=welotec.com@lists.openembedded.org> wrote: > > > > Guys, the decision is up to you. My first decision was to use it > > directly in DISTRO_FEATURES_FILTER with this, but also > > conditionally. > > > > Probably this is why Alex has written to move it to > > DISTRO_FEATURES_FILTER_NATIVE instead of using it with this > > bb.utils.contains > > FWIW, I’m with RP: just enable for native. The build dependencies > are trivial and it’s one less way things can change and cause > problems. It also may allow better native sstate reuse so lets do that. Cheers, Richard
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf index 9625a6fef4..da01e9b66f 100644 --- a/meta/conf/bitbake.conf +++ b/meta/conf/bitbake.conf @@ -904,7 +904,7 @@ 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 ?= "x11 ipv6 xattr" +DISTRO_FEATURES_NATIVE ?= "x11 ipv6 ${@bb.utils.filter('DISTRO_FEATURES', 'acl xattr', d)}" DISTRO_FEATURES_NATIVESDK ?= "x11" # Normally target distro features will not be applied to native builds:
Include support for ACLs and extended file attributes for native builds, depending on which distro target features has been turned on. Signed-off-by: Piotr Łobacz <p.lobacz@welotec.com> --- meta/conf/bitbake.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)