On Mon, Jun 17, 2024 at 01:37:22PM +0200, Benjamin Drung wrote: > The implementation maps VERSION_ID from /etc/os-release to the osVersion > key. Do you suggest to use VERSION_CODENAME from /etc/os-release > instead?
Yes. That seems like the closest thing we have that would be suitable. > The spec [1] says about the osVersion description "The OS version, > typically corresponding to VERSION_ID in os-release". I am not sure if > we should osVersion in that case or introduce a new osVersionCodename > key. > > [1] https://systemd.io/ELF_PACKAGE_METADATA/ It seems like the spec hasn't been written with consideration in mind for distributions whose eventual release version isn't strictly known at binary build time. The spec specifies osVersion as only "typically corresponding to VERSION_ID" so this isn't a hard requirement. This seems like an appropriate place to deviate from the recommendation to try to fit the original intent. The "Motivation" section describes wanting to map distribution-provided binaries back to their build information (eg. via debuginfo). In Ubuntu's case (and Debian's), that's possible with the name, version and os fields only, without ambiguity. If general tooling uses osVersion, I guess that we just need to be consistent to avoid causing problems then? I don't see anything else under "Motivation" for which this wouldn't work. I suppose not shipping osVersion would also work but has a greater chance of failing in some tool or other, given how it's described in the spec. Using osVersionCodename is sort of equivalent to this option from this perspective, since it'd be the same as "osVersion missing" from a generic tool's perspective. It might also be worth noting that not all binaries are rebuilt every release, and so osVersion for ELF binaries would not correspond to /etc/os-release on a given user's system in the general anyway. For Debian and Ubuntu this limits the usefulness of this field. As above, for build artifacts we don't need it to be unambigious (but for other distros that may not be true). IOW, I can't think of any situation where mapping VERSION_CODENAME to osVersion would be a problem, and it's more stable. I would be happy to stand corrected, though! Robie
signature.asc
Description: PGP signature
-- ubuntu-devel mailing list ubuntu-devel@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel