Control: reassign -1 libgctp Control: tag -1 patch Control: retitle -1 libgctp: Fix SONAME filename handling
On Tue, 2025-09-16 at 16:57:25 +0200, Michael Biebl wrote: > Am 16.09.25 um 16:28 schrieb Guillem Jover: > > On Tue, 2025-09-16 at 15:49:22 +0200, Michael Biebl wrote: > > > Package: dpkg-dev > > > Version: 1.22.21 > > > Severity: important > > > File: /usr/bin/dpkg-shlibdeps > > > > > for some back story please see > > > https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1111805#49 > > > > > > In > > > https://salsa.debian.org/glibc-team/glibc/-/commit/5e3aa111654e9aad080881fb98f9e5b01b277857 > > > (currently only available via Debian experimental), > > > the duplicated paths for /lib were removed from ld.so.conf files. > > > > > > This triggered a build failure for ncl, hdf-eos5 and ruby-hdfeos5. > > > > > > All those packages link against libgctp and the build failures look > > > similar: > > > > > If you want to reproduce the problem, remove the line > > > /lib/x86_64-linux-gnu > > > in /etc/ld.so.conf.d/x86_64-linux-gnu.conf and try to build one of those > > > packages in debian sid or trixie. > > > > The problem can be reproduced in Debian sid, with no ld.so.conf > > modifications. (Or I botched my testing?) > > I can't repoduce the failure with with no ld.so.conf modifications. This can be reproduced on a system with a merged-/usr with selective filename aliasing (instead of global directory aliasing). The problem is that merged-/usr with directory aliasing has been shadowing this problem, which is a packaging issue in libgctp. The non-dev package should be containing the shared library named as its SONAME, which is what dpkg-shlibdeps expects, to be able to map from the SONAME to the package that contains the shlibs file. This has worked on merged-/usr systems with directory aliasing (and /lib in the ld.so default path) because dpkg-shlibdeps was able to find the file on the filesystem but no match on its db, which resulted in triggering a fallback to canonicalize the filename and overwrite the filename to package mapping which then leads it to the package containing the shlibs file (libgctp-2.0.0 vs libgctp-dev). On systems where there is no searching or presence of SONAME via /lib, then dpkg-shlibdeps does not trigger the canonicalization and instead finds the mapping to the -dev package, which contains no shlibs file, and that fails the build. The attached patch should fix the issue (at least it does for me). Reassigning to libgctp. Thanks, Guillem
From 21b3c4962055f4b7ba6be6af9347db6e0f750b76 Mon Sep 17 00:00:00 2001 From: Guillem Jover <[email protected]> Date: Tue, 16 Sep 2025 23:21:09 +0200 Subject: [PATCH] Fix SONAME filename handling The shared library should be installed as its SONAME, because the package that provides it also ships the shlibs metadata file. Otherwise dpkg-shlibdeps cannot find the mapping between the SONAME used by other objects with the package containing the shlibs file. This problem has been shadowed on users with merged-/usr with aliased directories because the dpkg-shlibdeps code was failing to locate the library under /lib (instead of the canonical location under /usr/lib) and was then using a fallback code path where it would canonicalize the filename, and would then find the actual shared library in the libgctp-2.0.0 package and then be able to find the shlibs file (instead of trying to look into the libgctp-dev package). On systems with merged-/usr with aliased filenames or once the /lib directory gets removed from the ld.so.conf pathnames, then dpkg-shlibdeps is unable to find the shlibs file. Although shipping a .so filename in a non-dev package is unconventional, this is the expected thing to do with shared libraries with SONAME denoting an unstable interface (like lib<name>-<version>.so). A similar example would be libbinutils. Ideally upstream would switch from using -release to -version-info in the build-system (but that's going to be an ABI break, and upstream does not look very active). --- debian/control | 3 ++- debian/libgctp-2.0.0.install | 2 +- debian/libgctp-2.0.0.links | 3 ++- debian/libgctp-dev.links | 3 +-- debian/rules | 1 - 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/debian/control b/debian/control index d2c3aca..cfa1f3c 100644 --- a/debian/control +++ b/debian/control @@ -14,7 +14,8 @@ Package: libgctp-2.0.0 Section: libs Architecture: any Multi-Arch: same -Breaks: libgctp-dev (<< 2.0.0-9) +Breaks: libgctp-dev (<< 2.0.0-13~) +Replaces: libgctp-dev (<< 2.0.0-13~) Depends: ${shlibs:Depends}, ${misc:Depends} Description: General Cartographic Transformation Package Library The General Cartographic Transformation Package (GCTP) is a system of diff --git a/debian/libgctp-2.0.0.install b/debian/libgctp-2.0.0.install index 5eaf89a..5e8fd16 100644 --- a/debian/libgctp-2.0.0.install +++ b/debian/libgctp-2.0.0.install @@ -1 +1 @@ -/usr/lib/${DEB_HOST_MULTIARCH}/libgctp-2.so.2.0.0 +/usr/lib/${DEB_HOST_MULTIARCH}/libgctp-2.0.0.so diff --git a/debian/libgctp-2.0.0.links b/debian/libgctp-2.0.0.links index dd33a8e..3972f00 100644 --- a/debian/libgctp-2.0.0.links +++ b/debian/libgctp-2.0.0.links @@ -1 +1,2 @@ -/usr/lib/${DEB_HOST_MULTIARCH}/libgctp-2.so.2.0.0 /usr/lib/${DEB_HOST_MULTIARCH}/libgctp-2.0.0.so.2 +/usr/lib/${DEB_HOST_MULTIARCH}/libgctp-2.0.0.so /usr/lib/${DEB_HOST_MULTIARCH}/libgctp-2.0.0.so.2 +/usr/lib/${DEB_HOST_MULTIARCH}/libgctp-2.0.0.so /usr/lib/${DEB_HOST_MULTIARCH}/libgctp-2.so.2.0.0 diff --git a/debian/libgctp-dev.links b/debian/libgctp-dev.links index cec3ceb..2e227f2 100644 --- a/debian/libgctp-dev.links +++ b/debian/libgctp-dev.links @@ -1,2 +1 @@ -/usr/lib/${DEB_HOST_MULTIARCH}//libgctp-2.so.2.0.0 /usr/lib/${DEB_HOST_MULTIARCH}/libgctp-2.0.0.so -/usr/lib/${DEB_HOST_MULTIARCH}//libgctp-2.so.2.0.0 /usr/lib/${DEB_HOST_MULTIARCH}/libgctp.so +/usr/lib/${DEB_HOST_MULTIARCH}//libgctp-2.0.0.so /usr/lib/${DEB_HOST_MULTIARCH}/libgctp.so diff --git a/debian/rules b/debian/rules index 2458a3b..6b43de7 100755 --- a/debian/rules +++ b/debian/rules @@ -32,5 +32,4 @@ override_dh_auto_install: dh_auto_install -- 'CC=$(CC)' rm $(INSTDIR)/libgctp.la $(INSTDIR)/libgctp.so mv $(INSTDIR)/libgctp.a $(INSTDIR)/libgctp2.a - mv $(INSTDIR)/libgctp-2.0.0.so $(INSTDIR)/libgctp-2.so.2.0.0 -- 2.51.0

