Fix symlink replacement of virt-builder directory (RHBZ#1943838).

This commit is contained in:
Richard W.M. Jones 2021-03-29 08:59:42 +01:00
parent 4084f310d4
commit 2fb9953153
1 changed files with 16 additions and 2 deletions

View File

@ -26,7 +26,7 @@
Summary: Tools to access and modify virtual machine disk images
Name: guestfs-tools
Version: 1.45.2
Release: 5%{?dist}
Release: 6%{?dist}
License: GPLv2+
# Build only for architectures that have a kernel
@ -312,11 +312,22 @@ find $RPM_BUILD_ROOT -name '*.la' -delete
mv $RPM_BUILD_ROOT%{_docdir}/%{name} installed-docs
gzip --best installed-docs/*.xml
# Find locale files.
%find_lang %{name}
# Fix upgrades from old libguestfs-tools-c package
# which had /etc/virt-builder -> xdg/virt-builder.
# https://docs.fedoraproject.org/en-US/packaging-guidelines/Directory_Replacement/
# This can be removed in Fedora > 36.
%pretrans -p <lua>
path = "/etc/virt-builder"
st = posix.stat(path)
if st and st.type == "link" then
os.remove(path)
end
%files -f %{name}.lang
%license COPYING
%doc README
@ -397,6 +408,9 @@ gzip --best installed-docs/*.xml
%changelog
* Mon Mar 29 2021 Richard W.M. Jones <rjones@redhat.com> - 1.45.2-6
- Fix symlink replacement of virt-builder directory (RHBZ#1943838).
* Fri Mar 26 2021 Richard W.M. Jones <rjones@redhat.com> - 1.45.2-5
- Skip test-virt-resize.pl that takes too long to run.