Fix build for AlmaLinux
Avoid permission denied for yum/dnf cache
This commit is contained in:
parent
197cfad5ef
commit
0a7fc66d23
@ -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 <eabdullin@almalinux.org> - 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 <rjones@redhat.com> - 1:1.50.2-2
|
||||
- Add new APIs to allow command output > 4MB
|
||||
resolves: RHEL-81095
|
||||
|
Loading…
Reference in New Issue
Block a user