On Sun, 8 Oct 2023 08:15:40 +0200 Helmut Grohne <hel...@subdivi.de> wrote:
> Package: dhcpcd-base
> Version: 9.4.1-24~deb12u2
> Severity: serious
> Justification: file loss during upgrade
> X-Debbugs-Cc: debian-rele...@lists.debian.org
> User: helm...@debian.org
> Usertags: dep17p1
>
> Unfortunately, the stable update of dhcpcd5 introduced a regression
> relevant to upgrades from bullseye. The bullseye dhcpcd5 package
> contained the files
>  - /lib/dhcpcd/dhcpcd-hooks/01-test
>  - /lib/dhcpcd/dhcpcd-hooks/20-resolv.conf
>  - /lib/dhcpcd/dhcpcd-hooks/30-hostname
>  - /lib/dhcpcd/dhcpcd-hooks/60-ntp-common.conf
>  - /lib/dhcpcd/dhcpcd-hooks/62-chrony.conf
>  - /lib/dhcpcd/dhcpcd-hooks/64-timesyncd.conf
>  - /lib/dhcpcd/dhcpcd-hooks/68-openntpd.conf
>  - /lib/dhcpcd/dhcpcd-run-hooks
> and these have been moved into dhcpcd-base in that particular stable
> update. The update correctly declares Replaces for this. Unfortunately,
> it also moves these files from /lib to /usr/lib. Therefore, the declared
> Replaces have no effect (regarding these files) and as a consequence, an
> upgrade may delete the affected files.

That doesn't hold water. Moving files to the base package doesn't delete them.

> mmdebstrap bullseye /dev/null --variant=apt --include dhcpcd5 
> --chrooted-customize-hook='sed -i -e s/bullseye/bookworm/ 
> /etc/apt/sources.list && apt update && apt-get install -y libc6 usrmerge && 
> apt-get download dhcpcd-base && dpkg --auto-deconfigure --unpack 
> ./dhcpcd-base_*.deb && dpkg -r dhcpcd5 && ls /usr/lib/dhcpcd/dhcpcd-hooks'
>
> If you run this, it ends with:
>
> | Selecting previously unselected package dhcpcd-base.
> | dpkg: considering deconfiguration of dhcpcd5, which would be broken by 
> installation of dhcpcd-base ...
> | dpkg: yes, will deconfigure dhcpcd5 (broken by dhcpcd-base)
> | (Reading database ... 6731 files and directories currently installed.)
> | Preparing to unpack .../dhcpcd-base_9.4.1-24~deb12u2_amd64.deb ...
> | De-configuring dhcpcd5 (7.1.0-2+b1) ...
> | Unpacking dhcpcd-base (9.4.1-24~deb12u2) ...
> | Replacing files in old package dhcpcd5 (7.1.0-2+b1) ...
> | (Reading database ... 6752 files and directories currently installed.)
> | Removing dhcpcd5 (7.1.0-2+b1) ...
> | ls: cannot access '/usr/lib/dhcpcd/dhcpcd-hooks': No such file or directory
>
> This kind of problem has been categorized in the
> https://subdivi.de/~helmut/dep17.html as P1 and the recommended
> mitigation M7 is changing Breaks+Replaces to Conflicts. I think this
> mitigation is fully applicable here, because apt will by default unpack
> the updated dhcpcd5 package first and then the conflict is resolved. The
> additional constraint is satisfied by the default solution of apt.

Thus changing fields from what to what?

Martin-Éric

Reply via email to