set_lsb_release: define Flatcar sysext level

Sysext images have a compatibility matching mechanism that searches for
the matching OS version or custom sysext level setting. On Flatcar
there is just the OS version set in /etc/os-release until now which
means that sysext images can't easily be used together with autoupdates
that change the OS version.

Define a sysext level for Flatcar so that users can refer to it instead
of the OS version when they have images that don't rely on a particular
Flatcar version.
Here an example of the now possible metadata:
/etc/extensions/NAME/usr/lib64/extension-release.d/extension-release.NAME
  ID=flatcar
  SYSEXT_LEVEL=1.0
and a symlink /etc/extensions/NAME/usr/lib → /etc/extensions/NAME/usr/lib64
to work around the problem that using lib/ as path destroys Flatcar's
lib → lib64 symlink.
In the future the matching logic hopefully gets more flexible because
now it is just a string comparison. Also, the architecture is not
matched either for now - we should work with upstream to improve this.

Closes: https://github.com/flatcar-linux/Flatcar/issues/643
This commit is contained in:
Kai Lueke 2022-03-10 15:13:10 +01:00
parent 5ebe64ba2f
commit 7fafef2084
2 changed files with 2 additions and 0 deletions

View File

@ -52,6 +52,7 @@ ID_LIKE=$OS_ID_LIKE
VERSION=$FLATCAR_VERSION VERSION=$FLATCAR_VERSION
VERSION_ID=$FLATCAR_VERSION_ID VERSION_ID=$FLATCAR_VERSION_ID
BUILD_ID=$FLATCAR_BUILD_ID BUILD_ID=$FLATCAR_BUILD_ID
SYSEXT_LEVEL=1.0
PRETTY_NAME="$OS_PRETTY_NAME" PRETTY_NAME="$OS_PRETTY_NAME"
ANSI_COLOR="38;5;75" ANSI_COLOR="38;5;75"
HOME_URL="https://flatcar-linux.org/" HOME_URL="https://flatcar-linux.org/"

View File

@ -0,0 +1 @@
- Defined a systemd-sysext level that sysext images can match for instead of the OS version when they don't have a strong coupling, meaning the only metadata required is `SYSEXT_LEVEL=1.0` and `ID=flatcar` ([#643](https://github.com/flatcar-linux/Flatcar/issues/643))