Bug#1111039: Upgrading a system installed with Debian live from Bookworm to Trixie does not change /etc/os-release due to dpkg diversion
On Thu, 14 Aug 2025 at 13:00, Luca Boccassi <bluca@debian.org> wrote:
>
> On Thu, 14 Aug 2025 at 10:45, Roland Clobus <rclobus@rclobus.nl> wrote:
> >
> > On 14/08/2025 11:33, Luca Boccassi wrote:
> > > Actually not quite enough: the local copy with IMAGE_ID et al. also
> > > needs to be deleted by the installer and replaced with a symlink when
> > > copying to a persistent, writable rootfs as well. Is that code that
> > > copies the rootfs in live-build or elsewhere?
> >
> > Both Calamares and d-i use rsync to copy the content of
> > filesystem.squashfs to the installed system.
>
> I see, do you have a pointer to where that code lives?
>
> > For forky (and hotfixing point releases) it would be possible to create
> > this diversion (or alternative) in a specifically crafted package (e.g.
> > live-hotfix-os-release) which could then be uninstalled in the final
> > steps of the installation (which currently already removes many
> > live-related packages).
>
> I don't think I'm comfortable with adding these workarounds to some
> packages, who knows where they might end up... this is really a
> workaround that is supposed to be for the image build only.
>
> Besides, it's a generic problem, other image builders (eg: mkosi) also
> write a local /etc/os-release as per specification, to add
> image-specific metadata to it. So I think the correct fix here is for
> the code that rsyncs to check if /etc/os-release is real file, and if
> it contains the IMAGE_ID key, and if so delete it and add it back as a
> symlink.
>
> In the meanwhile I'll start with removing the diversion when the build
> finishes: https://salsa.debian.org/live-team/live-build/-/merge_requests/437
Would anyone be able to point me to where these rsync calls are made,
please? Tried looking around in live-build and couldn't find them.
Reply to: