Bug#987781: libcrypt-dev violates Multi-Arch: same

2022-01-14 Thread Helmut Grohne
Control: tags -1 + pending

On Thu, Apr 29, 2021 at 01:14:45PM +0200, Helmut Grohne wrote:
> libcrypt-dev is declared Multi-Arch: same, but coinstalling it for
> architectures where libxcrypt uses different sonames breaks. For
> example:
> 
> | dpkg: error processing archive 
> /tmp/repo/pool/main/libx/libxcrypt/libcrypt-dev_4.4.18-4_musl-linux-i386.deb 
> (--unpack):
> |  trying to overwrite shared '/usr/share/doc/libcrypt-dev', which is 
> different from other instances of package libcrypt-dev:musl-linux-i386
> 
> This is due to the use of --link-doc with varying symlink targets. I
> fear that there is no good solution beyond simply not using --link-doc,
> so the attached patch converts the doc directory to a plain directory.

In accordance with devref 5.11.1 I have uploaded a slightly updated
patch (updated versions and changelog) to delayed/5. Please let me know
if this should be deferred any longer.

Helmut
diff --minimal -Nru libxcrypt-4.4.27/debian/changelog 
libxcrypt-4.4.27/debian/changelog
--- libxcrypt-4.4.27/debian/changelog   2021-12-17 23:48:21.0 +0100
+++ libxcrypt-4.4.27/debian/changelog   2022-01-14 20:10:07.0 +0100
@@ -1,3 +1,11 @@
+libxcrypt (1:4.4.27-1.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix M-A:same violation in libcrypt-dev by removing --link-doc.
+(Closes: #987781)
+
+ -- Helmut Grohne   Fri, 14 Jan 2022 20:10:07 +0100
+
 libxcrypt (1:4.4.27-1) unstable; urgency=medium
 
   * New upstream release.
diff --minimal -Nru libxcrypt-4.4.27/debian/libcrypt-dev.maintscript 
libxcrypt-4.4.27/debian/libcrypt-dev.maintscript
--- libxcrypt-4.4.27/debian/libcrypt-dev.maintscript1970-01-01 
01:00:00.0 +0100
+++ libxcrypt-4.4.27/debian/libcrypt-dev.maintscript2022-01-14 
20:04:09.0 +0100
@@ -0,0 +1 @@
+symlink_to_dir /usr/share/doc/libcrypt-dev libcrypt1 1:4.4.27-1.1~
diff --minimal -Nru libxcrypt-4.4.27/debian/rules libxcrypt-4.4.27/debian/rules
--- libxcrypt-4.4.27/debian/rules   2021-12-17 22:55:02.0 +0100
+++ libxcrypt-4.4.27/debian/rules   2022-01-14 20:04:09.0 +0100
@@ -146,16 +146,8 @@
--owner=root --group=root --numeric-owner \
| tar xf - -C $(DS)/usr/src/libxcrypt/
 
-override_dh_installdocs:
+execute_before_dh_installdocs:
cat debian/copyright.in LICENSING > debian/copyright
-   dh_installdocs -plibcrypt-dev --link-doc=libcrypt$(BUILD_DEV_VER)
-ifdef BUILD_DEB1
-   dh_installdocs -plibcrypt1
-endif
-ifdef BUILD_DEB2
-   dh_installdocs -plibcrypt2
-endif
-   dh_installdocs -plibxcrypt-source
 
 override_dh_installchangelogs:
dh_installchangelogs -XChangeLog NEWS


Bug#987781: libcrypt-dev violates Multi-Arch: same

2021-04-29 Thread Helmut Grohne
Package: libcrypt-dev
Version: 1:4.4.18-4
Severity: important
Tags: patch
User: helm...@debian.org
Usertags: rebootstrap

libcrypt-dev is declared Multi-Arch: same, but coinstalling it for
architectures where libxcrypt uses different sonames breaks. For
example:

| dpkg: error processing archive 
/tmp/repo/pool/main/libx/libxcrypt/libcrypt-dev_4.4.18-4_musl-linux-i386.deb 
(--unpack):
|  trying to overwrite shared '/usr/share/doc/libcrypt-dev', which is different 
from other instances of package libcrypt-dev:musl-linux-i386

This is due to the use of --link-doc with varying symlink targets. I
fear that there is no good solution beyond simply not using --link-doc,
so the attached patch converts the doc directory to a plain directory.

Helmut
diff --minimal -Nru libxcrypt-4.4.18/debian/changelog 
libxcrypt-4.4.18/debian/changelog
--- libxcrypt-4.4.18/debian/changelog   2021-04-19 02:46:31.0 +0200
+++ libxcrypt-4.4.18/debian/changelog   2021-04-29 13:03:59.0 +0200
@@ -1,3 +1,10 @@
+libxcrypt (1:4.4.18-4.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix M-A:same violation in libcrypt-dev by removing --link-doc. (Closes: 
#-1)
+
+ -- Helmut Grohne   Thu, 29 Apr 2021 13:03:59 +0200
+
 libxcrypt (1:4.4.18-4) unstable; urgency=high
 
   * Move back the .pc file (and also .so and .a) to /usr/lib/ to fix a
diff --minimal -Nru libxcrypt-4.4.18/debian/libcrypt-dev.maintscript 
libxcrypt-4.4.18/debian/libcrypt-dev.maintscript
--- libxcrypt-4.4.18/debian/libcrypt-dev.maintscript1970-01-01 
01:00:00.0 +0100
+++ libxcrypt-4.4.18/debian/libcrypt-dev.maintscript2021-04-29 
13:03:59.0 +0200
@@ -0,0 +1 @@
+symlink_to_dir /usr/share/doc/libcrypt-dev libcrypt1 1:4.4.18-4.1~
diff --minimal -Nru libxcrypt-4.4.18/debian/rules libxcrypt-4.4.18/debian/rules
--- libxcrypt-4.4.18/debian/rules   2021-04-19 02:36:41.0 +0200
+++ libxcrypt-4.4.18/debian/rules   2021-04-29 13:03:53.0 +0200
@@ -142,16 +142,8 @@
--owner=root --group=root --numeric-owner \
| tar xf - -C $(DS)/usr/src/libxcrypt/
 
-override_dh_installdocs:
+execute_before_dh_installdocs:
cat debian/copyright.in LICENSING > debian/copyright
-   dh_installdocs -plibcrypt-dev --link-doc=libcrypt$(BUILD_DEV_VER)
-ifdef BUILD_DEB1
-   dh_installdocs -plibcrypt1
-endif
-ifdef BUILD_DEB2
-   dh_installdocs -plibcrypt2
-endif
-   dh_installdocs -plibxcrypt-source
 
 override_dh_installchangelogs:
dh_installchangelogs -XChangeLog NEWS