All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v6 0/3] pkg-database and systemd-sysext image
@ 2024-04-15  6:02 Johannes Schneider
  2024-04-15  6:02 ` [PATCH v6 1/3] image.bbclass/rootfs: archive and deploy package database Johannes Schneider
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Johannes Schneider @ 2024-04-15  6:02 UTC (permalink / raw)
  To: openembedded-core, richard.purdie, alex.kanavin,
	alexandre.belloni
  Cc: Johannes Schneider

systemd-sysext allows to overlay another image (or multiple) ontop of
a "base-image" = the current rootfs, via the use of overlayfs; to add
tools and features meant for development purposes.

To quote the documentation on systemd-sysext:
" ...addition in order to make debugging/development easier). System
extension images should not be misunderstood as a generic software
packaging framework, ..."

To build a lean image, that only holds packages that are not already
part of the base-image, a snapshot of the package-database is taken
after the installation of the base-rootfs is done, and picked up again
when collecting the rootfs of such a extension image.

with all this in place an example usage could look like this:
some-core-image.bb
  inherit core-image
  IMAGE_GEN_PKGDBFS = "1"

extending-image.bb
  inherit image-sysext
  IMAGE_FSTYPES = "squashfs"
  IMAGE_BASE_PKGDB = "some-core-image"
  # the above pointing at a package-db similar to:
  # build/deploy/images/$MACHINE/some-core-image-$MACHINE-20240210172305-pkgdb.rootfs.tar.gz

then on the device, running some-core-image, with the extension image placed at FN:
$> ln -s "$FN" /run/extensions/$(basename $FN).raw
$> systemd-sysext list
$> SYSTEMD_LOG_LEVEL=debug systemd-sysext merge

As long as the VERSION_ID of the extension image matches the os-release
in the base image, the above commands return sucessfully;
for details on the compativility check see the docs for systemd-sysext.

=========

changes with v2:
        rebase from 'kirkstone' onto 'master'

changes with v3:
	incorporate review suggestions for simplification
	add task dependency handling
	add oe-selftest for the pkgdb handling
	add variable documentation and
	some more comments, and examples in the commit-msg

changes with v4:
	rebase onto 'master' => no functional changes
	fixed patchtest findings

changes with v5:
        rebase onto 'master'
	add '.sysext' to the deployed symlink name
        sidenote on the tests and autobuilder failure: run locally they succeed, e.g.:
          #> oe-selftest --verbose -r imagefeatures.ImageFeatures.test_image_gen_pkgdbfs

changes with v6:
	restructure test to call 'bitbake' only once in the testcase itself
	  (in hopes of solving the autobuilder problem; local test runs succeed)


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-04-22  4:16 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-15  6:02 [PATCH v6 0/3] pkg-database and systemd-sysext image Johannes Schneider
2024-04-15  6:02 ` [PATCH v6 1/3] image.bbclass/rootfs: archive and deploy package database Johannes Schneider
2024-04-15  6:02 ` [PATCH v6 2/3] image.bbclass/rootfs: set and unpack package-database Johannes Schneider
2024-04-15  6:02 ` [PATCH v6 3/3] classes: add a systemd-sysext image class Johannes Schneider
2024-04-21 20:36 ` [OE-core] [PATCH v6 0/3] pkg-database and systemd-sysext image Alexandre Belloni
2024-04-22  4:16   ` SCHNEIDER Johannes

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.