|
|
Log in / Subscribe / Register

Just get rid of the sid name

Just get rid of the sid name

Posted Aug 9, 2024 18:52 UTC (Fri) by Karellen (subscriber, #67644)
In reply to: Just get rid of the sid name by pizza
Parent article: Distinguishing Debian testing from unstable

Given that, as you point out, unstable and testing "can (and does) change on a day-to-day basis", how can a program reliably "change its behaviour based on all sorts of only-knowable-at-runtime variables", based on whether /etc/os-release says "unstable" or "testing"? Surely the only way to do that is based on the actual runtime variables that affect how the program runs.

I think my confusion here is that the article doesn't really give an example of a problem that the existing /etc/os-release causes, and how changing that would fix it. Can you provide one, to help illuminate the situation?


to post comments

Just get rid of the sid name

Posted Aug 9, 2024 18:59 UTC (Fri) by bluca (subscriber, #118303) [Link] (26 responses)

Any time you are dealing with building, managing, categorizing, pairing, using images, you want to know what you are dealing with. That's where it's most useful to be able to tell different versions of the same OS. Also, the lifecycle is extremely different, and again that matters for certain kind of software - the fact that Trixie is in development now but will become stable soon, while Sid will never get security support, matters a lot in certain cases, like when you want to say "I will give you support if you run this but not that"

Just get rid of the sid name

Posted Aug 9, 2024 21:37 UTC (Fri) by Karellen (subscriber, #67644) [Link] (25 responses)

you want to know what you are dealing with.

You say that, but as someone who has run both for extended periods of time over the years, I can't imagine a situation - from the perspective of a program being run on such a system - where it would make a difference. Given how quickly unstable and testing both change, and how close they are to each other for much of the time, can you give me an example of how this information would make a difference on a running system?

the fact that Trixie is in development now but will become stable soon, while Sid will never get security support

Ok? But Trixie won't get security support while it is still unstable, will it? It only gets security support when it becomes stable. But stable isn't part of the issue we're discussing, so...?

As for giving people support, isn't that a contractual issue? Don't you just tell people "We only support stable" or "We only support stable or testing"? Alternatively, someone might be running Trixie/stable, or they might be running Trixie/stable+backports. Or Trixie/stable+sory.org. Or a nightmarish frankendebian of Trixie+some-Ubuntu-PPA. And you can't tell that from /etc/os-release, but it might still be a differentiator as to whether you're going to offer support or not.

Just get rid of the sid name

Posted Aug 9, 2024 21:44 UTC (Fri) by bluca (subscriber, #118303) [Link] (24 responses)

> from the perspective of a program being run on such a system

Why are you imposing such strict limits? Images exist, image builders exist, image managers exist. The fact is, os-release exists, and is used by many things, programs, humans. If you think it is useful in some cases, then it's only logical that it extends to sid too. If you don't think it is useful at all, then it doesn't matter to you in the first place, so why worry?

> Ok? But Trixie won't get security support while it is still unstable, will it? It only gets security support when it becomes stable. But stable isn't part of the issue we're discussing, so...?

Trixie is not unstable, was never unstable, and will never be unstable. That's the point.

> As for giving people support, isn't that a contractual issue?

Not necessarily. As an upstream I might say, my software changes so quickly that supporting anything but unstable is not something I want to do. Despite what some people claim, the reality is that testing and unstable can diverge massively, and for months at a time: we just went through the t64 transition that basically froze testing for ~2 months. These things happen. There's a reason Ubuntu and other derivatives base themselves on unstable, not testing.

Just get rid of the sid name

Posted Aug 9, 2024 22:22 UTC (Fri) by Karellen (subscriber, #67644) [Link] (8 responses)

Why are you imposing such strict limits?

Lack of imagination. Fine. From the perspective of an image, image builder or image manager then, please, give me an example of how knowing the difference between unstable and testing makes a difference to how these systems might operate.

If you think [/etc/os-release] is useful in some cases, then it's only logical that it extends to sid too.

I checked the rationale you linked in another comment. OK, let's have a look at that.

It is extensible, can easily learn new fields if needed. doesn't seem relevant here. It provides [...] machine parsable version/OS identifiers (i.e. for use in build systems)., this is the question I just asked. And It relieves application developers who just want to know the distribution they are running on to check for a multitude of individual release files. which... fine. Being able to tell if you're on Debian or Fedora or whatever can be useful, if e.g. you want to know where certain files are kept, and only checking one file to figure that out is a benefit. Knowing which major version of a distro can be useful too, for the same reasons, or because you want to figure out if the underlying OS is still under security support, or a whole bunch of reasons. Yup, no problem there.

But knowing exactly which fast-moving, not-under-security-support, pre-release, under-active-development sub-branch of an OS it is? When you might not be sure if the admin is even keeping it up-to-date regularly (having a system on unstable that's mostly behind current testing is always a possibility if they haven't apt upgraded in a while).

So I don't see it as necessarily logical that it extends to the difference between Debian unstable and testing. It might be, but just saying "it is!" hasn't swayed me yet.

I'm genuinely sorry I don't see what is so obvious to you, that you feel you shouldn't even need to spell it out.

Just get rid of the sid name

Posted Aug 9, 2024 22:44 UTC (Fri) by bluca (subscriber, #118303) [Link] (7 responses)

> Lack of imagination. Fine. From the perspective of an image, image builder or image manager then, please, give me an example of how knowing the difference between unstable and testing makes a difference to how these systems might operate.

If you've never had to deal with anything of the sorts that's fine, not everything has to be useful to everybody in order to exist

> Knowing which major version of a distro can be useful too

There you go - then you get it. Testing and unstable are different major versions

Just get rid of the sid name

Posted Aug 12, 2024 8:23 UTC (Mon) by LtWorf (subscriber, #124958) [Link] (6 responses)

> If you've never had to deal with anything of the sorts that's fine, not everything has to be useful to everybody in order to exist

I think that writing things like this instead of presenting actual use cases hinders your chances of having your proposals accepted. Of course lwn comments are not very relevant for this. But I personally haven't seen a use case yet that shows it's useful to someone.

Just get rid of the sid name

Posted Aug 12, 2024 9:18 UTC (Mon) by bluca (subscriber, #118303) [Link] (5 responses)

They have been presented, multiple times. Sorry, I'm not going to copy paste entire walls of texts yet again, I don't think that would be useful at this point

Just get rid of the sid name

Posted Aug 12, 2024 10:56 UTC (Mon) by zdzichu (subscriber, #17118) [Link] (4 responses)

I have problem finding the use cases, too. None of the links in the article seem to contain anything relevant.

Even then link described as "a specific example" (https://lwn.net/ml/all/ZrCMe4I8B-351Z1D@remnant.pseudoran...) does NOT contain a specific example. It contains idle speculation of theoretical foobar package only. A speculation about behaviour which I would mark as a bug in the package immediately (behaving incorrectly due to different keyword in os-release).

So, instead of pointing to unspecified walls of text, could you – for the sake of other LWN readers – provide a 3-4 bulletpoints if the use cases?

Just get rid of the sid name

Posted Aug 12, 2024 11:03 UTC (Mon) by bluca (subscriber, #118303) [Link] (3 responses)

https://github.com/search?q=os-release&type=code

Four hundred and forty two thousands hits for 'os-release'. I don't think a few bullet points would cut it...

Just get rid of the sid name

Posted Aug 12, 2024 15:32 UTC (Mon) by rschroev (subscriber, #4164) [Link] (2 responses)

I see things like

* Handle IOError exception if no /etc/os-release to use Glances on Synology DSM (issue #458)
* Give precedence to /etc/os-release over /usr/lib/os-release in /etc/profile.d/toolbox.sh
* Apko no longer clobbers `/etc/os-release` if it is already present, unless an override is explicitly requested.
* Generate `/etc/alpine-release` (or equivalent) legacy files when `/etc/os-release` generation is requested. This helps with Trivy scanning.

and so on. The search results I quickly skimmed are not related to the issue at hand.

I'm not going to look at all of those search results to find the ones that illustrate your point. Frankly you're not doing a very good job at illustrating the problem and convincing people. If you want to convince people, show us where there are problems.

Just get rid of the sid name

Posted Aug 12, 2024 16:00 UTC (Mon) by gioele (subscriber, #61675) [Link]

> The search results I quickly skimmed are not related to the issue at hand.

You will not find any result related to the issue at hand (= telling testing and unstable apart) because Debian does not provide that info in /usr/lib/os-release. So things like `if VERSION_CODENAME == testing` are just not part of any software.

What you will find instead, is separate code (that sidesteps os-release and relies of lsb_release for example) that tries to guess if the current OS is Debian testing or unstable.

Just get rid of the sid name

Posted Aug 12, 2024 18:32 UTC (Mon) by bluca (subscriber, #118303) [Link]

> The search results I quickly skimmed are not related to the issue at hand.

They are related - the point is that os-release is extremely widely used, and hence it is worth supporting. It's broken in sid, so of course there cannot be examples of people using it in sid, because it doesn't work...

Just get rid of the sid name

Posted Aug 10, 2024 1:58 UTC (Sat) by zblaxell (subscriber, #26385) [Link] (7 responses)

> If you think it is useful in some cases, then it's only logical that it extends to sid too.

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.

Just get rid of the sid name

Posted Aug 10, 2024 11:20 UTC (Sat) by bluca (subscriber, #118303) [Link] (6 responses)

> This doesn't follow. os-release's use cases for the version fields revolve around matching up the ABI provided or used by images.

Not really. You might be thinking of SYSEXT_LEVEL, but that's something different, used in special cases. Sid doesn't set that, nor VERSION_ID, which is correct. This is about VERSION_CODENAME, which is used to identify the OS version, for identity and lifecycle purposes.

> If it's inappropriate to depend on unstable or testing individually, then when is it useful to distinguish between them?

When you have a bunch of images and you want them to self-identify. I provided a very real world example, with images and commands, here: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1077764#43

You seem to be thinking that this is exclusively useful for dependencies purposes. It isn't, identifying and tracking artifacts is just as important, and independent of that. There are tons of use cases, some that we'll never know about. Fundamentally, os-release is about the OS vendor tree self-identifying in a distro-agnostic way, that can be relied to just be there and be usable and accurate for what it provides, without requiring special binaries or scripts or other hacks. Think of it as the pkg-config of OSes. There are many uses that one might derive from such a system, and not all of them have to be useful to everyone for it to exist.

> My guess is that you'd like something like this

Not really, I would have no use for that, but it's an interesting idea that might be useful for someone else. If it would be useful for you, and you want to propose a change to the spec, to add a field specifically for that use, that package managers should modify in /etc/ on updates, please feel free to send a PR and we'll happily review it.

Just get rid of the sid name

Posted Aug 11, 2024 4:51 UTC (Sun) by zblaxell (subscriber, #26385) [Link] (5 responses)

> I provided a very real world example, with images and commands, here: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1077764#43

Yeah I read that. The example with the images is why I thought you were trying to solve either a dependency analysis problem or a content identification problem, and copying CODENAME to an image is insufficient for either of those use cases on not-stable Debian. That's why I proposed a solution that leverages existing metadata to try to solve those problems.

Let's try another of your examples. There's a systemd test script which has a use case for imprecise dependency resolving: we are running on some version of Debian, and we want to create a separate similar instance of Debian so that we can throw some code at it and see if it runs on a fresh install.

The goal is to test code built with an older version of CODENAME on an equal or newer version of CODENAME, to see if its dependencies are satisfied. We don't have to worry about whether this works, because dependency failures (along with any other kind of failure) are expected results of the test.

There doesn't seem to be an identification requirement for this use case. The image isn't distributed or reused and its only user knows where it is. In the event of a test failure, the developer would address the issue, build a new image against then-current CODENAME, and discard the old one.

There's an implied restriction on the time between uses of CODENAME: presumably the host runs apt update just before building the binaries for testing, and a few seconds or minutes later it runs apt update again as it builds the test image. So the two uses of CODENAME refer to similar content because they are close in time. It's not a robust dependency resolution mechanism--it can still fail if the CODENAME archive is updated the wrong way in between--but maybe rarely enough that it's not a problem in practice.

We want all this to be self-hosted, so the package building code runs on a system with testing or unstable in sources.list and tests against a similar version. Specifically those two configurations, plus any stable version which has CODENAME defined. Any other arrangement isn't considered and might fail.

The CODENAME hack is there because at one point the debian systemd tests reach a choke point where they communicate a single word to mkosi to tell it what image it should build, and that word might be either "trixie" or empty (meaning "sid"). So the hack picks sid if there's "sid" or "unstable" in sources.list (and yes, it's every bit as buggy as it sounds, especially if you're running testing but your Debian mirror has a domain name like "inside.example.com").

But...the channel here is far wider than a single word: mkosi gets a full config file and access to apt's configuration trees. It's already pulling in /etc/apt/preferences* which could interact in odd ways with a stock sources list. Why would we not simply push the other half of the apt configuration into mkosi? Replicating both sources and preferences will produce the expected result under a much wider range of conditions than the CODENAME alone does, and this method has the advantage that we never have to look at os-release. Unless I'm missing a grep, this hack on top of broken code is the only thing the systemd Debian packaging scripts use os-release for.

There's another example (obs-build) that is similar, which is similar to the systemd test cases, in the sense that it builds a product with a short usable lifespan. This is more obvious in the systemd case because it creates a system image that's used only once, but in the obs-build case the package isn't labelled with sufficient dependency information so it's inevitably going to become unusable.

These are excellent concrete examples of when it is inappropriate to use os-release and VERSION_CODENAME.

> You seem to be thinking that this is exclusively useful for dependencies purposes.

Can you blame me? The examples I can find, including those you provided, are dependency purposes.

The hardinfo example isn't a dependency use case, but as far as I can tell, that code translates non-standard os-release data into a different non-standard format, and imposes Debian-specific requirements on the data that are not requirements of os-release. I can see why someone who already has a collection of output from that code would want to keep the legacy output format alive, but it is not an example of behavior new code should follow.

> There are tons of use cases, some that we'll never know about.

This is noise. We are not omniscient and cannot predict the future. If we can't define who reads a label and what properties of the labelled object the label attests to, there's no way to know whether the object is labelled correctly for any use case, and no way to know how to implement an object which has a given value of label. If there are no specified behaviors for downstream users, we could simply write "orange" on the label and never change it again.

If someone comes along with concrete requirements in the future, and they aren't compatible with the labels we have now, they can start a conversation about implementing them at that time.

It seems that we have no shortage of concrete definitions already, both on the labels and on the objects. There's no need to introduce fictional new ones.

> Fundamentally, os-release is about the OS vendor tree self-identifying in a distro-agnostic way that can be relied to just be there and be usable and accurate for what it provides

This needs more definition to be useful. If you can explain why "orange" is not a correct self-identifying distro-agnostic identification, but "sid" is, that's a good start. Then we can work on accuracy: is a 4-year window of possible versions sufficiently accurate (probably not)? Do you really mean precision instead of accuracy (is plus or minus a week OK)? Is there a validity or stability window (identifier is to be used over the next hour, day, month, until EOL date, since 2003, forever)? Do you have some downstream consumer of the string that has requirements you need to satisfy (so what are those)?

Once the basics are defined, we can figure out what it means to distinguish between "sid" and "trixie". If I start with trixie, but upgrade libc or perl, is it still trixie? How much of bookworm can I upgrade before it has to be called something else?

Forget upgrades and sources for a moment. How many of the options I have as a user using only bookworm can I exercise before CODENAME's accuracy changes? If I install bookworm but replace systemd with sysvinit, iproute2 with net-tools, net-manager with ifupdown, and iw with wireless-tools, third-party networking software might consider "bookworm" to be an inaccurate VERSION_CODENAME. Now consider if i start with Wheezy and upgrade through jessie, stretch, buster, and bullseye to bookworm, but I never install the new packages and update all the old ones to bookworm's versions. Is it accurate to label the resulting system with VERSION_CODENAME=bookworm?

If we don't have these requirements--if it's OK to make substantive changes to the environment software may find itself in, without changing VERSION_CODENAME--then any value of VERSION_CODENAME could be correct, and software that makes or supports decisions based on VERSION_CODENAME is wrong.

If you believe we do have these requirements--that there's some threshold past which a system is altered such that its VERSION_CODENAME must change...well, good luck with that.

> without requiring special binaries or scripts or other hacks

This needs definition too. What's a special script in the context of 640+ lines of highly Debian-specific code that is only run on Debian? Why is it better to remove a hack on top of os-release than to remove the dependency on os-release?

> There are many uses that one might derive from such a system, and not all of them have to be useful to everyone for it to exist.

Forget everyone, and forget the other cases--at this point I'm trying to identify _anyone_ who might find a distinction between only the two options of testing and unstable useful for a reason that is not "misunderstanding the problem they're trying to solve" or "inventing a problem that os-release can be involved in solving."

Just get rid of the sid name

Posted Aug 11, 2024 12:08 UTC (Sun) by bluca (subscriber, #118303) [Link] (4 responses)

> > I provided a very real world example, with images and commands, here: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1077764#43
> Yeah I read that. The example with the images is why I thought you were trying to solve either a dependency analysis problem or a content identification problem, and copying CODENAME to an image is insufficient for either of those use cases on not-stable Debian. That's why I proposed a solution that leverages existing metadata to try to solve those problems.

Your solution might solve some other problems, although I don't know what they may be - but it doesn't solve ours

> Why would we not simply push the other half of the apt configuration into mkosi?

Because it would break the tests, and be incredibly wrong. What we need is the codename, as we then match several conditional configuration on distro+release+arch triplet. I have no idea what the full apt configuration might contain, as it changes between testbeds and even between backends on the same testbeds (cloud autopkgtest vs debci and lxd vs lxc vs qemu vs podman vs ...) and if it is even going to be compatible with mkosi, so it must absolutely not be blindly copied over. This must work reliably across distributions, releases, branches, testbeds, infrastructures. Have you ever actually used mkosi? Have you ever actually had to work and maintain on this specific CI setup?

> There's another example (obs-build) that is similar, which is similar to the systemd test cases, in the sense that it builds a product with a short usable lifespan. This is more obvious in the systemd case because it creates a system image that's used only once, but in the obs-build case the package isn't labelled with sufficient dependency information so it's inevitably going to become unusable.

Not really? This is a throw-away VM guest with fixed locally downloaded content, that is used offline and never changed once created. It's entirely appropriate to identify it in such a way (if it worked reliably, of course). Have you ever actually used OBS?

> These are excellent concrete examples of when it is inappropriate to use os-release and VERSION_CODENAME.

I'm afraid that, while making grand statements like these in a comment in a thread is easy, actually working in the real world out there is much harder. What you are saying leads me to believe you never actually worked _with_ any of these systems, let alone _on_ them. There is nothing wrong with this of course, nobody can work on everything all the time. Please correct me if I am wrong.

> > You seem to be thinking that this is exclusively useful for dependencies purposes.
> Can you blame me?

I did not intend to assign blame, merely to try and explain the situation.

> > There are tons of use cases, some that we'll never know about.
> This is noise.

It's really not. The number of ways a universally present implementation of a generic specification is used is essentially endless. Searching on Github alone for the 'os-release' keyword yields 434 _thousands_ results. I am not going to read them all, sorry!

> > Fundamentally, os-release is about the OS vendor tree self-identifying in a distro-agnostic way that can be relied to just be there and be usable and accurate for what it provides
> This needs more definition to be useful.

Not really. I think the confusion stems from the notion that this is about some precise and exact and pin-pointed combination of content. It's obviously not: you can have a package that is bit-by-bit identical from oldoldstable all the way to unstable, literally the same identical one. This happens many times. bullseye is still bullseye, bookworm is still bookworm, etc. Also most of the packages are optional, and most are never installed in most installations. Two different bookworm images with different sets of packages are both still bookworm, etc. Bookworm at 12.0 had different content with respect to bookworm does now at 12.6, in dramatic ways in some cases (eg: kernel), but it's still bookworm. The identify of an image doesn't change because some of its content does. What you find under https://ftp.debian.org/debian/dists/bookworm/ is bookworm, even if it gets updates and changes at some point, and even if other archives have very similar contents. Same for everything else, including sid and trixie. Hope this helps clarify a bit?

> > without requiring special binaries or scripts or other hacks
> This needs definition too. What's a special script in the context of 640+ lines of highly Debian-specific code that is only run on Debian? Why is it better to remove a hack on top of os-release than to remove the dependency on os-release?

Sorry, what script?

> > There are many uses that one might derive from such a system, and not all of them have to be useful to everyone for it to exist.
> Forget everyone, and forget the other cases--at this point I'm trying to identify _anyone_ who might find a distinction between only the two options of testing and unstable useful for a reason that is not "misunderstanding the problem they're trying to solve" or "inventing a problem that os-release can be involved in solving."

As already mentioned, there are 430k hits for 'os-release' on Github alone. If you want to say that this is completely useless and serves no point, of course you can, but you'll need _a lot_ of evidence to back it up against that.

Just get rid of the sid name

Posted Aug 11, 2024 23:30 UTC (Sun) by zblaxell (subscriber, #26385) [Link] (3 responses)

> It's really not. The number of ways a universally present implementation of a generic specification is used is essentially endless.

I don't disagree that there are emerging uses. I assert that we should write down what they are before discussing even the tiniest effort to support them, so that we don't accidentally commit to fictional requirements.

Remember, the specification you provided as a reference is _empty_ wrt CODENAME.

LSB 1.0, which holds the earliest definition of the CODENAME concept, was released in summer 2001 (Debian had a testing branch before that). It would be another year before LSB extended the definition of CODENAME to "a single line of text," and 14 years before LSB finally clarified "This specification assigns no meaning to the value of the string, the contents are at the discretion of the distribution provider". When this was copied into the os-release spec in systemd a year later, the (empty) semantic meaning of the text was removed from the spec, but the string was made optional.

So if you're talking about specifications, CODENAME is a meaningless string that can have any value, including the empty value (which both Fedora/Rawhide and Arch use). The only rule is that it must consist of a subset of printable UTF8 characters. There isn't even informative text suggesting that the name might be unique (it might be implied by 'identity' but that term isn't defined). According to the letter of the spec, 'trixie' is a valid CODENAME for absolutely any instance of Linux whose distributor chooses to apply it to their own output.

Obviously you have some different idea in your head, but you're not writing it down or answering clarifying questions, so we have to bounce signals off your brain and interpret the echoes for meaning. Some of those echoes are complex, noisy distractions, like pointers to empty standards or potentially dodgy mkosi configurations.

As far as I can tell from scraping all the text, you have a mental model that says if you run these commands today:

"debootstrap testing testing >/dev/null 2>&1 && sed -n 's/^VERSION_CODENAME=//p' < testing/etc/os-release" should print "trixie" (it would start printing "forky" some day in the future)

"debootstrap unstable unstable >/dev/null 2>&1 && sed -n 's/^VERSION_CODENAME=//p' < unstable/etc/os-release" should always print "sid".

This is a test case, but requirements can be reverse engineered from it easily enough. The archive maintainers will know well enough how to make this happen, there are viable proposals already on the mailing list.

Behind all the layers of indirection, the main (only? most important? moderately relevant?) use case of this is to build one ephemeral Debian image to interact with an existing Debian image of similar vintage but different options. The eventual incompatibility of the referring and referred objects does not matter because one side of the referral relation is explicitly short-lived by the definition of this use case.

The code behind this use case on Debian is all very Debian-specific (this answers one of the questions I had, how could the tools not be filled with Debian-specific code? They are!). That code is buried inside tools that abstract away all details but the single words "Debian" and "$VERSION_CODENAME". So there are still Debian-specific binaries and scripts--they cannot possibly be avoided--but those tools want to interact with their users only through the CODENAME identity, and can only function with distinct CODENAMEs for popular package manifests.

Compatibility with Ubuntu (which doesn't have the "testing" node in its CI pipeline, so its CODENAMEs are unique) is an important beneficial side-effect.

For the DDI files, I guess all you want is to plug systemd-dissect into one of the above commands in place of debootstrap, point it at an image made from debootstrap, and get the expected trixie or sid values. And then all the variations with other image creation and manipulation tools.

> The identify of an image doesn't change because some of its content does. What you find under https://ftp.debian.org/debian/dists/bookworm/ is bookworm, even if it gets updates and changes at some point, and even if other archives have very similar contents. Same for everything else, including sid and trixie.

If apt sources.list says "https://ftp.debian.org/debian/ stable main" (the "rolling stable" configuration) and the user runs dist-upgrade every day, then CODENAME definitely does change sometimes (when base-files gets upgraded). I assume you don't actually think it shouldn't change in that case, but what you wrote doesn't account for this possibility. Similar for a system configured to pull from "testing", its CODENAME should change from time to time.

This update also discussed in the os-release spec, but only mentioned in connection to VERSION_ID ("if updates eventually completely replace previously installed contents, as in a typical binary distribution, VERSION_ID should be used to identify major releases").

So in summary, the core of the disagreement is: Debian currently implements the spec correctly, but you don't believe in what the spec says. You want Debian to implement a Debian-specific extension on top (or fix the spec so that it defines nicer things, but that sounds like a cross-distro consensus nightmare).

Just get rid of the sid name

Posted Aug 12, 2024 15:07 UTC (Mon) by bluca (subscriber, #118303) [Link] (2 responses)

> I don't disagree that there are emerging uses. I assert that we should write down what they are before discussing even the tiniest effort to support them, so that we don't accidentally commit to fictional requirements.

Your assertion is ~12 years too late I'm afraid. os-release is already the standard for cross-distro identification of OS vendor trees, and has been for a long time now.

> Remember, the specification you provided as a reference is _empty_ wrt CODENAME.

Perhaps you should check again? It's not empty at all, it is definitely exactly as it needs to be, and among the examples it lists it even uses one of Debian's: https://www.freedesktop.org/software/systemd/man/devel/os...

Of course, if you have ideas on how to make it better, please send a PR. As always, talk is cheap, but actually producing something of value is hard, so I will not hold my breath.

> Obviously you have some different idea in your head, but you're not writing it down or answering clarifying questions, so we have to bounce signals off your brain and interpret the echoes for meaning. Some of those echoes are complex, noisy distractions, like pointers to empty standards or potentially dodgy mkosi configurations.

I have no idea what you are trying to do here, but it is most definitely not "asking clarifying questions". There are a few things that are very clear: you came here with a pre-existing, strong opinion about all of this, and also you have never worked on anything related to any of this. Both of which are ok of course, but you should really get off that high horse you decided to climb on.
And a tip for the next time: when you are trying to style yourself as a neutral and concerned observer, you might want to avoid snarky comments such as these. Your replies are quite transparent already, but these really give the game away.

> As far as I can tell from scraping all the text

Unfortunately, you aren't managing to tell very well, and your comments are quite detached from reality. I'll just quickly highlight the points that are most wrong in case you want to try again - but really, I'd advise not to, as there's no point in this armchair engineering.

> to build one ephemeral Debian image to interact with an existing Debian image of similar vintage but different options.

This is very wrong, and that's not at all what happens, in fact it's the exact opposite

> The code behind this use case on Debian is all very Debian-specific

It is very much not, it runs on multiple versions of half a dozen distros

> For the DDI files, I guess all you want is to plug systemd-dissect into one of the above commands in place of debootstrap, point it at an image made from debootstrap, and get the expected trixie or sid values

Not at all. Debootstrap is one of dozens of different and independent image builders, and dissecting is just for inspection, usage varies tremendously, and there are many other consumers.

> If apt sources.list says "https://ftp.debian.org/debian/ stable main" (the "rolling stable" configuration) and the user runs dist-upgrade every day, then CODENAME definitely does change sometimes (when base-files gets upgraded).

Of course, as that's an alias. When the major version changes, the distro is updated. Whether that happens automatically, or manually, is perfectly irrelevant and has nothing to do with any of the points raised. I could use the codenames and have an entirely automated dist-upgrade process anyway, and it wouldn't be any different from the point of view of os-release and its usage.

> So in summary, the core of the disagreement is: Debian currently implements the spec correctly, but you don't believe in what the spec says. You want Debian to implement a Debian-specific extension on top (or fix the spec so that it defines nicer things, but that sounds like a cross-distro consensus nightmare).

Not quite. The accurate summary is: Debian currently implements the spec correctly everywhere, apart from sid, where the implementation is buggy. I wanted Debian to fix the buggy implementation of this one case, so that it matches the rest of Debian's usage, which is correct.

Just get rid of the sid name

Posted Aug 13, 2024 5:02 UTC (Tue) by zblaxell (subscriber, #26385) [Link] (1 responses)

> I have no idea what you are trying to do here

Initially I was trying to understand why your ideas are meeting so much resistance. I now understand this through lived experience.

Then I moved onto a second goal, which is to help you understand why your ideas are meeting so much resistance.

Other goals were to head off a Debian change that might break stuff I rely on, or start a tsunami of new bugs I'll have to respond to. After reading the other comments and mailing list, and finally grasping what your ideas actually are, I'm confident these risks are low.

> > The code behind this use case on Debian is all very Debian-specific
> It is very much not, it runs on multiple versions of half a dozen distros

I don't know why you'd challenge me on this point. I'm looking directly at the code, and following VERSION_CODENAME as it travels through the code from your own examples. It ends up in hundreds of lines of python or shell code which will fall on its face if it finds itself running on Fedora, Arch, or even Ubuntu. At one point in the middle it goes _through_ distro-agnostic code but it's an hourglass, distro-specific at both ends and agnostic in the middle.

You might be conflating some other use case with the one I've extracted from your examples and getting into the weeds on extra details. This isn't necessary, as you've already convinced me that at least one use case worth supporting exists. I only needed one.

> > For the DDI files, I guess all you want is to plug systemd-dissect into one of the above commands in place of debootstrap, point it at an image made from debootstrap, and get the expected trixie or sid values
> Not at all. Debootstrap is one of dozens of different and independent image builders, and dissecting is just for inspection, usage varies tremendously, and there are many other consumers.

The very next sentence, which you didn't quote, is "And [also] all the variations with other image creation and manipulation tools."

> > to build one ephemeral Debian image to interact with an existing Debian image of similar vintage but different options.
> This is very wrong, and that's not at all what happens, in fact it's the exact opposite

The opposite is an ephemeral Debian image that builds a non-ephemeral one? OK, that works too. I put that restriction in there to eliminate cases where two images interacting with each other are persistent, as that's a different use case with potential extra dependency issues, and I wanted to save time by excluding it from discussion because it's a magnet for objections. I only needed one use case, so I won't ask for further details or examples.

> Perhaps you should check again? It's not empty at all, it is definitely exactly as it needs to be, and among the examples it lists it even uses one of Debian's: https://www.freedesktop.org/software/systemd/man/devel/os...

Also your words, in https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1077764#43

> With my upstream spec maintainer hat on, I am asserting that the base-files implementation of the os-release specification is buggy. The crux of the issue is that the way base-files implements the specification does not allow to distinguish testing vs unstable images

Please point to the line(s) in the spec which specify when Debian archives should be labelled with distinct VERSION_CODENAMEs, with particular emphasis on non-release-oriented contexts like testing and unstable. I have read both versions of os-release spec you pointed to so far, the git histories, the rationale blog post, and their LSB ancestor, and explained what I did and didn't find there.

As the self-described upstream spec maintainer, you should be able to do this easily, since it's your spec and it's the basis on which your own complaint about Debian rests. If you can't, then that's your problem, to solve or ignore as you see fit. I am willing to make the effort to point this out to you, but not to babysit you through solving every issue I find in your work.

> Your assertion is ~12 years too late

I'd say it's maybe 25 or more years too late, since Debian's structure is older than the very first version of the spec's earliest direct ancestor.

The LSB (described in the announcement as the ancestor of os-release) dates back to 2001, but it's still years newer than Debian's current arrangement (ignoring the changing location of the VERSION_CODENAME data over the years, the project's stance on whether testing or unstable have release events that trigger distinct metadata changes is not new). I know this first-hand because I've been working with, on, under, and around Debian's build system, and several other build systems (including several of my own design), for nearly 30 years now.

I do have a bias: most of the build systems I've worked with are cross-building systems where the build and test environments are both strictly defined and controlled by the build framework, and isolated from each other and the host system. Before this week it would never occur to me to get information about the target environment from introspection of the build host (i.e. reading os-release and mapping that to external objects) as that information would be pushed down from higher layers of the build framework. I admit I do seem to live in a world where looking at a functional equivalent of os-release/VERSION_CODENAME for this purpose is considered an antipattern, and it took a few tries to wrap my head around how things could work in a world where it's not. Thanks for your patience while I went through that.

> Debian currently implements the spec correctly everywhere, apart from sid, where the implementation is buggy

The implementation is not buggy until the spec says it is. Inconvenient, certainly. Undesirable, probably. But say it's "buggy", and people will question the correctness of your premise without further considering the merits of your argument, as you've already...I was going to say "noticed", but maybe "discovered" is more accurate.

To be clear, after discussing with you, I'm now in favor of making unstable's CODENAME distinct from testing, despite the changes to decades-old legacy behavior that technically complies with specification you have pointed to so far. (I'm also OK with Debian deferring that change until the next release cycle in case it does blow up something obscure). The kindest thing I can say about the current Debian behavior is that it's a legacy feature that does not conflict with the current letter of the spec, and that's very faint praise.

Just get rid of the sid name

Posted Aug 13, 2024 13:39 UTC (Tue) by bluca (subscriber, #118303) [Link]

> Initially I was trying to understand why your ideas are meeting so much resistance. I now understand this through lived experience.
> Then I moved onto a second goal, which is to help you understand why your ideas are meeting so much resistance.

Except of course they aren't: literally every distribution under the sun, for all their releases is doing this (apart from a single version of one, for now). Also, they are not "my ideas", this is all pre-existing - even in Debian, the first bug raised flagging the buggy implementation was in 2012, a full 4 years before I started getting involved at all. "For some value of 'understand'", I guess?

> Other goals were to head off a Debian change that might break stuff I rely on, or start a tsunami of new bugs I'll have to respond to. After reading the other comments and mailing list, and finally grasping what your ideas actually are, I'm confident these risks are low.

What bugs?

> I don't know why you'd challenge me on this point.

Because you are writing descriptions that are plainly wrong, about thing that you do not work on. Again I do not understand why you are insisting on trying to badly define things that you have nothing to do with, that you never used, you never worked with or on, that you never saw before, and that you'll never see again. If you don't care, and you obviously don't, just... don't? Nobody asked you to do any of that? I get it, you strongly dislike all of this - that's ok, just say it and move on

> Please point to the line(s) in the spec which specify when Debian archives should be labelled

Why should Debian be specially called out?! Sorry, but this is making less and less sense. This is a distro-agnostic specification, it's not targeted at Debian, there are no special cases or exceptions called out. One can choose not to implement it, or to implement it wrongly and keep it buggy of course, but the idea that Debian is _so_ special that it needs to be redefined after it and add explicit provisions for it is plain nonsense. The idea that there should be special line(s) specifying explicitly what Debian should do or not do is simply absurd.

> I am willing to make the effort to point this out to you, but not to babysit you through solving every issue I find in your work.

Before claiming to have found issues, let alone "babysit" anybody, you should first ensure you understand the situation, you understand the topic you are talking about, and you understand what the problem being discussed is. Unfortunately I do not think you have managed to do any of these things so far, from what you are saying.

> The LSB (described in the announcement as the ancestor of os-release) dates back to 2001, but it's still years newer than Debian's current arrangement (ignoring the changing location of the VERSION_CODENAME data over the years, the project's stance on whether testing or unstable have release events that trigger distinct metadata changes is not new). I know this first-hand because I've been working with, on, under, and around Debian's build system, and several other build systems (including several of my own design), for nearly 30 years now.

Sorry but I am having a really hard time believing this, given the legacy and deprecated LSB tools in Debian explicitly and intentionally allowed to tell the difference between testing and unstable, and always had. With horrendous, Debian-specific tricks and workarounds of course, but they still did. This is the very thing you are strenuously objecting to, because it would "cause a tsunami of new bugs" if it happened, according to what you wrote above. Of course you won't believe me, but fortunately you don't have to, you can check what the LSB tools maintainers has to say about this: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1077764...
You are saying that you just happened to have missed all of this, for 30 years straight? While at the same time asserting that you are "babysitting" me?

> > Debian currently implements the spec correctly everywhere, apart from sid, where the implementation is buggy
> The implementation is not buggy until the spec says it is.

It already does. This has been pointed out many different times since ~2012, so you can't even say that it's "my idea" that it's buggy, as that predates my involvement. The spec says VERSION_CODENAME needs to identify the, er, code name, obviously. The codename of 'sid' is not 'trixie'. If you want to get 'sid', you do 'debootstrap sid', not 'debootstrap trixie'. If you want the signed archive metadata of 'sid' you look at https://ftp.debian.org/debian/dists/sid/InRelease (where it says: 'Codename: sid' right at the top!!!), not at https://ftp.debian.org/debian/dists/trixie/InRelease (where it says: 'Codename: trixie'). The official documentation for unstable, first line in first paragraph in first section says 'Debian Unstable (also known by its codename "Sid")' https://wiki.debian.org/DebianUnstable it doesn't say that unstable's codename is trixie.

We have tons of very much official, very much supported, very much used, very much real Debian internal infrastructure, documentation, code, packages, and more, that uses 'sid' as the codename for 'sid', and yet there's one single piece that doesn't: /etc/os-release on sid says that sid's codename is trixie, contradicting literally everything else, including the legacy LSB tools. You cannot in good faith argue that this is not buggy. For the millionth time, one can legitimately say that it's fine that it's buggy, that they _want_ it to be buggy because of X Y Z, that it's the best thing since sliced bread that it's buggy, but not that it isn't. Because if it's correct that sid's codename is trixie, then literally everything else is buggy, from LSB to debootstrap to apt to all the archives to all the repositories to the installer to all documentation and everything in between.

Just get rid of the sid name

Posted Aug 11, 2024 0:18 UTC (Sun) by NYKevin (subscriber, #129325) [Link] (6 responses)

> Why are you imposing such strict limits? Images exist, image builders exist, image managers exist. The fact is, os-release exists, and is used by many things, programs, humans. If you think it is useful in some cases, then it's only logical that it extends to sid too. If you don't think it is useful at all, then it doesn't matter to you in the first place, so why worry?

Frankly, I'm real confused about why this is even relevant to people who build images. If you're building enough images that you need to track which release they're from, you are presumably using some kind of management software to do so, and that management software should have the ability to associate basic metadata with the images it produced.

Or, to put it another way: You made that image in the first place, so you should already know how you configured it. Why does the image itself need to tell you?

Just get rid of the sid name

Posted Aug 11, 2024 0:33 UTC (Sun) by bluca (subscriber, #118303) [Link] (5 responses)

Because every other distribution can self-identify. Why would there need to be something else when that works just fine? Also, by self-identifying, metadata is automatically covered by cryptographic signature o f the artifact, so if this is used in a deployment system, it can be trusted, without the need to implement a sidecar metadata and its own out-of-band verification methods.

Just get rid of the sid name

Posted Aug 11, 2024 6:29 UTC (Sun) by NYKevin (subscriber, #129325) [Link] (4 responses)

> Because every other distribution can self-identify. Why would there need to be something else when that works just fine?

You're already doing like 80% of the work. You need to have a standard "recipe book" for creating images (unless you're one of those "the sysadmin does everything manually" people, but those people mostly don't use images in the first place). All I'm suggesting is that you keep track of which recipe you used. It's one value, which is probably just an integer or UUID. Why is that difficult?

> Also, by self-identifying, metadata is automatically covered by cryptographic signature o f the artifact, so if this is used in a deployment system, it can be trusted, without the need to implement a sidecar metadata and its own out-of-band verification methods.

Pffft, that's ridiculous. As soon as you have two or more computers, and they're not all in the same physical trust domain (building, in most cases, or perhaps an entire physically-secured campus), you need certificates and signatures on absolutely everything that moves between them. If you rely on the image's signature, then the recipient has to blindly trust that you wanted this image, and not any other image, installed on this hardware. For that matter, the recipient also has to blindly trust that you wanted the installation to take place at all. What if some attacker calls InstallImageOnComputer (or whatever it's named) on all of your production serving instances at once? You'll have an outage, and it will be entirely your own fault for letting them do that.

So you have to sign a metadata sidecar anyway, and this is not a real objection.

Just get rid of the sid name

Posted Aug 11, 2024 7:52 UTC (Sun) by gioele (subscriber, #61675) [Link] (2 responses)

> > Because every other distribution can self-identify. Why would there need to be something else when that works just fine?
>
> You're already doing like 80% of the work. You need to have a standard "recipe book" for creating images (unless you're one of those "the sysadmin does everything manually" people, but those people mostly don't use images in the first place). All I'm suggesting is that you keep track of which recipe you used. It's one value, which is probably just an integer or UUID. Why is that difficult?

It's a matter of standardization.

You, as the creator of the images can easily write some sort of identifier somewhere. But the hundreds of applications out there that may do something based on that identifier need to be taught how to read that identifier you came up with (filename, format, etc.).

os-release already specifies all this in a standardized way and is supported by all programs that care about identifying an OS/image/VM. Such programs can rely on os-release being correct on all distros, except Debian.

Just get rid of the sid name

Posted Aug 11, 2024 14:02 UTC (Sun) by DanilaBerezin (guest, #168271) [Link] (1 responses)

> os-release already specifies all this in a standardized way and is supported by all programs that care about identifying an OS/image/VM. Such programs can rely on os-release being correct on all distros, except Debian.

I think the point of contention is that the Debian Project does not see "Unstable" as a distro at all. So it doesn't violate the spec in their eyes whatsoever. I don't think the spec requires that /etc/os-release specify new values in the file for every branch of a distros SW.

Just get rid of the sid name

Posted Aug 11, 2024 14:06 UTC (Sun) by pizza (subscriber, #46) [Link]

> I think the point of contention is that the Debian Project does not see "Unstable" as a distro at all. So it doesn't violate the spec in their eyes whatsoever. I don't think the spec requires that /etc/os-release specify new values in the file for every branch of a distros SW.

And the other side of that point of contention is that whether or not Debian sees "Unstable" as a standalone distro (ie distinct from "testing") that's not how its *users* see (and use) it.

Just get rid of the sid name

Posted Aug 11, 2024 10:31 UTC (Sun) by bluca (subscriber, #118303) [Link]

> All I'm suggesting is that you keep track of which recipe you used. It's one value, which is probably just an integer or UUID. Why is that difficult?

We already do that. It's os-release, and it works everywhere else, including in other debian releases, just not in sid. Why should we need to hack around with sid-specific workarounds?

> Pffft, that's ridiculous. As soon as you have two or more computers, and they're not all in the same physical trust domain (building, in most cases, or perhaps an entire physically-secured campus), you need certificates and signatures on absolutely everything that moves between them. If you rely on the image's signature, then the recipient has to blindly trust that you wanted this image, and not any other image, installed on this hardware.

You don't blindly trust it of course, the signature is checked against the root of trust that is already present on the machine where it is being used. This is not hypothetical - it's how dm-verity works, using either the kernel built-in keyring, or the secure boot derived keyring.

> For that matter, the recipient also has to blindly trust that you wanted the installation to take place at all. What if some attacker calls InstallImageOnComputer (or whatever it's named) on all of your production serving instances at once? You'll have an outage, and it will be entirely your own fault for letting them do that.

If an attacker has full root privileges, then they can dd whatever they want to the disk and reboot. Why would some sidecar signature checks prevent that? Sorry but I don't follow this point


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds