[OE-core] [PATCH v2] mdadm: Disable ptests

2024-01-23 Thread Pavel Zhukov
As agreed upon in the bug triage meeting, disable mdadm ptest for the time being

Related: [Yocto #15181] [Yocto #15159] [Yocto #15308] [Yocto #15309]

Signed-off-by: Pavel Zhukov 
---
 meta/conf/distro/include/ptest-packagelists.inc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta/conf/distro/include/ptest-packagelists.inc 
b/meta/conf/distro/include/ptest-packagelists.inc
index ef6f471e7b..a1643c5548 100644
--- a/meta/conf/distro/include/ptest-packagelists.inc
+++ b/meta/conf/distro/include/ptest-packagelists.inc
@@ -104,7 +104,6 @@ PTESTS_SLOW = "\
 libgcrypt \
 libmodule-build-perl \
 lttng-tools \
-mdadm \
 openssh \
 openssl \
 parted \
@@ -135,6 +134,7 @@ PTESTS_PROBLEMS:append:x86 = " valgrind"
 #ifupdown \ # Tested separately in lib/oeqa/selftest/cases/imagefeatures.py
 #libinput \ # Tests need an unloaded system to be reliable
 #libpam \ # Needs pam DISTRO_FEATURE
+#mdadm \ # tests are flaky in AB.
 #numactl \ # qemu not (yet) configured for numa; all tests are skipped
 #libseccomp \ #  tests failed: 38; add to slow tests once addressed
 #python3-numpy \ # requires even more RAM and (possibly) disk space; 
multiple failures
@@ -147,6 +147,7 @@ PTESTS_PROBLEMS = "\
 libinput \
 libpam \
 libseccomp \
+mdadm \
 numactl \
 python3-license-expression \
 python3-numpy \
-- 
2.43.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#194226): 
https://lists.openembedded.org/g/openembedded-core/message/194226
Mute This Topic: https://lists.openembedded.org/mt/103906985/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] mdadm: Disable ptests

2024-01-23 Thread Pavel Zhukov
As agreed upon in the bug triage meeting, disable mdadm ptest for the time being

Related: [Yocto #15181] [Yocto #15159] [Yocto #15308] [Yocto #15309]

Signed-off-by: Pavel Zhukov 
---
 meta/conf/distro/include/ptest-packagelists.inc | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta/conf/distro/include/ptest-packagelists.inc 
b/meta/conf/distro/include/ptest-packagelists.inc
index ef6f471e7b..7f949a467c 100644
--- a/meta/conf/distro/include/ptest-packagelists.inc
+++ b/meta/conf/distro/include/ptest-packagelists.inc
@@ -135,6 +135,7 @@ PTESTS_PROBLEMS:append:x86 = " valgrind"
 #ifupdown \ # Tested separately in lib/oeqa/selftest/cases/imagefeatures.py
 #libinput \ # Tests need an unloaded system to be reliable
 #libpam \ # Needs pam DISTRO_FEATURE
+#mdadm \ # tests are flaky in AB.
 #numactl \ # qemu not (yet) configured for numa; all tests are skipped
 #libseccomp \ #  tests failed: 38; add to slow tests once addressed
 #python3-numpy \ # requires even more RAM and (possibly) disk space; 
multiple failures
@@ -147,6 +148,7 @@ PTESTS_PROBLEMS = "\
 libinput \
 libpam \
 libseccomp \
+mdadm \
 numactl \
 python3-license-expression \
 python3-numpy \
-- 
2.43.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#194218): 
https://lists.openembedded.org/g/openembedded-core/message/194218
Mute This Topic: https://lists.openembedded.org/mt/103906271/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] mdamd: Switch to git recipe

2024-01-22 Thread Pavel Zhukov
Upstream project has got new maintainer last month. I'm contacting him to see 
what's the plan is. 
They were doing release every 2-3 years before and 4.2 has been released in 
2021 (Dec 30th :) ) so not so long time ago.  

-- 
Pavel

On Mon, Jan 22, 2024, at 12:09, Richard Purdie wrote:
> On Mon, 2024-01-22 at 11:17 +0100, Alexander Kanavin wrote:
> > On Mon, 22 Jan 2024 at 09:55, Pavel Zhukov  wrote:
> > > 
> > > mdadm latest official release was long time while development is
> > > ongoing. This caused growing number of downstream patches in the layer.
> > > Switch to git recipe and cleanup patches.
> > 
> > Wait.
> > 
> > Did you engage with upstream to find out if/when they're making a new
> > release? Switching to a random commit in the middle of a development
> > cycle needs to be carefully considered, and preferably, confirmed with
> > upstream. Even if the last release was a long time ago, and
> > maintenance burden with custom patches is growing.
> 
> We did discuss this one a little on the tech call or bug triage. mdadm
> is proving to be a pain, the tests are broken and we have a growing set
> of patches.
> 
> It seems upstream are happy working in git and weren't going to make
> official releases, I'm not sure where I head that though. 
> 
> Whilst I generally prefer releases, moving over to git does seem like
> the right thing to do in this case.
> 
> Cheers,
> 
> Richard
> 
> 
> 
> 
> 

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#194144): 
https://lists.openembedded.org/g/openembedded-core/message/194144
Mute This Topic: https://lists.openembedded.org/mt/103882790/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 2/2] mdadm: Disable ptest

2024-01-22 Thread Pavel Zhukov
Yes, Yoann has mentioned this already.
Seems like recipes use both PTEST_ENABLED and PTESTS_PROBLEMS for this purposes 
and I've not found any documentation. I'll update the patch to use 
PTESTS_PROBLEMS instead 

-- 
Pavel

On Mon, Jan 22, 2024, at 11:21, Alexander Kanavin wrote:
> On Mon, 22 Jan 2024 at 09:55, Pavel Zhukov  wrote:
> > mdadm tests are flaky and cause a lot of failures on autobuilder.
> > Disable them for now. Keeping ptest code in the recipe to fix/enable
> > in the future
> >  SRC_URI = 
> > "git://git.kernel.org/pub/scm/utils/mdadm/mdadm.git;protocol=https;branch=master
> >  \
> > -   file://run-ptest \
> > +# Disable ptests for now as they're flaky
> > +# but keeping ptest code in case we want to enable them in the future
> > +PTEST_ENABLED="0"
> > +SRC_URI:append = "${@bb.utils.contains('PTEST_ENABLED', '1', ' 
> > file://run-ptest', '', d)}"
> 
> The correct way to do this is to modify
> conf/distro/include/ptest-packagelists.inc. There's a specific
> exclusion list made for that purpose in there at the end.
> 
> Alex
> 
> 
> 
> 
> 

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#194137): 
https://lists.openembedded.org/g/openembedded-core/message/194137
Mute This Topic: https://lists.openembedded.org/mt/103882792/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 2/2] mdadm: Disable ptest

2024-01-22 Thread Pavel Zhukov
mdadm tests are flaky and cause a lot of failures on autobuilder.
Disable them for now. Keeping ptest code in the recipe to fix/enable
in the future

Signed-off-by: Pavel Zhukov 
---
 meta/recipes-extended/mdadm/mdadm_git.bb | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-extended/mdadm/mdadm_git.bb 
b/meta/recipes-extended/mdadm/mdadm_git.bb
index 53574dfdc3..d95df66af5 100644
--- a/meta/recipes-extended/mdadm/mdadm_git.bb
+++ b/meta/recipes-extended/mdadm/mdadm_git.bb
@@ -10,7 +10,6 @@ LIC_FILES_CHKSUM = 
"file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
 
 
 SRC_URI = 
"git://git.kernel.org/pub/scm/utils/mdadm/mdadm.git;protocol=https;branch=master
 \
-   file://run-ptest \
file://mdadm-3.3.2_x32_abi_time_t.patch \
file://0001-mdadm.h-Undefine-dprintf-before-redefining.patch \

file://0001-Fix-the-path-of-corosync-and-dlm-header-files-check.patch \
@@ -31,6 +30,11 @@ S = "${WORKDIR}/git"
 
 inherit autotools-brokensep ptest systemd
 
+# Disable ptests for now as they're flaky
+# but keeping ptest code in case we want to enable them in the future
+PTEST_ENABLED="0"
+SRC_URI:append = "${@bb.utils.contains('PTEST_ENABLED', '1', ' 
file://run-ptest', '', d)}"
+
 DEPENDS = "udev"
 
 SYSTEMD_SERVICE:${PN} = "mdmonitor.service"
-- 
2.43.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#194127): 
https://lists.openembedded.org/g/openembedded-core/message/194127
Mute This Topic: https://lists.openembedded.org/mt/103882792/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/2] mdamd: Switch to git recipe

2024-01-22 Thread Pavel Zhukov
mdadm latest official release was long time while development is
ongoing. This caused growing number of downstream patches in the layer.
Switch to git recipe and cleanup patches.

Signed-off-by: Pavel Zhukov 
---
 ...anup-validate_geometry_ddf_container.patch | 148 --
 ...sing-_Alignof-when-using-C11-or-newe.patch |  52 --
 ...parsing-of-r-in-monitor-manager-mode.patch |  74 ---
 ...-corosync-and-dlm-header-files-check.patch |   7 +-
 .../files/0001-Makefile-install-mdcheck.patch |  11 +-
 ...t-for-complete-rebuild-in-integrity-.patch |  11 +-
 ...for-implicit-fallthrough-warning-sup.patch |  28 --
 ...-fix-gcc-8-format-truncation-warning.patch |  11 +-
 ...-Fix-optional-write-behind-parameter.patch |  45 --
 ...-y-for-use-syslog-to-recive-event-re.patch |  11 +-
 ...01-mdadm-skip-test-11spare-migration.patch |  39 +-
 ...h-Undefine-dprintf-before-redefining.patch |   8 +-
 ...FILE_OFFSET_BITS-to-enable-largefile.patch | 108 +++--
 ...d-a-test-that-validates-raid0-with-l.patch |  41 --
 ...-Run-udevadm-settle-before-setting-r.patch |  39 --
 ...ow-clear-the-superblock-at-every-ite.patch |  33 --
 ...metadata-avoid-passing-chunk-size-to.patch |  41 --
 ...n-files-for-04update-uuid-and-07reve.patch |  11 +-
 ...ts-fix-raid0-tests-for-0.90-metadata.patch | 102 
 ...nter-dereference-in-validate_geometr.patch |  56 ---
 ...se-after-close-bug-by-closing-after-.patch |  91 
 ...gfault-when-calling-NULL-get_bad_blo.patch |  42 --
 ...Mark-and-ignore-broken-test-failures.patch | 128 -
 ...dd-broken-files-for-all-broken-tests.patch | 454 --
 .../mdadm/files/debian-no-Werror.patch|  11 +-
 .../mdadm/files/include_sysmacros.patch   |  14 -
 .../files/mdadm-3.3.2_x32_abi_time_t.patch|   7 +-
 .../mdadm/{mdadm_4.2.bb => mdadm_git.bb}  |  26 +-
 28 files changed, 125 insertions(+), 1524 deletions(-)
 delete mode 100644 
meta/recipes-extended/mdadm/files/0001-DDF-Cleanup-validate_geometry_ddf_container.patch
 delete mode 100644 
meta/recipes-extended/mdadm/files/0001-Define-alignof-using-_Alignof-when-using-C11-or-newe.patch
 delete mode 100644 
meta/recipes-extended/mdadm/files/0001-Fix-parsing-of-r-in-monitor-manager-mode.patch
 delete mode 100644 
meta/recipes-extended/mdadm/files/0001-Use-CC-to-check-for-implicit-fallthrough-warning-sup.patch
 delete mode 100644 
meta/recipes-extended/mdadm/files/0001-mdadm-Fix-optional-write-behind-parameter.patch
 delete mode 100644 
meta/recipes-extended/mdadm/files/0001-tests-00raid0-add-a-test-that-validates-raid0-with-l.patch
 delete mode 100644 
meta/recipes-extended/mdadm/files/0001-tests-00readonly-Run-udevadm-settle-before-setting-r.patch
 delete mode 100644 
meta/recipes-extended/mdadm/files/0001-tests-02lineargrow-clear-the-superblock-at-every-ite.patch
 delete mode 100644 
meta/recipes-extended/mdadm/files/0001-tests-04update-metadata-avoid-passing-chunk-size-to.patch
 delete mode 100644 
meta/recipes-extended/mdadm/files/0001-tests-fix-raid0-tests-for-0.90-metadata.patch
 delete mode 100644 
meta/recipes-extended/mdadm/files/0002-DDF-Fix-NULL-pointer-dereference-in-validate_geometr.patch
 delete mode 100644 
meta/recipes-extended/mdadm/files/0003-mdadm-Grow-Fix-use-after-close-bug-by-closing-after-.patch
 delete mode 100644 
meta/recipes-extended/mdadm/files/0004-monitor-Avoid-segfault-when-calling-NULL-get_bad_blo.patch
 delete mode 100644 
meta/recipes-extended/mdadm/files/0005-mdadm-test-Mark-and-ignore-broken-test-failures.patch
 delete mode 100644 
meta/recipes-extended/mdadm/files/0006-tests-Add-broken-files-for-all-broken-tests.patch
 delete mode 100644 meta/recipes-extended/mdadm/files/include_sysmacros.patch
 rename meta/recipes-extended/mdadm/{mdadm_4.2.bb => mdadm_git.bb} (77%)

diff --git 
a/meta/recipes-extended/mdadm/files/0001-DDF-Cleanup-validate_geometry_ddf_container.patch
 
b/meta/recipes-extended/mdadm/files/0001-DDF-Cleanup-validate_geometry_ddf_container.patch
deleted file mode 100644
index cea435f83b..00
--- 
a/meta/recipes-extended/mdadm/files/0001-DDF-Cleanup-validate_geometry_ddf_container.patch
+++ /dev/null
@@ -1,148 +0,0 @@
-From ca458f4dcc4de9403298f67543466ce4bbc8f8ae Mon Sep 17 00:00:00 2001
-From: Logan Gunthorpe 
-Date: Wed, 22 Jun 2022 14:25:07 -0600
-Subject: [PATCH 1/4] DDF: Cleanup validate_geometry_ddf_container()
-
-Move the function up so that the function declaration is not necessary
-and remove the unused arguments to the function.
-
-No functional changes are intended but will help with a bug fix in the
-next patch.
-
-Signed-off-by: Logan Gunthorpe 
-Acked-by: Mariusz Tkaczyk 
-Signed-off-by: Jes Sorensen 
-
-Upstream-Status: Backport
-
-Reference to upstream patch:
-https://git.kernel.org/pub/scm/utils/mdadm/mdadm.git/commit/?id=679bd9508a30
-
-Signed-off-by: Ovidiu Panait 

- super-ddf.c | 88 -
- 1 file changed, 39 insertions(+), 49 deletions(-)
-
-diff --git a/super-ddf.c b/super-ddf.c
-index 3f304cd..6

Re: [OE-core] [PATCH v3 1/4] dummy-sdk-package.inc: Filter packages which are marked for installation

2023-12-18 Thread Pavel Zhukov

Hi Alex, Luca,

Can you please retest this patchset one more time please?
Neither myself nor RP could reproduce build failure with recent
master/sstate so it might be fixed in the meantime.

--
Pavel

On 2023-10-12 09:36, Luca Ceresoli via lists.openembedded.org wrote:

Hello Pavel,

On Mon,  9 Oct 2023 16:39:58 +0200
"Pavel Zhukov"  wrote:


if packages is provided by dummysdk and in the same time marked for
installation with IMAGE_INSTALL it causes conflict in apt because 
virtual providers are

not taken into account if package is asked to be installed explicitly.
Filter such packages from provides/conflicts to workaround this 
problem.

This workaround brakes RPM usecase because of file conlicts with
DUMMYPROVIDES, use DUMMYPROVIDES_PACKAGES_MULTILIB instead (which
doesn't include file based conflicts).
While this is needed for the case of package_deb only adding it for 
all

package managers to not complicate the code.

Fixes: [Yocto #13338] [Yocto #14066]

Fixes:
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 target-sdk-provides-dummy : Conflicts: bash
E: Unable to correct problems, you have held broken packages.

Signed-off-by: Pavel Zhukov 


Testing with this series applied results in lots of errors like these:

stdio: ERROR: core-image-minimal-1.0-r0 do_rootfs: No SPDX file found
for package base-files, False
sstate:base-files:qemux86_64-poky-linux:3.0.14:r0:qemux86_64:11:
sstate:base-files::3.0.14:r0::11:
stdio: ERROR: core-image-minimal-mtdutils-1.0-r0 do_rootfs: No SPDX
file found for package base-files, False
sstate:base-files:qemux86_64-poky-linux:3.0.14:r0:qemux86_64:11:
sstate:base-files::3.0.14:r0::11:

See the full log at:

https://autobuilder.yoctoproject.org/typhoon/#/builders/86/builds/5894/steps/14/logs/stdio

Luca




-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#192628): 
https://lists.openembedded.org/g/openembedded-core/message/192628
Mute This Topic: https://lists.openembedded.org/mt/101853406/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] bbtests.py: Add test for unexpanded variables in the dirname

2023-12-08 Thread Pavel Zhukov
Regression test for [Yocto #15255]

Signed-off-by: Pavel Zhukov 
---
 meta/lib/oeqa/selftest/cases/bbtests.py | 11 +++
 1 file changed, 11 insertions(+)

diff --git a/meta/lib/oeqa/selftest/cases/bbtests.py 
b/meta/lib/oeqa/selftest/cases/bbtests.py
index d242352ea2..0da59e0f58 100644
--- a/meta/lib/oeqa/selftest/cases/bbtests.py
+++ b/meta/lib/oeqa/selftest/cases/bbtests.py
@@ -362,3 +362,14 @@ INHERIT:remove = \"report-error\"
 
 result = bitbake('gitunpackoffline-fail -c fetch', ignore_status=True)
 self.assertTrue(re.search("Recipe uses a floating tag/branch .* for 
repo .* without a fixed SRCREV yet doesn't call bb.fetch2.get_srcrev()", 
result.output), msg = "Recipe without PV set to SRCPV should have failed: %s" % 
result.output)
+
+def test_unexpanded_variable_in_path(self):
+"""
+Test that bitbake fails if directory contains unexpanded bitbake 
variable in the name
+"""
+recipe_name = "gitunpackoffline"
+self.write_config('PV:pn-gitunpackoffline:append = "+${UNDEFVAL}"')
+result = bitbake('{}'.format(recipe_name), ignore_status=True)
+self.assertGreater(result.status, 0, "Build should have failed if ${ 
is in the path")
+self.assertTrue(re.search("ERROR: Directory name /.* contains 
unexpanded bitbake variable. This may cause build failures and WORKDIR 
polution",
+  result.output), msg = "mkdirhier with 
unexpanded variable should have failed: %s" % result.output)
-- 
2.41.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#192060): 
https://lists.openembedded.org/g/openembedded-core/message/192060
Mute This Topic: https://lists.openembedded.org/mt/103054441/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] bbtests.py: Add test for unexpanded variables in the dirname

2023-12-08 Thread Pavel Zhukov
Regression test for [Yocto #15255]

Signed-off-by: Pavel Zhukov 
---
 meta/lib/oeqa/selftest/cases/bbtests.py | 10 ++
 1 file changed, 10 insertions(+)

diff --git a/meta/lib/oeqa/selftest/cases/bbtests.py 
b/meta/lib/oeqa/selftest/cases/bbtests.py
index d242352ea2..2bc1898f2b 100644
--- a/meta/lib/oeqa/selftest/cases/bbtests.py
+++ b/meta/lib/oeqa/selftest/cases/bbtests.py
@@ -362,3 +362,13 @@ INHERIT:remove = \"report-error\"
 
 result = bitbake('gitunpackoffline-fail -c fetch', ignore_status=True)
 self.assertTrue(re.search("Recipe uses a floating tag/branch .* for 
repo .* without a fixed SRCREV yet doesn't call bb.fetch2.get_srcrev()", 
result.output), msg = "Recipe without PV set to SRCPV should have failed: %s" % 
result.output)
+
+def test_unexpanded_variable_in_path(self):
+"""
+Test that bitbake fails if directory contains unexpanded bitbake 
variable in the name
+"""
+recipe_name = "gitunpackoffline"
+self.write_config('PV:pn-gitunpackoffline:append = "+${UNDEFVAL}"')
+result = bitbake('{}'.format(recipe_name), ignore_status=True)
+self.assertGreater(result.status, 0, "Build should have failed if ${ 
is in the path")
+self.assertTrue(re.search("ERROR: Directory name /.* contains 
unexpanded bitbake variable. This may cause build failures and WORKDIR 
polution", result.output), msg = "mkdirhier with unexpanded variable should 
have failed: %s" % result.output)
-- 
2.41.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#192056): 
https://lists.openembedded.org/g/openembedded-core/message/192056
Mute This Topic: https://lists.openembedded.org/mt/103054038/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 v2] bbtests.py: Add test for unexpanded variables in the dirname

2023-12-08 Thread Pavel Zhukov
Regression test for [Yocto #15255]

Signed-off-by: Pavel Zhukov 
---
 meta/lib/oeqa/selftest/cases/bbtests.py | 9 +
 1 file changed, 9 insertions(+)

diff --git a/meta/lib/oeqa/selftest/cases/bbtests.py 
b/meta/lib/oeqa/selftest/cases/bbtests.py
index d242352ea2..03faf1a881 100644
--- a/meta/lib/oeqa/selftest/cases/bbtests.py
+++ b/meta/lib/oeqa/selftest/cases/bbtests.py
@@ -362,3 +362,12 @@ INHERIT:remove = \"report-error\"
 
 result = bitbake('gitunpackoffline-fail -c fetch', ignore_status=True)
 self.assertTrue(re.search("Recipe uses a floating tag/branch .* for 
repo .* without a fixed SRCREV yet doesn't call bb.fetch2.get_srcrev()", 
result.output), msg = "Recipe without PV set to SRCPV should have failed: %s" % 
result.output)
+
+def test_unexpanded_variable_in_path(self):
+"""
+Test if typo SRC_URI => SRC_URL causes bitbake to explode
+"""
+recipe_name = "gitunpackoffline"
+self.write_config('PV:pn-gitunpackoffline:append = "+${UNDEFVAL}"')
+result = bitbake('{}'.format(recipe_name), ignore_status=True)
+self.assertTrue(re.search("ERROR: Directory name /.* contains 
unexpanded bitbake variable. This may cause build failures and WORKDIR 
polution", result.output), msg = "mkdirhier with unexpanded variable should 
have failed: %s" % result.output)
-- 
2.41.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#192055): 
https://lists.openembedded.org/g/openembedded-core/message/192055
Mute This Topic: https://lists.openembedded.org/mt/103054007/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] bbtests.py: Add test for unexpanded variables in the dirname

2023-12-08 Thread Pavel Zhukov
Regression test for [Yocto #15255]

Signed-off-by: Pavel Zhukov 
---
 meta/lib/oeqa/selftest/cases/bbtests.py | 9 +
 1 file changed, 9 insertions(+)

diff --git a/meta/lib/oeqa/selftest/cases/bbtests.py 
b/meta/lib/oeqa/selftest/cases/bbtests.py
index d242352ea2..03faf1a881 100644
--- a/meta/lib/oeqa/selftest/cases/bbtests.py
+++ b/meta/lib/oeqa/selftest/cases/bbtests.py
@@ -362,3 +362,12 @@ INHERIT:remove = \"report-error\"
 
 result = bitbake('gitunpackoffline-fail -c fetch', ignore_status=True)
 self.assertTrue(re.search("Recipe uses a floating tag/branch .* for 
repo .* without a fixed SRCREV yet doesn't call bb.fetch2.get_srcrev()", 
result.output), msg = "Recipe without PV set to SRCPV should have failed: %s" % 
result.output)
+
+def test_unexpanded_variable_in_path(self):
+"""
+Test if typo SRC_URI => SRC_URL causes bitbake to explode
+"""
+recipe_name = "gitunpackoffline"
+self.write_config('PV:pn-gitunpackoffline:append = "+${UNDEFVAL}"')
+result = bitbake('{}'.format(recipe_name), ignore_status=True)
+self.assertTrue(re.search("ERROR: Directory name /.* contains 
unexpanded bitbake variable. This may cause build failures and WORKDIR 
polution", result.output), msg = "mkdirhier with unexpanded variable should 
have failed: %s" % result.output)
-- 
2.41.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#192044): 
https://lists.openembedded.org/g/openembedded-core/message/192044
Mute This Topic: https://lists.openembedded.org/mt/103053151/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/4] selftest: Add tests for populate_sdk task

2023-10-09 Thread Pavel Zhukov
Two tests to cover both installing package with IMAGE_INSTALL as
well as installing versioned dependencies of the package (using perl (>=
5.XX).

Related: [Yocto #13338] [Yocto #14995] [Yocto #14066]

Signed-off-by: Pavel Zhukov 
---
 .../testsdk-perldepends.bb| 16 
 meta/lib/oeqa/selftest/cases/sdk.py   | 79 +++
 2 files changed, 95 insertions(+)
 create mode 100644 
meta-selftest/recipes-test/testsdk-perldepends/testsdk-perldepends.bb
 create mode 100644 meta/lib/oeqa/selftest/cases/sdk.py

diff --git 
a/meta-selftest/recipes-test/testsdk-perldepends/testsdk-perldepends.bb 
b/meta-selftest/recipes-test/testsdk-perldepends/testsdk-perldepends.bb
new file mode 100644
index 00..428e1f52e2
--- /dev/null
+++ b/meta-selftest/recipes-test/testsdk-perldepends/testsdk-perldepends.bb
@@ -0,0 +1,16 @@
+SUMMARY = "Test recipe for sdk populate test case"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = 
"file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
+
+INHIBIT_DEFAULT_DEPS = "1"
+
+RDEPENDS:${PN}="perl (>= 5.12)"
+
+do_install(){
+   mkdir -p ${D}/var/lib/
+   touch ${D}/var/lib/testname 
+   echo "${PN}" > ${D}/var/lib/testname
+}
+
+
+
diff --git a/meta/lib/oeqa/selftest/cases/sdk.py 
b/meta/lib/oeqa/selftest/cases/sdk.py
new file mode 100644
index 00..35734d8a7a
--- /dev/null
+++ b/meta/lib/oeqa/selftest/cases/sdk.py
@@ -0,0 +1,79 @@
+#
+# Copyright OpenEmbedded Contributors
+#
+# SPDX-License-Identifier: MIT
+#
+
+import os
+
+from oeqa.selftest.case import OESelftestTestCase
+from oeqa.utils.commands import get_bb_var, bitbake
+
+class PopulateSDK(OESelftestTestCase):
+'''Tests for populate SDK task(s)'''
+
+@classmethod
+def setUpClass(self):
+
+super(PopulateSDK, self).setUpClass()
+self.buildtarget = 'core-image-minimal'
+self.classname = 'PopulateSDK'
+
+def sdk_build(self):
+"""
+Test if package added via IMAGE_INSTALL
+conflicts with dummy SDK providers
+"""
+SDKTASK = '-c populate_sdk'
+bbargs = "{} {}".format(SDKTASK, self.buildtarget)
+self.logger.info("{}: doing bitbake {} ".format(self.classname, 
bbargs))
+return bitbake(bbargs).status
+
+def set_config(self, image_install, package_classes):
+config = 'IMAGE_INSTALL:append = " {}"\n'.format(image_install)
+config += 'PACKAGE_CLASSES = " package_{}"\n'.format(package_classes)
+return config
+
+def do_test_build(self, image_install, package_manager):
+self.write_config(self.set_config(image_install, package_manager))
+res = self.sdk_build()
+self.assertEqual(0, res, "Failed to populate SDK with {} in 
IMAGE_INSTALL and {} package manager"\
+.format(image_install, package_manager))
+
+def test_image_install_ipk(self):
+"""
+Regression test for [Yocto #13338] 
+"""
+self.do_test_build("bash", "ipk")
+
+def test_image_install_rpm(self):
+"""
+Regression test for [Yocto #13338] 
+"""
+self.do_test_build("bash", "rpm")
+
+def test_image_install_deb(self):
+"""
+Regression test for [Yocto #13338] 
+"""
+self.do_test_build("bash", "deb")
+
+
+def test_image_install_confictdeps_ipk(self):
+"""
+Regression test for [Yocto #14995]
+"""
+self.skipTest("Disabled until [Yocto #14995] is fixed")
+self.do_test_build("testsdk-perldepends", "ipk")
+
+def test_image_install_confictdeps_rpm(self):
+"""
+Regression test for [Yocto #14995]
+"""
+self.do_test_build("testsdk-perldepends", "rpm")
+
+def test_image_install_confictdeps_deb(self):
+"""
+Regression test for [Yocto #14995]
+"""
+self.do_test_build("testsdk-perldepends", "deb")
-- 
2.41.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#188840): 
https://lists.openembedded.org/g/openembedded-core/message/188840
Mute This Topic: https://lists.openembedded.org/mt/101853411/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/4] dummy-sdk-package.inc: Specify providers version

2023-10-09 Thread Pavel Zhukov
Some of the packages require versioned providers
(DEPENDS: perl (>= 5.38) is an example and for such packages
do_populate_sdk fails because dummy packages provided unversioned
packages (PROVIDES: perl) which doesn't meet the version requirement.
Specify 999.9-r9 version for such provides to work this around

Fixes [Yocto #14995]

Signed-off-by: Pavel Zhukov 
---
 meta/recipes-core/meta/dummy-sdk-package.inc | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-core/meta/dummy-sdk-package.inc 
b/meta/recipes-core/meta/dummy-sdk-package.inc
index 99863b86f1..b1571a2cc5 100644
--- a/meta/recipes-core/meta/dummy-sdk-package.inc
+++ b/meta/recipes-core/meta/dummy-sdk-package.inc
@@ -18,14 +18,17 @@ ALLOW_EMPTY:${PN} = "1"
 PR[vardeps] += "DUMMYPROVIDES"
 PR[vardeps] += "DUMMYPROVIDES_PACKAGES"
 
+DUMMYMAXVER ??= "999.9-r9"
 DUMMYPROVIDES_PACKAGES ??= ""
 DUMMYPROVIDES_PACKAGES_FILTERED = "${@' '.join([pkg for pkg in 
d.getVar('DUMMYPROVIDES_PACKAGES').split() if d.getVar('IMAGE_INSTALL') is None 
or pkg not in d.getVar('IMAGE_INSTALL').split()])}"
 DUMMYPROVIDES_PACKAGES_MULTILIB = "${@' '.join([multilib_pkg_extend(d, pkg) 
for pkg in d.getVar('DUMMYPROVIDES_PACKAGES_FILTERED').split()])}"
+DUMMYPROVIDES_MAXVER = "${@' '.join(['{} (= {})'.format(pkg, 
d.getVar('DUMMYMAXVER')) for pkg in 
d.getVar('DUMMYPROVIDES_PACKAGES_MULTILIB').split()]) + 
d.getVar('DUMMYPROVIDES')}"
+
 DUMMYPROVIDES += "${DUMMYPROVIDES_PACKAGES_MULTILIB}"
 
 python populate_packages:prepend() {
 p = d.getVar("PN")
-d.appendVar("RPROVIDES:%s" % p, "${DUMMYPROVIDES}")
+d.appendVar("RPROVIDES:%s" % p, "${DUMMYPROVIDES_MAXVER}")
 d.appendVar("RCONFLICTS:%s" % p, "${DUMMYPROVIDES_PACKAGES_MULTILIB}")
 d.appendVar("RREPLACES:%s" % p, "${DUMMYPROVIDES_PACKAGES_MULTILIB}")
 }
-- 
2.41.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#188839): 
https://lists.openembedded.org/g/openembedded-core/message/188839
Mute This Topic: https://lists.openembedded.org/mt/101853410/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/4] package_deb: Revert versioned providers workaround

2023-10-09 Thread Pavel Zhukov
dpkg and apt seem to handle versioned provides correctly now [1] so this
workaround is not needed anymore.
This fixes [Yocto #14995] for package_deb.

[1] 
https://www.debian.org/doc/debian-policy/ch-relationships.html#virtual-packages-provides

Signed-off-by: Pavel Zhukov 
---
 meta/classes-global/package_deb.bbclass | 9 +
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/meta/classes-global/package_deb.bbclass 
b/meta/classes-global/package_deb.bbclass
index 5aba3837bd..d7bbfae3fb 100644
--- a/meta/classes-global/package_deb.bbclass
+++ b/meta/classes-global/package_deb.bbclass
@@ -184,8 +184,6 @@ def deb_write_pkg(pkg, d):
 #   '<' = less or equal
 #   '>' = greater or equal
 # adjust these to the '<<' and '>>' equivalents
-# Also, "=" specifiers only work if they have the PR in, so 1.2.3 
!= 1.2.3-r0
-# so to avoid issues, map this to ">= 1.2.3 << 1.2.3.0"
 for dep in list(var.keys()):
 if '(' in dep or '/' in dep:
 newdep = re.sub(r'[(:)/]', '__', dep)
@@ -200,10 +198,6 @@ def deb_write_pkg(pkg, d):
 var[dep][i] = var[dep][i].replace("< ", "<< ")
 elif (v or "").startswith("> "):
 var[dep][i] = var[dep][i].replace("> ", ">> ")
-elif (v or "").startswith("= ") and "-r" not in v:
-ver = var[dep][i].replace("= ", "")
-var[dep][i] = var[dep][i].replace("= ", ">= ")
-var[dep].append("<< " + ver + ".0")
 
 rdepends = bb.utils.explode_dep_versions2(localdata.getVar("RDEPENDS") 
or "")
 debian_cmp_remap(rdepends)
@@ -220,8 +214,7 @@ def deb_write_pkg(pkg, d):
 del rrecommends[dep]
 rsuggests = 
bb.utils.explode_dep_versions2(localdata.getVar("RSUGGESTS") or "")
 debian_cmp_remap(rsuggests)
-# Deliberately drop version information here, not wanted/supported by 
deb
-rprovides = 
dict.fromkeys(bb.utils.explode_dep_versions2(localdata.getVar("RPROVIDES") or 
""), [])
+rprovides = 
bb.utils.explode_dep_versions2(localdata.getVar("RPROVIDES") or "")
 # Remove file paths if any from rprovides, debian does not support 
custom providers
 for key in list(rprovides.keys()):
 if key.startswith('/'):
-- 
2.41.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#188838): 
https://lists.openembedded.org/g/openembedded-core/message/188838
Mute This Topic: https://lists.openembedded.org/mt/101853407/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/4] dummy-sdk-package.inc: Filter packages which are marked for installation

2023-10-09 Thread Pavel Zhukov
if packages is provided by dummysdk and in the same time marked for
installation with IMAGE_INSTALL it causes conflict in apt because virtual 
providers are
not taken into account if package is asked to be installed explicitly.
Filter such packages from provides/conflicts to workaround this problem.
This workaround brakes RPM usecase because of file conlicts with
DUMMYPROVIDES, use DUMMYPROVIDES_PACKAGES_MULTILIB instead (which
doesn't include file based conflicts).
While this is needed for the case of package_deb only adding it for all
package managers to not complicate the code.

Fixes: [Yocto #13338] [Yocto #14066]

Fixes:
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 target-sdk-provides-dummy : Conflicts: bash
E: Unable to correct problems, you have held broken packages.

Signed-off-by: Pavel Zhukov 
---
 meta/recipes-core/meta/dummy-sdk-package.inc | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-core/meta/dummy-sdk-package.inc 
b/meta/recipes-core/meta/dummy-sdk-package.inc
index bd26e39ad3..99863b86f1 100644
--- a/meta/recipes-core/meta/dummy-sdk-package.inc
+++ b/meta/recipes-core/meta/dummy-sdk-package.inc
@@ -19,13 +19,14 @@ PR[vardeps] += "DUMMYPROVIDES"
 PR[vardeps] += "DUMMYPROVIDES_PACKAGES"
 
 DUMMYPROVIDES_PACKAGES ??= ""
-DUMMYPROVIDES_PACKAGES_MULTILIB = "${@' '.join([multilib_pkg_extend(d, pkg) 
for pkg in d.getVar('DUMMYPROVIDES_PACKAGES').split()])}"
+DUMMYPROVIDES_PACKAGES_FILTERED = "${@' '.join([pkg for pkg in 
d.getVar('DUMMYPROVIDES_PACKAGES').split() if d.getVar('IMAGE_INSTALL') is None 
or pkg not in d.getVar('IMAGE_INSTALL').split()])}"
+DUMMYPROVIDES_PACKAGES_MULTILIB = "${@' '.join([multilib_pkg_extend(d, pkg) 
for pkg in d.getVar('DUMMYPROVIDES_PACKAGES_FILTERED').split()])}"
 DUMMYPROVIDES += "${DUMMYPROVIDES_PACKAGES_MULTILIB}"
 
 python populate_packages:prepend() {
 p = d.getVar("PN")
 d.appendVar("RPROVIDES:%s" % p, "${DUMMYPROVIDES}")
-d.appendVar("RCONFLICTS:%s" % p, "${DUMMYPROVIDES}")
+d.appendVar("RCONFLICTS:%s" % p, "${DUMMYPROVIDES_PACKAGES_MULTILIB}")
 d.appendVar("RREPLACES:%s" % p, "${DUMMYPROVIDES_PACKAGES_MULTILIB}")
 }
 
-- 
2.41.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#188837): 
https://lists.openembedded.org/g/openembedded-core/message/188837
Mute This Topic: https://lists.openembedded.org/mt/101853406/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 2/4] package_deb: Revert versioned providers workaround

2023-10-07 Thread Pavel Zhukov

Peter Kjellerstedt  writes:

>> -Original Message-
>> From: openembedded-core@lists.openembedded.org 
>>  On Behalf Of Pavel Zhukov
>> Sent: den 6 oktober 2023 21:10
>> To: openembedded-core@lists.openembedded.org
>> Cc: Pavel Zhukov 
>> Subject: [OE-core] [PATCH v2 2/4] package_deb: Revert versioned providers 
>> workaround
>> 
>> dpkg and apt seem to handle versioned provides correctly now [1] so this
>> workaround is not needed anymore.
>> This fixes [Yocto #14995] for package_deb.
>> 
>> [1]
>
> Was there supposed to be a reference here?
>
Yes, there supposed to be link to the documentation...
https://www.debian.org/doc/debian-policy/ch-relationships.html#virtual-packages-provides

>> Signed-off-by: Pavel Zhukov 
>> ---
>>  meta/classes-global/package_deb.bbclass | 9 +
>>  1 file changed, 1 insertion(+), 8 deletions(-)
>> 
>
> //Peter


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#188796): 
https://lists.openembedded.org/g/openembedded-core/message/188796
Mute This Topic: https://lists.openembedded.org/mt/101804515/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 v2 4/4] selftest: Add tests for populate_sdk task

2023-10-06 Thread Pavel Zhukov
Two tests to cover both installing package with IMAGE_INSTALL as
well as installing versioned dependencies of the package (using perl (>=
5.XX).

Related: [Yocto #13338] [Yocto #14995] [Yocto #14066]

Signed-off-by: Pavel Zhukov 
---
 .../testsdk-perldepends.bb| 16 
 meta/lib/oeqa/selftest/cases/sdk.py   | 79 +++
 2 files changed, 95 insertions(+)
 create mode 100644 
meta-selftest/recipes-test/testsdk-perldepends/testsdk-perldepends.bb
 create mode 100644 meta/lib/oeqa/selftest/cases/sdk.py

diff --git 
a/meta-selftest/recipes-test/testsdk-perldepends/testsdk-perldepends.bb 
b/meta-selftest/recipes-test/testsdk-perldepends/testsdk-perldepends.bb
new file mode 100644
index 00..428e1f52e2
--- /dev/null
+++ b/meta-selftest/recipes-test/testsdk-perldepends/testsdk-perldepends.bb
@@ -0,0 +1,16 @@
+SUMMARY = "Test recipe for sdk populate test case"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = 
"file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
+
+INHIBIT_DEFAULT_DEPS = "1"
+
+RDEPENDS:${PN}="perl (>= 5.12)"
+
+do_install(){
+   mkdir -p ${D}/var/lib/
+   touch ${D}/var/lib/testname 
+   echo "${PN}" > ${D}/var/lib/testname
+}
+
+
+
diff --git a/meta/lib/oeqa/selftest/cases/sdk.py 
b/meta/lib/oeqa/selftest/cases/sdk.py
new file mode 100644
index 00..35734d8a7a
--- /dev/null
+++ b/meta/lib/oeqa/selftest/cases/sdk.py
@@ -0,0 +1,79 @@
+#
+# Copyright OpenEmbedded Contributors
+#
+# SPDX-License-Identifier: MIT
+#
+
+import os
+
+from oeqa.selftest.case import OESelftestTestCase
+from oeqa.utils.commands import get_bb_var, bitbake
+
+class PopulateSDK(OESelftestTestCase):
+'''Tests for populate SDK task(s)'''
+
+@classmethod
+def setUpClass(self):
+
+super(PopulateSDK, self).setUpClass()
+self.buildtarget = 'core-image-minimal'
+self.classname = 'PopulateSDK'
+
+def sdk_build(self):
+"""
+Test if package added via IMAGE_INSTALL
+conflicts with dummy SDK providers
+"""
+SDKTASK = '-c populate_sdk'
+bbargs = "{} {}".format(SDKTASK, self.buildtarget)
+self.logger.info("{}: doing bitbake {} ".format(self.classname, 
bbargs))
+return bitbake(bbargs).status
+
+def set_config(self, image_install, package_classes):
+config = 'IMAGE_INSTALL:append = " {}"\n'.format(image_install)
+config += 'PACKAGE_CLASSES = " package_{}"\n'.format(package_classes)
+return config
+
+def do_test_build(self, image_install, package_manager):
+self.write_config(self.set_config(image_install, package_manager))
+res = self.sdk_build()
+self.assertEqual(0, res, "Failed to populate SDK with {} in 
IMAGE_INSTALL and {} package manager"\
+.format(image_install, package_manager))
+
+def test_image_install_ipk(self):
+"""
+Regression test for [Yocto #13338] 
+"""
+self.do_test_build("bash", "ipk")
+
+def test_image_install_rpm(self):
+"""
+Regression test for [Yocto #13338] 
+"""
+self.do_test_build("bash", "rpm")
+
+def test_image_install_deb(self):
+"""
+Regression test for [Yocto #13338] 
+"""
+self.do_test_build("bash", "deb")
+
+
+def test_image_install_confictdeps_ipk(self):
+"""
+Regression test for [Yocto #14995]
+"""
+self.skipTest("Disabled until [Yocto #14995] is fixed")
+self.do_test_build("testsdk-perldepends", "ipk")
+
+def test_image_install_confictdeps_rpm(self):
+"""
+Regression test for [Yocto #14995]
+"""
+self.do_test_build("testsdk-perldepends", "rpm")
+
+def test_image_install_confictdeps_deb(self):
+"""
+Regression test for [Yocto #14995]
+"""
+self.do_test_build("testsdk-perldepends", "deb")
-- 
2.41.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#188781): 
https://lists.openembedded.org/g/openembedded-core/message/188781
Mute This Topic: https://lists.openembedded.org/mt/101804518/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 v2 3/4] dummy-sdk-package.inc: Specify providers version

2023-10-06 Thread Pavel Zhukov
Some of the packages require versioned providers
(DEPENDS: perl (>= 5.38) is an example and for such packages
do_populate_sdk fails because dummy packages provided unversioned
packages (PROVIDES: perl) which doesn't meet the version requirement.
Specify 999.9-r9 version for such provides to work this around

Fixes [Yocto #14995]

Signed-off-by: Pavel Zhukov 
---
 meta/recipes-core/meta/dummy-sdk-package.inc | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-core/meta/dummy-sdk-package.inc 
b/meta/recipes-core/meta/dummy-sdk-package.inc
index 99863b86f1..b1571a2cc5 100644
--- a/meta/recipes-core/meta/dummy-sdk-package.inc
+++ b/meta/recipes-core/meta/dummy-sdk-package.inc
@@ -18,14 +18,17 @@ ALLOW_EMPTY:${PN} = "1"
 PR[vardeps] += "DUMMYPROVIDES"
 PR[vardeps] += "DUMMYPROVIDES_PACKAGES"
 
+DUMMYMAXVER ??= "999.9-r9"
 DUMMYPROVIDES_PACKAGES ??= ""
 DUMMYPROVIDES_PACKAGES_FILTERED = "${@' '.join([pkg for pkg in 
d.getVar('DUMMYPROVIDES_PACKAGES').split() if d.getVar('IMAGE_INSTALL') is None 
or pkg not in d.getVar('IMAGE_INSTALL').split()])}"
 DUMMYPROVIDES_PACKAGES_MULTILIB = "${@' '.join([multilib_pkg_extend(d, pkg) 
for pkg in d.getVar('DUMMYPROVIDES_PACKAGES_FILTERED').split()])}"
+DUMMYPROVIDES_MAXVER = "${@' '.join(['{} (= {})'.format(pkg, 
d.getVar('DUMMYMAXVER')) for pkg in 
d.getVar('DUMMYPROVIDES_PACKAGES_MULTILIB').split()]) + 
d.getVar('DUMMYPROVIDES')}"
+
 DUMMYPROVIDES += "${DUMMYPROVIDES_PACKAGES_MULTILIB}"
 
 python populate_packages:prepend() {
 p = d.getVar("PN")
-d.appendVar("RPROVIDES:%s" % p, "${DUMMYPROVIDES}")
+d.appendVar("RPROVIDES:%s" % p, "${DUMMYPROVIDES_MAXVER}")
 d.appendVar("RCONFLICTS:%s" % p, "${DUMMYPROVIDES_PACKAGES_MULTILIB}")
 d.appendVar("RREPLACES:%s" % p, "${DUMMYPROVIDES_PACKAGES_MULTILIB}")
 }
-- 
2.41.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#188780): 
https://lists.openembedded.org/g/openembedded-core/message/188780
Mute This Topic: https://lists.openembedded.org/mt/101804517/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 v2 2/4] package_deb: Revert versioned providers workaround

2023-10-06 Thread Pavel Zhukov
dpkg and apt seem to handle versioned provides correctly now [1] so this
workaround is not needed anymore.
This fixes [Yocto #14995] for package_deb.

[1]
Signed-off-by: Pavel Zhukov 
---
 meta/classes-global/package_deb.bbclass | 9 +
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/meta/classes-global/package_deb.bbclass 
b/meta/classes-global/package_deb.bbclass
index 5aba3837bd..d7bbfae3fb 100644
--- a/meta/classes-global/package_deb.bbclass
+++ b/meta/classes-global/package_deb.bbclass
@@ -184,8 +184,6 @@ def deb_write_pkg(pkg, d):
 #   '<' = less or equal
 #   '>' = greater or equal
 # adjust these to the '<<' and '>>' equivalents
-# Also, "=" specifiers only work if they have the PR in, so 1.2.3 
!= 1.2.3-r0
-# so to avoid issues, map this to ">= 1.2.3 << 1.2.3.0"
 for dep in list(var.keys()):
 if '(' in dep or '/' in dep:
 newdep = re.sub(r'[(:)/]', '__', dep)
@@ -200,10 +198,6 @@ def deb_write_pkg(pkg, d):
 var[dep][i] = var[dep][i].replace("< ", "<< ")
 elif (v or "").startswith("> "):
 var[dep][i] = var[dep][i].replace("> ", ">> ")
-elif (v or "").startswith("= ") and "-r" not in v:
-ver = var[dep][i].replace("= ", "")
-var[dep][i] = var[dep][i].replace("= ", ">= ")
-var[dep].append("<< " + ver + ".0")
 
 rdepends = bb.utils.explode_dep_versions2(localdata.getVar("RDEPENDS") 
or "")
 debian_cmp_remap(rdepends)
@@ -220,8 +214,7 @@ def deb_write_pkg(pkg, d):
 del rrecommends[dep]
 rsuggests = 
bb.utils.explode_dep_versions2(localdata.getVar("RSUGGESTS") or "")
 debian_cmp_remap(rsuggests)
-# Deliberately drop version information here, not wanted/supported by 
deb
-rprovides = 
dict.fromkeys(bb.utils.explode_dep_versions2(localdata.getVar("RPROVIDES") or 
""), [])
+rprovides = 
bb.utils.explode_dep_versions2(localdata.getVar("RPROVIDES") or "")
 # Remove file paths if any from rprovides, debian does not support 
custom providers
 for key in list(rprovides.keys()):
 if key.startswith('/'):
-- 
2.41.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#188778): 
https://lists.openembedded.org/g/openembedded-core/message/188778
Mute This Topic: https://lists.openembedded.org/mt/101804515/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 v2 1/4] dummy-sdk-package.inc: Filter packages which are marked for installation

2023-10-06 Thread Pavel Zhukov
if packages is provided by dummysdk and in the same time marked for
installation with IMAGE_INSTALL it causes conflict in apt because virtual 
providers are
not taken into account if package is asked to be installed explicitly.
Filter such packages from provides/conflicts to workaround this problem.
This workaround brakes RPM usecase because of file conlicts with
DUMMYPROVIDES, use DUMMYPROVIDES_PACKAGES_MULTILIB instead (which
doesn't include file based conflicts).
While this is needed for the case of package_deb only adding it for all
package managers to not complicate the code.

Fixes: [Yocto #13338] [Yocto #14066]

Fixes:
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 target-sdk-provides-dummy : Conflicts: bash
E: Unable to correct problems, you have held broken packages.

Signed-off-by: Pavel Zhukov 
---
 meta/recipes-core/meta/dummy-sdk-package.inc | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-core/meta/dummy-sdk-package.inc 
b/meta/recipes-core/meta/dummy-sdk-package.inc
index bd26e39ad3..99863b86f1 100644
--- a/meta/recipes-core/meta/dummy-sdk-package.inc
+++ b/meta/recipes-core/meta/dummy-sdk-package.inc
@@ -19,13 +19,14 @@ PR[vardeps] += "DUMMYPROVIDES"
 PR[vardeps] += "DUMMYPROVIDES_PACKAGES"
 
 DUMMYPROVIDES_PACKAGES ??= ""
-DUMMYPROVIDES_PACKAGES_MULTILIB = "${@' '.join([multilib_pkg_extend(d, pkg) 
for pkg in d.getVar('DUMMYPROVIDES_PACKAGES').split()])}"
+DUMMYPROVIDES_PACKAGES_FILTERED = "${@' '.join([pkg for pkg in 
d.getVar('DUMMYPROVIDES_PACKAGES').split() if d.getVar('IMAGE_INSTALL') is None 
or pkg not in d.getVar('IMAGE_INSTALL').split()])}"
+DUMMYPROVIDES_PACKAGES_MULTILIB = "${@' '.join([multilib_pkg_extend(d, pkg) 
for pkg in d.getVar('DUMMYPROVIDES_PACKAGES_FILTERED').split()])}"
 DUMMYPROVIDES += "${DUMMYPROVIDES_PACKAGES_MULTILIB}"
 
 python populate_packages:prepend() {
 p = d.getVar("PN")
 d.appendVar("RPROVIDES:%s" % p, "${DUMMYPROVIDES}")
-d.appendVar("RCONFLICTS:%s" % p, "${DUMMYPROVIDES}")
+d.appendVar("RCONFLICTS:%s" % p, "${DUMMYPROVIDES_PACKAGES_MULTILIB}")
 d.appendVar("RREPLACES:%s" % p, "${DUMMYPROVIDES_PACKAGES_MULTILIB}")
 }
 
-- 
2.41.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#188779): 
https://lists.openembedded.org/g/openembedded-core/message/188779
Mute This Topic: https://lists.openembedded.org/mt/101804516/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] dummy-sdk-package.inc: Filter packages which are marked for installation

2023-10-06 Thread Pavel Zhukov
/sysroots/x86_64-pokysdk-linux/usr/lib/perl5/site_perl/5.38.0/x86_64-linux
> | 
> /usr/local/oe-sdk-hardcoded-buildpath/sysroots/x86_64-pokysdk-linux/usr/lib/perl5/site_perl/5.38.0
> | 
> /usr/local/oe-sdk-hardcoded-buildpath/sysroots/x86_64-pokysdk-linux/usr/lib/perl5/vendor_perl/5.38.0/x86_64-linux
> | 
> /usr/local/oe-sdk-hardcoded-buildpath/sysroots/x86_64-pokysdk-linux/usr/lib/perl5/vendor_perl/5.38.0
> | 
> /usr/local/oe-sdk-hardcoded-buildpath/sysroots/x86_64-pokysdk-linux/usr/lib/perl5/5.38.0/x86_64-linux
> | 
> /usr/local/oe-sdk-hardcoded-buildpath/sysroots/x86_64-pokysdk-linux/usr/lib/perl5/5.38.0)
> | at ../automake-1.16.5/doc/help2man line 28.
> | BEGIN failed--compilation aborted at ../automake-1.16.5/doc/help2man line 
> 28.
> | make: *** [Makefile:3743: doc/automake-1.16.1] Error 2
> | if LC_ALL=C grep '@[a-zA-Z0-9_][a-zA-Z0-9_]*@'
> | t/ax/shell-no-trail-bslash-t; then echo "t/ax/shell-no-trail-bslash
> | contains unexpanded substitution (see lines above)"; exit 1; fi;
> | chmod a-w t/ax/shell-no-trail-bslash-t && mv -f
> | t/ax/shell-no-trail-bslash-t t/ax/shell-no-trail-bslash
> | ERROR: oe_runmake failed
> | WARNING: exit code 1 from a shell command.
>
> On 04/10/2023 18:13:16+0200, Pavel Zhukov wrote:
>> if packages is provided by dummysdk and in the same time marked for
>> installation with IMAGE_INSTALL it causes conflict in apt because virtual 
>> providers are
>> not taken into account if package is asked to be installed explicitly.
>> Filter such packages from provides/conflicts to workaround this problem.
>> This workaround brakes RPM usecase because of file conlicts with
>> DUMMYPROVIDES, use DUMMYPROVIDES_PACKAGES_MULTILIB instead (which
>> doesn't include file based conflicts).
>> While this is needed for the case of package_deb only adding it for all
>> package managers to not complicate the code.
>> 
>> Fixes: [Yocto #13338] [Yocto #14066]
>> 
>> Fixes:
>> The following information may help to resolve the situation:
>> 
>> The following packages have unmet dependencies:
>>  target-sdk-provides-dummy : Conflicts: bash
>> E: Unable to correct problems, you have held broken packages.
>> 
>> Signed-off-by: Pavel Zhukov 
>> ---
>>  meta/recipes-core/meta/dummy-sdk-package.inc | 5 +++--
>>  1 file changed, 3 insertions(+), 2 deletions(-)
>> 
>> diff --git a/meta/recipes-core/meta/dummy-sdk-package.inc 
>> b/meta/recipes-core/meta/dummy-sdk-package.inc
>> index bd26e39ad3..6ccafbf8bc 100644
>> --- a/meta/recipes-core/meta/dummy-sdk-package.inc
>> +++ b/meta/recipes-core/meta/dummy-sdk-package.inc
>> @@ -19,13 +19,14 @@ PR[vardeps] += "DUMMYPROVIDES"
>>  PR[vardeps] += "DUMMYPROVIDES_PACKAGES"
>>  
>>  DUMMYPROVIDES_PACKAGES ??= ""
>> -DUMMYPROVIDES_PACKAGES_MULTILIB = "${@' '.join([multilib_pkg_extend(d, pkg) 
>> for pkg in d.getVar('DUMMYPROVIDES_PACKAGES').split()])}"
>> +DUMMYPROVIDES_PACKAGES_FILTERED = "${@' '.join([pkg for pkg in 
>> d.getVar('DUMMYPROVIDES_PACKAGES').split() if d.getVar('IMAGE_INSTALL') is 
>> not None and pkg not in d.getVar('IMAGE_INSTALL').split()])}"
>> +DUMMYPROVIDES_PACKAGES_MULTILIB = "${@' '.join([multilib_pkg_extend(d, pkg) 
>> for pkg in d.getVar('DUMMYPROVIDES_PACKAGES_FILTERED').split()])}"
>>  DUMMYPROVIDES += "${DUMMYPROVIDES_PACKAGES_MULTILIB}"
>>  
>>  python populate_packages:prepend() {
>>  p = d.getVar("PN")
>>  d.appendVar("RPROVIDES:%s" % p, "${DUMMYPROVIDES}")
>> -d.appendVar("RCONFLICTS:%s" % p, "${DUMMYPROVIDES}")
>> +d.appendVar("RCONFLICTS:%s" % p, "${DUMMYPROVIDES_PACKAGES_MULTILIB}")
>>  d.appendVar("RREPLACES:%s" % p, "${DUMMYPROVIDES_PACKAGES_MULTILIB}")
>>  }
>>  
>> -- 
>> 2.41.0
>> 
>
>> 
>> 
>> 


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#188746): 
https://lists.openembedded.org/g/openembedded-core/message/188746
Mute This Topic: https://lists.openembedded.org/mt/101758725/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/3] dummy-sdk-package.inc: Filter packages which are marked for installation

2023-10-04 Thread Pavel Zhukov
if packages is provided by dummysdk and in the same time marked for
installation with IMAGE_INSTALL it causes conflict in apt because virtual 
providers are
not taken into account if package is asked to be installed explicitly.
Filter such packages from provides/conflicts to workaround this problem.
This workaround brakes RPM usecase because of file conlicts with
DUMMYPROVIDES, use DUMMYPROVIDES_PACKAGES_MULTILIB instead (which
doesn't include file based conflicts).
While this is needed for the case of package_deb only adding it for all
package managers to not complicate the code.

Fixes: [Yocto #13338] [Yocto #14066]

Fixes:
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 target-sdk-provides-dummy : Conflicts: bash
E: Unable to correct problems, you have held broken packages.

Signed-off-by: Pavel Zhukov 
---
 meta/recipes-core/meta/dummy-sdk-package.inc | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-core/meta/dummy-sdk-package.inc 
b/meta/recipes-core/meta/dummy-sdk-package.inc
index bd26e39ad3..6ccafbf8bc 100644
--- a/meta/recipes-core/meta/dummy-sdk-package.inc
+++ b/meta/recipes-core/meta/dummy-sdk-package.inc
@@ -19,13 +19,14 @@ PR[vardeps] += "DUMMYPROVIDES"
 PR[vardeps] += "DUMMYPROVIDES_PACKAGES"
 
 DUMMYPROVIDES_PACKAGES ??= ""
-DUMMYPROVIDES_PACKAGES_MULTILIB = "${@' '.join([multilib_pkg_extend(d, pkg) 
for pkg in d.getVar('DUMMYPROVIDES_PACKAGES').split()])}"
+DUMMYPROVIDES_PACKAGES_FILTERED = "${@' '.join([pkg for pkg in 
d.getVar('DUMMYPROVIDES_PACKAGES').split() if d.getVar('IMAGE_INSTALL') is not 
None and pkg not in d.getVar('IMAGE_INSTALL').split()])}"
+DUMMYPROVIDES_PACKAGES_MULTILIB = "${@' '.join([multilib_pkg_extend(d, pkg) 
for pkg in d.getVar('DUMMYPROVIDES_PACKAGES_FILTERED').split()])}"
 DUMMYPROVIDES += "${DUMMYPROVIDES_PACKAGES_MULTILIB}"
 
 python populate_packages:prepend() {
 p = d.getVar("PN")
 d.appendVar("RPROVIDES:%s" % p, "${DUMMYPROVIDES}")
-d.appendVar("RCONFLICTS:%s" % p, "${DUMMYPROVIDES}")
+d.appendVar("RCONFLICTS:%s" % p, "${DUMMYPROVIDES_PACKAGES_MULTILIB}")
 d.appendVar("RREPLACES:%s" % p, "${DUMMYPROVIDES_PACKAGES_MULTILIB}")
 }
 
-- 
2.41.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#188690): 
https://lists.openembedded.org/g/openembedded-core/message/188690
Mute This Topic: https://lists.openembedded.org/mt/101758725/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 3/3] selftest: Add tests for populate_sdk task

2023-10-04 Thread Pavel Zhukov
Two tests to cover both installing package with IMAGE_INSTALL as
well as installing versioned dependencies of the package (using perl (>=
5.XX).

Related: [Yocto #13338] [Yocto #14995] [Yocto #14066]

Signed-off-by: Pavel Zhukov 
---
 .../testsdk-perldepends.bb| 16 
 meta/lib/oeqa/selftest/cases/sdk.py   | 79 +++
 2 files changed, 95 insertions(+)
 create mode 100644 
meta-selftest/recipes-test/testsdk-perldepends/testsdk-perldepends.bb
 create mode 100644 meta/lib/oeqa/selftest/cases/sdk.py

diff --git 
a/meta-selftest/recipes-test/testsdk-perldepends/testsdk-perldepends.bb 
b/meta-selftest/recipes-test/testsdk-perldepends/testsdk-perldepends.bb
new file mode 100644
index 00..428e1f52e2
--- /dev/null
+++ b/meta-selftest/recipes-test/testsdk-perldepends/testsdk-perldepends.bb
@@ -0,0 +1,16 @@
+SUMMARY = "Test recipe for sdk populate test case"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = 
"file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
+
+INHIBIT_DEFAULT_DEPS = "1"
+
+RDEPENDS:${PN}="perl (>= 5.12)"
+
+do_install(){
+   mkdir -p ${D}/var/lib/
+   touch ${D}/var/lib/testname 
+   echo "${PN}" > ${D}/var/lib/testname
+}
+
+
+
diff --git a/meta/lib/oeqa/selftest/cases/sdk.py 
b/meta/lib/oeqa/selftest/cases/sdk.py
new file mode 100644
index 00..35734d8a7a
--- /dev/null
+++ b/meta/lib/oeqa/selftest/cases/sdk.py
@@ -0,0 +1,79 @@
+#
+# Copyright OpenEmbedded Contributors
+#
+# SPDX-License-Identifier: MIT
+#
+
+import os
+
+from oeqa.selftest.case import OESelftestTestCase
+from oeqa.utils.commands import get_bb_var, bitbake
+
+class PopulateSDK(OESelftestTestCase):
+'''Tests for populate SDK task(s)'''
+
+@classmethod
+def setUpClass(self):
+
+super(PopulateSDK, self).setUpClass()
+self.buildtarget = 'core-image-minimal'
+self.classname = 'PopulateSDK'
+
+def sdk_build(self):
+"""
+Test if package added via IMAGE_INSTALL
+conflicts with dummy SDK providers
+"""
+SDKTASK = '-c populate_sdk'
+bbargs = "{} {}".format(SDKTASK, self.buildtarget)
+self.logger.info("{}: doing bitbake {} ".format(self.classname, 
bbargs))
+return bitbake(bbargs).status
+
+def set_config(self, image_install, package_classes):
+config = 'IMAGE_INSTALL:append = " {}"\n'.format(image_install)
+config += 'PACKAGE_CLASSES = " package_{}"\n'.format(package_classes)
+return config
+
+def do_test_build(self, image_install, package_manager):
+self.write_config(self.set_config(image_install, package_manager))
+res = self.sdk_build()
+self.assertEqual(0, res, "Failed to populate SDK with {} in 
IMAGE_INSTALL and {} package manager"\
+.format(image_install, package_manager))
+
+def test_image_install_ipk(self):
+"""
+Regression test for [Yocto #13338] 
+"""
+self.do_test_build("bash", "ipk")
+
+def test_image_install_rpm(self):
+"""
+Regression test for [Yocto #13338] 
+"""
+self.do_test_build("bash", "rpm")
+
+def test_image_install_deb(self):
+"""
+Regression test for [Yocto #13338] 
+"""
+self.do_test_build("bash", "deb")
+
+
+def test_image_install_confictdeps_ipk(self):
+"""
+Regression test for [Yocto #14995]
+"""
+self.skipTest("Disabled until [Yocto #14995] is fixed")
+self.do_test_build("testsdk-perldepends", "ipk")
+
+def test_image_install_confictdeps_rpm(self):
+"""
+Regression test for [Yocto #14995]
+"""
+self.do_test_build("testsdk-perldepends", "rpm")
+
+def test_image_install_confictdeps_deb(self):
+"""
+Regression test for [Yocto #14995]
+"""
+self.do_test_build("testsdk-perldepends", "deb")
-- 
2.41.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#188692): 
https://lists.openembedded.org/g/openembedded-core/message/188692
Mute This Topic: https://lists.openembedded.org/mt/101758727/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 2/3] package_deb: Revert versioned providers workaround

2023-10-04 Thread Pavel Zhukov
dpkg and apt seem to handle versioned provides correctly now [1] so this
workaround is not needed anymore.
This fixes [Yocto #14995] for package_deb.

[1]
Signed-off-by: Pavel Zhukov 
---
 meta/classes-global/package_deb.bbclass  | 9 +
 meta/recipes-core/meta/dummy-sdk-package.inc | 9 ++---
 2 files changed, 7 insertions(+), 11 deletions(-)

diff --git a/meta/classes-global/package_deb.bbclass 
b/meta/classes-global/package_deb.bbclass
index 5aba3837bd..d7bbfae3fb 100644
--- a/meta/classes-global/package_deb.bbclass
+++ b/meta/classes-global/package_deb.bbclass
@@ -184,8 +184,6 @@ def deb_write_pkg(pkg, d):
 #   '<' = less or equal
 #   '>' = greater or equal
 # adjust these to the '<<' and '>>' equivalents
-# Also, "=" specifiers only work if they have the PR in, so 1.2.3 
!= 1.2.3-r0
-# so to avoid issues, map this to ">= 1.2.3 << 1.2.3.0"
 for dep in list(var.keys()):
 if '(' in dep or '/' in dep:
 newdep = re.sub(r'[(:)/]', '__', dep)
@@ -200,10 +198,6 @@ def deb_write_pkg(pkg, d):
 var[dep][i] = var[dep][i].replace("< ", "<< ")
 elif (v or "").startswith("> "):
 var[dep][i] = var[dep][i].replace("> ", ">> ")
-elif (v or "").startswith("= ") and "-r" not in v:
-ver = var[dep][i].replace("= ", "")
-var[dep][i] = var[dep][i].replace("= ", ">= ")
-var[dep].append("<< " + ver + ".0")
 
 rdepends = bb.utils.explode_dep_versions2(localdata.getVar("RDEPENDS") 
or "")
 debian_cmp_remap(rdepends)
@@ -220,8 +214,7 @@ def deb_write_pkg(pkg, d):
 del rrecommends[dep]
 rsuggests = 
bb.utils.explode_dep_versions2(localdata.getVar("RSUGGESTS") or "")
 debian_cmp_remap(rsuggests)
-# Deliberately drop version information here, not wanted/supported by 
deb
-rprovides = 
dict.fromkeys(bb.utils.explode_dep_versions2(localdata.getVar("RPROVIDES") or 
""), [])
+rprovides = 
bb.utils.explode_dep_versions2(localdata.getVar("RPROVIDES") or "")
 # Remove file paths if any from rprovides, debian does not support 
custom providers
 for key in list(rprovides.keys()):
 if key.startswith('/'):
diff --git a/meta/recipes-core/meta/dummy-sdk-package.inc 
b/meta/recipes-core/meta/dummy-sdk-package.inc
index 6ccafbf8bc..8a07a431ab 100644
--- a/meta/recipes-core/meta/dummy-sdk-package.inc
+++ b/meta/recipes-core/meta/dummy-sdk-package.inc
@@ -18,15 +18,18 @@ ALLOW_EMPTY:${PN} = "1"
 PR[vardeps] += "DUMMYPROVIDES"
 PR[vardeps] += "DUMMYPROVIDES_PACKAGES"
 
+DUMMYMAXVER ?= "999.9-r9"
 DUMMYPROVIDES_PACKAGES ??= ""
 DUMMYPROVIDES_PACKAGES_FILTERED = "${@' '.join([pkg for pkg in 
d.getVar('DUMMYPROVIDES_PACKAGES').split() if d.getVar('IMAGE_INSTALL') is not 
None and pkg not in d.getVar('IMAGE_INSTALL').split()])}"
 DUMMYPROVIDES_PACKAGES_MULTILIB = "${@' '.join([multilib_pkg_extend(d, pkg) 
for pkg in d.getVar('DUMMYPROVIDES_PACKAGES_FILTERED').split()])}"
+DUMMYPROVIDES_MAXVER := "${@' '.join(['{} (= {})'.format(pkg, 
d.getVar('DUMMYMAXVER')) for pkg in 
d.getVar('DUMMYPROVIDES_PACKAGES_MULTILIB').split()]) + 
d.getVar('DUMMYPROVIDES')}"
+DUMMYCONFLICTS := "${@' '.join(['{} (< {})'.format(pkg, 
d.getVar('DUMMYMAXVER')) for pkg in 
d.getVar('DUMMYPROVIDES_PACKAGES_MULTILIB').split()])}"
 DUMMYPROVIDES += "${DUMMYPROVIDES_PACKAGES_MULTILIB}"
 
 python populate_packages:prepend() {
 p = d.getVar("PN")
-d.appendVar("RPROVIDES:%s" % p, "${DUMMYPROVIDES}")
-d.appendVar("RCONFLICTS:%s" % p, "${DUMMYPROVIDES_PACKAGES_MULTILIB}")
-d.appendVar("RREPLACES:%s" % p, "${DUMMYPROVIDES_PACKAGES_MULTILIB}")
+d.appendVar("RPROVIDES:%s" % p, "${DUMMYPROVIDES_MAXVER}")
+d.appendVar("RCONFLICTS:%s" % p, "${DUMMYCONFLICTS}")
+d.appendVar("RREPLACES:%s" % p, "${DUMMYCONFLICTS}")
 }
 
-- 
2.41.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#188691): 
https://lists.openembedded.org/g/openembedded-core/message/188691
Mute This Topic: https://lists.openembedded.org/mt/101758726/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] bitbake.conf: add bunzip2 in HOSTTOOLS

2023-08-18 Thread Pavel Zhukov
Hi Alberto,
Looks like the regression has been  introduced in  previous update. This patch 
https://git.openembedded.org/openembedded-core/commit/?h=master-next=eb3ec7469fff857c819332371ad1d586f43c79c3
 (which was reverted by 
https://git.openembedded.org/openembedded-core/commit/?h=master-next=3aba44a75dd565b192f7328f2a0150a313de3cc1
 )  solved the issue without bringing bunzip to every system

-- 
Pavel

On Fri, Aug 18, 2023, at 11:30, Alberto Planas via lists.openembedded.org wrote:
> From: Alberto Planas 
> 
> rpm2cpio.sh can make calls to bunzip2 to uncompress the RPM payload that
> conform the cpio file.
> 
> bzip2 is already part of HOSTTOOLS, as a link to the system installed
> bzip2.
> 
> This patch add bunzip2 in HOSTOOLS list as a non-optional binary, so is
> available to rpm2cpio.sh when it is required.
> 
> The currect rpm2cpio.sh has other calls to gunzip (present in HOSTOOLS),
> xzcat (missing), unlzma (missing) and unzstd (present in HOSTTOOLS since
> bff58d337890e804d33d7decbaa46065a4d3bba4)
> 
> Adding the missing ones will not add any new host dependency as xz-utils
> is already listed as a requirement.
> 
> Signed-off-by: Alberto Planas 
> ---
> 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 599bbc4ba8..b19f265b3d 100644
> --- a/meta/conf/bitbake.conf
> +++ b/meta/conf/bitbake.conf
> @@ -516,7 +516,7 @@ HOSTTOOLS_DIR = "${TMPDIR}/hosttools"
>  
> # Tools needed to run builds with OE-Core
> HOSTTOOLS += " \
> -[ ar as awk basename bash bzip2 cat chgrp chmod chown chrpath cmp comm 
> cp cpio \
> +[ ar as awk basename bash bunzip2 bzip2 cat chgrp chmod chown chrpath 
> cmp comm cp cpio \
>  cpp cut date dd diff diffstat dirname du echo egrep env expand expr 
> false \
>  fgrep file find flock g++ gawk gcc getconf getopt git grep gunzip gzip \
>  head hostname iconv id install ld ldd ln ls lz4c make md5sum mkdir 
> mkfifo mknod \
> -- 
> 2.41.0
> 
> 
> 
> 
> 
> 

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#186354): 
https://lists.openembedded.org/g/openembedded-core/message/186354
Mute This Topic: https://lists.openembedded.org/mt/100817328/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] lib/terminal.py: Add urxvt terminal

2023-05-23 Thread Pavel Zhukov
This fixes failure [1] of menuconfig task in rxvt-unicode terminal in case if
xterm/Konsole/Gnome is not installed. Tested with rxvt-unicode-256color

[1]
WARNING: Terminal screen is supported but did not start
ERROR: No valid terminal found, unable to open devshell.
Tried the following commands:
tmux split-window -c "{cwd}" "do_terminal"
tmux new-window -c "{cwd}" -n "zephyr-helloworld Configuration" 
"do_terminal"
xfce4-terminal -T "zephyr-helloworld Configuration" -e "do_terminal"
terminology -T="zephyr-helloworld Configuration" -e do_terminal
mate-terminal --disable-factory -t "zephyr-helloworld Configuration" -x 
do_terminal
konsole --separate --workdir . -p tabtitle="zephyr-helloworld 
Configuration" -e do_terminal
gnome-terminal -t "zephyr-helloworld Configuration" -- do_terminal
xterm -T "zephyr-helloworld Configuration" -e do_terminal
rxvt -T "zephyr-helloworld Configuration" -e do_terminal
tmux new -c "{cwd}" -d -s devshell -n devshell "do_terminal"
    screen -D -m -t "zephyr-helloworld Configuration" -S devshell 
do_terminal
DEBUG: Python function do_menuconfig finished

Signed-off-by: Pavel Zhukov 
---
 meta/lib/oe/terminal.py | 4 
 1 file changed, 4 insertions(+)

diff --git a/meta/lib/oe/terminal.py b/meta/lib/oe/terminal.py
index 71ffc87019..4412bc14c1 100644
--- a/meta/lib/oe/terminal.py
+++ b/meta/lib/oe/terminal.py
@@ -104,6 +104,10 @@ class Rxvt(XTerminal):
 command = 'rxvt -T "{title}" -e {command}'
 priority = 1
 
+class URxvt(XTerminal):
+command = 'urxvt -T "{title}" -e {command}'
+priority = 1
+
 class Screen(Terminal):
 command = 'screen -D -m -t "{title}" -S devshell {command}'
 
-- 
2.39.3


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#181628): 
https://lists.openembedded.org/g/openembedded-core/message/181628
Mute This Topic: https://lists.openembedded.org/mt/99082921/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 v2] scripts/runqemu: Add possibility to disable network

2023-04-18 Thread Pavel Zhukov
Default network configuration requires tun/tap module and while being
usable it conflicts with tap devices created by VPN clients sometimes
and requires root permissions to use . While it's possible to work
this around it's not always feasible if network is not required
Add nonetwork option which can be specified if the network connectivity is
not needed and SDL/serial is enough to communicate with the image.

Signed-off-by: Pavel Zhukov 
---
 scripts/runqemu | 7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/scripts/runqemu b/scripts/runqemu
index 4c06cefbff..56715c3e1e 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -66,6 +66,7 @@ of the following environment variables (in any order):
   MACHINE - the machine name (optional, autodetected from KERNEL filename if 
unspecified)
   Simplified QEMU command-line options can be passed with:
 nographic - disable video console
+nonetwork - disable network connectivity
 novga - Disable VGA emulation completely
 sdl - choose the SDL UI frontend
 gtk - choose the Gtk UI frontend
@@ -178,6 +179,7 @@ class BaseConfig(object):
 self.serialconsole = False
 self.serialstdio = False
 self.nographic = False
+self.nonetwork = False
 self.sdl = False
 self.gtk = False
 self.gl = False
@@ -495,6 +497,8 @@ to your build configuration.
 self.check_arg_fstype(arg)
 elif arg == 'nographic':
 self.nographic = True
+elif arg == "nonetwork":
+self.nonetwork = True
 elif arg == 'sdl':
 self.sdl = True
 elif arg == 'gtk':
@@ -1224,7 +1228,8 @@ to your build configuration.
 self.set('NETWORK_CMD', '%s %s' % 
(self.network_device.replace('@MAC@', mac), qemu_tap_opt))
 
 def setup_network(self):
-if self.get('QB_NET') == 'none':
+if self.nonetwork or self.get('QB_NET') == 'none':
+self.set('NETWORK_CMD', '-nic none')
 return
 if sys.stdin.isatty():
 self.saved_stty = subprocess.check_output(("stty", 
"-g")).decode('utf-8').strip()
-- 
2.39.2


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#180189): 
https://lists.openembedded.org/g/openembedded-core/message/180189
Mute This Topic: https://lists.openembedded.org/mt/98343907/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] scripts/runqemu: Add possibility to disable network

2023-04-18 Thread Pavel Zhukov
Default network configuration requires tun/tap module and while being
usable it conflicts with tap devices created by VPN clients sometimes
and requires root permissions to use . While it's possible to work
this around it's not always feasible if network is not required
Add nonetwork option which can be specified if the network connectivity is
not needed and SDL/serial is enough to communicate with the image.

Signed-off-by: Pavel Zhukov 
---
 scripts/runqemu | 13 -
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/scripts/runqemu b/scripts/runqemu
index 4c06cefbff..f953891c9d 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -66,6 +66,7 @@ of the following environment variables (in any order):
   MACHINE - the machine name (optional, autodetected from KERNEL filename if 
unspecified)
   Simplified QEMU command-line options can be passed with:
 nographic - disable video console
+nonetwork - disable network connectivity
 novga - Disable VGA emulation completely
 sdl - choose the SDL UI frontend
 gtk - choose the Gtk UI frontend
@@ -178,6 +179,7 @@ class BaseConfig(object):
 self.serialconsole = False
 self.serialstdio = False
 self.nographic = False
+self.nonetwork = False
 self.sdl = False
 self.gtk = False
 self.gl = False
@@ -495,6 +497,8 @@ to your build configuration.
 self.check_arg_fstype(arg)
 elif arg == 'nographic':
 self.nographic = True
+elif arg == "nonetwork":
+self.nonetwork = True
 elif arg == 'sdl':
 self.sdl = True
 elif arg == 'gtk':
@@ -1223,6 +1227,10 @@ to your build configuration.
 
 self.set('NETWORK_CMD', '%s %s' % 
(self.network_device.replace('@MAC@', mac), qemu_tap_opt))
 
+def setup_nonetwork(self):
+self.set('NETWORK_CMD', '-nic none')
+return
+
 def setup_network(self):
 if self.get('QB_NET') == 'none':
 return
@@ -1717,7 +1725,10 @@ def main():
 # Check whether the combos is valid or not
 config.validate_combos()
 config.print_config()
-config.setup_network()
+if config.nonetwork:
+config.setup_nonetwork()
+else:
+config.setup_network()
 config.setup_rootfs()
 config.setup_final()
 config.setup_cmd()
-- 
2.39.2


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#180188): 
https://lists.openembedded.org/g/openembedded-core/message/180188
Mute This Topic: https://lists.openembedded.org/mt/98343820/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] scripts/rpm2cpio.sh: Use bzip2 instead of bunzip2

2023-04-18 Thread Pavel Zhukov
bzip2 is in HOSTTOOLS already and used in few other places already.
This fixes bin_package class for RPM packages without adding bunzip2 to
HOSTTOOLS.

Signed-off-by: Pavel Zhukov 
---
 scripts/rpm2cpio.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/rpm2cpio.sh b/scripts/rpm2cpio.sh
index 7cd771bbe7..2034373fe4 100755
--- a/scripts/rpm2cpio.sh
+++ b/scripts/rpm2cpio.sh
@@ -47,7 +47,7 @@ calcsize $(($offset + (8 - ($sigsize % 8)) % 8))
 hdrsize=$rsize
 
 case "$(_dd $offset bs=3 count=1)" in
-   "$(printf '\102\132')"*) _dd $offset | bunzip2 ;; # '\x42\x5a'
+   "$(printf '\102\132')"*) _dd $offset | bzip2 -d ;; # '\x42\x5a'
"$(printf '\037\213')"*) _dd $offset | gunzip  ;; # '\x1f\x8b'
"$(printf '\375\067')"*) _dd $offset | xzcat   ;; # '\xfd\x37'
"$(printf '\135\000')"*) _dd $offset | unlzma  ;; # '\x5d\x00'
-- 
2.39.2


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#180183): 
https://lists.openembedded.org/g/openembedded-core/message/180183
Mute This Topic: https://lists.openembedded.org/mt/98340463/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] oeqa/selftest/wic: Add test for uefi-kernel loader

2023-02-25 Thread Pavel Zhukov
This is regression test for [1].
[1] https://bugzilla.yoctoproject.org/show_bug.cgi?id=15033

Signed-off-by: Pavel Zhukov 
---
 meta-selftest/wic/test_uefikernel.wks |  5 +
 meta/lib/oeqa/selftest/cases/wic.py   | 20 
 2 files changed, 25 insertions(+)
 create mode 100644 meta-selftest/wic/test_uefikernel.wks

diff --git a/meta-selftest/wic/test_uefikernel.wks 
b/meta-selftest/wic/test_uefikernel.wks
new file mode 100644
index 00..bede2288f6
--- /dev/null
+++ b/meta-selftest/wic/test_uefikernel.wks
@@ -0,0 +1,5 @@
+# short-description: This file is used in oe-selftest wic module to test 
uefi-kernel loader
+
+part /boot --source bootimg-efi --sourceparams="loader=uefi-kernel"
+part / --source rootfs --fstype=ext4 --align 1024 --use-uuid
+
diff --git a/meta/lib/oeqa/selftest/cases/wic.py 
b/meta/lib/oeqa/selftest/cases/wic.py
index ca1abb970a..b9430cdb3b 100644
--- a/meta/lib/oeqa/selftest/cases/wic.py
+++ b/meta/lib/oeqa/selftest/cases/wic.py
@@ -1151,6 +1151,26 @@ class Wic2(WicTestCase):
 out = glob(os.path.join(self.resultdir, "%s-*.direct" % wksname))
 self.assertEqual(1, len(out))
 
+@skipIfNotArch(['i586', 'i686', 'x86_64', 'aarch64'])
+def test_uefi_kernel(self):
+""" Test uefi-kernel in wic """
+config = 'IMAGE_EFI_BOOT_FILES="/etc/fstab;testfile"\nIMAGE_FSTYPES = 
"wic"\nWKS_FILE = "test_uefikernel.wks"\nMACHINE_FEATURES:append = " efi"\n'
+self.append_config(config)
+bitbake('core-image-minimal')
+self.remove_config(config)
+
+img = 'core-image-minimal'
+with NamedTemporaryFile("w", suffix=".wks") as wks:
+wks.writelines(['part /boot --source bootimg-efi 
--sourceparams="loader=uefi-kernel"\n'
+'part / --source rootfs --fstype=ext4 --align 1024 
--use-uuid\n'\
+'bootloader --timeout=0 
--append="console=ttyS0,115200n8"\n'])
+wks.flush()
+cmd = "wic create %s -e %s -o %s" % (wks.name, img, self.resultdir)
+runCmd(cmd)
+wksname = os.path.splitext(os.path.basename(wks.name))[0]
+out = glob(os.path.join(self.resultdir, "%s-*.direct" % wksname))
+self.assertEqual(1, len(out))
+
 # TODO this test could also work on aarch64
 @skipIfNotArch(['i586', 'i686', 'x86_64'])
 @OETestTag("runqemu")
-- 
2.39.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#177720): 
https://lists.openembedded.org/g/openembedded-core/message/177720
Mute This Topic: https://lists.openembedded.org/mt/97234707/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] meta/recipes-core/images/core-image-minimal: add mtools to IMAGE_INSTALL

2023-02-24 Thread Pavel Zhukov
"Kareem Zarka"  writes:

> The wic.py selftest cases test_skip_kernel_install and
> test_kernel_install for OpenEmbedded were failing on autobuilders due
> to a missing dependency on the mtools package, which provides a set of
> tools for working with MS-DOS file systems, including mcopy.
probably you want to add mtools-native dependency to the test itself
instead of installing into the image.
maybe even simple bitbake("mtools-native") will help?

> To address this issue, we added mtools to the IMAGE_INSTALL variable in
> the core-image-minimal.bb recipe. This ensures that the package is
> included in the core-image-minimal image, which enables the
> test_skip_kernel_install and test_kernel_install selftest cases
> to run correctly on autobuilders.
>
> Signed-off-by: Kareem Zarka 
> ---
>  meta/recipes-core/images/core-image-minimal.bb | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meta/recipes-core/images/core-image-minimal.bb 
> b/meta/recipes-core/images/core-image-minimal.bb
> index 84343adcd8..5d626898f0 100644
> --- a/meta/recipes-core/images/core-image-minimal.bb
> +++ b/meta/recipes-core/images/core-image-minimal.bb
> @@ -1,6 +1,6 @@
>  SUMMARY = "A small image just capable of allowing a device to boot."
>  
> -IMAGE_INSTALL = "packagegroup-core-boot ${CORE_IMAGE_EXTRA_INSTALL}"
> +IMAGE_INSTALL = "mtools packagegroup-core-boot ${CORE_IMAGE_EXTRA_INSTALL}"
>  
>  IMAGE_LINGUAS = " "


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#177691): 
https://lists.openembedded.org/g/openembedded-core/message/177691
Mute This Topic: https://lists.openembedded.org/mt/97206738/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] kernel-arch.bbclass: Map arm64 to arm

2023-02-22 Thread Pavel Zhukov
gitAUTOINC+d7393c5752_1caf99d568-r0/recipe-sysroot-native/usr/include
> -O2 -pipe PAHOLE=false zImage
> | make: *** No rule to make target 'zImage'.  Stop.
> | ERROR: oe_runmake failed
>
> On 20/02/2023 13:42:31+0100, Pavel Zhukov wrote:
>> The kernel calls AArch64 'arm64', but U-Boot calls it just 'arm' so
>> adding arm64 case to existing map.
>> 
>> Fixes:
>> | install: cannot stat 
>> '.../u-boot/1_2023.01-r0/build/arch/arm64/dts/u-boot.dtb': No such file or 
>> directory
>> 
>> Signed-off-by: Pavel Zhukov 
>> ---
>>  meta/classes-recipe/kernel-arch.bbclass | 1 +
>>  1 file changed, 1 insertion(+)
>> 
>> diff --git a/meta/classes-recipe/kernel-arch.bbclass 
>> b/meta/classes-recipe/kernel-arch.bbclass
>> index 777f900241..4f88c47ef1 100644
>> --- a/meta/classes-recipe/kernel-arch.bbclass
>> +++ b/meta/classes-recipe/kernel-arch.bbclass
>> @@ -55,6 +55,7 @@ def map_uboot_arch(a, d):
>>  import re
>>  
>>  if   re.match('p(pc|owerpc)(|64)', a): return 'ppc'
>> +elif re.match('arm(|64)', a): return 'arm'
>>  elif re.match('i.86$', a): return 'x86'
>>  return a
>>  
>> -- 
>> 2.39.1
>> 
>
>> 
>> 
>> 


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#177588): 
https://lists.openembedded.org/g/openembedded-core/message/177588
Mute This Topic: https://lists.openembedded.org/mt/97084683/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] u-boot: Map arm64 into map for u-boot dts installation

2023-02-22 Thread Pavel Zhukov
While arm64 is a valid UBOOT_ARCH (according to mkimage -A) u-boot
keeps arm64 specific dts under 'arch/arm' directory.
As the result the recipe tries to install arch/arm64 (if UBOOT_DTB
was specified) and fails with [1]. Remapping "arm64" to "arm" to fix this
issue.

[1]
| install: cannot stat 
'.../u-boot/1_2023.01-r0/build/arch/arm64/dts/u-boot.dtb': No such file or 
directory

Signed-off-by: Pavel Zhukov 
---
 meta/recipes-bsp/u-boot/u-boot.inc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-bsp/u-boot/u-boot.inc 
b/meta/recipes-bsp/u-boot/u-boot.inc
index 4636dd733b..b3482dcef3 100644
--- a/meta/recipes-bsp/u-boot/u-boot.inc
+++ b/meta/recipes-bsp/u-boot/u-boot.inc
@@ -32,7 +32,7 @@ do_savedefconfig() {
 }
 do_savedefconfig[nostamp] = "1"
 addtask savedefconfig after do_configure
-
+UBOOT_ARCH_DIR = "${@'arm' if d.getVar('UBOOT_ARCH').startswith('arm') else 
d.getVar('UBOOT_ARCH')}"
 do_compile () {
 if [ "${@bb.utils.filter('DISTRO_FEATURES', 'ld-is-gold', d)}" ]; then
 sed -i 's/$(CROSS_COMPILE)ld$/$(CROSS_COMPILE)ld.bfd/g' ${S}/config.mk
@@ -334,7 +334,7 @@ do_deploy () {
 
 if [ -n "${UBOOT_DTB}" ]
 then
-install -m 644 ${B}/arch/${UBOOT_ARCH}/dts/${UBOOT_DTB_BINARY} 
${DEPLOYDIR}/
+install -m 644 ${B}/arch/${UBOOT_ARCH_DIR}/dts/${UBOOT_DTB_BINARY} 
${DEPLOYDIR}/
 fi
 }
 
-- 
2.39.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#177587): 
https://lists.openembedded.org/g/openembedded-core/message/177587
Mute This Topic: https://lists.openembedded.org/mt/97170621/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] kernel-arch.bbclass: Map arm64 to arm

2023-02-20 Thread Pavel Zhukov
The kernel calls AArch64 'arm64', but U-Boot calls it just 'arm' so
adding arm64 case to existing map.

Fixes:
| install: cannot stat 
'.../u-boot/1_2023.01-r0/build/arch/arm64/dts/u-boot.dtb': No such file or 
directory

Signed-off-by: Pavel Zhukov 
---
 meta/classes-recipe/kernel-arch.bbclass | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/classes-recipe/kernel-arch.bbclass 
b/meta/classes-recipe/kernel-arch.bbclass
index 777f900241..4f88c47ef1 100644
--- a/meta/classes-recipe/kernel-arch.bbclass
+++ b/meta/classes-recipe/kernel-arch.bbclass
@@ -55,6 +55,7 @@ def map_uboot_arch(a, d):
 import re
 
 if   re.match('p(pc|owerpc)(|64)', a): return 'ppc'
+elif re.match('arm(|64)', a): return 'arm'
 elif re.match('i.86$', a): return 'x86'
 return a
 
-- 
2.39.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#177399): 
https://lists.openembedded.org/g/openembedded-core/message/177399
Mute This Topic: https://lists.openembedded.org/mt/97084683/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] wic: Fix populating of IMAGE_EFI_BOOT_FILES with uefi-kernel

2023-02-16 Thread Pavel Zhukov

"Richard Purdie"  writes:

> On Thu, 2023-02-16 at 13:23 +0100, Pavel Zhukov wrote:
>> wic plugin crashed if IMAGE_EFI_BOOT_FILES is not empty and uefi-kernel
>> loader specified because of preliminary return from the function.
>> [Yocto #15033]
>> Fixes:
>> >   File 
>> > "/mnt/builds/yocto/sources/scripts/lib/wic/plugins/source/bootimg-efi.py", 
>> > line 371, in do_prepare_partition
>> > for src_path, dst_path in cls.install_task:
>> >   
>> > AttributeError: type object 'BootimgEFIPlugin' has no attribute 
>> > 'install_task'. Did you mean: 'do_install_disk'?
>> 
>> Signed-off-by: Pavel Zhukov 
>> ---
>>  scripts/lib/wic/plugins/source/bootimg-efi.py | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>> 
>> diff --git a/scripts/lib/wic/plugins/source/bootimg-efi.py 
>> b/scripts/lib/wic/plugins/source/bootimg-efi.py
>> index 4b00913a70..d6aeab2aad 100644
>> --- a/scripts/lib/wic/plugins/source/bootimg-efi.py
>> +++ b/scripts/lib/wic/plugins/source/bootimg-efi.py
>> @@ -221,7 +221,7 @@ class BootimgEFIPlugin(SourcePlugin):
>>  elif source_params['loader'] == 'systemd-boot':
>>  cls.do_configure_systemdboot(hdddir, creator, cr_workdir, 
>> source_params)
>>  elif source_params['loader'] == 'uefi-kernel':
>> -return
>> +pass
>>  else:
>>  raise WicError("unrecognized bootimg-efi loader: %s" % 
>> source_params['loader'])
>>  except KeyError:
>
> Thanks for finding that!
>
> Is there some way we should be tweaking the wic tests to avoid this
> regressing in future?
Sure.
Seems like bootmgr-efi plugin is not covered by the tests. I'll create
some. 

>
> Cheers,
>
> Richard
>
>
> 


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#177297): 
https://lists.openembedded.org/g/openembedded-core/message/177297
Mute This Topic: https://lists.openembedded.org/mt/97004405/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] wic: Fix populating of IMAGE_EFI_BOOT_FILES with uefi-kernel

2023-02-16 Thread Pavel Zhukov
wic plugin crashed if IMAGE_EFI_BOOT_FILES is not empty and uefi-kernel
loader specified because of preliminary return from the function.
[Yocto #15033]
Fixes:
|   File 
"/mnt/builds/yocto/sources/scripts/lib/wic/plugins/source/bootimg-efi.py", line 
371, in do_prepare_partition
| for src_path, dst_path in cls.install_task:
|   
| AttributeError: type object 'BootimgEFIPlugin' has no attribute 
'install_task'. Did you mean: 'do_install_disk'?

Signed-off-by: Pavel Zhukov 
---
 scripts/lib/wic/plugins/source/bootimg-efi.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/lib/wic/plugins/source/bootimg-efi.py 
b/scripts/lib/wic/plugins/source/bootimg-efi.py
index 4b00913a70..d6aeab2aad 100644
--- a/scripts/lib/wic/plugins/source/bootimg-efi.py
+++ b/scripts/lib/wic/plugins/source/bootimg-efi.py
@@ -221,7 +221,7 @@ class BootimgEFIPlugin(SourcePlugin):
 elif source_params['loader'] == 'systemd-boot':
 cls.do_configure_systemdboot(hdddir, creator, cr_workdir, 
source_params)
 elif source_params['loader'] == 'uefi-kernel':
-return
+pass
 else:
 raise WicError("unrecognized bootimg-efi loader: %s" % 
source_params['loader'])
 except KeyError:
-- 
2.39.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#177286): 
https://lists.openembedded.org/g/openembedded-core/message/177286
Mute This Topic: https://lists.openembedded.org/mt/97004405/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] wic: Fix usage of fstype=none in wic

2023-02-09 Thread Pavel Zhukov
This allows to specify partition with fstype=none in the wks file
to have partition created but without following mkfs. The none fstype
is in the list already but the usage is not documented.

Example;
part /data --ondisk mmcblk0 --fstype=none  --align 4096 --fixed-size 512

will create a partition, filesystem may be created manualy on the host
or target and data will be preserved if the device is reflashed using
same wks. Works with bmaptool and probably does not work with dd.
Use case is persistent filesystem/data between reflashing of the image.

Signed-off-by: Pavel Zhukov 
---
 scripts/lib/wic/partition.py | 5 +
 1 file changed, 5 insertions(+)

diff --git a/scripts/lib/wic/partition.py b/scripts/lib/wic/partition.py
index 2a916e077c..382afa44bc 100644
--- a/scripts/lib/wic/partition.py
+++ b/scripts/lib/wic/partition.py
@@ -133,6 +133,8 @@ class Partition():
 self.update_fstab_in_rootfs = True
 
 if not self.source:
+if self.fstype == "none":
+return
 if not self.size and not self.fixed_size:
 raise WicError("The %s partition has a size of zero. Please "
"specify a non-zero --size/--fixed-size for 
that "
@@ -405,6 +407,9 @@ class Partition():
(extraopts, self.fsuuid, rootfs, rootfs_dir)
 exec_native_cmd(erofs_cmd, native_sysroot, pseudo=pseudo)
 
+def prepare_empty_partition_none(self, rootfs, oe_builddir, 
native_sysroot):
+pass
+
 def prepare_empty_partition_ext(self, rootfs, oe_builddir,
 native_sysroot):
 """
-- 
2.39.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#176964): 
https://lists.openembedded.org/g/openembedded-core/message/176964
Mute This Topic: https://lists.openembedded.org/mt/96858380/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] bitbake.conf: Add mercurial to HOSTTOOLS_NONFATAL

2023-02-01 Thread Pavel Zhukov
Signed-off-by: Pavel Zhukov 
---
 meta/conf/bitbake.conf | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index 5aadf6e707..880a91826b 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -543,6 +543,9 @@ HOSTTOOLS_NONFATAL += "bzr"
 # Used by ssh fetcher
 HOSTTOOLS_NONFATAL += "scp"
 
+# Used by Mercurial fetcher
+HOSTTOOLS_NONFATAL += "hg"
+
 # Link to git-lfs if present
 HOSTTOOLS_NONFATAL += "git-lfs"
 
-- 
2.39.1


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



[OE-core] [kirkstone][PATCH 1/1] gcc: Refactor linker patches and fix linker on arm with usrmerge

2023-01-15 Thread Pavel Zhukov
Backport fix from master to allow gcc to use proper linker path for
musl [Yocto #14977].

Fixes:
| qemu-arm: Could not open '/lib/ld-musl-armhf.so.1': No such file or directory

Signed-off-by: Pavel Zhukov 
---
 meta/recipes-devtools/gcc/gcc-11.3.inc|   1 -
 ...rm-add-armv9-a-architecture-to-march.patch |  89 +++---
 ...AMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch | 269 +-
 ...s-fix-v4bx-to-linker-to-support-EABI.patch |  10 +-
 ...019-nios2-Define-MUSL_DYNAMIC_LINKER.patch |  25 --
 5 files changed, 245 insertions(+), 149 deletions(-)
 delete mode 100644 
meta/recipes-devtools/gcc/gcc/0019-nios2-Define-MUSL_DYNAMIC_LINKER.patch

diff --git a/meta/recipes-devtools/gcc/gcc-11.3.inc 
b/meta/recipes-devtools/gcc/gcc-11.3.inc
index 27074a06ae..ab2ece3cce 100644
--- a/meta/recipes-devtools/gcc/gcc-11.3.inc
+++ b/meta/recipes-devtools/gcc/gcc-11.3.inc
@@ -48,7 +48,6 @@ SRC_URI = "\

file://0016-If-CXXFLAGS-contains-something-unsupported-by-the-bu.patch \
file://0017-handle-sysroot-support-for-nativesdk-gcc.patch \

file://0018-Search-target-sysroot-gcc-version-specific-dirs-with.patch \
-   file://0019-nios2-Define-MUSL_DYNAMIC_LINKER.patch \

file://0020-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch \
file://0021-Link-libgcc-using-LDFLAGS-not-just-SHLIB_LDFLAGS.patch \
file://0022-sync-gcc-stddef.h-with-musl.patch \
diff --git 
a/meta/recipes-devtools/gcc/gcc/0004-arm-add-armv9-a-architecture-to-march.patch
 
b/meta/recipes-devtools/gcc/gcc/0004-arm-add-armv9-a-architecture-to-march.patch
index c38d1b9119..864c8b3017 100644
--- 
a/meta/recipes-devtools/gcc/gcc/0004-arm-add-armv9-a-architecture-to-march.patch
+++ 
b/meta/recipes-devtools/gcc/gcc/0004-arm-add-armv9-a-architecture-to-march.patch
@@ -43,10 +43,10 @@ Signed-off-by: Ruiqiang Hao 
  gcc/testsuite/lib/target-supports.exp |  3 ++-
  9 files changed, 79 insertions(+), 8 deletions(-)
 
-diff --git a/gcc/config/arm/arm-cpus.in b/gcc/config/arm/arm-cpus.in
-index bcc9ebe9f..58d83829c 100644
 a/gcc/config/arm/arm-cpus.in
-+++ b/gcc/config/arm/arm-cpus.in
+Index: gcc-11.3.0/gcc/config/arm/arm-cpus.in
+===
+--- gcc-11.3.0.orig/gcc/config/arm/arm-cpus.in
 gcc-11.3.0/gcc/config/arm/arm-cpus.in
 @@ -132,6 +132,9 @@ define feature cmse
  # Architecture rel 8.1-M.
  define feature armv8_1m_main
@@ -57,7 +57,7 @@ index bcc9ebe9f..58d83829c 100644
  # Floating point and Neon extensions.
  # VFPv1 is not supported in GCC.
  
-@@ -293,6 +296,7 @@ define fgroup ARMv8m_base ARMv6m armv8 cmse tdiv
+@@ -293,6 +296,7 @@ define fgroup ARMv8m_base ARMv6m armv8 c
  define fgroup ARMv8m_main ARMv7m armv8 cmse
  define fgroup ARMv8r  ARMv8a
  define fgroup ARMv8_1m_main ARMv8m_main armv8_1m_main
@@ -87,10 +87,10 @@ index bcc9ebe9f..58d83829c 100644
  begin arch iwmmxt
   tune for iwmmxt
   tune flags LDSCHED STRONG XSCALE
-diff --git a/gcc/config/arm/arm-tables.opt b/gcc/config/arm/arm-tables.opt
-index 5692d4fb7..ae3dd9414 100644
 a/gcc/config/arm/arm-tables.opt
-+++ b/gcc/config/arm/arm-tables.opt
+Index: gcc-11.3.0/gcc/config/arm/arm-tables.opt
+===
+--- gcc-11.3.0.orig/gcc/config/arm/arm-tables.opt
 gcc-11.3.0/gcc/config/arm/arm-tables.opt
 @@ -380,10 +380,13 @@ EnumValue
  Enum(arm_arch) String(armv8.1-m.main) Value(30)
  
@@ -107,10 +107,10 @@ index 5692d4fb7..ae3dd9414 100644
  
  Enum
  Name(arm_fpu) Type(enum fpu_type)
-diff --git a/gcc/config/arm/arm.h b/gcc/config/arm/arm.h
-index 47c13a9e5..088c7725c 100644
 a/gcc/config/arm/arm.h
-+++ b/gcc/config/arm/arm.h
+Index: gcc-11.3.0/gcc/config/arm/arm.h
+===
+--- gcc-11.3.0.orig/gcc/config/arm/arm.h
 gcc-11.3.0/gcc/config/arm/arm.h
 @@ -456,7 +456,8 @@ enum base_architecture
BASE_ARCH_8A = 8,
BASE_ARCH_8M_BASE = 8,
@@ -121,10 +121,10 @@ index 47c13a9e5..088c7725c 100644
  };
  
  /* The major revision number of the ARM Architecture implemented by the 
target.  */
-diff --git a/gcc/config/arm/t-aprofile b/gcc/config/arm/t-aprofile
-index 8574ac3e2..68e2251c7 100644
 a/gcc/config/arm/t-aprofile
-+++ b/gcc/config/arm/t-aprofile
+Index: gcc-11.3.0/gcc/config/arm/t-aprofile
+===
+--- gcc-11.3.0.orig/gcc/config/arm/t-aprofile
 gcc-11.3.0/gcc/config/arm/t-aprofile
 @@ -26,8 +26,8 @@
  
  # Arch and FPU variants to build libraries with
@@ -136,7 +136,7 @@ index 8574ac3e2..68e2251c7 100644
  
  # ARMv7-A - build nofp, fp-d16 and SIMD variants
  
-@@ -46,6 +46,11 @@ MULTILIB_REQUIRED   += mthumb/march=armv8-a/mfloat-abi=soft
+@@ -46,6 +46,11 @@ MULTILIB_REQUIRED   += mthumb/march=armv8-
  MULTILIB_REQUIRED += mthumb/march=armv8-a+simd/mfloat-abi=hard
  MULTILIB_REQUIRED += mthumb/march=armv8-a+simd/mfloa

[OE-core] [kirkstone][PATCH 0/1] gcc: Refactor linker patches and fix linker on arm with usrmerg

2023-01-15 Thread Pavel Zhukov
This is more complete (and more invasive) refactor of musl dynamic
linker patches in kirkstone branch. No changes have been made to
the master's version except removing of not yet existing loongarch. 

This obsoletes "gcc: Fix build with musl and usrmerge on arm" patch which has
been sent earlier and it's up to maintainer to decide which fix (or
none) to choose.   

Pavel Zhukov (1):
  gcc: Refactor linker patches and fix linker on arm with usrmerge

 meta/recipes-devtools/gcc/gcc-11.3.inc|   1 -
 ...rm-add-armv9-a-architecture-to-march.patch |  89 +++---
 ...AMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch | 269 +-
 ...s-fix-v4bx-to-linker-to-support-EABI.patch |  10 +-
 ...019-nios2-Define-MUSL_DYNAMIC_LINKER.patch |  25 --
 5 files changed, 245 insertions(+), 149 deletions(-)
 delete mode 100644 
meta/recipes-devtools/gcc/gcc/0019-nios2-Define-MUSL_DYNAMIC_LINKER.patch

-- 
2.39.0


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



[OE-core] [kirkstone][PATCH] gcc: Fix build with musl and usrmerge on arm

2023-01-15 Thread Pavel Zhukov
Backport fix from master to allow gcc to use proper linker path for
musl [Yocto #14977]

Fixes:
| qemu-arm: Could not open '/lib/ld-musl-armhf.so.1': No such file or directory

Signed-off-by: Pavel Zhukov 
---
 meta/recipes-devtools/gcc/gcc-11.3.inc |  1 +
 .../gcc/0031-fix-musl-arm-with-usrmerge.patch  | 18 ++
 2 files changed, 19 insertions(+)
 create mode 100644 
meta/recipes-devtools/gcc/gcc/0031-fix-musl-arm-with-usrmerge.patch

diff --git a/meta/recipes-devtools/gcc/gcc-11.3.inc 
b/meta/recipes-devtools/gcc/gcc-11.3.inc
index 27074a06ae..2adb21ed84 100644
--- a/meta/recipes-devtools/gcc/gcc-11.3.inc
+++ b/meta/recipes-devtools/gcc/gcc-11.3.inc
@@ -60,6 +60,7 @@ SRC_URI = "\

file://0028-debug-101473-apply-debug-prefix-maps-before-checksum.patch \
file://0029-Fix-install-path-of-linux64.h.patch \
file://0030-rust-recursion-limit.patch \
+   file://0031-fix-musl-arm-with-usrmerge.patch \
file://0001-CVE-2021-42574.patch \
file://0002-CVE-2021-42574.patch \
file://0003-CVE-2021-42574.patch \
diff --git 
a/meta/recipes-devtools/gcc/gcc/0031-fix-musl-arm-with-usrmerge.patch 
b/meta/recipes-devtools/gcc/gcc/0031-fix-musl-arm-with-usrmerge.patch
new file mode 100644
index 00..1408b65c64
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc/0031-fix-musl-arm-with-usrmerge.patch
@@ -0,0 +1,18 @@
+Upstream-Status: Inappropriate [bugfix]
+
+The fix has been picked from OE-core ustream:
+ 0007-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch
+
+Index: gcc-11.3.0/gcc/config/arm/linux-eabi.h
+===
+--- gcc-11.3.0.orig/gcc/config/arm/linux-eabi.h
 gcc-11.3.0/gcc/config/arm/linux-eabi.h
+@@ -89,7 +89,7 @@
+ #define MUSL_DYNAMIC_LINKER_E "%{mbig-endian:eb}"
+ #endif
+ #define MUSL_DYNAMIC_LINKER \
+-  "/lib/ld-musl-arm" MUSL_DYNAMIC_LINKER_E 
"%{mfloat-abi=hard:hf}%{mfdpic:-fdpic}.so.1"
++  SYSTEMLIBS_DIR "ld-musl-arm" MUSL_DYNAMIC_LINKER_E 
"%{mfloat-abi=hard:hf}%{mfdpic:-fdpic}.so.1"
+
+ /* For armv4 we pass --fix-v4bx to linker to support EABI */
+ #undef TARGET_FIX_V4BX_SPEC
-- 
2.39.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#175959): 
https://lists.openembedded.org/g/openembedded-core/message/175959
Mute This Topic: https://lists.openembedded.org/mt/96302404/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] oeqa/rpm.py: Increase timeout and add debug output

2022-12-25 Thread Pavel Zhukov
[Yocto #14346]
Systemd may be slow in killing pam session sometimes [1][2]. It may cause rpm
test to fail because there's process (sd_pam) running and own by "test1" user
after timeout.
Increasing timeout to 2 mins and assert earlier with debug output if
there's such process(es). If increasing of timeout doesn't help we may
want to force deletion of the user as [2] suggests.

[1] https://github.com/systemd/systemd/issues/8598
[2] https://access.redhat.com/solutions/6969188

Signed-off-by: Pavel Zhukov 
---
 meta/lib/oeqa/runtime/cases/rpm.py | 23 +++
 1 file changed, 11 insertions(+), 12 deletions(-)

diff --git a/meta/lib/oeqa/runtime/cases/rpm.py 
b/meta/lib/oeqa/runtime/cases/rpm.py
index e3cd818b2b..fa86eb0537 100644
--- a/meta/lib/oeqa/runtime/cases/rpm.py
+++ b/meta/lib/oeqa/runtime/cases/rpm.py
@@ -51,21 +51,20 @@ class RpmBasicTest(OERuntimeTestCase):
 msg = 'status: %s. Cannot run rpm -qa: %s' % (status, output)
 self.assertEqual(status, 0, msg=msg)
 
-def check_no_process_for_user(u):
-_, output = self.target.run(self.tc.target_cmds['ps'])
-if u + ' ' in output:
-return False
-else:
-return True
+def wait_for_no_process_for_user(u, timeout = 120):
+timeout_at = time.time() + timeout
+while time.time() < timeout_at:
+_, output = self.target.run(self.tc.target_cmds['ps'])
+if u + ' ' not in output:
+return
+time.sleep(1)
+user_pss = [ps for ps in output.split("\n") if u + ' ' in ps]
+msg = "There're %s 's process(es) still running: %s".format(u, 
"\n".join(user_pss))
+assertTrue(True, msg=msg)
 
 def unset_up_test_user(u):
 # ensure no test1 process in running
-timeout = time.time() + 30
-while time.time() < timeout:
-if check_no_process_for_user(u):
-break
-else:
-time.sleep(1)
+wait_for_no_process_for_user(u)
 status, output = self.target.run('userdel -r %s' % u)
 msg = 'Failed to erase user: %s' % output
 self.assertTrue(status == 0, msg=msg)
-- 
2.38.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#174992): 
https://lists.openembedded.org/g/openembedded-core/message/174992
Mute This Topic: https://lists.openembedded.org/mt/95874854/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] core-image: Exclude openssh complementary packages

2022-09-05 Thread Pavel Zhukov

"Richard Purdie"  writes:

> On Sun, 2022-08-28 at 21:54 +0200, Pavel Zhukov wrote:
>> Openssh (main) package may be marked for installation via complementary
>> packages mechanism as a dependency of openssh-ptest
>> and this causes conflict with dropbear [Yocto #14858] [1].
>> Excluding openssh complementary packages if ssh-server-dropbear is in
>> DISTRO_FEATURES fixes this issue.
>> To install openssh complementary packages in the images with
>> ssh-server-dropbear they may be added manually into the list because
>> they will be excluded from the installation even if corresonding class
>> (dev-pkg or dbg-pkgs) inherited.
>> 
>> [1]
>> Error:
>>  Problem: problem with installed package dropbear-2020.81-r0.core2_64
>>   - package dropbear-2020.81-r0.core2_64 conflicts with openssh provided by 
>> openssh-8.9p1-r0.core2_64
>>   - package openssh-8.9p1-r0.core2_64 conflicts with dropbear provided by 
>> dropbear-2020.81-r0.core2_64
>>   - package openssh-ptest-8.9p1-r0.core2_64 requires openssh, but none of 
>> the providers can be installed
>>   - conflicting requests
>> (try to add '--allowerasing' to command line to replace conflicting packages 
>> or '--skip-broken' to skip uninstallable packages)
>> 
>> Signed-off-by: Pavel Zhukov 
>> ---
>>  meta/classes-recipe/core-image.bbclass | 1 +
>>  1 file changed, 1 insertion(+)
>> 
>> diff --git a/meta/classes-recipe/core-image.bbclass 
>> b/meta/classes-recipe/core-image.bbclass
>> index 4b5f2c99c4b..fa38ae876d0 100644
>> --- a/meta/classes-recipe/core-image.bbclass
>> +++ b/meta/classes-recipe/core-image.bbclass
>> @@ -78,5 +78,6 @@ CORE_IMAGE_BASE_INSTALL = '\
>>  CORE_IMAGE_EXTRA_INSTALL ?= ""
>>  
>>  IMAGE_INSTALL ?= "${CORE_IMAGE_BASE_INSTALL}"
>> +PACKAGE_EXCLUDE_COMPLEMENTARY:append = "{@ openssh if 'ssh-server-dropbear' 
>> in d.getVar('IMAGE_FEATURES')}"
>
> This doesn't seem to be correct syntax, e.g. no $ before {@ and I'm not
> sure that is valid python?

Resent. I should have tested it more carefully.
I've tested new revision with few cases I'm aware of and it worked.

>
> Cheers,
>
> Richard
>
>
>
>
>
> 


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#170321): 
https://lists.openembedded.org/g/openembedded-core/message/170321
Mute This Topic: https://lists.openembedded.org/mt/93313521/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] core-image.bbclass: Exclude openssh complementary packages

2022-09-05 Thread Pavel Zhukov
Openssh (main) package may be marked for installation via complementary
packages mechanism if sftp-server is installed
and this causes conflict with dropbear [Yocto #14858] [1].
Excluding openssh complementary packages if packagegroup-core-ssh-dropbear
is in PACKAGE_INSTALL fixes this issue.
To install openssh complementary packages in the images with
ssh-server-dropbear they may be added manually into the list because
they will be excluded from the installation even if corresonding class
(dev-pkg or dbg-pkgs) inherited.

[1]
Error:
 Problem: problem with installed package dropbear-2020.81-r0.core2_64
  - package dropbear-2020.81-r0.core2_64 conflicts with openssh provided by 
openssh-8.9p1-r0.core2_64
  - package openssh-8.9p1-r0.core2_64 conflicts with dropbear provided by 
dropbear-2020.81-r0.core2_64
  - package openssh-ptest-8.9p1-r0.core2_64 requires openssh, but none of the 
providers can be installed
  - conflicting requests
(try to add '--allowerasing' to command line to replace conflicting packages or 
'--skip-broken' to skip uninstallable packages)

Signed-off-by: Pavel Zhukov 
Signed-off-by: Pavel Zhukov 
---
 meta/classes-recipe/core-image.bbclass | 4 
 1 file changed, 4 insertions(+)

diff --git a/meta/classes-recipe/core-image.bbclass 
b/meta/classes-recipe/core-image.bbclass
index 4b5f2c99c4..90d9eb9d3f 100644
--- a/meta/classes-recipe/core-image.bbclass
+++ b/meta/classes-recipe/core-image.bbclass
@@ -62,6 +62,10 @@ FEATURE_PACKAGES_hwcodecs = "${MACHINE_HWCODECS}"
 # IMAGE_FEATURES_REPLACES_foo = 'bar1 bar2'
 # Including image feature foo would replace the image features bar1 and bar2
 IMAGE_FEATURES_REPLACES_ssh-server-openssh = "ssh-server-dropbear"
+# Do not install openssh complementary packages if either 
packagegroup-core-ssh-dropbear or dropbear
+# is installed # to avoid openssh-dropbear conflict
+# see [Yocto #14858] for more information
+PACKAGE_EXCLUDE_COMPLEMENTARY:append = 
"${@bb.utils.contains_any('PACKAGE_INSTALL', 'packagegroup-core-ssh-dropbear 
dropbear', 'openssh', '' , d)}"
 
 # IMAGE_FEATURES_CONFLICTS_foo = 'bar1 bar2'
 # An error exception would be raised if both image features foo and bar1(or 
bar2) are included
-- 
2.37.3


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#170320): 
https://lists.openembedded.org/g/openembedded-core/message/170320
Mute This Topic: https://lists.openembedded.org/mt/93482582/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] vim: Upgrade 9.0.0242 -> 9.0.0341

2022-08-31 Thread Pavel Zhukov

"Alexander Kanavin"  writes:

> I have to wonder, what is really going on there? :-) This never ending
> stream of CVEs makes vim formally the most insecure item in core. Does
> anyone know?
Is it rhetorical question? :)
Vim has very old codebase and nobody carried about security at that
time.
There were few attemps to rewrite vim recently (neovim for example) but
I don't know the outcome.
>
> Alex
>
> On Wed, 31 Aug 2022 at 18:07, Richard Purdie
>  wrote:
>>
>> Addresses CVE-2022-2980, CVE-2022-2946 and CVE-2022-2982.
>>
>> Signed-off-by: Richard Purdie 
>> ---
>>  meta/recipes-support/vim/vim.inc | 4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/meta/recipes-support/vim/vim.inc 
>> b/meta/recipes-support/vim/vim.inc
>> index 5b95ab2625c..33a82992433 100644
>> --- a/meta/recipes-support/vim/vim.inc
>> +++ b/meta/recipes-support/vim/vim.inc
>> @@ -20,8 +20,8 @@ SRC_URI = 
>> "git://github.com/vim/vim.git;branch=master;protocol=https \
>> file://no-path-adjust.patch \
>> "
>>
>> -PV .= ".0242"
>> -SRCREV = "171c683237149262665135c7d5841a89bb156f53"
>> +PV .= ".0341"
>> +SRCREV = "92a3d20682d46359bb50a452b4f831659e799155"
>>
>>  # Remove when 8.3 is out
>>  UPSTREAM_VERSION_UNKNOWN = "1"
>> --
>> 2.34.1
>>
>>
>> 
>>
>
>
> 


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#170137): 
https://lists.openembedded.org/g/openembedded-core/message/170137
Mute This Topic: https://lists.openembedded.org/mt/93374420/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] image.bbclass: Exclude openssh complementary packages

2022-08-28 Thread Pavel Zhukov

"Alexander Kanavin"  writes:

> On Sun, 28 Aug 2022 at 21:39, Pavel Zhukov  wrote:
>
>> +++ b/meta/classes-recipe/image.bbclass
> ...
>> +PACKAGE_EXCLUDE_COMPLEMENTARY:append = "{@ openssh if 'ssh-server-dropbear' 
>> in d.getVar('IMAGE_FEATURES')}"
>
> I think core-image.bbclass is a far better location for this?
I tried to choose between this two. Moved back to core-image.

>
> Alex
>
>
> 


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#170001): 
https://lists.openembedded.org/g/openembedded-core/message/170001
Mute This Topic: https://lists.openembedded.org/mt/93313259/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 v2] core-image: Exclude openssh complementary packages

2022-08-28 Thread Pavel Zhukov
Openssh (main) package may be marked for installation via complementary
packages mechanism as a dependency of openssh-ptest
and this causes conflict with dropbear [Yocto #14858] [1].
Excluding openssh complementary packages if ssh-server-dropbear is in
DISTRO_FEATURES fixes this issue.
To install openssh complementary packages in the images with
ssh-server-dropbear they may be added manually into the list because
they will be excluded from the installation even if corresonding class
(dev-pkg or dbg-pkgs) inherited.

[1]
Error:
 Problem: problem with installed package dropbear-2020.81-r0.core2_64
  - package dropbear-2020.81-r0.core2_64 conflicts with openssh provided by 
openssh-8.9p1-r0.core2_64
  - package openssh-8.9p1-r0.core2_64 conflicts with dropbear provided by 
dropbear-2020.81-r0.core2_64
  - package openssh-ptest-8.9p1-r0.core2_64 requires openssh, but none of the 
providers can be installed
  - conflicting requests
(try to add '--allowerasing' to command line to replace conflicting packages or 
'--skip-broken' to skip uninstallable packages)

Signed-off-by: Pavel Zhukov 
---
 meta/classes-recipe/core-image.bbclass | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/classes-recipe/core-image.bbclass 
b/meta/classes-recipe/core-image.bbclass
index 4b5f2c99c4b..fa38ae876d0 100644
--- a/meta/classes-recipe/core-image.bbclass
+++ b/meta/classes-recipe/core-image.bbclass
@@ -78,5 +78,6 @@ CORE_IMAGE_BASE_INSTALL = '\
 CORE_IMAGE_EXTRA_INSTALL ?= ""
 
 IMAGE_INSTALL ?= "${CORE_IMAGE_BASE_INSTALL}"
+PACKAGE_EXCLUDE_COMPLEMENTARY:append = "{@ openssh if 'ssh-server-dropbear' in 
d.getVar('IMAGE_FEATURES')}"
 
 inherit image
-- 
2.35.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#17): 
https://lists.openembedded.org/g/openembedded-core/message/17
Mute This Topic: https://lists.openembedded.org/mt/93313521/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] image.bbclass: Exclude openssh complementary packages

2022-08-28 Thread Pavel Zhukov
Openssh (main) package may be marked for installation via complementary
packages mechanism as a dependency of openssh-ptest
and this causes conflict with dropbear [Yocto #14858] [1].
Excluding openssh complementary packages if ssh-server-dropbear is in
DISTRO_FEATURES fixes this issue.
To install openssh complementary packages in the images with
ssh-server-dropbear they may be added manually into the list because
they will be excluded from the installation even if corresonding class
(dev-pkg or dbg-pkgs) inherited.

[1]
Error:
 Problem: problem with installed package dropbear-2020.81-r0.core2_64
  - package dropbear-2020.81-r0.core2_64 conflicts with openssh provided by 
openssh-8.9p1-r0.core2_64
  - package openssh-8.9p1-r0.core2_64 conflicts with dropbear provided by 
dropbear-2020.81-r0.core2_64
  - package openssh-ptest-8.9p1-r0.core2_64 requires openssh, but none of the 
providers can be installed
  - conflicting requests
(try to add '--allowerasing' to command line to replace conflicting packages or 
'--skip-broken' to skip uninstallable packages)

Signed-off-by: Pavel Zhukov 
---
 meta/classes-recipe/image.bbclass | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/classes-recipe/image.bbclass 
b/meta/classes-recipe/image.bbclass
index e387645503a..f48d0afb9d6 100644
--- a/meta/classes-recipe/image.bbclass
+++ b/meta/classes-recipe/image.bbclass
@@ -63,6 +63,7 @@ SPLASH ?= "${@bb.utils.contains("MACHINE_FEATURES", "screen", 
"psplash", "", d)}
 FEATURE_PACKAGES_splash = "${SPLASH}"
 
 IMAGE_INSTALL_COMPLEMENTARY = '${@complementary_globs("IMAGE_FEATURES", d)}'
+PACKAGE_EXCLUDE_COMPLEMENTARY:append = "{@ openssh if 'ssh-server-dropbear' in 
d.getVar('IMAGE_FEATURES')}"
 
 def check_image_features(d):
 valid_features = (d.getVarFlag('IMAGE_FEATURES', 'validitems') or 
"").split()
-- 
2.35.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#169998): 
https://lists.openembedded.org/g/openembedded-core/message/169998
Mute This Topic: https://lists.openembedded.org/mt/93313259/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] parselogs: Ignore xf86OpenConsole error

2022-08-23 Thread Pavel Zhukov
[Yocto #13854]

If VT argument was not specified Xorg server tries to bind to VT1, then
VT2 and so on. In some cases (runqemu with nographics or serial options
for example) VT1 can be taken by systemd getty service which generates
error message. Do not fail on this message if Xorg is running. (covered
by test_xorg_running test)

Signed-off-by: Pavel Zhukov 
---
 meta/lib/oeqa/runtime/cases/parselogs.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/lib/oeqa/runtime/cases/parselogs.py 
b/meta/lib/oeqa/runtime/cases/parselogs.py
index 1f9365f3a86..01ae4518cb0 100644
--- a/meta/lib/oeqa/runtime/cases/parselogs.py
+++ b/meta/lib/oeqa/runtime/cases/parselogs.py
@@ -64,6 +64,7 @@ common_errors = [
 "[pulseaudio] authkey.c: Failed to load authentication key",
 "was skipped because of a failed condition check",
 "was skipped because all trigger condition checks failed",
+"xf86OpenConsole: Switching VT failed",
 ]
 
 video_related = [
-- 
2.35.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#169713): 
https://lists.openembedded.org/g/openembedded-core/message/169713
Mute This Topic: https://lists.openembedded.org/mt/93205921/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 2/2] selftest: Add regression test for rpm filenames

2022-08-19 Thread Pavel Zhukov

Randy MacLeod  writes:

> Hi Pavel,
>
> On 2022-08-19 05:20, Pavel Zhukov wrote:
>> Escaping globs and quoting in rpm spec files is tricky and requires a
>> bit of dancing. In addition to that it changes from time to time.
>> Adding (simple) regression test for different types of filename
>> patterns. Cover bracket in first iteration
>
> Nice.
>
>> [Yocto #13746]
>> Signed-off-by: Pavel Zhukov 
>> ---
>>   .../recipes-test/testrpm/files/testfile.txt |  6 ++
>>   .../recipes-test/testrpm/testrpm_0.0.1.bb   | 17 +
>>   meta/lib/oeqa/selftest/cases/rpmtests.py| 16 
>>   3 files changed, 39 insertions(+)
>>   create mode 100644 meta-selftest/recipes-test/testrpm/files/testfile.txt
>>   create mode 100644 meta-selftest/recipes-test/testrpm/testrpm_0.0.1.bb
>>   create mode 100644 meta/lib/oeqa/selftest/cases/rpmtests.py
>> diff --git a/meta-selftest/recipes-test/testrpm/files/testfile.txt
>> b/meta-selftest/recipes-test/testrpm/files/testfile.txt
>> new file mode 100644
>> index 000..d1e50ff79a2
>> --- /dev/null
>> +++ b/meta-selftest/recipes-test/testrpm/files/testfile.txt
>> @@ -0,0 +1,6 @@
>> +  /mnt/builds/yocto/sources/meta-selftest/recipes-test/testrpm:
>> +  total used in directory 16 available 76.4 GiB
>> +  drwxr-xr-x  2 pavel pavel 4096 Aug 19 08:59 .
>> +  drwxr-xr-x 34 pavel pavel 4096 Aug 18 17:59 ..
>> +  -rw-r--r--  1 pavel pavel  408 Aug 19 08:59 testrpm_0.0.1.bb
>> +  -rw-r--r--  1 pavel pavel  355 Aug 18 21:54 testrpm_0.0.1.bb~
>
>
> I assume that you just want a testfile.txt that doesn't have any
> special characters in the name.
> If so, maybe the body of the file should be text that explains that purpose.
> If for some reason, you want the output you have, it would be nice to
> remove the backup file: testrpm_0.0.1.bb~
> because it seems out of place.
>
The file is there to serve the purposes of SRC_URI only. I didn't want to
overload workers with downloading real tarball/git_repo so I put random
file (well. it's content of Emacs's buffer which I have opened at the
moment of writing :) ) . Fixed that in v2
>
>> diff --git a/meta-selftest/recipes-test/testrpm/testrpm_0.0.1.bb 
>> b/meta-selftest/recipes-test/testrpm/testrpm_0.0.1.bb
>> new file mode 100644
>> index 000..e42c7db3b39
>> --- /dev/null
>> +++ b/meta-selftest/recipes-test/testrpm/testrpm_0.0.1.bb
>> @@ -0,0 +1,17 @@
>> +SUMMARY = "Test recipe for testing rpm generated by oe-core"
>> +LICENSE = "CLOSED"
>
> Why did you pick a CLOSED license rather than MIT ?
> Our IP group would likely complain about this! ;-)
Fixed as well (didn't know about the COMMON_LICENSE_DIR existense :) Now I do)
>
>> +
>> +SRC_URI = "file://testfile.txt"
>> +
>> +INHIBIT_DEFAULT_DEPS = "1"
>> +
>> +do_compile(){
>> +echo "testdata" > ${B}/"file with [quotes].txt"
>> +echo "testdata" > ${B}/"file with (quites).txt"
>
>
> Since I'm being picky, would you rename these files to use the terms here:
>
> https://grammar.yourdictionary.com/punctuation/what/fourteen-punctuation-marks.html
> i.e.: Brackets, and Parentheses ?
Covered in v2 too
>
>
> ../Randy
>
>
>> +}
>> +
>> +do_install(){
>> +install ${B}/* ${D}/
>> +}
>> +
>> +FILES:${PN} = "*"
>> diff --git a/meta/lib/oeqa/selftest/cases/rpmtests.py 
>> b/meta/lib/oeqa/selftest/cases/rpmtests.py
>> new file mode 100644
>> index 000..dafbbc21360
>> --- /dev/null
>> +++ b/meta/lib/oeqa/selftest/cases/rpmtests.py
>> @@ -0,0 +1,16 @@
>> +#
>> +# Copyright OpenEmbedded Contributors
>> +#
>> +# SPDX-License-Identifier: MIT
>> +#
>> +
>> +
>> +from oeqa.selftest.case import OESelftestTestCase
>> +from oeqa.utils.commands import bitbake
>> +
>> +class BitbakeTests(OESelftestTestCase):
>> +
>> +def test_rpm_filenames(self):
>> +test_recipe = "testrpm"
>> +bitbake(test_recipe)
>> +
>> 
>> 


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#169630): 
https://lists.openembedded.org/g/openembedded-core/message/169630
Mute This Topic: https://lists.openembedded.org/mt/93121038/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 v2 2/2] selftest: Add regression test for rpm filesnames

2022-08-19 Thread Pavel Zhukov
Escaping globs and quoting in rpm spec files is tricky and requires a
bit of dancing. In addition to that it changes from time to time.
Adding (simple) regression test for different types of filename
patterns. Cover brackets and parentheses in first iteration

[Yocto #13746]

Signed-off-by: Pavel Zhukov 
---
 .../recipes-test/testrpm/files/testfile.txt|  1 +
 .../recipes-test/testrpm/testrpm_0.0.1.bb  | 18 ++
 meta/lib/oeqa/selftest/cases/rpmtests.py   | 14 ++
 3 files changed, 33 insertions(+)
 create mode 100644 meta-selftest/recipes-test/testrpm/files/testfile.txt
 create mode 100644 meta-selftest/recipes-test/testrpm/testrpm_0.0.1.bb
 create mode 100644 meta/lib/oeqa/selftest/cases/rpmtests.py

diff --git a/meta-selftest/recipes-test/testrpm/files/testfile.txt 
b/meta-selftest/recipes-test/testrpm/files/testfile.txt
new file mode 100644
index 000..c4d7630c1e1
--- /dev/null
+++ b/meta-selftest/recipes-test/testrpm/files/testfile.txt
@@ -0,0 +1 @@
+== This file serves the purposes of SRC_URI only
diff --git a/meta-selftest/recipes-test/testrpm/testrpm_0.0.1.bb 
b/meta-selftest/recipes-test/testrpm/testrpm_0.0.1.bb
new file mode 100644
index 000..5e8761ab554
--- /dev/null
+++ b/meta-selftest/recipes-test/testrpm/testrpm_0.0.1.bb
@@ -0,0 +1,18 @@
+SUMMARY = "Test recipe for testing rpm generated by oe-core"
+LIC_FILES_CHKSUM = 
"file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
+
+LICENSE = "MIT"
+
+SRC_URI = "file://testfile.txt"
+INHIBIT_DEFAULT_DEPS = "1"
+
+do_compile(){
+   echo "testdata" > ${B}/"file with [brackets].txt"
+   echo "testdata" > ${B}/"file with (parentheses).txt"
+}
+
+do_install(){
+   install ${B}/* ${D}/
+}
+
+FILES:${PN} = "*"
diff --git a/meta/lib/oeqa/selftest/cases/rpmtests.py 
b/meta/lib/oeqa/selftest/cases/rpmtests.py
new file mode 100644
index 000..902d7dca3da
--- /dev/null
+++ b/meta/lib/oeqa/selftest/cases/rpmtests.py
@@ -0,0 +1,14 @@
+#
+# Copyright OpenEmbedded Contributors
+#
+# SPDX-License-Identifier: MIT
+#
+
+from oeqa.selftest.case import OESelftestTestCase
+from oeqa.utils.commands import bitbake
+
+class BitbakeTests(OESelftestTestCase):
+
+def test_rpm_filenames(self):
+test_recipe = "testrpm"
+bitbake(test_recipe)
-- 
2.35.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#169629): 
https://lists.openembedded.org/g/openembedded-core/message/169629
Mute This Topic: https://lists.openembedded.org/mt/93123926/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 v2 1/2] package_rpm: Do not replace square brackets in %files

2022-08-19 Thread Pavel Zhukov
This reverts commit f95adb749619e70920c6cc6cd01c6d02cd348fd8.
At some point RPM stopped treating "[]?" characters in quoted text as a glob
This causes rpmbuild error [1] in oe-core if package contains filenames
with such characters [Yocto #13746]. Reverting commit which replaces "[]" with 
"?"
fixes the issue.
It should be safe now becuase rpm tries to use filename directly if not
found by glob [2].

[1]
| error: File not found: 
/mnt/builds/yocto/build/build/tmp/work/core2-64-poky-linux/testrpm/0.0.1-r0/package/42
 All-Time Classics (E) ?v1.1?.cht
| File not found: 
/mnt/builds/yocto/build/build/tmp/work/core2-64-poky-linux/testrpm/0.0.1-r0/package/42
 All-Time Classics (E) ?v1.1?.cht
|

[2] 
https://github.com/rpm-software-management/rpm/commit/c16c70cbd6b31cd93541d5c22d23ba98d212ad3d

Signed-off-by: Pavel Zhukov 
---
 meta/classes-global/package_rpm.bbclass | 6 --
 1 file changed, 6 deletions(-)

diff --git a/meta/classes-global/package_rpm.bbclass 
b/meta/classes-global/package_rpm.bbclass
index 63c1b077a30..81a2060b68d 100644
--- a/meta/classes-global/package_rpm.bbclass
+++ b/meta/classes-global/package_rpm.bbclass
@@ -199,8 +199,6 @@ python write_specfile () {
 if path.endswith("DEBIAN") or path.endswith("CONTROL"):
 continue
 path = path.replace("%", "")
-path = path.replace("[", "?")
-path = path.replace("]", "?")
 
 # Treat all symlinks to directories as normal files.
 # os.walk() lists them as directories.
@@ -220,8 +218,6 @@ python write_specfile () {
 if dir == "CONTROL" or dir == "DEBIAN":
 continue
 dir = dir.replace("%", "")
-dir = dir.replace("[", "?")
-dir = dir.replace("]", "?")
 # All packages own the directories their files are in...
 target.append('%dir "' + path + '/' + dir + '"')
 else:
@@ -236,8 +232,6 @@ python write_specfile () {
 if file == "CONTROL" or file == "DEBIAN":
 continue
 file = file.replace("%", "")
-file = file.replace("[", "?")
-file = file.replace("]", "?")
 if conffiles.count(path + '/' + file):
 target.append('%config "' + path + '/' + file + '"')
 else:
-- 
2.35.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#169628): 
https://lists.openembedded.org/g/openembedded-core/message/169628
Mute This Topic: https://lists.openembedded.org/mt/93123921/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 2/2] selftest: Add regression test for rpm filenames

2022-08-19 Thread Pavel Zhukov
Escaping globs and quoting in rpm spec files is tricky and requires a
bit of dancing. In addition to that it changes from time to time.
Adding (simple) regression test for different types of filename
patterns. Cover bracket in first iteration

[Yocto #13746]

Signed-off-by: Pavel Zhukov 
---
 .../recipes-test/testrpm/files/testfile.txt |  6 ++
 .../recipes-test/testrpm/testrpm_0.0.1.bb   | 17 +
 meta/lib/oeqa/selftest/cases/rpmtests.py| 16 
 3 files changed, 39 insertions(+)
 create mode 100644 meta-selftest/recipes-test/testrpm/files/testfile.txt
 create mode 100644 meta-selftest/recipes-test/testrpm/testrpm_0.0.1.bb
 create mode 100644 meta/lib/oeqa/selftest/cases/rpmtests.py

diff --git a/meta-selftest/recipes-test/testrpm/files/testfile.txt 
b/meta-selftest/recipes-test/testrpm/files/testfile.txt
new file mode 100644
index 000..d1e50ff79a2
--- /dev/null
+++ b/meta-selftest/recipes-test/testrpm/files/testfile.txt
@@ -0,0 +1,6 @@
+  /mnt/builds/yocto/sources/meta-selftest/recipes-test/testrpm:
+  total used in directory 16 available 76.4 GiB
+  drwxr-xr-x  2 pavel pavel 4096 Aug 19 08:59 .
+  drwxr-xr-x 34 pavel pavel 4096 Aug 18 17:59 ..
+  -rw-r--r--  1 pavel pavel  408 Aug 19 08:59 testrpm_0.0.1.bb
+  -rw-r--r--  1 pavel pavel  355 Aug 18 21:54 testrpm_0.0.1.bb~
diff --git a/meta-selftest/recipes-test/testrpm/testrpm_0.0.1.bb 
b/meta-selftest/recipes-test/testrpm/testrpm_0.0.1.bb
new file mode 100644
index 000..e42c7db3b39
--- /dev/null
+++ b/meta-selftest/recipes-test/testrpm/testrpm_0.0.1.bb
@@ -0,0 +1,17 @@
+SUMMARY = "Test recipe for testing rpm generated by oe-core"
+LICENSE = "CLOSED"
+
+SRC_URI = "file://testfile.txt"
+
+INHIBIT_DEFAULT_DEPS = "1"
+
+do_compile(){
+   echo "testdata" > ${B}/"file with [quotes].txt"
+   echo "testdata" > ${B}/"file with (quites).txt"
+}
+
+do_install(){
+   install ${B}/* ${D}/
+}
+
+FILES:${PN} = "*"
diff --git a/meta/lib/oeqa/selftest/cases/rpmtests.py 
b/meta/lib/oeqa/selftest/cases/rpmtests.py
new file mode 100644
index 000..dafbbc21360
--- /dev/null
+++ b/meta/lib/oeqa/selftest/cases/rpmtests.py
@@ -0,0 +1,16 @@
+#
+# Copyright OpenEmbedded Contributors
+#
+# SPDX-License-Identifier: MIT
+#
+
+
+from oeqa.selftest.case import OESelftestTestCase
+from oeqa.utils.commands import bitbake
+
+class BitbakeTests(OESelftestTestCase):
+
+def test_rpm_filenames(self):
+test_recipe = "testrpm"
+bitbake(test_recipe)
+
-- 
2.35.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#169617): 
https://lists.openembedded.org/g/openembedded-core/message/169617
Mute This Topic: https://lists.openembedded.org/mt/93121038/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/2] package_rpm: Do not replace square brackets in %files

2022-08-19 Thread Pavel Zhukov
This reverts commit f95adb749619e70920c6cc6cd01c6d02cd348fd8.
At some point RPM stopped treating "[]?" characters in quoted text as a glob
This causes rpmbuild error [1] in oe-core if package contains filenames
with such characters [Yocto #13746]. Reverting commit which replaces "[]" with 
"?"
fixes the issue.
It should be safe now becuase rpm tries to use filename directly if not
found by glob [2].

[1]
| error: File not found: 
/mnt/builds/yocto/build/build/tmp/work/core2-64-poky-linux/testrpm/0.0.1-r0/package/42
 All-Time Classics (E) ?v1.1?.cht
| File not found: 
/mnt/builds/yocto/build/build/tmp/work/core2-64-poky-linux/testrpm/0.0.1-r0/package/42
 All-Time Classics (E) ?v1.1?.cht
|

[2] 
https://github.com/rpm-software-management/rpm/commit/c16c70cbd6b31cd93541d5c22d23ba98d212ad3d
---
 meta/classes-global/package_rpm.bbclass | 6 --
 1 file changed, 6 deletions(-)

diff --git a/meta/classes-global/package_rpm.bbclass 
b/meta/classes-global/package_rpm.bbclass
index 63c1b077a30..81a2060b68d 100644
--- a/meta/classes-global/package_rpm.bbclass
+++ b/meta/classes-global/package_rpm.bbclass
@@ -199,8 +199,6 @@ python write_specfile () {
 if path.endswith("DEBIAN") or path.endswith("CONTROL"):
 continue
 path = path.replace("%", "")
-path = path.replace("[", "?")
-path = path.replace("]", "?")
 
 # Treat all symlinks to directories as normal files.
 # os.walk() lists them as directories.
@@ -220,8 +218,6 @@ python write_specfile () {
 if dir == "CONTROL" or dir == "DEBIAN":
 continue
 dir = dir.replace("%", "")
-dir = dir.replace("[", "?")
-dir = dir.replace("]", "?")
 # All packages own the directories their files are in...
 target.append('%dir "' + path + '/' + dir + '"')
 else:
@@ -236,8 +232,6 @@ python write_specfile () {
 if file == "CONTROL" or file == "DEBIAN":
 continue
 file = file.replace("%", "")
-file = file.replace("[", "?")
-file = file.replace("]", "?")
 if conffiles.count(path + '/' + file):
 target.append('%config "' + path + '/' + file + '"')
 else:
-- 
2.35.1


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



[OE-core] [kirkstone][PATCH] gcc-runtime: Pass -nostartfiles when building dummy libstdc++.so

2022-07-25 Thread Pavel Zhukov
From: Khem Raj 

This is a dummy shared object therefore reduce dependencies further by
not requiring the C startup files, we wont use this shared library for
anything useful anyway

Signed-off-by: Khem Raj 
Signed-off-by: Richard Purdie 
Signed-off-by: Pavel Zhukov 

---
 meta/recipes-devtools/gcc/gcc-runtime.inc | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/meta/recipes-devtools/gcc/gcc-runtime.inc 
b/meta/recipes-devtools/gcc/gcc-runtime.inc
index c85b5888d4..8074bf1025 100644
--- a/meta/recipes-devtools/gcc/gcc-runtime.inc
+++ b/meta/recipes-devtools/gcc/gcc-runtime.inc
@@ -68,8 +68,7 @@ do_configure () {
# libstdc++ isn't built yet so CXX would error not able to find it 
which breaks stdc++'s configure
# tests. Create a dummy empty lib for the purposes of configure.
mkdir -p ${WORKDIR}/dummylib
-   touch ${WORKDIR}/dummylib/dummylib.c
-   ${CC} ${WORKDIR}/dummylib/dummylib.c -shared -o 
${WORKDIR}/dummylib/libstdc++.so
+   ${CC} -x c /dev/null -nostartfiles -shared -o 
${WORKDIR}/dummylib/libstdc++.so
for d in libgcc ${RUNTIMETARGET}; do
echo "Configuring $d"
rm -rf ${B}/${TARGET_SYS}/$d/
-- 
2.35.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#168493): 
https://lists.openembedded.org/g/openembedded-core/message/168493
Mute This Topic: https://lists.openembedded.org/mt/92621565/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] strace: update SRC_URI

2022-07-18 Thread Pavel Zhukov
I've contacted upstream. New release files (tarballs) are  missing. The issue 
may be fixed already. 

--
Pavel

On Mon, Jul 18, 2022, at 20:02, Alexander Kanavin wrote:
> strace.io opens fine here. Can you check again please?
> 
> Alex
> 
> On Mon, 18 Jul 2022 at 16:09, Dragos-Marian Panait
>  wrote:
> >
> > https://strace.io is down for some time now,
> > so switching to https://github.com.
> >
> > Signed-off-by: Dragos-Marian Panait 
> > ---
> >  meta/recipes-devtools/strace/strace_5.18.bb | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/meta/recipes-devtools/strace/strace_5.18.bb 
> > b/meta/recipes-devtools/strace/strace_5.18.bb
> > index 08f0f1d27e..2bdc3519ee 100644
> > --- a/meta/recipes-devtools/strace/strace_5.18.bb
> > +++ b/meta/recipes-devtools/strace/strace_5.18.bb
> > @@ -5,7 +5,7 @@ SECTION = "console/utils"
> >  LICENSE = "LGPL-2.1-or-later & GPL-2.0-or-later"
> >  LIC_FILES_CHKSUM = "file://COPYING;md5=59a33f0a3e6122d67c0b3befccbdaa6b"
> >
> > -SRC_URI = "https://strace.io/files/${PV}/strace-${PV}.tar.xz 
> >  \
> > +SRC_URI = 
> > "https://github.com/strace/strace/releases/download/v${PV}/strace-${PV}.tar.xz
> >  
> > 
> >  \
> > file://update-gawk-paths.patch \
> > file://Makefile-ptest.patch \
> > file://run-ptest \
> > --
> > 2.25.1
> >
> >
> > 
> >
> 
> 
> 
> 
> 

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



[OE-core] [kirkstone][PATCH] harfbuzz: Fix compilation with clang

2022-07-17 Thread Pavel Zhukov
Fixup commit for prevous CVE-2022-33068 fix.

Fixes:
| In file included from ../harfbuzz-4.0.1/src/hb-ot-face.cc:39:
4429| ../harfbuzz-4.0.1/src/hb-ot-color-sbix-table.hh:301:11: error: use of 
bitwise '|' with boolean operands [-Werror,-Wbitwise-instead-of-logical]
4430|   if (png.IHDR.height >= 65536 | png.IHDR.width >= 65536)
4431|   ^~
4432|||
4433| ../harfbuzz-4.0.1/src/hb-ot-color-sbix-table.hh:301:11: note: cast one or 
both operands to int to silence this warning
4434| 1 error generated.

Signed-off-by: Pavel Zhukov 
---
 .../harfbuzz/0001-Fix-conditional.patch   | 25 +++
 .../harfbuzz/harfbuzz_4.0.1.bb|  3 ++-
 2 files changed, 27 insertions(+), 1 deletion(-)
 create mode 100644 
meta/recipes-graphics/harfbuzz/harfbuzz/0001-Fix-conditional.patch

diff --git a/meta/recipes-graphics/harfbuzz/harfbuzz/0001-Fix-conditional.patch 
b/meta/recipes-graphics/harfbuzz/harfbuzz/0001-Fix-conditional.patch
new file mode 100644
index 00..0f9b86973b
--- /dev/null
+++ b/meta/recipes-graphics/harfbuzz/harfbuzz/0001-Fix-conditional.patch
@@ -0,0 +1,25 @@
+From e421613e8f825508afa9a0b54d33085557c37441 Mon Sep 17 00:00:00 2001
+From: Behdad Esfahbod 
+Date: Wed, 1 Jun 2022 09:07:57 -0600
+Subject: [PATCH] [sbix] Fix conditional
+
+Signed-off: Pavel Zhukov 
+Upstream-Status: Backport [e421613e8f825508afa9a0b54d33085557c37441]
+
+---
+ src/hb-ot-color-sbix-table.hh | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/hb-ot-color-sbix-table.hh b/src/hb-ot-color-sbix-table.hh
+index 6efae43cda..d0e2235fb2 100644
+--- a/src/hb-ot-color-sbix-table.hh
 b/src/hb-ot-color-sbix-table.hh
+@@ -298,7 +298,7 @@ struct sbix
+ 
+   const PNGHeader  = *blob->as();
+ 
+-  if (png.IHDR.height >= 65536 | png.IHDR.width >= 65536)
++  if (png.IHDR.height >= 65536 || png.IHDR.width >= 65536)
+   {
+   hb_blob_destroy (blob);
+   return false;
diff --git a/meta/recipes-graphics/harfbuzz/harfbuzz_4.0.1.bb 
b/meta/recipes-graphics/harfbuzz/harfbuzz_4.0.1.bb
index 81518a53ea..e18727bcfc 100644
--- a/meta/recipes-graphics/harfbuzz/harfbuzz_4.0.1.bb
+++ b/meta/recipes-graphics/harfbuzz/harfbuzz_4.0.1.bb
@@ -12,7 +12,8 @@ UPSTREAM_CHECK_URI = 
"https://github.com/${BPN}/${BPN}/releases;
 UPSTREAM_CHECK_REGEX = "harfbuzz-(?P\d+(\.\d+)+).tar"
 
 SRC_URI = 
"https://github.com/${BPN}/${BPN}/releases/download/${PV}/${BPN}-${PV}.tar.xz\
-   file://CVE-2022-33068.patch"
+   file://CVE-2022-33068.patch
+   file://0001-Fix-conditional.patch"
 SRC_URI[sha256sum] = 
"98f68777272db6cd7a3d5152bac75083cd52a26176d87bc04c8b3929d33bce49"
 
 inherit meson pkgconfig lib_package gtk-doc gobject-introspection
-- 
2.35.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#168163): 
https://lists.openembedded.org/g/openembedded-core/message/168163
Mute This Topic: https://lists.openembedded.org/mt/92445801/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][kirkstone 05/27] harfbuzz: fix CVE-2022-33068

2022-07-17 Thread Pavel Zhukov

This breaks build with clang:

| In file included from ../harfbuzz-4.0.1/src/hb-ot-face.cc:39:
4429| ../harfbuzz-4.0.1/src/hb-ot-color-sbix-table.hh:301:11: error: use of 
bitwise '|' with boolean operands [-Werror,-Wbitwise-instead-of-logical]
4430|   if (png.IHDR.height >= 65536 | png.IHDR.width >= 65536)
4431|   ^~
4432|||
4433| ../harfbuzz-4.0.1/src/hb-ot-color-sbix-table.hh:301:11: note: cast one or 
both operands to int to silence this warning
4434| 1 error generated.


"Steve Sakoman"  writes:

> From: Wentao Zhang 
>
> Backport patch from
> https://github.com/harfbuzz/harfbuzz/commit/62e803b36173fd096d7ad460dd1d1db9be542593
>
> The 'tff' file in upstream patch is for testing only which cause error during 
> do_patch so need be dropped.
> File test/fuzzing/fonts/sbix-extents.ttf: git binary diffs are not supported.
>
> Signed-off-by: Wentao Zhang 
> Signed-off-by: Steve Sakoman 
> ---
>  .../harfbuzz/harfbuzz/CVE-2022-33068.patch| 35 +++
>  .../harfbuzz/harfbuzz_4.0.1.bb|  3 +-
>  2 files changed, 37 insertions(+), 1 deletion(-)
>  create mode 100644 
> meta/recipes-graphics/harfbuzz/harfbuzz/CVE-2022-33068.patch
>
> diff --git a/meta/recipes-graphics/harfbuzz/harfbuzz/CVE-2022-33068.patch 
> b/meta/recipes-graphics/harfbuzz/harfbuzz/CVE-2022-33068.patch
> new file mode 100644
> index 00..931b9abe1e
> --- /dev/null
> +++ b/meta/recipes-graphics/harfbuzz/harfbuzz/CVE-2022-33068.patch
> @@ -0,0 +1,35 @@
> +From 62e803b36173fd096d7ad460dd1d1db9be542593 Mon Sep 17 00:00:00 2001
> +From: Behdad Esfahbod 
> +Date: Wed, 1 Jun 2022 07:38:21 -0600
> +Subject: [PATCH] [sbix] Limit glyph extents
> +
> +Fixes https://github.com/harfbuzz/harfbuzz/issues/3557
> +
> +Upstream-Status: Backport 
> [https://github.com/harfbuzz/harfbuzz/commit/62e803b36173fd096d7ad460dd1d1db9be542593]
> +CVE:CVE-2022-33068
> +Signed-off-by: Wentao Zhang
> +
> +---
> + src/hb-ot-color-sbix-table.hh | 6 ++
> + 1 file changed, 6 insertions(+)
> +
> +diff --git a/src/hb-ot-color-sbix-table.hh b/src/hb-ot-color-sbix-table.hh
> +index 9741ebd45..6efae43cd 100644
> +--- a/src/hb-ot-color-sbix-table.hh
>  b/src/hb-ot-color-sbix-table.hh
> +@@ -298,6 +298,12 @@ struct sbix
> + 
> +   const PNGHeader  = *blob->as();
> + 
> ++  if (png.IHDR.height >= 65536 | png.IHDR.width >= 65536)
> ++  {
> ++hb_blob_destroy (blob);
> ++return false;
> ++  }
> ++
> +   extents->x_bearing = x_offset;
> +   extents->y_bearing = png.IHDR.height + y_offset;
> +   extents->width = png.IHDR.width;
> +-- 
> +2.25.1
> +
> diff --git a/meta/recipes-graphics/harfbuzz/harfbuzz_4.0.1.bb 
> b/meta/recipes-graphics/harfbuzz/harfbuzz_4.0.1.bb
> index bf77a5e56c..81518a53ea 100644
> --- a/meta/recipes-graphics/harfbuzz/harfbuzz_4.0.1.bb
> +++ b/meta/recipes-graphics/harfbuzz/harfbuzz_4.0.1.bb
> @@ -11,7 +11,8 @@ LIC_FILES_CHKSUM = 
> "file://COPYING;md5=6ee0f16281694fb6aa689cca1e0fb3da \
>  UPSTREAM_CHECK_URI = "https://github.com/${BPN}/${BPN}/releases;
>  UPSTREAM_CHECK_REGEX = "harfbuzz-(?P\d+(\.\d+)+).tar"
>  
> -SRC_URI = 
> "https://github.com/${BPN}/${BPN}/releases/download/${PV}/${BPN}-${PV}.tar.xz;
> +SRC_URI = 
> "https://github.com/${BPN}/${BPN}/releases/download/${PV}/${BPN}-${PV}.tar.xz\
> +   file://CVE-2022-33068.patch"
>  SRC_URI[sha256sum] = 
> "98f68777272db6cd7a3d5152bac75083cd52a26176d87bc04c8b3929d33bce49"
>  
>  inherit meson pkgconfig lib_package gtk-doc gobject-introspection


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#168162): 
https://lists.openembedded.org/g/openembedded-core/message/168162
Mute This Topic: https://lists.openembedded.org/mt/92373439/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] systemd: update upstream status of merged patches

2022-06-22 Thread Pavel Zhukov
Signed-off-by: Pavel Zhukov 
---
 .../systemd/systemd/0001-Add-sys-file.h-for-LOCK_.patch | 2 +-
 .../systemd/systemd/0002-Add-sys-stat.h-for-S_IFDIR.patch   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/meta/recipes-core/systemd/systemd/0001-Add-sys-file.h-for-LOCK_.patch 
b/meta/recipes-core/systemd/systemd/0001-Add-sys-file.h-for-LOCK_.patch
index a3e148ec3b..08e8af0a5b 100644
--- a/meta/recipes-core/systemd/systemd/0001-Add-sys-file.h-for-LOCK_.patch
+++ b/meta/recipes-core/systemd/systemd/0001-Add-sys-file.h-for-LOCK_.patch
@@ -3,7 +3,7 @@ From: Pavel Zhukov 
 Date: Mon, 20 Jun 2022 11:24:52 +0200
 Subject: [PATCH] Add sys/file.h for LOCK_
 
-Upstream-Status: Submitted [https://github.com/systemd/systemd/pull/23790]
+Upstream-Status: Backport [19df770fe14da601d4e54e1592c11c10ffe4df5a]
 
 Signed-off-by: Pavel Zhukov 
 
diff --git 
a/meta/recipes-core/systemd/systemd/0002-Add-sys-stat.h-for-S_IFDIR.patch 
b/meta/recipes-core/systemd/systemd/0002-Add-sys-stat.h-for-S_IFDIR.patch
index 4db5d6d97f..58767c7c35 100644
--- a/meta/recipes-core/systemd/systemd/0002-Add-sys-stat.h-for-S_IFDIR.patch
+++ b/meta/recipes-core/systemd/systemd/0002-Add-sys-stat.h-for-S_IFDIR.patch
@@ -6,7 +6,7 @@ Subject: [PATCH] Add sys/stat.h for S_IFDIR
 ../git/src/shared/mkdir-label.c:13:61: error: use of undeclared identifier 
'S_IFDIR'
 r = mac_selinux_create_file_prepare_at(dirfd, path, S_IFDIR);
 
-Upstream-Status: Submitted [https://github.com/systemd/systemd/pull/23441]
+Upstream-Status: Backport [29b7114c5d9624002aa7c17748d960cd1e45362d]
 Signed-off-by: Khem Raj 
 
 ---
-- 
2.35.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#167225): 
https://lists.openembedded.org/g/openembedded-core/message/167225
Mute This Topic: https://lists.openembedded.org/mt/91918750/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 v2 2/2] systemd: Rebase patches on v251

2022-06-21 Thread Pavel Zhukov
Drop patches which are not needed anymore.
Rebase musl specific patches to aboid fuzz warnings

Signed-off-by: Pavel Zhukov 
---
 .../0001-Adjust-for-musl-headers.patch| 47 +---
 ...tall-dependency-links-at-install-tim.patch |  2 +-
 ...ass-correct-parameters-to-getdents64.patch | 20 +
 .../0002-Add-sys-stat.h-for-S_IFDIR.patch |  4 +-
 ...implment-systemd-sysv-install-for-OE.patch |  4 +-
 ...k-parse_printf_format-implementation.patch |  8 +-
 ...missing.h-check-for-missing-strndupa.patch | 55 +++---
 ...OB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch |  7 +-
 ...008-add-missing-FTW_-macros-for-musl.patch | 46 ++--
 ..._register_atfork-for-non-glibc-build.patch | 46 
 ...sable-tests-for-missing-typedefs-in-.patch |  4 +-
 ...T_SYMLINK_NOFOLLOW-flag-to-faccessat.patch |  8 +-
 ...uffering-when-writing-to-oom_score_a.patch |  4 +-
 .../0021-test-json.c-define-M_PIl.patch   | 35 -
 ...-not-disable-buffer-in-writing-files.patch | 74 +--
 ...7ca2ab96d085158485ecfc46c7cb6af0f166.patch |  5 +-
 meta/recipes-core/systemd/systemd_251.2.bb|  2 -
 17 files changed, 133 insertions(+), 238 deletions(-)
 delete mode 100644 
meta/recipes-core/systemd/systemd/0009-fix-missing-of-__register_atfork-for-non-glibc-build.patch
 delete mode 100644 
meta/recipes-core/systemd/systemd/0021-test-json.c-define-M_PIl.patch

diff --git 
a/meta/recipes-core/systemd/systemd/0001-Adjust-for-musl-headers.patch 
b/meta/recipes-core/systemd/systemd/0001-Adjust-for-musl-headers.patch
index c42c66786f..bce1ca4563 100644
--- a/meta/recipes-core/systemd/systemd/0001-Adjust-for-musl-headers.patch
+++ b/meta/recipes-core/systemd/systemd/0001-Adjust-for-musl-headers.patch
@@ -37,16 +37,18 @@ Signed-off-by: Khem Raj 
  src/network/networkd-dhcp-prefix-delegation.c | 4 ++--
  src/network/networkd-dhcp-server.c| 2 +-
  src/network/networkd-dhcp4.c  | 2 +-
+ src/network/networkd-ipv6ll.c | 2 +-
  src/network/networkd-link.c   | 2 +-
+ src/network/networkd-ndisc.c  | 2 +-
  src/network/networkd-route.c  | 8 
  src/network/networkd-setlink.c| 2 +-
  src/shared/linux/ethtool.h| 3 ++-
  src/shared/netif-util.c   | 2 +-
  src/udev/udev-builtin-net_id.c| 2 +-
- 35 files changed, 42 insertions(+), 40 deletions(-)
+ 37 files changed, 44 insertions(+), 42 deletions(-)
 
 diff --git a/src/libsystemd-network/sd-dhcp6-client.c 
b/src/libsystemd-network/sd-dhcp6-client.c
-index 84bc739bba..ff8cb6bf9d 100644
+index b346a50d78..7884d4c1cd 100644
 --- a/src/libsystemd-network/sd-dhcp6-client.c
 +++ b/src/libsystemd-network/sd-dhcp6-client.c
 @@ -5,7 +5,7 @@
@@ -433,8 +435,21 @@ index cb9c428ae9..a35d58f3f1 100644
  
  #include "alloc-util.h"
  #include "dhcp-client-internal.h"
+diff --git a/src/network/networkd-ipv6ll.c b/src/network/networkd-ipv6ll.c
+index dc09171afe..5b93ef3dd4 100644
+--- a/src/network/networkd-ipv6ll.c
 b/src/network/networkd-ipv6ll.c
+@@ -1,7 +1,7 @@
+ /* SPDX-License-Identifier: LGPL-2.1-or-later */
+
+ #include 
+-#include 
++//#include 
+
+ #include "in-addr-util.h"
+ #include "networkd-address.h"
 diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c
-index b62a154828..75949e6094 100644
+index 63679505f7..825ea76ff2 100644
 --- a/src/network/networkd-link.c
 +++ b/src/network/networkd-link.c
 @@ -3,7 +3,7 @@
@@ -446,8 +461,21 @@ index b62a154828..75949e6094 100644
  #include 
  #include 
  #include 
+diff --git a/src/network/networkd-ndisc.c b/src/network/networkd-ndisc.c
+index efe407fedb..46a086cdf5 100644
+--- a/src/network/networkd-ndisc.c
 b/src/network/networkd-ndisc.c
+@@ -6,7 +6,7 @@
+ #include 
+ #include 
+ #include 
+-#include 
++//#include 
+
+ #include "sd-ndisc.h"
+
 diff --git a/src/network/networkd-route.c b/src/network/networkd-route.c
-index ee7a535075..ce6ed64133 100644
+index 934fed3b7f..fdb89313dd 100644
 --- a/src/network/networkd-route.c
 +++ b/src/network/networkd-route.c
 @@ -1,9 +1,5 @@
@@ -485,12 +513,12 @@ index e00cc1e589..e392c7e1a2 100644
  
  #include "missing_network.h"
 diff --git a/src/shared/linux/ethtool.h b/src/shared/linux/ethtool.h
-index 974d4292e7..fe9b8a9e07 100644
+index cf20b6dba5..c3a46dda11 100644
 --- a/src/shared/linux/ethtool.h
 +++ b/src/shared/linux/ethtool.h
 @@ -16,7 +16,8 @@
  
- #include 
+ #include 
  #include 
 -#include 
 +#include 
@@ -499,19 +527,20 @@ index 974d4292e7..fe9b8a9e07 100644
  #ifndef __KERNEL__
  #include  /* for INT_MAX */
 diff --git a/src/shared/netif-util.c b/src/shared/netif-util.c
-index 603d4de109..7e3531808a 100644
+index f56c5646c1..5af28ff119 100644
 --- a/src/shared/netif-util.c
 +++ b/src/shared/netif-util.c
-@@ -1,6 +1,6 @@
+@@ -1,7 +1,7 @@
  /* SPDX-License-Identifier: LGPL-2.1-or-later */
  
+ #include 
 -#include 
 +

[OE-core] [PATCH v2 1/2] systemd: Add missed sys/file.h includes for musl

2022-06-21 Thread Pavel Zhukov
Signed-off-by: Pavel Zhukov 
---
 .../0001-Add-sys-file.h-for-LOCK_.patch   | 78 +++
 meta/recipes-core/systemd/systemd_251.2.bb|  1 +
 2 files changed, 79 insertions(+)
 create mode 100644 
meta/recipes-core/systemd/systemd/0001-Add-sys-file.h-for-LOCK_.patch

diff --git 
a/meta/recipes-core/systemd/systemd/0001-Add-sys-file.h-for-LOCK_.patch 
b/meta/recipes-core/systemd/systemd/0001-Add-sys-file.h-for-LOCK_.patch
new file mode 100644
index 00..a3e148ec3b
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0001-Add-sys-file.h-for-LOCK_.patch
@@ -0,0 +1,78 @@
+From c193380a08f5adea1fd514e0a20abd1d7b50d08c Mon Sep 17 00:00:00 2001
+From: Pavel Zhukov 
+Date: Mon, 20 Jun 2022 11:24:52 +0200
+Subject: [PATCH] Add sys/file.h for LOCK_
+
+Upstream-Status: Submitted [https://github.com/systemd/systemd/pull/23790]
+
+Signed-off-by: Pavel Zhukov 
+
+---
+ src/core/namespace.c   | 1 +
+ src/dissect/dissect.c  | 1 +
+ src/shared/dissect-image.c | 2 ++
+ src/sysext/sysext.c| 1 +
+ src/test/test-loop-block.c | 1 +
+ 5 files changed, 6 insertions(+)
+
+diff --git a/src/core/namespace.c b/src/core/namespace.c
+index 926aa96174..39f9e21c93 100644
+--- a/src/core/namespace.c
 b/src/core/namespace.c
+@@ -7,6 +7,7 @@
+ #include 
+ #include 
+ #include 
++#include 
+ 
+ #include "alloc-util.h"
+ #include "base-filesystem.h"
+diff --git a/src/dissect/dissect.c b/src/dissect/dissect.c
+index bd94a755db..a0d2a6f287 100644
+--- a/src/dissect/dissect.c
 b/src/dissect/dissect.c
+@@ -6,6 +6,7 @@
+ #include 
+ #include 
+ #include 
++#include 
+ 
+ #include "architecture.h"
+ #include "chase-symlinks.h"
+diff --git a/src/shared/dissect-image.c b/src/shared/dissect-image.c
+index 1ab88839aa..a9e3fe4b44 100644
+--- a/src/shared/dissect-image.c
 b/src/shared/dissect-image.c
+@@ -4,6 +4,8 @@
+ #include 
+ #endif
+ 
++#include 
++
+ #include 
+ #include 
+ #include 
+diff --git a/src/sysext/sysext.c b/src/sysext/sysext.c
+index 364af195e0..85686c0fab 100644
+--- a/src/sysext/sysext.c
 b/src/sysext/sysext.c
+@@ -5,6 +5,7 @@
+ #include 
+ #include 
+ #include 
++#include 
+ 
+ #include "capability-util.h"
+ #include "chase-symlinks.h"
+diff --git a/src/test/test-loop-block.c b/src/test/test-loop-block.c
+index d1793222f0..6886c4cd31 100644
+--- a/src/test/test-loop-block.c
 b/src/test/test-loop-block.c
+@@ -3,6 +3,7 @@
+ #include 
+ #include 
+ #include 
++#include 
+ 
+ #include "alloc-util.h"
+ #include "dissect-image.h"
diff --git a/meta/recipes-core/systemd/systemd_251.2.bb 
b/meta/recipes-core/systemd/systemd_251.2.bb
index 8370bec0ca..a8ffb19ef9 100644
--- a/meta/recipes-core/systemd/systemd_251.2.bb
+++ b/meta/recipes-core/systemd/systemd_251.2.bb
@@ -51,6 +51,7 @@ SRC_URI_MUSL = "\
file://0001-pass-correct-parameters-to-getdents64.patch \
file://0002-Add-sys-stat.h-for-S_IFDIR.patch \
file://0001-Adjust-for-musl-headers.patch \
+   file://0001-Add-sys-file.h-for-LOCK_.patch \
"
 
 PAM_PLUGINS = " \
-- 
2.35.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#167130): 
https://lists.openembedded.org/g/openembedded-core/message/167130
Mute This Topic: https://lists.openembedded.org/mt/91894893/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 2/2] systemd: Rebase patches on v251

2022-06-20 Thread Pavel Zhukov
Signed-off-by: Pavel Zhukov 
---
 .../0001-Adjust-for-musl-headers.patch| 47 +---
 ...tall-dependency-links-at-install-tim.patch |  2 +-
 ...ass-correct-parameters-to-getdents64.patch | 20 +
 .../0002-Add-sys-stat.h-for-S_IFDIR.patch |  4 +-
 ...implment-systemd-sysv-install-for-OE.patch |  4 +-
 ...k-parse_printf_format-implementation.patch |  8 +-
 ...missing.h-check-for-missing-strndupa.patch | 55 +++---
 ...OB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch |  7 +-
 ...008-add-missing-FTW_-macros-for-musl.patch | 31 
 ..._register_atfork-for-non-glibc-build.patch | 46 
 ...sable-tests-for-missing-typedefs-in-.patch |  4 +-
 ...T_SYMLINK_NOFOLLOW-flag-to-faccessat.patch |  8 +-
 ...uffering-when-writing-to-oom_score_a.patch |  4 +-
 ...-not-disable-buffer-in-writing-files.patch | 74 +--
 ...7ca2ab96d085158485ecfc46c7cb6af0f166.patch |  5 +-
 15 files changed, 126 insertions(+), 193 deletions(-)
 delete mode 100644 
meta/recipes-core/systemd/systemd/0009-fix-missing-of-__register_atfork-for-non-glibc-build.patch

diff --git 
a/meta/recipes-core/systemd/systemd/0001-Adjust-for-musl-headers.patch 
b/meta/recipes-core/systemd/systemd/0001-Adjust-for-musl-headers.patch
index c42c66786f..bce1ca4563 100644
--- a/meta/recipes-core/systemd/systemd/0001-Adjust-for-musl-headers.patch
+++ b/meta/recipes-core/systemd/systemd/0001-Adjust-for-musl-headers.patch
@@ -37,16 +37,18 @@ Signed-off-by: Khem Raj 
  src/network/networkd-dhcp-prefix-delegation.c | 4 ++--
  src/network/networkd-dhcp-server.c| 2 +-
  src/network/networkd-dhcp4.c  | 2 +-
+ src/network/networkd-ipv6ll.c | 2 +-
  src/network/networkd-link.c   | 2 +-
+ src/network/networkd-ndisc.c  | 2 +-
  src/network/networkd-route.c  | 8 
  src/network/networkd-setlink.c| 2 +-
  src/shared/linux/ethtool.h| 3 ++-
  src/shared/netif-util.c   | 2 +-
  src/udev/udev-builtin-net_id.c| 2 +-
- 35 files changed, 42 insertions(+), 40 deletions(-)
+ 37 files changed, 44 insertions(+), 42 deletions(-)
 
 diff --git a/src/libsystemd-network/sd-dhcp6-client.c 
b/src/libsystemd-network/sd-dhcp6-client.c
-index 84bc739bba..ff8cb6bf9d 100644
+index b346a50d78..7884d4c1cd 100644
 --- a/src/libsystemd-network/sd-dhcp6-client.c
 +++ b/src/libsystemd-network/sd-dhcp6-client.c
 @@ -5,7 +5,7 @@
@@ -433,8 +435,21 @@ index cb9c428ae9..a35d58f3f1 100644
  
  #include "alloc-util.h"
  #include "dhcp-client-internal.h"
+diff --git a/src/network/networkd-ipv6ll.c b/src/network/networkd-ipv6ll.c
+index dc09171afe..5b93ef3dd4 100644
+--- a/src/network/networkd-ipv6ll.c
 b/src/network/networkd-ipv6ll.c
+@@ -1,7 +1,7 @@
+ /* SPDX-License-Identifier: LGPL-2.1-or-later */
+
+ #include 
+-#include 
++//#include 
+
+ #include "in-addr-util.h"
+ #include "networkd-address.h"
 diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c
-index b62a154828..75949e6094 100644
+index 63679505f7..825ea76ff2 100644
 --- a/src/network/networkd-link.c
 +++ b/src/network/networkd-link.c
 @@ -3,7 +3,7 @@
@@ -446,8 +461,21 @@ index b62a154828..75949e6094 100644
  #include 
  #include 
  #include 
+diff --git a/src/network/networkd-ndisc.c b/src/network/networkd-ndisc.c
+index efe407fedb..46a086cdf5 100644
+--- a/src/network/networkd-ndisc.c
 b/src/network/networkd-ndisc.c
+@@ -6,7 +6,7 @@
+ #include 
+ #include 
+ #include 
+-#include 
++//#include 
+
+ #include "sd-ndisc.h"
+
 diff --git a/src/network/networkd-route.c b/src/network/networkd-route.c
-index ee7a535075..ce6ed64133 100644
+index 934fed3b7f..fdb89313dd 100644
 --- a/src/network/networkd-route.c
 +++ b/src/network/networkd-route.c
 @@ -1,9 +1,5 @@
@@ -485,12 +513,12 @@ index e00cc1e589..e392c7e1a2 100644
  
  #include "missing_network.h"
 diff --git a/src/shared/linux/ethtool.h b/src/shared/linux/ethtool.h
-index 974d4292e7..fe9b8a9e07 100644
+index cf20b6dba5..c3a46dda11 100644
 --- a/src/shared/linux/ethtool.h
 +++ b/src/shared/linux/ethtool.h
 @@ -16,7 +16,8 @@
  
- #include 
+ #include 
  #include 
 -#include 
 +#include 
@@ -499,19 +527,20 @@ index 974d4292e7..fe9b8a9e07 100644
  #ifndef __KERNEL__
  #include  /* for INT_MAX */
 diff --git a/src/shared/netif-util.c b/src/shared/netif-util.c
-index 603d4de109..7e3531808a 100644
+index f56c5646c1..5af28ff119 100644
 --- a/src/shared/netif-util.c
 +++ b/src/shared/netif-util.c
-@@ -1,6 +1,6 @@
+@@ -1,7 +1,7 @@
  /* SPDX-License-Identifier: LGPL-2.1-or-later */
  
+ #include 
 -#include 
 +//#include 
  
  #include "arphrd-util.h"
  #include "device-util.h"
 diff --git a/src/udev/udev-builtin-net_id.c b/src/udev/udev-builtin-net_id.c
-index 65e003eb15..0b3dc04be0 100644
+index f2ea2a7cd5..fe60a0744d 100644
 --- a/src/udev/udev-builtin-net_id.c
 +++ b/src/udev/udev-builtin-

[OE-core] [PATCH 1/2] systemd: Add missed sys/file.h includes for musl

2022-06-20 Thread Pavel Zhukov
Signed-off-by: Pavel Zhukov 
---
 .../0001-Add-sys-file.h-for-LOCK_.patch   | 80 +++
 meta/recipes-core/systemd/systemd_251.2.bb|  2 +-
 2 files changed, 81 insertions(+), 1 deletion(-)
 create mode 100644 
meta/recipes-core/systemd/systemd/0001-Add-sys-file.h-for-LOCK_.patch

diff --git 
a/meta/recipes-core/systemd/systemd/0001-Add-sys-file.h-for-LOCK_.patch 
b/meta/recipes-core/systemd/systemd/0001-Add-sys-file.h-for-LOCK_.patch
new file mode 100644
index 00..25a1042a9d
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0001-Add-sys-file.h-for-LOCK_.patch
@@ -0,0 +1,80 @@
+From 7ae39374fda539aa613ca09be8d050a9bb79 Mon Sep 17 00:00:00 2001
+From: Pavel Zhukov 
+Date: Mon, 20 Jun 2022 11:24:52 +0200
+Subject: [PATCH] Add sys/file.h for LOCK_
+Cc: pa...@zhukoff.net
+
+Upstream-Status: Inappropriate [musl specific]
+
+Signed-off-by: Pavel Zhukov 
+---
+ src/core/namespace.c   | 1 +
+ src/dissect/dissect.c  | 1 +
+ src/shared/dissect-image.c | 2 ++
+ src/sysext/sysext.c| 1 +
+ src/test/test-loop-block.c | 1 +
+ 5 files changed, 6 insertions(+)
+
+diff --git a/src/core/namespace.c b/src/core/namespace.c
+index 926aa96174..39f9e21c93 100644
+--- a/src/core/namespace.c
 b/src/core/namespace.c
+@@ -7,6 +7,7 @@
+ #include 
+ #include 
+ #include 
++#include  // For LOCK_ musl-specific
+
+ #include "alloc-util.h"
+ #include "base-filesystem.h"
+diff --git a/src/dissect/dissect.c b/src/dissect/dissect.c
+index bd94a755db..a0d2a6f287 100644
+--- a/src/dissect/dissect.c
 b/src/dissect/dissect.c
+@@ -6,6 +6,7 @@
+ #include 
+ #include 
+ #include 
++#include  // musl specific for LOCK_
+
+ #include "architecture.h"
+ #include "chase-symlinks.h"
+diff --git a/src/shared/dissect-image.c b/src/shared/dissect-image.c
+index 1ab88839aa..a9e3fe4b44 100644
+--- a/src/shared/dissect-image.c
 b/src/shared/dissect-image.c
+@@ -4,6 +4,8 @@
+ #include 
+ #endif
+
++#include  // For LOCK (musl specific)
++
+ #include 
+ #include 
+ #include 
+diff --git a/src/sysext/sysext.c b/src/sysext/sysext.c
+index 364af195e0..85686c0fab 100644
+--- a/src/sysext/sysext.c
 b/src/sysext/sysext.c
+@@ -5,6 +5,7 @@
+ #include 
+ #include 
+ #include 
++#include  // LOCK_ (musl-specific)
+
+ #include "capability-util.h"
+ #include "chase-symlinks.h"
+diff --git a/src/test/test-loop-block.c b/src/test/test-loop-block.c
+index d1793222f0..6886c4cd31 100644
+--- a/src/test/test-loop-block.c
 b/src/test/test-loop-block.c
+@@ -3,6 +3,7 @@
+ #include 
+ #include 
+ #include 
++#include  // LOCK_ (Musl specific)
+
+ #include "alloc-util.h"
+ #include "dissect-image.h"
+--
+2.35.1
diff --git a/meta/recipes-core/systemd/systemd_251.2.bb 
b/meta/recipes-core/systemd/systemd_251.2.bb
index 8370bec0ca..88216ccf6e 100644
--- a/meta/recipes-core/systemd/systemd_251.2.bb
+++ b/meta/recipes-core/systemd/systemd_251.2.bb
@@ -35,7 +35,6 @@ SRC_URI_MUSL = "\

file://0005-src-basic-missing.h-check-for-missing-strndupa.patch \

file://0007-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch \
file://0008-add-missing-FTW_-macros-for-musl.patch \
-   
file://0009-fix-missing-of-__register_atfork-for-non-glibc-build.patch \
file://0010-Use-uintmax_t-for-handling-rlim_t.patch \

file://0011-test-sizeof.c-Disable-tests-for-missing-typedefs-in-.patch \

file://0012-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch \
@@ -51,6 +50,7 @@ SRC_URI_MUSL = "\
file://0001-pass-correct-parameters-to-getdents64.patch \
file://0002-Add-sys-stat.h-for-S_IFDIR.patch \
file://0001-Adjust-for-musl-headers.patch \
+   file://0001-Add-sys-file.h-for-LOCK_.patch \
"
 
 PAM_PLUGINS = " \
-- 
2.35.1


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



[OE-core] [kirkstone][PATCH] systemd: update 0008-add-missing-FTW_-macros-for-musl.patch

2022-06-15 Thread Pavel Zhukov
Fixes fuzz warning with insane class ihnerited introduced in 4c3f51142b
Kirkstone specific, master has been updated to 251.2 and FTBFS with musl [Yocto 
14838]

Signed-off-by: Pavel Zhukov 
---
 .../systemd/0008-add-missing-FTW_-macros-for-musl.patch   | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git 
a/meta/recipes-core/systemd/systemd/0008-add-missing-FTW_-macros-for-musl.patch 
b/meta/recipes-core/systemd/systemd/0008-add-missing-FTW_-macros-for-musl.patch
index 4cce9a3fe6..0c0d3d0b62 100644
--- 
a/meta/recipes-core/systemd/systemd/0008-add-missing-FTW_-macros-for-musl.patch
+++ 
b/meta/recipes-core/systemd/systemd/0008-add-missing-FTW_-macros-for-musl.patch
@@ -21,12 +21,12 @@ Signed-off-by: Chen Qi 
  3 files changed, 22 insertions(+)
 
 diff --git a/src/basic/missing_type.h b/src/basic/missing_type.h
-index aeaf6ad5ec..3df1084ef2 100644
+index 6c0456349d..5140892e22 100644
 --- a/src/basic/missing_type.h
 +++ b/src/basic/missing_type.h
-@@ -19,3 +19,23 @@ typedef int (*comparison_fn_t)(const void *, const void *);
- #define __COMPAR_FN_T
- typedef int (*__compar_fn_t)(const void *, const void *);
+@@ -14,3 +14,23 @@
+ #ifndef __GLIBC__
+ typedef int (*comparison_fn_t)(const void *, const void *);
  #endif
 +
 +#ifndef FTW_ACTIONRETVAL
-- 
2.35.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#167000): 
https://lists.openembedded.org/g/openembedded-core/message/167000
Mute This Topic: https://lists.openembedded.org/mt/91793657/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 v2] dbus: Soecify runstatedir configure option

2022-06-09 Thread Pavel Zhukov
Without specifing runstatedir tmpfiles.d is configured to use /var/run
for dbus and this causes deprecation warnings in system logs.

Signed-off-by: Pavel Zhukov 
---
 meta/recipes-core/dbus/dbus_1.14.0.bb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-core/dbus/dbus_1.14.0.bb 
b/meta/recipes-core/dbus/dbus_1.14.0.bb
index 7598c45f8e..0046b9fda2 100644
--- a/meta/recipes-core/dbus/dbus_1.14.0.bb
+++ b/meta/recipes-core/dbus/dbus_1.14.0.bb
@@ -24,6 +24,7 @@ EXTRA_OECONF = "--disable-xml-docs \
 --enable-tests \
 --enable-checks \
 --enable-asserts \
+--runstatedir=/run \
 "
 EXTRA_OECONF:append:class-target = " SYSTEMCTL=${base_bindir}/systemctl"
 
@@ -131,7 +132,7 @@ do_install() {
sed 's:@bindir@:${bindir}:' < ${WORKDIR}/dbus-1.init 
>${WORKDIR}/dbus-1.init.sh
install -m 0755 ${WORKDIR}/dbus-1.init.sh 
${D}${sysconfdir}/init.d/dbus-1
install -d ${D}${sysconfdir}/default/volatiles
-   echo "d messagebus messagebus 0755 ${localstatedir}/run/dbus 
none" \
+   echo "d messagebus messagebus 0755 /run/dbus none" \
 > ${D}${sysconfdir}/default/volatiles/99_dbus
fi
 
-- 
2.35.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#166765): 
https://lists.openembedded.org/g/openembedded-core/message/166765
Mute This Topic: https://lists.openembedded.org/mt/91641805/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] dbus: Soecify runstatedir configure option

2022-06-09 Thread Pavel Zhukov
From: Pavel Zhukov 

Without specifing runstatedir tmpfiles.d is configured to use /var/run
for dbus and this causes deprecation warnings in system logs.

Signed-off-by: Pavel Zhukov 
---
 meta/recipes-core/dbus/dbus_1.14.0.bb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-core/dbus/dbus_1.14.0.bb 
b/meta/recipes-core/dbus/dbus_1.14.0.bb
index 7598c45f8e..0046b9fda2 100644
--- a/meta/recipes-core/dbus/dbus_1.14.0.bb
+++ b/meta/recipes-core/dbus/dbus_1.14.0.bb
@@ -24,6 +24,7 @@ EXTRA_OECONF = "--disable-xml-docs \
 --enable-tests \
 --enable-checks \
 --enable-asserts \
+--runstatedir=/run \
 "
 EXTRA_OECONF:append:class-target = " SYSTEMCTL=${base_bindir}/systemctl"
 
@@ -131,7 +132,7 @@ do_install() {
sed 's:@bindir@:${bindir}:' < ${WORKDIR}/dbus-1.init 
>${WORKDIR}/dbus-1.init.sh
install -m 0755 ${WORKDIR}/dbus-1.init.sh 
${D}${sysconfdir}/init.d/dbus-1
install -d ${D}${sysconfdir}/default/volatiles
-   echo "d messagebus messagebus 0755 ${localstatedir}/run/dbus 
none" \
+   echo "d messagebus messagebus 0755 /run/dbus none" \
 > ${D}${sysconfdir}/default/volatiles/99_dbus
fi
 
-- 
2.35.1


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



[OE-core] [kirkstone][PATCH] bitbake.conf: Make TCLIBC and TCMODE lazy assigned

2022-06-07 Thread Pavel Zhukov
This allows two level of overriding (distro level and local.conf/shell
variable). Previous settings blocked shell variables overring
if it was overriden on distro level.

Signed-off-by: Pavel Zhukov 
Signed-off-by: Luca Ceresoli 
Signed-off-by: Richard Purdie 
(cherry picked from commit de6c3f9cb2c589aecbf8d9d25fa83cd18bf80891)
Signed-off-by: Pavel Zhukov 
---
 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 0e939aca4f..2a3cf6f8aa 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -386,8 +386,8 @@ FILESYSTEM_PERMS_TABLES ?= "${@'files/fs-perms.txt' if 
oe.types.boolean(d.getVar
 # General work and output directories for the build system.
 ##
 
-TCMODE ?= "default"
-TCLIBC ?= "glibc"
+TCMODE ??= "default"
+TCLIBC ??= "glibc"
 TMPDIR ?= "${TOPDIR}/tmp"
 
 CACHE = "${TMPDIR}/cache/${TCMODE}-${TCLIBC}${@['', '/' + 
str(d.getVar('MACHINE'))][bool(d.getVar('MACHINE'))]}${@['', '/' + 
str(d.getVar('SDKMACHINE'))][bool(d.getVar('SDKMACHINE'))]}"
-- 
2.35.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#166691): 
https://lists.openembedded.org/g/openembedded-core/message/166691
Mute This Topic: https://lists.openembedded.org/mt/91618018/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] cve-check: move update_symlinks to a library

2022-06-06 Thread Pavel Zhukov

Looks like update_symplinks is widely used accros OE. Quick grepping gave me 
this:
[1]. I'm sure there're more occurences. 
This should be somewhere in more accesible place (oe-core libraries).


[1] 
meta/lib/oeqa/runexported.py:os.remove(sshloglink)
meta/lib/oeqa/runexported.py-os.symlink(self.sshlog, sshloglink)
--
meta/lib/oeqa/selftest/context.py:os.remove(output_link)
meta/lib/oeqa/selftest/context.py-os.symlink(args.output_log, 
output_link)
--
meta/lib/oeqa/runtime/cases/ltp.py:
os.remove(cls.ltptest_log_dir_link)
meta/lib/oeqa/runtime/cases/ltp.py-
os.symlink(os.path.basename(cls.ltptest_log_dir), cls.ltptest_log_dir_link)
--
meta/lib/oeqa/runtime/cases/ptest.py:os.remove(ptest_log_dir_link)
meta/lib/oeqa/runtime/cases/ptest.py-
os.symlink(os.path.basename(ptest_log_dir), ptest_log_dir_link)
--
meta/lib/oeqa/utils/decorators.py:os.remove(linkfile)
meta/lib/oeqa/utils/decorators.py-os.symlink(logfile, linkfile)
--
meta/lib/oeqa/core/context.py:os.remove(output_link)
meta/lib/oeqa/core/context.py-os.symlink(args.output_log, output_link)
--
meta/classes/baremetal-image.bbclass:os.remove(manifest_link)
meta/classes/baremetal-image.bbclass-
os.symlink(os.path.basename(manifest_name), manifest_link)
--
meta/classes/qemuboot.bbclass:   os.remove(qemuboot_link)
meta/classes/qemuboot.bbclass-os.symlink(os.path.basename(qemuboot), 
qemuboot_link)
--
meta/classes/cve-check.bbclass:os.remove(link_path)
meta/classes/cve-check.bbclass-
os.symlink(os.path.basename(target_path), link_path)
--
meta/classes/rootfs-postcommands.bbclass:
os.remove(manifest_link)
meta/classes/rootfs-postcommands.bbclass-
os.symlink(os.path.basename(manifest_name), manifest_link)
--
meta/classes/rootfs-postcommands.bbclass:
os.remove(testdata_link)
meta/classes/rootfs-postcommands.bbclass-
os.symlink(os.path.basename(testdata_name), testdata_link)

"Marta Rybczynska"  writes:

> Move the function to a library, it could be useful in other places.
>
> Signed-off-by: Marta Rybczynska 
> ---
>  meta/classes/cve-check.bbclass | 11 +++
>  meta/lib/oe/cve_check.py   | 10 ++
>  2 files changed, 13 insertions(+), 8 deletions(-)
>
> diff --git a/meta/classes/cve-check.bbclass b/meta/classes/cve-check.bbclass
> index c5c22c4c51..5eb0622d00 100644
> --- a/meta/classes/cve-check.bbclass
> +++ b/meta/classes/cve-check.bbclass
> @@ -80,16 +80,10 @@ CVE_CHECK_LAYER_INCLUDELIST ??= ""
>  # set to "alphabetical" for version using single alphabetical character as 
> increment release
>  CVE_VERSION_SUFFIX ??= ""
>  
> -def update_symlinks(target_path, link_path):
> -if link_path != target_path and os.path.exists(target_path):
> -if os.path.exists(os.path.realpath(link_path)):
> -os.remove(link_path)
> -os.symlink(os.path.basename(target_path), link_path)
> -
>  def generate_json_report(d, out_path, link_path):
>  if os.path.exists(d.getVar("CVE_CHECK_SUMMARY_INDEX_PATH")):
>  import json
> -from oe.cve_check import cve_check_merge_jsons
> +from oe.cve_check import cve_check_merge_jsons, update_symlinks
>  
>  bb.note("Generating JSON CVE summary")
>  index_file = d.getVar("CVE_CHECK_SUMMARY_INDEX_PATH")
> @@ -110,6 +104,7 @@ def generate_json_report(d, out_path, link_path):
>  python cve_save_summary_handler () {
>  import shutil
>  import datetime
> +from oe.cve_check import update_symlinks
>  
>  cve_tmp_file = d.getVar("CVE_CHECK_TMP_FILE")
>  
> @@ -179,7 +174,7 @@ python cve_check_write_rootfs_manifest () {
>  import shutil
>  import json
>  from oe.rootfs import image_list_installed_packages
> -from oe.cve_check import cve_check_merge_jsons
> +from oe.cve_check import cve_check_merge_jsons, update_symlinks
>  
>  if d.getVar("CVE_CHECK_COPY_FILES") == "1":
>  deploy_file = d.getVar("CVE_CHECK_RECIPE_FILE")
> diff --git a/meta/lib/oe/cve_check.py b/meta/lib/oe/cve_check.py
> index dc7d2e2826..aa06497727 100644
> --- a/meta/lib/oe/cve_check.py
> +++ b/meta/lib/oe/cve_check.py
> @@ -163,3 +163,13 @@ def cve_check_merge_jsons(output, data):
>  return
>  
>  output["package"].append(data["package"][0])
> +
> +def update_symlinks(target_path, link_path):
> +"""
> +Update a symbolic link link_path to point to target_path.
> +Remove the link and recreate it if exist and is different.
> +"""
> +if link_path != target_path and os.path.exists(target_path):
> +if os.path.exists(os.path.realpath(link_path)):
> +os.remove(link_path)
> +os.symlink(os.path.basename(target_path), link_path)


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#166585): 

Re: [OE-core] [PATCH] bitbake.conf: Make TCLIBC and TCMODE lazy assigned

2022-06-03 Thread Pavel Zhukov

An example we have right now:

bitbake.conf: TCLIBC ?= "glibc"
linux-distro.conf: TCLIBC = "musl"

TCLIBC="glibc" bitbake -e distro-image-base => TCLIBC == "musl" which
confuses users a lot (and it was not working this way in dunfell).
Same applies to if TCLIBC="glibc" is in conf/local.conf then musl is used.

With linux-distro.conf : TCLIBC ?= "musl" image is build with "glibc"
which is not that we want.

With suggested changes:

bitbake.conf: TCLIBC ??= "glibc"
linux-distro.conf: TCLIBC ?= "musl"

TCLIBC="glibc" bitbake -e distro-image-base => TCLIBC == "glibc"
bitbake -e distro-image-base => TCLIBC == "musl"

If distro maintainers wants they can set to TCLIBC = ""
and disable overriding explicitly. 

Do I miss something? 

"Martin Jansa"  writes:

> You can always override it from local.conf with an override, right? That 
> always worked for me and I don't see why this change is needed.
>
> On Fri, Jun 3, 2022 at 8:42 AM Pavel Zhukov  wrote:
>
>  This allows two level of overriding (distro level and local.conf/shell
>  variable). Previous settings blocked shell variables overring
>  if it was overriden on distro level.
>
>  Signed-off-by: Pavel Zhukov 
>  ---
>   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 0e939aca4f..2a3cf6f8aa 100644
>  --- a/meta/conf/bitbake.conf
>  +++ b/meta/conf/bitbake.conf
>  @@ -386,8 +386,8 @@ FILESYSTEM_PERMS_TABLES ?= "${@'files/fs-perms.txt' if 
> oe.types.boolean(d.getVar
>   # General work and output directories for the build system.
>   ##
>
>  -TCMODE ?= "default"
>  -TCLIBC ?= "glibc"
>  +TCMODE ??= "default"
>  +TCLIBC ??= "glibc"
>   TMPDIR ?= "${TOPDIR}/tmp"
>
>   CACHE = "${TMPDIR}/cache/${TCMODE}-${TCLIBC}${@['', '/' + 
> str(d.getVar('MACHINE'))][bool(d.getVar('MACHINE'))]}${@['', '/' + 
> str(d.getVar
>  ('SDKMACHINE'))][bool(d.getVar('SDKMACHINE'))]}"
>  -- 
>  2.35.1
>
>
> 


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#166511): 
https://lists.openembedded.org/g/openembedded-core/message/166511
Mute This Topic: https://lists.openembedded.org/mt/91516557/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] bitbake.conf: Make TCLIBC and TCMODE lazy assigned

2022-06-03 Thread Pavel Zhukov
This allows two level of overriding (distro level and local.conf/shell
variable). Previous settings blocked shell variables overring
if it was overriden on distro level.

Signed-off-by: Pavel Zhukov 
---
 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 0e939aca4f..2a3cf6f8aa 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -386,8 +386,8 @@ FILESYSTEM_PERMS_TABLES ?= "${@'files/fs-perms.txt' if 
oe.types.boolean(d.getVar
 # General work and output directories for the build system.
 ##
 
-TCMODE ?= "default"
-TCLIBC ?= "glibc"
+TCMODE ??= "default"
+TCLIBC ??= "glibc"
 TMPDIR ?= "${TOPDIR}/tmp"
 
 CACHE = "${TMPDIR}/cache/${TCMODE}-${TCLIBC}${@['', '/' + 
str(d.getVar('MACHINE'))][bool(d.getVar('MACHINE'))]}${@['', '/' + 
str(d.getVar('SDKMACHINE'))][bool(d.getVar('SDKMACHINE'))]}"
-- 
2.35.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#166509): 
https://lists.openembedded.org/g/openembedded-core/message/166509
Mute This Topic: https://lists.openembedded.org/mt/91516557/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] libsdl2: add back xvm and xinerama options

2022-05-25 Thread Pavel Zhukov

I've reported this yesterday.
https://bugzilla.yoctoproject.org/show_bug.cgi?id=14812 Feel free to
close this bug once the patch is merged :-)

"Chen Qi"  writes:

> When building libsdl2-native, and I met a do_configure error as below.
>
>   | CMake Error: The following variables are used in this project, but they 
> are set to NOTFOUND.
>   | Please set them or make sure they are set and tested correctly in the 
> CMake files:
>   | XINERAMA_LIB
>
> This error appears on hosts with libxinerama-dev installed.
>
> Looking at the CMakeLists.txt file, I got:
>
>   set(SDL_X11_OPTIONS Xcursor Xdbe Xinerama XInput Xfixes Xrandr Xscrnsaver 
> XShape Xvm
>
> We an see neither Xinerama nor Xvm is removed. So we should add back
> these options removed by a previous commit.
>
> Signed-off-by: Chen Qi 
> ---
>  meta/recipes-graphics/libsdl2/libsdl2_2.0.22.bb | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/meta/recipes-graphics/libsdl2/libsdl2_2.0.22.bb 
> b/meta/recipes-graphics/libsdl2/libsdl2_2.0.22.bb
> index b112d63784..8519e7f732 100644
> --- a/meta/recipes-graphics/libsdl2/libsdl2_2.0.22.bb
> +++ b/meta/recipes-graphics/libsdl2/libsdl2_2.0.22.bb
> @@ -43,7 +43,9 @@ EXTRA_OECMAKE = "-DSDL_OSS=OFF -DSDL_ESD=OFF -DSDL_ARTS=OFF 
> \
>   -DSDL_PTHREADS=ON \
>   -DSDL_RPATH=OFF \
>   -DSDL_SNDIO=OFF \
> + -DSDL_X11_XVM=OFF \
>   -DSDL_X11_XCURSOR=OFF \
> + -DSDL_X11_XINERAMA=OFF \
>   -DSDL_X11_XDBE=OFF \
>   -DSDL_X11_XFIXES=OFF \
>   -DSDL_X11_XINPUT=OFF \


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#166099): 
https://lists.openembedded.org/g/openembedded-core/message/166099
Mute This Topic: https://lists.openembedded.org/mt/91327899/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] patch.py: Prevent git repo reinitialization

2022-02-21 Thread Pavel Zhukov
There were few bugs in the _isInitialized() function which might trigger
git repo to be reinitialized and patches failing to apply.

Signed-off-by: Pavel Zhukov 
---
 .../recipes-test/gitrepotest/gitrepotest.bb   | 16 
 .../gitrepotest/0001-testpatch.patch  |  9 +
 meta/lib/oe/patch.py  | 11 ---
 meta/lib/oeqa/selftest/cases/bbtests.py   | 19 +--
 4 files changed, 50 insertions(+), 5 deletions(-)
 create mode 100644 meta-selftest/recipes-test/gitrepotest/gitrepotest.bb
 create mode 100644 
meta-selftest/recipes-test/gitrepotest/gitrepotest/0001-testpatch.patch

diff --git a/meta-selftest/recipes-test/gitrepotest/gitrepotest.bb 
b/meta-selftest/recipes-test/gitrepotest/gitrepotest.bb
new file mode 100644
index 00..f1b6c55833
--- /dev/null
+++ b/meta-selftest/recipes-test/gitrepotest/gitrepotest.bb
@@ -0,0 +1,16 @@
+SUMMARY = "Test recipe for git repo initialization"
+HOMEPAGE = "https://git.yoctoproject.org/git/matchbox-panel-2;
+LICENSE = "GPL-2.0-or-later"
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
+
+INHIBIT_DEFAULT_DEPS = "1"
+
+PATCHTOOL="git"
+
+SRC_URI = 
"git://git.yoctoproject.org/git/matchbox-panel-2;branch=master;protocol=https \
+   file://0001-testpatch.patch \
+  "
+
+SRCREV = "f82ca3f42510fb3ef10f598b393eb373a2c34ca7"
+
+S = "${WORKDIR}/git"
diff --git 
a/meta-selftest/recipes-test/gitrepotest/gitrepotest/0001-testpatch.patch 
b/meta-selftest/recipes-test/gitrepotest/gitrepotest/0001-testpatch.patch
new file mode 100644
index 00..bccda17ee9
--- /dev/null
+++ b/meta-selftest/recipes-test/gitrepotest/gitrepotest/0001-testpatch.patch
@@ -0,0 +1,9 @@
+diff --git a/Makefile.am b/Makefile.am
+index 432a9b4..bbf7c74 100644
+--- a/Makefile.am
 b/Makefile.am
+@@ -1,3 +1,4 @@
++## This is useless comment to test if patch works
+ ACLOCAL_AMFLAGS = -I m4
+ 
+ SUBDIRS = matchbox-panel applets data po
diff --git a/meta/lib/oe/patch.py b/meta/lib/oe/patch.py
index 950fe723dc..9034fcae03 100644
--- a/meta/lib/oe/patch.py
+++ b/meta/lib/oe/patch.py
@@ -304,14 +304,19 @@ class GitApplyTree(PatchTree):
 
 def _isInitialized(self):
 cmd = "git rev-parse --show-toplevel"
-(status, output) = subprocess.getstatusoutput(cmd.split())
+try:
+output = runcmd(cmd.split(), self.dir).strip()
+except CmdError as err:
+## runcmd returned non-zero which most likely means 128
+## Not a git directory
+return False
 ## Make sure repo is in builddir to not break top-level git repos
-return status == 0 and os.path.samedir(output, self.dir)
+return os.path.samefile(output, self.dir)
 
 def _initRepo(self):
 runcmd("git init".split(), self.dir)
 runcmd("git add .".split(), self.dir)
-runcmd("git commit -a --allow-empty -m Patching_started".split(), 
self.dir)
+runcmd("git commit -a --allow-empty -m 
bitbake_patching_started".split(), self.dir)
 
 @staticmethod
 def extractPatchHeader(patchfile):
diff --git a/meta/lib/oeqa/selftest/cases/bbtests.py 
b/meta/lib/oeqa/selftest/cases/bbtests.py
index ce72c4bcc6..35ad9f3cd6 100644
--- a/meta/lib/oeqa/selftest/cases/bbtests.py
+++ b/meta/lib/oeqa/selftest/cases/bbtests.py
@@ -307,11 +307,26 @@ INHERIT:remove = \"report-error\"
 src = get_bb_var("SRC_URI",test_recipe)
 gitscm = re.search("git://", src)
 self.assertFalse(gitscm, "test_git_patchtool pre-condition failed: {} 
test recipe contains git repo!".format(test_recipe))
-result = bitbake('man-db -c patch', ignore_status=False)
+result = bitbake('{} -c patch'.format(test_recipe), 
ignore_status=False)
 fatal = re.search("fatal: not a git repository (or any of the parent 
directories)", result.output)
 self.assertFalse(fatal, "Failed to patch using PATCHTOOL=\"git\"")
 self.delete_recipeinc(test_recipe)
-bitbake('-cclean man-db')
+bitbake('-cclean {}'.format(test_recipe))
+
+def test_git_patchtool2(self):
+""" Test if PATCHTOOL=git works with git repo and doesn't reinitialize 
it
+"""
+test_recipe = "gitrepotest"
+src = get_bb_var("SRC_URI",test_recipe)
+gitscm = re.search("git://", src)
+self.assertTrue(gitscm, "test_git_patchtool pre-condition failed: {} 
test recipe doesn't contains git repo!".format(test_recipe))
+result = bitbake('{} -c patch'.format(test_recipe), 
ignore_status=False)
+srcdir = get_bb_var('S', test_recipe)
+result = runCmd("git log", cwd = srcdir)
+self

Re: [OE-core] [PATCH] patch.py: Prevent git repo reinitialization

2022-02-21 Thread Pavel Zhukov
  -- 21.02.2022, 15:15, "Christian Eggers" :On Monday, 21 February 2022, 14:57:46 CET, Pavel Zhukov wrote: There were few bugs in the _isInitialized() function which might trigger git repo to be reinitialized and patches failing to apply.  Signed-off-by: Pavel Zhukov <pavel.zhu...@huawei.com> ---  .../net-tools/Add_missing_headers.patch | 15 +++  .../net-tools/net-tools/net-tools-config.h | 75 +++  .../net-tools/net-tools/net-tools-config.make | 36 ++  .../recipes-test/net-tools/net-tools_2.10.bb | 121 ++I guess that these files have been added by accident.They haven't. I've added test for PATCHTOOL="git" && git:// . I could use gitinpackoffline but it doesn't contain any patches. I was not able to reproduce the issue however.   meta/lib/oe/patch.py | 6 +-  meta/lib/oeqa/selftest/cases/bbtests.py | 20 ++-  6 files changed, 268 insertions(+), 5 deletions(-)  create mode 100644 meta-selftest/recipes-test/net-tools/net-tools/Add_missing_headers.patch  create mode 100644 meta-selftest/recipes-test/net-tools/net-tools/net-tools-config.h  create mode 100644 meta-selftest/recipes-test/net-tools/net-tools/net-tools-config.make  create mode 100644 meta-selftest/recipes-test/net-tools/net-tools_2.10.bb  ...  diff --git a/meta/lib/oe/patch.py b/meta/lib/oe/patch.py index 950fe723dc..b6fe9b2bdd 100644 --- a/meta/lib/oe/patch.py +++ b/meta/lib/oe/patch.py @@ -304,14 +304,14 @@ class GitApplyTree(PatchTree):def _isInitialized(self):  cmd = "git rev-parse --show-toplevel" - (status, output) = subprocess.getstatusoutput(cmd.split()) + (status, output) = subprocess.getstatusoutput(cmd)  ## Make sure repo is in builddir to not break top-level git repos - return status == 0 and os.path.samedir(output, self.dir) + return status == 0 and os.path.samefile(oиutput, self.dir)extra character ('и')Oh. fat fingers. Thank you!regardsChristian def _initRepo(self):  runcmd("git init".split(), self.dir)  runcmd("git add .".split(), self.dir) - runcmd("git commit -a --allow-empty -m Patching_started".split(), self.dir) + runcmd("git commit -a --allow-empty -m bitbake_patching_started".split(), self.dir)@staticmethod  def extractPatchHeader(patchfile): diff --git a/meta/lib/oeqa/selftest/cases/bbtests.py b/meta/lib/oeqa/selftest/cases/bbtests.py index ce72c4bcc6..ae3f230038 100644 --- a/meta/lib/oeqa/selftest/cases/bbtests.py +++ b/meta/lib/oeqa/selftest/cases/bbtests.py @@ -307,11 +307,27 @@ INHERIT:remove = \"report-error\"  src = "" />  gitscm = re.search("git://", src)  self.assertFalse(gitscm, "test_git_patchtool pre-condition failed: {} test recipe contains git repo!".format(test_recipe)) - result = bitbake('man-db -c patch', ignore_status=False) + result = bitbake('{} -c patch'.format(test_recipe), ignore_status=False)  fatal = re.search("fatal: not a git repository (or any of the parent directories)", result.output)  self.assertFalse(fatal, "Failed to patch using PATCHTOOL=\"git\"")  self.delete_recipeinc(test_recipe) - bitbake('-cclean man-db') + bitbake('-cclean {}'.format(test_recipe)) + + def test_git_patchtool2(self): + """ Test if PATCHTOOL=git works with git repo and doesn't reinitialize it + """ + test_recipe = "net-tools" + self.write_recipeinc(test_recipe, 'PATCHTOOL=\"git\"') + src = "" /> + gitscm = re.search("git://", src) + self.assertTrue(gitscm, "test_git_patchtool pre-condition failed: {} test recipe doesn't contains git repo!".format(test_recipe)) + result = bitbake('{} -c patch'.format(test_recipe), ignore_status=False) + srcdir = get_bb_var('S', test_recipe) + result = runCmd("git log", cwd = srcdir) + self.assertFalse("bitbake_patching_started" in result.output, msg = "Repository has been reinitialized. {}".format(srcdir)) + self.delete_recipeinc(test_recipe) + bitbake('-cclean {}'.format(test_recipe)) +def test_git_unpack_nonetwork(self):  """ 
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#162052): 
https://lists.openembedded.org/g/openembedded-core/message/162052
Mute This Topic: https://lists.openembedded.org/mt/89293670/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 v2] patch.py: Prevent git repo reinitialization

2022-02-21 Thread Pavel Zhukov
There were few bugs in the _isInitialized() function which might trigger
git repo to be reinitialized and patches failing to apply.

Signed-off-by: Pavel Zhukov 
---
 .../net-tools/Add_missing_headers.patch   |  15 +++
 .../net-tools/net-tools/net-tools-config.h|  75 +++
 .../net-tools/net-tools/net-tools-config.make |  36 ++
 .../recipes-test/net-tools/net-tools_2.10.bb  | 121 ++
 meta/lib/oe/patch.py  |   6 +-
 meta/lib/oeqa/selftest/cases/bbtests.py   |  20 ++-
 6 files changed, 268 insertions(+), 5 deletions(-)
 create mode 100644 
meta-selftest/recipes-test/net-tools/net-tools/Add_missing_headers.patch
 create mode 100644 
meta-selftest/recipes-test/net-tools/net-tools/net-tools-config.h
 create mode 100644 
meta-selftest/recipes-test/net-tools/net-tools/net-tools-config.make
 create mode 100644 meta-selftest/recipes-test/net-tools/net-tools_2.10.bb

diff --git 
a/meta-selftest/recipes-test/net-tools/net-tools/Add_missing_headers.patch 
b/meta-selftest/recipes-test/net-tools/net-tools/Add_missing_headers.patch
new file mode 100644
index 00..f15d3654c7
--- /dev/null
+++ b/meta-selftest/recipes-test/net-tools/net-tools/Add_missing_headers.patch
@@ -0,0 +1,15 @@
+Description: Add missing headers
+
+Upstream-Status: Pending
+Signed-off-by: Martin Jansa 
+
+--- a/netstat.c
 b/netstat.c
+@@ -88,6 +88,7 @@
+ #include 
+ #include 
+ #include 
++#include 
+ 
+ #include "net-support.h"
+ #include "pathnames.h"
diff --git a/meta-selftest/recipes-test/net-tools/net-tools/net-tools-config.h 
b/meta-selftest/recipes-test/net-tools/net-tools/net-tools-config.h
new file mode 100644
index 00..6d39c2a8cb
--- /dev/null
+++ b/meta-selftest/recipes-test/net-tools/net-tools/net-tools-config.h
@@ -0,0 +1,75 @@
+/*
+* config.h Automatically generated configuration includefile
+*
+* NET-TOOLSA collection of programs that form the base set of the
+*  NET-3 Networking Distribution for the LINUX operating
+*  system.
+*
+*  DO  NOT  EDIT  DIRECTLY
+*
+*/
+
+/* 
+ * 
+ * Internationalization
+ * 
+ * The net-tools package has currently been translated to French,
+ * German and Brazilian Portugese.  Other translations are, of
+ * course, welcome.  Answer `n' here if you have no support for
+ * internationalization on your system.
+ * 
+ */
+#define I18N 1
+
+/* 
+ * 
+ * Protocol Families.
+ * 
+ */
+#define HAVE_AFUNIX 1
+#define HAVE_AFINET 1
+#define HAVE_AFINET6 1
+#define HAVE_AFIPX 0
+#define HAVE_AFATALK 0
+#define HAVE_AFAX25 0
+#define HAVE_AFNETROM 1
+#define HAVE_AFROSE 0
+#define HAVE_AFX25 0
+#define HAVE_AFECONET 0
+#define HAVE_AFDECnet 0
+#define HAVE_AFASH 0
+
+/* 
+ * 
+ * Device Hardware types.
+ * 
+ */
+#define HAVE_HWETHER 1
+#define HAVE_HWARC 1
+#define HAVE_HWSLIP 1
+#define HAVE_HWPPP 1
+#define HAVE_HWTUNNEL 1
+#define HAVE_HWSTRIP 0
+#define HAVE_HWTR 0
+#define HAVE_HWAX25 0
+#define HAVE_HWROSE 0
+#define HAVE_HWNETROM 1
+#define HAVE_HWX25 0
+#define HAVE_HWFR 1
+#define HAVE_HWSIT 0
+#define HAVE_HWFDDI 0
+#define HAVE_HWHIPPI 0
+#define HAVE_HWASH 0
+#define HAVE_HWHDLCLAPB 0
+#define HAVE_HWIRDA 1
+#define HAVE_HWEC 0
+#define HAVE_HWIB 0
+
+/* 
+ * 
+ * Other Features.
+ * 
+ */
+#define HAVE_FW_MASQUERADE 1
+#define HAVE_IP_TOOLS 1
+#define HAVE_MII 1
diff --git 
a/meta-selftest/recipes-test/net-tools/net-tools/net-tools-config.make 
b/meta-selftest/recipes-test/net-tools/net-tools/net-tools-config.make
new file mode 100644
index 00..ec516f27ee
--- /dev/null
+++ b/meta-selftest/recipes-test/net-tools/net-tools/net-tools-config.make
@@ -0,0 +1,36 @@
+I18N=1
+HAVE_AFUNIX=1
+HAVE_AFINET=1
+HAVE_AFINET6=1
+# HAVE_AFIPX=0
+# HAVE_AFATALK=0
+# HAVE_AFAX25=0
+HAVE_AFNETROM=1
+# HAVE_AFROSE=0
+# HAVE_AFX25=0
+# HAVE_AFECONET=0
+# HAVE_AFDECnet=0
+# HAVE_AFASH=0
+HAVE_HWETHER=1
+HAVE_HWARC=1
+HAVE_HWSLIP=1
+HAVE_HWPPP=1
+HAVE_HWTUNNEL=1
+HAVE_HWSTRIP=1
+HAVE_HWTR=1
+# HAVE_HWAX25=0
+# HAVE_HWROSE=0
+HAVE_HWNETROM=1
+# HAVE_HWX25=0
+HAVE_HWFR=1
+# HAVE_HWSIT=0
+# HAVE_HWFDDI=0
+# HAVE_HWHIPPI=0
+# HAVE_HWASH=0
+# HAVE_HWHDLCLAPB=0
+HAVE_HWIRDA=1
+# HAVE_HWEC=0
+# HAVE_HWIB=0
+HAVE_FW_MASQUERADE=1
+HAVE_IP_TOOLS=1
+HAVE_MII=1
diff --git a/meta-selftest/recipes-test/net-tools/net-tools_2.10.bb 
b/meta-selftest/recipes-test/net-tools/net-tools_2.10.bb
new file mode 100644
index 00..33304297ec
--- /dev/null
+++ b/meta-selftest/recipes-test/net-tools/net-tools_2.10.bb
@@ -0,0 +1,121 @@
+SUMMARY = "Basic networking tools"
+DESCRIPTION = "A collection of programs that form the base set of the NET-3 
networking distribution for the Linux operating system"
+HOMEPAGE = "http://net-tools.berlios.de/;
+BUGTRACKER = "http://bugs.debian.org/net-tools;
+LICENSE = "GPL-2.0-or-later"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+
file://ifconfig.c;beginl

[OE-core] [PATCH] patch.py: Prevent git repo reinitialization

2022-02-21 Thread Pavel Zhukov
There were few bugs in the _isInitialized() function which might trigger
git repo to be reinitialized and patches failing to apply.

Signed-off-by: Pavel Zhukov 
---
 .../net-tools/Add_missing_headers.patch   |  15 +++
 .../net-tools/net-tools/net-tools-config.h|  75 +++
 .../net-tools/net-tools/net-tools-config.make |  36 ++
 .../recipes-test/net-tools/net-tools_2.10.bb  | 121 ++
 meta/lib/oe/patch.py  |   6 +-
 meta/lib/oeqa/selftest/cases/bbtests.py   |  20 ++-
 6 files changed, 268 insertions(+), 5 deletions(-)
 create mode 100644 
meta-selftest/recipes-test/net-tools/net-tools/Add_missing_headers.patch
 create mode 100644 
meta-selftest/recipes-test/net-tools/net-tools/net-tools-config.h
 create mode 100644 
meta-selftest/recipes-test/net-tools/net-tools/net-tools-config.make
 create mode 100644 meta-selftest/recipes-test/net-tools/net-tools_2.10.bb

diff --git 
a/meta-selftest/recipes-test/net-tools/net-tools/Add_missing_headers.patch 
b/meta-selftest/recipes-test/net-tools/net-tools/Add_missing_headers.patch
new file mode 100644
index 00..f15d3654c7
--- /dev/null
+++ b/meta-selftest/recipes-test/net-tools/net-tools/Add_missing_headers.patch
@@ -0,0 +1,15 @@
+Description: Add missing headers
+
+Upstream-Status: Pending
+Signed-off-by: Martin Jansa 
+
+--- a/netstat.c
 b/netstat.c
+@@ -88,6 +88,7 @@
+ #include 
+ #include 
+ #include 
++#include 
+ 
+ #include "net-support.h"
+ #include "pathnames.h"
diff --git a/meta-selftest/recipes-test/net-tools/net-tools/net-tools-config.h 
b/meta-selftest/recipes-test/net-tools/net-tools/net-tools-config.h
new file mode 100644
index 00..6d39c2a8cb
--- /dev/null
+++ b/meta-selftest/recipes-test/net-tools/net-tools/net-tools-config.h
@@ -0,0 +1,75 @@
+/*
+* config.h Automatically generated configuration includefile
+*
+* NET-TOOLSA collection of programs that form the base set of the
+*  NET-3 Networking Distribution for the LINUX operating
+*  system.
+*
+*  DO  NOT  EDIT  DIRECTLY
+*
+*/
+
+/* 
+ * 
+ * Internationalization
+ * 
+ * The net-tools package has currently been translated to French,
+ * German and Brazilian Portugese.  Other translations are, of
+ * course, welcome.  Answer `n' here if you have no support for
+ * internationalization on your system.
+ * 
+ */
+#define I18N 1
+
+/* 
+ * 
+ * Protocol Families.
+ * 
+ */
+#define HAVE_AFUNIX 1
+#define HAVE_AFINET 1
+#define HAVE_AFINET6 1
+#define HAVE_AFIPX 0
+#define HAVE_AFATALK 0
+#define HAVE_AFAX25 0
+#define HAVE_AFNETROM 1
+#define HAVE_AFROSE 0
+#define HAVE_AFX25 0
+#define HAVE_AFECONET 0
+#define HAVE_AFDECnet 0
+#define HAVE_AFASH 0
+
+/* 
+ * 
+ * Device Hardware types.
+ * 
+ */
+#define HAVE_HWETHER 1
+#define HAVE_HWARC 1
+#define HAVE_HWSLIP 1
+#define HAVE_HWPPP 1
+#define HAVE_HWTUNNEL 1
+#define HAVE_HWSTRIP 0
+#define HAVE_HWTR 0
+#define HAVE_HWAX25 0
+#define HAVE_HWROSE 0
+#define HAVE_HWNETROM 1
+#define HAVE_HWX25 0
+#define HAVE_HWFR 1
+#define HAVE_HWSIT 0
+#define HAVE_HWFDDI 0
+#define HAVE_HWHIPPI 0
+#define HAVE_HWASH 0
+#define HAVE_HWHDLCLAPB 0
+#define HAVE_HWIRDA 1
+#define HAVE_HWEC 0
+#define HAVE_HWIB 0
+
+/* 
+ * 
+ * Other Features.
+ * 
+ */
+#define HAVE_FW_MASQUERADE 1
+#define HAVE_IP_TOOLS 1
+#define HAVE_MII 1
diff --git 
a/meta-selftest/recipes-test/net-tools/net-tools/net-tools-config.make 
b/meta-selftest/recipes-test/net-tools/net-tools/net-tools-config.make
new file mode 100644
index 00..ec516f27ee
--- /dev/null
+++ b/meta-selftest/recipes-test/net-tools/net-tools/net-tools-config.make
@@ -0,0 +1,36 @@
+I18N=1
+HAVE_AFUNIX=1
+HAVE_AFINET=1
+HAVE_AFINET6=1
+# HAVE_AFIPX=0
+# HAVE_AFATALK=0
+# HAVE_AFAX25=0
+HAVE_AFNETROM=1
+# HAVE_AFROSE=0
+# HAVE_AFX25=0
+# HAVE_AFECONET=0
+# HAVE_AFDECnet=0
+# HAVE_AFASH=0
+HAVE_HWETHER=1
+HAVE_HWARC=1
+HAVE_HWSLIP=1
+HAVE_HWPPP=1
+HAVE_HWTUNNEL=1
+HAVE_HWSTRIP=1
+HAVE_HWTR=1
+# HAVE_HWAX25=0
+# HAVE_HWROSE=0
+HAVE_HWNETROM=1
+# HAVE_HWX25=0
+HAVE_HWFR=1
+# HAVE_HWSIT=0
+# HAVE_HWFDDI=0
+# HAVE_HWHIPPI=0
+# HAVE_HWASH=0
+# HAVE_HWHDLCLAPB=0
+HAVE_HWIRDA=1
+# HAVE_HWEC=0
+# HAVE_HWIB=0
+HAVE_FW_MASQUERADE=1
+HAVE_IP_TOOLS=1
+HAVE_MII=1
diff --git a/meta-selftest/recipes-test/net-tools/net-tools_2.10.bb 
b/meta-selftest/recipes-test/net-tools/net-tools_2.10.bb
new file mode 100644
index 00..33304297ec
--- /dev/null
+++ b/meta-selftest/recipes-test/net-tools/net-tools_2.10.bb
@@ -0,0 +1,121 @@
+SUMMARY = "Basic networking tools"
+DESCRIPTION = "A collection of programs that form the base set of the NET-3 
networking distribution for the Linux operating system"
+HOMEPAGE = "http://net-tools.berlios.de/;
+BUGTRACKER = "http://bugs.debian.org/net-tools;
+LICENSE = "GPL-2.0-or-later"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+
file://ifconfig.c;beginl

[OE-core] [PATCH] sanity.bb: Change CONNECTIVITY_CHECK_URIS to YP

2022-02-11 Thread Pavel Zhukov
Do not rely on example.com . Having yoctoproject.org down may be much
more easier to detect/investigate as far as it hosts mirrors.

Signed-off-by: Pavel Zhukov 
---
 meta/classes/sanity.bbclass | 3 ++-
 meta/conf/distro/include/default-distrovars.inc | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index f288b4c84c..ffabf8d9f9 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -353,7 +353,8 @@ def check_connectivity(d):
 msg += "Please ensure your host's network is configured 
correctly.\n"
 msg += "If your ISP or network is blocking the above 
URL,\n"
 msg += "try with another domain name, for example by 
setting:\n"
-msg += "CONNECTIVITY_CHECK_URIS = 
\"https://www.yoctoproject.org/\";
+msg += "CONNECTIVITY_CHECK_URIS = \"https://example.com/\; 
or "
+msg += "another domain name which works for you "
 msg += "You could also set BB_NO_NETWORK = \"1\" to 
disable network\n"
 msg += "access if all required sources are on local 
disk.\n"
 retval = msg
diff --git a/meta/conf/distro/include/default-distrovars.inc 
b/meta/conf/distro/include/default-distrovars.inc
index fb0f1097da..8f7e12e8fe 100644
--- a/meta/conf/distro/include/default-distrovars.inc
+++ b/meta/conf/distro/include/default-distrovars.inc
@@ -54,4 +54,4 @@ KERNEL_IMAGETYPES ??= "${KERNEL_IMAGETYPE}"
 # fetch from the network (and warn you if not). To disable the test set
 # the variable to be empty.
 # Git example url: 
git://git.yoctoproject.org/yocto-firewall-test;protocol=git;rev=master;branch=master
-CONNECTIVITY_CHECK_URIS ?= "https://www.example.com/;
+CONNECTIVITY_CHECK_URIS ?= "https://www.yoctoproject.org/;
-- 
2.34.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#161645): 
https://lists.openembedded.org/g/openembedded-core/message/161645
Mute This Topic: https://lists.openembedded.org/mt/89069173/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] sanity.class: Add possibility to configure networking check

2022-02-11 Thread Pavel Zhukov
That'd be simple change. CONNECTIVITY_CHECK_URIS = "" will disable this check altogether.-- Pavel11.02.2022, 12:23, "Jacob Kroon" :On 2/11/22 12:18, Ross Burton wrote: On Fri, 11 Feb 2022 at 08:44, Pavel Zhukov <pa...@zhukoff.net> wrote: +for uri in test_uris: +try: +if check_all: +fetcher = bb.fetch2.Fetch(test_uris, data) +else: +fetcher = bb.fetch2.Fetch([uri], data) +fetcher.checkstatus() +return retval  This seems like it's overcomplicating things to me.  example.com was having uptime issues, and we can change it to www.yoctoproject.org so that we know in advance of expected downtime, and have direct contact with the people responsible for keeping it up. So let's just change the URL to www.yoctoproject.org instead of adding more variables and non-trivial logic. I vote for removing the check altogether.As I understand it, the check was added in order to preventhard-to-interpret error messages when network failed. I can live with that.Jacob
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#161643): 
https://lists.openembedded.org/g/openembedded-core/message/161643
Mute This Topic: https://lists.openembedded.org/mt/89066994/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] sanity.class: Add possibility to configure networking check

2022-02-11 Thread Pavel Zhukov
Previously sanity checker required all uri listed in
CONNECTIVITY_CHECK_URIS to be available for networking check. It caused
selftests failures due to temprorary example.com unavailability.
Add CONNECTIVITY_CHECK_ALL variable to change this behaviour and check
for any host from the list to be available it allows to specify
"failover" uri and/or speed checker up if few uris have been specified.

Default value is set to "1" for backward compatibility.

Signed-off-by: Pavel Zhukov 
---
 meta/classes/sanity.bbclass   | 44 ---
 .../distro/include/default-distrovars.inc |  5 ++-
 2 files changed, 32 insertions(+), 17 deletions(-)

diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index f288b4c84c..695776bba3 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -326,6 +326,7 @@ def check_connectivity(d):
 # using the same syntax as for SRC_URI. If the variable is not set
 # the check is skipped
 test_uris = (d.getVar('CONNECTIVITY_CHECK_URIS') or "").split()
+check_all = (d.getVar('CONNECTIVITY_CHECK_ALL') or "1") == "1"
 retval = ""
 
 bbn = d.getVar('BB_NO_NETWORK')
@@ -341,22 +342,33 @@ def check_connectivity(d):
 data = bb.data.createCopy(d)
 data.delVar('PREMIRRORS')
 data.delVar('MIRRORS')
-try:
-fetcher = bb.fetch2.Fetch(test_uris, data)
-fetcher.checkstatus()
-except Exception as err:
-# Allow the message to be configured so that users can be
-# pointed to a support mechanism.
-msg = data.getVar('CONNECTIVITY_CHECK_MSG') or ""
-if len(msg) == 0:
-msg = "%s.\n" % err
-msg += "Please ensure your host's network is configured 
correctly.\n"
-msg += "If your ISP or network is blocking the above 
URL,\n"
-msg += "try with another domain name, for example by 
setting:\n"
-msg += "CONNECTIVITY_CHECK_URIS = 
\"https://www.yoctoproject.org/\";
-msg += "You could also set BB_NO_NETWORK = \"1\" to 
disable network\n"
-msg += "access if all required sources are on local 
disk.\n"
-retval = msg
+err = None
+for uri in test_uris:
+try:
+if check_all:
+fetcher = bb.fetch2.Fetch(test_uris, data)
+else:
+fetcher = bb.fetch2.Fetch([uri], data)
+fetcher.checkstatus()
+return retval
+except Exception as e:
+err = "{} \n {}".format(err, e)
+if check_all:
+break
+
+
+# Allow the message to be configured so that users can be
+# pointed to a support mechanism.
+msg = data.getVar('CONNECTIVITY_CHECK_MSG') or ""
+if len(msg) == 0:
+msg = "%s.\n" % err
+msg += "Please ensure your host's network is configured 
correctly.\n"
+msg += "If your ISP or network is blocking the above URL,\n"
+msg += "try with another domain name, for example by 
setting:\n"
+msg += "CONNECTIVITY_CHECK_URIS = 
\"https://www.yoctoproject.org/\";
+msg += "You could also set BB_NO_NETWORK = \"1\" to disable 
network\n"
+msg += "access if all required sources are on local disk.\n"
+retval = msg
 
 return retval
 
diff --git a/meta/conf/distro/include/default-distrovars.inc 
b/meta/conf/distro/include/default-distrovars.inc
index fb0f1097da..867d694146 100644
--- a/meta/conf/distro/include/default-distrovars.inc
+++ b/meta/conf/distro/include/default-distrovars.inc
@@ -54,4 +54,7 @@ KERNEL_IMAGETYPES ??= "${KERNEL_IMAGETYPE}"
 # fetch from the network (and warn you if not). To disable the test set
 # the variable to be empty.
 # Git example url: 
git://git.yoctoproject.org/yocto-firewall-test;protocol=git;rev=master;branch=master
-CONNECTIVITY_CHECK_URIS ?= "https://www.example.com/;
+CONNECTIVITY_CHECK_URIS ?= "https://www.example.com/ 
https://www.yoctoproject.org;
+# Define is all CONNECTIVITY_CHECK_URIS are required to be available or it's 
enough to have some
+# of them reachable for networking check
+CONNECTIVITY_CHECK_ALL ?= "0"
-- 
2.34.1


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



[OE-core] [PATCHv2] systemd: enable KeepConfiguration= when running on network filesystem

2022-02-05 Thread Pavel Zhukov
This fix boot from NFS for systemd enabled systems. Previously
systemd-networkd dropped network configuration on exit from initrd even
if there're NFS mount.

Bug-Url: https://bugzilla.yoctoproject.org/show_bug.cgi?id=14708

Signed-off-by: Pavel Zhukov 
---
 ...eepConfiguration-when-running-on-net.patch | 253 ++
 meta/recipes-core/systemd/systemd_250.3.bb|   1 +
 2 files changed, 254 insertions(+)
 create mode 100644 
meta/recipes-core/systemd/systemd/0029-network-enable-KeepConfiguration-when-running-on-net.patch

diff --git 
a/meta/recipes-core/systemd/systemd/0029-network-enable-KeepConfiguration-when-running-on-net.patch
 
b/meta/recipes-core/systemd/systemd/0029-network-enable-KeepConfiguration-when-running-on-net.patch
new file mode 100644
index 00..782b9645cb
--- /dev/null
+++ 
b/meta/recipes-core/systemd/systemd/0029-network-enable-KeepConfiguration-when-running-on-net.patch
@@ -0,0 +1,253 @@
+From 6f4e84126aaa4e26cb6865b054ea5ddebd3906e5 Mon Sep 17 00:00:00 2001
+From: Yu Watanabe 
+Date: Thu, 3 Feb 2022 12:14:19 +0900
+Subject: [PATCH] network: enable KeepConfiguration= when running on network
+ filesystem
+Cc: pa...@zhukoff.net
+
+Upstream-Status: Submitted [https://github.com/systemd/systemd/pull/22383]
+[YOCTO #14708]
+
+network-generator: rename DHCP_TYPE_DHCP -> DHCP_TYPE_DHCP4
+
+To emphasize this is DHCPv4. No behavior is changed.
+
+stat-util: introduce path_is_network_fs()
+
+network: enable KeepConfiguration= when running on network filesystem
+
+Also, set KeepConfiguration=dhcp-on-stop by default when running in
+initrd.
+
+Fixes #21967.
+---
+ man/systemd.network.xml   |  6 +++--
+ src/basic/stat-util.c |  9 +++
+ src/basic/stat-util.h |  1 +
+ src/network/generator/network-generator.c |  4 ++--
+ src/network/generator/network-generator.h |  2 +-
+ src/network/networkd-manager.c| 29 +++
+ src/network/networkd-manager.h|  2 ++
+ src/network/networkd-network.c| 12 ++
+ src/network/test-networkd-conf.c  |  5 
+ 9 files changed, 60 insertions(+), 10 deletions(-)
+
+diff --git a/man/systemd.network.xml b/man/systemd.network.xml
+index af431e4f2c..f90cff4cd6 100644
+--- a/man/systemd.network.xml
 b/man/systemd.network.xml
+@@ -944,8 +944,10 @@ Table=1234
+   lease expires. This is contrary to the DHCP specification, but may 
be the best choice if,
+   e.g., the root filesystem relies on this connection. The setting 
dhcp
+   implies dhcp-on-stop, and yes 
implies
+-  dhcp and static. Defaults to 
no.
+-  
++  dhcp and static. Defaults to
++  dhcp-on-stop when 
systemd-networkd is running in
++  initrd, yes when the root filesystem is a 
network filesystem, and
++  no otherwise.
+ 
+   
+ 
+diff --git a/src/basic/stat-util.c b/src/basic/stat-util.c
+index efac7b002e..c2269844f8 100644
+--- a/src/basic/stat-util.c
 b/src/basic/stat-util.c
+@@ -249,6 +249,15 @@ int path_is_temporary_fs(const char *path) {
+ return is_temporary_fs();
+ }
+ 
++int path_is_network_fs(const char *path) {
++struct statfs s;
++
++if (statfs(path, ) < 0)
++return -errno;
++
++return is_network_fs();
++}
++
+ int stat_verify_regular(const struct stat *st) {
+ assert(st);
+ 
+diff --git a/src/basic/stat-util.h b/src/basic/stat-util.h
+index a566114f7c..f7d2f12aa9 100644
+--- a/src/basic/stat-util.h
 b/src/basic/stat-util.h
+@@ -53,6 +53,7 @@ int fd_is_temporary_fs(int fd);
+ int fd_is_network_fs(int fd);
+ 
+ int path_is_temporary_fs(const char *path);
++int path_is_network_fs(const char *path);
+ 
+ /* Because statfs.t_type can be int on some architectures, we have to cast
+  * the const magic to the type, otherwise the compiler warns about
+diff --git a/src/network/generator/network-generator.c 
b/src/network/generator/network-generator.c
+index c081ec673c..063ad08d80 100644
+--- a/src/network/generator/network-generator.c
 b/src/network/generator/network-generator.c
+@@ -47,7 +47,7 @@ static const char * const 
dracut_dhcp_type_table[_DHCP_TYPE_MAX] = {
+ [DHCP_TYPE_OFF] = "off",
+ [DHCP_TYPE_ON]  = "on",
+ [DHCP_TYPE_ANY] = "any",
+-[DHCP_TYPE_DHCP]= "dhcp",
++[DHCP_TYPE_DHCP4]   = "dhcp",
+ [DHCP_TYPE_DHCP6]   = "dhcp6",
+ [DHCP_TYPE_AUTO6]   = "auto6",
+ [DHCP_TYPE_EITHER6] = "either6",
+@@ -62,7 +62,7 @@ static const char * const 
networkd_dhcp_type_table[_DHCP_TYPE_MAX] = {
+ [DHCP_TYPE_OFF] = "no",
+ [DHCP_TYPE_ON]  = "yes",
+ [DHCP_TYPE_ANY] = "yes",
+-[DHCP_TYPE_DHCP]= "ipv4",
++[DHCP_TYPE_DHCP4]   = "ipv4",
+ 

[OE-core] [PATCH] systemd: enable KeepConfiguration= when running on network filesystem

2022-02-05 Thread Pavel Zhukov
This fix boot from NFS for systemd enabled systems. Previously
systemd-networkd dropped network configuration on exit from initrd even
if there're NFS mount.

Bug-Url: https://bugzilla.yoctoproject.org/show_bug.cgi?id=14708

Signed-off-by: Pavel Zhukov 
---
 ...eepConfiguration-when-running-on-net.patch | 253 ++
 meta/recipes-core/systemd/systemd_250.3.bb|   1 +
 2 files changed, 254 insertions(+)
 create mode 100644 
meta/recipes-core/systemd/systemd/0029-network-enable-KeepConfiguration-when-running-on-net.patch

diff --git 
a/meta/recipes-core/systemd/systemd/0029-network-enable-KeepConfiguration-when-running-on-net.patch
 
b/meta/recipes-core/systemd/systemd/0029-network-enable-KeepConfiguration-when-running-on-net.patch
new file mode 100644
index 00..4943a0fe5c
--- /dev/null
+++ 
b/meta/recipes-core/systemd/systemd/0029-network-enable-KeepConfiguration-when-running-on-net.patch
@@ -0,0 +1,253 @@
+From 6f4e84126aaa4e26cb6865b054ea5ddebd3906e5 Mon Sep 17 00:00:00 2001
+From: Yu Watanabe 
+Date: Thu, 3 Feb 2022 12:14:19 +0900
+Subject: [PATCH] network: enable KeepConfiguration= when running on network
+ filesystem
+Cc: pa...@zhukoff.net
+
+Upstream-Status: Pending
+Upstream-Url: https://github.com/systemd/systemd/pull/22383/commits
+
+network-generator: rename DHCP_TYPE_DHCP -> DHCP_TYPE_DHCP4
+
+To emphasize this is DHCPv4. No behavior is changed.
+
+stat-util: introduce path_is_network_fs()
+
+network: enable KeepConfiguration= when running on network filesystem
+
+Also, set KeepConfiguration=dhcp-on-stop by default when running in
+initrd.
+
+Fixes #21967.
+---
+ man/systemd.network.xml   |  6 +++--
+ src/basic/stat-util.c |  9 +++
+ src/basic/stat-util.h |  1 +
+ src/network/generator/network-generator.c |  4 ++--
+ src/network/generator/network-generator.h |  2 +-
+ src/network/networkd-manager.c| 29 +++
+ src/network/networkd-manager.h|  2 ++
+ src/network/networkd-network.c| 12 ++
+ src/network/test-networkd-conf.c  |  5 
+ 9 files changed, 60 insertions(+), 10 deletions(-)
+
+diff --git a/man/systemd.network.xml b/man/systemd.network.xml
+index af431e4f2c..f90cff4cd6 100644
+--- a/man/systemd.network.xml
 b/man/systemd.network.xml
+@@ -944,8 +944,10 @@ Table=1234
+   lease expires. This is contrary to the DHCP specification, but may 
be the best choice if,
+   e.g., the root filesystem relies on this connection. The setting 
dhcp
+   implies dhcp-on-stop, and yes 
implies
+-  dhcp and static. Defaults to 
no.
+-  
++  dhcp and static. Defaults to
++  dhcp-on-stop when 
systemd-networkd is running in
++  initrd, yes when the root filesystem is a 
network filesystem, and
++  no otherwise.
+ 
+   
+ 
+diff --git a/src/basic/stat-util.c b/src/basic/stat-util.c
+index efac7b002e..c2269844f8 100644
+--- a/src/basic/stat-util.c
 b/src/basic/stat-util.c
+@@ -249,6 +249,15 @@ int path_is_temporary_fs(const char *path) {
+ return is_temporary_fs();
+ }
+ 
++int path_is_network_fs(const char *path) {
++struct statfs s;
++
++if (statfs(path, ) < 0)
++return -errno;
++
++return is_network_fs();
++}
++
+ int stat_verify_regular(const struct stat *st) {
+ assert(st);
+ 
+diff --git a/src/basic/stat-util.h b/src/basic/stat-util.h
+index a566114f7c..f7d2f12aa9 100644
+--- a/src/basic/stat-util.h
 b/src/basic/stat-util.h
+@@ -53,6 +53,7 @@ int fd_is_temporary_fs(int fd);
+ int fd_is_network_fs(int fd);
+ 
+ int path_is_temporary_fs(const char *path);
++int path_is_network_fs(const char *path);
+ 
+ /* Because statfs.t_type can be int on some architectures, we have to cast
+  * the const magic to the type, otherwise the compiler warns about
+diff --git a/src/network/generator/network-generator.c 
b/src/network/generator/network-generator.c
+index c081ec673c..063ad08d80 100644
+--- a/src/network/generator/network-generator.c
 b/src/network/generator/network-generator.c
+@@ -47,7 +47,7 @@ static const char * const 
dracut_dhcp_type_table[_DHCP_TYPE_MAX] = {
+ [DHCP_TYPE_OFF] = "off",
+ [DHCP_TYPE_ON]  = "on",
+ [DHCP_TYPE_ANY] = "any",
+-[DHCP_TYPE_DHCP]= "dhcp",
++[DHCP_TYPE_DHCP4]   = "dhcp",
+ [DHCP_TYPE_DHCP6]   = "dhcp6",
+ [DHCP_TYPE_AUTO6]   = "auto6",
+ [DHCP_TYPE_EITHER6] = "either6",
+@@ -62,7 +62,7 @@ static const char * const 
networkd_dhcp_type_table[_DHCP_TYPE_MAX] = {
+ [DHCP_TYPE_OFF] = "no",
+ [DHCP_TYPE_ON]  = "yes",
+ [DHCP_TYPE_ANY] = "yes",
+-[DHCP_TYPE_DHCP]= "ipv4",
++[DHCP_TYPE_DHCP4]   = "ipv4",
+ 

[OE-core] [PATCH] systemd: allow to create directory whose path contains symlink

2022-02-02 Thread Pavel Zhukov
Systemd version 250 has a regression which blocks mountd service from
creating subdirectories if path contains symlink. This blocks bind
mounts under /var/run, /lib for example.

Bug-Url: https://github.com/systemd/systemd/issues/22334

Signed-off-by: Pavel Zhukov 
---
 ...reate-directory-whose-path-contains-.patch | 130 ++
 meta/recipes-core/systemd/systemd_250.3.bb|   1 +
 2 files changed, 131 insertions(+)
 create mode 100644 
meta/recipes-core/systemd/systemd/0001-mkdir-allow-to-create-directory-whose-path-contains-.patch

diff --git 
a/meta/recipes-core/systemd/systemd/0001-mkdir-allow-to-create-directory-whose-path-contains-.patch
 
b/meta/recipes-core/systemd/systemd/0001-mkdir-allow-to-create-directory-whose-path-contains-.patch
new file mode 100644
index 00..003db430b7
--- /dev/null
+++ 
b/meta/recipes-core/systemd/systemd/0001-mkdir-allow-to-create-directory-whose-path-contains-.patch
@@ -0,0 +1,130 @@
+From b060c53503339c45808efeb4294a03105a2999a5 Mon Sep 17 00:00:00 2001
+From: Yu Watanabe 
+Date: Wed, 2 Feb 2022 14:05:45 +0900
+Subject: [PATCH] mkdir: allow to create directory whose path contains symlink
+Cc: pa...@zhukoff.net
+
+Upstream-Status: Backport
+Upstream-Url: https://github.com/systemd/systemd/pull/22359
+
+Signed-off-by: Pavel Zhukov 
+
+
+core/mount: fail early if directory cannot be created
+
+Prompted by #22334.
+
+mkdir: CHASE_NONEXISTENT cannot used in chase_symlinks_and_stat()
+
+mkdir: allow to create directory whose path contains symlink
+
+Fixes a regression caused by 3008a6f21c1c42efe852d69798a2fdd63fe657ec.
+
+Before the commit, when `mkdir_parents_internal()` is called from `mkdir_p()`,
+it uses `_mkdir()` as `flag` is zero. But after the commit, 
`mkdir_safe_internal()`
+is always used. Hence, if the path contains a symlink, it fails with -ENOTDIR.
+
+To fix the issue, this makes `mkdir_p()` calls `mkdir_parents_internal()` with
+MKDIR_FOLLOW_SYMLINK flag.
+
+Fixes #22334.
+
+test: add a test for mkdir_p()
+---
+ src/basic/mkdir.c |  4 ++--
+ src/core/mount.c  |  4 +++-
+ src/test/meson.build  |  2 ++
+ src/test/test-mkdir.c | 30 ++
+ 4 files changed, 37 insertions(+), 3 deletions(-)
+ create mode 100644 src/test/test-mkdir.c
+
+diff --git a/src/basic/mkdir.c b/src/basic/mkdir.c
+index 6e2b94d024..51a0d74e87 100644
+--- a/src/basic/mkdir.c
 b/src/basic/mkdir.c
+@@ -42,7 +42,7 @@ int mkdir_safe_internal(
+ if ((flags & MKDIR_FOLLOW_SYMLINK) && S_ISLNK(st.st_mode)) {
+ _cleanup_free_ char *p = NULL;
+ 
+-r = chase_symlinks_and_stat(path, NULL, CHASE_NONEXISTENT, 
, , NULL);
++r = chase_symlinks_and_stat(path, NULL, 0, , , NULL);
+ if (r < 0)
+ return r;
+ if (r == 0)
+@@ -162,7 +162,7 @@ int mkdir_p_internal(const char *prefix, const char *path, 
mode_t mode, uid_t ui
+ 
+ assert(_mkdirat != mkdirat);
+ 
+-r = mkdir_parents_internal(prefix, path, mode, uid, gid, flags, 
_mkdirat);
++r = mkdir_parents_internal(prefix, path, mode, uid, gid, flags | 
MKDIR_FOLLOW_SYMLINK, _mkdirat);
+ if (r < 0)
+ return r;
+ 
+diff --git a/src/core/mount.c b/src/core/mount.c
+index 0170406351..c650b5abe2 100644
+--- a/src/core/mount.c
 b/src/core/mount.c
+@@ -1027,8 +1027,10 @@ static void mount_enter_mounting(Mount *m) {
+ r = mkdir_p_label(p->what, m->directory_mode);
+ /* mkdir_p_label() can return -EEXIST if the target path 
exists and is not a directory - which is
+  * totally OK, in case the user wants us to overmount a 
non-directory inode. */
+-if (r < 0 && r != -EEXIST)
++if (r < 0 && r != -EEXIST) {
+ log_unit_error_errno(UNIT(m), r, "Failed to make bind 
mount source '%s': %m", p->what);
++goto fail;
++}
+ }
+ 
+ if (p) {
+diff --git a/src/test/meson.build b/src/test/meson.build
+index 9a1c481f22..7aa1d9c6ea 100644
+--- a/src/test/meson.build
 b/src/test/meson.build
+@@ -193,6 +193,8 @@ tests += [
+ 
+ [['src/test/test-macro.c']],
+ 
++[['src/test/test-mkdir.c']],
++
+ [['src/test/test-json.c']],
+ 
+ [['src/test/test-modhex.c']],
+diff --git a/src/test/test-mkdir.c b/src/test/test-mkdir.c
+new file mode 100644
+index 00..c715d5f096
+--- /dev/null
 b/src/test/test-mkdir.c
+@@ -0,0 +1,30 @@
++/* SPDX-License-Identifier: LGPL-2.1-or-later */
++
++#include 
++
++#include "mkdir.h"
++#include "path-util.h"
++#include "rm-rf.h"
++#include "tests.h"
++#include "tmpfile-util.h"
++
++TEST(mkdir_p) {
++_cleanup_(rm_rf_physical_and_freep) char *tmp = NULL;
++_cleanup_free_ char *p = NULL;
++
++assert_se(mkdtemp_malloc("

[OE-core][PATCH v5] patch.py: Initialize git repo before patching

2021-12-01 Thread Pavel Zhukov
From: Pavel Zhukov 

If PATCHTOOL="git" has been specified but workdir is not git repo
bitbake fails to apply the patches with error message:
Command Error: 'git rev-parse --show-toplevel' exited with 0  Output:
fatal: not a git repository (or any of the parent directories): .git

Fix this by initializing the repo before patching.
This allows binary git patches to be applied.

Signed-off-by: Pavel Zhukov 
---
 meta/lib/oe/patch.py| 16 +++-
 meta/lib/oeqa/selftest/cases/bbtests.py | 15 +++
 2 files changed, 30 insertions(+), 1 deletion(-)

diff --git a/meta/lib/oe/patch.py b/meta/lib/oe/patch.py
index fccbedb519..950fe723dc 100644
--- a/meta/lib/oe/patch.py
+++ b/meta/lib/oe/patch.py
@@ -4,6 +4,7 @@
 
 import oe.path
 import oe.types
+import subprocess
 
 class NotFoundError(bb.BBHandledException):
 def __init__(self, path):
@@ -25,7 +26,6 @@ class CmdError(bb.BBHandledException):
 
 def runcmd(args, dir = None):
 import pipes
-import subprocess
 
 if dir:
 olddir = os.path.abspath(os.curdir)
@@ -56,6 +56,7 @@ def runcmd(args, dir = None):
 if dir:
 os.chdir(olddir)
 
+
 class PatchError(Exception):
 def __init__(self, msg):
 self.msg = msg
@@ -298,6 +299,19 @@ class GitApplyTree(PatchTree):
 PatchTree.__init__(self, dir, d)
 self.commituser = d.getVar('PATCH_GIT_USER_NAME')
 self.commitemail = d.getVar('PATCH_GIT_USER_EMAIL')
+if not self._isInitialized():
+self._initRepo()
+
+def _isInitialized(self):
+cmd = "git rev-parse --show-toplevel"
+(status, output) = subprocess.getstatusoutput(cmd.split())
+## Make sure repo is in builddir to not break top-level git repos
+return status == 0 and os.path.samedir(output, self.dir)
+
+def _initRepo(self):
+runcmd("git init".split(), self.dir)
+runcmd("git add .".split(), self.dir)
+runcmd("git commit -a --allow-empty -m Patching_started".split(), 
self.dir)
 
 @staticmethod
 def extractPatchHeader(patchfile):
diff --git a/meta/lib/oeqa/selftest/cases/bbtests.py 
b/meta/lib/oeqa/selftest/cases/bbtests.py
index 6779e62103..a74576bc02 100644
--- a/meta/lib/oeqa/selftest/cases/bbtests.py
+++ b/meta/lib/oeqa/selftest/cases/bbtests.py
@@ -297,3 +297,18 @@ INHERIT:remove = \"report-error\"
 
 test_recipe_summary_after = get_bb_var('SUMMARY', test_recipe)
 self.assertEqual(expected_recipe_summary, test_recipe_summary_after)
+
+def test_git_patchtool(self):
+""" PATCHTOOL=git should work with non-git sources like tarballs
+test recipe for the test must NOT containt git:// repository in 
SRC_URI
+"""
+test_recipe = "man-db"
+self.write_recipeinc(test_recipe, 'PATCHTOOL=\"git\"')
+src = get_bb_var("SRC_URI",test_recipe)
+gitscm = re.search("git://", src)
+self.assertFalse(gitscm, "test_git_patchtool pre-condition failed: {} 
test recipe contains git repo!".format(test_recipe))
+result = bitbake('man-db -c patch', ignore_status=False)
+fatal = re.search("fatal: not a git repository (or any of the parent 
directories)", result.output)
+self.assertFalse(fatal, "Failed to patch using PATCHTOOL=\"git\"")
+self.delete_recipeinc(test_recipe)
+bitbake('-cclean man-db')
-- 
2.34.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#159075): 
https://lists.openembedded.org/g/openembedded-core/message/159075
Mute This Topic: https://lists.openembedded.org/mt/87448498/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] [meta-oe][PATCH v2] patch.py: Initialize git repo before patching

2021-12-01 Thread Pavel Zhukov
Thanks. Done in v4. -- Pavel   01.12.2021, 17:08, "Alexander Kanavin" :Thanks :) You can add the failure into the commit message. Alex On Wed, 1 Dec 2021 at 17:00, Pavel Zhukov <pa...@zhukoff.net> wrote:without change in patch.py:ERROR: man-db-2.9.0-r1 do_patch: Applying patch 'man_db.conf-avoid-multilib-install-file-conflict.patch' on target directory '/mnt/builds/oniroproject/builds/build-oniro-linux-st/tmp/work/core2-64-oniro-linux-musl/man-db/2.9.0-r1/man-db-2.9.0'Command Error: 'git rev-parse --show-toplevel' exited with 0  Output:fatal: not a git repository (or any of the parent directories): .gitERROR: Logfile of failure stored in: /mnt/builds/oniroproject/builds/build-oniro-linux-st/tmp/work/core2-64-oniro-linux-musl/man-db/2.9.0-r1/temp/log.do_patch.21491NOTE: recipe man-db-2.9.0-r1: task do_patch: FailedERROR: Task (/mnt/builds/oniroproject/sources/oe-core/meta/recipes-extended/man-db/man-db_2.9.0.bb:do_patch) failed with exit code '1'NOTE: Tasks Summary: Attempted 102 tasks of which 0 didn't need to be rerun and 1 failed. Summary: 1 task failed:  /mnt/builds/oniroproject/sources/oe-core/meta/recipes-extended/man-db/man-db_2.9.0.bb:do_patchSummary: There was 1 ERROR message shown, returning a non-zero exit code.--2021-12-01 15:11:56,184 - oe-selftest - INFO - Ran 1 test in 147.083s2021-12-01 15:11:56,184 - oe-selftest - INFO - FAILED2021-12-01 15:11:56,184 - oe-selftest - INFO -  (failures=1)2021-12-01 15:11:58,721 - oe-selftest - INFO - RESULTS:2021-12-01 15:11:58,722 - oe-selftest - INFO - RESULTS - bbtests.BitbakeTests.test_git_patchtool: FAILED (145.51s)2021-12-01 15:11:58,724 - oe-selftest - INFO - SUMMARY:2021-12-01 15:11:58,724 - oe-selftest - INFO - oe-selftest () - Ran 1 test in 147.084s2021-12-01 15:11:58,724 - oe-selftest - INFO - oe-selftest - FAIL - Required tests failed (successes=0, skipped=0, failures=1, errors=0)  with change in patch.py:2021-12-01 15:12:20,910 - oe-selftest - INFO - Adding: "include selftest.inc" in /mnt/builds/oniroproject/builds/build-oniro-linux-st/conf/local.conf2021-12-01 15:12:20,911 - oe-selftest - INFO - Adding: "include bblayers.inc" in bblayers.conf2021-12-01 15:12:20,911 - oe-selftest - INFO - test_git_patchtool (bbtests.BitbakeTests)2021-12-01 15:15:30,540 - oe-selftest - INFO -  ... ok2021-12-01 15:15:31,717 - oe-selftest - INFO - --2021-12-01 15:15:31,717 - oe-selftest - INFO - Ran 1 test in 192.371s2021-12-01 15:15:31,717 - oe-selftest - INFO - OK2021-12-01 15:15:34,523 - oe-selftest - INFO - RESULTS:2021-12-01 15:15:34,524 - oe-selftest - INFO - RESULTS - bbtests.BitbakeTests.test_git_patchtool: PASSED (189.63s)2021-12-01 15:15:34,526 - oe-selftest - INFO - SUMMARY:2021-12-01 15:15:34,526 - oe-selftest - INFO - oe-selftest () - Ran 1 test in 192.372s2021-12-01 15:15:34,526 - oe-selftest - INFO - oe-selftest - OK - All required tests passed (successes=1, skipped=0, failures=0, errors=0)  -- Pavel   01.12.2021, 16:56, "Alexander Kanavin" <alex.kana...@gmail.com>:Does the test fail without the change in lib/oepatch.py? Can you show how? Alex On Wed, 1 Dec 2021 at 15:17, Pavel Zhukov <pa...@zhukoff.net> wrote:From: Pavel Zhukov <pavel.zhu...@huawei.com>If PATCHTOOL="git" has been specified but workdir is not git repobitbake fails to apply the patches. Fix this by initializing the repobefore patching.This allows binary git patches to be applied.Signed-off-by: Pavel Zhukov <pavel.zhu...@huawei.com>--- meta/lib/oe/patch.py                    | 17 + meta/lib/oeqa/selftest/cases/bbtests.py |  6 ++ 2 files changed, 23 insertions(+)diff --git a/meta/lib/oe/patch.py b/meta/lib/oe/patch.pyindex 7cd8436da5..720c6f663c 100644--- a/meta/lib/oe/patch.py+++ b/meta/lib/oe/patch.py@@ -52,6 +52,10 @@ def runcmd(args, dir = None):         if dir:             os.chdir(olddir)+def getstatusoutput(cmd):+    import subprocess+    return subprocess.getstatusoutput(cmd.split())+ class PatchError(Exception):     def __init__(self, msg):         self.msg = msg@@ -294,6 +298,19 @@ class GitApplyTree(PatchTree):         PatchTree.__init__(self, dir, d)         self.commituser = d.getVar('PATCH_GIT_USER_NAME')         self.commitemail = d.getVar('PATCH_GIT_USER_EMAIL')+        if not self._isInitialized():+            self._initRepo()++    def _isInitialized(self):+        cmd = "git rev-parse --show-toplevel"+        (status, output) = getstatusoutput(cmd)+        ## Make sure we're in builddir to not break top-level git repos+        return status == 0 and os.path.samedir(output, self.dir)++    def _initRepo(self):+        runcmd("git init".split(), self.dir)+        runcmd("git add .".split(), self.dir)+        runcmd("git commit -a --allow-empty -m Patching_started".split(), self.dir)     @staticme

[OE-core][PATCH v4] patch.py: Initialize git repo before patching

2021-12-01 Thread Pavel Zhukov
From: Pavel Zhukov 

If PATCHTOOL="git" has been specified but workdir is not git repo
bitbake fails to apply the patches with error message:
Command Error: 'git rev-parse --show-toplevel' exited with 0  Output:
fatal: not a git repository (or any of the parent directories): .git

Fix this by initializing the repo before patching.
This allows binary git patches to be applied.

Signed-off-by: Pavel Zhukov 
---
 meta/lib/oe/patch.py| 17 +
 meta/lib/oeqa/selftest/cases/bbtests.py |  6 ++
 2 files changed, 23 insertions(+)

diff --git a/meta/lib/oe/patch.py b/meta/lib/oe/patch.py
index fccbedb519..8326cb55bc 100644
--- a/meta/lib/oe/patch.py
+++ b/meta/lib/oe/patch.py
@@ -56,6 +56,10 @@ def runcmd(args, dir = None):
 if dir:
 os.chdir(olddir)
 
+def getstatusoutput(cmd):
+import subprocess
+return subprocess.getstatusoutput(cmd.split())
+
 class PatchError(Exception):
 def __init__(self, msg):
 self.msg = msg
@@ -298,6 +302,19 @@ class GitApplyTree(PatchTree):
 PatchTree.__init__(self, dir, d)
 self.commituser = d.getVar('PATCH_GIT_USER_NAME')
 self.commitemail = d.getVar('PATCH_GIT_USER_EMAIL')
+if not self._isInitialized():
+self._initRepo()
+
+def _isInitialized(self):
+cmd = "git rev-parse --show-toplevel"
+(status, output) = getstatusoutput(cmd)
+## Make sure we're in builddir to not break top-level git repos
+return status == 0 and os.path.samedir(output, self.dir)
+
+def _initRepo(self):
+runcmd("git init".split(), self.dir)
+runcmd("git add .".split(), self.dir)
+runcmd("git commit -a --allow-empty -m Patching_started".split(), 
self.dir)
 
 @staticmethod
 def extractPatchHeader(patchfile):
diff --git a/meta/lib/oeqa/selftest/cases/bbtests.py 
b/meta/lib/oeqa/selftest/cases/bbtests.py
index 6779e62103..2c3defc6b7 100644
--- a/meta/lib/oeqa/selftest/cases/bbtests.py
+++ b/meta/lib/oeqa/selftest/cases/bbtests.py
@@ -297,3 +297,9 @@ INHERIT:remove = \"report-error\"
 
 test_recipe_summary_after = get_bb_var('SUMMARY', test_recipe)
 self.assertEqual(expected_recipe_summary, test_recipe_summary_after)
+
+def test_git_patchtool(self):
+self.write_recipeinc('man-db', 'PATCHTOOL=\"git\"')
+result = bitbake('man-db -c patch', ignore_status=False)
+self.delete_recipeinc('man-db')
+bitbake('-cclean man-db')
-- 
2.34.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#159042): 
https://lists.openembedded.org/g/openembedded-core/message/159042
Mute This Topic: https://lists.openembedded.org/mt/87431724/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] [meta-oe][PATCH v2] patch.py: Initialize git repo before patching

2021-12-01 Thread Pavel Zhukov
without change in patch.py:ERROR: man-db-2.9.0-r1 do_patch: Applying patch 'man_db.conf-avoid-multilib-install-file-conflict.patch' on target directory '/mnt/builds/oniroproject/builds/build-oniro-linux-st/tmp/work/core2-64-oniro-linux-musl/man-db/2.9.0-r1/man-db-2.9.0'Command Error: 'git rev-parse --show-toplevel' exited with 0  Output:fatal: not a git repository (or any of the parent directories): .gitERROR: Logfile of failure stored in: /mnt/builds/oniroproject/builds/build-oniro-linux-st/tmp/work/core2-64-oniro-linux-musl/man-db/2.9.0-r1/temp/log.do_patch.21491NOTE: recipe man-db-2.9.0-r1: task do_patch: FailedERROR: Task (/mnt/builds/oniroproject/sources/oe-core/meta/recipes-extended/man-db/man-db_2.9.0.bb:do_patch) failed with exit code '1'NOTE: Tasks Summary: Attempted 102 tasks of which 0 didn't need to be rerun and 1 failed. Summary: 1 task failed:  /mnt/builds/oniroproject/sources/oe-core/meta/recipes-extended/man-db/man-db_2.9.0.bb:do_patchSummary: There was 1 ERROR message shown, returning a non-zero exit code.--2021-12-01 15:11:56,184 - oe-selftest - INFO - Ran 1 test in 147.083s2021-12-01 15:11:56,184 - oe-selftest - INFO - FAILED2021-12-01 15:11:56,184 - oe-selftest - INFO -  (failures=1)2021-12-01 15:11:58,721 - oe-selftest - INFO - RESULTS:2021-12-01 15:11:58,722 - oe-selftest - INFO - RESULTS - bbtests.BitbakeTests.test_git_patchtool: FAILED (145.51s)2021-12-01 15:11:58,724 - oe-selftest - INFO - SUMMARY:2021-12-01 15:11:58,724 - oe-selftest - INFO - oe-selftest () - Ran 1 test in 147.084s2021-12-01 15:11:58,724 - oe-selftest - INFO - oe-selftest - FAIL - Required tests failed (successes=0, skipped=0, failures=1, errors=0)  with change in patch.py:2021-12-01 15:12:20,910 - oe-selftest - INFO - Adding: "include selftest.inc" in /mnt/builds/oniroproject/builds/build-oniro-linux-st/conf/local.conf2021-12-01 15:12:20,911 - oe-selftest - INFO - Adding: "include bblayers.inc" in bblayers.conf2021-12-01 15:12:20,911 - oe-selftest - INFO - test_git_patchtool (bbtests.BitbakeTests)2021-12-01 15:15:30,540 - oe-selftest - INFO -  ... ok2021-12-01 15:15:31,717 - oe-selftest - INFO - --2021-12-01 15:15:31,717 - oe-selftest - INFO - Ran 1 test in 192.371s2021-12-01 15:15:31,717 - oe-selftest - INFO - OK2021-12-01 15:15:34,523 - oe-selftest - INFO - RESULTS:2021-12-01 15:15:34,524 - oe-selftest - INFO - RESULTS - bbtests.BitbakeTests.test_git_patchtool: PASSED (189.63s)2021-12-01 15:15:34,526 - oe-selftest - INFO - SUMMARY:2021-12-01 15:15:34,526 - oe-selftest - INFO - oe-selftest () - Ran 1 test in 192.372s2021-12-01 15:15:34,526 - oe-selftest - INFO - oe-selftest - OK - All required tests passed (successes=1, skipped=0, failures=0, errors=0)  -- Pavel   01.12.2021, 16:56, "Alexander Kanavin" :Does the test fail without the change in lib/oepatch.py? Can you show how? Alex On Wed, 1 Dec 2021 at 15:17, Pavel Zhukov <pa...@zhukoff.net> wrote:From: Pavel Zhukov <pavel.zhu...@huawei.com>If PATCHTOOL="git" has been specified but workdir is not git repobitbake fails to apply the patches. Fix this by initializing the repobefore patching.This allows binary git patches to be applied.Signed-off-by: Pavel Zhukov <pavel.zhu...@huawei.com>--- meta/lib/oe/patch.py                    | 17 + meta/lib/oeqa/selftest/cases/bbtests.py |  6 ++ 2 files changed, 23 insertions(+)diff --git a/meta/lib/oe/patch.py b/meta/lib/oe/patch.pyindex 7cd8436da5..720c6f663c 100644--- a/meta/lib/oe/patch.py+++ b/meta/lib/oe/patch.py@@ -52,6 +52,10 @@ def runcmd(args, dir = None):         if dir:             os.chdir(olddir)+def getstatusoutput(cmd):+    import subprocess+    return subprocess.getstatusoutput(cmd.split())+ class PatchError(Exception):     def __init__(self, msg):         self.msg = msg@@ -294,6 +298,19 @@ class GitApplyTree(PatchTree):         PatchTree.__init__(self, dir, d)         self.commituser = d.getVar('PATCH_GIT_USER_NAME')         self.commitemail = d.getVar('PATCH_GIT_USER_EMAIL')+        if not self._isInitialized():+            self._initRepo()++    def _isInitialized(self):+        cmd = "git rev-parse --show-toplevel"+        (status, output) = getstatusoutput(cmd)+        ## Make sure we're in builddir to not break top-level git repos+        return status == 0 and os.path.samedir(output, self.dir)++    def _initRepo(self):+        runcmd("git init".split(), self.dir)+        runcmd("git add .".split(), self.dir)+        runcmd("git commit -a --allow-empty -m Patching_started".split(), self.dir)     @staticmethod     def extractPatchHeader(patchfile):diff --git a/meta/lib/oeqa/selftest/cases/bbtests.py b/meta/lib/oeqa/selftest/cases/bbtests.pyindex d4f6a08991..8c046074f6 100644--- a/meta/lib/oeqa/selftest/cases/bbtests.py+++ b/meta/lib/oeqa/selftest/cases

[OE-core][PATCH v3] patch.py: Initialize git repo before patching

2021-12-01 Thread Pavel Zhukov
From: Pavel Zhukov 

If PATCHTOOL="git" has been specified but workdir is not git repo
bitbake fails to apply the patches. Fix this by initializing the repo
before patching.
This allows binary git patches to be applied.

Signed-off-by: Pavel Zhukov 
---
 meta/lib/oe/patch.py| 17 +
 meta/lib/oeqa/selftest/cases/bbtests.py |  6 ++
 2 files changed, 23 insertions(+)

diff --git a/meta/lib/oe/patch.py b/meta/lib/oe/patch.py
index fccbedb519..8326cb55bc 100644
--- a/meta/lib/oe/patch.py
+++ b/meta/lib/oe/patch.py
@@ -56,6 +56,10 @@ def runcmd(args, dir = None):
 if dir:
 os.chdir(olddir)
 
+def getstatusoutput(cmd):
+import subprocess
+return subprocess.getstatusoutput(cmd.split())
+
 class PatchError(Exception):
 def __init__(self, msg):
 self.msg = msg
@@ -298,6 +302,19 @@ class GitApplyTree(PatchTree):
 PatchTree.__init__(self, dir, d)
 self.commituser = d.getVar('PATCH_GIT_USER_NAME')
 self.commitemail = d.getVar('PATCH_GIT_USER_EMAIL')
+if not self._isInitialized():
+self._initRepo()
+
+def _isInitialized(self):
+cmd = "git rev-parse --show-toplevel"
+(status, output) = getstatusoutput(cmd)
+## Make sure we're in builddir to not break top-level git repos
+return status == 0 and os.path.samedir(output, self.dir)
+
+def _initRepo(self):
+runcmd("git init".split(), self.dir)
+runcmd("git add .".split(), self.dir)
+runcmd("git commit -a --allow-empty -m Patching_started".split(), 
self.dir)
 
 @staticmethod
 def extractPatchHeader(patchfile):
diff --git a/meta/lib/oeqa/selftest/cases/bbtests.py 
b/meta/lib/oeqa/selftest/cases/bbtests.py
index 6779e62103..2c3defc6b7 100644
--- a/meta/lib/oeqa/selftest/cases/bbtests.py
+++ b/meta/lib/oeqa/selftest/cases/bbtests.py
@@ -297,3 +297,9 @@ INHERIT:remove = \"report-error\"
 
 test_recipe_summary_after = get_bb_var('SUMMARY', test_recipe)
 self.assertEqual(expected_recipe_summary, test_recipe_summary_after)
+
+def test_git_patchtool(self):
+self.write_recipeinc('man-db', 'PATCHTOOL=\"git\"')
+result = bitbake('man-db -c patch', ignore_status=False)
+self.delete_recipeinc('man-db')
+bitbake('-cclean man-db')
-- 
2.34.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#159037): 
https://lists.openembedded.org/g/openembedded-core/message/159037
Mute This Topic: https://lists.openembedded.org/mt/87431239/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] patch.py: Initialize git repo before patching

2021-12-01 Thread Pavel Zhukov
Hi Konrad,Test (very simple one) has been added (see v2). I'm not familiar with testsuite so please excuse me if I put it into wrong place. Also I'm not sure if it's ok to keep test more general (catch all errors like I did) or I have to check for specific error message. -- Pavel   01.12.2021, 14:25, "Konrad Weihmann" :Could you please add a test case for that to the testing suite, as I'mhaving issues to understand under what circumstances we are getting intosuch kind of situationOn 01.12.21 14:19, Pavel Zhukov wrote: From: Pavel Zhukov <pavel.zhu...@huawei.com>  If PATCHTOOL="git" has been specified but workdir is not git repo bitbake fails to apply the patches. Fix this by initializing the repo before patching. This allows binary git patches to be applied.  Signed-off-by: Pavel Zhukov <pavel.zhu...@huawei.com> ---   meta/lib/oe/patch.py | 17 +   1 file changed, 17 insertions(+)  diff --git a/meta/lib/oe/patch.py b/meta/lib/oe/patch.py index fccbedb519..8326cb55bc 100644 --- a/meta/lib/oe/patch.py +++ b/meta/lib/oe/patch.py @@ -56,6 +56,10 @@ def runcmd(args, dir = None):   if dir:   os.chdir(olddir)+def getstatusoutput(cmd): + import subprocess + return subprocess.getstatusoutput(cmd.split()) +   class PatchError(Exception):   def __init__(self, msg):   self.msg = msg @@ -298,6 +302,19 @@ class GitApplyTree(PatchTree):   PatchTree.__init__(self, dir, d)   self.commituser = d.getVar('PATCH_GIT_USER_NAME')   self.commitemail = d.getVar('PATCH_GIT_USER_EMAIL') + if not self._isInitialized(): + self._initRepo() + + def _isInitialized(self): + cmd = "git rev-parse --show-toplevel" + (status, output) = getstatusoutput(cmd) + ## Make sure we're in builddir to not break top-level git repos + return status == 0 and os.path.samedir(output, self.dir) + + def _initRepo(self): + runcmd("git init".split(), self.dir) + runcmd("git add .".split(), self.dir) + runcmd("git commit -a --allow-empty -m Patching_started".split(), self.dir)  @staticmethod   def extractPatchHeader(patchfile): 
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#159032): 
https://lists.openembedded.org/g/openembedded-core/message/159032
Mute This Topic: https://lists.openembedded.org/mt/87426820/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [meta-oe][PATCH v2] patch.py: Initialize git repo before patching

2021-12-01 Thread Pavel Zhukov
From: Pavel Zhukov 

If PATCHTOOL="git" has been specified but workdir is not git repo
bitbake fails to apply the patches. Fix this by initializing the repo
before patching.
This allows binary git patches to be applied.

Signed-off-by: Pavel Zhukov 
---
 meta/lib/oe/patch.py| 17 +
 meta/lib/oeqa/selftest/cases/bbtests.py |  6 ++
 2 files changed, 23 insertions(+)

diff --git a/meta/lib/oe/patch.py b/meta/lib/oe/patch.py
index 7cd8436da5..720c6f663c 100644
--- a/meta/lib/oe/patch.py
+++ b/meta/lib/oe/patch.py
@@ -52,6 +52,10 @@ def runcmd(args, dir = None):
 if dir:
 os.chdir(olddir)
 
+def getstatusoutput(cmd):
+import subprocess
+return subprocess.getstatusoutput(cmd.split())
+
 class PatchError(Exception):
 def __init__(self, msg):
 self.msg = msg
@@ -294,6 +298,19 @@ class GitApplyTree(PatchTree):
 PatchTree.__init__(self, dir, d)
 self.commituser = d.getVar('PATCH_GIT_USER_NAME')
 self.commitemail = d.getVar('PATCH_GIT_USER_EMAIL')
+if not self._isInitialized():
+self._initRepo()
+
+def _isInitialized(self):
+cmd = "git rev-parse --show-toplevel"
+(status, output) = getstatusoutput(cmd)
+## Make sure we're in builddir to not break top-level git repos
+return status == 0 and os.path.samedir(output, self.dir)
+
+def _initRepo(self):
+runcmd("git init".split(), self.dir)
+runcmd("git add .".split(), self.dir)
+runcmd("git commit -a --allow-empty -m Patching_started".split(), 
self.dir)
 
 @staticmethod
 def extractPatchHeader(patchfile):
diff --git a/meta/lib/oeqa/selftest/cases/bbtests.py 
b/meta/lib/oeqa/selftest/cases/bbtests.py
index d4f6a08991..8c046074f6 100644
--- a/meta/lib/oeqa/selftest/cases/bbtests.py
+++ b/meta/lib/oeqa/selftest/cases/bbtests.py
@@ -294,3 +294,9 @@ INHERIT_remove = \"report-error\"
 
 test_recipe_summary_after = get_bb_var('SUMMARY', test_recipe)
 self.assertEqual(expected_recipe_summary, test_recipe_summary_after)
+
+def test_git_patchtool(self):
+self.write_recipeinc('man-db', 'PATCHTOOL=\"git\"')
+result = bitbake('man-db -c patch', ignore_status=False)
+self.delete_recipeinc('man-db')
+bitbake('-cclean man-db')
-- 
2.34.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#159031): 
https://lists.openembedded.org/g/openembedded-core/message/159031
Mute This Topic: https://lists.openembedded.org/mt/87428914/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] patch.py: Initialize git repo before patching

2021-12-01 Thread Pavel Zhukov
From: Pavel Zhukov 

If PATCHTOOL="git" has been specified but workdir is not git repo
bitbake fails to apply the patches. Fix this by initializing the repo
before patching.
This allows binary git patches to be applied.

Signed-off-by: Pavel Zhukov 
---
 meta/lib/oe/patch.py | 17 +
 1 file changed, 17 insertions(+)

diff --git a/meta/lib/oe/patch.py b/meta/lib/oe/patch.py
index fccbedb519..8326cb55bc 100644
--- a/meta/lib/oe/patch.py
+++ b/meta/lib/oe/patch.py
@@ -56,6 +56,10 @@ def runcmd(args, dir = None):
 if dir:
 os.chdir(olddir)
 
+def getstatusoutput(cmd):
+import subprocess
+return subprocess.getstatusoutput(cmd.split())
+
 class PatchError(Exception):
 def __init__(self, msg):
 self.msg = msg
@@ -298,6 +302,19 @@ class GitApplyTree(PatchTree):
 PatchTree.__init__(self, dir, d)
 self.commituser = d.getVar('PATCH_GIT_USER_NAME')
 self.commitemail = d.getVar('PATCH_GIT_USER_EMAIL')
+if not self._isInitialized():
+self._initRepo()
+
+def _isInitialized(self):
+cmd = "git rev-parse --show-toplevel"
+(status, output) = getstatusoutput(cmd)
+## Make sure we're in builddir to not break top-level git repos
+return status == 0 and os.path.samedir(output, self.dir)
+
+def _initRepo(self):
+runcmd("git init".split(), self.dir)
+runcmd("git add .".split(), self.dir)
+runcmd("git commit -a --allow-empty -m Patching_started".split(), 
self.dir)
 
 @staticmethod
 def extractPatchHeader(patchfile):
-- 
2.34.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#159029): 
https://lists.openembedded.org/g/openembedded-core/message/159029
Mute This Topic: https://lists.openembedded.org/mt/87426820/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 2/2] busybox: Fix for CVE-2021-42376

2021-12-01 Thread Pavel Zhukov
From: Pavel Zhukov 

A NULL pointer dereference in Busybox's hush applet leads to denial of service
when processing a crafted shell command, due to missing validation after
a \x03 delimiter character.
This may be used for DoS under very rare conditions of filtered command input.

Reference: https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2021-42376

Signed-off-by: Pavel Zhukov 
---
 .../busybox/busybox/CVE-2021-42376.patch  | 138 ++
 meta/recipes-core/busybox/busybox_1.31.1.bb   |   1 +
 2 files changed, 139 insertions(+)
 create mode 100644 meta/recipes-core/busybox/busybox/CVE-2021-42376.patch

diff --git a/meta/recipes-core/busybox/busybox/CVE-2021-42376.patch 
b/meta/recipes-core/busybox/busybox/CVE-2021-42376.patch
new file mode 100644
index 00..c913eaee9c
--- /dev/null
+++ b/meta/recipes-core/busybox/busybox/CVE-2021-42376.patch
@@ -0,0 +1,138 @@
+From 56a335378ac100d51c30b21eee499a2effa37fba Mon Sep 17 00:00:00 2001
+From: Denys Vlasenko 
+Date: Tue, 15 Jun 2021 16:05:57 +0200
+Subject: hush: fix handling of \^C and "^C"
+
+function old new   delta
+parse_stream22382252 +14
+encode_string243 256 +13
+--
+(add/remove: 0/0 grow/shrink: 2/0 up/down: 27/0)   Total: 27 bytes
+
+Signed-off-by: Denys Vlasenko 
+(cherry picked from commit 1b7a9b68d0e9aa19147d7fda16eb9a6b54156985)
+
+Signed-off-by: Pavel Zhukov 
+
+CVE: CVE-2021-42376
+Upstream-Status: Backport 
[https://git.busybox.net/busybox/patch/?id=56a335378ac100d51c30b21eee499a2effa37fba]
+Comment: No changes in any hunk
+---
+ shell/ash_test/ash-misc/control_char3.right   |  1 +
+ shell/ash_test/ash-misc/control_char3.tests   |  2 ++
+ shell/ash_test/ash-misc/control_char4.right   |  1 +
+ shell/ash_test/ash-misc/control_char4.tests   |  2 ++
+ shell/hush.c  | 11 +++
+ shell/hush_test/hush-misc/control_char3.right |  1 +
+ shell/hush_test/hush-misc/control_char3.tests |  2 ++
+ shell/hush_test/hush-misc/control_char4.right |  1 +
+ shell/hush_test/hush-misc/control_char4.tests |  2 ++
+ 9 files changed, 23 insertions(+)
+ create mode 100644 shell/ash_test/ash-misc/control_char3.right
+ create mode 100755 shell/ash_test/ash-misc/control_char3.tests
+ create mode 100644 shell/ash_test/ash-misc/control_char4.right
+ create mode 100755 shell/ash_test/ash-misc/control_char4.tests
+ create mode 100644 shell/hush_test/hush-misc/control_char3.right
+ create mode 100755 shell/hush_test/hush-misc/control_char3.tests
+ create mode 100644 shell/hush_test/hush-misc/control_char4.right
+ create mode 100755 shell/hush_test/hush-misc/control_char4.tests
+
+diff --git a/shell/ash_test/ash-misc/control_char3.right 
b/shell/ash_test/ash-misc/control_char3.right
+new file mode 100644
+index 0..283e02cbb
+--- /dev/null
 b/shell/ash_test/ash-misc/control_char3.right
+@@ -0,0 +1 @@
++SHELL: line 1: : not found
+diff --git a/shell/ash_test/ash-misc/control_char3.tests 
b/shell/ash_test/ash-misc/control_char3.tests
+new file mode 100755
+index 0..4359db3f3
+--- /dev/null
 b/shell/ash_test/ash-misc/control_char3.tests
+@@ -0,0 +1,2 @@
++# (set argv0 to "SHELL" to avoid "/path/to/shell: blah" in error messages)
++$THIS_SH -c '\' SHELL
+diff --git a/shell/ash_test/ash-misc/control_char4.right 
b/shell/ash_test/ash-misc/control_char4.right
+new file mode 100644
+index 0..2bf18e684
+--- /dev/null
 b/shell/ash_test/ash-misc/control_char4.right
+@@ -0,0 +1 @@
++SHELL: line 1: -: not found
+diff --git a/shell/ash_test/ash-misc/control_char4.tests 
b/shell/ash_test/ash-misc/control_char4.tests
+new file mode 100755
+index 0..48010f154
+--- /dev/null
 b/shell/ash_test/ash-misc/control_char4.tests
+@@ -0,0 +1,2 @@
++# (set argv0 to "SHELL" to avoid "/path/to/shell: blah" in error messages)
++$THIS_SH -c '"-"' SHELL
+diff --git a/shell/hush.c b/shell/hush.c
+index 9fead37da..249728b9d 100644
+--- a/shell/hush.c
 b/shell/hush.c
+@@ -5235,6 +5235,11 @@ static int encode_string(o_string *as_string,
+   }
+ #endif
+   o_addQchr(dest, ch);
++  if (ch == SPECIAL_VAR_SYMBOL) {
++  /* Convert "^C" to corresponding special variable reference */
++  o_addchr(dest, SPECIAL_VAR_QUOTED_SVS);
++  o_addchr(dest, SPECIAL_VAR_SYMBOL);
++  }
+   goto again;
+ #undef as_string
+ }
+@@ -5346,6 +5351,11 @@ static struct pipe *parse_stream(char **pstring,
+   if (ch == '\n')
+   continue; /* drop \, get next char */
+   nommu_addchr(_string, '\\');
++  if (ch == SPECIAL_VAR_SYMBOL) {
++  nommu_addchr(_string

[OE-core] [dunfell][PATCH 1/2] busybox: Fix for CVE-2021-42374

2021-12-01 Thread Pavel Zhukov
From: Pavel Zhukov 

An out-of-bounds heap read in unlzma leads to information leak and
denial of service when crafted LZMA-compressed input is decompressed.
This can be triggered by any applet/format that internally supports
LZMA compression.

Reference: https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2021-42374

Signed-off-by: Pavel Zhukov 
---
 .../busybox/busybox/CVE-2021-42374.patch  | 53 +++
 meta/recipes-core/busybox/busybox_1.31.1.bb   |  1 +
 2 files changed, 54 insertions(+)
 create mode 100644 meta/recipes-core/busybox/busybox/CVE-2021-42374.patch

diff --git a/meta/recipes-core/busybox/busybox/CVE-2021-42374.patch 
b/meta/recipes-core/busybox/busybox/CVE-2021-42374.patch
new file mode 100644
index 00..aef8a3db85
--- /dev/null
+++ b/meta/recipes-core/busybox/busybox/CVE-2021-42374.patch
@@ -0,0 +1,53 @@
+From 04f052c56ded5ab6a904e3a264a73dc0412b2e78 Mon Sep 17 00:00:00 2001
+From: Denys Vlasenko 
+Date: Tue, 15 Jun 2021 15:07:57 +0200
+Subject: [PATCH] unlzma: fix a case where we could read before beginning of
+ buffer
+Cc: pa...@zhukoff.net
+
+Testcase:
+
+  21 01 01 00 00 00 00 00 e7 01 01 01 ef 00 df b6
+  00 17 02 10 11 0f ff 00 16 00 00
+
+Unfortunately, the bug is not reliably causing a segfault,
+the behavior depends on what's in memory before the buffer.
+
+function old new   delta
+unpack_lzma_stream  27622768  +6
+
+Signed-off-by: Denys Vlasenko 
+
+Signed-off-by: Pavel Zhukov 
+
+CVE: CVE-2021-42374
+Upstream-Status: Backport 
[https://git.busybox.net/busybox/commit/?h=1_33_stable=d326be2850ea2bd78fe2c22d6c45c3b861d82937]
+Comment: testdata dropped because of binary format
+
+---
+ archival/libarchive/decompress_unlzma.c |   5 -
+ testsuite/unlzma.tests  |  17 +
+ testsuite/unlzma_issue_3.lzma   | Bin 0 -> 27 bytes
+ 3 files changed, 17 insertions(+), 5 deletions(-)
+ create mode 100644 testsuite/unlzma_issue_3.lzma
+
+diff --git a/archival/libarchive/decompress_unlzma.c 
b/archival/libarchive/decompress_unlzma.c
+index 
0744f231a1d64d92676b0cada2342f88f3b39b31..fb5aac8fe9ea0c53e0c2d7a7cbd05a753e39bc9d
 100644
+--- a/archival/libarchive/decompress_unlzma.c
 b/archival/libarchive/decompress_unlzma.c
+@@ -290,8 +290,11 @@ unpack_lzma_stream(transformer_state_t *xstate)
+   uint32_t pos;
+ 
+   pos = buffer_pos - rep0;
+-  if ((int32_t)pos < 0)
++  if ((int32_t)pos < 0) {
+   pos += header.dict_size;
++  if ((int32_t)pos < 0)
++  goto bad;
++  }
+   match_byte = buffer[pos];
+   do {
+   int bit;
+-- 
+2.34.0
+
diff --git a/meta/recipes-core/busybox/busybox_1.31.1.bb 
b/meta/recipes-core/busybox/busybox_1.31.1.bb
index d9d5f4f96b..55c00eb483 100644
--- a/meta/recipes-core/busybox/busybox_1.31.1.bb
+++ b/meta/recipes-core/busybox/busybox_1.31.1.bb
@@ -52,6 +52,7 @@ SRC_URI = 
"https://busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \
file://0001-hwclock-make-glibc-2.31-compatible.patch \
file://0001-decompress_gunzip-Fix-DoS-if-gzip-is-corrupt.patch \
file://0001-mktemp-add-tmpdir-option.patch \
+   file://CVE-2021-42374.patch \
"
 SRC_URI_append_libc-musl = " file://musl.cfg "
 
-- 
2.34.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#159021): 
https://lists.openembedded.org/g/openembedded-core/message/159021
Mute This Topic: https://lists.openembedded.org/mt/87424098/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] go: upgrade 1.16.8 -> 1.16.10

2021-11-23 Thread Pavel Zhukov
From: Pavel Zhukov 

The release includes fixes for CVE-2021-41771 and CVE-2021-41772

Signed-off-by: Pavel Zhukov 
---
 meta/recipes-devtools/go/{go-1.16.8.inc => go-1.16.10.inc}| 4 ++--
 ...go-binary-native_1.16.8.bb => go-binary-native_1.16.10.bb} | 4 ++--
 ...-cross-canadian_1.16.8.bb => go-cross-canadian_1.16.10.bb} | 0
 .../go/{go-cross_1.16.8.bb => go-cross_1.16.10.bb}| 0
 .../go/{go-crosssdk_1.16.8.bb => go-crosssdk_1.16.10.bb}  | 0
 .../go/{go-native_1.16.8.bb => go-native_1.16.10.bb}  | 0
 .../go/{go-runtime_1.16.8.bb => go-runtime_1.16.10.bb}| 0
 meta/recipes-devtools/go/{go_1.16.8.bb => go_1.16.10.bb}  | 0
 8 files changed, 4 insertions(+), 4 deletions(-)
 rename meta/recipes-devtools/go/{go-1.16.8.inc => go-1.16.10.inc} (90%)
 rename meta/recipes-devtools/go/{go-binary-native_1.16.8.bb => 
go-binary-native_1.16.10.bb} (83%)
 rename meta/recipes-devtools/go/{go-cross-canadian_1.16.8.bb => 
go-cross-canadian_1.16.10.bb} (100%)
 rename meta/recipes-devtools/go/{go-cross_1.16.8.bb => go-cross_1.16.10.bb} 
(100%)
 rename meta/recipes-devtools/go/{go-crosssdk_1.16.8.bb => 
go-crosssdk_1.16.10.bb} (100%)
 rename meta/recipes-devtools/go/{go-native_1.16.8.bb => go-native_1.16.10.bb} 
(100%)
 rename meta/recipes-devtools/go/{go-runtime_1.16.8.bb => 
go-runtime_1.16.10.bb} (100%)
 rename meta/recipes-devtools/go/{go_1.16.8.bb => go_1.16.10.bb} (100%)

diff --git a/meta/recipes-devtools/go/go-1.16.8.inc 
b/meta/recipes-devtools/go/go-1.16.10.inc
similarity index 90%
rename from meta/recipes-devtools/go/go-1.16.8.inc
rename to meta/recipes-devtools/go/go-1.16.10.inc
index 925bf46965..7549ffc211 100644
--- a/meta/recipes-devtools/go/go-1.16.8.inc
+++ b/meta/recipes-devtools/go/go-1.16.10.inc
@@ -1,7 +1,7 @@
 require go-common.inc
 
 GO_BASEVERSION = "1.16"
-PV = "1.16.8"
+PV = "1.16.10"
 FILESEXTRAPATHS:prepend := "${FILE_DIRNAME}/go-${GO_BASEVERSION}:"
 
 LIC_FILES_CHKSUM = "file://LICENSE;md5=5d4950ecb7b26d2c5e4e7b4e0dd74707"
@@ -17,7 +17,7 @@ SRC_URI += "\
 file://0008-use-GOBUILDMODE-to-set-buildmode.patch \
 file://0009-Revert-cmd-go-make-sure-CC-and-CXX-are-absolute.patch \
 "
-SRC_URI[main.sha256sum] = 
"8f2a8c24b793375b3243df82fdb0c8387486dcc8a892ca1c991aa99ace086b98"
+SRC_URI[main.sha256sum] = 
"a905472011585e403d00d2a41de7ced29b8884309d73482a307f689fd0f320b5"
 
 # Upstream don't believe it is a signifiant real world issue and will only
 # fix in 1.17 onwards where we can drop this.
diff --git a/meta/recipes-devtools/go/go-binary-native_1.16.8.bb 
b/meta/recipes-devtools/go/go-binary-native_1.16.10.bb
similarity index 83%
rename from meta/recipes-devtools/go/go-binary-native_1.16.8.bb
rename to meta/recipes-devtools/go/go-binary-native_1.16.10.bb
index 926222089d..4866c9f847 100644
--- a/meta/recipes-devtools/go/go-binary-native_1.16.8.bb
+++ b/meta/recipes-devtools/go/go-binary-native_1.16.10.bb
@@ -8,8 +8,8 @@ LIC_FILES_CHKSUM = 
"file://LICENSE;md5=5d4950ecb7b26d2c5e4e7b4e0dd74707"
 PROVIDES = "go-native"
 
 SRC_URI = 
"https://dl.google.com/go/go${PV}.${BUILD_GOOS}-${BUILD_GOARCH}.tar.gz;name=go_${BUILD_GOTUPLE};
-SRC_URI[go_linux_amd64.sha256sum] = 
"f32501aeb8b7b723bc7215f6c373abb6981bbc7e1c7b44e9f07317e1a300dce2"
-SRC_URI[go_linux_arm64.sha256sum] = 
"430dbe185417204f6788913197ab3b189b6deae9c9b524f262858e53dab239c2"
+SRC_URI[go_linux_amd64.sha256sum] = 
"414cd18ce1d193769b9e97d2401ad718755ab47816e13b2a1cde203d263b55cf"
+SRC_URI[go_linux_arm64.sha256sum] = 
"bfe1d4b82626c742b4690a832ca59a21e3d702161556f3c0ed26dffb368927e9"
 
 UPSTREAM_CHECK_URI = "https://golang.org/dl/;
 UPSTREAM_CHECK_REGEX = "go(?P\d+(\.\d+)+)\.linux"
diff --git a/meta/recipes-devtools/go/go-cross-canadian_1.16.8.bb 
b/meta/recipes-devtools/go/go-cross-canadian_1.16.10.bb
similarity index 100%
rename from meta/recipes-devtools/go/go-cross-canadian_1.16.8.bb
rename to meta/recipes-devtools/go/go-cross-canadian_1.16.10.bb
diff --git a/meta/recipes-devtools/go/go-cross_1.16.8.bb 
b/meta/recipes-devtools/go/go-cross_1.16.10.bb
similarity index 100%
rename from meta/recipes-devtools/go/go-cross_1.16.8.bb
rename to meta/recipes-devtools/go/go-cross_1.16.10.bb
diff --git a/meta/recipes-devtools/go/go-crosssdk_1.16.8.bb 
b/meta/recipes-devtools/go/go-crosssdk_1.16.10.bb
similarity index 100%
rename from meta/recipes-devtools/go/go-crosssdk_1.16.8.bb
rename to meta/recipes-devtools/go/go-crosssdk_1.16.10.bb
diff --git a/meta/recipes-devtools/go/go-native_1.16.8.bb 
b/meta/recipes-devtools/go/go-native_1.16.10.bb
similarity index 100%
rename from meta/recipes-devtools/go/go-native_1.16.8.bb
rename to meta/recipes-devtools/go/go-native_1.16.10.bb
diff --git a/meta/recipes-devtools/go/go-runtime_1.16.8.bb 
b/meta/recipes-devtools/go/go-runtime_1.16.10.bb
similarity index 100%

Re: [OE-core] [meta-oe][PATCH v2] gmp: Add security fix for CVE-2021-43618

2021-11-22 Thread Pavel Zhukov
Hi Ross, Thank you for pointing out the issues. Will do better next time. and you were faster anyway :) -- Pavel   22.11.2021, 13:00, "Ross Burton" :Hi Pavel,Close but you also need Upstream-Status, Signed-off-by, and CVE tagsin the patch. You can see my version of this fix on the list, a fewminutes before yours. :)RossOn Mon, 22 Nov 2021 at 11:54, Pavel Zhukov <pa...@zhukoff.net> wrote: From: Pavel Zhukov <pavel.zhu...@huawei.com> Fix mpz/inp_raw.c integer overflow and resultant buffer overflow via crafted input, leading to a segmentation fault on 32-bit platforms. References: https://gmplib.org/repo/gmp-6.2/rev/561a9c25298e References: https://gmplib.org/list-archives/gmp-bugs/2021-September/005077.html References: https://bugs.debian.org/994405 Signed-off-by: Pavel Zhukov <pavel.zhu...@huawei.com> ---  .../gmp/gmp/CVE-2021-43618.patch | 25 +++  meta/recipes-support/gmp/gmp_6.2.1.bb | 1 +  2 files changed, 26 insertions(+)  create mode 100644 meta/recipes-support/gmp/gmp/CVE-2021-43618.patch diff --git a/meta/recipes-support/gmp/gmp/CVE-2021-43618.patch b/meta/recipes-support/gmp/gmp/CVE-2021-43618.patch new file mode 100644 index 00..f741972439 --- /dev/null +++ b/meta/recipes-support/gmp/gmp/CVE-2021-43618.patch @@ -0,0 +1,25 @@ + +# HG changeset patch +# User Marco Bodrato <bodr...@mail.dm.unipi.it> +# Date 1634836009 -7200 +# Node ID 561a9c25298e17bb01896801ff353546c6923dbd +# Parent e1fd9db13b475209a864577237ea4b9105b3e96e +mpz/inp_raw.c: Avoid bit size overflows + +diff -r e1fd9db13b47 -r 561a9c25298e mpz/inp_raw.c +--- a/mpz/inp_raw.c Tue Dec 22 23:49:51 2020 +0100  b/mpz/inp_raw.c Thu Oct 21 19:06:49 2021 +0200 +@@ -88,8 +88,11 @@ + + abs_csize = ABS (csize); + ++ if (UNLIKELY (abs_csize > ~(mp_bitcnt_t) 0 / 8)) ++ return 0; /* Bit size overflows */ ++ + /* round up to a multiple of limbs */ +- abs_xsize = BITS_TO_LIMBS (abs_csize*8); ++ abs_xsize = BITS_TO_LIMBS ((mp_bitcnt_t) abs_csize * 8); + + if (abs_xsize != 0) + { + diff --git a/meta/recipes-support/gmp/gmp_6.2.1.bb b/meta/recipes-support/gmp/gmp_6.2.1.bb index d5996abd00..7c12a97228 100644 --- a/meta/recipes-support/gmp/gmp_6.2.1.bb +++ b/meta/recipes-support/gmp/gmp_6.2.1.bb @@ -12,6 +12,7 @@ SRC_URI = "https://gmplib.org/download/${BPN}/${BP}${REVISION}.tar.bz2 \ file://use-includedir.patch \ file://0001-Append-the-user-provided-flags-to-the-auto-detected-.patch \ file://0001-confiure.ac-Believe-the-cflags-from-environment.patch \ + file://CVE-2021-43618.patch \ "  SRC_URI[md5sum] = "28971fc21cf028042d4897f02fd355ea"  SRC_URI[sha256sum] = "eae9326beb4158c386e39a356818031bd28f3124cf915f8c5b1dc4c7a36b4d7c" -- 2.32.0  
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#158567): 
https://lists.openembedded.org/g/openembedded-core/message/158567
Mute This Topic: https://lists.openembedded.org/mt/87233112/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [meta-oe][PATCH v2] gmp: Add security fix for CVE-2021-43618

2021-11-22 Thread Pavel Zhukov
From: Pavel Zhukov 

Fix mpz/inp_raw.c integer overflow and resultant buffer overflow via crafted 
input,
leading to a segmentation fault on 32-bit platforms.

References: https://gmplib.org/repo/gmp-6.2/rev/561a9c25298e
References: https://gmplib.org/list-archives/gmp-bugs/2021-September/005077.html
References: https://bugs.debian.org/994405

Signed-off-by: Pavel Zhukov 
---
 .../gmp/gmp/CVE-2021-43618.patch  | 25 +++
 meta/recipes-support/gmp/gmp_6.2.1.bb |  1 +
 2 files changed, 26 insertions(+)
 create mode 100644 meta/recipes-support/gmp/gmp/CVE-2021-43618.patch

diff --git a/meta/recipes-support/gmp/gmp/CVE-2021-43618.patch 
b/meta/recipes-support/gmp/gmp/CVE-2021-43618.patch
new file mode 100644
index 00..f741972439
--- /dev/null
+++ b/meta/recipes-support/gmp/gmp/CVE-2021-43618.patch
@@ -0,0 +1,25 @@
+
+# HG changeset patch
+# User Marco Bodrato 
+# Date 1634836009 -7200
+# Node ID 561a9c25298e17bb01896801ff353546c6923dbd
+# Parent  e1fd9db13b475209a864577237ea4b9105b3e96e
+mpz/inp_raw.c: Avoid bit size overflows
+
+diff -r e1fd9db13b47 -r 561a9c25298e mpz/inp_raw.c
+--- a/mpz/inp_raw.cTue Dec 22 23:49:51 2020 +0100
 b/mpz/inp_raw.cThu Oct 21 19:06:49 2021 +0200
+@@ -88,8 +88,11 @@
+ 
+   abs_csize = ABS (csize);
+ 
++  if (UNLIKELY (abs_csize > ~(mp_bitcnt_t) 0 / 8))
++return 0; /* Bit size overflows */
++
+   /* round up to a multiple of limbs */
+-  abs_xsize = BITS_TO_LIMBS (abs_csize*8);
++  abs_xsize = BITS_TO_LIMBS ((mp_bitcnt_t) abs_csize * 8);
+ 
+   if (abs_xsize != 0)
+ {
+
diff --git a/meta/recipes-support/gmp/gmp_6.2.1.bb 
b/meta/recipes-support/gmp/gmp_6.2.1.bb
index d5996abd00..7c12a97228 100644
--- a/meta/recipes-support/gmp/gmp_6.2.1.bb
+++ b/meta/recipes-support/gmp/gmp_6.2.1.bb
@@ -12,6 +12,7 @@ SRC_URI = 
"https://gmplib.org/download/${BPN}/${BP}${REVISION}.tar.bz2 \
file://use-includedir.patch \

file://0001-Append-the-user-provided-flags-to-the-auto-detected-.patch \
file://0001-confiure.ac-Believe-the-cflags-from-environment.patch \
+   file://CVE-2021-43618.patch \
"
 SRC_URI[md5sum] = "28971fc21cf028042d4897f02fd355ea"
 SRC_URI[sha256sum] = 
"eae9326beb4158c386e39a356818031bd28f3124cf915f8c5b1dc4c7a36b4d7c"
-- 
2.32.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#158563): 
https://lists.openembedded.org/g/openembedded-core/message/158563
Mute This Topic: https://lists.openembedded.org/mt/87233112/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] Add security fix for CVE-2021-43618

2021-11-22 Thread Pavel Zhukov
From: Pavel Zhukov 

Fix mpz/inp_raw.c integer overflow and resultant buffer overflow via crafted 
input,
leading to a segmentation fault on 32-bit platforms.

References: https://gmplib.org/repo/gmp-6.2/rev/561a9c25298e
References: https://gmplib.org/list-archives/gmp-bugs/2021-September/005077.html
References: https://bugs.debian.org/994405

Signed-off-by: Pavel Zhukov 
---
 .../gmp/gmp/CVE-2021-43618.patch  | 25 +++
 meta/recipes-support/gmp/gmp_6.2.1.bb |  1 +
 2 files changed, 26 insertions(+)
 create mode 100644 meta/recipes-support/gmp/gmp/CVE-2021-43618.patch

diff --git a/meta/recipes-support/gmp/gmp/CVE-2021-43618.patch 
b/meta/recipes-support/gmp/gmp/CVE-2021-43618.patch
new file mode 100644
index 00..f741972439
--- /dev/null
+++ b/meta/recipes-support/gmp/gmp/CVE-2021-43618.patch
@@ -0,0 +1,25 @@
+
+# HG changeset patch
+# User Marco Bodrato 
+# Date 1634836009 -7200
+# Node ID 561a9c25298e17bb01896801ff353546c6923dbd
+# Parent  e1fd9db13b475209a864577237ea4b9105b3e96e
+mpz/inp_raw.c: Avoid bit size overflows
+
+diff -r e1fd9db13b47 -r 561a9c25298e mpz/inp_raw.c
+--- a/mpz/inp_raw.cTue Dec 22 23:49:51 2020 +0100
 b/mpz/inp_raw.cThu Oct 21 19:06:49 2021 +0200
+@@ -88,8 +88,11 @@
+ 
+   abs_csize = ABS (csize);
+ 
++  if (UNLIKELY (abs_csize > ~(mp_bitcnt_t) 0 / 8))
++return 0; /* Bit size overflows */
++
+   /* round up to a multiple of limbs */
+-  abs_xsize = BITS_TO_LIMBS (abs_csize*8);
++  abs_xsize = BITS_TO_LIMBS ((mp_bitcnt_t) abs_csize * 8);
+ 
+   if (abs_xsize != 0)
+ {
+
diff --git a/meta/recipes-support/gmp/gmp_6.2.1.bb 
b/meta/recipes-support/gmp/gmp_6.2.1.bb
index d5996abd00..7c12a97228 100644
--- a/meta/recipes-support/gmp/gmp_6.2.1.bb
+++ b/meta/recipes-support/gmp/gmp_6.2.1.bb
@@ -12,6 +12,7 @@ SRC_URI = 
"https://gmplib.org/download/${BPN}/${BP}${REVISION}.tar.bz2 \
file://use-includedir.patch \

file://0001-Append-the-user-provided-flags-to-the-auto-detected-.patch \
file://0001-confiure.ac-Believe-the-cflags-from-environment.patch \
+   file://CVE-2021-43618.patch \
"
 SRC_URI[md5sum] = "28971fc21cf028042d4897f02fd355ea"
 SRC_URI[sha256sum] = 
"eae9326beb4158c386e39a356818031bd28f3124cf915f8c5b1dc4c7a36b4d7c"
-- 
2.32.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#158562): 
https://lists.openembedded.org/g/openembedded-core/message/158562
Mute This Topic: https://lists.openembedded.org/mt/87233029/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] weston: Use systemd notify,

2021-10-06 Thread Pavel Zhukov
From: Pavel Zhukov 

Using systemd notify fixes the problem with dependency chain in case
if other services depend on running weston.
This change required more robust handling of weston modules arguments
due to custom argument parser impmentation in weston (only last
--modules argument is accepted) and fixes the bug in modules handling
in the weston-start script (only last argument is actually parsed by
weston). Master branch implements systemd-notify thus backport but
doesn't utilize modules anymore so this change is mostly dunfell
specific.

Upstream-status: Backport

Signed-off-by: Pavel Zhukov 
Signed-off-by: Andrei Gherzan 
---
 .../wayland/weston-init/weston-start | 12 
 .../wayland/weston-init/weston@.service  |  6 ++
 .../wayland/weston/systemd-notify.weston-start   |  9 +
 .../wayland/weston/xwayland.weston-start |  3 +--
 meta/recipes-graphics/wayland/weston_8.0.0.bb|  6 ++
 5 files changed, 34 insertions(+), 2 deletions(-)
 create mode 100644 
meta/recipes-graphics/wayland/weston/systemd-notify.weston-start

diff --git a/meta/recipes-graphics/wayland/weston-init/weston-start 
b/meta/recipes-graphics/wayland/weston-init/weston-start
index ccc7093425..97471df80d 100755
--- a/meta/recipes-graphics/wayland/weston-init/weston-start
+++ b/meta/recipes-graphics/wayland/weston-init/weston-start
@@ -23,6 +23,15 @@ add_openvt_argument() {
openvt_args="$openvt_args $1"
 }
 
+## Add module to --modules argument
+add_weston_module() {
+   if [ -z "${weston_modules}" ]; then
+   weston_modules="--modules "
+   fi;
+   weston_modules="${weston_modules}${1},"
+}
+
+
 if [ -n "$WAYLAND_DISPLAY" ]; then
echo "ERROR: A Wayland compositor is already running, nested Weston 
instance is not supported yet."
exit 1
@@ -65,6 +74,9 @@ if [ -d "$modules_dir" ]; then
# process module
. $m
done
+   if [ -n "${weston_modules}" ]; then
+   add_weston_argument "${weston_modules} "
+   fi;
 fi
 
 if test -z "$XDG_RUNTIME_DIR"; then
diff --git a/meta/recipes-graphics/wayland/weston-init/weston@.service 
b/meta/recipes-graphics/wayland/weston-init/weston@.service
index 39e193014a..70c706d75c 100644
--- a/meta/recipes-graphics/wayland/weston-init/weston@.service
+++ b/meta/recipes-graphics/wayland/weston-init/weston@.service
@@ -1,3 +1,7 @@
+# SPDX-FileCopyrightText: Huawei Inc.
+#
+# SPDX-License-Identifier: Apache-2.0
+
 [Unit]
 Description=Weston Wayland Compositor
 RequiresMountsFor=/run
@@ -5,6 +9,8 @@ Conflicts=plymouth-quit.service
 After=systemd-user-sessions.service plymouth-quit-wait.service
 
 [Service]
+Type=notify
+NotifyAccess=all
 User=%i
 PAMName=login
 EnvironmentFile=-/etc/default/weston
diff --git a/meta/recipes-graphics/wayland/weston/systemd-notify.weston-start 
b/meta/recipes-graphics/wayland/weston/systemd-notify.weston-start
new file mode 100644
index 00..fdb48cb609
--- /dev/null
+++ b/meta/recipes-graphics/wayland/weston/systemd-notify.weston-start
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+# SPDX-FileCopyrightText: Huawei Inc.
+# SPDX-License-Identifier: Apache-2.0
+
+
+if [[ -x "/usr/lib/weston/systemd-notify.so" ]]; then
+   add_weston_module "systemd-notify.so"
+fi
diff --git a/meta/recipes-graphics/wayland/weston/xwayland.weston-start 
b/meta/recipes-graphics/wayland/weston/xwayland.weston-start
index b483c97cf1..22984f50a4 100644
--- a/meta/recipes-graphics/wayland/weston/xwayland.weston-start
+++ b/meta/recipes-graphics/wayland/weston/xwayland.weston-start
@@ -2,6 +2,5 @@
 
 if type Xwayland  >/dev/null 2>/dev/null; then
mkdir -p /tmp/.X11-unix
-
-   add_weston_argument "--modules=xwayland.so"
+   add_weston_module "xwayland.so"
 fi
diff --git a/meta/recipes-graphics/wayland/weston_8.0.0.bb 
b/meta/recipes-graphics/wayland/weston_8.0.0.bb
index 0b383f25f3..2b120d7404 100644
--- a/meta/recipes-graphics/wayland/weston_8.0.0.bb
+++ b/meta/recipes-graphics/wayland/weston_8.0.0.bb
@@ -5,9 +5,11 @@ LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://COPYING;md5=d79ee9e66bb0f95d3386a7acae780b70 \
 
file://libweston/compositor.c;endline=27;md5=6c53bbbd99273f4f7c4affa855c33c0a"
 
+
 SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \
file://weston.png \
file://weston.desktop \
+   file://systemd-notify.weston-start \
file://xwayland.weston-start \

file://0001-weston-launch-Provide-a-default-version-that-doesn-t.patch \
 "
@@ -101,6 +103,10 @@ do_install_append() {
install -Dm 644 ${WORKDIR}/xwayland.weston-start 
${D}${datadir}/weston-start/xwayland
fi
 
+   if [ "${@bb.utils.contains('PACKAG

[OE-core] [dunfell][PATCH] weston-init: Override the systemd service by a notify-based one

2021-10-06 Thread Pavel Zhukov
From: Pavel Zhukov 

Using systemd notify, a service dependency would be more robust. This
allows, for example, another service to depend on weston-init without
having to hack a sleep (or similar). This change required more robust
handling of weston modules argument due to custom argument parser
impmentation in weston (only last --modules argument is accepted).

Signed-off-by: Pavel Zhukov 
Signed-off-by: Andrei Gherzan 
---
 .../wayland/weston-init/weston-start | 12 
 .../wayland/weston-init/weston@.service  |  6 ++
 .../wayland/weston/systemd-notify.weston-start   |  9 +
 .../wayland/weston/xwayland.weston-start |  3 +--
 meta/recipes-graphics/wayland/weston_8.0.0.bb|  6 ++
 5 files changed, 34 insertions(+), 2 deletions(-)
 create mode 100644 
meta/recipes-graphics/wayland/weston/systemd-notify.weston-start

diff --git a/meta/recipes-graphics/wayland/weston-init/weston-start 
b/meta/recipes-graphics/wayland/weston-init/weston-start
index ccc7093425..97471df80d 100755
--- a/meta/recipes-graphics/wayland/weston-init/weston-start
+++ b/meta/recipes-graphics/wayland/weston-init/weston-start
@@ -23,6 +23,15 @@ add_openvt_argument() {
openvt_args="$openvt_args $1"
 }
 
+## Add module to --modules argument
+add_weston_module() {
+   if [ -z "${weston_modules}" ]; then
+   weston_modules="--modules "
+   fi;
+   weston_modules="${weston_modules}${1},"
+}
+
+
 if [ -n "$WAYLAND_DISPLAY" ]; then
echo "ERROR: A Wayland compositor is already running, nested Weston 
instance is not supported yet."
exit 1
@@ -65,6 +74,9 @@ if [ -d "$modules_dir" ]; then
# process module
. $m
done
+   if [ -n "${weston_modules}" ]; then
+   add_weston_argument "${weston_modules} "
+   fi;
 fi
 
 if test -z "$XDG_RUNTIME_DIR"; then
diff --git a/meta/recipes-graphics/wayland/weston-init/weston@.service 
b/meta/recipes-graphics/wayland/weston-init/weston@.service
index 39e193014a..70c706d75c 100644
--- a/meta/recipes-graphics/wayland/weston-init/weston@.service
+++ b/meta/recipes-graphics/wayland/weston-init/weston@.service
@@ -1,3 +1,7 @@
+# SPDX-FileCopyrightText: Huawei Inc.
+#
+# SPDX-License-Identifier: Apache-2.0
+
 [Unit]
 Description=Weston Wayland Compositor
 RequiresMountsFor=/run
@@ -5,6 +9,8 @@ Conflicts=plymouth-quit.service
 After=systemd-user-sessions.service plymouth-quit-wait.service
 
 [Service]
+Type=notify
+NotifyAccess=all
 User=%i
 PAMName=login
 EnvironmentFile=-/etc/default/weston
diff --git a/meta/recipes-graphics/wayland/weston/systemd-notify.weston-start 
b/meta/recipes-graphics/wayland/weston/systemd-notify.weston-start
new file mode 100644
index 00..fdb48cb609
--- /dev/null
+++ b/meta/recipes-graphics/wayland/weston/systemd-notify.weston-start
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+# SPDX-FileCopyrightText: Huawei Inc.
+# SPDX-License-Identifier: Apache-2.0
+
+
+if [[ -x "/usr/lib/weston/systemd-notify.so" ]]; then
+   add_weston_module "systemd-notify.so"
+fi
diff --git a/meta/recipes-graphics/wayland/weston/xwayland.weston-start 
b/meta/recipes-graphics/wayland/weston/xwayland.weston-start
index b483c97cf1..22984f50a4 100644
--- a/meta/recipes-graphics/wayland/weston/xwayland.weston-start
+++ b/meta/recipes-graphics/wayland/weston/xwayland.weston-start
@@ -2,6 +2,5 @@
 
 if type Xwayland  >/dev/null 2>/dev/null; then
mkdir -p /tmp/.X11-unix
-
-   add_weston_argument "--modules=xwayland.so"
+   add_weston_module "xwayland.so"
 fi
diff --git a/meta/recipes-graphics/wayland/weston_8.0.0.bb 
b/meta/recipes-graphics/wayland/weston_8.0.0.bb
index 0b383f25f3..2b120d7404 100644
--- a/meta/recipes-graphics/wayland/weston_8.0.0.bb
+++ b/meta/recipes-graphics/wayland/weston_8.0.0.bb
@@ -5,9 +5,11 @@ LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://COPYING;md5=d79ee9e66bb0f95d3386a7acae780b70 \
 
file://libweston/compositor.c;endline=27;md5=6c53bbbd99273f4f7c4affa855c33c0a"
 
+
 SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \
file://weston.png \
file://weston.desktop \
+   file://systemd-notify.weston-start \
file://xwayland.weston-start \

file://0001-weston-launch-Provide-a-default-version-that-doesn-t.patch \
 "
@@ -101,6 +103,10 @@ do_install_append() {
install -Dm 644 ${WORKDIR}/xwayland.weston-start 
${D}${datadir}/weston-start/xwayland
fi
 
+   if [ "${@bb.utils.contains('PACKAGECONFIG', 'systemd', 'yes', 'no', 
d)}" = "yes" ]; then
+   install -Dm 644 ${WORKDIR}/systemd-notify.weston-start 
${D}${datadir}/weston-start/systemd-notify
+   fi
+
if [ "${@bb.utils.con

Re: [OE-core] [PATCH] weston: wrapper for weston modules argument

2021-09-15 Thread Pavel Zhukov

Hello Alexandre,

Rebased and resent v2. I'm sorry about that. Something went wrong 
with my

mail client setup. Used git send-email this time.


On 2021-09-15 at 10:37 CEST, Alexandre Belloni wrote...

Hello Pavel,

I'm sorry but your patch has been mangled and I didn't manage to 
apply

it, do you mind sending it again?

On 08/09/2021 09:14:23+0200, Pavel Zhukov wrote:


Due to custom option parser implementation weston accepts only 
one

argument of a given type. As the result if multiple modules add
multiple --modules agruments only last will be used. This fix
introduces wrapper around modules in terms of weston-init to 
prepare
proper modules argument for weston and adds systemd-notify 
module into
weston-init module to support Type=notify in systemd service 
file.


Signed-off-by: Pavel Zhukov 
---
.../recipes-graphics/wayland/weston-init/weston-start | 11 
+++
.../wayland/weston/systemd-notify.weston-start|  9 
+
meta/recipes-graphics/wayland/weston_9.0.0.bb |  5 
+

3 files changed, 25 insertions(+)
create mode 100644
meta/recipes-graphics/wayland/weston/systemd-notify.weston-start

diff --git 
a/meta/recipes-graphics/wayland/weston-init/weston-start

b/meta/recipes-graphics/wayland/weston-init/weston-start
index 0b93dc964a..0f1bc4c29d 100755
--- a/meta/recipes-graphics/wayland/weston-init/weston-start
+++ b/meta/recipes-graphics/wayland/weston-init/weston-start
@@ -21,6 +21,14 @@ add_weston_argument() {
# Add openvt extra argument
add_openvt_argument() {
openvt_args="$openvt_args $1"
+
+}
+## Add module to --modules argument
+add_weston_module() {
+   if [[ "x${weston_modules}" == "x" ]]; then
+   weston_modules="--modules "
+   fi;
+   weston_modules+="${1},"
}

if [ -n "$WAYLAND_DISPLAY" ]; then
@@ -68,6 +76,9 @@ if [ -d "$modules_dir" ]; then

# process module
. $m
+   if [[ x"{$weston_modules}" != "x" ]]; then
+   add_weston_argument "${weston_modules}"
+   fi;
done
fi

diff --git
a/meta/recipes-graphics/wayland/weston/systemd-notify.weston-start
b/meta/recipes-graphics/wayland/weston/systemd-notify.weston-start
new file mode 100644
index 00..a97e7b38d9
--- /dev/null
+++ 
b/meta/recipes-graphics/wayland/weston/systemd-notify.weston-start

@@ -0,0 +1,9 @@
+#!/bin/sh
+  +# SPDX-FileCopyrightText: Huawei Inc.
+# SPDX-License-Identifier: Apache-2.0
+
+
+if [[ -x "/usr/lib/weston/systemd-notify.so" ]]; then
+add_weston_module "systemd-notify.so"
+fi
diff --git a/meta/recipes-graphics/wayland/weston_9.0.0.bb
b/meta/recipes-graphics/wayland/weston_9.0.0.bb
index 1f1d62ea7c..59ab217a3b 100644
--- a/meta/recipes-graphics/wayland/weston_9.0.0.bb
+++ b/meta/recipes-graphics/wayland/weston_9.0.0.bb
@@ -9,6 +9,7 @@ SRC_URI =
"https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \
   file://weston.png \
   file://weston.desktop \
   file://xwayland.weston-start \
+   file://systemd-notify.weston-start \



file://0001-weston-launch-Provide-a-default-version-that-doesn-t.patch
\



file://0001-tests-include-fcntl.h-for-open-O_RDWR-O_CLOEXEC-and-.patch
\
   file://0001-meson.build-fix-incorrect-header.patch \
@@ -111,6 +112,10 @@ do_install:append() {
install -Dm 644 ${WORKDIR}/xwayland.weston-start
${D}${datadir}/weston-start/xwayland
fi

+	if [ "${@bb.utils.contains('PACKAGECONFIG', 'systemd', 
'yes', 'no', d)}" =

"yes" ]; then
+		install -Dm 644 
${WORKDIR}/systemd-notify.weston-start

${D}${datadir}/weston-start/systemd-notify
+   fi
+
	if [ "${@bb.utils.contains('PACKAGECONFIG', 'launch', 
'yes', 'no', d)}" =

"yes" ]; then
chmod u+s ${D}${bindir}/weston-launch
fi
--
2.31.1










--
Pavel

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#156047): 
https://lists.openembedded.org/g/openembedded-core/message/156047
Mute This Topic: https://lists.openembedded.org/mt/85453995/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 v2] weston: wrapper for weston modules argument

2021-09-15 Thread Pavel Zhukov
Due to custom option parser implementation weston accepts only one
argument of a given type. As the result if multiple modules add
multiple --modules agruments only last will be used. This fix
introduces wrapper around modules in terms of weston-init to prepare
proper modules argument for weston and adds systemd-notify module into
weston-init module to support Type=notify in systemd service file.

Signed-off-by: Pavel Zhukov 
---
 .../recipes-graphics/wayland/weston-init/weston-start | 11 +++
 .../wayland/weston/systemd-notify.weston-start|  9 +
 meta/recipes-graphics/wayland/weston_9.0.0.bb |  5 +
 3 files changed, 25 insertions(+)
 create mode 100644 
meta/recipes-graphics/wayland/weston/systemd-notify.weston-start

diff --git a/meta/recipes-graphics/wayland/weston-init/weston-start 
b/meta/recipes-graphics/wayland/weston-init/weston-start
index 0b93dc964a..0f1bc4c29d 100755
--- a/meta/recipes-graphics/wayland/weston-init/weston-start
+++ b/meta/recipes-graphics/wayland/weston-init/weston-start
@@ -21,6 +21,14 @@ add_weston_argument() {
 # Add openvt extra argument
 add_openvt_argument() {
openvt_args="$openvt_args $1"
+
+}
+## Add module to --modules argument
+add_weston_module() {
+   if [[ "x${weston_modules}" == "x" ]]; then
+   weston_modules="--modules "
+   fi;
+   weston_modules+="${1},"
 }
 
 if [ -n "$WAYLAND_DISPLAY" ]; then
@@ -68,6 +76,9 @@ if [ -d "$modules_dir" ]; then
 
# process module
. $m
+   if [[ x"{$weston_modules}" != "x" ]]; then
+   add_weston_argument "${weston_modules}"
+   fi;
done
 fi
 
diff --git a/meta/recipes-graphics/wayland/weston/systemd-notify.weston-start 
b/meta/recipes-graphics/wayland/weston/systemd-notify.weston-start
new file mode 100644
index 00..a97e7b38d9
--- /dev/null
+++ b/meta/recipes-graphics/wayland/weston/systemd-notify.weston-start
@@ -0,0 +1,9 @@
+#!/bin/sh
+  
+# SPDX-FileCopyrightText: Huawei Inc.
+# SPDX-License-Identifier: Apache-2.0
+
+
+if [[ -x "/usr/lib/weston/systemd-notify.so" ]]; then
+add_weston_module "systemd-notify.so"
+fi
diff --git a/meta/recipes-graphics/wayland/weston_9.0.0.bb 
b/meta/recipes-graphics/wayland/weston_9.0.0.bb
index 1f1d62ea7c..59ab217a3b 100644
--- a/meta/recipes-graphics/wayland/weston_9.0.0.bb
+++ b/meta/recipes-graphics/wayland/weston_9.0.0.bb
@@ -9,6 +9,7 @@ SRC_URI = 
"https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \
file://weston.png \
file://weston.desktop \
file://xwayland.weston-start \
+   file://systemd-notify.weston-start \

file://0001-weston-launch-Provide-a-default-version-that-doesn-t.patch \

file://0001-tests-include-fcntl.h-for-open-O_RDWR-O_CLOEXEC-and-.patch \
file://0001-meson.build-fix-incorrect-header.patch \
@@ -111,6 +112,10 @@ do_install:append() {
install -Dm 644 ${WORKDIR}/xwayland.weston-start 
${D}${datadir}/weston-start/xwayland
fi
 
+   if [ "${@bb.utils.contains('PACKAGECONFIG', 'systemd', 'yes', 'no', 
d)}" = "yes" ]; then
+   install -Dm 644 ${WORKDIR}/systemd-notify.weston-start 
${D}${datadir}/weston-start/systemd-notify
+   fi
+
if [ "${@bb.utils.contains('PACKAGECONFIG', 'launch', 'yes', 'no', d)}" 
= "yes" ]; then
chmod u+s ${D}${bindir}/weston-launch
fi
-- 
2.31.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#156046): 
https://lists.openembedded.org/g/openembedded-core/message/156046
Mute This Topic: https://lists.openembedded.org/mt/85622769/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] weston: wrapper for weston modules argument

2021-09-08 Thread Pavel Zhukov


Due to custom option parser implementation weston accepts only one
argument of a given type. As the result if multiple modules add
multiple --modules agruments only last will be used. This fix
introduces wrapper around modules in terms of weston-init to 
prepare
proper modules argument for weston and adds systemd-notify module 
into

weston-init module to support Type=notify in systemd service file.

Signed-off-by: Pavel Zhukov 
---
.../recipes-graphics/wayland/weston-init/weston-start | 11 
+++
.../wayland/weston/systemd-notify.weston-start|  9 
+

meta/recipes-graphics/wayland/weston_9.0.0.bb |  5 +
3 files changed, 25 insertions(+)
create mode 100644 
meta/recipes-graphics/wayland/weston/systemd-notify.weston-start


diff --git 
a/meta/recipes-graphics/wayland/weston-init/weston-start 
b/meta/recipes-graphics/wayland/weston-init/weston-start

index 0b93dc964a..0f1bc4c29d 100755
--- a/meta/recipes-graphics/wayland/weston-init/weston-start
+++ b/meta/recipes-graphics/wayland/weston-init/weston-start
@@ -21,6 +21,14 @@ add_weston_argument() {
# Add openvt extra argument
add_openvt_argument() {
openvt_args="$openvt_args $1"
+
+}
+## Add module to --modules argument
+add_weston_module() {
+   if [[ "x${weston_modules}" == "x" ]]; then
+   weston_modules="--modules "
+   fi;
+   weston_modules+="${1},"
}

if [ -n "$WAYLAND_DISPLAY" ]; then
@@ -68,6 +76,9 @@ if [ -d "$modules_dir" ]; then

# process module
. $m
+   if [[ x"{$weston_modules}" != "x" ]]; then
+   add_weston_argument "${weston_modules}"
+   fi;
done
fi

diff --git 
a/meta/recipes-graphics/wayland/weston/systemd-notify.weston-start 
b/meta/recipes-graphics/wayland/weston/systemd-notify.weston-start

new file mode 100644
index 00..a97e7b38d9
--- /dev/null
+++ 
b/meta/recipes-graphics/wayland/weston/systemd-notify.weston-start

@@ -0,0 +1,9 @@
+#!/bin/sh
+  
+# SPDX-FileCopyrightText: Huawei Inc.

+# SPDX-License-Identifier: Apache-2.0
+
+
+if [[ -x "/usr/lib/weston/systemd-notify.so" ]]; then
+add_weston_module "systemd-notify.so"
+fi
diff --git a/meta/recipes-graphics/wayland/weston_9.0.0.bb 
b/meta/recipes-graphics/wayland/weston_9.0.0.bb

index 1f1d62ea7c..59ab217a3b 100644
--- a/meta/recipes-graphics/wayland/weston_9.0.0.bb
+++ b/meta/recipes-graphics/wayland/weston_9.0.0.bb
@@ -9,6 +9,7 @@ SRC_URI = 
"https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \

   file://weston.png \
   file://weston.desktop \
   file://xwayland.weston-start \
+   file://systemd-notify.weston-start \
   file://0001-weston-launch-Provide-a-default-version-that-doesn-t.patch 
   \
   file://0001-tests-include-fcntl.h-for-open-O_RDWR-O_CLOEXEC-and-.patch 
   \

   file://0001-meson.build-fix-incorrect-header.patch \
@@ -111,6 +112,10 @@ do_install:append() {
		install -Dm 644 ${WORKDIR}/xwayland.weston-start 
${D}${datadir}/weston-start/xwayland

fi

+	if [ "${@bb.utils.contains('PACKAGECONFIG', 'systemd', 
'yes', 'no', d)}" = "yes" ]; then
+		install -Dm 644 
${WORKDIR}/systemd-notify.weston-start 
${D}${datadir}/weston-start/systemd-notify

+   fi
+
	if [ "${@bb.utils.contains('PACKAGECONFIG', 'launch', 
'yes', 'no', d)}" = "yes" ]; then

chmod u+s ${D}${bindir}/weston-launch
fi
--
2.31.1


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



  1   2   >