From c275c4121e8bbd0d2e6a5b7a93a1033d975637cb Mon Sep 17 00:00:00 2001 From: Bojan Smojver Date: Fri, 3 May 2019 09:28:24 +1000 Subject: [PATCH] Hardlink moved to util-linux in f31, try to compensate. --- xrdp.spec | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/xrdp.spec b/xrdp.spec index f8c5e58..3cf6615 100644 --- a/xrdp.spec +++ b/xrdp.spec @@ -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}