Skip to content

OCI multi-layer fixes for dnf5 and nginx

Tim Orling yocto-meta-virtualization 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v2 Latest3 patches 0 repliesNew

Changes in v2 from the cover letter

- Patch 1: the commit message now explains the root cause. Under pseudo, rpm sees uid 0 and chowns the rpmdb directory it creates to 0:0. The layer rootfs is not tracked, so that chown is real, and bitbake's network-isolation user namespace has no mapping for uid 0, so it fails with EINVAL. dnf4 ignored that failure; dnf5 does not.
- Patch 1: also explains why the layer install cannot run with pseudo disabled instead: rpm still chroots into the install root for every transaction. That was tried on the autobuilder, and every package layer came out empty with "Rpm transaction failed".
- All patches: no AI attribution in the code, comments cut to one line, steps to reproduce added to the commit messages.
- Sent with the konsulko.com address in the From: header, so the author survives the list.

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3image-oci: track multi-layer rootfs directories with pseudoclasses/image-oci.bbclass+2 -00 replies
2/3container-volatile-fixup: run after empty_var_volatileclasses/container-volatile-fixup.bbclass+2 -10 replies
3/3app-container-nginx: create /run/nginx and /var/log/nginx in rootfsrecipes-containers/images/app-container-nginx.bb+6 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [meta-virtualization][PATCH v2 0/3] OCI multi-layer fixes for dnf5 and nginx

Since oe-core moved to dnf 5.4.7.0, every OCI_LAYER_MODE = "multi" image fails to install its packages: layers, because the layer rootfs under ${WORKDIR}/oci-layer-rootfs is not tracked by pseudo. Patch 1 fixes that.

Patches 2 and 3 fix the long-standing "OCI: Directory not found in IMAGE_ROOTFS" warnings from app-container-nginx: empty_var_volatile was wiping the container-volatile-fixup directories, and nginx's /run and /var/log directories are never created outside of boot-time tmpfiles.d.

Tested with the containers-library autobuilder target (aarch64 and x86-64): all containers build with no warnings.

[YOCTO #16531]

Changes in v2:
- Patch 1: the commit message now explains the root cause. Under pseudo, rpm sees uid 0 and chowns the rpmdb directory it creates to 0:0. The layer rootfs is not tracked, so that chown is real, and bitbake's network-isolation user namespace has no mapping for uid 0, so it fails with EINVAL. dnf4 ignored that failure; dnf5 does not.
- Patch 1: also explains why the layer install cannot run with pseudo disabled instead: rpm still chroots into the install root for every transaction. That was tried on the autobuilder, and every package layer came out empty with "Rpm transaction failed".
- All patches: no AI attribution in the code, comments cut to one line, steps to reproduce added to the commit messages.
- Sent with the konsulko.com address in the From: header, so the author survives the list.

Tim Orling (3):
image-oci: track multi-layer rootfs directories with pseudo
container-volatile-fixup: run after empty_var_volatile
app-container-nginx: create /run/nginx and /var/log/nginx in rootfs

 classes/container-volatile-fixup.bbclass         | 3 ++-
 classes/image-oci.bbclass                        | 2 ++
 recipes-containers/images/app-container-nginx.bb | 6 ++++++
 3 files changed, 10 insertions(+), 1 deletion(-)

base-commit: 89b00d096a432000766729cd721ae647af500112

Signature · 1 line
2.56.1