[systemd-devel] /etc/os-release but for images

Lennart Poettering lennart at poettering.net
Tue Mar 22 17:09:39 UTC 2022


On Di, 22.03.22 17:10, Davide Bettio (davide.bettio at secomind.com) wrote:

> Hello,
>
> I would like to figure out if anyone has proposed any kind of standard for
> storing metadata about a system image.

The IMAGE_ID= and IMAGE_VERSION= fields from /etc/os-release are
supposed to be used for that.

i.e. the idea was that you can take a generic distro (fedora, debian,
…) build an image off it, and it will put its own os info in
/usr/lib/os-release, and make /etc/os-release a symlink to it. Your
image build would then replace /etc/os-release with a file, that
incorporates /usr/lib/os-release and adds in IMAGE_ID=/IMAGE_VERSION=.

Each time you rebuild the image your image building tool would repeat
that step. i.e. it would be the image builder tool's job to extend the
generic OS data from /usr/lib/ with info about the image and place the
result in /etc/.

Lennart

--
Lennart Poettering, Berlin


More information about the systemd-devel mailing list