Hardlink moved to util-linux in f31, try to compensate.

This commit is contained in:
Bojan Smojver 2019-05-03 09:28:24 +10:00
parent 8186788b24
commit c275c4121e

View File

@ -3,6 +3,12 @@
%global selinux_types %(%{__awk} '/^#[[:space:]]*SELINUXTYPE=/,/^[^#]/ { if ($3 == "-") printf "%s ", $2 }' /etc/selinux/config 2>/dev/null)
%global selinux_variants %([ -z "%{selinux_types}" ] && echo mls targeted || echo %{selinux_types})
%if 0%{?fedora} >= 31
%global _hardlink /usr/bin/hardlink
%else
%global _hardlink /usr/sbin/hardlink
%endif
Summary: Open source remote desktop protocol (RDP) server
Name: xrdp
Epoch: 1
@ -37,7 +43,7 @@ BuildRequires: pkgconfig(systemd)
BuildRequires: nasm
BuildRequires: checkpolicy, selinux-policy-devel
BuildRequires: hardlink
BuildRequires: %{_hardlink}
# tigervnc-server-minimal provides Xvnc (default for now)
Requires: tigervnc-server-minimal
@ -132,7 +138,7 @@ do
%{__install} -p -m 644 SELinux/%{name}.pp.${selinuxvariant} \
%{buildroot}%{_datadir}/selinux/${selinuxvariant}/%{name}.pp
done
/usr/sbin/hardlink -cv %{buildroot}%{_datadir}/selinux
%{_hardlink} -cv %{buildroot}%{_datadir}/selinux
%post
%{?ldconfig}