]> git.ipfire.org Git - thirdparty/systemd.git/commit
portable: include base and extension images in log fields
authorLuca Boccassi <bluca@debian.org>
Wed, 22 Mar 2023 22:44:31 +0000 (22:44 +0000)
committerLuca Boccassi <bluca@debian.org>
Tue, 28 Mar 2023 09:36:01 +0000 (10:36 +0100)
commit8c8331fc5075c2d82b13fb121b2571a12d1c54a0
treeb3cbb20899ca244d673b171001012b0dc4ccab99
parent62b7c23f79bcbcbc141c90c3a0931fa46a1652a2
portable: include base and extension images in log fields

When a portable service uses extensions, we use the 'main' image name
(the one where the unit was found in) as PORTABLE=. It is useful to
also list all the images actually used at runtime, as they might
contain libraries and so on.

Use PORTABLE_ROOT= for the image/directory that is used as RootImage=
or RootDirectory=, and PORTABLE_EXTENSION= for the image/directory that
is used as ExtensionImages= or ExtensionDirectories=.

Note that these new fields are only added if extensions are used,
there's no change for single-DDI portables.

Example with a base and two extensions, with the unit coming from the
first extension:

[Service]
RootImage=/home/bluca/git/systemd/base.raw
Environment=PORTABLE=app0.raw
BindReadOnlyPaths=/etc/os-release:/run/host/os-release
LogExtraFields=PORTABLE=app0.raw
LogExtraFields=PORTABLE_ROOT=base.raw

ExtensionImages=/home/bluca/git/systemd/app0.raw
LogExtraFields=PORTABLE_EXTENSION=app0.raw

ExtensionImages=/home/bluca/git/systemd/app1.raw
LogExtraFields=PORTABLE_EXTENSION=app1.raw
docs/PORTABLE_SERVICES.md
src/portable/portable.c