Your message dated Sat, 03 Sep 2022 12:49:09 +0000
with message-id <e1ousad-00ed8x...@fasolo.debian.org>
and subject line Bug#995387: fixed in dpkg 1.20.12
has caused the Debian Bug report #995387,
regarding dpkg: remove-on-upgrade deletes symlink targets owned by another 
package
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
995387: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=995387
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: dpkg
Version: 1.20.6
Severity: grave
Justification: breaks unrelated packages by removing their conffiles

Hi Guillem,

attached is a small package demonstrating the misbehavior of
remove-on-upgrade which may delete symlink targets. It builds foo.deb
(which has 'remove-on-upgrade /etc/old-conffile') and bar.deb (which
has /etc/old-conffile -> /etc/new-conffile).

# dpkg -i /tmp/bar_1_all.deb
Selecting previously unselected package bar.
(Reading database ... 14303 files and directories currently installed.)
Preparing to unpack /tmp/bar_1_all.deb ...
Unpacking bar (1) ...
Setting up bar (1) ...
# dpkg --verify bar
# dpkg -i /tmp/foo_1_all.deb
Selecting previously unselected package foo.
(Reading database ... 14307 files and directories currently installed.)
Preparing to unpack /tmp/foo_1_all.deb ...
Unpacking foo (1) ...
Setting up foo (1) ...
Obsolete conffile '/etc/new-conffile' has been modified by you.
Saving as /etc/new-conffile.dpkg-old ...
# dpkg --verify bar
??5?????? c /etc/new-conffile


The actual bug where I encountered this misbehavior is
  #994971: OpenCL not working with latest Nvidia driver
and it was an error of debhelper converting rm_conffile to remove-on-upgrade
but dpkg played its part by deleting the symlink target instead of the
symlink itself, but it should rather do nothing (or print a diagnostic) if
the to-be-removed file is not a plain file.

At least there is an error if it is a directory:

# mkdir /etc/old-conffile
# dpkg -i /tmp/foo_1_all.deb
Selecting previously unselected package foo.
(Reading database ... 14304 files and directories currently installed.)
Preparing to unpack /tmp/foo_1_all.deb ...
Unpacking foo (1) ...
Setting up foo (1) ...
dpkg: warning: foo: conffile '/etc/old-conffile' is not a plain file or symlink 
(= '/etc/old-conffile')


Simplified, the nvidia use case the following:

Long ago, /etc/conffile was a conffile
That was later removed with rm_conffile
and since then the different co-installable drivers ship 
/etc/conffile-$driver_version instead
and a slave alternative exists as /etc/conffile pointing to the corresponding 
file of
the activated driver variant.
(The different drivers may require slightly different conffile content.)

Andreas

Attachment: dpkg-bug-remove-on-upgrade.tar.gz
Description: application/gzip


--- End Message ---
--- Begin Message ---
Source: dpkg
Source-Version: 1.20.12
Done: Guillem Jover <guil...@debian.org>

We believe that the bug you reported is fixed in the latest version of
dpkg, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 995...@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Guillem Jover <guil...@debian.org> (supplier of updated dpkg package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmas...@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Thu, 01 Sep 2022 05:38:12 +0200
Source: dpkg
Architecture: source
Version: 1.20.12
Distribution: bullseye
Urgency: medium
Maintainer: Dpkg Developers <debian-d...@lists.debian.org>
Changed-By: Guillem Jover <guil...@debian.org>
Closes: 980963 991190 995387 1000421 1008316 1008478 1008764
Changes:
 dpkg (1.20.12) bullseye; urgency=medium
 .
   [ Guillem Jover ]
   * dpkg: Fix conffile removal-on-upgrade handling. Closes: #995387
   * dpkg: Fix memory leak in remove-on-upgrade handling.
   * dpkg-fsys-usrunmess: Move forced reconfiguration to the last step.
     See #991190.
   * dpkg-fsys-usrunmess: Install a local policy-rc.d to ignore service
     restarts. Closes: #991190
   * dpkg-fsys-usrunmess: Do not fail when removing lingering directories.
   * dpkg-fsys-usrunmess: Fix typo in debug message.
   * dpkg-fsys-usrunmess: Explicitly set user/group and mode for created dirs.
     Closes: #1008478
   * dpkg-fsys-usrunmess: Set a known umask before starting.
     See #1008478.
   * dpkg-fsys-usrunmess: Special case untracked kernel module files.
     Closes: #1008316
   * dpkg-fsys-usrunmess: Handle /lib/modules itself also being untracked.
     Closes: #1008764
   * Architecture support:
     - Add support for ARCv2 CPU.
       Based on a patch by Alexey Brodkin <alexey.brod...@synopsys.com>.
       Closes: #980963
   * Perl modules:
     - Dpkg::Shlibs::Objdump: Fix apply_relocations to work with versioned
       symbols. Closes: #1000421
   * Localization:
     - Fix missing newline in Dutch man pages translation.
Checksums-Sha1:
 bb9cd777963153c712029c1ae9f5b9a01ab0a7a8 2124 dpkg_1.20.12.dsc
 be23ca81df915e7cbf3382e6d2eed605b8dc9065 5009108 dpkg_1.20.12.tar.xz
 5703bcb4bcd726bf48b14eaf594a579ff52c73e0 8013 dpkg_1.20.12_amd64.buildinfo
Checksums-Sha256:
 fe919a7491472bab59362fab8da0c89cf59cd2eea4a8714db58f9f169fc62bf4 2124 
dpkg_1.20.12.dsc
 1428610305d00dffa9c35543fc3096bb1ce3293b53ed4ddad847a3d822eafbf0 5009108 
dpkg_1.20.12.tar.xz
 e07a6834207cefe0a7301a473691c1ab8e3e6008b8d147c5d6fa397dd8860dab 8013 
dpkg_1.20.12_amd64.buildinfo
Files:
 97223cdcafcfabf61ecd2f89a2f2bc50 2124 admin required dpkg_1.20.12.dsc
 985a0caceb5f54bb9bb7eb14c0358c22 5009108 admin required dpkg_1.20.12.tar.xz
 8a5bf2586dab77e89233809cfe420b19 8013 admin required 
dpkg_1.20.12_amd64.buildinfo

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEETz509DYFDBD1aWV0uXK/PqSuV6MFAmMQK2EACgkQuXK/PqSu
V6NQUBAA0cZ4Wme9f3BEroEMwuLCFS4kBs+sIZgtF3aMeRSzwHlm9PaW+IP25yPE
F3N4PugaM0dxNF55tptBfKCUG6hkFBADB3sP0zEMQa+iXglNZY4nzopOQX2ccSH4
/QZcPn9y7Ng2G9LkF+TckGRc/XjFMcwsUxy0OIqCesiiIQBM24AsPxTmrE5cd+vP
nbgNxyiMg2akTzApq7NUfiD6CS9vZUImGVZ06mOl08c46s5p2CWLlVmnAwy7yFye
kIqUWeN7kgnyLZXXFX+E3zA4xUsuMbWew2pK/i0f8eFF2DOp8e50DGrinuIfQ4W5
Pb+upwPpEF0Ht4L4D17f/sFzQlBpKB2lwhNjLHwiwFAAg6lonpb6/nPgZHxtapOn
ybPpmMXLXQlrjfOdciLwjeXFVgz42ZyMgsf6xf2M3FpbSfFyPuyfPK26UukU90MU
JFk/2kYNQele4BbX6OCooMhnDzt0O7biS5AKYPLcKccfmGdWbiQDj7viffHgrKZo
4SBaQEGNil4VUSL+9MTpr4tkgIV7GqZMk+DBh4kxpyPEw6+1DXqhoKvACUSuVp8X
pecW7x0FNETiaoMAVfK5VanWeEtGzLF2nFVrFNyu4uWWnPQe2Quhw0kjghb+zD6c
ILyqPCwaW77xjH17MW7zZHqkcIGZuy5ycEzTrnwbuveQD8hdUEA=
=3o6z
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to