Control: tags -1 + patch pending

Dear Maintainer,

On Mon, 15 Mar 2021 13:19:07 +0100 Andreas Beckmann <a...@debian.org> wrote:
> Package: dnsmasq
> Version: 2.84-1
> Severity: serious
> User: debian...@lists.debian.org

> an upgrade test with piuparts revealed that your package installs files
> over existing symlinks and possibly overwrites files owned by other
> packages. This usually means an old version of the package shipped a
> symlink but that was later replaced by a real (and non-empty)
> directory. This kind of overwriting another package's files cannot be
> detected by dpkg.
> 
> This was observed on the following upgrade paths:
> 
>   buster -> bullseye

I have prepared an NMU fixing this bug, versioned 2.84-1.1, and uploaded it to 
DELAYED/2.
Please tell me if I should delay it longer. The debdiff is attached.

Best,

-- 
⢀⣴⠾⠻⢶⣦⠀  Sébastien Villemot
⣾⠁⢠⠒⠀⣿⡁  Debian Developer
⢿⡄⠘⠷⠚⠋⠀  https://sebastien.villemot.name
⠈⠳⣄⠀⠀⠀⠀  https://www.debian.org

diff -u dnsmasq-2.84/debian/changelog dnsmasq-2.84/debian/changelog
--- dnsmasq-2.84/debian/changelog
+++ dnsmasq-2.84/debian/changelog
@@ -1,3 +1,13 @@
+dnsmasq (2.84-1.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix symlink to directory conversion for /usr/share/doc/dnsmasq.
+    This is achieved by directly calling dpkg-maintscript-helper in the preinst,
+    postinst, and postrm scripts, since the package does not use debhelper.
+    (Closes: #985282)
+
+ -- Sébastien Villemot <sebast...@debian.org>  Sun, 28 Mar 2021 10:55:07 +0200
+
 dnsmasq (2.84-1) unstable; urgency=low
 
    * New upstream.
diff -u dnsmasq-2.84/debian/postinst dnsmasq-2.84/debian/postinst
--- dnsmasq-2.84/debian/postinst
+++ dnsmasq-2.84/debian/postinst
@@ -1,6 +1,9 @@
 #!/bin/sh
 set -e
 
+# /usr/share/doc/dnsmasq was a symlink in versions < 2.81-1 (see #985282)
+dpkg-maintscript-helper symlink_to_dir /usr/share/doc/dnsmasq dnsmasq-base 2.81-1~ dnsmasq -- "$@"
+
 # Code copied from dh_systemd_enable ----------------------
 # This will only remove masks created by d-s-h on package removal.
 deb-systemd-helper unmask dnsmasq.service >/dev/null || true
diff -u dnsmasq-2.84/debian/postrm dnsmasq-2.84/debian/postrm
--- dnsmasq-2.84/debian/postrm
+++ dnsmasq-2.84/debian/postrm
@@ -1,6 +1,9 @@
 #!/bin/sh
 set -e
 
+# /usr/share/doc/dnsmasq was a symlink in versions < 2.81-1 (see #985282)
+dpkg-maintscript-helper symlink_to_dir /usr/share/doc/dnsmasq dnsmasq-base 2.81-1~ dnsmasq -- "$@"
+
 if [ purge = "$1" ]; then
    update-rc.d dnsmasq remove >/dev/null
 fi
diff -u dnsmasq-2.84/debian/rules dnsmasq-2.84/debian/rules
--- dnsmasq-2.84/debian/rules
+++ dnsmasq-2.84/debian/rules
@@ -176,7 +176,7 @@
 		-d debian/trees/daemon/usr/lib/tmpfiles.d \
                 -d debian/trees/daemon/etc/insserv.conf.d
 	install -m 644 debian/conffiles debian/trees/daemon/DEBIAN
-	install -m 755 debian/postinst debian/postrm debian/prerm debian/trees/daemon/DEBIAN
+	install -m 755 debian/postinst debian/postrm debian/preinst debian/prerm debian/trees/daemon/DEBIAN
 	if ! dpkg-vendor --derives-from Ubuntu; then \
                 rm -f debian/dnsmasq.postinst.debhelper debian/dnsmasq.postrm.debhelper; \
 	      	dh_runit -pdnsmasq -Pdebian/trees/daemon; \
only in patch2:
unchanged:
--- dnsmasq-2.84.orig/debian/preinst
+++ dnsmasq-2.84/debian/preinst
@@ -0,0 +1,5 @@
+#!/bin/sh
+set -e
+
+# /usr/share/doc/dnsmasq was a symlink in versions < 2.81-1 (see #985282)
+dpkg-maintscript-helper symlink_to_dir /usr/share/doc/dnsmasq dnsmasq-base 2.81-1~ dnsmasq -- "$@"

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to