diff --git a/flatpak.spec b/flatpak.spec index 6a9e75d..44eb4ed 100644 --- a/flatpak.spec +++ b/flatpak.spec @@ -3,14 +3,17 @@ Name: flatpak Version: 1.12.4 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Application deployment framework for desktop apps License: LGPLv2+ URL: http://flatpak.org/ Source0: https://github.com/flatpak/flatpak/releases/download/%{version}/%{name}-%{version}.tar.xz + +%if 0%{?fedora} # Add Fedora flatpak repositories Source1: flatpak-add-fedora-repos.service +%endif # https://bugzilla.redhat.com/show_bug.cgi?id=1935508 Patch0: flatpak-dir-Use-SHA256-not-SHA1-to-name-the-cache-for-a-filt.patch @@ -44,8 +47,6 @@ BuildRequires: /usr/bin/xdg-dbus-proxy BuildRequires: /usr/bin/xmlto BuildRequires: /usr/bin/xsltproc -%{?systemd_requires} - Requires: bubblewrap >= %{bubblewrap_version} Requires: librsvg2%{?_isa} Requires: ostree-libs%{?_isa} >= %{ostree_version} @@ -151,8 +152,12 @@ install -pm 644 NEWS README.md %{buildroot}/%{_pkgdocdir} # The system repo is not installed by the flatpak build system. install -d %{buildroot}%{_localstatedir}/lib/flatpak install -d %{buildroot}%{_sysconfdir}/flatpak/remotes.d -install -D -t %{buildroot}%{_unitdir} %{SOURCE1} rm -f %{buildroot}%{_libdir}/libflatpak.la + +%if 0%{?fedora} +install -D -t %{buildroot}%{_unitdir} %{SOURCE1} +%endif + %find_lang %{name} # Work around selinux denials, see @@ -169,27 +174,27 @@ getent passwd flatpak >/dev/null || \ exit 0 +%if 0%{?fedora} %post %systemd_post flatpak-add-fedora-repos.service +%endif -if [ $1 -gt 1 ] ; then - # Apply the preset also on package updates to support F29->F31 upgrade - # path. systemd_post macro only handles initial installs and not the - # case when a new .service file appears on a package update. - # Should be fine to drop in F32. - systemctl --no-reload preset flatpak-add-fedora-repos.service >/dev/null 2>&1 || : -fi %post selinux %selinux_modules_install %{_datadir}/selinux/packages/flatpak.pp.bz2 +%if 0%{?fedora} %preun %systemd_preun flatpak-add-fedora-repos.service +%endif +%if 0%{?fedora} %postun %systemd_postun_with_restart flatpak-add-fedora-repos.service +%endif + %postun selinux if [ $1 -eq 0 ]; then @@ -232,12 +237,15 @@ fi %{_sysconfdir}/flatpak/remotes.d %{_sysconfdir}/profile.d/flatpak.sh %{_sysusersdir}/flatpak.conf -%{_unitdir}/flatpak-add-fedora-repos.service %{_unitdir}/flatpak-system-helper.service %{_userunitdir}/flatpak-oci-authenticator.service %{_userunitdir}/flatpak-portal.service %{_systemd_user_env_generator_dir}/60-flatpak +%if 0%{?fedora} +%{_unitdir}/flatpak-add-fedora-repos.service +%endif + %files devel %{_datadir}/gir-1.0/Flatpak-1.0.gir %{_datadir}/gtk-doc/ @@ -267,6 +275,11 @@ fi %changelog +* Tue Feb 08 2022 Debarshi Ray - 1.12.4-2 +- Don't try to add Fedora's OCI Flatpak repository on RHEL +- Remove an obsolete Fedora-specific update path +Resolves: #2051697 + * Mon Feb 07 2022 Neal Gompa - 1.12.4-1 - Rebase to 1.12.4 Resolves: #2050302