[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1111805: ld.so.conf settings prefer /lib over /usr/lib (drop /lib from ld.so.conf entirely?)



Control: tags -1 + patch

On Fri, 22 Aug 2025 11:06:58 +0300 Michael Tokarev <mjt@tls.msk.ru> wrote:

Currently shipping /etc/ld.so.conf.d/*.conf prefers /lib over /usr/lib.
For example, /etc/ld.so.conf.d/x86_64-linux-gnu.conf has:

[..]

But there's a question: do we really need to keep /lib in there at all?
To me it feels like we don't, so it should be just dropped.  But I might
not know all the details here.
Given that debian policy no longer allows libraries in /lib and mandates /lib to be a symlink, I'd say it's safe to drop the additional search path and I agree it would be good to clean them up now.

The attached patch should do that.


Regards,
Michael

diff -Nru glibc-2.42/debian/rules.d/build.mk glibc-2.42/debian/rules.d/build.mk
--- glibc-2.42/debian/rules.d/build.mk	2025-08-11 15:23:49.000000000 +0200
+++ glibc-2.42/debian/rules.d/build.mk	2025-08-22 10:26:54.000000000 +0200
@@ -272,11 +272,9 @@
 	  conffile="$(debian-tmp)/etc/ld.so.conf.d/$(DEB_HOST_MULTIARCH).conf"; \
 	  echo "# Multiarch support" > $$conffile; \
 	  echo "/usr/local/lib/$(DEB_HOST_MULTIARCH)" >> $$conffile; \
-	  echo "$(call xx,slibdir)" >> $$conffile; \
 	  echo "$(call xx,libdir)" >> $$conffile; \
 	  if [ "$(DEB_HOST_GNU_TYPE)" != "$(DEB_HOST_MULTIARCH)" ]; then \
 	    echo "/usr/local/lib/$(DEB_HOST_GNU_TYPE)" >> $$conffile; \
-	    echo "/lib/$(DEB_HOST_GNU_TYPE)" >> $$conffile; \
 	    echo "/usr/lib/$(DEB_HOST_GNU_TYPE)" >> $$conffile; \
 	  fi; \
 	  mkdir -p $(debian-tmp)/usr/include/$(DEB_HOST_MULTIARCH); \
@@ -300,7 +298,6 @@
 	  mkdir -p $(debian-tmp)/etc/ld.so.conf.d; \
 	  conffile="$(debian-tmp)/etc/ld.so.conf.d/zz_$(curpass)-biarch-compat.conf"; \
 	  echo "# Legacy biarch compatibility support" > $$conffile; \
-	  echo "$(call xx,slibdir)" >> $$conffile; \
 	  echo "$(call xx,libdir)" >> $$conffile; \
 	  ;; \
 	esac

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature


Reply to: