From 86763846ae4295f5978de191f9ee538d2fd4f6b7 Mon Sep 17 00:00:00 2001 From: Francisco Gil Date: Wed, 27 May 2026 11:02:39 +0200 Subject: [PATCH] dcp: remove CONTAINER_NAME variable and rename CONTAINER_TYPE Now CONTAINER_TYPE is named DCP_NAME Signed-off-by: Francisco Gil --- meta-digi-containers/README.md | 38 +++++++++---------- .../configs_lxc/config_lxc_ccimx95-dvk | 6 +-- .../custom/configs_lxc/config_lxc_ccimx95-dvk | 4 +- .../custom/configs_lxc/config_lxc_ccmp25-dvk | 4 +- .../configs_lxc/config_lxc_ccimx95-dvk | 6 +-- .../flutter/configs_lxc/config_lxc_ccmp25-dvk | 6 +-- .../lvgl/configs_lxc/config_lxc_ccimx95-dvk | 6 +-- .../lvgl/configs_lxc/config_lxc_ccmp25-dvk | 6 +-- .../webkit/configs_lxc/config_lxc_ccimx95-dvk | 6 +-- .../webkit/configs_lxc/config_lxc_ccmp25-dvk | 6 +-- .../images/dey-image-dcp-artifact.inc | 4 +- .../images/dey-image-dcp-fragments.inc | 19 ++++++---- .../recipes-core/images/dey-image-dcp-lxc.inc | 5 ++- .../images/dey-image-dcp-podman.inc | 2 +- .../recipes-core/images/dey-image-dcp.bb | 20 +++++----- meta-digi-containers/scripts/generate-dcp.py | 2 +- 16 files changed, 72 insertions(+), 68 deletions(-) diff --git a/meta-digi-containers/README.md b/meta-digi-containers/README.md index a6171f6b1..8be35b9cd 100644 --- a/meta-digi-containers/README.md +++ b/meta-digi-containers/README.md @@ -84,7 +84,7 @@ Notes: - If the input manifest provides `package_id`, that value is kept unchanged. - The output file name is always derived from the generated package ID and manifest fields as: - - `_artifact__.tar.gz` + - `--.tar.gz` - For Podman payloads, the final internal payload name is always `payload/image.tar` - For LXC payloads, the generator requires a Yocto-style `.tar.gz` bundle, validates its layout, and stores it inside the DCP using the original file name and format without re-packaging it. @@ -104,7 +104,7 @@ python3 meta-digi-containers/scripts/generate-dcp.py \ This generates a bundle named like: -- `./flutter-demo-_artifact_podman_ccmp25-dvk.tar.gz` +- `./flutter-demo--podman-ccmp25-dvk.tar.gz` In those manifests: @@ -164,12 +164,11 @@ Set profile and naming in `conf/local.conf`: ```conf DISTRO_FEATURES:append = " virtualization" -CONTAINER_TYPE = "webkit" # or: lvgl, flutter, custom profile -CONTAINER_NAME = "webkit-example" -# PODMAN_TAG defaults to "${CONTAINER_NAME}-tag" +DCP_NAME = "webkit" # or: lvgl, chromium, flutter, custom profile +# PODMAN_TAG defaults to "${DCP_NAME}-tag" ``` -If `CONTAINER_TYPE` is not set, `dey-image-dcp` now defaults to `lvgl`. +If `DCP_NAME` is not set, `dey-image-dcp` now defaults to `lvgl`. Build: @@ -183,8 +182,8 @@ Outputs are generated in: Final outputs: -- `${CONTAINER_NAME}-_artifact_podman_.tar.gz` -- `${CONTAINER_NAME}-_artifact_lxc_.tar.gz` +- `${DCP_NAME}--podman-.tar.gz` +- `${DCP_NAME}--lxc-.tar.gz` Notes: @@ -193,7 +192,7 @@ Notes: base36-encoded millisecond timestamp suffix, stores the generated `package_id` in the final `manifest.json`, and uses it in the DCP file name. - In Yocto builds, `dey-image-dcp` keeps that unique-name behavior and - removes older DCP artifacts with the same `${CONTAINER_NAME}` prefix before + removes older DCP artifacts with the same `${DCP_NAME}` prefix before generating the new one, so the deploy directory does not keep accumulating previous builds of the same container/runtime. @@ -205,8 +204,8 @@ creating the final DCP artifacts, then removed at the end of artifact creation. Profile-specific behavior is controlled with: -- `CONTAINER_TYPE` -- `OVERRIDES:append = ":container-${CONTAINER_TYPE}"` (handled in recipe) +- `DCP_NAME` +- `OVERRIDES:append = ":container-${DCP_NAME}"` (handled in recipe) Current built-in profile examples: @@ -219,9 +218,8 @@ You can add new profiles by appending variables with `:container-` overrid For customer-defined profiles, use: ```conf -CONTAINER_TYPE = "myprofile" -CONTAINER_NAME = "myprofile-demo" -PODMAN_TAG = "myprofile-demo-tag" +DCP_NAME = "myprofile" +PODMAN_TAG = "myprofile-tag" IMAGE_INSTALL:append:container-myprofile = " package-a package-b" CONTAINER_INIT_MANAGER:container-myprofile = "/usr/bin/docker-init" @@ -250,14 +248,14 @@ Notes: - Multiple entries are supported (space-separated). - `*.sh` files copied from overlay directories are marked executable automatically. - If `CONTAINER_ROOTFS_OVERLAY_DIRS` is not set - and `containers/${CONTAINER_TYPE}/rootfs_files` exists, + and `containers/${DCP_NAME}/rootfs_files` exists, it is used automatically. ## LXC Fragment Configuration LXC fragments are loaded from: -- `containers/${CONTAINER_TYPE}/configs_lxc/` +- `containers/${DCP_NAME}/configs_lxc/` Config file naming: @@ -273,7 +271,7 @@ Supported placeholders in LXC config fragments: - `@LXC_ARCH@` - `@LXC_FOLDER@` -- `@CONTAINER_NAME@` +- `@DCP_NAME@` - `@CONTAINER_INIT_MANAGER@` - `@CONTAINER_INIT_SCRIPT@` @@ -304,7 +302,7 @@ The artifact manifest is generated automatically and includes: Relevant variables: -- `CONTAINER_NAME` +- `DCP_NAME` - `CONTAINER_FRIENDLY_NAME` - `CONTAINER_ARTIFACT_VERSION` - `CONTAINER_CREATE_ARGS_PODMAN` @@ -327,7 +325,7 @@ and the template contains `metadata/`, it is copied into final artifact bundles. `manifest.json`, `payload/*`, and `checksums/sha256sums.txt` are always generated during build time and should not be pre-created in the template. -If `CONTAINER_ARTIFACT_TEMPLATE_DIR` is not set and `containers/${CONTAINER_TYPE}/artifact` exists, +If `CONTAINER_ARTIFACT_TEMPLATE_DIR` is not set and `containers/${DCP_NAME}/artifact` exists, it is used automatically. ## Container Folder Layout @@ -358,7 +356,7 @@ To create a new profile: 1. Create `containers//configs_lxc/config_lxc_`. 2. Optionally add `containers//rootfs_files/` for rootfs content. -3. Set `CONTAINER_TYPE = ""` in `local.conf`. +3. Set `DCP_NAME = ""` in `local.conf`. 4. Add profile packages with `IMAGE_INSTALL:append:container- = " ... "`. ## Notes diff --git a/meta-digi-containers/containers/chromium/configs_lxc/config_lxc_ccimx95-dvk b/meta-digi-containers/containers/chromium/configs_lxc/config_lxc_ccimx95-dvk index 314d07f95..f53cf2238 100644 --- a/meta-digi-containers/containers/chromium/configs_lxc/config_lxc_ccimx95-dvk +++ b/meta-digi-containers/containers/chromium/configs_lxc/config_lxc_ccimx95-dvk @@ -1,8 +1,8 @@ # LXC config for Chromium on CCIMX95. # Placeholders are replaced by the image recipe. lxc.arch = @LXC_ARCH@ -lxc.rootfs.path = dir:@LXC_FOLDER@/@CONTAINER_NAME@/rootfs -lxc.uts.name = @CONTAINER_NAME@ +lxc.rootfs.path = dir:@LXC_FOLDER@/@DCP_NAME@/rootfs +lxc.uts.name = @DCP_NAME@ lxc.mount.auto = cgroup:mixed proc:mixed lxc.mount.entry = /sys sys none bind,create=dir @@ -12,7 +12,7 @@ lxc.mount.entry = tmpfs run tmpfs rw,nosuid,nodev,mode=0755,create=dir lxc.net.0.type = none lxc.init.cmd = @CONTAINER_INIT_MANAGER@ @CONTAINER_INIT_SCRIPT@ -lxc.console.logfile = @LXC_FOLDER@/@CONTAINER_NAME@/console.log +lxc.console.logfile = @LXC_FOLDER@/@DCP_NAME@/console.log lxc.environment = 'PS1=chromium-ccimx95:\w$ ' lxc.mount.entry = tmpfs dev/shm tmpfs rw,nosuid,nodev,mode=1777,create=dir lxc.mount.entry = /etc/resolv.conf etc/resolv.conf none bind,ro,create=file diff --git a/meta-digi-containers/containers/custom/configs_lxc/config_lxc_ccimx95-dvk b/meta-digi-containers/containers/custom/configs_lxc/config_lxc_ccimx95-dvk index b526c0df3..e9d05dd19 100644 --- a/meta-digi-containers/containers/custom/configs_lxc/config_lxc_ccimx95-dvk +++ b/meta-digi-containers/containers/custom/configs_lxc/config_lxc_ccimx95-dvk @@ -1,8 +1,8 @@ # LXC base config for custom profile on CCIMX95. # Placeholders are replaced by the image recipe. lxc.arch = @LXC_ARCH@ -lxc.rootfs.path = dir:@LXC_FOLDER@/@CONTAINER_NAME@/rootfs -lxc.uts.name = @CONTAINER_NAME@ +lxc.rootfs.path = dir:@LXC_FOLDER@/@DCP_NAME@/rootfs +lxc.uts.name = @DCP_NAME@ lxc.mount.auto = cgroup:mixed proc:mixed lxc.mount.entry = /sys sys none bind,create=dir diff --git a/meta-digi-containers/containers/custom/configs_lxc/config_lxc_ccmp25-dvk b/meta-digi-containers/containers/custom/configs_lxc/config_lxc_ccmp25-dvk index 3d513c330..0139342b5 100644 --- a/meta-digi-containers/containers/custom/configs_lxc/config_lxc_ccmp25-dvk +++ b/meta-digi-containers/containers/custom/configs_lxc/config_lxc_ccmp25-dvk @@ -1,8 +1,8 @@ # LXC base config for custom profile on CCMP25. # Placeholders are replaced by the image recipe. lxc.arch = @LXC_ARCH@ -lxc.rootfs.path = dir:@LXC_FOLDER@/@CONTAINER_NAME@/rootfs -lxc.uts.name = @CONTAINER_NAME@ +lxc.rootfs.path = dir:@LXC_FOLDER@/@DCP_NAME@/rootfs +lxc.uts.name = @DCP_NAME@ lxc.mount.auto = cgroup:mixed proc:mixed lxc.mount.entry = /sys sys none bind,create=dir diff --git a/meta-digi-containers/containers/flutter/configs_lxc/config_lxc_ccimx95-dvk b/meta-digi-containers/containers/flutter/configs_lxc/config_lxc_ccimx95-dvk index 737867503..40825f38c 100644 --- a/meta-digi-containers/containers/flutter/configs_lxc/config_lxc_ccimx95-dvk +++ b/meta-digi-containers/containers/flutter/configs_lxc/config_lxc_ccimx95-dvk @@ -1,8 +1,8 @@ # LXC config for Flutter on CCIMX95. # Placeholders are replaced by the image recipe. lxc.arch = @LXC_ARCH@ -lxc.rootfs.path = dir:@LXC_FOLDER@/@CONTAINER_NAME@/rootfs -lxc.uts.name = @CONTAINER_NAME@ +lxc.rootfs.path = dir:@LXC_FOLDER@/@DCP_NAME@/rootfs +lxc.uts.name = @DCP_NAME@ lxc.mount.auto = cgroup:mixed proc:mixed lxc.mount.entry = /sys sys none bind,create=dir @@ -15,7 +15,7 @@ lxc.environment = 'PS1=flutter-ccimx95:\w$ ' lxc.net.0.type = empty lxc.init.cmd = @CONTAINER_INIT_MANAGER@ @CONTAINER_INIT_SCRIPT@ -lxc.console.logfile = @LXC_FOLDER@/@CONTAINER_NAME@/console.log +lxc.console.logfile = @LXC_FOLDER@/@DCP_NAME@/console.log lxc.mount.entry = tmpfs dev/shm tmpfs rw,nosuid,nodev,mode=1777,create=dir lxc.mount.entry = /dev/dri dev/dri none bind,create=dir lxc.mount.entry = /dev/input dev/input none bind,create=dir diff --git a/meta-digi-containers/containers/flutter/configs_lxc/config_lxc_ccmp25-dvk b/meta-digi-containers/containers/flutter/configs_lxc/config_lxc_ccmp25-dvk index 7695502ce..a822f9a0c 100644 --- a/meta-digi-containers/containers/flutter/configs_lxc/config_lxc_ccmp25-dvk +++ b/meta-digi-containers/containers/flutter/configs_lxc/config_lxc_ccmp25-dvk @@ -1,8 +1,8 @@ # LXC config for Flutter on CCMP25. # Placeholders are replaced by the image recipe. lxc.arch = @LXC_ARCH@ -lxc.rootfs.path = dir:@LXC_FOLDER@/@CONTAINER_NAME@/rootfs -lxc.uts.name = @CONTAINER_NAME@ +lxc.rootfs.path = dir:@LXC_FOLDER@/@DCP_NAME@/rootfs +lxc.uts.name = @DCP_NAME@ lxc.mount.auto = cgroup:mixed proc:mixed lxc.mount.entry = /sys sys none bind,create=dir @@ -15,7 +15,7 @@ lxc.environment = 'PS1=flutter-ccmp25:\w$ ' lxc.net.0.type = empty lxc.init.cmd = @CONTAINER_INIT_MANAGER@ @CONTAINER_INIT_SCRIPT@ -lxc.console.logfile = @LXC_FOLDER@/@CONTAINER_NAME@/console.log +lxc.console.logfile = @LXC_FOLDER@/@DCP_NAME@/console.log lxc.mount.entry = tmpfs dev/shm tmpfs rw,nosuid,nodev,mode=1777,create=dir lxc.mount.entry = /dev/dri dev/dri none bind,create=dir lxc.mount.entry = /dev/input dev/input none bind,create=dir diff --git a/meta-digi-containers/containers/lvgl/configs_lxc/config_lxc_ccimx95-dvk b/meta-digi-containers/containers/lvgl/configs_lxc/config_lxc_ccimx95-dvk index f36448943..84e4aed6a 100644 --- a/meta-digi-containers/containers/lvgl/configs_lxc/config_lxc_ccimx95-dvk +++ b/meta-digi-containers/containers/lvgl/configs_lxc/config_lxc_ccimx95-dvk @@ -1,8 +1,8 @@ # LXC config for LVGL on CCIMX95. # Placeholders are replaced by the image recipe. lxc.arch = @LXC_ARCH@ -lxc.rootfs.path = dir:@LXC_FOLDER@/@CONTAINER_NAME@/rootfs -lxc.uts.name = @CONTAINER_NAME@ +lxc.rootfs.path = dir:@LXC_FOLDER@/@DCP_NAME@/rootfs +lxc.uts.name = @DCP_NAME@ lxc.mount.auto = cgroup:mixed proc:mixed lxc.mount.entry = /sys sys none bind,create=dir @@ -15,7 +15,7 @@ lxc.environment = 'PS1=\h:\w$ ' lxc.net.0.type = empty lxc.init.cmd = @CONTAINER_INIT_MANAGER@ @CONTAINER_INIT_SCRIPT@ -lxc.console.logfile = @LXC_FOLDER@/@CONTAINER_NAME@/console.log +lxc.console.logfile = @LXC_FOLDER@/@DCP_NAME@/console.log lxc.mount.entry = /dev/dri dev/dri none bind,create=dir lxc.mount.entry = /dev/input dev/input none bind,create=dir lxc.mount.entry = tmpfs dev/shm tmpfs rw,nosuid,nodev,mode=1777,create=dir diff --git a/meta-digi-containers/containers/lvgl/configs_lxc/config_lxc_ccmp25-dvk b/meta-digi-containers/containers/lvgl/configs_lxc/config_lxc_ccmp25-dvk index 32c66659e..984c83483 100644 --- a/meta-digi-containers/containers/lvgl/configs_lxc/config_lxc_ccmp25-dvk +++ b/meta-digi-containers/containers/lvgl/configs_lxc/config_lxc_ccmp25-dvk @@ -1,8 +1,8 @@ # LXC config for LVGL on CCMP25. # Placeholders are replaced by the image recipe. lxc.arch = @LXC_ARCH@ -lxc.rootfs.path = dir:@LXC_FOLDER@/@CONTAINER_NAME@/rootfs -lxc.uts.name = @CONTAINER_NAME@ +lxc.rootfs.path = dir:@LXC_FOLDER@/@DCP_NAME@/rootfs +lxc.uts.name = @DCP_NAME@ lxc.mount.auto = cgroup:mixed proc:mixed lxc.mount.entry = /sys sys none bind,create=dir @@ -15,7 +15,7 @@ lxc.environment = 'PS1=\h:\w$ ' lxc.net.0.type = empty lxc.init.cmd = @CONTAINER_INIT_MANAGER@ @CONTAINER_INIT_SCRIPT@ -lxc.console.logfile = @LXC_FOLDER@/@CONTAINER_NAME@/console.log +lxc.console.logfile = @LXC_FOLDER@/@DCP_NAME@/console.log lxc.mount.entry = tmpfs dev/shm tmpfs rw,nosuid,nodev,mode=1777,create=dir lxc.mount.entry = /dev/dri dev/dri none bind,create=dir lxc.mount.entry = /dev/input dev/input none bind,create=dir diff --git a/meta-digi-containers/containers/webkit/configs_lxc/config_lxc_ccimx95-dvk b/meta-digi-containers/containers/webkit/configs_lxc/config_lxc_ccimx95-dvk index 1f52d8d6b..d89ef7481 100644 --- a/meta-digi-containers/containers/webkit/configs_lxc/config_lxc_ccimx95-dvk +++ b/meta-digi-containers/containers/webkit/configs_lxc/config_lxc_ccimx95-dvk @@ -1,8 +1,8 @@ # LXC config for WebKit on CCIMX95. # Placeholders are replaced by the image recipe. lxc.arch = @LXC_ARCH@ -lxc.rootfs.path = dir:@LXC_FOLDER@/@CONTAINER_NAME@/rootfs -lxc.uts.name = @CONTAINER_NAME@ +lxc.rootfs.path = dir:@LXC_FOLDER@/@DCP_NAME@/rootfs +lxc.uts.name = @DCP_NAME@ lxc.mount.auto = cgroup:mixed proc:mixed lxc.mount.entry = /sys sys none bind,create=dir @@ -12,7 +12,7 @@ lxc.mount.entry = tmpfs run tmpfs rw,nosuid,nodev,mode=0755,create=dir lxc.net.0.type = none lxc.init.cmd = @CONTAINER_INIT_MANAGER@ @CONTAINER_INIT_SCRIPT@ -lxc.console.logfile = @LXC_FOLDER@/@CONTAINER_NAME@/console.log +lxc.console.logfile = @LXC_FOLDER@/@DCP_NAME@/console.log lxc.environment = 'PS1=webkit-ccimx95:\w$ ' # audio diff --git a/meta-digi-containers/containers/webkit/configs_lxc/config_lxc_ccmp25-dvk b/meta-digi-containers/containers/webkit/configs_lxc/config_lxc_ccmp25-dvk index 66a96acf9..e99bc1bed 100644 --- a/meta-digi-containers/containers/webkit/configs_lxc/config_lxc_ccmp25-dvk +++ b/meta-digi-containers/containers/webkit/configs_lxc/config_lxc_ccmp25-dvk @@ -1,8 +1,8 @@ # LXC config for WebKit on CCMP25. # Placeholders are replaced by the image recipe. lxc.arch = @LXC_ARCH@ -lxc.rootfs.path = dir:@LXC_FOLDER@/@CONTAINER_NAME@/rootfs -lxc.uts.name = @CONTAINER_NAME@ +lxc.rootfs.path = dir:@LXC_FOLDER@/@DCP_NAME@/rootfs +lxc.uts.name = @DCP_NAME@ lxc.mount.auto = cgroup:mixed proc:mixed lxc.mount.entry = /sys sys none bind,create=dir @@ -12,7 +12,7 @@ lxc.mount.entry = tmpfs run tmpfs rw,nosuid,nodev,mode=0755,create=dir lxc.net.0.type = none lxc.init.cmd = @CONTAINER_INIT_MANAGER@ @CONTAINER_INIT_SCRIPT@ -lxc.console.logfile = @LXC_FOLDER@/@CONTAINER_NAME@/console.log +lxc.console.logfile = @LXC_FOLDER@/@DCP_NAME@/console.log lxc.environment = 'PS1=webkit-ccmp25:\w$ ' # audio diff --git a/meta-digi-containers/recipes-core/images/dey-image-dcp-artifact.inc b/meta-digi-containers/recipes-core/images/dey-image-dcp-artifact.inc index 784e54505..fe08ced51 100644 --- a/meta-digi-containers/recipes-core/images/dey-image-dcp-artifact.inc +++ b/meta-digi-containers/recipes-core/images/dey-image-dcp-artifact.inc @@ -15,7 +15,7 @@ do_clean_old_container_artifacts() { fi for runtime in lxc podman; do - old_artifact_glob="${DEPLOY_DIR_IMAGE}/${CONTAINER_NAME}-*_artifact_${runtime}_${primary_device_type}.tar.gz" + old_artifact_glob="${DEPLOY_DIR_IMAGE}/${DCP_NAME}-*-${runtime}-${primary_device_type}.tar.gz" bbnote "Removing old ${runtime} container artifacts matching ${old_artifact_glob}" rm -f ${old_artifact_glob} done @@ -69,7 +69,7 @@ do_image_container_artifacts() { manifest_path="$2" create_args="$3" build_id="$4" - NAME="${CONTAINER_NAME}" \ + NAME="${DCP_NAME}" \ FRIENDLY_NAME="${CONTAINER_FRIENDLY_NAME}" \ VERSION="${CONTAINER_ARTIFACT_VERSION}" \ RUNTIME="${runtime}" \ diff --git a/meta-digi-containers/recipes-core/images/dey-image-dcp-fragments.inc b/meta-digi-containers/recipes-core/images/dey-image-dcp-fragments.inc index dc9a4d844..5bd572b78 100644 --- a/meta-digi-containers/recipes-core/images/dey-image-dcp-fragments.inc +++ b/meta-digi-containers/recipes-core/images/dey-image-dcp-fragments.inc @@ -46,12 +46,17 @@ apply_container_rootfs_overlays() { ROOTFS_POSTPROCESS_COMMAND += "apply_container_rootfs_runtime_defaults; " apply_container_rootfs_runtime_defaults() { - if [ -n "${CONTAINER_INIT_SCRIPT}" ] && \ - [ -f "${IMAGE_ROOTFS}${CONTAINER_INIT_SCRIPT}" ] && \ - grep -q "@WAYLAND_DISPLAY@" "${IMAGE_ROOTFS}${CONTAINER_INIT_SCRIPT}"; then + placeholder_files="$(grep -rl "@WAYLAND_DISPLAY@" "${IMAGE_ROOTFS}" 2>/dev/null || true)" + + if [ -z "${placeholder_files}" ]; then + return 0 + fi + + printf '%s\n' "${placeholder_files}" | while IFS= read -r placeholder_file; do + [ -n "${placeholder_file}" ] || continue sed -i \ -e "s|@WAYLAND_DISPLAY@|${WAYLAND_DISPLAY}|g" \ - "${IMAGE_ROOTFS}${CONTAINER_INIT_SCRIPT}" - bbnote "Applied WAYLAND_DISPLAY='${WAYLAND_DISPLAY}' to ${IMAGE_ROOTFS}${CONTAINER_INIT_SCRIPT}" - fi -} \ No newline at end of file + "${placeholder_file}" + bbnote "Applied WAYLAND_DISPLAY='${WAYLAND_DISPLAY}' to ${placeholder_file}" + done +} diff --git a/meta-digi-containers/recipes-core/images/dey-image-dcp-lxc.inc b/meta-digi-containers/recipes-core/images/dey-image-dcp-lxc.inc index 3553beaed..99c63e594 100644 --- a/meta-digi-containers/recipes-core/images/dey-image-dcp-lxc.inc +++ b/meta-digi-containers/recipes-core/images/dey-image-dcp-lxc.inc @@ -30,15 +30,16 @@ do_image_lxc_bundle() { config_in="${LXC_CONFIG_FILE}" if [ ! -f "${config_in}" ]; then - bbfatal "LXC config file not found for CONTAINER_TYPE='${CONTAINER_TYPE}' and MACHINE='${MACHINE}': ${config_in}" + bbfatal "LXC config file not found for DCP_NAME='${DCP_NAME}' and MACHINE='${MACHINE}': ${config_in}" fi sed \ -e "s|@LXC_ARCH@|${TARGET_ARCH}|g" \ -e "s|@LXC_FOLDER@|${LXC_FOLDER}|g" \ - -e "s|@CONTAINER_NAME@|${CONTAINER_NAME}|g" \ + -e "s|@DCP_NAME@|${DCP_NAME}|g" \ -e "s|@CONTAINER_INIT_MANAGER@|${CONTAINER_INIT_MANAGER}|g" \ -e "s|@CONTAINER_INIT_SCRIPT@|${CONTAINER_INIT_SCRIPT}|g" \ + -e "s|@WAYLAND_DISPLAY@|${WAYLAND_DISPLAY}|g" \ "${config_in}" > "${lxc_dir}/config" tar -C "${lxc_dir}" -czf "${lxc_tar}" config rootfs diff --git a/meta-digi-containers/recipes-core/images/dey-image-dcp-podman.inc b/meta-digi-containers/recipes-core/images/dey-image-dcp-podman.inc index a4766dcd1..6d9a04b6a 100644 --- a/meta-digi-containers/recipes-core/images/dey-image-dcp-podman.inc +++ b/meta-digi-containers/recipes-core/images/dey-image-dcp-podman.inc @@ -11,7 +11,7 @@ do_image_podman_archive() { src_tar="${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs-oci.tar" fi dst_tar="${DEPLOY_DIR_IMAGE}/${PODMAN_OUTPUT_NAME}" - image_ref="${CONTAINER_NAME}:${PODMAN_TAG}" + image_ref="${DCP_NAME}:${PODMAN_TAG}" if [ ! -f "${src_tar}" ]; then bbfatal "Expected OCI tarball not found: ${src_tar}" diff --git a/meta-digi-containers/recipes-core/images/dey-image-dcp.bb b/meta-digi-containers/recipes-core/images/dey-image-dcp.bb index 8d413d47b..b6455c014 100644 --- a/meta-digi-containers/recipes-core/images/dey-image-dcp.bb +++ b/meta-digi-containers/recipes-core/images/dey-image-dcp.bb @@ -21,18 +21,18 @@ NO_RECOMMENDATIONS = "1" ######################## # Container profile ######################## -# Select profile in local.conf (e.g. CONTAINER_TYPE = "lvgl", "webkit" or "flutter"). -# Defaults to "lvgl" when not set by the build configuration. -CONTAINER_TYPE ?= "lvgl" -OVERRIDES:append = ":container-${CONTAINER_TYPE}" +# Select the profile in local.conf (e.g. DCP_NAME = "lvgl", "webkit", +# "chromium" or "flutter"). Defaults to "lvgl" when not set by the build +# configuration. +DCP_NAME ?= "lvgl" +OVERRIDES:append = ":container-${DCP_NAME}" ######################## # Container runtime knobs ######################## CONTAINER_INIT_MANAGER ?= "/usr/bin/docker-init" CONTAINER_INIT_SCRIPT ?= "sleep infinity" -CONTAINER_NAME ?= "${CONTAINER_TYPE}-container" -CONTAINER_PROFILE_DIR ?= "${CONTAINERS_DIR}/${CONTAINER_TYPE}" +CONTAINER_PROFILE_DIR ?= "${CONTAINERS_DIR}/${DCP_NAME}" CONTAINER_ROOTFS_OVERLAY_DIRS ?= "" CONTAINER_DEFAULT_ROOTFS_DIR ?= "${CONTAINER_PROFILE_DIR}/rootfs_files" CONTAINER_ROOTFS_OVERLAY_TARBALLS ?= "" @@ -40,15 +40,15 @@ CONTAINER_ROOTFS_OVERLAY_TARBALLS ?= "" ######################## # Podman output knobs ######################## -PODMAN_TAG ?= "${CONTAINER_NAME}-tag" -PODMAN_OUTPUT_NAME ?= "${CONTAINER_NAME}_podman_${MACHINE}.tar" +PODMAN_TAG ?= "${DCP_NAME}-tag" +PODMAN_OUTPUT_NAME ?= "${DCP_NAME}_podman_${MACHINE}.tar" ######################## # LXC output knobs ######################## CONTAINERS_DIR ?= "${THISDIR}/../../containers" LXC_FOLDER ?= "/var/lib/lxc" -LXC_OUTPUT_NAME ?= "${CONTAINER_NAME}_lxc_${MACHINE}.tar.gz" +LXC_OUTPUT_NAME ?= "${DCP_NAME}_lxc_${MACHINE}.tar.gz" LXC_CONFIG_DIR ?= "${CONTAINER_PROFILE_DIR}/configs_lxc" LXC_CONFIG_FILE ?= "${LXC_CONFIG_DIR}/config_lxc_${MACHINE}" @@ -58,7 +58,7 @@ LXC_CONFIG_FILE ?= "${LXC_CONFIG_DIR}/config_lxc_${MACHINE}" CONTAINER_ARTIFACT_TEMPLATE_DIR ?= "" CONTAINER_DEFAULT_ARTIFACT_TEMPLATE_DIR ?= "${CONTAINER_PROFILE_DIR}/artifact" META_DIGI_REPO_DIR ?= "${THISDIR}/../../.." -CONTAINER_FRIENDLY_NAME ?= "${CONTAINER_NAME}" +CONTAINER_FRIENDLY_NAME ?= "${DCP_NAME}" CONTAINER_ARTIFACT_VERSION ?= "${PV}" CONTAINER_CREATE_ARGS ?= "" CONTAINER_CREATE_ARGS_PODMAN ?= "${CONTAINER_CREATE_ARGS}" diff --git a/meta-digi-containers/scripts/generate-dcp.py b/meta-digi-containers/scripts/generate-dcp.py index 88faad8d5..d9e8e30fb 100755 --- a/meta-digi-containers/scripts/generate-dcp.py +++ b/meta-digi-containers/scripts/generate-dcp.py @@ -201,7 +201,7 @@ def sha256(path: Path) -> str: def build_output_name(*, package_id: str, runtime: str, device_type: str) -> str: - return f"{package_id}_artifact_{runtime}_{device_type}.tar.gz" + return f"{package_id}-{runtime}-{device_type}.tar.gz" def ensure_lxc_layout(payload: Path) -> tuple[str, str]: