Bug 2440274 - Source ld.so configs drop-ins from /usr/lib
Summary: Source ld.so configs drop-ins from /usr/lib
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: glibc
Version: 43
Hardware: All
OS: Linux
unspecified
low
Target Milestone: ---
Assignee: Carlos O'Donell
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2026-02-16 20:13 UTC by JB Trystram
Modified: 2026-07-03 12:25 UTC (History)
17 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Type: ---
Embargoed:


Attachments (Terms of Use)

Description JB Trystram 2026-02-16 20:13:01 UTC
It would be nice to align with other components (e.g. udev, systemd, sysctl) and source config drop-ins from `/usr/lib/ld.so.conf.d/`.

This would allow distribution-provided confing drop-ins to stay in /usr. The idea behind this is that only machine-specific and user config should live in /etc, and all the distribution provided defaults live under /usr, which is read only on immutable systems. See https://0pointer.de/blog/projects/stateless.html

Right now an easy workaround is : 
```
cat <<EOF > /etc/ld.so.conf.d/usr.conf
source /usr/lib/ld.so.conf.d/*.conf
EOF
```

I ran into this while trying to ship software in a systemd-sysext that required a ld config dropin. More details at https://github.com/fedora-sysexts/fedora/issues/207.

Reproducible: Always

Comment 1 Florian Weimer 2026-03-20 13:34:32 UTC
Currently we have this in /etc/ld.so.conf:

include ld.so.conf.d/*.conf

This is a request to change it to:

include ld.so.conf.d/*.conf
include /usr/lib/ld.so.conf.d/*.conf

(Stuff like this is why I think system-wide tunables should not be configured with a separate file. With a separate file, we need to duplicate all these paths.)

Comment 2 Zbigniew Jędrzejewski-Szmek 2026-07-03 12:25:48 UTC
But this still requires /etc/ld.so.conf to be present… Why not move into glibc itself
so that this kind of boilerplate file stops being necessary.

Proposal:
load automatically: /etc/ld.so.conf, /usr/lib/ld.so.conf.d/*.conf, /etc/ld.so.conf.d/*.conf
(in order of priority).
Users can use 'include' in of the files if they want to load things from other locations.


Note You need to log in before you can comment on or make changes to this bug.