Bug 2440274

Summary: Source ld.so configs drop-ins from /usr/lib
Product: [Fedora] Fedora Reporter: JB Trystram <jtrystra>
Component: glibcAssignee: Carlos O'Donell <codonell>
Status: NEW --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: unspecified    
Version: 43CC: arjun, codonell, dj, fberat, fweimer, jlaw, josmyers, mcermak, mcoufal, mfabian, pfrankli, sam, sipoyare, skolosov, suraj.ghimire7, travier, zbyszek
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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.