Bug#1035691: python3-aiosmtpd: unhandled symlink to directory conversion: /usr/share/doc/python3-aiosmtpd/html/_sources -> ../rst

2023-05-27 Thread Andreas Beckmann

On 26/05/2023 14.21, Pierre-Elliott Bécue wrote:

Could you upload the patch on salsa (branch=master)?

Done


Will you file the unblock bug or should I do it?

Done

Andreas



Bug#1035691: python3-aiosmtpd: unhandled symlink to directory conversion: /usr/share/doc/python3-aiosmtpd/html/_sources -> ../rst

2023-05-26 Thread Pierre-Elliott Bécue
Hi,

Le jeudi 25 mai 2023 à 16:25:30+0200, Andreas Beckmann a écrit :
> Followup-For: Bug #1035691
> Control: tag -1 patch pending
> 
> I've uploaded a verified fix to DELAYED/1 to reach the bookworm deadline.

Could you upload the patch on salsa (branch=master)?

Otherwise may I apply in your name that patch on the repo?

Will you file the unblock bug or should I do it?

Cheers!

-- 
Pierre-Elliott Bécue
GPG: 9AE0 4D98 6400 E3B6 7528  F493 0D44 2664 1949 74E2
It's far easier to fight for principles than to live up to them.


signature.asc
Description: PGP signature


Bug#1035691: python3-aiosmtpd: unhandled symlink to directory conversion: /usr/share/doc/python3-aiosmtpd/html/_sources -> ../rst

2023-05-25 Thread Andreas Beckmann
Followup-For: Bug #1035691
Control: tag -1 patch pending

I've uploaded a verified fix to DELAYED/1 to reach the bookworm deadline.


Andreas
>From 8d9d96a7dd7875670b96ace93c18de1b056d3111 Mon Sep 17 00:00:00 2001
From: Andreas Beckmann 
Date: Thu, 25 May 2023 16:10:24 +0200
Subject: [PATCH] perform symlink to directory conversion of
 /usr/share/doc/python3-aiosmtpd/html/_sources

---
 debian/changelog| 8 
 debian/python3-aiosmtpd.maintscript | 1 +
 2 files changed, 9 insertions(+)
 create mode 100644 debian/python3-aiosmtpd.maintscript

diff --git a/debian/changelog b/debian/changelog
index 50c5ce5..72e5698 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+python-aiosmtpd (1.4.3-1.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Perform symlink to directory conversion of
+/usr/share/doc/python3-aiosmtpd/html/_sources.  (Closes: #1035691)
+
+ -- Andreas Beckmann   Thu, 25 May 2023 16:09:53 +0200
+
 python-aiosmtpd (1.4.3-1) unstable; urgency=medium
 
   * New upstream release 1.4.3 (Closes: #1026471, #1025019)
diff --git a/debian/python3-aiosmtpd.maintscript 
b/debian/python3-aiosmtpd.maintscript
new file mode 100644
index 000..265ff02
--- /dev/null
+++ b/debian/python3-aiosmtpd.maintscript
@@ -0,0 +1 @@
+symlink_to_dir /usr/share/doc/python3-aiosmtpd/html/_sources ../rst 1.4.3-1.1~
-- 
2.20.1



Bug#1035691: python3-aiosmtpd: unhandled symlink to directory conversion: /usr/share/doc/python3-aiosmtpd/html/_sources -> ../rst

2023-05-07 Thread Andreas Beckmann
Package: python3-aiosmtpd
Version: 1.4.3-1
Severity: serious
User: debian...@lists.debian.org
Usertags: piuparts

Hi,

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:

  bullseye -> bookworm

For /usr/share/doc/PACKAGE this may not be problematic as long as both
packages are installed, ship byte-for-byte identical files and are
upgraded in lockstep. But once one of the involved packages gets
removed, the other one will lose its documentation files, too,
including the copyright file, which is a violation of Policy 12.5:
https://www.debian.org/doc/debian-policy/ch-docs.html#copyright-information

For other overwritten locations anything interesting may happen.

Note that dpkg intentionally does not replace directories with symlinks
and vice versa, you need the maintainer scripts to do this.
See in particular the end of point 4 in
https://www.debian.org/doc/debian-policy/ch-maintainerscripts.html#details-of-unpack-phase-of-installation-or-upgrade

It is recommended to use the dpkg-maintscript-helper commands
'dir_to_symlink' and 'symlink_to_dir' (available since dpkg 1.17.14)
to perform the conversion, ideally using d/$PACKAGE.maintscript.
See dpkg-maintscript-helper(1) and dh_installdeb(1) for details.


>From the attached log (scroll to the bottom...):

1m1.5s ERROR: installs objects over existing directory symlinks:
  /usr/share/doc/python3-aiosmtpd/html/_sources/NEWS.rst.txt (python3-aiosmtpd) 
!= /usr/share/doc/python3-aiosmtpd/rst/NEWS.rst.txt (?)
/usr/share/doc/python3-aiosmtpd/html/_sources -> ../rst
  /usr/share/doc/python3-aiosmtpd/html/_sources/auth.rst.txt (python3-aiosmtpd) 
!= /usr/share/doc/python3-aiosmtpd/rst/auth.rst.txt (?)
/usr/share/doc/python3-aiosmtpd/html/_sources -> ../rst
  /usr/share/doc/python3-aiosmtpd/html/_sources/cli.rst.txt (python3-aiosmtpd) 
!= /usr/share/doc/python3-aiosmtpd/rst/cli.rst.txt (?)
/usr/share/doc/python3-aiosmtpd/html/_sources -> ../rst
  /usr/share/doc/python3-aiosmtpd/html/_sources/concepts.rst.txt 
(python3-aiosmtpd) != /usr/share/doc/python3-aiosmtpd/rst/concepts.rst.txt (?)
/usr/share/doc/python3-aiosmtpd/html/_sources -> ../rst
  /usr/share/doc/python3-aiosmtpd/html/_sources/controller.rst.txt 
(python3-aiosmtpd) != /usr/share/doc/python3-aiosmtpd/rst/controller.rst.txt (?)
/usr/share/doc/python3-aiosmtpd/html/_sources -> ../rst
  /usr/share/doc/python3-aiosmtpd/html/_sources/handlers.rst.txt 
(python3-aiosmtpd) != /usr/share/doc/python3-aiosmtpd/rst/handlers.rst.txt (?)
/usr/share/doc/python3-aiosmtpd/html/_sources -> ../rst
  /usr/share/doc/python3-aiosmtpd/html/_sources/index.rst.txt 
(python3-aiosmtpd) != /usr/share/doc/python3-aiosmtpd/rst/index.rst.txt (?)
/usr/share/doc/python3-aiosmtpd/html/_sources -> ../rst
  /usr/share/doc/python3-aiosmtpd/html/_sources/intro.rst.txt 
(python3-aiosmtpd) != /usr/share/doc/python3-aiosmtpd/rst/intro.rst.txt (?)
/usr/share/doc/python3-aiosmtpd/html/_sources -> ../rst
  /usr/share/doc/python3-aiosmtpd/html/_sources/lmtp.rst.txt (python3-aiosmtpd) 
!= /usr/share/doc/python3-aiosmtpd/rst/lmtp.rst.txt (?)
/usr/share/doc/python3-aiosmtpd/html/_sources -> ../rst
  /usr/share/doc/python3-aiosmtpd/html/_sources/manpage.rst.txt 
(python3-aiosmtpd) != /usr/share/doc/python3-aiosmtpd/rst/manpage.rst.txt (?)
/usr/share/doc/python3-aiosmtpd/html/_sources -> ../rst
  /usr/share/doc/python3-aiosmtpd/html/_sources/migrating.rst.txt 
(python3-aiosmtpd) != /usr/share/doc/python3-aiosmtpd/rst/migrating.rst.txt (?)
/usr/share/doc/python3-aiosmtpd/html/_sources -> ../rst
  /usr/share/doc/python3-aiosmtpd/html/_sources/proxyprotocol.rst.txt 
(python3-aiosmtpd) != /usr/share/doc/python3-aiosmtpd/rst/proxyprotocol.rst.txt 
(?)
/usr/share/doc/python3-aiosmtpd/html/_sources -> ../rst
  /usr/share/doc/python3-aiosmtpd/html/_sources/smtp.rst.txt (python3-aiosmtpd) 
!= /usr/share/doc/python3-aiosmtpd/rst/smtp.rst.txt (?)
/usr/share/doc/python3-aiosmtpd/html/_sources -> ../rst
  /usr/share/doc/python3-aiosmtpd/html/_sources/testing.rst.txt 
(python3-aiosmtpd) != /usr/share/doc/python3-aiosmtpd/rst/testing.rst.txt (?)
/usr/share/doc/python3-aiosmtpd/html/_sources -> ../rst


cheers,

Andreas


python3-aiosmtpd_1.4.3-1.log.gz
Description: application/gzip