Hello,

First of all, thanks for your answers.

It wasn't really clear to me that the /etc/os-release file was editable
from a 3rd party other than the distribution maintainers, so thanks for the
clarifications. Are the distributions required to leave IMAGE_ID and
IMAGE_VERSION empty? Can I safely just append those fields at the end of
the copy of the /etc/os-release file?

Speaking of BUILD_ID, according to the spec sounds like a field reserved to
distributions: "BUILD_ID may be used in distributions where the original
installation image version is important", from my side what I need is to
identify the git revision + build date of the recipe I'm using to cook the
image installed on the system, also my plan is to change that ID every time
I cook a new image, furthermore I plan to replace the whole operating
system image (that I keep read-only) in order to update it, so BUILD_ID
would change at every update (so it sounds slightly different from the
original described semantic).
Last but not least, I was looking for a machine parsable unique id, so I
plan to use BUILD_UUID if it is not kept reserved for other usages, that
will be an UUID that is freshly generated every time I cook a new image.

Regards,
Davide Bettio.


Il giorno mar 22 mar 2022 alle ore 18:09 Lennart Poettering <
lenn...@poettering.net> ha scritto:

> On Di, 22.03.22 17:10, Davide Bettio (davide.bet...@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
>

Reply via email to