Compare commits

...
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.

5 commits

Author SHA1 Message Date
Akira TAGOH
213d53ea13 Add a seed for <dir prefix="xdg">fonts</dir>
This is expanded to /usr/local/share/fonts and /usr/share/fonts as well.
We definitely have to have different seed for /usr/share/fonts.
2023-03-22 21:05:58 +09:00
Akira TAGOH
777ee5eb13 Add 05-flatpak-fontpath.conf
We need a different MD5 for fontconfig cache to avoid
conflict between caches on host and flatpak.

See https://github.com/fedora-silverblue/issue-tracker/issues/305
2023-03-17 21:32:16 +09:00
Akira TAGOH
1930fd541f Include fonts-dir.xml
Sync up with upstream change in fontconfig-flatpak.conf.

https://gitlab.com/freedesktop-sdk/freedesktop-sdk/-/issues/1493
2022-11-17 19:48:24 +09:00
Kalev Lember
cfbfef479a Revert "Fix search paths for /app-installed python modules" (#2026979)
The python path issue is now fixed so we can go back to using the
original code.

https://bugzilla.redhat.com/show_bug.cgi?id=2026979

This reverts commit 2a984132dc.
2022-09-06 09:14:47 +02:00
Kalev Lember
8c8f800022 Correctly substitute /app/lib in flatpak-builder defaults.json ldflags 2022-09-06 09:14:43 +02:00
4 changed files with 27 additions and 12 deletions

12
05-flatpak-fontpath.conf Normal file
View file

@ -0,0 +1,12 @@
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<!-- Redefine font directories to generate caches with different id -->
<reset-dirs />
<dir salt="flatpak">/usr/share/fonts</dir>
<dir salt="flatpak">/usr/share/X11/fonts/Type1</dir>
<dir salt="flatpak">/usr/share/X11/fonts/TTF</dir>
<dir salt="flatpak">/usr/local/share/fonts</dir>
<dir salt="flatpak" prefix="xdg">fonts</dir>
<dir>~/.fonts</dir>
</fontconfig>

View file

@ -21,4 +21,6 @@
<cachedir>/run/host/fonts-cache</cachedir>
<cachedir>/run/host/user-fonts-cache</cachedir>
<include>/run/host/font-dirs.xml</include>
</fontconfig>

View file

@ -3,5 +3,5 @@
"cflags": "%{build_cflags}",
"cxxflags": "%{build_cxxflags}",
"cppflags": "",
"ldflags": "-L/app/lib %{build_ldflags}"
"ldflags": "-L/app/%{_lib} %{build_ldflags}"
}

View file

@ -3,9 +3,11 @@ Version: 36
Release: 2%{?dist}
Summary: Configuration files that live inside the flatpak runtime
Source1: 50-flatpak.conf
Source2: usercustomize.py
Source3: org.fedoraproject.Platform.appdata.xml
Source4: org.fedoraproject.Sdk.appdata.xml
Source5: defaults.json.in
Source6: 05-flatpak-fontpath.conf
License: MIT
@ -29,19 +31,13 @@ rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{_prefix}/cache/fontconfig
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/fonts/conf.d
install -t $RPM_BUILD_ROOT%{_sysconfdir}/fonts/conf.d -p -m 0644 %{SOURCE1}
install -t $RPM_BUILD_ROOT%{_sysconfdir}/fonts/conf.d -p -m 0644 %{SOURCE6}
# usercustomize.py to set up Python paths
mkdir -p $RPM_BUILD_ROOT%{python3_sitelib}
cat > $RPM_BUILD_ROOT%{python3_sitelib}/usercustomize.py <<EOF
import site
%define _prefix /app
site.addsitedir("%{python3_sitelib}")
%if "%{python3_sitelib}" != "%{python3_sitearch}"
site.addsitedir("%{python3_sitearch}")
%endif
%undefine _prefix
EOF
for d in %{python3_sitelib} ; do
mkdir -p $RPM_BUILD_ROOT/$d
install -t $RPM_BUILD_ROOT/$d -m 0644 %{SOURCE2}
done
# Install appdata for both the Platform and the Sdk
mkdir -p $RPM_BUILD_ROOT%{_datadir}/metainfo
@ -51,6 +47,7 @@ install -t $RPM_BUILD_ROOT%{_datadir}/metainfo -p -m 0644 %{SOURCE4}
# Install flatpak-builder config file
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/flatpak-builder
sed -e 's|%%{_libdir}|%{_libdir}|' \
-e 's|%%{_lib}|%{_lib}|' \
-e 's|%%{build_cflags}|%{build_cflags}|' \
-e 's|%%{build_cxxflags}|%{build_cxxflags}|' \
-e 's|%%{build_ldflags}|%{build_ldflags}|' \
@ -91,6 +88,10 @@ HOME=/root /usr/bin/fc-cache -s
%{_sysconfdir}/ld.so.conf.d/app.conf
%changelog
* Tue Sep 06 2022 Kalev Lember <klember@redhat.com> - 36-2
- Correctly substitute /app/lib in flatpak-builder defaults.json ldflags
- Revert "Fix search paths for /app-installed python modules" (#2026979)
* Thu Aug 04 2022 Kalev Lember <klember@redhat.com> - 36-2
- Fix search paths for /app-installed python modules (#2112499)