Blame flatpak-runtime-config.spec

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