From b07652eb421515ec61e95e64a06221be4fa46ff2 Mon Sep 17 00:00:00 2001 From: eabdullin Date: Mon, 21 Feb 2022 14:09:27 +0300 Subject: [PATCH] change build section --- SPECS/libguestfs.spec | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/SPECS/libguestfs.spec b/SPECS/libguestfs.spec index 6788f2f..e62154e 100644 --- a/SPECS/libguestfs.spec +++ b/SPECS/libguestfs.spec @@ -762,20 +762,10 @@ sed 's/@VERSION@/%{version}/g' < %{SOURCE4} > README # Test if network is available. ip addr list ||: ip route list ||: -if ping -c 3 -w 20 8.8.8.8 && wget http://libguestfs.org -O /dev/null; then - # AlmaLinux: avoid permission denied for yum/dnf cache - mkdir cachedir - sed -e "s|/var/cache/yum|$(pwd)/cachedir|" -e "s|/var/cache/dnf|$(pwd)/cachedir|" /etc/dnf/dnf.conf > yum.conf - extra=--with-supermin-packager-config=$(pwd)/yum.conf -else - mkdir cachedir repo - # -n 1 because of RHBZ#980502. - find /var/cache/{dnf,yum} -type f -name '*.rpm' -print0 | \ - xargs -0 -n 1 cp -t repo - createrepo_c repo - sed -e "s|@PWD@|$(pwd)|" %{SOURCE6} > yum.conf - extra=--with-supermin-packager-config=$(pwd)/yum.conf -fi +# AlmaLinux: avoid permission denied for yum/dnf cache +mkdir cachedir +sed -e "s|/var/cache/yum|$(pwd)/cachedir|" -e "s|/var/cache/dnf|$(pwd)/cachedir|" /etc/dnf/dnf.conf > yum.conf +extra=--with-supermin-packager-config=$(pwd)/yum.conf %{configure} \ %if 0%{?rhel} && !0%{?eln}