Blame SPECS/flatpak-runtime-config.spec

bb3a4b
Name:           flatpak-runtime-config
bb3a4b
Version:        34
5dd908
Release:        3%{?dist}
bb3a4b
Summary:        Configuration files that live inside the flatpak runtime
bb3a4b
Source1:        50-flatpak.conf
bb3a4b
Source2:        usercustomize.py
bb3a4b
Source3:        com.redhat.Platform.appdata.xml
bb3a4b
Source4:        com.redhat.Sdk.appdata.xml
bb3a4b
Source5:        defaults.json.in
5dd908
Source6:        05-flatpak-fontpath.conf
bb3a4b
bb3a4b
License:        MIT
bb3a4b
bb3a4b
BuildRequires:  python3
bb3a4b
BuildRequires:  python3-rpm-macros
bb3a4b
bb3a4b
Requires:       fontpackages-filesystem
bb3a4b
bb3a4b
%description
bb3a4b
This package includes configuration files that are installed into the flatpak
bb3a4b
runtime filesystem during the runtime creation process; it is also installed
bb3a4b
into the build root when building RPMs. It contains all configuration
bb3a4b
files that need to be different when executing a flatpak.
bb3a4b
bb3a4b
%prep
bb3a4b
bb3a4b
%build
bb3a4b
bb3a4b
%install
bb3a4b
rm -rf $RPM_BUILD_ROOT
bb3a4b
mkdir -p $RPM_BUILD_ROOT%{_prefix}/cache/fontconfig
bb3a4b
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/fonts/conf.d
bb3a4b
install -t $RPM_BUILD_ROOT%{_sysconfdir}/fonts/conf.d -p -m 0644 %{SOURCE1}
5dd908
install -t $RPM_BUILD_ROOT%{_sysconfdir}/fonts/conf.d -p -m 0644 %{SOURCE6}
bb3a4b
bb3a4b
# usercustomize.py to set up Python paths
bb3a4b
for d in %{python3_sitelib} ; do
bb3a4b
    mkdir -p $RPM_BUILD_ROOT/$d
bb3a4b
    install -t $RPM_BUILD_ROOT/$d -m 0644 %{SOURCE2}
bb3a4b
done
bb3a4b
bb3a4b
# Install appdata for both the Platform and the Sdk
bb3a4b
mkdir -p $RPM_BUILD_ROOT%{_datadir}/metainfo
bb3a4b
install -t $RPM_BUILD_ROOT%{_datadir}/metainfo -p -m 0644 %{SOURCE3}
bb3a4b
install -t $RPM_BUILD_ROOT%{_datadir}/metainfo -p -m 0644 %{SOURCE4}
bb3a4b
bb3a4b
# Install flatpak-builder config file
bb3a4b
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/flatpak-builder
bb3a4b
sed -e 's|%%{_libdir}|%{_libdir}|' \
5dd908
    -e 's|%%{_lib}|%{_lib}|' \
bb3a4b
    -e 's|%%{build_cflags}|%{build_cflags}|' \
bb3a4b
    -e 's|%%{build_cxxflags}|%{build_cxxflags}|' \
bb3a4b
    -e 's|%%{build_ldflags}|%{build_ldflags}|' \
bb3a4b
    %{SOURCE5} > $RPM_BUILD_ROOT%{_sysconfdir}/flatpak-builder/defaults.json
bb3a4b
bb3a4b
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/ld.so.conf.d/
bb3a4b
echo "/app/%{_lib}" > $RPM_BUILD_ROOT%{_sysconfdir}/ld.so.conf.d/app.conf
bb3a4b
bb3a4b
# We duplicate selected file triggers from packages in the runtime, to
bb3a4b
# extend them to cover /app as well. Some other functions that RPM file
bb3a4b
# triggers normally provide are handled by flatpak triggers - in particular
bb3a4b
# calling update-desktop-database and gtk-update-icon-cache.
bb3a4b
bb3a4b
# The ldconfig scriplets have a limited function since symlinks are supposed
bb3a4b
# to be packaged, and a ld.so.cache that handles both /app and /usr is
bb3a4b
# maintained by flatpak. But occasionally a symlink is missed in packaging,
bb3a4b
# and this will make sure it is created install time, as it would be
bb3a4b
# system-wide.
bb3a4b
bb3a4b
%post -p /sbin/ldconfig
bb3a4b
bb3a4b
%transfiletriggerin -P 1999999 -- /app/lib /app/lib64
bb3a4b
/sbin/ldconfig
bb3a4b
bb3a4b
%transfiletriggerin -- /app/share/glib-2.0/schemas
bb3a4b
glib-compile-schemas /app/share/glib-2.0/schemas &> /dev/null || :
bb3a4b
bb3a4b
%transfiletriggerin -- /app/share/fonts
bb3a4b
HOME=/root /usr/bin/fc-cache -s
bb3a4b
bb3a4b
%files
bb3a4b
%dir %{_prefix}/cache
bb3a4b
%dir %{_prefix}/cache/fontconfig
bb3a4b
%{python3_sitelib}
bb3a4b
%{_datadir}/metainfo/*.appdata.xml
bb3a4b
%{_sysconfdir}/flatpak-builder/
bb3a4b
%{_sysconfdir}/fonts/conf.d/*
bb3a4b
%{_sysconfdir}/ld.so.conf.d/app.conf
bb3a4b
bb3a4b
%changelog
5dd908
* Fri Mar 24 2023 Tomas Popela <tpopela@redhat.com> - 34-3
5dd908
- Sync with Fedora
5dd908
- Add a seed for <dir prefix="xdg">fonts</dir> (by tagoh)
5dd908
5dd908
* Fri Mar 17 2023 Tomas Popela <tpopela@redhat.com> - 34-2
5dd908
- Sync with Fedora
5dd908
- Correctly substitute /app/lib in flatpak-builder defaults.json ldflags (by klember)
5dd908
- Include fonts-dirs.xml in fontconfig flatpak configuration (by tagoh)
5dd908
- Add 05-flatpak-fontpath.conf that forces a different MD5 for fontconfig cache to avoid
5dd908
  conflict between caches on host and flatpak (by tagoh)
5dd908
bb3a4b
* Tue Feb 02 2021 Kalev Lember <klember@redhat.com> - 34-1
bb3a4b
- Install flatpak-builder defaults.json config file
bb3a4b
bb3a4b
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 33-2
bb3a4b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
bb3a4b
bb3a4b
* Wed Jul 29 2020 Kalev Lember <klember@redhat.com> - 33-1
bb3a4b
- Install appdata for both the Platform and the Sdk
bb3a4b
bb3a4b
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 32-2
bb3a4b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
bb3a4b
bb3a4b
* Fri Mar 06 2020 Kalev Lember <klember@redhat.com> - 32-1
bb3a4b
- Remove Python 2 support (#1801932)
bb3a4b
bb3a4b
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 30-3
bb3a4b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
bb3a4b
bb3a4b
* Thu Aug  8 2019 fedora-toolbox <otaylor@redhat.com> - 30-2
bb3a4b
- Fix comment location in fontconfig config file
bb3a4b
bb3a4b
* Fri Jul 26 2019 Mark Otaris <mark@net-c.com> - 30-1
bb3a4b
- Update font config to match freedesktop-sdk, allowing user-installed fonts to work
bb3a4b
bb3a4b
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 29-6
bb3a4b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
bb3a4b
bb3a4b
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 29-5
bb3a4b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
bb3a4b
bb3a4b
* Fri Sep 28 2018 Owen Taylor <otaylor@redhat.com> - 29-4
bb3a4b
- Add a usercustomize.py to set up Python paths
bb3a4b
bb3a4b
* Sat Sep  8 2018 Owen Taylor <otaylor@redhat.com> - 29-3
bb3a4b
- Fix path to gsettings schemas in trigger
bb3a4b
bb3a4b
* Sat Sep  8 2018 Owen Taylor <otaylor@redhat.com> - 29-2
bb3a4b
- Avoid comments leaking into scriplets
bb3a4b
bb3a4b
* Sat Sep  8 2018 Owen Taylor <otaylor@redhat.com> - 29-1
bb3a4b
- Add file triggers from glibc, glib2, and fontconfig
bb3a4b
bb3a4b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
bb3a4b
bb3a4b
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 27-6
bb3a4b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
bb3a4b
bb3a4b
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 27-5
bb3a4b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
bb3a4b
bb3a4b
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 27-4
bb3a4b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
bb3a4b
bb3a4b
* Thu Jun 29 2017 Owen Taylor <otaylor@redhat.com> - 27-3
bb3a4b
- Make not noarch - the contents of /etc/ld.so.conf.d/app.conf
bb3a4b
  depend on 64-bit vs. 32-bit
bb3a4b
- Rename fontconfig conf file from 'xdg-app' to 'flatpak'
bb3a4b
bb3a4b
* Tue Jun 13 2017 Owen Taylor <otaylor@redhat.com> - 27-2
bb3a4b
See https://bugzilla.redhat.com/show_bug.cgi?id=1460081
bb3a4b
- Switch license to MIT
bb3a4b
- Preserve timestamps on file installation
bb3a4b
- Own /usr/cache since it's not a standard directory
bb3a4b
- Require fontpackages-filesystem for /etc/fonts/conf.d
bb3a4b
bb3a4b
* Wed Jun  7 2017 Owen Taylor <otaylor@redhat.com> - 27-1
bb3a4b
- Strip down to just config files
bb3a4b
bb3a4b
* Wed Jun  3 2015 Alexander Larsson <alexl@redhat.com>
bb3a4b
- Initial version