From 0a7fc66d23020a85f9f89fd9ee4b949add8a9e06 Mon Sep 17 00:00:00 2001 From: Eduard Abdullin Date: Wed, 19 Mar 2025 15:08:05 +0300 Subject: [PATCH] Fix build for AlmaLinux Avoid permission denied for yum/dnf cache --- SPECS/libguestfs.spec | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/SPECS/libguestfs.spec b/SPECS/libguestfs.spec index 3af2ba9..e3f418e 100644 --- a/SPECS/libguestfs.spec +++ b/SPECS/libguestfs.spec @@ -45,7 +45,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.50.2 -Release: 2%{?dist} +Release: 2%{?dist}.alma.1 License: LGPLv2+ # Build only for architectures that have a kernel @@ -765,17 +765,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 - extra= -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} @@ -1146,6 +1139,10 @@ rm ocaml/html/.gitignore %changelog +* Wed Mar 19 2025 Eduard Abdullin - 1:1.50.2-2.alma.1 +- Fix build for AlmaLinux +- Avoid permission denied for yum/dnf cache + * Thu Feb 27 2025 Richard W.M. Jones - 1:1.50.2-2 - Add new APIs to allow command output > 4MB resolves: RHEL-81095