Closed paidhi closed 1 month ago
The reason why Bazzite doesn't modify /etc/os-release
file is because scripts which rely on it would fail, in case they would want to do modifications related to Fedora. They would look for fedora
ID or similar, which wouldn't be present if modified when applying your suggestion.
I'm sorry to see this issue is closed so quickly and dismissed as "not planned".
No doubt scripts rely on that information. As it should be. It is IMO just bad practice to solely rely on "ID".
That's why "ID_LIKE", "VARIANT", "VARIANT_ID" and the likes are available. It seems to work for Nobara Linux. That's why I included their os-release
file as an example.
It also seems to work OK for other derivative distributions. I have checked distributions based on others: CentOS, AlmaLinux, RockyLinux, Ubuntu, VanillaOS, Mint. They all identify themselves uniquely with "ID" but make use of "ID_LIKE" to give a hint about what they are based on. Even Ubuntu proper uses "ID_LIKE=debian".
Identifying as "fedora" in "ID" could even lead to issues with those scripts and Ublue based distributions. Scripts might assume they can perform tasks that won't work as expected (e.g. dnf
vs rpm-ostree
, grubby
, mounts in /var/...
, etc.)
My use case is this:
To support Linux distribution testing/distro-hopping I am working on automating a lot of setup with PyInfra. To handle Bazzite properly I need to identify it as "Bazzite" and know that it is based on Fedora and is atomic (based on Kinoite).
For now I will just have to parse PRETTY_NAME
and look for VARIANT="Kinoite"
.
Maybe you could mark this as a feature request and keep in the backlog instead of not addressing it?
Update:
It looks like there was a change around the same time that this issue was created: https://github.com/ublue-os/bazzite/commit/58fc0b253a237df677dca6aa6f15e1d2d4bfcff4
VARIANT_ID
is now set to bazzite
.
Yeah not sure if related but we changed those up to match the info Fedora needed for the countme service.
Many automation scripts (installers, deployment, configuration management, etc.) rely on information in the os-release file. They parse fields like:
NAME
,ID
,ID_LIKE
,CPE_NAME
,VARIANT
,VARIANT_ID
,VERSION
,VERSION_ID
, etc. Some also look for the presence of dedicated software packages (e.g.fedora-release-identity-*
).Currently Bazzite has package
fedora-release-identity-kinoite
installed and the various fields in/etc/os-release
report either "fedora" or "kinoite".The only option I see currently to identify the distribution via this method is to either check for the presence of package
ublue-update-*.bazzite-*.noarch
or parse fieldPRETTY_NAME
from/etc/os-release
(e.g.PRETTY_NAME="Fedora Linux 40.20240621.0 (Bazzite)"
). But this doesn't feel very elegant to me.It would be great if Ublue-based distributions (Aurora/Bluefin/Bazzite) could improve this by identifying itself more clearly in the spirit of the Freedesktop/CPE specifications. Maybe take some pointers from how Nobara Linux does it.
Example for Fedora 39:
Example for Nobara 39 (based on Fedora 39):
On Bazzite it looks like this: