[OE-core] [PATCH v4] sstatesig: Fix pn and taskname derivation in find_siginfo

2023-07-12 Thread Yang Xu via lists.openembedded.org
From: Yang Xu 

The `bb.siggen.compare_sigfiles` method transforms the key format from
`[mc::][virtual:][native:]:` to
`/:[:virtual][:native][:mc:]`
by `clean_basepaths`. However, `find_siginfo` uses the original format
to get the package name (pn) and task name.

This commit corrects the method for deriving the pn and task name in
`find_siginfo` and adds handling for multilib name.
And add test for compare_sigfiles and find_siginfo working together.

Signed-off-by: Yang Xu 
---

Notes:
v1: correct handling for pn and taskname for native target in find_siginfo
v2: add handling for multilib target in find_siginfo
v3: add testcase for compare_sigfiles and find_siginfo work together.
v4: optimize testcase to avoid non-deterministic fail

 .../recipes-test/binutils/binutils_%.bbappend |  2 +
 meta/lib/oe/sstatesig.py  | 17 ++--
 meta/lib/oeqa/selftest/cases/sstatetests.py   | 83 +++
 3 files changed, 97 insertions(+), 5 deletions(-)
 create mode 100644 meta-selftest/recipes-test/binutils/binutils_%.bbappend

diff --git a/meta-selftest/recipes-test/binutils/binutils_%.bbappend 
b/meta-selftest/recipes-test/binutils/binutils_%.bbappend
new file mode 100644
index 00..205720982c
--- /dev/null
+++ b/meta-selftest/recipes-test/binutils/binutils_%.bbappend
@@ -0,0 +1,2 @@
+# This bbappend is used to alter the recipe using the test_recipe.inc file 
created by tests.
+include test_recipe.inc
diff --git a/meta/lib/oe/sstatesig.py b/meta/lib/oe/sstatesig.py
index f943df181e..f041a0c430 100644
--- a/meta/lib/oe/sstatesig.py
+++ b/meta/lib/oe/sstatesig.py
@@ -321,11 +321,18 @@ def find_siginfo(pn, taskname, taskhashlist, d):
 if not taskname:
 # We have to derive pn and taskname
 key = pn
-splitit = key.split('.bb:')
-taskname = splitit[1]
-pn = os.path.basename(splitit[0]).split('_')[0]
-if key.startswith('virtual:native:'):
-pn = pn + '-native'
+if key.count(':') >= 2:
+splitit, taskname, affix = key.split(':', 2)
+else:
+splitit, taskname = key.split(':', 1)
+affix = ''
+pn = os.path.splitext(os.path.basename(splitit))[0].split('_')[0]
+affixitems = affix.split(':')
+if affixitems[0] == 'virtual':
+if affixitems[1] == 'native':
+pn = pn + '-native'
+if affixitems[1] == 'multilib':
+pn = affixitems[2] + '-' + pn
 
 hashfiles = {}
 filedates = {}
diff --git a/meta/lib/oeqa/selftest/cases/sstatetests.py 
b/meta/lib/oeqa/selftest/cases/sstatetests.py
index febafdb2f7..3fa3038218 100644
--- a/meta/lib/oeqa/selftest/cases/sstatetests.py
+++ b/meta/lib/oeqa/selftest/cases/sstatetests.py
@@ -691,3 +691,86 @@ TMPDIR = "${TOPDIR}/tmp-sstatesamehash2"
 self.maxDiff = None
 self.assertCountEqual(files1, files2)
 
+class SStateFindSiginfo(SStateBase):
+def test_sstate_compare_sigfiles_and_find_siginfo(self):
+"""
+Test the functionality of the find_siginfo: basic function and 
callback in compare_sigfiles
+"""
+self.write_config("""
+TMPDIR = \"${TOPDIR}/tmp-sstates-findsiginfo\"
+TCLIBCAPPEND = \"\"
+MACHINE = \"qemux86-64\"
+require conf/multilib.conf
+MULTILIBS = "multilib:lib32"
+DEFAULTTUNE:virtclass-multilib-lib32 = "x86"
+BB_SIGNATURE_HANDLER = "OEBasicHash"
+""")
+self.track_for_cleanup(self.topdir + "/tmp-sstates-findsiginfo")
+
+pns = ["binutils", "binutils-native", "lib32-binutils"]
+target_configs = [
+"""
+TMPVAL1 = "tmpval1"
+TMPVAL2 = "tmpval2"
+do_tmptask1() {
+echo ${TMPVAL1}
+}
+do_tmptask2() {
+echo ${TMPVAL2}
+}
+addtask do_tmptask1
+addtask tmptask2 before do_tmptask1
+""",
+"""
+TMPVAL3 = "tmpval3"
+TMPVAL4 = "tmpval4"
+do_tmptask1() {
+echo ${TMPVAL3}
+}
+do_tmptask2() {
+echo ${TMPVAL4}
+}
+addtask do_tmptask1
+addtask tmptask2 before do_tmptask1
+"""
+]
+
+for target_config in target_configs:
+self.write_recipeinc("binutils", target_config)
+for pn in pns:
+bitbake("%s -c do_tmptask1 -S none" % pn)
+self.delete_recipeinc("binutils")
+
+with bb.tinfoil.Tinfoil() as tinfoil:
+tinfoil.prepare(config_only=True)
+
+def find_siginfo(pn, taskname, sigs=None):
+result = None
+tinfoil.set_event_mask(["bb.event.FindSigInfoResult",
+"bb.command.CommandCompleted"])
+ret = tinfoil.run_command("findSigInfo", pn, taskname, sigs)
+if ret:
+while True:
+event = tinfoil.wait_event(1)
+if event:
+if isinstance(event, bb.command.CommandCompleted):
+break
+elif isinstance(event, bb.event.FindSigInfoResult):
+  

Re: [OE-Core][PATCH v4 1/5] bitbake.conf: add acl and xattr distro native features support

2023-07-12 Thread Piotr Łobacz
But I have sent already v5 with this change…

BR
Piotr

Wysyłane z aplikacji Outlook dla systemu iOS

Od: Richard Purdie 
Wysłane: Wednesday, July 12, 2023 11:33:37 PM
Do: Piotr Łobacz ; Alexander Kanavin 

DW: openembedded-core@lists.openembedded.org 

Temat: Re: [OE-Core][PATCH v4 1/5] bitbake.conf: add acl and xattr distro 
native features support

On Wed, 2023-07-12 at 20:48 +, Piotr Łobacz wrote:
> Richard, but that is exactly, what I have written… wirhout any
> checks.

No, I mean that the right patch should be:

-DISTRO_FEATURES_NATIVE ?= "x11 ipv6 xattr"
+DISTRO_FEATURES_NATIVE ?= "x11 ipv6 xattr acl"

i.e. add acl to DISTRO_FEATURES_NATIVE and leave xattr there.

Cheers,

Richard


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#184229): 
https://lists.openembedded.org/g/openembedded-core/message/184229
Mute This Topic: https://lists.openembedded.org/mt/100108028/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-Core][PATCH v5 1/5] bitbake.conf: add acl and xattr distro native features support

2023-07-12 Thread Alex Stewart
ACK this patchset, assuming the other maintainers are happy with how 
we're handling the DISTO_FEATURES.


I chose not to include Piotr's opkg and opkg-utils ACL/xattr changes 
into the 0.6.2 release, which I have just pushed. They've been merged 
afterward, and can still be applied atop 0.6.2, and they'll be merged 
into the December opkg release.


I have a branch ready to upgrade the opkg and opkg-utils recipes, but 
I'd like to wait for this patchset to clear, because they will otherwise 
conflict.


On 7/12/23 15:04, Piotr Łobacz via lists.openembedded.org wrote:

Include support for ACLs and extended file attributes for native
builds, by default.

Signed-off-by: Piotr Łobacz 
---
  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..8dd615 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 ?= "acl x11 ipv6 xattr"
  DISTRO_FEATURES_NATIVESDK ?= "x11"
  
  # Normally target distro features will not be applied to native builds:






--
Alex Stewart
Software Engineer - NI Real-Time OS
NI (National Instruments)

alex.stew...@ni.com


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#184228): 
https://lists.openembedded.org/g/openembedded-core/message/184228
Mute This Topic: https://lists.openembedded.org/mt/100106217/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-Core][RFC] update-layers: Update layers managed by setup-layers

2023-07-12 Thread Chuck Wolber
That is a good point that I wrestled with. The TL;DR is that it seems to
create a chicken/egg problem.

Here is my reasoning in (possibly too much) detail.

At a very high level, one of the ingenious aspects of Yocto/OE is that it
(almost) always lets the project
distro "win". This is important because one of the questions that always
needs to be answered when using
OSS tools (especially in a highly regulated industry) is how upstream
change can be locally managed. This
splits along several lines that always end up at, "can this be done sanely
without requiring manual (error
prone) labor". Or to put that a little more succinctly - how much energy
are you prepared to put into proving
to a regulator that every developer did their work in a consistent way that
matches the method used to produce
the product now out in the field (and no one ever reads the documentation,
so you do not get to use that as an
answer)? And I hasten to add - this consistency should benefit
non-regulated use-cases as well, but the
benefits it provides must *FAR* exceed the work required to derive the
benefit or no one will ever use it.

The meta layering, cve-check, source checksumming, automatic license
checking, bbappend, etc. mechanisms
are key to the ideas described above, but there are several missing
elements, some of which are captured in
what was introduced by setup-layers.

I like the idea of setup-layers as a script that is dropped into the distro
project repository so it can operate in
a standalone manner. This is another example of letting the project distro
"win" in a clean way that manages
upstream changes. I, as a distro project maintainer, am then able to add a
call to my distro project copy of
setup-layers (that uses a project specific setup-layers.json) to a project
specific wrapper script that manages
project specific policy (some of which I described in my presentation)
without making developers on the project
team stuff their heads full of error prone local knowledge. One (managed)
wrapper command is all team
members need in order to use all of the Yocto/OE tools while producing a
consistent desktop level result during
their day-to-day work.

It is true that update-layers would not be appropriate to include in a
wrapper like that, as it would only be run by
a special delegate like a project admin or someone specifically tasked with
managing upstream change. That
does indeed point to the logic of folding update-layers directly into
bitbake-layers.

But this is why I chose not to. By definition the setup-layers concept
allows for a project specific repository to
manage change, including change in openembedded-core. The same would go for
update-layers. If we folded
update-layers into bitbake-layers, you get a chicken/egg problem so it made
more sense (in my mind) to treat
update-layers like setup-layers - have it dropped in by bitbake-layers when
it drops in setup-layers.

But your question exposes a missing feature in update-layers - it should do
a final check for an updated setup-layers
and update-layers script and inform the user that the project distro
repository needs to have those scripts updated
as well.

If my reasoning makes sense, I can put the time and energy into a set of
OE-Core patches that reflects the
above thinking.

..Ch:W..


On Wed, Jul 12, 2023 at 11:20 AM Alexander Kanavin 
wrote:

> Thanks, perhaps this functionality should simply be folded directly
> into bitbake-layers perhaps, as an extension of 'create-layers-setup'?
> Does it need to be in a separate script?
>
> Alex
>
> On Wed, 12 Jul 2023 at 20:00, Chuck Wolber  wrote:
> >
> > I wrote this tool to do automatic updating of layers managed by the
> setup-layers script. This
> > addresses some of the functionality I discussed in my OSSNA 2023 talk.
> >
> > A detailed explanation of what the following script does is found in the
> comments, but in
> > a nutshell:
> >
> > * If the --sync-upstream argument is provided, any layers that have
> remotes called
> >   "origin" and "upstream" have upstream changes on their configured
> branch applied
> >   to the origin remote (and local clone).
> > * Updates rev and description for all layers managed by setup-layers
> after pulling
> >   the latest changes on the configured branch.
> > * Leaves the setup-layers.json file in an updated state so git diff will
> show changes.
> >   Changes can then be reviewed and managed based on local project policy.
> >
> > I am looking for comments and feedback before I send this as a proper
> patch.
> >
> > In particular:
> >
> > * Are there any problems with this general approach?
> > * Should this be managed in OE-Core in the same way setup-layers is?
> > * I made some stylistic changes (e.g. main function, --dry-run, etc)
> that I plan to also patch into
> >   setup-layers if this is accepted and there are no objections.
> >
> >
> > ---
> >
> > #!/usr/bin/env python3
> > #
> > # Copyright OpenEmbedded Contributors
> > #
> > # SPDX-License-Identifier: MIT
> > #

Re: [oe-core][PATCH 1/1] libgpiod: modify RDEPENDS for ptest

2023-07-12 Thread Joe Slater via lists.openembedded.org
Wrong list -- ignore Joe

> -Original Message-
> From: openembedded-core@lists.openembedded.org  c...@lists.openembedded.org> On Behalf Of Joe Slater via
> lists.openembedded.org
> Sent: Wednesday, July 12, 2023 2:33 PM
> To: openembedded-core@lists.openembedded.org
> Cc: Slater, Joseph ; MacLeod, Randy
> 
> Subject: [oe-core][PATCH 1/1] libgpiod: modify RDEPENDS for ptest
> 
> From: Joe Slater 
> 
> The current use of RDEPENDS to add a dependency on bats results in the QA
> warning/error
> 
>  lib32-libgpiod package lib32-libgpiod-ptest-dev - suspicious values
>   'bats-dev' in RRECOMMENDS [multilib]
> 
> when building lib32-libgpiod with ptest not enabled.  We add the dependency
> only if ptest is enabled.
> 
> Signed-off-by: Joe Slater 
> ---
>  meta-oe/recipes-support/libgpiod/libgpiod.inc | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/meta-oe/recipes-support/libgpiod/libgpiod.inc b/meta-oe/recipes-
> support/libgpiod/libgpiod.inc
> index a2d1f57a8b..cb19bc5fb8 100644
> --- a/meta-oe/recipes-support/libgpiod/libgpiod.inc
> +++ b/meta-oe/recipes-support/libgpiod/libgpiod.inc
> @@ -34,7 +34,7 @@ FILES:${PN}-tools += " \  FILES:libgpiodcxx =
> "${libdir}/libgpiodcxx.so.*"
> 
>  RRECOMMENDS:${PN}-ptest += "coreutils"
> -RDEPENDS:${PN}-ptest += "bats"
> +RDEPENDS:${PN}-ptest += "${@bb.utils.contains('PTEST_ENABLED', '1', 'bats',
> '', d)}"
> 
>  do_install:append() {
>  rm -f ${D}${bindir}/gpiod-test
> --
> 2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#184226): 
https://lists.openembedded.org/g/openembedded-core/message/184226
Mute This Topic: https://lists.openembedded.org/mt/100108764/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-Core][PATCH v4 1/5] bitbake.conf: add acl and xattr distro native features support

2023-07-12 Thread Richard Purdie
On Wed, 2023-07-12 at 20:48 +, Piotr Łobacz wrote:
> Richard, but that is exactly, what I have written… wirhout any
> checks.

No, I mean that the right patch should be:

-DISTRO_FEATURES_NATIVE ?= "x11 ipv6 xattr"
+DISTRO_FEATURES_NATIVE ?= "x11 ipv6 xattr acl"

i.e. add acl to DISTRO_FEATURES_NATIVE and leave xattr there.

Cheers,

Richard


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#184225): 
https://lists.openembedded.org/g/openembedded-core/message/184225
Mute This Topic: https://lists.openembedded.org/mt/100108028/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[oe-core][PATCH 1/1] libgpiod: modify RDEPENDS for ptest

2023-07-12 Thread Joe Slater via lists.openembedded.org
From: Joe Slater 

The current use of RDEPENDS to add a dependency on bats results
in the QA warning/error

 lib32-libgpiod package lib32-libgpiod-ptest-dev - suspicious values
  'bats-dev' in RRECOMMENDS [multilib]

when building lib32-libgpiod with ptest not enabled.  We add the
dependency only if ptest is enabled.

Signed-off-by: Joe Slater 
---
 meta-oe/recipes-support/libgpiod/libgpiod.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta-oe/recipes-support/libgpiod/libgpiod.inc 
b/meta-oe/recipes-support/libgpiod/libgpiod.inc
index a2d1f57a8b..cb19bc5fb8 100644
--- a/meta-oe/recipes-support/libgpiod/libgpiod.inc
+++ b/meta-oe/recipes-support/libgpiod/libgpiod.inc
@@ -34,7 +34,7 @@ FILES:${PN}-tools += " \
 FILES:libgpiodcxx = "${libdir}/libgpiodcxx.so.*"
 
 RRECOMMENDS:${PN}-ptest += "coreutils"
-RDEPENDS:${PN}-ptest += "bats"
+RDEPENDS:${PN}-ptest += "${@bb.utils.contains('PTEST_ENABLED', '1', 'bats', 
'', d)}"
 
 do_install:append() {
 rm -f ${D}${bindir}/gpiod-test
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#184224): 
https://lists.openembedded.org/g/openembedded-core/message/184224
Mute This Topic: https://lists.openembedded.org/mt/100108764/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-Core][PATCH v4 1/5] bitbake.conf: add acl and xattr distro native features support

2023-07-12 Thread Piotr Łobacz
Sorry for typo. It should be any, not anu. I’m typing from mobile…

Wysyłane z aplikacji Outlook dla systemu iOS

Od: openembedded-core@lists.openembedded.org 
 w imieniu użytkownika Piotr Łobacz 
via lists.openembedded.org 
Wysłane: Wednesday, July 12, 2023 10:46:27 PM
Do: Richard Purdie ; Alexander Kanavin 

DW: openembedded-core@lists.openembedded.org 

Temat: Re: [OE-Core][PATCH v4 1/5] bitbake.conf: add acl and xattr distro 
native features support

Richard, but that is exactly, what I have written… wirhout anu checks.

Cheers
Piotr

Od: Richard Purdie 
Wysłane: Wednesday, July 12, 2023 9:25:15 PM
Do: Piotr Łobacz ; Alexander Kanavin 

DW: openembedded-core@lists.openembedded.org 

Temat: Re: ODP: [OE-Core][PATCH v4 1/5] bitbake.conf: add acl and xattr distro 
native features support

On Wed, 2023-07-12 at 19:08 +, Piotr Łobacz wrote:
> OK, I have set in v5 patches set, these acl and xattr attributes by
> default in DISTRO_FEATURES_NATIVE, without any checks, if it exists
> in DISTRO_FEATURES. Is that ok for all of you?

No, don't check DISTRO_FEATURES. Just add acl unconditionally.

Cheers,

Richard

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#184223): 
https://lists.openembedded.org/g/openembedded-core/message/184223
Mute This Topic: https://lists.openembedded.org/mt/100108028/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-Core][PATCH v4 1/5] bitbake.conf: add acl and xattr distro native features support

2023-07-12 Thread Piotr Łobacz
Richard, but that is exactly, what I have written… wirhout anu checks.

Cheers
Piotr

Od: Richard Purdie 
Wysłane: Wednesday, July 12, 2023 9:25:15 PM
Do: Piotr Łobacz ; Alexander Kanavin 

DW: openembedded-core@lists.openembedded.org 

Temat: Re: ODP: [OE-Core][PATCH v4 1/5] bitbake.conf: add acl and xattr distro 
native features support

On Wed, 2023-07-12 at 19:08 +, Piotr Łobacz wrote:
> OK, I have set in v5 patches set, these acl and xattr attributes by
> default in DISTRO_FEATURES_NATIVE, without any checks, if it exists
> in DISTRO_FEATURES. Is that ok for all of you?

No, don't check DISTRO_FEATURES. Just add acl unconditionally.

Cheers,

Richard

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#184222): 
https://lists.openembedded.org/g/openembedded-core/message/184222
Mute This Topic: https://lists.openembedded.org/mt/100107998/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: ODP: [OE-Core][PATCH v4 1/5] bitbake.conf: add acl and xattr distro native features support

2023-07-12 Thread Richard Purdie
On Wed, 2023-07-12 at 19:08 +, Piotr Łobacz wrote:
> OK, I have set in v5 patches set, these acl and xattr attributes by
> default in DISTRO_FEATURES_NATIVE, without any checks, if it exists
> in DISTRO_FEATURES. Is that ok for all of you?

No, don't check DISTRO_FEATURES. Just add acl unconditionally.

Cheers,

Richard

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#184221): 
https://lists.openembedded.org/g/openembedded-core/message/184221
Mute This Topic: https://lists.openembedded.org/mt/100106290/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



ODP: [OE-Core][PATCH v4 2/5] package_ipk.bbclass: add support for ACLs and xattr

2023-07-12 Thread Piotr Łobacz
HI Alex,
this is odd because that is not happening for me... I need to do some checks.

BR
Piotr

Od: Alexandre Belloni 
Wysłane: środa, 12 lipca 2023 18:54
Do: Piotr Łobacz 
DW: openembedded-core@lists.openembedded.org 

Temat: Re: [OE-Core][PATCH v4 2/5] package_ipk.bbclass: add support for ACLs 
and xattr

I tested a previous version and got:

ERROR: run-postinsts-1.0-r10 do_package_write_ipk: Fatal errors occurred in 
subprocesses:
Command 
'PATH="/home/pokybuild/yocto-worker/poky-tiny/build/build/tmp/sysroots-uninative/x86_64-linux/usr/bin:/home/pokybuild/yocto-worker/poky-tiny/build/scripts:/home/pokybuild/yocto-worker/poky-tiny/build/build/tmp/work/all-poky-linux/run-postinsts/1.0-r10/recipe-sysroot-native/usr/bin/allarch-poky-linux:/home/pokybuild/yocto-worker/poky-tiny/build/build/tmp/work/all-poky-linux/run-postinsts/1.0-r10/recipe-sysroot/usr/bin/crossscripts:/home/pokybuild/yocto-worker/poky-tiny/build/build/tmp/work/all-poky-linux/run-postinsts/1.0-r10/recipe-sysroot-native/usr/sbin:/home/pokybuild/yocto-worker/poky-tiny/build/build/tmp/work/all-poky-linux/run-postinsts/1.0-r10/recipe-sysroot-native/usr/bin:/home/pokybuild/yocto-worker/poky-tiny/build/build/tmp/work/all-poky-linux/run-postinsts/1.0-r10/recipe-sysroot-native/sbin:/home/pokybuild/yocto-worker/poky-tiny/build/build/tmp/work/all-poky-linux/run-postinsts/1.0-r10/recipe-sysroot-native/bin:/home/pokybuild/yocto-worker/poky-tiny/build/bitbake/bin:/home/pokybuild/yocto-worker/poky-tiny/build/build/tmp/hosttools"
 opkg-build -Z xz -a "--memlimit=5% --threads=8" "" "" run-postinsts 
/home/pokybuild/yocto-worker/poky-tiny/build/build/tmp/work/all-poky-linux/run-postinsts/1.0-r10/deploy-ipks/all'
 returned non-zero exit status 1.
Subprocess output:Usage: 
/home/pokybuild/yocto-worker/poky-tiny/build/build/tmp/work/all-poky-linux/run-postinsts/1.0-r10/recipe-sysroot-native/usr/bin/opkg-build
 [-c] [-C] [-Z compressor] [-a compressor_args] [-O] [-o owner] [-g group] 
 []
Command 
'PATH="/home/pokybuild/yocto-worker/poky-tiny/build/build/tmp/sysroots-uninative/x86_64-linux/usr/bin:/home/pokybuild/yocto-worker/poky-tiny/build/scripts:/home/pokybuild/yocto-worker/poky-tiny/build/build/tmp/work/all-poky-linux/run-postinsts/1.0-r10/recipe-sysroot-native/usr/bin/allarch-poky-linux:/home/pokybuild/yocto-worker/poky-tiny/build/build/tmp/work/all-poky-linux/run-postinsts/1.0-r10/recipe-sysroot/usr/bin/crossscripts:/home/pokybuild/yocto-worker/poky-tiny/build/build/tmp/work/all-poky-linux/run-postinsts/1.0-r10/recipe-sysroot-native/usr/sbin:/home/pokybuild/yocto-worker/poky-tiny/build/build/tmp/work/all-poky-linux/run-postinsts/1.0-r10/recipe-sysroot-native/usr/bin:/home/pokybuild/yocto-worker/poky-tiny/build/build/tmp/work/all-poky-linux/run-postinsts/1.0-r10/recipe-sysroot-native/sbin:/home/pokybuild/yocto-worker/poky-tiny/build/build/tmp/work/all-poky-linux/run-postinsts/1.0-r10/recipe-sysroot-native/bin:/home/pokybuild/yocto-worker/poky-tiny/build/bitbake/bin:/home/pokybuild/yocto-worker/poky-tiny/build/build/tmp/hosttools"
 opkg-build -Z xz -a "--memlimit=5% --threads=8" "" "" run-postinsts-dev 
/home/pokybuild/yocto-worker/poky-tiny/build/build/tmp/work/all-poky-linux/run-postinsts/1.0-r10/deploy-ipks/all'
 returned non-zero exit status 1.
Subprocess output:Usage: 
/home/pokybuild/yocto-worker/poky-tiny/build/build/tmp/work/all-poky-linux/run-postinsts/1.0-r10/recipe-sysroot-native/usr/bin/opkg-build
 [-c] [-C] [-Z compressor] [-a compressor_args] [-O] [-o owner] [-g group] 
 []
Command 
'PATH="/home/pokybuild/yocto-worker/poky-tiny/build/build/tmp/sysroots-uninative/x86_64-linux/usr/bin:/home/pokybuild/yocto-worker/poky-tiny/build/scripts:/home/pokybuild/yocto-worker/poky-tiny/build/build/tmp/work/all-poky-linux/run-postinsts/1.0-r10/recipe-sysroot-native/usr/bin/allarch-poky-linux:/home/pokybuild/yocto-worker/poky-tiny/build/build/tmp/work/all-poky-linux/run-postinsts/1.0-r10/recipe-sysroot/usr/bin/crossscripts:/home/pokybuild/yocto-worker/poky-tiny/build/build/tmp/work/all-poky-linux/run-postinsts/1.0-r10/recipe-sysroot-native/usr/sbin:/home/pokybuild/yocto-worker/poky-tiny/build/build/tmp/work/all-poky-linux/run-postinsts/1.0-r10/recipe-sysroot-native/usr/bin:/home/pokybuild/yocto-worker/poky-tiny/build/build/tmp/work/all-poky-linux/run-postinsts/1.0-r10/recipe-sysroot-native/sbin:/home/pokybuild/yocto-worker/poky-tiny/build/build/tmp/work/all-poky-linux/run-postinsts/1.0-r10/recipe-sysroot-native/bin:/home/pokybuild/yocto-worker/poky-tiny/build/bitbake/bin:/home/pokybuild/yocto-worker/poky-tiny/build/build/tmp/hosttools"
 opkg-build -Z xz -a "--memlimit=5% --threads=8" "" "" run-postinsts-dbg 
/home/pokybuild/yocto-worker/poky-tiny/build/build/tmp/work/all-poky-linux/run-postinsts/1.0-r10/deploy-ipks/all'
 returned non-zero exit status 1.
Subprocess output:Usage: 
/home/pokybuild/yocto-worker/poky-tiny/build/build/tmp/work/all-poky-linux/run-postinsts/1.0-r10/recipe-sysroot-native/usr/bin/opkg-build
 [-c] 

ODP: [OE-Core][PATCH v4 1/5] bitbake.conf: add acl and xattr distro native features support

2023-07-12 Thread Piotr Łobacz
OK, I have set in v5 patches set, these acl and xattr attributes by default in 
DISTRO_FEATURES_NATIVE, without any checks, if it exists in DISTRO_FEATURES. Is 
that ok for all of you?

BR
Piotr

Od: Alexander Kanavin 
Wysłane: środa, 12 lipca 2023 19:15
Do: Richard Purdie 
DW: Piotr Łobacz ; 
openembedded-core@lists.openembedded.org 

Temat: Re: [OE-Core][PATCH v4 1/5] bitbake.conf: add acl and xattr distro 
native features support

On Wed, 12 Jul 2023 at 19:04, Richard Purdie
 wrote:
> Just to be clear, I know what Alex said but after further thought, acl
> needs to move into DISTRO_FEATURES_NATIVE in my opinion (and Ross'
> too).
>
> I suspect Alex will agree with that too after thinking about the
> arguments I put forward about simplifying sstate reuse.

My comment was strictly about using the best syntactic sugar, and not
about the merits of conditional (or not) enabling of these features.
I'm fine if they're always enabled.

Alex

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#184219): 
https://lists.openembedded.org/g/openembedded-core/message/184219
Mute This Topic: https://lists.openembedded.org/mt/100106290/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-Core][PATCH v5 3/5] package.bbclass: add support for ACLs and xattr

2023-07-12 Thread Piotr Łobacz
Extend `tar` command, with additional parameters, depending
on choosen package class and target distro features, in order
to support ACLs and xattr.

Currently only `package_ipk` supports fully ACLs and xattr.

Signed-off-by: Piotr Łobacz 
---
 meta/classes-global/package.bbclass | 9 +++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/meta/classes-global/package.bbclass 
b/meta/classes-global/package.bbclass
index e8055a9cdc..6e5d0dd4dc 100644
--- a/meta/classes-global/package.bbclass
+++ b/meta/classes-global/package.bbclass
@@ -342,8 +342,13 @@ python perform_packagecopy () {
 
 # Start by package population by taking a copy of the installed
 # files to operate on
-# Preserve sparse files and hard links
-cmd = 'tar --exclude=./sysroot-only -cf - -C %s -p -S . | tar -xf - -C %s' 
% (dest, dvar)
+# Preserve sparse files, hard links, ACLs and extended attributes
+# TODO: for the moment only ipk packages are supporting ACLs and extended 
attributes
+# we need to add support for other package systems as well, but that 
doesn't bother
+# tar from creating archives with acl and/or xattr support
+acl = bb.utils.contains('DISTRO_FEATURES', 'acl', '--acls', '', d)
+xattr = bb.utils.contains('DISTRO_FEATURES', 'xattr', '--xattrs', '', d)
+cmd = f'tar {acl} {xattr} --numeric-owner --exclude=./sysroot-only -cf - 
-C {dest} -p -S . | tar {acl} {xattr} -xf - -C {dvar}'
 subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT)
 
 # replace RPATHs for the nativesdk binaries, to make them relocatable
-- 
2.34.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#184218): 
https://lists.openembedded.org/g/openembedded-core/message/184218
Mute This Topic: https://lists.openembedded.org/mt/100106221/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-Core][PATCH v5 4/5] opkg-utils: add acl and xattr support

2023-07-12 Thread Piotr Łobacz
Add support for tar archives created with --acls and/or --xattrs options,
PAX header format.

GNU tar and libarchive already supports ACLs and extended attributes.
We can now add this support as well to opkg-build script in order to use
fsetattr or setcap inside do_install command and end up with a file in
an image with the relevant ACLs and xattrs.

Signed-off-by: Piotr Łobacz 
---
 ...kg-build-Add-acls-and-xattrs-support.patch | 80 +++
 .../opkg-utils/opkg-utils_0.5.0.bb|  1 +
 2 files changed, 81 insertions(+)
 create mode 100644 
meta/recipes-devtools/opkg-utils/opkg-utils/0002-opkg-build-Add-acls-and-xattrs-support.patch

diff --git 
a/meta/recipes-devtools/opkg-utils/opkg-utils/0002-opkg-build-Add-acls-and-xattrs-support.patch
 
b/meta/recipes-devtools/opkg-utils/opkg-utils/0002-opkg-build-Add-acls-and-xattrs-support.patch
new file mode 100644
index 00..a9e5f0e191
--- /dev/null
+++ 
b/meta/recipes-devtools/opkg-utils/opkg-utils/0002-opkg-build-Add-acls-and-xattrs-support.patch
@@ -0,0 +1,80 @@
+From 5664c17923cc1ab9644ef01f549bc8d352dd8868 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Piotr=20=C5=81obacz?= 
+Date: Wed, 5 Jul 2023 10:31:13 +0200
+Subject: [PATCH] opkg-build: Add acls and xattrs support
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Add support for tar archives created with --acls and/or --xattrs options,
+PAX header format.
+
+GNU tar and libarchive already supports ACLs and extended attributes.
+We can now add this support as well to opkg-build script in order to use
+fsetattr or setcap inside do_install command and end up with a file in
+an image with the relevant ACLs and xattrs.
+
+Upstream-Status: Accepted 
[https://groups.google.com/g/opkg-devel/c/dYNHrLjDwg8]
+
+[1] https://bugzilla.yoctoproject.org/show_bug.cgi?id=15097
+[2] https://groups.google.com/g/opkg-devel/c/aEGL7XRXfaA
+
+Signed-off-by: Piotr Łobacz 
+---
+ opkg-build | 15 ++-
+ 1 file changed, 10 insertions(+), 5 deletions(-)
+
+diff --git a/opkg-build b/opkg-build
+index a9e45d4..8d9bcfa 100755
+--- a/opkg-build
 b/opkg-build
+@@ -145,6 +145,7 @@ You probably want to chown these to a system user: " >&2
+ ###
+ # opkg-build "main"
+ ###
++attributesargs=""
+ ogargs=""
+ outer=ar
+ noclean=0
+@@ -166,7 +167,7 @@ compressorargs=""
+ tarformat=""
+ if tar --help 2>&1 | grep -- "--format" > /dev/null;
+ then
+-tarformat="--format=gnu"
++tarformat="--format=posix"
+ fi
+ 
+ compressor_ext() {
+@@ -197,13 +198,17 @@ compressor_ext() {
+ : <<=cut
+ =head1 SYNOPSIS
+ 
+-B [B<-c>] [B<-C>] [B<-Z> I] [B<-a>] [B<-O>] [B<-o> 
I] [B<-g> I] I [I]
++B [B<-A>] [B<-X>] [B<-c>] [B<-C>] [B<-Z> I] [B<-a>] 
[B<-O>] [B<-o> I] [B<-g> I] I 
[I]
+ 
+ =cut
+ 
+-usage="Usage: $0 [-c] [-C] [-Z compressor] [-a compressor_args] [-O] [-o 
owner] [-g group]  []"
+-while getopts "a:cCg:ho:vOZ:" opt; do
++usage="Usage: $0 [-A] [-X] [-c] [-C] [-Z compressor] [-a compressor_args] 
[-O] [-o owner] [-g group]  []"
++while getopts "Aa:cCg:ho:vOXZ:" opt; do
+ case $opt in
++A ) attributesargs="--acls"
++;;
++X ) attributesargs="$attributesargs --xattrs"
++;;
+   o ) owner=$OPTARG
+   ogargs="--owner=$owner"
+   ;;
+@@ -314,7 +319,7 @@ export LANG=C
+ export LC_ALL=C
+ ( cd $pkg_dir/$CONTROL && find . -type f | sort > $tmp_dir/control_list )
+ ( cd $pkg_dir && find . -path ./$CONTROL -prune -o -path . -o -print  | sort 
> $tmp_dir/file_list )
+-( cd $pkg_dir && tar $ogargs $tsortargs --no-recursion $mtime_args -c 
$tarformat -T $tmp_dir/file_list | $compressor $compressorargs > 
$tmp_dir/data.tar.$cext )
++( cd $pkg_dir && tar $attributesargs $ogargs $tsortargs --no-recursion 
$mtime_args -c $tarformat -T $tmp_dir/file_list | $compressor $compressorargs > 
$tmp_dir/data.tar.$cext )
+ ( cd $pkg_dir/$CONTROL && tar $ogargs $tsortargs --no-recursion 
--mtime=@$build_date -c $tarformat -T $tmp_dir/control_list | gzip $zipargs > 
$tmp_dir/control.tar.gz )
+ rm $tmp_dir/file_list
+ rm $tmp_dir/control_list
+-- 
+2.34.1
+
diff --git a/meta/recipes-devtools/opkg-utils/opkg-utils_0.5.0.bb 
b/meta/recipes-devtools/opkg-utils/opkg-utils_0.5.0.bb
index b27e3ded33..edf730711e 100644
--- a/meta/recipes-devtools/opkg-utils/opkg-utils_0.5.0.bb
+++ b/meta/recipes-devtools/opkg-utils/opkg-utils_0.5.0.bb
@@ -9,6 +9,7 @@ PROVIDES += "${@bb.utils.contains('PACKAGECONFIG', 
'update-alternatives', 'virtu
 
 SRC_URI = "git://git.yoctoproject.org/opkg-utils;protocol=https;branch=master \
file://0001-update-alternatives-correctly-match-priority.patch \
+   file://0002-opkg-build-Add-acls-and-xattrs-support.patch \
"
 SRCREV = "9239541f14a2529b9d01c0a253ab11afa2822dab"
 
-- 
2.34.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#184216): 
https://lists.openembedded.org/g/openembedded-core/message/184216
Mute This Topic: 

[OE-Core][PATCH v5 5/5] opkg: add options to enable support for acl and xattr

2023-07-12 Thread Piotr Łobacz
The libarchive library, which is being used by opkg, supports ACLs
and xattr already.

More informations can be read at this link:
https://github.com/libarchive/libarchive/pull/691

Signed-off-by: Piotr Łobacz 
---
 ...-to-enable-support-for-acl-and-xattr.patch | 70 +++
 meta/recipes-devtools/opkg/opkg_0.6.1.bb  |  5 +-
 2 files changed, 74 insertions(+), 1 deletion(-)
 create mode 100644 
meta/recipes-devtools/opkg/opkg/0002-Add-options-to-enable-support-for-acl-and-xattr.patch

diff --git 
a/meta/recipes-devtools/opkg/opkg/0002-Add-options-to-enable-support-for-acl-and-xattr.patch
 
b/meta/recipes-devtools/opkg/opkg/0002-Add-options-to-enable-support-for-acl-and-xattr.patch
new file mode 100644
index 00..d6cb1d79fb
--- /dev/null
+++ 
b/meta/recipes-devtools/opkg/opkg/0002-Add-options-to-enable-support-for-acl-and-xattr.patch
@@ -0,0 +1,70 @@
+From 1c935e994bd572d9fff436f660ac1a060a434df0 Mon Sep 17 00:00:00 2001
+From: Maciej Liszewski 
+Date: Tue, 4 Jul 2023 22:01:58 +0200
+Subject: [PATCH] Add options to enable support for acl and xattr
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The libarchive library, which is being used by opkg, supports ACLs
+and xattr already.
+
+More informations can be read at this link:
+https://github.com/libarchive/libarchive/pull/691
+
+Upstream-Status: Accepted 
[https://groups.google.com/g/opkg-devel/c/aEGL7XRXfaA]
+
+[1] https://bugzilla.yoctoproject.org/show_bug.cgi?id=15097
+
+Signed-off-by: Maciej Liszewski 
+Signed-off-by: Piotr Łobacz 
+---
+ configure.ac   | 12 
+ libopkg/opkg_archive.c |  8 
+ 2 files changed, 20 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+index 389a818..46949cd 100644
+--- a/configure.ac
 b/configure.ac
+@@ -158,6 +158,18 @@ return OPENSSL_VERSION_NUMBER; ],
+   AC_SUBST(OPENSSL_LIBS)
+ fi
+ 
++# check for ACL support
++AC_ARG_WITH([acl], [AS_HELP_STRING([--with-acl], [Enable ACL support])])
++if test "x$with_acl" = "xyes"; then
++  AC_DEFINE([ENABLE_ACL], [1], [Enable ACL support])
++fi
++
++# check for xattr support
++AC_ARG_WITH([xattr], [AS_HELP_STRING([--with-xattr], [Enable xattr support])])
++if test "x$with_xattr" = "xyes"; then
++  AC_DEFINE([ENABLE_XATTR], [1], [Enable xattr support])
++fi
++
+ # check for libsolv solver
+ AC_ARG_WITH(libsolv, AC_HELP_STRING([--with-libsolv], [Use libsolv solver 
support.
+   ]), [], [with_libsolv="no"])
+diff --git a/libopkg/opkg_archive.c b/libopkg/opkg_archive.c
+index 03a4afb..8dd902d 100644
+--- a/libopkg/opkg_archive.c
 b/libopkg/opkg_archive.c
+@@ -912,6 +912,14 @@ struct opkg_ar *ar_open_pkg_data_archive(const char 
*filename)
+ ar->extract_flags = ARCHIVE_EXTRACT_OWNER | ARCHIVE_EXTRACT_PERM |
+ ARCHIVE_EXTRACT_TIME | ARCHIVE_EXTRACT_UNLINK | 
ARCHIVE_EXTRACT_NO_OVERWRITE;
+ 
++#ifdef ENABLE_ACL
++ar->extract_flags |= ARCHIVE_EXTRACT_ACL;
++#endif
++
++#ifdef ENABLE_XATTR
++ar->extract_flags |= ARCHIVE_EXTRACT_FFLAGS | ARCHIVE_EXTRACT_XATTR;
++#endif
++
+ if (opkg_config->ignore_uid)
+ ar->extract_flags &= ~ARCHIVE_EXTRACT_OWNER;
+ 
+-- 
+2.34.1
+
diff --git a/meta/recipes-devtools/opkg/opkg_0.6.1.bb 
b/meta/recipes-devtools/opkg/opkg_0.6.1.bb
index 4c25fe963a..2cac4af644 100644
--- a/meta/recipes-devtools/opkg/opkg_0.6.1.bb
+++ b/meta/recipes-devtools/opkg/opkg_0.6.1.bb
@@ -17,6 +17,7 @@ SRC_URI = 
"http://downloads.yoctoproject.org/releases/${BPN}/${BPN}-${PV}.tar.gz

file://0001-opkg_conf-create-opkg.lock-in-run-instead-of-var-run.patch \
file://0002-opkg-key-remove-no-options-flag-from-gpg-calls.patch \

file://0001-Define-alignof-using-_Alignof-when-using-C11-or-newe.patch \
+   file://0002-Add-options-to-enable-support-for-acl-and-xattr.patch \
file://run-ptest \
 "
 
@@ -32,8 +33,10 @@ inherit autotools pkgconfig ptest
 target_localstatedir := "${localstatedir}"
 OPKGLIBDIR ??= "${target_localstatedir}/lib"
 
-PACKAGECONFIG ??= "libsolv"
+PACKAGECONFIG ??= "libsolv ${@bb.utils.filter('DISTRO_FEATURES', 'acl xattr', 
d)}"
 
+PACKAGECONFIG[acl] = "--with-acl,--without-acl"
+PACKAGECONFIG[xattr] = "--with-xattr,--without-xattr"
 PACKAGECONFIG[gpg] = "--enable-gpg,--disable-gpg,\
 gnupg gpgme libgpg-error,\
 ${@ "gnupg" if ("native" in d.getVar("PN")) else "gnupg-gpg"}\
-- 
2.34.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#184217): 
https://lists.openembedded.org/g/openembedded-core/message/184217
Mute This Topic: https://lists.openembedded.org/mt/100106220/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-Core][PATCH v5 2/5] package_ipk.bbclass: add support for ACLs and xattr

2023-07-12 Thread Piotr Łobacz
Extend OPKGBUILDCMD variable, with additional parameters, depending
on target distro features, in order to support ACLs and xattr.

With fix pushed to the opkg-devel:
https://groups.google.com/g/opkg-devel/c/dYNHrLjDwg8
opkg-build is able to create tar archives with ACLs and xattr.

Signed-off-by: Piotr Łobacz 
---
 meta/classes-global/package_ipk.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes-global/package_ipk.bbclass 
b/meta/classes-global/package_ipk.bbclass
index b4b7bc9ac2..5e151be3cd 100644
--- a/meta/classes-global/package_ipk.bbclass
+++ b/meta/classes-global/package_ipk.bbclass
@@ -15,7 +15,7 @@ IPKGCONF_SDK_TARGET = "${WORKDIR}/opkg-sdk-target.conf"
 PKGWRITEDIRIPK = "${WORKDIR}/deploy-ipks"
 
 # Program to be used to build opkg packages
-OPKGBUILDCMD ??= 'opkg-build -Z xz -a "${XZ_DEFAULTS}"'
+OPKGBUILDCMD ??= 'opkg-build -Z xz -a "${XZ_DEFAULTS}" 
"${@bb.utils.contains('DISTRO_FEATURES', 'acl', '-A', '', d)}" 
"${@bb.utils.contains('DISTRO_FEATURES', 'xattr', '-X', '', d)}"'
 
 OPKG_ARGS += "--force_postinstall --prefer-arch-to-version"
 OPKG_ARGS += "${@['', 
'--no-install-recommends'][d.getVar("NO_RECOMMENDATIONS") == "1"]}"
-- 
2.34.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#184215): 
https://lists.openembedded.org/g/openembedded-core/message/184215
Mute This Topic: https://lists.openembedded.org/mt/100106218/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-Core][PATCH v5 1/5] bitbake.conf: add acl and xattr distro native features support

2023-07-12 Thread Piotr Łobacz
Include support for ACLs and extended file attributes for native
builds, by default.

Signed-off-by: Piotr Łobacz 
---
 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..8dd615 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 ?= "acl x11 ipv6 xattr"
 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 (#184214): 
https://lists.openembedded.org/g/openembedded-core/message/184214
Mute This Topic: https://lists.openembedded.org/mt/100106217/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core][PATCH] python3: parallelize ptests, add test_cppext dependencies

2023-07-12 Thread Alexander Kanavin
I would suggest just one more tweak here: insert
|| echo "FAIL: python3"
after python3 but before sed. That way it'll catch failures that sed
does not (that silent regressing did just happen with
zipapp/cgitb/cppext).

Alex

On Tue, 11 Jul 2023 at 19:25, Trevor Gamblin  wrote:
>
> This is based on a previous patch from Alex Kanavin (thanks Alex),
> but it retains our use of sed to parse the test output into a usable
> form. The intent was to use the test module's --junit-xml feature and
> parse the resulting log instead of using sed, but various errors were
> encountered when testing this method, so that will need further
> investigation before we can consider adopting it. Two missing ptest
> dependencies on python3-cgitb and python3-zipapp were already merged
> in a previous patch, so only gcc, g++, and binutils were left to add
> as ptest RDEPENDS.
>
> ptest output and runtime with this change:
>
> == Tests result: SUCCESS ==
>
> 405 tests OK.
>
> 29 tests skipped:
> test_asdl_parser test_check_c_globals test_clinic test_curses
> test_devpoll test_gdb test_idle test_ioctl test_kqueue
> test_launcher test_msilib test_ossaudiodev test_readline
> test_smtpnet test_socketserver test_startfile test_tcl test_tix
> test_tk test_ttk_guionly test_ttk_textonly test_turtle
> test_urllib2net test_urllibnet test_winconsoleio test_winreg
> test_winsound test_xmlrpc_net test_zipfile64
>
> Total duration: 5 min 3 sec
>
> [YOCTO #13298]
>
> Signed-off-by: Trevor Gamblin 
> ---
>  meta/recipes-core/images/core-image-ptest.bb   | 1 +
>  meta/recipes-devtools/python/python3/run-ptest | 2 +-
>  meta/recipes-devtools/python/python3_3.11.4.bb | 2 +-
>  3 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/meta/recipes-core/images/core-image-ptest.bb 
> b/meta/recipes-core/images/core-image-ptest.bb
> index ddc56c8f9f..74cf933b72 100644
> --- a/meta/recipes-core/images/core-image-ptest.bb
> +++ b/meta/recipes-core/images/core-image-ptest.bb
> @@ -26,6 +26,7 @@ IMAGE_ROOTFS_EXTRA_SPACE:virtclass-mcextend-lttng-tools = 
> "1524288"
>  # ptests need more memory than standard to avoid the OOM killer
>  QB_MEM = "-m 1024"
>  QB_MEM:virtclass-mcextend-lttng-tools = "-m 4096"
> +QB_MEM:virtclass-mcextend-python3 = "-m 2048"
>  QB_MEM:virtclass-mcextend-python3-cryptography = "-m 4096"
>
>  TEST_SUITES = "ping ssh parselogs ptest"
> diff --git a/meta/recipes-devtools/python/python3/run-ptest 
> b/meta/recipes-devtools/python/python3/run-ptest
> index 05396e91ab..ee1130284b 100644
> --- a/meta/recipes-devtools/python/python3/run-ptest
> +++ b/meta/recipes-devtools/python/python3/run-ptest
> @@ -1,3 +1,3 @@
>  #!/bin/sh
>
> -SETUPTOOLS_USE_DISTUTILS=nonlocal python3 -m test -v | sed -u -e '/\.\.\. 
> ok/ s/^/PASS: /g' -r -e '/\.\.\. (ERROR|FAIL)/ s/^/FAIL: /g' -e '/\.\.\. 
> skipped/ s/^/SKIP: /g' -e 's/ \.\.\. ok//g' -e 's/ \.\.\. ERROR//g' -e 's/ 
> \.\.\. FAIL//g' -e 's/ \.\.\. skipped//g'
> +SETUPTOOLS_USE_DISTUTILS=nonlocal python3 -m test -v -j 4 | sed -u -e 
> '/\.\.\. ok/ s/^/PASS: /g' -r -e '/\.\.\. (ERROR|FAIL)/ s/^/FAIL: /g' -e 
> '/\.\.\. skipped/ s/^/SKIP: /g' -e 's/ \.\.\. ok//g' -e 's/ \.\.\. ERROR//g' 
> -e 's/ \.\.\. FAIL//g' -e 's/ \.\.\. skipped//g'
> diff --git a/meta/recipes-devtools/python/python3_3.11.4.bb 
> b/meta/recipes-devtools/python/python3_3.11.4.bb
> index 86ecc4e297..2d7b1bac2c 100644
> --- a/meta/recipes-devtools/python/python3_3.11.4.bb
> +++ b/meta/recipes-devtools/python/python3_3.11.4.bb
> @@ -426,7 +426,7 @@ FILES:${PN}-man = "${datadir}/man"
>  # See https://bugs.python.org/issue18748 and 
> https://bugs.python.org/issue37395
>  RDEPENDS:libpython3:append:libc-glibc = " libgcc"
>  RDEPENDS:${PN}-ctypes:append:libc-glibc = " ${MLPREFIX}ldconfig"
> -RDEPENDS:${PN}-ptest = "${PN}-modules ${PN}-tests ${PN}-dev ${PN}-cgitb 
> ${PN}-zipapp unzip bzip2 libgcc tzdata coreutils sed"
> +RDEPENDS:${PN}-ptest = "${PN}-modules ${PN}-tests ${PN}-dev ${PN}-cgitb 
> ${PN}-zipapp unzip bzip2 libgcc tzdata coreutils sed gcc g++ binutils"
>  RDEPENDS:${PN}-ptest:append:libc-glibc = " locale-base-fr-fr 
> locale-base-en-us locale-base-tr-tr locale-base-de-de"
>  RDEPENDS:${PN}-tkinter += "${@bb.utils.contains('PACKAGECONFIG', 'tk', 
> '${MLPREFIX}tk ${MLPREFIX}tk-lib', '', d)}"
>  RDEPENDS:${PN}-idle += "${@bb.utils.contains('PACKAGECONFIG', 'tk', 
> '${PN}-tkinter ${MLPREFIX}tcl', '', d)}"
> --
> 2.41.0
>
>
> 
>

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#184213): 
https://lists.openembedded.org/g/openembedded-core/message/184213
Mute This Topic: https://lists.openembedded.org/mt/100083497/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-Core][RFC] update-layers: Update layers managed by setup-layers

2023-07-12 Thread Alexander Kanavin
Thanks, perhaps this functionality should simply be folded directly
into bitbake-layers perhaps, as an extension of 'create-layers-setup'?
Does it need to be in a separate script?

Alex

On Wed, 12 Jul 2023 at 20:00, Chuck Wolber  wrote:
>
> I wrote this tool to do automatic updating of layers managed by the 
> setup-layers script. This
> addresses some of the functionality I discussed in my OSSNA 2023 talk.
>
> A detailed explanation of what the following script does is found in the 
> comments, but in
> a nutshell:
>
> * If the --sync-upstream argument is provided, any layers that have remotes 
> called
>   "origin" and "upstream" have upstream changes on their configured branch 
> applied
>   to the origin remote (and local clone).
> * Updates rev and description for all layers managed by setup-layers after 
> pulling
>   the latest changes on the configured branch.
> * Leaves the setup-layers.json file in an updated state so git diff will show 
> changes.
>   Changes can then be reviewed and managed based on local project policy.
>
> I am looking for comments and feedback before I send this as a proper patch.
>
> In particular:
>
> * Are there any problems with this general approach?
> * Should this be managed in OE-Core in the same way setup-layers is?
> * I made some stylistic changes (e.g. main function, --dry-run, etc) that I 
> plan to also patch into
>   setup-layers if this is accepted and there are no objections.
>
>
> ---
>
> #!/usr/bin/env python3
> #
> # Copyright OpenEmbedded Contributors
> #
> # SPDX-License-Identifier: MIT
> #
>
> # This script is idempotent and assumes that the layers it is updating have
> # been managed by setup-layers according to the JSON formatted layers data.
> #
> # For each layer repository in the JSON formatted layers data file:
> #
> # * If remotes named upstream and origin exist and the --sync-upstream 
> argument
> # has been provided, merge upstream changes on the configured branch to the
> # origin remote.
> # * Pull the latest changes on the configured branch from origin.
> # * Update the JSON layers data to reflect the latest layer repo HEAD.
> # * Leave layer repository in an updated state with the configured branch
> # checked out.
> #
> # After reviewing the changes in the JSON layers data file, they can either be
> # committed or reverted. If they are reverted, it will be necessary to re-run
> # setup-layers to ensure your layer repositories reflect the intent captured 
> in
> # the configuration. For the sake of completeness, you may also wish to re-run
> # setup-layers even if you commit the configuration changes, as this script
> # leaves the local layer repo clones checked out to the configured branch 
> rather
> # than the configured rev. The HEAD of the configured branch and the 
> configured
> # rev are identical at the completion of this script, but the latter will be
> # more consistent with expectations established by the setup-layers script.
> #
> # The term "setup-layers" refers to the script found at
> # openembedded-core/scripts/oe-setup-layers. Pass the --help argument to this
> # script for the most up to date usage guidance.
>
> import argparse
> import json
> import os
> import subprocess
>
> def _do_git_command(repodir, command):
> print("Running '{}' in {}".format(command, repodir))
> if not args.dry_run:
> subprocess.check_output(command, shell=True, cwd=repodir)
>
> def _do_git_checkout_branch(repodir, remote, branch):
> _do_git_command(repodir, 'git checkout -B {0} --track {1}/{0} 
> --quiet'.format(branch, remote))
>
> def _do_git_pull(repodir, remote, branch):
> _do_git_fetch(repodir, remote)
> _do_git_merge(repodir, remote, branch)
>
> def _do_git_fetch(repodir, remote):
> _do_git_command(repodir, 'git fetch {} --prune --prune-tags 
> --quiet'.format(remote))
>
> def _do_git_merge(repodir, remote, branch):
> _do_git_command(repodir, 'git merge {}/{} --ff-only 
> --quiet'.format(remote, branch))
>
> def _do_git_force_push(repodir, remote, branch):
> _do_git_command(repodir, 'git push {} heads/{} --force 
> --quiet'.format(remote, branch))
>
> def _get_git_rev(repodir):
> rev = subprocess.check_output("git rev-parse HEAD", shell=True, 
> cwd=repodir, stderr=subprocess.DEVNULL)
> return rev.strip().decode("utf-8")
>
> def _get_git_desc(repodir):
> desc = subprocess.check_output("git describe HEAD --always", shell=True, 
> cwd=repodir, stderr=subprocess.DEVNULL)
> return desc.strip().decode("utf-8")
>
> def _do_sync_upstream(repodir, repo_name, repo_data):
> if not args.sync_upstream:
> return
>
> repo_remote = repo_data['git-remote']
> branch = repo_remote['branch']
> remotes = repo_remote['remotes']
>
> print("Attempting to sync layer repo {} with upstream.".format(repo_name))
>
> if 'origin' not in remotes or 'upstream' not in remotes:
> print("Origin and/or upstream remotes not found on 
> {}".format(repo_name))
> return
>

[OE-Core][RFC] update-layers: Update layers managed by setup-layers

2023-07-12 Thread Chuck Wolber
I wrote this tool to do automatic updating of layers managed by the
setup-layers script. This
addresses some of the functionality I discussed in my OSSNA 2023 talk
.

A detailed explanation of what the following script does is found in the
comments, but in
a nutshell:

* If the --sync-upstream argument is provided, any layers that have remotes
called
  "origin" and "upstream" have upstream changes on their configured branch
applied
  to the origin remote (and local clone).
* Updates rev and description for all layers managed by setup-layers after
pulling
  the latest changes on the configured branch.
* Leaves the setup-layers.json file in an updated state so git diff will
show changes.
  Changes can then be reviewed and managed based on local project policy.

I am looking for comments and feedback before I send this as a proper patch.

In particular:

* Are there any problems with this general approach?
* Should this be managed in OE-Core in the same way setup-layers is?
* I made some stylistic changes (e.g. main function, --dry-run, etc) that I
plan to also patch into
  setup-layers if this is accepted and there are no objections.


---

#!/usr/bin/env python3
#
# Copyright OpenEmbedded Contributors
#
# SPDX-License-Identifier: MIT
#

# This script is idempotent and assumes that the layers it is updating have
# been managed by setup-layers according to the JSON formatted layers data.
#
# For each layer repository in the JSON formatted layers data file:
#
# * If remotes named upstream and origin exist and the --sync-upstream
argument
# has been provided, merge upstream changes on the configured branch to the
# origin remote.
# * Pull the latest changes on the configured branch from origin.
# * Update the JSON layers data to reflect the latest layer repo HEAD.
# * Leave layer repository in an updated state with the configured branch
# checked out.
#
# After reviewing the changes in the JSON layers data file, they can either
be
# committed or reverted. If they are reverted, it will be necessary to
re-run
# setup-layers to ensure your layer repositories reflect the intent
captured in
# the configuration. For the sake of completeness, you may also wish to
re-run
# setup-layers even if you commit the configuration changes, as this script
# leaves the local layer repo clones checked out to the configured branch
rather
# than the configured rev. The HEAD of the configured branch and the
configured
# rev are identical at the completion of this script, but the latter will be
# more consistent with expectations established by the setup-layers script.
#
# The term "setup-layers" refers to the script found at
# openembedded-core/scripts/oe-setup-layers. Pass the --help argument to
this
# script for the most up to date usage guidance.

import argparse
import json
import os
import subprocess

def _do_git_command(repodir, command):
print("Running '{}' in {}".format(command, repodir))
if not args.dry_run:
subprocess.check_output(command, shell=True, cwd=repodir)

def _do_git_checkout_branch(repodir, remote, branch):
_do_git_command(repodir, 'git checkout -B {0} --track {1}/{0}
--quiet'.format(branch, remote))

def _do_git_pull(repodir, remote, branch):
_do_git_fetch(repodir, remote)
_do_git_merge(repodir, remote, branch)

def _do_git_fetch(repodir, remote):
_do_git_command(repodir, 'git fetch {} --prune --prune-tags
--quiet'.format(remote))

def _do_git_merge(repodir, remote, branch):
_do_git_command(repodir, 'git merge {}/{} --ff-only
--quiet'.format(remote, branch))

def _do_git_force_push(repodir, remote, branch):
_do_git_command(repodir, 'git push {} heads/{} --force
--quiet'.format(remote, branch))

def _get_git_rev(repodir):
rev = subprocess.check_output("git rev-parse HEAD", shell=True,
cwd=repodir, stderr=subprocess.DEVNULL)
return rev.strip().decode("utf-8")

def _get_git_desc(repodir):
desc = subprocess.check_output("git describe HEAD --always",
shell=True, cwd=repodir, stderr=subprocess.DEVNULL)
return desc.strip().decode("utf-8")

def _do_sync_upstream(repodir, repo_name, repo_data):
if not args.sync_upstream:
return

repo_remote = repo_data['git-remote']
branch = repo_remote['branch']
remotes = repo_remote['remotes']

print("Attempting to sync layer repo {} with
upstream.".format(repo_name))

if 'origin' not in remotes or 'upstream' not in remotes:
print("Origin and/or upstream remotes not found on
{}".format(repo_name))
return

_do_git_checkout_branch(repodir, 'origin', branch)
_do_git_pull(repodir, 'origin', branch)
_do_git_fetch(repodir, 'upstream')
_do_git_merge(repodir, 'upstream', branch)
_do_git_force_push(repodir, 'origin', branch)

def _do_update_layer_json(repodir, repo_name, layer_data):
print("Updating layer JSON for {} repo.".format(repo_name))
branch = layer_data['sources'][repo_name]['git-remote']['branch']


Re: [OE-Core][PATCH v4 1/5] bitbake.conf: add acl and xattr distro native features support

2023-07-12 Thread Alexander Kanavin
On Wed, 12 Jul 2023 at 19:04, Richard Purdie
 wrote:
> Just to be clear, I know what Alex said but after further thought, acl
> needs to move into DISTRO_FEATURES_NATIVE in my opinion (and Ross'
> too).
>
> I suspect Alex will agree with that too after thinking about the
> arguments I put forward about simplifying sstate reuse.

My comment was strictly about using the best syntactic sugar, and not
about the merits of conditional (or not) enabling of these features.
I'm fine if they're always enabled.

Alex

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#184210): 
https://lists.openembedded.org/g/openembedded-core/message/184210
Mute This Topic: https://lists.openembedded.org/mt/100098283/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] RFE: add 'LAYERDIR_' variable

2023-07-12 Thread Alexander Kanavin
I would generally not want to encourage reuse of recipes this way. If
I have something in my layer I want freedom to change it as I please,
and I don't want to hear complaints that I 'broke' layers I have never
heard about because those layers include bits and pieces of my
recipes. If you want reuse, put the reusable bits into .bbclass.

Alex

On Wed, 12 Jul 2023 at 13:48, Enrico Scholz via lists.openembedded.org
 wrote:
>
> Hi,
>
> currently, it is difficult to reuse recipes from other layers because
> their path is required but not known.  E.g. when one tries to add a
> backported imx-gpu-viv recipe [1] to a local layer by
>
> | require recipes-graphics/imx-gpu-viv/imx-gpu-viv-6.inc
>
> do_fetch() will fail because some SRC_URI can not be resolved.  To
> support this, FILESEXTRAPATHS must contain the path of the original
> recipe.
>
> Determining this path is difficult at the moment, because it is unknown
> and depends on the layout of BBLAYERS.
>
>
> I suggest to add a new standard variable 'LAYERDIR_' which
> points to '${LAYERDIR}' of the layer.  It is probably difficult to set
> it automatically (value of  is not known); instead of, it must
> be defined manually in 'layer.conf' like related variables.
>
> E.g.
>
> | BBFILE_COLLECTIONS += "freescale-layer"
> | BBFILE_PATTERN_freescale-layer := "^${LAYERDIR}/"
> |
> | LAYERDIR_freescale-layer := "${LAYERDIR}"<<
>
> Diagnostic should be easy (iterate over BBFILE_COLLECTIONS and emit
> warning when corresponding 'LAYERDIR_' is undefined).
>
>
> What do you think?
>
>
> Enrico
>
> Footnotes:
> [1]  
> https://github.com/Freescale/meta-freescale/blob/master/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.4.11.p1.0-aarch64.bb
>
> 
>

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#184209): 
https://lists.openembedded.org/g/openembedded-core/message/184209
Mute This Topic: https://lists.openembedded.org/mt/100097753/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-Core][PATCH v4 1/5] bitbake.conf: add acl and xattr distro native features support

2023-07-12 Thread Richard Purdie
On Wed, 2023-07-12 at 14:25 +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 
> ---
>  meta/conf/bitbake.conf | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
> index 9625a6fef4..20684a5126 100644
> --- a/meta/conf/bitbake.conf
> +++ b/meta/conf/bitbake.conf
> @@ -904,12 +904,12 @@ 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"
>  DISTRO_FEATURES_NATIVESDK ?= "x11"
>  
>  # Normally target distro features will not be applied to native builds:
>  # Native distro features on this list will use the target feature value
> -DISTRO_FEATURES_FILTER_NATIVE ?= "api-documentation debuginfod opengl 
> wayland"
> +DISTRO_FEATURES_FILTER_NATIVE ?= "acl api-documentation debuginfod opengl 
> wayland xattr"
>  DISTRO_FEATURES_FILTER_NATIVESDK ?= "api-documentation debuginfod opengl 
> wayland"
>  
>  DISTRO_FEATURES_BACKFILL = "pulseaudio sysvinit gobject-introspection-data 
> ldconfig"

Just to be clear, I know what Alex said but after further thought, acl
needs to move into DISTRO_FEATURES_NATIVE in my opinion (and Ross'
too).

I suspect Alex will agree with that too after thinking about the
arguments I put forward about simplifying sstate reuse.

Cheers,

Richard

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#184208): 
https://lists.openembedded.org/g/openembedded-core/message/184208
Mute This Topic: https://lists.openembedded.org/mt/100098283/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-Core][PATCH v4 2/5] package_ipk.bbclass: add support for ACLs and xattr

2023-07-12 Thread Alexandre Belloni via lists.openembedded.org
I tested a previous version and got:

ERROR: run-postinsts-1.0-r10 do_package_write_ipk: Fatal errors occurred in 
subprocesses:
Command 
'PATH="/home/pokybuild/yocto-worker/poky-tiny/build/build/tmp/sysroots-uninative/x86_64-linux/usr/bin:/home/pokybuild/yocto-worker/poky-tiny/build/scripts:/home/pokybuild/yocto-worker/poky-tiny/build/build/tmp/work/all-poky-linux/run-postinsts/1.0-r10/recipe-sysroot-native/usr/bin/allarch-poky-linux:/home/pokybuild/yocto-worker/poky-tiny/build/build/tmp/work/all-poky-linux/run-postinsts/1.0-r10/recipe-sysroot/usr/bin/crossscripts:/home/pokybuild/yocto-worker/poky-tiny/build/build/tmp/work/all-poky-linux/run-postinsts/1.0-r10/recipe-sysroot-native/usr/sbin:/home/pokybuild/yocto-worker/poky-tiny/build/build/tmp/work/all-poky-linux/run-postinsts/1.0-r10/recipe-sysroot-native/usr/bin:/home/pokybuild/yocto-worker/poky-tiny/build/build/tmp/work/all-poky-linux/run-postinsts/1.0-r10/recipe-sysroot-native/sbin:/home/pokybuild/yocto-worker/poky-tiny/build/build/tmp/work/all-poky-linux/run-postinsts/1.0-r10/recipe-sysroot-native/bin:/home/pokybuild/yocto-worker/poky-tiny/build/bitbake/bin:/home/pokybuild/yocto-worker/poky-tiny/build/build/tmp/hosttools"
 opkg-build -Z xz -a "--memlimit=5% --threads=8" "" "" run-postinsts 
/home/pokybuild/yocto-worker/poky-tiny/build/build/tmp/work/all-poky-linux/run-postinsts/1.0-r10/deploy-ipks/all'
 returned non-zero exit status 1.
Subprocess output:Usage: 
/home/pokybuild/yocto-worker/poky-tiny/build/build/tmp/work/all-poky-linux/run-postinsts/1.0-r10/recipe-sysroot-native/usr/bin/opkg-build
 [-c] [-C] [-Z compressor] [-a compressor_args] [-O] [-o owner] [-g group] 
 []
Command 
'PATH="/home/pokybuild/yocto-worker/poky-tiny/build/build/tmp/sysroots-uninative/x86_64-linux/usr/bin:/home/pokybuild/yocto-worker/poky-tiny/build/scripts:/home/pokybuild/yocto-worker/poky-tiny/build/build/tmp/work/all-poky-linux/run-postinsts/1.0-r10/recipe-sysroot-native/usr/bin/allarch-poky-linux:/home/pokybuild/yocto-worker/poky-tiny/build/build/tmp/work/all-poky-linux/run-postinsts/1.0-r10/recipe-sysroot/usr/bin/crossscripts:/home/pokybuild/yocto-worker/poky-tiny/build/build/tmp/work/all-poky-linux/run-postinsts/1.0-r10/recipe-sysroot-native/usr/sbin:/home/pokybuild/yocto-worker/poky-tiny/build/build/tmp/work/all-poky-linux/run-postinsts/1.0-r10/recipe-sysroot-native/usr/bin:/home/pokybuild/yocto-worker/poky-tiny/build/build/tmp/work/all-poky-linux/run-postinsts/1.0-r10/recipe-sysroot-native/sbin:/home/pokybuild/yocto-worker/poky-tiny/build/build/tmp/work/all-poky-linux/run-postinsts/1.0-r10/recipe-sysroot-native/bin:/home/pokybuild/yocto-worker/poky-tiny/build/bitbake/bin:/home/pokybuild/yocto-worker/poky-tiny/build/build/tmp/hosttools"
 opkg-build -Z xz -a "--memlimit=5% --threads=8" "" "" run-postinsts-dev 
/home/pokybuild/yocto-worker/poky-tiny/build/build/tmp/work/all-poky-linux/run-postinsts/1.0-r10/deploy-ipks/all'
 returned non-zero exit status 1.
Subprocess output:Usage: 
/home/pokybuild/yocto-worker/poky-tiny/build/build/tmp/work/all-poky-linux/run-postinsts/1.0-r10/recipe-sysroot-native/usr/bin/opkg-build
 [-c] [-C] [-Z compressor] [-a compressor_args] [-O] [-o owner] [-g group] 
 []
Command 
'PATH="/home/pokybuild/yocto-worker/poky-tiny/build/build/tmp/sysroots-uninative/x86_64-linux/usr/bin:/home/pokybuild/yocto-worker/poky-tiny/build/scripts:/home/pokybuild/yocto-worker/poky-tiny/build/build/tmp/work/all-poky-linux/run-postinsts/1.0-r10/recipe-sysroot-native/usr/bin/allarch-poky-linux:/home/pokybuild/yocto-worker/poky-tiny/build/build/tmp/work/all-poky-linux/run-postinsts/1.0-r10/recipe-sysroot/usr/bin/crossscripts:/home/pokybuild/yocto-worker/poky-tiny/build/build/tmp/work/all-poky-linux/run-postinsts/1.0-r10/recipe-sysroot-native/usr/sbin:/home/pokybuild/yocto-worker/poky-tiny/build/build/tmp/work/all-poky-linux/run-postinsts/1.0-r10/recipe-sysroot-native/usr/bin:/home/pokybuild/yocto-worker/poky-tiny/build/build/tmp/work/all-poky-linux/run-postinsts/1.0-r10/recipe-sysroot-native/sbin:/home/pokybuild/yocto-worker/poky-tiny/build/build/tmp/work/all-poky-linux/run-postinsts/1.0-r10/recipe-sysroot-native/bin:/home/pokybuild/yocto-worker/poky-tiny/build/bitbake/bin:/home/pokybuild/yocto-worker/poky-tiny/build/build/tmp/hosttools"
 opkg-build -Z xz -a "--memlimit=5% --threads=8" "" "" run-postinsts-dbg 
/home/pokybuild/yocto-worker/poky-tiny/build/build/tmp/work/all-poky-linux/run-postinsts/1.0-r10/deploy-ipks/all'
 returned non-zero exit status 1.
Subprocess output:Usage: 
/home/pokybuild/yocto-worker/poky-tiny/build/build/tmp/work/all-poky-linux/run-postinsts/1.0-r10/recipe-sysroot-native/usr/bin/opkg-build
 [-c] [-C] [-Z compressor] [-a compressor_args] [-O] [-o owner] [-g group] 
 []


any chance this is solved in v4?

On 12/07/2023 14:25:55+0200, Piotr Łobacz wrote:
> Extend OPKGBUILDCMD variable, with additional parameters, depending
> on target distro features, in order to support ACLs and xattr.
> 
> With fix pushed to the opkg-devel:
> 

Re: [OE-core] [PATCH 1/2] tunes: Add support for sve instructions on armv8/armv9

2023-07-12 Thread Khem Raj
On Wed, Jul 12, 2023 at 3:29 AM Ross Burton  wrote:
>
> On 11 Jul 2023, at 21:10, Khem Raj via lists.openembedded.org 
>  wrote:
> >
> > This helps in defining correct compiler options and configure options
> > for glibc and overall ABI for toolchain
>
> Given this, shouldn’t the glibc patch respect the tune flags instead of 
> forcibly turning sve off?

It will as a follow up.

>
> Ross

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#184206): 
https://lists.openembedded.org/g/openembedded-core/message/184206
Mute This Topic: https://lists.openembedded.org/mt/100086804/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core][dunfell][PATCH v2] curl: fix CVE-2023-28320 siglongjmp race condition may lead to crash

2023-07-12 Thread vkumbhar
Okay, sure.

Kind regards,
Vivek


On Wed, Jul 12, 2023 at 9:12 PM Steve Sakoman  wrote:

> Hi Vivek,
>
> Sorry I didn't notice this earlier, but we already have a fix for this
> CVE in kirkstone:
>
>
> https://git.openembedded.org/openembedded-core/commit/?h=kirkstone=c761d822be5ffc4a88600fbd7282c469b1e9902a
>
> However it seems from your work that a follow on patch is also
> necessary to fix this issue completely.
>
> Could you submit a v3 that takes into account the above commit?
>
> Thanks,
>
> Steve
>
> On Wed, Jul 12, 2023 at 12:17 AM vkumbhar  wrote:
> >
> > Introduced by:
> https://github.com/curl/curl/commit/3c49b405de4fbf1fd7127f91908261268640e54f
> (curl-7_9_8)
> > Fixed by:
> https://github.com/curl/curl/commit/13718030ad4b3209a7583b4f27f683cd3a6fa5f2
> (curl-8_1_0)
> > Follow-up:
> https://github.com/curl/curl/commit/f446258f0269a62289cca0210157cb8558d0edc3
> (curl-8_1_0)
> > https://curl.se/docs/CVE-2023-28320.html
> >
> > Signed-off-by: Vivek Kumbhar 
> > ---
> >  .../curl/curl/CVE-2023-28320-fol1.patch   | 197 ++
> >  .../curl/curl/CVE-2023-28320.patch|  86 
> >  meta/recipes-support/curl/curl_7.69.1.bb  |   2 +
> >  3 files changed, 285 insertions(+)
> >  create mode 100644
> meta/recipes-support/curl/curl/CVE-2023-28320-fol1.patch
> >  create mode 100644 meta/recipes-support/curl/curl/CVE-2023-28320.patch
> >
> > diff --git a/meta/recipes-support/curl/curl/CVE-2023-28320-fol1.patch
> b/meta/recipes-support/curl/curl/CVE-2023-28320-fol1.patch
> > new file mode 100644
> > index 00..eaa6fdc327
> > --- /dev/null
> > +++ b/meta/recipes-support/curl/curl/CVE-2023-28320-fol1.patch
> > @@ -0,0 +1,197 @@
> > +From f446258f0269a62289cca0210157cb8558d0edc3 Mon Sep 17 00:00:00 2001
> > +From: Daniel Stenberg 
> > +Date: Tue, 16 May 2023 23:40:42 +0200
> > +Subject: [PATCH] hostip: include easy_lock.h before using
> > + GLOBAL_INIT_IS_THREADSAFE
> > +
> > +Since that header file is the only place that define can be defined.
> > +
> > +Reported-by: Marc Deslauriers
> > +
> > +Follow-up to 13718030ad4b3209
> > +
> > +Closes #11121
> > +
> > +Upstream-Status: Backport [
> https://github.com/curl/curl/commit/f446258f0269a62289cca0210157cb8558d0edc3
> ]
> > +CVE: CVE-2023-28320
> > +Signed-off-by: Vivek Kumbhar 
> > +---
> > + lib/easy_lock.h | 109 
> > + lib/hostip.c|  10 ++---
> > + lib/hostip.h|   9 
> > + 3 files changed, 113 insertions(+), 15 deletions(-)
> > + create mode 100644 lib/easy_lock.h
> > +
> > +diff --git a/lib/easy_lock.h b/lib/easy_lock.h
> > +new file mode 100644
> > +index 000..6399a39
> > +--- /dev/null
> >  b/lib/easy_lock.h
> > +@@ -0,0 +1,109 @@
> > ++#ifndef HEADER_CURL_EASY_LOCK_H
> > ++#define HEADER_CURL_EASY_LOCK_H
> >
> ++/***
> > ++ *  _   _   _
> > ++ *  Project ___| | | |  _ \| |
> > ++ * / __| | | | |_) | |
> > ++ *| (__| |_| |  _ <| |___
> > ++ * \___|\___/|_| \_\_|
> > ++ *
> > ++ * Copyright (C) Daniel Stenberg, , et al.
> > ++ *
> > ++ * This software is licensed as described in the file COPYING, which
> > ++ * you should have received as part of this distribution. The terms
> > ++ * are also available at https://curl.se/docs/copyright.html.
> > ++ *
> > ++ * You may opt to use, copy, modify, merge, publish, distribute and/or
> sell
> > ++ * copies of the Software, and permit persons to whom the Software is
> > ++ * furnished to do so, under the terms of the COPYING file.
> > ++ *
> > ++ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY
> OF ANY
> > ++ * KIND, either express or implied.
> > ++ *
> > ++ * SPDX-License-Identifier: curl
> > ++ *
> > ++
> ***/
> > ++
> > ++#include "curl_setup.h"
> > ++
> > ++#define GLOBAL_INIT_IS_THREADSAFE
> > ++
> > ++#if defined(_WIN32_WINNT) && _WIN32_WINNT >= 0x600
> > ++
> > ++#ifdef __MINGW32__
> > ++#ifndef __MINGW64_VERSION_MAJOR
> > ++#if (__MINGW32_MAJOR_VERSION < 5) || \
> > ++(__MINGW32_MAJOR_VERSION == 5 && __MINGW32_MINOR_VERSION == 0)
> > ++/* mingw >= 5.0.1 defines SRWLOCK, and slightly different from MS
> define */
> > ++typedef PVOID SRWLOCK, *PSRWLOCK;
> > ++#endif
> > ++#endif
> > ++#ifndef SRWLOCK_INIT
> > ++#define SRWLOCK_INIT NULL
> > ++#endif
> > ++#endif /* __MINGW32__ */
> > ++
> > ++#define curl_simple_lock SRWLOCK
> > ++#define CURL_SIMPLE_LOCK_INIT SRWLOCK_INIT
> > ++
> > ++#define curl_simple_lock_lock(m) AcquireSRWLockExclusive(m)
> > ++#define curl_simple_lock_unlock(m) ReleaseSRWLockExclusive(m)
> > ++
> > ++#elif defined(HAVE_ATOMIC) && defined(HAVE_STDATOMIC_H)
> > ++#include 
> > ++#if defined(HAVE_SCHED_YIELD)
> > ++#include 
> > ++#endif
> > ++
> > ++#define 

[OE-core] [PATCH] libexif: add ptest support

2023-07-12 Thread Julien Stephan
adds ptest support for libexif

Ptest was executed on a core-image-minimal:
root@qemux86-64:~# ptest-runner libexif
START: ptest-runner
2023-07-12T15:45
BEGIN: /usr/lib/libexif/ptest
[...]
i
All 13 tests passed
(1 test was not run)

[...]
DURATION: 35
END: /usr/lib/libexif/ptest
2023-07-12T15:45
STOP: ptest-runner
TOTAL: 1 FAIL: 0

Signed-off-by: Julien Stephan 
---
 .../distro/include/ptest-packagelists.inc |  1 +
 ...-serial-tests-config-needed-by-ptest.patch | 26 
 .../recipes-support/libexif/libexif/run-ptest |  3 ++
 .../recipes-support/libexif/libexif_0.6.24.bb | 30 ++-
 4 files changed, 59 insertions(+), 1 deletion(-)
 create mode 100644 
meta/recipes-support/libexif/libexif/0001-Add-serial-tests-config-needed-by-ptest.patch
 create mode 100644 meta/recipes-support/libexif/libexif/run-ptest

diff --git a/meta/conf/distro/include/ptest-packagelists.inc 
b/meta/conf/distro/include/ptest-packagelists.inc
index da9153b998c..aa409bbf998 100644
--- a/meta/conf/distro/include/ptest-packagelists.inc
+++ b/meta/conf/distro/include/ptest-packagelists.inc
@@ -75,6 +75,7 @@ PTESTS_FAST = "\
 slang \
 wayland \
 zlib \
+libexif \
 "
 PTESTS_FAST:append:libc-glibc = " glibc-tests"
 PTESTS_PROBLEMS:remove:libc-glibc = "glibc-tests"
diff --git 
a/meta/recipes-support/libexif/libexif/0001-Add-serial-tests-config-needed-by-ptest.patch
 
b/meta/recipes-support/libexif/libexif/0001-Add-serial-tests-config-needed-by-ptest.patch
new file mode 100644
index 000..505aa073309
--- /dev/null
+++ 
b/meta/recipes-support/libexif/libexif/0001-Add-serial-tests-config-needed-by-ptest.patch
@@ -0,0 +1,26 @@
+From 1ee7217c8ae724d793f9a9876c3608057a2ccbf8 Mon Sep 17 00:00:00 2001
+From: Julien Stephan 
+Date: Tue, 11 Jul 2023 16:07:54 +0200
+Subject: [PATCH] Add serial-tests config needed by ptest
+
+Add serial-tests support, ptest needs it.
+
+Upstream-Status: Inappropriate [oe specific]
+
+Signed-off-by: Julien Stephan 
+---
+ configure.ac | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/configure.ac b/configure.ac
+index cd48047..5413907 100644
+--- a/configure.ac
 b/configure.ac
+@@ -16,6 +16,7 @@ AM_INIT_AUTOMAKE([
+   dist-zip
+   check-news
+   subdir-objects
++  serial-tests
+ ])
+ AM_MAINTAINER_MODE
+ 
diff --git a/meta/recipes-support/libexif/libexif/run-ptest 
b/meta/recipes-support/libexif/libexif/run-ptest
new file mode 100644
index 000..2d23159eb03
--- /dev/null
+++ b/meta/recipes-support/libexif/libexif/run-ptest
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+make -o Makefile runtest-TESTS
diff --git a/meta/recipes-support/libexif/libexif_0.6.24.bb 
b/meta/recipes-support/libexif/libexif_0.6.24.bb
index 367f012f8cf..27e369a89a5 100644
--- a/meta/recipes-support/libexif/libexif_0.6.24.bb
+++ b/meta/recipes-support/libexif/libexif_0.6.24.bb
@@ -11,12 +11,40 @@ def version_underscore(v):
 return "_".join(v.split("."))
 
 SRC_URI = "${GITHUB_BASE_URI}/download/v${PV}/libexif-${PV}.tar.bz2 \
+   file://0001-Add-serial-tests-config-needed-by-ptest.patch \
+   file://run-ptest \
"
 
 SRC_URI[sha256sum] = 
"d47564c433b733d83b6704c70477e0a4067811d184ec565258ac563d8223f6ae"
 
-inherit autotools gettext github-releases
+inherit autotools gettext github-releases ptest
 
 EXTRA_OECONF += "--disable-docs"
 
+do_compile_ptest() {
+oe_runmake -C test buildtest-TESTS
+}
+
+do_install_ptest() {
+install ${B}/test/test*[!\.o] ${D}${PTEST_PATH}
+for f in ${D}${PTEST_PATH}/test*; do
+sed -i "s/\(LD_LIBRARY_PATH=\).*\(:\$LD_LIBRARY_PATH\)\"/\1.\2/" $f
+done
+
+install ${B}/test/Makefile ${D}${PTEST_PATH}
+sed -i -e "/^srcdir/c srcdir = \$\{PWD\}" ${D}${PTEST_PATH}/Makefile
+
+install -d ${D}${PTEST_PATH}/nls
+install ${B}/test/nls/*[!\.o] ${D}${PTEST_PATH}/nls
+install -d ${D}${PTEST_PATH}/.libs
+install ${B}/test/.libs/* ${D}${PTEST_PATH}/.libs
+
+install ${S}/test/*.sh ${D}${PTEST_PATH}
+
+install -d ${D}${PTEST_PATH}/testdata
+install ${S}/test/testdata/* ${D}${PTEST_PATH}/testdata
+}
+
+RDEPENDS:${PN}-ptest += "make bash"
+
 BBCLASSEXTEND = "native nativesdk"
-- 
2.41.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#184204): 
https://lists.openembedded.org/g/openembedded-core/message/184204
Mute This Topic: https://lists.openembedded.org/mt/100102423/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH 0/1] Add ptest support for libexif

2023-07-12 Thread Julien Stephan
Hi all,

This series add ptest support for libexif.

This series depend on [1]. This fix is required here because one of the
test program, listed in check_PROGRAMS is not listed in TESTS, because
it is called through a wrapper script. So we are missing one binary and
we get a runtime error.

Ptest was executed on a core-image-minimal:
root@qemux86-64:~# ptest-runner libexif
START: ptest-runner
2023-07-12T15:45
BEGIN: /usr/lib/libexif/ptest
[...]
i
All 13 tests passed
(1 test was not run)

[...]
DURATION: 35
END: /usr/lib/libexif/ptest
2023-07-12T15:45
STOP: ptest-runner
TOTAL: 1 FAIL: 0

My working branch is [2]

Best
Julien

[1]: https://lists.openembedded.org/g/openembedded-core/message/184201
[2]: 
https://git.yoctoproject.org/poky-contrib/log/?h=jstephan/add-libexif-ptest-support

Julien Stephan (1):
  libexif: add ptest support

 .../distro/include/ptest-packagelists.inc |  1 +
 ...-serial-tests-config-needed-by-ptest.patch | 26 
 .../recipes-support/libexif/libexif/run-ptest |  3 ++
 .../recipes-support/libexif/libexif_0.6.24.bb | 30 ++-
 4 files changed, 59 insertions(+), 1 deletion(-)
 create mode 100644 
meta/recipes-support/libexif/libexif/0001-Add-serial-tests-config-needed-by-ptest.patch
 create mode 100644 meta/recipes-support/libexif/libexif/run-ptest

--
2.41.0

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#184203): 
https://lists.openembedded.org/g/openembedded-core/message/184203
Mute This Topic: https://lists.openembedded.org/mt/100102422/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core][dunfell][PATCH v2] curl: fix CVE-2023-28320 siglongjmp race condition may lead to crash

2023-07-12 Thread Steve Sakoman
Hi Vivek,

Sorry I didn't notice this earlier, but we already have a fix for this
CVE in kirkstone:

https://git.openembedded.org/openembedded-core/commit/?h=kirkstone=c761d822be5ffc4a88600fbd7282c469b1e9902a

However it seems from your work that a follow on patch is also
necessary to fix this issue completely.

Could you submit a v3 that takes into account the above commit?

Thanks,

Steve

On Wed, Jul 12, 2023 at 12:17 AM vkumbhar  wrote:
>
> Introduced by: 
> https://github.com/curl/curl/commit/3c49b405de4fbf1fd7127f91908261268640e54f 
> (curl-7_9_8)
> Fixed by: 
> https://github.com/curl/curl/commit/13718030ad4b3209a7583b4f27f683cd3a6fa5f2 
> (curl-8_1_0)
> Follow-up: 
> https://github.com/curl/curl/commit/f446258f0269a62289cca0210157cb8558d0edc3 
> (curl-8_1_0)
> https://curl.se/docs/CVE-2023-28320.html
>
> Signed-off-by: Vivek Kumbhar 
> ---
>  .../curl/curl/CVE-2023-28320-fol1.patch   | 197 ++
>  .../curl/curl/CVE-2023-28320.patch|  86 
>  meta/recipes-support/curl/curl_7.69.1.bb  |   2 +
>  3 files changed, 285 insertions(+)
>  create mode 100644 meta/recipes-support/curl/curl/CVE-2023-28320-fol1.patch
>  create mode 100644 meta/recipes-support/curl/curl/CVE-2023-28320.patch
>
> diff --git a/meta/recipes-support/curl/curl/CVE-2023-28320-fol1.patch 
> b/meta/recipes-support/curl/curl/CVE-2023-28320-fol1.patch
> new file mode 100644
> index 00..eaa6fdc327
> --- /dev/null
> +++ b/meta/recipes-support/curl/curl/CVE-2023-28320-fol1.patch
> @@ -0,0 +1,197 @@
> +From f446258f0269a62289cca0210157cb8558d0edc3 Mon Sep 17 00:00:00 2001
> +From: Daniel Stenberg 
> +Date: Tue, 16 May 2023 23:40:42 +0200
> +Subject: [PATCH] hostip: include easy_lock.h before using
> + GLOBAL_INIT_IS_THREADSAFE
> +
> +Since that header file is the only place that define can be defined.
> +
> +Reported-by: Marc Deslauriers
> +
> +Follow-up to 13718030ad4b3209
> +
> +Closes #11121
> +
> +Upstream-Status: Backport 
> [https://github.com/curl/curl/commit/f446258f0269a62289cca0210157cb8558d0edc3]
> +CVE: CVE-2023-28320
> +Signed-off-by: Vivek Kumbhar 
> +---
> + lib/easy_lock.h | 109 
> + lib/hostip.c|  10 ++---
> + lib/hostip.h|   9 
> + 3 files changed, 113 insertions(+), 15 deletions(-)
> + create mode 100644 lib/easy_lock.h
> +
> +diff --git a/lib/easy_lock.h b/lib/easy_lock.h
> +new file mode 100644
> +index 000..6399a39
> +--- /dev/null
>  b/lib/easy_lock.h
> +@@ -0,0 +1,109 @@
> ++#ifndef HEADER_CURL_EASY_LOCK_H
> ++#define HEADER_CURL_EASY_LOCK_H
> ++/***
> ++ *  _   _   _
> ++ *  Project ___| | | |  _ \| |
> ++ * / __| | | | |_) | |
> ++ *| (__| |_| |  _ <| |___
> ++ * \___|\___/|_| \_\_|
> ++ *
> ++ * Copyright (C) Daniel Stenberg, , et al.
> ++ *
> ++ * This software is licensed as described in the file COPYING, which
> ++ * you should have received as part of this distribution. The terms
> ++ * are also available at https://curl.se/docs/copyright.html.
> ++ *
> ++ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
> ++ * copies of the Software, and permit persons to whom the Software is
> ++ * furnished to do so, under the terms of the COPYING file.
> ++ *
> ++ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
> ++ * KIND, either express or implied.
> ++ *
> ++ * SPDX-License-Identifier: curl
> ++ *
> ++ 
> ***/
> ++
> ++#include "curl_setup.h"
> ++
> ++#define GLOBAL_INIT_IS_THREADSAFE
> ++
> ++#if defined(_WIN32_WINNT) && _WIN32_WINNT >= 0x600
> ++
> ++#ifdef __MINGW32__
> ++#ifndef __MINGW64_VERSION_MAJOR
> ++#if (__MINGW32_MAJOR_VERSION < 5) || \
> ++(__MINGW32_MAJOR_VERSION == 5 && __MINGW32_MINOR_VERSION == 0)
> ++/* mingw >= 5.0.1 defines SRWLOCK, and slightly different from MS define */
> ++typedef PVOID SRWLOCK, *PSRWLOCK;
> ++#endif
> ++#endif
> ++#ifndef SRWLOCK_INIT
> ++#define SRWLOCK_INIT NULL
> ++#endif
> ++#endif /* __MINGW32__ */
> ++
> ++#define curl_simple_lock SRWLOCK
> ++#define CURL_SIMPLE_LOCK_INIT SRWLOCK_INIT
> ++
> ++#define curl_simple_lock_lock(m) AcquireSRWLockExclusive(m)
> ++#define curl_simple_lock_unlock(m) ReleaseSRWLockExclusive(m)
> ++
> ++#elif defined(HAVE_ATOMIC) && defined(HAVE_STDATOMIC_H)
> ++#include 
> ++#if defined(HAVE_SCHED_YIELD)
> ++#include 
> ++#endif
> ++
> ++#define curl_simple_lock atomic_int
> ++#define CURL_SIMPLE_LOCK_INIT 0
> ++
> ++/* a clang-thing */
> ++#ifndef __has_builtin
> ++#define __has_builtin(x) 0
> ++#endif
> ++
> ++#ifndef __INTEL_COMPILER
> ++/* The Intel compiler tries to look like GCC *and* clang *and* lies in its
> ++   __has_builtin() function, so override it. */
> ++
> ++/* if GCC on 

[OE-core] [PATCH] automake: fix buildtest patch

2023-07-12 Thread Julien Stephan
Add check_PROGRAMS as a dependency of buildtest-TESTS target.
This is required because according to the official automake
documentation [1]:
* TESTS: contains all the tests files
* check_PROGRAMS: contains the programs used by the tests
* check_PROGRAMS is not automatically added to TESTS

So, by using only TESTS as a dependency for buildtest-TESTS we may end
up having runtime errors because of missing program required by the
tests.

[1]: 
https://www.gnu.org/software/automake/manual/html_node/Scripts_002dbased-Testsuites.html

Signed-off-by: Julien Stephan 
---
 meta/recipes-devtools/automake/automake/buildtest.patch | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-devtools/automake/automake/buildtest.patch 
b/meta/recipes-devtools/automake/automake/buildtest.patch
index b88b9e86938..c43a4ac8f37 100644
--- a/meta/recipes-devtools/automake/automake/buildtest.patch
+++ b/meta/recipes-devtools/automake/automake/buildtest.patch
@@ -36,7 +36,7 @@ index e0db651..de137fa 100644
 -check-TESTS: $(TESTS)
 +AM_RECURSIVE_TARGETS += buildtest runtest
 +
-+buildtest-TESTS: $(TESTS)
++buildtest-TESTS: $(TESTS) $(check_PROGRAMS)
 +
 +check-TESTS: buildtest-TESTS
 +  $(MAKE) $(AM_MAKEFLAGS) runtest-TESTS
-- 
2.41.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#184201): 
https://lists.openembedded.org/g/openembedded-core/message/184201
Mute This Topic: https://lists.openembedded.org/mt/100099853/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-Core][PATCH 1/3] bitbake.conf: add acl and xattr distro native features support

2023-07-12 Thread Richard Purdie
On Wed, 2023-07-12 at 12:50 +, Ross Burton wrote:
> On 12 Jul 2023, at 13:38, Piotr Łobacz via 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

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#184200): 
https://lists.openembedded.org/g/openembedded-core/message/184200
Mute This Topic: https://lists.openembedded.org/mt/100098621/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-Core][PATCH 1/3] bitbake.conf: add acl and xattr distro native features support

2023-07-12 Thread Piotr Łobacz
Ok i’ll change that than.

BR
Piotr

Wysyłane z aplikacji Outlook dla systemu iOS

Od: Ross Burton 
Wysłane: Wednesday, July 12, 2023 2:50:54 PM
Do: Piotr Łobacz 
DW: Richard Purdie ; 
openembedded-core@lists.openembedded.org 

Temat: Re: [OE-Core][PATCH 1/3] bitbake.conf: add acl and xattr distro native 
features support

On 12 Jul 2023, at 13:38, Piotr Łobacz via 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

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#184199): 
https://lists.openembedded.org/g/openembedded-core/message/184199
Mute This Topic: https://lists.openembedded.org/mt/100098621/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-Core][PATCH 1/3] bitbake.conf: add acl and xattr distro native features support

2023-07-12 Thread Ross Burton
On 12 Jul 2023, at 13:38, Piotr Łobacz via 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
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#184198): 
https://lists.openembedded.org/g/openembedded-core/message/184198
Mute This Topic: https://lists.openembedded.org/mt/100098621/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



ODP: ODP: ODP: [OE-Core][PATCH 1/3] bitbake.conf: add acl and xattr distro native features support

2023-07-12 Thread Piotr Łobacz
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

Od: Richard Purdie 
Wysłane: środa, 12 lipca 2023 14:35
Do: Piotr Łobacz ; 
openembedded-core@lists.openembedded.org 

Temat: Re: ODP: ODP: [OE-Core][PATCH 1/3] bitbake.conf: add acl and xattr 
distro native features support

On Wed, 2023-07-12 at 12:32 +, 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

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#184197): 
https://lists.openembedded.org/g/openembedded-core/message/184197
Mute This Topic: https://lists.openembedded.org/mt/100098462/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: ODP: ODP: [OE-Core][PATCH 1/3] bitbake.conf: add acl and xattr distro native features support

2023-07-12 Thread Richard Purdie
On Wed, 2023-07-12 at 12:32 +, 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

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#184196): 
https://lists.openembedded.org/g/openembedded-core/message/184196
Mute This Topic: https://lists.openembedded.org/mt/100098370/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



ODP: ODP: [OE-Core][PATCH 1/3] bitbake.conf: add acl and xattr distro native features support

2023-07-12 Thread Piotr Łobacz
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


Od: Richard Purdie 
Wysłane: środa, 12 lipca 2023 14:29
Do: Piotr Łobacz ; 
openembedded-core@lists.openembedded.org 

Temat: Re: ODP: [OE-Core][PATCH 1/3] bitbake.conf: add acl and xattr distro 
native features support

On Wed, 2023-07-12 at 12:18 +, 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

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#184195): 
https://lists.openembedded.org/g/openembedded-core/message/184195
Mute This Topic: https://lists.openembedded.org/mt/100098370/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: ODP: [OE-Core][PATCH 1/3] bitbake.conf: add acl and xattr distro native features support

2023-07-12 Thread Richard Purdie
On Wed, 2023-07-12 at 12:18 +, 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

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#184194): 
https://lists.openembedded.org/g/openembedded-core/message/184194
Mute This Topic: https://lists.openembedded.org/mt/100098166/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-Core][PATCH v4 4/5] opkg-utils: add acl and xattr support

2023-07-12 Thread Piotr Łobacz
Add support for tar archives created with --acls and/or --xattrs options,
PAX header format.

GNU tar and libarchive already supports ACLs and extended attributes.
We can now add this support as well to opkg-build script in order to use
fsetattr or setcap inside do_install command and end up with a file in
an image with the relevant ACLs and xattrs.

Signed-off-by: Piotr Łobacz 
---
 ...kg-build-Add-acls-and-xattrs-support.patch | 80 +++
 .../opkg-utils/opkg-utils_0.5.0.bb|  1 +
 2 files changed, 81 insertions(+)
 create mode 100644 
meta/recipes-devtools/opkg-utils/opkg-utils/0002-opkg-build-Add-acls-and-xattrs-support.patch

diff --git 
a/meta/recipes-devtools/opkg-utils/opkg-utils/0002-opkg-build-Add-acls-and-xattrs-support.patch
 
b/meta/recipes-devtools/opkg-utils/opkg-utils/0002-opkg-build-Add-acls-and-xattrs-support.patch
new file mode 100644
index 00..a9e5f0e191
--- /dev/null
+++ 
b/meta/recipes-devtools/opkg-utils/opkg-utils/0002-opkg-build-Add-acls-and-xattrs-support.patch
@@ -0,0 +1,80 @@
+From 5664c17923cc1ab9644ef01f549bc8d352dd8868 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Piotr=20=C5=81obacz?= 
+Date: Wed, 5 Jul 2023 10:31:13 +0200
+Subject: [PATCH] opkg-build: Add acls and xattrs support
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Add support for tar archives created with --acls and/or --xattrs options,
+PAX header format.
+
+GNU tar and libarchive already supports ACLs and extended attributes.
+We can now add this support as well to opkg-build script in order to use
+fsetattr or setcap inside do_install command and end up with a file in
+an image with the relevant ACLs and xattrs.
+
+Upstream-Status: Accepted 
[https://groups.google.com/g/opkg-devel/c/dYNHrLjDwg8]
+
+[1] https://bugzilla.yoctoproject.org/show_bug.cgi?id=15097
+[2] https://groups.google.com/g/opkg-devel/c/aEGL7XRXfaA
+
+Signed-off-by: Piotr Łobacz 
+---
+ opkg-build | 15 ++-
+ 1 file changed, 10 insertions(+), 5 deletions(-)
+
+diff --git a/opkg-build b/opkg-build
+index a9e45d4..8d9bcfa 100755
+--- a/opkg-build
 b/opkg-build
+@@ -145,6 +145,7 @@ You probably want to chown these to a system user: " >&2
+ ###
+ # opkg-build "main"
+ ###
++attributesargs=""
+ ogargs=""
+ outer=ar
+ noclean=0
+@@ -166,7 +167,7 @@ compressorargs=""
+ tarformat=""
+ if tar --help 2>&1 | grep -- "--format" > /dev/null;
+ then
+-tarformat="--format=gnu"
++tarformat="--format=posix"
+ fi
+ 
+ compressor_ext() {
+@@ -197,13 +198,17 @@ compressor_ext() {
+ : <<=cut
+ =head1 SYNOPSIS
+ 
+-B [B<-c>] [B<-C>] [B<-Z> I] [B<-a>] [B<-O>] [B<-o> 
I] [B<-g> I] I [I]
++B [B<-A>] [B<-X>] [B<-c>] [B<-C>] [B<-Z> I] [B<-a>] 
[B<-O>] [B<-o> I] [B<-g> I] I 
[I]
+ 
+ =cut
+ 
+-usage="Usage: $0 [-c] [-C] [-Z compressor] [-a compressor_args] [-O] [-o 
owner] [-g group]  []"
+-while getopts "a:cCg:ho:vOZ:" opt; do
++usage="Usage: $0 [-A] [-X] [-c] [-C] [-Z compressor] [-a compressor_args] 
[-O] [-o owner] [-g group]  []"
++while getopts "Aa:cCg:ho:vOXZ:" opt; do
+ case $opt in
++A ) attributesargs="--acls"
++;;
++X ) attributesargs="$attributesargs --xattrs"
++;;
+   o ) owner=$OPTARG
+   ogargs="--owner=$owner"
+   ;;
+@@ -314,7 +319,7 @@ export LANG=C
+ export LC_ALL=C
+ ( cd $pkg_dir/$CONTROL && find . -type f | sort > $tmp_dir/control_list )
+ ( cd $pkg_dir && find . -path ./$CONTROL -prune -o -path . -o -print  | sort 
> $tmp_dir/file_list )
+-( cd $pkg_dir && tar $ogargs $tsortargs --no-recursion $mtime_args -c 
$tarformat -T $tmp_dir/file_list | $compressor $compressorargs > 
$tmp_dir/data.tar.$cext )
++( cd $pkg_dir && tar $attributesargs $ogargs $tsortargs --no-recursion 
$mtime_args -c $tarformat -T $tmp_dir/file_list | $compressor $compressorargs > 
$tmp_dir/data.tar.$cext )
+ ( cd $pkg_dir/$CONTROL && tar $ogargs $tsortargs --no-recursion 
--mtime=@$build_date -c $tarformat -T $tmp_dir/control_list | gzip $zipargs > 
$tmp_dir/control.tar.gz )
+ rm $tmp_dir/file_list
+ rm $tmp_dir/control_list
+-- 
+2.34.1
+
diff --git a/meta/recipes-devtools/opkg-utils/opkg-utils_0.5.0.bb 
b/meta/recipes-devtools/opkg-utils/opkg-utils_0.5.0.bb
index b27e3ded33..edf730711e 100644
--- a/meta/recipes-devtools/opkg-utils/opkg-utils_0.5.0.bb
+++ b/meta/recipes-devtools/opkg-utils/opkg-utils_0.5.0.bb
@@ -9,6 +9,7 @@ PROVIDES += "${@bb.utils.contains('PACKAGECONFIG', 
'update-alternatives', 'virtu
 
 SRC_URI = "git://git.yoctoproject.org/opkg-utils;protocol=https;branch=master \
file://0001-update-alternatives-correctly-match-priority.patch \
+   file://0002-opkg-build-Add-acls-and-xattrs-support.patch \
"
 SRCREV = "9239541f14a2529b9d01c0a253ab11afa2822dab"
 
-- 
2.34.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#184192): 
https://lists.openembedded.org/g/openembedded-core/message/184192
Mute This Topic: 

[OE-Core][PATCH v4 5/5] opkg: add options to enable support for acl and xattr

2023-07-12 Thread Piotr Łobacz
The libarchive library, which is being used by opkg, supports ACLs
and xattr already.

More informations can be read at this link:
https://github.com/libarchive/libarchive/pull/691

Signed-off-by: Piotr Łobacz 
---
 ...-to-enable-support-for-acl-and-xattr.patch | 70 +++
 meta/recipes-devtools/opkg/opkg_0.6.1.bb  |  5 +-
 2 files changed, 74 insertions(+), 1 deletion(-)
 create mode 100644 
meta/recipes-devtools/opkg/opkg/0002-Add-options-to-enable-support-for-acl-and-xattr.patch

diff --git 
a/meta/recipes-devtools/opkg/opkg/0002-Add-options-to-enable-support-for-acl-and-xattr.patch
 
b/meta/recipes-devtools/opkg/opkg/0002-Add-options-to-enable-support-for-acl-and-xattr.patch
new file mode 100644
index 00..d6cb1d79fb
--- /dev/null
+++ 
b/meta/recipes-devtools/opkg/opkg/0002-Add-options-to-enable-support-for-acl-and-xattr.patch
@@ -0,0 +1,70 @@
+From 1c935e994bd572d9fff436f660ac1a060a434df0 Mon Sep 17 00:00:00 2001
+From: Maciej Liszewski 
+Date: Tue, 4 Jul 2023 22:01:58 +0200
+Subject: [PATCH] Add options to enable support for acl and xattr
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The libarchive library, which is being used by opkg, supports ACLs
+and xattr already.
+
+More informations can be read at this link:
+https://github.com/libarchive/libarchive/pull/691
+
+Upstream-Status: Accepted 
[https://groups.google.com/g/opkg-devel/c/aEGL7XRXfaA]
+
+[1] https://bugzilla.yoctoproject.org/show_bug.cgi?id=15097
+
+Signed-off-by: Maciej Liszewski 
+Signed-off-by: Piotr Łobacz 
+---
+ configure.ac   | 12 
+ libopkg/opkg_archive.c |  8 
+ 2 files changed, 20 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+index 389a818..46949cd 100644
+--- a/configure.ac
 b/configure.ac
+@@ -158,6 +158,18 @@ return OPENSSL_VERSION_NUMBER; ],
+   AC_SUBST(OPENSSL_LIBS)
+ fi
+ 
++# check for ACL support
++AC_ARG_WITH([acl], [AS_HELP_STRING([--with-acl], [Enable ACL support])])
++if test "x$with_acl" = "xyes"; then
++  AC_DEFINE([ENABLE_ACL], [1], [Enable ACL support])
++fi
++
++# check for xattr support
++AC_ARG_WITH([xattr], [AS_HELP_STRING([--with-xattr], [Enable xattr support])])
++if test "x$with_xattr" = "xyes"; then
++  AC_DEFINE([ENABLE_XATTR], [1], [Enable xattr support])
++fi
++
+ # check for libsolv solver
+ AC_ARG_WITH(libsolv, AC_HELP_STRING([--with-libsolv], [Use libsolv solver 
support.
+   ]), [], [with_libsolv="no"])
+diff --git a/libopkg/opkg_archive.c b/libopkg/opkg_archive.c
+index 03a4afb..8dd902d 100644
+--- a/libopkg/opkg_archive.c
 b/libopkg/opkg_archive.c
+@@ -912,6 +912,14 @@ struct opkg_ar *ar_open_pkg_data_archive(const char 
*filename)
+ ar->extract_flags = ARCHIVE_EXTRACT_OWNER | ARCHIVE_EXTRACT_PERM |
+ ARCHIVE_EXTRACT_TIME | ARCHIVE_EXTRACT_UNLINK | 
ARCHIVE_EXTRACT_NO_OVERWRITE;
+ 
++#ifdef ENABLE_ACL
++ar->extract_flags |= ARCHIVE_EXTRACT_ACL;
++#endif
++
++#ifdef ENABLE_XATTR
++ar->extract_flags |= ARCHIVE_EXTRACT_FFLAGS | ARCHIVE_EXTRACT_XATTR;
++#endif
++
+ if (opkg_config->ignore_uid)
+ ar->extract_flags &= ~ARCHIVE_EXTRACT_OWNER;
+ 
+-- 
+2.34.1
+
diff --git a/meta/recipes-devtools/opkg/opkg_0.6.1.bb 
b/meta/recipes-devtools/opkg/opkg_0.6.1.bb
index 4c25fe963a..2cac4af644 100644
--- a/meta/recipes-devtools/opkg/opkg_0.6.1.bb
+++ b/meta/recipes-devtools/opkg/opkg_0.6.1.bb
@@ -17,6 +17,7 @@ SRC_URI = 
"http://downloads.yoctoproject.org/releases/${BPN}/${BPN}-${PV}.tar.gz

file://0001-opkg_conf-create-opkg.lock-in-run-instead-of-var-run.patch \
file://0002-opkg-key-remove-no-options-flag-from-gpg-calls.patch \

file://0001-Define-alignof-using-_Alignof-when-using-C11-or-newe.patch \
+   file://0002-Add-options-to-enable-support-for-acl-and-xattr.patch \
file://run-ptest \
 "
 
@@ -32,8 +33,10 @@ inherit autotools pkgconfig ptest
 target_localstatedir := "${localstatedir}"
 OPKGLIBDIR ??= "${target_localstatedir}/lib"
 
-PACKAGECONFIG ??= "libsolv"
+PACKAGECONFIG ??= "libsolv ${@bb.utils.filter('DISTRO_FEATURES', 'acl xattr', 
d)}"
 
+PACKAGECONFIG[acl] = "--with-acl,--without-acl"
+PACKAGECONFIG[xattr] = "--with-xattr,--without-xattr"
 PACKAGECONFIG[gpg] = "--enable-gpg,--disable-gpg,\
 gnupg gpgme libgpg-error,\
 ${@ "gnupg" if ("native" in d.getVar("PN")) else "gnupg-gpg"}\
-- 
2.34.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#184193): 
https://lists.openembedded.org/g/openembedded-core/message/184193
Mute This Topic: https://lists.openembedded.org/mt/100098287/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-Core][PATCH v4 2/5] package_ipk.bbclass: add support for ACLs and xattr

2023-07-12 Thread Piotr Łobacz
Extend OPKGBUILDCMD variable, with additional parameters, depending
on target distro features, in order to support ACLs and xattr.

With fix pushed to the opkg-devel:
https://groups.google.com/g/opkg-devel/c/dYNHrLjDwg8
opkg-build is able to create tar archives with ACLs and xattr.

Signed-off-by: Piotr Łobacz 
---
 meta/classes-global/package_ipk.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes-global/package_ipk.bbclass 
b/meta/classes-global/package_ipk.bbclass
index b4b7bc9ac2..5e151be3cd 100644
--- a/meta/classes-global/package_ipk.bbclass
+++ b/meta/classes-global/package_ipk.bbclass
@@ -15,7 +15,7 @@ IPKGCONF_SDK_TARGET = "${WORKDIR}/opkg-sdk-target.conf"
 PKGWRITEDIRIPK = "${WORKDIR}/deploy-ipks"
 
 # Program to be used to build opkg packages
-OPKGBUILDCMD ??= 'opkg-build -Z xz -a "${XZ_DEFAULTS}"'
+OPKGBUILDCMD ??= 'opkg-build -Z xz -a "${XZ_DEFAULTS}" 
"${@bb.utils.contains('DISTRO_FEATURES', 'acl', '-A', '', d)}" 
"${@bb.utils.contains('DISTRO_FEATURES', 'xattr', '-X', '', d)}"'
 
 OPKG_ARGS += "--force_postinstall --prefer-arch-to-version"
 OPKG_ARGS += "${@['', 
'--no-install-recommends'][d.getVar("NO_RECOMMENDATIONS") == "1"]}"
-- 
2.34.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#184190): 
https://lists.openembedded.org/g/openembedded-core/message/184190
Mute This Topic: https://lists.openembedded.org/mt/100098284/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-Core][PATCH v4 3/5] package.bbclass: add support for ACLs and xattr

2023-07-12 Thread Piotr Łobacz
Extend `tar` command, with additional parameters, depending
on choosen package class and target distro features, in order
to support ACLs and xattr.

Currently only `package_ipk` supports fully ACLs and xattr.

Signed-off-by: Piotr Łobacz 
---
 meta/classes-global/package.bbclass | 9 +++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/meta/classes-global/package.bbclass 
b/meta/classes-global/package.bbclass
index e8055a9cdc..6e5d0dd4dc 100644
--- a/meta/classes-global/package.bbclass
+++ b/meta/classes-global/package.bbclass
@@ -342,8 +342,13 @@ python perform_packagecopy () {
 
 # Start by package population by taking a copy of the installed
 # files to operate on
-# Preserve sparse files and hard links
-cmd = 'tar --exclude=./sysroot-only -cf - -C %s -p -S . | tar -xf - -C %s' 
% (dest, dvar)
+# Preserve sparse files, hard links, ACLs and extended attributes
+# TODO: for the moment only ipk packages are supporting ACLs and extended 
attributes
+# we need to add support for other package systems as well, but that 
doesn't bother
+# tar from creating archives with acl and/or xattr support
+acl = bb.utils.contains('DISTRO_FEATURES', 'acl', '--acls', '', d)
+xattr = bb.utils.contains('DISTRO_FEATURES', 'xattr', '--xattrs', '', d)
+cmd = f'tar {acl} {xattr} --numeric-owner --exclude=./sysroot-only -cf - 
-C {dest} -p -S . | tar {acl} {xattr} -xf - -C {dvar}'
 subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT)
 
 # replace RPATHs for the nativesdk binaries, to make them relocatable
-- 
2.34.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#184191): 
https://lists.openembedded.org/g/openembedded-core/message/184191
Mute This Topic: https://lists.openembedded.org/mt/100098285/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-Core][PATCH v4 1/5] bitbake.conf: add acl and xattr distro native features support

2023-07-12 Thread Piotr Łobacz
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 
---
 meta/conf/bitbake.conf | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index 9625a6fef4..20684a5126 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -904,12 +904,12 @@ 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"
 DISTRO_FEATURES_NATIVESDK ?= "x11"
 
 # Normally target distro features will not be applied to native builds:
 # Native distro features on this list will use the target feature value
-DISTRO_FEATURES_FILTER_NATIVE ?= "api-documentation debuginfod opengl wayland"
+DISTRO_FEATURES_FILTER_NATIVE ?= "acl api-documentation debuginfod opengl 
wayland xattr"
 DISTRO_FEATURES_FILTER_NATIVESDK ?= "api-documentation debuginfod opengl 
wayland"
 
 DISTRO_FEATURES_BACKFILL = "pulseaudio sysvinit gobject-introspection-data 
ldconfig"
-- 
2.34.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#184189): 
https://lists.openembedded.org/g/openembedded-core/message/184189
Mute This Topic: https://lists.openembedded.org/mt/100098283/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



ODP: [OE-Core][PATCH 1/3] bitbake.conf: add acl and xattr distro native features support

2023-07-12 Thread Piotr Łobacz
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

Od: Richard Purdie 
Wysłane: środa, 12 lipca 2023 14:15
Do: Piotr Łobacz ; 
openembedded-core@lists.openembedded.org 

Temat: Re: [OE-Core][PATCH 1/3] bitbake.conf: add acl and xattr distro native 
features support

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 
> ---
>  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


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#184188): 
https://lists.openembedded.org/g/openembedded-core/message/184188
Mute This Topic: https://lists.openembedded.org/mt/100098166/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-Core][PATCH 1/3] bitbake.conf: add acl and xattr distro native features support

2023-07-12 Thread Richard Purdie
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 
> ---
>  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


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#184187): 
https://lists.openembedded.org/g/openembedded-core/message/184187
Mute This Topic: https://lists.openembedded.org/mt/100054733/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



ODP: [OE-Core][PATCH 1/2] opkg-utils: add acl and xattr support

2023-07-12 Thread Piotr Łobacz
Thx Ross

BR
Piotr

Od: Ross Burton 
Wysłane: środa, 12 lipca 2023 13:47
Do: Piotr Łobacz 
DW: openembedded-core@lists.openembedded.org 

Temat: Re: [OE-Core][PATCH 1/2] opkg-utils: add acl and xattr support

On 12 Jul 2023, at 12:23, Piotr Łobacz  wrote:
>
> I have added v3 and merged them as one feature/patch change. Additionaly how 
> this Upstream-Status should look like? Could you please give me an example?

https://eur04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.openembedded.org%2Fwiki%2FCommit_Patch_Message_Guidelines%23Patch_Header_Recommendations%3A_Upstream-Status=05%7C01%7Cp.lobacz%40welotec.com%7C8ad81befd6a74dfdc62708db82cdd6db%7C25111a7f1d5a4c51a4ca7f8e44011b39%7C0%7C0%7C638247592814242852%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C=tcSUGFwm3kIDRMEUvPdGM27ic2fI6P1JDtqP4cGhjJg%3D=0

You can grep oe-core for Upstream-Status and you’ll find hundreds of examples.

Cheers,
Ross

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#184186): 
https://lists.openembedded.org/g/openembedded-core/message/184186
Mute This Topic: https://lists.openembedded.org/mt/100097775/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] RFE: add 'LAYERDIR_' variable

2023-07-12 Thread Enrico Scholz via lists.openembedded.org
Hi,

currently, it is difficult to reuse recipes from other layers because
their path is required but not known.  E.g. when one tries to add a
backported imx-gpu-viv recipe [1] to a local layer by

| require recipes-graphics/imx-gpu-viv/imx-gpu-viv-6.inc

do_fetch() will fail because some SRC_URI can not be resolved.  To
support this, FILESEXTRAPATHS must contain the path of the original
recipe.

Determining this path is difficult at the moment, because it is unknown
and depends on the layout of BBLAYERS.


I suggest to add a new standard variable 'LAYERDIR_' which
points to '${LAYERDIR}' of the layer.  It is probably difficult to set
it automatically (value of  is not known); instead of, it must
be defined manually in 'layer.conf' like related variables.

E.g.

| BBFILE_COLLECTIONS += "freescale-layer"
| BBFILE_PATTERN_freescale-layer := "^${LAYERDIR}/"
| 
| LAYERDIR_freescale-layer := "${LAYERDIR}"<<

Diagnostic should be easy (iterate over BBFILE_COLLECTIONS and emit
warning when corresponding 'LAYERDIR_' is undefined).


What do you think?


Enrico

Footnotes:
[1]  
https://github.com/Freescale/meta-freescale/blob/master/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.4.11.p1.0-aarch64.bb

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#184185): 
https://lists.openembedded.org/g/openembedded-core/message/184185
Mute This Topic: https://lists.openembedded.org/mt/100097753/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-Core][PATCH 1/2] opkg-utils: add acl and xattr support

2023-07-12 Thread Ross Burton
On 12 Jul 2023, at 12:23, Piotr Łobacz  wrote:
> 
> I have added v3 and merged them as one feature/patch change. Additionaly how 
> this Upstream-Status should look like? Could you please give me an example?

https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines#Patch_Header_Recommendations:_Upstream-Status

You can grep oe-core for Upstream-Status and you’ll find hundreds of examples.

Cheers,
Ross
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#184184): 
https://lists.openembedded.org/g/openembedded-core/message/184184
Mute This Topic: https://lists.openembedded.org/mt/100097747/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



ODP: [OE-Core][PATCH 3/3] package.bbclass: add support for ACLs and xattr

2023-07-12 Thread Piotr Łobacz
I have removed this check as you are absolutelly right. Besides in future I 
suspect that we will have also support for ACLs and xattrs in both debs and 
rpms as well.

Thx
Piotr

Od: Ross Burton 
Wysłane: poniedziałek, 10 lipca 2023 13:46
Do: Piotr Łobacz 
DW: openembedded-core@lists.openembedded.org 

Temat: Re: [OE-Core][PATCH 3/3] package.bbclass: add support for ACLs and xattr

On 10 Jul 2023, at 10:58, Piotr Łobacz via lists.openembedded.org 
 wrote:
> +# Preserve sparse files, hard links, ACLs and extended attributes
> +acl = ''
> +xattr = ''
> +# TODO: for the moment only ipk packages are supporting ACLs and 
> extended attributes
> +if bb.utils.contains('PACKAGE_CLASSES', 'package_ipk', True, False, d):
> +acl = bb.utils.contains('DISTRO_FEATURES', 'acl', '--acls', '', d)
> +xattr = bb.utils.contains('DISTRO_FEATURES', 'xattr', '--xattrs', 
> '', d)
> +cmd = f'tar {acl} {xattr} --numeric-owner --exclude=./sysroot-only -cf - 
> -C {dest} -p -S . | tar {acl} {xattr} -xf - -C {dvar}'

Is there much of a hit if we always tell tar to always preserve the acl/xattr 
information, instead of changing behaviour based on whether ipkg is enabled?  I 
don’t like how enabling ipkgs changes the tar command that is also used to 
build the rpms.

Ross


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#184183): 
https://lists.openembedded.org/g/openembedded-core/message/184183
Mute This Topic: https://lists.openembedded.org/mt/100097471/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



ODP: [OE-Core][PATCH 1/2] opkg-utils: add acl and xattr support

2023-07-12 Thread Piotr Łobacz
I have added v3 and merged them as one feature/patch change. Additionaly how 
this Upstream-Status should look like? Could you please give me an example?

Thx
Piotr

Od: Ross Burton 
Wysłane: środa, 12 lipca 2023 12:31
Do: Piotr Łobacz 
DW: openembedded-core@lists.openembedded.org 

Temat: Re: [OE-Core][PATCH 1/2] opkg-utils: add acl and xattr support

On 12 Jul 2023, at 00:18, Piotr Łobacz via lists.openembedded.org 
 wrote:
> +++ 
> b/meta/recipes-devtools/opkg-utils/opkg-utils/0002-opkg-build-Add-acls-and-xattrs-support.patch
> @@ -0,0 +1,70 @@
> +From f177abcba7d72fa1afd0bc23f38beb4fe88fc040 Mon Sep 17 00:00:00 2001
> +From: =?UTF-8?q?Piotr=20=C5=81obacz?= 
> +Date: Wed, 5 Jul 2023 10:31:13 +0200
> +Subject: [PATCH] opkg-build: add acl and xattr support
> +
> +Add support for tar archives created with --acls and/or --xattrs options,
> +PAX header format.
> +
> +GNU tar and libarchive already supports ACLs and extended attributes.
> +We can now add this support as well to opkg-build script in order to use
> +fsetattr or setcap inside do_install command and end up with a file in
> +an image with the relevant ACLs and xattrs.


This patch needs to have your S-o-b and an Upstream-Status (Submitted, unless 
it’s already been applied in which case Backport).

Thanks,
Ross


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#184182): 
https://lists.openembedded.org/g/openembedded-core/message/184182
Mute This Topic: https://lists.openembedded.org/mt/100097440/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-Core][PATCH v3 5/5] opkg: add options to enable support for acl and xattr

2023-07-12 Thread Piotr Łobacz
The libarchive library, which is being used by opkg, supports ACLs
and xattr already.

More informations can be read at this link:
https://github.com/libarchive/libarchive/pull/691

Signed-off-by: Piotr Łobacz 
---
 ...-to-enable-support-for-acl-and-xattr.patch | 66 +++
 meta/recipes-devtools/opkg/opkg_0.6.1.bb  |  5 +-
 2 files changed, 70 insertions(+), 1 deletion(-)
 create mode 100644 
meta/recipes-devtools/opkg/opkg/0002-Add-options-to-enable-support-for-acl-and-xattr.patch

diff --git 
a/meta/recipes-devtools/opkg/opkg/0002-Add-options-to-enable-support-for-acl-and-xattr.patch
 
b/meta/recipes-devtools/opkg/opkg/0002-Add-options-to-enable-support-for-acl-and-xattr.patch
new file mode 100644
index 00..30823798fb
--- /dev/null
+++ 
b/meta/recipes-devtools/opkg/opkg/0002-Add-options-to-enable-support-for-acl-and-xattr.patch
@@ -0,0 +1,66 @@
+From 32a1926496a670513439cf22c248d18f6b7d087d Mon Sep 17 00:00:00 2001
+From: Maciej Liszewski 
+Date: Tue, 4 Jul 2023 22:01:58 +0200
+Subject: [PATCH] Add options to enable support for acl and xattr
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The libarchive library, which is being used by opkg, supports ACLs
+and xattr already.
+
+More informations can be read at this link:
+https://github.com/libarchive/libarchive/pull/691
+
+Signed-off-by: Maciej Liszewski 
+Signed-off-by: Piotr Łobacz 
+---
+ configure.ac   | 12 
+ libopkg/opkg_archive.c |  8 
+ 2 files changed, 20 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+index 389a818..46949cd 100644
+--- a/configure.ac
 b/configure.ac
+@@ -158,6 +158,18 @@ return OPENSSL_VERSION_NUMBER; ],
+   AC_SUBST(OPENSSL_LIBS)
+ fi
+ 
++# check for ACL support
++AC_ARG_WITH([acl], [AS_HELP_STRING([--with-acl], [Enable ACL support])])
++if test "x$with_acl" = "xyes"; then
++  AC_DEFINE([ENABLE_ACL], [1], [Enable ACL support])
++fi
++
++# check for xattr support
++AC_ARG_WITH([xattr], [AS_HELP_STRING([--with-xattr], [Enable xattr support])])
++if test "x$with_xattr" = "xyes"; then
++  AC_DEFINE([ENABLE_XATTR], [1], [Enable xattr support])
++fi
++
+ # check for libsolv solver
+ AC_ARG_WITH(libsolv, AC_HELP_STRING([--with-libsolv], [Use libsolv solver 
support.
+   ]), [], [with_libsolv="no"])
+diff --git a/libopkg/opkg_archive.c b/libopkg/opkg_archive.c
+index 03a4afb..8dd902d 100644
+--- a/libopkg/opkg_archive.c
 b/libopkg/opkg_archive.c
+@@ -912,6 +912,14 @@ struct opkg_ar *ar_open_pkg_data_archive(const char 
*filename)
+ ar->extract_flags = ARCHIVE_EXTRACT_OWNER | ARCHIVE_EXTRACT_PERM |
+ ARCHIVE_EXTRACT_TIME | ARCHIVE_EXTRACT_UNLINK | 
ARCHIVE_EXTRACT_NO_OVERWRITE;
+ 
++#ifdef ENABLE_ACL
++ar->extract_flags |= ARCHIVE_EXTRACT_ACL;
++#endif
++
++#ifdef ENABLE_XATTR
++ar->extract_flags |= ARCHIVE_EXTRACT_FFLAGS | ARCHIVE_EXTRACT_XATTR;
++#endif
++
+ if (opkg_config->ignore_uid)
+ ar->extract_flags &= ~ARCHIVE_EXTRACT_OWNER;
+ 
+-- 
+2.34.1
+
diff --git a/meta/recipes-devtools/opkg/opkg_0.6.1.bb 
b/meta/recipes-devtools/opkg/opkg_0.6.1.bb
index 4c25fe963a..2cac4af644 100644
--- a/meta/recipes-devtools/opkg/opkg_0.6.1.bb
+++ b/meta/recipes-devtools/opkg/opkg_0.6.1.bb
@@ -17,6 +17,7 @@ SRC_URI = 
"http://downloads.yoctoproject.org/releases/${BPN}/${BPN}-${PV}.tar.gz

file://0001-opkg_conf-create-opkg.lock-in-run-instead-of-var-run.patch \
file://0002-opkg-key-remove-no-options-flag-from-gpg-calls.patch \

file://0001-Define-alignof-using-_Alignof-when-using-C11-or-newe.patch \
+   file://0002-Add-options-to-enable-support-for-acl-and-xattr.patch \
file://run-ptest \
 "
 
@@ -32,8 +33,10 @@ inherit autotools pkgconfig ptest
 target_localstatedir := "${localstatedir}"
 OPKGLIBDIR ??= "${target_localstatedir}/lib"
 
-PACKAGECONFIG ??= "libsolv"
+PACKAGECONFIG ??= "libsolv ${@bb.utils.filter('DISTRO_FEATURES', 'acl xattr', 
d)}"
 
+PACKAGECONFIG[acl] = "--with-acl,--without-acl"
+PACKAGECONFIG[xattr] = "--with-xattr,--without-xattr"
 PACKAGECONFIG[gpg] = "--enable-gpg,--disable-gpg,\
 gnupg gpgme libgpg-error,\
 ${@ "gnupg" if ("native" in d.getVar("PN")) else "gnupg-gpg"}\
-- 
2.34.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#184181): 
https://lists.openembedded.org/g/openembedded-core/message/184181
Mute This Topic: https://lists.openembedded.org/mt/100097414/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-Core][PATCH v3 4/5] opkg-utils: add acl and xattr support

2023-07-12 Thread Piotr Łobacz
Add support for tar archives created with --acls and/or --xattrs options,
PAX header format.

GNU tar and libarchive already supports ACLs and extended attributes.
We can now add this support as well to opkg-build script in order to use
fsetattr or setcap inside do_install command and end up with a file in
an image with the relevant ACLs and xattrs.

Signed-off-by: Piotr Łobacz 
---
 ...kg-build-Add-acls-and-xattrs-support.patch | 75 +++
 .../opkg-utils/opkg-utils_0.5.0.bb|  1 +
 2 files changed, 76 insertions(+)
 create mode 100644 
meta/recipes-devtools/opkg-utils/opkg-utils/0002-opkg-build-Add-acls-and-xattrs-support.patch

diff --git 
a/meta/recipes-devtools/opkg-utils/opkg-utils/0002-opkg-build-Add-acls-and-xattrs-support.patch
 
b/meta/recipes-devtools/opkg-utils/opkg-utils/0002-opkg-build-Add-acls-and-xattrs-support.patch
new file mode 100644
index 00..2fbb8b3239
--- /dev/null
+++ 
b/meta/recipes-devtools/opkg-utils/opkg-utils/0002-opkg-build-Add-acls-and-xattrs-support.patch
@@ -0,0 +1,75 @@
+From dc589e683c7e8f50993787ea304508cc044fa0de Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Piotr=20=C5=81obacz?= 
+Date: Wed, 5 Jul 2023 10:31:13 +0200
+Subject: [PATCH] opkg-build: Add acl and xattr support
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Add support for tar archives created with --acls and/or --xattrs options,
+PAX header format.
+
+GNU tar and libarchive already supports ACLs and extended attributes.
+We can now add this support as well to opkg-build script in order to use
+fsetattr or setcap inside do_install command and end up with a file in
+an image with the relevant ACLs and xattrs.
+
+Signed-off-by: Piotr Łobacz 
+---
+ opkg-build | 15 ++-
+ 1 file changed, 10 insertions(+), 5 deletions(-)
+
+diff --git a/opkg-build b/opkg-build
+index a9e45d4..8d9bcfa 100755
+--- a/opkg-build
 b/opkg-build
+@@ -145,6 +145,7 @@ You probably want to chown these to a system user: " >&2
+ ###
+ # opkg-build "main"
+ ###
++attributesargs=""
+ ogargs=""
+ outer=ar
+ noclean=0
+@@ -166,7 +167,7 @@ compressorargs=""
+ tarformat=""
+ if tar --help 2>&1 | grep -- "--format" > /dev/null;
+ then
+-tarformat="--format=gnu"
++tarformat="--format=posix"
+ fi
+ 
+ compressor_ext() {
+@@ -197,13 +198,17 @@ compressor_ext() {
+ : <<=cut
+ =head1 SYNOPSIS
+ 
+-B [B<-c>] [B<-C>] [B<-Z> I] [B<-a>] [B<-O>] [B<-o> 
I] [B<-g> I] I [I]
++B [B<-A>] [B<-X>] [B<-c>] [B<-C>] [B<-Z> I] [B<-a>] 
[B<-O>] [B<-o> I] [B<-g> I] I 
[I]
+ 
+ =cut
+ 
+-usage="Usage: $0 [-c] [-C] [-Z compressor] [-a compressor_args] [-O] [-o 
owner] [-g group]  []"
+-while getopts "a:cCg:ho:vOZ:" opt; do
++usage="Usage: $0 [-A] [-X] [-c] [-C] [-Z compressor] [-a compressor_args] 
[-O] [-o owner] [-g group]  []"
++while getopts "Aa:cCg:ho:vOXZ:" opt; do
+ case $opt in
++A ) attributesargs="--acls"
++;;
++X ) attributesargs="$attributesargs --xattrs"
++;;
+   o ) owner=$OPTARG
+   ogargs="--owner=$owner"
+   ;;
+@@ -314,7 +319,7 @@ export LANG=C
+ export LC_ALL=C
+ ( cd $pkg_dir/$CONTROL && find . -type f | sort > $tmp_dir/control_list )
+ ( cd $pkg_dir && find . -path ./$CONTROL -prune -o -path . -o -print  | sort 
> $tmp_dir/file_list )
+-( cd $pkg_dir && tar $ogargs $tsortargs --no-recursion $mtime_args -c 
$tarformat -T $tmp_dir/file_list | $compressor $compressorargs > 
$tmp_dir/data.tar.$cext )
++( cd $pkg_dir && tar $attributesargs $ogargs $tsortargs --no-recursion 
$mtime_args -c $tarformat -T $tmp_dir/file_list | $compressor $compressorargs > 
$tmp_dir/data.tar.$cext )
+ ( cd $pkg_dir/$CONTROL && tar $ogargs $tsortargs --no-recursion 
--mtime=@$build_date -c $tarformat -T $tmp_dir/control_list | gzip $zipargs > 
$tmp_dir/control.tar.gz )
+ rm $tmp_dir/file_list
+ rm $tmp_dir/control_list
+-- 
+2.34.1
+
diff --git a/meta/recipes-devtools/opkg-utils/opkg-utils_0.5.0.bb 
b/meta/recipes-devtools/opkg-utils/opkg-utils_0.5.0.bb
index b27e3ded33..edf730711e 100644
--- a/meta/recipes-devtools/opkg-utils/opkg-utils_0.5.0.bb
+++ b/meta/recipes-devtools/opkg-utils/opkg-utils_0.5.0.bb
@@ -9,6 +9,7 @@ PROVIDES += "${@bb.utils.contains('PACKAGECONFIG', 
'update-alternatives', 'virtu
 
 SRC_URI = "git://git.yoctoproject.org/opkg-utils;protocol=https;branch=master \
file://0001-update-alternatives-correctly-match-priority.patch \
+   file://0002-opkg-build-Add-acls-and-xattrs-support.patch \
"
 SRCREV = "9239541f14a2529b9d01c0a253ab11afa2822dab"
 
-- 
2.34.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#184180): 
https://lists.openembedded.org/g/openembedded-core/message/184180
Mute This Topic: https://lists.openembedded.org/mt/100097413/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]

[OE-Core][PATCH v3 2/5] package_ipk.bbclass: add support for ACLs and xattr

2023-07-12 Thread Piotr Łobacz
Extend OPKGBUILDCMD variable, with additional parameters, depending
on target distro features, in order to support ACLs and xattr.

With fix pushed to the opkg-devel:
https://groups.google.com/g/opkg-devel/c/dYNHrLjDwg8
opkg-build is able to create tar archives with ACLs and xattr.

Signed-off-by: Piotr Łobacz 
---
 meta/classes-global/package_ipk.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes-global/package_ipk.bbclass 
b/meta/classes-global/package_ipk.bbclass
index b4b7bc9ac2..5e151be3cd 100644
--- a/meta/classes-global/package_ipk.bbclass
+++ b/meta/classes-global/package_ipk.bbclass
@@ -15,7 +15,7 @@ IPKGCONF_SDK_TARGET = "${WORKDIR}/opkg-sdk-target.conf"
 PKGWRITEDIRIPK = "${WORKDIR}/deploy-ipks"
 
 # Program to be used to build opkg packages
-OPKGBUILDCMD ??= 'opkg-build -Z xz -a "${XZ_DEFAULTS}"'
+OPKGBUILDCMD ??= 'opkg-build -Z xz -a "${XZ_DEFAULTS}" 
"${@bb.utils.contains('DISTRO_FEATURES', 'acl', '-A', '', d)}" 
"${@bb.utils.contains('DISTRO_FEATURES', 'xattr', '-X', '', d)}"'
 
 OPKG_ARGS += "--force_postinstall --prefer-arch-to-version"
 OPKG_ARGS += "${@['', 
'--no-install-recommends'][d.getVar("NO_RECOMMENDATIONS") == "1"]}"
-- 
2.34.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#184178): 
https://lists.openembedded.org/g/openembedded-core/message/184178
Mute This Topic: https://lists.openembedded.org/mt/100097411/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-Core][PATCH v3 3/5] package.bbclass: add support for ACLs and xattr

2023-07-12 Thread Piotr Łobacz
Extend `tar` command, with additional parameters, depending
on choosen package class and target distro features, in order
to support ACLs and xattr.

Currently only `package_ipk` supports fully ACLs and xattr.

Signed-off-by: Piotr Łobacz 
---
 meta/classes-global/package.bbclass | 9 +++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/meta/classes-global/package.bbclass 
b/meta/classes-global/package.bbclass
index e8055a9cdc..6e5d0dd4dc 100644
--- a/meta/classes-global/package.bbclass
+++ b/meta/classes-global/package.bbclass
@@ -342,8 +342,13 @@ python perform_packagecopy () {
 
 # Start by package population by taking a copy of the installed
 # files to operate on
-# Preserve sparse files and hard links
-cmd = 'tar --exclude=./sysroot-only -cf - -C %s -p -S . | tar -xf - -C %s' 
% (dest, dvar)
+# Preserve sparse files, hard links, ACLs and extended attributes
+# TODO: for the moment only ipk packages are supporting ACLs and extended 
attributes
+# we need to add support for other package systems as well, but that 
doesn't bother
+# tar from creating archives with acl and/or xattr support
+acl = bb.utils.contains('DISTRO_FEATURES', 'acl', '--acls', '', d)
+xattr = bb.utils.contains('DISTRO_FEATURES', 'xattr', '--xattrs', '', d)
+cmd = f'tar {acl} {xattr} --numeric-owner --exclude=./sysroot-only -cf - 
-C {dest} -p -S . | tar {acl} {xattr} -xf - -C {dvar}'
 subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT)
 
 # replace RPATHs for the nativesdk binaries, to make them relocatable
-- 
2.34.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#184179): 
https://lists.openembedded.org/g/openembedded-core/message/184179
Mute This Topic: https://lists.openembedded.org/mt/100097412/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-Core][PATCH v3 1/5] bitbake.conf: add acl and xattr distro native features support

2023-07-12 Thread Piotr Łobacz
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 
---
 meta/conf/bitbake.conf | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index 9625a6fef4..20684a5126 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -904,12 +904,12 @@ 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"
 DISTRO_FEATURES_NATIVESDK ?= "x11"
 
 # Normally target distro features will not be applied to native builds:
 # Native distro features on this list will use the target feature value
-DISTRO_FEATURES_FILTER_NATIVE ?= "api-documentation debuginfod opengl wayland"
+DISTRO_FEATURES_FILTER_NATIVE ?= "acl api-documentation debuginfod opengl 
wayland xattr"
 DISTRO_FEATURES_FILTER_NATIVESDK ?= "api-documentation debuginfod opengl 
wayland"
 
 DISTRO_FEATURES_BACKFILL = "pulseaudio sysvinit gobject-introspection-data 
ldconfig"
-- 
2.34.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#184177): 
https://lists.openembedded.org/g/openembedded-core/message/184177
Mute This Topic: https://lists.openembedded.org/mt/100097410/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-Core][PATCH v2 3/3] package.bbclass: add support for ACLs and xattr

2023-07-12 Thread Piotr Łobacz
H actually no, we can always pass these params to tar.

Wysyłane z aplikacji Outlook dla systemu iOS

Od: Ross Burton 
Wysłane: Wednesday, July 12, 2023 12:36:41 PM
Do: Piotr Łobacz 
DW: openembedded-core@lists.openembedded.org 

Temat: Re: [OE-Core][PATCH v2 3/3] package.bbclass: add support for ACLs and 
xattr

On 12 Jul 2023, at 00:28, Piotr Łobacz via lists.openembedded.org 
 wrote:
> -# Preserve sparse files and hard links
> -cmd = 'tar --exclude=./sysroot-only -cf - -C %s -p -S . | tar -xf - -C 
> %s' % (dest, dvar)
> +# Preserve sparse files, hard links, ACLs and extended attributes
> +acl = ''
> +xattr = ''
> +# TODO: for the moment only ipk packages are supporting ACLs and 
> extended attributes
> +if bb.utils.contains('PACKAGE_CLASSES', 'package_ipk', True, False, d):
> +acl = bb.utils.contains('DISTRO_FEATURES', 'acl', '--acls', '', d)
> +xattr = bb.utils.contains('DISTRO_FEATURES', 'xattr', '--xattrs', 
> '', d)
> +cmd = f'tar {acl} {xattr} --numeric-owner --exclude=./sysroot-only -cf - 
> -C {dest} -p -S . | tar {acl} {xattr} -xf - -C {dvar}'
> subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT)

This is still changing the behaviour for rpm packages if ipkg is enabled, which 
sounds like a wonderful way to introduce subtle bugs that are hard to find.

Is there a problem with always passing —acls —xatttrs to tar at this step?

Ross

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#184176): 
https://lists.openembedded.org/g/openembedded-core/message/184176
Mute This Topic: https://lists.openembedded.org/mt/100090080/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-Core][PATCH v2 3/3] package.bbclass: add support for ACLs and xattr

2023-07-12 Thread Ross Burton
On 12 Jul 2023, at 00:28, Piotr Łobacz via lists.openembedded.org 
 wrote:
> -# Preserve sparse files and hard links
> -cmd = 'tar --exclude=./sysroot-only -cf - -C %s -p -S . | tar -xf - -C 
> %s' % (dest, dvar)
> +# Preserve sparse files, hard links, ACLs and extended attributes
> +acl = ''
> +xattr = ''
> +# TODO: for the moment only ipk packages are supporting ACLs and 
> extended attributes
> +if bb.utils.contains('PACKAGE_CLASSES', 'package_ipk', True, False, d):
> +acl = bb.utils.contains('DISTRO_FEATURES', 'acl', '--acls', '', d)
> +xattr = bb.utils.contains('DISTRO_FEATURES', 'xattr', '--xattrs', 
> '', d)
> +cmd = f'tar {acl} {xattr} --numeric-owner --exclude=./sysroot-only -cf - 
> -C {dest} -p -S . | tar {acl} {xattr} -xf - -C {dvar}'
> subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT)

This is still changing the behaviour for rpm packages if ipkg is enabled, which 
sounds like a wonderful way to introduce subtle bugs that are hard to find.

Is there a problem with always passing —acls —xatttrs to tar at this step?

Ross
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#184175): 
https://lists.openembedded.org/g/openembedded-core/message/184175
Mute This Topic: https://lists.openembedded.org/mt/100090080/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH 3/3] Revert "site: merged common-glibc from OE"

2023-07-12 Thread Ross Burton
Instead of just saying “reverting a commit from 2008, please explain _why_.

Ross

> On 12 Jul 2023, at 00:41, Khem Raj via lists.openembedded.org 
>  wrote:
> 
> This reverts commit a2f942c22e31fe15fef1b44a0e5cc548a60d43a6.
> 
> Signed-off-by: Khem Raj 
> ---
> meta/site/common-glibc | 1 -
> 1 file changed, 1 deletion(-)
> 
> diff --git a/meta/site/common-glibc b/meta/site/common-glibc
> index 7ba91e03c04..958699b143f 100644
> --- a/meta/site/common-glibc
> +++ b/meta/site/common-glibc
> @@ -12,7 +12,6 @@ ac_cv_func_getgrgid_r=${ac_cv_func_getgrgid_r=yes}
> ac_cv_func_getpwuid_r=${ac_cv_func_getpwuid_r=yes}
> ac_cv_func_posix_getpwuid_r=${ac_cv_func_posix_getpwuid_r=yes}
> ac_cv_func_posix_getgrgid_r=${ac_cv_func_posix_getgrgid_r=yes}
> -ac_cv_type_uid_t={ac_cv_type_uid_t=yes}
> ac_cv_func_getaddrinfo=${ac_cv_func_getaddrinfo=yes}
> ac_cv_func_strtod=${ac_cv_func_strtod=yes}
> 
> -- 
> 2.41.0
> 
> 
> 
> 


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#184174): 
https://lists.openembedded.org/g/openembedded-core/message/184174
Mute This Topic: https://lists.openembedded.org/mt/100090409/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-Core][PATCH 1/2] opkg-utils: add acl and xattr support

2023-07-12 Thread Ross Burton
On 12 Jul 2023, at 00:18, Piotr Łobacz via lists.openembedded.org 
 wrote:
> +++ 
> b/meta/recipes-devtools/opkg-utils/opkg-utils/0002-opkg-build-Add-acls-and-xattrs-support.patch
> @@ -0,0 +1,70 @@
> +From f177abcba7d72fa1afd0bc23f38beb4fe88fc040 Mon Sep 17 00:00:00 2001
> +From: =?UTF-8?q?Piotr=20=C5=81obacz?= 
> +Date: Wed, 5 Jul 2023 10:31:13 +0200
> +Subject: [PATCH] opkg-build: add acl and xattr support
> +
> +Add support for tar archives created with --acls and/or --xattrs options,
> +PAX header format.
> +
> +GNU tar and libarchive already supports ACLs and extended attributes.
> +We can now add this support as well to opkg-build script in order to use
> +fsetattr or setcap inside do_install command and end up with a file in
> +an image with the relevant ACLs and xattrs.


This patch needs to have your S-o-b and an Upstream-Status (Submitted, unless 
it’s already been applied in which case Backport).

Thanks,
Ross


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#184173): 
https://lists.openembedded.org/g/openembedded-core/message/184173
Mute This Topic: https://lists.openembedded.org/mt/100089986/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH 1/2] tunes: Add support for sve instructions on armv8/armv9

2023-07-12 Thread Ross Burton
On 11 Jul 2023, at 21:10, Khem Raj via lists.openembedded.org 
 wrote:
> 
> This helps in defining correct compiler options and configure options
> for glibc and overall ABI for toolchain

Given this, shouldn’t the glibc patch respect the tune flags instead of 
forcibly turning sve off?

Ross
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#184172): 
https://lists.openembedded.org/g/openembedded-core/message/184172
Mute This Topic: https://lists.openembedded.org/mt/100086804/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core][dunfell][PATCH v2] curl: fix CVE-2023-28320 siglongjmp race condition may lead to crash

2023-07-12 Thread vkumbhar
Introduced by: 
https://github.com/curl/curl/commit/3c49b405de4fbf1fd7127f91908261268640e54f 
(curl-7_9_8)
Fixed by: 
https://github.com/curl/curl/commit/13718030ad4b3209a7583b4f27f683cd3a6fa5f2 
(curl-8_1_0)
Follow-up: 
https://github.com/curl/curl/commit/f446258f0269a62289cca0210157cb8558d0edc3 
(curl-8_1_0)
https://curl.se/docs/CVE-2023-28320.html

Signed-off-by: Vivek Kumbhar 
---
 .../curl/curl/CVE-2023-28320-fol1.patch   | 197 ++
 .../curl/curl/CVE-2023-28320.patch|  86 
 meta/recipes-support/curl/curl_7.69.1.bb  |   2 +
 3 files changed, 285 insertions(+)
 create mode 100644 meta/recipes-support/curl/curl/CVE-2023-28320-fol1.patch
 create mode 100644 meta/recipes-support/curl/curl/CVE-2023-28320.patch

diff --git a/meta/recipes-support/curl/curl/CVE-2023-28320-fol1.patch 
b/meta/recipes-support/curl/curl/CVE-2023-28320-fol1.patch
new file mode 100644
index 00..eaa6fdc327
--- /dev/null
+++ b/meta/recipes-support/curl/curl/CVE-2023-28320-fol1.patch
@@ -0,0 +1,197 @@
+From f446258f0269a62289cca0210157cb8558d0edc3 Mon Sep 17 00:00:00 2001
+From: Daniel Stenberg 
+Date: Tue, 16 May 2023 23:40:42 +0200
+Subject: [PATCH] hostip: include easy_lock.h before using
+ GLOBAL_INIT_IS_THREADSAFE
+
+Since that header file is the only place that define can be defined.
+
+Reported-by: Marc Deslauriers
+
+Follow-up to 13718030ad4b3209
+
+Closes #11121
+
+Upstream-Status: Backport 
[https://github.com/curl/curl/commit/f446258f0269a62289cca0210157cb8558d0edc3]
+CVE: CVE-2023-28320
+Signed-off-by: Vivek Kumbhar 
+---
+ lib/easy_lock.h | 109 
+ lib/hostip.c|  10 ++---
+ lib/hostip.h|   9 
+ 3 files changed, 113 insertions(+), 15 deletions(-)
+ create mode 100644 lib/easy_lock.h
+
+diff --git a/lib/easy_lock.h b/lib/easy_lock.h
+new file mode 100644
+index 000..6399a39
+--- /dev/null
 b/lib/easy_lock.h
+@@ -0,0 +1,109 @@
++#ifndef HEADER_CURL_EASY_LOCK_H
++#define HEADER_CURL_EASY_LOCK_H
++/***
++ *  _   _   _
++ *  Project ___| | | |  _ \| |
++ * / __| | | | |_) | |
++ *| (__| |_| |  _ <| |___
++ * \___|\___/|_| \_\_|
++ *
++ * Copyright (C) Daniel Stenberg, , et al.
++ *
++ * This software is licensed as described in the file COPYING, which
++ * you should have received as part of this distribution. The terms
++ * are also available at https://curl.se/docs/copyright.html.
++ *
++ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
++ * copies of the Software, and permit persons to whom the Software is
++ * furnished to do so, under the terms of the COPYING file.
++ *
++ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
++ * KIND, either express or implied.
++ *
++ * SPDX-License-Identifier: curl
++ *
++ ***/
++
++#include "curl_setup.h"
++
++#define GLOBAL_INIT_IS_THREADSAFE
++
++#if defined(_WIN32_WINNT) && _WIN32_WINNT >= 0x600
++
++#ifdef __MINGW32__
++#ifndef __MINGW64_VERSION_MAJOR
++#if (__MINGW32_MAJOR_VERSION < 5) || \
++(__MINGW32_MAJOR_VERSION == 5 && __MINGW32_MINOR_VERSION == 0)
++/* mingw >= 5.0.1 defines SRWLOCK, and slightly different from MS define */
++typedef PVOID SRWLOCK, *PSRWLOCK;
++#endif
++#endif
++#ifndef SRWLOCK_INIT
++#define SRWLOCK_INIT NULL
++#endif
++#endif /* __MINGW32__ */
++
++#define curl_simple_lock SRWLOCK
++#define CURL_SIMPLE_LOCK_INIT SRWLOCK_INIT
++
++#define curl_simple_lock_lock(m) AcquireSRWLockExclusive(m)
++#define curl_simple_lock_unlock(m) ReleaseSRWLockExclusive(m)
++
++#elif defined(HAVE_ATOMIC) && defined(HAVE_STDATOMIC_H)
++#include 
++#if defined(HAVE_SCHED_YIELD)
++#include 
++#endif
++
++#define curl_simple_lock atomic_int
++#define CURL_SIMPLE_LOCK_INIT 0
++
++/* a clang-thing */
++#ifndef __has_builtin
++#define __has_builtin(x) 0
++#endif
++
++#ifndef __INTEL_COMPILER
++/* The Intel compiler tries to look like GCC *and* clang *and* lies in its
++   __has_builtin() function, so override it. */
++
++/* if GCC on i386/x86_64 or if the built-in is present */
++#if ( (defined(__GNUC__) && !defined(__clang__)) && \
++  (defined(__i386__) || defined(__x86_64__))) ||\
++  __has_builtin(__builtin_ia32_pause)
++#define HAVE_BUILTIN_IA32_PAUSE
++#endif
++
++#endif
++
++static inline void curl_simple_lock_lock(curl_simple_lock *lock)
++{
++  for(;;) {
++if(!atomic_exchange_explicit(lock, true, memory_order_acquire))
++  break;
++/* Reduce cache coherency traffic */
++while(atomic_load_explicit(lock, memory_order_relaxed)) {
++  /* Reduce load (not mandatory) */
++#ifdef HAVE_BUILTIN_IA32_PAUSE
++  __builtin_ia32_pause();
++#elif defined(__aarch64__)
++  __asm__ volatile("yield" ::: 

Re: [OE-core][dunfell][PATCH] curl: fix CVE-2023-28320 siglongjmp race condition may lead to crash

2023-07-12 Thread vkumbhar
Corrected, v2 has been sent for review.

Kind regards,
Vivek

On Mon, Jul 10, 2023 at 9:11 PM Steve Sakoman  wrote:

> On Mon, Jul 10, 2023 at 5:03 AM Vivek Kumbhar  wrote:
> >
> > As it is a followup patch I have added it as fol1.
> >
> > If you want this as pre1, I will send v2 again.
>
> What is confusing me is that this patch adds three files
> (CVE-2023-28320-fol1.patch, CVE-2023-28320-pre1.patch,
> CVE-2023-28320.patch) but then only adds two of them to SRC_URI.
>
> So you should either drop adding CVE-2023-28320-pre1.patch, or add it
> to SRC_URI.
>
> Make sense?
>
> Steve
>
> > On Mon, Jul 10, 2023 at 8:01 PM Steve Sakoman  wrote:
> >>
> >> On Sun, Jul 9, 2023 at 7:28 PM vkumbhar  wrote:
> >> >
> >> > Introduced by:
> https://github.com/curl/curl/commit/3c49b405de4fbf1fd7127f91908261268640e54f
> (curl-7_9_8)
> >> > Fixed by:
> https://github.com/curl/curl/commit/13718030ad4b3209a7583b4f27f683cd3a6fa5f2
> (curl-8_1_0)
> >> > Follow-up:
> https://github.com/curl/curl/commit/f446258f0269a62289cca0210157cb8558d0edc3
> (curl-8_1_0)
> >> > https://curl.se/docs/CVE-2023-28320.html
> >> >
> >> > Signed-off-by: Vivek Kumbhar 
> >> > ---
> >> >  .../curl/curl/CVE-2023-28320-fol1.patch   | 197
> ++
> >> >  .../curl/curl/CVE-2023-28320-pre1.patch   | 197
> ++
> >> >  .../curl/curl/CVE-2023-28320.patch|  86 
> >> >  meta/recipes-support/curl/curl_7.69.1.bb  |   2 +
> >> >  4 files changed, 482 insertions(+)
> >> >  create mode 100644
> meta/recipes-support/curl/curl/CVE-2023-28320-fol1.patch
> >> >  create mode 100644
> meta/recipes-support/curl/curl/CVE-2023-28320-pre1.patch
> >> >  create mode 100644
> meta/recipes-support/curl/curl/CVE-2023-28320.patch
> >> >
> >> > diff --git a/meta/recipes-support/curl/curl/CVE-2023-28320-fol1.patch
> b/meta/recipes-support/curl/curl/CVE-2023-28320-fol1.patch
> >> > new file mode 100644
> >> > index 00..eaa6fdc327
> >> > --- /dev/null
> >> > +++ b/meta/recipes-support/curl/curl/CVE-2023-28320-fol1.patch
> >> > @@ -0,0 +1,197 @@
> >> > +From f446258f0269a62289cca0210157cb8558d0edc3 Mon Sep 17 00:00:00
> 2001
> >> > +From: Daniel Stenberg 
> >> > +Date: Tue, 16 May 2023 23:40:42 +0200
> >> > +Subject: [PATCH] hostip: include easy_lock.h before using
> >> > + GLOBAL_INIT_IS_THREADSAFE
> >> > +
> >> > +Since that header file is the only place that define can be defined.
> >> > +
> >> > +Reported-by: Marc Deslauriers
> >> > +
> >> > +Follow-up to 13718030ad4b3209
> >> > +
> >> > +Closes #11121
> >> > +
> >> > +Upstream-Status: Backport [
> https://github.com/curl/curl/commit/f446258f0269a62289cca0210157cb8558d0edc3
> ]
> >> > +CVE: CVE-2023-28320
> >> > +Signed-off-by: Vivek Kumbhar 
> >> > +---
> >> > + lib/easy_lock.h | 109
> 
> >> > + lib/hostip.c|  10 ++---
> >> > + lib/hostip.h|   9 
> >> > + 3 files changed, 113 insertions(+), 15 deletions(-)
> >> > + create mode 100644 lib/easy_lock.h
> >> > +
> >> > +diff --git a/lib/easy_lock.h b/lib/easy_lock.h
> >> > +new file mode 100644
> >> > +index 000..6399a39
> >> > +--- /dev/null
> >> >  b/lib/easy_lock.h
> >> > +@@ -0,0 +1,109 @@
> >> > ++#ifndef HEADER_CURL_EASY_LOCK_H
> >> > ++#define HEADER_CURL_EASY_LOCK_H
> >> >
> ++/***
> >> > ++ *  _   _   _
> >> > ++ *  Project ___| | | |  _ \| |
> >> > ++ * / __| | | | |_) | |
> >> > ++ *| (__| |_| |  _ <| |___
> >> > ++ * \___|\___/|_| \_\_|
> >> > ++ *
> >> > ++ * Copyright (C) Daniel Stenberg, , et al.
> >> > ++ *
> >> > ++ * This software is licensed as described in the file COPYING, which
> >> > ++ * you should have received as part of this distribution. The terms
> >> > ++ * are also available at https://curl.se/docs/copyright.html.
> >> > ++ *
> >> > ++ * You may opt to use, copy, modify, merge, publish, distribute
> and/or sell
> >> > ++ * copies of the Software, and permit persons to whom the Software
> is
> >> > ++ * furnished to do so, under the terms of the COPYING file.
> >> > ++ *
> >> > ++ * This software is distributed on an "AS IS" basis, WITHOUT
> WARRANTY OF ANY
> >> > ++ * KIND, either express or implied.
> >> > ++ *
> >> > ++ * SPDX-License-Identifier: curl
> >> > ++ *
> >> > ++
> ***/
> >> > ++
> >> > ++#include "curl_setup.h"
> >> > ++
> >> > ++#define GLOBAL_INIT_IS_THREADSAFE
> >> > ++
> >> > ++#if defined(_WIN32_WINNT) && _WIN32_WINNT >= 0x600
> >> > ++
> >> > ++#ifdef __MINGW32__
> >> > ++#ifndef __MINGW64_VERSION_MAJOR
> >> > ++#if (__MINGW32_MAJOR_VERSION < 5) || \
> >> > ++(__MINGW32_MAJOR_VERSION == 5 && __MINGW32_MINOR_VERSION == 0)
> >> > ++/* mingw >= 5.0.1 defines SRWLOCK, and slightly different from MS
> define */
> >> > 

[OE-core][kirkstone][PATCH v2] curl: fix CVE-2023-28320 siglongjmp race condition may lead to crash

2023-07-12 Thread vkumbhar
Introduced by: 
https://github.com/curl/curl/commit/3c49b405de4fbf1fd7127f91908261268640e54f 
(curl-7_9_8)
Fixed by: 
https://github.com/curl/curl/commit/13718030ad4b3209a7583b4f27f683cd3a6fa5f2 
(curl-8_1_0)
Follow-up: 
https://github.com/curl/curl/commit/f446258f0269a62289cca0210157cb8558d0edc3 
(curl-8_1_0)
https://curl.se/docs/CVE-2023-28320.html

Signed-off-by: Vivek Kumbhar 
---
 .../curl/curl/CVE-2023-28320-fol1.patch   | 197 ++
 .../curl/curl/CVE-2023-28320.patch|  86 
 meta/recipes-support/curl/curl_7.69.1.bb  |   2 +
 3 files changed, 285 insertions(+)
 create mode 100644 meta/recipes-support/curl/curl/CVE-2023-28320-fol1.patch
 create mode 100644 meta/recipes-support/curl/curl/CVE-2023-28320.patch

diff --git a/meta/recipes-support/curl/curl/CVE-2023-28320-fol1.patch 
b/meta/recipes-support/curl/curl/CVE-2023-28320-fol1.patch
new file mode 100644
index 00..eaa6fdc327
--- /dev/null
+++ b/meta/recipes-support/curl/curl/CVE-2023-28320-fol1.patch
@@ -0,0 +1,197 @@
+From f446258f0269a62289cca0210157cb8558d0edc3 Mon Sep 17 00:00:00 2001
+From: Daniel Stenberg 
+Date: Tue, 16 May 2023 23:40:42 +0200
+Subject: [PATCH] hostip: include easy_lock.h before using
+ GLOBAL_INIT_IS_THREADSAFE
+
+Since that header file is the only place that define can be defined.
+
+Reported-by: Marc Deslauriers
+
+Follow-up to 13718030ad4b3209
+
+Closes #11121
+
+Upstream-Status: Backport 
[https://github.com/curl/curl/commit/f446258f0269a62289cca0210157cb8558d0edc3]
+CVE: CVE-2023-28320
+Signed-off-by: Vivek Kumbhar 
+---
+ lib/easy_lock.h | 109 
+ lib/hostip.c|  10 ++---
+ lib/hostip.h|   9 
+ 3 files changed, 113 insertions(+), 15 deletions(-)
+ create mode 100644 lib/easy_lock.h
+
+diff --git a/lib/easy_lock.h b/lib/easy_lock.h
+new file mode 100644
+index 000..6399a39
+--- /dev/null
 b/lib/easy_lock.h
+@@ -0,0 +1,109 @@
++#ifndef HEADER_CURL_EASY_LOCK_H
++#define HEADER_CURL_EASY_LOCK_H
++/***
++ *  _   _   _
++ *  Project ___| | | |  _ \| |
++ * / __| | | | |_) | |
++ *| (__| |_| |  _ <| |___
++ * \___|\___/|_| \_\_|
++ *
++ * Copyright (C) Daniel Stenberg, , et al.
++ *
++ * This software is licensed as described in the file COPYING, which
++ * you should have received as part of this distribution. The terms
++ * are also available at https://curl.se/docs/copyright.html.
++ *
++ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
++ * copies of the Software, and permit persons to whom the Software is
++ * furnished to do so, under the terms of the COPYING file.
++ *
++ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
++ * KIND, either express or implied.
++ *
++ * SPDX-License-Identifier: curl
++ *
++ ***/
++
++#include "curl_setup.h"
++
++#define GLOBAL_INIT_IS_THREADSAFE
++
++#if defined(_WIN32_WINNT) && _WIN32_WINNT >= 0x600
++
++#ifdef __MINGW32__
++#ifndef __MINGW64_VERSION_MAJOR
++#if (__MINGW32_MAJOR_VERSION < 5) || \
++(__MINGW32_MAJOR_VERSION == 5 && __MINGW32_MINOR_VERSION == 0)
++/* mingw >= 5.0.1 defines SRWLOCK, and slightly different from MS define */
++typedef PVOID SRWLOCK, *PSRWLOCK;
++#endif
++#endif
++#ifndef SRWLOCK_INIT
++#define SRWLOCK_INIT NULL
++#endif
++#endif /* __MINGW32__ */
++
++#define curl_simple_lock SRWLOCK
++#define CURL_SIMPLE_LOCK_INIT SRWLOCK_INIT
++
++#define curl_simple_lock_lock(m) AcquireSRWLockExclusive(m)
++#define curl_simple_lock_unlock(m) ReleaseSRWLockExclusive(m)
++
++#elif defined(HAVE_ATOMIC) && defined(HAVE_STDATOMIC_H)
++#include 
++#if defined(HAVE_SCHED_YIELD)
++#include 
++#endif
++
++#define curl_simple_lock atomic_int
++#define CURL_SIMPLE_LOCK_INIT 0
++
++/* a clang-thing */
++#ifndef __has_builtin
++#define __has_builtin(x) 0
++#endif
++
++#ifndef __INTEL_COMPILER
++/* The Intel compiler tries to look like GCC *and* clang *and* lies in its
++   __has_builtin() function, so override it. */
++
++/* if GCC on i386/x86_64 or if the built-in is present */
++#if ( (defined(__GNUC__) && !defined(__clang__)) && \
++  (defined(__i386__) || defined(__x86_64__))) ||\
++  __has_builtin(__builtin_ia32_pause)
++#define HAVE_BUILTIN_IA32_PAUSE
++#endif
++
++#endif
++
++static inline void curl_simple_lock_lock(curl_simple_lock *lock)
++{
++  for(;;) {
++if(!atomic_exchange_explicit(lock, true, memory_order_acquire))
++  break;
++/* Reduce cache coherency traffic */
++while(atomic_load_explicit(lock, memory_order_relaxed)) {
++  /* Reduce load (not mandatory) */
++#ifdef HAVE_BUILTIN_IA32_PAUSE
++  __builtin_ia32_pause();
++#elif defined(__aarch64__)
++  __asm__ volatile("yield" ::: 

Re: [OE-core] WIC: erofs-utils-native: Cherrypick commit from master to #kirkstone

2023-07-12 Thread Heiko
>From 2d8164ac97277c344bc7c9e11f0ed78235726bda Mon Sep 17 00:00:00 2001
From: Heiko Thole 
Date: Wed, 12 Jul 2023 07:41:59 +0200
Subject: [kirkstone][PATCH] wic: Add dependencies for erofs-utils

In order to build erofs filesystems, wic must have the erofs-utils package 
installed into its sysroot.

Signed-off-by: Heiko Thole 
---
meta/classes/image_types_wic.bbclass | 2 +-
meta/recipes-core/meta/wic-tools.bb  | 2 +-
scripts/lib/wic/misc.py              | 1 +
3 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/meta/classes/image_types_wic.bbclass 
b/meta/classes/image_types_wic.bbclass
index 6453dd1b74..8497916d48 100644
--- a/meta/classes/image_types_wic.bbclass
+++ b/meta/classes/image_types_wic.bbclass
@@ -83,7 +83,7 @@ do_image_wic[recrdeptask] += "do_deploy"
do_image_wic[deptask] += "do_image_complete"

WKS_FILE_DEPENDS_DEFAULT = '${@bb.utils.contains_any("BUILD_ARCH", [ 'x86_64', 
'i686' ], "syslinux-native", "",d)}'
-WKS_FILE_DEPENDS_DEFAULT += "bmap-tools-native cdrtools-native 
btrfs-tools-native squashfs-tools-native e2fsprogs-native"
+WKS_FILE_DEPENDS_DEFAULT += "bmap-tools-native cdrtools-native 
btrfs-tools-native squashfs-tools-native e2fsprogs-native erofs-utils-native"
# Unified kernel images need objcopy
WKS_FILE_DEPENDS_DEFAULT += "virtual/${MLPREFIX}${TARGET_PREFIX}binutils"
WKS_FILE_DEPENDS_BOOTLOADERS = ""
diff --git a/meta/recipes-core/meta/wic-tools.bb 
b/meta/recipes-core/meta/wic-tools.bb
index daaf3ea576..9282d36a4d 100644
--- a/meta/recipes-core/meta/wic-tools.bb
+++ b/meta/recipes-core/meta/wic-tools.bb
@@ -6,7 +6,7 @@ DEPENDS = "\
parted-native gptfdisk-native dosfstools-native \
mtools-native bmap-tools-native grub-native cdrtools-native \
btrfs-tools-native squashfs-tools-native pseudo-native \
-           e2fsprogs-native util-linux-native tar-native \
+           e2fsprogs-native util-linux-native tar-native erofs-utils-native \
virtual/${TARGET_PREFIX}binutils \
"
DEPENDS:append:x86 = " syslinux-native syslinux grub-efi systemd-boot"
diff --git a/scripts/lib/wic/misc.py b/scripts/lib/wic/misc.py
index a8aab6c524..2b90821b30 100644
--- a/scripts/lib/wic/misc.py
+++ b/scripts/lib/wic/misc.py
@@ -36,6 +36,7 @@ NATIVE_RECIPES = {"bmaptool": "bmap-tools",
"mkdosfs": "dosfstools",
"mkisofs": "cdrtools",
"mkfs.btrfs": "btrfs-tools",
+                  "mkfs.erofs": "erofs-utils",
"mkfs.ext2": "e2fsprogs",
"mkfs.ext3": "e2fsprogs",
"mkfs.ext4": "e2fsprogs",
--
2.41.0

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#184168): 
https://lists.openembedded.org/g/openembedded-core/message/184168
Mute This Topic: https://lists.openembedded.org/mt/100076346/21656
Mute 
#kirkstone:https://lists.openembedded.org/g/openembedded-core/mutehashtag/kirkstone
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-