The flatpak-runtime-config rpms
This repository has been archived on 2026-01-16. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
Find a file
Yaakov Selkowitz 641ea40056 Enable dynamic ld.so.cache generation
Using LD_LIBRARY_PATH for adding to the default library search path is not
always reliable, as sometimes subprocesses may be launched without this
environment variable, which may cause it to fail if it needs libraries
outside of the runtime.

Instead, we should follow the lead of Flathub flatpaks, and use dynamic
ld.so.cache generation instead.  This automatically creates (or updates) a
cache file in ~/.var/app/$APP_ID/.ld.so/ based on the runtime, app, and any
extensions, and works even for subprocesses with a limited environment.

To implement this, in addition to the changes here, the runtimes need to
*not* pass --env=LD_LIBRARY_PATH, and add the following to finish-args:

    # enable dynamic ld.so.cache generation
    [ -e /usr/bin/ldconfig ] || ln -s ../sbin/ldconfig /usr/bin/ldconfig
    cat /etc/ld.so.conf.d/*.conf > /etc/ld.so.conf
    rm -f /etc/ld.so.conf.d/*.conf

This is necessary because the feature requires ldconfig in /bin (where we
still have a separate /sbin), and the code is not designed to handle
/etc/ld.so.conf.d/*.conf.  This also allows %_sysconfdir/ld.so.conf.d to
work for both RPM builds and flatpak apps rather than having to defining
--env=LD_LIBRARY_PATH in the app too.

https://github.com/flatpak/flatpak/blob/1.15.12/common/flatpak-run.c#L2663
https://github.com/flatpak/flatpak/blob/1.15.12/common/flatpak-run.c#L3083

Fixes: rhbz#2272376
2024-12-10 17:45:54 -05:00
.gitignore Initial setup of the repo 2017-06-14 16:00:12 +00:00
05-flatpak-fontpath.conf Add a seed for <dir prefix="xdg">fonts</dir> 2023-03-22 21:02:02 +09:00
50-flatpak.conf Add /app-built X11 font directories to fontconfig path 2024-03-04 20:29:27 -05:00
defaults.json.in Correctly substitute /app/lib in flatpak-builder defaults.json ldflags 2022-09-06 09:06:27 +02:00
flatpak-runtime-config.spec Enable dynamic ld.so.cache generation 2024-12-10 17:45:54 -05:00
org.fedoraproject.KDE5Platform.appdata.xml Bump version 2024-08-14 20:06:47 -04:00
org.fedoraproject.KDE5Sdk.appdata.xml Bump version 2024-08-14 20:06:47 -04:00
org.fedoraproject.KDE6Platform.appdata.xml Bump version 2024-08-14 20:06:47 -04:00
org.fedoraproject.KDE6Sdk.appdata.xml Bump version 2024-08-14 20:06:47 -04:00
org.fedoraproject.Platform.appdata.xml Bump version 2024-08-14 20:06:47 -04:00
org.fedoraproject.Sdk.appdata.xml Bump version 2024-08-14 20:06:47 -04:00
sitecustomize.py Provide sitecustomize instead of usercustomize 2023-09-04 18:02:17 -04:00
sources Initial setup of the repo 2017-06-14 16:00:12 +00:00