Fwd: Bug#1111039: Upgrading a system installed with Debian live from Bookworm to Trixie does not change /etc/os-release due to dpkg diversion
Hi all.
Just so you know, this bug also affects the Bananas port. It only
concerns upgrades between releases, so since there's no Bookworm Bananas
port it won't be an issue before users try to upgrade Trixie to Forky
(2027?). I'll try and see if I can work around it for future
installations to minimize the number of affected users, before it gets
fixed in live-build.
Cheers!
P.S.: Affected users should not worry. This bug will be solved years
before it will become an issue.
-------- Forwarded Message --------
Subject: Bug#1111039: Upgrading a system installed with Debian live from
Bookworm to Trixie does not change /etc/os-release due to dpkg diversion
Resent-Date: Wed, 13 Aug 2025 20:29:02 +0000
Resent-From: Johannes Schauer Marin Rodrigues <josch@debian.org>
Resent-To: debian-bugs-dist@lists.debian.org
Resent-CC: bluca@debian.org, Debian Live <debian-live@lists.debian.org>
Date: Wed, 13 Aug 2025 22:27:03 +0200
From: Johannes Schauer Marin Rodrigues <josch@debian.org>
Reply-To: Johannes Schauer Marin Rodrigues <josch@debian.org>,
1111039@bugs.debian.org
To: Debian Bug Tracking System <submit@bugs.debian.org>
Source: live-build
Version: 1:20240810
Severity: serious
X-Debbugs-Cc: bluca@debian.org
Hi,
I'm letting this bug have RC severity because:
- it interferes with files installed by another package (base-files)
without
coordination on actual user installations (not just during a live
session)
- the information "what release am i on" is a crucial part of what the OS
should report correctly to the user (and to utilities querying the
information)
I'm CC-ing Luca because the problem got introduced by this commit in
live-build:
https://salsa.debian.org/live-team/live-build/-/commit/24bfe093f82ccc134ab5d91fb4058ee0b52ec942
The commit is over a year old but the problem only showed now as users are
upgrading their installations that they made from a Debian Live CD from
Bookworm to Trixie.
The problem is this dpkg diversion:
mmmm@mmmm-linuxdummyvirt:~$ dpkg-divert --list | grep os-release
local diversion of /etc/os-release to /etc/os-release.debootstrap
According to the commit message the diversion is supposed to guard against
potential upgrades of base-files overwriting the contents of /etc/os-release
with its own contents. The problem is, that the calamares installer
which can
be used from a Debian Live CD to permanently install Debian, creates a
copy of
the Debian Live system and installs that to the disk. This includes the
diversion which was only meant for the live system itself.
There are multiple things to fix here:
1. live-build itself should clean up the diversion after it is done
installing
(and potentially upgrading) the packages that end up on the live
CD. The
diversion is not useful anymore on the running Debian Live system
itself.
Once that is done, new installations made with Calamares will no longer
include that diversion for the upgrade from Trixie to Forky.
2. existing installations of Debian Bookworm that were made with Calamares
from the Debian Live CD should somehow have the diversion cleaned
up such
that the contents of /etc/os-release after the upgrade reflect what
base-files ships. Since a system installed from a Debian Live CD with
calamares also installs the live-* packages, maybe a new upload of
live-config or live-tools could contain a postinst maintainer
script which
performs the necessary magic?
Maybe the second part should be done quickly because there are a bunch of
users out there which are currently very confused by this issue:
-
https://www.reddit.com/r/debian/comments/1mmbjdh/old_etcosreleases_file_after_upgrading_to_debian/
-
https://www.reddit.com/r/debian/comments/1mmldrq/upgraded_to_debian_13_but_still_showing_as/
-
https://www.reddit.com/r/debian/comments/1moe5bz/trixie_upgrade_doesnt_upgrade_etcosrelease/
Unfortunately I don't have a reddit account, so I cannot be of further
assistance on that platform.
Thanks!
cheers, josch
Reply to: