Skip to contentSkip to conversation

packagegroup-container: inherit goarch.bbclass

PATCH In review Hongxu Jia 2 participants 6 messages Dec 28, 2024 – Dec 29, 2024

lore
Share & tools
lore

Hongxu Jia

author
#0 lore raw

PATCH 1/3 packagegroup-container: inherit goarch.bbclass

The go related recipe (such as docker-moby, podman) inherited goarch.bbclass in which centralize definition of COMPATIBLE_HOST

Due to the packagegroup runtime depends on these go related recipes, inherits goarch.bbclass to apply the same COMPATIBLE_HOST

$ echo "MACHINE = 'qemuppc'" >> conf/local.conf
$ bitbake world
ERROR: Nothing RPROVIDES 'podman' (but meta-virtualization/recipes-core/packagegroups/packagegroup-container.bb RDEPENDS on or otherwise requires it)
podman was skipped: incompatible with host powerpc-wrs-linux (not in COMPATIBLE_HOST)
NOTE: Runtime target 'podman' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['podman']
ERROR: Required build target 'meta-world-pkgdata' has no buildable providers.
Missing or unbuildable dependency chain was: ['meta-world-pkgdata', 'packagegroup-container', 'podman']
---
 recipes-core/packagegroups/packagegroup-container.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
recipes-core/packagegroups/packagegroup-container.bb +1 -1
index 21402d65..3e2d2a25 100644
@@ -2,7 +2,7 @@ SUMMARY = "All packages for container host"
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
 
-inherit packagegroup
+inherit packagegroup goarch
 
 COMPATIBLE_HOST = "^(?!(mips|riscv)).*"
 
Signature · 1 line
2.34.1
author
#1 lore raw

PATCH 2/3 packagegroup-container: support target arch override

In packagegroup-container, it runtime depends on conmon if DISTRO_FEATURES contains seccomp but oe-core uses target override loongarch64 to disable seccomp from default feature [1]

$ echo "MACHINE = 'qemuloongarch64'" >> conf/local.conf
$ bitbake world
ERROR: Nothing RPROVIDES 'conmon' (but meta-virtualization/recipes-core/packagegroups/packagegroup-container.bb RDEPENDS on or otherwise requires it)
conmon was skipped: missing required distro feature 'seccomp' (not in DISTRO_FEATURES)
NOTE: Runtime target 'conmon' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['conmon']
ERROR: Required build target 'meta-world-pkgdata' has no buildable providers.
Missing or unbuildable dependency chain was: ['meta-world-pkgdata', 'packagegroup-container', 'conmon']

Set 'PACKAGE_ARCH = "${MACHINE_ARCH}"' to make target arch override loongarch64 work

[1] https://github.com/openembedded/openembedded-core/commit/e9177bfc647ffd8d0346154c2673562e3585c7ef

---
 recipes-core/packagegroups/packagegroup-container.bb | 2 ++
 1 file changed, 2 insertions(+)
recipes-core/packagegroups/packagegroup-container.bb +2 -0
index 3e2d2a25..ab4cbb6c 100644
@@ -2,6 +2,8 @@ SUMMARY = "All packages for container host"
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
 
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
 inherit packagegroup goarch
 
 COMPATIBLE_HOST = "^(?!(mips|riscv)).*"
Signature · 1 line
2.34.1
#2 lore raw

Re: [meta-virtualization][PATCH 2/3] packagegroup-container: support target arch override

Quoted 40 lines · hongxu via lists.yoctoproject.org

In packagegroup-container, it runtime depends on conmon if DISTRO_FEATURES contains seccomp
but oe-core uses target override loongarch64 to disable seccomp from default feature [1]

$ echo "MACHINE = 'qemuloongarch64'" >> conf/local.conf
$ bitbake world
ERROR: Nothing RPROVIDES 'conmon' (but
meta-virtualization/recipes-core/packagegroups/packagegroup-container.bb
RDEPENDS on or otherwise requires it)
conmon was skipped: missing required distro feature 'seccomp' (not in
DISTRO_FEATURES)
NOTE: Runtime target 'conmon' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['conmon']
ERROR: Required build target 'meta-world-pkgdata' has no buildable
providers.
Missing or unbuildable dependency chain was: ['meta-world-pkgdata',
'packagegroup-container', 'conmon']

Set 'PACKAGE_ARCH = "${MACHINE_ARCH}"' to make target arch override loongarch64 work

[1]
https://github.com/openembedded/openembedded-core/commit/e9177bfc647ffd8d0346154c2673562e3585c7ef

---
 recipes-core/packagegroups/packagegroup-container.bb | 2 ++
 1 file changed, 2 insertions(+)
recipes-core/packagegroups/packagegroup-container.bb +0 -0
index 3e2d2a25..ab4cbb6c 100644
@@ -2,6 +2,8 @@ SUMMARY = "All packages for container host"
 LICENSE = "MIT"
 LIC_FILES_CHKSUM =

"file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"

Quoted 2 lines

+PACKAGE_ARCH = "${MACHINE_ARCH}"

I'm no expert, but doesn't this make the packages/packagegroup machine specific ?

If so, that is definitely not what we want.

Bruce

Quoted 19 lines

+
inherit packagegroup goarch

COMPATIBLE_HOST = "^(?!(mips|riscv)).*"
--
2.34.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#9064):
https://lists.yoctoproject.org/g/meta-virtualization/message/9064
Mute This Topic: https://lists.yoctoproject.org/mt/110315545/1050810
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Signature · 3 lines
- Thou shalt not follow the NULL pointer, for chaos and madness await thee
at its end
- "Use the force Harry" - Gandalf, Star Trek II
author
#3 lore raw

PATCH 3/3 docker.inc: use DISTRO_FEATURES to filter seccomp from PACKAGECONFIG

In reply to Hongxu Jia

Otherwise world build on qemuloongarch64 failed

$ echo "MACHINE = 'qemuloongarch64'" >> conf/local.conf
$ bitbake world
ERROR: Nothing PROVIDES 'libseccomp' (but meta-virtualization/recipes-containers/docker/docker-moby_26.0.2.bb DEPENDS on or otherwise requires it)
libseccomp was skipped: missing required distro feature 'seccomp' (not in DISTRO_FEATURES)
NOTE: Runtime target 'docker' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['docker', 'libseccomp']
ERROR: Required build target 'meta-world-pkgdata' has no buildable providers.
Missing or unbuildable dependency chain was: ['meta-world-pkgdata', 'docker-compose', 'docker', 'libseccomp']
---
 recipes-containers/docker/docker.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
recipes-containers/docker/docker.inc +1 -1
index 8aabd154..71f11074 100644
@@ -26,7 +26,7 @@ RPROVIDES:${PN}-dev += "docker-dev"
 RPROVIDES:${PN}-contrip += "docker-dev"
 
 inherit pkgconfig
-PACKAGECONFIG ??= "docker-init seccomp"
+PACKAGECONFIG ??= "docker-init ${@bb.utils.filter('DISTRO_FEATURES', 'seccomp', d)}"
 PACKAGECONFIG[seccomp] = "seccomp,,libseccomp"
 PACKAGECONFIG[docker-init] = ",,,docker-init"
 PACKAGECONFIG[transient-config] = "transient-config"
Signature · 1 line
2.34.1
#4 lore raw

Re: [meta-virtualization][PATCH 3/3] docker.inc: use DISTRO_FEATURES to filter seccomp from PACKAGECONFIG

Quoted 32 lines · hongxu via lists.yoctoproject.org

Otherwise world build on qemuloongarch64 failed

$ echo "MACHINE = 'qemuloongarch64'" >> conf/local.conf
$ bitbake world
ERROR: Nothing PROVIDES 'libseccomp' (but
meta-virtualization/recipes-containers/docker/docker-moby_26.0.2.bb
DEPENDS on or otherwise requires it)
libseccomp was skipped: missing required distro feature 'seccomp' (not in
DISTRO_FEATURES)
NOTE: Runtime target 'docker' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['docker', 'libseccomp']
ERROR: Required build target 'meta-world-pkgdata' has no buildable
providers.
Missing or unbuildable dependency chain was: ['meta-world-pkgdata',
'docker-compose', 'docker', 'libseccomp']
---
 recipes-containers/docker/docker.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
recipes-containers/docker/docker.inc +1 -1
index 8aabd154..71f11074 100644
@@ -26,7 +26,7 @@ RPROVIDES:${PN}-dev += "docker-dev"
 RPROVIDES:${PN}-contrip += "docker-dev"
 
 inherit pkgconfig
-PACKAGECONFIG ??= "docker-init seccomp"
+PACKAGECONFIG ??= "docker-init ${@bb.utils.filter('DISTRO_FEATURES',
Quoted 2 lines

'seccomp', d)}"

I won't take this patch for two reasons:

- The packageconfig should be independent of the disro feature (and in fact predates it)
- docker won't actually run without seccomp, so this should be a feature check and forced in the packageconfig

I've made the seccomp check changes locally and will push them when I'm back from holidays.

longarch64 should be marked incompatible with this recipe.

Bruce

Quoted 18 lines

PACKAGECONFIG[seccomp] = "seccomp,,libseccomp" PACKAGECONFIG[docker-init] = ",,,docker-init" PACKAGECONFIG[transient-config] = "transient-config"
--
2.34.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#9065):
https://lists.yoctoproject.org/g/meta-virtualization/message/9065
Mute This Topic: https://lists.yoctoproject.org/mt/110315546/1050810
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Signature · 3 lines
- Thou shalt not follow the NULL pointer, for chaos and madness await thee
at its end
- "Use the force Harry" - Gandalf, Star Trek II
#5 lore raw
In reply to Hongxu Jia
Quoted 6 lines · hongxu via lists.yoctoproject.org

The go related recipe (such as docker-moby, podman) inherited goarch.bbclass in which centralize definition of COMPATIBLE_HOST

Due to the packagegroup runtime depends on these go related recipes, inherits goarch.bbclass to apply the same COMPATIBLE_HOST

Quoted 14 lines
$ echo "MACHINE = 'qemuppc'" >> conf/local.conf
$ bitbake world
ERROR: Nothing RPROVIDES 'podman' (but
meta-virtualization/recipes-core/packagegroups/packagegroup-container.bb
RDEPENDS on or otherwise requires it)
podman was skipped: incompatible with host powerpc-wrs-linux (not in
COMPATIBLE_HOST)
NOTE: Runtime target 'podman' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['podman']
ERROR: Required build target 'meta-world-pkgdata' has no buildable
providers.
Missing or unbuildable dependency chain was: ['meta-world-pkgdata',
'packagegroup-container', 'podman']

Is this also happening for supported architectures ? It may be that you picked a bad example, but these recipes are absolutely not supported for ppc, so I'd expect them to fail.

Bruce

Quoted 36 lines
---
 recipes-core/packagegroups/packagegroup-container.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
recipes-core/packagegroups/packagegroup-container.bb +0 -0
index 21402d65..3e2d2a25 100644
@@ -2,7 +2,7 @@ SUMMARY = "All packages for container host"
 LICENSE = "MIT"
 LIC_FILES_CHKSUM =

"file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"

recipes-core/packagegroups/packagegroup-container.bb +1 -2
-inherit packagegroup
+inherit packagegroup goarch
 
 COMPATIBLE_HOST = "^(?!(mips|riscv)).*"
 
--

2.34.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#9063):
https://lists.yoctoproject.org/g/meta-virtualization/message/9063
Mute This Topic: https://lists.yoctoproject.org/mt/110315544/1050810
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Signature · 3 lines
- Thou shalt not follow the NULL pointer, for chaos and madness await thee
at its end
- "Use the force Harry" - Gandalf, Star Trek II