%global selinux_variants mls targeted %global selinux_policyver %(%{__sed} -e 's,.*selinux-policy-\\([^/]*\\)/.*,\\1,' /usr/share/selinux/devel/policyhelp || echo 0.0.0) %global modulename flatpak-timeout-fix Name: flatpak-timeout-fix Version: 2 Release: %autorelease Summary: A .pp file to fix Flatpak on SELinux License: GPL v3 URL: https://github.com/risiOS/risiOS-meta BuildRequires: checkpolicy, selinux-policy-devel, hardlink %if "%{selinux_policyver}" != "" Requires: selinux-policy >= %{selinux_policyver} %endif Requires(post): /usr/sbin/semodule, /sbin/fixfiles, flatpak Requires(postun): /usr/sbin/semodule %description Fixes an issue where SELinux will not allow Flatpak to install a package. %prep mkdir SELinux %build cd SELinux cat > flatpak-timeout-fix.te < /dev/null || : done %postun if [ $1 -eq 0 ] ; then for selinuxvariant in %{selinux_variants} do /usr/sbin/semodule -s ${selinuxvariant} -r %{modulename} &> /dev/null || : done fi %files %defattr(-,root,root,0755) %{_datadir}/selinux/*/%{modulename}.pp %changelog * Mon Jul 31 2006 John Doe 0.01-1 - Initial version