|
|
Log in / Subscribe / Register

Distinguishing Debian testing from unstable

By Jonathan Corbet
August 9, 2024
Sometimes, the smallest changes create the longest discussions. As a case in point, a proposal to make a one-line change in an informational text file on systems running the Debian unstable distribution has blown up into an interminable and sometimes unfriendly debate. At its core, though, this discussion comes down to a seemingly simple question: should a program be able to determine whether it is running on a Debian testing or unstable system?

Like most distributors, Debian maintains a few versions of its distribution, some of which are more stable than others. The Debian project creates a major stable release approximately every two years; this release will receive three years of support from the project, followed by two years of reduced long-term support. The current stable Debian release is Debian 12, called "bookworm". Development of future releases is done in the unstable distribution, also known as "sid". While it is possible to run an unstable system for real-world use (and many people do), one has to be prepared for things to break on occasion. A somewhat gentler experience can be had from Debian testing, which receives packages that have lived in unstable for a period without causing serious problems.

The testing distribution is essentially the next major Debian stable release — it's just not quite done yet. It already carries the next release's code name ("trixie" at the moment); a user who installs trixie now will get a system that will evolve and stabilize into the stable release.

These distributions, like almost all others in recent times, include a file called /etc/os-release that tells interested software what kind of system it is running on. This file has a standard format that all distributions are expected to follow. The full contents of /etc/os-release on a Debian bookworm system are:

    PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
    NAME="Debian GNU/Linux"
    VERSION_ID="12"
    VERSION="12 (bookworm)"
    VERSION_CODENAME=bookworm
    ID=debian
    HOME_URL="https://www.debian.org/"
    SUPPORT_URL="https://www.debian.org/support"
    BUG_REPORT_URL="https://bugs.debian.org/"

The idea is that any program that needs to change its behavior depending on the type of system it is running on can consult this file and act accordingly. In Debian systems, /etc/os-release is shipped as part of the base-files package.

Bringing in the Technical Committee

On August 1, Luca Boccassi, frustrated with how a bug discussion was going, approached the Debian Technical Committee with a long-simmering disagreement; he requested a decision that would override the base-files maintainer and remove /etc/os-release from that package. The Debian implementation of that file, he asserted (as the maintainer of the os-release specification), is buggy. Specifically, it does not properly identify the testing and unstable distributions, making it impossible for software to distinguish between the two using only /etc/os-release. The problem, he said, is real:

These issues are not just theoretical, and do not concern mere personal preferences or cleanliness or code quality or ugliness. They cause very real, very actual and very painful grief for Debian users, as evidenced by the multiple independent bugs with multiple independent reporters chiming in, and the multiple ugly hacks that have to be implemented as Debian-specific workarounds.

He complained specifically that the code name in unstable is currently set to trixie, which he sees as being misleading at best. The testing distribution will indeed become the next stable release, he said, at which point it will gain security support, then eventually proceed toward its end of life. It is essentially trixie, so use of that code name there is appropriate. Unstable, instead, will never become stable, will never have security support, and will never reach end-of-life. Software running on these systems should be able to tell what the expected life cycle for the distribution is; using the trixie code name there makes that impossible.

He suggested that unstable should have the following lines in /etc/os-release:

    PRETTY_NAME="Debian GNU/Linux sid"
    NAME="Debian GNU/Linux"
    VERSION_CODENAME=sid

While testing should have:

    PRETTY_NAME="Debian GNU/Linux 13 (trixie)"
    NAME="Debian GNU/Linux"
    VERSION_ID="13"
    VERSION="13 (trixie)"
    VERSION_CODENAME=trixie
    RELEASE_TYPE=pre-release

The RELEASE_TYPE would change to lts once the trixie stable release happens. The key change, he said, is the VERSION_CODENAME line, which tells software what kind of Debian system they are running on.

The number of voices supporting this change was relatively small. Gioele Barabucci, the maintainer of the lsb_release implementation, said that similar issues had come up with that package. As of the bookworm release, lsb_release obtains all of its information from /etc/os-release, so it, too, cannot distinguish between testing and unstable. Users have requested that ability, he said, and may well bring the issue to the Technical Committee if the current discussion does not give them what they want. Marc Haber said that he "would not cry" if he were able to remove his current workarounds for this problem.

Disagreement

Needless to say, there is opposition to this change, or the discussion would have never reached the Technical Committee. Numerous participants said that they simply did not see the benefit of this change, and that Boccassi had not provided examples of where the distinction was truly important (a position that Boccassi disagreed with). Russ Allbery said: "I admit to not finding this use case compelling", adding that the proposed use cases come from "misunderstandings of how Debian works". The packages that are in unstable today will be in testing tomorrow, perhaps with no change at all; what was actually of interest, he suggested, was which repository new packages for a given system would come from. That information can be found by parsing the package-management configuration.

As Simon McVittie described, many Debian developers see unstable as "a tool to be used as part of the process of making our next stable release" rather than a separate distribution in its own right. To treat unstable differently in its /etc/os-release file would challenge that view of how things work; that is a step that many developers would rather not take.

In more technical terms, McVittie laid out how the proposed change could lead to trouble:

That also breaks some of the design principles of the unstable -> testing -> stable flow, which are that testing should be approximately equivalent to a previous state of unstable (one where everything worked acceptably together), the next stable should be functionally equivalent to a late-freeze version of testing, and as little as possible should change as we cross release milestones, to avoid perturbing packages' behaviour.

He later gave a specific example of how changing /etc/os-release could create regressions as packages move into testing. In short, a package that changes its behavior depending on the release code name might work in unstable, but misbehave once it transitions to testing and sees a different code name.

Allbery also described the idea of testing and unstable being different distributions as poorly defined. A system installed from the trixie repository will evolve into the next stable release and go through the life cycle described by Boccassi. A system installed from the testing repository, instead, will begin with the exact same set of packages (since trixie and testing are currently synonyms), but will move forward to the next release (to be called forky) once trixie is released and will have a different life cycle. It is not really possible for a single /etc/os-release file to describe both scenarios:

This sort of ambiguity is, I think, part of why this proposal generates so much discussion. Debian simply doesn't currently have clean semantics for testing. It exists in a sort of quantum superposition where it is multiple things simultaneously for different people, and this proposal is trying to label it in a way that collapses that state to match the mental model of one group of people, invalidating the mental model of a different group of people.

Boccassi disagreed with all of these positions, of course; he summarized the situation as "a trivial technical problem with a hard social conflict at its core".

The trial

What Boccassi did not do was change many (if any) minds over the course of this sprawling discussion. On August 6, Technical Committee chair Sean Whitton called for a vote on whether the committee should simply close the request; the operative language was: "The Technical Committee declines to overrule the maintainer of base-files, or issue any advice on issues concerning /etc/os-release". Boccassi, evidently surprised by this move, described it as "like something out of a Kafka novel". All committee members who voted did so in favor of the resolution, so the issue was closed with the committee declining to weigh in on the topic.

So it seems that this lengthy discussion is likely to result in no changes to how Debian maintains its /etc/os-release file. The Debian project's view of its testing and unstable repositories is apparently not compatible with treating them as independent distributions with their own identity, and most Debian developers do not see a valid reason why software should be able to tell the difference between them. While the discussion may wind down for now, though, this has the look of one of those topics that never completely go away. The proposed change is small, but it is a big deal to the people involved.


to post comments

Some additional details

Posted Aug 9, 2024 16:42 UTC (Fri) by bluca (subscriber, #118303) [Link] (4 responses)

Aside from the details about the technical issue which at this point don't matter anymore, given the enormous amount of (wasted) walls of text, it's understandably easy to miss details about the chain of events, so I want to clarify a few things.

> The number of voices supporting this change was relatively small.

This was not publicized anywhere, intentionally. Basically only people subscribed to tech committee emails would have caught wind of this. When the TC chair said there was a lack of "consensus" (note for people who are not part of Debian: this is a debianism that means a group of people has managed to shout another less keen group of people into despair and forced them to close their email client and leave, and it's how decisions in Debian are made), and I have asked multiple times if they wanted me to do so. I could have easily brought more people who I know have been bitten by this, both inside the project and outside as users or upstream developers, but I naively assumed the TC chair was acting in good faith, and that was a mistake. The fact that his first reply was "I don't like you" should have made it abundantly clear how it was going to end, so that's on me.

Ref: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1077764...

> Boccassi, evidently surprised by this move, described it as "like something out of a Kafka novel

The key point missing here is that a few people, not just myself, had provided details of how a solution could actually be implemented. I summarized and ranked them here:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1077764#43

And yet, the later call for a vote to dismiss by the TC chair says:

> We do not think there is a clear proposal on the table for us to assess, and we do not think it is appropriate to issue any general statements on the issues concerning /etc/os-release.

Weird, right? How can that be true given there were multiple proposals sketched in details, not even just one, and nobody had asked for anything more, in fact when asked if an actual implementation was needed the answer was 'no'? Well, the TC chair responding to Gioele later said that the TC could rule on a matter of principle ( https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1077764... ), so in attempt to cut out a bit of bike shedding that was starting to show up, which experience says would have dragged on and on and on, I replied that, if it was possible, I'd like for that to happen ( https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1077764... ). The response of the TC chair was to start a vote to dismiss using the quote above. Then I described the experience as out of a Kafka novel. Afterwards, another TC member said the TC would have maybe not voted to dismiss if I hadn't called it a kafkaesque experience. Despite that having happened _after_ the vote to dismiss. If that's not kafkaesque, then I don't know what is.

The main issue here, as always, is that this group makes it up as they go along. There's no engineering process, or process of any kind, so when it's one of their own who brings things up then things tend to go smoothly even if they are much much more involved and controversial, while if it's someone they don't like then they can play games like these to nip it in the bud. Compare and contrast with other distributions like Fedora where there's a very well defined Changes Proposal engineering process to bring proposals to FESCO, that everybody can understand and follow, which precise requirements and steps.

> So it seems that this lengthy discussion is likely to result in no changes to how Debian maintains its /etc/os-release file.

Not in an optimal way, no. But we can sidestep the whole issue of package ownership by simply fixing it when images are being built, at which point it is a local change and thus overriding the content of any package is explicitly permissible and in fact supported as a first-class feature in the package manager. It means only new images will be correct, hence it's not optimal, but at some point, better than nothing.

Some additional details

Posted Aug 9, 2024 17:44 UTC (Fri) by Herve5 (guest, #115399) [Link] (2 responses)

"[...] this is a debianism that means a group of people has managed to shout another less keen group of people into despair and forced them to close their email client and leave, and it's how decisions in Debian are made"
Am I the only one here finding this sentence ridiculous, even pathetic?

Some additional details

Posted Aug 9, 2024 18:01 UTC (Fri) by pizza (subscriber, #46) [Link]

> Am I the only one here finding this sentence ridiculous, even pathetic?

That sentence may be ridiculous and pathetic... but that doesn't make it not true.

(And frankly, it lines up very well with my experience. And LWN's innumerable articles about Debian Drama..)

Some additional details

Posted Aug 9, 2024 23:16 UTC (Fri) by pdewacht (subscriber, #47633) [Link]

Especially since the base-files maintainer didn't even bother to reply to the tech-ctte escalation.

Some additional details

Posted Aug 9, 2024 21:40 UTC (Fri) by zblaxell (subscriber, #26385) [Link]

> But we can sidestep the whole issue of package ownership by simply fixing it when images are being built, at which point it is a local change and thus overriding the content of any package is explicitly permissible and in fact supported as a first-class feature in the package manager. It means only new images will be correct, hence it's not optimal, but at some point, better than nothing.

That seems like the optimal solution, and the best practice for anyone who produces images based on Debian.

An image of Debian requires the builder to make choices that can have material effects on software that runs on top of image. The image is a derived output of a subset of a snapshot of a branch of Debian with some set of configuration options applied (choosing only defaults is still a choice, and you can't install all packages because some are mutually exclusive). I'd expect anyone building an image intended for this use case to provide version strings with their own unique values so that the image can be distinguished from any other image, and meaningful dependency information (or at least bug metrics) can be derived from the version.

For non-image uses (i.e. the traditional mutable self-hosted OS where users can install or remove any package, including third-party packages, at any time, and use non-default configuration options), the os_release VERSION field has very limited utility. It's not quite zero--"VERSION_CODENAME=trixie" tells you that you're running on one of a few thousand distinct Debian versions within a 6-year window, but it's only one of 4 data points needed to identify what software is running on the system. The precision is low, but it's still more than Arch tells you--Arch doesn't provide VERSION at all.

unstable, distro or not?

Posted Aug 9, 2024 16:48 UTC (Fri) by DanilaBerezin (guest, #168271) [Link] (6 responses)

To me, the root of the problem lies in the fact that users can see and use unstable as though it were it's own distro, but Debian's longstanding policy seems to indicate that it is not a seperate distro in any real way. Rather, it's really just an internal main branch used by Debian maintainers to provide a root from which they can simply branch off in preperation for individual releases, with little to no release-specific changes required.

Every other project that has a release process like this (that I can think of off the top of my head) release proprietary software, so issues like this are nonexistent since the "main branch" is never visible by end users to begin with. For open source projects that have a fixed-release process, every single one that I can think of (again off the top of my head) has an explicit policy stating that the "main branch" is in fact it's own distro, and release branches are not simply direct branches off of the main branch which slowly evolve into stable releases like they are in Debian, but will always require release-specific changes* soon after the fact, if not immediately.

I'm not sure there's a good solution to the problem that falls inline with the values of the Debian project however. The trivial solution would to just close off access to unstable, obviously this isn't going to happen, however. The only other thing to do is make the policy clearer through Debians documentation, but that is unlikely to really solve the problem.

*Note that when I say "release-specific changes" I'm not talking about changes that happen to occur during the course or a Debian release cycle because of bugs or other problems that are encountered, but changes that are known and planned to happen with every new release. For Debian, these changes directly happen in unstable, so theoretically if no problems ever arise during testing of a release branch, a stable release can be made with absolutely no changes since being branched from unstable (in practice this never happens of course). However, for most other open source projects with fixed release cycles, these changes are applied when a new release branch is created. These changes are what I mean when I talk about "release-specific changes."

unstable, distro or not?

Posted Aug 9, 2024 17:10 UTC (Fri) by Sesse (subscriber, #53779) [Link]

> The trivial solution would to just close off access to unstable, obviously this isn't going to happen, however.

Not the least because an integral part of the testing branch is to have people catch bugs in unstable before they have the chance of progressing to testing.

unstable, distro or not?

Posted Aug 11, 2024 19:55 UTC (Sun) by smammy (subscriber, #120874) [Link] (4 responses)

Thank you, I found your insight that Debian essentially does release "bookkeeping" in the development branch to be helpful. IIUC, this is the difference between e.g. a "VERSION" file in main containing "git" and containing the aspirational next version number. I've seen projects do this both ways, so it seems likely to me that the sky wouldn't fall if Debian decided that this one file could have different contents between testing and unstable.

unstable, distro or not?

Posted Aug 12, 2024 20:17 UTC (Mon) by Heretic_Blacksheep (guest, #169992) [Link] (3 responses)

To be clear I agree with what I think yall are saying.

I think the problem is that Debian's contributors and users appear to be conflating distributions with versions of the same distribution and releases. Stable, testing, and SID are not at all different distributions, they're different versions of the same distribution. The problem is that people are treating the unstable version as an actual rolling release, and therefore causing issues in cases where it would be beneficial to utilize os-release to recognize that simple fact.

Politics, ego, and animosity aside, the person that proposed the change is correct in his assessment.

unstable, distro or not?

Posted Aug 13, 2024 12:24 UTC (Tue) by gioele (subscriber, #61675) [Link] (2 responses)

> The problem is that people are treating the unstable version as an actual rolling release

Why shouldn't they? https://wiki.debian.org/DebianUnstable says

> Debian Unstable (also known by its codename "Sid") is not strictly a release, but rather a rolling development version of the Debian distribution

unstable, distro or not?

Posted Aug 16, 2024 11:19 UTC (Fri) by cortana (subscriber, #24596) [Link] (1 responses)

I think this demonstrates one of the downsides of wikis... anyone can write something that sounds authoritative and others will understandably come get the impression that it is an official statement from the project.

Debian's official web site at https://www.debian.org/releases/ does not mention the word "rolling" and the only release that has "version" in its description is "stable". The same applies to the linked FAQ.

I think it's unfortunate that these documents treat "distribution" as synonyms for "release"; there's no "release" of testing or unstable, they are simply sets of packages that at any one point in time may or may not work, and may or may not work together.

unstable, distro or not?

Posted Aug 16, 2024 11:27 UTC (Fri) by bluca (subscriber, #118303) [Link]

Debian wiki cannot be edited by "anyone", you need to be authorized to do so.

https://release.debian.org/

stable
Fast response for security updates. Minor updates include security and other important fixes only. Major updates are sourced from testing, and are infrequent, but large.

testing
Security updates are irregular and unreliable. Release standards are almost continually met. Updates are automatically sourced from unstable, happen four times each day and are usually small.

unstable
Security updates are made by the maintainer; they may not be effective on all architectures, and may be delayed. Packages uploaded may not meet release standards, but any breakage is expected to be fixed promptly. Updates are made by maintainers.

The definition above matches what one would expect from a rolling release. These are not mathematical terms, there is not exact formula and there doesn't have to be one for these descriptions to be useful

Just get rid of the sid name

Posted Aug 9, 2024 18:09 UTC (Fri) by mb (subscriber, #50428) [Link] (55 responses)

The sid codename should just be removed.
Unstable is just a development step, not a release.

Any program that changes its behavior based on whether it is running on unstable or testing is seriously broken.

There is much more benefit in _not_ changing things when packages transition from unstable into testing.

Just get rid of the sid name

Posted Aug 9, 2024 18:13 UTC (Fri) by zumbi (subscriber, #62446) [Link]

SID = Still In Development
... also the bad kid breaking toys in Toy Story movie.

Just get rid of the sid name

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

> Unstable is just a development step, not a release.

And yet, not only there's tons of downstreams based on unstable and that ignore testing completely (like Ubuntu), not only there's tons of people that _do_ run unstable as a release on their work machines, but the entire process relies on the fact that all of that happens. If it didn't, then it would all fall apart, as nobody would find the bugs before they reach testing.

> Any program that changes its behavior based on whether it is running on unstable or testing is seriously broken.

<citation needed>

Just get rid of the sid name

Posted Aug 9, 2024 18:21 UTC (Fri) by pizza (subscriber, #46) [Link] (43 responses)

> Any program that changes its behavior based on whether it is running on unstable or testing is seriously broken.

Uh, by their very *definition* unstable and testing behave differently. Not only that, their behavior can (and does) change on a day-to-day basis.

Also, even within a *single* Debian release, any given program has to change its behavior based on all sorts of "only-knowable-at-runtime" variables (including the classic "systemd or sysvinit") Why would "running on debian unstable/testing" be any different in that respect?

Just get rid of the sid name

Posted Aug 9, 2024 18:25 UTC (Fri) by mb (subscriber, #50428) [Link] (14 responses)

> Why would "running on debian unstable/testing" be any different in that respect?

Because it's not distinction that makes sense.
Today's unstable is tomorrow's testing.

Test for the thing that you want to actually distinguish on (e.g. systemd vs. sysvinit) and not based on the distro name.
That's even true cross-Distribution for almost all things.
Don't check if you are running on Debian or Redhat. Check for the actual thing that you need instead.

Just get rid of the sid name

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

> Because it's not distinction that makes sense.
> Today's unstable is tomorrow's testing.

Wrong. Unstable is unstable, and will always be unstable. Testing has a completely different lifecycle. If you are building, managing and pairing images, this matters.

Just get rid of the sid name

Posted Aug 12, 2024 7:34 UTC (Mon) by LtWorf (subscriber, #124958) [Link] (12 responses)

But testing in a week will be today's unstable.

So if you have a test for testing/unstable in your code… it will break anyway, a few days later. Why not fix your code testing it on unstable directly instead of pushing a big change on how the whole flow works, just to delay a bug for a few days?

Just get rid of the sid name

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

> But testing in a week will be today's unstable.

No, it will not, they are two entirely different and independent archives: https://ftp.debian.org/debian/dists/sid/ https://ftp.debian.org/debian/dists/trixie/ A subset of one might move to another, or might not, but that's irrelevant, and it happens between stable and oldstable too - they are different releases, with different lifecycles, independent and individual archives, that official rootfs building tools like 'debootstrap' allow to build independently and individually. As already mentioned many times, content doesn't matter, identity does.

> Why not fix your code

What code?

Just get rid of the sid name

Posted Aug 16, 2024 7:08 UTC (Fri) by ralfj (subscriber, #172874) [Link] (9 responses)

I think os-release tries to establish a notion of "identity" that is insufficiently defined and doesn't work when applied to Debian.

When I install a system as "testing", and when I install it as "trixie", do those systems have the same or different "identity" according to whatever notion of "identity" you are using? They have a very different lifecycle: one of them leads to a rolling release system that never gets a major upgrade to a "next" version or an "end of support" or anything like that; the other eventually turns into Debian stable and thus does have EOL and all these things. So it seems to me, after reading literally the entirety of https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1077764, that "testing" and "trixie" should, in the eyes of os-release, be considered different versions of Debian with different identity.

And yet obviously, right now, their package content is the same. The only material difference between these systems is in the apt configuration. If /etc/os-release is supposed to differentiate between these kinds of systems, it somehow has to be synced with the apt configuration.

Throughout this thread, I see one side using the concept of the "identity" of a Debian installation as if it was completely self-evident what that is supposed to mean, and most everyone else trying to figure out what it is supposed to mean by asking tons of questions, but unfortunately never getting an answer that actually helps resolve the underlying confusion. It's too late for this discussion, but I think in the future if this comes up again, it'd really be worth spending some time trying to get to the bottom of this.

Testing/trixie, apt sources [WAS Just get rid of the sid name]

Posted Aug 16, 2024 7:57 UTC (Fri) by amacater (subscriber, #790) [Link] (2 responses)

This is one very good reason to use distro codenames rather than testing/stable - and the installer now defaults to codename. You can run a Debian system as "stable" and hit a flag day when there's a major Debian release and everything changes under you. If you pin to "testing" - you never get a release, potentially. Sid == unstable == never gets a release.

Pin to trixie immediately after the release of bookworm - and you follow the release all the way through from fork of unstable -> testing stage -> stable -> oldstable for five years or so. Likewise pinning to forky immediately after the release of trixie

Testing/trixie, apt sources [WAS Just get rid of the sid name]

Posted Aug 17, 2024 10:33 UTC (Sat) by ralfj (subscriber, #172874) [Link] (1 responses)

> This is one very good reason to use distro codenames rather than testing/stable

I *want* to stay on testing though. That's been my main work setup for more than 10 years now. So why should I use codenames?

Testing/trixie, apt sources [WAS Just get rid of the sid name]

Posted Aug 17, 2024 18:50 UTC (Sat) by amacater (subscriber, #790) [Link]

If you *want* to use "testing" as the string in apt sources, you are absolutely free to do so and you will remain on testing forever. As you note in your response to bluca a bit lower down in the thread, once every three years or so, there's a change of codename, whether you're aware of it or not. If you're not aware, it could come as a shock.

If you don't want the possibility of a big change without notice, using distribution codenames is a useful thing.
[We only have codenames at all because there was never a Debian 1.0 released officially by Debian. A vendor chose to release and renumber something not yet ready for release in order to have a "Contains Debian 1.0" on their media].

Just get rid of the sid name

Posted Aug 16, 2024 11:19 UTC (Fri) by bluca (subscriber, #118303) [Link] (5 responses)

> "testing" and "trixie" should, in the eyes of os-release, be considered different versions of Debian with different identity.

They shouldn't, because it doesn't magically change - you need to hit the upgrade button. Whether you hit only the upgrade button, or you also edit a distro-specific file to change the codename and then hit the upgrade button, is just a technical detail and a process thingy. oldstable, stable, testing are just aliases - they are literally symlinks, and do not change the identity of a system, it's just a shortcut to avoid having to edit a file when you want to always track "latest" or always track "supported" or so and so. You could very well set up a system that configures everything using the 'bookworm' codename, and every day checks whether the 'stable' symlink on the archive on ftp.debian.org still points to it, and when it moves, automatically edits your apt sources 'bookworm' -> 'trixie' or whatever it points to now, and automatically upgrades you. This is conceivable thing you can do, albeit not really recommended, but it doesn't really change what os-release is for or how it should be used. If the codename changes due to an upgrade, then os-release's content changes too accordingly. Upgrades and downgrades are allowed!

The closest to the "source of truth" we have are the officially signed archive repository metadata files, and you can see for yourself what they say right at the top for the various cases:

https://ftp.debian.org/debian/dists/testing/InRelease
https://ftp.debian.org/debian/dists/trixie/InRelease

https://ftp.debian.org/debian/dists/stable/InRelease
https://ftp.debian.org/debian/dists/bookworm/InRelease

https://ftp.debian.org/debian/dists/unstable/InRelease
https://ftp.debian.org/debian/dists/sid/InRelease

When you download a 'stable' or 'testing' image, it will contain a copy of that file and it will point to only one of those codenames, not multiple ones. It might be out of date, but that's ok - it's an identifier for the vendor OS tree you just downloaded, not a statement about what you might find if you go to the archive directly. If one wanted to add timestamps that indicate _when_ the image was built, so that you get an idea about its "freshness", that's ok too, there's the BUILD_ID field for that purpose.

The next best "official" resource we have is https://release.debian.org/ and at the bottom it says:

stable
Fast response for security updates. Minor updates include security and other important fixes only. Major updates are sourced from testing, and are infrequent, but large.

testing
Security updates are irregular and unreliable. Release standards are almost continually met. Updates are automatically sourced from unstable, happen four times each day and are usually small.

unstable
Security updates are made by the maintainer; they may not be effective on all architectures, and may be delayed. Packages uploaded may not meet release standards, but any breakage is expected to be fixed promptly. Updates are made by maintainers.

Note how it distinguishes the lifecycle and characteristics of stable vs testing vs unstable (so much for unstable and testing being the same thing, amiright?), but not between codenames and aliases.

Just get rid of the sid name

Posted Aug 16, 2024 11:22 UTC (Fri) by bluca (subscriber, #118303) [Link]

Also the point of contention here was never testing/trixie - that is correct and always has been: it says VERSION_CODENAME=trixie. The point of contention is that we call 'sid' as such literally everywhere, even in very, very official sources as linked above, apart from one place: os-release, where it's currently called 'trixie'. The way testing is identified and called was never a subject of dispute, only unstable is.

Just get rid of the sid name

Posted Aug 17, 2024 10:32 UTC (Sat) by ralfj (subscriber, #172874) [Link] (3 responses)

No, there is no upgrade button. I just keep doing "apt upgrade". From all you say, just installing regular updates does not change the "identity" of an installation: you keep insisting that it doesn't matter whether a system is outdated or not, so presumably, "apt upgrade" is by definition an identity-preserving operation.

But once every 2 years, "apt upgrade" will change my testing system to have a different VERSION_CODENAME. That's incoherent and a violation of the concept of "identity" as you have described it, at least to the best of my understanding.

Just get rid of the sid name

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

> No, there is no upgrade button. I just keep doing "apt upgrade"

I doubt that? You'd need a dist-upgrade, given there will be stuff uninstalled, so a normal upgrade just won't do it.

> But once every 2 years, "apt upgrade" will change my testing system to have a different VERSION_CODENAME. That's incoherent and a violation of the concept of "identity" as you have described it, at least to the best of my understanding.

It is very much not, as a new release cycle begins. They exist, and they matter, and we do tons of things based on them, not just operational (like freezes), but even add features or remove features or break backward compatibility or remove old stuff and so on and so forth, all based on release codenames and lifecycles. Heck we even automated this, you can add some machine-readable strings in maintainer scripts that encodes "drop after trixie" or so, and a bot will automatically open MRs based on that, depending on where we are in the lifecycle.

Just get rid of the sid name

Posted Aug 20, 2024 6:53 UTC (Tue) by ralfj (subscriber, #172874) [Link] (1 responses)

I often have to do "dist-upgrade"/"full-upgrade" even within a release cycle so that's not really a distinguishing factor.

So I still have no idea how you define "identity". It would be really good to figure out some properties of this notion that seems to be so important for os-release, like defining which operations fundamentally preserve the identity of a system and which ones fundamentally change it. But if the same operation ("apt full-upgrade", without any changes to any configuration) is sometimes identity-preserving and sometimes identity-altering, I fail to see how this is an objective definition. It seems to be very much a case-by-case thing: you decided that "trixie" and "testing" have the same identity right now, but "testing" and "unstable" do not. But other people can very reasonably arrive at different decisions about these identity questions, as there's no underlying objective definition that would tell us the answer. It is therefore no surprise that when you just assert that testing and unstable have a different identity (which seems to be the basis for the claim that base-files is buggy), and claim that this is a *fact* without even admitting the possibility that there is anything subjective about this claim, and entirely refuse to even consider that there might be valid reasoning that arrives at a different conclusion (such as a different idea of "identity"), people are not very interested in engaging with that line of arguments.

I hope this feedback helps you understand why the discussion went the way it did. There are certainly parts that I missed, but the above seemed to me like a big contributor to the general vibe in that thread. Either way, good luck with your future endeavors!

Just get rid of the sid name

Posted Aug 20, 2024 12:58 UTC (Tue) by bluca (subscriber, #118303) [Link]

> I often have to do "dist-upgrade"/"full-upgrade" even within a release cycle so that's not really a distinguishing factor.

There's even something more on top of that when the aliases changes in the repo metadata, I cannot remember exactly how it looks like, but it was pretty evident last time it happened

> It would be really good to figure out some properties of this notion that seems to be so important for os-release, like defining which operations fundamentally preserve the identity of a system and which ones fundamentally change it.

It really shouldn't! It's something that implementers have to chose. The point is that in Debian we already make that choice, we always have, and we use it consistently thorough the project, apart in this one case. The most authoritative source of truth is most likely the apt repositories signed metadata. I can't think of anything else that would be more authoritative than that. Check what they define at the top:

https://ftp.debian.org/debian/dists/bookworm/InRelease
https://ftp.debian.org/debian/dists/stable/InRelease
https://ftp.debian.org/debian/dists/trixie/InRelease
https://ftp.debian.org/debian/dists/testing/InRelease
https://ftp.debian.org/debian/dists/sid/InRelease
https://ftp.debian.org/debian/dists/unstable/InRelease

Hint: the aliases are literally aliases, ie symlinks. The project already decides the exact time the aliases change. It already decided, and always has, that unstable's codename is 'sid'. It already decided that testing's codename is never, was never, and will never be 'sid', but will always be the codename of the next stable release currently in development. There is a very definite and well-defined moment in which the oldstable, stable and testing aliases switch and change which codename they point at. This already happens, has always happened, and I don't see any reason why it wouldn't continue to happen. It's all coherent and well-defined, and used consistently thorough the distribution, apart from one detail: os-release in sid says that sid is trixie. This happens nowhere else that I am aware of. Hence why I'm trying to fix it.

Just get rid of the sid name

Posted Aug 12, 2024 9:27 UTC (Mon) by taladar (subscriber, #68407) [Link]

It might not be a behavior change in the code. It might merely be a check in a bug reporting tool so developers know if the user runs Debian "likely to be broken almost daily" vs. Debian "slightly more stable than that".

Just get rid of the sid name

Posted Aug 9, 2024 18:52 UTC (Fri) by Karellen (subscriber, #67644) [Link] (27 responses)

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?

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

Just get rid of the sid name

Posted Aug 9, 2024 20:38 UTC (Fri) by wtarreau (subscriber, #51152) [Link] (8 responses)

> Any program that changes its behavior based on whether it is running on unstable or testing is seriously broken.

I disagree: a script that collects information to provide detailed bug reports should know the status. Reporting stable/unstable/whatever is important for those on the support side who are scratching their heads trying to figure what could be happening.

Just get rid of the sid name

Posted Aug 9, 2024 20:44 UTC (Fri) by mb (subscriber, #50428) [Link] (5 responses)

No. What is needed is the versions of the program and its dependencies.
The distribution name is useless. Especially in a rolling release such as Sid.

Just get rid of the sid name

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

It might be useless to you, but it's useful to other people, and that's why it's one of the core parts of the os-release metadata

Just get rid of the sid name

Posted Aug 9, 2024 21:30 UTC (Fri) by pizza (subscriber, #46) [Link] (1 responses)

> No. What is needed is the versions of the program and its dependencies.

...And what about information about its runtime environment? Are you seriously saying that doesn't matter?

> The distribution name is useless. Especially in a rolling release such as Sid.

Uh... you literally just repeated the justification.

...And demonstrated you didn't read the article, because the entire point here is that "testing" and "unstable" do not currently distinguish themselves from each other in /etc/os-release. Meanwhile, due to how packages flow into testing from unstable, the *same binary package could be running within either environment*

Just get rid of the sid name

Posted Aug 9, 2024 21:33 UTC (Fri) by mb (subscriber, #50428) [Link]

>didn't read the article

yawn

Just get rid of the sid name

Posted Aug 10, 2024 20:33 UTC (Sat) by amacater (subscriber, #790) [Link] (1 responses)

"Especially in a rolling release such as Sid."

Strictly - Sid is *not* a rolling release. It's not like an Arch or a Gentoo in that respect. It's not a distribution for end use. It can break for a period of time as large scale changes happen, the pace of daily change is fast and at the very least unpredictable and a user is expected to be able to file bugs or deal with that level of uncertainty.

"If you run Sid and it breaks, you get to keep both pieces"

[From a seemingly interminable succession of replies from myself and others on the Debian user mailing list explaining to people some of the realities of choosing to run something on Sid rather than Debian stable. Sid is not a Debian distribution with any degree of stability at all in the sense that most end users reporting issues seem to expect and shouldn't be regarded as a distribution at all IMHO]

Just get rid of the sid name

Posted Aug 10, 2024 22:54 UTC (Sat) by bluca (subscriber, #118303) [Link]

Sid is a rolling distro. It doesn't have a predecessor, it doesn't have a successor - that's what a rolling distro is. It doesn't need to be stable or security supported to be one. It might not be advisable to run it - but people still do, and in fact we _want_ them to, to find bugs, it's a core part of the release process.

Just get rid of the sid name

Posted Aug 10, 2024 19:16 UTC (Sat) by NYKevin (subscriber, #129325) [Link]

reportbug(1), as far as I can tell, gathers that information by parsing the output of apt-cache policy: https://salsa.debian.org/reportbug-team/reportbug/-/blob/...

Of course, if you're talking about something that doesn't "know" which OS it's running under, then this is harder, but the usual model is that bugs are first reported to the distro, who then figures out whether it's their problem or upstream's problem, and files their own competently-written upstream bug report in the latter case.

Just get rid of the sid name

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

> I disagree: a script that collects information to provide detailed bug reports should know the status.

See what reportbug does. It sends version numbers of dependencies.

As someone else said, my out of date unstable might be older than your testing… from the name only you can't really get any useful information anyway.

Use cases

Posted Aug 9, 2024 20:03 UTC (Fri) by gidoca (subscriber, #62438) [Link] (18 responses)

So what are use cases for this that have been brought up? Even clicking a couple of the links in the article I could not find one.

Use cases

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

The use cases and purpose of os-release is documented at https://www.freedesktop.org/software/systemd/man/latest/o... and explained in the blog post that was published when it was introduced https://0pointer.de/blog/projects/os-release

Use cases

Posted Aug 10, 2024 13:20 UTC (Sat) by ju3Ceemi (subscriber, #102464) [Link] (16 responses)

Ha ! All of this crap, to finally ends with systemd.. I did not saw that coming. You should have said it earlier, it would have made things more understandable.

Use cases

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

Well he's a systemd contributor https://github.com/orgs/systemd/people

Use cases

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

One of the first links in the article points to systemd's documentation.

Is your hostility due to systemd, or becase Luca is a Microsoft employee?

Use cases

Posted Aug 12, 2024 11:27 UTC (Mon) by Wol (subscriber, #4433) [Link] (4 responses)

It's probably because Luca is extremely opinionated. Nothing wrong with that, but when his opinion clashes with someone else, we get fireworks.

I've tried to keep out of this, but my opinion here is that SID is in a permanently broken state, so what's different about os-release being broken?

Also, os-release is external to Debian, and it appears to be the considered opinion of Debian that - inasmuch as it applies to SID - the definition of os-release is broken.

(I would also comment that - having been heavily involved with LSB in the early days, imho the entire premise of LSB was badly broken - as in its approach provided the opposite of what was actually required. os-release seems to be a good example! What LSB *should* have provided is a way for the 3rd party to ask the system "do you provide X", for various values of X, and in way that could be passed in to the package manager so that X could be installed. Put otherwise, "here is a list of my dependencies, please package manager would you install them".)

os-release is meant to tell 3rd-party packages what it can expect the base system to provide for it. As far as SID is concerned, that is "a broken linux system that isn't even guaranteed to boot". In which case, what's the point of even having os-release, if the system isn't guaranteed even to get as far as a state where said 3rd-party package can read it!

Cheers,
Wol

Use cases

Posted Aug 12, 2024 12:05 UTC (Mon) by mb (subscriber, #50428) [Link]

The problem is that both opinions are valid.

Luca's view is valid.
Sid can be used as if it were its own rolling release.
In fact, I have been using it for the last two decades as such.
And no, it does not break all the time. Only occasionally. :)

But it is also valid to see Sid as just a precursor place for the packages that will eventually end up in testing without a modification.

The difference in thinking is the upgrade path thinking (Luca) versus the package migration path thinking (mine; and apparently also Debian's).
These paths are orthogonal.

If Debian decides to mark os-release in Sid with the testing codename, that is perfectly valid in the package migration path world view.

The person who wants to change this established policy is responsible for providing good real world examples showing why the change improves things.

So far I didn't see anything that would convince me. Pointing to the presence of a sid workaround in a random shell script does not prove that sid is wrong. The shell script can also be wrong to use the codename in the first place.

It is needed to explain to people why the script can't do it in another way instead of pointing to random github searches that carry not a single bit of information to resolve the issue. (just to mention one ridiculous example).

Use cases

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

> It's probably because Luca is extremely opinionated. Nothing wrong with that, but when his opinion clashes with someone else, we get fireworks.
> I've tried to keep out of this, but my opinion here is that SID is in a permanently broken state, so what's different about os-release being broken?

The fireworks happen not because of opinions clashing, but because of opinions and facts being conflated. You are obviously entitled to hold an opinion such as "sid is bad, I will never use it". You are not entitled to your own facts such as "sid is permanently broken" - because it's factually not, as there are not only users, but entire downstream distributions using exclusively sid, to whom the fact that it is permanently broken will sound as a surprising piece of news. Not only that, but the entire development cycle of Debian heavily relies upon there being sid users, doing QA.
Likewise, one is entitled to say "os-release is bad", or "I have no use for os-release", or "Debian should not use os-release", or "nobody should use os-release". Those are legitimate opinions that I disagree with. "There are no use cases for os-release" is not an opinion though, it's just a false statement, given even a cursory search finds literally hundreds of thousands of examples of usages.

Use cases

Posted Aug 12, 2024 14:44 UTC (Mon) by Wol (subscriber, #4433) [Link] (1 responses)

> You are not entitled to your own facts such as "sid is permanently broken" - because it's factually not, as there are not only users, but entire downstream distributions using exclusively sid, to whom the fact that it is permanently broken will sound as a surprising piece of news. Not only that, but the entire development cycle of Debian heavily relies upon there being sid users, doing QA.

PLEASE DO NOT MISQUOTE ME!

In fact, it's pretty obvious you did a knee-jerk and (I admit I often do it) read what you THOUGHT was there, not what ACTUALLY WAS there. Just read the phrase before where I wrote "sid is permanently broken" for a perfect example!!!

And given that the *whole point* of SID is to upload stuff and see what breaks, I strongly suspect that - at any AND ALL times - there is a significant minority of people for whom SID really IS broken. Maybe for 99% of people, 99% of the time, they never notice, but SID tells you you should *expect* to be left holding a handful of pieces every now and then!

Cheers,
Wol

Use cases

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

I mean, if multiple people understood the same thing, maybe the phrase was just confusing? Of course you are allowed to "think" that sid is permanently broken, but the fact that it isn't still stands. Yes it's unstable, and yes things go wrong, but that's the same everywhere, on most rolling distros.

Use cases

Posted Aug 12, 2024 11:33 UTC (Mon) by ju3Ceemi (subscriber, #102464) [Link] (8 responses)

Neither
I think the /etc/os-release file is fine
What I still wanted to know is the use cases behind the proposal: what would brings the change, from a user perspective

After reading so many walls of texts, it ends with "because systemd", which was .. unexpected. Maybe there are not serious reasons ? That would explain the "we don't care" from TC.

Use cases

Posted Aug 12, 2024 13:14 UTC (Mon) by bluca (subscriber, #118303) [Link] (7 responses)

There have been literally tons of text exchanged here and elsewhere, and yet not a single time "because systemd" was said by anybody.

Use cases

Posted Aug 12, 2024 13:22 UTC (Mon) by ju3Ceemi (subscriber, #102464) [Link] (4 responses)

"So what are use cases for this that have been brought up?"
And you answered : "The use cases and purpose of os-release is documented at https://www.freedesktop.org/software/systemd/man/latest/o... and explained in the blog post that was published when it was introduced https://0pointer.de/blog/projects/os-release"

Which I read, btw. And I have found no use cases for this proposal.
I found no use cases but was randomly insulted by the post author.

At this point, the whole topic must be some kind of joke or something ?

Use cases

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

> "So what are use cases for this that have been brought up?"
> And you answered : "The use cases and purpose of os-release is documented at https://www.freedesktop.org/software/systemd/man/latest/o... and explained in the blog post that was published when it was introduced https://0pointer.de/blog/projects/os-release"

Yes, those are the websites where the specification lives, so what?

> Which I read, btw. And I have found no use cases for this proposal.

If there are no uses cases, why is it used literally hundreds of thousands of times all over the place on Linux?

> I found no use cases but was randomly insulted by the post author.

Where and how were you "insulted" precisely?

> At this point, the whole topic must be some kind of joke or something ?

Ok, you are not here for a serious conversation, my bad

Let's calm down

Posted Aug 12, 2024 14:39 UTC (Mon) by corbet (editor, #1) [Link]

Can we (everybody involved in this discussion) try to calm it down a bit? The mailing-list discussion has already happened, we don't need to reproduce the whole thing here.

Use cases

Posted Aug 12, 2024 14:40 UTC (Mon) by ju3Ceemi (subscriber, #102464) [Link] (1 responses)

"If there are no uses cases, why is it used literally hundreds of thousands of times all over the place on Linux?"

The whole topic is about testing vs unstable.

Nobody is arguing against /etc/os-release.

Use cases

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

> The whole topic is about testing vs unstable.
> Nobody is arguing against /etc/os-release.

Well, actually this _is_ about os-release. It's pretty much what the whole thing is about...

Use cases

Posted Aug 14, 2024 4:01 UTC (Wed) by Kamilion (subscriber, #42576) [Link] (1 responses)

> and yet not a single time "because systemd" was said by anybody.

You said/implied it.

Here, let me, someone with no dog in the race, break it down for you, since you're not seeing the obvious.

> "The use cases and purpose of os-release is documented at [...snip...]/systemd/[...snip...]

Systemd...

> explained in the blog post that was published when it was introduced https://0pointer.de/blog/projects/os-release"

Lennart's blog, typically about... Systemd...

> "Oh look, a DDI ( https://uapi-group.org/specifications/specs/discoverable_disk_image/ )! I wonder what it is?"
[...snip...]
> "Fedora 40, cool. Oh look, another DDI! I wonder what this one is instead?"
> $ sudo systemd-dissect image.raw

DDI, eh? Hm, where did that come from again? ( https://0pointer.net/blog/the-wondrous-world-of-discovera... ?)

So at face value, "please help me correct the output of this systemd tool" is clearly what people are perceiving.

And don't you even start with me over "but that's just where the specifications live". Or try insinuating that I haven't interacted with mkosi. Or try insinuating that I, the maintainer of ubuntu-customizer, lack familiarity with image artifact generation, customization, cataloging, or any of the other ad-homonyms that I expect to be lobbed at me.

Regardless of any of that, my personal opinion is that sid should not declare itself as trixie.

I've already had enough annoyance this year dealing with PCI compliance audits demanding I install an OpenSSH version only available in unstable to meet their tool's policy preference.

Use cases

Posted Aug 14, 2024 9:32 UTC (Wed) by bluca (subscriber, #118303) [Link]

> You said/implied it.

Nope.

> And don't you even start with me over "but that's just where the specifications live".

It is exactly that though. It's just where the spec lives. I am sorry for any remaining haters, but it's not 2013 anymore, just because something has "systemd" somewhere in the url doesn't automatically mean it's the work of the DEVIL, it's time to move on. Even distributions that do not use systemd, and are very strongly against it like Alpine ship an os-release file:

NAME="Alpine Linux"
ID=alpine
VERSION_ID=3.20.2
PRETTY_NAME="Alpine Linux v3.20"
HOME_URL="https://alpinelinux.org/"
BUG_REPORT_URL="https://gitlab.alpinelinux.org/alpine/aports/-/issues"

Source: https://dl-cdn.alpinelinux.org/alpine/v3.20/releases/x86_64/alpine-minirootfs-3.20.2-x86_64.tar.gz

Because it's just a simple and effective standard format for identification of vendor trees, and has no requirement that are related to systemd as a project, either to use it or create it, and that's very much intentional. What more proof do you need to believe that this spec is independent of systemd?

> DDI, eh? Hm, where did that come from again?

From here: https://uapi-group.org/specifications/specs/discoverable_disk_image/

Nothing new though.

Posted Aug 10, 2024 0:45 UTC (Sat) by mirabilos (subscriber, #84359) [Link] (1 responses)

Huh, I reported a bug against lsb-release and implemented overriding that tool’s output for sid systems myself when that went nowhere.

Of course I won’t, on principle, and now more than ever, ever agree with bluca. He’ll probably insist on the file itself instead of using lsb-release, or something.

Nothing new though.

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

> Of course I won’t, on principle, and now more than ever, ever agree with bluca

I have no idea who you are, but ok

Seems like a misunderstanding

Posted Aug 10, 2024 17:29 UTC (Sat) by jlarocco (subscriber, #168049) [Link] (1 responses)

I honestly don't understand what problem this would fix or how it's breaking things for the people bringing the complaint. It seems like a misunderstanding in how Debian works.

"unstable" and "testing" are WIP and constantly changing - they aren't releases. If somebody wants a known release state, they should use "stable".

The `deboostrap testing /tmp/a` example rings hollow to me, because if I run the *same* command again in 30 minutes, I'll again have a different set of files. Likewise, if I run `deboostrap unstable /tmp/a` and then wait a little while and run `deboostrap testing /tmp/b`, I may very well get the same files in both directories.

Seems like a misunderstanding

Posted Aug 10, 2024 23:29 UTC (Sat) by bluca (subscriber, #118303) [Link]

> "unstable" and "testing" are WIP and constantly changing

So are Fedora Rawhide and Ubuntu Oracular - but they still have valid os-release metadata

> The `deboostrap testing /tmp/a` example rings hollow to me, because if I run the *same* command again in 30 minutes, I'll again have a different set of files. Likewise, if I run `deboostrap unstable /tmp/a` and then wait a little while and run `deboostrap testing /tmp/b`, I may very well get the same files in both directories.

Content is not what matters. You can get the same content from oldstable and stable too - there are tons of packages that are bit-by-bit identical, literally the same, across multiple releases. It doesn't mean their os-releases should be identical.

In favor

Posted Aug 12, 2024 16:06 UTC (Mon) by stephanlachnit (subscriber, #151361) [Link]

Really unfortunate that there was no decision in the end. As sid user I was annoyed by this as well, and for time manually edited the file as well. It is useful e.g. for collecting the used distribution as part of surveys.

/etc/os-release is the standard

Posted Aug 12, 2024 20:01 UTC (Mon) by raven667 (subscriber, #5198) [Link]

I don't have time to read all the background discussions right now but this is a weird conflict since it seems to me that bluca is technically correct and I don't see how making the os-release file accurately reflect the OS release state of the system (whether unstable, testing, trixie or sid or bookworm) is a bad thing. Various utilities use the os-release standard to figure out what kind of system they are on and it's entirely possible someone would want to differentiate this way, eg to have an Ansible playbook which applies different config to different test/build servers based on which package branch they are using. This should only affect things which use os-release data, which should be a relatively small set of tools, probably an exhaustive list could be identified is one wanted to. I could see how this might end up creating a one-off policy difference for the package which holds os-release as you wouldn't want it auto-promoted between branches, but that's probably simple enough that it could be managed as a hardcoded list without creating a lot of maintenance burden for the build and release people.

An idiot learns something useful from this thread

Posted Aug 13, 2024 10:08 UTC (Tue) by Lackaday (guest, #123498) [Link]

Some time ago, I had trouble installing up-to-date drivers for a new Nvidia card and tried to find a netinst download file for Debian testing without success. I now know I should have searched by a name such as Trixie. My son fixed the problem but never told me how, probably because it was obvious to him.

A trivial technical problem?

Posted Aug 28, 2024 7:33 UTC (Wed) by daenzer (subscriber, #7050) [Link]

> Boccassi disagreed with all of these positions, of course; he summarized the situation as ""a trivial technical problem with a hard social conflict at its core"".

That gave me a good chuckle.

Any problem may seem trivial, if one just ignores all the problems contradicting that view. Of which the article and comments have enumerated plenty.


Copyright © 2024, Eklektix, Inc.
This article may be redistributed under the terms of the Creative Commons CC BY-SA 4.0 license
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds