AlmaLinux changes

This commit is contained in:
eabdullin 2022-04-12 12:24:42 +03:00
commit 04b02e6c97
14 changed files with 74 additions and 22 deletions

View File

@ -35,5 +35,5 @@ index 557f32833..652bacc0f 100644
| "rhel" -> Some DISTRO_RHEL
| "sles" | "sled" -> Some DISTRO_SLES
--
2.19.1.3.g30247aa5d201
2.31.1

View File

@ -96,5 +96,5 @@ index 690afd460..0c6d39b43 100644
Linux Mint.
--
2.19.1.3.g30247aa5d201
2.31.1

View File

@ -205,5 +205,5 @@ index db38d87f7..90e57e6df 100644
if (major >= 4)
return safe_asprintf (g, "%s%d", distro, major);
--
2.19.1.3.g30247aa5d201
2.31.1

View File

@ -66,5 +66,5 @@ index 9e8336938..266d88824 100644
start_element ("qemu:arg") {
--
2.19.1.3.g30247aa5d201
2.31.1

View File

@ -87,5 +87,5 @@ index 266d88824..cc714c02e 100644
attribute ("value", "-netdev");
} end_element ();
--
2.19.1.3.g30247aa5d201
2.31.1

View File

@ -51,5 +51,5 @@ index 690e09b5e..919e2f248 100644
daemon/test-daemon-start.pl \
daemon/test-btrfs.pl
--
2.19.1.3.g30247aa5d201
2.31.1

View File

@ -325,5 +325,5 @@ index 919e2f248..e3613fec4 100644
SLOW_TESTS += bigdirs/test-big-dirs.pl
--
2.19.1.3.g30247aa5d201
2.31.1

View File

@ -605,5 +605,5 @@ index 12937fb30..b3e4f9903 100755
-grep -sq -- '-drive file=ssh://rich@example.com/disk.img,' "$DEBUG_QEMU_FILE" || fail
-rm "$DEBUG_QEMU_FILE"
--
2.19.1.3.g30247aa5d201
2.31.1

View File

@ -68,5 +68,5 @@ index 5aec50a57..8b9fcd770 100644
static int
shutdown_uml (guestfs_h *g, void *datav, int check_for_errors)
--
2.19.1.3.g30247aa5d201
2.31.1

View File

@ -65,5 +65,5 @@ index 105291dc3..5ca4f3b6d 100644
exit (EXIT_FAILURE);
--
2.19.1.3.g30247aa5d201
2.31.1

View File

@ -28,5 +28,5 @@ index 7076821d2..fe6497b4d 100755
# Set up kmod static-nodes (RHBZ#1011907).
--
2.19.1.3.g30247aa5d201
2.31.1

View File

@ -0,0 +1,47 @@
From 46c0694ce0b9a2fe357403c998d30ec807e07015 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Tue, 15 Mar 2022 10:22:49 +0000
Subject: [PATCH] daemon/rpm-c.c: Disable signature checking in librpm
Older distros (eg CentOS 6) used SHA-1 RPM package signatures which
some newer distros (eg RHEL 9.0) prevent us from verifying.
This resulted in packages with SHA-1 signatures being skipped by
librpm (there is a warning in debug output, but if you're not looking
at that then the package is silently ignored). In some cases
essential packages like the kernel were skipped, which would be
visible as a failure of virt-v2v. In other cases (eg virt-inspector)
you'd just see fewer installed packages in the <applications> list.
Since verifying package signatures is not essential for inspection,
disable this feature in librpm.
Reported-by: Xiaodai Wang
Thanks: Panu Matilainen
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2064182
Signed-off-by: Richard W.M. Jones <rjones@redhat.com>
(cherry picked from commit aa6f8038f826bfb37ddbbb575e6962e1e181c5e8)
---
daemon/rpm-c.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/daemon/rpm-c.c b/daemon/rpm-c.c
index be0e81e22..020fc588e 100644
--- a/daemon/rpm-c.c
+++ b/daemon/rpm-c.c
@@ -90,7 +90,12 @@ value
guestfs_int_daemon_rpm_start_iterator (value unitv)
{
CAMLparam1 (unitv);
+
ts = rpmtsCreate ();
+
+ /* Disable signature checking (RHBZ#2064182). */
+ rpmtsSetVSFlags (ts, rpmtsVSFlags (ts) | RPMVSF_MASK_NOSIGNATURES);
+
iter = rpmtsInitIterator (ts, RPMDBI_PACKAGES, NULL, 0);
CAMLreturn (Val_unit);
}
--
2.31.1

View File

@ -58,7 +58,7 @@ Summary: Access and modify virtual machine disk images
Name: libguestfs
Epoch: 1
Version: 1.46.1
Release: 2%{?dist}
Release: 3%{?dist}
License: LGPLv2+
# Build only for architectures that have a kernel
@ -96,18 +96,19 @@ Source8: copy-patches.sh
# https://github.com/libguestfs/libguestfs/commits/rhel-9.0.0
# Patches.
Patch0001: 0001-daemon-inspect_fs_unix-recognize-modern-Pardus-GNU-Linux-releases.patch
Patch0001: 0001-daemon-inspect_fs_unix-recognize-modern-Pardus-GNU-L.patch
Patch0002: 0002-daemon-inspection-Add-support-for-Kylin-RHBZ-1995391.patch
Patch0003: 0003-Add-detection-support-for-Rocky-Linux-CentOS-RHEL-like.patch
Patch0004: 0004-launch-libvirt-place-our-virtio-net-pci-device-in-slot-0x1e.patch
Patch0005: 0005-lib-extract-NETWORK_ADDRESS-and-NETWORK_PREFIX-as-macros.patch
Patch0006: 0006-launch-libvirt-add-virtio-net-via-the-standard-interface-element.patch
Patch0003: 0003-Add-detection-support-for-Rocky-Linux-CentOS-RHEL-li.patch
Patch0004: 0004-launch-libvirt-place-our-virtio-net-pci-device-in-sl.patch
Patch0005: 0005-lib-extract-NETWORK_ADDRESS-and-NETWORK_PREFIX-as-ma.patch
Patch0006: 0006-launch-libvirt-add-virtio-net-via-the-standard-inter.patch
Patch0007: 0007-RHEL-Remove-libguestfs-live-RHBZ-798980.patch
Patch0008: 0008-RHEL-Remove-9p-APIs-from-RHEL-RHBZ-921710.patch
Patch0009: 0009-RHEL-Disable-unsupported-remote-drive-protocols-RHBZ-962113.patch
Patch0009: 0009-RHEL-Disable-unsupported-remote-drive-protocols-RHBZ.patch
Patch0010: 0010-RHEL-Remove-User-Mode-Linux-RHBZ-1144197.patch
Patch0011: 0011-RHEL-Reject-use-of-libguestfs-winsupport-features-except-for-virt-tools-RHBZ-1240276.patch
Patch0012: 0012-RHEL-Create-etc-crypto-policies-back-ends-opensslcnf.config.patch
Patch0011: 0011-RHEL-Reject-use-of-libguestfs-winsupport-features-ex.patch
Patch0012: 0012-RHEL-Create-etc-crypto-policies-back-ends-opensslcnf.patch
Patch0013: 0013-daemon-rpm-c.c-Disable-signature-checking-in-librpm.patch
%if 0%{patches_touch_autotools}
BuildRequires: autoconf, automake, libtool, gettext-devel
@ -1140,10 +1141,14 @@ rm ocaml/html/.gitignore
%changelog
* Mon Feb 21 2022 Edaurd Abdullin <eabdullin@almalinux.org> - 1:1.46.1-2.alma
* Tue Apr 12 2022 Edaurd Abdullin <eabdullin@almalinux.org> - 1:1.46.1-3.alma
- Fix build for AlmaLinux
- Avoid permission denied for yum/dnf cache
* Thu Mar 17 2022 Richard W.M. Jones <rjones@redhat.com> - 1:1.46.1-3
- Disable signature checking in librpm
resolves: rhbz#2064182
* Thu Dec 23 2021 Laszlo Ersek <lersek@redhat.com> - 1:1.46.1-2
- Add detection support for Rocky Linux
resolves: rhbz#2030709