Just get rid of the sid name
Just get rid of the sid name
Posted Aug 10, 2024 1:58 UTC (Sat) by zblaxell (subscriber, #26385)In reply to: Just get rid of the sid name by bluca
Parent article: Distinguishing Debian testing from unstable
This doesn't follow. os-release's use cases for the version fields revolve around matching up the ABI provided or used by images. Sid does not provide a stable ABI or API. If an image is declaring a dependency on testing or unstable (sid) then it has an incompletely declared dependency.
Unstable ABI is the main advantage of Sid: its ABI is mutable, both intentionally (due to addition of new ABI/API versions and removal of deprecated/unmaintained library versions) and unintentionally (due to bugs and experiments that don't work out). Images of "sid" of different vintages cannot be expected to satisfy "sid" dependencies from packages of different vintages, particularly in the case of old dependencies and new dependents. Images of "sid" quite often can't satisfy their own internal package dependencies.
Declaring a runtime dependency on Debian Sid is inappropriate for an application image. It would be as wrong as declaring a dependency on Arch Linux. Sure, an app image that depends on a "sid" OS image might happen to work for a few months or even years, but we'd expect it to eventually fail unless both the OS image and app images are updated roughly in lock-step, and the image manager would have to know it needs to do that.
The codename "sid" is intentionally distinct from any released Debian version, so that it never satisfies a dependency on any released Debian version.
"trixie" is more complicated--it has to be the upcoming released version's string because changing it at release time will invalidate testing of any package whose behavior depends on the string, but it also tracks unstable so it doesn't provide a stable ABI and cannot be used to identify a dependency...until it's released, then the ABI is stable and dependencies can be correctly declared on it. Upon release, the VERSION field of os-release finally means something.
It's even more inappropriate to depend on testing. In addition to the issues that arise from tracking unstable, Debian might decide at any time to revert testing back to stable or an earlier testing snapshot (they've done it at least once!) and that will blow up anything that really can't run on stable even as it passes a $testing_date > $app_release_date check. Anyone who wants to do this at scale needs to roll their own snapshot images for this kind of thing (or a fork of Debian) because Debian might simply pull the rug out from under this method of deploying an application.
> Trixie is not unstable, was never unstable, and will never be unstable. That's the point.
If it's inappropriate to depend on unstable or testing individually, then when is it useful to distinguish between them? This is why I, and maybe other people, think this is an XY problem: you're trying to do X, but you think to do X you need Y, so you're asking us for Y. Y is clearly nonsense, so we know Y is not what you actually want, but we can't guess what X is. So what is the X you want to do?
My guess is that you'd like something like this: `apt update` would put the timestamp or hash of the newest Packages file from each release into os-release's VERSION field (e.g. "sid-20240809T210115+trixie-20240601T192512" or simply a SHA hash), so that os-release VERSION can identify the vintage of an unstable or testing image, and application images can declare a dependency on OS images that match a specific date when `apt upgrade` was last run (i.e. the most recent time the packages installed on the system were synchronised with versions available from Debian). It seems easy enough to do with an apt hook that can be provided by a package that can be installed on a live system, if you can reach consensus on how the version field should be formatted.
It's still nonsense from an API compatibility perspective (for that you can only use stable Debian releases), but it would dramatically improve the probability that a simple dependency resolver can assemble roughly contemporary images into something that will run most of the time. Maybe that's good enough.
The LWN site is currently under high scraper load, so comment display has been suppressed for anonymous users. If you are a human, you may read the comments by clicking the button below:
Note: you can avoid this step in the future by logging into your LWN account.
