Skip to contentSkip to conversation

container-image-packagelists.inc: add list of container images

PATCH In review Tim Orling 3 participants 4 messages Jun 4 – Jun 10

lore
Share & tools
lore

Tim Orling

author
#0 lore raw

PATCH 1/2 container-image-packagelists.inc: add list of container images

Similar to ptest-packagelists.inc in oe-core, this list is used by container-image-multiarch.bb to provide common multiarch container support.

---
 conf/distro/include/container-image-packagelists.inc | 12 ++++++++++++
 1 file changed, 12 insertions(+)
 create mode 100644 conf/distro/include/container-image-packagelists.inc
conf/distro/include/container-image-packagelists.inc new file +12 -0
new file mode 100644
index 00000000..6a50d0bf
@@ -0,0 +1,12 @@
+#
+# List of the container-image recipes in meta-virt
+#
+
+CONTAINER_IMAGES_META_VIRT = "\
+    container-base \
+    app-container-curl \
+    app-container-mosquitto \
+    app-container-nginx \
+    app-container-python \
+    app-container-valkey \
+"
Signature · 1 line
2.54.0
author
#1 lore raw

PATCH 2/2 container-image-multiarch: add helper recipe

Similar to core-image-ptest.bb, this recipe uses mcextend to add multiarch support for any recipe in CONTAINER_IMAGES variable which is populated by the CONTAINER_IMAGES_META_VIRT variable in container-image-packagelists.inc.

---
 .../images/container-image-multiarch.bb       | 25 +++++++++++++++++++
 1 file changed, 25 insertions(+)
 create mode 100644 recipes-containers/images/container-image-multiarch.bb
recipes-containers/images/container-image-multiarch.bb new file +25 -0
new file mode 100644
index 00000000..d3b586f4
@@ -0,0 +1,25 @@
+inherit features_check
+REQUIRED_DISTRO_FEATURES = "vcontainer"
+
+require conf/distro/include/container-image-packagelists.inc
+
+DESCRIPTION += "Enable building the ${MCNAME} multiarch image."
+SUMMARY ?= "${MCNAME} multiarch image."
+HOMEPAGE ?= "https://www.yoctoproject.org/"
+LICENSE ?= "MIT"
+LIC_FILES_CHKSUM ?= "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+
+
+CONTAINER_IMAGES = "${CONTAINER_IMAGES_META_VIRT}"
+
+inherit oci-multiarch
+
+BBCLASSEXTEND = "${@' '.join(['mcextend:'+x for x in d.getVar('CONTAINER_IMAGES').split()])}"
+
+OCI_MULTIARCH_RECIPE = "${MCNAME}"
+OCI_MULTIARCH_PLATFORMS = "aarch64 x86_64"
+
+python () {
+    if not d.getVar("MCNAME"):
+        raise bb.parse.SkipRecipe("No class extension set")
+}
Signature · 1 line
2.54.0
#2 lore raw

Re: [meta-virtualization][PATCH 2/2] container-image-multiarch: add helper recipe

While I wait for my system level testing to complete, I'm going through the pending patches.

This one brought a question to mind.

Quoted 30 lines · Tim Orling via lists.yoctoproject.org

Similar to core-image-ptest.bb, this recipe uses mcextend to add multiarch support for any recipe in CONTAINER_IMAGES variable which is populated by the CONTAINER_IMAGES_META_VIRT variable in container-image-packagelists.inc.

---
 .../images/container-image-multiarch.bb       | 25 +++++++++++++++++++
 1 file changed, 25 insertions(+)
 create mode 100644 recipes-containers/images/container-image-multiarch.bb
recipes-containers/images/container-image-multiarch.bb new file +10 -0
new file mode 100644
index 00000000..d3b586f4
@@ -0,0 +1,25 @@
+inherit features_check
+REQUIRED_DISTRO_FEATURES = "vcontainer"
+
+require conf/distro/include/container-image-packagelists.inc
+
+DESCRIPTION += "Enable building the ${MCNAME} multiarch image."
+SUMMARY ?= "${MCNAME} multiarch image."
+HOMEPAGE ?= "https://www.yoctoproject.org/"
+LICENSE ?= "MIT"
+LIC_FILES_CHKSUM ?=

"file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"

recipes-containers/images/container-image-multiarch.bb line 13

Quoted 3 lines
recipes-containers/images/container-image-multiarch.bb new file +3 -0
+
+
+CONTAINER_IMAGES = "${CONTAINER_IMAGES_META_VIRT}"

This seems oddly tightly coupled to the .inc in the other patch. What's the value
of that list being in the .inc and then consuming it here (when there are no other
consumers).

What would be the future consumers of the variable/list ?

If this was to be something overridable, shouldn't that be a ?= assignement ?

Bruce

Quoted 28 lines
recipes-containers/images/container-image-multiarch.bb new file +4 -0
+
+inherit oci-multiarch
+
+BBCLASSEXTEND = "${@' '.join(['mcextend:'+x for x in

d.getVar('CONTAINER_IMAGES').split()])}"

recipes-containers/images/container-image-multiarch.bb new file +8 -1
+
+OCI_MULTIARCH_RECIPE = "${MCNAME}"
+OCI_MULTIARCH_PLATFORMS = "aarch64 x86_64"
+
+python () {
+    if not d.getVar("MCNAME"):
+        raise bb.parse.SkipRecipe("No class extension set")
+}
--

2.54.0

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#9848):
https://lists.yoctoproject.org/g/meta-virtualization/message/9848
Mute This Topic: https://lists.yoctoproject.org/mt/119639260/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
#3 lore raw

Re: [meta-virtualization][PATCH 2/2] container-image-multiarch: add helper recipe

Quoted 40 lines · Bruce Ashfield

While I wait for my system level testing to complete, I'm going through the pending patches.

This one brought a question to mind.

Quoted 32 lines · Tim Orling via lists.yoctoproject.org

Similar to core-image-ptest.bb, this recipe uses mcextend to add multiarch support for any recipe in CONTAINER_IMAGES variable which is populated by the CONTAINER_IMAGES_META_VIRT variable in container-image-packagelists.inc.

---
 .../images/container-image-multiarch.bb       | 25 +++++++++++++++++++
 1 file changed, 25 insertions(+)
 create mode 100644 recipes-containers/images/

container-image-multiarch.bb

recipes-containers/images/container-image-multiarch.bb new file +10 -0
new file mode 100644
index 00000000..d3b586f4
@@ -0,0 +1,25 @@
+inherit features_check
+REQUIRED_DISTRO_FEATURES = "vcontainer"
+
+require conf/distro/include/container-image-packagelists.inc
+
+DESCRIPTION += "Enable building the ${MCNAME} multiarch image."
+SUMMARY ?= "${MCNAME} multiarch image."
+HOMEPAGE ?= "https://www.yoctoproject.org/"
+LICENSE ?= "MIT"
+LIC_FILES_CHKSUM ?=

"file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"

recipes-containers/images/container-image-multiarch.bb new file +2 -0
+
+
Quoted 9 lines
Quoted 2 lines

+CONTAINER_IMAGES = "${CONTAINER_IMAGES_META_VIRT}"

This seems oddly tightly coupled to the .inc in the other patch. What's the value
of that list being in the .inc and then consuming it here (when there are no other
consumers).

You bring up a good point. In the ptest case there are multiple recipes (core-image-ptest, core-image-ptest-fast, core-image-ptest-all), but in our case we only have one consumer (containers-image-multiarch).

Quoted 6 lines

What would be the future consumers of the variable/list ?

If this was to be something overridable, shouldn't that be a ?= assignement ?

Also a good point. I'll fix both in v2.

Quoted 40 lines

Bruce

Quoted 17 lines
recipes-containers/images/container-image-multiarch.bb new file +4 -0
+
+inherit oci-multiarch
+
+BBCLASSEXTEND = "${@' '.join(['mcextend:'+x for x in

d.getVar('CONTAINER_IMAGES').split()])}"

recipes-containers/images/container-image-multiarch.bb new file +8 -1
+
+OCI_MULTIARCH_RECIPE = "${MCNAME}"
+OCI_MULTIARCH_PLATFORMS = "aarch64 x86_64"
+
+python () {
+    if not d.getVar("MCNAME"):
+        raise bb.parse.SkipRecipe("No class extension set")
+}
--

2.54.0

Quoted 11 lines

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

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