From: Bruce Ashfield <bruce.ashfield@gmail.com>
To: Tim Orling <tim.orling@konsulko.com>
Cc: meta-virtualization@lists.yoctoproject.org
Subject: Re: [meta-virtualization][PATCH 1/3] image-oci: track multi-layer rootfs directories with pseudo
Date: Sun, 22 Nov 2026 15:29:50 -0800 (PST) [thread overview]
Message-ID: <6b037aee.b322084d.36a5a7.c153@mx.google.com> (raw)
In-Reply-To: <20261122182910.35849-2-tim.orling@konsulko.com>
> Since oe-core moved to dnf 5.4.7.0, every layer install fails:
>
> error: cannot open Packages database in
> Failed to load system repo from root ".../oci-layer-rootfs/layer-1-base":
> rpmtsOpenDB failed: Invalid argument
>
> dnf creates var/lib/rpm in the layer rootfs but the rpmdb is never
> created, while do_rootfs of the same recipe installs the same packages
> successfully. The rpm macros (%_dbpath=/var/lib/rpm) and the
> RPM_CONFIGDIR/RPM_ETCCONFIGDIR environment are identical in both tasks;
> the only difference found is pseudo coverage of the install root.
Thanks for chasing this, I hadn't hit it yet since my oe-core is still
on dnf 4 and I haven't started my M2 update cycle.
This change tells me that tracking the layer rootfs with pseudo makes
the error go away, but not why rpm can't open its database without it.
Before going this way, I need to be sure. The OCI classes have been
moving ownership and special permissions out of pseudo, not into it
.. umoci runs rootless and records owners in its own xattrs, the
setuid/setgid bits are restored with pseudo disabled before each
repack, and the runtime bundles on master-next are archived by a
script that runs with pseudo disabled. The layer rootfs is copied into
the bundle with --no-owner --no-group anyway, so whatever pseudo
tracks there never makes it into the image. Adding pseudo coverage
only to get rpm to open its database goes against all of that.
What is dnf5/rpm doing in the installroot that fails with EINVAL when
the path isn't tracked? If we can find that, then there's a shot at
fixing that root cause. If not, it all needs to be captured in the
commit message.
> +# AI-generated (Claude Code, Claude Opus 5.5).
> +# Multi-layer package layers are installed by RpmPM/OpkgPM into
> +# ${WORKDIR}/oci-layer-rootfs/layer-N-<name> from do_image_oci, which runs
> +# under pseudo. Like ${WORKDIR}/rootfs for do_rootfs, the layer rootfs must
> +# be tracked by pseudo or dnf5/rpm6 cannot open the rpmdb in the installroot
> +# ("rpmtsOpenDB failed: Invalid argument"). Same approach as image.bbclass
> +# uses for MULTILIB_TEMP_ROOTFS.
> +PSEUDO_INCLUDE_PATHS .= ",${WORKDIR}/oci-layer-rootfs"
Two things here, and they apply to 2/3 and 3/3 as well.
The AI-Generated trailer in the commit message is fine, but I don't
want the attribution line in the code itself. It stays in the layer
long after anyone cares how the patch was written.
The comments are also too long, and mostly repeat the commit message.
A line or two on what the code is for is enough, the rest belongs in
the commit.
Finally, the patches came through the list as "Tim Orling via
meta-virtualization <ticotimo=gmail.com@lists.yoctoproject.org>" with
no From: in the body, so git am picks that up as the author and the
push gets rejected. If you send a v2 with --from (or format.from set)
the konsulko address will survive the list.
2/3 and 3/3 look right to me otherwise .. the inherit_defer ordering
for empty_var_volatile seem right. But putting some reproducing
instructions in the commits (or a test) would be better.
Bruce
next prev parent reply other threads:[~2026-11-22 23:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-22 18:29 [meta-virtualization][PATCH 0/3] OCI multi-layer fixes for dnf5 and nginx Tim Orling
2026-11-22 18:29 ` [meta-virtualization][PATCH 1/3] image-oci: track multi-layer rootfs directories with pseudo Tim Orling
2026-11-22 23:29 ` Bruce Ashfield [this message]
2026-11-22 18:29 ` [meta-virtualization][PATCH 2/3] container-volatile-fixup: run after empty_var_volatile Tim Orling
2026-11-22 18:29 ` [meta-virtualization][PATCH 3/3] app-container-nginx: create /run/nginx and /var/log/nginx in rootfs Tim Orling
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6b037aee.b322084d.36a5a7.c153@mx.google.com \
--to=bruce.ashfield@gmail.com \
--cc=meta-virtualization@lists.yoctoproject.org \
--cc=tim.orling@konsulko.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.