From 1ece9134032e95921cbadec8e9d22d2e270d9bbe Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Wed, 11 Nov 2020 21:22:08 +0100 Subject: [PATCH 001/243] simplify using sed -i --- libguestfs.spec | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index 7f095d6..e7ffe81 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -907,8 +907,7 @@ popd # On all known architectures, depending on 'kernel' should # mean "we need a kernel". pushd $RPM_BUILD_ROOT%{_libdir}/guestfs/supermin.d -sed 's/^kernel-.*/kernel/' < packages > packages-t -mv packages-t packages +sed -i 's/^kernel-.*/kernel/' packages popd # Guestfish colour prompts. From a759a6527ca5a36f597fca3358a927177244aed1 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 1 Dec 2020 17:20:11 +0000 Subject: [PATCH 002/243] New upstream version 1.43.3. --- libguestfs.spec | 5 ++++- sources | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index e7ffe81..b776d85 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -44,7 +44,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 -Version: 1.43.2 +Version: 1.43.3 Release: 1%{?dist} License: LGPLv2+ @@ -1184,6 +1184,9 @@ rm ocaml/html/.gitignore %changelog +* Tue Dec 01 2020 Richard W.M. Jones - 1:1.43.3-1 +- New upstream version 1.43.3. + * Mon Sep 21 2020 Richard W.M. Jones - 1:1.43.2-1 - New upstream version 1.43.2. - Replace libvirt-daemon-qemu with libvirt-daemon-kvm. diff --git a/sources b/sources index e115167..90eb57f 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (libguestfs-1.43.2.tar.gz) = a78ec3ce5a4851ff403cc1247082f0e0f847133733e6de7f181dc1a5069a4885d4091fc1ea26b06b2cab8b7e0ce5b4ffd2f4f02466fdf7139656e7b59fc6541b -SHA512 (libguestfs-1.43.2.tar.gz.sig) = e46925c1f21750f0cb9a3a95390fccab38defb825cb004b36395fa17d6994fefcf64ba0bfc62dbc34a420b176319d9da6361b7ffeb4c070d62ffe3a8568d5d08 +SHA512 (libguestfs-1.43.3.tar.gz) = 9c9dd5b47eb010482a8ffed7b76279f5c330d5783d34664442547e3a25b12859f625a6079dd23c9cac60ed55bebd57f3f2914e2e6138d56ecb4484a7742da22a +SHA512 (libguestfs-1.43.3.tar.gz.sig) = 13fb818b9eb2d75a520f39297a070e7e1a1e70dff159594b4681e11304559a053c524393d06287a3695b3b5e65a2e1f695bfd347a5dc5b4f70def4a9da0dbc8a From a21163696697f0d3b66c1c440e2b2f5ecb49c7c4 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 1 Dec 2020 19:07:38 +0000 Subject: [PATCH 003/243] Disable LTO because of memory running out on ARMv7. https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/Y3WTAS3MJ5WNNVVYPXARFXV6A6QH6KEY/ --- libguestfs.spec | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index b776d85..d2fa057 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -1,3 +1,7 @@ +# Disable LTO because: +# https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/Y3WTAS3MJ5WNNVVYPXARFXV6A6QH6KEY/ +%define _lto_cflags %{nil} + # Architectures on which golang works. #% global golang_arches aarch64 % {arm} % {ix86} x86_64 # In theory the above, in practice golang is so often broken that @@ -45,7 +49,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.43.3 -Release: 1%{?dist} +Release: 2%{?dist} License: LGPLv2+ # Build only for architectures that have a kernel @@ -1184,8 +1188,9 @@ rm ocaml/html/.gitignore %changelog -* Tue Dec 01 2020 Richard W.M. Jones - 1:1.43.3-1 +* Tue Dec 01 2020 Richard W.M. Jones - 1:1.43.3-2 - New upstream version 1.43.3. +- Disable LTO because of memory running out on ARMv7. * Mon Sep 21 2020 Richard W.M. Jones - 1:1.43.2-1 - New upstream version 1.43.2. From 99c563d97c54458acae29dfb906c5fb7a22ec145 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 2 Dec 2020 12:57:18 +0000 Subject: [PATCH 004/243] Miscellanous cleanups. - Remove obsolete "bump-and-build.sh" script. - Bring the README replacement file up to date. - Add copy-patches script from RHEL. --- README-replacement.in | 15 ++++++------ bump-and-build.sh | 10 -------- copy-patches.sh | 56 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 63 insertions(+), 18 deletions(-) delete mode 100755 bump-and-build.sh create mode 100755 copy-patches.sh diff --git a/README-replacement.in b/README-replacement.in index 6392cb4..388dc34 100644 --- a/README-replacement.in +++ b/README-replacement.in @@ -8,8 +8,7 @@ list: http://www.redhat.com/mailman/listinfo/libguestfs -This Fedora package comes with a lot of help and examples to get you -started. +This package comes with a lot of help and examples to get you started. The first place to start are the manual pages. Type: @@ -20,19 +19,19 @@ The first place to start are the manual pages. Type: man virt-cat # and other virt-* tools If you install the libguestfs-devel package, then in the -/usr/share/doc/libguestfs-devel/ directory you will also -find: +/usr/share/doc/libguestfs-devel/ directory you will find other +documentation including: - BUGS: list of open bugs in this version - - ChangeLog: the detailed list of changes in this version + - ChangeLog.gz: the detailed list of changes in this version - - ROADMAP: the roadmap for future versions + - HACKING: how to extend libguestfs - TODO: ideas for extending libguestfs - *.c: example C programs using the API - - *.xml: example virt-inspector output + - *.xml.gz: example virt-inspector output (compressed) - - *.rng: virt-inspector RelaxNG schema + - virt-inspector.rng: virt-inspector RelaxNG schema diff --git a/bump-and-build.sh b/bump-and-build.sh deleted file mode 100755 index 975db37..0000000 --- a/bump-and-build.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh - - -set -e - -rpmdev-bumpspec -c "- Bump and rebuild." libguestfs.spec -git diff ||: -echo "Press ENTER to commit, push and rebuild." -read line -fedpkg commit -m "Bump and rebuild." -p -fedpkg build diff --git a/copy-patches.sh b/copy-patches.sh new file mode 100755 index 0000000..46b1f33 --- /dev/null +++ b/copy-patches.sh @@ -0,0 +1,56 @@ +#!/bin/bash - + +set -e + +# Maintainer script to copy patches from the git repo to the current +# directory. It's normally only used downstream (ie. in RHEL). Use +# it like this: +# ./copy-patches.sh + +rhel_version=9.0.0 + +# Check we're in the right directory. +if [ ! -f libguestfs.spec ]; then + echo "$0: run this from the directory containing 'libguestfs.spec'" + exit 1 +fi + +git_checkout=$HOME/d/libguestfs-rhel-$rhel_version +if [ ! -d $git_checkout ]; then + echo "$0: $git_checkout does not exist" + echo "This script is only for use by the maintainer when preparing a" + echo "libguestfs release on RHEL." + exit 1 +fi + +# Get the base version of libguestfs. +version=`grep '^Version:' libguestfs.spec | awk '{print $2}'` +tag="v$version" + +# Remove any existing patches. +git rm -f [0-9]*.patch ||: +rm -f [0-9]*.patch + +# Get the patches. +(cd $git_checkout; rm -f [0-9]*.patch; git format-patch -N --submodule=diff $tag) +mv $git_checkout/[0-9]*.patch . + +# Remove any not to be applied. +rm -f *NOT-FOR-RPM*.patch + +# Add the patches. +git add [0-9]*.patch + +# Print out the patch lines. +echo +echo "--- Copy the following text into libguestfs.spec file" +echo + +echo "# Patches." +for f in [0-9]*.patch; do + n=`echo $f | awk -F- '{print $1}'` + echo "Patch$n: $f" +done + +echo +echo "--- End of text" From cfa88f9c571cac315cdeddad11f0a93f7689ba41 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 2 Dec 2020 15:24:17 +0000 Subject: [PATCH 005/243] Unify Fedora and RHEL spec files. --- libguestfs.spec | 228 +++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 206 insertions(+), 22 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index d2fa057..2e01737 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -49,7 +49,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.43.3 -Release: 2%{?dist} +Release: 3%{?dist} License: LGPLv2+ # Build only for architectures that have a kernel @@ -62,7 +62,7 @@ Source0: http://libguestfs.org/download/%{source_directory}/%{name}-%{vers Source1: http://libguestfs.org/download/%{source_directory}/%{name}-%{version}.tar.gz.sig %endif -# Replacement README file for Fedora users. +# Replacement README file. Source4: README-replacement.in # Guestfish colour prompts. @@ -76,16 +76,20 @@ Source6: yum.conf.in Source7: libguestfs.keyring %endif +# Maintainer script which helps with handling patches. +Source8: copy-patches.sh + %if 0%{patches_touch_autotools} BuildRequires: autoconf, automake, libtool, gettext-devel %endif # Basic build requirements for the library and virt tools. BuildRequires: gcc, gcc-c++ +BuildRequires: make BuildRequires: rpcgen BuildRequires: libtirpc-devel BuildRequires: supermin-devel >= 5.1.18 -BuildRequires: hivex-devel >= 1.2.7-7 +BuildRequires: hivex-devel >= 1.3.10 BuildRequires: ocaml-hivex-devel BuildRequires: perl(Pod::Simple) BuildRequires: perl(Pod::Man) @@ -95,7 +99,7 @@ BuildRequires: augeas-devel >= 1.7.0 BuildRequires: readline-devel BuildRequires: genisoimage BuildRequires: libxml2-devel -BuildRequires: createrepo +BuildRequires: createrepo_c BuildRequires: glibc-static BuildRequires: libselinux-utils BuildRequires: libselinux-devel @@ -110,16 +114,22 @@ BuildRequires: libdb-utils BuildRequires: cpio BuildRequires: libconfig-devel BuildRequires: xz-devel +%if !0%{?rhel} BuildRequires: zip BuildRequires: unzip +%endif BuildRequires: systemd-units BuildRequires: netpbm-progs BuildRequires: icoutils -BuildRequires: libvirt-daemon-kvm +BuildRequires: libvirt-daemon-kvm >= 5.3.0 +%if !0%{?rhel} BuildRequires: perl(Expect) +%endif BuildRequires: libacl-devel BuildRequires: libcap-devel +%if !0%{?rhel} BuildRequires: libldm-devel +%endif BuildRequires: jansson-devel BuildRequires: systemd-devel BuildRequires: bash-completion @@ -130,6 +140,7 @@ BuildRequires: xz BuildRequires: /usr/bin/qemu-img BuildRequires: perl(Win::Hivex) BuildRequires: perl(Win::Hivex::Regedit) + %if 0%{verify_tarball_signature} BuildRequires: gnupg2 %endif @@ -140,7 +151,6 @@ BuildRequires: ocaml-ocamldoc BuildRequires: ocaml-findlib-devel BuildRequires: ocaml-gettext-devel BuildRequires: ocaml-ounit-devel -BuildRequires: ocaml-libvirt-devel >= 0.6.1.4-5 BuildRequires: lua BuildRequires: lua-devel BuildRequires: perl-devel @@ -154,7 +164,7 @@ BuildRequires: perl(Module::Build) BuildRequires: perl(ExtUtils::CBuilder) BuildRequires: perl(Locale::TextDomain) BuildRequires: python3-devel -BuildRequires: libvirt-python3 +BuildRequires: python3-libvirt BuildRequires: ruby-devel BuildRequires: rubygem-rake # json is not pulled in automatically, see RHBZ#1325022 @@ -162,16 +172,16 @@ BuildRequires: rubygem(json) BuildRequires: rubygem(rdoc) BuildRequires: rubygem(test-unit) BuildRequires: ruby-irb +%if !0%{?rhel} BuildRequires: php-devel +%endif BuildRequires: gobject-introspection-devel BuildRequires: gjs +%if !0%{?rhel} BuildRequires: vala +%endif %ifarch %{golang_arches} BuildRequires: golang -# This version is required for aarch64 to be supported by gcc-go. -%ifarch aarch64 -BuildRequires: gcc >= 5.0.0-0.19.fc23 -%endif %endif # Build requirements for the appliance. @@ -180,17 +190,106 @@ BuildRequires: gcc >= 5.0.0-0.19.fc23 # for f in `cat appliance/packagelist`; do echo $f; done | sort -u # However you have to edit the list down to packages which exist in # current Fedora, since supermin ignores non-existent packages. -BuildRequires: acl attr augeas-libs bash binutils btrfs-progs bzip2 coreutils cpio cryptsetup curl debootstrap dhclient diffutils dosfstools e2fsprogs file findutils gawk gdisk genisoimage gfs2-utils grep gzip hivex iproute iputils jfsutils kernel kmod kpartx less libcap libldm libselinux libxml2 lsof lsscsi lvm2 lzop mdadm nilfs-utils openssh-clients parted pciutils pcre policycoreutils procps psmisc qemu-img reiserfs-utils rsync scrub sed sleuthkit squashfs-tools strace systemd tar udev util-linux vim-minimal which xfsprogs xz yajl zerofree + +BuildRequires: acl +BuildRequires: attr +BuildRequires: augeas-libs +BuildRequires: bash +BuildRequires: binutils +%if !0%{?rhel} +BuildRequires: btrfs-progs +%endif +BuildRequires: bzip2 +BuildRequires: coreutils +BuildRequires: cpio +BuildRequires: cryptsetup +BuildRequires: curl +%if !0%{?rhel} +BuildRequires: debootstrap +%endif +BuildRequires: dhclient +BuildRequires: diffutils +BuildRequires: dosfstools +BuildRequires: e2fsprogs +BuildRequires: file +BuildRequires: findutils +BuildRequires: gawk +BuildRequires: gdisk +BuildRequires: genisoimage +BuildRequires: gfs2-utils +BuildRequires: grep +BuildRequires: gzip +%if !0%{?rhel} %ifnarch ppc BuildRequires: hfsplus-tools %endif +%endif +BuildRequires: hivex +BuildRequires: iproute +BuildRequires: iputils +%if !0%{?rhel} +BuildRequires: jfsutils +%endif +BuildRequires: kernel +BuildRequires: kmod +BuildRequires: kpartx +BuildRequires: less +BuildRequires: libcap +%if !0%{?rhel} +BuildRequires: libldm +%endif +BuildRequires: libselinux +BuildRequires: libxml2 +BuildRequires: lsof +BuildRequires: lsscsi +BuildRequires: lvm2 +BuildRequires: lzop +BuildRequires: mdadm +%if !0%{?rhel} +BuildRequires: nilfs-utils +%endif +%if !0%{?rhel} +BuildRequires: ntfs-3g ntfsprogs ntfs-3g-system-compression +%endif +BuildRequires: openssh-clients +BuildRequires: parted +BuildRequires: pciutils +BuildRequires: pcre +BuildRequires: policycoreutils +BuildRequires: procps +BuildRequires: psmisc +BuildRequires: qemu-img +%if !0%{?rhel} +BuildRequires: reiserfs-utils +%endif +BuildRequires: rsync +BuildRequires: scrub +BuildRequires: sed +%if !0%{?rhel} +BuildRequires: sleuthkit +%endif +BuildRequires: squashfs-tools +BuildRequires: strace +%ifarch %{ix86} x86_64 +BuildRequires: syslinux syslinux-extlinux +%endif +BuildRequires: systemd +BuildRequires: tar +BuildRequires: udev +BuildRequires: util-linux +BuildRequires: vim-minimal +BuildRequires: which +BuildRequires: xfsprogs +BuildRequires: xz +BuildRequires: yajl +%if !0%{?rhel} +BuildRequires: zerofree +%endif +%if !0%{?rhel} %ifnarch %{arm} aarch64 s390 s390x riscv64 # http://zfs-fuse.net/issues/94 BuildRequires: zfs-fuse %endif -BuildRequires: ntfs-3g ntfsprogs ntfs-3g-system-compression -%ifarch %{ix86} x86_64 -BuildRequires: syslinux syslinux-extlinux %endif # For building the appliance. @@ -201,7 +300,7 @@ Requires: supermin >= 5.1.18 Requires: augeas-libs%{?_isa} >= 1.7.0 Requires: libacl%{?_isa} Requires: libcap%{?_isa} -Requires: hivex%{?_isa} +Requires: hivex%{?_isa} >= 1.3.10 Requires: pcre%{?_isa} Requires: libselinux%{?_isa} Requires: systemd-libs%{?_isa} @@ -223,12 +322,17 @@ Suggests: qemu-block-gluster Suggests: qemu-block-iscsi Suggests: qemu-block-rbd Suggests: qemu-block-ssh +Recommends: libvirt-daemon-config-network Requires: libvirt-daemon-driver-qemu Requires: libvirt-daemon-driver-secret Recommends: libvirt-daemon-driver-storage-core -Recommends: libvirt-daemon-config-network +Requires: libvirt-daemon-kvm >= 5.3.0 Requires: selinux-policy >= 3.11.1-63 +%ifarch aarch64 +Requires: edk2-aarch64 +%endif + # For UML backend (this backend only works on x86). # UML has been broken upstream (in the kernel) for a while, so don't # include this. Note that uml_utilities also depends on Perl. @@ -239,9 +343,14 @@ Requires: selinux-policy >= 3.11.1-63 # https://fedoraproject.org/wiki/Packaging:No_Bundled_Libraries#Packages_granted_exceptions Provides: bundled(gnulib) -# Someone managed to install libguestfs-winsupport (from RHEL!) on +%if !0%{?rhel} +# Someone managed to install libguestfs-winsupport (from RHEL!) on # Fedora, which breaks everything. Thus: Conflicts: libguestfs-winsupport +%else +Conflicts: libguestfs-winsupport < 7.2 +%endif + %description @@ -258,8 +367,7 @@ guest filesystem that Linux and qemu can, including but not limited to: ext2/3/4, btrfs, FAT and NTFS, LVM, many different disk partition schemes, qcow, qcow2, vmdk. -Libguestfs for Fedora is split into several subpackages. The basic -subpackages are: +Libguestfs is split into several subpackages. The basic subpackages are: libguestfs C library libguestfs-tools virt-* tools, guestfish and guestmount (FUSE) @@ -269,18 +377,28 @@ subpackages are: For enhanced features, install: +%if !0%{?rhel} libguestfs-forensics adds filesystem forensics support +%endif libguestfs-gfs2 adds Global Filesystem (GFS2) support +%if !0%{?rhel} libguestfs-hfsplus adds HFS+ (Mac filesystem) support +%endif libguestfs-inspect-icons adds support for inspecting guest icons +%if !0%{?rhel} libguestfs-jfs adds JFS support libguestfs-nilfs adds NILFS v2 support libguestfs-reiserfs adds ReiserFS support +%endif libguestfs-rescue enhances virt-rescue shell with more tools libguestfs-rsync rsync to/from guest filesystems +%if !0%{?rhel} libguestfs-ufs adds UFS (BSD) support +%endif libguestfs-xfs adds XFS support +%if !0%{?rhel} libguestfs-zfs adds ZFS support +%endif For developers: @@ -295,10 +413,14 @@ Language bindings: lua-guestfs Lua bindings ocaml-libguestfs-devel OCaml bindings perl-Sys-Guestfs Perl bindings +%if !0%{?rhel} php-libguestfs PHP bindings +%endif python3-libguestfs Python 3 bindings ruby-libguestfs Ruby bindings +%if !0%{?rhel} libguestfs-vala Vala language bindings +%endif %package devel @@ -316,6 +438,7 @@ Requires: %{name}-tools-c = %{epoch}:%{version}-%{release} for %{name}. +%if !0%{?rhel} %package forensics Summary: Filesystem forensics support for %{name} License: LGPLv2+ @@ -324,6 +447,7 @@ Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release} %description forensics This adds filesystem forensics support to %{name}. Install it if you want to forensically analyze disk images using The Sleuth Kit. +%endif %package gfs2 @@ -336,6 +460,7 @@ This adds GFS2 support to %{name}. Install it if you want to process disk images containing GFS2. +%if !0%{?rhel} %ifnarch ppc %package hfsplus Summary: HFS+ support for %{name} @@ -346,8 +471,10 @@ Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release} This adds HFS+ support to %{name}. Install it if you want to process disk images containing HFS+ / Mac OS Extended filesystems. %endif +%endif +%if !0%{?rhel} %package jfs Summary: JFS support for %{name} License: LGPLv2+ @@ -356,8 +483,10 @@ Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release} %description jfs This adds JFS support to %{name}. Install it if you want to process disk images containing JFS. +%endif +%if !0%{?rhel} %package nilfs Summary: NILFS support for %{name} License: LGPLv2+ @@ -366,8 +495,10 @@ Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release} %description nilfs This adds NILFS v2 support to %{name}. Install it if you want to process disk images containing NILFS v2. +%endif +%if !0%{?rhel} %package reiserfs Summary: ReiserFS support for %{name} License: LGPLv2+ @@ -376,6 +507,7 @@ Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release} %description reiserfs This adds ReiserFS support to %{name}. Install it if you want to process disk images containing ReiserFS. +%endif %package rescue @@ -398,6 +530,7 @@ This adds rsync support to %{name}. Install it if you want to use rsync to upload or download files into disk images. +%if !0%{?rhel} %package ufs Summary: UFS (BSD) support for %{name} License: LGPLv2+ @@ -406,6 +539,7 @@ Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release} %description ufs This adds UFS support to %{name}. Install it if you want to process disk images containing UFS (BSD filesystems). +%endif %package xfs @@ -418,6 +552,7 @@ This adds XFS support to %{name}. Install it if you want to process disk images containing XFS. +%if !0%{?rhel} %ifnarch %{arm} aarch64 s390 s390x riscv64 %package zfs Summary: ZFS support for %{name} @@ -428,6 +563,7 @@ Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release} This adds ZFS support to %{name}. Install it if you want to process disk images containing ZFS. %endif +%endif %package inspect-icons @@ -464,7 +600,6 @@ Requires: /usr/bin/vi # For virt-builder: Requires: gnupg2 -#Requires: (gnupg or gnupg2) # Fedora packaging rules forbid this Requires: xz #Requires: nbdkit, nbdkit-plugin-xz Requires: curl @@ -658,6 +793,7 @@ Provides: ruby(guestfs) = %{version} ruby-%{name} contains Ruby bindings for %{name}. +%if !0%{?rhel} %package -n php-%{name} Summary: PHP bindings for %{name} Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release} @@ -666,6 +802,7 @@ Requires: php(api) = %{php_core_api} %description -n php-%{name} php-%{name} contains PHP bindings for %{name}. +%endif %package -n lua-guestfs @@ -699,6 +836,7 @@ This package is needed if you want to write software using the GObject bindings. It also contains GObject Introspection information. +%if !0%{?rhel} %package vala Summary: Vala for %{name} Requires: %{name}-devel%{?_isa} = %{epoch}:%{version}-%{release} @@ -707,6 +845,7 @@ Requires: vala %description vala %{name}-vala contains GObject bindings for %{name}. +%endif @@ -780,15 +919,26 @@ else # -n 1 because of RHBZ#980502. find /var/cache/{dnf,yum} -type f -name '*.rpm' -print0 | \ xargs -0 -n 1 cp -t repo - createrepo repo + createrepo_c repo sed -e "s|@PWD@|$(pwd)|" %{SOURCE6} > yum.conf extra=--with-supermin-packager-config=$(pwd)/yum.conf fi %{configure} \ +%if 0%{?rhel} + QEMU=%{_libexecdir}/qemu-kvm \ +%endif PYTHON=%{__python3} \ --with-default-backend=libvirt \ +%if !0%{?rhel} --with-extra="fedora=%{fedora},release=%{release},libvirt" \ +%else + --with-extra="rhel=%{rhel},release=%{release},libvirt" \ +%endif +%if 0%{?rhel} + --with-qemu="qemu-kvm qemu-system-%{_build_arch} qemu" \ + --disable-php \ +%endif %ifnarch %{golang_arches} --disable-golang \ %endif @@ -866,6 +1016,7 @@ gzip --best installed-docs/*.xml # Split up the monolithic packages file in the supermin appliance so # we can install dependencies in subpackages. pushd $RPM_BUILD_ROOT%{_libdir}/guestfs/supermin.d + function move_to { if ! grep -Esq "^$1$" packages; then @@ -876,17 +1027,24 @@ function move_to mv packages-t packages echo "$1" >> "$2" } + move_to curl zz-packages-dib +%if !0%{?rhel} move_to debootstrap zz-packages-dib +%endif move_to kpartx zz-packages-dib move_to qemu-img zz-packages-dib move_to which zz-packages-dib +%if !0%{?rhel} move_to sleuthkit zz-packages-forensics +%endif move_to gfs2-utils zz-packages-gfs2 +%if !0%{?rhel} move_to hfsplus-tools zz-packages-hfsplus move_to jfsutils zz-packages-jfs move_to nilfs-utils zz-packages-nilfs move_to reiserfs-utils zz-packages-reiserfs +%endif move_to iputils zz-packages-rescue move_to lsof zz-packages-rescue move_to openssh-clients zz-packages-rescue @@ -895,13 +1053,18 @@ move_to strace zz-packages-rescue move_to vim-minimal zz-packages-rescue move_to rsync zz-packages-rsync move_to xfsprogs zz-packages-xfs +%if !0%{?rhel} %ifnarch %{arm} aarch64 s390 s390x riscv64 move_to zfs-fuse zz-packages-zfs %endif +%endif +%if !0%{?rhel} # On Fedora you need kernel-modules-extra to be able to mount # UFS (BSD) filesystems. echo "kernel-modules-extra" > zz-packages-ufs +%endif + popd # If there is a bogus dependency on kernel-*, rename it to 'kernel' @@ -959,25 +1122,35 @@ rm ocaml/html/.gitignore %{_libdir}/pkgconfig/libguestfs.pc +%if !0%{?rhel} %files forensics %{_libdir}/guestfs/supermin.d/zz-packages-forensics +%endif %files gfs2 %{_libdir}/guestfs/supermin.d/zz-packages-gfs2 +%if !0%{?rhel} %ifnarch ppc %files hfsplus %{_libdir}/guestfs/supermin.d/zz-packages-hfsplus %endif +%endif +%if !0%{?rhel} %files jfs %{_libdir}/guestfs/supermin.d/zz-packages-jfs +%endif +%if !0%{?rhel} %files nilfs %{_libdir}/guestfs/supermin.d/zz-packages-nilfs +%endif +%if !0%{?rhel} %files reiserfs %{_libdir}/guestfs/supermin.d/zz-packages-reiserfs +%endif %files rsync %{_libdir}/guestfs/supermin.d/zz-packages-rsync @@ -985,16 +1158,20 @@ rm ocaml/html/.gitignore %files rescue %{_libdir}/guestfs/supermin.d/zz-packages-rescue +%if !0%{?rhel} %files ufs %{_libdir}/guestfs/supermin.d/zz-packages-ufs +%endif %files xfs %{_libdir}/guestfs/supermin.d/zz-packages-xfs +%if !0%{?rhel} %ifnarch %{arm} aarch64 s390 s390x riscv64 %files zfs %{_libdir}/guestfs/supermin.d/zz-packages-zfs %endif +%endif %files inspect-icons @@ -1132,11 +1309,13 @@ rm ocaml/html/.gitignore %{_mandir}/man3/guestfs-ruby.3* +%if !0%{?rhel} %files -n php-%{name} %doc php/README-PHP %dir %{_sysconfdir}/php.d %{_sysconfdir}/php.d/guestfs_php.ini %{_libdir}/php/modules/guestfs_php.so +%endif %files -n lua-guestfs @@ -1161,9 +1340,11 @@ rm ocaml/html/.gitignore %{_mandir}/man3/guestfs-gobject.3* +%if !0%{?rhel} %files vala %{_datadir}/vala/vapi/libguestfs-gobject-1.0.deps %{_datadir}/vala/vapi/libguestfs-gobject-1.0.vapi +%endif %ifarch %{golang_arches} @@ -1188,6 +1369,9 @@ rm ocaml/html/.gitignore %changelog +* Wed Dec 02 2020 Richard W.M. Jones - 1:1.43.3-3 +- Unify Fedora and RHEL spec files. + * Tue Dec 01 2020 Richard W.M. Jones - 1:1.43.3-2 - New upstream version 1.43.3. - Disable LTO because of memory running out on ARMv7. From 374f82f47fdc21024a2a1619e20977f17cf1ea8c Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 4 Jan 2021 11:58:56 +0000 Subject: [PATCH 006/243] Drop explicit deps on perl(Sys::Virt) and perl(Win::Hivex). Sys::Virt will be dropped in RHEL. The question was why we have this dependency, since the tools don't actually use Sys::Virt at all. Therefore I dropped it from Fedora too. perl(Win::Hivex) should be picked up by the automatic dep scripts. --- libguestfs.spec | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index 2e01737..e8efd2a 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -49,7 +49,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.43.3 -Release: 3%{?dist} +Release: 4%{?dist} License: LGPLv2+ # Build only for architectures that have a kernel @@ -630,10 +630,6 @@ BuildArch: noarch Requires: %{name} = %{epoch}:%{version}-%{release} Requires: %{name}-tools-c = %{epoch}:%{version}-%{release} -# NB: Only list deps here which are not picked up automatically. -Requires: perl(Sys::Virt) -Requires: perl(Win::Hivex) >= 1.2.7 - %description tools This package contains miscellaneous system administrator command line @@ -1369,6 +1365,9 @@ rm ocaml/html/.gitignore %changelog +* Mon Jan 04 2021 Richard W.M. Jones - 1:1.43.3-4 +- Drop explicit deps on perl(Sys::Virt) and perl(Win::Hivex). + * Wed Dec 02 2020 Richard W.M. Jones - 1:1.43.3-3 - Unify Fedora and RHEL spec files. From 9cc996f10952b96771d02cc2d57483f1e3d161ed Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 5 Jan 2021 15:04:44 +0000 Subject: [PATCH 007/243] New upstream version 1.43.4. --- libguestfs.spec | 7 +++++-- sources | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index e8efd2a..5c4b6b7 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -48,8 +48,8 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 -Version: 1.43.3 -Release: 4%{?dist} +Version: 1.43.4 +Release: 1%{?dist} License: LGPLv2+ # Build only for architectures that have a kernel @@ -1365,6 +1365,9 @@ rm ocaml/html/.gitignore %changelog +* Tue Jan 05 2021 Richard W.M. Jones - 1:1.43.4-1 +- New upstream version 1.43.4. + * Mon Jan 04 2021 Richard W.M. Jones - 1:1.43.3-4 - Drop explicit deps on perl(Sys::Virt) and perl(Win::Hivex). diff --git a/sources b/sources index 90eb57f..1d9aca7 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (libguestfs-1.43.3.tar.gz) = 9c9dd5b47eb010482a8ffed7b76279f5c330d5783d34664442547e3a25b12859f625a6079dd23c9cac60ed55bebd57f3f2914e2e6138d56ecb4484a7742da22a -SHA512 (libguestfs-1.43.3.tar.gz.sig) = 13fb818b9eb2d75a520f39297a070e7e1a1e70dff159594b4681e11304559a053c524393d06287a3695b3b5e65a2e1f695bfd347a5dc5b4f70def4a9da0dbc8a +SHA512 (libguestfs-1.43.4.tar.gz) = 52170e18ad64fd44633af6ee359c32c0b52055c81b98124c5b18bb049aae26d789eaf4883a4983c76c40e5e65fe5e878edf98a81669fdb7c70fe8c20ff1da0a1 +SHA512 (libguestfs-1.43.4.tar.gz.sig) = 43978eff3d8e83084cd2dd768417c91875194d22f9438b0cac570a969772b9be7deec91e9bbf7c54e8408f14b49d7f9f64cda3adba454b006f8e0804655b35c4 From 3b8eaf5cc4f9787ad8c4315268c354423d7366be Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 6 Jan 2021 10:23:00 +0000 Subject: [PATCH 008/243] New upstream stable version 1.44.0. --- libguestfs.spec | 7 +++++-- sources | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index 5c4b6b7..56b4e76 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -37,7 +37,7 @@ %global patches_touch_autotools 1 # The source directory. -%global source_directory 1.43-development +%global source_directory 1.44-stable # Filter perl provides. %{?perl_default_filter} @@ -48,7 +48,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 -Version: 1.43.4 +Version: 1.44.0 Release: 1%{?dist} License: LGPLv2+ @@ -1365,6 +1365,9 @@ rm ocaml/html/.gitignore %changelog +* Wed Jan 06 2021 Richard W.M. Jones - 1:1.44.0-1 +- New upstream stable version 1.44.0. + * Tue Jan 05 2021 Richard W.M. Jones - 1:1.43.4-1 - New upstream version 1.43.4. diff --git a/sources b/sources index 1d9aca7..8064041 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (libguestfs-1.43.4.tar.gz) = 52170e18ad64fd44633af6ee359c32c0b52055c81b98124c5b18bb049aae26d789eaf4883a4983c76c40e5e65fe5e878edf98a81669fdb7c70fe8c20ff1da0a1 -SHA512 (libguestfs-1.43.4.tar.gz.sig) = 43978eff3d8e83084cd2dd768417c91875194d22f9438b0cac570a969772b9be7deec91e9bbf7c54e8408f14b49d7f9f64cda3adba454b006f8e0804655b35c4 +SHA512 (libguestfs-1.44.0.tar.gz) = e5052d6deb130f9bceea06d2d6626162991cb83ffaf0ed9923ff5d8bb67137e565053104d8854d37ea8c871dce2a5ca29507d17357de813a8ac49896f00be103 +SHA512 (libguestfs-1.44.0.tar.gz.sig) = 26cb5b97dbc0d649466668964080220acc28c3fabc565563df0da5472420e61893907b4bedcb9f8977d7df9e867855d7178e4ad097df41dcbcaa98d0c07feac3 From 30d986c2bc5ca9a4df49e481dc69cb932d48ec22 Mon Sep 17 00:00:00 2001 From: Mamoru TASAKA Date: Thu, 7 Jan 2021 10:54:20 +0900 Subject: [PATCH 009/243] F-34: rebuild against ruby 3.0 --- libguestfs.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libguestfs.spec b/libguestfs.spec index 56b4e76..9783ac2 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -49,7 +49,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.44.0 -Release: 1%{?dist} +Release: 2%{?dist} License: LGPLv2+ # Build only for architectures that have a kernel @@ -1365,6 +1365,9 @@ rm ocaml/html/.gitignore %changelog +* Thu Jan 07 2021 Mamoru TASAKA - 1:1.44.0-2 +- F-34: rebuild against ruby 3.0 + * Wed Jan 06 2021 Richard W.M. Jones - 1:1.44.0-1 - New upstream stable version 1.44.0. From 1aa43ac92ef4615efc5d54d6019e1e4080fafd9a Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Tue, 26 Jan 2021 17:13:17 +0000 Subject: [PATCH 010/243] - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- libguestfs.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libguestfs.spec b/libguestfs.spec index 9783ac2..f48cdf9 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -49,7 +49,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.44.0 -Release: 2%{?dist} +Release: 3%{?dist} License: LGPLv2+ # Build only for architectures that have a kernel @@ -1365,6 +1365,9 @@ rm ocaml/html/.gitignore %changelog +* Tue Jan 26 2021 Fedora Release Engineering - 1:1.44.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + * Thu Jan 07 2021 Mamoru TASAKA - 1:1.44.0-2 - F-34: rebuild against ruby 3.0 From 4caba8df2f57471dba2a0a4933faf8746de699ee Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 28 Jan 2021 10:44:54 +0000 Subject: [PATCH 011/243] ELN has full-fat qemu (not qemu-kvm). --- libguestfs.spec | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index f48cdf9..72146aa 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -24,7 +24,8 @@ # s390x: qemu TCG cannot emulate enough to boot the kernel # (however KVM would work if it was available in Koji, so this # is not a bug) -%global test_arches x86_64 +# x86-64: "/lib64/libc.so.6: CPU ISA level is lower than required" +%global test_arches NONE # Trim older changelog entries. # https://lists.fedoraproject.org/pipermail/devel/2013-April/thread.html#181627 @@ -49,7 +50,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.44.0 -Release: 3%{?dist} +Release: 4%{?dist} License: LGPLv2+ # Build only for architectures that have a kernel @@ -921,7 +922,7 @@ else fi %{configure} \ -%if 0%{?rhel} +%if 0%{?rhel} && !0%{?eln} QEMU=%{_libexecdir}/qemu-kvm \ %endif PYTHON=%{__python3} \ @@ -931,7 +932,7 @@ fi %else --with-extra="rhel=%{rhel},release=%{release},libvirt" \ %endif -%if 0%{?rhel} +%if 0%{?rhel} && !0%{?eln} --with-qemu="qemu-kvm qemu-system-%{_build_arch} qemu" \ --disable-php \ %endif @@ -1365,6 +1366,9 @@ rm ocaml/html/.gitignore %changelog +* Thu Jan 28 2021 Richard W.M. Jones - 1:1.44.0-4 +- ELN has full-fat qemu (not qemu-kvm). + * Tue Jan 26 2021 Fedora Release Engineering - 1:1.44.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild From 2f9953e2d14702ec51cd6bdfe077a9c264dedce2 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 28 Jan 2021 11:53:40 +0000 Subject: [PATCH 012/243] Re-enable the tests on Fedora. --- libguestfs.spec | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libguestfs.spec b/libguestfs.spec index 72146aa..b623156 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -24,8 +24,13 @@ # s390x: qemu TCG cannot emulate enough to boot the kernel # (however KVM would work if it was available in Koji, so this # is not a bug) +%if !0%{?rhel} +%global test_arches x86_64 +%else +# RHEL 9 only: # x86-64: "/lib64/libc.so.6: CPU ISA level is lower than required" %global test_arches NONE +%endif # Trim older changelog entries. # https://lists.fedoraproject.org/pipermail/devel/2013-April/thread.html#181627 From 1a5193c66e6e5b0105b5c50fee917d515432b06a Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 28 Jan 2021 13:35:20 +0000 Subject: [PATCH 013/243] Add upstream patch to use -cpu max. --- 0001-appliance-Use-cpu-max.patch | 80 ++++++++++++++++++++++++++++++++ libguestfs.spec | 4 ++ 2 files changed, 84 insertions(+) create mode 100644 0001-appliance-Use-cpu-max.patch diff --git a/0001-appliance-Use-cpu-max.patch b/0001-appliance-Use-cpu-max.patch new file mode 100644 index 0000000..70b482a --- /dev/null +++ b/0001-appliance-Use-cpu-max.patch @@ -0,0 +1,80 @@ +From 282e2f74cf1209ecf6bb18655018b2000a5b36a1 Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Thu, 28 Jan 2021 12:20:49 +0000 +Subject: [PATCH] appliance: Use -cpu max. + +QEMU has a newish feature (from about 2017 / qemu 2.9) called -cpu max +which is supposed to select the best CPU, ideal for libguestfs. + +After this change, on x86-64: + + KVM TCG + +Direct -cpu max -cpu max +(non-libvirt) + +Libvirt + + +--- + lib/appliance-cpu.c | 16 ++++++++-------- + lib/launch-libvirt.c | 9 +++++++++ + 2 files changed, 17 insertions(+), 8 deletions(-) + +diff --git a/lib/appliance-cpu.c b/lib/appliance-cpu.c +index 5ef9f5c72..54ac6e2e3 100644 +--- a/lib/appliance-cpu.c ++++ b/lib/appliance-cpu.c +@@ -38,6 +38,11 @@ + * + * The literal string C<"host"> means use C<-cpu host>. + * ++ * =item C<"max"> ++ * ++ * The literal string C<"max"> means use C<-cpu max> (the best ++ * possible). This requires awkward translation for libvirt. ++ * + * =item some string + * + * Some string such as C<"cortex-a57"> means use C<-cpu cortex-a57>. +@@ -80,14 +85,9 @@ guestfs_int_get_cpu_model (int kvm) + /* See discussion in https://bugzilla.redhat.com/show_bug.cgi?id=1605071 */ + return NULL; + #else +- /* On most architectures, it is faster to pass the CPU host model to +- * the appliance, allowing maximum speed for things like checksums +- * and encryption. Only do this with KVM. It is broken in subtle +- * ways on TCG, and fairly pointless when you're emulating anyway. ++ /* On most architectures we can use "max" to get the best possible CPU. ++ * For recent qemu this should work even on TCG. + */ +- if (kvm) +- return "host"; +- else +- return NULL; ++ return "max"; + #endif + } +diff --git a/lib/launch-libvirt.c b/lib/launch-libvirt.c +index 026dc6b26..eff1c8f7e 100644 +--- a/lib/launch-libvirt.c ++++ b/lib/launch-libvirt.c +@@ -1169,6 +1169,15 @@ construct_libvirt_xml_cpu (guestfs_h *g, + attribute ("fallback", "allow"); + } end_element (); + } ++ else if (STREQ (cpu_model, "max")) { ++ if (params->data->is_kvm) ++ attribute ("mode", "host-passthrough"); ++ else ++ attribute ("mode", "host-model"); ++ start_element ("model") { ++ attribute ("fallback", "allow"); ++ } end_element (); ++ } + else + single_element ("model", cpu_model); + } end_element (); +-- +2.29.0.rc2 + diff --git a/libguestfs.spec b/libguestfs.spec index b623156..fa01289 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -29,6 +29,7 @@ %else # RHEL 9 only: # x86-64: "/lib64/libc.so.6: CPU ISA level is lower than required" +# (RHBZ#1919389) %global test_arches NONE %endif @@ -85,6 +86,9 @@ Source7: libguestfs.keyring # Maintainer script which helps with handling patches. Source8: copy-patches.sh +# Upstream patch to use -cpu max. +Patch1: 0001-appliance-Use-cpu-max.patch + %if 0%{patches_touch_autotools} BuildRequires: autoconf, automake, libtool, gettext-devel %endif From 49700015edd952aa22b5c6fbc7e816c484cbf0c1 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 9 Feb 2021 10:22:55 +0000 Subject: [PATCH 014/243] Remove gfs2-utils dependency in RHEL 9. --- libguestfs.spec | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index fa01289..9fc8f60 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -56,7 +56,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.44.0 -Release: 4%{?dist} +Release: 5%{?dist} License: LGPLv2+ # Build only for architectures that have a kernel @@ -226,7 +226,9 @@ BuildRequires: findutils BuildRequires: gawk BuildRequires: gdisk BuildRequires: genisoimage +%if !0%{?rhel} BuildRequires: gfs2-utils +%endif BuildRequires: grep BuildRequires: gzip %if !0%{?rhel} @@ -389,9 +391,7 @@ For enhanced features, install: %if !0%{?rhel} libguestfs-forensics adds filesystem forensics support -%endif libguestfs-gfs2 adds Global Filesystem (GFS2) support -%if !0%{?rhel} libguestfs-hfsplus adds HFS+ (Mac filesystem) support %endif libguestfs-inspect-icons adds support for inspecting guest icons @@ -460,6 +460,7 @@ want to forensically analyze disk images using The Sleuth Kit. %endif +%if !0%{?rhel} %package gfs2 Summary: GFS2 support for %{name} License: LGPLv2+ @@ -468,6 +469,7 @@ Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release} %description gfs2 This adds GFS2 support to %{name}. Install it if you want to process disk images containing GFS2. +%endif %if !0%{?rhel} @@ -1043,9 +1045,7 @@ move_to qemu-img zz-packages-dib move_to which zz-packages-dib %if !0%{?rhel} move_to sleuthkit zz-packages-forensics -%endif move_to gfs2-utils zz-packages-gfs2 -%if !0%{?rhel} move_to hfsplus-tools zz-packages-hfsplus move_to jfsutils zz-packages-jfs move_to nilfs-utils zz-packages-nilfs @@ -1133,8 +1133,10 @@ rm ocaml/html/.gitignore %{_libdir}/guestfs/supermin.d/zz-packages-forensics %endif +%if !0%{?rhel} %files gfs2 %{_libdir}/guestfs/supermin.d/zz-packages-gfs2 +%endif %if !0%{?rhel} %ifnarch ppc @@ -1375,6 +1377,9 @@ rm ocaml/html/.gitignore %changelog +* Tue Feb 09 2021 Richard W.M. Jones - 1:1.44.0-5 +- Remove gfs2-utils dependency in RHEL 9. + * Thu Jan 28 2021 Richard W.M. Jones - 1:1.44.0-4 - ELN has full-fat qemu (not qemu-kvm). From cbf97ecfadc43105d64ad584a89e8de4341bda82 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 17 Feb 2021 18:21:37 +0000 Subject: [PATCH 015/243] Remove jfsutils (dead upstream since 2011). Remove nilfs (dead upstream since 2015). Remove reiserfs (dead upstream since 2006). --- libguestfs.spec | 75 ++++--------------------------------------------- 1 file changed, 6 insertions(+), 69 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index 9fc8f60..a102fd3 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -56,7 +56,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.44.0 -Release: 5%{?dist} +Release: 6%{?dist} License: LGPLv2+ # Build only for architectures that have a kernel @@ -239,9 +239,6 @@ BuildRequires: hfsplus-tools BuildRequires: hivex BuildRequires: iproute BuildRequires: iputils -%if !0%{?rhel} -BuildRequires: jfsutils -%endif BuildRequires: kernel BuildRequires: kmod BuildRequires: kpartx @@ -258,9 +255,6 @@ BuildRequires: lvm2 BuildRequires: lzop BuildRequires: mdadm %if !0%{?rhel} -BuildRequires: nilfs-utils -%endif -%if !0%{?rhel} BuildRequires: ntfs-3g ntfsprogs ntfs-3g-system-compression %endif BuildRequires: openssh-clients @@ -271,9 +265,6 @@ BuildRequires: policycoreutils BuildRequires: procps BuildRequires: psmisc BuildRequires: qemu-img -%if !0%{?rhel} -BuildRequires: reiserfs-utils -%endif BuildRequires: rsync BuildRequires: scrub BuildRequires: sed @@ -395,11 +386,6 @@ For enhanced features, install: libguestfs-hfsplus adds HFS+ (Mac filesystem) support %endif libguestfs-inspect-icons adds support for inspecting guest icons -%if !0%{?rhel} - libguestfs-jfs adds JFS support - libguestfs-nilfs adds NILFS v2 support - libguestfs-reiserfs adds ReiserFS support -%endif libguestfs-rescue enhances virt-rescue shell with more tools libguestfs-rsync rsync to/from guest filesystems %if !0%{?rhel} @@ -486,42 +472,6 @@ disk images containing HFS+ / Mac OS Extended filesystems. %endif -%if !0%{?rhel} -%package jfs -Summary: JFS support for %{name} -License: LGPLv2+ -Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release} - -%description jfs -This adds JFS support to %{name}. Install it if you want to process -disk images containing JFS. -%endif - - -%if !0%{?rhel} -%package nilfs -Summary: NILFS support for %{name} -License: LGPLv2+ -Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release} - -%description nilfs -This adds NILFS v2 support to %{name}. Install it if you want to process -disk images containing NILFS v2. -%endif - - -%if !0%{?rhel} -%package reiserfs -Summary: ReiserFS support for %{name} -License: LGPLv2+ -Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release} - -%description reiserfs -This adds ReiserFS support to %{name}. Install it if you want to process -disk images containing ReiserFS. -%endif - - %package rescue Summary: Additional tools for virt-rescue License: LGPLv2+ @@ -1047,9 +997,6 @@ move_to which zz-packages-dib move_to sleuthkit zz-packages-forensics move_to gfs2-utils zz-packages-gfs2 move_to hfsplus-tools zz-packages-hfsplus -move_to jfsutils zz-packages-jfs -move_to nilfs-utils zz-packages-nilfs -move_to reiserfs-utils zz-packages-reiserfs %endif move_to iputils zz-packages-rescue move_to lsof zz-packages-rescue @@ -1145,21 +1092,6 @@ rm ocaml/html/.gitignore %endif %endif -%if !0%{?rhel} -%files jfs -%{_libdir}/guestfs/supermin.d/zz-packages-jfs -%endif - -%if !0%{?rhel} -%files nilfs -%{_libdir}/guestfs/supermin.d/zz-packages-nilfs -%endif - -%if !0%{?rhel} -%files reiserfs -%{_libdir}/guestfs/supermin.d/zz-packages-reiserfs -%endif - %files rsync %{_libdir}/guestfs/supermin.d/zz-packages-rsync @@ -1377,6 +1309,11 @@ rm ocaml/html/.gitignore %changelog +* Wed Feb 17 2021 Richard W.M. Jones - 1:1.44.0-6 +- Remove jfsutils (dead upstream since 2011). +- Remove nilfs (dead upstream since 2015). +- Remove reiserfs (dead upstream since 2006). + * Tue Feb 09 2021 Richard W.M. Jones - 1:1.44.0-5 - Remove gfs2-utils dependency in RHEL 9. From 0c9b3562af7ddacdcc32f928f8de6ac3233daf41 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 2 Mar 2021 10:06:31 +0000 Subject: [PATCH 016/243] OCaml 4.12.0 build --- libguestfs.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libguestfs.spec b/libguestfs.spec index a102fd3..ade8cb4 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -56,7 +56,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.44.0 -Release: 6%{?dist} +Release: 7%{?dist} License: LGPLv2+ # Build only for architectures that have a kernel @@ -1309,6 +1309,9 @@ rm ocaml/html/.gitignore %changelog +* Tue Mar 2 10:06:30 GMT 2021 Richard W.M. Jones - 1:1.44.0-7 +- OCaml 4.12.0 build + * Wed Feb 17 2021 Richard W.M. Jones - 1:1.44.0-6 - Remove jfsutils (dead upstream since 2011). - Remove nilfs (dead upstream since 2015). From 7e7de18823385fc90b5a5ef143c1e56b9cb064fb Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 2 Mar 2021 10:47:48 +0000 Subject: [PATCH 017/243] Fixes for OCaml 4.12. --- ...r-Don-t-redefine-Val_none-OCaml-4.12.patch | 35 +++++++++++++++++++ ...tils-std_utils.ml-Fix-for-OCaml-4.12.patch | 35 +++++++++++++++++++ libguestfs.spec | 9 +++-- 3 files changed, 77 insertions(+), 2 deletions(-) create mode 100644 0001-builder-Don-t-redefine-Val_none-OCaml-4.12.patch create mode 100644 0001-mlstdutils-std_utils.ml-Fix-for-OCaml-4.12.patch diff --git a/0001-builder-Don-t-redefine-Val_none-OCaml-4.12.patch b/0001-builder-Don-t-redefine-Val_none-OCaml-4.12.patch new file mode 100644 index 0000000..a61effc --- /dev/null +++ b/0001-builder-Don-t-redefine-Val_none-OCaml-4.12.patch @@ -0,0 +1,35 @@ +From 5f499208cf53ebd3f05525918c213a36c3ca13b5 Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Tue, 2 Mar 2021 10:42:49 +0000 +Subject: [PATCH] builder: Don't redefine Val_none (OCaml 4.12). + + CC virt_builder-setlocale-c.o +setlocale-c.c:38: error: "Val_none" redefined [-Werror] + 38 | #define Val_none (Val_int (0)) + | +In file included from /usr/lib64/ocaml/caml/alloc.h:24, + from setlocale-c.c:23: +/usr/lib64/ocaml/caml/mlvalues.h:395: note: this is the location of the previous definition + 395 | #define Val_none Val_int(0) + | +--- + builder/setlocale-c.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/builder/setlocale-c.c b/builder/setlocale-c.c +index 6d877e7ac..1834c11df 100644 +--- a/builder/setlocale-c.c ++++ b/builder/setlocale-c.c +@@ -35,7 +35,9 @@ static const int lc_string_table[7] = { + LC_MESSAGES + }; + ++#ifndef Val_none + #define Val_none (Val_int (0)) ++#endif + + extern value virt_builder_setlocale (value val_category, value val_name); + +-- +2.29.0.rc2 + diff --git a/0001-mlstdutils-std_utils.ml-Fix-for-OCaml-4.12.patch b/0001-mlstdutils-std_utils.ml-Fix-for-OCaml-4.12.patch new file mode 100644 index 0000000..4a21db6 --- /dev/null +++ b/0001-mlstdutils-std_utils.ml-Fix-for-OCaml-4.12.patch @@ -0,0 +1,35 @@ +From cc4ecbe236914f9b391ecf3815008547472632f8 Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Tue, 2 Mar 2021 10:39:15 +0000 +Subject: [PATCH] mlstdutils/std_utils.ml: Fix for OCaml 4.12. + +We were using a default function from somewhere called "compare" +instead of the actual function (Pervasives.compare / Stdlib.compare). +Since the wrong default function was used it had a different type from +what we expected: + +File "std_utils.ml", line 312, characters 36-37: +312 | | (y, y') :: _ when cmp x y = 0 -> y' + ^ +Error: This expression has type int but an expression was expected of type + 'weak1 list -> int +--- + common/mlstdutils/std_utils.ml | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/common/mlstdutils/std_utils.ml b/common/mlstdutils/std_utils.ml +index 4237ea519..88477179a 100644 +--- a/common/mlstdutils/std_utils.ml ++++ b/common/mlstdutils/std_utils.ml +@@ -307,7 +307,7 @@ module List = struct + | x::xs, y::ys, z::zs -> (x, y, z) :: combine3 xs ys zs + | _ -> invalid_arg "combine3" + +- let rec assoc_lbl ?(cmp = compare) ~default x = function ++ let rec assoc_lbl ?(cmp = Pervasives.compare) ~default x = function + | [] -> default + | (y, y') :: _ when cmp x y = 0 -> y' + | _ :: ys -> assoc_lbl ~cmp ~default x ys +-- +2.29.0.rc2 + diff --git a/libguestfs.spec b/libguestfs.spec index ade8cb4..10100a4 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -56,7 +56,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.44.0 -Release: 7%{?dist} +Release: 8%{?dist} License: LGPLv2+ # Build only for architectures that have a kernel @@ -89,6 +89,10 @@ Source8: copy-patches.sh # Upstream patch to use -cpu max. Patch1: 0001-appliance-Use-cpu-max.patch +# Upstream patches for OCaml 4.12. +Patch2: 0001-builder-Don-t-redefine-Val_none-OCaml-4.12.patch +Patch3: 0001-mlstdutils-std_utils.ml-Fix-for-OCaml-4.12.patch + %if 0%{patches_touch_autotools} BuildRequires: autoconf, automake, libtool, gettext-devel %endif @@ -1309,8 +1313,9 @@ rm ocaml/html/.gitignore %changelog -* Tue Mar 2 10:06:30 GMT 2021 Richard W.M. Jones - 1:1.44.0-7 +* Tue Mar 2 10:06:30 GMT 2021 Richard W.M. Jones - 1:1.44.0-8 - OCaml 4.12.0 build +- Fixes for OCaml 4.12. * Wed Feb 17 2021 Richard W.M. Jones - 1:1.44.0-6 - Remove jfsutils (dead upstream since 2011). From d8408afe2147b97bd379d28483822b3bfcb5f147 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 3 Mar 2021 12:48:05 +0000 Subject: [PATCH 018/243] New upstream version 1.45.1. --- 0001-appliance-Use-cpu-max.patch | 80 ------------------- ...r-Don-t-redefine-Val_none-OCaml-4.12.patch | 35 -------- ...tils-std_utils.ml-Fix-for-OCaml-4.12.patch | 35 -------- libguestfs.spec | 20 ++--- sources | 4 +- 5 files changed, 10 insertions(+), 164 deletions(-) delete mode 100644 0001-appliance-Use-cpu-max.patch delete mode 100644 0001-builder-Don-t-redefine-Val_none-OCaml-4.12.patch delete mode 100644 0001-mlstdutils-std_utils.ml-Fix-for-OCaml-4.12.patch diff --git a/0001-appliance-Use-cpu-max.patch b/0001-appliance-Use-cpu-max.patch deleted file mode 100644 index 70b482a..0000000 --- a/0001-appliance-Use-cpu-max.patch +++ /dev/null @@ -1,80 +0,0 @@ -From 282e2f74cf1209ecf6bb18655018b2000a5b36a1 Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Thu, 28 Jan 2021 12:20:49 +0000 -Subject: [PATCH] appliance: Use -cpu max. - -QEMU has a newish feature (from about 2017 / qemu 2.9) called -cpu max -which is supposed to select the best CPU, ideal for libguestfs. - -After this change, on x86-64: - - KVM TCG - -Direct -cpu max -cpu max -(non-libvirt) - -Libvirt - - ---- - lib/appliance-cpu.c | 16 ++++++++-------- - lib/launch-libvirt.c | 9 +++++++++ - 2 files changed, 17 insertions(+), 8 deletions(-) - -diff --git a/lib/appliance-cpu.c b/lib/appliance-cpu.c -index 5ef9f5c72..54ac6e2e3 100644 ---- a/lib/appliance-cpu.c -+++ b/lib/appliance-cpu.c -@@ -38,6 +38,11 @@ - * - * The literal string C<"host"> means use C<-cpu host>. - * -+ * =item C<"max"> -+ * -+ * The literal string C<"max"> means use C<-cpu max> (the best -+ * possible). This requires awkward translation for libvirt. -+ * - * =item some string - * - * Some string such as C<"cortex-a57"> means use C<-cpu cortex-a57>. -@@ -80,14 +85,9 @@ guestfs_int_get_cpu_model (int kvm) - /* See discussion in https://bugzilla.redhat.com/show_bug.cgi?id=1605071 */ - return NULL; - #else -- /* On most architectures, it is faster to pass the CPU host model to -- * the appliance, allowing maximum speed for things like checksums -- * and encryption. Only do this with KVM. It is broken in subtle -- * ways on TCG, and fairly pointless when you're emulating anyway. -+ /* On most architectures we can use "max" to get the best possible CPU. -+ * For recent qemu this should work even on TCG. - */ -- if (kvm) -- return "host"; -- else -- return NULL; -+ return "max"; - #endif - } -diff --git a/lib/launch-libvirt.c b/lib/launch-libvirt.c -index 026dc6b26..eff1c8f7e 100644 ---- a/lib/launch-libvirt.c -+++ b/lib/launch-libvirt.c -@@ -1169,6 +1169,15 @@ construct_libvirt_xml_cpu (guestfs_h *g, - attribute ("fallback", "allow"); - } end_element (); - } -+ else if (STREQ (cpu_model, "max")) { -+ if (params->data->is_kvm) -+ attribute ("mode", "host-passthrough"); -+ else -+ attribute ("mode", "host-model"); -+ start_element ("model") { -+ attribute ("fallback", "allow"); -+ } end_element (); -+ } - else - single_element ("model", cpu_model); - } end_element (); --- -2.29.0.rc2 - diff --git a/0001-builder-Don-t-redefine-Val_none-OCaml-4.12.patch b/0001-builder-Don-t-redefine-Val_none-OCaml-4.12.patch deleted file mode 100644 index a61effc..0000000 --- a/0001-builder-Don-t-redefine-Val_none-OCaml-4.12.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 5f499208cf53ebd3f05525918c213a36c3ca13b5 Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Tue, 2 Mar 2021 10:42:49 +0000 -Subject: [PATCH] builder: Don't redefine Val_none (OCaml 4.12). - - CC virt_builder-setlocale-c.o -setlocale-c.c:38: error: "Val_none" redefined [-Werror] - 38 | #define Val_none (Val_int (0)) - | -In file included from /usr/lib64/ocaml/caml/alloc.h:24, - from setlocale-c.c:23: -/usr/lib64/ocaml/caml/mlvalues.h:395: note: this is the location of the previous definition - 395 | #define Val_none Val_int(0) - | ---- - builder/setlocale-c.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/builder/setlocale-c.c b/builder/setlocale-c.c -index 6d877e7ac..1834c11df 100644 ---- a/builder/setlocale-c.c -+++ b/builder/setlocale-c.c -@@ -35,7 +35,9 @@ static const int lc_string_table[7] = { - LC_MESSAGES - }; - -+#ifndef Val_none - #define Val_none (Val_int (0)) -+#endif - - extern value virt_builder_setlocale (value val_category, value val_name); - --- -2.29.0.rc2 - diff --git a/0001-mlstdutils-std_utils.ml-Fix-for-OCaml-4.12.patch b/0001-mlstdutils-std_utils.ml-Fix-for-OCaml-4.12.patch deleted file mode 100644 index 4a21db6..0000000 --- a/0001-mlstdutils-std_utils.ml-Fix-for-OCaml-4.12.patch +++ /dev/null @@ -1,35 +0,0 @@ -From cc4ecbe236914f9b391ecf3815008547472632f8 Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Tue, 2 Mar 2021 10:39:15 +0000 -Subject: [PATCH] mlstdutils/std_utils.ml: Fix for OCaml 4.12. - -We were using a default function from somewhere called "compare" -instead of the actual function (Pervasives.compare / Stdlib.compare). -Since the wrong default function was used it had a different type from -what we expected: - -File "std_utils.ml", line 312, characters 36-37: -312 | | (y, y') :: _ when cmp x y = 0 -> y' - ^ -Error: This expression has type int but an expression was expected of type - 'weak1 list -> int ---- - common/mlstdutils/std_utils.ml | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/common/mlstdutils/std_utils.ml b/common/mlstdutils/std_utils.ml -index 4237ea519..88477179a 100644 ---- a/common/mlstdutils/std_utils.ml -+++ b/common/mlstdutils/std_utils.ml -@@ -307,7 +307,7 @@ module List = struct - | x::xs, y::ys, z::zs -> (x, y, z) :: combine3 xs ys zs - | _ -> invalid_arg "combine3" - -- let rec assoc_lbl ?(cmp = compare) ~default x = function -+ let rec assoc_lbl ?(cmp = Pervasives.compare) ~default x = function - | [] -> default - | (y, y') :: _ when cmp x y = 0 -> y' - | _ :: ys -> assoc_lbl ~cmp ~default x ys --- -2.29.0.rc2 - diff --git a/libguestfs.spec b/libguestfs.spec index 10100a4..5737126 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -41,10 +41,10 @@ %global verify_tarball_signature 1 # If there are patches which touch autotools files, set this to 1. -%global patches_touch_autotools 1 +%global patches_touch_autotools %{nil} # The source directory. -%global source_directory 1.44-stable +%global source_directory 1.45-development # Filter perl provides. %{?perl_default_filter} @@ -55,8 +55,8 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 -Version: 1.44.0 -Release: 8%{?dist} +Version: 1.45.1 +Release: 1%{?dist} License: LGPLv2+ # Build only for architectures that have a kernel @@ -86,13 +86,6 @@ Source7: libguestfs.keyring # Maintainer script which helps with handling patches. Source8: copy-patches.sh -# Upstream patch to use -cpu max. -Patch1: 0001-appliance-Use-cpu-max.patch - -# Upstream patches for OCaml 4.12. -Patch2: 0001-builder-Don-t-redefine-Val_none-OCaml-4.12.patch -Patch3: 0001-mlstdutils-std_utils.ml-Fix-for-OCaml-4.12.patch - %if 0%{patches_touch_autotools} BuildRequires: autoconf, automake, libtool, gettext-devel %endif @@ -1313,7 +1306,10 @@ rm ocaml/html/.gitignore %changelog -* Tue Mar 2 10:06:30 GMT 2021 Richard W.M. Jones - 1:1.44.0-8 +* Wed Mar 3 2021 Richard W.M. Jones - 1:1.45.1-1 +- New upstream version 1.45.1. + +* Tue Mar 2 2021 Richard W.M. Jones - 1:1.44.0-8 - OCaml 4.12.0 build - Fixes for OCaml 4.12. diff --git a/sources b/sources index 8064041..0b47c86 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (libguestfs-1.44.0.tar.gz) = e5052d6deb130f9bceea06d2d6626162991cb83ffaf0ed9923ff5d8bb67137e565053104d8854d37ea8c871dce2a5ca29507d17357de813a8ac49896f00be103 -SHA512 (libguestfs-1.44.0.tar.gz.sig) = 26cb5b97dbc0d649466668964080220acc28c3fabc565563df0da5472420e61893907b4bedcb9f8977d7df9e867855d7178e4ad097df41dcbcaa98d0c07feac3 +SHA512 (libguestfs-1.45.1.tar.gz) = 8a4a39908d0697bd0b1dd99348b830e500e61bde6768f8518befc025ae67ee9ac44ada8795c54cb6faa8e95049b1c14b46887372b9e0569a52e9219c4fd54d52 +SHA512 (libguestfs-1.45.1.tar.gz.sig) = e2ade5f67402b618f60bb2bf4264f23528a6cf27537091a0ccfd5bf045901eab8aa2d0b6db89edee0c9141837967f7e9f769ffd4f49bca9c950fadeb7617eb01 From 070ac5428357c54bd494662a522944bf2b83e03b Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Fri, 5 Mar 2021 10:54:07 +0100 Subject: [PATCH 019/243] rebuild for https://fedoraproject.org/wiki/Changes/php80 --- libguestfs.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libguestfs.spec b/libguestfs.spec index 5737126..e20c25e 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -56,7 +56,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.45.1 -Release: 1%{?dist} +Release: 2%{?dist} License: LGPLv2+ # Build only for architectures that have a kernel @@ -1306,6 +1306,9 @@ rm ocaml/html/.gitignore %changelog +* Fri Mar 5 2021 Remi Collet - 1:1.45.1-2 +- rebuild for https://fedoraproject.org/wiki/Changes/php80 + * Wed Mar 3 2021 Richard W.M. Jones - 1:1.45.1-1 - New upstream version 1.45.1. From d494fdb90a960226709d2babb36daac6e48abc39 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Fri, 5 Mar 2021 13:40:44 +0100 Subject: [PATCH 020/243] add trivial patch to fix build with PHP 8 --- libguestfs-php8.patch | 20 ++++++++++++++++++++ libguestfs.spec | 4 ++++ 2 files changed, 24 insertions(+) create mode 100644 libguestfs-php8.patch diff --git a/libguestfs-php8.patch b/libguestfs-php8.patch new file mode 100644 index 0000000..5fbd871 --- /dev/null +++ b/libguestfs-php8.patch @@ -0,0 +1,20 @@ +diff -up ./generator/php.ml.php8 ./generator/php.ml +--- ./generator/php.ml.php8 2021-03-05 12:58:48.985383761 +0100 ++++ ./generator/php.ml 2021-03-05 13:00:10.731000947 +0100 +@@ -98,9 +98,15 @@ and generate_php_c () = + + static int res_guestfs_h; + ++/* removed from PHP 8 */ ++#ifndef TSRMLS_CC ++#define TSRMLS_DC ++#define TSRMLS_CC ++#endif ++ + #if ZEND_MODULE_API_NO >= 20151012 + # define GUESTFS_RETURN_STRING(x, duplicate) \\ +- do { if (duplicate) RETURN_STRING(x) else { RETVAL_STRING(x); efree ((char *)x); return; } } while (0) ++ do { if (duplicate) { RETURN_STRING(x); } else { RETVAL_STRING(x); efree ((char *)x); return; } } while (0) + # define guestfs_add_assoc_string(arg, key, str, dup) \\ + add_assoc_string(arg, key, str) + # define guestfs_add_assoc_stringl(arg, key, str, len, dup) \\ diff --git a/libguestfs.spec b/libguestfs.spec index e20c25e..5fd3700 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -86,6 +86,9 @@ Source7: libguestfs.keyring # Maintainer script which helps with handling patches. Source8: copy-patches.sh +# Trivial fix for PHP 8 +Patch0: %{name}-php8.patch + %if 0%{patches_touch_autotools} BuildRequires: autoconf, automake, libtool, gettext-devel %endif @@ -1308,6 +1311,7 @@ rm ocaml/html/.gitignore %changelog * Fri Mar 5 2021 Remi Collet - 1:1.45.1-2 - rebuild for https://fedoraproject.org/wiki/Changes/php80 +- add trivial patch to fix build with PHP 8 * Wed Mar 3 2021 Richard W.M. Jones - 1:1.45.1-1 - New upstream version 1.45.1. From 97b5f69cdaf34d3824e7a0f21ad6762c333e66ab Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 8 Mar 2021 12:21:56 +0000 Subject: [PATCH 021/243] Bump and rebuild for ocaml-gettext update. --- libguestfs.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libguestfs.spec b/libguestfs.spec index 5fd3700..6fb9a64 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -56,7 +56,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.45.1 -Release: 2%{?dist} +Release: 3%{?dist} License: LGPLv2+ # Build only for architectures that have a kernel @@ -1309,6 +1309,9 @@ rm ocaml/html/.gitignore %changelog +* Mon Mar 8 2021 Richard W.M. Jones - 1:1.45.1-3 +- Bump and rebuild for ocaml-gettext update. + * Fri Mar 5 2021 Remi Collet - 1:1.45.1-2 - rebuild for https://fedoraproject.org/wiki/Changes/php80 - add trivial patch to fix build with PHP 8 From 4fa48327dbcc5baf2a8e4c087e4d0de5be01da1f Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 10 Mar 2021 18:00:15 +0000 Subject: [PATCH 022/243] Drop Requires: libvirt-daemon-kvm, pulls in the whole of qemu and subpkgs. Cole Robinson writes: > libguestfs spec looks like it has a bug (looking at fedora rawhide). It > attempts to use Suggests/Recommends to limit what's pulled in of qemu > modules, but then it has a dep on libvirt-daemon-kvm which conditionally > pulls in qemu-kvm, which on fedora pulls in every qemu module. That > explains SDL and gtk deps. > > libvirt-daemon-kvm is just a metapackage with deps on > libvirt-daemon-driver-X subsystems, and qemu-kvm. The thing that > actually puts the libvirt qemu driver on the host is > libvirt-daemon-driver-qemu, which libguestfs already has an explicit dep on. > > So try dropping the libvirt-daemon-kvm dep and see if things break. --- libguestfs.spec | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index 6fb9a64..0c609d8 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -56,7 +56,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.45.1 -Release: 3%{?dist} +Release: 4%{?dist} License: LGPLv2+ # Build only for architectures that have a kernel @@ -329,7 +329,6 @@ Recommends: libvirt-daemon-config-network Requires: libvirt-daemon-driver-qemu Requires: libvirt-daemon-driver-secret Recommends: libvirt-daemon-driver-storage-core -Requires: libvirt-daemon-kvm >= 5.3.0 Requires: selinux-policy >= 3.11.1-63 %ifarch aarch64 @@ -1309,6 +1308,9 @@ rm ocaml/html/.gitignore %changelog +* Wed Mar 10 2021 Richard W.M. Jones - 1:1.45.1-4 +- Drop Requires: libvirt-daemon-kvm, pulls in the whole of qemu and subpkgs. + * Mon Mar 8 2021 Richard W.M. Jones - 1:1.45.1-3 - Bump and rebuild for ocaml-gettext update. From e38829eec1f9795f1613b94a711d61575286591d Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 18 Mar 2021 12:26:27 +0000 Subject: [PATCH 023/243] Drop dependency on perl(Sys::Virt). --- ...-tests-Remove-dependency-on-Sys-Virt.patch | 180 ++++++++++++++++++ libguestfs.spec | 13 +- 2 files changed, 189 insertions(+), 4 deletions(-) create mode 100644 0001-tests-Remove-dependency-on-Sys-Virt.patch diff --git a/0001-tests-Remove-dependency-on-Sys-Virt.patch b/0001-tests-Remove-dependency-on-Sys-Virt.patch new file mode 100644 index 0000000..d8e3dab --- /dev/null +++ b/0001-tests-Remove-dependency-on-Sys-Virt.patch @@ -0,0 +1,180 @@ +From 061be6bb84b83ecfac9f647dccab847a7937fbcf Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Thu, 18 Mar 2021 12:15:01 +0000 +Subject: [PATCH] tests: Remove dependency on Sys::Virt. + +This was only used for a single rule (check-valgrind-local-guests) +which ran "make check-valgrind" on local guests. This was never +really used by me and was fairly inadvisable anyway, so we can easily +remove it and thus remove the dependency on perl Sys::Virt. +--- + .gitignore | 1 - + Makefile.am | 11 ------- + configure.ac | 2 -- + docs/guestfs-building.pod | 4 --- + m4/guestfs-perl.m4 | 2 +- + pick-guests.pl.in | 63 --------------------------------------- + 6 files changed, 1 insertion(+), 82 deletions(-) + delete mode 100755 pick-guests.pl.in + +diff --git a/.gitignore b/.gitignore +index 2c8bd36dc..b81b4317c 100644 +--- a/.gitignore ++++ b/.gitignore +@@ -365,7 +365,6 @@ Makefile.in + /php/extension/tests/guestfs_*.sh + /php/extension/tests/guestfs_090_bindtests.phpt + /php/extension/tmp-php.ini +-/pick-guests.pl + /po-docs/*/*.1 + /po-docs/*/*.3 + /po-docs/*/*.5 +diff --git a/Makefile.am b/Makefile.am +index 91f33e8d7..d4424af1e 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -368,7 +368,6 @@ check-all: + $(MAKE) -j1 \ + check \ + check-valgrind \ +- check-valgrind-local-guests \ + check-direct \ + check-valgrind-direct \ + check-uml \ +@@ -394,15 +393,6 @@ check-valgrind: build-test-guests + done; \ + exit $$(( $$errors ? 1 : 0 )) + +-check-valgrind-local-guests: +- @GUESTS=`$(top_builddir)/run ./pick-guests.pl 5`; \ +- errors=0; \ +- for f in `grep -l '^$@:' $(SUBDIRS:%=%/Makefile.am)`; do \ +- echo $(MAKE) GUESTS="$$GUESTS" -C `dirname $$f` $@; \ +- $(MAKE) GUESTS="$$GUESTS" -C `dirname $$f` $@ || (( errors++ )); \ +- done; \ +- exit $$(( $$errors ? 1 : 0 )) +- + check-direct: + @backend=`$(top_builddir)/run ./fish/guestfish get-backend`; \ + if [ "$$backend" != "direct" ]; then \ +@@ -576,7 +566,6 @@ help: + @echo "make -k check ... and display all errors at once." + @echo + @echo "make check-valgrind Run a subset of the tests under valgrind." +- @echo "make check-valgrind-local-guests Test under valgrind using local guests." + @echo "make check-direct Test using direct backend." + @echo "make check-valgrind-direct Test valgrind + direct backend." + @echo "make check-uml Test using User-Mode Linux." +diff --git a/configure.ac b/configure.ac +index 66f29aa23..165bb4c43 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -205,8 +205,6 @@ AC_CONFIG_FILES([ocaml-link.sh], + [chmod +x,-w ocaml-link.sh]) + AC_CONFIG_FILES([php/extension/php-for-tests.sh], + [chmod +x,-w php/extension/php-for-tests.sh]) +-AC_CONFIG_FILES([pick-guests.pl], +- [chmod +x,-w pick-guests.pl]) + AC_CONFIG_FILES([podwrapper.pl], + [chmod +x,-w podwrapper.pl]) + AC_CONFIG_FILES([run], +diff --git a/docs/guestfs-building.pod b/docs/guestfs-building.pod +index b83aea280..5870ed74b 100644 +--- a/docs/guestfs-building.pod ++++ b/docs/guestfs-building.pod +@@ -372,10 +372,6 @@ Optional. Used to build the Go bindings. + + Optional. For testing memory problems. + +-=item Perl C +- +-Optional. +- + =item libvirt-python + + Optional. For testing Python libvirt/libguestfs interactions. +diff --git a/m4/guestfs-perl.m4 b/m4/guestfs-perl.m4 +index 4c889d843..c8337ed9b 100644 +--- a/m4/guestfs-perl.m4 ++++ b/m4/guestfs-perl.m4 +@@ -66,7 +66,7 @@ AM_CONDITIONAL([HAVE_PERL], + dnl Check for Perl modules needed by Perl virt tools (virt-df, etc.) + AS_IF([test "x$PERL" != "xno"],[ + missing_perl_modules=no +- for pm in Pod::Usage Getopt::Long Sys::Virt Locale::TextDomain Win::Hivex Win::Hivex::Regedit ; do ++ for pm in Pod::Usage Getopt::Long Locale::TextDomain Win::Hivex Win::Hivex::Regedit ; do + AC_MSG_CHECKING([for $pm]) + if ! $PERL -M$pm -e1 >&AS_MESSAGE_LOG_FD 2>&1; then + AC_MSG_RESULT([no]) +diff --git a/pick-guests.pl.in b/pick-guests.pl.in +deleted file mode 100755 +index e96e33a9c..000000000 +--- a/pick-guests.pl.in ++++ /dev/null +@@ -1,63 +0,0 @@ +-#!/usr/bin/env perl +-# @configure_input@ +-# Copyright (C) 2009-2020 Red Hat Inc. +-# +-# This program is free software; you can redistribute it and/or modify +-# it under the terms of the GNU General Public License as published by +-# the Free Software Foundation; either version 2 of the License, or +-# (at your option) any later version. +-# +-# This program is distributed in the hope that it will be useful, +-# but WITHOUT ANY WARRANTY; without even the implied warranty of +-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-# GNU General Public License for more details. +-# +-# You should have received a copy of the GNU General Public License +-# along with this program; if not, write to the Free Software +-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +- +-# Pick guests at random on the local machine which are accessible. +-# This is used by 'make check-valgrind-local-guests'. +- +-use strict; +-use warnings; +- +-use Sys::Guestfs; +-use Sys::Virt; +-use List::Util qw(shuffle); +- +-die "$0 nr-guests\n" unless @ARGV == 1; +-my $n = $ARGV[0]; +- +-my $vmm = Sys::Virt->new (uri => '@libvirt_ro_uri@'); +-my @domains = ($vmm->list_domains, $vmm->list_defined_domains); +- +-# Only guests which are accessible by the current (non-root) user. On +-# the machine where I run these tests, I have added my user account to +-# the 'disk' group, so that most guests are accessible. However +-# because libvirt changes the permissions on guest disks, a guest +-# which has been run on the machine becomes inaccessible, hence the +-# need for this code - RWMJ. +-my @accessible; +-foreach my $dom (@domains) { +- my $name = $dom->get_name; +- my $g = Sys::Guestfs->new; +- eval { +- $g->add_domain ($name, readonly => 1, +- libvirturi => '@libvirt_ro_uri@'); +- # $g->launch (); - don't actually need to do this +- }; +- push @accessible, $name unless $@; +-} +- +-# Randomize the list of guests. +-@accessible = shuffle (@accessible); +- +-$n = @accessible if @accessible < $n; +- +-# Return the first n guests from the list. +-for (my $i = 0; $i < $n; ++$i) { +- print " " if $i > 0; +- print $accessible[$i]; +-} +-print "\n"; +-- +2.29.0.rc2 + diff --git a/libguestfs.spec b/libguestfs.spec index 0c609d8..788be61 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -41,7 +41,7 @@ %global verify_tarball_signature 1 # If there are patches which touch autotools files, set this to 1. -%global patches_touch_autotools %{nil} +%global patches_touch_autotools 1 # The source directory. %global source_directory 1.45-development @@ -56,7 +56,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.45.1 -Release: 4%{?dist} +Release: 5%{?dist} License: LGPLv2+ # Build only for architectures that have a kernel @@ -86,9 +86,12 @@ Source7: libguestfs.keyring # Maintainer script which helps with handling patches. Source8: copy-patches.sh -# Trivial fix for PHP 8 +# Trivial fix for PHP 8 (upstream in libguestfs >= 1.45.2) Patch0: %{name}-php8.patch +# Remove dependency on perl(Sys::Virt) (upstream in libguestfs >= 1.45.2) +Patch1: 0001-tests-Remove-dependency-on-Sys-Virt.patch + %if 0%{patches_touch_autotools} BuildRequires: autoconf, automake, libtool, gettext-devel %endif @@ -166,7 +169,6 @@ BuildRequires: lua-devel BuildRequires: perl-devel BuildRequires: perl-generators BuildRequires: perl-macros -BuildRequires: perl(Sys::Virt) BuildRequires: perl(Test::More) BuildRequires: perl(Test::Pod) >= 1.00 BuildRequires: perl(Test::Pod::Coverage) >= 1.00 @@ -1308,6 +1310,9 @@ rm ocaml/html/.gitignore %changelog +* Thu Mar 18 2021 Richard W.M. Jones - 1:1.45.1-5 +- Drop dependency on perl(Sys::Virt). + * Wed Mar 10 2021 Richard W.M. Jones - 1:1.45.1-4 - Drop Requires: libvirt-daemon-kvm, pulls in the whole of qemu and subpkgs. From 175743174bd9919d7660ae4de34d28d999bfbc1c Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 18 Mar 2021 12:49:49 +0000 Subject: [PATCH 024/243] Fix -cpu max and require libvirt >= 7.1.0. --- ...u-mode-maximum-for-cpu-max-on-libvir.patch | 47 +++++++++++++++++++ libguestfs.spec | 14 ++++-- 2 files changed, 57 insertions(+), 4 deletions(-) create mode 100644 0001-appliance-Use-cpu-mode-maximum-for-cpu-max-on-libvir.patch diff --git a/0001-appliance-Use-cpu-mode-maximum-for-cpu-max-on-libvir.patch b/0001-appliance-Use-cpu-mode-maximum-for-cpu-max-on-libvir.patch new file mode 100644 index 0000000..9c7e099 --- /dev/null +++ b/0001-appliance-Use-cpu-mode-maximum-for-cpu-max-on-libvir.patch @@ -0,0 +1,47 @@ +From 13ceb6a87b2869909a6a0e3c8caa962b72e4cb0e Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Thu, 18 Mar 2021 12:32:26 +0000 +Subject: [PATCH] appliance: Use for -cpu max on libvirt. + +Note this requires libvirt >= 7.1.0 which was only released in March 2021. + +With an older libvirt you will see this error: + + Original error from libvirt: unsupported configuration: Invalid mode attribute 'maximum' [code=67 int1=-1] + +In theory we could check if this is supported by looking at the +libvirt capabilities and fall back, but this commit does not do that, +in the expectation that most people will be using the default backend +(direct) and on Fedora/RHEL we will add an explicit minimum version +dependency to the package. + +qemu support has been around quite a bit longer (at least since 2017). + +Fixes: commit 30f74f38bd6e42e783ba80895f4d6826abddd417 +--- + lib/launch-libvirt.c | 9 ++------- + 1 file changed, 2 insertions(+), 7 deletions(-) + +diff --git a/lib/launch-libvirt.c b/lib/launch-libvirt.c +index 2d995bee0..194530c49 100644 +--- a/lib/launch-libvirt.c ++++ b/lib/launch-libvirt.c +@@ -1183,13 +1183,8 @@ construct_libvirt_xml_cpu (guestfs_h *g, + } end_element (); + } + else if (STREQ (cpu_model, "max")) { +- if (params->data->is_kvm) +- attribute ("mode", "host-passthrough"); +- else +- attribute ("mode", "host-model"); +- start_element ("model") { +- attribute ("fallback", "allow"); +- } end_element (); ++ /* https://bugzilla.redhat.com/show_bug.cgi?id=1935572#c11 */ ++ attribute ("mode", "maximum"); + } + else + single_element ("model", cpu_model); +-- +2.29.0.rc2 + diff --git a/libguestfs.spec b/libguestfs.spec index 788be61..3c72a04 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -56,7 +56,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.45.1 -Release: 5%{?dist} +Release: 6%{?dist} License: LGPLv2+ # Build only for architectures that have a kernel @@ -92,6 +92,11 @@ Patch0: %{name}-php8.patch # Remove dependency on perl(Sys::Virt) (upstream in libguestfs >= 1.45.2) Patch1: 0001-tests-Remove-dependency-on-Sys-Virt.patch +# Fix -cpu max mode with libvirt backend. +# Upstream in libguestfs >= 1.45.2. +# Requires libvirt >= 7.1.0 +Patch2: 0001-appliance-Use-cpu-mode-maximum-for-cpu-max-on-libvir.patch + %if 0%{patches_touch_autotools} BuildRequires: autoconf, automake, libtool, gettext-devel %endif @@ -134,7 +139,7 @@ BuildRequires: unzip BuildRequires: systemd-units BuildRequires: netpbm-progs BuildRequires: icoutils -BuildRequires: libvirt-daemon-kvm >= 5.3.0 +BuildRequires: libvirt-daemon-kvm >= 7.1.0 %if !0%{?rhel} BuildRequires: perl(Expect) %endif @@ -328,7 +333,7 @@ Suggests: qemu-block-iscsi Suggests: qemu-block-rbd Suggests: qemu-block-ssh Recommends: libvirt-daemon-config-network -Requires: libvirt-daemon-driver-qemu +Requires: libvirt-daemon-driver-qemu >= 7.1.0 Requires: libvirt-daemon-driver-secret Recommends: libvirt-daemon-driver-storage-core Requires: selinux-policy >= 3.11.1-63 @@ -1310,8 +1315,9 @@ rm ocaml/html/.gitignore %changelog -* Thu Mar 18 2021 Richard W.M. Jones - 1:1.45.1-5 +* Thu Mar 18 2021 Richard W.M. Jones - 1:1.45.1-6 - Drop dependency on perl(Sys::Virt). +- Fix -cpu max and require libvirt >= 7.1.0. * Wed Mar 10 2021 Richard W.M. Jones - 1:1.45.1-4 - Drop Requires: libvirt-daemon-kvm, pulls in the whole of qemu and subpkgs. From 4a269d5cf90a2ce49ec722c37fd67ce804052e50 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 18 Mar 2021 13:06:20 +0000 Subject: [PATCH 025/243] Make ocaml-ounit dependency conditional on !RHEL. It's only needed by virt-builder to run some minor tests. --- libguestfs.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libguestfs.spec b/libguestfs.spec index 3c72a04..808b936 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -168,7 +168,9 @@ BuildRequires: ocaml BuildRequires: ocaml-ocamldoc BuildRequires: ocaml-findlib-devel BuildRequires: ocaml-gettext-devel +%if !0%{?rhel} BuildRequires: ocaml-ounit-devel +%endif BuildRequires: lua BuildRequires: lua-devel BuildRequires: perl-devel From 16a560c22f6dd84f4aee7e6fdfcc6735a582974a Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 23 Mar 2021 10:25:17 +0000 Subject: [PATCH 026/243] New upstream version 1.45.2. - This drops the tools. Now packaged as guestfs-tools. - guestfish, guestmount, guestunmount now packaged with libguestfs. - virt-rescue now packaged in libguestfs-rescue. - Drop ChangeLog file. - Remove virt-dib in RHEL 9. - Depend on PCRE2 instead of PCRE. --- ...nclude-huge-ChangeLog-in-the-tarball.patch | 60 +++ ...u-mode-maximum-for-cpu-max-on-libvir.patch | 47 --- ...-tests-Remove-dependency-on-Sys-Virt.patch | 180 -------- ...-Remove-completion-scripts-for-tools.patch | 125 ++++++ libguestfs-php8.patch | 20 - libguestfs.spec | 388 +++++------------- sources | 4 +- 7 files changed, 283 insertions(+), 541 deletions(-) create mode 100644 0001-Don-t-include-huge-ChangeLog-in-the-tarball.patch delete mode 100644 0001-appliance-Use-cpu-mode-maximum-for-cpu-max-on-libvir.patch delete mode 100644 0001-tests-Remove-dependency-on-Sys-Virt.patch create mode 100644 0002-bash-completion-Remove-completion-scripts-for-tools.patch delete mode 100644 libguestfs-php8.patch diff --git a/0001-Don-t-include-huge-ChangeLog-in-the-tarball.patch b/0001-Don-t-include-huge-ChangeLog-in-the-tarball.patch new file mode 100644 index 0000000..757df37 --- /dev/null +++ b/0001-Don-t-include-huge-ChangeLog-in-the-tarball.patch @@ -0,0 +1,60 @@ +From eb53d74ba2e5e9086a5ac8679d55e6a338397e07 Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Tue, 23 Mar 2021 10:00:12 +0000 +Subject: [PATCH 1/2] Don't include huge ChangeLog in the tarball. + +Adds a few megabytes which people can easily get from the git +repository. +--- + .gitignore | 1 - + Makefile.am | 9 +-------- + 2 files changed, 1 insertion(+), 9 deletions(-) + +diff --git a/.gitignore b/.gitignore +index 716a9b2cd..f6e7d18e5 100644 +--- a/.gitignore ++++ b/.gitignore +@@ -81,7 +81,6 @@ Makefile.in + /build-aux/test-driver + /build-aux/ylwrap + /bundled/ocaml-augeas/.depend +-/ChangeLog + /compile + /config.cache + /config.guess +diff --git a/Makefile.am b/Makefile.am +index 9feac761b..743d2fbad 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -215,15 +215,13 @@ maintainer-upload-website: + # When doing 'make dist' update a few files automatically. + # + # BUGS - list of bugs (created from Bugzilla) +-# ChangeLog - changelog (created from git) + # docs/C_SOURCE_FILES + # - source files scanned for internal documentation + # po/POTFILES - files with ordinary extensions, but not OCaml files + # po/POTFILES-ml - OCaml files, which need a special tool to translate + +-dist-hook: BUGS ChangeLog docs/C_SOURCE_FILES po/POTFILES po/POTFILES-ml ++dist-hook: BUGS docs/C_SOURCE_FILES po/POTFILES po/POTFILES-ml + cp BUGS $(distdir)/BUGS +- cp ChangeLog $(distdir)/ChangeLog + + BUGS: configure.ac + rm -f $@ $@-t +@@ -231,11 +229,6 @@ BUGS: configure.ac + $(top_srcdir)/update-bugs.sh > $@-t + mv $@-t $@ + +-ChangeLog: configure.ac +- rm -f $@ $@-t +- git log --decorate=false > $@-t +- mv $@-t $@ +- + # This has to be in the top-level Makefile.am so that we have access + # to DIST_SUBDIRS. + docs/C_SOURCE_FILES: configure.ac +-- +2.29.0.rc2 + diff --git a/0001-appliance-Use-cpu-mode-maximum-for-cpu-max-on-libvir.patch b/0001-appliance-Use-cpu-mode-maximum-for-cpu-max-on-libvir.patch deleted file mode 100644 index 9c7e099..0000000 --- a/0001-appliance-Use-cpu-mode-maximum-for-cpu-max-on-libvir.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 13ceb6a87b2869909a6a0e3c8caa962b72e4cb0e Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Thu, 18 Mar 2021 12:32:26 +0000 -Subject: [PATCH] appliance: Use for -cpu max on libvirt. - -Note this requires libvirt >= 7.1.0 which was only released in March 2021. - -With an older libvirt you will see this error: - - Original error from libvirt: unsupported configuration: Invalid mode attribute 'maximum' [code=67 int1=-1] - -In theory we could check if this is supported by looking at the -libvirt capabilities and fall back, but this commit does not do that, -in the expectation that most people will be using the default backend -(direct) and on Fedora/RHEL we will add an explicit minimum version -dependency to the package. - -qemu support has been around quite a bit longer (at least since 2017). - -Fixes: commit 30f74f38bd6e42e783ba80895f4d6826abddd417 ---- - lib/launch-libvirt.c | 9 ++------- - 1 file changed, 2 insertions(+), 7 deletions(-) - -diff --git a/lib/launch-libvirt.c b/lib/launch-libvirt.c -index 2d995bee0..194530c49 100644 ---- a/lib/launch-libvirt.c -+++ b/lib/launch-libvirt.c -@@ -1183,13 +1183,8 @@ construct_libvirt_xml_cpu (guestfs_h *g, - } end_element (); - } - else if (STREQ (cpu_model, "max")) { -- if (params->data->is_kvm) -- attribute ("mode", "host-passthrough"); -- else -- attribute ("mode", "host-model"); -- start_element ("model") { -- attribute ("fallback", "allow"); -- } end_element (); -+ /* https://bugzilla.redhat.com/show_bug.cgi?id=1935572#c11 */ -+ attribute ("mode", "maximum"); - } - else - single_element ("model", cpu_model); --- -2.29.0.rc2 - diff --git a/0001-tests-Remove-dependency-on-Sys-Virt.patch b/0001-tests-Remove-dependency-on-Sys-Virt.patch deleted file mode 100644 index d8e3dab..0000000 --- a/0001-tests-Remove-dependency-on-Sys-Virt.patch +++ /dev/null @@ -1,180 +0,0 @@ -From 061be6bb84b83ecfac9f647dccab847a7937fbcf Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Thu, 18 Mar 2021 12:15:01 +0000 -Subject: [PATCH] tests: Remove dependency on Sys::Virt. - -This was only used for a single rule (check-valgrind-local-guests) -which ran "make check-valgrind" on local guests. This was never -really used by me and was fairly inadvisable anyway, so we can easily -remove it and thus remove the dependency on perl Sys::Virt. ---- - .gitignore | 1 - - Makefile.am | 11 ------- - configure.ac | 2 -- - docs/guestfs-building.pod | 4 --- - m4/guestfs-perl.m4 | 2 +- - pick-guests.pl.in | 63 --------------------------------------- - 6 files changed, 1 insertion(+), 82 deletions(-) - delete mode 100755 pick-guests.pl.in - -diff --git a/.gitignore b/.gitignore -index 2c8bd36dc..b81b4317c 100644 ---- a/.gitignore -+++ b/.gitignore -@@ -365,7 +365,6 @@ Makefile.in - /php/extension/tests/guestfs_*.sh - /php/extension/tests/guestfs_090_bindtests.phpt - /php/extension/tmp-php.ini --/pick-guests.pl - /po-docs/*/*.1 - /po-docs/*/*.3 - /po-docs/*/*.5 -diff --git a/Makefile.am b/Makefile.am -index 91f33e8d7..d4424af1e 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -368,7 +368,6 @@ check-all: - $(MAKE) -j1 \ - check \ - check-valgrind \ -- check-valgrind-local-guests \ - check-direct \ - check-valgrind-direct \ - check-uml \ -@@ -394,15 +393,6 @@ check-valgrind: build-test-guests - done; \ - exit $$(( $$errors ? 1 : 0 )) - --check-valgrind-local-guests: -- @GUESTS=`$(top_builddir)/run ./pick-guests.pl 5`; \ -- errors=0; \ -- for f in `grep -l '^$@:' $(SUBDIRS:%=%/Makefile.am)`; do \ -- echo $(MAKE) GUESTS="$$GUESTS" -C `dirname $$f` $@; \ -- $(MAKE) GUESTS="$$GUESTS" -C `dirname $$f` $@ || (( errors++ )); \ -- done; \ -- exit $$(( $$errors ? 1 : 0 )) -- - check-direct: - @backend=`$(top_builddir)/run ./fish/guestfish get-backend`; \ - if [ "$$backend" != "direct" ]; then \ -@@ -576,7 +566,6 @@ help: - @echo "make -k check ... and display all errors at once." - @echo - @echo "make check-valgrind Run a subset of the tests under valgrind." -- @echo "make check-valgrind-local-guests Test under valgrind using local guests." - @echo "make check-direct Test using direct backend." - @echo "make check-valgrind-direct Test valgrind + direct backend." - @echo "make check-uml Test using User-Mode Linux." -diff --git a/configure.ac b/configure.ac -index 66f29aa23..165bb4c43 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -205,8 +205,6 @@ AC_CONFIG_FILES([ocaml-link.sh], - [chmod +x,-w ocaml-link.sh]) - AC_CONFIG_FILES([php/extension/php-for-tests.sh], - [chmod +x,-w php/extension/php-for-tests.sh]) --AC_CONFIG_FILES([pick-guests.pl], -- [chmod +x,-w pick-guests.pl]) - AC_CONFIG_FILES([podwrapper.pl], - [chmod +x,-w podwrapper.pl]) - AC_CONFIG_FILES([run], -diff --git a/docs/guestfs-building.pod b/docs/guestfs-building.pod -index b83aea280..5870ed74b 100644 ---- a/docs/guestfs-building.pod -+++ b/docs/guestfs-building.pod -@@ -372,10 +372,6 @@ Optional. Used to build the Go bindings. - - Optional. For testing memory problems. - --=item Perl C -- --Optional. -- - =item libvirt-python - - Optional. For testing Python libvirt/libguestfs interactions. -diff --git a/m4/guestfs-perl.m4 b/m4/guestfs-perl.m4 -index 4c889d843..c8337ed9b 100644 ---- a/m4/guestfs-perl.m4 -+++ b/m4/guestfs-perl.m4 -@@ -66,7 +66,7 @@ AM_CONDITIONAL([HAVE_PERL], - dnl Check for Perl modules needed by Perl virt tools (virt-df, etc.) - AS_IF([test "x$PERL" != "xno"],[ - missing_perl_modules=no -- for pm in Pod::Usage Getopt::Long Sys::Virt Locale::TextDomain Win::Hivex Win::Hivex::Regedit ; do -+ for pm in Pod::Usage Getopt::Long Locale::TextDomain Win::Hivex Win::Hivex::Regedit ; do - AC_MSG_CHECKING([for $pm]) - if ! $PERL -M$pm -e1 >&AS_MESSAGE_LOG_FD 2>&1; then - AC_MSG_RESULT([no]) -diff --git a/pick-guests.pl.in b/pick-guests.pl.in -deleted file mode 100755 -index e96e33a9c..000000000 ---- a/pick-guests.pl.in -+++ /dev/null -@@ -1,63 +0,0 @@ --#!/usr/bin/env perl --# @configure_input@ --# Copyright (C) 2009-2020 Red Hat Inc. --# --# This program is free software; you can redistribute it and/or modify --# it under the terms of the GNU General Public License as published by --# the Free Software Foundation; either version 2 of the License, or --# (at your option) any later version. --# --# This program is distributed in the hope that it will be useful, --# but WITHOUT ANY WARRANTY; without even the implied warranty of --# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --# GNU General Public License for more details. --# --# You should have received a copy of the GNU General Public License --# along with this program; if not, write to the Free Software --# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -- --# Pick guests at random on the local machine which are accessible. --# This is used by 'make check-valgrind-local-guests'. -- --use strict; --use warnings; -- --use Sys::Guestfs; --use Sys::Virt; --use List::Util qw(shuffle); -- --die "$0 nr-guests\n" unless @ARGV == 1; --my $n = $ARGV[0]; -- --my $vmm = Sys::Virt->new (uri => '@libvirt_ro_uri@'); --my @domains = ($vmm->list_domains, $vmm->list_defined_domains); -- --# Only guests which are accessible by the current (non-root) user. On --# the machine where I run these tests, I have added my user account to --# the 'disk' group, so that most guests are accessible. However --# because libvirt changes the permissions on guest disks, a guest --# which has been run on the machine becomes inaccessible, hence the --# need for this code - RWMJ. --my @accessible; --foreach my $dom (@domains) { -- my $name = $dom->get_name; -- my $g = Sys::Guestfs->new; -- eval { -- $g->add_domain ($name, readonly => 1, -- libvirturi => '@libvirt_ro_uri@'); -- # $g->launch (); - don't actually need to do this -- }; -- push @accessible, $name unless $@; --} -- --# Randomize the list of guests. --@accessible = shuffle (@accessible); -- --$n = @accessible if @accessible < $n; -- --# Return the first n guests from the list. --for (my $i = 0; $i < $n; ++$i) { -- print " " if $i > 0; -- print $accessible[$i]; --} --print "\n"; --- -2.29.0.rc2 - diff --git a/0002-bash-completion-Remove-completion-scripts-for-tools.patch b/0002-bash-completion-Remove-completion-scripts-for-tools.patch new file mode 100644 index 0000000..4ccac0b --- /dev/null +++ b/0002-bash-completion-Remove-completion-scripts-for-tools.patch @@ -0,0 +1,125 @@ +From 4991fe525961450704bbc80b5f2095bc8499f767 Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Tue, 23 Mar 2021 11:08:42 +0000 +Subject: [PATCH 2/2] bash-completion: Remove completion scripts for tools. + +These have moved to guestfs-tools. + +Fixes: commit 733d2182b64df7abc5c5cd7d78177baa6079628c +--- + .gitignore | 19 ---------- + bash/Makefile.am | 43 +--------------------- + bash/{virt-alignment-scan => guestunmount} | 0 + 3 files changed, 2 insertions(+), 60 deletions(-) + rename bash/{virt-alignment-scan => guestunmount} (100%) + +diff --git a/.gitignore b/.gitignore +index f6e7d18e5..a37ab0593 100644 +--- a/.gitignore ++++ b/.gitignore +@@ -45,29 +45,10 @@ Makefile.in + /appliance/supermin.d + /AUTHORS + /autom4te.cache +-/bash/guestunmount +-/bash/virt-builder +-/bash/virt-cat + /bash/virt-copy-in + /bash/virt-copy-out +-/bash/virt-customize +-/bash/virt-df +-/bash/virt-dib +-/bash/virt-diff +-/bash/virt-edit +-/bash/virt-filesystems +-/bash/virt-format +-/bash/virt-get-kernel +-/bash/virt-inspector +-/bash/virt-log +-/bash/virt-ls +-/bash/virt-resize +-/bash/virt-sysprep +-/bash/virt-sparsify +-/bash/virt-tail + /bash/virt-tar-in + /bash/virt-tar-out +-/bash/virt-win-reg + /build-aux/.gitignore + /build-aux/ar-lib + /build-aux/compile +diff --git a/bash/Makefile.am b/bash/Makefile.am +index 23933806e..86f38d4af 100644 +--- a/bash/Makefile.am ++++ b/bash/Makefile.am +@@ -20,35 +20,16 @@ include $(top_srcdir)/subdir-rules.mk + scripts = \ + guestfish \ + guestmount \ ++ guestunmount \ + libguestfs-test-tool \ +- virt-alignment-scan \ + virt-rescue + + # Some of the scripts are simply symbolic links. + symlinks = \ +- guestunmount \ +- virt-builder \ +- virt-cat \ + virt-copy-in \ + virt-copy-out \ +- virt-customize \ +- virt-diff \ +- virt-df \ +- virt-dib \ +- virt-edit \ +- virt-filesystems \ +- virt-format \ +- virt-get-kernel \ +- virt-inspector \ +- virt-log \ +- virt-ls \ +- virt-resize \ +- virt-sparsify \ +- virt-sysprep \ +- virt-tail \ + virt-tar-in \ +- virt-tar-out \ +- virt-win-reg ++ virt-tar-out + + # Note: Don't distribute the symbolic links, only the real files. + EXTRA_DIST = \ +@@ -59,26 +40,6 @@ EXTRA_DIST = \ + CLEANFILES += \ + $(symlinks) + +-# Any tool that has --short-options and --long-options only is handled +-# by this common script. +-virt-win-reg: +- rm -f $@ +- $(LN_S) libguestfs-test-tool $@ +- +-# Any tool that has --short-options and --long-options and a few +-# common options like -d is handled by this common script. However +-# this script cannot deal with commands that use --ro/--rw +-# (eg. virt-rescue), nor commands that have lots of exceptions +-# (eg. guestfish). Those tools have to be handled individually. +-guestunmount \ +-virt-builder virt-cat virt-customize virt-df virt-dib virt-diff \ +-virt-edit virt-filesystems virt-format virt-get-kernel virt-inspector \ +-virt-log virt-ls \ +-virt-resize virt-sparsify virt-sysprep \ +-virt-tail: +- rm -f $@ +- $(LN_S) virt-alignment-scan $@ +- + # guestfish is handled specially. + virt-copy-in virt-copy-out virt-tar-in virt-tar-out: + rm -f $@ +diff --git a/bash/virt-alignment-scan b/bash/guestunmount +similarity index 100% +rename from bash/virt-alignment-scan +rename to bash/guestunmount +-- +2.29.0.rc2 + diff --git a/libguestfs-php8.patch b/libguestfs-php8.patch deleted file mode 100644 index 5fbd871..0000000 --- a/libguestfs-php8.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff -up ./generator/php.ml.php8 ./generator/php.ml ---- ./generator/php.ml.php8 2021-03-05 12:58:48.985383761 +0100 -+++ ./generator/php.ml 2021-03-05 13:00:10.731000947 +0100 -@@ -98,9 +98,15 @@ and generate_php_c () = - - static int res_guestfs_h; - -+/* removed from PHP 8 */ -+#ifndef TSRMLS_CC -+#define TSRMLS_DC -+#define TSRMLS_CC -+#endif -+ - #if ZEND_MODULE_API_NO >= 20151012 - # define GUESTFS_RETURN_STRING(x, duplicate) \\ -- do { if (duplicate) RETURN_STRING(x) else { RETVAL_STRING(x); efree ((char *)x); return; } } while (0) -+ do { if (duplicate) { RETURN_STRING(x); } else { RETVAL_STRING(x); efree ((char *)x); return; } } while (0) - # define guestfs_add_assoc_string(arg, key, str, dup) \\ - add_assoc_string(arg, key, str) - # define guestfs_add_assoc_stringl(arg, key, str, len, dup) \\ diff --git a/libguestfs.spec b/libguestfs.spec index 808b936..5d0b8b6 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -55,8 +55,8 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 -Version: 1.45.1 -Release: 6%{?dist} +Version: 1.45.2 +Release: 1%{?dist} License: LGPLv2+ # Build only for architectures that have a kernel @@ -86,22 +86,15 @@ Source7: libguestfs.keyring # Maintainer script which helps with handling patches. Source8: copy-patches.sh -# Trivial fix for PHP 8 (upstream in libguestfs >= 1.45.2) -Patch0: %{name}-php8.patch - -# Remove dependency on perl(Sys::Virt) (upstream in libguestfs >= 1.45.2) -Patch1: 0001-tests-Remove-dependency-on-Sys-Virt.patch - -# Fix -cpu max mode with libvirt backend. -# Upstream in libguestfs >= 1.45.2. -# Requires libvirt >= 7.1.0 -Patch2: 0001-appliance-Use-cpu-mode-maximum-for-cpu-max-on-libvir.patch +# Upstream patches since 1.45.2 was released fixing various build issues. +Patch1: 0001-Don-t-include-huge-ChangeLog-in-the-tarball.patch +Patch2: 0002-bash-completion-Remove-completion-scripts-for-tools.patch %if 0%{patches_touch_autotools} BuildRequires: autoconf, automake, libtool, gettext-devel %endif -# Basic build requirements for the library and virt tools. +# Basic build requirements. BuildRequires: gcc, gcc-c++ BuildRequires: make BuildRequires: rpcgen @@ -122,7 +115,7 @@ BuildRequires: glibc-static BuildRequires: libselinux-utils BuildRequires: libselinux-devel BuildRequires: fuse, fuse-devel -BuildRequires: pcre-devel +BuildRequires: pcre2-devel BuildRequires: file-devel BuildRequires: libvirt-devel BuildRequires: gperf @@ -153,11 +146,8 @@ BuildRequires: systemd-devel BuildRequires: bash-completion BuildRequires: /usr/bin/ping BuildRequires: /usr/bin/wget -BuildRequires: curl BuildRequires: xz BuildRequires: /usr/bin/qemu-img -BuildRequires: perl(Win::Hivex) -BuildRequires: perl(Win::Hivex::Regedit) %if 0%{verify_tarball_signature} BuildRequires: gnupg2 @@ -222,8 +212,8 @@ BuildRequires: bzip2 BuildRequires: coreutils BuildRequires: cpio BuildRequires: cryptsetup -BuildRequires: curl %if !0%{?rhel} +BuildRequires: curl BuildRequires: debootstrap %endif BuildRequires: dhclient @@ -250,7 +240,9 @@ BuildRequires: iproute BuildRequires: iputils BuildRequires: kernel BuildRequires: kmod +%if !0%{?rhel} BuildRequires: kpartx +%endif BuildRequires: less BuildRequires: libcap %if !0%{?rhel} @@ -269,7 +261,7 @@ BuildRequires: ntfs-3g ntfsprogs ntfs-3g-system-compression BuildRequires: openssh-clients BuildRequires: parted BuildRequires: pciutils -BuildRequires: pcre +BuildRequires: pcre2 BuildRequires: policycoreutils BuildRequires: procps BuildRequires: psmisc @@ -290,7 +282,9 @@ BuildRequires: tar BuildRequires: udev BuildRequires: util-linux BuildRequires: vim-minimal +%if !0%{?rhel} BuildRequires: which +%endif BuildRequires: xfsprogs BuildRequires: xz BuildRequires: yajl @@ -313,7 +307,7 @@ Requires: augeas-libs%{?_isa} >= 1.7.0 Requires: libacl%{?_isa} Requires: libcap%{?_isa} Requires: hivex%{?_isa} >= 1.3.10 -Requires: pcre%{?_isa} +Requires: pcre2%{?_isa} Requires: libselinux%{?_isa} Requires: systemd-libs%{?_isa} Requires: yajl%{?_isa} @@ -344,12 +338,12 @@ Requires: selinux-policy >= 3.11.1-63 Requires: edk2-aarch64 %endif -# For UML backend (this backend only works on x86). -# UML has been broken upstream (in the kernel) for a while, so don't -# include this. Note that uml_utilities also depends on Perl. -#% ifarch % {ix86} x86_64 -#Requires: uml_utilities -#% endif +# For guestfish. +#Requires: /usr/bin/emacs #theoretically, but too large +Requires: /usr/bin/hexedit +Requires: /usr/bin/less +Requires: /usr/bin/man +Requires: /usr/bin/vi # https://fedoraproject.org/wiki/Packaging:No_Bundled_Libraries#Packages_granted_exceptions Provides: bundled(gnulib) @@ -363,29 +357,15 @@ Conflicts: libguestfs-winsupport < 7.2 %endif - %description Libguestfs is a library for accessing and modifying virtual machine disk images. http://libguestfs.org -It can be used to make batch configuration changes to guests, get disk -used/free statistics (virt-df), perform backups and guest clones, -change registry/UUID/hostname info, build guests from scratch -(virt-builder) and much more. - Libguestfs uses Linux kernel and qemu code, and can access any type of guest filesystem that Linux and qemu can, including but not limited to: ext2/3/4, btrfs, FAT and NTFS, LVM, many different disk partition schemes, qcow, qcow2, vmdk. -Libguestfs is split into several subpackages. The basic subpackages are: - - libguestfs C library - libguestfs-tools virt-* tools, guestfish and guestmount (FUSE) - libguestfs-tools-c only the subset of virt tools written in C - (for reduced dependencies) - virt-dib safe and secure diskimage-builder replacement - For enhanced features, install: %if !0%{?rhel} @@ -442,6 +422,18 @@ Requires: %{name}-tools-c = %{epoch}:%{version}-%{release} for %{name}. +%if !0%{?rhel} +%package dib +Summary: Additional tools for virt-dib +License: LGPLv2+ +Requires: %{name}-tools-c = %{epoch}:%{version}-%{release} + +%description dib +This adds extra packages needed by virt-dib to %{name}. You should +normally install the virt-dib package which depends on this one. +%endif + + %if !0%{?rhel} %package forensics Summary: Filesystem forensics support for %{name} @@ -481,13 +473,14 @@ disk images containing HFS+ / Mac OS Extended filesystems. %package rescue -Summary: Additional tools for virt-rescue +Summary: virt-rescue shell License: LGPLv2+ Requires: %{name}-tools-c = %{epoch}:%{version}-%{release} %description rescue -This adds additional tools to use inside the virt-rescue shell, -such as ssh, network utilities, editors and debugging utilities. +This adds the virt-rescue shell which is a "rescue disk" for virtual +machines, and additional tools to use inside the shell such as ssh, +network utilities, editors and debugging utilities. %package rsync @@ -556,144 +549,6 @@ The only reason this is a separate package is to avoid core libguestfs having to depend on Perl. See https://bugzilla.redhat.com/1194158 -%package tools-c -Summary: System administration tools for virtual machines -License: GPLv2+ -Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release} - -# For guestfish: -#Requires: /usr/bin/emacs #theoretically, but too large -Requires: /usr/bin/hexedit -Requires: /usr/bin/less -Requires: /usr/bin/man -Requires: /usr/bin/vi - -# For virt-builder: -Requires: gnupg2 -Requires: xz -#Requires: nbdkit, nbdkit-plugin-xz -Requires: curl - -# For virt-builder-repository: -Suggests: osinfo-db - -# Some Fedora, and all RHEL 7, use XFS: -Recommends: libguestfs-xfs - -# For virt-edit and virt-customize: -Suggests: perl - - -%description tools-c -This package contains miscellaneous system administrator command line -tools for virtual machines. - -Note that you should install %{name}-tools (which pulls in -this package). This package is only used directly when you want -to avoid dependencies on Perl. - - -%package tools -Summary: System administration tools for virtual machines -License: GPLv2+ -BuildArch: noarch -Requires: %{name} = %{epoch}:%{version}-%{release} -Requires: %{name}-tools-c = %{epoch}:%{version}-%{release} - - -%description tools -This package contains miscellaneous system administrator command line -tools for virtual machines. - -Guestfish is the Filesystem Interactive SHell, for accessing and -modifying virtual machine disk images from the command line and shell -scripts. - -The guestmount command lets you mount guest filesystems on the host -using FUSE and %{name}. - -Virt-alignment-scan scans virtual machines looking for partition -alignment problems. - -Virt-builder is a command line tool for rapidly making disk images -of popular free operating systems. - -Virt-cat is a command line tool to display the contents of a file in a -virtual machine. - -Virt-copy-in and virt-copy-out are command line tools for uploading -and downloading files and directories to and from virtual machines. - -Virt-customize is a command line tool for customizing virtual machine -disk images. - -Virt-df is a command line tool to display free space on virtual -machine filesystems. Unlike other tools, it doesn’t just display the -amount of space allocated to a virtual machine, but can look inside -the virtual machine to see how much space is really being used. It is -like the df(1) command, but for virtual machines, except that it also -works for Windows virtual machines. - -Virt-diff shows the differences between virtual machines. - -Virt-edit is a command line tool to edit the contents of a file in a -virtual machine. - -Virt-filesystems is a command line tool to display the filesystems, -partitions, block devices, LVs, VGs and PVs found in a disk image -or virtual machine. It replaces the deprecated programs -virt-list-filesystems and virt-list-partitions with a much more -capable tool. - -Virt-format is a command line tool to erase and make blank disks. - -Virt-get-kernel extracts a kernel/initrd from a disk image. - -Virt-inspector examines a virtual machine and tries to determine the -version of the OS, the kernel version, what drivers are installed, -whether the virtual machine is fully virtualized (FV) or -para-virtualized (PV), what applications are installed and more. - -Virt-log is a command line tool to display the log files from a -virtual machine. - -Virt-ls is a command line tool to list out files in a virtual machine. - -Virt-make-fs is a command line tool to build a filesystem out of -a collection of files or a tarball. - -Virt-rescue provides a rescue shell for making interactive, -unstructured fixes to virtual machines. - -Virt-resize can resize existing virtual machine disk images. - -Virt-sparsify makes virtual machine disk images sparse (thin-provisioned). - -Virt-sysprep lets you reset or unconfigure virtual machines in -preparation for cloning them. - -Virt-tail follows (tails) a log file within a guest, like 'tail -f'. - -Virt-tar-in and virt-tar-out are archive, backup and upload tools -for virtual machines. These replace the deprecated program virt-tar. - -Virt-win-reg lets you look at and modify the Windows Registry of -Windows virtual machines. - - -%package -n virt-dib -Summary: Safe and secure diskimage-builder replacement -License: GPLv2+ - -Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release} - - -%description -n virt-dib -Virt-dib is a safe and secure alternative to the OpenStack -diskimage-builder command. It is compatible with most -diskimage-builder elements. - - %package bash-completion Summary: Bash tab-completion scripts for %{name} tools BuildArch: noarch @@ -912,13 +767,8 @@ fi --disable-erlang \ $extra -# Building index-parse.c by hand works around a race condition in the -# autotools cruft, where two or more copies of yacc race with each -# other, resulting in a corrupted file. -# # 'INSTALLDIRS' ensures that Perl and Ruby libs are installed in the # vendor dir not the site dir. -make -j1 -C builder index-parse.c make V=1 INSTALLDIRS=vendor %{?_smp_mflags} @@ -937,11 +787,6 @@ fi %install -# This file is creeping over 1 MB uncompressed, and since it is -# included in the -devel subpackage, compress it to reduce -# installation size. -gzip -9 ChangeLog - # 'INSTALLDIRS' ensures that Perl and Ruby libs are installed in the # vendor dir not the site dir. make DESTDIR=$RPM_BUILD_ROOT INSTALLDIRS=vendor install @@ -958,14 +803,6 @@ find $RPM_BUILD_ROOT -name .packlist -delete find $RPM_BUILD_ROOT -name '*.bs' -delete find $RPM_BUILD_ROOT -name 'bindtests.pl' -delete -# Remove obsolete binaries (RHBZ#1213298). -rm $RPM_BUILD_ROOT%{_bindir}/virt-list-filesystems -rm $RPM_BUILD_ROOT%{_bindir}/virt-list-partitions -rm $RPM_BUILD_ROOT%{_bindir}/virt-tar -rm $RPM_BUILD_ROOT%{_mandir}/man1/virt-list-filesystems.1* -rm $RPM_BUILD_ROOT%{_mandir}/man1/virt-list-partitions.1* -rm $RPM_BUILD_ROOT%{_mandir}/man1/virt-tar.1* - # golang: Ignore what libguestfs upstream installs, and just copy the # source files to %%{_datadir}/gocode/src. %ifarch %{golang_arches} @@ -974,37 +811,47 @@ mkdir -p $RPM_BUILD_ROOT%{_datadir}/gocode/src cp -a golang/src/libguestfs.org $RPM_BUILD_ROOT%{_datadir}/gocode/src %endif -# Move installed documentation back to the source directory so -# we can install it using a %%doc rule. -mv $RPM_BUILD_ROOT%{_docdir}/libguestfs installed-docs -gzip --best installed-docs/*.xml - # Split up the monolithic packages file in the supermin appliance so # we can install dependencies in subpackages. pushd $RPM_BUILD_ROOT%{_libdir}/guestfs/supermin.d +function remove +{ + grep -Ev "^$1$" < packages > packages-t + mv packages-t packages +} + function move_to { if ! grep -Esq "^$1$" packages; then echo "move_to $1: package name not found in packages file" exit 1 fi - grep -Ev "^$1$" < packages > packages-t - mv packages-t packages + remove "$1" echo "$1" >> "$2" } -move_to curl zz-packages-dib %if !0%{?rhel} +move_to curl zz-packages-dib move_to debootstrap zz-packages-dib -%endif move_to kpartx zz-packages-dib move_to qemu-img zz-packages-dib move_to which zz-packages-dib +%else +remove curl +remove debootstrap +remove kpartx +remove qemu-img +remove which +%endif %if !0%{?rhel} move_to sleuthkit zz-packages-forensics move_to gfs2-utils zz-packages-gfs2 move_to hfsplus-tools zz-packages-hfsplus +%else +remove sleuthkit +remove gfs2-utils +remove hfsplus-tools %endif move_to iputils zz-packages-rescue move_to lsof zz-packages-rescue @@ -1018,6 +865,8 @@ move_to xfsprogs zz-packages-xfs %ifnarch %{arm} aarch64 s390 s390x riscv64 move_to zfs-fuse zz-packages-zfs %endif +%else +remove zfs-fuse %endif %if !0%{?rhel} @@ -1052,23 +901,39 @@ rm ocaml/html/.gitignore %files -f %{name}.lang %doc COPYING README +%{_bindir}/guestfish +%{_bindir}/guestmount +%{_bindir}/guestunmount %{_bindir}/libguestfs-test-tool +%{_bindir}/virt-copy-in +%{_bindir}/virt-copy-out +%{_bindir}/virt-tar-in +%{_bindir}/virt-tar-out %{_libdir}/guestfs/ %exclude %{_libdir}/guestfs/supermin.d/zz-packages-* %{_libdir}/libguestfs.so.* +%{_mandir}/man1/guestfish.1* %{_mandir}/man1/guestfs-faq.1* %{_mandir}/man1/guestfs-performance.1* %{_mandir}/man1/guestfs-recipes.1* %{_mandir}/man1/guestfs-release-notes-1*.1* %{_mandir}/man1/guestfs-release-notes-historical.1* %{_mandir}/man1/guestfs-security.1* +%{_mandir}/man1/guestmount.1* +%{_mandir}/man1/guestunmount.1* %{_mandir}/man1/libguestfs-test-tool.1* +%{_mandir}/man1/virt-copy-in.1* +%{_mandir}/man1/virt-copy-out.1* +%{_mandir}/man1/virt-tar-in.1* +%{_mandir}/man1/virt-tar-out.1* +%{_mandir}/man5/libguestfs-tools.conf.5* +%config %{_sysconfdir}/profile.d/guestfish.sh +%config(noreplace) %{_sysconfdir}/libguestfs-tools.conf %files devel -%doc AUTHORS BUGS ChangeLog.gz HACKING TODO README +%doc AUTHORS BUGS HACKING TODO README %doc examples/*.c -%doc installed-docs/* %{_libdir}/libguestfs.so %{_sbindir}/libguestfs-make-fixed-appliance %{_mandir}/man1/guestfs-building.1* @@ -1083,6 +948,11 @@ rm ocaml/html/.gitignore %{_libdir}/pkgconfig/libguestfs.pc +%if !0%{?rhel} +%files dib +%{_libdir}/guestfs/supermin.d/zz-packages-dib +%endif + %if !0%{?rhel} %files forensics %{_libdir}/guestfs/supermin.d/zz-packages-forensics @@ -1105,6 +975,8 @@ rm ocaml/html/.gitignore %files rescue %{_libdir}/guestfs/supermin.d/zz-packages-rescue +%{_bindir}/virt-rescue +%{_mandir}/man1/virt-rescue.1* %if !0%{?rhel} %files ufs @@ -1126,93 +998,17 @@ rm ocaml/html/.gitignore # no files -%files tools-c -%doc README -%config(noreplace) %{_sysconfdir}/libguestfs-tools.conf -%{_sysconfdir}/virt-builder -%dir %{_sysconfdir}/xdg/virt-builder -%dir %{_sysconfdir}/xdg/virt-builder/repos.d -%config %{_sysconfdir}/xdg/virt-builder/repos.d/* -%config %{_sysconfdir}/profile.d/guestfish.sh -%{_mandir}/man5/libguestfs-tools.conf.5* -%{_bindir}/guestfish -%{_mandir}/man1/guestfish.1* -%{_bindir}/guestmount -%{_mandir}/man1/guestmount.1* -%{_bindir}/guestunmount -%{_mandir}/man1/guestunmount.1* -%{_bindir}/virt-alignment-scan -%{_mandir}/man1/virt-alignment-scan.1* -%{_bindir}/virt-builder -%{_mandir}/man1/virt-builder.1* -%{_bindir}/virt-builder-repository -%{_mandir}/man1/virt-builder-repository.1* -%{_bindir}/virt-cat -%{_mandir}/man1/virt-cat.1* -%{_bindir}/virt-copy-in -%{_mandir}/man1/virt-copy-in.1* -%{_bindir}/virt-copy-out -%{_mandir}/man1/virt-copy-out.1* -%{_bindir}/virt-customize -%{_mandir}/man1/virt-customize.1* -%{_bindir}/virt-df -%{_mandir}/man1/virt-df.1* -%{_bindir}/virt-diff -%{_mandir}/man1/virt-diff.1* -%{_bindir}/virt-edit -%{_mandir}/man1/virt-edit.1* -%{_bindir}/virt-filesystems -%{_mandir}/man1/virt-filesystems.1* -%{_bindir}/virt-format -%{_mandir}/man1/virt-format.1* -%{_bindir}/virt-get-kernel -%{_mandir}/man1/virt-get-kernel.1* -%{_bindir}/virt-index-validate -%{_mandir}/man1/virt-index-validate.1* -%{_bindir}/virt-inspector -%{_mandir}/man1/virt-inspector.1* -%{_bindir}/virt-log -%{_mandir}/man1/virt-log.1* -%{_bindir}/virt-ls -%{_mandir}/man1/virt-ls.1* -%{_bindir}/virt-make-fs -%{_mandir}/man1/virt-make-fs.1* -%{_bindir}/virt-rescue -%{_mandir}/man1/virt-rescue.1* -%{_bindir}/virt-resize -%{_mandir}/man1/virt-resize.1* -%{_bindir}/virt-sparsify -%{_mandir}/man1/virt-sparsify.1* -%{_bindir}/virt-sysprep -%{_mandir}/man1/virt-sysprep.1* -%{_bindir}/virt-tail -%{_mandir}/man1/virt-tail.1* -%{_bindir}/virt-tar-in -%{_mandir}/man1/virt-tar-in.1* -%{_bindir}/virt-tar-out -%{_mandir}/man1/virt-tar-out.1* - - -%files tools -%doc README -%{_bindir}/virt-win-reg -%{_mandir}/man1/virt-win-reg.1* - - -%files -n virt-dib -%doc COPYING README -%{_bindir}/virt-dib -%{_mandir}/man1/virt-dib.1* -%{_libdir}/guestfs/supermin.d/zz-packages-dib - - %files bash-completion %dir %{_datadir}/bash-completion/completions %{_datadir}/bash-completion/completions/guestfish %{_datadir}/bash-completion/completions/guestmount %{_datadir}/bash-completion/completions/guestunmount %{_datadir}/bash-completion/completions/libguestfs-test-tool -%{_datadir}/bash-completion/completions/virt-* +%{_datadir}/bash-completion/completions/virt-copy-in +%{_datadir}/bash-completion/completions/virt-copy-out +%{_datadir}/bash-completion/completions/virt-rescue +%{_datadir}/bash-completion/completions/virt-tar-in +%{_datadir}/bash-completion/completions/virt-tar-out %files -n ocaml-%{name} @@ -1317,6 +1113,15 @@ rm ocaml/html/.gitignore %changelog +* Tue Mar 23 2021 Richard W.M. Jones - 1:1.45.2-1 +- New upstream version 1.45.2. +- This drops the tools. Now packaged as guestfs-tools. +- guestfish, guestmount, guestunmount now packaged with libguestfs. +- virt-rescue now packaged in libguestfs-rescue. +- Drop ChangeLog file. +- Remove virt-dib in RHEL 9. +- Depend on PCRE2 instead of PCRE. + * Thu Mar 18 2021 Richard W.M. Jones - 1:1.45.1-6 - Drop dependency on perl(Sys::Virt). - Fix -cpu max and require libvirt >= 7.1.0. @@ -2132,7 +1937,6 @@ rm ocaml/html/.gitignore * Thu Jul 09 2015 Richard W.M. Jones - 1:1.29.50-1 - New upstream version 1.29.50. - - Add virt-dib. * Thu Jul 02 2015 Richard W.M. Jones - 1:1.29.49-1 diff --git a/sources b/sources index 0b47c86..e98ceae 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (libguestfs-1.45.1.tar.gz) = 8a4a39908d0697bd0b1dd99348b830e500e61bde6768f8518befc025ae67ee9ac44ada8795c54cb6faa8e95049b1c14b46887372b9e0569a52e9219c4fd54d52 -SHA512 (libguestfs-1.45.1.tar.gz.sig) = e2ade5f67402b618f60bb2bf4264f23528a6cf27537091a0ccfd5bf045901eab8aa2d0b6db89edee0c9141837967f7e9f769ffd4f49bca9c950fadeb7617eb01 +SHA512 (libguestfs-1.45.2.tar.gz) = ff8a9ad7f420e2e10e0b91258d2cd12b3f00bdceed1c71b0d0b8f55b2275ce0e60c123066d66669a041400327abed6ddea7d8b0930c33f916e76a6ffe6ada8be +SHA512 (libguestfs-1.45.2.tar.gz.sig) = e4e6d58f241073338f2ae810e4eb2c7747b8889914fde3d1e67ddb447e164955a62afc1f1b7d9fba7fa208d87980ebbe81ea4fd1610db3bc3b47a09ef2dab512 From 3c9192390116982a087bdc120dd86b7b55789e38 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 26 Mar 2021 09:56:05 +0000 Subject: [PATCH 027/243] Remove no longer needed requires on libguestfs-tools-c. --- libguestfs.spec | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index 5d0b8b6..625a9dc 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -56,7 +56,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.45.2 -Release: 1%{?dist} +Release: 2%{?dist} License: LGPLv2+ # Build only for architectures that have a kernel @@ -412,9 +412,9 @@ Summary: Development tools and libraries for %{name} Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release} Requires: pkgconfig -# For libguestfs-make-fixed-appliance. +# libguestfs-make-fixed-appliance requires guestfish. Requires: xz -Requires: %{name}-tools-c = %{epoch}:%{version}-%{release} +Requires: %{name} = %{epoch}:%{version}-%{release} %description devel @@ -426,7 +426,6 @@ for %{name}. %package dib Summary: Additional tools for virt-dib License: LGPLv2+ -Requires: %{name}-tools-c = %{epoch}:%{version}-%{release} %description dib This adds extra packages needed by virt-dib to %{name}. You should @@ -475,7 +474,6 @@ disk images containing HFS+ / Mac OS Extended filesystems. %package rescue Summary: virt-rescue shell License: LGPLv2+ -Requires: %{name}-tools-c = %{epoch}:%{version}-%{release} %description rescue This adds the virt-rescue shell which is a "rescue disk" for virtual @@ -553,7 +551,6 @@ having to depend on Perl. See https://bugzilla.redhat.com/1194158 Summary: Bash tab-completion scripts for %{name} tools BuildArch: noarch Requires: bash-completion >= 2.0 -Requires: %{name}-tools-c = %{epoch}:%{version}-%{release} %description bash-completion @@ -1113,6 +1110,9 @@ rm ocaml/html/.gitignore %changelog +* Fri Mar 26 2021 Richard W.M. Jones - 1:1.45.2-2 +- Remove no longer needed requires on libguestfs-tools-c. + * Tue Mar 23 2021 Richard W.M. Jones - 1:1.45.2-1 - New upstream version 1.45.2. - This drops the tools. Now packaged as guestfs-tools. From 8c3b34551ee40ac1a7f8d5a5ba2d5b36cc32ee05 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 29 Mar 2021 19:49:25 +0100 Subject: [PATCH 028/243] New upstream release 1.45.3. --- ...nclude-huge-ChangeLog-in-the-tarball.patch | 60 --------- ...-Remove-completion-scripts-for-tools.patch | 125 ------------------ libguestfs.spec | 13 +- sources | 4 +- 4 files changed, 8 insertions(+), 194 deletions(-) delete mode 100644 0001-Don-t-include-huge-ChangeLog-in-the-tarball.patch delete mode 100644 0002-bash-completion-Remove-completion-scripts-for-tools.patch diff --git a/0001-Don-t-include-huge-ChangeLog-in-the-tarball.patch b/0001-Don-t-include-huge-ChangeLog-in-the-tarball.patch deleted file mode 100644 index 757df37..0000000 --- a/0001-Don-t-include-huge-ChangeLog-in-the-tarball.patch +++ /dev/null @@ -1,60 +0,0 @@ -From eb53d74ba2e5e9086a5ac8679d55e6a338397e07 Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Tue, 23 Mar 2021 10:00:12 +0000 -Subject: [PATCH 1/2] Don't include huge ChangeLog in the tarball. - -Adds a few megabytes which people can easily get from the git -repository. ---- - .gitignore | 1 - - Makefile.am | 9 +-------- - 2 files changed, 1 insertion(+), 9 deletions(-) - -diff --git a/.gitignore b/.gitignore -index 716a9b2cd..f6e7d18e5 100644 ---- a/.gitignore -+++ b/.gitignore -@@ -81,7 +81,6 @@ Makefile.in - /build-aux/test-driver - /build-aux/ylwrap - /bundled/ocaml-augeas/.depend --/ChangeLog - /compile - /config.cache - /config.guess -diff --git a/Makefile.am b/Makefile.am -index 9feac761b..743d2fbad 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -215,15 +215,13 @@ maintainer-upload-website: - # When doing 'make dist' update a few files automatically. - # - # BUGS - list of bugs (created from Bugzilla) --# ChangeLog - changelog (created from git) - # docs/C_SOURCE_FILES - # - source files scanned for internal documentation - # po/POTFILES - files with ordinary extensions, but not OCaml files - # po/POTFILES-ml - OCaml files, which need a special tool to translate - --dist-hook: BUGS ChangeLog docs/C_SOURCE_FILES po/POTFILES po/POTFILES-ml -+dist-hook: BUGS docs/C_SOURCE_FILES po/POTFILES po/POTFILES-ml - cp BUGS $(distdir)/BUGS -- cp ChangeLog $(distdir)/ChangeLog - - BUGS: configure.ac - rm -f $@ $@-t -@@ -231,11 +229,6 @@ BUGS: configure.ac - $(top_srcdir)/update-bugs.sh > $@-t - mv $@-t $@ - --ChangeLog: configure.ac -- rm -f $@ $@-t -- git log --decorate=false > $@-t -- mv $@-t $@ -- - # This has to be in the top-level Makefile.am so that we have access - # to DIST_SUBDIRS. - docs/C_SOURCE_FILES: configure.ac --- -2.29.0.rc2 - diff --git a/0002-bash-completion-Remove-completion-scripts-for-tools.patch b/0002-bash-completion-Remove-completion-scripts-for-tools.patch deleted file mode 100644 index 4ccac0b..0000000 --- a/0002-bash-completion-Remove-completion-scripts-for-tools.patch +++ /dev/null @@ -1,125 +0,0 @@ -From 4991fe525961450704bbc80b5f2095bc8499f767 Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Tue, 23 Mar 2021 11:08:42 +0000 -Subject: [PATCH 2/2] bash-completion: Remove completion scripts for tools. - -These have moved to guestfs-tools. - -Fixes: commit 733d2182b64df7abc5c5cd7d78177baa6079628c ---- - .gitignore | 19 ---------- - bash/Makefile.am | 43 +--------------------- - bash/{virt-alignment-scan => guestunmount} | 0 - 3 files changed, 2 insertions(+), 60 deletions(-) - rename bash/{virt-alignment-scan => guestunmount} (100%) - -diff --git a/.gitignore b/.gitignore -index f6e7d18e5..a37ab0593 100644 ---- a/.gitignore -+++ b/.gitignore -@@ -45,29 +45,10 @@ Makefile.in - /appliance/supermin.d - /AUTHORS - /autom4te.cache --/bash/guestunmount --/bash/virt-builder --/bash/virt-cat - /bash/virt-copy-in - /bash/virt-copy-out --/bash/virt-customize --/bash/virt-df --/bash/virt-dib --/bash/virt-diff --/bash/virt-edit --/bash/virt-filesystems --/bash/virt-format --/bash/virt-get-kernel --/bash/virt-inspector --/bash/virt-log --/bash/virt-ls --/bash/virt-resize --/bash/virt-sysprep --/bash/virt-sparsify --/bash/virt-tail - /bash/virt-tar-in - /bash/virt-tar-out --/bash/virt-win-reg - /build-aux/.gitignore - /build-aux/ar-lib - /build-aux/compile -diff --git a/bash/Makefile.am b/bash/Makefile.am -index 23933806e..86f38d4af 100644 ---- a/bash/Makefile.am -+++ b/bash/Makefile.am -@@ -20,35 +20,16 @@ include $(top_srcdir)/subdir-rules.mk - scripts = \ - guestfish \ - guestmount \ -+ guestunmount \ - libguestfs-test-tool \ -- virt-alignment-scan \ - virt-rescue - - # Some of the scripts are simply symbolic links. - symlinks = \ -- guestunmount \ -- virt-builder \ -- virt-cat \ - virt-copy-in \ - virt-copy-out \ -- virt-customize \ -- virt-diff \ -- virt-df \ -- virt-dib \ -- virt-edit \ -- virt-filesystems \ -- virt-format \ -- virt-get-kernel \ -- virt-inspector \ -- virt-log \ -- virt-ls \ -- virt-resize \ -- virt-sparsify \ -- virt-sysprep \ -- virt-tail \ - virt-tar-in \ -- virt-tar-out \ -- virt-win-reg -+ virt-tar-out - - # Note: Don't distribute the symbolic links, only the real files. - EXTRA_DIST = \ -@@ -59,26 +40,6 @@ EXTRA_DIST = \ - CLEANFILES += \ - $(symlinks) - --# Any tool that has --short-options and --long-options only is handled --# by this common script. --virt-win-reg: -- rm -f $@ -- $(LN_S) libguestfs-test-tool $@ -- --# Any tool that has --short-options and --long-options and a few --# common options like -d is handled by this common script. However --# this script cannot deal with commands that use --ro/--rw --# (eg. virt-rescue), nor commands that have lots of exceptions --# (eg. guestfish). Those tools have to be handled individually. --guestunmount \ --virt-builder virt-cat virt-customize virt-df virt-dib virt-diff \ --virt-edit virt-filesystems virt-format virt-get-kernel virt-inspector \ --virt-log virt-ls \ --virt-resize virt-sparsify virt-sysprep \ --virt-tail: -- rm -f $@ -- $(LN_S) virt-alignment-scan $@ -- - # guestfish is handled specially. - virt-copy-in virt-copy-out virt-tar-in virt-tar-out: - rm -f $@ -diff --git a/bash/virt-alignment-scan b/bash/guestunmount -similarity index 100% -rename from bash/virt-alignment-scan -rename to bash/guestunmount --- -2.29.0.rc2 - diff --git a/libguestfs.spec b/libguestfs.spec index 625a9dc..1b91bab 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -41,7 +41,7 @@ %global verify_tarball_signature 1 # If there are patches which touch autotools files, set this to 1. -%global patches_touch_autotools 1 +%global patches_touch_autotools %{nil} # The source directory. %global source_directory 1.45-development @@ -55,8 +55,8 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 -Version: 1.45.2 -Release: 2%{?dist} +Version: 1.45.3 +Release: 1%{?dist} License: LGPLv2+ # Build only for architectures that have a kernel @@ -86,10 +86,6 @@ Source7: libguestfs.keyring # Maintainer script which helps with handling patches. Source8: copy-patches.sh -# Upstream patches since 1.45.2 was released fixing various build issues. -Patch1: 0001-Don-t-include-huge-ChangeLog-in-the-tarball.patch -Patch2: 0002-bash-completion-Remove-completion-scripts-for-tools.patch - %if 0%{patches_touch_autotools} BuildRequires: autoconf, automake, libtool, gettext-devel %endif @@ -1110,6 +1106,9 @@ rm ocaml/html/.gitignore %changelog +* Mon Mar 29 2021 Richard W.M. Jones - 1:1.45.3-1 +- New upstream release 1.45.3. + * Fri Mar 26 2021 Richard W.M. Jones - 1:1.45.2-2 - Remove no longer needed requires on libguestfs-tools-c. diff --git a/sources b/sources index e98ceae..4b6006f 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (libguestfs-1.45.2.tar.gz) = ff8a9ad7f420e2e10e0b91258d2cd12b3f00bdceed1c71b0d0b8f55b2275ce0e60c123066d66669a041400327abed6ddea7d8b0930c33f916e76a6ffe6ada8be -SHA512 (libguestfs-1.45.2.tar.gz.sig) = e4e6d58f241073338f2ae810e4eb2c7747b8889914fde3d1e67ddb447e164955a62afc1f1b7d9fba7fa208d87980ebbe81ea4fd1610db3bc3b47a09ef2dab512 +SHA512 (libguestfs-1.45.3.tar.gz) = b8f3dc9ffa49b50769f8f11d65cf3c8e645b35ee05ea2563b19daa8bc743e7f3386754cb5ffd2447f55ade4b57e9c4f98e483ecffc548652659e1260bf2e6e0b +SHA512 (libguestfs-1.45.3.tar.gz.sig) = bce2ed6fd987baf82ebdd7d97cf1b1a07f62991e07de45d4f22d20c5180120c5b443b690c1db6c00a71cb14fb66b5a950de227d9c7fea2c9ca32afba33818216 From cc9dde2cb7565091fbc68fd82fee8975ded0238a Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 29 Mar 2021 21:35:44 +0100 Subject: [PATCH 029/243] Add proper dependencies on librpm, remove BDB. --- libguestfs.spec | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index 1b91bab..e3c59d5 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -56,7 +56,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.45.3 -Release: 1%{?dist} +Release: 2%{?dist} License: LGPLv2+ # Build only for architectures that have a kernel @@ -117,7 +117,7 @@ BuildRequires: libvirt-devel BuildRequires: gperf BuildRequires: flex BuildRequires: bison -BuildRequires: libdb-utils +BuildRequires: rpm-libs BuildRequires: cpio BuildRequires: libconfig-devel BuildRequires: xz-devel @@ -262,6 +262,7 @@ BuildRequires: policycoreutils BuildRequires: procps BuildRequires: psmisc BuildRequires: qemu-img +BuildRequires: rpm-libs BuildRequires: rsync BuildRequires: scrub BuildRequires: sed @@ -302,15 +303,13 @@ Requires: supermin >= 5.1.18 Requires: augeas-libs%{?_isa} >= 1.7.0 Requires: libacl%{?_isa} Requires: libcap%{?_isa} +Requires: libselinux%{?_isa} Requires: hivex%{?_isa} >= 1.3.10 Requires: pcre2%{?_isa} -Requires: libselinux%{?_isa} +Requires: rpm-libs%{?_isa} Requires: systemd-libs%{?_isa} Requires: yajl%{?_isa} -# For core inspection API. -Requires: libdb-utils - # For core mount-local (FUSE) API. Requires: fuse @@ -1106,8 +1105,9 @@ rm ocaml/html/.gitignore %changelog -* Mon Mar 29 2021 Richard W.M. Jones - 1:1.45.3-1 +* Mon Mar 29 2021 Richard W.M. Jones - 1:1.45.3-2 - New upstream release 1.45.3. +- Add proper dependencies on librpm, remove BDB. * Fri Mar 26 2021 Richard W.M. Jones - 1:1.45.2-2 - Remove no longer needed requires on libguestfs-tools-c. From b091b5dde2c397e1be809e5b615a2d9e4d98386d Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 29 Mar 2021 21:36:56 +0100 Subject: [PATCH 030/243] BR rpm-devel to get header files. --- libguestfs.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libguestfs.spec b/libguestfs.spec index e3c59d5..70634b9 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -117,7 +117,7 @@ BuildRequires: libvirt-devel BuildRequires: gperf BuildRequires: flex BuildRequires: bison -BuildRequires: rpm-libs +BuildRequires: rpm-devel BuildRequires: cpio BuildRequires: libconfig-devel BuildRequires: xz-devel From 9da4883de42a6a749e5b6ffe4eb656082c538d2d Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 30 Mar 2021 12:05:09 +0100 Subject: [PATCH 031/243] Add downstream (RHEL-only) patches (RHBZ#1931724). --- ...L-Remove-libguestfs-live-RHBZ-798980.patch | 55 ++ ...Remove-9p-APIs-from-RHEL-RHBZ-921710.patch | 329 ++++++++++ ...upported-remote-drive-protocols-RHBZ.patch | 609 ++++++++++++++++++ ...-Remove-User-Mode-Linux-RHBZ-1144197.patch | 72 +++ ...of-libguestfs-winsupport-features-ex.patch | 69 ++ libguestfs.spec | 19 +- 6 files changed, 1152 insertions(+), 1 deletion(-) create mode 100644 0001-RHEL-Remove-libguestfs-live-RHBZ-798980.patch create mode 100644 0002-RHEL-Remove-9p-APIs-from-RHEL-RHBZ-921710.patch create mode 100644 0003-RHEL-Disable-unsupported-remote-drive-protocols-RHBZ.patch create mode 100644 0004-RHEL-Remove-User-Mode-Linux-RHBZ-1144197.patch create mode 100644 0005-RHEL-Reject-use-of-libguestfs-winsupport-features-ex.patch diff --git a/0001-RHEL-Remove-libguestfs-live-RHBZ-798980.patch b/0001-RHEL-Remove-libguestfs-live-RHBZ-798980.patch new file mode 100644 index 0000000..ec066eb --- /dev/null +++ b/0001-RHEL-Remove-libguestfs-live-RHBZ-798980.patch @@ -0,0 +1,55 @@ +From 802b515677d77936a2ae0d6e945a0364e4246002 Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Fri, 21 Dec 2012 15:50:11 +0000 +Subject: [PATCH 1/5] RHEL: Remove libguestfs live (RHBZ#798980). + +This isn't supported in RHEL. + +Disable daemon tests that require the 'unix' backend. +--- + lib/launch-unix.c | 7 +++++++ + tests/Makefile.am | 3 --- + 2 files changed, 7 insertions(+), 3 deletions(-) + +diff --git a/lib/launch-unix.c b/lib/launch-unix.c +index 0d344f9df..74dd1bb4a 100644 +--- a/lib/launch-unix.c ++++ b/lib/launch-unix.c +@@ -37,6 +37,12 @@ + static int + launch_unix (guestfs_h *g, void *datav, const char *sockpath) + { ++ error (g, ++ "launch: In RHEL, only the 'libvirt' or 'direct' method is supported.\n" ++ "In particular, \"libguestfs live\" is not supported."); ++ return -1; ++ ++#if 0 + int r, daemon_sock = -1; + struct sockaddr_un addr; + uint32_t size; +@@ -106,6 +112,7 @@ launch_unix (guestfs_h *g, void *datav, const char *sockpath) + g->conn = NULL; + } + return -1; ++#endif + } + + static int +diff --git a/tests/Makefile.am b/tests/Makefile.am +index 690e09b5e..919e2f248 100644 +--- a/tests/Makefile.am ++++ b/tests/Makefile.am +@@ -328,9 +328,6 @@ EXTRA_DIST += create/test-disk-create.sh + + check_DATA = daemon/captive-daemon.pm + +-TESTS += \ +- daemon/test-daemon-start.pl \ +- daemon/test-btrfs.pl + EXTRA_DIST += \ + daemon/test-daemon-start.pl \ + daemon/test-btrfs.pl +-- +2.30.1 + diff --git a/0002-RHEL-Remove-9p-APIs-from-RHEL-RHBZ-921710.patch b/0002-RHEL-Remove-9p-APIs-from-RHEL-RHBZ-921710.patch new file mode 100644 index 0000000..e8cc8fa --- /dev/null +++ b/0002-RHEL-Remove-9p-APIs-from-RHEL-RHBZ-921710.patch @@ -0,0 +1,329 @@ +From c8770be96ddbebd7f1f726d97aa566fb1558ce2d Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Thu, 18 Jul 2013 18:31:53 +0100 +Subject: [PATCH 2/5] RHEL: Remove 9p APIs from RHEL (RHBZ#921710). + +--- + daemon/9p.c | 182 -------------------------------------- + daemon/Makefile.am | 1 - + docs/C_SOURCE_FILES | 1 - + generator/actions_core.ml | 21 ----- + generator/proc_nr.ml | 2 - + gobject/Makefile.inc | 2 - + po/POTFILES | 2 - + tests/Makefile.am | 1 - + 8 files changed, 212 deletions(-) + delete mode 100644 daemon/9p.c + +diff --git a/daemon/9p.c b/daemon/9p.c +deleted file mode 100644 +index 743a96abd..000000000 +--- a/daemon/9p.c ++++ /dev/null +@@ -1,182 +0,0 @@ +-/* libguestfs - the guestfsd daemon +- * Copyright (C) 2011 Red Hat Inc. +- * +- * This program is free software; you can redistribute it and/or modify +- * it under the terms of the GNU General Public License as published by +- * the Free Software Foundation; either version 2 of the License, or +- * (at your option) any later version. +- * +- * This program is distributed in the hope that it will be useful, +- * but WITHOUT ANY WARRANTY; without even the implied warranty of +- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +- * GNU General Public License for more details. +- * +- * You should have received a copy of the GNU General Public License +- * along with this program; if not, write to the Free Software +- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +- */ +- +-#include +- +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +- +-#include "ignore-value.h" +- +-#include "daemon.h" +-#include "actions.h" +- +-#define BUS_PATH "/sys/bus/virtio/drivers/9pnet_virtio" +- +-static void +-modprobe_9pnet_virtio (void) +-{ +- /* Required with Linux 5.6 and maybe earlier kernels. For unclear +- * reasons the module is not an automatic dependency of the 9p +- * module so doesn't get loaded automatically. +- */ +- ignore_value (command (NULL, NULL, "modprobe", "9pnet_virtio", NULL)); +-} +- +-/* https://bugzilla.redhat.com/show_bug.cgi?id=714981#c1 */ +-char ** +-do_list_9p (void) +-{ +- CLEANUP_FREE_STRINGSBUF DECLARE_STRINGSBUF (r); +- DIR *dir; +- +- modprobe_9pnet_virtio (); +- +- dir = opendir (BUS_PATH); +- if (!dir) { +- perror ("opendir: " BUS_PATH); +- if (errno != ENOENT) { +- reply_with_perror ("opendir: " BUS_PATH); +- return NULL; +- } +- +- /* If this directory doesn't exist, it probably means that +- * the virtio driver isn't loaded. Don't return an error +- * in this case, but return an empty list. +- */ +- if (end_stringsbuf (&r) == -1) +- return NULL; +- +- return take_stringsbuf (&r); +- } +- +- while (1) { +- struct dirent *d; +- +- errno = 0; +- d = readdir (dir); +- if (d == NULL) break; +- +- if (STRPREFIX (d->d_name, "virtio")) { +- CLEANUP_FREE char *mount_tag_path = NULL; +- if (asprintf (&mount_tag_path, BUS_PATH "/%s/mount_tag", +- d->d_name) == -1) { +- reply_with_perror ("asprintf"); +- closedir (dir); +- return NULL; +- } +- +- /* A bit unclear, but it looks like the virtio transport allows +- * the mount tag length to be unlimited (or up to 65536 bytes). +- * See: linux/include/linux/virtio_9p.h +- */ +- CLEANUP_FREE char *mount_tag = read_whole_file (mount_tag_path, NULL); +- if (mount_tag == 0) +- continue; +- +- if (add_string (&r, mount_tag) == -1) { +- closedir (dir); +- return NULL; +- } +- } +- } +- +- /* Check readdir didn't fail */ +- if (errno != 0) { +- reply_with_perror ("readdir: /sys/block"); +- closedir (dir); +- return NULL; +- } +- +- /* Close the directory handle */ +- if (closedir (dir) == -1) { +- reply_with_perror ("closedir: /sys/block"); +- return NULL; +- } +- +- /* Sort the tags. */ +- if (r.size > 0) +- sort_strings (r.argv, r.size); +- +- /* NULL terminate the list */ +- if (end_stringsbuf (&r) == -1) +- return NULL; +- +- return take_stringsbuf (&r); +-} +- +-/* Takes optional arguments, consult optargs_bitmask. */ +-int +-do_mount_9p (const char *mount_tag, const char *mountpoint, const char *options) +-{ +- CLEANUP_FREE char *mp = NULL, *opts = NULL, *err = NULL; +- struct stat statbuf; +- int r; +- +- ABS_PATH (mountpoint, 0, return -1); +- +- mp = sysroot_path (mountpoint); +- if (!mp) { +- reply_with_perror ("malloc"); +- return -1; +- } +- +- /* Check the mountpoint exists and is a directory. */ +- if (stat (mp, &statbuf) == -1) { +- reply_with_perror ("%s", mountpoint); +- return -1; +- } +- if (!S_ISDIR (statbuf.st_mode)) { +- reply_with_perror ("%s: mount point is not a directory", mountpoint); +- return -1; +- } +- +- /* Add trans=virtio to the options. */ +- if ((optargs_bitmask & GUESTFS_MOUNT_9P_OPTIONS_BITMASK) && +- STRNEQ (options, "")) { +- if (asprintf (&opts, "trans=virtio,%s", options) == -1) { +- reply_with_perror ("asprintf"); +- return -1; +- } +- } +- else { +- opts = strdup ("trans=virtio"); +- if (opts == NULL) { +- reply_with_perror ("strdup"); +- return -1; +- } +- } +- +- modprobe_9pnet_virtio (); +- r = command (NULL, &err, +- "mount", "-o", opts, "-t", "9p", mount_tag, mp, NULL); +- if (r == -1) { +- reply_with_error ("%s on %s: %s", mount_tag, mountpoint, err); +- return -1; +- } +- +- return 0; +-} +diff --git a/daemon/Makefile.am b/daemon/Makefile.am +index 216029b7c..8bf601367 100644 +--- a/daemon/Makefile.am ++++ b/daemon/Makefile.am +@@ -83,7 +83,6 @@ guestfsd_SOURCES = \ + ../common/protocol/guestfs_protocol.h \ + ../common/utils/cleanups.h \ + ../common/utils/guestfs-utils.h \ +- 9p.c \ + acl.c \ + actions.h \ + available.c \ +diff --git a/docs/C_SOURCE_FILES b/docs/C_SOURCE_FILES +index 060be051b..7a05f3b24 100644 +--- a/docs/C_SOURCE_FILES ++++ b/docs/C_SOURCE_FILES +@@ -43,7 +43,6 @@ common/visit/visit.c + common/visit/visit.h + common/windows/windows.c + common/windows/windows.h +-daemon/9p.c + daemon/acl.c + daemon/actions.h + daemon/augeas.c +diff --git a/generator/actions_core.ml b/generator/actions_core.ml +index bb92ef2ca..5f849bad1 100644 +--- a/generator/actions_core.ml ++++ b/generator/actions_core.ml +@@ -6157,27 +6157,6 @@ This returns true iff the device exists and contains all zero bytes. + + Note that for large devices this can take a long time to run." }; + +- { defaults with +- name = "list_9p"; added = (1, 11, 12); +- style = RStringList (RPlainString, "mounttags"), [], []; +- shortdesc = "list 9p filesystems"; +- longdesc = "\ +-List all 9p filesystems attached to the guest. A list of +-mount tags is returned." }; +- +- { defaults with +- name = "mount_9p"; added = (1, 11, 12); +- style = RErr, [String (PlainString, "mounttag"); String (PlainString, "mountpoint")], [OString "options"]; +- camel_name = "Mount9P"; +- shortdesc = "mount 9p filesystem"; +- longdesc = "\ +-Mount the virtio-9p filesystem with the tag C on the +-directory C. +- +-If required, C will be automatically added to the options. +-Any other options required can be passed in the optional C +-parameter." }; +- + { defaults with + name = "list_dm_devices"; added = (1, 11, 15); + style = RStringList (RDevice, "devices"), [], []; +diff --git a/generator/proc_nr.ml b/generator/proc_nr.ml +index 74b95baf7..6b6cb7353 100644 +--- a/generator/proc_nr.ml ++++ b/generator/proc_nr.ml +@@ -295,8 +295,6 @@ let proc_nr = [ + 282, "internal_autosync"; + 283, "is_zero"; + 284, "is_zero_device"; +-285, "list_9p"; +-286, "mount_9p"; + 287, "list_dm_devices"; + 288, "ntfsresize"; + 289, "btrfs_filesystem_resize"; +diff --git a/gobject/Makefile.inc b/gobject/Makefile.inc +index 650f8ddac..c4e735967 100644 +--- a/gobject/Makefile.inc ++++ b/gobject/Makefile.inc +@@ -94,7 +94,6 @@ guestfs_gobject_headers= \ + include/guestfs-gobject/optargs-mksquashfs.h \ + include/guestfs-gobject/optargs-mkswap.h \ + include/guestfs-gobject/optargs-mktemp.h \ +- include/guestfs-gobject/optargs-mount_9p.h \ + include/guestfs-gobject/optargs-mount_local.h \ + include/guestfs-gobject/optargs-ntfsclone_out.h \ + include/guestfs-gobject/optargs-ntfsfix.h \ +@@ -188,7 +187,6 @@ guestfs_gobject_sources= \ + src/optargs-mksquashfs.c \ + src/optargs-mkswap.c \ + src/optargs-mktemp.c \ +- src/optargs-mount_9p.c \ + src/optargs-mount_local.c \ + src/optargs-ntfsclone_out.c \ + src/optargs-ntfsfix.c \ +diff --git a/po/POTFILES b/po/POTFILES +index c5f4e6aa7..aeb701e32 100644 +--- a/po/POTFILES ++++ b/po/POTFILES +@@ -26,7 +26,6 @@ common/utils/stringlists-utils.c + common/utils/utils.c + common/visit/visit.c + common/windows/windows.c +-daemon/9p.c + daemon/acl.c + daemon/augeas.c + daemon/available.c +@@ -251,7 +250,6 @@ gobject/src/optargs-mkfs_btrfs.c + gobject/src/optargs-mksquashfs.c + gobject/src/optargs-mkswap.c + gobject/src/optargs-mktemp.c +-gobject/src/optargs-mount_9p.c + gobject/src/optargs-mount_local.c + gobject/src/optargs-ntfsclone_out.c + gobject/src/optargs-ntfsfix.c +diff --git a/tests/Makefile.am b/tests/Makefile.am +index 919e2f248..e3613fec4 100644 +--- a/tests/Makefile.am ++++ b/tests/Makefile.am +@@ -43,7 +43,6 @@ check-slow: + check-valgrind: + $(MAKE) VG="@VG@" check + +-TESTS += 9p/test-9p.sh + EXTRA_DIST += 9p/test-9p.sh + + SLOW_TESTS += bigdirs/test-big-dirs.pl +-- +2.30.1 + diff --git a/0003-RHEL-Disable-unsupported-remote-drive-protocols-RHBZ.patch b/0003-RHEL-Disable-unsupported-remote-drive-protocols-RHBZ.patch new file mode 100644 index 0000000..48a015e --- /dev/null +++ b/0003-RHEL-Disable-unsupported-remote-drive-protocols-RHBZ.patch @@ -0,0 +1,609 @@ +From 41beea618d3da3b0351b3d8aa7eb7be40f369877 Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Mon, 29 Jul 2013 14:47:56 +0100 +Subject: [PATCH 3/5] RHEL: Disable unsupported remote drive protocols + (RHBZ#962113). + +This disables support for unsupported remote drive protocols: + + * ftp + * ftps + * http + * https + * tftp + * gluster + * iscsi + * sheepdog + * ssh + +Note 'nbd' is not disabled, and of course 'file' works. + +We hope to gradually add some of these back over the lifetime of RHEL. +--- + docs/guestfs-testing.pod | 20 ----- + fish/guestfish.pod | 66 ++-------------- + fish/test-add-uri.sh | 32 -------- + generator/actions_core.ml | 50 +------------ + lib/drives.c | 8 ++ + lib/guestfs.pod | 100 ------------------------- + tests/disks/test-qemu-drive-libvirt.sh | 28 ------- + tests/disks/test-qemu-drive.sh | 60 --------------- + 8 files changed, 16 insertions(+), 348 deletions(-) + +diff --git a/docs/guestfs-testing.pod b/docs/guestfs-testing.pod +index f558964bf..8f264ed17 100644 +--- a/docs/guestfs-testing.pod ++++ b/docs/guestfs-testing.pod +@@ -109,26 +109,6 @@ image. To exit, type C. + If you get an error, try enabling debugging (add C<-v> to the command + line). Also make sure that L succeeds. + +-=head2 Try to open a remote guest image with guestfish. +- +-You may also have to disable libvirt by setting this: +- +- export LIBGUESTFS_BACKEND=direct +- +-If you have a disk image available over HTTP/FTP, try to open it. +- +- guestfish --ro -i --format=raw -a http://www.example.com/disk.img +- +-For SSH you will need to make sure that ssh-agent is set up so you +-don't need a password to log in to the remote machine. Then a command +-similar to this should work: +- +- guestfish --ro -i --format=raw \ +- -a ssh://remote.example.com/path/to/disk.img +- +-If you get an error, try enabling debugging (add C<-v> to the command +-line). Also make sure that L succeeds. +- + =head2 Run virt-alignment-scan on all your guests. + + Run L on guests or disk images: +diff --git a/fish/guestfish.pod b/fish/guestfish.pod +index 9f086f110..bb4167b06 100644 +--- a/fish/guestfish.pod ++++ b/fish/guestfish.pod +@@ -131,9 +131,9 @@ To list what is available do: + + =head2 Remote drives + +-Access a remote disk using ssh: ++Access a remote disk using NBD: + +- guestfish -a ssh://example.com/path/to/disk.img ++ guestfish -a nbd://example.com + + =head2 Remote control + +@@ -1134,12 +1134,12 @@ L>. + On the command line, you can use the I<-a> option to add network + block devices using a URI-style format, for example: + +- guestfish -a ssh://root@example.com/disk.img ++ guestfish -a nbd://example.com + + URIs I be used with the L command. The equivalent + command using the API directly is: + +- > add /disk.img protocol:ssh server:tcp:example.com username:root ++ > add /disk.img protocol:nbd server:tcp:example.com + + The possible I<-a URI> formats are described below. + +@@ -1149,40 +1149,6 @@ The possible I<-a URI> formats are described below. + + Add the local disk image (or device) called F. + +-=head2 B<-a ftp://[user@]example.com[:port]/disk.img> +- +-=head2 B<-a ftps://[user@]example.com[:port]/disk.img> +- +-=head2 B<-a http://[user@]example.com[:port]/disk.img> +- +-=head2 B<-a https://[user@]example.com[:port]/disk.img> +- +-=head2 B<-a tftp://[user@]example.com[:port]/disk.img> +- +-Add a disk located on a remote FTP, HTTP or TFTP server. +- +-The equivalent API command would be: +- +- > add /disk.img protocol:(ftp|...) server:tcp:example.com +- +-=head2 B<-a gluster://example.com[:port]/volname/image> +- +-Add a disk image located on GlusterFS storage. +- +-The server is the one running C, and may be C. +- +-The equivalent API command would be: +- +- > add volname/image protocol:gluster server:tcp:example.com +- +-=head2 B<-a iscsi://example.com[:port]/target-iqn-name[/lun]> +- +-Add a disk located on an iSCSI server. +- +-The equivalent API command would be: +- +- > add target-iqn-name/lun protocol:iscsi server:tcp:example.com +- + =head2 B<-a nbd://example.com[:port]> + + =head2 B<-a nbd://example.com[:port]/exportname> +@@ -1217,35 +1183,13 @@ The equivalent API command would be: + + > add pool/disk protocol:rbd server:tcp:example.com:port + +-=head2 B<-a sheepdog://[example.com[:port]]/volume/image> +- +-Add a disk image located on a Sheepdog volume. +- +-The server name is optional. Although libguestfs and Sheepdog +-supports multiple servers, only at most one server can be specified +-when using this URI syntax. +- +-The equivalent API command would be: +- +- > add volume protocol:sheepdog [server:tcp:example.com] +- +-=head2 B<-a ssh://[user@]example.com[:port]/disk.img> +- +-Add a disk image located on a remote server, accessed using the Secure +-Shell (ssh) SFTP protocol. SFTP is supported out of the box by all +-major SSH servers. +- +-The equivalent API command would be: +- +- > add /disk protocol:ssh server:tcp:example.com [username:user] +- + Note that the URIs follow the syntax of + L: in particular, there + are restrictions on the allowed characters for the various components + of the URI. Characters such as C<:>, C<@>, and C B be + percent-encoded: + +- $ guestfish -a ssh://user:pass%40word@example.com/disk.img ++ $ guestfish -a rbd://user:pass%40word@example.com[:port]/pool/disk + + In this case, the password is C. + +diff --git a/fish/test-add-uri.sh b/fish/test-add-uri.sh +index 21d424984..ddabeb639 100755 +--- a/fish/test-add-uri.sh ++++ b/fish/test-add-uri.sh +@@ -40,14 +40,6 @@ function fail () + $VG guestfish -x -a file://$abs_builddir/test-add-uri.img test-add-uri.out 2>&1 + grep -sq 'add_drive ".*/test-add-uri.img"' test-add-uri.out || fail + +-# curl +-$VG guestfish -x -a ftp://user@example.com/disk.img test-add-uri.out 2>&1 +-grep -sq 'add_drive "/disk.img" "protocol:ftp" "server:tcp:example.com" "username:user"' test-add-uri.out || fail +- +-# gluster +-$VG guestfish -x -a gluster://example.com/disk test-add-uri.out 2>&1 +-grep -sq 'add_drive "disk" "protocol:gluster" "server:tcp:example.com"' test-add-uri.out || fail +- + # NBD + $VG guestfish -x -a nbd://example.com test-add-uri.out 2>&1 + grep -sq 'add_drive "" "protocol:nbd" "server:tcp:example.com"' test-add-uri.out || fail +@@ -67,29 +59,5 @@ grep -sq 'add_drive "pool/disk" "protocol:rbd" "server:tcp:example.com:6789"' te + $VG guestfish -x -a rbd:///pool/disk test-add-uri.out 2>&1 + grep -sq 'add_drive "pool/disk" "protocol:rbd"' test-add-uri.out || fail + +-# sheepdog +-$VG guestfish -x -a sheepdog:///volume/image test-add-uri.out 2>&1 +-grep -sq 'add_drive "volume/image" "protocol:sheepdog"' test-add-uri.out || fail +- +-$VG guestfish -x -a sheepdog://example.com:3000/volume/image test-add-uri.out 2>&1 +-grep -sq 'add_drive "volume/image" "protocol:sheepdog" "server:tcp:example.com:3000"' test-add-uri.out || fail +- +-# ssh +-$VG guestfish -x -a ssh://example.com/disk.img test-add-uri.out 2>&1 +-grep -sq 'add_drive "/disk.img" "protocol:ssh" "server:tcp:example.com"' test-add-uri.out || fail +- +-$VG guestfish -x -a ssh://user@example.com/disk.img test-add-uri.out 2>&1 +-grep -sq 'add_drive "/disk.img" "protocol:ssh" "server:tcp:example.com" "username:user"' test-add-uri.out || fail +- +-$VG guestfish -x -a ssh://user@example.com:2000/disk.img test-add-uri.out 2>&1 +-grep -sq 'add_drive "/disk.img" "protocol:ssh" "server:tcp:example.com:2000" "username:user"' test-add-uri.out || fail +- +-# iSCSI +-$VG guestfish -x -a iscsi://example.com/iqn.2015-12.com.libguestfs:test1/0 test-add-uri.out 2>&1 +-grep -sq 'add_drive "iqn.2015-12.com.libguestfs:test1/0" "protocol:iscsi" "server:tcp:example.com"' test-add-uri.out || fail +- +-$VG guestfish -x -a iscsi://user:password@example.com/iqn.2015-12.com.libguestfs:test2/0 test-add-uri.out 2>&1 +-grep -sq 'add_drive "iqn.2015-12.com.libguestfs:test2/0" "protocol:iscsi" "server:tcp:example.com" "username:user" "secret:password"' test-add-uri.out || fail +- + rm test-add-uri.out + rm test-add-uri.img +diff --git a/generator/actions_core.ml b/generator/actions_core.ml +index 5f849bad1..f6f8844b8 100644 +--- a/generator/actions_core.ml ++++ b/generator/actions_core.ml +@@ -297,29 +297,6 @@ F is interpreted as a local file or device. + This is the default if the optional protocol parameter + is omitted. + +-=item C +- +-Connect to a remote FTP, HTTP or TFTP server. +-The C parameter must also be supplied - see below. +- +-See also: L +- +-=item C +- +-Connect to the GlusterFS server. +-The C parameter must also be supplied - see below. +- +-See also: L +- +-=item C +- +-Connect to the iSCSI server. +-The C parameter must also be supplied - see below. +-The C parameter may be supplied. See below. +-The C parameter may be supplied. See below. +- +-See also: L. +- + =item C + + Connect to the Network Block Device server. +@@ -336,22 +313,6 @@ The C parameter may be supplied. See below. + + See also: L. + +-=item C +- +-Connect to the Sheepdog server. +-The C parameter may also be supplied - see below. +- +-See also: L. +- +-=item C +- +-Connect to the Secure Shell (ssh) server. +- +-The C parameter must be supplied. +-The C parameter may be supplied. See below. +- +-See also: L. +- + =back + + =item C +@@ -362,13 +323,8 @@ is a list of server(s). + Protocol Number of servers required + -------- -------------------------- + file List must be empty or param not used at all +- ftp|ftps|http|https|tftp Exactly one +- gluster Exactly one +- iscsi Exactly one + nbd Exactly one + rbd Zero or more +- sheepdog Zero or more +- ssh Exactly one + + Each list element is a string specifying a server. The string must be + in one of the following formats: +@@ -384,10 +340,10 @@ for the protocol is used (see F). + + =item C + +-For the C, C, C, C, C, C, C +-and C protocols, this specifies the remote username. ++For the C ++protocol, this specifies the remote username. + +-If not given, then the local username is used for C, and no authentication ++If not given, then no authentication + is attempted for ceph. But note this sometimes may give unexpected results, for + example if using the libvirt backend and if the libvirt backend is configured to + start the qemu appliance as a special user such as C. If in doubt, +diff --git a/lib/drives.c b/lib/drives.c +index 46af66db4..c81ded5d7 100644 +--- a/lib/drives.c ++++ b/lib/drives.c +@@ -168,6 +168,7 @@ create_drive_non_file (guestfs_h *g, + return drv; + } + ++#if 0 /* DISABLED IN RHEL 8 */ + static struct drive * + create_drive_curl (guestfs_h *g, + const struct drive_create_data *data) +@@ -226,6 +227,7 @@ create_drive_gluster (guestfs_h *g, + + return create_drive_non_file (g, data); + } ++#endif /* DISABLED IN RHEL 8 */ + + static int + nbd_port (void) +@@ -294,6 +296,7 @@ create_drive_rbd (guestfs_h *g, + return create_drive_non_file (g, data); + } + ++#if 0 /* DISABLED IN RHEL 8 */ + static struct drive * + create_drive_sheepdog (guestfs_h *g, + const struct drive_create_data *data) +@@ -394,6 +397,7 @@ create_drive_iscsi (guestfs_h *g, + + return create_drive_non_file (g, data); + } ++#endif /* DISABLED IN RHEL 8 */ + + /** + * Create the special F drive. +@@ -856,6 +860,7 @@ guestfs_impl_add_drive_opts (guestfs_h *g, const char *filename, + drv = create_drive_file (g, &data); + } + } ++#if 0 /* DISABLED IN RHEL 8 */ + else if (STREQ (protocol, "ftp")) { + data.protocol = drive_protocol_ftp; + drv = create_drive_curl (g, &data); +@@ -880,6 +885,7 @@ guestfs_impl_add_drive_opts (guestfs_h *g, const char *filename, + data.protocol = drive_protocol_iscsi; + drv = create_drive_iscsi (g, &data); + } ++#endif /* DISABLED IN RHEL 8 */ + else if (STREQ (protocol, "nbd")) { + data.protocol = drive_protocol_nbd; + drv = create_drive_nbd (g, &data); +@@ -888,6 +894,7 @@ guestfs_impl_add_drive_opts (guestfs_h *g, const char *filename, + data.protocol = drive_protocol_rbd; + drv = create_drive_rbd (g, &data); + } ++#if 0 /* DISABLED IN RHEL 8 */ + else if (STREQ (protocol, "sheepdog")) { + data.protocol = drive_protocol_sheepdog; + drv = create_drive_sheepdog (g, &data); +@@ -900,6 +907,7 @@ guestfs_impl_add_drive_opts (guestfs_h *g, const char *filename, + data.protocol = drive_protocol_tftp; + drv = create_drive_curl (g, &data); + } ++#endif /* DISABLED IN RHEL 8 */ + else { + error (g, _("unknown protocol ‘%s’"), protocol); + drv = NULL; /*FALLTHROUGH*/ +diff --git a/lib/guestfs.pod b/lib/guestfs.pod +index ff58aa0bb..1af00f1bb 100644 +--- a/lib/guestfs.pod ++++ b/lib/guestfs.pod +@@ -715,70 +715,6 @@ servers. The server string is documented in + L. The C and C parameters are + also optional, and if not given, then no authentication will be used. + +-=head3 FTP, HTTP AND TFTP +- +-Libguestfs can access remote disks over FTP, FTPS, HTTP, HTTPS +-or TFTP protocols. +- +-To do this, set the optional C and C parameters of +-L like this: +- +- char **servers = { "www.example.org", NULL }; +- guestfs_add_drive_opts (g, "/disk.img", +- GUESTFS_ADD_DRIVE_OPTS_FORMAT, "raw", +- GUESTFS_ADD_DRIVE_OPTS_PROTOCOL, "http", +- GUESTFS_ADD_DRIVE_OPTS_SERVER, servers, +- -1); +- +-The C can be one of C<"ftp">, C<"ftps">, C<"http">, +-C<"https"> or C<"tftp">. +- +-C (the C parameter) is a list which must have a +-single element. The single element is a string defining the web, +-FTP or TFTP server. The format of this string is documented in +-L. +- +-=head3 GLUSTER +- +-Libguestfs can access Gluster disks. +- +-To do this, set the optional C and C parameters of +-L like this: +- +- char **servers = { "gluster.example.org:24007", NULL }; +- guestfs_add_drive_opts (g, "volname/image", +- GUESTFS_ADD_DRIVE_OPTS_FORMAT, "raw", +- GUESTFS_ADD_DRIVE_OPTS_PROTOCOL, "gluster", +- GUESTFS_ADD_DRIVE_OPTS_SERVER, servers, +- -1); +- +-C (the C parameter) is a list which must have a +-single element. The single element is a string defining the Gluster +-server. The format of this string is documented in +-L. +- +-Note that gluster usually requires the client process (ie. libguestfs) +-to run as B and will give unfathomable errors if it is not +-(eg. "No data available"). +- +-=head3 ISCSI +- +-Libguestfs can access iSCSI disks remotely. +- +-To do this, set the optional C and C parameters like +-this: +- +- char **server = { "iscsi.example.org:3000", NULL }; +- guestfs_add_drive_opts (g, "target-iqn-name/lun", +- GUESTFS_ADD_DRIVE_OPTS_FORMAT, "raw", +- GUESTFS_ADD_DRIVE_OPTS_PROTOCOL, "iscsi", +- GUESTFS_ADD_DRIVE_OPTS_SERVER, server, +- -1); +- +-The C parameter is a list which must have a single element. +-The single element is a string defining the iSCSI server. The format +-of this string is documented in L. +- + =head3 NETWORK BLOCK DEVICE + + Libguestfs can access Network Block Device (NBD) disks remotely. +@@ -841,42 +777,6 @@ L + + =back + +-=head3 SHEEPDOG +- +-Libguestfs can access Sheepdog disks. +- +-To do this, set the optional C and C parameters of +-L like this: +- +- char **servers = { /* optional servers ... */ NULL }; +- guestfs_add_drive_opts (g, "volume", +- GUESTFS_ADD_DRIVE_OPTS_FORMAT, "raw", +- GUESTFS_ADD_DRIVE_OPTS_PROTOCOL, "sheepdog", +- GUESTFS_ADD_DRIVE_OPTS_SERVER, servers, +- -1); +- +-The optional list of C may be zero or more server addresses +-(C<"hostname:port">). The format of the server strings is documented +-in L. +- +-=head3 SSH +- +-Libguestfs can access disks over a Secure Shell (SSH) connection. +- +-To do this, set the C and C and (optionally) +-C parameters of L like this: +- +- char **server = { "remote.example.com", NULL }; +- guestfs_add_drive_opts (g, "/path/to/disk.img", +- GUESTFS_ADD_DRIVE_OPTS_FORMAT, "raw", +- GUESTFS_ADD_DRIVE_OPTS_PROTOCOL, "ssh", +- GUESTFS_ADD_DRIVE_OPTS_SERVER, server, +- GUESTFS_ADD_DRIVE_OPTS_USERNAME, "remoteuser", +- -1); +- +-The format of the server string is documented in +-L. +- + =head2 INSPECTION + + Libguestfs has APIs for inspecting an unknown disk image to find out +diff --git a/tests/disks/test-qemu-drive-libvirt.sh b/tests/disks/test-qemu-drive-libvirt.sh +index 595a95a5e..b49534c94 100755 +--- a/tests/disks/test-qemu-drive-libvirt.sh ++++ b/tests/disks/test-qemu-drive-libvirt.sh +@@ -65,34 +65,6 @@ check_output + grep -sq -- '-drive file=rbd:abc-def/ghi-jkl:auth_supported=none,' "$DEBUG_QEMU_FILE" || fail ceph2 + rm "$DEBUG_QEMU_FILE" + +-# Gluster. +- +-$guestfish -d gluster run ||: +-check_output +-grep -sq -- '-drive file=gluster://1.2.3.4:1234/volname/image,' "$DEBUG_QEMU_FILE" || fail gluster +-rm "$DEBUG_QEMU_FILE" +- +-# iSCSI. +- +-$guestfish -d iscsi run ||: +-check_output +-grep -sq -- '-drive file=iscsi://1.2.3.4:1234/iqn.2003-01.org.linux-iscsi.fedora' "$DEBUG_QEMU_FILE" || fail iscsi +-rm "$DEBUG_QEMU_FILE" +- +-# NBD. +- +-$guestfish -d nbd run ||: +-check_output +-grep -sq -- '-drive file=nbd:1.2.3.4:1234,' "$DEBUG_QEMU_FILE" || fail nbd +-rm "$DEBUG_QEMU_FILE" +- +-# Sheepdog. +- +-$guestfish -d sheepdog run ||: +-check_output +-grep -sq -- '-drive file=sheepdog:volume,' "$DEBUG_QEMU_FILE" || fail sheepdog +-rm "$DEBUG_QEMU_FILE" +- + # Local, stored in a pool. + + $guestfish -d pool1 run ||: +diff --git a/tests/disks/test-qemu-drive.sh b/tests/disks/test-qemu-drive.sh +index 12937fb30..b3e4f9903 100755 +--- a/tests/disks/test-qemu-drive.sh ++++ b/tests/disks/test-qemu-drive.sh +@@ -62,45 +62,6 @@ check_output + grep -sq -- '-drive file=rbd:abc-def/ghi-jkl:auth_supported=none,' "$DEBUG_QEMU_FILE" || fail + rm "$DEBUG_QEMU_FILE" + +-# HTTP. +- +-guestfish < +Date: Fri, 19 Sep 2014 13:38:20 +0100 +Subject: [PATCH 4/5] RHEL: Remove User-Mode Linux (RHBZ#1144197). + +This isn't supported in RHEL. +--- + lib/launch-uml.c | 13 +++++++++++++ + 1 file changed, 13 insertions(+) + +diff --git a/lib/launch-uml.c b/lib/launch-uml.c +index 5aec50a57..8b9fcd770 100644 +--- a/lib/launch-uml.c ++++ b/lib/launch-uml.c +@@ -44,7 +44,9 @@ struct backend_uml_data { + char umid[UML_UMID_LEN+1]; /* umid=<...> unique ID. */ + }; + ++#if 0 + static void print_vmlinux_command_line (guestfs_h *g, char **argv); ++#endif + + /* Run uml_mkcow to create a COW overlay. */ + static char * +@@ -81,6 +83,7 @@ create_cow_overlay_uml (guestfs_h *g, void *datav, struct drive *drv) + return make_cow_overlay (g, drv->src.u.path); + } + ++#if 0 + /* Test for features which are not supported by the UML backend. + * Possibly some of these should just be warnings, not errors. + */ +@@ -133,10 +136,17 @@ uml_supported (guestfs_h *g) + + return true; + } ++#endif + + static int + launch_uml (guestfs_h *g, void *datav, const char *arg) + { ++ error (g, ++ "launch: In RHEL, only the 'libvirt' or 'direct' method is supported.\n" ++ "In particular, User-Mode Linux (UML) is not supported."); ++ return -1; ++ ++#if 0 + struct backend_uml_data *data = datav; + CLEANUP_FREE_STRINGSBUF DECLARE_STRINGSBUF (cmdline); + int console_sock = -1, daemon_sock = -1; +@@ -496,8 +506,10 @@ launch_uml (guestfs_h *g, void *datav, const char *arg) + } + g->state = CONFIG; + return -1; ++#endif + } + ++#if 0 + /* This is called from the forked subprocess just before vmlinux runs, + * so it can just print the message straight to stderr, where it will + * be picked up and funnelled through the usual appliance event API. +@@ -527,6 +539,7 @@ print_vmlinux_command_line (guestfs_h *g, char **argv) + + fputc ('\n', stderr); + } ++#endif + + static int + shutdown_uml (guestfs_h *g, void *datav, int check_for_errors) +-- +2.30.1 + diff --git a/0005-RHEL-Reject-use-of-libguestfs-winsupport-features-ex.patch b/0005-RHEL-Reject-use-of-libguestfs-winsupport-features-ex.patch new file mode 100644 index 0000000..84457c1 --- /dev/null +++ b/0005-RHEL-Reject-use-of-libguestfs-winsupport-features-ex.patch @@ -0,0 +1,69 @@ +From f3fde497b6e0b079ff86360f6c0b6ef8d433c39b Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Tue, 7 Jul 2015 09:28:03 -0400 +Subject: [PATCH 5/5] RHEL: Reject use of libguestfs-winsupport features except + for virt-* tools (RHBZ#1240276). + +Fix the tests: it doesn't let us use guestfish for arbitrary Windows +edits. +--- + generator/c.ml | 16 ++++++++++++++++ + test-data/phony-guests/make-windows-img.sh | 1 + + tests/charsets/test-charset-fidelity.c | 2 ++ + 3 files changed, 19 insertions(+) + +diff --git a/generator/c.ml b/generator/c.ml +index 86d3b26f8..a625361a9 100644 +--- a/generator/c.ml ++++ b/generator/c.ml +@@ -1846,6 +1846,22 @@ and generate_client_actions actions () = + check_args_validity c_name style; + trace_call name c_name style; + ++ (* RHEL 8 *) ++ if name = "mount" || name = "mount_ro" || name = "mount_options" || ++ name = "mount_vfs" then ( ++ pr " if (g->program && !STRPREFIX (g->program, \"virt-\")) {\n"; ++ pr " CLEANUP_FREE char *vfs_type = guestfs_vfs_type (g, mountable);\n"; ++ pr " if (vfs_type && STREQ (vfs_type, \"ntfs\")) {\n"; ++ pr " error (g, \"mount: unsupported filesystem type\");\n"; ++ pr " if (trace_flag)\n"; ++ pr " guestfs_int_trace (g, \"%%s = %%s (error)\",\n"; ++ pr " \"%s\", \"-1\");\n" name; ++ pr " return %s;\n" (string_of_errcode errcode); ++ pr " }\n"; ++ pr " }\n"; ++ pr "\n"; ++ ); ++ + (* Calculate the total size of all FileIn arguments to pass + * as a progress bar hint. + *) +diff --git a/test-data/phony-guests/make-windows-img.sh b/test-data/phony-guests/make-windows-img.sh +index 30908a918..73cf5144e 100755 +--- a/test-data/phony-guests/make-windows-img.sh ++++ b/test-data/phony-guests/make-windows-img.sh +@@ -37,6 +37,7 @@ fi + + # Create a disk image. + guestfish < - 1:1.45.3-3 +- Add downstream (RHEL-only) patches (RHBZ#1931724). + * Mon Mar 29 2021 Richard W.M. Jones - 1:1.45.3-2 - New upstream release 1.45.3. - Add proper dependencies on librpm, remove BDB. From 928729ea6e48c4114b7721013e772595604a0b6b Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 30 Mar 2021 15:35:23 +0100 Subject: [PATCH 032/243] Switch from genisoimage to xorriso. --- 0001-daemon-xfs.c-Fix-error-message.patch | 35 + ...riso-over-genisoimage-to-generate-te.patch | 67 ++ ...xorriso-as-an-alternative-to-isoinfo.patch | 684 ++++++++++++++++++ libguestfs.spec | 16 +- 4 files changed, 797 insertions(+), 5 deletions(-) create mode 100644 0001-daemon-xfs.c-Fix-error-message.patch create mode 100644 0002-tests-Prefer-xorriso-over-genisoimage-to-generate-te.patch create mode 100644 0003-daemon-Allow-xorriso-as-an-alternative-to-isoinfo.patch diff --git a/0001-daemon-xfs.c-Fix-error-message.patch b/0001-daemon-xfs.c-Fix-error-message.patch new file mode 100644 index 0000000..4174452 --- /dev/null +++ b/0001-daemon-xfs.c-Fix-error-message.patch @@ -0,0 +1,35 @@ +From 49b8b69cb8e10e5476bbe86a708ee1babfe330e8 Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Tue, 30 Mar 2021 12:56:06 +0100 +Subject: [PATCH 1/3] daemon/xfs.c: Fix error message. + +Fixes: commit 87206e4e9e3b0ca813a4ff7b5fac0eccc07a484a +--- + daemon/xfs.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/daemon/xfs.c b/daemon/xfs.c +index 3707f56d9..aa056ddff 100644 +--- a/daemon/xfs.c ++++ b/daemon/xfs.c +@@ -62,7 +62,7 @@ parse_uint32 (uint32_t *ret, const char *str) + uint32_t r; + + if (sscanf (str, "%" SCNu32, &r) != 1) { +- reply_with_error ("cannot parse numeric field from isoinfo: %s", str); ++ reply_with_error ("cannot parse numeric field from xfs_info: %s", str); + return -1; + } + +@@ -76,7 +76,7 @@ parse_uint64 (uint64_t *ret, const char *str) + uint64_t r; + + if (sscanf (str, "%" SCNu64, &r) != 1) { +- reply_with_error ("cannot parse numeric field from isoinfo: %s", str); ++ reply_with_error ("cannot parse numeric field from xfs_info: %s", str); + return -1; + } + +-- +2.29.0.rc2 + diff --git a/0002-tests-Prefer-xorriso-over-genisoimage-to-generate-te.patch b/0002-tests-Prefer-xorriso-over-genisoimage-to-generate-te.patch new file mode 100644 index 0000000..d5aac41 --- /dev/null +++ b/0002-tests-Prefer-xorriso-over-genisoimage-to-generate-te.patch @@ -0,0 +1,67 @@ +From 2216ab2e328457ef172d6bfa534272edf2f81a3a Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Tue, 30 Mar 2021 12:41:58 +0100 +Subject: [PATCH 2/3] tests: Prefer xorriso over genisoimage to generate + test.iso + +This Debian page explains the upstream situation: +https://wiki.debian.org/genisoimage + +On Fedora, xorriso provides a compatibility program called "mkisofs". +However this is not present in Debian. Hence the choice to look for +the program called "xorrisofs". +--- + docs/guestfs-building.pod | 4 ++-- + m4/guestfs-progs.m4 | 6 +++--- + test-data/Makefile.am | 2 +- + 3 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/docs/guestfs-building.pod b/docs/guestfs-building.pod +index 8fb2361b2..4d0e943cb 100644 +--- a/docs/guestfs-building.pod ++++ b/docs/guestfs-building.pod +@@ -152,9 +152,9 @@ I. + + I. + +-=item genisoimage ++=item xorriso, genisoimage or mkisofs + +-I. ++One of these is I. + + =item libxml2 + +diff --git a/m4/guestfs-progs.m4 b/m4/guestfs-progs.m4 +index 4819df627..cd8662e86 100644 +--- a/m4/guestfs-progs.m4 ++++ b/m4/guestfs-progs.m4 +@@ -49,10 +49,10 @@ AC_CHECK_PROG([GPERF],[gperf],[gperf],[no]) + test "x$GPERF" = "xno" && + AC_MSG_ERROR([gperf must be installed]) + +-dnl Check for genisoimage/mkisofs +-AC_PATH_PROGS([GENISOIMAGE],[genisoimage mkisofs],[no], ++dnl Check for xorriso/genisoimage/mkisofs. ++AC_PATH_PROGS([MKISOFS],[xorrisofs genisoimage mkisofs],[no], + [$PATH$PATH_SEPARATOR/usr/sbin$PATH_SEPARATOR/sbin]) +-test "x$GENISOIMAGE" = "xno" && AC_MSG_ERROR([genisoimage must be installed]) ++test "x$MKISOFS" = "xno" && AC_MSG_ERROR([xorriso or genisoimage or mkisofs must be installed]) + + dnl Check for optional xmllint. + AC_CHECK_PROG([XMLLINT],[xmllint],[xmllint],[no]) +diff --git a/test-data/Makefile.am b/test-data/Makefile.am +index 8a832c94c..b603311a1 100644 +--- a/test-data/Makefile.am ++++ b/test-data/Makefile.am +@@ -98,6 +98,6 @@ test.iso: $(images_files) + cp $(image_files) d/ + mkdir -p d/directory + cd d && ln -sf /10klines abssymlink +- cd d && $(GENISOIMAGE) -J -r -o ../$@-t . ++ cd d && $(MKISOFS) -J -r -o ../$@-t . + rm -rf d + mv $@-t $@ +-- +2.29.0.rc2 + diff --git a/0003-daemon-Allow-xorriso-as-an-alternative-to-isoinfo.patch b/0003-daemon-Allow-xorriso-as-an-alternative-to-isoinfo.patch new file mode 100644 index 0000000..8f03f0a --- /dev/null +++ b/0003-daemon-Allow-xorriso-as-an-alternative-to-isoinfo.patch @@ -0,0 +1,684 @@ +From efb8a766cac4ba8e413594946136bf91e176bb8c Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Tue, 30 Mar 2021 13:54:22 +0100 +Subject: [PATCH 3/3] daemon: Allow xorriso as an alternative to isoinfo. + +Currently the guestfs_isoinfo and guestfs_isoinfo_device APIs run +isoinfo inside the appliance to extract the information. + +isoinfo is part of genisoimage which is somewhat dead upstream. +xorriso is supposedly the new thing. (For a summary of the situation +see: https://wiki.debian.org/genisoimage). + +This commit rewrites the parsing from C to OCaml to make it easier to +deal with, and allows you to use either isoinfo or xorriso. + +Mostly the same fields are available from either tool, but xorriso is +a bit more awkward to parse. +--- + .gitignore | 1 + + appliance/packagelist.in | 2 + + daemon/Makefile.am | 4 +- + daemon/isoinfo.c | 279 -------------------------------------- + daemon/isoinfo.ml | 248 +++++++++++++++++++++++++++++++++ + docs/C_SOURCE_FILES | 1 - + generator/actions_core.ml | 2 + + po/POTFILES | 1 - + 8 files changed, 256 insertions(+), 282 deletions(-) + delete mode 100644 daemon/isoinfo.c + create mode 100644 daemon/isoinfo.ml + +diff --git a/.gitignore b/.gitignore +index f9b95a6c5..de4abff58 100644 +--- a/.gitignore ++++ b/.gitignore +@@ -92,6 +92,7 @@ Makefile.in + /daemon/guestfsd.exe + /daemon/inspect.mli + /daemon/is.mli ++/daemon/isoinfo.mli + /daemon/ldm.mli + /daemon/link.mli + /daemon/listfs.mli +diff --git a/appliance/packagelist.in b/appliance/packagelist.in +index 2f75a1c17..f4ad50b79 100644 +--- a/appliance/packagelist.in ++++ b/appliance/packagelist.in +@@ -45,6 +45,7 @@ ifelse(REDHAT,1, + syslinux-extlinux + systemd dnl for /sbin/reboot and udevd + vim-minimal ++ xorriso dnl alternative for genisoimage + xz + zfs-fuse + ) +@@ -84,6 +85,7 @@ dnl iproute has been renamed to iproute2 + systemd dnl alternative for /sbin/reboot + ufsutils + vim-tiny ++ xorriso dnl alternative for genisoimage + xz-utils + zfs-fuse + uuid-runtime +diff --git a/daemon/Makefile.am b/daemon/Makefile.am +index 216029b7c..6f13bd43c 100644 +--- a/daemon/Makefile.am ++++ b/daemon/Makefile.am +@@ -46,6 +46,7 @@ generator_built = \ + findfs.mli \ + inspect.mli \ + is.mli \ ++ isoinfo.mli \ + ldm.mli \ + link.mli \ + listfs.mli \ +@@ -142,7 +143,6 @@ guestfsd_SOURCES = \ + inotify.c \ + internal.c \ + is.c \ +- isoinfo.c \ + journal.c \ + labels.c \ + ldm.c \ +@@ -291,6 +291,7 @@ SOURCES_MLI = \ + inspect_types.mli \ + inspect_utils.mli \ + is.mli \ ++ isoinfo.mli \ + ldm.mli \ + link.mli \ + listfs.mli \ +@@ -324,6 +325,7 @@ SOURCES_ML = \ + devsparts.ml \ + file.ml \ + filearch.ml \ ++ isoinfo.ml \ + is.ml \ + ldm.ml \ + link.ml \ +diff --git a/daemon/isoinfo.c b/daemon/isoinfo.c +deleted file mode 100644 +index e616df82f..000000000 +--- a/daemon/isoinfo.c ++++ /dev/null +@@ -1,279 +0,0 @@ +-/* libguestfs - the guestfsd daemon +- * Copyright (C) 2012 Red Hat Inc. +- * +- * This program is free software; you can redistribute it and/or modify +- * it under the terms of the GNU General Public License as published by +- * the Free Software Foundation; either version 2 of the License, or +- * (at your option) any later version. +- * +- * This program is distributed in the hope that it will be useful, +- * but WITHOUT ANY WARRANTY; without even the implied warranty of +- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +- * GNU General Public License for more details. +- * +- * You should have received a copy of the GNU General Public License +- * along with this program; if not, write to the Free Software +- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +- */ +- +-#include +- +-#include +-#include +-#include +-#include +-#include +-#include +-#include +- +-#include "guestfs_protocol.h" +-#include "daemon.h" +-#include "actions.h" +- +-static int +-parse_uint32 (uint32_t *ret, const char *str) +-{ +- uint32_t r; +- +- if (sscanf (str, "%" SCNu32, &r) != 1) { +- reply_with_error ("cannot parse numeric field from isoinfo: %s", str); +- return -1; +- } +- +- *ret = r; +- return 0; +-} +- +-/* This is always in a fixed format: +- * "2012 03 16 11:05:46.00" +- * or if the field is not present, then: +- * "0000 00 00 00:00:00.00" +- */ +-static int +-parse_time_t (int64_t *ret, const char *str) +-{ +- struct tm tm; +- time_t r; +- +- if (STREQ (str, "0000 00 00 00:00:00.00") || +- STREQ (str, " : : . ")) { +- *ret = -1; +- return 0; +- } +- +- if (sscanf (str, "%04d %02d %02d %02d:%02d:%02d", +- &tm.tm_year, &tm.tm_mon, &tm.tm_mday, +- &tm.tm_hour, &tm.tm_min, &tm.tm_sec) != 6) { +- reply_with_error ("cannot parse date from isoinfo: %s", str); +- return -1; +- } +- +- /* Adjust fields. */ +- tm.tm_year -= 1900; +- tm.tm_mon--; +- tm.tm_isdst = -1; +- +- /* Convert to time_t. */ +- r = timegm (&tm); +- if (r == -1) { +- reply_with_error ("invalid date or time: %s", str); +- return -1; +- } +- +- *ret = r; +- return 0; +-} +- +-static guestfs_int_isoinfo * +-parse_isoinfo (char **lines) +-{ +- guestfs_int_isoinfo *ret; +- size_t i; +- +- ret = calloc (1, sizeof *ret); +- if (ret == NULL) { +- reply_with_perror ("calloc"); +- return NULL; +- } +- +- /* Default each int field in the struct to -1. */ +- ret->iso_volume_space_size = (uint32_t) -1; +- ret->iso_volume_set_size = (uint32_t) -1; +- ret->iso_volume_sequence_number = (uint32_t) -1; +- ret->iso_logical_block_size = (uint32_t) -1; +- ret->iso_volume_creation_t = -1; +- ret->iso_volume_modification_t = -1; +- ret->iso_volume_expiration_t = -1; +- ret->iso_volume_effective_t = -1; +- +- for (i = 0; lines[i] != NULL; ++i) { +- if (STRPREFIX (lines[i], "System id: ")) { +- ret->iso_system_id = strdup (&lines[i][11]); +- if (ret->iso_system_id == NULL) goto error; +- } +- else if (STRPREFIX (lines[i], "Volume id: ")) { +- ret->iso_volume_id = strdup (&lines[i][11]); +- if (ret->iso_volume_id == NULL) goto error; +- } +- else if (STRPREFIX (lines[i], "Volume set id: ")) { +- ret->iso_volume_set_id = strdup (&lines[i][15]); +- if (ret->iso_volume_set_id == NULL) goto error; +- } +- else if (STRPREFIX (lines[i], "Publisher id: ")) { +- ret->iso_publisher_id = strdup (&lines[i][14]); +- if (ret->iso_publisher_id == NULL) goto error; +- } +- else if (STRPREFIX (lines[i], "Data preparer id: ")) { +- ret->iso_data_preparer_id = strdup (&lines[i][18]); +- if (ret->iso_data_preparer_id == NULL) goto error; +- } +- else if (STRPREFIX (lines[i], "Application id: ")) { +- ret->iso_application_id = strdup (&lines[i][16]); +- if (ret->iso_application_id == NULL) goto error; +- } +- else if (STRPREFIX (lines[i], "Copyright File id: ")) { +- ret->iso_copyright_file_id = strdup (&lines[i][19]); +- if (ret->iso_copyright_file_id == NULL) goto error; +- } +- else if (STRPREFIX (lines[i], "Abstract File id: ")) { +- ret->iso_abstract_file_id = strdup (&lines[i][18]); +- if (ret->iso_abstract_file_id == NULL) goto error; +- } +- else if (STRPREFIX (lines[i], "Bibliographic File id: ")) { +- ret->iso_bibliographic_file_id = strdup (&lines[i][23]); +- if (ret->iso_bibliographic_file_id == NULL) goto error; +- } +- else if (STRPREFIX (lines[i], "Volume size is: ")) { +- if (parse_uint32 (&ret->iso_volume_space_size, &lines[i][16]) == -1) +- goto error; +- } +- else if (STRPREFIX (lines[i], "Volume set size is: ")) { +- if (parse_uint32 (&ret->iso_volume_set_size, &lines[i][20]) == -1) +- goto error; +- } +- else if (STRPREFIX (lines[i], "Volume set sequence number is: ")) { +- if (parse_uint32 (&ret->iso_volume_sequence_number, &lines[i][31]) == -1) +- goto error; +- } +- else if (STRPREFIX (lines[i], "Logical block size is: ")) { +- if (parse_uint32 (&ret->iso_logical_block_size, &lines[i][23]) == -1) +- goto error; +- } +- else if (STRPREFIX (lines[i], "Creation Date: ")) { +- if (parse_time_t (&ret->iso_volume_creation_t, &lines[i][19]) == -1) +- goto error; +- } +- else if (STRPREFIX (lines[i], "Modification Date: ")) { +- if (parse_time_t (&ret->iso_volume_modification_t, &lines[i][19]) == -1) +- goto error; +- } +- else if (STRPREFIX (lines[i], "Expiration Date: ")) { +- if (parse_time_t (&ret->iso_volume_expiration_t, &lines[i][19]) == -1) +- goto error; +- } +- else if (STRPREFIX (lines[i], "Effective Date: ")) { +- if (parse_time_t (&ret->iso_volume_effective_t, &lines[i][19]) == -1) +- goto error; +- } +- } +- +- /* Any string fields which were not set above will be NULL. However +- * we cannot return NULL fields in structs, so we convert these to +- * empty strings here. +- */ +- if (ret->iso_system_id == NULL) { +- ret->iso_system_id = strdup (""); +- if (ret->iso_system_id == NULL) goto error; +- } +- if (ret->iso_volume_id == NULL) { +- ret->iso_volume_id = strdup (""); +- if (ret->iso_volume_id == NULL) goto error; +- } +- if (ret->iso_volume_set_id == NULL) { +- ret->iso_volume_set_id = strdup (""); +- if (ret->iso_volume_set_id == NULL) goto error; +- } +- if (ret->iso_publisher_id == NULL) { +- ret->iso_publisher_id = strdup (""); +- if (ret->iso_publisher_id == NULL) goto error; +- } +- if (ret->iso_data_preparer_id == NULL) { +- ret->iso_data_preparer_id = strdup (""); +- if (ret->iso_data_preparer_id == NULL) goto error; +- } +- if (ret->iso_application_id == NULL) { +- ret->iso_application_id = strdup (""); +- if (ret->iso_application_id == NULL) goto error; +- } +- if (ret->iso_copyright_file_id == NULL) { +- ret->iso_copyright_file_id = strdup (""); +- if (ret->iso_copyright_file_id == NULL) goto error; +- } +- if (ret->iso_abstract_file_id == NULL) { +- ret->iso_abstract_file_id = strdup (""); +- if (ret->iso_abstract_file_id == NULL) goto error; +- } +- if (ret->iso_bibliographic_file_id == NULL) { +- ret->iso_bibliographic_file_id = strdup (""); +- if (ret->iso_bibliographic_file_id == NULL) goto error; +- } +- +- return ret; +- +- error: +- free (ret->iso_system_id); +- free (ret->iso_volume_id); +- free (ret->iso_volume_set_id); +- free (ret->iso_publisher_id); +- free (ret->iso_data_preparer_id); +- free (ret->iso_application_id); +- free (ret->iso_copyright_file_id); +- free (ret->iso_abstract_file_id); +- free (ret->iso_bibliographic_file_id); +- free (ret); +- return NULL; +-} +- +-static guestfs_int_isoinfo * +-isoinfo (const char *path) +-{ +- int r; +- CLEANUP_FREE char *out = NULL, *err = NULL; +- CLEANUP_FREE_STRING_LIST char **lines = NULL; +- +- /* --debug is necessary to get additional fields, in particular +- * the date & time fields. +- */ +- r = command (&out, &err, "isoinfo", "--debug", "-d", "-i", path, NULL); +- if (r == -1) { +- reply_with_error ("%s", err); +- return NULL; +- } +- +- lines = split_lines (out); +- if (lines == NULL) +- return NULL; +- +- return parse_isoinfo (lines); +-} +- +-guestfs_int_isoinfo * +-do_isoinfo_device (const char *device) +-{ +- return isoinfo (device); +-} +- +-guestfs_int_isoinfo * +-do_isoinfo (const char *path) +-{ +- guestfs_int_isoinfo *ret; +- CLEANUP_FREE char *buf = sysroot_path (path); +- if (!buf) { +- reply_with_perror ("malloc"); +- return NULL; +- } +- +- ret = isoinfo (buf); +- +- return ret; +-} +diff --git a/daemon/isoinfo.ml b/daemon/isoinfo.ml +new file mode 100644 +index 000000000..b7fe0af7e +--- /dev/null ++++ b/daemon/isoinfo.ml +@@ -0,0 +1,248 @@ ++(* Parse isoinfo or xorriso output. ++ * Copyright (C) 2009-2021 Red Hat Inc. ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License along ++ * with this program; if not, write to the Free Software Foundation, Inc., ++ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ++ *) ++ ++open Printf ++open Scanf ++open Unix ++ ++open Std_utils ++open Unix_utils ++ ++open Mountable ++open Utils ++ ++include Structs ++ ++type tool = Isoinfo | Xorriso ++let tool = ref None ++ ++let get_tool () = ++ match !tool with ++ | Some t -> t ++ | None -> ++ (* Prefer isoinfo because we've been using that tool for longer. *) ++ if Sys.command "isoinfo -version" = 0 then ( ++ tool := Some Isoinfo; ++ Isoinfo ++ ) ++ else if Sys.command "xorriso -version" = 0 then ( ++ tool := Some Xorriso; ++ Xorriso ++ ) ++ else ++ failwith "isoinfo or xorriso not available" ++ ++(* Default each int field in the struct to -1 and each string to "". *) ++let default_iso = { ++ iso_system_id = ""; ++ iso_volume_id = ""; ++ iso_volume_space_size = -1_l; ++ iso_volume_set_size = -1_l; ++ iso_volume_sequence_number = -1_l; ++ (* This is almost always true for CDs because of the media itself, ++ * and is not available from xorriso. ++ *) ++ iso_logical_block_size = 2048_l; ++ iso_volume_set_id = ""; ++ iso_publisher_id = ""; ++ iso_data_preparer_id = ""; ++ iso_application_id = ""; ++ iso_copyright_file_id = ""; ++ iso_abstract_file_id = ""; ++ iso_bibliographic_file_id = ""; ++ iso_volume_creation_t = -1_L; ++ iso_volume_modification_t = -1_L; ++ iso_volume_expiration_t = -1_L; ++ iso_volume_effective_t = -1_L; ++} ++ ++(* This is always in a fixed format: ++ * "2012 03 16 11:05:46.00" ++ * or if the field is not present, then: ++ * "0000 00 00 00:00:00.00" ++ *) ++let parse_isoinfo_date str = ++ if str = "0000 00 00 00:00:00.00" || ++ str = " : : . " then ++ -1_L ++ else ( ++ sscanf str "%04d %02d %02d %02d:%02d:%02d" ++ (fun tm_year tm_mon tm_mday tm_hour tm_min tm_sec -> ++ (* Adjust fields. *) ++ let tm_year = tm_year - 1900 in ++ let tm_mon = tm_mon - 1 in ++ ++ (* Convert to time_t *) ++ let tm = { tm_sec; tm_min; tm_hour; tm_mday; tm_mon; tm_year; ++ tm_wday = -1; tm_yday = -1; tm_isdst = false } in ++ Int64.of_float (fst (Unix.mktime tm)) ++ ) ++ ) ++ ++let do_isoinfo dev = ++ (* --debug is necessary to get additional fields, in particular ++ * the date & time fields. ++ *) ++ let lines = command "isoinfo" ["--debug"; "-d"; "-i"; dev] in ++ let lines = String.nsplit "\n" lines in ++ ++ let ret = ref default_iso in ++ List.iter ( ++ fun line -> ++ let n = String.length line in ++ if String.is_prefix line "System id: " then ++ ret := { !ret with iso_system_id = String.sub line 11 (n-11) } ++ else if String.is_prefix line "Volume id: " then ++ ret := { !ret with iso_volume_id = String.sub line 11 (n-11) } ++ else if String.is_prefix line "Volume set id: " then ++ ret := { !ret with iso_volume_set_id = String.sub line 15 (n-15) } ++ else if String.is_prefix line "Publisher id: " then ++ ret := { !ret with iso_publisher_id = String.sub line 14 (n-14) } ++ else if String.is_prefix line "Data preparer id: " then ++ ret := { !ret with iso_data_preparer_id = String.sub line 18 (n-18) } ++ else if String.is_prefix line "Application id: " then ++ ret := { !ret with iso_application_id = String.sub line 16 (n-16) } ++ else if String.is_prefix line "Copyright File id: " then ++ ret := { !ret with iso_copyright_file_id = String.sub line 19 (n-19) } ++ else if String.is_prefix line "Abstract File id: " then ++ ret := { !ret with iso_abstract_file_id = String.sub line 18 (n-18) } ++ else if String.is_prefix line "Bibliographic File id: " then ++ ret := { !ret with ++ iso_bibliographic_file_id = String.sub line 23 (n-23) } ++ else if String.is_prefix line "Volume size is: " then ( ++ let i = Int32.of_string (String.sub line 16 (n-16)) in ++ ret := { !ret with iso_volume_space_size = i } ++ ) ++ else if String.is_prefix line "Volume set size is: " then ( ++ let i = Int32.of_string (String.sub line 20 (n-20)) in ++ ret := { !ret with iso_volume_set_size = i } ++ ) ++ else if String.is_prefix line "Volume set sequence number is: " then ( ++ let i = Int32.of_string (String.sub line 31 (n-31)) in ++ ret := { !ret with iso_volume_sequence_number = i } ++ ) ++ else if String.is_prefix line "Logical block size is: " then ( ++ let i = Int32.of_string (String.sub line 23 (n-23)) in ++ ret := { !ret with iso_logical_block_size = i } ++ ) ++ else if String.is_prefix line "Creation Date: " then ( ++ let t = parse_isoinfo_date (String.sub line 19 (n-19)) in ++ ret := { !ret with iso_volume_creation_t = t } ++ ) ++ else if String.is_prefix line "Modification Date: " then ( ++ let t = parse_isoinfo_date (String.sub line 19 (n-19)) in ++ ret := { !ret with iso_volume_modification_t = t } ++ ) ++ else if String.is_prefix line "Expiration Date: " then ( ++ let t = parse_isoinfo_date (String.sub line 19 (n-19)) in ++ ret := { !ret with iso_volume_expiration_t = t } ++ ) ++ else if String.is_prefix line "Effective Date: " then ( ++ let t = parse_isoinfo_date (String.sub line 19 (n-19)) in ++ ret := { !ret with iso_volume_effective_t = t } ++ ) ++ ) lines; ++ !ret ++ ++(* This is always in a fixed format: ++ * "2021033012313200" ++ * or if the field is not present, then: ++ * "0000000000000000" ++ * XXX Parse the time zone fields too. ++ *) ++let parse_xorriso_date str = ++ if str = "0000000000000000" then -1_L ++ else if String.length str <> 16 then -1_L ++ else ( ++ let tm_year = int_of_string (String.sub str 0 4) in ++ let tm_mon = int_of_string (String.sub str 4 2) in ++ let tm_mday = int_of_string (String.sub str 6 2) in ++ let tm_hour = int_of_string (String.sub str 8 2) in ++ let tm_min = int_of_string (String.sub str 10 2) in ++ let tm_sec = int_of_string (String.sub str 12 2) in ++ ++ (* Adjust fields. *) ++ let tm_year = tm_year - 1900 in ++ let tm_mon = tm_mon - 1 in ++ ++ (* Convert to time_t *) ++ let tm = { tm_sec; tm_min; tm_hour; tm_mday; tm_mon; tm_year; ++ tm_wday = -1; tm_yday = -1; tm_isdst = false } in ++ Int64.of_float (fst (Unix.mktime tm)) ++ ) ++ ++let do_xorriso dev = ++ (* stdio: prefix is to work around a stupidity of xorriso. *) ++ let lines = command "xorriso" ["-indev"; "stdio:" ^ dev; "-pvd_info"] in ++ let lines = String.nsplit "\n" lines in ++ ++ let ret = ref default_iso in ++ List.iter ( ++ fun line -> ++ let n = String.length line in ++ if String.is_prefix line "System Id : " then ++ ret := { !ret with iso_system_id = String.sub line 15 (n-15) } ++ else if String.is_prefix line "Volume Id : " then ++ ret := { !ret with iso_volume_id = String.sub line 15 (n-15) } ++ else if String.is_prefix line "Volume Set Id: " then ++ ret := { !ret with iso_volume_set_id = String.sub line 15 (n-15) } ++ else if String.is_prefix line "Publisher Id : " then ++ ret := { !ret with iso_publisher_id = String.sub line 15 (n-15) } ++ else if String.is_prefix line "App Id : " then ++ ret := { !ret with iso_application_id = String.sub line 15 (n-15) } ++ else if String.is_prefix line "CopyrightFile: " then ++ ret := { !ret with iso_copyright_file_id = String.sub line 15 (n-15) } ++ else if String.is_prefix line "Abstract File: " then ++ ret := { !ret with iso_abstract_file_id = String.sub line 15 (n-15) } ++ else if String.is_prefix line "Biblio File : " then ++ ret := { !ret with ++ iso_bibliographic_file_id = String.sub line 15 (n-15) } ++ (* XXX The following fields don't appear to be available ++ * with xorriso: ++ * - iso_volume_space_size (only available on stderr) ++ * - iso_volume_sequence_number ++ * - iso_logical_block_size ++ *) ++ (* XXX xorriso provides a timezone for these fields, but ++ * we don't use it here. ++ *) ++ else if String.is_prefix line "Creation Time: " then ( ++ let t = parse_xorriso_date (String.sub line 15 (n-15)) in ++ ret := { !ret with iso_volume_creation_t = t } ++ ) ++ else if String.is_prefix line "Modif. Time : " then ( ++ let t = parse_xorriso_date (String.sub line 15 (n-15)) in ++ ret := { !ret with iso_volume_modification_t = t } ++ ) ++ else if String.is_prefix line "Expir. Time : " then ( ++ let t = parse_xorriso_date (String.sub line 15 (n-15)) in ++ ret := { !ret with iso_volume_expiration_t = t } ++ ) ++ else if String.is_prefix line "Eff. Time : " then ( ++ let t = parse_xorriso_date (String.sub line 15 (n-15)) in ++ ret := { !ret with iso_volume_effective_t = t } ++ ) ++ ) lines; ++ !ret ++ ++let isoinfo dev = ++ match get_tool () with ++ | Isoinfo -> do_isoinfo dev ++ | Xorriso -> do_xorriso dev ++ ++let isoinfo_device = isoinfo +diff --git a/docs/C_SOURCE_FILES b/docs/C_SOURCE_FILES +index 060be051b..e65c2f9d9 100644 +--- a/docs/C_SOURCE_FILES ++++ b/docs/C_SOURCE_FILES +@@ -103,7 +103,6 @@ daemon/initrd.c + daemon/inotify.c + daemon/internal.c + daemon/is.c +-daemon/isoinfo.c + daemon/journal.c + daemon/labels.c + daemon/ldm.c +diff --git a/generator/actions_core.ml b/generator/actions_core.ml +index bb92ef2ca..40505d8b5 100644 +--- a/generator/actions_core.ml ++++ b/generator/actions_core.ml +@@ -6878,6 +6878,7 @@ this will create the largest possible LV." }; + { defaults with + name = "isoinfo_device"; added = (1, 17, 19); + style = RStruct ("isodata", "isoinfo"), [String (Device, "device")], []; ++ impl = OCaml "Isoinfo.isoinfo_device"; + tests = [ + InitNone, Always, TestResult ( + [["isoinfo_device"; "/dev/sdd"]], +@@ -6904,6 +6905,7 @@ L" }; + { defaults with + name = "isoinfo"; added = (1, 17, 19); + style = RStruct ("isodata", "isoinfo"), [String (Pathname, "isofile")], []; ++ impl = OCaml "Isoinfo.isoinfo"; + shortdesc = "get ISO information from primary volume descriptor of ISO file"; + longdesc = "\ + This is the same as C except that it +diff --git a/po/POTFILES b/po/POTFILES +index c5f4e6aa7..717579d56 100644 +--- a/po/POTFILES ++++ b/po/POTFILES +@@ -82,7 +82,6 @@ daemon/initrd.c + daemon/inotify.c + daemon/internal.c + daemon/is.c +-daemon/isoinfo.c + daemon/journal.c + daemon/labels.c + daemon/ldm.c +-- +2.29.0.rc2 + diff --git a/libguestfs.spec b/libguestfs.spec index 75f6795..9a46452 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -42,7 +42,7 @@ # If there are patches which touch autotools files, set this to 1. %if !0%{?rhel} -%global patches_touch_autotools %{nil} +%global patches_touch_autotools 1 %else # On RHEL the downstream patches always touch autotools files. %global patches_touch_autotools 1 @@ -61,7 +61,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.45.3 -Release: 3%{?dist} +Release: 4%{?dist} License: LGPLv2+ # Build only for architectures that have a kernel @@ -91,6 +91,11 @@ Source7: libguestfs.keyring # Maintainer script which helps with handling patches. Source8: copy-patches.sh +# Upstream patches since 1.45.3. +Patch0001: 0001-daemon-xfs.c-Fix-error-message.patch +Patch0002: 0002-tests-Prefer-xorriso-over-genisoimage-to-generate-te.patch +Patch0003: 0003-daemon-Allow-xorriso-as-an-alternative-to-isoinfo.patch + # Downstream (RHEL-only) patches. %if 0%{?rhel} Patch9001: 0001-RHEL-Remove-libguestfs-live-RHBZ-798980.patch @@ -118,7 +123,7 @@ BuildRequires: /usr/bin/pod2text BuildRequires: po4a BuildRequires: augeas-devel >= 1.7.0 BuildRequires: readline-devel -BuildRequires: genisoimage +BuildRequires: xorriso BuildRequires: libxml2-devel BuildRequires: createrepo_c BuildRequires: glibc-static @@ -234,7 +239,6 @@ BuildRequires: file BuildRequires: findutils BuildRequires: gawk BuildRequires: gdisk -BuildRequires: genisoimage %if !0%{?rhel} BuildRequires: gfs2-utils %endif @@ -297,6 +301,7 @@ BuildRequires: vim-minimal BuildRequires: which %endif BuildRequires: xfsprogs +BuildRequires: xorriso BuildRequires: xz BuildRequires: yajl %if !0%{?rhel} @@ -1119,8 +1124,9 @@ rm ocaml/html/.gitignore %changelog -* Tue Mar 30 2021 Richard W.M. Jones - 1:1.45.3-3 +* Tue Mar 30 2021 Richard W.M. Jones - 1:1.45.3-4 - Add downstream (RHEL-only) patches (RHBZ#1931724). +- Switch from genisoimage to xorriso. * Mon Mar 29 2021 Richard W.M. Jones - 1:1.45.3-2 - New upstream release 1.45.3. From f331cc95d33f373f44cdcfc453b4109927c96fa9 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 31 Mar 2021 11:53:45 +0100 Subject: [PATCH 033/243] Don't require genisoimage or xorriso for the appliance. --- 0001-daemon-xfs.c-Fix-error-message.patch | 2 +- ...riso-over-genisoimage-to-generate-te.patch | 2 +- ...xorriso-as-an-alternative-to-isoinfo.patch | 2 +- ...660-Primary-Volume-Descriptor-direct.patch | 405 ++++++++++++++++++ libguestfs.spec | 7 +- 5 files changed, 413 insertions(+), 5 deletions(-) create mode 100644 0004-daemon-Read-ISO9660-Primary-Volume-Descriptor-direct.patch diff --git a/0001-daemon-xfs.c-Fix-error-message.patch b/0001-daemon-xfs.c-Fix-error-message.patch index 4174452..af89cfa 100644 --- a/0001-daemon-xfs.c-Fix-error-message.patch +++ b/0001-daemon-xfs.c-Fix-error-message.patch @@ -1,7 +1,7 @@ From 49b8b69cb8e10e5476bbe86a708ee1babfe330e8 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 30 Mar 2021 12:56:06 +0100 -Subject: [PATCH 1/3] daemon/xfs.c: Fix error message. +Subject: [PATCH 1/4] daemon/xfs.c: Fix error message. Fixes: commit 87206e4e9e3b0ca813a4ff7b5fac0eccc07a484a --- diff --git a/0002-tests-Prefer-xorriso-over-genisoimage-to-generate-te.patch b/0002-tests-Prefer-xorriso-over-genisoimage-to-generate-te.patch index d5aac41..1a31fb2 100644 --- a/0002-tests-Prefer-xorriso-over-genisoimage-to-generate-te.patch +++ b/0002-tests-Prefer-xorriso-over-genisoimage-to-generate-te.patch @@ -1,7 +1,7 @@ From 2216ab2e328457ef172d6bfa534272edf2f81a3a Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 30 Mar 2021 12:41:58 +0100 -Subject: [PATCH 2/3] tests: Prefer xorriso over genisoimage to generate +Subject: [PATCH 2/4] tests: Prefer xorriso over genisoimage to generate test.iso This Debian page explains the upstream situation: diff --git a/0003-daemon-Allow-xorriso-as-an-alternative-to-isoinfo.patch b/0003-daemon-Allow-xorriso-as-an-alternative-to-isoinfo.patch index 8f03f0a..bf4adc4 100644 --- a/0003-daemon-Allow-xorriso-as-an-alternative-to-isoinfo.patch +++ b/0003-daemon-Allow-xorriso-as-an-alternative-to-isoinfo.patch @@ -1,7 +1,7 @@ From efb8a766cac4ba8e413594946136bf91e176bb8c Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 30 Mar 2021 13:54:22 +0100 -Subject: [PATCH 3/3] daemon: Allow xorriso as an alternative to isoinfo. +Subject: [PATCH 3/4] daemon: Allow xorriso as an alternative to isoinfo. Currently the guestfs_isoinfo and guestfs_isoinfo_device APIs run isoinfo inside the appliance to extract the information. diff --git a/0004-daemon-Read-ISO9660-Primary-Volume-Descriptor-direct.patch b/0004-daemon-Read-ISO9660-Primary-Volume-Descriptor-direct.patch new file mode 100644 index 0000000..c10fe0c --- /dev/null +++ b/0004-daemon-Read-ISO9660-Primary-Volume-Descriptor-direct.patch @@ -0,0 +1,405 @@ +From 2f587bbaec718e414e46c7e6f2a3e2662c3a1c2a Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Wed, 31 Mar 2021 10:32:52 +0100 +Subject: [PATCH 4/4] daemon: Read ISO9660 Primary Volume Descriptor directly. + +It turns out we can read the information we need for the isoinfo API +directly from the ISO9660 PVD. We don't need to use either isoinfo or +xorriso. This also has the advantages of reducing by 1 the number of +dependencies in the appliance, and reducing potential vulnerability to +a crafted ISO file. + +This also fixes timezone calculation for the datetime fields. + +Thanks: Thomas Schmitt +Updates: commit efb8a766cac4ba8e413594946136bf91e176bb8c +--- + appliance/packagelist.in | 10 -- + daemon/isoinfo.ml | 282 ++++++++++++--------------------------- + 2 files changed, 82 insertions(+), 210 deletions(-) + +diff --git a/appliance/packagelist.in b/appliance/packagelist.in +index f4ad50b79..cede0ac0b 100644 +--- a/appliance/packagelist.in ++++ b/appliance/packagelist.in +@@ -26,7 +26,6 @@ ifelse(REDHAT,1, + cryptsetup + cryptsetup-luks dnl old name used before Fedora 17 + dhclient +- genisoimage + gfs-utils + gfs2-utils + grub +@@ -45,7 +44,6 @@ ifelse(REDHAT,1, + syslinux-extlinux + systemd dnl for /sbin/reboot and udevd + vim-minimal +- xorriso dnl alternative for genisoimage + xz + zfs-fuse + ) +@@ -57,7 +55,6 @@ dnl old name used in Jessie and earlier + cryptsetup + dash + extlinux +- genisoimage + dnl gfs-tools, gfs2-tools have been renamed to gfs2-utils + gfs-tools + gfs2-tools +@@ -85,7 +82,6 @@ dnl iproute has been renamed to iproute2 + systemd dnl alternative for /sbin/reboot + ufsutils + vim-tiny +- xorriso dnl alternative for genisoimage + xz-utils + zfs-fuse + uuid-runtime +@@ -124,13 +120,11 @@ ifelse(SUSE,1, + cryptsetup + dhcpcd + dhcp-client +- genisoimage + glibc-locale + gptfdisk + initviocons + iproute2 + iputils +- mkisofs + ntfsprogs + ntfs-3g + reiserfs +@@ -164,8 +158,6 @@ ifelse(FRUGALWARE,1, + ifelse(MAGEIA,1, + cryptsetup + chkconfig /* for /etc/init.d */ +- cdrkit-genisoimage +- cdrkit-isotools + dhcp-client + extlinux + gfs2-utils +@@ -190,8 +182,6 @@ ifelse(MAGEIA,1, + ifelse(OPENMANDRIVA,1, + cryptsetup + chkconfig /* for /etc/init.d */ +- cdrkit-genisoimage +- cdrkit-isotools + dhcp-client + extlinux + grub2 +diff --git a/daemon/isoinfo.ml b/daemon/isoinfo.ml +index b7fe0af7e..448563365 100644 +--- a/daemon/isoinfo.ml ++++ b/daemon/isoinfo.ml +@@ -17,157 +17,32 @@ + *) + + open Printf +-open Scanf + open Unix + + open Std_utils +-open Unix_utils +- +-open Mountable +-open Utils + + include Structs + +-type tool = Isoinfo | Xorriso +-let tool = ref None +- +-let get_tool () = +- match !tool with +- | Some t -> t +- | None -> +- (* Prefer isoinfo because we've been using that tool for longer. *) +- if Sys.command "isoinfo -version" = 0 then ( +- tool := Some Isoinfo; +- Isoinfo +- ) +- else if Sys.command "xorriso -version" = 0 then ( +- tool := Some Xorriso; +- Xorriso +- ) +- else +- failwith "isoinfo or xorriso not available" +- +-(* Default each int field in the struct to -1 and each string to "". *) +-let default_iso = { +- iso_system_id = ""; +- iso_volume_id = ""; +- iso_volume_space_size = -1_l; +- iso_volume_set_size = -1_l; +- iso_volume_sequence_number = -1_l; +- (* This is almost always true for CDs because of the media itself, +- * and is not available from xorriso. +- *) +- iso_logical_block_size = 2048_l; +- iso_volume_set_id = ""; +- iso_publisher_id = ""; +- iso_data_preparer_id = ""; +- iso_application_id = ""; +- iso_copyright_file_id = ""; +- iso_abstract_file_id = ""; +- iso_bibliographic_file_id = ""; +- iso_volume_creation_t = -1_L; +- iso_volume_modification_t = -1_L; +- iso_volume_expiration_t = -1_L; +- iso_volume_effective_t = -1_L; +-} +- +-(* This is always in a fixed format: +- * "2012 03 16 11:05:46.00" +- * or if the field is not present, then: +- * "0000 00 00 00:00:00.00" ++(* We treat ISO "strA" and "strD" formats the same way, simply ++ * discarding any trailing spaces. + *) +-let parse_isoinfo_date str = +- if str = "0000 00 00 00:00:00.00" || +- str = " : : . " then +- -1_L +- else ( +- sscanf str "%04d %02d %02d %02d:%02d:%02d" +- (fun tm_year tm_mon tm_mday tm_hour tm_min tm_sec -> +- (* Adjust fields. *) +- let tm_year = tm_year - 1900 in +- let tm_mon = tm_mon - 1 in ++let iso_parse_strA str = ++ let len = String.length str in ++ let rec loop len = ++ if len > 0 && str.[len-1] = ' ' then loop (len-1) else len ++ in ++ let len = loop len in ++ String.sub str 0 len + +- (* Convert to time_t *) +- let tm = { tm_sec; tm_min; tm_hour; tm_mday; tm_mon; tm_year; +- tm_wday = -1; tm_yday = -1; tm_isdst = false } in +- Int64.of_float (fst (Unix.mktime tm)) +- ) +- ) ++let iso_parse_strD = iso_parse_strA + +-let do_isoinfo dev = +- (* --debug is necessary to get additional fields, in particular +- * the date & time fields. +- *) +- let lines = command "isoinfo" ["--debug"; "-d"; "-i"; dev] in +- let lines = String.nsplit "\n" lines in ++(* These always parse the intX_LSB (little endian) version. *) ++let iso_parse_int16 s = s |> int_of_le16 |> Int64.to_int32 ++let iso_parse_int32 s = s |> int_of_le32 |> Int64.to_int32 + +- let ret = ref default_iso in +- List.iter ( +- fun line -> +- let n = String.length line in +- if String.is_prefix line "System id: " then +- ret := { !ret with iso_system_id = String.sub line 11 (n-11) } +- else if String.is_prefix line "Volume id: " then +- ret := { !ret with iso_volume_id = String.sub line 11 (n-11) } +- else if String.is_prefix line "Volume set id: " then +- ret := { !ret with iso_volume_set_id = String.sub line 15 (n-15) } +- else if String.is_prefix line "Publisher id: " then +- ret := { !ret with iso_publisher_id = String.sub line 14 (n-14) } +- else if String.is_prefix line "Data preparer id: " then +- ret := { !ret with iso_data_preparer_id = String.sub line 18 (n-18) } +- else if String.is_prefix line "Application id: " then +- ret := { !ret with iso_application_id = String.sub line 16 (n-16) } +- else if String.is_prefix line "Copyright File id: " then +- ret := { !ret with iso_copyright_file_id = String.sub line 19 (n-19) } +- else if String.is_prefix line "Abstract File id: " then +- ret := { !ret with iso_abstract_file_id = String.sub line 18 (n-18) } +- else if String.is_prefix line "Bibliographic File id: " then +- ret := { !ret with +- iso_bibliographic_file_id = String.sub line 23 (n-23) } +- else if String.is_prefix line "Volume size is: " then ( +- let i = Int32.of_string (String.sub line 16 (n-16)) in +- ret := { !ret with iso_volume_space_size = i } +- ) +- else if String.is_prefix line "Volume set size is: " then ( +- let i = Int32.of_string (String.sub line 20 (n-20)) in +- ret := { !ret with iso_volume_set_size = i } +- ) +- else if String.is_prefix line "Volume set sequence number is: " then ( +- let i = Int32.of_string (String.sub line 31 (n-31)) in +- ret := { !ret with iso_volume_sequence_number = i } +- ) +- else if String.is_prefix line "Logical block size is: " then ( +- let i = Int32.of_string (String.sub line 23 (n-23)) in +- ret := { !ret with iso_logical_block_size = i } +- ) +- else if String.is_prefix line "Creation Date: " then ( +- let t = parse_isoinfo_date (String.sub line 19 (n-19)) in +- ret := { !ret with iso_volume_creation_t = t } +- ) +- else if String.is_prefix line "Modification Date: " then ( +- let t = parse_isoinfo_date (String.sub line 19 (n-19)) in +- ret := { !ret with iso_volume_modification_t = t } +- ) +- else if String.is_prefix line "Expiration Date: " then ( +- let t = parse_isoinfo_date (String.sub line 19 (n-19)) in +- ret := { !ret with iso_volume_expiration_t = t } +- ) +- else if String.is_prefix line "Effective Date: " then ( +- let t = parse_isoinfo_date (String.sub line 19 (n-19)) in +- ret := { !ret with iso_volume_effective_t = t } +- ) +- ) lines; +- !ret +- +-(* This is always in a fixed format: +- * "2021033012313200" +- * or if the field is not present, then: +- * "0000000000000000" +- * XXX Parse the time zone fields too. +- *) +-let parse_xorriso_date str = +- if str = "0000000000000000" then -1_L +- else if String.length str <> 16 then -1_L ++(* Parse ISO dec-datetime to a Unix time_t. *) ++let iso_parse_datetime str = ++ if String.sub str 0 16 = "0000000000000000" then -1_L + else ( + let tm_year = int_of_string (String.sub str 0 4) in + let tm_mon = int_of_string (String.sub str 4 2) in +@@ -180,69 +55,76 @@ let parse_xorriso_date str = + let tm_year = tm_year - 1900 in + let tm_mon = tm_mon - 1 in + +- (* Convert to time_t *) ++ (* Convert to time_t in UTC timezone. *) + let tm = { tm_sec; tm_min; tm_hour; tm_mday; tm_mon; tm_year; + tm_wday = -1; tm_yday = -1; tm_isdst = false } in +- Int64.of_float (fst (Unix.mktime tm)) ++ let old_TZ = try Some (getenv "TZ") with Not_found -> None in ++ putenv "TZ" "UTC"; ++ let r = Int64.of_float (fst (mktime tm)) in ++ Option.may (putenv "TZ") old_TZ; ++ ++ (* The final byte is a time zone offset from GMT. ++ * ++ * The documentation of this at ++ * https://wiki.osdev.org/ISO_9660#The_Primary_Volume_Descriptor ++ * is wrong. See the ECMA 119 documentation for a correct ++ * description. ++ * ++ * For a disk image which we know was created ++ * in BST (GMT+1), this contains 0x4, ie. 4 * 15 mins ahead. ++ * We have to subtract this from the gmtime above. ++ *) ++ let tz = Char.code str.[16] in ++ let tz = if tz >= 128 then tz - 256 else tz in ++ r -^ (Int64.of_int (tz * 15 * 60)) + ) + +-let do_xorriso dev = +- (* stdio: prefix is to work around a stupidity of xorriso. *) +- let lines = command "xorriso" ["-indev"; "stdio:" ^ dev; "-pvd_info"] in +- let lines = String.nsplit "\n" lines in +- +- let ret = ref default_iso in +- List.iter ( +- fun line -> +- let n = String.length line in +- if String.is_prefix line "System Id : " then +- ret := { !ret with iso_system_id = String.sub line 15 (n-15) } +- else if String.is_prefix line "Volume Id : " then +- ret := { !ret with iso_volume_id = String.sub line 15 (n-15) } +- else if String.is_prefix line "Volume Set Id: " then +- ret := { !ret with iso_volume_set_id = String.sub line 15 (n-15) } +- else if String.is_prefix line "Publisher Id : " then +- ret := { !ret with iso_publisher_id = String.sub line 15 (n-15) } +- else if String.is_prefix line "App Id : " then +- ret := { !ret with iso_application_id = String.sub line 15 (n-15) } +- else if String.is_prefix line "CopyrightFile: " then +- ret := { !ret with iso_copyright_file_id = String.sub line 15 (n-15) } +- else if String.is_prefix line "Abstract File: " then +- ret := { !ret with iso_abstract_file_id = String.sub line 15 (n-15) } +- else if String.is_prefix line "Biblio File : " then +- ret := { !ret with +- iso_bibliographic_file_id = String.sub line 15 (n-15) } +- (* XXX The following fields don't appear to be available +- * with xorriso: +- * - iso_volume_space_size (only available on stderr) +- * - iso_volume_sequence_number +- * - iso_logical_block_size +- *) +- (* XXX xorriso provides a timezone for these fields, but +- * we don't use it here. +- *) +- else if String.is_prefix line "Creation Time: " then ( +- let t = parse_xorriso_date (String.sub line 15 (n-15)) in +- ret := { !ret with iso_volume_creation_t = t } +- ) +- else if String.is_prefix line "Modif. Time : " then ( +- let t = parse_xorriso_date (String.sub line 15 (n-15)) in +- ret := { !ret with iso_volume_modification_t = t } +- ) +- else if String.is_prefix line "Expir. Time : " then ( +- let t = parse_xorriso_date (String.sub line 15 (n-15)) in +- ret := { !ret with iso_volume_expiration_t = t } +- ) +- else if String.is_prefix line "Eff. Time : " then ( +- let t = parse_xorriso_date (String.sub line 15 (n-15)) in +- ret := { !ret with iso_volume_effective_t = t } +- ) +- ) lines; +- !ret +- + let isoinfo dev = +- match get_tool () with +- | Isoinfo -> do_isoinfo dev +- | Xorriso -> do_xorriso dev ++ let r, pvd = ++ with_openfile dev [O_RDONLY] 0 ( ++ fun fd -> ++ ignore (lseek fd 32768 SEEK_SET); ++ let pvd = Bytes.create 2048 in ++ let r = read fd pvd 0 2048 in ++ r, Bytes.to_string pvd ++ ) in ++ ++ let sub = String.sub pvd in ++ ++ (* Check that it looks like an ISO9660 Primary Volume Descriptor. ++ * https://wiki.osdev.org/ISO_9660#The_Primary_Volume_Descriptor ++ *) ++ if r <> 2048 || pvd.[0] <> '\001' || sub 1 5 <> "CD001" then ++ failwithf "%s: not an ISO file or CD-ROM" dev; ++ ++ (* Parse out the PVD fields. *) ++ let iso_system_id = sub 8 32 |> iso_parse_strA in ++ let iso_volume_id = sub 40 32 |> iso_parse_strA in ++ let iso_volume_space_size = sub 80 4 |> iso_parse_int32 in ++ let iso_volume_set_size = sub 120 2 |> iso_parse_int16 in ++ let iso_volume_sequence_number = sub 124 2 |> iso_parse_int16 in ++ let iso_logical_block_size = sub 128 2 |> iso_parse_int16 in ++ let iso_volume_set_id = sub 190 128 |> iso_parse_strD in ++ let iso_publisher_id = sub 318 128 |> iso_parse_strA in ++ let iso_data_preparer_id = sub 446 128 |> iso_parse_strA in ++ let iso_application_id = sub 574 128 |> iso_parse_strA in ++ let iso_copyright_file_id = sub 702 38 |> iso_parse_strD in ++ let iso_abstract_file_id = sub 740 36 |> iso_parse_strD in ++ let iso_bibliographic_file_id = sub 776 37 |> iso_parse_strD in ++ let iso_volume_creation_t = sub 813 17 |> iso_parse_datetime in ++ let iso_volume_modification_t = sub 830 17 |> iso_parse_datetime in ++ let iso_volume_expiration_t = sub 847 17 |> iso_parse_datetime in ++ let iso_volume_effective_t = sub 864 17 |> iso_parse_datetime in ++ ++ (* Return the struct. *) ++ { ++ iso_system_id; iso_volume_id; iso_volume_space_size; ++ iso_volume_set_size; iso_volume_sequence_number; ++ iso_logical_block_size; iso_volume_set_id; iso_publisher_id; ++ iso_data_preparer_id; iso_application_id; iso_copyright_file_id; ++ iso_abstract_file_id; iso_bibliographic_file_id; ++ iso_volume_creation_t; iso_volume_modification_t; ++ iso_volume_expiration_t; iso_volume_effective_t; ++ } + + let isoinfo_device = isoinfo +-- +2.29.0.rc2 + diff --git a/libguestfs.spec b/libguestfs.spec index 9a46452..f1e9bb2 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -61,7 +61,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.45.3 -Release: 4%{?dist} +Release: 5%{?dist} License: LGPLv2+ # Build only for architectures that have a kernel @@ -95,6 +95,7 @@ Source8: copy-patches.sh Patch0001: 0001-daemon-xfs.c-Fix-error-message.patch Patch0002: 0002-tests-Prefer-xorriso-over-genisoimage-to-generate-te.patch Patch0003: 0003-daemon-Allow-xorriso-as-an-alternative-to-isoinfo.patch +Patch0004: 0004-daemon-Read-ISO9660-Primary-Volume-Descriptor-direct.patch # Downstream (RHEL-only) patches. %if 0%{?rhel} @@ -301,7 +302,6 @@ BuildRequires: vim-minimal BuildRequires: which %endif BuildRequires: xfsprogs -BuildRequires: xorriso BuildRequires: xz BuildRequires: yajl %if !0%{?rhel} @@ -1124,6 +1124,9 @@ rm ocaml/html/.gitignore %changelog +* Wed Mar 1 2021 Richard W.M. Jones - 1:1.45.3-5 +- Don't require genisoimage or xorriso for the appliance. + * Tue Mar 30 2021 Richard W.M. Jones - 1:1.45.3-4 - Add downstream (RHEL-only) patches (RHBZ#1931724). - Switch from genisoimage to xorriso. From 8f6ba6d7893a1339ed7a4fabca0a7c5b4ba5a8c5 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 31 Mar 2021 12:06:35 +0100 Subject: [PATCH 034/243] Fix date in changelog. --- libguestfs.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libguestfs.spec b/libguestfs.spec index f1e9bb2..ab3d6a8 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -1124,7 +1124,7 @@ rm ocaml/html/.gitignore %changelog -* Wed Mar 1 2021 Richard W.M. Jones - 1:1.45.3-5 +* Wed Mar 31 2021 Richard W.M. Jones - 1:1.45.3-5 - Don't require genisoimage or xorriso for the appliance. * Tue Mar 30 2021 Richard W.M. Jones - 1:1.45.3-4 From a6a11a65c9f195f68767ca3529508cc69bf5b491 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 31 Mar 2021 13:46:53 +0100 Subject: [PATCH 035/243] Add workaround for broken "file" utility in Rawhide (RHBZ#1945122). --- 0001-daemon-xfs.c-Fix-error-message.patch | 2 +- ...riso-over-genisoimage-to-generate-te.patch | 2 +- ...xorriso-as-an-alternative-to-isoinfo.patch | 2 +- ...660-Primary-Volume-Descriptor-direct.patch | 2 +- ...mdline.c-Read-UUID-directly-from-app.patch | 127 ++++++++++++++++++ libguestfs.spec | 7 +- 6 files changed, 136 insertions(+), 6 deletions(-) create mode 100644 0005-lib-appliance-kcmdline.c-Read-UUID-directly-from-app.patch diff --git a/0001-daemon-xfs.c-Fix-error-message.patch b/0001-daemon-xfs.c-Fix-error-message.patch index af89cfa..e45d459 100644 --- a/0001-daemon-xfs.c-Fix-error-message.patch +++ b/0001-daemon-xfs.c-Fix-error-message.patch @@ -1,7 +1,7 @@ From 49b8b69cb8e10e5476bbe86a708ee1babfe330e8 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 30 Mar 2021 12:56:06 +0100 -Subject: [PATCH 1/4] daemon/xfs.c: Fix error message. +Subject: [PATCH 1/5] daemon/xfs.c: Fix error message. Fixes: commit 87206e4e9e3b0ca813a4ff7b5fac0eccc07a484a --- diff --git a/0002-tests-Prefer-xorriso-over-genisoimage-to-generate-te.patch b/0002-tests-Prefer-xorriso-over-genisoimage-to-generate-te.patch index 1a31fb2..4957a95 100644 --- a/0002-tests-Prefer-xorriso-over-genisoimage-to-generate-te.patch +++ b/0002-tests-Prefer-xorriso-over-genisoimage-to-generate-te.patch @@ -1,7 +1,7 @@ From 2216ab2e328457ef172d6bfa534272edf2f81a3a Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 30 Mar 2021 12:41:58 +0100 -Subject: [PATCH 2/4] tests: Prefer xorriso over genisoimage to generate +Subject: [PATCH 2/5] tests: Prefer xorriso over genisoimage to generate test.iso This Debian page explains the upstream situation: diff --git a/0003-daemon-Allow-xorriso-as-an-alternative-to-isoinfo.patch b/0003-daemon-Allow-xorriso-as-an-alternative-to-isoinfo.patch index bf4adc4..d8a07a8 100644 --- a/0003-daemon-Allow-xorriso-as-an-alternative-to-isoinfo.patch +++ b/0003-daemon-Allow-xorriso-as-an-alternative-to-isoinfo.patch @@ -1,7 +1,7 @@ From efb8a766cac4ba8e413594946136bf91e176bb8c Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 30 Mar 2021 13:54:22 +0100 -Subject: [PATCH 3/4] daemon: Allow xorriso as an alternative to isoinfo. +Subject: [PATCH 3/5] daemon: Allow xorriso as an alternative to isoinfo. Currently the guestfs_isoinfo and guestfs_isoinfo_device APIs run isoinfo inside the appliance to extract the information. diff --git a/0004-daemon-Read-ISO9660-Primary-Volume-Descriptor-direct.patch b/0004-daemon-Read-ISO9660-Primary-Volume-Descriptor-direct.patch index c10fe0c..b965807 100644 --- a/0004-daemon-Read-ISO9660-Primary-Volume-Descriptor-direct.patch +++ b/0004-daemon-Read-ISO9660-Primary-Volume-Descriptor-direct.patch @@ -1,7 +1,7 @@ From 2f587bbaec718e414e46c7e6f2a3e2662c3a1c2a Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 31 Mar 2021 10:32:52 +0100 -Subject: [PATCH 4/4] daemon: Read ISO9660 Primary Volume Descriptor directly. +Subject: [PATCH 4/5] daemon: Read ISO9660 Primary Volume Descriptor directly. It turns out we can read the information we need for the isoinfo API directly from the ISO9660 PVD. We don't need to use either isoinfo or diff --git a/0005-lib-appliance-kcmdline.c-Read-UUID-directly-from-app.patch b/0005-lib-appliance-kcmdline.c-Read-UUID-directly-from-app.patch new file mode 100644 index 0000000..c1b70c0 --- /dev/null +++ b/0005-lib-appliance-kcmdline.c-Read-UUID-directly-from-app.patch @@ -0,0 +1,127 @@ +From 278d0d3226f4bdb7c6586986ca46d0a25c976fe4 Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Wed, 31 Mar 2021 13:40:11 +0100 +Subject: [PATCH 5/5] lib/appliance-kcmdline.c: Read UUID directly from + appliance. + +Instead of using the external file utility, read the UUID directly +from the extfs filesystem. file 5.40 broke parsing of UUIDs +(https://bugs.astron.com/view.php?id=253). + +Bug: https://bugzilla.redhat.com/show_bug.cgi?id=1945122 +--- + lib/appliance-kcmdline.c | 75 +++++++++++++++++++++++++--------------- + 1 file changed, 48 insertions(+), 27 deletions(-) + +diff --git a/lib/appliance-kcmdline.c b/lib/appliance-kcmdline.c +index 6d0deef86..8b78655eb 100644 +--- a/lib/appliance-kcmdline.c ++++ b/lib/appliance-kcmdline.c +@@ -27,6 +27,9 @@ + #include + #include + #include ++#include ++#include ++#include + + #include "c-ctype.h" + #include "ignore-value.h" +@@ -56,49 +59,67 @@ + #define EARLYPRINTK "earlyprintk=pl011,0x9000000" + #endif + +-COMPILE_REGEXP (re_uuid, "UUID=([-0-9a-f]+)", 0) +- +-static void +-read_uuid (guestfs_h *g, void *retv, const char *line, size_t len) +-{ +- char **ret = retv; +- +- *ret = match1 (g, line, re_uuid); +-} +- + /** + * Given a disk image containing an extX filesystem, return the UUID. +- * The L command does the hard work. + */ + static char * + get_root_uuid_with_file (guestfs_h *g, const char *appliance) + { +- CLEANUP_CMD_CLOSE struct command *cmd = guestfs_int_new_command (g); +- char *ret = NULL; +- int r; ++ unsigned char magic[2], uuid[16]; ++ char *ret; ++ int fd; + +- guestfs_int_cmd_add_arg (cmd, "file"); +- guestfs_int_cmd_add_arg (cmd, "--"); +- guestfs_int_cmd_add_arg (cmd, appliance); +- guestfs_int_cmd_set_stdout_callback (cmd, read_uuid, &ret, 0); +- r = guestfs_int_cmd_run (cmd); +- if (r == -1) { +- if (ret) free (ret); ++ fd = open (appliance, O_RDONLY|O_CLOEXEC); ++ if (fd == -1) { ++ perrorf (g, _("open: %s"), appliance); + return NULL; + } +- if (!WIFEXITED (r) || WEXITSTATUS (r) != 0) { +- guestfs_int_external_command_failed (g, r, "file", NULL); +- if (ret) free (ret); ++ if (lseek (fd, 0x438, SEEK_SET) != 0x438) { ++ magic_error: ++ error (g, _("%s: cannot read extfs magic in superblock"), appliance); ++ close (fd); + return NULL; + } ++ if (read (fd, magic, 2) != 2) ++ goto magic_error; ++ if (magic[0] != 0x53 || magic[1] != 0xEF) { ++ error (g, _("%s: appliance is not an extfs filesystem"), appliance); ++ close (fd); ++ return NULL; ++ } ++ if (lseek (fd, 0x468, SEEK_SET) != 0x468) { ++ super_error: ++ error (g, _("%s: cannot read UUID in superblock"), appliance); ++ close (fd); ++ return NULL; ++ } ++ if (read (fd, uuid, 16) != 16) ++ goto super_error; ++ close (fd); + ++ /* The UUID is a binary blob, but we must return it as a printable ++ * string. The caller frees this. ++ */ ++ ret = safe_asprintf (g, ++ "%02x%02x%02x%02x" "-" ++ "%02x%02x" "-" ++ "%02x%02x" "-" ++ "%02x%02x" "-" ++ "%02x%02x%02x%02x%02x%02x", ++ uuid[0], uuid[1], uuid[2], uuid[3], ++ uuid[4], uuid[5], ++ uuid[6], uuid[7], ++ uuid[8], uuid[9], ++ uuid[10], uuid[11], uuid[12], uuid[13], ++ uuid[14], uuid[15]); + return ret; + } + + /** +- * Read the first 256k bytes of the in_file with L command +- * and write them into the out_file. That may be useful to get UUID of +- * the QCOW2 disk image with further L command. ++ * Read the first 256k bytes of the in_file with L ++ * command and write them into the out_file. That may be useful to get ++ * UUID of the QCOW2 disk image with C. ++ * + * The function returns zero if successful, otherwise -1. + */ + static int +-- +2.29.0.rc2 + diff --git a/libguestfs.spec b/libguestfs.spec index ab3d6a8..4899029 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -61,7 +61,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.45.3 -Release: 5%{?dist} +Release: 6%{?dist} License: LGPLv2+ # Build only for architectures that have a kernel @@ -96,6 +96,8 @@ Patch0001: 0001-daemon-xfs.c-Fix-error-message.patch Patch0002: 0002-tests-Prefer-xorriso-over-genisoimage-to-generate-te.patch Patch0003: 0003-daemon-Allow-xorriso-as-an-alternative-to-isoinfo.patch Patch0004: 0004-daemon-Read-ISO9660-Primary-Volume-Descriptor-direct.patch +# Workaround for file 5.40 which is broken in Fedora Rawhide. +Patch0005: 0005-lib-appliance-kcmdline.c-Read-UUID-directly-from-app.patch # Downstream (RHEL-only) patches. %if 0%{?rhel} @@ -1124,8 +1126,9 @@ rm ocaml/html/.gitignore %changelog -* Wed Mar 31 2021 Richard W.M. Jones - 1:1.45.3-5 +* Wed Mar 31 2021 Richard W.M. Jones - 1:1.45.3-6 - Don't require genisoimage or xorriso for the appliance. +- Add workaround for broken "file" utility in Rawhide (RHBZ#1945122). * Tue Mar 30 2021 Richard W.M. Jones - 1:1.45.3-4 - Add downstream (RHEL-only) patches (RHBZ#1931724). From 6ab119c488e3a21511bbd97f4950d1d16fe9d30f Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sat, 3 Apr 2021 12:36:41 +0100 Subject: [PATCH 036/243] New upstream version 1.45.4. --- 0001-daemon-xfs.c-Fix-error-message.patch | 35 - ...riso-over-genisoimage-to-generate-te.patch | 67 -- ...xorriso-as-an-alternative-to-isoinfo.patch | 684 ------------------ ...660-Primary-Volume-Descriptor-direct.patch | 405 ----------- ...mdline.c-Read-UUID-directly-from-app.patch | 127 ---- libguestfs.spec | 17 +- sources | 4 +- 7 files changed, 8 insertions(+), 1331 deletions(-) delete mode 100644 0001-daemon-xfs.c-Fix-error-message.patch delete mode 100644 0002-tests-Prefer-xorriso-over-genisoimage-to-generate-te.patch delete mode 100644 0003-daemon-Allow-xorriso-as-an-alternative-to-isoinfo.patch delete mode 100644 0004-daemon-Read-ISO9660-Primary-Volume-Descriptor-direct.patch delete mode 100644 0005-lib-appliance-kcmdline.c-Read-UUID-directly-from-app.patch diff --git a/0001-daemon-xfs.c-Fix-error-message.patch b/0001-daemon-xfs.c-Fix-error-message.patch deleted file mode 100644 index e45d459..0000000 --- a/0001-daemon-xfs.c-Fix-error-message.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 49b8b69cb8e10e5476bbe86a708ee1babfe330e8 Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Tue, 30 Mar 2021 12:56:06 +0100 -Subject: [PATCH 1/5] daemon/xfs.c: Fix error message. - -Fixes: commit 87206e4e9e3b0ca813a4ff7b5fac0eccc07a484a ---- - daemon/xfs.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/daemon/xfs.c b/daemon/xfs.c -index 3707f56d9..aa056ddff 100644 ---- a/daemon/xfs.c -+++ b/daemon/xfs.c -@@ -62,7 +62,7 @@ parse_uint32 (uint32_t *ret, const char *str) - uint32_t r; - - if (sscanf (str, "%" SCNu32, &r) != 1) { -- reply_with_error ("cannot parse numeric field from isoinfo: %s", str); -+ reply_with_error ("cannot parse numeric field from xfs_info: %s", str); - return -1; - } - -@@ -76,7 +76,7 @@ parse_uint64 (uint64_t *ret, const char *str) - uint64_t r; - - if (sscanf (str, "%" SCNu64, &r) != 1) { -- reply_with_error ("cannot parse numeric field from isoinfo: %s", str); -+ reply_with_error ("cannot parse numeric field from xfs_info: %s", str); - return -1; - } - --- -2.29.0.rc2 - diff --git a/0002-tests-Prefer-xorriso-over-genisoimage-to-generate-te.patch b/0002-tests-Prefer-xorriso-over-genisoimage-to-generate-te.patch deleted file mode 100644 index 4957a95..0000000 --- a/0002-tests-Prefer-xorriso-over-genisoimage-to-generate-te.patch +++ /dev/null @@ -1,67 +0,0 @@ -From 2216ab2e328457ef172d6bfa534272edf2f81a3a Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Tue, 30 Mar 2021 12:41:58 +0100 -Subject: [PATCH 2/5] tests: Prefer xorriso over genisoimage to generate - test.iso - -This Debian page explains the upstream situation: -https://wiki.debian.org/genisoimage - -On Fedora, xorriso provides a compatibility program called "mkisofs". -However this is not present in Debian. Hence the choice to look for -the program called "xorrisofs". ---- - docs/guestfs-building.pod | 4 ++-- - m4/guestfs-progs.m4 | 6 +++--- - test-data/Makefile.am | 2 +- - 3 files changed, 6 insertions(+), 6 deletions(-) - -diff --git a/docs/guestfs-building.pod b/docs/guestfs-building.pod -index 8fb2361b2..4d0e943cb 100644 ---- a/docs/guestfs-building.pod -+++ b/docs/guestfs-building.pod -@@ -152,9 +152,9 @@ I. - - I. - --=item genisoimage -+=item xorriso, genisoimage or mkisofs - --I. -+One of these is I. - - =item libxml2 - -diff --git a/m4/guestfs-progs.m4 b/m4/guestfs-progs.m4 -index 4819df627..cd8662e86 100644 ---- a/m4/guestfs-progs.m4 -+++ b/m4/guestfs-progs.m4 -@@ -49,10 +49,10 @@ AC_CHECK_PROG([GPERF],[gperf],[gperf],[no]) - test "x$GPERF" = "xno" && - AC_MSG_ERROR([gperf must be installed]) - --dnl Check for genisoimage/mkisofs --AC_PATH_PROGS([GENISOIMAGE],[genisoimage mkisofs],[no], -+dnl Check for xorriso/genisoimage/mkisofs. -+AC_PATH_PROGS([MKISOFS],[xorrisofs genisoimage mkisofs],[no], - [$PATH$PATH_SEPARATOR/usr/sbin$PATH_SEPARATOR/sbin]) --test "x$GENISOIMAGE" = "xno" && AC_MSG_ERROR([genisoimage must be installed]) -+test "x$MKISOFS" = "xno" && AC_MSG_ERROR([xorriso or genisoimage or mkisofs must be installed]) - - dnl Check for optional xmllint. - AC_CHECK_PROG([XMLLINT],[xmllint],[xmllint],[no]) -diff --git a/test-data/Makefile.am b/test-data/Makefile.am -index 8a832c94c..b603311a1 100644 ---- a/test-data/Makefile.am -+++ b/test-data/Makefile.am -@@ -98,6 +98,6 @@ test.iso: $(images_files) - cp $(image_files) d/ - mkdir -p d/directory - cd d && ln -sf /10klines abssymlink -- cd d && $(GENISOIMAGE) -J -r -o ../$@-t . -+ cd d && $(MKISOFS) -J -r -o ../$@-t . - rm -rf d - mv $@-t $@ --- -2.29.0.rc2 - diff --git a/0003-daemon-Allow-xorriso-as-an-alternative-to-isoinfo.patch b/0003-daemon-Allow-xorriso-as-an-alternative-to-isoinfo.patch deleted file mode 100644 index d8a07a8..0000000 --- a/0003-daemon-Allow-xorriso-as-an-alternative-to-isoinfo.patch +++ /dev/null @@ -1,684 +0,0 @@ -From efb8a766cac4ba8e413594946136bf91e176bb8c Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Tue, 30 Mar 2021 13:54:22 +0100 -Subject: [PATCH 3/5] daemon: Allow xorriso as an alternative to isoinfo. - -Currently the guestfs_isoinfo and guestfs_isoinfo_device APIs run -isoinfo inside the appliance to extract the information. - -isoinfo is part of genisoimage which is somewhat dead upstream. -xorriso is supposedly the new thing. (For a summary of the situation -see: https://wiki.debian.org/genisoimage). - -This commit rewrites the parsing from C to OCaml to make it easier to -deal with, and allows you to use either isoinfo or xorriso. - -Mostly the same fields are available from either tool, but xorriso is -a bit more awkward to parse. ---- - .gitignore | 1 + - appliance/packagelist.in | 2 + - daemon/Makefile.am | 4 +- - daemon/isoinfo.c | 279 -------------------------------------- - daemon/isoinfo.ml | 248 +++++++++++++++++++++++++++++++++ - docs/C_SOURCE_FILES | 1 - - generator/actions_core.ml | 2 + - po/POTFILES | 1 - - 8 files changed, 256 insertions(+), 282 deletions(-) - delete mode 100644 daemon/isoinfo.c - create mode 100644 daemon/isoinfo.ml - -diff --git a/.gitignore b/.gitignore -index f9b95a6c5..de4abff58 100644 ---- a/.gitignore -+++ b/.gitignore -@@ -92,6 +92,7 @@ Makefile.in - /daemon/guestfsd.exe - /daemon/inspect.mli - /daemon/is.mli -+/daemon/isoinfo.mli - /daemon/ldm.mli - /daemon/link.mli - /daemon/listfs.mli -diff --git a/appliance/packagelist.in b/appliance/packagelist.in -index 2f75a1c17..f4ad50b79 100644 ---- a/appliance/packagelist.in -+++ b/appliance/packagelist.in -@@ -45,6 +45,7 @@ ifelse(REDHAT,1, - syslinux-extlinux - systemd dnl for /sbin/reboot and udevd - vim-minimal -+ xorriso dnl alternative for genisoimage - xz - zfs-fuse - ) -@@ -84,6 +85,7 @@ dnl iproute has been renamed to iproute2 - systemd dnl alternative for /sbin/reboot - ufsutils - vim-tiny -+ xorriso dnl alternative for genisoimage - xz-utils - zfs-fuse - uuid-runtime -diff --git a/daemon/Makefile.am b/daemon/Makefile.am -index 216029b7c..6f13bd43c 100644 ---- a/daemon/Makefile.am -+++ b/daemon/Makefile.am -@@ -46,6 +46,7 @@ generator_built = \ - findfs.mli \ - inspect.mli \ - is.mli \ -+ isoinfo.mli \ - ldm.mli \ - link.mli \ - listfs.mli \ -@@ -142,7 +143,6 @@ guestfsd_SOURCES = \ - inotify.c \ - internal.c \ - is.c \ -- isoinfo.c \ - journal.c \ - labels.c \ - ldm.c \ -@@ -291,6 +291,7 @@ SOURCES_MLI = \ - inspect_types.mli \ - inspect_utils.mli \ - is.mli \ -+ isoinfo.mli \ - ldm.mli \ - link.mli \ - listfs.mli \ -@@ -324,6 +325,7 @@ SOURCES_ML = \ - devsparts.ml \ - file.ml \ - filearch.ml \ -+ isoinfo.ml \ - is.ml \ - ldm.ml \ - link.ml \ -diff --git a/daemon/isoinfo.c b/daemon/isoinfo.c -deleted file mode 100644 -index e616df82f..000000000 ---- a/daemon/isoinfo.c -+++ /dev/null -@@ -1,279 +0,0 @@ --/* libguestfs - the guestfsd daemon -- * Copyright (C) 2012 Red Hat Inc. -- * -- * This program is free software; you can redistribute it and/or modify -- * it under the terms of the GNU General Public License as published by -- * the Free Software Foundation; either version 2 of the License, or -- * (at your option) any later version. -- * -- * This program is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- * GNU General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this program; if not, write to the Free Software -- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -- */ -- --#include -- --#include --#include --#include --#include --#include --#include --#include -- --#include "guestfs_protocol.h" --#include "daemon.h" --#include "actions.h" -- --static int --parse_uint32 (uint32_t *ret, const char *str) --{ -- uint32_t r; -- -- if (sscanf (str, "%" SCNu32, &r) != 1) { -- reply_with_error ("cannot parse numeric field from isoinfo: %s", str); -- return -1; -- } -- -- *ret = r; -- return 0; --} -- --/* This is always in a fixed format: -- * "2012 03 16 11:05:46.00" -- * or if the field is not present, then: -- * "0000 00 00 00:00:00.00" -- */ --static int --parse_time_t (int64_t *ret, const char *str) --{ -- struct tm tm; -- time_t r; -- -- if (STREQ (str, "0000 00 00 00:00:00.00") || -- STREQ (str, " : : . ")) { -- *ret = -1; -- return 0; -- } -- -- if (sscanf (str, "%04d %02d %02d %02d:%02d:%02d", -- &tm.tm_year, &tm.tm_mon, &tm.tm_mday, -- &tm.tm_hour, &tm.tm_min, &tm.tm_sec) != 6) { -- reply_with_error ("cannot parse date from isoinfo: %s", str); -- return -1; -- } -- -- /* Adjust fields. */ -- tm.tm_year -= 1900; -- tm.tm_mon--; -- tm.tm_isdst = -1; -- -- /* Convert to time_t. */ -- r = timegm (&tm); -- if (r == -1) { -- reply_with_error ("invalid date or time: %s", str); -- return -1; -- } -- -- *ret = r; -- return 0; --} -- --static guestfs_int_isoinfo * --parse_isoinfo (char **lines) --{ -- guestfs_int_isoinfo *ret; -- size_t i; -- -- ret = calloc (1, sizeof *ret); -- if (ret == NULL) { -- reply_with_perror ("calloc"); -- return NULL; -- } -- -- /* Default each int field in the struct to -1. */ -- ret->iso_volume_space_size = (uint32_t) -1; -- ret->iso_volume_set_size = (uint32_t) -1; -- ret->iso_volume_sequence_number = (uint32_t) -1; -- ret->iso_logical_block_size = (uint32_t) -1; -- ret->iso_volume_creation_t = -1; -- ret->iso_volume_modification_t = -1; -- ret->iso_volume_expiration_t = -1; -- ret->iso_volume_effective_t = -1; -- -- for (i = 0; lines[i] != NULL; ++i) { -- if (STRPREFIX (lines[i], "System id: ")) { -- ret->iso_system_id = strdup (&lines[i][11]); -- if (ret->iso_system_id == NULL) goto error; -- } -- else if (STRPREFIX (lines[i], "Volume id: ")) { -- ret->iso_volume_id = strdup (&lines[i][11]); -- if (ret->iso_volume_id == NULL) goto error; -- } -- else if (STRPREFIX (lines[i], "Volume set id: ")) { -- ret->iso_volume_set_id = strdup (&lines[i][15]); -- if (ret->iso_volume_set_id == NULL) goto error; -- } -- else if (STRPREFIX (lines[i], "Publisher id: ")) { -- ret->iso_publisher_id = strdup (&lines[i][14]); -- if (ret->iso_publisher_id == NULL) goto error; -- } -- else if (STRPREFIX (lines[i], "Data preparer id: ")) { -- ret->iso_data_preparer_id = strdup (&lines[i][18]); -- if (ret->iso_data_preparer_id == NULL) goto error; -- } -- else if (STRPREFIX (lines[i], "Application id: ")) { -- ret->iso_application_id = strdup (&lines[i][16]); -- if (ret->iso_application_id == NULL) goto error; -- } -- else if (STRPREFIX (lines[i], "Copyright File id: ")) { -- ret->iso_copyright_file_id = strdup (&lines[i][19]); -- if (ret->iso_copyright_file_id == NULL) goto error; -- } -- else if (STRPREFIX (lines[i], "Abstract File id: ")) { -- ret->iso_abstract_file_id = strdup (&lines[i][18]); -- if (ret->iso_abstract_file_id == NULL) goto error; -- } -- else if (STRPREFIX (lines[i], "Bibliographic File id: ")) { -- ret->iso_bibliographic_file_id = strdup (&lines[i][23]); -- if (ret->iso_bibliographic_file_id == NULL) goto error; -- } -- else if (STRPREFIX (lines[i], "Volume size is: ")) { -- if (parse_uint32 (&ret->iso_volume_space_size, &lines[i][16]) == -1) -- goto error; -- } -- else if (STRPREFIX (lines[i], "Volume set size is: ")) { -- if (parse_uint32 (&ret->iso_volume_set_size, &lines[i][20]) == -1) -- goto error; -- } -- else if (STRPREFIX (lines[i], "Volume set sequence number is: ")) { -- if (parse_uint32 (&ret->iso_volume_sequence_number, &lines[i][31]) == -1) -- goto error; -- } -- else if (STRPREFIX (lines[i], "Logical block size is: ")) { -- if (parse_uint32 (&ret->iso_logical_block_size, &lines[i][23]) == -1) -- goto error; -- } -- else if (STRPREFIX (lines[i], "Creation Date: ")) { -- if (parse_time_t (&ret->iso_volume_creation_t, &lines[i][19]) == -1) -- goto error; -- } -- else if (STRPREFIX (lines[i], "Modification Date: ")) { -- if (parse_time_t (&ret->iso_volume_modification_t, &lines[i][19]) == -1) -- goto error; -- } -- else if (STRPREFIX (lines[i], "Expiration Date: ")) { -- if (parse_time_t (&ret->iso_volume_expiration_t, &lines[i][19]) == -1) -- goto error; -- } -- else if (STRPREFIX (lines[i], "Effective Date: ")) { -- if (parse_time_t (&ret->iso_volume_effective_t, &lines[i][19]) == -1) -- goto error; -- } -- } -- -- /* Any string fields which were not set above will be NULL. However -- * we cannot return NULL fields in structs, so we convert these to -- * empty strings here. -- */ -- if (ret->iso_system_id == NULL) { -- ret->iso_system_id = strdup (""); -- if (ret->iso_system_id == NULL) goto error; -- } -- if (ret->iso_volume_id == NULL) { -- ret->iso_volume_id = strdup (""); -- if (ret->iso_volume_id == NULL) goto error; -- } -- if (ret->iso_volume_set_id == NULL) { -- ret->iso_volume_set_id = strdup (""); -- if (ret->iso_volume_set_id == NULL) goto error; -- } -- if (ret->iso_publisher_id == NULL) { -- ret->iso_publisher_id = strdup (""); -- if (ret->iso_publisher_id == NULL) goto error; -- } -- if (ret->iso_data_preparer_id == NULL) { -- ret->iso_data_preparer_id = strdup (""); -- if (ret->iso_data_preparer_id == NULL) goto error; -- } -- if (ret->iso_application_id == NULL) { -- ret->iso_application_id = strdup (""); -- if (ret->iso_application_id == NULL) goto error; -- } -- if (ret->iso_copyright_file_id == NULL) { -- ret->iso_copyright_file_id = strdup (""); -- if (ret->iso_copyright_file_id == NULL) goto error; -- } -- if (ret->iso_abstract_file_id == NULL) { -- ret->iso_abstract_file_id = strdup (""); -- if (ret->iso_abstract_file_id == NULL) goto error; -- } -- if (ret->iso_bibliographic_file_id == NULL) { -- ret->iso_bibliographic_file_id = strdup (""); -- if (ret->iso_bibliographic_file_id == NULL) goto error; -- } -- -- return ret; -- -- error: -- free (ret->iso_system_id); -- free (ret->iso_volume_id); -- free (ret->iso_volume_set_id); -- free (ret->iso_publisher_id); -- free (ret->iso_data_preparer_id); -- free (ret->iso_application_id); -- free (ret->iso_copyright_file_id); -- free (ret->iso_abstract_file_id); -- free (ret->iso_bibliographic_file_id); -- free (ret); -- return NULL; --} -- --static guestfs_int_isoinfo * --isoinfo (const char *path) --{ -- int r; -- CLEANUP_FREE char *out = NULL, *err = NULL; -- CLEANUP_FREE_STRING_LIST char **lines = NULL; -- -- /* --debug is necessary to get additional fields, in particular -- * the date & time fields. -- */ -- r = command (&out, &err, "isoinfo", "--debug", "-d", "-i", path, NULL); -- if (r == -1) { -- reply_with_error ("%s", err); -- return NULL; -- } -- -- lines = split_lines (out); -- if (lines == NULL) -- return NULL; -- -- return parse_isoinfo (lines); --} -- --guestfs_int_isoinfo * --do_isoinfo_device (const char *device) --{ -- return isoinfo (device); --} -- --guestfs_int_isoinfo * --do_isoinfo (const char *path) --{ -- guestfs_int_isoinfo *ret; -- CLEANUP_FREE char *buf = sysroot_path (path); -- if (!buf) { -- reply_with_perror ("malloc"); -- return NULL; -- } -- -- ret = isoinfo (buf); -- -- return ret; --} -diff --git a/daemon/isoinfo.ml b/daemon/isoinfo.ml -new file mode 100644 -index 000000000..b7fe0af7e ---- /dev/null -+++ b/daemon/isoinfo.ml -@@ -0,0 +1,248 @@ -+(* Parse isoinfo or xorriso output. -+ * Copyright (C) 2009-2021 Red Hat Inc. -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License along -+ * with this program; if not, write to the Free Software Foundation, Inc., -+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -+ *) -+ -+open Printf -+open Scanf -+open Unix -+ -+open Std_utils -+open Unix_utils -+ -+open Mountable -+open Utils -+ -+include Structs -+ -+type tool = Isoinfo | Xorriso -+let tool = ref None -+ -+let get_tool () = -+ match !tool with -+ | Some t -> t -+ | None -> -+ (* Prefer isoinfo because we've been using that tool for longer. *) -+ if Sys.command "isoinfo -version" = 0 then ( -+ tool := Some Isoinfo; -+ Isoinfo -+ ) -+ else if Sys.command "xorriso -version" = 0 then ( -+ tool := Some Xorriso; -+ Xorriso -+ ) -+ else -+ failwith "isoinfo or xorriso not available" -+ -+(* Default each int field in the struct to -1 and each string to "". *) -+let default_iso = { -+ iso_system_id = ""; -+ iso_volume_id = ""; -+ iso_volume_space_size = -1_l; -+ iso_volume_set_size = -1_l; -+ iso_volume_sequence_number = -1_l; -+ (* This is almost always true for CDs because of the media itself, -+ * and is not available from xorriso. -+ *) -+ iso_logical_block_size = 2048_l; -+ iso_volume_set_id = ""; -+ iso_publisher_id = ""; -+ iso_data_preparer_id = ""; -+ iso_application_id = ""; -+ iso_copyright_file_id = ""; -+ iso_abstract_file_id = ""; -+ iso_bibliographic_file_id = ""; -+ iso_volume_creation_t = -1_L; -+ iso_volume_modification_t = -1_L; -+ iso_volume_expiration_t = -1_L; -+ iso_volume_effective_t = -1_L; -+} -+ -+(* This is always in a fixed format: -+ * "2012 03 16 11:05:46.00" -+ * or if the field is not present, then: -+ * "0000 00 00 00:00:00.00" -+ *) -+let parse_isoinfo_date str = -+ if str = "0000 00 00 00:00:00.00" || -+ str = " : : . " then -+ -1_L -+ else ( -+ sscanf str "%04d %02d %02d %02d:%02d:%02d" -+ (fun tm_year tm_mon tm_mday tm_hour tm_min tm_sec -> -+ (* Adjust fields. *) -+ let tm_year = tm_year - 1900 in -+ let tm_mon = tm_mon - 1 in -+ -+ (* Convert to time_t *) -+ let tm = { tm_sec; tm_min; tm_hour; tm_mday; tm_mon; tm_year; -+ tm_wday = -1; tm_yday = -1; tm_isdst = false } in -+ Int64.of_float (fst (Unix.mktime tm)) -+ ) -+ ) -+ -+let do_isoinfo dev = -+ (* --debug is necessary to get additional fields, in particular -+ * the date & time fields. -+ *) -+ let lines = command "isoinfo" ["--debug"; "-d"; "-i"; dev] in -+ let lines = String.nsplit "\n" lines in -+ -+ let ret = ref default_iso in -+ List.iter ( -+ fun line -> -+ let n = String.length line in -+ if String.is_prefix line "System id: " then -+ ret := { !ret with iso_system_id = String.sub line 11 (n-11) } -+ else if String.is_prefix line "Volume id: " then -+ ret := { !ret with iso_volume_id = String.sub line 11 (n-11) } -+ else if String.is_prefix line "Volume set id: " then -+ ret := { !ret with iso_volume_set_id = String.sub line 15 (n-15) } -+ else if String.is_prefix line "Publisher id: " then -+ ret := { !ret with iso_publisher_id = String.sub line 14 (n-14) } -+ else if String.is_prefix line "Data preparer id: " then -+ ret := { !ret with iso_data_preparer_id = String.sub line 18 (n-18) } -+ else if String.is_prefix line "Application id: " then -+ ret := { !ret with iso_application_id = String.sub line 16 (n-16) } -+ else if String.is_prefix line "Copyright File id: " then -+ ret := { !ret with iso_copyright_file_id = String.sub line 19 (n-19) } -+ else if String.is_prefix line "Abstract File id: " then -+ ret := { !ret with iso_abstract_file_id = String.sub line 18 (n-18) } -+ else if String.is_prefix line "Bibliographic File id: " then -+ ret := { !ret with -+ iso_bibliographic_file_id = String.sub line 23 (n-23) } -+ else if String.is_prefix line "Volume size is: " then ( -+ let i = Int32.of_string (String.sub line 16 (n-16)) in -+ ret := { !ret with iso_volume_space_size = i } -+ ) -+ else if String.is_prefix line "Volume set size is: " then ( -+ let i = Int32.of_string (String.sub line 20 (n-20)) in -+ ret := { !ret with iso_volume_set_size = i } -+ ) -+ else if String.is_prefix line "Volume set sequence number is: " then ( -+ let i = Int32.of_string (String.sub line 31 (n-31)) in -+ ret := { !ret with iso_volume_sequence_number = i } -+ ) -+ else if String.is_prefix line "Logical block size is: " then ( -+ let i = Int32.of_string (String.sub line 23 (n-23)) in -+ ret := { !ret with iso_logical_block_size = i } -+ ) -+ else if String.is_prefix line "Creation Date: " then ( -+ let t = parse_isoinfo_date (String.sub line 19 (n-19)) in -+ ret := { !ret with iso_volume_creation_t = t } -+ ) -+ else if String.is_prefix line "Modification Date: " then ( -+ let t = parse_isoinfo_date (String.sub line 19 (n-19)) in -+ ret := { !ret with iso_volume_modification_t = t } -+ ) -+ else if String.is_prefix line "Expiration Date: " then ( -+ let t = parse_isoinfo_date (String.sub line 19 (n-19)) in -+ ret := { !ret with iso_volume_expiration_t = t } -+ ) -+ else if String.is_prefix line "Effective Date: " then ( -+ let t = parse_isoinfo_date (String.sub line 19 (n-19)) in -+ ret := { !ret with iso_volume_effective_t = t } -+ ) -+ ) lines; -+ !ret -+ -+(* This is always in a fixed format: -+ * "2021033012313200" -+ * or if the field is not present, then: -+ * "0000000000000000" -+ * XXX Parse the time zone fields too. -+ *) -+let parse_xorriso_date str = -+ if str = "0000000000000000" then -1_L -+ else if String.length str <> 16 then -1_L -+ else ( -+ let tm_year = int_of_string (String.sub str 0 4) in -+ let tm_mon = int_of_string (String.sub str 4 2) in -+ let tm_mday = int_of_string (String.sub str 6 2) in -+ let tm_hour = int_of_string (String.sub str 8 2) in -+ let tm_min = int_of_string (String.sub str 10 2) in -+ let tm_sec = int_of_string (String.sub str 12 2) in -+ -+ (* Adjust fields. *) -+ let tm_year = tm_year - 1900 in -+ let tm_mon = tm_mon - 1 in -+ -+ (* Convert to time_t *) -+ let tm = { tm_sec; tm_min; tm_hour; tm_mday; tm_mon; tm_year; -+ tm_wday = -1; tm_yday = -1; tm_isdst = false } in -+ Int64.of_float (fst (Unix.mktime tm)) -+ ) -+ -+let do_xorriso dev = -+ (* stdio: prefix is to work around a stupidity of xorriso. *) -+ let lines = command "xorriso" ["-indev"; "stdio:" ^ dev; "-pvd_info"] in -+ let lines = String.nsplit "\n" lines in -+ -+ let ret = ref default_iso in -+ List.iter ( -+ fun line -> -+ let n = String.length line in -+ if String.is_prefix line "System Id : " then -+ ret := { !ret with iso_system_id = String.sub line 15 (n-15) } -+ else if String.is_prefix line "Volume Id : " then -+ ret := { !ret with iso_volume_id = String.sub line 15 (n-15) } -+ else if String.is_prefix line "Volume Set Id: " then -+ ret := { !ret with iso_volume_set_id = String.sub line 15 (n-15) } -+ else if String.is_prefix line "Publisher Id : " then -+ ret := { !ret with iso_publisher_id = String.sub line 15 (n-15) } -+ else if String.is_prefix line "App Id : " then -+ ret := { !ret with iso_application_id = String.sub line 15 (n-15) } -+ else if String.is_prefix line "CopyrightFile: " then -+ ret := { !ret with iso_copyright_file_id = String.sub line 15 (n-15) } -+ else if String.is_prefix line "Abstract File: " then -+ ret := { !ret with iso_abstract_file_id = String.sub line 15 (n-15) } -+ else if String.is_prefix line "Biblio File : " then -+ ret := { !ret with -+ iso_bibliographic_file_id = String.sub line 15 (n-15) } -+ (* XXX The following fields don't appear to be available -+ * with xorriso: -+ * - iso_volume_space_size (only available on stderr) -+ * - iso_volume_sequence_number -+ * - iso_logical_block_size -+ *) -+ (* XXX xorriso provides a timezone for these fields, but -+ * we don't use it here. -+ *) -+ else if String.is_prefix line "Creation Time: " then ( -+ let t = parse_xorriso_date (String.sub line 15 (n-15)) in -+ ret := { !ret with iso_volume_creation_t = t } -+ ) -+ else if String.is_prefix line "Modif. Time : " then ( -+ let t = parse_xorriso_date (String.sub line 15 (n-15)) in -+ ret := { !ret with iso_volume_modification_t = t } -+ ) -+ else if String.is_prefix line "Expir. Time : " then ( -+ let t = parse_xorriso_date (String.sub line 15 (n-15)) in -+ ret := { !ret with iso_volume_expiration_t = t } -+ ) -+ else if String.is_prefix line "Eff. Time : " then ( -+ let t = parse_xorriso_date (String.sub line 15 (n-15)) in -+ ret := { !ret with iso_volume_effective_t = t } -+ ) -+ ) lines; -+ !ret -+ -+let isoinfo dev = -+ match get_tool () with -+ | Isoinfo -> do_isoinfo dev -+ | Xorriso -> do_xorriso dev -+ -+let isoinfo_device = isoinfo -diff --git a/docs/C_SOURCE_FILES b/docs/C_SOURCE_FILES -index 060be051b..e65c2f9d9 100644 ---- a/docs/C_SOURCE_FILES -+++ b/docs/C_SOURCE_FILES -@@ -103,7 +103,6 @@ daemon/initrd.c - daemon/inotify.c - daemon/internal.c - daemon/is.c --daemon/isoinfo.c - daemon/journal.c - daemon/labels.c - daemon/ldm.c -diff --git a/generator/actions_core.ml b/generator/actions_core.ml -index bb92ef2ca..40505d8b5 100644 ---- a/generator/actions_core.ml -+++ b/generator/actions_core.ml -@@ -6878,6 +6878,7 @@ this will create the largest possible LV." }; - { defaults with - name = "isoinfo_device"; added = (1, 17, 19); - style = RStruct ("isodata", "isoinfo"), [String (Device, "device")], []; -+ impl = OCaml "Isoinfo.isoinfo_device"; - tests = [ - InitNone, Always, TestResult ( - [["isoinfo_device"; "/dev/sdd"]], -@@ -6904,6 +6905,7 @@ L" }; - { defaults with - name = "isoinfo"; added = (1, 17, 19); - style = RStruct ("isodata", "isoinfo"), [String (Pathname, "isofile")], []; -+ impl = OCaml "Isoinfo.isoinfo"; - shortdesc = "get ISO information from primary volume descriptor of ISO file"; - longdesc = "\ - This is the same as C except that it -diff --git a/po/POTFILES b/po/POTFILES -index c5f4e6aa7..717579d56 100644 ---- a/po/POTFILES -+++ b/po/POTFILES -@@ -82,7 +82,6 @@ daemon/initrd.c - daemon/inotify.c - daemon/internal.c - daemon/is.c --daemon/isoinfo.c - daemon/journal.c - daemon/labels.c - daemon/ldm.c --- -2.29.0.rc2 - diff --git a/0004-daemon-Read-ISO9660-Primary-Volume-Descriptor-direct.patch b/0004-daemon-Read-ISO9660-Primary-Volume-Descriptor-direct.patch deleted file mode 100644 index b965807..0000000 --- a/0004-daemon-Read-ISO9660-Primary-Volume-Descriptor-direct.patch +++ /dev/null @@ -1,405 +0,0 @@ -From 2f587bbaec718e414e46c7e6f2a3e2662c3a1c2a Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Wed, 31 Mar 2021 10:32:52 +0100 -Subject: [PATCH 4/5] daemon: Read ISO9660 Primary Volume Descriptor directly. - -It turns out we can read the information we need for the isoinfo API -directly from the ISO9660 PVD. We don't need to use either isoinfo or -xorriso. This also has the advantages of reducing by 1 the number of -dependencies in the appliance, and reducing potential vulnerability to -a crafted ISO file. - -This also fixes timezone calculation for the datetime fields. - -Thanks: Thomas Schmitt -Updates: commit efb8a766cac4ba8e413594946136bf91e176bb8c ---- - appliance/packagelist.in | 10 -- - daemon/isoinfo.ml | 282 ++++++++++++--------------------------- - 2 files changed, 82 insertions(+), 210 deletions(-) - -diff --git a/appliance/packagelist.in b/appliance/packagelist.in -index f4ad50b79..cede0ac0b 100644 ---- a/appliance/packagelist.in -+++ b/appliance/packagelist.in -@@ -26,7 +26,6 @@ ifelse(REDHAT,1, - cryptsetup - cryptsetup-luks dnl old name used before Fedora 17 - dhclient -- genisoimage - gfs-utils - gfs2-utils - grub -@@ -45,7 +44,6 @@ ifelse(REDHAT,1, - syslinux-extlinux - systemd dnl for /sbin/reboot and udevd - vim-minimal -- xorriso dnl alternative for genisoimage - xz - zfs-fuse - ) -@@ -57,7 +55,6 @@ dnl old name used in Jessie and earlier - cryptsetup - dash - extlinux -- genisoimage - dnl gfs-tools, gfs2-tools have been renamed to gfs2-utils - gfs-tools - gfs2-tools -@@ -85,7 +82,6 @@ dnl iproute has been renamed to iproute2 - systemd dnl alternative for /sbin/reboot - ufsutils - vim-tiny -- xorriso dnl alternative for genisoimage - xz-utils - zfs-fuse - uuid-runtime -@@ -124,13 +120,11 @@ ifelse(SUSE,1, - cryptsetup - dhcpcd - dhcp-client -- genisoimage - glibc-locale - gptfdisk - initviocons - iproute2 - iputils -- mkisofs - ntfsprogs - ntfs-3g - reiserfs -@@ -164,8 +158,6 @@ ifelse(FRUGALWARE,1, - ifelse(MAGEIA,1, - cryptsetup - chkconfig /* for /etc/init.d */ -- cdrkit-genisoimage -- cdrkit-isotools - dhcp-client - extlinux - gfs2-utils -@@ -190,8 +182,6 @@ ifelse(MAGEIA,1, - ifelse(OPENMANDRIVA,1, - cryptsetup - chkconfig /* for /etc/init.d */ -- cdrkit-genisoimage -- cdrkit-isotools - dhcp-client - extlinux - grub2 -diff --git a/daemon/isoinfo.ml b/daemon/isoinfo.ml -index b7fe0af7e..448563365 100644 ---- a/daemon/isoinfo.ml -+++ b/daemon/isoinfo.ml -@@ -17,157 +17,32 @@ - *) - - open Printf --open Scanf - open Unix - - open Std_utils --open Unix_utils -- --open Mountable --open Utils - - include Structs - --type tool = Isoinfo | Xorriso --let tool = ref None -- --let get_tool () = -- match !tool with -- | Some t -> t -- | None -> -- (* Prefer isoinfo because we've been using that tool for longer. *) -- if Sys.command "isoinfo -version" = 0 then ( -- tool := Some Isoinfo; -- Isoinfo -- ) -- else if Sys.command "xorriso -version" = 0 then ( -- tool := Some Xorriso; -- Xorriso -- ) -- else -- failwith "isoinfo or xorriso not available" -- --(* Default each int field in the struct to -1 and each string to "". *) --let default_iso = { -- iso_system_id = ""; -- iso_volume_id = ""; -- iso_volume_space_size = -1_l; -- iso_volume_set_size = -1_l; -- iso_volume_sequence_number = -1_l; -- (* This is almost always true for CDs because of the media itself, -- * and is not available from xorriso. -- *) -- iso_logical_block_size = 2048_l; -- iso_volume_set_id = ""; -- iso_publisher_id = ""; -- iso_data_preparer_id = ""; -- iso_application_id = ""; -- iso_copyright_file_id = ""; -- iso_abstract_file_id = ""; -- iso_bibliographic_file_id = ""; -- iso_volume_creation_t = -1_L; -- iso_volume_modification_t = -1_L; -- iso_volume_expiration_t = -1_L; -- iso_volume_effective_t = -1_L; --} -- --(* This is always in a fixed format: -- * "2012 03 16 11:05:46.00" -- * or if the field is not present, then: -- * "0000 00 00 00:00:00.00" -+(* We treat ISO "strA" and "strD" formats the same way, simply -+ * discarding any trailing spaces. - *) --let parse_isoinfo_date str = -- if str = "0000 00 00 00:00:00.00" || -- str = " : : . " then -- -1_L -- else ( -- sscanf str "%04d %02d %02d %02d:%02d:%02d" -- (fun tm_year tm_mon tm_mday tm_hour tm_min tm_sec -> -- (* Adjust fields. *) -- let tm_year = tm_year - 1900 in -- let tm_mon = tm_mon - 1 in -+let iso_parse_strA str = -+ let len = String.length str in -+ let rec loop len = -+ if len > 0 && str.[len-1] = ' ' then loop (len-1) else len -+ in -+ let len = loop len in -+ String.sub str 0 len - -- (* Convert to time_t *) -- let tm = { tm_sec; tm_min; tm_hour; tm_mday; tm_mon; tm_year; -- tm_wday = -1; tm_yday = -1; tm_isdst = false } in -- Int64.of_float (fst (Unix.mktime tm)) -- ) -- ) -+let iso_parse_strD = iso_parse_strA - --let do_isoinfo dev = -- (* --debug is necessary to get additional fields, in particular -- * the date & time fields. -- *) -- let lines = command "isoinfo" ["--debug"; "-d"; "-i"; dev] in -- let lines = String.nsplit "\n" lines in -+(* These always parse the intX_LSB (little endian) version. *) -+let iso_parse_int16 s = s |> int_of_le16 |> Int64.to_int32 -+let iso_parse_int32 s = s |> int_of_le32 |> Int64.to_int32 - -- let ret = ref default_iso in -- List.iter ( -- fun line -> -- let n = String.length line in -- if String.is_prefix line "System id: " then -- ret := { !ret with iso_system_id = String.sub line 11 (n-11) } -- else if String.is_prefix line "Volume id: " then -- ret := { !ret with iso_volume_id = String.sub line 11 (n-11) } -- else if String.is_prefix line "Volume set id: " then -- ret := { !ret with iso_volume_set_id = String.sub line 15 (n-15) } -- else if String.is_prefix line "Publisher id: " then -- ret := { !ret with iso_publisher_id = String.sub line 14 (n-14) } -- else if String.is_prefix line "Data preparer id: " then -- ret := { !ret with iso_data_preparer_id = String.sub line 18 (n-18) } -- else if String.is_prefix line "Application id: " then -- ret := { !ret with iso_application_id = String.sub line 16 (n-16) } -- else if String.is_prefix line "Copyright File id: " then -- ret := { !ret with iso_copyright_file_id = String.sub line 19 (n-19) } -- else if String.is_prefix line "Abstract File id: " then -- ret := { !ret with iso_abstract_file_id = String.sub line 18 (n-18) } -- else if String.is_prefix line "Bibliographic File id: " then -- ret := { !ret with -- iso_bibliographic_file_id = String.sub line 23 (n-23) } -- else if String.is_prefix line "Volume size is: " then ( -- let i = Int32.of_string (String.sub line 16 (n-16)) in -- ret := { !ret with iso_volume_space_size = i } -- ) -- else if String.is_prefix line "Volume set size is: " then ( -- let i = Int32.of_string (String.sub line 20 (n-20)) in -- ret := { !ret with iso_volume_set_size = i } -- ) -- else if String.is_prefix line "Volume set sequence number is: " then ( -- let i = Int32.of_string (String.sub line 31 (n-31)) in -- ret := { !ret with iso_volume_sequence_number = i } -- ) -- else if String.is_prefix line "Logical block size is: " then ( -- let i = Int32.of_string (String.sub line 23 (n-23)) in -- ret := { !ret with iso_logical_block_size = i } -- ) -- else if String.is_prefix line "Creation Date: " then ( -- let t = parse_isoinfo_date (String.sub line 19 (n-19)) in -- ret := { !ret with iso_volume_creation_t = t } -- ) -- else if String.is_prefix line "Modification Date: " then ( -- let t = parse_isoinfo_date (String.sub line 19 (n-19)) in -- ret := { !ret with iso_volume_modification_t = t } -- ) -- else if String.is_prefix line "Expiration Date: " then ( -- let t = parse_isoinfo_date (String.sub line 19 (n-19)) in -- ret := { !ret with iso_volume_expiration_t = t } -- ) -- else if String.is_prefix line "Effective Date: " then ( -- let t = parse_isoinfo_date (String.sub line 19 (n-19)) in -- ret := { !ret with iso_volume_effective_t = t } -- ) -- ) lines; -- !ret -- --(* This is always in a fixed format: -- * "2021033012313200" -- * or if the field is not present, then: -- * "0000000000000000" -- * XXX Parse the time zone fields too. -- *) --let parse_xorriso_date str = -- if str = "0000000000000000" then -1_L -- else if String.length str <> 16 then -1_L -+(* Parse ISO dec-datetime to a Unix time_t. *) -+let iso_parse_datetime str = -+ if String.sub str 0 16 = "0000000000000000" then -1_L - else ( - let tm_year = int_of_string (String.sub str 0 4) in - let tm_mon = int_of_string (String.sub str 4 2) in -@@ -180,69 +55,76 @@ let parse_xorriso_date str = - let tm_year = tm_year - 1900 in - let tm_mon = tm_mon - 1 in - -- (* Convert to time_t *) -+ (* Convert to time_t in UTC timezone. *) - let tm = { tm_sec; tm_min; tm_hour; tm_mday; tm_mon; tm_year; - tm_wday = -1; tm_yday = -1; tm_isdst = false } in -- Int64.of_float (fst (Unix.mktime tm)) -+ let old_TZ = try Some (getenv "TZ") with Not_found -> None in -+ putenv "TZ" "UTC"; -+ let r = Int64.of_float (fst (mktime tm)) in -+ Option.may (putenv "TZ") old_TZ; -+ -+ (* The final byte is a time zone offset from GMT. -+ * -+ * The documentation of this at -+ * https://wiki.osdev.org/ISO_9660#The_Primary_Volume_Descriptor -+ * is wrong. See the ECMA 119 documentation for a correct -+ * description. -+ * -+ * For a disk image which we know was created -+ * in BST (GMT+1), this contains 0x4, ie. 4 * 15 mins ahead. -+ * We have to subtract this from the gmtime above. -+ *) -+ let tz = Char.code str.[16] in -+ let tz = if tz >= 128 then tz - 256 else tz in -+ r -^ (Int64.of_int (tz * 15 * 60)) - ) - --let do_xorriso dev = -- (* stdio: prefix is to work around a stupidity of xorriso. *) -- let lines = command "xorriso" ["-indev"; "stdio:" ^ dev; "-pvd_info"] in -- let lines = String.nsplit "\n" lines in -- -- let ret = ref default_iso in -- List.iter ( -- fun line -> -- let n = String.length line in -- if String.is_prefix line "System Id : " then -- ret := { !ret with iso_system_id = String.sub line 15 (n-15) } -- else if String.is_prefix line "Volume Id : " then -- ret := { !ret with iso_volume_id = String.sub line 15 (n-15) } -- else if String.is_prefix line "Volume Set Id: " then -- ret := { !ret with iso_volume_set_id = String.sub line 15 (n-15) } -- else if String.is_prefix line "Publisher Id : " then -- ret := { !ret with iso_publisher_id = String.sub line 15 (n-15) } -- else if String.is_prefix line "App Id : " then -- ret := { !ret with iso_application_id = String.sub line 15 (n-15) } -- else if String.is_prefix line "CopyrightFile: " then -- ret := { !ret with iso_copyright_file_id = String.sub line 15 (n-15) } -- else if String.is_prefix line "Abstract File: " then -- ret := { !ret with iso_abstract_file_id = String.sub line 15 (n-15) } -- else if String.is_prefix line "Biblio File : " then -- ret := { !ret with -- iso_bibliographic_file_id = String.sub line 15 (n-15) } -- (* XXX The following fields don't appear to be available -- * with xorriso: -- * - iso_volume_space_size (only available on stderr) -- * - iso_volume_sequence_number -- * - iso_logical_block_size -- *) -- (* XXX xorriso provides a timezone for these fields, but -- * we don't use it here. -- *) -- else if String.is_prefix line "Creation Time: " then ( -- let t = parse_xorriso_date (String.sub line 15 (n-15)) in -- ret := { !ret with iso_volume_creation_t = t } -- ) -- else if String.is_prefix line "Modif. Time : " then ( -- let t = parse_xorriso_date (String.sub line 15 (n-15)) in -- ret := { !ret with iso_volume_modification_t = t } -- ) -- else if String.is_prefix line "Expir. Time : " then ( -- let t = parse_xorriso_date (String.sub line 15 (n-15)) in -- ret := { !ret with iso_volume_expiration_t = t } -- ) -- else if String.is_prefix line "Eff. Time : " then ( -- let t = parse_xorriso_date (String.sub line 15 (n-15)) in -- ret := { !ret with iso_volume_effective_t = t } -- ) -- ) lines; -- !ret -- - let isoinfo dev = -- match get_tool () with -- | Isoinfo -> do_isoinfo dev -- | Xorriso -> do_xorriso dev -+ let r, pvd = -+ with_openfile dev [O_RDONLY] 0 ( -+ fun fd -> -+ ignore (lseek fd 32768 SEEK_SET); -+ let pvd = Bytes.create 2048 in -+ let r = read fd pvd 0 2048 in -+ r, Bytes.to_string pvd -+ ) in -+ -+ let sub = String.sub pvd in -+ -+ (* Check that it looks like an ISO9660 Primary Volume Descriptor. -+ * https://wiki.osdev.org/ISO_9660#The_Primary_Volume_Descriptor -+ *) -+ if r <> 2048 || pvd.[0] <> '\001' || sub 1 5 <> "CD001" then -+ failwithf "%s: not an ISO file or CD-ROM" dev; -+ -+ (* Parse out the PVD fields. *) -+ let iso_system_id = sub 8 32 |> iso_parse_strA in -+ let iso_volume_id = sub 40 32 |> iso_parse_strA in -+ let iso_volume_space_size = sub 80 4 |> iso_parse_int32 in -+ let iso_volume_set_size = sub 120 2 |> iso_parse_int16 in -+ let iso_volume_sequence_number = sub 124 2 |> iso_parse_int16 in -+ let iso_logical_block_size = sub 128 2 |> iso_parse_int16 in -+ let iso_volume_set_id = sub 190 128 |> iso_parse_strD in -+ let iso_publisher_id = sub 318 128 |> iso_parse_strA in -+ let iso_data_preparer_id = sub 446 128 |> iso_parse_strA in -+ let iso_application_id = sub 574 128 |> iso_parse_strA in -+ let iso_copyright_file_id = sub 702 38 |> iso_parse_strD in -+ let iso_abstract_file_id = sub 740 36 |> iso_parse_strD in -+ let iso_bibliographic_file_id = sub 776 37 |> iso_parse_strD in -+ let iso_volume_creation_t = sub 813 17 |> iso_parse_datetime in -+ let iso_volume_modification_t = sub 830 17 |> iso_parse_datetime in -+ let iso_volume_expiration_t = sub 847 17 |> iso_parse_datetime in -+ let iso_volume_effective_t = sub 864 17 |> iso_parse_datetime in -+ -+ (* Return the struct. *) -+ { -+ iso_system_id; iso_volume_id; iso_volume_space_size; -+ iso_volume_set_size; iso_volume_sequence_number; -+ iso_logical_block_size; iso_volume_set_id; iso_publisher_id; -+ iso_data_preparer_id; iso_application_id; iso_copyright_file_id; -+ iso_abstract_file_id; iso_bibliographic_file_id; -+ iso_volume_creation_t; iso_volume_modification_t; -+ iso_volume_expiration_t; iso_volume_effective_t; -+ } - - let isoinfo_device = isoinfo --- -2.29.0.rc2 - diff --git a/0005-lib-appliance-kcmdline.c-Read-UUID-directly-from-app.patch b/0005-lib-appliance-kcmdline.c-Read-UUID-directly-from-app.patch deleted file mode 100644 index c1b70c0..0000000 --- a/0005-lib-appliance-kcmdline.c-Read-UUID-directly-from-app.patch +++ /dev/null @@ -1,127 +0,0 @@ -From 278d0d3226f4bdb7c6586986ca46d0a25c976fe4 Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Wed, 31 Mar 2021 13:40:11 +0100 -Subject: [PATCH 5/5] lib/appliance-kcmdline.c: Read UUID directly from - appliance. - -Instead of using the external file utility, read the UUID directly -from the extfs filesystem. file 5.40 broke parsing of UUIDs -(https://bugs.astron.com/view.php?id=253). - -Bug: https://bugzilla.redhat.com/show_bug.cgi?id=1945122 ---- - lib/appliance-kcmdline.c | 75 +++++++++++++++++++++++++--------------- - 1 file changed, 48 insertions(+), 27 deletions(-) - -diff --git a/lib/appliance-kcmdline.c b/lib/appliance-kcmdline.c -index 6d0deef86..8b78655eb 100644 ---- a/lib/appliance-kcmdline.c -+++ b/lib/appliance-kcmdline.c -@@ -27,6 +27,9 @@ - #include - #include - #include -+#include -+#include -+#include - - #include "c-ctype.h" - #include "ignore-value.h" -@@ -56,49 +59,67 @@ - #define EARLYPRINTK "earlyprintk=pl011,0x9000000" - #endif - --COMPILE_REGEXP (re_uuid, "UUID=([-0-9a-f]+)", 0) -- --static void --read_uuid (guestfs_h *g, void *retv, const char *line, size_t len) --{ -- char **ret = retv; -- -- *ret = match1 (g, line, re_uuid); --} -- - /** - * Given a disk image containing an extX filesystem, return the UUID. -- * The L command does the hard work. - */ - static char * - get_root_uuid_with_file (guestfs_h *g, const char *appliance) - { -- CLEANUP_CMD_CLOSE struct command *cmd = guestfs_int_new_command (g); -- char *ret = NULL; -- int r; -+ unsigned char magic[2], uuid[16]; -+ char *ret; -+ int fd; - -- guestfs_int_cmd_add_arg (cmd, "file"); -- guestfs_int_cmd_add_arg (cmd, "--"); -- guestfs_int_cmd_add_arg (cmd, appliance); -- guestfs_int_cmd_set_stdout_callback (cmd, read_uuid, &ret, 0); -- r = guestfs_int_cmd_run (cmd); -- if (r == -1) { -- if (ret) free (ret); -+ fd = open (appliance, O_RDONLY|O_CLOEXEC); -+ if (fd == -1) { -+ perrorf (g, _("open: %s"), appliance); - return NULL; - } -- if (!WIFEXITED (r) || WEXITSTATUS (r) != 0) { -- guestfs_int_external_command_failed (g, r, "file", NULL); -- if (ret) free (ret); -+ if (lseek (fd, 0x438, SEEK_SET) != 0x438) { -+ magic_error: -+ error (g, _("%s: cannot read extfs magic in superblock"), appliance); -+ close (fd); - return NULL; - } -+ if (read (fd, magic, 2) != 2) -+ goto magic_error; -+ if (magic[0] != 0x53 || magic[1] != 0xEF) { -+ error (g, _("%s: appliance is not an extfs filesystem"), appliance); -+ close (fd); -+ return NULL; -+ } -+ if (lseek (fd, 0x468, SEEK_SET) != 0x468) { -+ super_error: -+ error (g, _("%s: cannot read UUID in superblock"), appliance); -+ close (fd); -+ return NULL; -+ } -+ if (read (fd, uuid, 16) != 16) -+ goto super_error; -+ close (fd); - -+ /* The UUID is a binary blob, but we must return it as a printable -+ * string. The caller frees this. -+ */ -+ ret = safe_asprintf (g, -+ "%02x%02x%02x%02x" "-" -+ "%02x%02x" "-" -+ "%02x%02x" "-" -+ "%02x%02x" "-" -+ "%02x%02x%02x%02x%02x%02x", -+ uuid[0], uuid[1], uuid[2], uuid[3], -+ uuid[4], uuid[5], -+ uuid[6], uuid[7], -+ uuid[8], uuid[9], -+ uuid[10], uuid[11], uuid[12], uuid[13], -+ uuid[14], uuid[15]); - return ret; - } - - /** -- * Read the first 256k bytes of the in_file with L command -- * and write them into the out_file. That may be useful to get UUID of -- * the QCOW2 disk image with further L command. -+ * Read the first 256k bytes of the in_file with L -+ * command and write them into the out_file. That may be useful to get -+ * UUID of the QCOW2 disk image with C. -+ * - * The function returns zero if successful, otherwise -1. - */ - static int --- -2.29.0.rc2 - diff --git a/libguestfs.spec b/libguestfs.spec index 4899029..a1c558a 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -42,7 +42,7 @@ # If there are patches which touch autotools files, set this to 1. %if !0%{?rhel} -%global patches_touch_autotools 1 +%global patches_touch_autotools %{nil} %else # On RHEL the downstream patches always touch autotools files. %global patches_touch_autotools 1 @@ -60,8 +60,8 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 -Version: 1.45.3 -Release: 6%{?dist} +Version: 1.45.4 +Release: 1%{?dist} License: LGPLv2+ # Build only for architectures that have a kernel @@ -91,14 +91,6 @@ Source7: libguestfs.keyring # Maintainer script which helps with handling patches. Source8: copy-patches.sh -# Upstream patches since 1.45.3. -Patch0001: 0001-daemon-xfs.c-Fix-error-message.patch -Patch0002: 0002-tests-Prefer-xorriso-over-genisoimage-to-generate-te.patch -Patch0003: 0003-daemon-Allow-xorriso-as-an-alternative-to-isoinfo.patch -Patch0004: 0004-daemon-Read-ISO9660-Primary-Volume-Descriptor-direct.patch -# Workaround for file 5.40 which is broken in Fedora Rawhide. -Patch0005: 0005-lib-appliance-kcmdline.c-Read-UUID-directly-from-app.patch - # Downstream (RHEL-only) patches. %if 0%{?rhel} Patch9001: 0001-RHEL-Remove-libguestfs-live-RHBZ-798980.patch @@ -1126,6 +1118,9 @@ rm ocaml/html/.gitignore %changelog +* Sat Apr 03 2021 Richard W.M. Jones - 1:1.45.4-1 +- New upstream version 1.45.4. + * Wed Mar 31 2021 Richard W.M. Jones - 1:1.45.3-6 - Don't require genisoimage or xorriso for the appliance. - Add workaround for broken "file" utility in Rawhide (RHBZ#1945122). diff --git a/sources b/sources index 4b6006f..0021018 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (libguestfs-1.45.3.tar.gz) = b8f3dc9ffa49b50769f8f11d65cf3c8e645b35ee05ea2563b19daa8bc743e7f3386754cb5ffd2447f55ade4b57e9c4f98e483ecffc548652659e1260bf2e6e0b -SHA512 (libguestfs-1.45.3.tar.gz.sig) = bce2ed6fd987baf82ebdd7d97cf1b1a07f62991e07de45d4f22d20c5180120c5b443b690c1db6c00a71cb14fb66b5a950de227d9c7fea2c9ca32afba33818216 +SHA512 (libguestfs-1.45.4.tar.gz) = 5e4960a0a0a182f1736a9707a84fd11f28b530a31d6a1ac2fca35d284e63bb07f20d2344355f4a626866dfb006e09c3f4a60754512a10b6462d4587e8cdc075e +SHA512 (libguestfs-1.45.4.tar.gz.sig) = 860529aa6febf552ba5495f5b56f61daa27bd117fa0bc9a965511646022ee8f8f27f34a9ab1605cb7dea71d66bff2ab9da72d189f559f07ced57dc982929200c From 8f17229bff29cc02e098cf96df5408daa46c75f4 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 9 Apr 2021 12:55:59 +0100 Subject: [PATCH 037/243] New upstream development version 1.45.5. --- libguestfs.spec | 5 ++++- sources | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index a1c558a..5f99643 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -60,7 +60,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 -Version: 1.45.4 +Version: 1.45.5 Release: 1%{?dist} License: LGPLv2+ @@ -1118,6 +1118,9 @@ rm ocaml/html/.gitignore %changelog +* Fri Apr 09 2021 Richard W.M. Jones - 1:1.45.5-1 +- New upstream development version 1.45.5. + * Sat Apr 03 2021 Richard W.M. Jones - 1:1.45.4-1 - New upstream version 1.45.4. diff --git a/sources b/sources index 0021018..e0ee108 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (libguestfs-1.45.4.tar.gz) = 5e4960a0a0a182f1736a9707a84fd11f28b530a31d6a1ac2fca35d284e63bb07f20d2344355f4a626866dfb006e09c3f4a60754512a10b6462d4587e8cdc075e -SHA512 (libguestfs-1.45.4.tar.gz.sig) = 860529aa6febf552ba5495f5b56f61daa27bd117fa0bc9a965511646022ee8f8f27f34a9ab1605cb7dea71d66bff2ab9da72d189f559f07ced57dc982929200c +SHA512 (libguestfs-1.45.5.tar.gz) = 8caa03d6dd94f5f81c571fc344efa292442faa6cd3b9ab542be817c3e1cd0b2d6923b75775ba94ed754e4aa7eca8ab37a796149dde7175dc5d6c1c3d60004a0e +SHA512 (libguestfs-1.45.5.tar.gz.sig) = ebdd284cad708c8e714315f1ff850018b7bd73ca0faac7a24c0b4c4e96df0fe62ee5b9e843830a05f749606d588d5c2c354ecfed42e205128dc71f10ef7f1fae From 063aa237e020b39525c027749589f6b131a00462 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 14 Apr 2021 12:44:06 +0100 Subject: [PATCH 038/243] libguestfs from 1.45.5 no longer bundles gnulib. --- libguestfs.spec | 3 --- 1 file changed, 3 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index 5f99643..27fcc96 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -353,9 +353,6 @@ Requires: /usr/bin/less Requires: /usr/bin/man Requires: /usr/bin/vi -# https://fedoraproject.org/wiki/Packaging:No_Bundled_Libraries#Packages_granted_exceptions -Provides: bundled(gnulib) - %if !0%{?rhel} # Someone managed to install libguestfs-winsupport (from RHEL!) on # Fedora, which breaks everything. Thus: From d4725ab61b45f4968fb89b5114f71eb5657d5fb4 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 20 Apr 2021 10:12:38 +0100 Subject: [PATCH 039/243] No qemu-kvm on POWER on RHEL resolves: rhbz#1946532 (cherry picked from commit 575d24d6694f4460295af0be50ef49c7d0432884) --- libguestfs.spec | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libguestfs.spec b/libguestfs.spec index 27fcc96..3eaf31d 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -66,6 +66,10 @@ License: LGPLv2+ # Build only for architectures that have a kernel ExclusiveArch: %{kernel_arches} +%if 0%{?rhel} +# No qemu-kvm on POWER (RHBZ#1946532). +ExcludeArch: %{power64} +%endif # Source and patches. URL: http://libguestfs.org/ From 1ead53a482176aeffc02f3dfbff9a49427c789a2 Mon Sep 17 00:00:00 2001 From: Jeff Law Date: Mon, 10 May 2021 16:27:17 -0600 Subject: [PATCH 040/243] Re-enable LTO --- libguestfs.spec | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index 3eaf31d..41d9bfa 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -1,7 +1,3 @@ -# Disable LTO because: -# https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/Y3WTAS3MJ5WNNVVYPXARFXV6A6QH6KEY/ -%define _lto_cflags %{nil} - # Architectures on which golang works. #% global golang_arches aarch64 % {arm} % {ix86} x86_64 # In theory the above, in practice golang is so often broken that @@ -61,7 +57,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.45.5 -Release: 1%{?dist} +Release: 2%{?dist} License: LGPLv2+ # Build only for architectures that have a kernel @@ -1119,6 +1115,9 @@ rm ocaml/html/.gitignore %changelog +* Mon May 10 2021 Jeff Law - 1:1.45.5-2 +- Re-enable LTO + * Fri Apr 09 2021 Richard W.M. Jones - 1:1.45.5-1 - New upstream development version 1.45.5. From baa2e3c2436e8cda02270127bcba7a847e9cf8d3 Mon Sep 17 00:00:00 2001 From: Jitka Plesnikova Date: Fri, 21 May 2021 22:28:59 +0200 Subject: [PATCH 041/243] Perl 5.34 rebuild --- libguestfs.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libguestfs.spec b/libguestfs.spec index 41d9bfa..44c54a2 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -57,7 +57,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.45.5 -Release: 2%{?dist} +Release: 3%{?dist} License: LGPLv2+ # Build only for architectures that have a kernel @@ -1115,6 +1115,9 @@ rm ocaml/html/.gitignore %changelog +* Fri May 21 2021 Jitka Plesnikova - 1:1.45.5-3 +- Perl 5.34 rebuild + * Mon May 10 2021 Jeff Law - 1:1.45.5-2 - Re-enable LTO From f1ab20704e4b75757ea6024b8d04bafffa572bd5 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 27 May 2021 17:45:59 +0100 Subject: [PATCH 042/243] New upstream development version 1.45.6. --- libguestfs.spec | 7 +++++-- sources | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index 44c54a2..07f750f 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -56,8 +56,8 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 -Version: 1.45.5 -Release: 3%{?dist} +Version: 1.45.6 +Release: 1%{?dist} License: LGPLv2+ # Build only for architectures that have a kernel @@ -1115,6 +1115,9 @@ rm ocaml/html/.gitignore %changelog +* Thu May 22 2021 Richard W.M. Jones - 1:1.45.6-1 +- New upstream development version 1.45.6. + * Fri May 21 2021 Jitka Plesnikova - 1:1.45.5-3 - Perl 5.34 rebuild diff --git a/sources b/sources index e0ee108..33a2bac 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (libguestfs-1.45.5.tar.gz) = 8caa03d6dd94f5f81c571fc344efa292442faa6cd3b9ab542be817c3e1cd0b2d6923b75775ba94ed754e4aa7eca8ab37a796149dde7175dc5d6c1c3d60004a0e -SHA512 (libguestfs-1.45.5.tar.gz.sig) = ebdd284cad708c8e714315f1ff850018b7bd73ca0faac7a24c0b4c4e96df0fe62ee5b9e843830a05f749606d588d5c2c354ecfed42e205128dc71f10ef7f1fae +SHA512 (libguestfs-1.45.6.tar.gz) = 018aec83d153aeabb7c0b255e6d5b40b03ff6d0de12dc1e0557fc35215db593aaa871c4bc1f44e785f74bf02a367aec0e90157f8ff159cccc820ebf1afd2258a +SHA512 (libguestfs-1.45.6.tar.gz.sig) = 8f0be35a265356e7bd823b3d9302449ac62d633de8a9bd40ca457bcb4e4d2aebc827c4867bfdb6f3e3a4f34ade168103f5af0a44b667c875be7721e275433dbe From 85d3203b3a42282ada2b3d87192dd225f32f1551 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 27 May 2021 18:27:12 +0100 Subject: [PATCH 043/243] Fix date in changelog --- libguestfs.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libguestfs.spec b/libguestfs.spec index 07f750f..353fdd8 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -1115,7 +1115,7 @@ rm ocaml/html/.gitignore %changelog -* Thu May 22 2021 Richard W.M. Jones - 1:1.45.6-1 +* Thu May 27 2021 Richard W.M. Jones - 1:1.45.6-1 - New upstream development version 1.45.6. * Fri May 21 2021 Jitka Plesnikova - 1:1.45.5-3 From 6b72a376448689cbdf9afcf48e88c0d61726b492 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 1 Jun 2021 14:44:43 +0100 Subject: [PATCH 044/243] Depend on rpm-libs >= 4.16.1.3 (RHBZ#1966541). --- libguestfs.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index 353fdd8..0142ab7 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -57,7 +57,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.45.6 -Release: 1%{?dist} +Release: 2%{?dist} License: LGPLv2+ # Build only for architectures that have a kernel @@ -319,7 +319,7 @@ Requires: libcap%{?_isa} Requires: libselinux%{?_isa} Requires: hivex%{?_isa} >= 1.3.10 Requires: pcre2%{?_isa} -Requires: rpm-libs%{?_isa} +Requires: rpm-libs%{?_isa} >= 4.16.1.3 Requires: systemd-libs%{?_isa} Requires: yajl%{?_isa} @@ -1115,6 +1115,9 @@ rm ocaml/html/.gitignore %changelog +* Tue Jun 01 2021 Richard W.M. Jones - 1:1.45.6-2 +- Depend on rpm-libs >= 4.16.1.3 (RHBZ#1966541). + * Thu May 27 2021 Richard W.M. Jones - 1:1.45.6-1 - New upstream development version 1.45.6. From af41447287d64bfc7be8485f59236dce13e37068 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 2 Jun 2021 10:34:23 +0100 Subject: [PATCH 045/243] Add gating tests (for RHEL 9) --- gating.yaml | 6 ++++++ libguestfs.spec | 5 ++++- 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100755 gating.yaml diff --git a/gating.yaml b/gating.yaml new file mode 100755 index 0000000..9234236 --- /dev/null +++ b/gating.yaml @@ -0,0 +1,6 @@ +--- !Policy +product_versions: + - rhel-9 +decision_context: osci_compose_gate +rules: + - !PassingTestCaseRule {test_case_name: xen-ci.brew-build.tier1.functional} diff --git a/libguestfs.spec b/libguestfs.spec index 0142ab7..430469a 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -57,7 +57,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.45.6 -Release: 2%{?dist} +Release: 3%{?dist} License: LGPLv2+ # Build only for architectures that have a kernel @@ -1115,6 +1115,9 @@ rm ocaml/html/.gitignore %changelog +* Wed Jun 2 10:33:20 BST 2021 Richard W.M. Jones - 1:1.45.6-3 +- Add gating tests (for RHEL 9) + * Tue Jun 01 2021 Richard W.M. Jones - 1:1.45.6-2 - Depend on rpm-libs >= 4.16.1.3 (RHBZ#1966541). From c8896d32cbe98492b6e2bac1a4b7ea5f9e07ef64 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 2 Jun 2021 10:36:08 +0100 Subject: [PATCH 046/243] Remove bogus timestamp added by rpmdev-bumpspec --- libguestfs.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libguestfs.spec b/libguestfs.spec index 430469a..8df10f9 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -1115,7 +1115,7 @@ rm ocaml/html/.gitignore %changelog -* Wed Jun 2 10:33:20 BST 2021 Richard W.M. Jones - 1:1.45.6-3 +* Wed Jun 2 2021 Richard W.M. Jones - 1:1.45.6-3 - Add gating tests (for RHEL 9) * Tue Jun 01 2021 Richard W.M. Jones - 1:1.45.6-2 From 0b4e08f0b4b854bd524c4779c5ba4fa201f21ba3 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 3 Jun 2021 14:30:35 +0100 Subject: [PATCH 047/243] Add --enable-appliance-format-auto (RHBZ#1967166) --- libguestfs.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libguestfs.spec b/libguestfs.spec index 8df10f9..7ddc22f 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -57,7 +57,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.45.6 -Release: 3%{?dist} +Release: 4%{?dist} License: LGPLv2+ # Build only for architectures that have a kernel @@ -753,6 +753,7 @@ fi %endif PYTHON=%{__python3} \ --with-default-backend=libvirt \ + --enable-appliance-format-auto \ %if !0%{?rhel} --with-extra="fedora=%{fedora},release=%{release},libvirt" \ %else @@ -1115,6 +1116,9 @@ rm ocaml/html/.gitignore %changelog +* Thu Jun 3 2021 Richard W.M. Jones - 1:1.45.6-4 +- Add --enable-appliance-format-auto (RHBZ#1967166) + * Wed Jun 2 2021 Richard W.M. Jones - 1:1.45.6-3 - Add gating tests (for RHEL 9) From bc142755f6bf2943e1145308a61c7e11848ef25a Mon Sep 17 00:00:00 2001 From: Python Maint Date: Fri, 4 Jun 2021 20:09:20 +0200 Subject: [PATCH 048/243] Rebuilt for Python 3.10 --- libguestfs.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libguestfs.spec b/libguestfs.spec index 7ddc22f..7381837 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -57,7 +57,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.45.6 -Release: 4%{?dist} +Release: 5%{?dist} License: LGPLv2+ # Build only for architectures that have a kernel @@ -1116,6 +1116,9 @@ rm ocaml/html/.gitignore %changelog +* Fri Jun 04 2021 Python Maint - 1:1.45.6-5 +- Rebuilt for Python 3.10 + * Thu Jun 3 2021 Richard W.M. Jones - 1:1.45.6-4 - Add --enable-appliance-format-auto (RHBZ#1967166) From 8df9b2daaca9d783c191b0d1711e33b76f6b5bb3 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sat, 12 Jun 2021 07:43:58 +0100 Subject: [PATCH 049/243] Depend on hivex-libs instead of hivex. --- libguestfs.spec | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index 7381837..8af742e 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -57,7 +57,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.45.6 -Release: 5%{?dist} +Release: 6%{?dist} License: LGPLv2+ # Build only for architectures that have a kernel @@ -244,7 +244,7 @@ BuildRequires: gzip BuildRequires: hfsplus-tools %endif %endif -BuildRequires: hivex +BuildRequires: hivex-libs BuildRequires: iproute BuildRequires: iputils BuildRequires: kernel @@ -317,7 +317,7 @@ Requires: augeas-libs%{?_isa} >= 1.7.0 Requires: libacl%{?_isa} Requires: libcap%{?_isa} Requires: libselinux%{?_isa} -Requires: hivex%{?_isa} >= 1.3.10 +Requires: hivex-libs%{?_isa} >= 1.3.10 Requires: pcre2%{?_isa} Requires: rpm-libs%{?_isa} >= 4.16.1.3 Requires: systemd-libs%{?_isa} @@ -1116,6 +1116,9 @@ rm ocaml/html/.gitignore %changelog +* Sat Jun 12 2021 Richard W.M. Jones - 1:1.45.6-6 +- Depend on hivex-libs instead of hivex. + * Fri Jun 04 2021 Python Maint - 1:1.45.6-5 - Rebuilt for Python 3.10 From 2be2382c8f897c33867a6cc86cb5e4788957a4c1 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 24 Jun 2021 09:59:30 +0100 Subject: [PATCH 050/243] Remove Suggests for unsupported qemu drivers in RHEL (RHBZ#1975703) --- libguestfs.spec | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/libguestfs.spec b/libguestfs.spec index 8af742e..4cb71f8 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -57,7 +57,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.45.6 -Release: 6%{?dist} +Release: 8%{?dist} License: LGPLv2+ # Build only for architectures that have a kernel @@ -331,11 +331,15 @@ Requires: /usr/bin/qemu-img # For qemu direct and libvirt backends. Requires: qemu-kvm-core +%if !0%{?rhel} Suggests: qemu-block-curl Suggests: qemu-block-gluster Suggests: qemu-block-iscsi +%endif Suggests: qemu-block-rbd +%if !0%{?rhel} Suggests: qemu-block-ssh +%endif Recommends: libvirt-daemon-config-network Requires: libvirt-daemon-driver-qemu >= 7.1.0 Requires: libvirt-daemon-driver-secret @@ -1116,6 +1120,9 @@ rm ocaml/html/.gitignore %changelog +* Thu Jun 24 2021 Richard W.M. Jones - 1:1.45.6-8 +- Remove Suggests for unsupported qemu drivers in RHEL (RHBZ#1975703) + * Sat Jun 12 2021 Richard W.M. Jones - 1:1.45.6-6 - Depend on hivex-libs instead of hivex. From 689bd7669a25a465a29ac49b725e0f16818c3481 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 29 Jun 2021 15:47:39 +0100 Subject: [PATCH 051/243] RHEL 9 patch for openssl missing configuration file https://bugzilla.redhat.com/show_bug.cgi?id=1977214#c13 --- ...L-Remove-libguestfs-live-RHBZ-798980.patch | 6 ++-- ...Remove-9p-APIs-from-RHEL-RHBZ-921710.patch | 18 +++++----- ...upported-remote-drive-protocols-RHBZ.patch | 8 ++--- ...-Remove-User-Mode-Linux-RHBZ-1144197.patch | 6 ++-- ...of-libguestfs-winsupport-features-ex.patch | 8 ++--- ...crypto-policies-back-ends-opensslcnf.patch | 33 +++++++++++++++++++ libguestfs.spec | 7 +++- 7 files changed, 62 insertions(+), 24 deletions(-) create mode 100644 0006-RHEL-Create-etc-crypto-policies-back-ends-opensslcnf.patch diff --git a/0001-RHEL-Remove-libguestfs-live-RHBZ-798980.patch b/0001-RHEL-Remove-libguestfs-live-RHBZ-798980.patch index ec066eb..ef3bcac 100644 --- a/0001-RHEL-Remove-libguestfs-live-RHBZ-798980.patch +++ b/0001-RHEL-Remove-libguestfs-live-RHBZ-798980.patch @@ -1,7 +1,7 @@ -From 802b515677d77936a2ae0d6e945a0364e4246002 Mon Sep 17 00:00:00 2001 +From fb09175a21b9ee333e3ad01ab9c8652263200ca4 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 21 Dec 2012 15:50:11 +0000 -Subject: [PATCH 1/5] RHEL: Remove libguestfs live (RHBZ#798980). +Subject: [PATCH 1/6] RHEL: Remove libguestfs live (RHBZ#798980). This isn't supported in RHEL. @@ -51,5 +51,5 @@ index 690e09b5e..919e2f248 100644 daemon/test-daemon-start.pl \ daemon/test-btrfs.pl -- -2.30.1 +2.31.1 diff --git a/0002-RHEL-Remove-9p-APIs-from-RHEL-RHBZ-921710.patch b/0002-RHEL-Remove-9p-APIs-from-RHEL-RHBZ-921710.patch index e8cc8fa..6496e82 100644 --- a/0002-RHEL-Remove-9p-APIs-from-RHEL-RHBZ-921710.patch +++ b/0002-RHEL-Remove-9p-APIs-from-RHEL-RHBZ-921710.patch @@ -1,7 +1,7 @@ -From c8770be96ddbebd7f1f726d97aa566fb1558ce2d Mon Sep 17 00:00:00 2001 +From e0af86a09b80b5fa0c5f308ae6f34d8315c1dc4d Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 18 Jul 2013 18:31:53 +0100 -Subject: [PATCH 2/5] RHEL: Remove 9p APIs from RHEL (RHBZ#921710). +Subject: [PATCH 2/6] RHEL: Remove 9p APIs from RHEL (RHBZ#921710). --- daemon/9p.c | 182 -------------------------------------- @@ -204,10 +204,10 @@ index 743a96abd..000000000 - return 0; -} diff --git a/daemon/Makefile.am b/daemon/Makefile.am -index 216029b7c..8bf601367 100644 +index 6f13bd43c..cc4dbcd85 100644 --- a/daemon/Makefile.am +++ b/daemon/Makefile.am -@@ -83,7 +83,6 @@ guestfsd_SOURCES = \ +@@ -84,7 +84,6 @@ guestfsd_SOURCES = \ ../common/protocol/guestfs_protocol.h \ ../common/utils/cleanups.h \ ../common/utils/guestfs-utils.h \ @@ -216,7 +216,7 @@ index 216029b7c..8bf601367 100644 actions.h \ available.c \ diff --git a/docs/C_SOURCE_FILES b/docs/C_SOURCE_FILES -index 060be051b..7a05f3b24 100644 +index 6a97d8b0e..896314e7e 100644 --- a/docs/C_SOURCE_FILES +++ b/docs/C_SOURCE_FILES @@ -43,7 +43,6 @@ common/visit/visit.c @@ -228,7 +228,7 @@ index 060be051b..7a05f3b24 100644 daemon/actions.h daemon/augeas.c diff --git a/generator/actions_core.ml b/generator/actions_core.ml -index bb92ef2ca..5f849bad1 100644 +index bb602ee02..db8156c51 100644 --- a/generator/actions_core.ml +++ b/generator/actions_core.ml @@ -6157,27 +6157,6 @@ This returns true iff the device exists and contains all zero bytes. @@ -293,7 +293,7 @@ index 650f8ddac..c4e735967 100644 src/optargs-ntfsclone_out.c \ src/optargs-ntfsfix.c \ diff --git a/po/POTFILES b/po/POTFILES -index c5f4e6aa7..aeb701e32 100644 +index 29205b6a6..23afe619c 100644 --- a/po/POTFILES +++ b/po/POTFILES @@ -26,7 +26,6 @@ common/utils/stringlists-utils.c @@ -304,7 +304,7 @@ index c5f4e6aa7..aeb701e32 100644 daemon/acl.c daemon/augeas.c daemon/available.c -@@ -251,7 +250,6 @@ gobject/src/optargs-mkfs_btrfs.c +@@ -264,7 +263,6 @@ gobject/src/optargs-mkfs_btrfs.c gobject/src/optargs-mksquashfs.c gobject/src/optargs-mkswap.c gobject/src/optargs-mktemp.c @@ -325,5 +325,5 @@ index 919e2f248..e3613fec4 100644 SLOW_TESTS += bigdirs/test-big-dirs.pl -- -2.30.1 +2.31.1 diff --git a/0003-RHEL-Disable-unsupported-remote-drive-protocols-RHBZ.patch b/0003-RHEL-Disable-unsupported-remote-drive-protocols-RHBZ.patch index 48a015e..841ec13 100644 --- a/0003-RHEL-Disable-unsupported-remote-drive-protocols-RHBZ.patch +++ b/0003-RHEL-Disable-unsupported-remote-drive-protocols-RHBZ.patch @@ -1,7 +1,7 @@ -From 41beea618d3da3b0351b3d8aa7eb7be40f369877 Mon Sep 17 00:00:00 2001 +From fddb44d1a2c77739c9441d2cc0acfef9e62718a6 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 29 Jul 2013 14:47:56 +0100 -Subject: [PATCH 3/5] RHEL: Disable unsupported remote drive protocols +Subject: [PATCH 3/6] RHEL: Disable unsupported remote drive protocols (RHBZ#962113). This disables support for unsupported remote drive protocols: @@ -220,7 +220,7 @@ index 21d424984..ddabeb639 100755 rm test-add-uri.out rm test-add-uri.img diff --git a/generator/actions_core.ml b/generator/actions_core.ml -index 5f849bad1..f6f8844b8 100644 +index db8156c51..b87071e3b 100644 --- a/generator/actions_core.ml +++ b/generator/actions_core.ml @@ -297,29 +297,6 @@ F is interpreted as a local file or device. @@ -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.30.1 +2.31.1 diff --git a/0004-RHEL-Remove-User-Mode-Linux-RHBZ-1144197.patch b/0004-RHEL-Remove-User-Mode-Linux-RHBZ-1144197.patch index 32505ae..edf5f00 100644 --- a/0004-RHEL-Remove-User-Mode-Linux-RHBZ-1144197.patch +++ b/0004-RHEL-Remove-User-Mode-Linux-RHBZ-1144197.patch @@ -1,7 +1,7 @@ -From 2cad9372eb4f3a1c37f254eb2e9af797693fa7d4 Mon Sep 17 00:00:00 2001 +From 155063a0c8290eb9c32c552c439cb8023d4a6390 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 19 Sep 2014 13:38:20 +0100 -Subject: [PATCH 4/5] RHEL: Remove User-Mode Linux (RHBZ#1144197). +Subject: [PATCH 4/6] RHEL: Remove User-Mode Linux (RHBZ#1144197). This isn't supported in RHEL. --- @@ -68,5 +68,5 @@ index 5aec50a57..8b9fcd770 100644 static int shutdown_uml (guestfs_h *g, void *datav, int check_for_errors) -- -2.30.1 +2.31.1 diff --git a/0005-RHEL-Reject-use-of-libguestfs-winsupport-features-ex.patch b/0005-RHEL-Reject-use-of-libguestfs-winsupport-features-ex.patch index 84457c1..7edf33e 100644 --- a/0005-RHEL-Reject-use-of-libguestfs-winsupport-features-ex.patch +++ b/0005-RHEL-Reject-use-of-libguestfs-winsupport-features-ex.patch @@ -1,7 +1,7 @@ -From f3fde497b6e0b079ff86360f6c0b6ef8d433c39b Mon Sep 17 00:00:00 2001 +From b33e943827b2decc2a01f198f1b300a3c3f6710e Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 7 Jul 2015 09:28:03 -0400 -Subject: [PATCH 5/5] RHEL: Reject use of libguestfs-winsupport features except +Subject: [PATCH 5/6] RHEL: Reject use of libguestfs-winsupport features except for virt-* tools (RHBZ#1240276). Fix the tests: it doesn't let us use guestfish for arbitrary Windows @@ -13,7 +13,7 @@ edits. 3 files changed, 19 insertions(+) diff --git a/generator/c.ml b/generator/c.ml -index 86d3b26f8..a625361a9 100644 +index ea69abf76..56ee38aa4 100644 --- a/generator/c.ml +++ b/generator/c.ml @@ -1846,6 +1846,22 @@ and generate_client_actions actions () = @@ -65,5 +65,5 @@ index 105291dc3..5ca4f3b6d 100644 exit (EXIT_FAILURE); -- -2.30.1 +2.31.1 diff --git a/0006-RHEL-Create-etc-crypto-policies-back-ends-opensslcnf.patch b/0006-RHEL-Create-etc-crypto-policies-back-ends-opensslcnf.patch new file mode 100644 index 0000000..ce915e9 --- /dev/null +++ b/0006-RHEL-Create-etc-crypto-policies-back-ends-opensslcnf.patch @@ -0,0 +1,33 @@ +From 18c910479cb6465bcd3954c5d07f3ab6df5c944a Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Tue, 29 Jun 2021 15:29:11 +0100 +Subject: [PATCH 6/6] RHEL: Create + /etc/crypto-policies/back-ends/opensslcnf.config + +https://bugzilla.redhat.com/show_bug.cgi?id=1977214#c13 +--- + appliance/init | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/appliance/init b/appliance/init +index b1c4d09ea..be46f9648 100755 +--- a/appliance/init ++++ b/appliance/init +@@ -70,6 +70,14 @@ if ! test -e /etc/mtab; then + ln -s /proc/mounts /etc/mtab + fi + ++# openssl 3 requires /etc/crypto-policies/back-ends/opensslcnf.config ++# to exist, but it is created in a %post script in crypto-policies ++# https://bugzilla.redhat.com/show_bug.cgi?id=1977214#c13 ++if ! test -r /etc/crypto-policies/back-ends/opensslcnf.config && ++ test -f /usr/share/crypto-policies/DEFAULT/opensslcnf.txt; then ++ ln -s /usr/share/crypto-policies/DEFAULT/opensslcnf.txt /etc/crypto-policies/back-ends/opensslcnf.config ++fi ++ + # devtmpfs is required since udev 176 + mount -t devtmpfs /dev /dev + mkdir -p /dev/pts +-- +2.31.1 + diff --git a/libguestfs.spec b/libguestfs.spec index 4cb71f8..851fca3 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -57,7 +57,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.45.6 -Release: 8%{?dist} +Release: 9%{?dist} License: LGPLv2+ # Build only for architectures that have a kernel @@ -98,6 +98,7 @@ Patch9002: 0002-RHEL-Remove-9p-APIs-from-RHEL-RHBZ-921710.patch Patch9003: 0003-RHEL-Disable-unsupported-remote-drive-protocols-RHBZ.patch Patch9004: 0004-RHEL-Remove-User-Mode-Linux-RHBZ-1144197.patch Patch9005: 0005-RHEL-Reject-use-of-libguestfs-winsupport-features-ex.patch +Patch9006: 0006-RHEL-Create-etc-crypto-policies-back-ends-opensslcnf.patch %endif %if 0%{patches_touch_autotools} @@ -1120,6 +1121,10 @@ rm ocaml/html/.gitignore %changelog +* Tue Jun 29 2021 Richard W.M. Jones - 1:1.45.6-9 +- RHEL 9 patch for openssl missing configuration file + https://bugzilla.redhat.com/show_bug.cgi?id=1977214#c13 + * Thu Jun 24 2021 Richard W.M. Jones - 1:1.45.6-8 - Remove Suggests for unsupported qemu drivers in RHEL (RHBZ#1975703) From 34629afce67db08d1d8bc378ed14c6b566c03001 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 22 Jul 2021 11:32:32 +0000 Subject: [PATCH 052/243] - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- libguestfs.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libguestfs.spec b/libguestfs.spec index 851fca3..8910562 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -57,7 +57,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.45.6 -Release: 9%{?dist} +Release: 10%{?dist} License: LGPLv2+ # Build only for architectures that have a kernel @@ -1121,6 +1121,9 @@ rm ocaml/html/.gitignore %changelog +* Thu Jul 22 2021 Fedora Release Engineering - 1:1.45.6-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + * Tue Jun 29 2021 Richard W.M. Jones - 1:1.45.6-9 - RHEL 9 patch for openssl missing configuration file https://bugzilla.redhat.com/show_bug.cgi?id=1977214#c13 From 4c961db464b5b1e1a79de60b593a34270d768394 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 6 Aug 2021 08:44:25 +0100 Subject: [PATCH 053/243] Fix license files Use %license and include COPYING.LIB. --- libguestfs.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libguestfs.spec b/libguestfs.spec index 8910562..80599ff 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -908,7 +908,8 @@ rm ocaml/html/.gitignore %files -f %{name}.lang -%doc COPYING README +%license COPYING COPYING.LIB +%doc README %{_bindir}/guestfish %{_bindir}/guestmount %{_bindir}/guestunmount From 941da6407875ca8e054c2e1605ce0d379f4f313d Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 6 Aug 2021 08:44:52 +0100 Subject: [PATCH 054/243] Move supermin appliance to a subpackage https://bugzilla.redhat.com/show_bug.cgi?id=1989514 Move the appliance to a subpackage (libguestfs-appliance). The main package depends on this new subpackage so in effect nothing changes for most users. However this allows the appliance to be replaced if there exists a package called "libguestfs-noappliance". This package is not provided anywhere, you have to provide the dependency or make the package yourself. But if you do this then libguestfs won't install the appliance and you are free to replace it with (eg) a fixed appliance. --- libguestfs.spec | 31 ++++++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index 80599ff..e5a2bfe 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -57,7 +57,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.45.6 -Release: 10%{?dist} +Release: 11%{?dist} License: LGPLv2+ # Build only for architectures that have a kernel @@ -309,8 +309,13 @@ BuildRequires: zfs-fuse %endif %endif -# For building the appliance. -Requires: supermin >= 5.1.18 +# Main package requires the appliance. This allows the appliance to +# be replaced if there exists a package called +# "libguestfs-noappliance". This package is not provided anywhere, +# you have to provide the dependency or make the package yourself. If +# you do then libguestfs won't install the appliance and you are free +# to replace it with (eg) a fixed appliance. +Requires: (%{name}-appliance = %{epoch}:%{version}-%{release} or %{name}-noappliance) # The daemon dependencies are not included automatically, because it # is buried inside the appliance, so list them here. @@ -417,6 +422,15 @@ Language bindings: %endif +%package appliance +Summary: Appliance for %{name} +Requires: supermin >= 5.1.18 + + +%description appliance +%{name}-appliance provides the appliance used by libguestfs. + + %package devel Summary: Development tools and libraries for %{name} Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release} @@ -918,8 +932,6 @@ rm ocaml/html/.gitignore %{_bindir}/virt-copy-out %{_bindir}/virt-tar-in %{_bindir}/virt-tar-out -%{_libdir}/guestfs/ -%exclude %{_libdir}/guestfs/supermin.d/zz-packages-* %{_libdir}/libguestfs.so.* %{_mandir}/man1/guestfish.1* %{_mandir}/man1/guestfs-faq.1* @@ -940,6 +952,11 @@ rm ocaml/html/.gitignore %config(noreplace) %{_sysconfdir}/libguestfs-tools.conf +%files appliance +%{_libdir}/guestfs/ +%exclude %{_libdir}/guestfs/supermin.d/zz-packages-* + + %files devel %doc AUTHORS BUGS HACKING TODO README %doc examples/*.c @@ -1122,6 +1139,10 @@ rm ocaml/html/.gitignore %changelog +* Fri Aug 06 2021 Richard W.M. Jones - 1:1.45.6-11 +- Fix license files. +- Move appliance to separate subpackage (RHBZ#1989514). + * Thu Jul 22 2021 Fedora Release Engineering - 1:1.45.6-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild From 6c323aeaf2f2909c4b0ada88e9d3d01bc7982c91 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 31 Aug 2021 08:38:26 +0100 Subject: [PATCH 055/243] Upstream patch to work with qemu 6.1 (RHBZ#1998820) --- ...backing-format-for-qemu-img-create-b.patch | 48 +++++++++++++++++++ libguestfs.spec | 9 +++- 2 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 0001-lib-Autodetect-backing-format-for-qemu-img-create-b.patch diff --git a/0001-lib-Autodetect-backing-format-for-qemu-img-create-b.patch b/0001-lib-Autodetect-backing-format-for-qemu-img-create-b.patch new file mode 100644 index 0000000..9a2250f --- /dev/null +++ b/0001-lib-Autodetect-backing-format-for-qemu-img-create-b.patch @@ -0,0 +1,48 @@ +From 45de287447bb18d59749fbfc1ec5072413090109 Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Tue, 31 Aug 2021 08:27:15 +0100 +Subject: [PATCH] lib: Autodetect backing format for qemu-img create -b + +qemu 6.1 has decided to change qemu-img create so that a backing +format (-F) is required if a backing file (-b) is specified. Since we +don't want to change the libguestfs API to force callers to specify +this because that would be an API break, autodetect it. + +This is similar to commit c8c181e8d9 ("launch: libvirt: Autodetect +backing format for readonly drive overlays"). + +Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1998820 +--- + lib/create.c | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/lib/create.c b/lib/create.c +index 44a7df25f..75a4d3a28 100644 +--- a/lib/create.c ++++ b/lib/create.c +@@ -255,6 +255,7 @@ disk_create_qcow2 (guestfs_h *g, const char *filename, int64_t size, + const struct guestfs_disk_create_argv *optargs) + { + const char *backingformat = NULL; ++ CLEANUP_FREE char *backingformat_free = NULL; + const char *preallocation = NULL; + const char *compat = NULL; + int clustersize = -1; +@@ -270,6 +271,14 @@ disk_create_qcow2 (guestfs_h *g, const char *filename, int64_t size, + return -1; + } + } ++ else if (backingfile) { ++ /* Since qemu 6.1, qemu-img create has requires a backing format (-F) ++ * parameter if backing file (-b) is used (RHBZ#1998820). ++ */ ++ backingformat = backingformat_free = guestfs_disk_format (g, backingfile); ++ if (!backingformat) ++ return -1; ++ } + if (optargs->bitmask & GUESTFS_DISK_CREATE_PREALLOCATION_BITMASK) { + if (STREQ (optargs->preallocation, "off") || + STREQ (optargs->preallocation, "sparse")) +-- +2.32.0 + diff --git a/libguestfs.spec b/libguestfs.spec index e5a2bfe..0151c70 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -57,7 +57,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.45.6 -Release: 11%{?dist} +Release: 12%{?dist} License: LGPLv2+ # Build only for architectures that have a kernel @@ -91,6 +91,10 @@ Source7: libguestfs.keyring # Maintainer script which helps with handling patches. Source8: copy-patches.sh +# Upstream patch to work with qemu 6.1 +# https://bugzilla.redhat.com/show_bug.cgi?id=1998820 +Patch1: 0001-lib-Autodetect-backing-format-for-qemu-img-create-b.patch + # Downstream (RHEL-only) patches. %if 0%{?rhel} Patch9001: 0001-RHEL-Remove-libguestfs-live-RHBZ-798980.patch @@ -1139,6 +1143,9 @@ rm ocaml/html/.gitignore %changelog +* Tue Aug 31 2021 Richard W.M. Jones - 1:1.45.6-12 +- Upstream patch to work with qemu 6.1 (RHBZ#1998820) + * Fri Aug 06 2021 Richard W.M. Jones - 1:1.45.6-11 - Fix license files. - Move appliance to separate subpackage (RHBZ#1989514). From 58d553dcbd4fee16731571207ed0a37417874665 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 31 Aug 2021 17:11:36 +0100 Subject: [PATCH 056/243] New upstream development version 1.45.7. Fix to work with qemu 6.1 (RHBZ#1998820) --- ...backing-format-for-qemu-img-create-b.patch | 48 ------------------- libguestfs.spec | 9 ++-- sources | 4 +- 3 files changed, 7 insertions(+), 54 deletions(-) delete mode 100644 0001-lib-Autodetect-backing-format-for-qemu-img-create-b.patch diff --git a/0001-lib-Autodetect-backing-format-for-qemu-img-create-b.patch b/0001-lib-Autodetect-backing-format-for-qemu-img-create-b.patch deleted file mode 100644 index 9a2250f..0000000 --- a/0001-lib-Autodetect-backing-format-for-qemu-img-create-b.patch +++ /dev/null @@ -1,48 +0,0 @@ -From 45de287447bb18d59749fbfc1ec5072413090109 Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Tue, 31 Aug 2021 08:27:15 +0100 -Subject: [PATCH] lib: Autodetect backing format for qemu-img create -b - -qemu 6.1 has decided to change qemu-img create so that a backing -format (-F) is required if a backing file (-b) is specified. Since we -don't want to change the libguestfs API to force callers to specify -this because that would be an API break, autodetect it. - -This is similar to commit c8c181e8d9 ("launch: libvirt: Autodetect -backing format for readonly drive overlays"). - -Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1998820 ---- - lib/create.c | 9 +++++++++ - 1 file changed, 9 insertions(+) - -diff --git a/lib/create.c b/lib/create.c -index 44a7df25f..75a4d3a28 100644 ---- a/lib/create.c -+++ b/lib/create.c -@@ -255,6 +255,7 @@ disk_create_qcow2 (guestfs_h *g, const char *filename, int64_t size, - const struct guestfs_disk_create_argv *optargs) - { - const char *backingformat = NULL; -+ CLEANUP_FREE char *backingformat_free = NULL; - const char *preallocation = NULL; - const char *compat = NULL; - int clustersize = -1; -@@ -270,6 +271,14 @@ disk_create_qcow2 (guestfs_h *g, const char *filename, int64_t size, - return -1; - } - } -+ else if (backingfile) { -+ /* Since qemu 6.1, qemu-img create has requires a backing format (-F) -+ * parameter if backing file (-b) is used (RHBZ#1998820). -+ */ -+ backingformat = backingformat_free = guestfs_disk_format (g, backingfile); -+ if (!backingformat) -+ return -1; -+ } - if (optargs->bitmask & GUESTFS_DISK_CREATE_PREALLOCATION_BITMASK) { - if (STREQ (optargs->preallocation, "off") || - STREQ (optargs->preallocation, "sparse")) --- -2.32.0 - diff --git a/libguestfs.spec b/libguestfs.spec index 0151c70..eb3414e 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -56,8 +56,8 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 -Version: 1.45.6 -Release: 12%{?dist} +Version: 1.45.7 +Release: 1%{?dist} License: LGPLv2+ # Build only for architectures that have a kernel @@ -1143,8 +1143,9 @@ rm ocaml/html/.gitignore %changelog -* Tue Aug 31 2021 Richard W.M. Jones - 1:1.45.6-12 -- Upstream patch to work with qemu 6.1 (RHBZ#1998820) +* Tue Aug 31 2021 Richard W.M. Jones - 1:1.45.7-1 +- New upstream development version 1.45.7. +- Fix to work with qemu 6.1 (RHBZ#1998820) * Fri Aug 06 2021 Richard W.M. Jones - 1:1.45.6-11 - Fix license files. diff --git a/sources b/sources index 33a2bac..b1659fa 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (libguestfs-1.45.6.tar.gz) = 018aec83d153aeabb7c0b255e6d5b40b03ff6d0de12dc1e0557fc35215db593aaa871c4bc1f44e785f74bf02a367aec0e90157f8ff159cccc820ebf1afd2258a -SHA512 (libguestfs-1.45.6.tar.gz.sig) = 8f0be35a265356e7bd823b3d9302449ac62d633de8a9bd40ca457bcb4e4d2aebc827c4867bfdb6f3e3a4f34ade168103f5af0a44b667c875be7721e275433dbe +SHA512 (libguestfs-1.45.7.tar.gz) = 16cdfb59077f753908b46a5a7ffcbb5b878cd224fa4a5b87878ebae2c0c3981f0b68f2df2c35c9f44676886922eb9afbcdacb5d6ee2d34b28e053440face7132 +SHA512 (libguestfs-1.45.7.tar.gz.sig) = 1a999eba5275821e7013deea3803aa2ad2ebcd082b8f9a978ffce45e23d3f42af4c5e78700914d79804b42530c1cfd629d98b4977fe35bd11ed3f97dad705ea9 From db62beac3594e45b8cb59f79ace7df9698abb099 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 31 Aug 2021 17:17:23 +0100 Subject: [PATCH 057/243] Remove Patch line left by accident in previous commit. --- libguestfs.spec | 4 ---- 1 file changed, 4 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index eb3414e..e363c76 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -91,10 +91,6 @@ Source7: libguestfs.keyring # Maintainer script which helps with handling patches. Source8: copy-patches.sh -# Upstream patch to work with qemu 6.1 -# https://bugzilla.redhat.com/show_bug.cgi?id=1998820 -Patch1: 0001-lib-Autodetect-backing-format-for-qemu-img-create-b.patch - # Downstream (RHEL-only) patches. %if 0%{?rhel} Patch9001: 0001-RHEL-Remove-libguestfs-live-RHBZ-798980.patch From e2c24718cfe358b203c7c00e3572c9b1266fc9e8 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 31 Aug 2021 23:21:04 +0100 Subject: [PATCH 058/243] Rebuild for updated ntfs-3g CVE (RHBZ#1999788) --- libguestfs.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libguestfs.spec b/libguestfs.spec index e363c76..2b4b75f 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -57,7 +57,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.45.7 -Release: 1%{?dist} +Release: 2%{?dist} License: LGPLv2+ # Build only for architectures that have a kernel @@ -1139,6 +1139,9 @@ rm ocaml/html/.gitignore %changelog +* Tue Aug 31 2021 Richard W.M. Jones - 1:1.45.7-2 +- Rebuild for updated ntfs-3g CVE (RHBZ#1999788) + * Tue Aug 31 2021 Richard W.M. Jones - 1:1.45.7-1 - New upstream development version 1.45.7. - Fix to work with qemu 6.1 (RHBZ#1998820) From 05680b55f64b8018054a8c34e74a16c07c6989f1 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 23 Sep 2021 15:55:13 +0100 Subject: [PATCH 059/243] New upstream stable branch version 1.46.0 --- libguestfs.spec | 11 +++++++---- sources | 4 ++-- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index 2b4b75f..57fff21 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -21,7 +21,7 @@ # (however KVM would work if it was available in Koji, so this # is not a bug) %if !0%{?rhel} -%global test_arches x86_64 +%global test_arches armv7hl x86_64 %else # RHEL 9 only: # x86-64: "/lib64/libc.so.6: CPU ISA level is lower than required" @@ -45,7 +45,7 @@ %endif # The source directory. -%global source_directory 1.45-development +%global source_directory 1.46-stable # Filter perl provides. %{?perl_default_filter} @@ -56,8 +56,8 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 -Version: 1.45.7 -Release: 2%{?dist} +Version: 1.46.0 +Release: 1%{?dist} License: LGPLv2+ # Build only for architectures that have a kernel @@ -1139,6 +1139,9 @@ rm ocaml/html/.gitignore %changelog +* Thu Sep 23 2021 Richard W.M. Jones - 1:1.46.0-1 +- New upstream stable branch version 1.46.0 + * Tue Aug 31 2021 Richard W.M. Jones - 1:1.45.7-2 - Rebuild for updated ntfs-3g CVE (RHBZ#1999788) diff --git a/sources b/sources index b1659fa..9681d10 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (libguestfs-1.45.7.tar.gz) = 16cdfb59077f753908b46a5a7ffcbb5b878cd224fa4a5b87878ebae2c0c3981f0b68f2df2c35c9f44676886922eb9afbcdacb5d6ee2d34b28e053440face7132 -SHA512 (libguestfs-1.45.7.tar.gz.sig) = 1a999eba5275821e7013deea3803aa2ad2ebcd082b8f9a978ffce45e23d3f42af4c5e78700914d79804b42530c1cfd629d98b4977fe35bd11ed3f97dad705ea9 +SHA512 (libguestfs-1.46.0.tar.gz) = 9b1670dff924e046ab82ff1ce6e25428d95b88700b507d4f1dd68a309641e376d14520c7b5aa5bbb81a6ba5c708ebcc46b6fe0970d903a3ed79e76d4ccdca614 +SHA512 (libguestfs-1.46.0.tar.gz.sig) = d4c8e4629377d42e8e9f1cc88ad7885999c9ae94a2ee2e683960b397b1a92411c289bddb65d4c3c350915bba16c949011639614b9ec54037bf43833e917b7858 From 1a2b1681decd2925e73b7dab155ff8bc3106a78f Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 23 Sep 2021 16:09:29 +0100 Subject: [PATCH 060/243] Remove BUGS file, no longer provided upstream --- libguestfs.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libguestfs.spec b/libguestfs.spec index 57fff21..4574e1f 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -958,7 +958,7 @@ rm ocaml/html/.gitignore %files devel -%doc AUTHORS BUGS HACKING TODO README +%doc AUTHORS HACKING TODO README %doc examples/*.c %{_libdir}/libguestfs.so %{_sbindir}/libguestfs-make-fixed-appliance @@ -1141,6 +1141,7 @@ rm ocaml/html/.gitignore %changelog * Thu Sep 23 2021 Richard W.M. Jones - 1:1.46.0-1 - New upstream stable branch version 1.46.0 +- Remove BUGS file, no longer provided upstream * Tue Aug 31 2021 Richard W.M. Jones - 1:1.45.7-2 - Rebuild for updated ntfs-3g CVE (RHBZ#1999788) From 9386c1d522d1392db74ff722209835d8b6e4cc8d Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 23 Sep 2021 19:38:09 +0100 Subject: [PATCH 061/243] Disable tests on armv7 virtio devices cannot be found by the guest. It could be similar to https://bugzilla.redhat.com/show_bug.cgi?id=2006709 which was reported against ppc64le. --- libguestfs.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index 4574e1f..5462817 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -13,7 +13,7 @@ # # Currently the basic sanity check is *broken* on: # -# arm: times out when running the test +# arm: cannot see virtio devices (similar to RHBZ#2006709 ?) # aarch64: "MSI is not supported by interrupt controller" (RHBZ#1414081) # ppc64: qemu doesn't work with TCG (RHBZ#1614948) # ppc64le: kernel doesn't boot on qemu (RHBZ#1435873) @@ -21,7 +21,7 @@ # (however KVM would work if it was available in Koji, so this # is not a bug) %if !0%{?rhel} -%global test_arches armv7hl x86_64 +%global test_arches x86_64 %else # RHEL 9 only: # x86-64: "/lib64/libc.so.6: CPU ISA level is lower than required" From 6f05a2f91cb417f7d1e4684e84895fb5c9f9af0d Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 5 Oct 2021 11:02:06 +0100 Subject: [PATCH 062/243] OCaml 4.13.1 build --- libguestfs.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libguestfs.spec b/libguestfs.spec index 5462817..930406e 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -57,7 +57,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.46.0 -Release: 1%{?dist} +Release: 2%{?dist} License: LGPLv2+ # Build only for architectures that have a kernel @@ -1139,6 +1139,9 @@ rm ocaml/html/.gitignore %changelog +* Tue Oct 05 2021 Richard W.M. Jones - 1:1.46.0-2 +- OCaml 4.13.1 build + * Thu Sep 23 2021 Richard W.M. Jones - 1:1.46.0-1 - New upstream stable branch version 1.46.0 - Remove BUGS file, no longer provided upstream From 489fcddcb765acabd8684f644c4e5dfa80ceb29f Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 28 Oct 2021 15:08:34 +0200 Subject: [PATCH 063/243] rebuild for https://fedoraproject.org/wiki/Changes/php81 --- libguestfs.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libguestfs.spec b/libguestfs.spec index 930406e..15f8b89 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -57,7 +57,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.46.0 -Release: 2%{?dist} +Release: 3%{?dist} License: LGPLv2+ # Build only for architectures that have a kernel @@ -1139,6 +1139,9 @@ rm ocaml/html/.gitignore %changelog +* Thu Oct 28 2021 Remi Collet - 1:1.46.0-3 +- rebuild for https://fedoraproject.org/wiki/Changes/php81 + * Tue Oct 05 2021 Richard W.M. Jones - 1:1.46.0-2 - OCaml 4.13.1 build From 04309c70cd4a2f2805ae2ce94276a53915590807 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 29 Oct 2021 09:47:45 +0100 Subject: [PATCH 064/243] Require libvirt-daemon-driver-storage-core resolves: rhbz#2018358 --- libguestfs.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index 15f8b89..8a1f6d8 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -57,7 +57,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.46.0 -Release: 3%{?dist} +Release: 4%{?dist} License: LGPLv2+ # Build only for architectures that have a kernel @@ -349,7 +349,7 @@ Suggests: qemu-block-ssh Recommends: libvirt-daemon-config-network Requires: libvirt-daemon-driver-qemu >= 7.1.0 Requires: libvirt-daemon-driver-secret -Recommends: libvirt-daemon-driver-storage-core +Requires: libvirt-daemon-driver-storage-core Requires: selinux-policy >= 3.11.1-63 %ifarch aarch64 @@ -1139,6 +1139,10 @@ rm ocaml/html/.gitignore %changelog +* Fri Oct 29 2021 Richard W.M. Jones - 1:1.46.0-4 +- Require libvirt-daemon-driver-storage-core + resolves: rhbz#2018358 + * Thu Oct 28 2021 Remi Collet - 1:1.46.0-3 - rebuild for https://fedoraproject.org/wiki/Changes/php81 From 5f98d3ef873651e7fe7ae7f1438cc77364716f9b Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 9 Dec 2021 19:24:20 +0000 Subject: [PATCH 065/243] New upstream development version 1.47.1 --- libguestfs.spec | 9 ++++++--- sources | 4 ++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index 8a1f6d8..6423e56 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -45,7 +45,7 @@ %endif # The source directory. -%global source_directory 1.46-stable +%global source_directory 1.47-development # Filter perl provides. %{?perl_default_filter} @@ -56,8 +56,8 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 -Version: 1.46.0 -Release: 4%{?dist} +Version: 1.47.1 +Release: 1%{?dist} License: LGPLv2+ # Build only for architectures that have a kernel @@ -1139,6 +1139,9 @@ rm ocaml/html/.gitignore %changelog +* Thu Dec 09 2021 Richard W.M. Jones - 1:1.47.1-1 +- New upstream development version 1.47.1 + * Fri Oct 29 2021 Richard W.M. Jones - 1:1.46.0-4 - Require libvirt-daemon-driver-storage-core resolves: rhbz#2018358 diff --git a/sources b/sources index 9681d10..b047383 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (libguestfs-1.46.0.tar.gz) = 9b1670dff924e046ab82ff1ce6e25428d95b88700b507d4f1dd68a309641e376d14520c7b5aa5bbb81a6ba5c708ebcc46b6fe0970d903a3ed79e76d4ccdca614 -SHA512 (libguestfs-1.46.0.tar.gz.sig) = d4c8e4629377d42e8e9f1cc88ad7885999c9ae94a2ee2e683960b397b1a92411c289bddb65d4c3c350915bba16c949011639614b9ec54037bf43833e917b7858 +SHA512 (libguestfs-1.47.1.tar.gz) = 59525f8905b0dc34529dc22e0608b5b19c0d079244a51dd0b2b6cd9131584d2f399a56a0e9a477c85ab01c9f00afe32af2da6e3c3841054ffabb4724006b8a17 +SHA512 (libguestfs-1.47.1.tar.gz.sig) = cfc0dcbe5a770bf9dc6badf8db47b4fd3e2f886c92d3437ee6b20727bfdd2a48ce6160e5cc4437fe907dd20c604b8bf4eb98b410ff16c242a2f19ab187afa6fe From c6fc8008f3714c69b8a5583dc4ddf70b05e00a90 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 24 Dec 2021 10:12:32 +0000 Subject: [PATCH 066/243] New upstream development version 1.47.2 --- libguestfs.spec | 5 ++++- sources | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index 6423e56..af22410 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -56,7 +56,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 -Version: 1.47.1 +Version: 1.47.2 Release: 1%{?dist} License: LGPLv2+ @@ -1139,6 +1139,9 @@ rm ocaml/html/.gitignore %changelog +* Fri Dec 24 2021 Richard W.M. Jones - 1:1.47.2-1 +- New upstream development version 1.47.2 + * Thu Dec 09 2021 Richard W.M. Jones - 1:1.47.1-1 - New upstream development version 1.47.1 diff --git a/sources b/sources index b047383..2ac71ec 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (libguestfs-1.47.1.tar.gz) = 59525f8905b0dc34529dc22e0608b5b19c0d079244a51dd0b2b6cd9131584d2f399a56a0e9a477c85ab01c9f00afe32af2da6e3c3841054ffabb4724006b8a17 -SHA512 (libguestfs-1.47.1.tar.gz.sig) = cfc0dcbe5a770bf9dc6badf8db47b4fd3e2f886c92d3437ee6b20727bfdd2a48ce6160e5cc4437fe907dd20c604b8bf4eb98b410ff16c242a2f19ab187afa6fe +SHA512 (libguestfs-1.47.2.tar.gz) = 3b7d292fffba526fb9f2f2c953b73888fb0d091d9f32a8a2090ca0ea9033b8a270a26572af425486b4aeda9e1d083e114b112ae1a1b7ca5681883709d12cfa78 +SHA512 (libguestfs-1.47.2.tar.gz.sig) = 2cb4994c8b438eca9a0f53d6e5984517fbfa458d94feb05289fb3e1f0d4b45524d735af51637e3059890490eb280ee01135fff1d2bfddd903d15f63d446ce9a2 From 37b78c5d2f5a6cb28833860bb7187677f3e427b9 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 4 Jan 2022 19:41:21 +0000 Subject: [PATCH 067/243] Build and rebuild for new glibc causing broken deps on armv7 (RHBZ#2034715) --- libguestfs.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libguestfs.spec b/libguestfs.spec index af22410..8d8edef 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -57,7 +57,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.47.2 -Release: 1%{?dist} +Release: 2%{?dist} License: LGPLv2+ # Build only for architectures that have a kernel @@ -1139,6 +1139,9 @@ rm ocaml/html/.gitignore %changelog +* Tue Jan 04 2022 Richard W.M. Jones - 1:1.47.2-2 +- Build and rebuild for new glibc causing broken deps on armv7 (RHBZ#2034715) + * Fri Dec 24 2021 Richard W.M. Jones - 1:1.47.2-1 - New upstream development version 1.47.2 From b5435eeae3a9f3cf5c82ad22bc76595589e5093e Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 20 Jan 2022 16:23:11 +0000 Subject: [PATCH 068/243] - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- libguestfs.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libguestfs.spec b/libguestfs.spec index 8d8edef..072b2c1 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -57,7 +57,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.47.2 -Release: 2%{?dist} +Release: 3%{?dist} License: LGPLv2+ # Build only for architectures that have a kernel @@ -1139,6 +1139,9 @@ rm ocaml/html/.gitignore %changelog +* Thu Jan 20 2022 Fedora Release Engineering - 1:1.47.2-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + * Tue Jan 04 2022 Richard W.M. Jones - 1:1.47.2-2 - Build and rebuild for new glibc causing broken deps on armv7 (RHBZ#2034715) From ed16a793e0afa33036a34228dde38e7e58a396a9 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 4 Feb 2022 16:49:40 +0000 Subject: [PATCH 069/243] OCaml 4.13.1 rebuild to remove package notes --- libguestfs.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libguestfs.spec b/libguestfs.spec index 072b2c1..dea99e2 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -1,3 +1,4 @@ +%undefine _package_note_flags # Architectures on which golang works. #% global golang_arches aarch64 % {arm} % {ix86} x86_64 # In theory the above, in practice golang is so often broken that @@ -57,7 +58,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.47.2 -Release: 3%{?dist} +Release: 4%{?dist} License: LGPLv2+ # Build only for architectures that have a kernel @@ -1139,6 +1140,9 @@ rm ocaml/html/.gitignore %changelog +* Fri Feb 04 2022 Richard W.M. Jones - 1:1.47.2-4 +- OCaml 4.13.1 rebuild to remove package notes + * Thu Jan 20 2022 Fedora Release Engineering - 1:1.47.2-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild From 65d9d766a2b2b26d029e049bcaef36dbf0e24010 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 8 Feb 2022 21:18:40 +0000 Subject: [PATCH 070/243] Bump and rebuild for eln --- libguestfs.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libguestfs.spec b/libguestfs.spec index dea99e2..6e08ca9 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -58,7 +58,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.47.2 -Release: 4%{?dist} +Release: 5%{?dist} License: LGPLv2+ # Build only for architectures that have a kernel @@ -1140,6 +1140,9 @@ rm ocaml/html/.gitignore %changelog +* Tue Feb 08 2022 Richard W.M. Jones - 1:1.47.2-5 +- Bump and rebuild for eln + * Fri Feb 04 2022 Richard W.M. Jones - 1:1.47.2-4 - OCaml 4.13.1 rebuild to remove package notes From 419bada2844bf2dc8e0200b858a0d0ca77964f45 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 28 Feb 2022 19:15:05 +0000 Subject: [PATCH 071/243] Add more external programs used by the library https://bugzilla.redhat.com/show_bug.cgi?id=1989514#c19 Thanks: Alice Frose, Andrea Bolognani --- libguestfs.spec | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index 6e08ca9..e6be023 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -58,7 +58,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.47.2 -Release: 5%{?dist} +Release: 6%{?dist} License: LGPLv2+ # Build only for architectures that have a kernel @@ -333,8 +333,11 @@ Requires: yajl%{?_isa} # For core mount-local (FUSE) API. Requires: fuse -# For core disk-create API. +# For core APIs: Requires: /usr/bin/qemu-img +Requires: coreutils +Requires: grep +Requires: tar # For qemu direct and libvirt backends. Requires: qemu-kvm-core @@ -1140,6 +1143,9 @@ rm ocaml/html/.gitignore %changelog +* Mon Feb 28 2022 Richard W.M. Jones - 1:1.47.2-6 +- Add more external programs used by the library + * Tue Feb 08 2022 Richard W.M. Jones - 1:1.47.2-5 - Bump and rebuild for eln From 97290932ce7215a892cba685160bacd4440d4b8b Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 1 Mar 2022 11:40:25 +0000 Subject: [PATCH 072/243] New upstream development version 1.47.3 Enable tests on all arches again. --- libguestfs.spec | 20 +++++++------------- sources | 4 ++-- 2 files changed, 9 insertions(+), 15 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index e6be023..195f347 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -11,18 +11,8 @@ # we only do a sanity check that kernel/qemu/libvirt/appliance is not # broken. To perform the full test suite, see instructions here: # https://www.redhat.com/archives/libguestfs/2015-September/msg00078.html -# -# Currently the basic sanity check is *broken* on: -# -# arm: cannot see virtio devices (similar to RHBZ#2006709 ?) -# aarch64: "MSI is not supported by interrupt controller" (RHBZ#1414081) -# ppc64: qemu doesn't work with TCG (RHBZ#1614948) -# ppc64le: kernel doesn't boot on qemu (RHBZ#1435873) -# s390x: qemu TCG cannot emulate enough to boot the kernel -# (however KVM would work if it was available in Koji, so this -# is not a bug) %if !0%{?rhel} -%global test_arches x86_64 +%global test_arches aarch64 %{power64} s390x x86_64 %else # RHEL 9 only: # x86-64: "/lib64/libc.so.6: CPU ISA level is lower than required" @@ -57,8 +47,8 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 -Version: 1.47.2 -Release: 6%{?dist} +Version: 1.47.3 +Release: 1%{?dist} License: LGPLv2+ # Build only for architectures that have a kernel @@ -1143,6 +1133,10 @@ rm ocaml/html/.gitignore %changelog +* Tue Mar 01 2022 Richard W.M. Jones - 1:1.47.3-1 +- New upstream development version 1.47.3 +- Enable tests on all arches again. + * Mon Feb 28 2022 Richard W.M. Jones - 1:1.47.2-6 - Add more external programs used by the library diff --git a/sources b/sources index 2ac71ec..32afdc7 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (libguestfs-1.47.2.tar.gz) = 3b7d292fffba526fb9f2f2c953b73888fb0d091d9f32a8a2090ca0ea9033b8a270a26572af425486b4aeda9e1d083e114b112ae1a1b7ca5681883709d12cfa78 -SHA512 (libguestfs-1.47.2.tar.gz.sig) = 2cb4994c8b438eca9a0f53d6e5984517fbfa458d94feb05289fb3e1f0d4b45524d735af51637e3059890490eb280ee01135fff1d2bfddd903d15f63d446ce9a2 +SHA512 (libguestfs-1.47.3.tar.gz) = 9622ab3ab2b77a471245745d689d4b84028ea3ae5e292341b98e9836f00f8b8c2a77b63ab6b947ef0a77dd54df2ade1498b2114547389cdc3f26fb29b7c74e6c +SHA512 (libguestfs-1.47.3.tar.gz.sig) = d5bfac756df351f3372e0f3d14e71c81a2512fc8bb48c334d1b465f3db1c18c84e7aca0b93c3d3945d2e9726a86bc2c28184b1c23ec2ac927b7af44a886a7323 From 5106bb954778a183f1a6386a01bdfbcffd3dc2a8 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 8 Mar 2022 14:30:27 +0000 Subject: [PATCH 073/243] New upstream development version 1.47.4 Replace guestfs-release-notes-historical(1) with guestfs-release-notes(1) --- libguestfs.spec | 8 ++++++-- sources | 4 ++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index 195f347..8275f96 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -47,7 +47,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 -Version: 1.47.3 +Version: 1.47.4 Release: 1%{?dist} License: LGPLv2+ @@ -932,7 +932,7 @@ rm ocaml/html/.gitignore %{_mandir}/man1/guestfs-performance.1* %{_mandir}/man1/guestfs-recipes.1* %{_mandir}/man1/guestfs-release-notes-1*.1* -%{_mandir}/man1/guestfs-release-notes-historical.1* +%{_mandir}/man1/guestfs-release-notes.1* %{_mandir}/man1/guestfs-security.1* %{_mandir}/man1/guestmount.1* %{_mandir}/man1/guestunmount.1* @@ -1133,6 +1133,10 @@ rm ocaml/html/.gitignore %changelog +* Tue Mar 08 2022 Richard W.M. Jones - 1:1.47.4-1 +- New upstream development version 1.47.4 +- Replace guestfs-release-notes-historical(1) with guestfs-release-notes(1) + * Tue Mar 01 2022 Richard W.M. Jones - 1:1.47.3-1 - New upstream development version 1.47.3 - Enable tests on all arches again. diff --git a/sources b/sources index 32afdc7..56c3ea5 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (libguestfs-1.47.3.tar.gz) = 9622ab3ab2b77a471245745d689d4b84028ea3ae5e292341b98e9836f00f8b8c2a77b63ab6b947ef0a77dd54df2ade1498b2114547389cdc3f26fb29b7c74e6c -SHA512 (libguestfs-1.47.3.tar.gz.sig) = d5bfac756df351f3372e0f3d14e71c81a2512fc8bb48c334d1b465f3db1c18c84e7aca0b93c3d3945d2e9726a86bc2c28184b1c23ec2ac927b7af44a886a7323 +SHA512 (libguestfs-1.47.4.tar.gz) = e7a9071e8349c47d908cff786cb571f57e44dc50911048b9ea8e3136847103d29e45662089cb47f8e821e803cfeabbc8555fc32cf115f35de8e036b982d735fb +SHA512 (libguestfs-1.47.4.tar.gz.sig) = f64e42f6536964751f4db6f71944e839227a8a802ba3fe361e3a77c329f96c687e17811ca99bbc4c5adc2b25e7879dc27d12154ed44952c8597bd356e1c67bb5 From d2bb9986b2cd549bd234265489d7341956e7fab4 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 14 Mar 2022 14:12:24 +0000 Subject: [PATCH 074/243] New upstream stable branch version 1.48.0 Remove the RHEL (downstream) patches as they are out of date. --- ...L-Remove-libguestfs-live-RHBZ-798980.patch | 55 -- ...Remove-9p-APIs-from-RHEL-RHBZ-921710.patch | 329 ---------- ...upported-remote-drive-protocols-RHBZ.patch | 609 ------------------ ...-Remove-User-Mode-Linux-RHBZ-1144197.patch | 72 --- ...of-libguestfs-winsupport-features-ex.patch | 69 -- ...crypto-policies-back-ends-opensslcnf.patch | 33 - libguestfs.spec | 18 +- sources | 4 +- 8 files changed, 8 insertions(+), 1181 deletions(-) delete mode 100644 0001-RHEL-Remove-libguestfs-live-RHBZ-798980.patch delete mode 100644 0002-RHEL-Remove-9p-APIs-from-RHEL-RHBZ-921710.patch delete mode 100644 0003-RHEL-Disable-unsupported-remote-drive-protocols-RHBZ.patch delete mode 100644 0004-RHEL-Remove-User-Mode-Linux-RHBZ-1144197.patch delete mode 100644 0005-RHEL-Reject-use-of-libguestfs-winsupport-features-ex.patch delete mode 100644 0006-RHEL-Create-etc-crypto-policies-back-ends-opensslcnf.patch diff --git a/0001-RHEL-Remove-libguestfs-live-RHBZ-798980.patch b/0001-RHEL-Remove-libguestfs-live-RHBZ-798980.patch deleted file mode 100644 index ef3bcac..0000000 --- a/0001-RHEL-Remove-libguestfs-live-RHBZ-798980.patch +++ /dev/null @@ -1,55 +0,0 @@ -From fb09175a21b9ee333e3ad01ab9c8652263200ca4 Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Fri, 21 Dec 2012 15:50:11 +0000 -Subject: [PATCH 1/6] RHEL: Remove libguestfs live (RHBZ#798980). - -This isn't supported in RHEL. - -Disable daemon tests that require the 'unix' backend. ---- - lib/launch-unix.c | 7 +++++++ - tests/Makefile.am | 3 --- - 2 files changed, 7 insertions(+), 3 deletions(-) - -diff --git a/lib/launch-unix.c b/lib/launch-unix.c -index 0d344f9df..74dd1bb4a 100644 ---- a/lib/launch-unix.c -+++ b/lib/launch-unix.c -@@ -37,6 +37,12 @@ - static int - launch_unix (guestfs_h *g, void *datav, const char *sockpath) - { -+ error (g, -+ "launch: In RHEL, only the 'libvirt' or 'direct' method is supported.\n" -+ "In particular, \"libguestfs live\" is not supported."); -+ return -1; -+ -+#if 0 - int r, daemon_sock = -1; - struct sockaddr_un addr; - uint32_t size; -@@ -106,6 +112,7 @@ launch_unix (guestfs_h *g, void *datav, const char *sockpath) - g->conn = NULL; - } - return -1; -+#endif - } - - static int -diff --git a/tests/Makefile.am b/tests/Makefile.am -index 690e09b5e..919e2f248 100644 ---- a/tests/Makefile.am -+++ b/tests/Makefile.am -@@ -328,9 +328,6 @@ EXTRA_DIST += create/test-disk-create.sh - - check_DATA = daemon/captive-daemon.pm - --TESTS += \ -- daemon/test-daemon-start.pl \ -- daemon/test-btrfs.pl - EXTRA_DIST += \ - daemon/test-daemon-start.pl \ - daemon/test-btrfs.pl --- -2.31.1 - diff --git a/0002-RHEL-Remove-9p-APIs-from-RHEL-RHBZ-921710.patch b/0002-RHEL-Remove-9p-APIs-from-RHEL-RHBZ-921710.patch deleted file mode 100644 index 6496e82..0000000 --- a/0002-RHEL-Remove-9p-APIs-from-RHEL-RHBZ-921710.patch +++ /dev/null @@ -1,329 +0,0 @@ -From e0af86a09b80b5fa0c5f308ae6f34d8315c1dc4d Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Thu, 18 Jul 2013 18:31:53 +0100 -Subject: [PATCH 2/6] RHEL: Remove 9p APIs from RHEL (RHBZ#921710). - ---- - daemon/9p.c | 182 -------------------------------------- - daemon/Makefile.am | 1 - - docs/C_SOURCE_FILES | 1 - - generator/actions_core.ml | 21 ----- - generator/proc_nr.ml | 2 - - gobject/Makefile.inc | 2 - - po/POTFILES | 2 - - tests/Makefile.am | 1 - - 8 files changed, 212 deletions(-) - delete mode 100644 daemon/9p.c - -diff --git a/daemon/9p.c b/daemon/9p.c -deleted file mode 100644 -index 743a96abd..000000000 ---- a/daemon/9p.c -+++ /dev/null -@@ -1,182 +0,0 @@ --/* libguestfs - the guestfsd daemon -- * Copyright (C) 2011 Red Hat Inc. -- * -- * This program is free software; you can redistribute it and/or modify -- * it under the terms of the GNU General Public License as published by -- * the Free Software Foundation; either version 2 of the License, or -- * (at your option) any later version. -- * -- * This program is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- * GNU General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this program; if not, write to the Free Software -- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -- */ -- --#include -- --#include --#include --#include --#include --#include --#include --#include --#include --#include --#include -- --#include "ignore-value.h" -- --#include "daemon.h" --#include "actions.h" -- --#define BUS_PATH "/sys/bus/virtio/drivers/9pnet_virtio" -- --static void --modprobe_9pnet_virtio (void) --{ -- /* Required with Linux 5.6 and maybe earlier kernels. For unclear -- * reasons the module is not an automatic dependency of the 9p -- * module so doesn't get loaded automatically. -- */ -- ignore_value (command (NULL, NULL, "modprobe", "9pnet_virtio", NULL)); --} -- --/* https://bugzilla.redhat.com/show_bug.cgi?id=714981#c1 */ --char ** --do_list_9p (void) --{ -- CLEANUP_FREE_STRINGSBUF DECLARE_STRINGSBUF (r); -- DIR *dir; -- -- modprobe_9pnet_virtio (); -- -- dir = opendir (BUS_PATH); -- if (!dir) { -- perror ("opendir: " BUS_PATH); -- if (errno != ENOENT) { -- reply_with_perror ("opendir: " BUS_PATH); -- return NULL; -- } -- -- /* If this directory doesn't exist, it probably means that -- * the virtio driver isn't loaded. Don't return an error -- * in this case, but return an empty list. -- */ -- if (end_stringsbuf (&r) == -1) -- return NULL; -- -- return take_stringsbuf (&r); -- } -- -- while (1) { -- struct dirent *d; -- -- errno = 0; -- d = readdir (dir); -- if (d == NULL) break; -- -- if (STRPREFIX (d->d_name, "virtio")) { -- CLEANUP_FREE char *mount_tag_path = NULL; -- if (asprintf (&mount_tag_path, BUS_PATH "/%s/mount_tag", -- d->d_name) == -1) { -- reply_with_perror ("asprintf"); -- closedir (dir); -- return NULL; -- } -- -- /* A bit unclear, but it looks like the virtio transport allows -- * the mount tag length to be unlimited (or up to 65536 bytes). -- * See: linux/include/linux/virtio_9p.h -- */ -- CLEANUP_FREE char *mount_tag = read_whole_file (mount_tag_path, NULL); -- if (mount_tag == 0) -- continue; -- -- if (add_string (&r, mount_tag) == -1) { -- closedir (dir); -- return NULL; -- } -- } -- } -- -- /* Check readdir didn't fail */ -- if (errno != 0) { -- reply_with_perror ("readdir: /sys/block"); -- closedir (dir); -- return NULL; -- } -- -- /* Close the directory handle */ -- if (closedir (dir) == -1) { -- reply_with_perror ("closedir: /sys/block"); -- return NULL; -- } -- -- /* Sort the tags. */ -- if (r.size > 0) -- sort_strings (r.argv, r.size); -- -- /* NULL terminate the list */ -- if (end_stringsbuf (&r) == -1) -- return NULL; -- -- return take_stringsbuf (&r); --} -- --/* Takes optional arguments, consult optargs_bitmask. */ --int --do_mount_9p (const char *mount_tag, const char *mountpoint, const char *options) --{ -- CLEANUP_FREE char *mp = NULL, *opts = NULL, *err = NULL; -- struct stat statbuf; -- int r; -- -- ABS_PATH (mountpoint, 0, return -1); -- -- mp = sysroot_path (mountpoint); -- if (!mp) { -- reply_with_perror ("malloc"); -- return -1; -- } -- -- /* Check the mountpoint exists and is a directory. */ -- if (stat (mp, &statbuf) == -1) { -- reply_with_perror ("%s", mountpoint); -- return -1; -- } -- if (!S_ISDIR (statbuf.st_mode)) { -- reply_with_perror ("%s: mount point is not a directory", mountpoint); -- return -1; -- } -- -- /* Add trans=virtio to the options. */ -- if ((optargs_bitmask & GUESTFS_MOUNT_9P_OPTIONS_BITMASK) && -- STRNEQ (options, "")) { -- if (asprintf (&opts, "trans=virtio,%s", options) == -1) { -- reply_with_perror ("asprintf"); -- return -1; -- } -- } -- else { -- opts = strdup ("trans=virtio"); -- if (opts == NULL) { -- reply_with_perror ("strdup"); -- return -1; -- } -- } -- -- modprobe_9pnet_virtio (); -- r = command (NULL, &err, -- "mount", "-o", opts, "-t", "9p", mount_tag, mp, NULL); -- if (r == -1) { -- reply_with_error ("%s on %s: %s", mount_tag, mountpoint, err); -- return -1; -- } -- -- return 0; --} -diff --git a/daemon/Makefile.am b/daemon/Makefile.am -index 6f13bd43c..cc4dbcd85 100644 ---- a/daemon/Makefile.am -+++ b/daemon/Makefile.am -@@ -84,7 +84,6 @@ guestfsd_SOURCES = \ - ../common/protocol/guestfs_protocol.h \ - ../common/utils/cleanups.h \ - ../common/utils/guestfs-utils.h \ -- 9p.c \ - acl.c \ - actions.h \ - available.c \ -diff --git a/docs/C_SOURCE_FILES b/docs/C_SOURCE_FILES -index 6a97d8b0e..896314e7e 100644 ---- a/docs/C_SOURCE_FILES -+++ b/docs/C_SOURCE_FILES -@@ -43,7 +43,6 @@ common/visit/visit.c - common/visit/visit.h - common/windows/windows.c - common/windows/windows.h --daemon/9p.c - daemon/acl.c - daemon/actions.h - daemon/augeas.c -diff --git a/generator/actions_core.ml b/generator/actions_core.ml -index bb602ee02..db8156c51 100644 ---- a/generator/actions_core.ml -+++ b/generator/actions_core.ml -@@ -6157,27 +6157,6 @@ This returns true iff the device exists and contains all zero bytes. - - Note that for large devices this can take a long time to run." }; - -- { defaults with -- name = "list_9p"; added = (1, 11, 12); -- style = RStringList (RPlainString, "mounttags"), [], []; -- shortdesc = "list 9p filesystems"; -- longdesc = "\ --List all 9p filesystems attached to the guest. A list of --mount tags is returned." }; -- -- { defaults with -- name = "mount_9p"; added = (1, 11, 12); -- style = RErr, [String (PlainString, "mounttag"); String (PlainString, "mountpoint")], [OString "options"]; -- camel_name = "Mount9P"; -- shortdesc = "mount 9p filesystem"; -- longdesc = "\ --Mount the virtio-9p filesystem with the tag C on the --directory C. -- --If required, C will be automatically added to the options. --Any other options required can be passed in the optional C --parameter." }; -- - { defaults with - name = "list_dm_devices"; added = (1, 11, 15); - style = RStringList (RDevice, "devices"), [], []; -diff --git a/generator/proc_nr.ml b/generator/proc_nr.ml -index 74b95baf7..6b6cb7353 100644 ---- a/generator/proc_nr.ml -+++ b/generator/proc_nr.ml -@@ -295,8 +295,6 @@ let proc_nr = [ - 282, "internal_autosync"; - 283, "is_zero"; - 284, "is_zero_device"; --285, "list_9p"; --286, "mount_9p"; - 287, "list_dm_devices"; - 288, "ntfsresize"; - 289, "btrfs_filesystem_resize"; -diff --git a/gobject/Makefile.inc b/gobject/Makefile.inc -index 650f8ddac..c4e735967 100644 ---- a/gobject/Makefile.inc -+++ b/gobject/Makefile.inc -@@ -94,7 +94,6 @@ guestfs_gobject_headers= \ - include/guestfs-gobject/optargs-mksquashfs.h \ - include/guestfs-gobject/optargs-mkswap.h \ - include/guestfs-gobject/optargs-mktemp.h \ -- include/guestfs-gobject/optargs-mount_9p.h \ - include/guestfs-gobject/optargs-mount_local.h \ - include/guestfs-gobject/optargs-ntfsclone_out.h \ - include/guestfs-gobject/optargs-ntfsfix.h \ -@@ -188,7 +187,6 @@ guestfs_gobject_sources= \ - src/optargs-mksquashfs.c \ - src/optargs-mkswap.c \ - src/optargs-mktemp.c \ -- src/optargs-mount_9p.c \ - src/optargs-mount_local.c \ - src/optargs-ntfsclone_out.c \ - src/optargs-ntfsfix.c \ -diff --git a/po/POTFILES b/po/POTFILES -index 29205b6a6..23afe619c 100644 ---- a/po/POTFILES -+++ b/po/POTFILES -@@ -26,7 +26,6 @@ common/utils/stringlists-utils.c - common/utils/utils.c - common/visit/visit.c - common/windows/windows.c --daemon/9p.c - daemon/acl.c - daemon/augeas.c - daemon/available.c -@@ -264,7 +263,6 @@ gobject/src/optargs-mkfs_btrfs.c - gobject/src/optargs-mksquashfs.c - gobject/src/optargs-mkswap.c - gobject/src/optargs-mktemp.c --gobject/src/optargs-mount_9p.c - gobject/src/optargs-mount_local.c - gobject/src/optargs-ntfsclone_out.c - gobject/src/optargs-ntfsfix.c -diff --git a/tests/Makefile.am b/tests/Makefile.am -index 919e2f248..e3613fec4 100644 ---- a/tests/Makefile.am -+++ b/tests/Makefile.am -@@ -43,7 +43,6 @@ check-slow: - check-valgrind: - $(MAKE) VG="@VG@" check - --TESTS += 9p/test-9p.sh - EXTRA_DIST += 9p/test-9p.sh - - SLOW_TESTS += bigdirs/test-big-dirs.pl --- -2.31.1 - diff --git a/0003-RHEL-Disable-unsupported-remote-drive-protocols-RHBZ.patch b/0003-RHEL-Disable-unsupported-remote-drive-protocols-RHBZ.patch deleted file mode 100644 index 841ec13..0000000 --- a/0003-RHEL-Disable-unsupported-remote-drive-protocols-RHBZ.patch +++ /dev/null @@ -1,609 +0,0 @@ -From fddb44d1a2c77739c9441d2cc0acfef9e62718a6 Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Mon, 29 Jul 2013 14:47:56 +0100 -Subject: [PATCH 3/6] RHEL: Disable unsupported remote drive protocols - (RHBZ#962113). - -This disables support for unsupported remote drive protocols: - - * ftp - * ftps - * http - * https - * tftp - * gluster - * iscsi - * sheepdog - * ssh - -Note 'nbd' is not disabled, and of course 'file' works. - -We hope to gradually add some of these back over the lifetime of RHEL. ---- - docs/guestfs-testing.pod | 20 ----- - fish/guestfish.pod | 66 ++-------------- - fish/test-add-uri.sh | 32 -------- - generator/actions_core.ml | 50 +------------ - lib/drives.c | 8 ++ - lib/guestfs.pod | 100 ------------------------- - tests/disks/test-qemu-drive-libvirt.sh | 28 ------- - tests/disks/test-qemu-drive.sh | 60 --------------- - 8 files changed, 16 insertions(+), 348 deletions(-) - -diff --git a/docs/guestfs-testing.pod b/docs/guestfs-testing.pod -index f558964bf..8f264ed17 100644 ---- a/docs/guestfs-testing.pod -+++ b/docs/guestfs-testing.pod -@@ -109,26 +109,6 @@ image. To exit, type C. - If you get an error, try enabling debugging (add C<-v> to the command - line). Also make sure that L succeeds. - --=head2 Try to open a remote guest image with guestfish. -- --You may also have to disable libvirt by setting this: -- -- export LIBGUESTFS_BACKEND=direct -- --If you have a disk image available over HTTP/FTP, try to open it. -- -- guestfish --ro -i --format=raw -a http://www.example.com/disk.img -- --For SSH you will need to make sure that ssh-agent is set up so you --don't need a password to log in to the remote machine. Then a command --similar to this should work: -- -- guestfish --ro -i --format=raw \ -- -a ssh://remote.example.com/path/to/disk.img -- --If you get an error, try enabling debugging (add C<-v> to the command --line). Also make sure that L succeeds. -- - =head2 Run virt-alignment-scan on all your guests. - - Run L on guests or disk images: -diff --git a/fish/guestfish.pod b/fish/guestfish.pod -index 9f086f110..bb4167b06 100644 ---- a/fish/guestfish.pod -+++ b/fish/guestfish.pod -@@ -131,9 +131,9 @@ To list what is available do: - - =head2 Remote drives - --Access a remote disk using ssh: -+Access a remote disk using NBD: - -- guestfish -a ssh://example.com/path/to/disk.img -+ guestfish -a nbd://example.com - - =head2 Remote control - -@@ -1134,12 +1134,12 @@ L>. - On the command line, you can use the I<-a> option to add network - block devices using a URI-style format, for example: - -- guestfish -a ssh://root@example.com/disk.img -+ guestfish -a nbd://example.com - - URIs I be used with the L command. The equivalent - command using the API directly is: - -- > add /disk.img protocol:ssh server:tcp:example.com username:root -+ > add /disk.img protocol:nbd server:tcp:example.com - - The possible I<-a URI> formats are described below. - -@@ -1149,40 +1149,6 @@ The possible I<-a URI> formats are described below. - - Add the local disk image (or device) called F. - --=head2 B<-a ftp://[user@]example.com[:port]/disk.img> -- --=head2 B<-a ftps://[user@]example.com[:port]/disk.img> -- --=head2 B<-a http://[user@]example.com[:port]/disk.img> -- --=head2 B<-a https://[user@]example.com[:port]/disk.img> -- --=head2 B<-a tftp://[user@]example.com[:port]/disk.img> -- --Add a disk located on a remote FTP, HTTP or TFTP server. -- --The equivalent API command would be: -- -- > add /disk.img protocol:(ftp|...) server:tcp:example.com -- --=head2 B<-a gluster://example.com[:port]/volname/image> -- --Add a disk image located on GlusterFS storage. -- --The server is the one running C, and may be C. -- --The equivalent API command would be: -- -- > add volname/image protocol:gluster server:tcp:example.com -- --=head2 B<-a iscsi://example.com[:port]/target-iqn-name[/lun]> -- --Add a disk located on an iSCSI server. -- --The equivalent API command would be: -- -- > add target-iqn-name/lun protocol:iscsi server:tcp:example.com -- - =head2 B<-a nbd://example.com[:port]> - - =head2 B<-a nbd://example.com[:port]/exportname> -@@ -1217,35 +1183,13 @@ The equivalent API command would be: - - > add pool/disk protocol:rbd server:tcp:example.com:port - --=head2 B<-a sheepdog://[example.com[:port]]/volume/image> -- --Add a disk image located on a Sheepdog volume. -- --The server name is optional. Although libguestfs and Sheepdog --supports multiple servers, only at most one server can be specified --when using this URI syntax. -- --The equivalent API command would be: -- -- > add volume protocol:sheepdog [server:tcp:example.com] -- --=head2 B<-a ssh://[user@]example.com[:port]/disk.img> -- --Add a disk image located on a remote server, accessed using the Secure --Shell (ssh) SFTP protocol. SFTP is supported out of the box by all --major SSH servers. -- --The equivalent API command would be: -- -- > add /disk protocol:ssh server:tcp:example.com [username:user] -- - Note that the URIs follow the syntax of - L: in particular, there - are restrictions on the allowed characters for the various components - of the URI. Characters such as C<:>, C<@>, and C B be - percent-encoded: - -- $ guestfish -a ssh://user:pass%40word@example.com/disk.img -+ $ guestfish -a rbd://user:pass%40word@example.com[:port]/pool/disk - - In this case, the password is C. - -diff --git a/fish/test-add-uri.sh b/fish/test-add-uri.sh -index 21d424984..ddabeb639 100755 ---- a/fish/test-add-uri.sh -+++ b/fish/test-add-uri.sh -@@ -40,14 +40,6 @@ function fail () - $VG guestfish -x -a file://$abs_builddir/test-add-uri.img test-add-uri.out 2>&1 - grep -sq 'add_drive ".*/test-add-uri.img"' test-add-uri.out || fail - --# curl --$VG guestfish -x -a ftp://user@example.com/disk.img test-add-uri.out 2>&1 --grep -sq 'add_drive "/disk.img" "protocol:ftp" "server:tcp:example.com" "username:user"' test-add-uri.out || fail -- --# gluster --$VG guestfish -x -a gluster://example.com/disk test-add-uri.out 2>&1 --grep -sq 'add_drive "disk" "protocol:gluster" "server:tcp:example.com"' test-add-uri.out || fail -- - # NBD - $VG guestfish -x -a nbd://example.com test-add-uri.out 2>&1 - grep -sq 'add_drive "" "protocol:nbd" "server:tcp:example.com"' test-add-uri.out || fail -@@ -67,29 +59,5 @@ grep -sq 'add_drive "pool/disk" "protocol:rbd" "server:tcp:example.com:6789"' te - $VG guestfish -x -a rbd:///pool/disk test-add-uri.out 2>&1 - grep -sq 'add_drive "pool/disk" "protocol:rbd"' test-add-uri.out || fail - --# sheepdog --$VG guestfish -x -a sheepdog:///volume/image test-add-uri.out 2>&1 --grep -sq 'add_drive "volume/image" "protocol:sheepdog"' test-add-uri.out || fail -- --$VG guestfish -x -a sheepdog://example.com:3000/volume/image test-add-uri.out 2>&1 --grep -sq 'add_drive "volume/image" "protocol:sheepdog" "server:tcp:example.com:3000"' test-add-uri.out || fail -- --# ssh --$VG guestfish -x -a ssh://example.com/disk.img test-add-uri.out 2>&1 --grep -sq 'add_drive "/disk.img" "protocol:ssh" "server:tcp:example.com"' test-add-uri.out || fail -- --$VG guestfish -x -a ssh://user@example.com/disk.img test-add-uri.out 2>&1 --grep -sq 'add_drive "/disk.img" "protocol:ssh" "server:tcp:example.com" "username:user"' test-add-uri.out || fail -- --$VG guestfish -x -a ssh://user@example.com:2000/disk.img test-add-uri.out 2>&1 --grep -sq 'add_drive "/disk.img" "protocol:ssh" "server:tcp:example.com:2000" "username:user"' test-add-uri.out || fail -- --# iSCSI --$VG guestfish -x -a iscsi://example.com/iqn.2015-12.com.libguestfs:test1/0 test-add-uri.out 2>&1 --grep -sq 'add_drive "iqn.2015-12.com.libguestfs:test1/0" "protocol:iscsi" "server:tcp:example.com"' test-add-uri.out || fail -- --$VG guestfish -x -a iscsi://user:password@example.com/iqn.2015-12.com.libguestfs:test2/0 test-add-uri.out 2>&1 --grep -sq 'add_drive "iqn.2015-12.com.libguestfs:test2/0" "protocol:iscsi" "server:tcp:example.com" "username:user" "secret:password"' test-add-uri.out || fail -- - rm test-add-uri.out - rm test-add-uri.img -diff --git a/generator/actions_core.ml b/generator/actions_core.ml -index db8156c51..b87071e3b 100644 ---- a/generator/actions_core.ml -+++ b/generator/actions_core.ml -@@ -297,29 +297,6 @@ F is interpreted as a local file or device. - This is the default if the optional protocol parameter - is omitted. - --=item C -- --Connect to a remote FTP, HTTP or TFTP server. --The C parameter must also be supplied - see below. -- --See also: L -- --=item C -- --Connect to the GlusterFS server. --The C parameter must also be supplied - see below. -- --See also: L -- --=item C -- --Connect to the iSCSI server. --The C parameter must also be supplied - see below. --The C parameter may be supplied. See below. --The C parameter may be supplied. See below. -- --See also: L. -- - =item C - - Connect to the Network Block Device server. -@@ -336,22 +313,6 @@ The C parameter may be supplied. See below. - - See also: L. - --=item C -- --Connect to the Sheepdog server. --The C parameter may also be supplied - see below. -- --See also: L. -- --=item C -- --Connect to the Secure Shell (ssh) server. -- --The C parameter must be supplied. --The C parameter may be supplied. See below. -- --See also: L. -- - =back - - =item C -@@ -362,13 +323,8 @@ is a list of server(s). - Protocol Number of servers required - -------- -------------------------- - file List must be empty or param not used at all -- ftp|ftps|http|https|tftp Exactly one -- gluster Exactly one -- iscsi Exactly one - nbd Exactly one - rbd Zero or more -- sheepdog Zero or more -- ssh Exactly one - - Each list element is a string specifying a server. The string must be - in one of the following formats: -@@ -384,10 +340,10 @@ for the protocol is used (see F). - - =item C - --For the C, C, C, C, C, C, C --and C protocols, this specifies the remote username. -+For the C -+protocol, this specifies the remote username. - --If not given, then the local username is used for C, and no authentication -+If not given, then no authentication - is attempted for ceph. But note this sometimes may give unexpected results, for - example if using the libvirt backend and if the libvirt backend is configured to - start the qemu appliance as a special user such as C. If in doubt, -diff --git a/lib/drives.c b/lib/drives.c -index 46af66db4..c81ded5d7 100644 ---- a/lib/drives.c -+++ b/lib/drives.c -@@ -168,6 +168,7 @@ create_drive_non_file (guestfs_h *g, - return drv; - } - -+#if 0 /* DISABLED IN RHEL 8 */ - static struct drive * - create_drive_curl (guestfs_h *g, - const struct drive_create_data *data) -@@ -226,6 +227,7 @@ create_drive_gluster (guestfs_h *g, - - return create_drive_non_file (g, data); - } -+#endif /* DISABLED IN RHEL 8 */ - - static int - nbd_port (void) -@@ -294,6 +296,7 @@ create_drive_rbd (guestfs_h *g, - return create_drive_non_file (g, data); - } - -+#if 0 /* DISABLED IN RHEL 8 */ - static struct drive * - create_drive_sheepdog (guestfs_h *g, - const struct drive_create_data *data) -@@ -394,6 +397,7 @@ create_drive_iscsi (guestfs_h *g, - - return create_drive_non_file (g, data); - } -+#endif /* DISABLED IN RHEL 8 */ - - /** - * Create the special F drive. -@@ -856,6 +860,7 @@ guestfs_impl_add_drive_opts (guestfs_h *g, const char *filename, - drv = create_drive_file (g, &data); - } - } -+#if 0 /* DISABLED IN RHEL 8 */ - else if (STREQ (protocol, "ftp")) { - data.protocol = drive_protocol_ftp; - drv = create_drive_curl (g, &data); -@@ -880,6 +885,7 @@ guestfs_impl_add_drive_opts (guestfs_h *g, const char *filename, - data.protocol = drive_protocol_iscsi; - drv = create_drive_iscsi (g, &data); - } -+#endif /* DISABLED IN RHEL 8 */ - else if (STREQ (protocol, "nbd")) { - data.protocol = drive_protocol_nbd; - drv = create_drive_nbd (g, &data); -@@ -888,6 +894,7 @@ guestfs_impl_add_drive_opts (guestfs_h *g, const char *filename, - data.protocol = drive_protocol_rbd; - drv = create_drive_rbd (g, &data); - } -+#if 0 /* DISABLED IN RHEL 8 */ - else if (STREQ (protocol, "sheepdog")) { - data.protocol = drive_protocol_sheepdog; - drv = create_drive_sheepdog (g, &data); -@@ -900,6 +907,7 @@ guestfs_impl_add_drive_opts (guestfs_h *g, const char *filename, - data.protocol = drive_protocol_tftp; - drv = create_drive_curl (g, &data); - } -+#endif /* DISABLED IN RHEL 8 */ - else { - error (g, _("unknown protocol ‘%s’"), protocol); - drv = NULL; /*FALLTHROUGH*/ -diff --git a/lib/guestfs.pod b/lib/guestfs.pod -index ff58aa0bb..1af00f1bb 100644 ---- a/lib/guestfs.pod -+++ b/lib/guestfs.pod -@@ -715,70 +715,6 @@ servers. The server string is documented in - L. The C and C parameters are - also optional, and if not given, then no authentication will be used. - --=head3 FTP, HTTP AND TFTP -- --Libguestfs can access remote disks over FTP, FTPS, HTTP, HTTPS --or TFTP protocols. -- --To do this, set the optional C and C parameters of --L like this: -- -- char **servers = { "www.example.org", NULL }; -- guestfs_add_drive_opts (g, "/disk.img", -- GUESTFS_ADD_DRIVE_OPTS_FORMAT, "raw", -- GUESTFS_ADD_DRIVE_OPTS_PROTOCOL, "http", -- GUESTFS_ADD_DRIVE_OPTS_SERVER, servers, -- -1); -- --The C can be one of C<"ftp">, C<"ftps">, C<"http">, --C<"https"> or C<"tftp">. -- --C (the C parameter) is a list which must have a --single element. The single element is a string defining the web, --FTP or TFTP server. The format of this string is documented in --L. -- --=head3 GLUSTER -- --Libguestfs can access Gluster disks. -- --To do this, set the optional C and C parameters of --L like this: -- -- char **servers = { "gluster.example.org:24007", NULL }; -- guestfs_add_drive_opts (g, "volname/image", -- GUESTFS_ADD_DRIVE_OPTS_FORMAT, "raw", -- GUESTFS_ADD_DRIVE_OPTS_PROTOCOL, "gluster", -- GUESTFS_ADD_DRIVE_OPTS_SERVER, servers, -- -1); -- --C (the C parameter) is a list which must have a --single element. The single element is a string defining the Gluster --server. The format of this string is documented in --L. -- --Note that gluster usually requires the client process (ie. libguestfs) --to run as B and will give unfathomable errors if it is not --(eg. "No data available"). -- --=head3 ISCSI -- --Libguestfs can access iSCSI disks remotely. -- --To do this, set the optional C and C parameters like --this: -- -- char **server = { "iscsi.example.org:3000", NULL }; -- guestfs_add_drive_opts (g, "target-iqn-name/lun", -- GUESTFS_ADD_DRIVE_OPTS_FORMAT, "raw", -- GUESTFS_ADD_DRIVE_OPTS_PROTOCOL, "iscsi", -- GUESTFS_ADD_DRIVE_OPTS_SERVER, server, -- -1); -- --The C parameter is a list which must have a single element. --The single element is a string defining the iSCSI server. The format --of this string is documented in L. -- - =head3 NETWORK BLOCK DEVICE - - Libguestfs can access Network Block Device (NBD) disks remotely. -@@ -841,42 +777,6 @@ L - - =back - --=head3 SHEEPDOG -- --Libguestfs can access Sheepdog disks. -- --To do this, set the optional C and C parameters of --L like this: -- -- char **servers = { /* optional servers ... */ NULL }; -- guestfs_add_drive_opts (g, "volume", -- GUESTFS_ADD_DRIVE_OPTS_FORMAT, "raw", -- GUESTFS_ADD_DRIVE_OPTS_PROTOCOL, "sheepdog", -- GUESTFS_ADD_DRIVE_OPTS_SERVER, servers, -- -1); -- --The optional list of C may be zero or more server addresses --(C<"hostname:port">). The format of the server strings is documented --in L. -- --=head3 SSH -- --Libguestfs can access disks over a Secure Shell (SSH) connection. -- --To do this, set the C and C and (optionally) --C parameters of L like this: -- -- char **server = { "remote.example.com", NULL }; -- guestfs_add_drive_opts (g, "/path/to/disk.img", -- GUESTFS_ADD_DRIVE_OPTS_FORMAT, "raw", -- GUESTFS_ADD_DRIVE_OPTS_PROTOCOL, "ssh", -- GUESTFS_ADD_DRIVE_OPTS_SERVER, server, -- GUESTFS_ADD_DRIVE_OPTS_USERNAME, "remoteuser", -- -1); -- --The format of the server string is documented in --L. -- - =head2 INSPECTION - - Libguestfs has APIs for inspecting an unknown disk image to find out -diff --git a/tests/disks/test-qemu-drive-libvirt.sh b/tests/disks/test-qemu-drive-libvirt.sh -index 595a95a5e..b49534c94 100755 ---- a/tests/disks/test-qemu-drive-libvirt.sh -+++ b/tests/disks/test-qemu-drive-libvirt.sh -@@ -65,34 +65,6 @@ check_output - grep -sq -- '-drive file=rbd:abc-def/ghi-jkl:auth_supported=none,' "$DEBUG_QEMU_FILE" || fail ceph2 - rm "$DEBUG_QEMU_FILE" - --# Gluster. -- --$guestfish -d gluster run ||: --check_output --grep -sq -- '-drive file=gluster://1.2.3.4:1234/volname/image,' "$DEBUG_QEMU_FILE" || fail gluster --rm "$DEBUG_QEMU_FILE" -- --# iSCSI. -- --$guestfish -d iscsi run ||: --check_output --grep -sq -- '-drive file=iscsi://1.2.3.4:1234/iqn.2003-01.org.linux-iscsi.fedora' "$DEBUG_QEMU_FILE" || fail iscsi --rm "$DEBUG_QEMU_FILE" -- --# NBD. -- --$guestfish -d nbd run ||: --check_output --grep -sq -- '-drive file=nbd:1.2.3.4:1234,' "$DEBUG_QEMU_FILE" || fail nbd --rm "$DEBUG_QEMU_FILE" -- --# Sheepdog. -- --$guestfish -d sheepdog run ||: --check_output --grep -sq -- '-drive file=sheepdog:volume,' "$DEBUG_QEMU_FILE" || fail sheepdog --rm "$DEBUG_QEMU_FILE" -- - # Local, stored in a pool. - - $guestfish -d pool1 run ||: -diff --git a/tests/disks/test-qemu-drive.sh b/tests/disks/test-qemu-drive.sh -index 12937fb30..b3e4f9903 100755 ---- a/tests/disks/test-qemu-drive.sh -+++ b/tests/disks/test-qemu-drive.sh -@@ -62,45 +62,6 @@ check_output - grep -sq -- '-drive file=rbd:abc-def/ghi-jkl:auth_supported=none,' "$DEBUG_QEMU_FILE" || fail - rm "$DEBUG_QEMU_FILE" - --# HTTP. -- --guestfish < -Date: Fri, 19 Sep 2014 13:38:20 +0100 -Subject: [PATCH 4/6] RHEL: Remove User-Mode Linux (RHBZ#1144197). - -This isn't supported in RHEL. ---- - lib/launch-uml.c | 13 +++++++++++++ - 1 file changed, 13 insertions(+) - -diff --git a/lib/launch-uml.c b/lib/launch-uml.c -index 5aec50a57..8b9fcd770 100644 ---- a/lib/launch-uml.c -+++ b/lib/launch-uml.c -@@ -44,7 +44,9 @@ struct backend_uml_data { - char umid[UML_UMID_LEN+1]; /* umid=<...> unique ID. */ - }; - -+#if 0 - static void print_vmlinux_command_line (guestfs_h *g, char **argv); -+#endif - - /* Run uml_mkcow to create a COW overlay. */ - static char * -@@ -81,6 +83,7 @@ create_cow_overlay_uml (guestfs_h *g, void *datav, struct drive *drv) - return make_cow_overlay (g, drv->src.u.path); - } - -+#if 0 - /* Test for features which are not supported by the UML backend. - * Possibly some of these should just be warnings, not errors. - */ -@@ -133,10 +136,17 @@ uml_supported (guestfs_h *g) - - return true; - } -+#endif - - static int - launch_uml (guestfs_h *g, void *datav, const char *arg) - { -+ error (g, -+ "launch: In RHEL, only the 'libvirt' or 'direct' method is supported.\n" -+ "In particular, User-Mode Linux (UML) is not supported."); -+ return -1; -+ -+#if 0 - struct backend_uml_data *data = datav; - CLEANUP_FREE_STRINGSBUF DECLARE_STRINGSBUF (cmdline); - int console_sock = -1, daemon_sock = -1; -@@ -496,8 +506,10 @@ launch_uml (guestfs_h *g, void *datav, const char *arg) - } - g->state = CONFIG; - return -1; -+#endif - } - -+#if 0 - /* This is called from the forked subprocess just before vmlinux runs, - * so it can just print the message straight to stderr, where it will - * be picked up and funnelled through the usual appliance event API. -@@ -527,6 +539,7 @@ print_vmlinux_command_line (guestfs_h *g, char **argv) - - fputc ('\n', stderr); - } -+#endif - - static int - shutdown_uml (guestfs_h *g, void *datav, int check_for_errors) --- -2.31.1 - diff --git a/0005-RHEL-Reject-use-of-libguestfs-winsupport-features-ex.patch b/0005-RHEL-Reject-use-of-libguestfs-winsupport-features-ex.patch deleted file mode 100644 index 7edf33e..0000000 --- a/0005-RHEL-Reject-use-of-libguestfs-winsupport-features-ex.patch +++ /dev/null @@ -1,69 +0,0 @@ -From b33e943827b2decc2a01f198f1b300a3c3f6710e Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Tue, 7 Jul 2015 09:28:03 -0400 -Subject: [PATCH 5/6] RHEL: Reject use of libguestfs-winsupport features except - for virt-* tools (RHBZ#1240276). - -Fix the tests: it doesn't let us use guestfish for arbitrary Windows -edits. ---- - generator/c.ml | 16 ++++++++++++++++ - test-data/phony-guests/make-windows-img.sh | 1 + - tests/charsets/test-charset-fidelity.c | 2 ++ - 3 files changed, 19 insertions(+) - -diff --git a/generator/c.ml b/generator/c.ml -index ea69abf76..56ee38aa4 100644 ---- a/generator/c.ml -+++ b/generator/c.ml -@@ -1846,6 +1846,22 @@ and generate_client_actions actions () = - check_args_validity c_name style; - trace_call name c_name style; - -+ (* RHEL 8 *) -+ if name = "mount" || name = "mount_ro" || name = "mount_options" || -+ name = "mount_vfs" then ( -+ pr " if (g->program && !STRPREFIX (g->program, \"virt-\")) {\n"; -+ pr " CLEANUP_FREE char *vfs_type = guestfs_vfs_type (g, mountable);\n"; -+ pr " if (vfs_type && STREQ (vfs_type, \"ntfs\")) {\n"; -+ pr " error (g, \"mount: unsupported filesystem type\");\n"; -+ pr " if (trace_flag)\n"; -+ pr " guestfs_int_trace (g, \"%%s = %%s (error)\",\n"; -+ pr " \"%s\", \"-1\");\n" name; -+ pr " return %s;\n" (string_of_errcode errcode); -+ pr " }\n"; -+ pr " }\n"; -+ pr "\n"; -+ ); -+ - (* Calculate the total size of all FileIn arguments to pass - * as a progress bar hint. - *) -diff --git a/test-data/phony-guests/make-windows-img.sh b/test-data/phony-guests/make-windows-img.sh -index 30908a918..73cf5144e 100755 ---- a/test-data/phony-guests/make-windows-img.sh -+++ b/test-data/phony-guests/make-windows-img.sh -@@ -37,6 +37,7 @@ fi - - # Create a disk image. - guestfish < -Date: Tue, 29 Jun 2021 15:29:11 +0100 -Subject: [PATCH 6/6] RHEL: Create - /etc/crypto-policies/back-ends/opensslcnf.config - -https://bugzilla.redhat.com/show_bug.cgi?id=1977214#c13 ---- - appliance/init | 8 ++++++++ - 1 file changed, 8 insertions(+) - -diff --git a/appliance/init b/appliance/init -index b1c4d09ea..be46f9648 100755 ---- a/appliance/init -+++ b/appliance/init -@@ -70,6 +70,14 @@ if ! test -e /etc/mtab; then - ln -s /proc/mounts /etc/mtab - fi - -+# openssl 3 requires /etc/crypto-policies/back-ends/opensslcnf.config -+# to exist, but it is created in a %post script in crypto-policies -+# https://bugzilla.redhat.com/show_bug.cgi?id=1977214#c13 -+if ! test -r /etc/crypto-policies/back-ends/opensslcnf.config && -+ test -f /usr/share/crypto-policies/DEFAULT/opensslcnf.txt; then -+ ln -s /usr/share/crypto-policies/DEFAULT/opensslcnf.txt /etc/crypto-policies/back-ends/opensslcnf.config -+fi -+ - # devtmpfs is required since udev 176 - mount -t devtmpfs /dev /dev - mkdir -p /dev/pts --- -2.31.1 - diff --git a/libguestfs.spec b/libguestfs.spec index 8275f96..359e6a8 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -36,7 +36,7 @@ %endif # The source directory. -%global source_directory 1.47-development +%global source_directory 1.48-stable # Filter perl provides. %{?perl_default_filter} @@ -47,7 +47,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 -Version: 1.47.4 +Version: 1.48.0 Release: 1%{?dist} License: LGPLv2+ @@ -82,16 +82,6 @@ Source7: libguestfs.keyring # Maintainer script which helps with handling patches. Source8: copy-patches.sh -# Downstream (RHEL-only) patches. -%if 0%{?rhel} -Patch9001: 0001-RHEL-Remove-libguestfs-live-RHBZ-798980.patch -Patch9002: 0002-RHEL-Remove-9p-APIs-from-RHEL-RHBZ-921710.patch -Patch9003: 0003-RHEL-Disable-unsupported-remote-drive-protocols-RHBZ.patch -Patch9004: 0004-RHEL-Remove-User-Mode-Linux-RHBZ-1144197.patch -Patch9005: 0005-RHEL-Reject-use-of-libguestfs-winsupport-features-ex.patch -Patch9006: 0006-RHEL-Create-etc-crypto-policies-back-ends-opensslcnf.patch -%endif - %if 0%{patches_touch_autotools} BuildRequires: autoconf, automake, libtool, gettext-devel %endif @@ -1133,6 +1123,10 @@ rm ocaml/html/.gitignore %changelog +* Mon Mar 14 2022 Richard W.M. Jones - 1:1.48.0-1 +- New upstream stable branch version 1.48.0 +- Remove the RHEL (downstream) patches as they are out of date. + * Tue Mar 08 2022 Richard W.M. Jones - 1:1.47.4-1 - New upstream development version 1.47.4 - Replace guestfs-release-notes-historical(1) with guestfs-release-notes(1) diff --git a/sources b/sources index 56c3ea5..3fe554a 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (libguestfs-1.47.4.tar.gz) = e7a9071e8349c47d908cff786cb571f57e44dc50911048b9ea8e3136847103d29e45662089cb47f8e821e803cfeabbc8555fc32cf115f35de8e036b982d735fb -SHA512 (libguestfs-1.47.4.tar.gz.sig) = f64e42f6536964751f4db6f71944e839227a8a802ba3fe361e3a77c329f96c687e17811ca99bbc4c5adc2b25e7879dc27d12154ed44952c8597bd356e1c67bb5 +SHA512 (libguestfs-1.48.0.tar.gz) = b2486f32a3958c2b3e68d3f547dcd192dc7f8c59e0efd8660cd27cae9c218ce4fc2a60480dcb6bb0d10d8abbc2d2f4796075aea1cfab5e3c7cd12c38d4352fe2 +SHA512 (libguestfs-1.48.0.tar.gz.sig) = d884d4b5cdd5470978a56c8e31843847567221693711f4e35415c4ca992ad92d872be531641d945314556da65a7573d8cec5748d571ba4204c4bab81ee39bb1e From 51cdb68f0925969b3c667c9677b1eb65e5ebf67a Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 14 Apr 2022 17:04:34 +0100 Subject: [PATCH 075/243] New upstream stable branch version 1.48.1 --- libguestfs.spec | 5 ++++- sources | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index 359e6a8..bd95a89 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -47,7 +47,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 -Version: 1.48.0 +Version: 1.48.1 Release: 1%{?dist} License: LGPLv2+ @@ -1123,6 +1123,9 @@ rm ocaml/html/.gitignore %changelog +* Thu Apr 14 2022 Richard W.M. Jones - 1:1.48.1-1 +- New upstream stable branch version 1.48.1 + * Mon Mar 14 2022 Richard W.M. Jones - 1:1.48.0-1 - New upstream stable branch version 1.48.0 - Remove the RHEL (downstream) patches as they are out of date. diff --git a/sources b/sources index 3fe554a..6f7bd92 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (libguestfs-1.48.0.tar.gz) = b2486f32a3958c2b3e68d3f547dcd192dc7f8c59e0efd8660cd27cae9c218ce4fc2a60480dcb6bb0d10d8abbc2d2f4796075aea1cfab5e3c7cd12c38d4352fe2 -SHA512 (libguestfs-1.48.0.tar.gz.sig) = d884d4b5cdd5470978a56c8e31843847567221693711f4e35415c4ca992ad92d872be531641d945314556da65a7573d8cec5748d571ba4204c4bab81ee39bb1e +SHA512 (libguestfs-1.48.1.tar.gz) = 34cad3cb9ebfe2d6294fda8eede873470d75aad2eadc5b245556122a3e09b5d51fc012c0144997b66070feb97fe9613f0f9328a973c30839dae74f446a4a4b3c +SHA512 (libguestfs-1.48.1.tar.gz.sig) = 2addd2767237cc5e00031b68d50d50e0ac6f1da570aefd6e2bba76e919d10f3648802b113bfe99efe9e8c336e96bf6e6e179731d686b09cb5f4bf29f4790ffc0 From 461e5bef9cda2f9fc25ee0c0fb0be5e1bc1dda8f Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 20 Apr 2022 13:41:55 +0100 Subject: [PATCH 076/243] virt-rescue: Add versioned requires on libguestfs base package Otherwise this can be satisfied by any libguestfs, even quite an old version. --- libguestfs.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/libguestfs.spec b/libguestfs.spec index bd95a89..d57b593 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -482,6 +482,7 @@ disk images containing HFS+ / Mac OS Extended filesystems. %package rescue Summary: virt-rescue shell License: LGPLv2+ +Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release} %description rescue This adds the virt-rescue shell which is a "rescue disk" for virtual From 3336b47a094420832f0b9801574b172aafb29c59 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 12 May 2022 15:29:28 +0100 Subject: [PATCH 077/243] New upstream development version 1.49.1 --- libguestfs.spec | 7 +++++-- sources | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index d57b593..8d05158 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -36,7 +36,7 @@ %endif # The source directory. -%global source_directory 1.48-stable +%global source_directory 1.49-development # Filter perl provides. %{?perl_default_filter} @@ -47,7 +47,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 -Version: 1.48.1 +Version: 1.49.1 Release: 1%{?dist} License: LGPLv2+ @@ -1124,6 +1124,9 @@ rm ocaml/html/.gitignore %changelog +* Thu May 12 2022 Richard W.M. Jones - 1:1.49.1-1 +- New upstream development version 1.49.1 + * Thu Apr 14 2022 Richard W.M. Jones - 1:1.48.1-1 - New upstream stable branch version 1.48.1 diff --git a/sources b/sources index 6f7bd92..e2caea1 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (libguestfs-1.48.1.tar.gz) = 34cad3cb9ebfe2d6294fda8eede873470d75aad2eadc5b245556122a3e09b5d51fc012c0144997b66070feb97fe9613f0f9328a973c30839dae74f446a4a4b3c -SHA512 (libguestfs-1.48.1.tar.gz.sig) = 2addd2767237cc5e00031b68d50d50e0ac6f1da570aefd6e2bba76e919d10f3648802b113bfe99efe9e8c336e96bf6e6e179731d686b09cb5f4bf29f4790ffc0 +SHA512 (libguestfs-1.49.1.tar.gz) = fa8384865adc2e5f9651e835ebbe0e2c6945bea2dc83c7a639900a2b54bc4fda08363d9f60a5b12a7ce66298215e73fee2fbc8e8e209361f99906f6536a0a1ce +SHA512 (libguestfs-1.49.1.tar.gz.sig) = 4dee1738166b9afe41d42fbaf40c68832d1d99330c4f314585d14e69f7d6e3036e6bd856a3915a9437d4593dca098b042a29b3bc3e44f9be73fba9a744b55c39 From 4c4ca3eda2970e9284c792ca8144220bd26a81df Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sat, 21 May 2022 11:13:29 +0100 Subject: [PATCH 078/243] Add upstream patch which helps debugging appliance generation. --- ...Print-guestfsd.deps-after-generation.patch | 27 +++++++++++++++++++ libguestfs.spec | 10 +++++-- 2 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 0001-appliance-Print-guestfsd.deps-after-generation.patch diff --git a/0001-appliance-Print-guestfsd.deps-after-generation.patch b/0001-appliance-Print-guestfsd.deps-after-generation.patch new file mode 100644 index 0000000..619db45 --- /dev/null +++ b/0001-appliance-Print-guestfsd.deps-after-generation.patch @@ -0,0 +1,27 @@ +From b5260d8cd62f93b1cc4faf285bc3b6d8e0168e3b Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Sat, 21 May 2022 11:10:29 +0100 +Subject: [PATCH] appliance: Print guestfsd.deps after generation + +Sometimes generating this file fails. To help with debugging these +situatons, print the guestfsd.deps file after it has been generated. +--- + appliance/Makefile.am | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/appliance/Makefile.am b/appliance/Makefile.am +index 6dd1df75a6..9a0ba98a06 100644 +--- a/appliance/Makefile.am ++++ b/appliance/Makefile.am +@@ -101,6 +101,8 @@ guestfsd.deps: ../daemon/guestfsd + sort -u > $@.t + rm -f ld.so.cache.txt + mv $@.t $@ ++ @echo "guestfsd.deps:" ++ @cat $@ + + packagelist: packagelist.in Makefile guestfsd.deps + m4 $(PACKAGELIST_CPP_FLAGS) $< | \ +-- +2.35.1 + diff --git a/libguestfs.spec b/libguestfs.spec index 8d05158..6e5d73d 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -29,7 +29,7 @@ # If there are patches which touch autotools files, set this to 1. %if !0%{?rhel} -%global patches_touch_autotools %{nil} +%global patches_touch_autotools 1 %else # On RHEL the downstream patches always touch autotools files. %global patches_touch_autotools 1 @@ -48,7 +48,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.49.1 -Release: 1%{?dist} +Release: 2%{?dist} License: LGPLv2+ # Build only for architectures that have a kernel @@ -82,6 +82,9 @@ Source7: libguestfs.keyring # Maintainer script which helps with handling patches. Source8: copy-patches.sh +# Upstream patch which helps debugging appliance generation. +Patch1: 0001-appliance-Print-guestfsd.deps-after-generation.patch + %if 0%{patches_touch_autotools} BuildRequires: autoconf, automake, libtool, gettext-devel %endif @@ -1124,6 +1127,9 @@ rm ocaml/html/.gitignore %changelog +* Sat May 21 2022 Richard W.M. Jones - 1:1.49.1-2 +- Add upstream patch which helps debugging appliance generation. + * Thu May 12 2022 Richard W.M. Jones - 1:1.49.1-1 - New upstream development version 1.49.1 From 7c2b529975da98337f14fd731972c9b3e3444376 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 26 May 2022 12:38:09 +0100 Subject: [PATCH 079/243] New upstream development version 1.49.2 --- ...Print-guestfsd.deps-after-generation.patch | 27 ------------------- libguestfs.spec | 12 ++++----- sources | 4 +-- 3 files changed, 8 insertions(+), 35 deletions(-) delete mode 100644 0001-appliance-Print-guestfsd.deps-after-generation.patch diff --git a/0001-appliance-Print-guestfsd.deps-after-generation.patch b/0001-appliance-Print-guestfsd.deps-after-generation.patch deleted file mode 100644 index 619db45..0000000 --- a/0001-appliance-Print-guestfsd.deps-after-generation.patch +++ /dev/null @@ -1,27 +0,0 @@ -From b5260d8cd62f93b1cc4faf285bc3b6d8e0168e3b Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Sat, 21 May 2022 11:10:29 +0100 -Subject: [PATCH] appliance: Print guestfsd.deps after generation - -Sometimes generating this file fails. To help with debugging these -situatons, print the guestfsd.deps file after it has been generated. ---- - appliance/Makefile.am | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/appliance/Makefile.am b/appliance/Makefile.am -index 6dd1df75a6..9a0ba98a06 100644 ---- a/appliance/Makefile.am -+++ b/appliance/Makefile.am -@@ -101,6 +101,8 @@ guestfsd.deps: ../daemon/guestfsd - sort -u > $@.t - rm -f ld.so.cache.txt - mv $@.t $@ -+ @echo "guestfsd.deps:" -+ @cat $@ - - packagelist: packagelist.in Makefile guestfsd.deps - m4 $(PACKAGELIST_CPP_FLAGS) $< | \ --- -2.35.1 - diff --git a/libguestfs.spec b/libguestfs.spec index 6e5d73d..0e8b854 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -29,7 +29,7 @@ # If there are patches which touch autotools files, set this to 1. %if !0%{?rhel} -%global patches_touch_autotools 1 +%global patches_touch_autotools %{nil} %else # On RHEL the downstream patches always touch autotools files. %global patches_touch_autotools 1 @@ -47,8 +47,8 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 -Version: 1.49.1 -Release: 2%{?dist} +Version: 1.49.2 +Release: 1%{?dist} License: LGPLv2+ # Build only for architectures that have a kernel @@ -82,9 +82,6 @@ Source7: libguestfs.keyring # Maintainer script which helps with handling patches. Source8: copy-patches.sh -# Upstream patch which helps debugging appliance generation. -Patch1: 0001-appliance-Print-guestfsd.deps-after-generation.patch - %if 0%{patches_touch_autotools} BuildRequires: autoconf, automake, libtool, gettext-devel %endif @@ -1127,6 +1124,9 @@ rm ocaml/html/.gitignore %changelog +* Thu May 26 2022 Richard W.M. Jones - 1:1.49.2-1 +- New upstream development version 1.49.2 + * Sat May 21 2022 Richard W.M. Jones - 1:1.49.1-2 - Add upstream patch which helps debugging appliance generation. diff --git a/sources b/sources index e2caea1..0771700 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (libguestfs-1.49.1.tar.gz) = fa8384865adc2e5f9651e835ebbe0e2c6945bea2dc83c7a639900a2b54bc4fda08363d9f60a5b12a7ce66298215e73fee2fbc8e8e209361f99906f6536a0a1ce -SHA512 (libguestfs-1.49.1.tar.gz.sig) = 4dee1738166b9afe41d42fbaf40c68832d1d99330c4f314585d14e69f7d6e3036e6bd856a3915a9437d4593dca098b042a29b3bc3e44f9be73fba9a744b55c39 +SHA512 (libguestfs-1.49.2.tar.gz) = e9c82076948567bbf4a2b6363850d259c782bf5e64fb61f92849604cbc5ef776bfb1b6686c53e8dd79ea242ad3a5cba76a753d9766ac4135661e587331c70e4a +SHA512 (libguestfs-1.49.2.tar.gz.sig) = eb3a52df37d9ec57a8f54041a4dc1179c6f230cca525c942370acad53d13e113db9ec913cba85b05d26ee6d8f244dde829617be34c773072f72cbf71162704da From 7f0f2029755a14f52b89e23c1a904477a67eea20 Mon Sep 17 00:00:00 2001 From: Jitka Plesnikova Date: Wed, 1 Jun 2022 08:52:05 +0200 Subject: [PATCH 080/243] Perl 5.36 rebuild --- libguestfs.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libguestfs.spec b/libguestfs.spec index 0e8b854..c5d6bf2 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -48,7 +48,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.49.2 -Release: 1%{?dist} +Release: 2%{?dist} License: LGPLv2+ # Build only for architectures that have a kernel @@ -1124,6 +1124,9 @@ rm ocaml/html/.gitignore %changelog +* Wed Jun 01 2022 Jitka Plesnikova - 1:1.49.2-2 +- Perl 5.36 rebuild + * Thu May 26 2022 Richard W.M. Jones - 1:1.49.2-1 - New upstream development version 1.49.2 From 8a7ee9b294e2e4a6fa75a51608e407caee69437a Mon Sep 17 00:00:00 2001 From: Python Maint Date: Wed, 15 Jun 2022 18:25:34 +0200 Subject: [PATCH 081/243] Rebuilt for Python 3.11 --- libguestfs.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libguestfs.spec b/libguestfs.spec index c5d6bf2..eb41fff 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -48,7 +48,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.49.2 -Release: 2%{?dist} +Release: 3%{?dist} License: LGPLv2+ # Build only for architectures that have a kernel @@ -1124,6 +1124,9 @@ rm ocaml/html/.gitignore %changelog +* Wed Jun 15 2022 Python Maint - 1:1.49.2-3 +- Rebuilt for Python 3.11 + * Wed Jun 01 2022 Jitka Plesnikova - 1:1.49.2-2 - Perl 5.36 rebuild From 75e77be87aa24dcb39ae5c7ce8771f0c989af8f0 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 16 Jun 2022 08:44:35 +0100 Subject: [PATCH 082/243] Fix PHP bindings --- 0001-php-add-arginfo-to-php-bindings.patch | 88 ++++++++++++++++++++++ libguestfs.spec | 8 +- 2 files changed, 95 insertions(+), 1 deletion(-) create mode 100644 0001-php-add-arginfo-to-php-bindings.patch diff --git a/0001-php-add-arginfo-to-php-bindings.patch b/0001-php-add-arginfo-to-php-bindings.patch new file mode 100644 index 0000000..1f444eb --- /dev/null +++ b/0001-php-add-arginfo-to-php-bindings.patch @@ -0,0 +1,88 @@ +From ec27979398b0871c1a3e0e244849f8435c9c9a8d Mon Sep 17 00:00:00 2001 +From: Geoff Amey +Date: Wed, 15 Jun 2022 17:06:56 -0400 +Subject: [PATCH] php: add arginfo to php bindings + +Starting with PHP8, arginfo is mandatory for PHP extensions. This patch +updates the generator for the PHP bindings to generate the arginfo +structures, using the Zend API macros. Only basic arginfo is added, +without full documentation of argument and return types, in order to +ensure compatibility with as many versions of PHP as possible. +--- + .gitignore | 1 + + generator/php.ml | 37 ++++++++++++++++++++++++++++++++++--- + 2 files changed, 35 insertions(+), 3 deletions(-) + +diff --git a/.gitignore b/.gitignore +index a36ccc86af..356c01fbd1 100644 +--- a/.gitignore ++++ b/.gitignore +@@ -325,6 +325,7 @@ Makefile.in + /php/extension/configure.in + /php/extension/env + /php/extension/guestfs_php.c ++/php/extension/guestfs_php.dep + /php/extension/install-sh + /php/extension/libtool + /php/extension/ltmain.sh +diff --git a/generator/php.ml b/generator/php.ml +index 5c7ef48e8b..acdc7b877c 100644 +--- a/generator/php.ml ++++ b/generator/php.ml +@@ -130,6 +130,37 @@ typedef size_t guestfs_string_length; + typedef int guestfs_string_length; + #endif + ++/* Declare argument info structures */ ++ZEND_BEGIN_ARG_INFO_EX(arginfo_create, 0, 0, 0) ++ZEND_END_ARG_INFO() ++ ++ZEND_BEGIN_ARG_INFO_EX(arginfo_last_error, 0, 0, 1) ++ ZEND_ARG_INFO(0, g) ++ZEND_END_ARG_INFO() ++ ++"; ++ List.iter ( ++ fun { name = shortname; style = ret, args, optargs; } -> ++ let len = List.length args in ++ pr "ZEND_BEGIN_ARG_INFO_EX(arginfo_%s, 0, 0, %d)\n" shortname (len + 1); ++ pr " ZEND_ARG_INFO(0, g)\n"; ++ List.iter ( ++ function ++ | BufferIn n | Bool n | Int n | Int64 n | OptString n ++ | Pointer(_, n) | String (_, n) | StringList (_, n) -> ++ pr " ZEND_ARG_INFO(0, %s)\n" n ++ ) args; ++ ++ List.iter ( ++ function ++ | OBool n | OInt n | OInt64 n | OString n | OStringList n -> ++ pr " ZEND_ARG_INFO(0, %s)\n" n ++ ) optargs; ++ pr "ZEND_END_ARG_INFO()\n\n"; ++ ) (actions |> external_functions |> sort); ++ ++ pr " ++ + /* Convert array to list of strings. + * http://marc.info/?l=pecl-dev&m=112205192100631&w=2 + */ +@@ -204,12 +235,12 @@ PHP_MINIT_FUNCTION (guestfs_php) + } + + static zend_function_entry guestfs_php_functions[] = { +- PHP_FE (guestfs_create, NULL) +- PHP_FE (guestfs_last_error, NULL) ++ PHP_FE (guestfs_create, arginfo_create) ++ PHP_FE (guestfs_last_error, arginfo_last_error) + "; + + List.iter ( +- fun { name } -> pr " PHP_FE (guestfs_%s, NULL)\n" name ++ fun { name } -> pr " PHP_FE (guestfs_%s, arginfo_%s)\n" name name + ) (actions |> external_functions |> sort); + + pr " { NULL, NULL, NULL } +-- +2.35.1 + diff --git a/libguestfs.spec b/libguestfs.spec index eb41fff..ebd9ba6 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -48,7 +48,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.49.2 -Release: 3%{?dist} +Release: 4%{?dist} License: LGPLv2+ # Build only for architectures that have a kernel @@ -86,6 +86,9 @@ Source8: copy-patches.sh BuildRequires: autoconf, automake, libtool, gettext-devel %endif +# Fix PHP bindings. +Patch1: 0001-php-add-arginfo-to-php-bindings.patch + # Basic build requirements. BuildRequires: gcc, gcc-c++ BuildRequires: make @@ -1124,6 +1127,9 @@ rm ocaml/html/.gitignore %changelog +* Thu Jun 16 2022 Richard W.M. Jones - 1:1.49.2-4 +- Fix PHP bindings + * Wed Jun 15 2022 Python Maint - 1:1.49.2-3 - Rebuilt for Python 3.11 From e598e60d7cf6ff45505d6cf76a0172613cbc2bfb Mon Sep 17 00:00:00 2001 From: Python Maint Date: Thu, 16 Jun 2022 13:34:40 +0200 Subject: [PATCH 083/243] Rebuilt for Python 3.11 --- libguestfs.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libguestfs.spec b/libguestfs.spec index ebd9ba6..2e37d6b 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -48,7 +48,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.49.2 -Release: 4%{?dist} +Release: 5%{?dist} License: LGPLv2+ # Build only for architectures that have a kernel @@ -1127,6 +1127,9 @@ rm ocaml/html/.gitignore %changelog +* Thu Jun 16 2022 Python Maint - 1:1.49.2-5 +- Rebuilt for Python 3.11 + * Thu Jun 16 2022 Richard W.M. Jones - 1:1.49.2-4 - Fix PHP bindings From ce0a8a89767a23a311dec3a39276e45aa6dcec9e Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 17 Jun 2022 08:42:36 +0100 Subject: [PATCH 084/243] Enable PHP bindings (on RHEL) https://bugzilla.redhat.com/show_bug.cgi?id=2097718 --- libguestfs.spec | 9 --------- 1 file changed, 9 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index 2e37d6b..1e6f434 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -176,9 +176,7 @@ BuildRequires: rubygem(json) BuildRequires: rubygem(rdoc) BuildRequires: rubygem(test-unit) BuildRequires: ruby-irb -%if !0%{?rhel} BuildRequires: php-devel -%endif BuildRequires: gobject-introspection-devel BuildRequires: gjs %if !0%{?rhel} @@ -399,9 +397,7 @@ Language bindings: lua-guestfs Lua bindings ocaml-libguestfs-devel OCaml bindings perl-Sys-Guestfs Perl bindings -%if !0%{?rhel} php-libguestfs PHP bindings -%endif python3-libguestfs Python 3 bindings ruby-libguestfs Ruby bindings %if !0%{?rhel} @@ -623,7 +619,6 @@ Provides: ruby(guestfs) = %{version} ruby-%{name} contains Ruby bindings for %{name}. -%if !0%{?rhel} %package -n php-%{name} Summary: PHP bindings for %{name} Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release} @@ -632,7 +627,6 @@ Requires: php(api) = %{php_core_api} %description -n php-%{name} php-%{name} contains PHP bindings for %{name}. -%endif %package -n lua-guestfs @@ -768,7 +762,6 @@ fi %endif %if 0%{?rhel} && !0%{?eln} --with-qemu="qemu-kvm qemu-system-%{_build_arch} qemu" \ - --disable-php \ %endif %ifnarch %{golang_arches} --disable-golang \ @@ -1067,13 +1060,11 @@ rm ocaml/html/.gitignore %{_mandir}/man3/guestfs-ruby.3* -%if !0%{?rhel} %files -n php-%{name} %doc php/README-PHP %dir %{_sysconfdir}/php.d %{_sysconfdir}/php.d/guestfs_php.ini %{_libdir}/php/modules/guestfs_php.so -%endif %files -n lua-guestfs From 1783711e2fdae127f5e1d94e4ac0a03d20f7362a Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sun, 19 Jun 2022 11:51:54 +0100 Subject: [PATCH 085/243] OCaml 4.14.0 rebuild --- libguestfs.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libguestfs.spec b/libguestfs.spec index 1e6f434..2b327e0 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -48,7 +48,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.49.2 -Release: 5%{?dist} +Release: 6%{?dist} License: LGPLv2+ # Build only for architectures that have a kernel @@ -1118,6 +1118,9 @@ rm ocaml/html/.gitignore %changelog +* Sun Jun 19 2022 Richard W.M. Jones - 1:1.49.2-6 +- OCaml 4.14.0 rebuild + * Thu Jun 16 2022 Python Maint - 1:1.49.2-5 - Rebuilt for Python 3.11 From 4ab8c7248f6d7eb2c26c7a9ac89f4960fe406279 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Mon, 20 Jun 2022 10:45:38 +0200 Subject: [PATCH 086/243] Rebuilt for Python 3.11 --- libguestfs.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libguestfs.spec b/libguestfs.spec index 2b327e0..2f062a1 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -48,7 +48,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.49.2 -Release: 6%{?dist} +Release: 7%{?dist} License: LGPLv2+ # Build only for architectures that have a kernel @@ -1118,6 +1118,9 @@ rm ocaml/html/.gitignore %changelog +* Mon Jun 20 2022 Python Maint - 1:1.49.2-7 +- Rebuilt for Python 3.11 + * Sun Jun 19 2022 Richard W.M. Jones - 1:1.49.2-6 - OCaml 4.14.0 rebuild From d15a8071b102a35cfa9585d6b0ea4477464f2706 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 1 Jul 2022 16:00:12 +0100 Subject: [PATCH 087/243] New upstream development version 1.49.3 --- 0001-php-add-arginfo-to-php-bindings.patch | 88 ---------------------- libguestfs.spec | 10 +-- sources | 4 +- 3 files changed, 7 insertions(+), 95 deletions(-) delete mode 100644 0001-php-add-arginfo-to-php-bindings.patch diff --git a/0001-php-add-arginfo-to-php-bindings.patch b/0001-php-add-arginfo-to-php-bindings.patch deleted file mode 100644 index 1f444eb..0000000 --- a/0001-php-add-arginfo-to-php-bindings.patch +++ /dev/null @@ -1,88 +0,0 @@ -From ec27979398b0871c1a3e0e244849f8435c9c9a8d Mon Sep 17 00:00:00 2001 -From: Geoff Amey -Date: Wed, 15 Jun 2022 17:06:56 -0400 -Subject: [PATCH] php: add arginfo to php bindings - -Starting with PHP8, arginfo is mandatory for PHP extensions. This patch -updates the generator for the PHP bindings to generate the arginfo -structures, using the Zend API macros. Only basic arginfo is added, -without full documentation of argument and return types, in order to -ensure compatibility with as many versions of PHP as possible. ---- - .gitignore | 1 + - generator/php.ml | 37 ++++++++++++++++++++++++++++++++++--- - 2 files changed, 35 insertions(+), 3 deletions(-) - -diff --git a/.gitignore b/.gitignore -index a36ccc86af..356c01fbd1 100644 ---- a/.gitignore -+++ b/.gitignore -@@ -325,6 +325,7 @@ Makefile.in - /php/extension/configure.in - /php/extension/env - /php/extension/guestfs_php.c -+/php/extension/guestfs_php.dep - /php/extension/install-sh - /php/extension/libtool - /php/extension/ltmain.sh -diff --git a/generator/php.ml b/generator/php.ml -index 5c7ef48e8b..acdc7b877c 100644 ---- a/generator/php.ml -+++ b/generator/php.ml -@@ -130,6 +130,37 @@ typedef size_t guestfs_string_length; - typedef int guestfs_string_length; - #endif - -+/* Declare argument info structures */ -+ZEND_BEGIN_ARG_INFO_EX(arginfo_create, 0, 0, 0) -+ZEND_END_ARG_INFO() -+ -+ZEND_BEGIN_ARG_INFO_EX(arginfo_last_error, 0, 0, 1) -+ ZEND_ARG_INFO(0, g) -+ZEND_END_ARG_INFO() -+ -+"; -+ List.iter ( -+ fun { name = shortname; style = ret, args, optargs; } -> -+ let len = List.length args in -+ pr "ZEND_BEGIN_ARG_INFO_EX(arginfo_%s, 0, 0, %d)\n" shortname (len + 1); -+ pr " ZEND_ARG_INFO(0, g)\n"; -+ List.iter ( -+ function -+ | BufferIn n | Bool n | Int n | Int64 n | OptString n -+ | Pointer(_, n) | String (_, n) | StringList (_, n) -> -+ pr " ZEND_ARG_INFO(0, %s)\n" n -+ ) args; -+ -+ List.iter ( -+ function -+ | OBool n | OInt n | OInt64 n | OString n | OStringList n -> -+ pr " ZEND_ARG_INFO(0, %s)\n" n -+ ) optargs; -+ pr "ZEND_END_ARG_INFO()\n\n"; -+ ) (actions |> external_functions |> sort); -+ -+ pr " -+ - /* Convert array to list of strings. - * http://marc.info/?l=pecl-dev&m=112205192100631&w=2 - */ -@@ -204,12 +235,12 @@ PHP_MINIT_FUNCTION (guestfs_php) - } - - static zend_function_entry guestfs_php_functions[] = { -- PHP_FE (guestfs_create, NULL) -- PHP_FE (guestfs_last_error, NULL) -+ PHP_FE (guestfs_create, arginfo_create) -+ PHP_FE (guestfs_last_error, arginfo_last_error) - "; - - List.iter ( -- fun { name } -> pr " PHP_FE (guestfs_%s, NULL)\n" name -+ fun { name } -> pr " PHP_FE (guestfs_%s, arginfo_%s)\n" name name - ) (actions |> external_functions |> sort); - - pr " { NULL, NULL, NULL } --- -2.35.1 - diff --git a/libguestfs.spec b/libguestfs.spec index 2f062a1..2c14242 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -47,8 +47,8 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 -Version: 1.49.2 -Release: 7%{?dist} +Version: 1.49.3 +Release: 1%{?dist} License: LGPLv2+ # Build only for architectures that have a kernel @@ -86,9 +86,6 @@ Source8: copy-patches.sh BuildRequires: autoconf, automake, libtool, gettext-devel %endif -# Fix PHP bindings. -Patch1: 0001-php-add-arginfo-to-php-bindings.patch - # Basic build requirements. BuildRequires: gcc, gcc-c++ BuildRequires: make @@ -1118,6 +1115,9 @@ rm ocaml/html/.gitignore %changelog +* Fri Jul 01 2022 Richard W.M. Jones - 1:1.49.3-1 +- New upstream development version 1.49.3 + * Mon Jun 20 2022 Python Maint - 1:1.49.2-7 - Rebuilt for Python 3.11 diff --git a/sources b/sources index 0771700..d75b396 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (libguestfs-1.49.2.tar.gz) = e9c82076948567bbf4a2b6363850d259c782bf5e64fb61f92849604cbc5ef776bfb1b6686c53e8dd79ea242ad3a5cba76a753d9766ac4135661e587331c70e4a -SHA512 (libguestfs-1.49.2.tar.gz.sig) = eb3a52df37d9ec57a8f54041a4dc1179c6f230cca525c942370acad53d13e113db9ec913cba85b05d26ee6d8f244dde829617be34c773072f72cbf71162704da +SHA512 (libguestfs-1.49.3.tar.gz) = 4f58f567d207ad529483a6dfd4a594e86b0e12eda97310594e4e8b1589cc5de019592b930318eccd68a173e29fc37b56045c95cb52d8eea95a90b2f42fcc24d6 +SHA512 (libguestfs-1.49.3.tar.gz.sig) = 0af9e6c8ad410e53e44b4d72a6fbf3c0ef10df0c2925c8c228dd528e810f5112be4268702b25d7b22ae7adeac27244f2558d5b5f56b024023db689283b2d6cbe From 96138793579c8ef8cbe0f45d1b890b6e76c5d0ac Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 4 Jul 2022 11:05:47 +0100 Subject: [PATCH 088/243] Add clevis-luks to BRs, required by 1.49.3 --- libguestfs.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libguestfs.spec b/libguestfs.spec index 2c14242..87569aa 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -48,7 +48,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.49.3 -Release: 1%{?dist} +Release: 2%{?dist} License: LGPLv2+ # Build only for architectures that have a kernel @@ -199,6 +199,7 @@ BuildRequires: binutils BuildRequires: btrfs-progs %endif BuildRequires: bzip2 +BuildRequires: clevis-luks BuildRequires: coreutils BuildRequires: cpio BuildRequires: cryptsetup @@ -1115,6 +1116,9 @@ rm ocaml/html/.gitignore %changelog +* Mon Jul 04 2022 Richard W.M. Jones - 1:1.49.3-2 +- Add clevis-luks to BRs, required by 1.49.3 + * Fri Jul 01 2022 Richard W.M. Jones - 1:1.49.3-1 - New upstream development version 1.49.3 From f1b5b138be5d819fef43b6a1450552a3d406475a Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 20 Jul 2022 10:58:00 +0100 Subject: [PATCH 089/243] ocaml-gettext/-devel is no longer required --- libguestfs.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/libguestfs.spec b/libguestfs.spec index 87569aa..bb818bf 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -149,7 +149,6 @@ BuildRequires: gnupg2 BuildRequires: ocaml BuildRequires: ocaml-ocamldoc BuildRequires: ocaml-findlib-devel -BuildRequires: ocaml-gettext-devel %if !0%{?rhel} BuildRequires: ocaml-ounit-devel %endif From c0052f0c349e3ed7cfaf8e884500fd8e9d2ac5c8 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 21 Jul 2022 18:00:04 +0000 Subject: [PATCH 090/243] Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- libguestfs.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libguestfs.spec b/libguestfs.spec index bb818bf..ec64999 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -48,7 +48,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.49.3 -Release: 2%{?dist} +Release: 3%{?dist} License: LGPLv2+ # Build only for architectures that have a kernel @@ -1115,6 +1115,9 @@ rm ocaml/html/.gitignore %changelog +* Thu Jul 21 2022 Fedora Release Engineering - 1:1.49.3-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + * Mon Jul 04 2022 Richard W.M. Jones - 1:1.49.3-2 - Add clevis-luks to BRs, required by 1.49.3 From 0e746eddb8f63019d4e9591d991256b34d66aa35 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 21 Jul 2022 21:28:54 +0100 Subject: [PATCH 091/243] Skip tests on debug kernels These Rawhide kernels have become so slow that they are no longer able to run libguestfs in Koji. --- libguestfs.spec | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/libguestfs.spec b/libguestfs.spec index ec64999..0750614 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -773,8 +773,14 @@ make V=1 INSTALLDIRS=vendor %{?_smp_mflags} %check - %ifarch %{test_arches} +# Only run the tests with non-debug (ie. non-Rawhide) kernels. +# XXX This tests for any debug kernel installed. +if grep CONFIG_DEBUG_MUTEXES=y /lib/modules/*/config ; then + echo "Skipping tests because debug kernel is installed" + exit 0 +fi + export LIBGUESTFS_DEBUG=1 export LIBGUESTFS_TRACE=1 export LIBVIRT_DEBUG=1 From 3c86bbd78e32261a98a22f9fcb2906fec21d7abc Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 1 Aug 2022 15:23:14 +0100 Subject: [PATCH 092/243] New upstream development version 1.49.4 --- libguestfs.spec | 7 +++++-- sources | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index 0750614..ea1719c 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -47,8 +47,8 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 -Version: 1.49.3 -Release: 3%{?dist} +Version: 1.49.4 +Release: 1%{?dist} License: LGPLv2+ # Build only for architectures that have a kernel @@ -1121,6 +1121,9 @@ rm ocaml/html/.gitignore %changelog +* Mon Aug 01 2022 Richard W.M. Jones - 1:1.49.4-1 +- New upstream development version 1.49.4 + * Thu Jul 21 2022 Fedora Release Engineering - 1:1.49.3-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild diff --git a/sources b/sources index d75b396..173b9ae 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (libguestfs-1.49.3.tar.gz) = 4f58f567d207ad529483a6dfd4a594e86b0e12eda97310594e4e8b1589cc5de019592b930318eccd68a173e29fc37b56045c95cb52d8eea95a90b2f42fcc24d6 -SHA512 (libguestfs-1.49.3.tar.gz.sig) = 0af9e6c8ad410e53e44b4d72a6fbf3c0ef10df0c2925c8c228dd528e810f5112be4268702b25d7b22ae7adeac27244f2558d5b5f56b024023db689283b2d6cbe +SHA512 (libguestfs-1.49.4.tar.gz) = 7146322cc1b8215821be20b43f86d5b023b009bb21356fb0282abf18736db36ba0a15514a300fd9bb8ba650c868e347bba6bad4cdb8c7f2b0d469c4823488e8b +SHA512 (libguestfs-1.49.4.tar.gz.sig) = d7e5cae1cee1495840b53b0404004b64d16258350f76aace474f87db0a6259577cb582d694171eea83f56fbb73bd90a9f167618e1966b9fdeb24bae004de0afc From 1d510c3e2ca7b74c1ffc80754ed690ecff0b8eb8 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 10 Aug 2022 08:47:20 +0100 Subject: [PATCH 093/243] Add BR zstd Will be required by libguestfs >= 1.49.5. --- libguestfs.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libguestfs.spec b/libguestfs.spec index ea1719c..c3def6d 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -139,6 +139,7 @@ BuildRequires: bash-completion BuildRequires: /usr/bin/ping BuildRequires: /usr/bin/wget BuildRequires: xz +BuildRequires: zstd BuildRequires: /usr/bin/qemu-img %if 0%{verify_tarball_signature} @@ -287,6 +288,7 @@ BuildRequires: zerofree BuildRequires: zfs-fuse %endif %endif +BuildRequires: zstd # Main package requires the appliance. This allows the appliance to # be replaced if there exists a package called From c91334551481ff939a72eb4d8c0eef8785d94390 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 5 Oct 2022 09:44:04 +0200 Subject: [PATCH 094/243] rebuild for https://fedoraproject.org/wiki/Changes/php82 --- libguestfs.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libguestfs.spec b/libguestfs.spec index c3def6d..bfbd0ec 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -48,7 +48,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.49.4 -Release: 1%{?dist} +Release: 2%{?dist} License: LGPLv2+ # Build only for architectures that have a kernel @@ -1123,6 +1123,9 @@ rm ocaml/html/.gitignore %changelog +* Wed Oct 05 2022 Remi Collet - 1:1.49.4-2 +- rebuild for https://fedoraproject.org/wiki/Changes/php82 + * Mon Aug 01 2022 Richard W.M. Jones - 1:1.49.4-1 - New upstream development version 1.49.4 From 079cc475fbe2433f8e76e3fd5ec35d28601a24e1 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 11 Oct 2022 16:47:29 +0100 Subject: [PATCH 095/243] New upstream development version 1.49.5 --- libguestfs.spec | 7 +++++-- sources | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index bfbd0ec..07971cb 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -47,8 +47,8 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 -Version: 1.49.4 -Release: 2%{?dist} +Version: 1.49.5 +Release: 1%{?dist} License: LGPLv2+ # Build only for architectures that have a kernel @@ -1123,6 +1123,9 @@ rm ocaml/html/.gitignore %changelog +* Tue Oct 11 2022 Richard W.M. Jones - 1:1.49.5-1 +- New upstream development version 1.49.5 + * Wed Oct 05 2022 Remi Collet - 1:1.49.4-2 - rebuild for https://fedoraproject.org/wiki/Changes/php82 diff --git a/sources b/sources index 173b9ae..e41fd78 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (libguestfs-1.49.4.tar.gz) = 7146322cc1b8215821be20b43f86d5b023b009bb21356fb0282abf18736db36ba0a15514a300fd9bb8ba650c868e347bba6bad4cdb8c7f2b0d469c4823488e8b -SHA512 (libguestfs-1.49.4.tar.gz.sig) = d7e5cae1cee1495840b53b0404004b64d16258350f76aace474f87db0a6259577cb582d694171eea83f56fbb73bd90a9f167618e1966b9fdeb24bae004de0afc +SHA512 (libguestfs-1.49.5.tar.gz) = d3a807ae5a15f258a2e37fc232033327d822a62b1b2fc893ec87ba7bb9f75e966af80e38fba43db7f7971f987d0cec9e2f2989680f178c3f985837f38a0b7b43 +SHA512 (libguestfs-1.49.5.tar.gz.sig) = dcfe04b98db998288ba8e65af48a159f75cbad0fea6b6d4b2d07f5aa1a6e5fcb5c1d12ea167dda4170f23e487196aadc72d6ab98519bdee9e0b4669da4f9186a From 75f10447a6502df830048a8d603293aaf824823c Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 11 Oct 2022 22:03:38 +0100 Subject: [PATCH 096/243] Add workaround for openssl bug RHBZ#2133884 --- ...n-etc-crypto-policies-back-ends-file.patch | 43 +++++++++++++++++++ libguestfs.spec | 8 +++- 2 files changed, 49 insertions(+), 2 deletions(-) create mode 100644 0001-appliance-Copy-in-etc-crypto-policies-back-ends-file.patch diff --git a/0001-appliance-Copy-in-etc-crypto-policies-back-ends-file.patch b/0001-appliance-Copy-in-etc-crypto-policies-back-ends-file.patch new file mode 100644 index 0000000..3bbf62b --- /dev/null +++ b/0001-appliance-Copy-in-etc-crypto-policies-back-ends-file.patch @@ -0,0 +1,43 @@ +From d6ba398825bfdd67daf57bac0a4d8bcb281a62a8 Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Tue, 11 Oct 2022 21:48:30 +0100 +Subject: [PATCH] appliance: Copy in /etc/crypto-policies/back-ends/ files + +Downstream patched openssl in Fedora 37+ broke unless +/etc/crypto-policies/back-ends/opensslcnf.conf is present. Files in +this directory are generated by %post rules that use scripting +languages so cannot easily be created by supermin. + +Force a copy of the host files into the appliance. This is not ideal +and is hopefully a temporary fix until Fedora's openssl is fixed. + +A symptom of this problem is the error: + + Requested hash sha256 is not supported. + Failed to set pbkdf parameters. + +Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2133884 +--- + appliance/hostfiles.in | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/appliance/hostfiles.in b/appliance/hostfiles.in +index e78c79bd34..2c42a858e8 100644 +--- a/appliance/hostfiles.in ++++ b/appliance/hostfiles.in +@@ -14,6 +14,12 @@ dnl FRUGALWARE=1 For Frugalware. + dnl MAGEIA=1 For Mageia. + dnl OPENMANDRIVA=1 For OpenMandriva. + ++# Work around broken openssl in Fedora 37+ by forcibly copying in ++# these host configuration files (RHBZ#2133884). ++ifelse(REDHAT,1, ++/etc/crypto-policies/back-ends/*.config ++) ++ + /etc/ld.so.cache + /lib/lsb/* + /usr/share/augeas/lenses/*.aug +-- +2.37.0.rc2 + diff --git a/libguestfs.spec b/libguestfs.spec index 07971cb..99dc0eb 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -48,7 +48,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.49.5 -Release: 1%{?dist} +Release: 2%{?dist} License: LGPLv2+ # Build only for architectures that have a kernel @@ -82,6 +82,10 @@ Source7: libguestfs.keyring # Maintainer script which helps with handling patches. Source8: copy-patches.sh +# Workaround for openssl bug RHBZ#2133884 +# Upstream in libguestfs +Patch: 0001-appliance-Copy-in-etc-crypto-policies-back-ends-file.patch + %if 0%{patches_touch_autotools} BuildRequires: autoconf, automake, libtool, gettext-devel %endif @@ -1123,7 +1127,7 @@ rm ocaml/html/.gitignore %changelog -* Tue Oct 11 2022 Richard W.M. Jones - 1:1.49.5-1 +* Tue Oct 11 2022 Richard W.M. Jones - 1:1.49.5-2 - New upstream development version 1.49.5 * Wed Oct 05 2022 Remi Collet - 1:1.49.4-2 From ea7571f662909f7d341499f0e4aad36f9aaf7372 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 8 Nov 2022 13:07:09 +0000 Subject: [PATCH 097/243] Move libguestfs-make-fixed-appliance to main package (RHBZ#2140695) --- libguestfs.spec | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index 99dc0eb..a73bb0f 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -48,7 +48,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.49.5 -Release: 2%{?dist} +Release: 3%{?dist} License: LGPLv2+ # Build only for architectures that have a kernel @@ -323,6 +323,9 @@ Requires: coreutils Requires: grep Requires: tar +# libguestfs-make-fixed-appliance requires xz. +Requires: xz + # For qemu direct and libvirt backends. Requires: qemu-kvm-core %if !0%{?rhel} @@ -422,10 +425,6 @@ Summary: Development tools and libraries for %{name} Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release} Requires: pkgconfig -# libguestfs-make-fixed-appliance requires guestfish. -Requires: xz -Requires: %{name} = %{epoch}:%{version}-%{release} - %description devel %{name}-devel contains development tools and libraries @@ -922,6 +921,7 @@ rm ocaml/html/.gitignore %{_bindir}/virt-copy-out %{_bindir}/virt-tar-in %{_bindir}/virt-tar-out +%{_sbindir}/libguestfs-make-fixed-appliance %{_libdir}/libguestfs.so.* %{_mandir}/man1/guestfish.1* %{_mandir}/man1/guestfs-faq.1* @@ -932,6 +932,7 @@ rm ocaml/html/.gitignore %{_mandir}/man1/guestfs-security.1* %{_mandir}/man1/guestmount.1* %{_mandir}/man1/guestunmount.1* +%{_mandir}/man1/libguestfs-make-fixed-appliance.1* %{_mandir}/man1/libguestfs-test-tool.1* %{_mandir}/man1/virt-copy-in.1* %{_mandir}/man1/virt-copy-out.1* @@ -951,12 +952,10 @@ rm ocaml/html/.gitignore %doc AUTHORS HACKING TODO README %doc examples/*.c %{_libdir}/libguestfs.so -%{_sbindir}/libguestfs-make-fixed-appliance %{_mandir}/man1/guestfs-building.1* %{_mandir}/man1/guestfs-hacking.1* %{_mandir}/man1/guestfs-internals.1* %{_mandir}/man1/guestfs-testing.1* -%{_mandir}/man1/libguestfs-make-fixed-appliance.1* %{_mandir}/man3/guestfs.3* %{_mandir}/man3/guestfs-examples.3* %{_mandir}/man3/libguestfs.3* @@ -1127,6 +1126,9 @@ rm ocaml/html/.gitignore %changelog +* Tue Nov 08 2022 Richard W.M. Jones - 1:1.49.5-3 +- Move libguestfs-make-fixed-appliance to main package (RHBZ#2140695) + * Tue Oct 11 2022 Richard W.M. Jones - 1:1.49.5-2 - New upstream development version 1.49.5 From 1dfae674ee8973ca1433a6e5e25644358d325f3b Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 21 Nov 2022 17:14:41 +0000 Subject: [PATCH 098/243] New upstream development version 1.49.6 --- libguestfs.spec | 7 +++++-- sources | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index a73bb0f..969af03 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -47,8 +47,8 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 -Version: 1.49.5 -Release: 3%{?dist} +Version: 1.49.6 +Release: 1%{?dist} License: LGPLv2+ # Build only for architectures that have a kernel @@ -1126,6 +1126,9 @@ rm ocaml/html/.gitignore %changelog +* Mon Nov 21 2022 Richard W.M. Jones - 1:1.49.6-1 +- New upstream development version 1.49.6 + * Tue Nov 08 2022 Richard W.M. Jones - 1:1.49.5-3 - Move libguestfs-make-fixed-appliance to main package (RHBZ#2140695) diff --git a/sources b/sources index e41fd78..40b109a 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (libguestfs-1.49.5.tar.gz) = d3a807ae5a15f258a2e37fc232033327d822a62b1b2fc893ec87ba7bb9f75e966af80e38fba43db7f7971f987d0cec9e2f2989680f178c3f985837f38a0b7b43 -SHA512 (libguestfs-1.49.5.tar.gz.sig) = dcfe04b98db998288ba8e65af48a159f75cbad0fea6b6d4b2d07f5aa1a6e5fcb5c1d12ea167dda4170f23e487196aadc72d6ab98519bdee9e0b4669da4f9186a +SHA512 (libguestfs-1.49.6.tar.gz) = e4e53264b2612dcb0a9dca2146738927282e6617f9a26e8325877e762c895259b41fe7c6445e824d32533b705eb4d670102dd1aabf87353106178a5836b6fdd3 +SHA512 (libguestfs-1.49.6.tar.gz.sig) = da0ef291b7ea7a607fa92b009baab3f14089beb932db18214431807218598fdbef8d104c72348e81f53ade11d3d1a3bedc6d7cfbf04d3f59f12db6b23be6c23b From 8f8c5740d566f8f4dc013a78cd333bad618bbd89 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 28 Nov 2022 12:14:17 +0000 Subject: [PATCH 099/243] New upstream development version 1.49.7 --- libguestfs.spec | 5 ++++- sources | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index 969af03..6467e6e 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -47,7 +47,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 -Version: 1.49.6 +Version: 1.49.7 Release: 1%{?dist} License: LGPLv2+ @@ -1126,6 +1126,9 @@ rm ocaml/html/.gitignore %changelog +* Mon Nov 28 2022 Richard W.M. Jones - 1:1.49.7-1 +- New upstream development version 1.49.7 + * Mon Nov 21 2022 Richard W.M. Jones - 1:1.49.6-1 - New upstream development version 1.49.6 diff --git a/sources b/sources index 40b109a..49a4e1d 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (libguestfs-1.49.6.tar.gz) = e4e53264b2612dcb0a9dca2146738927282e6617f9a26e8325877e762c895259b41fe7c6445e824d32533b705eb4d670102dd1aabf87353106178a5836b6fdd3 -SHA512 (libguestfs-1.49.6.tar.gz.sig) = da0ef291b7ea7a607fa92b009baab3f14089beb932db18214431807218598fdbef8d104c72348e81f53ade11d3d1a3bedc6d7cfbf04d3f59f12db6b23be6c23b +SHA512 (libguestfs-1.49.7.tar.gz) = b8b1f69db431c1fe1892edb4e1391fae991aeb567dbe418ac930ff5643b50ea6733c83b4d82841821061b61cfcf55de76e32f40e17c0bab6c2ceb8083a223f5c +SHA512 (libguestfs-1.49.7.tar.gz.sig) = 80e9f7137783cc12f598d150c68dd27e1bfc0fb95810436529ad61eb621865b378d84c346e72a159f984bae405ea176a41682fa2e3ee9065fb8cae0717233452 From 8f14a2c35468160cf9e6c7cbab6888662dca42e1 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sat, 10 Dec 2022 12:36:51 +0000 Subject: [PATCH 100/243] New upstream development version 1.49.8 --- ...n-etc-crypto-policies-back-ends-file.patch | 43 ------------------- libguestfs.spec | 9 ++-- sources | 4 +- 3 files changed, 6 insertions(+), 50 deletions(-) delete mode 100644 0001-appliance-Copy-in-etc-crypto-policies-back-ends-file.patch diff --git a/0001-appliance-Copy-in-etc-crypto-policies-back-ends-file.patch b/0001-appliance-Copy-in-etc-crypto-policies-back-ends-file.patch deleted file mode 100644 index 3bbf62b..0000000 --- a/0001-appliance-Copy-in-etc-crypto-policies-back-ends-file.patch +++ /dev/null @@ -1,43 +0,0 @@ -From d6ba398825bfdd67daf57bac0a4d8bcb281a62a8 Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Tue, 11 Oct 2022 21:48:30 +0100 -Subject: [PATCH] appliance: Copy in /etc/crypto-policies/back-ends/ files - -Downstream patched openssl in Fedora 37+ broke unless -/etc/crypto-policies/back-ends/opensslcnf.conf is present. Files in -this directory are generated by %post rules that use scripting -languages so cannot easily be created by supermin. - -Force a copy of the host files into the appliance. This is not ideal -and is hopefully a temporary fix until Fedora's openssl is fixed. - -A symptom of this problem is the error: - - Requested hash sha256 is not supported. - Failed to set pbkdf parameters. - -Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2133884 ---- - appliance/hostfiles.in | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git a/appliance/hostfiles.in b/appliance/hostfiles.in -index e78c79bd34..2c42a858e8 100644 ---- a/appliance/hostfiles.in -+++ b/appliance/hostfiles.in -@@ -14,6 +14,12 @@ dnl FRUGALWARE=1 For Frugalware. - dnl MAGEIA=1 For Mageia. - dnl OPENMANDRIVA=1 For OpenMandriva. - -+# Work around broken openssl in Fedora 37+ by forcibly copying in -+# these host configuration files (RHBZ#2133884). -+ifelse(REDHAT,1, -+/etc/crypto-policies/back-ends/*.config -+) -+ - /etc/ld.so.cache - /lib/lsb/* - /usr/share/augeas/lenses/*.aug --- -2.37.0.rc2 - diff --git a/libguestfs.spec b/libguestfs.spec index 6467e6e..24a864b 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -47,7 +47,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 -Version: 1.49.7 +Version: 1.49.8 Release: 1%{?dist} License: LGPLv2+ @@ -82,10 +82,6 @@ Source7: libguestfs.keyring # Maintainer script which helps with handling patches. Source8: copy-patches.sh -# Workaround for openssl bug RHBZ#2133884 -# Upstream in libguestfs -Patch: 0001-appliance-Copy-in-etc-crypto-policies-back-ends-file.patch - %if 0%{patches_touch_autotools} BuildRequires: autoconf, automake, libtool, gettext-devel %endif @@ -1126,6 +1122,9 @@ rm ocaml/html/.gitignore %changelog +* Sat Dec 10 2022 Richard W.M. Jones - 1:1.49.8-1 +- New upstream development version 1.49.8 + * Mon Nov 28 2022 Richard W.M. Jones - 1:1.49.7-1 - New upstream development version 1.49.7 diff --git a/sources b/sources index 49a4e1d..ec90b21 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (libguestfs-1.49.7.tar.gz) = b8b1f69db431c1fe1892edb4e1391fae991aeb567dbe418ac930ff5643b50ea6733c83b4d82841821061b61cfcf55de76e32f40e17c0bab6c2ceb8083a223f5c -SHA512 (libguestfs-1.49.7.tar.gz.sig) = 80e9f7137783cc12f598d150c68dd27e1bfc0fb95810436529ad61eb621865b378d84c346e72a159f984bae405ea176a41682fa2e3ee9065fb8cae0717233452 +SHA512 (libguestfs-1.49.8.tar.gz) = d8ea933780b70b482136ee1573cc30fdf04a519a62dd22980f0913c2ed0b6be53627cbc19a28c71189c3a5b985d5876fbea1399da5a674cf34f542b9e4ac5451 +SHA512 (libguestfs-1.49.8.tar.gz.sig) = 81fbfc765b8df830fbdb00c22f35505a3fd18fc76ded2b442d642b257a591ab43846f43d09129e2dd34a60a0761e9246216e9cf6731de0be9739471263b1e08f From a64cbbf92a3f91c77c57d1a0239f06cd7b5f9631 Mon Sep 17 00:00:00 2001 From: Mamoru TASAKA Date: Wed, 4 Jan 2023 14:08:53 +0900 Subject: [PATCH 101/243] Rebuild for https://fedoraproject.org/wiki/Changes/Ruby_3.2 --- libguestfs.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libguestfs.spec b/libguestfs.spec index 24a864b..ac73293 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -48,7 +48,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.49.8 -Release: 1%{?dist} +Release: 2%{?dist} License: LGPLv2+ # Build only for architectures that have a kernel @@ -1122,6 +1122,9 @@ rm ocaml/html/.gitignore %changelog +* Wed Jan 04 2023 Mamoru TASAKA - 1:1.49.8-2 +- Rebuild for https://fedoraproject.org/wiki/Changes/Ruby_3.2 + * Sat Dec 10 2022 Richard W.M. Jones - 1:1.49.8-1 - New upstream development version 1.49.8 From 6140dbc2f092bbc65bfb83297682cb85e7e1f5ec Mon Sep 17 00:00:00 2001 From: Jitka Plesnikova Date: Fri, 13 Jan 2023 09:44:02 +0100 Subject: [PATCH 102/243] Remove perl(MODULE_COMPAT), it will be replaced by generators --- libguestfs.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/libguestfs.spec b/libguestfs.spec index ac73293..f6b19f1 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -589,7 +589,6 @@ required to use the OCaml bindings for %{name}. %package -n perl-Sys-Guestfs Summary: Perl bindings for %{name} (Sys::Guestfs) Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release} -Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) %description -n perl-Sys-Guestfs From 68f61c4dfcd6a4fe30e4c2ad2412f6531e761310 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 19 Jan 2023 16:31:02 +0000 Subject: [PATCH 103/243] Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- libguestfs.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libguestfs.spec b/libguestfs.spec index f6b19f1..6d8c521 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -48,7 +48,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.49.8 -Release: 2%{?dist} +Release: 3%{?dist} License: LGPLv2+ # Build only for architectures that have a kernel @@ -1121,6 +1121,9 @@ rm ocaml/html/.gitignore %changelog +* Thu Jan 19 2023 Fedora Release Engineering - 1:1.49.8-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + * Wed Jan 04 2023 Mamoru TASAKA - 1:1.49.8-2 - Rebuild for https://fedoraproject.org/wiki/Changes/Ruby_3.2 From 06dd88ce064137a4e35f17f4cffd0aed93e67568 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 20 Jan 2023 08:33:06 +0000 Subject: [PATCH 104/243] New upstream development version 1.49.9 +BR ocaml-augeas-devel --- libguestfs.spec | 9 +++++++-- sources | 4 ++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index 6d8c521..f1fab23 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -47,8 +47,8 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 -Version: 1.49.8 -Release: 3%{?dist} +Version: 1.49.9 +Release: 1%{?dist} License: LGPLv2+ # Build only for architectures that have a kernel @@ -99,6 +99,7 @@ BuildRequires: perl(Pod::Man) BuildRequires: /usr/bin/pod2text BuildRequires: po4a BuildRequires: augeas-devel >= 1.7.0 +BuildRequires: ocaml-augeas-devel >= 0.6 BuildRequires: readline-devel BuildRequires: xorriso BuildRequires: libxml2-devel @@ -1121,6 +1122,10 @@ rm ocaml/html/.gitignore %changelog +* Fri Jan 20 2023 Richard W.M. Jones - 1:1.49.9-1 +- New upstream development version 1.49.9 +- +BR ocaml-augeas-devel + * Thu Jan 19 2023 Fedora Release Engineering - 1:1.49.8-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild diff --git a/sources b/sources index ec90b21..67663cd 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (libguestfs-1.49.8.tar.gz) = d8ea933780b70b482136ee1573cc30fdf04a519a62dd22980f0913c2ed0b6be53627cbc19a28c71189c3a5b985d5876fbea1399da5a674cf34f542b9e4ac5451 -SHA512 (libguestfs-1.49.8.tar.gz.sig) = 81fbfc765b8df830fbdb00c22f35505a3fd18fc76ded2b442d642b257a591ab43846f43d09129e2dd34a60a0761e9246216e9cf6731de0be9739471263b1e08f +SHA512 (libguestfs-1.49.9.tar.gz) = 7c23907ee817c7bba442994368f0dbbec10d311b15d1cfedfbcc898d47ace2eb278e287cfde472cab3b1f15e05cd0efe59348eff4708ec468e0251f4f7f05c9a +SHA512 (libguestfs-1.49.9.tar.gz.sig) = 4a5a73d578ab3ecfc5dda98e88de2d2269ffb36f616cdaff9a3949ef26e6b44cd98c69248431fc7b17628f4da356e1e373ae3b14f81710026c3abc946735e04e From f8b1780c7d5d0efbbe06113df8586f164c6d2f1d Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 24 Jan 2023 18:08:01 +0000 Subject: [PATCH 105/243] Rebuild OCaml packages for F38 --- libguestfs.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libguestfs.spec b/libguestfs.spec index f1fab23..aa83e05 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -48,7 +48,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.49.9 -Release: 1%{?dist} +Release: 2%{?dist} License: LGPLv2+ # Build only for architectures that have a kernel @@ -1122,6 +1122,9 @@ rm ocaml/html/.gitignore %changelog +* Tue Jan 24 2023 Richard W.M. Jones - 1:1.49.9-2 +- Rebuild OCaml packages for F38 + * Fri Jan 20 2023 Richard W.M. Jones - 1:1.49.9-1 - New upstream development version 1.49.9 - +BR ocaml-augeas-devel From c3704e0200f2101b7784aa02f1b6c50f9d6c85e5 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 7 Feb 2023 12:08:37 +0000 Subject: [PATCH 106/243] New upstream stable branch 1.50.0 --- libguestfs.spec | 9 ++++++--- sources | 4 ++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index aa83e05..01d14f9 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -36,7 +36,7 @@ %endif # The source directory. -%global source_directory 1.49-development +%global source_directory 1.50-stable # Filter perl provides. %{?perl_default_filter} @@ -47,8 +47,8 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 -Version: 1.49.9 -Release: 2%{?dist} +Version: 1.50.0 +Release: 1%{?dist} License: LGPLv2+ # Build only for architectures that have a kernel @@ -1122,6 +1122,9 @@ rm ocaml/html/.gitignore %changelog +* Tue Feb 07 2023 Richard W.M. Jones - 1:1.50.0-1 +- New upstream stable branch 1.50.0 + * Tue Jan 24 2023 Richard W.M. Jones - 1:1.49.9-2 - Rebuild OCaml packages for F38 diff --git a/sources b/sources index 67663cd..8789ca0 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (libguestfs-1.49.9.tar.gz) = 7c23907ee817c7bba442994368f0dbbec10d311b15d1cfedfbcc898d47ace2eb278e287cfde472cab3b1f15e05cd0efe59348eff4708ec468e0251f4f7f05c9a -SHA512 (libguestfs-1.49.9.tar.gz.sig) = 4a5a73d578ab3ecfc5dda98e88de2d2269ffb36f616cdaff9a3949ef26e6b44cd98c69248431fc7b17628f4da356e1e373ae3b14f81710026c3abc946735e04e +SHA512 (libguestfs-1.50.0.tar.gz) = b6bc0cdec131b7a5173c4b003054b4eb2b6d99a44226ac6d35eb3cc67b6d34ab251760490ade9a7ce3e0a5ed1304aa3c3a8760aa135fd12eaa2c9463909bf10b +SHA512 (libguestfs-1.50.0.tar.gz.sig) = a1df59610a7268740d28078f394df967ed12a6cd192cfaf683b16bbc075e8b49dc50e4e088ae3819335d95308736b8fc61b6ad439cebef7baf20363792c8e246 From 19312656d8a358dbd6d706c8b407d392d14db3f8 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 7 Feb 2023 13:31:39 +0000 Subject: [PATCH 107/243] Remove libguestfs-dib Removed upstream in libguestfs >= 1.51.1 --- libguestfs.spec | 40 ---------------------------------------- 1 file changed, 40 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index 01d14f9..bc66151 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -204,10 +204,6 @@ BuildRequires: clevis-luks BuildRequires: coreutils BuildRequires: cpio BuildRequires: cryptsetup -%if !0%{?rhel} -BuildRequires: curl -BuildRequires: debootstrap -%endif BuildRequires: dhclient BuildRequires: diffutils BuildRequires: dosfstools @@ -231,9 +227,6 @@ BuildRequires: iproute BuildRequires: iputils BuildRequires: kernel BuildRequires: kmod -%if !0%{?rhel} -BuildRequires: kpartx -%endif BuildRequires: less BuildRequires: libcap %if !0%{?rhel} @@ -256,7 +249,6 @@ BuildRequires: pcre2 BuildRequires: policycoreutils BuildRequires: procps BuildRequires: psmisc -BuildRequires: qemu-img BuildRequires: rpm-libs BuildRequires: rsync BuildRequires: scrub @@ -274,9 +266,6 @@ BuildRequires: tar BuildRequires: udev BuildRequires: util-linux BuildRequires: vim-minimal -%if !0%{?rhel} -BuildRequires: which -%endif BuildRequires: xfsprogs BuildRequires: xz BuildRequires: yajl @@ -428,17 +417,6 @@ Requires: pkgconfig for %{name}. -%if !0%{?rhel} -%package dib -Summary: Additional tools for virt-dib -License: LGPLv2+ - -%description dib -This adds extra packages needed by virt-dib to %{name}. You should -normally install the virt-dib package which depends on this one. -%endif - - %if !0%{?rhel} %package forensics Summary: Filesystem forensics support for %{name} @@ -838,19 +816,6 @@ function move_to echo "$1" >> "$2" } -%if !0%{?rhel} -move_to curl zz-packages-dib -move_to debootstrap zz-packages-dib -move_to kpartx zz-packages-dib -move_to qemu-img zz-packages-dib -move_to which zz-packages-dib -%else -remove curl -remove debootstrap -remove kpartx -remove qemu-img -remove which -%endif %if !0%{?rhel} move_to sleuthkit zz-packages-forensics move_to gfs2-utils zz-packages-gfs2 @@ -959,11 +924,6 @@ rm ocaml/html/.gitignore %{_libdir}/pkgconfig/libguestfs.pc -%if !0%{?rhel} -%files dib -%{_libdir}/guestfs/supermin.d/zz-packages-dib -%endif - %if !0%{?rhel} %files forensics %{_libdir}/guestfs/supermin.d/zz-packages-forensics From 5454a2879704ab68ea7b445b935baae7791dcbac Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 10 Feb 2023 11:12:48 +0000 Subject: [PATCH 108/243] New upstream development version 1.51.1 Remove virt-dib --- libguestfs.spec | 8 ++++++-- sources | 4 ++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index bc66151..4908903 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -36,7 +36,7 @@ %endif # The source directory. -%global source_directory 1.50-stable +%global source_directory 1.51-development # Filter perl provides. %{?perl_default_filter} @@ -47,7 +47,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 -Version: 1.50.0 +Version: 1.51.1 Release: 1%{?dist} License: LGPLv2+ @@ -1082,6 +1082,10 @@ rm ocaml/html/.gitignore %changelog +* Fri Feb 10 2023 Richard W.M. Jones - 1:1.51.1-1 +- New upstream development version 1.51.1 +- Remove virt-dib + * Tue Feb 07 2023 Richard W.M. Jones - 1:1.50.0-1 - New upstream stable branch 1.50.0 diff --git a/sources b/sources index 8789ca0..8dcac63 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (libguestfs-1.50.0.tar.gz) = b6bc0cdec131b7a5173c4b003054b4eb2b6d99a44226ac6d35eb3cc67b6d34ab251760490ade9a7ce3e0a5ed1304aa3c3a8760aa135fd12eaa2c9463909bf10b -SHA512 (libguestfs-1.50.0.tar.gz.sig) = a1df59610a7268740d28078f394df967ed12a6cd192cfaf683b16bbc075e8b49dc50e4e088ae3819335d95308736b8fc61b6ad439cebef7baf20363792c8e246 +SHA512 (libguestfs-1.51.1.tar.gz) = 30d0d2701acf3952d7f446da3d15f1800112aced884c652918b0d8a6e7a0790b028e1f95873a2b38102155ee225de10fabd92466ae000f777dbe07ef679624dc +SHA512 (libguestfs-1.51.1.tar.gz.sig) = 127d85a1c611048af7d0abda13edc0e059923d3b2435441beaa8d916612daece1d83a0b65a9f3c87931c5760f73f576437d0bb5e1cbc7dbc404a5f231edf1d45 From fd4b4a4b62558bc0a9fc9218b1bd5ae067137234 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 21 Feb 2023 22:48:22 +0000 Subject: [PATCH 109/243] New upstream development version 1.51.2 --- libguestfs.spec | 5 ++++- sources | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index 4908903..e246623 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -47,7 +47,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 -Version: 1.51.1 +Version: 1.51.2 Release: 1%{?dist} License: LGPLv2+ @@ -1082,6 +1082,9 @@ rm ocaml/html/.gitignore %changelog +* Tue Feb 21 2023 Richard W.M. Jones - 1:1.51.2-1 +- New upstream development version 1.51.2 + * Fri Feb 10 2023 Richard W.M. Jones - 1:1.51.1-1 - New upstream development version 1.51.1 - Remove virt-dib diff --git a/sources b/sources index 8dcac63..bc7e8b3 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (libguestfs-1.51.1.tar.gz) = 30d0d2701acf3952d7f446da3d15f1800112aced884c652918b0d8a6e7a0790b028e1f95873a2b38102155ee225de10fabd92466ae000f777dbe07ef679624dc -SHA512 (libguestfs-1.51.1.tar.gz.sig) = 127d85a1c611048af7d0abda13edc0e059923d3b2435441beaa8d916612daece1d83a0b65a9f3c87931c5760f73f576437d0bb5e1cbc7dbc404a5f231edf1d45 +SHA512 (libguestfs-1.51.2.tar.gz) = 709e7acbb643d709df1ba5f0487e5ae5077bba646d689e5131eac0b4c2b753108b8593ea7af90c2bdcb650af60499d5ad5b7ab04ab6a6654113454cd615980aa +SHA512 (libguestfs-1.51.2.tar.gz.sig) = 44c10f14be837ce4ed50a306969f6d293f07e1d3ded0cd92271c50be6268bb59f2b6a5b9dc096ce72922bbb6d5b68f8730730991ebec39890d025f271f5022b4 From cb2b302101d2bd46559b7ad7f082ff1b72e41254 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 19 Apr 2023 13:50:27 +0100 Subject: [PATCH 110/243] New upstream development version 1.51.3 --- libguestfs.spec | 5 ++++- sources | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index e246623..e9807bb 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -47,7 +47,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 -Version: 1.51.2 +Version: 1.51.3 Release: 1%{?dist} License: LGPLv2+ @@ -1082,6 +1082,9 @@ rm ocaml/html/.gitignore %changelog +* Wed Apr 19 2023 Richard W.M. Jones - 1:1.51.3-1 +- New upstream development version 1.51.3 + * Tue Feb 21 2023 Richard W.M. Jones - 1:1.51.2-1 - New upstream development version 1.51.2 diff --git a/sources b/sources index bc7e8b3..0a91223 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (libguestfs-1.51.2.tar.gz) = 709e7acbb643d709df1ba5f0487e5ae5077bba646d689e5131eac0b4c2b753108b8593ea7af90c2bdcb650af60499d5ad5b7ab04ab6a6654113454cd615980aa -SHA512 (libguestfs-1.51.2.tar.gz.sig) = 44c10f14be837ce4ed50a306969f6d293f07e1d3ded0cd92271c50be6268bb59f2b6a5b9dc096ce72922bbb6d5b68f8730730991ebec39890d025f271f5022b4 +SHA512 (libguestfs-1.51.3.tar.gz) = a72b958cf6354c8e6aa957610f1294dc153485d72e5e81bf88950bae72a7016d560973998f219a802313e0011888a07bab1b2184b806cfa56527fbe84ef88e52 +SHA512 (libguestfs-1.51.3.tar.gz.sig) = b0ab45a4545262a0b20b8b19a9bc0f5f5befb050305f307f496c7195f2cdff4240689deb18f7eda8baffda0fb3a73f5e9a8bfbd936cff8f891b93cadf6c431c4 From f1cce8400e6d61af5881924aeec371e341255148 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 19 May 2023 13:04:09 +0100 Subject: [PATCH 111/243] Rebuild against librpm 10 --- libguestfs.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libguestfs.spec b/libguestfs.spec index e9807bb..e58ee9e 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -48,7 +48,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.51.3 -Release: 1%{?dist} +Release: 2%{?dist} License: LGPLv2+ # Build only for architectures that have a kernel @@ -1082,6 +1082,9 @@ rm ocaml/html/.gitignore %changelog +* Fri May 19 2023 Richard W.M. Jones - 1:1.51.3-2 +- Rebuild against librpm 10 + * Wed Apr 19 2023 Richard W.M. Jones - 1:1.51.3-1 - New upstream development version 1.51.3 From 9f346950b80b27ed35d9519cbcca81cb3b5c3673 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 5 Jun 2023 14:25:30 +0100 Subject: [PATCH 112/243] Migrated to SPDX license --- libguestfs.spec | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index e58ee9e..6ee17c2 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -48,8 +48,8 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.51.3 -Release: 2%{?dist} -License: LGPLv2+ +Release: 3%{?dist} +License: LGPL-2.1-or-later # Build only for architectures that have a kernel ExclusiveArch: %{kernel_arches} @@ -399,6 +399,7 @@ Language bindings: %package appliance Summary: Appliance for %{name} +License: GPL-2.0-or-later AND LGPL-2.1-or-later Requires: supermin >= 5.1.18 @@ -420,7 +421,7 @@ for %{name}. %if !0%{?rhel} %package forensics Summary: Filesystem forensics support for %{name} -License: LGPLv2+ +License: GPL-2.0-or-later Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release} %description forensics @@ -432,7 +433,7 @@ want to forensically analyze disk images using The Sleuth Kit. %if !0%{?rhel} %package gfs2 Summary: GFS2 support for %{name} -License: LGPLv2+ +License: GPL-2.0-or-later Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release} %description gfs2 @@ -445,7 +446,7 @@ disk images containing GFS2. %ifnarch ppc %package hfsplus Summary: HFS+ support for %{name} -License: LGPLv2+ +License: GPL-2.0-or-later Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release} %description hfsplus @@ -457,7 +458,7 @@ disk images containing HFS+ / Mac OS Extended filesystems. %package rescue Summary: virt-rescue shell -License: LGPLv2+ +License: GPL-2.0-or-later Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release} %description rescue @@ -468,7 +469,7 @@ network utilities, editors and debugging utilities. %package rsync Summary: rsync support for %{name} -License: LGPLv2+ +License: GPL-2.0-or-later Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release} %description rsync @@ -479,7 +480,7 @@ rsync to upload or download files into disk images. %if !0%{?rhel} %package ufs Summary: UFS (BSD) support for %{name} -License: LGPLv2+ +License: GPL-2.0-or-later Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release} %description ufs @@ -490,7 +491,7 @@ disk images containing UFS (BSD filesystems). %package xfs Summary: XFS support for %{name} -License: LGPLv2+ +License: GPL-2.0-or-later Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release} %description xfs @@ -502,7 +503,7 @@ disk images containing XFS. %ifnarch %{arm} aarch64 s390 s390x riscv64 %package zfs Summary: ZFS support for %{name} -License: LGPLv2+ +License: GPL-2.0-or-later Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release} %description zfs @@ -514,7 +515,7 @@ disk images containing ZFS. %package inspect-icons Summary: Additional dependencies for inspecting guest icons -License: LGPLv2+ +License: LGPL-2.1-or-later BuildArch: noarch Requires: %{name} = %{epoch}:%{version}-%{release} @@ -534,6 +535,7 @@ having to depend on Perl. See https://bugzilla.redhat.com/1194158 %package bash-completion Summary: Bash tab-completion scripts for %{name} tools +License: GPL-2.0-or-later BuildArch: noarch Requires: bash-completion >= 2.0 @@ -664,6 +666,7 @@ golang-%{name} contains Go language bindings for %{name}. %package man-pages-ja Summary: Japanese (ja) man pages for %{name} +License: GPL-2.0-or-later BuildArch: noarch Requires: %{name} = %{epoch}:%{version}-%{release} @@ -674,6 +677,7 @@ for %{name}. %package man-pages-uk Summary: Ukrainian (uk) man pages for %{name} +License: GPL-2.0-or-later BuildArch: noarch Requires: %{name} = %{epoch}:%{version}-%{release} @@ -1082,6 +1086,9 @@ rm ocaml/html/.gitignore %changelog +* Mon Jun 05 2023 Richard W.M. Jones - 1:1.51.3-3 +- Migrated to SPDX license + * Fri May 19 2023 Richard W.M. Jones - 1:1.51.3-2 - Rebuild against librpm 10 From 3618f7a33c572b782e240af673582737229fb217 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Thu, 15 Jun 2023 15:34:57 +0200 Subject: [PATCH 113/243] Rebuilt for Python 3.12 --- libguestfs.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libguestfs.spec b/libguestfs.spec index 6ee17c2..fdf5b8d 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -48,7 +48,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.51.3 -Release: 3%{?dist} +Release: 4%{?dist} License: LGPL-2.1-or-later # Build only for architectures that have a kernel @@ -1086,6 +1086,9 @@ rm ocaml/html/.gitignore %changelog +* Thu Jun 15 2023 Python Maint - 1:1.51.3-4 +- Rebuilt for Python 3.12 + * Mon Jun 05 2023 Richard W.M. Jones - 1:1.51.3-3 - Migrated to SPDX license From 191ba1199e54ba050c807794231c71f62258f7cf Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 27 Jun 2023 16:21:42 +0100 Subject: [PATCH 114/243] New upstream development version 1.51.4 --- libguestfs.spec | 7 +++++-- sources | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index fdf5b8d..3ec0279 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -47,8 +47,8 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 -Version: 1.51.3 -Release: 4%{?dist} +Version: 1.51.4 +Release: 1%{?dist} License: LGPL-2.1-or-later # Build only for architectures that have a kernel @@ -1086,6 +1086,9 @@ rm ocaml/html/.gitignore %changelog +* Tue Jun 27 2023 Richard W.M. Jones - 1:1.51.4-1 +- New upstream development version 1.51.4 + * Thu Jun 15 2023 Python Maint - 1:1.51.3-4 - Rebuilt for Python 3.12 diff --git a/sources b/sources index 0a91223..39005bd 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (libguestfs-1.51.3.tar.gz) = a72b958cf6354c8e6aa957610f1294dc153485d72e5e81bf88950bae72a7016d560973998f219a802313e0011888a07bab1b2184b806cfa56527fbe84ef88e52 -SHA512 (libguestfs-1.51.3.tar.gz.sig) = b0ab45a4545262a0b20b8b19a9bc0f5f5befb050305f307f496c7195f2cdff4240689deb18f7eda8baffda0fb3a73f5e9a8bfbd936cff8f891b93cadf6c431c4 +SHA512 (libguestfs-1.51.4.tar.gz) = 7f944098972b3185cb25afd060dd2af110bd8827df7d1175c4545727bd80f41b8b90c95c3bc7928efbd9cdc1b163fc41665fc8adf066f86be7ab367d04ad666c +SHA512 (libguestfs-1.51.4.tar.gz.sig) = f0092de438b41cb39928eb0c6016fd904129179360f68dd0ddf41c9736acadda42477792bda2449fafe910cd8a3b47fe63bce6573636b1f2caf96d9684a965b7 From 5fe1618c69b3937777f54b76d0e40f0b0bfb9fb1 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Tue, 27 Jun 2023 20:14:42 +0200 Subject: [PATCH 115/243] Rebuilt for Python 3.12 --- libguestfs.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libguestfs.spec b/libguestfs.spec index 3ec0279..8705dcb 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -48,7 +48,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.51.4 -Release: 1%{?dist} +Release: 2%{?dist} License: LGPL-2.1-or-later # Build only for architectures that have a kernel @@ -1086,6 +1086,9 @@ rm ocaml/html/.gitignore %changelog +* Tue Jun 27 2023 Python Maint - 1:1.51.4-2 +- Rebuilt for Python 3.12 + * Tue Jun 27 2023 Richard W.M. Jones - 1:1.51.4-1 - New upstream development version 1.51.4 From dd756afd600c89f8015c8043d6ea82aa91929a49 Mon Sep 17 00:00:00 2001 From: Jerry James Date: Mon, 10 Jul 2023 22:30:18 -0600 Subject: [PATCH 116/243] OCaml 5.0.0 rebuild --- libguestfs.spec | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index 8705dcb..4997794 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -1,4 +1,3 @@ -%undefine _package_note_flags # Architectures on which golang works. #% global golang_arches aarch64 % {arm} % {ix86} x86_64 # In theory the above, in practice golang is so often broken that @@ -48,7 +47,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.51.4 -Release: 2%{?dist} +Release: 3%{?dist} License: LGPL-2.1-or-later # Build only for architectures that have a kernel @@ -1086,6 +1085,9 @@ rm ocaml/html/.gitignore %changelog +* Mon Jul 10 2023 Jerry James - 1:1.51.4-3 +- OCaml 5.0.0 rebuild + * Tue Jun 27 2023 Python Maint - 1:1.51.4-2 - Rebuilt for Python 3.12 From e1d896a8a1e5f9504cbe940754658ddf0b1532c7 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 11 Jul 2023 11:36:26 +0100 Subject: [PATCH 117/243] ExcludeArch i686 (https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/SPML7CUBSZNI36NLXGVHEG7DNHU3EWOJ/) --- libguestfs.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libguestfs.spec b/libguestfs.spec index 4997794..f69dd61 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -1,3 +1,6 @@ +# OCaml packages not built on i686 since OCaml 5 / Fedora 39. +ExcludeArch: %{ix86} + # Architectures on which golang works. #% global golang_arches aarch64 % {arm} % {ix86} x86_64 # In theory the above, in practice golang is so often broken that From 1ebe4be0204be23ee7e475fac2c86d773fbf76e4 Mon Sep 17 00:00:00 2001 From: Jitka Plesnikova Date: Tue, 11 Jul 2023 15:33:40 +0200 Subject: [PATCH 118/243] Perl 5.38 rebuild --- libguestfs.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libguestfs.spec b/libguestfs.spec index f69dd61..41bdc23 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -50,7 +50,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.51.4 -Release: 3%{?dist} +Release: 4%{?dist} License: LGPL-2.1-or-later # Build only for architectures that have a kernel @@ -1088,6 +1088,9 @@ rm ocaml/html/.gitignore %changelog +* Tue Jul 11 2023 Jitka Plesnikova - 1:1.51.4-4 +- Perl 5.38 rebuild + * Mon Jul 10 2023 Jerry James - 1:1.51.4-3 - OCaml 5.0.0 rebuild From f3d71cb4e8f862cce86452f4c02d07d95c9dfe7a Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 12 Jul 2023 00:17:44 +0100 Subject: [PATCH 119/243] OCaml 5.0 rebuild for Fedora 39 --- libguestfs.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libguestfs.spec b/libguestfs.spec index 41bdc23..2ef0976 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -50,7 +50,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.51.4 -Release: 4%{?dist} +Release: 5%{?dist} License: LGPL-2.1-or-later # Build only for architectures that have a kernel @@ -1088,6 +1088,9 @@ rm ocaml/html/.gitignore %changelog +* Tue Jul 11 2023 Richard W.M. Jones - 1:1.51.4-5 +- OCaml 5.0 rebuild for Fedora 39 + * Tue Jul 11 2023 Jitka Plesnikova - 1:1.51.4-4 - Perl 5.38 rebuild From 5e7e03448a306773612007b0a9756e10486135a5 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 12 Jul 2023 12:20:51 +0100 Subject: [PATCH 120/243] Fix bytecode platforms RPM build warnings: File not found: /builddir/build/BUILDROOT/libguestfs-1.51.4-5.fc39.ppc64le/usr/lib64/ocaml/guestfs/*.cmxa File not found: /builddir/build/BUILDROOT/libguestfs-1.51.4-5.fc39.ppc64le/usr/lib64/ocaml/guestfs/*.cmx RPM build errors: File not found: /builddir/build/BUILDROOT/libguestfs-1.51.4-5.fc39.ppc64le/usr/lib64/ocaml/guestfs/*.cmxa File not found: /builddir/build/BUILDROOT/libguestfs-1.51.4-5.fc39.ppc64le/usr/lib64/ocaml/guestfs/*.cmx --- libguestfs.spec | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libguestfs.spec b/libguestfs.spec index 2ef0976..fca4d53 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -991,8 +991,10 @@ rm ocaml/html/.gitignore %files -n ocaml-%{name} %{_libdir}/ocaml/guestfs %exclude %{_libdir}/ocaml/guestfs/*.a +%ifarch %{ocaml_native_compiler} %exclude %{_libdir}/ocaml/guestfs/*.cmxa %exclude %{_libdir}/ocaml/guestfs/*.cmx +%endif %exclude %{_libdir}/ocaml/guestfs/*.mli %{_libdir}/ocaml/stublibs/dllmlguestfs.so %{_libdir}/ocaml/stublibs/dllmlguestfs.so.owner @@ -1001,8 +1003,10 @@ rm ocaml/html/.gitignore %files -n ocaml-%{name}-devel %doc ocaml/examples/*.ml ocaml/html %{_libdir}/ocaml/guestfs/*.a +%ifarch %{ocaml_native_compiler} %{_libdir}/ocaml/guestfs/*.cmxa %{_libdir}/ocaml/guestfs/*.cmx +%endif %{_libdir}/ocaml/guestfs/*.mli %{_mandir}/man3/guestfs-ocaml.3* From 5370766302b2c47c763ffe6b727a33216ae63527 Mon Sep 17 00:00:00 2001 From: Jitka Plesnikova Date: Thu, 13 Jul 2023 08:07:35 +0200 Subject: [PATCH 121/243] Perl 5.38 re-rebuild updated packages --- libguestfs.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libguestfs.spec b/libguestfs.spec index fca4d53..2c62792 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -50,7 +50,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.51.4 -Release: 5%{?dist} +Release: 6%{?dist} License: LGPL-2.1-or-later # Build only for architectures that have a kernel @@ -1092,6 +1092,9 @@ rm ocaml/html/.gitignore %changelog +* Thu Jul 13 2023 Jitka Plesnikova - 1:1.51.4-6 +- Perl 5.38 re-rebuild updated packages + * Tue Jul 11 2023 Richard W.M. Jones - 1:1.51.4-5 - OCaml 5.0 rebuild for Fedora 39 From e2d237c476b27ce24ca73e5a4213fd1eb326f24f Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 12 Jul 2023 22:43:33 +0100 Subject: [PATCH 122/243] Bump and rebuild against supermin-5.3.3-13.fc39 --- libguestfs.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libguestfs.spec b/libguestfs.spec index 2c62792..b111ae5 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -50,7 +50,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.51.4 -Release: 6%{?dist} +Release: 7%{?dist} License: LGPL-2.1-or-later # Build only for architectures that have a kernel @@ -1092,6 +1092,9 @@ rm ocaml/html/.gitignore %changelog +* Thu Jul 13 2023 Richard W.M. Jones - 1:1.51.4-7 +- Bump and rebuild against supermin-5.3.3-13.fc39 + * Thu Jul 13 2023 Jitka Plesnikova - 1:1.51.4-6 - Perl 5.38 re-rebuild updated packages From 36ce025ec91f306545496dc804344b7ec9b932ef Mon Sep 17 00:00:00 2001 From: Jitka Plesnikova Date: Thu, 13 Jul 2023 11:12:07 +0200 Subject: [PATCH 123/243] Perl 5.38 re-rebuild updated packages --- libguestfs.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libguestfs.spec b/libguestfs.spec index b111ae5..64d0e86 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -50,7 +50,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.51.4 -Release: 7%{?dist} +Release: 8%{?dist} License: LGPL-2.1-or-later # Build only for architectures that have a kernel @@ -1092,6 +1092,9 @@ rm ocaml/html/.gitignore %changelog +* Thu Jul 13 2023 Jitka Plesnikova - 1:1.51.4-8 +- Perl 5.38 re-rebuild updated packages + * Thu Jul 13 2023 Richard W.M. Jones - 1:1.51.4-7 - Bump and rebuild against supermin-5.3.3-13.fc39 From 509077f1d6692915febb9f562f4e7bd1454afc81 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 14 Jul 2023 20:44:44 +0100 Subject: [PATCH 124/243] New upstream development branch 1.51.5 --- libguestfs.spec | 8 ++++++-- sources | 4 ++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index 64d0e86..3c1b46e 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -49,8 +49,8 @@ ExcludeArch: %{ix86} Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 -Version: 1.51.4 -Release: 8%{?dist} +Version: 1.51.5 +Release: 1%{?dist} License: LGPL-2.1-or-later # Build only for architectures that have a kernel @@ -329,6 +329,7 @@ Recommends: libvirt-daemon-config-network Requires: libvirt-daemon-driver-qemu >= 7.1.0 Requires: libvirt-daemon-driver-secret Requires: libvirt-daemon-driver-storage-core +Recommends: passt Requires: selinux-policy >= 3.11.1-63 %ifarch aarch64 @@ -1092,6 +1093,9 @@ rm ocaml/html/.gitignore %changelog +* Fri Jul 14 2023 Richard W.M. Jones - 1:1.51.5-1 +- New upstream development branch 1.51.5 + * Thu Jul 13 2023 Jitka Plesnikova - 1:1.51.4-8 - Perl 5.38 re-rebuild updated packages diff --git a/sources b/sources index 39005bd..adf9f96 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (libguestfs-1.51.4.tar.gz) = 7f944098972b3185cb25afd060dd2af110bd8827df7d1175c4545727bd80f41b8b90c95c3bc7928efbd9cdc1b163fc41665fc8adf066f86be7ab367d04ad666c -SHA512 (libguestfs-1.51.4.tar.gz.sig) = f0092de438b41cb39928eb0c6016fd904129179360f68dd0ddf41c9736acadda42477792bda2449fafe910cd8a3b47fe63bce6573636b1f2caf96d9684a965b7 +SHA512 (libguestfs-1.51.5.tar.gz) = 09f7b9462814ade03d0a792c6436d0c4037e8dd20b19e77faba811a1e23b6eb71e673a07f6d8bff306255d8a0314c0df76956279beb913ceee222a2dd679b392 +SHA512 (libguestfs-1.51.5.tar.gz.sig) = 38b87a7b0177909db2df53f154bef093601ce690149f8150f9047515bac4684fa4bd3199ecc4199bada04f5b6d540a51cf73f59c8d972a1c55b651d0167cb6e3 From cd873a392dd81f089a03b9b77f34b2d57b234291 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 20 Jul 2023 11:04:02 +0000 Subject: [PATCH 125/243] Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- libguestfs.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libguestfs.spec b/libguestfs.spec index 3c1b46e..bbbfa91 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -50,7 +50,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.51.5 -Release: 1%{?dist} +Release: 2%{?dist} License: LGPL-2.1-or-later # Build only for architectures that have a kernel @@ -1093,6 +1093,9 @@ rm ocaml/html/.gitignore %changelog +* Thu Jul 20 2023 Fedora Release Engineering - 1:1.51.5-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + * Fri Jul 14 2023 Richard W.M. Jones - 1:1.51.5-1 - New upstream development branch 1.51.5 From f4541eac6eda399ddb6263bd257169f5257d2d95 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 20 Jul 2023 19:39:01 +0100 Subject: [PATCH 126/243] New upstream development branch 1.51.6 --- libguestfs.spec | 7 +++++-- sources | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index bbbfa91..89ceb7a 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -49,8 +49,8 @@ ExcludeArch: %{ix86} Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 -Version: 1.51.5 -Release: 2%{?dist} +Version: 1.51.6 +Release: 1%{?dist} License: LGPL-2.1-or-later # Build only for architectures that have a kernel @@ -1093,6 +1093,9 @@ rm ocaml/html/.gitignore %changelog +* Thu Jul 20 2023 Richard W.M. Jones - 1:1.51.6-1 +- New upstream development branch 1.51.6 + * Thu Jul 20 2023 Fedora Release Engineering - 1:1.51.5-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild diff --git a/sources b/sources index adf9f96..1fef8af 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (libguestfs-1.51.5.tar.gz) = 09f7b9462814ade03d0a792c6436d0c4037e8dd20b19e77faba811a1e23b6eb71e673a07f6d8bff306255d8a0314c0df76956279beb913ceee222a2dd679b392 -SHA512 (libguestfs-1.51.5.tar.gz.sig) = 38b87a7b0177909db2df53f154bef093601ce690149f8150f9047515bac4684fa4bd3199ecc4199bada04f5b6d540a51cf73f59c8d972a1c55b651d0167cb6e3 +SHA512 (libguestfs-1.51.6.tar.gz) = 6c9abc0feee9adb4ad36b7297876a355a2872ff516db0f11fa9d2e524504981bd3d5add0b28e398cd637cb55c55fcb1193f65c91d446452f00a6575414bc5667 +SHA512 (libguestfs-1.51.6.tar.gz.sig) = abe7307d42cee69f1ebb2847942142ecf70a186a6d3936c407a48bd7a8faec30330f63d7d11152d6f302bc6a6e51774be3d183758ce3dd0297d98884e7a80708 From 72d1e2e1de8ad0802e39a83d2c0c663db1aca47c Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Tue, 25 Jul 2023 23:20:12 -0400 Subject: [PATCH 127/243] Use qemu-kvm in ELN builds ELN now has a RHEL-like qemu-kvm, and needs to be handled accordingly. --- libguestfs.spec | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index 89ceb7a..46c4fb6 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -50,7 +50,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.51.6 -Release: 1%{?dist} +Release: 2%{?dist} License: LGPL-2.1-or-later # Build only for architectures that have a kernel @@ -732,7 +732,7 @@ else fi %{configure} \ -%if 0%{?rhel} && !0%{?eln} +%if 0%{?rhel} QEMU=%{_libexecdir}/qemu-kvm \ %endif PYTHON=%{__python3} \ @@ -743,7 +743,7 @@ fi %else --with-extra="rhel=%{rhel},release=%{release},libvirt" \ %endif -%if 0%{?rhel} && !0%{?eln} +%if 0%{?rhel} --with-qemu="qemu-kvm qemu-system-%{_build_arch} qemu" \ %endif %ifnarch %{golang_arches} @@ -1093,6 +1093,9 @@ rm ocaml/html/.gitignore %changelog +* Wed Jul 26 2023 Yaakov Selkowitz - 1:1.51.6-2 +- Use qemu-kvm in ELN builds + * Thu Jul 20 2023 Richard W.M. Jones - 1:1.51.6-1 - New upstream development branch 1.51.6 From 7f1b9ab59922175926d102ecb5d38a01ddc9b1e4 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 21 Sep 2023 16:27:39 +0100 Subject: [PATCH 128/243] New upstream development branch 1.51.7 --- libguestfs.spec | 7 +++++-- sources | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index 46c4fb6..5345517 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -49,8 +49,8 @@ ExcludeArch: %{ix86} Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 -Version: 1.51.6 -Release: 2%{?dist} +Version: 1.51.7 +Release: 1%{?dist} License: LGPL-2.1-or-later # Build only for architectures that have a kernel @@ -1093,6 +1093,9 @@ rm ocaml/html/.gitignore %changelog +* Thu Sep 21 2023 Richard W.M. Jones - 1:1.51.7-1 +- New upstream development branch 1.51.7 + * Wed Jul 26 2023 Yaakov Selkowitz - 1:1.51.6-2 - Use qemu-kvm in ELN builds diff --git a/sources b/sources index 1fef8af..e7cd231 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (libguestfs-1.51.6.tar.gz) = 6c9abc0feee9adb4ad36b7297876a355a2872ff516db0f11fa9d2e524504981bd3d5add0b28e398cd637cb55c55fcb1193f65c91d446452f00a6575414bc5667 -SHA512 (libguestfs-1.51.6.tar.gz.sig) = abe7307d42cee69f1ebb2847942142ecf70a186a6d3936c407a48bd7a8faec30330f63d7d11152d6f302bc6a6e51774be3d183758ce3dd0297d98884e7a80708 +SHA512 (libguestfs-1.51.7.tar.gz) = 2d2e76003edcce6850b865c43557d97a7cfa737be81d3aa5cd255307ea2caed677748b49988089f868ec16434778e23eaedb91421d838252170cf20a7fb714f7 +SHA512 (libguestfs-1.51.7.tar.gz.sig) = cbecb6818d21e52f57293c2722def29b85ede94d91be0fb43aa8428ed6f2165d44c62173853db441b8ffcd757222f44ee5d6ecf5ef842e444aaed36e119c51ac From 25ec33956fbcb274d3bb69532f6659183ead7fcb Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Tue, 3 Oct 2023 08:27:00 +0200 Subject: [PATCH 129/243] rebuild for https://fedoraproject.org/wiki/Changes/php83 --- libguestfs.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libguestfs.spec b/libguestfs.spec index 5345517..c04e2a1 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -50,7 +50,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.51.7 -Release: 1%{?dist} +Release: 2%{?dist} License: LGPL-2.1-or-later # Build only for architectures that have a kernel @@ -1093,6 +1093,9 @@ rm ocaml/html/.gitignore %changelog +* Tue Oct 03 2023 Remi Collet - 1:1.51.7-2 +- rebuild for https://fedoraproject.org/wiki/Changes/php83 + * Thu Sep 21 2023 Richard W.M. Jones - 1:1.51.7-1 - New upstream development branch 1.51.7 From 67766db26bee1b61371277ebcadfa2e0e051d426 Mon Sep 17 00:00:00 2001 From: Jerry James Date: Wed, 4 Oct 2023 23:11:00 -0600 Subject: [PATCH 130/243] Update names of the Unix and Camlstr libraries for OCaml 5.1.0 Link with libzstd for OCaml 5.1.0 --- libguestfs.spec | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/libguestfs.spec b/libguestfs.spec index c04e2a1..433ecda 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -696,6 +696,17 @@ for %{name}. %setup -q %autopatch -p1 +# The names of the Unix and Camlstr libraries changed in OCaml 5.1.0, and +# linking with libzstd is now necessary +%if 0%{?fedora} > 39 +sed -i 's/-ldl/& -lzstd/' daemon/Makefile.am +%ifarch %{ocaml_native_compiler} +sed -ri 's/-l(camlstr|unix)/&nat/' daemon/Makefile.am +%else +sed -ri 's/-l(camlstr|unix)/&byt/' daemon/Makefile.am +%endif +%endif + %if 0%{patches_touch_autotools} autoreconf -i %endif @@ -1093,6 +1104,10 @@ rm ocaml/html/.gitignore %changelog +* Wed Oct 4 2023 Jerry James - 1:1.51.7-2 +- Update names of the Unix and Camlstr libraries for OCaml 5.1.0 +- Link with libzstd for OCaml 5.1.0 + * Tue Oct 03 2023 Remi Collet - 1:1.51.7-2 - rebuild for https://fedoraproject.org/wiki/Changes/php83 From 47191e3da1c61b0232e2875fffd6c2207c1421bc Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 5 Oct 2023 16:04:56 +0100 Subject: [PATCH 131/243] OCaml 5.1 rebuild for Fedora 40 --- libguestfs.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libguestfs.spec b/libguestfs.spec index 433ecda..d1c097f 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -50,7 +50,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.51.7 -Release: 2%{?dist} +Release: 3%{?dist} License: LGPL-2.1-or-later # Build only for architectures that have a kernel @@ -1104,6 +1104,9 @@ rm ocaml/html/.gitignore %changelog +* Thu Oct 05 2023 Richard W.M. Jones - 1:1.51.7-3 +- OCaml 5.1 rebuild for Fedora 40 + * Wed Oct 4 2023 Jerry James - 1:1.51.7-2 - Update names of the Unix and Camlstr libraries for OCaml 5.1.0 - Link with libzstd for OCaml 5.1.0 From b81ea517da23dd037bc0b7b49be3cfc456ccf8c5 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 6 Oct 2023 11:34:29 +0100 Subject: [PATCH 132/243] Revert "Update names of the Unix and Camlstr libraries for OCaml 5.1.0" This reverts commit 67766db26bee1b61371277ebcadfa2e0e051d426. RWMJ: Will be replaced by an upstream patch --- libguestfs.spec | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index d1c097f..e723ddd 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -696,17 +696,6 @@ for %{name}. %setup -q %autopatch -p1 -# The names of the Unix and Camlstr libraries changed in OCaml 5.1.0, and -# linking with libzstd is now necessary -%if 0%{?fedora} > 39 -sed -i 's/-ldl/& -lzstd/' daemon/Makefile.am -%ifarch %{ocaml_native_compiler} -sed -ri 's/-l(camlstr|unix)/&nat/' daemon/Makefile.am -%else -sed -ri 's/-l(camlstr|unix)/&byt/' daemon/Makefile.am -%endif -%endif - %if 0%{patches_touch_autotools} autoreconf -i %endif From 6414c52e4d9183f1dae9d68ff9b4e7de492ebfa1 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 6 Oct 2023 11:36:54 +0100 Subject: [PATCH 133/243] Add upstream patch to fix linking the daemon with OCaml 5.1 --- ...lstr-nat-byt-and-lunix-nat-byt-and-r.patch | 108 ++++++++++++++++++ libguestfs.spec | 12 +- 2 files changed, 118 insertions(+), 2 deletions(-) create mode 100644 0001-daemon-Find-lcamlstr-nat-byt-and-lunix-nat-byt-and-r.patch diff --git a/0001-daemon-Find-lcamlstr-nat-byt-and-lunix-nat-byt-and-r.patch b/0001-daemon-Find-lcamlstr-nat-byt-and-lunix-nat-byt-and-r.patch new file mode 100644 index 0000000..1542ca0 --- /dev/null +++ b/0001-daemon-Find-lcamlstr-nat-byt-and-lunix-nat-byt-and-r.patch @@ -0,0 +1,108 @@ +From f8cbd7140095279e40b36415d5b6fc5c36e96a40 Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Fri, 6 Oct 2023 11:15:55 +0100 +Subject: [PATCH] daemon: Find -lcamlstr{nat,byt} and -lunix{nat,byt}, and + require -lzstd + +OCaml 5.1 changes the names of these libraries for some reason. + +Also in OCaml 5.1, if using those libraries you must link with -lzstd. +Since zstd was already described as "required" (although we only used +it in the appliance), there is no official change to the requirements, +but I have added a configure time check for the library. + +Thanks: Jerry James +--- + daemon/Makefile.am | 8 +++++--- + m4/guestfs-libraries.m4 | 3 +++ + m4/guestfs-ocaml.m4 | 41 +++++++++++++++++++++++++++++++++++++++++ + 3 files changed, 49 insertions(+), 3 deletions(-) + +diff --git a/daemon/Makefile.am b/daemon/Makefile.am +index 01c0f6416c..b44d7712f8 100644 +--- a/daemon/Makefile.am ++++ b/daemon/Makefile.am +@@ -376,9 +376,11 @@ OCAML_LIBS = \ + -lmlstdutils \ + -lmlaugeas \ + -lmlhivex \ +- -lcamlstr \ +- -lunix \ +- -l$(CAMLRUN) -ldl -lm ++ -l$(CAMLSTR) \ ++ -l$(CAMLUNIX) \ ++ -l$(CAMLRUN) \ ++ $(LIBZSTD_LIBS) \ ++ -ldl -lm + + CLEANFILES += camldaemon.o + +diff --git a/m4/guestfs-libraries.m4 b/m4/guestfs-libraries.m4 +index 29d012a378..18c4cd3074 100644 +--- a/m4/guestfs-libraries.m4 ++++ b/m4/guestfs-libraries.m4 +@@ -248,6 +248,9 @@ PKG_CHECK_MODULES([PCRE2], [libpcre2-8], [], [ + PCRE_LIBS=`$PCRE2_CONFIG --libs8` + ]) + ++dnl Check for zstd (required since OCaml 5.1) ++PKG_CHECK_MODULES([LIBZSTD], [libzstd]) ++ + dnl Check for Augeas >= 1.2.0 (required). + PKG_CHECK_MODULES([AUGEAS],[augeas >= 1.2.0]) + +diff --git a/m4/guestfs-ocaml.m4 b/m4/guestfs-ocaml.m4 +index 39a8346f3e..25b06408c1 100644 +--- a/m4/guestfs-ocaml.m4 ++++ b/m4/guestfs-ocaml.m4 +@@ -122,6 +122,47 @@ if test "x$enable_daemon" = "xyes"; then + AC_MSG_ERROR([could not find or link to libasmrun or libcamlrun]) + fi + AC_SUBST([CAMLRUN]) ++ ++ dnl OCaml 5.1 changed -lcamlstr to -lcamlstrnat / -lcamlstrbyt ++ dnl and -lunix to -lunixnat / -lunixbyt so we need to detect ++ dnl the new or old libraries. As above we cannot use AC_CHECK_LIB. ++ AC_MSG_CHECKING([how to link the daemon with -lcamlstr*]) ++ if test "x$OCAMLOPT" != "xno"; then ++ choices="camlstrnat camlstr" ++ else ++ choices="camlstrbyt camlstr" ++ fi ++ for f in $choices; do ++ if test -f "$OCAMLLIB/lib$f.a"; then ++ CAMLSTR=$f ++ break ++ fi ++ done ++ if test "x$CAMLSTR" != "x"; then ++ AC_MSG_RESULT([$CAMLSTR]) ++ else ++ AC_MSG_ERROR([could not find or link to -lcamlstr*]) ++ fi ++ AC_SUBST([CAMLSTR]) ++ ++ AC_MSG_CHECKING([how to link the daemon with -lunix*]) ++ if test "x$OCAMLOPT" != "xno"; then ++ choices="unixnat unix" ++ else ++ choices="unixbyt unix" ++ fi ++ for f in $choices; do ++ if test -f "$OCAMLLIB/lib$f.a"; then ++ CAMLUNIX=$f ++ break ++ fi ++ done ++ if test "x$CAMLUNIX" != "x"; then ++ AC_MSG_RESULT([$CAMLUNIX]) ++ else ++ AC_MSG_ERROR([could not find or link to -lunix*]) ++ fi ++ AC_SUBST([CAMLUNIX]) + fi + + dnl Define HIVEX_OPEN_UNSAFE_FLAG based on test above. +-- +2.41.0 + diff --git a/libguestfs.spec b/libguestfs.spec index e723ddd..b62fc9a 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -31,7 +31,7 @@ ExcludeArch: %{ix86} # If there are patches which touch autotools files, set this to 1. %if !0%{?rhel} -%global patches_touch_autotools %{nil} +%global patches_touch_autotools 1 %else # On RHEL the downstream patches always touch autotools files. %global patches_touch_autotools 1 @@ -50,7 +50,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.51.7 -Release: 3%{?dist} +Release: 4%{?dist} License: LGPL-2.1-or-later # Build only for architectures that have a kernel @@ -84,6 +84,10 @@ Source7: libguestfs.keyring # Maintainer script which helps with handling patches. Source8: copy-patches.sh +# Fix linking the daemon on OCaml 5.1 +# Upstream in >= 1.51.8 +Patch: 0001-daemon-Find-lcamlstr-nat-byt-and-lunix-nat-byt-and-r.patch + %if 0%{patches_touch_autotools} BuildRequires: autoconf, automake, libtool, gettext-devel %endif @@ -143,6 +147,7 @@ BuildRequires: /usr/bin/ping BuildRequires: /usr/bin/wget BuildRequires: xz BuildRequires: zstd +BuildRequires: zstd-devel BuildRequires: /usr/bin/qemu-img %if 0%{verify_tarball_signature} @@ -1093,6 +1098,9 @@ rm ocaml/html/.gitignore %changelog +* Fri Oct 06 2023 Richard W.M. Jones - 1:1.51.7-4 +- Add upstream patch to fix linking the daemon with OCaml 5.1 + * Thu Oct 05 2023 Richard W.M. Jones - 1:1.51.7-3 - OCaml 5.1 rebuild for Fedora 40 From 007cc47befa55db1fb83e8c3f79b8d1943fa239b Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 6 Oct 2023 12:10:33 +0100 Subject: [PATCH 134/243] zstd-devel -> libzstd-devel --- libguestfs.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libguestfs.spec b/libguestfs.spec index b62fc9a..9bb063f 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -147,7 +147,7 @@ BuildRequires: /usr/bin/ping BuildRequires: /usr/bin/wget BuildRequires: xz BuildRequires: zstd -BuildRequires: zstd-devel +BuildRequires: libzstd-devel BuildRequires: /usr/bin/qemu-img %if 0%{verify_tarball_signature} From ef0dbaea60ad85cd58414be03a995c5a02f6d645 Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Sat, 28 Oct 2023 11:00:19 +0200 Subject: [PATCH 135/243] Don't pull in selinux-policy as a requires Building Fedora images without the selinux policy should be possible. Currently, out of the 500 packages or so installed in the mkosi-kernel fedora image (https://github.com/DaanDeMeyer/mkosi-kernel), libguestfs is the only one that has a requires on selinux-policy. Let's make sure we don't pull in selinux-policy but do keep the version requirement intact if it is already installed. --- libguestfs.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libguestfs.spec b/libguestfs.spec index 9bb063f..60d6bd6 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -335,7 +335,7 @@ Requires: libvirt-daemon-driver-qemu >= 7.1.0 Requires: libvirt-daemon-driver-secret Requires: libvirt-daemon-driver-storage-core Recommends: passt -Requires: selinux-policy >= 3.11.1-63 +Requires: (selinux-policy >= 3.11.1-63 if selinux-policy) %ifarch aarch64 Requires: edk2-aarch64 From 15f0fe6b038698433aeae0791ef9c7d8e4f8d44e Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 30 Oct 2023 14:13:38 +0000 Subject: [PATCH 136/243] Use dhcpcd instead of dhclient (RHBZ#2247057) --- ...dhcpcd-to-be-used-on-Red-Hat-platfor.patch | 26 +++++++++++++++++++ libguestfs.spec | 11 ++++++-- 2 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 0001-appliance-Allow-dhcpcd-to-be-used-on-Red-Hat-platfor.patch diff --git a/0001-appliance-Allow-dhcpcd-to-be-used-on-Red-Hat-platfor.patch b/0001-appliance-Allow-dhcpcd-to-be-used-on-Red-Hat-platfor.patch new file mode 100644 index 0000000..ba3aa1c --- /dev/null +++ b/0001-appliance-Allow-dhcpcd-to-be-used-on-Red-Hat-platfor.patch @@ -0,0 +1,26 @@ +From 0e37e5feeaf4380bc971a3105ead8e779a94fa36 Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Mon, 30 Oct 2023 14:31:26 +0000 +Subject: [PATCH] appliance: Allow dhcpcd to be used on Red Hat platforms + +Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2247057 +Fixes: https://github.com/libguestfs/libguestfs/issues/121 +--- + appliance/packagelist.in | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/appliance/packagelist.in b/appliance/packagelist.in +index d3a945792e..3095234431 100644 +--- a/appliance/packagelist.in ++++ b/appliance/packagelist.in +@@ -28,6 +28,7 @@ ifelse(REDHAT,1, + cryptsetup + cryptsetup-luks dnl old name used before Fedora 17 + dhclient ++ dhcpcd + gfs-utils + gfs2-utils + glibc-gconv-extra dnl syslinux requires IBM850 iconv converter +-- +2.42.0 + diff --git a/libguestfs.spec b/libguestfs.spec index 9bb063f..d88a72e 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -50,7 +50,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.51.7 -Release: 4%{?dist} +Release: 5%{?dist} License: LGPL-2.1-or-later # Build only for architectures that have a kernel @@ -88,6 +88,10 @@ Source8: copy-patches.sh # Upstream in >= 1.51.8 Patch: 0001-daemon-Find-lcamlstr-nat-byt-and-lunix-nat-byt-and-r.patch +# Allow dhcpcd to be used on Red Hat platforms +# Upstream in >= 1.51.8 +Patch: 0001-appliance-Allow-dhcpcd-to-be-used-on-Red-Hat-platfor.patch + %if 0%{patches_touch_autotools} BuildRequires: autoconf, automake, libtool, gettext-devel %endif @@ -211,7 +215,7 @@ BuildRequires: clevis-luks BuildRequires: coreutils BuildRequires: cpio BuildRequires: cryptsetup -BuildRequires: dhclient +BuildRequires: dhcpcd BuildRequires: diffutils BuildRequires: dosfstools BuildRequires: e2fsprogs @@ -1098,6 +1102,9 @@ rm ocaml/html/.gitignore %changelog +* Mon Oct 30 2023 Richard W.M. Jones - 1:1.51.7-5 +- Use dhcpcd instead of dhclient (RHBZ#2247057) + * Fri Oct 06 2023 Richard W.M. Jones - 1:1.51.7-4 - Add upstream patch to fix linking the daemon with OCaml 5.1 From 57a9beeac9ab9432c4a1308b4580d1174e99d8f0 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 14 Nov 2023 18:18:19 +0000 Subject: [PATCH 137/243] Don't pull in selinux-policy as a requires --- libguestfs.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libguestfs.spec b/libguestfs.spec index 98cadd2..9df73fb 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -50,7 +50,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.51.7 -Release: 5%{?dist} +Release: 6%{?dist} License: LGPL-2.1-or-later # Build only for architectures that have a kernel @@ -1102,6 +1102,9 @@ rm ocaml/html/.gitignore %changelog +* Tue Nov 14 2023 Richard W.M. Jones - 1:1.51.7-6 +- Don't pull in selinux-policy as a requires + * Mon Oct 30 2023 Richard W.M. Jones - 1:1.51.7-5 - Use dhcpcd instead of dhclient (RHBZ#2247057) From 78db1505556a6b0303d8301710657994ad558d1b Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 16 Nov 2023 13:34:00 +0000 Subject: [PATCH 138/243] New upstream development version 1.51.8 --- ...dhcpcd-to-be-used-on-Red-Hat-platfor.patch | 26 ----- ...lstr-nat-byt-and-lunix-nat-byt-and-r.patch | 108 ------------------ libguestfs.spec | 15 +-- sources | 4 +- 4 files changed, 7 insertions(+), 146 deletions(-) delete mode 100644 0001-appliance-Allow-dhcpcd-to-be-used-on-Red-Hat-platfor.patch delete mode 100644 0001-daemon-Find-lcamlstr-nat-byt-and-lunix-nat-byt-and-r.patch diff --git a/0001-appliance-Allow-dhcpcd-to-be-used-on-Red-Hat-platfor.patch b/0001-appliance-Allow-dhcpcd-to-be-used-on-Red-Hat-platfor.patch deleted file mode 100644 index ba3aa1c..0000000 --- a/0001-appliance-Allow-dhcpcd-to-be-used-on-Red-Hat-platfor.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 0e37e5feeaf4380bc971a3105ead8e779a94fa36 Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Mon, 30 Oct 2023 14:31:26 +0000 -Subject: [PATCH] appliance: Allow dhcpcd to be used on Red Hat platforms - -Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2247057 -Fixes: https://github.com/libguestfs/libguestfs/issues/121 ---- - appliance/packagelist.in | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/appliance/packagelist.in b/appliance/packagelist.in -index d3a945792e..3095234431 100644 ---- a/appliance/packagelist.in -+++ b/appliance/packagelist.in -@@ -28,6 +28,7 @@ ifelse(REDHAT,1, - cryptsetup - cryptsetup-luks dnl old name used before Fedora 17 - dhclient -+ dhcpcd - gfs-utils - gfs2-utils - glibc-gconv-extra dnl syslinux requires IBM850 iconv converter --- -2.42.0 - diff --git a/0001-daemon-Find-lcamlstr-nat-byt-and-lunix-nat-byt-and-r.patch b/0001-daemon-Find-lcamlstr-nat-byt-and-lunix-nat-byt-and-r.patch deleted file mode 100644 index 1542ca0..0000000 --- a/0001-daemon-Find-lcamlstr-nat-byt-and-lunix-nat-byt-and-r.patch +++ /dev/null @@ -1,108 +0,0 @@ -From f8cbd7140095279e40b36415d5b6fc5c36e96a40 Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Fri, 6 Oct 2023 11:15:55 +0100 -Subject: [PATCH] daemon: Find -lcamlstr{nat,byt} and -lunix{nat,byt}, and - require -lzstd - -OCaml 5.1 changes the names of these libraries for some reason. - -Also in OCaml 5.1, if using those libraries you must link with -lzstd. -Since zstd was already described as "required" (although we only used -it in the appliance), there is no official change to the requirements, -but I have added a configure time check for the library. - -Thanks: Jerry James ---- - daemon/Makefile.am | 8 +++++--- - m4/guestfs-libraries.m4 | 3 +++ - m4/guestfs-ocaml.m4 | 41 +++++++++++++++++++++++++++++++++++++++++ - 3 files changed, 49 insertions(+), 3 deletions(-) - -diff --git a/daemon/Makefile.am b/daemon/Makefile.am -index 01c0f6416c..b44d7712f8 100644 ---- a/daemon/Makefile.am -+++ b/daemon/Makefile.am -@@ -376,9 +376,11 @@ OCAML_LIBS = \ - -lmlstdutils \ - -lmlaugeas \ - -lmlhivex \ -- -lcamlstr \ -- -lunix \ -- -l$(CAMLRUN) -ldl -lm -+ -l$(CAMLSTR) \ -+ -l$(CAMLUNIX) \ -+ -l$(CAMLRUN) \ -+ $(LIBZSTD_LIBS) \ -+ -ldl -lm - - CLEANFILES += camldaemon.o - -diff --git a/m4/guestfs-libraries.m4 b/m4/guestfs-libraries.m4 -index 29d012a378..18c4cd3074 100644 ---- a/m4/guestfs-libraries.m4 -+++ b/m4/guestfs-libraries.m4 -@@ -248,6 +248,9 @@ PKG_CHECK_MODULES([PCRE2], [libpcre2-8], [], [ - PCRE_LIBS=`$PCRE2_CONFIG --libs8` - ]) - -+dnl Check for zstd (required since OCaml 5.1) -+PKG_CHECK_MODULES([LIBZSTD], [libzstd]) -+ - dnl Check for Augeas >= 1.2.0 (required). - PKG_CHECK_MODULES([AUGEAS],[augeas >= 1.2.0]) - -diff --git a/m4/guestfs-ocaml.m4 b/m4/guestfs-ocaml.m4 -index 39a8346f3e..25b06408c1 100644 ---- a/m4/guestfs-ocaml.m4 -+++ b/m4/guestfs-ocaml.m4 -@@ -122,6 +122,47 @@ if test "x$enable_daemon" = "xyes"; then - AC_MSG_ERROR([could not find or link to libasmrun or libcamlrun]) - fi - AC_SUBST([CAMLRUN]) -+ -+ dnl OCaml 5.1 changed -lcamlstr to -lcamlstrnat / -lcamlstrbyt -+ dnl and -lunix to -lunixnat / -lunixbyt so we need to detect -+ dnl the new or old libraries. As above we cannot use AC_CHECK_LIB. -+ AC_MSG_CHECKING([how to link the daemon with -lcamlstr*]) -+ if test "x$OCAMLOPT" != "xno"; then -+ choices="camlstrnat camlstr" -+ else -+ choices="camlstrbyt camlstr" -+ fi -+ for f in $choices; do -+ if test -f "$OCAMLLIB/lib$f.a"; then -+ CAMLSTR=$f -+ break -+ fi -+ done -+ if test "x$CAMLSTR" != "x"; then -+ AC_MSG_RESULT([$CAMLSTR]) -+ else -+ AC_MSG_ERROR([could not find or link to -lcamlstr*]) -+ fi -+ AC_SUBST([CAMLSTR]) -+ -+ AC_MSG_CHECKING([how to link the daemon with -lunix*]) -+ if test "x$OCAMLOPT" != "xno"; then -+ choices="unixnat unix" -+ else -+ choices="unixbyt unix" -+ fi -+ for f in $choices; do -+ if test -f "$OCAMLLIB/lib$f.a"; then -+ CAMLUNIX=$f -+ break -+ fi -+ done -+ if test "x$CAMLUNIX" != "x"; then -+ AC_MSG_RESULT([$CAMLUNIX]) -+ else -+ AC_MSG_ERROR([could not find or link to -lunix*]) -+ fi -+ AC_SUBST([CAMLUNIX]) - fi - - dnl Define HIVEX_OPEN_UNSAFE_FLAG based on test above. --- -2.41.0 - diff --git a/libguestfs.spec b/libguestfs.spec index 9df73fb..19b13bb 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -49,8 +49,8 @@ ExcludeArch: %{ix86} Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 -Version: 1.51.7 -Release: 6%{?dist} +Version: 1.51.8 +Release: 1%{?dist} License: LGPL-2.1-or-later # Build only for architectures that have a kernel @@ -84,14 +84,6 @@ Source7: libguestfs.keyring # Maintainer script which helps with handling patches. Source8: copy-patches.sh -# Fix linking the daemon on OCaml 5.1 -# Upstream in >= 1.51.8 -Patch: 0001-daemon-Find-lcamlstr-nat-byt-and-lunix-nat-byt-and-r.patch - -# Allow dhcpcd to be used on Red Hat platforms -# Upstream in >= 1.51.8 -Patch: 0001-appliance-Allow-dhcpcd-to-be-used-on-Red-Hat-platfor.patch - %if 0%{patches_touch_autotools} BuildRequires: autoconf, automake, libtool, gettext-devel %endif @@ -1102,6 +1094,9 @@ rm ocaml/html/.gitignore %changelog +* Thu Jul 20 2023 Richard W.M. Jones - 1:1.51.8-1 +- New upstream development version 1.51.8 + * Tue Nov 14 2023 Richard W.M. Jones - 1:1.51.7-6 - Don't pull in selinux-policy as a requires diff --git a/sources b/sources index e7cd231..41f1b43 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (libguestfs-1.51.7.tar.gz) = 2d2e76003edcce6850b865c43557d97a7cfa737be81d3aa5cd255307ea2caed677748b49988089f868ec16434778e23eaedb91421d838252170cf20a7fb714f7 -SHA512 (libguestfs-1.51.7.tar.gz.sig) = cbecb6818d21e52f57293c2722def29b85ede94d91be0fb43aa8428ed6f2165d44c62173853db441b8ffcd757222f44ee5d6ecf5ef842e444aaed36e119c51ac +SHA512 (libguestfs-1.51.8.tar.gz) = f13a985183d714483a613b233635b052a121babf397fc5d1872f02d3cfdc31d48382fde23077cff55527fb9e1634083b0984e6ac5ce8348ecfcc6f56e5c0c502 +SHA512 (libguestfs-1.51.8.tar.gz.sig) = b40ce55831c4e8cffc18fea0ae5533597766dd46bb6fcf8b88aaf7a1a9ea9fc4b41587faf3ddc0b9dec8844ad497873a3501c3c6756b26113974e4cbf26a8e79 From 0d42c50ccca0cf372e9aa7e9c491f75247024cab Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 16 Nov 2023 14:00:28 +0000 Subject: [PATCH 139/243] Fix date in changelog --- libguestfs.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libguestfs.spec b/libguestfs.spec index 19b13bb..adf5cda 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -1094,7 +1094,7 @@ rm ocaml/html/.gitignore %changelog -* Thu Jul 20 2023 Richard W.M. Jones - 1:1.51.8-1 +* Thu Nov 16 2023 Richard W.M. Jones - 1:1.51.8-1 - New upstream development version 1.51.8 * Tue Nov 14 2023 Richard W.M. Jones - 1:1.51.7-6 From ab2d1d568e890bdc44a19e2b1fee20eefde20da1 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 27 Nov 2023 14:34:15 +0000 Subject: [PATCH 140/243] Fix build for libxml2 2.12.1 --- ...de-libxml-parser.h-for-xmlReadMemory.patch | 26 +++++++++++++++++++ libguestfs.spec | 9 +++++-- 2 files changed, 33 insertions(+), 2 deletions(-) create mode 100644 0001-lib-Include-libxml-parser.h-for-xmlReadMemory.patch diff --git a/0001-lib-Include-libxml-parser.h-for-xmlReadMemory.patch b/0001-lib-Include-libxml-parser.h-for-xmlReadMemory.patch new file mode 100644 index 0000000..8243ba1 --- /dev/null +++ b/0001-lib-Include-libxml-parser.h-for-xmlReadMemory.patch @@ -0,0 +1,26 @@ +From 02c39dc5e8109ddb911d90759883a504008ba509 Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Mon, 27 Nov 2023 14:04:33 +0000 +Subject: [PATCH] lib: Include for xmlReadMemory + +Since libxml2 2.12.1 including this header is required to have this +function declared. +--- + lib/launch-libvirt.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/lib/launch-libvirt.c b/lib/launch-libvirt.c +index 994909a35f..872bc2a054 100644 +--- a/lib/launch-libvirt.c ++++ b/lib/launch-libvirt.c +@@ -38,6 +38,7 @@ + #include + #endif + ++#include + #include + #include + +-- +2.42.0 + diff --git a/libguestfs.spec b/libguestfs.spec index adf5cda..b648d12 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -31,7 +31,7 @@ ExcludeArch: %{ix86} # If there are patches which touch autotools files, set this to 1. %if !0%{?rhel} -%global patches_touch_autotools 1 +%global patches_touch_autotools %{nil} %else # On RHEL the downstream patches always touch autotools files. %global patches_touch_autotools 1 @@ -50,7 +50,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.51.8 -Release: 1%{?dist} +Release: 2%{?dist} License: LGPL-2.1-or-later # Build only for architectures that have a kernel @@ -84,6 +84,8 @@ Source7: libguestfs.keyring # Maintainer script which helps with handling patches. Source8: copy-patches.sh +Patch: 0001-lib-Include-libxml-parser.h-for-xmlReadMemory.patch + %if 0%{patches_touch_autotools} BuildRequires: autoconf, automake, libtool, gettext-devel %endif @@ -1094,6 +1096,9 @@ rm ocaml/html/.gitignore %changelog +* Mon Nov 27 2023 Richard W.M. Jones - 1:1.51.8-2 +- Fix build for libxml2 2.12.1 + * Thu Nov 16 2023 Richard W.M. Jones - 1:1.51.8-1 - New upstream development version 1.51.8 From ac1e012eb120992bc3376c5c0dbb7c538905f87d Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sat, 9 Dec 2023 11:52:40 +0000 Subject: [PATCH 141/243] New upstream development version 1.51.9 --- ...de-libxml-parser.h-for-xmlReadMemory.patch | 26 ------------------- libguestfs.spec | 9 ++++--- sources | 4 +-- 3 files changed, 7 insertions(+), 32 deletions(-) delete mode 100644 0001-lib-Include-libxml-parser.h-for-xmlReadMemory.patch diff --git a/0001-lib-Include-libxml-parser.h-for-xmlReadMemory.patch b/0001-lib-Include-libxml-parser.h-for-xmlReadMemory.patch deleted file mode 100644 index 8243ba1..0000000 --- a/0001-lib-Include-libxml-parser.h-for-xmlReadMemory.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 02c39dc5e8109ddb911d90759883a504008ba509 Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Mon, 27 Nov 2023 14:04:33 +0000 -Subject: [PATCH] lib: Include for xmlReadMemory - -Since libxml2 2.12.1 including this header is required to have this -function declared. ---- - lib/launch-libvirt.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/lib/launch-libvirt.c b/lib/launch-libvirt.c -index 994909a35f..872bc2a054 100644 ---- a/lib/launch-libvirt.c -+++ b/lib/launch-libvirt.c -@@ -38,6 +38,7 @@ - #include - #endif - -+#include - #include - #include - --- -2.42.0 - diff --git a/libguestfs.spec b/libguestfs.spec index b648d12..f64a4c6 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -49,8 +49,8 @@ ExcludeArch: %{ix86} Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 -Version: 1.51.8 -Release: 2%{?dist} +Version: 1.51.9 +Release: 1%{?dist} License: LGPL-2.1-or-later # Build only for architectures that have a kernel @@ -84,8 +84,6 @@ Source7: libguestfs.keyring # Maintainer script which helps with handling patches. Source8: copy-patches.sh -Patch: 0001-lib-Include-libxml-parser.h-for-xmlReadMemory.patch - %if 0%{patches_touch_autotools} BuildRequires: autoconf, automake, libtool, gettext-devel %endif @@ -1096,6 +1094,9 @@ rm ocaml/html/.gitignore %changelog +* Sat Dec 9 2023 Richard W.M. Jones - 1:1.51.9-1 +- New upstream development version 1.51.9 + * Mon Nov 27 2023 Richard W.M. Jones - 1:1.51.8-2 - Fix build for libxml2 2.12.1 diff --git a/sources b/sources index 41f1b43..ba9c6a2 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (libguestfs-1.51.8.tar.gz) = f13a985183d714483a613b233635b052a121babf397fc5d1872f02d3cfdc31d48382fde23077cff55527fb9e1634083b0984e6ac5ce8348ecfcc6f56e5c0c502 -SHA512 (libguestfs-1.51.8.tar.gz.sig) = b40ce55831c4e8cffc18fea0ae5533597766dd46bb6fcf8b88aaf7a1a9ea9fc4b41587faf3ddc0b9dec8844ad497873a3501c3c6756b26113974e4cbf26a8e79 +SHA512 (libguestfs-1.51.9.tar.gz) = 496f9e5a4fb9b7eef56c7dd35720a2ef1f56f286d14e6d3425c317638c7a7ab05563e628f9e5bc9d715ecfbb8f739abd4e8f415d9b352580070216e6b7659ee0 +SHA512 (libguestfs-1.51.9.tar.gz.sig) = 1e2155d7939a2cbd227a4c01f6fdd8e8d4846345abc8cf5e580a5692f36cba0167b92453a552132899689b591ade82b57f4952cf00b058bf53e57eefb1914c72 From cd66355dd53c3dee59008d141a24a7d1936722b8 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 12 Dec 2023 14:44:50 +0000 Subject: [PATCH 142/243] OCaml 5.1.1 rebuild for Fedora 40 --- libguestfs.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libguestfs.spec b/libguestfs.spec index f64a4c6..1a2e710 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -50,7 +50,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.51.9 -Release: 1%{?dist} +Release: 2%{?dist} License: LGPL-2.1-or-later # Build only for architectures that have a kernel @@ -1094,6 +1094,9 @@ rm ocaml/html/.gitignore %changelog +* Tue Dec 12 2023 Richard W.M. Jones - 1:1.51.9-2 +- OCaml 5.1.1 rebuild for Fedora 40 + * Sat Dec 9 2023 Richard W.M. Jones - 1:1.51.9-1 - New upstream development version 1.51.9 From e42b2838a8d0c659113fb54b9f60a049cb24bd44 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 14 Dec 2023 09:01:12 +0000 Subject: [PATCH 143/243] Fixes for https://github.com/ocaml/ocaml/issues/12820 --- ...Gc.finalise-instead-of-a-C-finalizer.patch | 134 ++++++++++++++++++ ...stom-block-before-releasing-runtime-.patch | 41 ++++++ libguestfs.spec | 9 +- 3 files changed, 183 insertions(+), 1 deletion(-) create mode 100644 0001-ocaml-Use-Gc.finalise-instead-of-a-C-finalizer.patch create mode 100644 0002-ocaml-Nullify-custom-block-before-releasing-runtime-.patch diff --git a/0001-ocaml-Use-Gc.finalise-instead-of-a-C-finalizer.patch b/0001-ocaml-Use-Gc.finalise-instead-of-a-C-finalizer.patch new file mode 100644 index 0000000..5e3296e --- /dev/null +++ b/0001-ocaml-Use-Gc.finalise-instead-of-a-C-finalizer.patch @@ -0,0 +1,134 @@ +From 61418535ad63b5a2a91f1caf4703d7134834e4dd Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Wed, 13 Dec 2023 22:50:56 +0000 +Subject: [PATCH 1/2] ocaml: Use Gc.finalise instead of a C finalizer + +Since OCaml 5.1.1, changes to custom blocks caused C finalizers that +call caml_enter_blocking_section to stop working (if they ever did +before). They are relatively inflexible compared to registering an +OCaml finalizer (Gc.finalise) to call Guestfs.close, so use that +instead. + +Suggested-by: Guillaume Munch-Maccagnoni +See: https://github.com/ocaml/ocaml/issues/12820 +See: https://gitlab.com/nbdkit/libnbd/-/commit/db48794fa89547a4799b832331e82b4b8b98f03d +--- + generator/OCaml.ml | 7 ++++- + ocaml/guestfs-c.c | 69 +++++++++++++++++++++------------------------- + 2 files changed, 37 insertions(+), 39 deletions(-) + +diff --git a/generator/OCaml.ml b/generator/OCaml.ml +index 07ccd26924..1e6f603ab2 100644 +--- a/generator/OCaml.ml ++++ b/generator/OCaml.ml +@@ -312,10 +312,15 @@ type t + exception Error of string + exception Handle_closed of string + +-external create : ?environment:bool -> ?close_on_exit:bool -> unit -> t = ++external _create : ?environment:bool -> ?close_on_exit:bool -> unit -> t = + \"guestfs_int_ocaml_create\" + external close : t -> unit = \"guestfs_int_ocaml_close\" + ++let create ?environment ?close_on_exit () = ++ let g = _create ?environment ?close_on_exit () in ++ Gc.finalise close g; ++ g ++ + type event = + "; + List.iter ( +diff --git a/ocaml/guestfs-c.c b/ocaml/guestfs-c.c +index 8a8761e883..700c33abf4 100644 +--- a/ocaml/guestfs-c.c ++++ b/ocaml/guestfs-c.c +@@ -61,43 +61,10 @@ value guestfs_int_ocaml_delete_event_callback (value gv, value eh); + value guestfs_int_ocaml_event_to_string (value events); + value guestfs_int_ocaml_last_errno (value gv); + +-/* Allocate handles and deal with finalization. */ +-static void +-guestfs_finalize (value gv) +-{ +- guestfs_h *g = Guestfs_val (gv); +- +- if (g) { +- /* There is a nasty, difficult to solve case here where the +- * user deletes events in one of the callbacks that we are +- * about to invoke, resulting in a double-free. XXX +- */ +- size_t len; +- value **roots = get_all_event_callbacks (g, &len); +- +- /* Close the handle: this could invoke callbacks from the list +- * above, which is why we don't want to delete them before +- * closing the handle. +- */ +- caml_release_runtime_system (); +- guestfs_close (g); +- caml_acquire_runtime_system (); +- +- /* Now unregister the global roots. */ +- if (roots && len > 0) { +- size_t i; +- for (i = 0; i < len; ++i) { +- caml_remove_generational_global_root (roots[i]); +- free (roots[i]); +- } +- free (roots); +- } +- } +-} +- ++/* Allocate handles. */ + static struct custom_operations guestfs_custom_operations = { + (char *) "guestfs_custom_operations", +- guestfs_finalize, ++ custom_finalize_default, + custom_compare_default, + custom_hash_default, + custom_serialize_default, +@@ -179,11 +146,37 @@ value + guestfs_int_ocaml_close (value gv) + { + CAMLparam1 (gv); ++ guestfs_h *g = Guestfs_val (gv); + +- guestfs_finalize (gv); ++ if (g) { ++ /* There is a nasty, difficult to solve case here where the ++ * user deletes events in one of the callbacks that we are ++ * about to invoke, resulting in a double-free. XXX ++ */ ++ size_t len; ++ value **roots = get_all_event_callbacks (g, &len); + +- /* So we don't double-free in the finalizer. */ +- Guestfs_val (gv) = NULL; ++ /* Close the handle: this could invoke callbacks from the list ++ * above, which is why we don't want to delete them before ++ * closing the handle. ++ */ ++ caml_release_runtime_system (); ++ guestfs_close (g); ++ caml_acquire_runtime_system (); ++ ++ /* Now unregister the global roots. */ ++ if (roots && len > 0) { ++ size_t i; ++ for (i = 0; i < len; ++i) { ++ caml_remove_generational_global_root (roots[i]); ++ free (roots[i]); ++ } ++ free (roots); ++ } ++ ++ /* So we don't double-free. */ ++ Guestfs_val (gv) = NULL; ++ } + + CAMLreturn (Val_unit); + } +-- +2.43.0 + diff --git a/0002-ocaml-Nullify-custom-block-before-releasing-runtime-.patch b/0002-ocaml-Nullify-custom-block-before-releasing-runtime-.patch new file mode 100644 index 0000000..80b67ab --- /dev/null +++ b/0002-ocaml-Nullify-custom-block-before-releasing-runtime-.patch @@ -0,0 +1,41 @@ +From e93fd7e8acf34192c0d1b70611e3474dde346941 Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Thu, 14 Dec 2023 08:33:10 +0000 +Subject: [PATCH 2/2] ocaml: Nullify custom block before releasing runtime lock + +Avoids a potential, though if possible then very rare, double free +path. + +Suggested-by: Guillaume Munch-Maccagnoni +See: https://github.com/ocaml/ocaml/issues/12820 +--- + ocaml/guestfs-c.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/ocaml/guestfs-c.c b/ocaml/guestfs-c.c +index 700c33abf4..ea9a0598a6 100644 +--- a/ocaml/guestfs-c.c ++++ b/ocaml/guestfs-c.c +@@ -156,6 +156,9 @@ guestfs_int_ocaml_close (value gv) + size_t len; + value **roots = get_all_event_callbacks (g, &len); + ++ /* So we don't double-free. */ ++ Guestfs_val (gv) = NULL; ++ + /* Close the handle: this could invoke callbacks from the list + * above, which is why we don't want to delete them before + * closing the handle. +@@ -173,9 +176,6 @@ guestfs_int_ocaml_close (value gv) + } + free (roots); + } +- +- /* So we don't double-free. */ +- Guestfs_val (gv) = NULL; + } + + CAMLreturn (Val_unit); +-- +2.43.0 + diff --git a/libguestfs.spec b/libguestfs.spec index 1a2e710..56905e1 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -50,7 +50,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.51.9 -Release: 2%{?dist} +Release: 3%{?dist} License: LGPL-2.1-or-later # Build only for architectures that have a kernel @@ -84,6 +84,10 @@ Source7: libguestfs.keyring # Maintainer script which helps with handling patches. Source8: copy-patches.sh +# Fixes for https://github.com/ocaml/ocaml/issues/12820 +Patch: 0001-ocaml-Use-Gc.finalise-instead-of-a-C-finalizer.patch +Patch: 0002-ocaml-Nullify-custom-block-before-releasing-runtime-.patch + %if 0%{patches_touch_autotools} BuildRequires: autoconf, automake, libtool, gettext-devel %endif @@ -1094,6 +1098,9 @@ rm ocaml/html/.gitignore %changelog +* Thu Dec 14 2023 Richard W.M. Jones - 1:1.51.9-3 +- Fixes for https://github.com/ocaml/ocaml/issues/12820 + * Tue Dec 12 2023 Richard W.M. Jones - 1:1.51.9-2 - OCaml 5.1.1 rebuild for Fedora 40 From e48d79759ae4772ed454d0d05351c6135818bb1f Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 18 Dec 2023 15:05:57 +0000 Subject: [PATCH 144/243] OCaml 5.1.1 + s390x code gen fix for Fedora 40 --- libguestfs.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libguestfs.spec b/libguestfs.spec index 56905e1..3e44075 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -50,7 +50,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.51.9 -Release: 3%{?dist} +Release: 4%{?dist} License: LGPL-2.1-or-later # Build only for architectures that have a kernel @@ -1098,6 +1098,9 @@ rm ocaml/html/.gitignore %changelog +* Mon Dec 18 2023 Richard W.M. Jones - 1:1.51.9-4 +- OCaml 5.1.1 + s390x code gen fix for Fedora 40 + * Thu Dec 14 2023 Richard W.M. Jones - 1:1.51.9-3 - Fixes for https://github.com/ocaml/ocaml/issues/12820 From eb5bfa36cc7b6c1d46ed21dea03f376a5257b78c Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 19 Dec 2023 15:48:26 +0000 Subject: [PATCH 145/243] New upstream development version 1.51.10 --- ...Gc.finalise-instead-of-a-C-finalizer.patch | 134 ------------------ ...stom-block-before-releasing-runtime-.patch | 41 ------ libguestfs.spec | 11 +- sources | 4 +- 4 files changed, 7 insertions(+), 183 deletions(-) delete mode 100644 0001-ocaml-Use-Gc.finalise-instead-of-a-C-finalizer.patch delete mode 100644 0002-ocaml-Nullify-custom-block-before-releasing-runtime-.patch diff --git a/0001-ocaml-Use-Gc.finalise-instead-of-a-C-finalizer.patch b/0001-ocaml-Use-Gc.finalise-instead-of-a-C-finalizer.patch deleted file mode 100644 index 5e3296e..0000000 --- a/0001-ocaml-Use-Gc.finalise-instead-of-a-C-finalizer.patch +++ /dev/null @@ -1,134 +0,0 @@ -From 61418535ad63b5a2a91f1caf4703d7134834e4dd Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Wed, 13 Dec 2023 22:50:56 +0000 -Subject: [PATCH 1/2] ocaml: Use Gc.finalise instead of a C finalizer - -Since OCaml 5.1.1, changes to custom blocks caused C finalizers that -call caml_enter_blocking_section to stop working (if they ever did -before). They are relatively inflexible compared to registering an -OCaml finalizer (Gc.finalise) to call Guestfs.close, so use that -instead. - -Suggested-by: Guillaume Munch-Maccagnoni -See: https://github.com/ocaml/ocaml/issues/12820 -See: https://gitlab.com/nbdkit/libnbd/-/commit/db48794fa89547a4799b832331e82b4b8b98f03d ---- - generator/OCaml.ml | 7 ++++- - ocaml/guestfs-c.c | 69 +++++++++++++++++++++------------------------- - 2 files changed, 37 insertions(+), 39 deletions(-) - -diff --git a/generator/OCaml.ml b/generator/OCaml.ml -index 07ccd26924..1e6f603ab2 100644 ---- a/generator/OCaml.ml -+++ b/generator/OCaml.ml -@@ -312,10 +312,15 @@ type t - exception Error of string - exception Handle_closed of string - --external create : ?environment:bool -> ?close_on_exit:bool -> unit -> t = -+external _create : ?environment:bool -> ?close_on_exit:bool -> unit -> t = - \"guestfs_int_ocaml_create\" - external close : t -> unit = \"guestfs_int_ocaml_close\" - -+let create ?environment ?close_on_exit () = -+ let g = _create ?environment ?close_on_exit () in -+ Gc.finalise close g; -+ g -+ - type event = - "; - List.iter ( -diff --git a/ocaml/guestfs-c.c b/ocaml/guestfs-c.c -index 8a8761e883..700c33abf4 100644 ---- a/ocaml/guestfs-c.c -+++ b/ocaml/guestfs-c.c -@@ -61,43 +61,10 @@ value guestfs_int_ocaml_delete_event_callback (value gv, value eh); - value guestfs_int_ocaml_event_to_string (value events); - value guestfs_int_ocaml_last_errno (value gv); - --/* Allocate handles and deal with finalization. */ --static void --guestfs_finalize (value gv) --{ -- guestfs_h *g = Guestfs_val (gv); -- -- if (g) { -- /* There is a nasty, difficult to solve case here where the -- * user deletes events in one of the callbacks that we are -- * about to invoke, resulting in a double-free. XXX -- */ -- size_t len; -- value **roots = get_all_event_callbacks (g, &len); -- -- /* Close the handle: this could invoke callbacks from the list -- * above, which is why we don't want to delete them before -- * closing the handle. -- */ -- caml_release_runtime_system (); -- guestfs_close (g); -- caml_acquire_runtime_system (); -- -- /* Now unregister the global roots. */ -- if (roots && len > 0) { -- size_t i; -- for (i = 0; i < len; ++i) { -- caml_remove_generational_global_root (roots[i]); -- free (roots[i]); -- } -- free (roots); -- } -- } --} -- -+/* Allocate handles. */ - static struct custom_operations guestfs_custom_operations = { - (char *) "guestfs_custom_operations", -- guestfs_finalize, -+ custom_finalize_default, - custom_compare_default, - custom_hash_default, - custom_serialize_default, -@@ -179,11 +146,37 @@ value - guestfs_int_ocaml_close (value gv) - { - CAMLparam1 (gv); -+ guestfs_h *g = Guestfs_val (gv); - -- guestfs_finalize (gv); -+ if (g) { -+ /* There is a nasty, difficult to solve case here where the -+ * user deletes events in one of the callbacks that we are -+ * about to invoke, resulting in a double-free. XXX -+ */ -+ size_t len; -+ value **roots = get_all_event_callbacks (g, &len); - -- /* So we don't double-free in the finalizer. */ -- Guestfs_val (gv) = NULL; -+ /* Close the handle: this could invoke callbacks from the list -+ * above, which is why we don't want to delete them before -+ * closing the handle. -+ */ -+ caml_release_runtime_system (); -+ guestfs_close (g); -+ caml_acquire_runtime_system (); -+ -+ /* Now unregister the global roots. */ -+ if (roots && len > 0) { -+ size_t i; -+ for (i = 0; i < len; ++i) { -+ caml_remove_generational_global_root (roots[i]); -+ free (roots[i]); -+ } -+ free (roots); -+ } -+ -+ /* So we don't double-free. */ -+ Guestfs_val (gv) = NULL; -+ } - - CAMLreturn (Val_unit); - } --- -2.43.0 - diff --git a/0002-ocaml-Nullify-custom-block-before-releasing-runtime-.patch b/0002-ocaml-Nullify-custom-block-before-releasing-runtime-.patch deleted file mode 100644 index 80b67ab..0000000 --- a/0002-ocaml-Nullify-custom-block-before-releasing-runtime-.patch +++ /dev/null @@ -1,41 +0,0 @@ -From e93fd7e8acf34192c0d1b70611e3474dde346941 Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Thu, 14 Dec 2023 08:33:10 +0000 -Subject: [PATCH 2/2] ocaml: Nullify custom block before releasing runtime lock - -Avoids a potential, though if possible then very rare, double free -path. - -Suggested-by: Guillaume Munch-Maccagnoni -See: https://github.com/ocaml/ocaml/issues/12820 ---- - ocaml/guestfs-c.c | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/ocaml/guestfs-c.c b/ocaml/guestfs-c.c -index 700c33abf4..ea9a0598a6 100644 ---- a/ocaml/guestfs-c.c -+++ b/ocaml/guestfs-c.c -@@ -156,6 +156,9 @@ guestfs_int_ocaml_close (value gv) - size_t len; - value **roots = get_all_event_callbacks (g, &len); - -+ /* So we don't double-free. */ -+ Guestfs_val (gv) = NULL; -+ - /* Close the handle: this could invoke callbacks from the list - * above, which is why we don't want to delete them before - * closing the handle. -@@ -173,9 +176,6 @@ guestfs_int_ocaml_close (value gv) - } - free (roots); - } -- -- /* So we don't double-free. */ -- Guestfs_val (gv) = NULL; - } - - CAMLreturn (Val_unit); --- -2.43.0 - diff --git a/libguestfs.spec b/libguestfs.spec index 3e44075..4753cf8 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -49,8 +49,8 @@ ExcludeArch: %{ix86} Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 -Version: 1.51.9 -Release: 4%{?dist} +Version: 1.51.10 +Release: 1%{?dist} License: LGPL-2.1-or-later # Build only for architectures that have a kernel @@ -84,10 +84,6 @@ Source7: libguestfs.keyring # Maintainer script which helps with handling patches. Source8: copy-patches.sh -# Fixes for https://github.com/ocaml/ocaml/issues/12820 -Patch: 0001-ocaml-Use-Gc.finalise-instead-of-a-C-finalizer.patch -Patch: 0002-ocaml-Nullify-custom-block-before-releasing-runtime-.patch - %if 0%{patches_touch_autotools} BuildRequires: autoconf, automake, libtool, gettext-devel %endif @@ -1098,6 +1094,9 @@ rm ocaml/html/.gitignore %changelog +* Tue Dec 19 2023 Richard W.M. Jones - 1:1.51.10-1 +- New upstream development version 1.51.10 + * Mon Dec 18 2023 Richard W.M. Jones - 1:1.51.9-4 - OCaml 5.1.1 + s390x code gen fix for Fedora 40 diff --git a/sources b/sources index ba9c6a2..fd66f1a 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (libguestfs-1.51.9.tar.gz) = 496f9e5a4fb9b7eef56c7dd35720a2ef1f56f286d14e6d3425c317638c7a7ab05563e628f9e5bc9d715ecfbb8f739abd4e8f415d9b352580070216e6b7659ee0 -SHA512 (libguestfs-1.51.9.tar.gz.sig) = 1e2155d7939a2cbd227a4c01f6fdd8e8d4846345abc8cf5e580a5692f36cba0167b92453a552132899689b591ade82b57f4952cf00b058bf53e57eefb1914c72 +SHA512 (libguestfs-1.51.10.tar.gz) = 3c86a9db596433e54dc1cb7d24ce62f2d283208bcc34bd4c47a22f363655b855bc0d9dfcbdd0b803f086fba3e9f97fd98c02d6b4e50f768f4ddedfd4a6c6beff +SHA512 (libguestfs-1.51.10.tar.gz.sig) = 50819a2cd5de70f9875101517469c137bd14aa8728229abebdd7018bfeda7918148bb951342288d4d89fcbdfc72d8d5e69c8abb60cec0c8cf041c76543e20cb3 From 9ee8f6de715a90b6b20db10d2da19b4f855d3c39 Mon Sep 17 00:00:00 2001 From: Mamoru TASAKA Date: Thu, 4 Jan 2024 00:13:11 +0900 Subject: [PATCH 146/243] Rebuild for https://fedoraproject.org/wiki/Changes/Ruby_3.3 --- libguestfs.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libguestfs.spec b/libguestfs.spec index 4753cf8..0de24c7 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -50,7 +50,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.51.10 -Release: 1%{?dist} +Release: 2%{?dist} License: LGPL-2.1-or-later # Build only for architectures that have a kernel @@ -1094,6 +1094,9 @@ rm ocaml/html/.gitignore %changelog +* Wed Jan 03 2024 Mamoru TASAKA - 1:1.51.10-2 +- Rebuild for https://fedoraproject.org/wiki/Changes/Ruby_3.3 + * Tue Dec 19 2023 Richard W.M. Jones - 1:1.51.10-1 - New upstream development version 1.51.10 From 345e2a7513f623b17bb9ddb4ff5a4f3c3fd55cbe Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 4 Jan 2024 18:01:55 +0000 Subject: [PATCH 147/243] New upstream stable branch version 1.52.0 --- libguestfs.spec | 9 ++++++--- sources | 4 ++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index 0de24c7..c01bba8 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -38,7 +38,7 @@ ExcludeArch: %{ix86} %endif # The source directory. -%global source_directory 1.51-development +%global source_directory 1.52-stable # Filter perl provides. %{?perl_default_filter} @@ -49,8 +49,8 @@ ExcludeArch: %{ix86} Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 -Version: 1.51.10 -Release: 2%{?dist} +Version: 1.52.0 +Release: 1%{?dist} License: LGPL-2.1-or-later # Build only for architectures that have a kernel @@ -1094,6 +1094,9 @@ rm ocaml/html/.gitignore %changelog +* Thu Jan 4 2024 Richard W.M. Jones - 1:1.52.0-1 +- New upstream stable branch version 1.52.0 + * Wed Jan 03 2024 Mamoru TASAKA - 1:1.51.10-2 - Rebuild for https://fedoraproject.org/wiki/Changes/Ruby_3.3 diff --git a/sources b/sources index fd66f1a..efde8ee 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (libguestfs-1.51.10.tar.gz) = 3c86a9db596433e54dc1cb7d24ce62f2d283208bcc34bd4c47a22f363655b855bc0d9dfcbdd0b803f086fba3e9f97fd98c02d6b4e50f768f4ddedfd4a6c6beff -SHA512 (libguestfs-1.51.10.tar.gz.sig) = 50819a2cd5de70f9875101517469c137bd14aa8728229abebdd7018bfeda7918148bb951342288d4d89fcbdfc72d8d5e69c8abb60cec0c8cf041c76543e20cb3 +SHA512 (libguestfs-1.52.0.tar.gz) = 48dfaabb6b371ab3476b42310d363addf2fd1dfe43876be3bc984953f6919a30c7de13ef235d83fdd39117d71aa6bbfb5fbb645c1b17bc3031798a2a2b3df9d7 +SHA512 (libguestfs-1.52.0.tar.gz.sig) = c147e3b894c65137145228d70bcda3975a4dd4faa04c066d6783799e3d4825c2eee7c093601002f3a352989d81a75dd63c754f149201921abdded96ecb7a6214 From da7b00357148b40c24770a116a0fbb879a8c26b9 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 8 Jan 2024 21:21:57 +0000 Subject: [PATCH 148/243] Add link to explanation of why we are building a repo of RPMs --- libguestfs.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libguestfs.spec b/libguestfs.spec index c01bba8..4418867 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -724,6 +724,8 @@ if ping -c 3 -w 20 8.8.8.8 && wget http://libguestfs.org -O /dev/null; then extra= else mkdir cachedir repo + # For an explanation of what we are doing here, see: + # https://lists.fedorahosted.org/archives/list/koji-devel@lists.fedorahosted.org/thread/ZIBY53JAURLT3QRBBJIJJ7EZWLZDE3TI/ # -n 1 because of RHBZ#980502. find /var/cache/{dnf,yum} -type f -name '*.rpm' -print0 | \ xargs -0 -n 1 cp -t repo From 43a1d7a11032d396a019cce570d7ef47d59168f3 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 8 Jan 2024 21:22:27 +0000 Subject: [PATCH 149/243] Look for RPMs in /var/cache/libdnf5 https://bugzilla.redhat.com/show_bug.cgi?id=2256945#c5 --- libguestfs.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index 4418867..f58fb84 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -50,7 +50,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.52.0 -Release: 1%{?dist} +Release: 2%{?dist} License: LGPL-2.1-or-later # Build only for architectures that have a kernel @@ -727,7 +727,7 @@ else # For an explanation of what we are doing here, see: # https://lists.fedorahosted.org/archives/list/koji-devel@lists.fedorahosted.org/thread/ZIBY53JAURLT3QRBBJIJJ7EZWLZDE3TI/ # -n 1 because of RHBZ#980502. - find /var/cache/{dnf,yum} -type f -name '*.rpm' -print0 | \ + find /var/cache/{dnf,libdnf5,yum} -type f -name '*.rpm' -print0 | \ xargs -0 -n 1 cp -t repo createrepo_c repo sed -e "s|@PWD@|$(pwd)|" %{SOURCE6} > yum.conf @@ -1096,6 +1096,10 @@ rm ocaml/html/.gitignore %changelog +* Mon Jan 8 2024 Richard W.M. Jones - 1:1.52.0-2 +- Look for RPMs in /var/cache/libdnf5 + https://bugzilla.redhat.com/show_bug.cgi?id=2256945#c5 + * Thu Jan 4 2024 Richard W.M. Jones - 1:1.52.0-1 - New upstream stable branch version 1.52.0 From 3a2a7734bd3ab7e848d8e04cf26a7f5215d6c9aa Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 9 Jan 2024 09:30:41 +0000 Subject: [PATCH 150/243] Make cache directory find more robust /var/cache/libdnf5 may be missing if dnf5 is not around --- libguestfs.spec | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index f58fb84..32e2bc1 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -50,7 +50,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.52.0 -Release: 2%{?dist} +Release: 3%{?dist} License: LGPL-2.1-or-later # Build only for architectures that have a kernel @@ -727,8 +727,12 @@ else # For an explanation of what we are doing here, see: # https://lists.fedorahosted.org/archives/list/koji-devel@lists.fedorahosted.org/thread/ZIBY53JAURLT3QRBBJIJJ7EZWLZDE3TI/ # -n 1 because of RHBZ#980502. - find /var/cache/{dnf,libdnf5,yum} -type f -name '*.rpm' -print0 | \ - xargs -0 -n 1 cp -t repo + dirs= + for d in /var/cache/{dnf,libdnf5,yum} ; do + if test -d $d ; then dirs="$dirs $d" ; fi + done + test -n "$dirs" + find $dirs -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 @@ -1096,6 +1100,10 @@ rm ocaml/html/.gitignore %changelog +* Tue Jan 9 2024 Richard W.M. Jones - 1:1.52.0-3 +- Make cache directory find more robust + /var/cache/libdnf5 may be missing if dnf5 is not around + * Mon Jan 8 2024 Richard W.M. Jones - 1:1.52.0-2 - Look for RPMs in /var/cache/libdnf5 https://bugzilla.redhat.com/show_bug.cgi?id=2256945#c5 From 181f457c59a22865b7e6f508524130ed8396cb37 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 15 Jan 2024 09:38:37 +0000 Subject: [PATCH 151/243] Use curl instead of wget, since wget2 is broken (https://gitlab.com/gnuwget/wget2/-/issues/652) --- libguestfs.spec | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index 32e2bc1..75fa4bf 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -50,7 +50,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.52.0 -Release: 3%{?dist} +Release: 4%{?dist} License: LGPL-2.1-or-later # Build only for architectures that have a kernel @@ -140,7 +140,7 @@ BuildRequires: jansson-devel BuildRequires: systemd-devel BuildRequires: bash-completion BuildRequires: /usr/bin/ping -BuildRequires: /usr/bin/wget +BuildRequires: curl BuildRequires: xz BuildRequires: zstd BuildRequires: libzstd-devel @@ -720,7 +720,7 @@ 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 +if ping -c 3 -w 20 8.8.8.8 && curl http://libguestfs.org -o /dev/null; then extra= else mkdir cachedir repo @@ -1100,6 +1100,10 @@ rm ocaml/html/.gitignore %changelog +* Mon Jan 15 2024 Richard W.M. Jones - 1:1.52.0-4 +- Use curl instead of wget, since wget2 is broken + (https://gitlab.com/gnuwget/wget2/-/issues/652) + * Tue Jan 9 2024 Richard W.M. Jones - 1:1.52.0-3 - Make cache directory find more robust /var/cache/libdnf5 may be missing if dnf5 is not around From 1b8e34eb452b50af9114c8380c4b28b523feeeb9 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 15 Jan 2024 12:24:43 +0000 Subject: [PATCH 152/243] Remove yajl daemon dep and replace with jansson In libguestfs we removed the need to yajl back in libguestfs 1.40 (Feb 2018). However this persisted in the spec file until now. Remove the yajl dep, but add the dep on jansson (the replacement json library that we are using now). --- libguestfs.spec | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index 75fa4bf..d50bc24 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -50,7 +50,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.52.0 -Release: 4%{?dist} +Release: 5%{?dist} License: LGPL-2.1-or-later # Build only for architectures that have a kernel @@ -271,7 +271,6 @@ BuildRequires: util-linux BuildRequires: vim-minimal BuildRequires: xfsprogs BuildRequires: xz -BuildRequires: yajl %if !0%{?rhel} BuildRequires: zerofree %endif @@ -294,6 +293,7 @@ Requires: (%{name}-appliance = %{epoch}:%{version}-%{release} or %{name}-no # The daemon dependencies are not included automatically, because it # is buried inside the appliance, so list them here. Requires: augeas-libs%{?_isa} >= 1.7.0 +Requires: jansson%{?_isa} Requires: libacl%{?_isa} Requires: libcap%{?_isa} Requires: libselinux%{?_isa} @@ -301,7 +301,6 @@ Requires: hivex-libs%{?_isa} >= 1.3.10 Requires: pcre2%{?_isa} Requires: rpm-libs%{?_isa} >= 4.16.1.3 Requires: systemd-libs%{?_isa} -Requires: yajl%{?_isa} # For core mount-local (FUSE) API. Requires: fuse @@ -1100,9 +1099,10 @@ rm ocaml/html/.gitignore %changelog -* Mon Jan 15 2024 Richard W.M. Jones - 1:1.52.0-4 +* Mon Jan 15 2024 Richard W.M. Jones - 1:1.52.0-5 - Use curl instead of wget, since wget2 is broken (https://gitlab.com/gnuwget/wget2/-/issues/652) +- Remove yajl daemon dep and replace with jansson. * Tue Jan 9 2024 Richard W.M. Jones - 1:1.52.0-3 - Make cache directory find more robust From 266db04dfd4c8060899878cb4ee384f3ded8a656 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sun, 21 Jan 2024 04:16:38 +0000 Subject: [PATCH 153/243] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- libguestfs.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libguestfs.spec b/libguestfs.spec index d50bc24..958b6ef 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -50,7 +50,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.52.0 -Release: 5%{?dist} +Release: 6%{?dist} License: LGPL-2.1-or-later # Build only for architectures that have a kernel @@ -1099,6 +1099,9 @@ rm ocaml/html/.gitignore %changelog +* Sun Jan 21 2024 Fedora Release Engineering - 1:1.52.0-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Mon Jan 15 2024 Richard W.M. Jones - 1:1.52.0-5 - Use curl instead of wget, since wget2 is broken (https://gitlab.com/gnuwget/wget2/-/issues/652) From deb6124adba6551fe88f24b8fac52f284cb422da Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 25 Jan 2024 02:23:59 +0000 Subject: [PATCH 154/243] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- libguestfs.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libguestfs.spec b/libguestfs.spec index 958b6ef..ffe732e 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -50,7 +50,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.52.0 -Release: 6%{?dist} +Release: 7%{?dist} License: LGPL-2.1-or-later # Build only for architectures that have a kernel @@ -1099,6 +1099,9 @@ rm ocaml/html/.gitignore %changelog +* Thu Jan 25 2024 Fedora Release Engineering - 1:1.52.0-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Sun Jan 21 2024 Fedora Release Engineering - 1:1.52.0-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From 89084e10d2131f24b084fd9b010794746023a9e2 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Mon, 13 Jul 2020 21:01:53 +0000 Subject: [PATCH 155/243] Use make macros https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro --- libguestfs.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index ffe732e..c21f5a3 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -761,7 +761,7 @@ fi # 'INSTALLDIRS' ensures that Perl and Ruby libs are installed in the # vendor dir not the site dir. -make V=1 INSTALLDIRS=vendor %{?_smp_mflags} +%make_build INSTALLDIRS=vendor %check @@ -787,7 +787,7 @@ fi %install # 'INSTALLDIRS' ensures that Perl and Ruby libs are installed in the # vendor dir not the site dir. -make DESTDIR=$RPM_BUILD_ROOT INSTALLDIRS=vendor install +%make_install INSTALLDIRS=vendor # Delete static libraries. rm $( find $RPM_BUILD_ROOT -name '*.a' | grep -v /ocaml/ ) From ca0111fc5a9793af122c6120a1080dad8ec46299 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 25 Mar 2024 11:19:24 +0000 Subject: [PATCH 156/243] Use %{bash_completions_dir} macro --- libguestfs.spec | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index c21f5a3..e648369 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -50,7 +50,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.52.0 -Release: 7%{?dist} +Release: 8%{?dist} License: LGPL-2.1-or-later # Build only for architectures that have a kernel @@ -983,16 +983,16 @@ rm ocaml/html/.gitignore %files bash-completion -%dir %{_datadir}/bash-completion/completions -%{_datadir}/bash-completion/completions/guestfish -%{_datadir}/bash-completion/completions/guestmount -%{_datadir}/bash-completion/completions/guestunmount -%{_datadir}/bash-completion/completions/libguestfs-test-tool -%{_datadir}/bash-completion/completions/virt-copy-in -%{_datadir}/bash-completion/completions/virt-copy-out -%{_datadir}/bash-completion/completions/virt-rescue -%{_datadir}/bash-completion/completions/virt-tar-in -%{_datadir}/bash-completion/completions/virt-tar-out +%dir %{bash_completions_dir} +%{bash_completions_dir}/guestfish +%{bash_completions_dir}/guestmount +%{bash_completions_dir}/guestunmount +%{bash_completions_dir}/libguestfs-test-tool +%{bash_completions_dir}/virt-copy-in +%{bash_completions_dir}/virt-copy-out +%{bash_completions_dir}/virt-rescue +%{bash_completions_dir}/virt-tar-in +%{bash_completions_dir}/virt-tar-out %files -n ocaml-%{name} @@ -1099,6 +1099,9 @@ rm ocaml/html/.gitignore %changelog +* Mon Mar 25 2024 Richard W.M. Jones - 1:1.52.0-8 +- Use %%{bash_completions_dir} macro + * Thu Jan 25 2024 Fedora Release Engineering - 1:1.52.0-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From 79af29a9b790787e915f98f75c5ca9ce04554556 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 25 Mar 2024 11:36:49 +0000 Subject: [PATCH 157/243] BR bash-completion-devel, new in Rawhide --- libguestfs.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libguestfs.spec b/libguestfs.spec index e648369..37bf6fe 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -138,7 +138,7 @@ BuildRequires: libldm-devel %endif BuildRequires: jansson-devel BuildRequires: systemd-devel -BuildRequires: bash-completion +BuildRequires: bash-completion-devel BuildRequires: /usr/bin/ping BuildRequires: curl BuildRequires: xz @@ -1101,6 +1101,7 @@ rm ocaml/html/.gitignore %changelog * Mon Mar 25 2024 Richard W.M. Jones - 1:1.52.0-8 - Use %%{bash_completions_dir} macro +- BR bash-completion-devel, new in Rawhide * Thu Jan 25 2024 Fedora Release Engineering - 1:1.52.0-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From a8d4e145288e02dad33136d71446683da5a87691 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 12 Apr 2024 11:27:21 +0100 Subject: [PATCH 158/243] gating: Match any version of RHEL --- gating.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gating.yaml b/gating.yaml index 9234236..309384e 100755 --- a/gating.yaml +++ b/gating.yaml @@ -1,6 +1,6 @@ --- !Policy product_versions: - - rhel-9 + - rhel-* decision_context: osci_compose_gate rules: - !PassingTestCaseRule {test_case_name: xen-ci.brew-build.tier1.functional} From de8348178796dc25edcb9396e1d28e27bc0af98c Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 12 Apr 2024 22:13:53 +0100 Subject: [PATCH 159/243] Unconditionally run autoreconf --- libguestfs.spec | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index 37bf6fe..3987f3e 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -29,14 +29,6 @@ ExcludeArch: %{ix86} # Verify tarball signature with GPGv2. %global verify_tarball_signature 1 -# If there are patches which touch autotools files, set this to 1. -%if !0%{?rhel} -%global patches_touch_autotools %{nil} -%else -# On RHEL the downstream patches always touch autotools files. -%global patches_touch_autotools 1 -%endif - # The source directory. %global source_directory 1.52-stable @@ -84,9 +76,7 @@ Source7: libguestfs.keyring # Maintainer script which helps with handling patches. Source8: copy-patches.sh -%if 0%{patches_touch_autotools} BuildRequires: autoconf, automake, libtool, gettext-devel -%endif # Basic build requirements. BuildRequires: gcc, gcc-c++ @@ -696,9 +686,7 @@ for %{name}. %setup -q %autopatch -p1 -%if 0%{patches_touch_autotools} -autoreconf -i -%endif +autoreconf -fiv # For sVirt to work, the local temporary directory we use in the tests # must be labelled the same way as /tmp. This doesn't work if either From 199875924f953113acdf27e255f0c3e185feaeeb Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 25 Apr 2024 15:20:01 +0100 Subject: [PATCH 160/243] New upstream development version 1.53.1 --- libguestfs.spec | 9 ++++++--- sources | 4 ++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index 3987f3e..52b9005 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -30,7 +30,7 @@ ExcludeArch: %{ix86} %global verify_tarball_signature 1 # The source directory. -%global source_directory 1.52-stable +%global source_directory 1.53-development # Filter perl provides. %{?perl_default_filter} @@ -41,8 +41,8 @@ ExcludeArch: %{ix86} Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 -Version: 1.52.0 -Release: 8%{?dist} +Version: 1.53.1 +Release: 1%{?dist} License: LGPL-2.1-or-later # Build only for architectures that have a kernel @@ -1087,6 +1087,9 @@ rm ocaml/html/.gitignore %changelog +* Thu Apr 25 2024 Richard W.M. Jones - 1:1.53.1-1 +- New upstream development version 1.53.1 + * Mon Mar 25 2024 Richard W.M. Jones - 1:1.52.0-8 - Use %%{bash_completions_dir} macro - BR bash-completion-devel, new in Rawhide diff --git a/sources b/sources index efde8ee..0d5f678 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (libguestfs-1.52.0.tar.gz) = 48dfaabb6b371ab3476b42310d363addf2fd1dfe43876be3bc984953f6919a30c7de13ef235d83fdd39117d71aa6bbfb5fbb645c1b17bc3031798a2a2b3df9d7 -SHA512 (libguestfs-1.52.0.tar.gz.sig) = c147e3b894c65137145228d70bcda3975a4dd4faa04c066d6783799e3d4825c2eee7c093601002f3a352989d81a75dd63c754f149201921abdded96ecb7a6214 +SHA512 (libguestfs-1.53.1.tar.gz) = 9d855b9d9482f70ee333fe0df3b34483fc301675461998c3fbcdc675c39b5d311a37da3a84c50ebe694eab92e2f3eca55e29ffe6e95b980e8355592e0b9a1b86 +SHA512 (libguestfs-1.53.1.tar.gz.sig) = 0aa6d5490c2575bec98b091ae00e9b97b78faec45160a161ea1b757a157e78416edbae5303d38c5a420267eafd466ca082632fed455a19e5590902682f36aab9 From aad58ab4ed529afd028ee909c7a5ce4a860a657c Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 10 May 2024 17:35:41 +0100 Subject: [PATCH 161/243] New upstream development version 1.53.2 --- libguestfs.spec | 5 ++++- sources | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index 52b9005..788ad2d 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -41,7 +41,7 @@ ExcludeArch: %{ix86} Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 -Version: 1.53.1 +Version: 1.53.2 Release: 1%{?dist} License: LGPL-2.1-or-later @@ -1087,6 +1087,9 @@ rm ocaml/html/.gitignore %changelog +* Fri May 10 2024 Richard W.M. Jones - 1:1.53.2-1 +- New upstream development version 1.53.2 + * Thu Apr 25 2024 Richard W.M. Jones - 1:1.53.1-1 - New upstream development version 1.53.1 diff --git a/sources b/sources index 0d5f678..2c6488e 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (libguestfs-1.53.1.tar.gz) = 9d855b9d9482f70ee333fe0df3b34483fc301675461998c3fbcdc675c39b5d311a37da3a84c50ebe694eab92e2f3eca55e29ffe6e95b980e8355592e0b9a1b86 -SHA512 (libguestfs-1.53.1.tar.gz.sig) = 0aa6d5490c2575bec98b091ae00e9b97b78faec45160a161ea1b757a157e78416edbae5303d38c5a420267eafd466ca082632fed455a19e5590902682f36aab9 +SHA512 (libguestfs-1.53.2.tar.gz) = 7491d6e957c311225e4e64d9d523561143d54dec747b06151322155b9457764b0ae81e547323e412576f5e03005edda730c507aa0390ca538a637d99f73c4e45 +SHA512 (libguestfs-1.53.2.tar.gz.sig) = 423a999686ac9fd9a3bf29936097cb86797a8f20aad398cf3eea4e9dee55aa0762e1610327bb7f96d7ff216d0fea46625634b2a154755810456d90285253a9af From 706a26efde33f12e91be43caf0bba32fd064df73 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 13 May 2024 11:33:03 +0100 Subject: [PATCH 162/243] Remove gdisk dependency for RHEL (https://issues.redhat.com/browse/RHEL-35998) --- libguestfs.spec | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libguestfs.spec b/libguestfs.spec index 788ad2d..fda66f2 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -204,8 +204,8 @@ BuildRequires: e2fsprogs BuildRequires: file BuildRequires: findutils BuildRequires: gawk -BuildRequires: gdisk %if !0%{?rhel} +BuildRequires: gdisk BuildRequires: gfs2-utils %endif BuildRequires: grep @@ -1089,6 +1089,8 @@ rm ocaml/html/.gitignore %changelog * Fri May 10 2024 Richard W.M. Jones - 1:1.53.2-1 - New upstream development version 1.53.2 +- Remove gdisk dependency for RHEL + (https://issues.redhat.com/browse/RHEL-35998) * Thu Apr 25 2024 Richard W.M. Jones - 1:1.53.1-1 - New upstream development version 1.53.1 From 4098de8c52789f30ac9557e934b24fb1c57020af Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 13 May 2024 15:34:36 +0100 Subject: [PATCH 163/243] Remove lua, perl, ruby, php and gobject bindings in RHEL gobject has always been problematic, and currently it does not work well with the latest version of GObject. lua, perl, ruby and php are reckoned to be unused in RHEL and pose considerable difficulties to maintenance. Remove them, with a view to re-adding later if a customer complains. --- libguestfs.spec | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index fda66f2..3e1e981 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -146,7 +146,6 @@ BuildRequires: ocaml-ocamldoc BuildRequires: ocaml-findlib-devel %if !0%{?rhel} BuildRequires: ocaml-ounit-devel -%endif BuildRequires: lua BuildRequires: lua-devel BuildRequires: perl-devel @@ -158,8 +157,10 @@ BuildRequires: perl(Test::Pod::Coverage) >= 1.00 BuildRequires: perl(Module::Build) BuildRequires: perl(ExtUtils::CBuilder) BuildRequires: perl(Locale::TextDomain) +%endif BuildRequires: python3-devel BuildRequires: python3-libvirt +%if !0%{?rhel} BuildRequires: ruby-devel BuildRequires: rubygem-rake # json is not pulled in automatically, see RHBZ#1325022 @@ -170,7 +171,6 @@ BuildRequires: ruby-irb BuildRequires: php-devel BuildRequires: gobject-introspection-devel BuildRequires: gjs -%if !0%{?rhel} BuildRequires: vala %endif %ifarch %{golang_arches} @@ -375,17 +375,23 @@ For developers: Language bindings: - libguestfs-gobject-devel GObject bindings and GObject Introspection +%if !0%{?rhel} +libguestfs-gobject-devel GObject bindings and GObject Introspection +%endif %ifarch %{golang_arches} golang-guestfs Go language bindings %endif +%if !0%{?rhel} lua-guestfs Lua bindings +%endif ocaml-libguestfs-devel OCaml bindings +%if !0%{?rhel} perl-Sys-Guestfs Perl bindings php-libguestfs PHP bindings +%endif python3-libguestfs Python 3 bindings - ruby-libguestfs Ruby bindings %if !0%{?rhel} + ruby-libguestfs Ruby bindings libguestfs-vala Vala language bindings %endif @@ -560,6 +566,7 @@ ocaml-%{name}-devel contains development libraries required to use the OCaml bindings for %{name}. +%if !0%{?rhel} %package -n perl-Sys-Guestfs Summary: Perl bindings for %{name} (Sys::Guestfs) Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release} @@ -567,6 +574,7 @@ Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release} %description -n perl-Sys-Guestfs perl-Sys-Guestfs contains Perl bindings for %{name} (Sys::Guestfs). +%endif %package -n python3-%{name} @@ -579,6 +587,7 @@ Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release} python3-%{name} contains Python 3 bindings for %{name}. +%if !0%{?rhel} %package -n ruby-%{name} Summary: Ruby bindings for %{name} Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release} @@ -631,7 +640,6 @@ This package is needed if you want to write software using the GObject bindings. It also contains GObject Introspection information. -%if !0%{?rhel} %package vala Summary: Vala for %{name} Requires: %{name}-devel%{?_isa} = %{epoch}:%{version}-%{release} @@ -1006,11 +1014,13 @@ rm ocaml/html/.gitignore %{_mandir}/man3/guestfs-ocaml.3* +%if !0%{?rhel} %files -n perl-Sys-Guestfs %doc perl/examples/*.pl %{perl_vendorarch}/* %{_mandir}/man3/Sys::Guestfs.3pm* %{_mandir}/man3/guestfs-perl.3* +%endif %files -n python3-%{name} @@ -1021,6 +1031,7 @@ rm ocaml/html/.gitignore %{_mandir}/man3/guestfs-python.3* +%if !0%{?rhel} %files -n ruby-%{name} %doc ruby/examples/*.rb %doc ruby/doc/site/* @@ -1058,7 +1069,6 @@ rm ocaml/html/.gitignore %{_mandir}/man3/guestfs-gobject.3* -%if !0%{?rhel} %files vala %{_datadir}/vala/vapi/libguestfs-gobject-1.0.deps %{_datadir}/vala/vapi/libguestfs-gobject-1.0.vapi @@ -1091,6 +1101,7 @@ rm ocaml/html/.gitignore - New upstream development version 1.53.2 - Remove gdisk dependency for RHEL (https://issues.redhat.com/browse/RHEL-35998) +- Remove lua, perl, ruby, php and gobject bindings in RHEL * Thu Apr 25 2024 Richard W.M. Jones - 1:1.53.1-1 - New upstream development version 1.53.1 From 4bc66245565b4619740794dc104d0979748c7974 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 13 May 2024 16:07:17 +0100 Subject: [PATCH 164/243] ./configure --disable-perl and other unused languages in RHEL 10 Fixes: commit 4098de8c52789f30ac9557e934b24fb1c57020af --- libguestfs.spec | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libguestfs.spec b/libguestfs.spec index 3e1e981..9c4a395 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -753,6 +753,13 @@ fi %endif --without-java \ --disable-erlang \ +%if 0%{?rhel} + --disable-gobject \ + --disable-lua \ + --disable-perl \ + --disable-php \ + --disable-ruby \ +%endif $extra # 'INSTALLDIRS' ensures that Perl and Ruby libs are installed in the From 18d03723531c5ba5502bdb356a2081015d993a6b Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 29 May 2024 22:10:53 +0100 Subject: [PATCH 165/243] OCaml 5.2.0 for Fedora 41 --- libguestfs.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libguestfs.spec b/libguestfs.spec index 9c4a395..6d978f9 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -42,7 +42,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.53.2 -Release: 1%{?dist} +Release: 2%{?dist} License: LGPL-2.1-or-later # Build only for architectures that have a kernel @@ -1104,6 +1104,9 @@ rm ocaml/html/.gitignore %changelog +* Wed May 29 2024 Richard W.M. Jones - 1:1.53.2-2 +- OCaml 5.2.0 for Fedora 41 + * Fri May 10 2024 Richard W.M. Jones - 1:1.53.2-1 - New upstream development version 1.53.2 - Remove gdisk dependency for RHEL From 608cf467fa82274230770a5eec8e3c282199c457 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 31 May 2024 21:13:21 +0100 Subject: [PATCH 166/243] Re-enable perl in RHEL, needed for virt-win-reg. Updates: commit 4bc66245565b4619740794dc104d0979748c7974 Updates: commit 4098de8c52789f30ac9557e934b24fb1c57020af --- libguestfs.spec | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index 6d978f9..b6fae45 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -42,7 +42,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.53.2 -Release: 2%{?dist} +Release: 3%{?dist} License: LGPL-2.1-or-later # Build only for architectures that have a kernel @@ -148,6 +148,7 @@ BuildRequires: ocaml-findlib-devel BuildRequires: ocaml-ounit-devel BuildRequires: lua BuildRequires: lua-devel +%endif BuildRequires: perl-devel BuildRequires: perl-generators BuildRequires: perl-macros @@ -157,7 +158,6 @@ BuildRequires: perl(Test::Pod::Coverage) >= 1.00 BuildRequires: perl(Module::Build) BuildRequires: perl(ExtUtils::CBuilder) BuildRequires: perl(Locale::TextDomain) -%endif BuildRequires: python3-devel BuildRequires: python3-libvirt %if !0%{?rhel} @@ -385,8 +385,8 @@ libguestfs-gobject-devel GObject bindings and GObject Introspection lua-guestfs Lua bindings %endif ocaml-libguestfs-devel OCaml bindings -%if !0%{?rhel} perl-Sys-Guestfs Perl bindings +%if !0%{?rhel} php-libguestfs PHP bindings %endif python3-libguestfs Python 3 bindings @@ -566,7 +566,6 @@ ocaml-%{name}-devel contains development libraries required to use the OCaml bindings for %{name}. -%if !0%{?rhel} %package -n perl-Sys-Guestfs Summary: Perl bindings for %{name} (Sys::Guestfs) Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release} @@ -574,7 +573,6 @@ Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release} %description -n perl-Sys-Guestfs perl-Sys-Guestfs contains Perl bindings for %{name} (Sys::Guestfs). -%endif %package -n python3-%{name} @@ -756,7 +754,6 @@ fi %if 0%{?rhel} --disable-gobject \ --disable-lua \ - --disable-perl \ --disable-php \ --disable-ruby \ %endif @@ -1021,13 +1018,11 @@ rm ocaml/html/.gitignore %{_mandir}/man3/guestfs-ocaml.3* -%if !0%{?rhel} %files -n perl-Sys-Guestfs %doc perl/examples/*.pl %{perl_vendorarch}/* %{_mandir}/man3/Sys::Guestfs.3pm* %{_mandir}/man3/guestfs-perl.3* -%endif %files -n python3-%{name} @@ -1104,6 +1099,9 @@ rm ocaml/html/.gitignore %changelog +* Fri May 31 2024 Richard W.M. Jones - 1:1.53.2-3 +- Re-enable perl in RHEL, needed for virt-win-reg. + * Wed May 29 2024 Richard W.M. Jones - 1:1.53.2-2 - OCaml 5.2.0 for Fedora 41 From 2592e5fc6052a84678175d195be9d640a5968886 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Mon, 10 Jun 2024 14:35:30 +0200 Subject: [PATCH 167/243] Rebuilt for Python 3.13 --- libguestfs.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libguestfs.spec b/libguestfs.spec index b6fae45..42c2a67 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -42,7 +42,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.53.2 -Release: 3%{?dist} +Release: 4%{?dist} License: LGPL-2.1-or-later # Build only for architectures that have a kernel @@ -1099,6 +1099,9 @@ rm ocaml/html/.gitignore %changelog +* Mon Jun 10 2024 Python Maint - 1:1.53.2-4 +- Rebuilt for Python 3.13 + * Fri May 31 2024 Richard W.M. Jones - 1:1.53.2-3 - Re-enable perl in RHEL, needed for virt-win-reg. From 1b88c1783318c55c7ebbe34e436441f0655965d7 Mon Sep 17 00:00:00 2001 From: Jitka Plesnikova Date: Wed, 12 Jun 2024 12:49:12 +0200 Subject: [PATCH 168/243] Perl 5.40 rebuild --- libguestfs.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libguestfs.spec b/libguestfs.spec index 42c2a67..c771a45 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -42,7 +42,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.53.2 -Release: 4%{?dist} +Release: 5%{?dist} License: LGPL-2.1-or-later # Build only for architectures that have a kernel @@ -1099,6 +1099,9 @@ rm ocaml/html/.gitignore %changelog +* Wed Jun 12 2024 Jitka Plesnikova - 1:1.53.2-5 +- Perl 5.40 rebuild + * Mon Jun 10 2024 Python Maint - 1:1.53.2-4 - Rebuilt for Python 3.13 From ad7b6d94c1f46a0a6cbe71b464d95314550a3ff9 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 19 Jun 2024 16:29:25 +0100 Subject: [PATCH 169/243] OCaml 5.2.0 ppc64le fix --- libguestfs.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libguestfs.spec b/libguestfs.spec index c771a45..e2880b1 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -42,7 +42,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.53.2 -Release: 5%{?dist} +Release: 6%{?dist} License: LGPL-2.1-or-later # Build only for architectures that have a kernel @@ -1099,6 +1099,9 @@ rm ocaml/html/.gitignore %changelog +* Wed Jun 19 2024 Richard W.M. Jones - 1:1.53.2-6 +- OCaml 5.2.0 ppc64le fix + * Wed Jun 12 2024 Jitka Plesnikova - 1:1.53.2-5 - Perl 5.40 rebuild From 7feb33cf01fbd4114b34663f2849d838a4158507 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 27 Jun 2024 16:37:31 +0100 Subject: [PATCH 170/243] New upstream development version 1.53.3 Remove glusterfs support. --- libguestfs.spec | 9 ++++++--- sources | 4 ++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index e2880b1..e987e40 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -41,8 +41,8 @@ ExcludeArch: %{ix86} Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 -Version: 1.53.2 -Release: 6%{?dist} +Version: 1.53.3 +Release: 1%{?dist} License: LGPL-2.1-or-later # Build only for architectures that have a kernel @@ -308,7 +308,6 @@ Requires: xz Requires: qemu-kvm-core %if !0%{?rhel} Suggests: qemu-block-curl -Suggests: qemu-block-gluster Suggests: qemu-block-iscsi %endif Suggests: qemu-block-rbd @@ -1099,6 +1098,10 @@ rm ocaml/html/.gitignore %changelog +* Fri May 10 2024 Richard W.M. Jones - 1:1.53.3-1 +- New upstream development version 1.53.3 +- Remove glusterfs support. + * Wed Jun 19 2024 Richard W.M. Jones - 1:1.53.2-6 - OCaml 5.2.0 ppc64le fix diff --git a/sources b/sources index 2c6488e..704bed5 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (libguestfs-1.53.2.tar.gz) = 7491d6e957c311225e4e64d9d523561143d54dec747b06151322155b9457764b0ae81e547323e412576f5e03005edda730c507aa0390ca538a637d99f73c4e45 -SHA512 (libguestfs-1.53.2.tar.gz.sig) = 423a999686ac9fd9a3bf29936097cb86797a8f20aad398cf3eea4e9dee55aa0762e1610327bb7f96d7ff216d0fea46625634b2a154755810456d90285253a9af +SHA512 (libguestfs-1.53.3.tar.gz) = 75d99b24cda6a41970c7d14d52bbaaf1e278673e3865e736bd03f97a3e4158b85fca313e63f9d55e2d82873de391b5c90f35a5ddbe7d0691b976ca05fc4a05e5 +SHA512 (libguestfs-1.53.3.tar.gz.sig) = e65911528355416451ecf5e940d2a8da75e9cb79b3f99be887732f229150d4a3281e13182e119637e0e2244cd829e6dd0753997f567d7cfff161057dd1749d9e From dfc275f11dac7e56b03fcba73d1a51731f39ee87 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 28 Jun 2024 12:13:41 +0100 Subject: [PATCH 171/243] Try to ignore copy-patches.sh in rpminspect MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Thanks: Miro Hrončok --- rpminspect.yaml | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 rpminspect.yaml diff --git a/rpminspect.yaml b/rpminspect.yaml new file mode 100644 index 0000000..ba87399 --- /dev/null +++ b/rpminspect.yaml @@ -0,0 +1,5 @@ +# Ignore copy-patches.sh. It is an internal script we use to +# manage the patches. +upstream: + ignore: + - copy-patches.sh From df317de3c79ee156fd682aa0c816ded5fbd1b2d7 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 28 Jun 2024 13:04:44 +0100 Subject: [PATCH 172/243] New upstream development version 1.53.4 Fix broken date in previous changelog entry. --- libguestfs.spec | 7 +++++-- sources | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index e987e40..6568af0 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -41,7 +41,7 @@ ExcludeArch: %{ix86} Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 -Version: 1.53.3 +Version: 1.53.4 Release: 1%{?dist} License: LGPL-2.1-or-later @@ -1098,7 +1098,10 @@ rm ocaml/html/.gitignore %changelog -* Fri May 10 2024 Richard W.M. Jones - 1:1.53.3-1 +* Fri Jun 28 2024 Richard W.M. Jones - 1:1.53.4-1 +- New upstream development version 1.53.4 + +* Thu Jun 27 2024 Richard W.M. Jones - 1:1.53.3-1 - New upstream development version 1.53.3 - Remove glusterfs support. diff --git a/sources b/sources index 704bed5..74f92d2 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (libguestfs-1.53.3.tar.gz) = 75d99b24cda6a41970c7d14d52bbaaf1e278673e3865e736bd03f97a3e4158b85fca313e63f9d55e2d82873de391b5c90f35a5ddbe7d0691b976ca05fc4a05e5 -SHA512 (libguestfs-1.53.3.tar.gz.sig) = e65911528355416451ecf5e940d2a8da75e9cb79b3f99be887732f229150d4a3281e13182e119637e0e2244cd829e6dd0753997f567d7cfff161057dd1749d9e +SHA512 (libguestfs-1.53.4.tar.gz) = 856ed0900e600cb2b557ee2c17519d31ddaeb9526035e1c34f523d9e57735c3321931944b2a2738aae7ba7d4449d831f37b36d09adccaaabe2a26f902ece8053 +SHA512 (libguestfs-1.53.4.tar.gz.sig) = a6fa0cc91c07c8613a7714e31d23a428e143099f2c0ba298af8f64e7213ea67fdf78051914521dde6382fece9b457fdad377587607587f2b482cf9be15919ff7 From dff1c1d43171827c90ab54fc5d7a16bef9c109be Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 8 Jul 2024 16:46:53 +0100 Subject: [PATCH 173/243] New upstream development version 1.53.5 --- libguestfs.spec | 5 ++++- sources | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index 6568af0..419c956 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -41,7 +41,7 @@ ExcludeArch: %{ix86} Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 -Version: 1.53.4 +Version: 1.53.5 Release: 1%{?dist} License: LGPL-2.1-or-later @@ -1098,6 +1098,9 @@ rm ocaml/html/.gitignore %changelog +* Mon Jul 08 2024 Richard W.M. Jones - 1:1.53.5-1 +- New upstream development version 1.53.5 + * Fri Jun 28 2024 Richard W.M. Jones - 1:1.53.4-1 - New upstream development version 1.53.4 diff --git a/sources b/sources index 74f92d2..d5d8c7d 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (libguestfs-1.53.4.tar.gz) = 856ed0900e600cb2b557ee2c17519d31ddaeb9526035e1c34f523d9e57735c3321931944b2a2738aae7ba7d4449d831f37b36d09adccaaabe2a26f902ece8053 -SHA512 (libguestfs-1.53.4.tar.gz.sig) = a6fa0cc91c07c8613a7714e31d23a428e143099f2c0ba298af8f64e7213ea67fdf78051914521dde6382fece9b457fdad377587607587f2b482cf9be15919ff7 +SHA512 (libguestfs-1.53.5.tar.gz) = cae8ad68ec79d5c5756fb6d44e9c74cae8159dba9cc7043991c97b2abb4a514f7e7e4ea77a285347e9bf5821cfc5d3cd6009bc7effdbaaa0eaca5aee781c3abc +SHA512 (libguestfs-1.53.5.tar.gz.sig) = 68aeb6b248d1a7cafdcfee8d8cbf73b6bfd4191e7b25e9cb3c23505f449dd2d438f0a669684b2b809001dafa669866f4e072d9e538226e5593c4ef5b23524483 From 9077713557f4ddb8ad0634a1c633e9cd65365b5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Wed, 10 Jul 2024 11:16:47 +0200 Subject: [PATCH 174/243] Rebuilt for the bin-sbin merge https://fedoraproject.org/wiki/Changes/Unify_bin_and_sbin --- libguestfs.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libguestfs.spec b/libguestfs.spec index 419c956..1cf8583 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -42,7 +42,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.53.5 -Release: 1%{?dist} +Release: 2%{?dist} License: LGPL-2.1-or-later # Build only for architectures that have a kernel @@ -1098,6 +1098,9 @@ rm ocaml/html/.gitignore %changelog +* Wed Jul 10 2024 Zbigniew Jędrzejewski-Szmek - 1:1.53.5-2 +- Rebuilt for the bin-sbin merge + * Mon Jul 08 2024 Richard W.M. Jones - 1:1.53.5-1 - New upstream development version 1.53.5 From a05db776080fdcd08a13c4f9d94e9f2ac18a44b7 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 18 Jul 2024 14:03:48 +0000 Subject: [PATCH 175/243] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild --- libguestfs.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libguestfs.spec b/libguestfs.spec index 1cf8583..fadb665 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -42,7 +42,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.53.5 -Release: 2%{?dist} +Release: 3%{?dist} License: LGPL-2.1-or-later # Build only for architectures that have a kernel @@ -1098,6 +1098,9 @@ rm ocaml/html/.gitignore %changelog +* Thu Jul 18 2024 Fedora Release Engineering - 1:1.53.5-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + * Wed Jul 10 2024 Zbigniew Jędrzejewski-Szmek - 1:1.53.5-2 - Rebuilt for the bin-sbin merge From 8f1a2c16fd7572e2b09bb166bb3d441b1f7538dc Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 25 Jul 2024 12:36:51 +0100 Subject: [PATCH 176/243] Remove syslinux dependencies on RHEL --- libguestfs.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libguestfs.spec b/libguestfs.spec index fadb665..d21aaf1 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -251,9 +251,11 @@ BuildRequires: sleuthkit %endif BuildRequires: squashfs-tools BuildRequires: strace +%if !0%{?rhel} %ifarch %{ix86} x86_64 BuildRequires: syslinux syslinux-extlinux %endif +%endif BuildRequires: systemd BuildRequires: tar BuildRequires: udev From 481bf76bdaadf8523507cd945b8f235fef8d6f1e Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 16 Aug 2024 09:01:00 +0100 Subject: [PATCH 177/243] Fix kernel hang (RHBZ#2303267) --- ...on-t-set-impossible-noop-disk-schedu.patch | 108 ++++++++++++++++++ libguestfs.spec | 10 +- 2 files changed, 117 insertions(+), 1 deletion(-) create mode 100644 0001-appliance-init-Don-t-set-impossible-noop-disk-schedu.patch diff --git a/0001-appliance-init-Don-t-set-impossible-noop-disk-schedu.patch b/0001-appliance-init-Don-t-set-impossible-noop-disk-schedu.patch new file mode 100644 index 0000000..2babe5d --- /dev/null +++ b/0001-appliance-init-Don-t-set-impossible-noop-disk-schedu.patch @@ -0,0 +1,108 @@ +From b2d682a4730ead8b4ae07e5aaf6fa230c5eec305 Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Fri, 16 Aug 2024 08:26:34 +0100 +Subject: [PATCH] appliance/init: Don't set impossible "noop" disk scheduler + +Since RHEL 7.4, the noop scheduler is no longer a thing. Trying to +set it results in the error: + + + echo noop + /init: line 108: echo: write error: Invalid argument + +The current recommendation (https://access.redhat.com/solutions/5427) +is to use mq-deadline, but that's also the default so we don't have to +do anything. + +A bigger reason to remove these lines is that kernel 6.11.0 has +introduced a hang where -- rarely -- the ext4 filesystem hangs if you +try to change the scheduler while handing a page fault, even if you're +setting a scheduler that doesn't exist. I couldn't get much detail +except for a couple of stack traces from different VMs: + + crash> set 234 + PID: 234 + COMMAND: "modprobe" + TASK: ffff9f5ec3a22f40 [THREAD_INFO: ffff9f5ec3a22f40] + CPU: 0 + STATE: TASK_UNINTERRUPTIBLE + crash> bt + PID: 234 TASK: ffff9f5ec3a22f40 CPU: 0 COMMAND: "modprobe" + #0 [ffffb21e002e7840] __schedule at ffffffffa718f6d0 + #1 [ffffb21e002e78f8] schedule at ffffffffa7190a27 + #2 [ffffb21e002e7908] __bio_queue_enter at ffffffffa67e121c + #3 [ffffb21e002e7968] blk_mq_submit_bio at ffffffffa67f358c + #4 [ffffb21e002e79f0] __submit_bio at ffffffffa67e1e3c + #5 [ffffb21e002e7a58] submit_bio_noacct_nocheck at ffffffffa67e2326 + #6 [ffffb21e002e7ac0] ext4_mpage_readpages at ffffffffa65ceafc + #7 [ffffb21e002e7be0] read_pages at ffffffffa6381d17 + #8 [ffffb21e002e7c40] page_cache_ra_unbounded at ffffffffa6381ff5 + #9 [ffffb21e002e7ca8] filemap_fault at ffffffffa63761b5 + #10 [ffffb21e002e7d48] __do_fault at ffffffffa63d1892 + #11 [ffffb21e002e7d70] do_fault at ffffffffa63d2425 + #12 [ffffb21e002e7da0] __handle_mm_fault at ffffffffa63d8c6b + #13 [ffffb21e002e7e88] handle_mm_fault at ffffffffa63d95c2 + #14 [ffffb21e002e7ec8] do_user_addr_fault at ffffffffa60b34ea + #15 [ffffb21e002e7f28] exc_page_fault at ffffffffa7186e4e + #16 [ffffb21e002e7f50] asm_exc_page_fault at ffffffffa72012a6 + RIP: 000055d16159f8d8 RSP: 00007ffdd4c1f340 RFLAGS: 00010206 + RAX: 00000000000bec82 RBX: 00007ff2fd00dc82 RCX: 000055d1615b492a + RDX: 00007ffdd4c216b0 RSI: 00000000200bec82 RDI: 000055d185725960 + RBP: 00007ffdd4c1f5a0 R8: 0000000000000000 R9: 0000000000000000 + R10: 0000000000000000 R11: 0000000000000202 R12: 00000000200bec82 + R13: 000055d185725960 R14: 00007ffdd4c216b0 R15: 000055d1615b9708 + ORIG_RAX: ffffffffffffffff CS: 0033 SS: 002b + + crash> set 230 + PID: 230 + COMMAND: "modprobe" + TASK: ffff98ce03ca3040 [THREAD_INFO: ffff98ce03ca3040] + CPU: 0 + STATE: TASK_UNINTERRUPTIBLE + crash> bt + PID: 230 TASK: ffff98ce03ca3040 CPU: 0 COMMAND: "modprobe" + #0 [ffffaf9940307840] __schedule at ffffffff9618f6d0 + #1 [ffffaf99403078f8] schedule at ffffffff96190a27 + #2 [ffffaf9940307908] __bio_queue_enter at ffffffff957e121c + #3 [ffffaf9940307968] blk_mq_submit_bio at ffffffff957f358c + #4 [ffffaf99403079f0] __submit_bio at ffffffff957e1e3c + #5 [ffffaf9940307a58] submit_bio_noacct_nocheck at ffffffff957e2326 + #6 [ffffaf9940307ac0] ext4_mpage_readpages at ffffffff955ceafc + #7 [ffffaf9940307be0] read_pages at ffffffff95381d1a + #8 [ffffaf9940307c40] page_cache_ra_unbounded at ffffffff95381ff5 + #9 [ffffaf9940307ca8] filemap_fault at ffffffff953761b5 + #10 [ffffaf9940307d48] __do_fault at ffffffff953d1895 + #11 [ffffaf9940307d70] do_fault at ffffffff953d2425 + #12 [ffffaf9940307da0] __handle_mm_fault at ffffffff953d8c6b + #13 [ffffaf9940307e88] handle_mm_fault at ffffffff953d95c2 + #14 [ffffaf9940307ec8] do_user_addr_fault at ffffffff950b34ea + #15 [ffffaf9940307f28] exc_page_fault at ffffffff96186e4e + #16 [ffffaf9940307f50] asm_exc_page_fault at ffffffff962012a6 + RIP: 0000556b7a7468d8 RSP: 00007ffde2ffb560 RFLAGS: 00000206 + RAX: 00000000000bec82 RBX: 00007f5331a0dc82 RCX: 0000556b7a75b92a + RDX: 00007ffde2ffd8d0 RSI: 00000000200bec82 RDI: 0000556ba8edf960 + RBP: 00007ffde2ffb7c0 R8: 0000000000000000 R9: 0000000000000000 + R10: 0000000000000000 R11: 0000000000000202 R12: 00000000200bec82 + R13: 0000556ba8edf960 R14: 00007ffde2ffd8d0 R15: 0000556b7a760708 + ORIG_RAX: ffffffffffffffff CS: 0033 SS: 002b + +Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2303267 +--- + appliance/init | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/appliance/init b/appliance/init +index 128a3c20e1..dae06dbbe5 100755 +--- a/appliance/init ++++ b/appliance/init +@@ -104,8 +104,6 @@ udevadm settle --timeout=600 + # Increase the SCSI timeout so we can read remote images. + shopt -s nullglob + for f in /sys/block/sd*/device/timeout; do echo 300 > $f; done +-# https://access.redhat.com/site/solutions/5427 +-for f in /sys/block/{h,s,ub,v}d*/queue/scheduler; do echo noop > $f; done + shopt -u nullglob + + # Set up the network. +-- +2.46.0 + diff --git a/libguestfs.spec b/libguestfs.spec index d21aaf1..7cb622b 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -42,7 +42,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.53.5 -Release: 3%{?dist} +Release: 4%{?dist} License: LGPL-2.1-or-later # Build only for architectures that have a kernel @@ -76,6 +76,11 @@ Source7: libguestfs.keyring # Maintainer script which helps with handling patches. Source8: copy-patches.sh +# Fix kernel hang. +# https://bugzilla.redhat.com/show_bug.cgi?id=2303267 +# Upstream in > 1.53.5 +Patch: 0001-appliance-init-Don-t-set-impossible-noop-disk-schedu.patch + BuildRequires: autoconf, automake, libtool, gettext-devel # Basic build requirements. @@ -1100,6 +1105,9 @@ rm ocaml/html/.gitignore %changelog +* Fri Aug 16 2024 Richard W.M. Jones - 1:1.53.5-4 +- Fix kernel hang (RHBZ#2303267) + * Thu Jul 18 2024 Fedora Release Engineering - 1:1.53.5-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild From 74d78169356abfc72105485d4e4af29d27fb80ba Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 16 Aug 2024 15:31:08 +0100 Subject: [PATCH 178/243] New upstream development version 1.53.6 --- ...on-t-set-impossible-noop-disk-schedu.patch | 108 ------------------ libguestfs.spec | 12 +- sources | 4 +- 3 files changed, 6 insertions(+), 118 deletions(-) delete mode 100644 0001-appliance-init-Don-t-set-impossible-noop-disk-schedu.patch diff --git a/0001-appliance-init-Don-t-set-impossible-noop-disk-schedu.patch b/0001-appliance-init-Don-t-set-impossible-noop-disk-schedu.patch deleted file mode 100644 index 2babe5d..0000000 --- a/0001-appliance-init-Don-t-set-impossible-noop-disk-schedu.patch +++ /dev/null @@ -1,108 +0,0 @@ -From b2d682a4730ead8b4ae07e5aaf6fa230c5eec305 Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Fri, 16 Aug 2024 08:26:34 +0100 -Subject: [PATCH] appliance/init: Don't set impossible "noop" disk scheduler - -Since RHEL 7.4, the noop scheduler is no longer a thing. Trying to -set it results in the error: - - + echo noop - /init: line 108: echo: write error: Invalid argument - -The current recommendation (https://access.redhat.com/solutions/5427) -is to use mq-deadline, but that's also the default so we don't have to -do anything. - -A bigger reason to remove these lines is that kernel 6.11.0 has -introduced a hang where -- rarely -- the ext4 filesystem hangs if you -try to change the scheduler while handing a page fault, even if you're -setting a scheduler that doesn't exist. I couldn't get much detail -except for a couple of stack traces from different VMs: - - crash> set 234 - PID: 234 - COMMAND: "modprobe" - TASK: ffff9f5ec3a22f40 [THREAD_INFO: ffff9f5ec3a22f40] - CPU: 0 - STATE: TASK_UNINTERRUPTIBLE - crash> bt - PID: 234 TASK: ffff9f5ec3a22f40 CPU: 0 COMMAND: "modprobe" - #0 [ffffb21e002e7840] __schedule at ffffffffa718f6d0 - #1 [ffffb21e002e78f8] schedule at ffffffffa7190a27 - #2 [ffffb21e002e7908] __bio_queue_enter at ffffffffa67e121c - #3 [ffffb21e002e7968] blk_mq_submit_bio at ffffffffa67f358c - #4 [ffffb21e002e79f0] __submit_bio at ffffffffa67e1e3c - #5 [ffffb21e002e7a58] submit_bio_noacct_nocheck at ffffffffa67e2326 - #6 [ffffb21e002e7ac0] ext4_mpage_readpages at ffffffffa65ceafc - #7 [ffffb21e002e7be0] read_pages at ffffffffa6381d17 - #8 [ffffb21e002e7c40] page_cache_ra_unbounded at ffffffffa6381ff5 - #9 [ffffb21e002e7ca8] filemap_fault at ffffffffa63761b5 - #10 [ffffb21e002e7d48] __do_fault at ffffffffa63d1892 - #11 [ffffb21e002e7d70] do_fault at ffffffffa63d2425 - #12 [ffffb21e002e7da0] __handle_mm_fault at ffffffffa63d8c6b - #13 [ffffb21e002e7e88] handle_mm_fault at ffffffffa63d95c2 - #14 [ffffb21e002e7ec8] do_user_addr_fault at ffffffffa60b34ea - #15 [ffffb21e002e7f28] exc_page_fault at ffffffffa7186e4e - #16 [ffffb21e002e7f50] asm_exc_page_fault at ffffffffa72012a6 - RIP: 000055d16159f8d8 RSP: 00007ffdd4c1f340 RFLAGS: 00010206 - RAX: 00000000000bec82 RBX: 00007ff2fd00dc82 RCX: 000055d1615b492a - RDX: 00007ffdd4c216b0 RSI: 00000000200bec82 RDI: 000055d185725960 - RBP: 00007ffdd4c1f5a0 R8: 0000000000000000 R9: 0000000000000000 - R10: 0000000000000000 R11: 0000000000000202 R12: 00000000200bec82 - R13: 000055d185725960 R14: 00007ffdd4c216b0 R15: 000055d1615b9708 - ORIG_RAX: ffffffffffffffff CS: 0033 SS: 002b - - crash> set 230 - PID: 230 - COMMAND: "modprobe" - TASK: ffff98ce03ca3040 [THREAD_INFO: ffff98ce03ca3040] - CPU: 0 - STATE: TASK_UNINTERRUPTIBLE - crash> bt - PID: 230 TASK: ffff98ce03ca3040 CPU: 0 COMMAND: "modprobe" - #0 [ffffaf9940307840] __schedule at ffffffff9618f6d0 - #1 [ffffaf99403078f8] schedule at ffffffff96190a27 - #2 [ffffaf9940307908] __bio_queue_enter at ffffffff957e121c - #3 [ffffaf9940307968] blk_mq_submit_bio at ffffffff957f358c - #4 [ffffaf99403079f0] __submit_bio at ffffffff957e1e3c - #5 [ffffaf9940307a58] submit_bio_noacct_nocheck at ffffffff957e2326 - #6 [ffffaf9940307ac0] ext4_mpage_readpages at ffffffff955ceafc - #7 [ffffaf9940307be0] read_pages at ffffffff95381d1a - #8 [ffffaf9940307c40] page_cache_ra_unbounded at ffffffff95381ff5 - #9 [ffffaf9940307ca8] filemap_fault at ffffffff953761b5 - #10 [ffffaf9940307d48] __do_fault at ffffffff953d1895 - #11 [ffffaf9940307d70] do_fault at ffffffff953d2425 - #12 [ffffaf9940307da0] __handle_mm_fault at ffffffff953d8c6b - #13 [ffffaf9940307e88] handle_mm_fault at ffffffff953d95c2 - #14 [ffffaf9940307ec8] do_user_addr_fault at ffffffff950b34ea - #15 [ffffaf9940307f28] exc_page_fault at ffffffff96186e4e - #16 [ffffaf9940307f50] asm_exc_page_fault at ffffffff962012a6 - RIP: 0000556b7a7468d8 RSP: 00007ffde2ffb560 RFLAGS: 00000206 - RAX: 00000000000bec82 RBX: 00007f5331a0dc82 RCX: 0000556b7a75b92a - RDX: 00007ffde2ffd8d0 RSI: 00000000200bec82 RDI: 0000556ba8edf960 - RBP: 00007ffde2ffb7c0 R8: 0000000000000000 R9: 0000000000000000 - R10: 0000000000000000 R11: 0000000000000202 R12: 00000000200bec82 - R13: 0000556ba8edf960 R14: 00007ffde2ffd8d0 R15: 0000556b7a760708 - ORIG_RAX: ffffffffffffffff CS: 0033 SS: 002b - -Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2303267 ---- - appliance/init | 2 -- - 1 file changed, 2 deletions(-) - -diff --git a/appliance/init b/appliance/init -index 128a3c20e1..dae06dbbe5 100755 ---- a/appliance/init -+++ b/appliance/init -@@ -104,8 +104,6 @@ udevadm settle --timeout=600 - # Increase the SCSI timeout so we can read remote images. - shopt -s nullglob - for f in /sys/block/sd*/device/timeout; do echo 300 > $f; done --# https://access.redhat.com/site/solutions/5427 --for f in /sys/block/{h,s,ub,v}d*/queue/scheduler; do echo noop > $f; done - shopt -u nullglob - - # Set up the network. --- -2.46.0 - diff --git a/libguestfs.spec b/libguestfs.spec index 7cb622b..da50b8a 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -41,8 +41,8 @@ ExcludeArch: %{ix86} Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 -Version: 1.53.5 -Release: 4%{?dist} +Version: 1.53.6 +Release: 1%{?dist} License: LGPL-2.1-or-later # Build only for architectures that have a kernel @@ -76,11 +76,6 @@ Source7: libguestfs.keyring # Maintainer script which helps with handling patches. Source8: copy-patches.sh -# Fix kernel hang. -# https://bugzilla.redhat.com/show_bug.cgi?id=2303267 -# Upstream in > 1.53.5 -Patch: 0001-appliance-init-Don-t-set-impossible-noop-disk-schedu.patch - BuildRequires: autoconf, automake, libtool, gettext-devel # Basic build requirements. @@ -1105,7 +1100,8 @@ rm ocaml/html/.gitignore %changelog -* Fri Aug 16 2024 Richard W.M. Jones - 1:1.53.5-4 +* Fri Aug 16 2024 Richard W.M. Jones - 1:1.53.6-1 +- New upstream development version 1.53.6 - Fix kernel hang (RHBZ#2303267) * Thu Jul 18 2024 Fedora Release Engineering - 1:1.53.5-3 diff --git a/sources b/sources index d5d8c7d..2d66ced 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (libguestfs-1.53.5.tar.gz) = cae8ad68ec79d5c5756fb6d44e9c74cae8159dba9cc7043991c97b2abb4a514f7e7e4ea77a285347e9bf5821cfc5d3cd6009bc7effdbaaa0eaca5aee781c3abc -SHA512 (libguestfs-1.53.5.tar.gz.sig) = 68aeb6b248d1a7cafdcfee8d8cbf73b6bfd4191e7b25e9cb3c23505f449dd2d438f0a669684b2b809001dafa669866f4e072d9e538226e5593c4ef5b23524483 +SHA512 (libguestfs-1.53.6.tar.gz) = c9224cd6cf38e6b2a701fa89c111a44c40b0f8f36abb0b2efefbe0384c501296665844a064e6dc06db8632d0eac893011185212a030bca732c8a6854ae6129c2 +SHA512 (libguestfs-1.53.6.tar.gz.sig) = 855bf2fe3ffc60f295fa294e13605aa8f7ded4700aca6ca2955d1ce73618836e87be2581099c96423347e02157819b01fd27bfb3b27cb48b10ab916fbc9ae856 From 83f3f8ba76825c7c176e656a163fa96a38632c3f Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 3 Oct 2024 13:22:30 +0100 Subject: [PATCH 179/243] New upstream development version 1.53.7 --- libguestfs.spec | 5 ++++- sources | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index da50b8a..9bbe83e 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -41,7 +41,7 @@ ExcludeArch: %{ix86} Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 -Version: 1.53.6 +Version: 1.53.7 Release: 1%{?dist} License: LGPL-2.1-or-later @@ -1100,6 +1100,9 @@ rm ocaml/html/.gitignore %changelog +* Thu Oct 03 2024 Richard W.M. Jones - 1:1.53.7-1 +- New upstream development version 1.53.7 + * Fri Aug 16 2024 Richard W.M. Jones - 1:1.53.6-1 - New upstream development version 1.53.6 - Fix kernel hang (RHBZ#2303267) diff --git a/sources b/sources index 2d66ced..3ac8046 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (libguestfs-1.53.6.tar.gz) = c9224cd6cf38e6b2a701fa89c111a44c40b0f8f36abb0b2efefbe0384c501296665844a064e6dc06db8632d0eac893011185212a030bca732c8a6854ae6129c2 -SHA512 (libguestfs-1.53.6.tar.gz.sig) = 855bf2fe3ffc60f295fa294e13605aa8f7ded4700aca6ca2955d1ce73618836e87be2581099c96423347e02157819b01fd27bfb3b27cb48b10ab916fbc9ae856 +SHA512 (libguestfs-1.53.7.tar.gz) = 2a42694fb5d2c38acbe51f6b99d991f9f18c4bfe6fed7e9cf14ea3a837cbb72e8e75d23641d1fc7dec73cfc4b4636bbc2dad0d183509b840eb3fbc7297373246 +SHA512 (libguestfs-1.53.7.tar.gz.sig) = b8ed18b07b46e5940f330db2abf69d61c81b33e999de885334d1106304122f2a10e97ba09f8152eb34ee3a369bf4d0d8bc474d0f0b7d908b7a7fe7740d989c2c From 0b9d476db99a7c84dc9f3b754c88f7d797da7139 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 8 Oct 2024 15:01:19 +0100 Subject: [PATCH 180/243] New upstream stable version 1.54.0 --- libguestfs.spec | 7 +++++-- sources | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index 9bbe83e..8e4931c 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -30,7 +30,7 @@ ExcludeArch: %{ix86} %global verify_tarball_signature 1 # The source directory. -%global source_directory 1.53-development +%global source_directory 1.54-stable # Filter perl provides. %{?perl_default_filter} @@ -41,7 +41,7 @@ ExcludeArch: %{ix86} Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 -Version: 1.53.7 +Version: 1.54.0 Release: 1%{?dist} License: LGPL-2.1-or-later @@ -1100,6 +1100,9 @@ rm ocaml/html/.gitignore %changelog +* Tue Oct 08 2024 Richard W.M. Jones - 1:1.54.0-1 +- New upstream stable version 1.54.0 + * Thu Oct 03 2024 Richard W.M. Jones - 1:1.53.7-1 - New upstream development version 1.53.7 diff --git a/sources b/sources index 3ac8046..e8f63e9 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (libguestfs-1.53.7.tar.gz) = 2a42694fb5d2c38acbe51f6b99d991f9f18c4bfe6fed7e9cf14ea3a837cbb72e8e75d23641d1fc7dec73cfc4b4636bbc2dad0d183509b840eb3fbc7297373246 -SHA512 (libguestfs-1.53.7.tar.gz.sig) = b8ed18b07b46e5940f330db2abf69d61c81b33e999de885334d1106304122f2a10e97ba09f8152eb34ee3a369bf4d0d8bc474d0f0b7d908b7a7fe7740d989c2c +SHA512 (libguestfs-1.54.0.tar.gz) = 45fd91a36384c15737820c9157d4a8a670c94177ab917a2600fef04ecbc8d6531ef04a4a86bea6540e04a550de7dfacbef9645f2869e7c5eab6cb63058ff2d86 +SHA512 (libguestfs-1.54.0.tar.gz.sig) = 97c27a5cafa533587ae2e22a54fed16d37c5366cca2a4c40cb098a8dacf62ee8b1bcee9d28f63b01e7034f0f211e8a8c71368ae418f1bfba4970ca1942bf40f3 From 0e0e918557b9082d72b60ca12fcb7a8a0c9d1945 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 14 Oct 2024 09:16:30 +0200 Subject: [PATCH 181/243] rebuild for https://fedoraproject.org/wiki/Changes/php84 --- libguestfs.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libguestfs.spec b/libguestfs.spec index 8e4931c..daf6f41 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -42,7 +42,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.54.0 -Release: 1%{?dist} +Release: 2%{?dist} License: LGPL-2.1-or-later # Build only for architectures that have a kernel @@ -1100,6 +1100,9 @@ rm ocaml/html/.gitignore %changelog +* Mon Oct 14 2024 Remi Collet - 1:1.54.0-2 +- rebuild for https://fedoraproject.org/wiki/Changes/php84 + * Tue Oct 08 2024 Richard W.M. Jones - 1:1.54.0-1 - New upstream stable version 1.54.0 From 3f27c698db509265da4c572c201d91e31bfd8315 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 21 Oct 2024 14:38:09 +0100 Subject: [PATCH 182/243] Use stable owner, group and mtime in appliance tarballs (RHBZ#2320025) Add support for Windows Server 2025 --- ...s-for-1.54-and-1.55-download-locatio.patch | 28 ++ ...-expand-gpt.pl-Implement-SKIP-rule-f.patch | 31 ++ ...nfo.c-Add-Windows-Server-2025-osinfo.patch | 44 ++ ...e-__attribute__-cleanup-always-works.patch | 412 ++++++++++++++++++ ...able-owner-group-and-mtime-in-applia.patch | 56 +++ libguestfs.spec | 16 +- 6 files changed, 586 insertions(+), 1 deletion(-) create mode 100644 0001-website-Add-links-for-1.54-and-1.55-download-locatio.patch create mode 100644 0002-tests-gdisk-test-expand-gpt.pl-Implement-SKIP-rule-f.patch create mode 100644 0003-lib-inspect-osinfo.c-Add-Windows-Server-2025-osinfo.patch create mode 100644 0004-build-Assume-__attribute__-cleanup-always-works.patch create mode 100644 0005-appliance-Use-stable-owner-group-and-mtime-in-applia.patch diff --git a/0001-website-Add-links-for-1.54-and-1.55-download-locatio.patch b/0001-website-Add-links-for-1.54-and-1.55-download-locatio.patch new file mode 100644 index 0000000..e04202e --- /dev/null +++ b/0001-website-Add-links-for-1.54-and-1.55-download-locatio.patch @@ -0,0 +1,28 @@ +From 0edaea8f91bf08025651eeff32f53b9335003842 Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Tue, 8 Oct 2024 14:53:38 +0100 +Subject: [PATCH 1/5] website: Add links for 1.54 and 1.55 download locations + +--- + website/index.html.in | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/website/index.html.in b/website/index.html.in +index a61fca9247..2a0d32217e 100644 +--- a/website/index.html.in ++++ b/website/index.html.in +@@ -186,9 +186,10 @@ git clone https://github.com/ + LATEST-URL: http://libguestfs.org/download/1.53-development/libguestfs-@PACKAGE_VERSION@.tar.gz + LATEST-VERSION: @PACKAGE_VERSION@ + --> +- Latest development version: @PACKAGE_VERSION@ (released @RELEASE_DATE@).
++ Latest development version: @PACKAGE_VERSION@ (released @RELEASE_DATE@).
+ Stable branch: + ++ 1.54.x, + 1.52.x, + 1.50.x, + 1.48.x +-- +2.46.0 + diff --git a/0002-tests-gdisk-test-expand-gpt.pl-Implement-SKIP-rule-f.patch b/0002-tests-gdisk-test-expand-gpt.pl-Implement-SKIP-rule-f.patch new file mode 100644 index 0000000..75cf5c7 --- /dev/null +++ b/0002-tests-gdisk-test-expand-gpt.pl-Implement-SKIP-rule-f.patch @@ -0,0 +1,31 @@ +From c25ff1a8022cf345d3ce29682207ed3732a4244a Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Mon, 14 Oct 2024 10:43:08 +0100 +Subject: [PATCH 2/5] tests/gdisk/test-expand-gpt.pl: Implement SKIP rule for + this test + +Reported-by: David Runge +Related: https://github.com/libguestfs/libguestfs/issues/155 +--- + tests/gdisk/test-expand-gpt.pl | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/tests/gdisk/test-expand-gpt.pl b/tests/gdisk/test-expand-gpt.pl +index 23a52b23ce..5c77247c00 100755 +--- a/tests/gdisk/test-expand-gpt.pl ++++ b/tests/gdisk/test-expand-gpt.pl +@@ -20,6 +20,11 @@ use warnings; + + use Sys::Guestfs; + ++if ($ENV{SKIP_TEST_EXPAND_GPT_PL}) { ++ print "$0: test skipped because SKIP_TEST_EXPAND_GPT_PL is set\n"; ++ exit 77; ++} ++ + sub tests { + my $g = Sys::Guestfs->new (); + +-- +2.46.0 + diff --git a/0003-lib-inspect-osinfo.c-Add-Windows-Server-2025-osinfo.patch b/0003-lib-inspect-osinfo.c-Add-Windows-Server-2025-osinfo.patch new file mode 100644 index 0000000..5258290 --- /dev/null +++ b/0003-lib-inspect-osinfo.c-Add-Windows-Server-2025-osinfo.patch @@ -0,0 +1,44 @@ +From 0f489f8eec0c02e9ed1d606a2032edccf81ef025 Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Thu, 17 Oct 2024 08:59:49 +0100 +Subject: [PATCH 3/5] lib/inspect-osinfo.c: Add Windows Server 2025 osinfo + +The guest was found to have these inspection fields: + + type: windows + distro: windows + product_name: Windows Server 2025 Standard + product_variant: Server + version: 10.0 + arch: x86_64 + hostname: WIN-84V4KKQ30SM + build ID: 26080 + windows_systemroot: /Windows + windows_software_hive: /Windows/System32/config/SOFTWARE + windows_system_hive: /Windows/System32/config/SYSTEM + windows_current_control_set: ControlSet001 + +Reported-by: Ming Xie +Fixes: https://issues.redhat.com/browse/RHEL-62935 +--- + lib/inspect-osinfo.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/lib/inspect-osinfo.c b/lib/inspect-osinfo.c +index c77344f63d..f792d771a8 100644 +--- a/lib/inspect-osinfo.c ++++ b/lib/inspect-osinfo.c +@@ -142,7 +142,9 @@ guestfs_impl_inspect_get_osinfo (guestfs_h *g, const char *root) + switch (minor) { + case 0: + if (strstr (product_variant, "Server")) { +- if (strstr (product_name, "2022")) ++ if (strstr (product_name, "2025")) ++ return safe_strdup (g, "win2k25"); ++ else if (strstr (product_name, "2022")) + return safe_strdup (g, "win2k22"); + else if (strstr (product_name, "2019")) + return safe_strdup (g, "win2k19"); +-- +2.46.0 + diff --git a/0004-build-Assume-__attribute__-cleanup-always-works.patch b/0004-build-Assume-__attribute__-cleanup-always-works.patch new file mode 100644 index 0000000..1ffc2ba --- /dev/null +++ b/0004-build-Assume-__attribute__-cleanup-always-works.patch @@ -0,0 +1,412 @@ +From e37768d8892d6f467c7834f8b142b89f8f0af7dc Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Fri, 18 Oct 2024 21:52:21 +0100 +Subject: [PATCH 4/5] build: Assume __attribute__((cleanup)) always works + +All recent compilers support this (except MS compilers which we don't +care about). Assume it is supported. We test it in ./configure and +hard fail if it doesn't work. + +We still define HAVE_ATTRIBUTE_CLEANUP but you can now assume it is +always defined and don't have to check it. +--- + common | 2 +- + daemon/daemon.h | 9 --------- + daemon/sh.c | 5 ----- + daemon/yara.c | 8 -------- + generator/c.ml | 10 ---------- + generator/daemon.ml | 15 --------------- + lib/guestfs-internal.h | 8 -------- + lib/info.c | 5 ----- + lib/launch-libvirt.c | 5 ----- + lib/qemu.c | 5 ----- + m4/guestfs-c.m4 | 7 ++----- + 11 files changed, 3 insertions(+), 76 deletions(-) + +Submodule common b6e703dccb..01c5322606: +diff --git a/common/structs/structs-cleanups.h b/common/structs/structs-cleanups.h +index b43dbd750..c6e7fd1e2 100644 +--- a/common/structs/structs-cleanups.h ++++ b/common/structs/structs-cleanups.h +@@ -28,7 +28,6 @@ + #ifndef GUESTFS_STRUCTS_CLEANUPS_H_ + #define GUESTFS_STRUCTS_CLEANUPS_H_ + +-#ifdef HAVE_ATTRIBUTE_CLEANUP + #define CLEANUP_FREE_INT_BOOL \ + __attribute__((cleanup(guestfs_int_cleanup_free_int_bool))) + #define CLEANUP_FREE_INT_BOOL_LIST \ +@@ -137,62 +136,6 @@ + __attribute__((cleanup(guestfs_int_cleanup_free_yara_detection))) + #define CLEANUP_FREE_YARA_DETECTION_LIST \ + __attribute__((cleanup(guestfs_int_cleanup_free_yara_detection_list))) +-#else /* !HAVE_ATTRIBUTE_CLEANUP */ +-#define CLEANUP_FREE_INT_BOOL +-#define CLEANUP_FREE_INT_BOOL_LIST +-#define CLEANUP_FREE_LVM_PV +-#define CLEANUP_FREE_LVM_PV_LIST +-#define CLEANUP_FREE_LVM_VG +-#define CLEANUP_FREE_LVM_VG_LIST +-#define CLEANUP_FREE_LVM_LV +-#define CLEANUP_FREE_LVM_LV_LIST +-#define CLEANUP_FREE_STAT +-#define CLEANUP_FREE_STAT_LIST +-#define CLEANUP_FREE_STATNS +-#define CLEANUP_FREE_STATNS_LIST +-#define CLEANUP_FREE_STATVFS +-#define CLEANUP_FREE_STATVFS_LIST +-#define CLEANUP_FREE_DIRENT +-#define CLEANUP_FREE_DIRENT_LIST +-#define CLEANUP_FREE_VERSION +-#define CLEANUP_FREE_VERSION_LIST +-#define CLEANUP_FREE_XATTR +-#define CLEANUP_FREE_XATTR_LIST +-#define CLEANUP_FREE_INOTIFY_EVENT +-#define CLEANUP_FREE_INOTIFY_EVENT_LIST +-#define CLEANUP_FREE_PARTITION +-#define CLEANUP_FREE_PARTITION_LIST +-#define CLEANUP_FREE_APPLICATION +-#define CLEANUP_FREE_APPLICATION_LIST +-#define CLEANUP_FREE_APPLICATION2 +-#define CLEANUP_FREE_APPLICATION2_LIST +-#define CLEANUP_FREE_ISOINFO +-#define CLEANUP_FREE_ISOINFO_LIST +-#define CLEANUP_FREE_MDSTAT +-#define CLEANUP_FREE_MDSTAT_LIST +-#define CLEANUP_FREE_BTRFSSUBVOLUME +-#define CLEANUP_FREE_BTRFSSUBVOLUME_LIST +-#define CLEANUP_FREE_BTRFSQGROUP +-#define CLEANUP_FREE_BTRFSQGROUP_LIST +-#define CLEANUP_FREE_BTRFSBALANCE +-#define CLEANUP_FREE_BTRFSBALANCE_LIST +-#define CLEANUP_FREE_BTRFSSCRUB +-#define CLEANUP_FREE_BTRFSSCRUB_LIST +-#define CLEANUP_FREE_XFSINFO +-#define CLEANUP_FREE_XFSINFO_LIST +-#define CLEANUP_FREE_UTSNAME +-#define CLEANUP_FREE_UTSNAME_LIST +-#define CLEANUP_FREE_HIVEX_NODE +-#define CLEANUP_FREE_HIVEX_NODE_LIST +-#define CLEANUP_FREE_HIVEX_VALUE +-#define CLEANUP_FREE_HIVEX_VALUE_LIST +-#define CLEANUP_FREE_INTERNAL_MOUNTABLE +-#define CLEANUP_FREE_INTERNAL_MOUNTABLE_LIST +-#define CLEANUP_FREE_TSK_DIRENT +-#define CLEANUP_FREE_TSK_DIRENT_LIST +-#define CLEANUP_FREE_YARA_DETECTION +-#define CLEANUP_FREE_YARA_DETECTION_LIST +-#endif /* !HAVE_ATTRIBUTE_CLEANUP */ + + /* These functions are used internally by the CLEANUP_* macros. + * Don't call them directly. +diff --git a/common/utils/cleanups.h b/common/utils/cleanups.h +index 932114f6e..be52d0728 100644 +--- a/common/utils/cleanups.h ++++ b/common/utils/cleanups.h +@@ -19,7 +19,6 @@ + #ifndef GUESTFS_CLEANUPS_H_ + #define GUESTFS_CLEANUPS_H_ + +-#ifdef HAVE_ATTRIBUTE_CLEANUP + #define CLEANUP_FREE \ + __attribute__((cleanup(guestfs_int_cleanup_free))) + #define CLEANUP_HASH_FREE \ +@@ -50,23 +49,6 @@ + __attribute__((cleanup(guestfs_int_cleanup_xmlXPathFreeObject))) + #define CLEANUP_PCRE2_MATCH_DATA_FREE \ + __attribute__((cleanup(guestfs_int_cleanup_pcre2_match_data_free))) +-#else +-#define CLEANUP_FREE +-#define CLEANUP_HASH_FREE +-#define CLEANUP_UNLINK_FREE +-#define CLEANUP_CLOSE +-#define CLEANUP_FCLOSE +-#define CLEANUP_PCLOSE +-#define CLEANUP_FREE_STRING_LIST +-#define CLEANUP_XMLFREE +-#define CLEANUP_XMLBUFFERFREE +-#define CLEANUP_XMLFREEDOC +-#define CLEANUP_XMLFREEURI +-#define CLEANUP_XMLFREETEXTWRITER +-#define CLEANUP_XMLXPATHFREECONTEXT +-#define CLEANUP_XMLXPATHFREEOBJECT +-#define CLEANUP_PCRE2_MATCH_DATA_FREE +-#endif + + /* These functions are used internally by the CLEANUP_* macros. + * Don't call them directly. +diff --git a/daemon/daemon.h b/daemon/daemon.h +index e050588cad..5fc53245c9 100644 +--- a/daemon/daemon.h ++++ b/daemon/daemon.h +@@ -93,11 +93,7 @@ extern char *read_whole_file (const char *filename, size_t *size_r); + extern char *mountable_to_string (const mountable_t *mountable); + extern void cleanup_free_mountable (mountable_t *mountable); + +-#ifdef HAVE_ATTRIBUTE_CLEANUP + #define CLEANUP_FREE_MOUNTABLE __attribute__((cleanup(cleanup_free_mountable))) +-#else +-#define CLEANUP_FREE_MOUNTABLE +-#endif + + /* cleanups.c */ + /* These functions are used internally by the CLEANUP_* macros. +@@ -106,13 +102,8 @@ extern void cleanup_free_mountable (mountable_t *mountable); + extern void cleanup_aug_close (void *ptr); + extern void cleanup_free_stringsbuf (void *ptr); + +-#ifdef HAVE_ATTRIBUTE_CLEANUP + #define CLEANUP_AUG_CLOSE __attribute__((cleanup(cleanup_aug_close))) + #define CLEANUP_FREE_STRINGSBUF __attribute__((cleanup(cleanup_free_stringsbuf))) +-#else +-#define CLEANUP_AUG_CLOSE +-#define CLEANUP_FREE_STRINGSBUF +-#endif + + /* mount.c */ + extern int is_root_mounted (void); +diff --git a/daemon/sh.c b/daemon/sh.c +index 92ce08be0f..21d4deeabc 100644 +--- a/daemon/sh.c ++++ b/daemon/sh.c +@@ -32,13 +32,8 @@ + + #include "ignore-value.h" + +-#ifdef HAVE_ATTRIBUTE_CLEANUP + #define CLEANUP_BIND_STATE __attribute__((cleanup(free_bind_state))) + #define CLEANUP_RESOLVER_STATE __attribute__((cleanup(free_resolver_state))) +-#else +-#define CLEANUP_BIND_STATE +-#define CLEANUP_RESOLVER_STATE +-#endif + + struct bind_state { + bool mounted; +diff --git a/daemon/yara.c b/daemon/yara.c +index 21137b7333..9350dd27b9 100644 +--- a/daemon/yara.c ++++ b/daemon/yara.c +@@ -39,12 +39,8 @@ + + #include + +-#ifdef HAVE_ATTRIBUTE_CLEANUP + #define CLEANUP_DESTROY_YARA_COMPILER \ + __attribute__((cleanup(cleanup_destroy_yara_compiler))) +-#else +-#define CLEANUP_DESTROY_YARA_COMPILER +-#endif + + struct write_callback_data { + int fd; +@@ -208,10 +204,6 @@ compile_rules_file (const char *rules_path) + } + + err: +-#ifndef HAVE_ATTRIBUTE_CLEANUP +- yr_compiler_destroy (compiler); +-#endif +- + return ret; + } + +diff --git a/generator/c.ml b/generator/c.ml +index 447059b8a3..838e7f4267 100644 +--- a/generator/c.ml ++++ b/generator/c.ml +@@ -817,7 +817,6 @@ and generate_client_structs_cleanups_h () = + #ifndef GUESTFS_STRUCTS_CLEANUPS_H_ + #define GUESTFS_STRUCTS_CLEANUPS_H_ + +-#ifdef HAVE_ATTRIBUTE_CLEANUP + "; + + List.iter ( +@@ -828,16 +827,7 @@ and generate_client_structs_cleanups_h () = + pr " __attribute__((cleanup(guestfs_int_cleanup_free_%s_list)))\n" name + ) structs; + +- pr "#else /* !HAVE_ATTRIBUTE_CLEANUP */\n"; +- +- List.iter ( +- fun { s_name = name } -> +- pr "#define CLEANUP_FREE_%s\n" (String.uppercase_ascii name); +- pr "#define CLEANUP_FREE_%s_LIST\n" (String.uppercase_ascii name) +- ) structs; +- + pr "\ +-#endif /* !HAVE_ATTRIBUTE_CLEANUP */ + + /* These functions are used internally by the CLEANUP_* macros. + * Don't call them directly. +diff --git a/generator/daemon.ml b/generator/daemon.ml +index 78a2412d2e..9ab9e12dfb 100644 +--- a/generator/daemon.ml ++++ b/generator/daemon.ml +@@ -127,8 +127,6 @@ let generate_daemon_stubs actions () = + args_passed_to_daemon in + + if args_passed_to_daemon <> [] then ( +- pr "#ifdef HAVE_ATTRIBUTE_CLEANUP\n"; +- pr "\n"; + pr "#define CLEANUP_XDR_FREE_%s_ARGS \\\n" uc_name; + pr " __attribute__((cleanup(cleanup_xdr_free_%s_args)))\n" name; + pr "\n"; +@@ -140,9 +138,6 @@ let generate_daemon_stubs actions () = + name; + pr "}\n"; + pr "\n"; +- pr "#else /* !HAVE_ATTRIBUTE_CLEANUP */\n"; +- pr "#define CLEANUP_XDR_FREE_%s_ARGS\n" uc_name; +- pr "#endif /* !HAVE_ATTRIBUTE_CLEANUP */\n"; + pr "\n" + ); + +@@ -1315,7 +1310,6 @@ let generate_daemon_structs_cleanups_h () = + #ifndef GUESTFS_DAEMON_STRUCTS_CLEANUPS_H_ + #define GUESTFS_DAEMON_STRUCTS_CLEANUPS_H_ + +-#ifdef HAVE_ATTRIBUTE_CLEANUP + "; + + List.iter ( +@@ -1326,16 +1320,7 @@ let generate_daemon_structs_cleanups_h () = + pr " __attribute__((cleanup(cleanup_free_int_%s_list)))\n" name + ) structs; + +- pr "#else /* !HAVE_ATTRIBUTE_CLEANUP */\n"; +- +- List.iter ( +- fun { s_name = name } -> +- pr "#define CLEANUP_FREE_%s\n" (String.uppercase_ascii name); +- pr "#define CLEANUP_FREE_%s_LIST\n" (String.uppercase_ascii name) +- ) structs; +- + pr "\ +-#endif /* !HAVE_ATTRIBUTE_CLEANUP */ + + /* These functions are used internally by the CLEANUP_* macros. + * Don't call them directly. +diff --git a/lib/guestfs-internal.h b/lib/guestfs-internal.h +index 174ca135f7..f9f4628aa2 100644 +--- a/lib/guestfs-internal.h ++++ b/lib/guestfs-internal.h +@@ -661,11 +661,7 @@ extern void guestfs_int_end_stringsbuf (guestfs_h *g, struct stringsbuf *sb); + + extern void guestfs_int_free_stringsbuf (struct stringsbuf *sb); + +-#ifdef HAVE_ATTRIBUTE_CLEANUP + #define CLEANUP_FREE_STRINGSBUF __attribute__((cleanup(guestfs_int_cleanup_free_stringsbuf))) +-#else +-#define CLEANUP_FREE_STRINGSBUF +-#endif + extern void guestfs_int_cleanup_free_stringsbuf (struct stringsbuf *sb); + + /* proto.c */ +@@ -785,11 +781,7 @@ extern int guestfs_int_cmd_pipe_run (struct command *cmd, const char *mode); + extern int guestfs_int_cmd_pipe_wait (struct command *cmd); + extern char *guestfs_int_cmd_get_pipe_errors (struct command *cmd); + +-#ifdef HAVE_ATTRIBUTE_CLEANUP + #define CLEANUP_CMD_CLOSE __attribute__((cleanup(guestfs_int_cleanup_cmd_close))) +-#else +-#define CLEANUP_CMD_CLOSE +-#endif + extern void guestfs_int_cleanup_cmd_close (struct command **); + + /* launch-*.c constructors */ +diff --git a/lib/info.c b/lib/info.c +index 4dee7a26a6..b60fc8b39f 100644 +--- a/lib/info.c ++++ b/lib/info.c +@@ -43,7 +43,6 @@ + #include "guestfs-internal.h" + #include "guestfs-internal-actions.h" + +-#ifdef HAVE_ATTRIBUTE_CLEANUP + #define CLEANUP_JSON_T_DECREF __attribute__((cleanup(cleanup_json_t_decref))) + + static void +@@ -52,10 +51,6 @@ cleanup_json_t_decref (void *ptr) + json_decref (* (json_t **) ptr); + } + +-#else +-#define CLEANUP_JSON_T_DECREF +-#endif +- + static json_t *get_json_output (guestfs_h *g, const char *filename); + static int qemu_img_supports_U_option (guestfs_h *g); + static void set_child_rlimits (struct command *); +diff --git a/lib/launch-libvirt.c b/lib/launch-libvirt.c +index fed6dcc863..d01f65780c 100644 +--- a/lib/launch-libvirt.c ++++ b/lib/launch-libvirt.c +@@ -97,7 +97,6 @@ xmlBufferDetach (xmlBufferPtr buf) + } + #endif + +-#ifdef HAVE_ATTRIBUTE_CLEANUP + #define CLEANUP_VIRSECRETFREE __attribute__((cleanup(cleanup_virSecretFree))) + + static void +@@ -108,10 +107,6 @@ cleanup_virSecretFree (void *ptr) + virSecretFree (secret_obj); + } + +-#else /* !HAVE_ATTRIBUTE_CLEANUP */ +-#define CLEANUP_VIRSECRETFREE +-#endif +- + /* List used to store a mapping of secret to libvirt secret UUID. */ + struct secret { + char *secret; +diff --git a/lib/qemu.c b/lib/qemu.c +index 027790e4e7..886c92e5db 100644 +--- a/lib/qemu.c ++++ b/lib/qemu.c +@@ -46,7 +46,6 @@ + #include "guestfs-internal.h" + #include "guestfs_protocol.h" + +-#ifdef HAVE_ATTRIBUTE_CLEANUP + #define CLEANUP_JSON_T_DECREF __attribute__((cleanup(cleanup_json_t_decref))) + + static void +@@ -55,10 +54,6 @@ cleanup_json_t_decref (void *ptr) + json_decref (* (json_t **) ptr); + } + +-#else +-#define CLEANUP_JSON_T_DECREF +-#endif +- + struct qemu_data { + int generation; /* MEMO_GENERATION read from qemu.stat */ + uint64_t prev_size; /* Size of qemu binary when cached. */ +diff --git a/m4/guestfs-c.m4 b/m4/guestfs-c.m4 +index 44c64b6d67..49109cc8fe 100644 +--- a/m4/guestfs-c.m4 ++++ b/m4/guestfs-c.m4 +@@ -109,15 +109,12 @@ main (int argc, char *argv[]) + AC_MSG_RESULT([yes]) + AC_DEFINE([HAVE_ATTRIBUTE_CLEANUP],[1],[Define to 1 if '__attribute__((cleanup(...)))' works with this compiler.]) + ],[ +- AC_MSG_WARN( ++ AC_MSG_ERROR( + ['__attribute__((cleanup(...)))' does not work. + + You may not be using a sufficiently recent version of GCC or CLANG, or + you may be using a C compiler which does not support this attribute, +-or the configure test may be wrong. +- +-The code will still compile, but is likely to leak memory and other +-resources when it runs.])]) ++or the configure test may be wrong.])]) + dnl restore CFLAGS + CFLAGS="${acx_nbdkit_save_CFLAGS}" + +-- +2.46.0 + diff --git a/0005-appliance-Use-stable-owner-group-and-mtime-in-applia.patch b/0005-appliance-Use-stable-owner-group-and-mtime-in-applia.patch new file mode 100644 index 0000000..a1f81a5 --- /dev/null +++ b/0005-appliance-Use-stable-owner-group-and-mtime-in-applia.patch @@ -0,0 +1,56 @@ +From 53632b4b8245a6dd67c95015d52d1f4c562b14ed Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Mon, 21 Oct 2024 11:50:05 +0100 +Subject: [PATCH 5/5] appliance: Use stable owner, group and mtime in appliance + tarballs + +Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2320025 +Signed-off-by: Richard W.M. Jones +--- + appliance/Makefile.am | 11 ++++++++--- + 1 file changed, 8 insertions(+), 3 deletions(-) + +diff --git a/appliance/Makefile.am b/appliance/Makefile.am +index 8cb9bd1fff..7edc90e61f 100644 +--- a/appliance/Makefile.am ++++ b/appliance/Makefile.am +@@ -113,12 +113,17 @@ packagelist: packagelist.in Makefile guestfsd.deps + cmp -s $@ $@-t || mv $@-t $@ + rm -f $@-t + ++# Use stable times and owner/group (RHBZ#2320025). ++TAR_COMMAND := tar -z \ ++ --owner=0 --group=0 \ ++ $${SOURCE_DATE_EPOCH:+--mtime=@"$$SOURCE_DATE_EPOCH"} ++ + supermin.d/daemon.tar.gz: ../daemon/guestfsd + rm -f $@ $@-t + rm -rf tmp-d + mkdir -p tmp-d$(DAEMON_SUPERMIN_DIR) tmp-d/etc + ln ../daemon/guestfsd tmp-d$(DAEMON_SUPERMIN_DIR)/guestfsd +- ( cd tmp-d && tar zcf - * ) > $@-t ++ ( cd tmp-d && $(TAR_COMMAND) -cf - * ) > $@-t + rm -r tmp-d + mv $@-t $@ + +@@ -139,7 +144,7 @@ supermin.d/hostfiles: hostfiles.in Makefile + + supermin.d/init.tar.gz: init + rm -f $@ $@-t +- ( cd $(srcdir) && tar zcf - init ) > $@-t ++ ( cd $(srcdir) && $(TAR_COMMAND) -cf - init ) > $@-t + mv $@-t $@ + + # We should put this file in /lib/udev/rules.d, but put it in /etc so +@@ -149,7 +154,7 @@ supermin.d/udev-rules.tar.gz: 99-guestfs-serial.rules + rm -rf tmp-u + mkdir -p tmp-u/etc/udev/rules.d + for f in $^; do ln $$f tmp-u/etc/udev/rules.d/$$(basename $$f); done +- ( cd tmp-u && tar zcf - etc ) > $@-t ++ ( cd tmp-u && $(TAR_COMMAND) -cf - etc ) > $@-t + rm -r tmp-u + mv $@-t $@ + +-- +2.46.0 + diff --git a/libguestfs.spec b/libguestfs.spec index daf6f41..e3bb4a2 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -42,7 +42,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.54.0 -Release: 2%{?dist} +Release: 3%{?dist} License: LGPL-2.1-or-later # Build only for architectures that have a kernel @@ -76,6 +76,16 @@ Source7: libguestfs.keyring # Maintainer script which helps with handling patches. Source8: copy-patches.sh +# All patches upstream in > 1.54.0 +Patch: 0001-website-Add-links-for-1.54-and-1.55-download-locatio.patch +Patch: 0002-tests-gdisk-test-expand-gpt.pl-Implement-SKIP-rule-f.patch +# Add support for Windows Server 2025 +Patch: 0003-lib-inspect-osinfo.c-Add-Windows-Server-2025-osinfo.patch +Patch: 0004-build-Assume-__attribute__-cleanup-always-works.patch +# Use stable owner, group and mtime in appliance tarballs +# https://bugzilla.redhat.com/show_bug.cgi?id=2320025 +Patch: 0005-appliance-Use-stable-owner-group-and-mtime-in-applia.patch + BuildRequires: autoconf, automake, libtool, gettext-devel # Basic build requirements. @@ -1100,6 +1110,10 @@ rm ocaml/html/.gitignore %changelog +* Mon Oct 21 2024 Richard W.M. Jones - 1:1.54.0-3 +- Use stable owner, group and mtime in appliance tarballs (RHBZ#2320025) +- Add support for Windows Server 2025 + * Mon Oct 14 2024 Remi Collet - 1:1.54.0-2 - rebuild for https://fedoraproject.org/wiki/Changes/php84 From edf179514551ad063be774a4991ae540cef84506 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 22 Oct 2024 16:54:58 +0100 Subject: [PATCH 183/243] Rebuild for Jansson 2.14 (https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/3PYINSQGKQ4BB25NQUI2A2UCGGLAG5ND/) --- libguestfs.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libguestfs.spec b/libguestfs.spec index e3bb4a2..d1da8a0 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -42,7 +42,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.54.0 -Release: 3%{?dist} +Release: 4%{?dist} License: LGPL-2.1-or-later # Build only for architectures that have a kernel @@ -1110,6 +1110,10 @@ rm ocaml/html/.gitignore %changelog +* Tue Oct 22 2024 Richard W.M. Jones - 1:1.54.0-4 +- Rebuild for Jansson 2.14 + (https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/3PYINSQGKQ4BB25NQUI2A2UCGGLAG5ND/) + * Mon Oct 21 2024 Richard W.M. Jones - 1:1.54.0-3 - Use stable owner, group and mtime in appliance tarballs (RHBZ#2320025) - Add support for Windows Server 2025 From 9a92c16bc35204baf19c4f286f5eac23378307a2 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 22 Oct 2024 17:26:03 +0100 Subject: [PATCH 184/243] New upstream development version 1.55.1 Replace jansson with json-c --- ...s-for-1.54-and-1.55-download-locatio.patch | 28 -- ...-expand-gpt.pl-Implement-SKIP-rule-f.patch | 31 -- ...nfo.c-Add-Windows-Server-2025-osinfo.patch | 44 -- ...e-__attribute__-cleanup-always-works.patch | 412 ------------------ ...able-owner-group-and-mtime-in-applia.patch | 56 --- libguestfs.spec | 24 +- sources | 4 +- 7 files changed, 11 insertions(+), 588 deletions(-) delete mode 100644 0001-website-Add-links-for-1.54-and-1.55-download-locatio.patch delete mode 100644 0002-tests-gdisk-test-expand-gpt.pl-Implement-SKIP-rule-f.patch delete mode 100644 0003-lib-inspect-osinfo.c-Add-Windows-Server-2025-osinfo.patch delete mode 100644 0004-build-Assume-__attribute__-cleanup-always-works.patch delete mode 100644 0005-appliance-Use-stable-owner-group-and-mtime-in-applia.patch diff --git a/0001-website-Add-links-for-1.54-and-1.55-download-locatio.patch b/0001-website-Add-links-for-1.54-and-1.55-download-locatio.patch deleted file mode 100644 index e04202e..0000000 --- a/0001-website-Add-links-for-1.54-and-1.55-download-locatio.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 0edaea8f91bf08025651eeff32f53b9335003842 Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Tue, 8 Oct 2024 14:53:38 +0100 -Subject: [PATCH 1/5] website: Add links for 1.54 and 1.55 download locations - ---- - website/index.html.in | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/website/index.html.in b/website/index.html.in -index a61fca9247..2a0d32217e 100644 ---- a/website/index.html.in -+++ b/website/index.html.in -@@ -186,9 +186,10 @@ git clone https://github.com/ - LATEST-URL: http://libguestfs.org/download/1.53-development/libguestfs-@PACKAGE_VERSION@.tar.gz - LATEST-VERSION: @PACKAGE_VERSION@ - --> -- Latest development version: @PACKAGE_VERSION@ (released @RELEASE_DATE@).
-+ Latest development version: @PACKAGE_VERSION@ (released @RELEASE_DATE@).
- Stable branch: - -+ 1.54.x, - 1.52.x, - 1.50.x, - 1.48.x --- -2.46.0 - diff --git a/0002-tests-gdisk-test-expand-gpt.pl-Implement-SKIP-rule-f.patch b/0002-tests-gdisk-test-expand-gpt.pl-Implement-SKIP-rule-f.patch deleted file mode 100644 index 75cf5c7..0000000 --- a/0002-tests-gdisk-test-expand-gpt.pl-Implement-SKIP-rule-f.patch +++ /dev/null @@ -1,31 +0,0 @@ -From c25ff1a8022cf345d3ce29682207ed3732a4244a Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Mon, 14 Oct 2024 10:43:08 +0100 -Subject: [PATCH 2/5] tests/gdisk/test-expand-gpt.pl: Implement SKIP rule for - this test - -Reported-by: David Runge -Related: https://github.com/libguestfs/libguestfs/issues/155 ---- - tests/gdisk/test-expand-gpt.pl | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/tests/gdisk/test-expand-gpt.pl b/tests/gdisk/test-expand-gpt.pl -index 23a52b23ce..5c77247c00 100755 ---- a/tests/gdisk/test-expand-gpt.pl -+++ b/tests/gdisk/test-expand-gpt.pl -@@ -20,6 +20,11 @@ use warnings; - - use Sys::Guestfs; - -+if ($ENV{SKIP_TEST_EXPAND_GPT_PL}) { -+ print "$0: test skipped because SKIP_TEST_EXPAND_GPT_PL is set\n"; -+ exit 77; -+} -+ - sub tests { - my $g = Sys::Guestfs->new (); - --- -2.46.0 - diff --git a/0003-lib-inspect-osinfo.c-Add-Windows-Server-2025-osinfo.patch b/0003-lib-inspect-osinfo.c-Add-Windows-Server-2025-osinfo.patch deleted file mode 100644 index 5258290..0000000 --- a/0003-lib-inspect-osinfo.c-Add-Windows-Server-2025-osinfo.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 0f489f8eec0c02e9ed1d606a2032edccf81ef025 Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Thu, 17 Oct 2024 08:59:49 +0100 -Subject: [PATCH 3/5] lib/inspect-osinfo.c: Add Windows Server 2025 osinfo - -The guest was found to have these inspection fields: - - type: windows - distro: windows - product_name: Windows Server 2025 Standard - product_variant: Server - version: 10.0 - arch: x86_64 - hostname: WIN-84V4KKQ30SM - build ID: 26080 - windows_systemroot: /Windows - windows_software_hive: /Windows/System32/config/SOFTWARE - windows_system_hive: /Windows/System32/config/SYSTEM - windows_current_control_set: ControlSet001 - -Reported-by: Ming Xie -Fixes: https://issues.redhat.com/browse/RHEL-62935 ---- - lib/inspect-osinfo.c | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/lib/inspect-osinfo.c b/lib/inspect-osinfo.c -index c77344f63d..f792d771a8 100644 ---- a/lib/inspect-osinfo.c -+++ b/lib/inspect-osinfo.c -@@ -142,7 +142,9 @@ guestfs_impl_inspect_get_osinfo (guestfs_h *g, const char *root) - switch (minor) { - case 0: - if (strstr (product_variant, "Server")) { -- if (strstr (product_name, "2022")) -+ if (strstr (product_name, "2025")) -+ return safe_strdup (g, "win2k25"); -+ else if (strstr (product_name, "2022")) - return safe_strdup (g, "win2k22"); - else if (strstr (product_name, "2019")) - return safe_strdup (g, "win2k19"); --- -2.46.0 - diff --git a/0004-build-Assume-__attribute__-cleanup-always-works.patch b/0004-build-Assume-__attribute__-cleanup-always-works.patch deleted file mode 100644 index 1ffc2ba..0000000 --- a/0004-build-Assume-__attribute__-cleanup-always-works.patch +++ /dev/null @@ -1,412 +0,0 @@ -From e37768d8892d6f467c7834f8b142b89f8f0af7dc Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Fri, 18 Oct 2024 21:52:21 +0100 -Subject: [PATCH 4/5] build: Assume __attribute__((cleanup)) always works - -All recent compilers support this (except MS compilers which we don't -care about). Assume it is supported. We test it in ./configure and -hard fail if it doesn't work. - -We still define HAVE_ATTRIBUTE_CLEANUP but you can now assume it is -always defined and don't have to check it. ---- - common | 2 +- - daemon/daemon.h | 9 --------- - daemon/sh.c | 5 ----- - daemon/yara.c | 8 -------- - generator/c.ml | 10 ---------- - generator/daemon.ml | 15 --------------- - lib/guestfs-internal.h | 8 -------- - lib/info.c | 5 ----- - lib/launch-libvirt.c | 5 ----- - lib/qemu.c | 5 ----- - m4/guestfs-c.m4 | 7 ++----- - 11 files changed, 3 insertions(+), 76 deletions(-) - -Submodule common b6e703dccb..01c5322606: -diff --git a/common/structs/structs-cleanups.h b/common/structs/structs-cleanups.h -index b43dbd750..c6e7fd1e2 100644 ---- a/common/structs/structs-cleanups.h -+++ b/common/structs/structs-cleanups.h -@@ -28,7 +28,6 @@ - #ifndef GUESTFS_STRUCTS_CLEANUPS_H_ - #define GUESTFS_STRUCTS_CLEANUPS_H_ - --#ifdef HAVE_ATTRIBUTE_CLEANUP - #define CLEANUP_FREE_INT_BOOL \ - __attribute__((cleanup(guestfs_int_cleanup_free_int_bool))) - #define CLEANUP_FREE_INT_BOOL_LIST \ -@@ -137,62 +136,6 @@ - __attribute__((cleanup(guestfs_int_cleanup_free_yara_detection))) - #define CLEANUP_FREE_YARA_DETECTION_LIST \ - __attribute__((cleanup(guestfs_int_cleanup_free_yara_detection_list))) --#else /* !HAVE_ATTRIBUTE_CLEANUP */ --#define CLEANUP_FREE_INT_BOOL --#define CLEANUP_FREE_INT_BOOL_LIST --#define CLEANUP_FREE_LVM_PV --#define CLEANUP_FREE_LVM_PV_LIST --#define CLEANUP_FREE_LVM_VG --#define CLEANUP_FREE_LVM_VG_LIST --#define CLEANUP_FREE_LVM_LV --#define CLEANUP_FREE_LVM_LV_LIST --#define CLEANUP_FREE_STAT --#define CLEANUP_FREE_STAT_LIST --#define CLEANUP_FREE_STATNS --#define CLEANUP_FREE_STATNS_LIST --#define CLEANUP_FREE_STATVFS --#define CLEANUP_FREE_STATVFS_LIST --#define CLEANUP_FREE_DIRENT --#define CLEANUP_FREE_DIRENT_LIST --#define CLEANUP_FREE_VERSION --#define CLEANUP_FREE_VERSION_LIST --#define CLEANUP_FREE_XATTR --#define CLEANUP_FREE_XATTR_LIST --#define CLEANUP_FREE_INOTIFY_EVENT --#define CLEANUP_FREE_INOTIFY_EVENT_LIST --#define CLEANUP_FREE_PARTITION --#define CLEANUP_FREE_PARTITION_LIST --#define CLEANUP_FREE_APPLICATION --#define CLEANUP_FREE_APPLICATION_LIST --#define CLEANUP_FREE_APPLICATION2 --#define CLEANUP_FREE_APPLICATION2_LIST --#define CLEANUP_FREE_ISOINFO --#define CLEANUP_FREE_ISOINFO_LIST --#define CLEANUP_FREE_MDSTAT --#define CLEANUP_FREE_MDSTAT_LIST --#define CLEANUP_FREE_BTRFSSUBVOLUME --#define CLEANUP_FREE_BTRFSSUBVOLUME_LIST --#define CLEANUP_FREE_BTRFSQGROUP --#define CLEANUP_FREE_BTRFSQGROUP_LIST --#define CLEANUP_FREE_BTRFSBALANCE --#define CLEANUP_FREE_BTRFSBALANCE_LIST --#define CLEANUP_FREE_BTRFSSCRUB --#define CLEANUP_FREE_BTRFSSCRUB_LIST --#define CLEANUP_FREE_XFSINFO --#define CLEANUP_FREE_XFSINFO_LIST --#define CLEANUP_FREE_UTSNAME --#define CLEANUP_FREE_UTSNAME_LIST --#define CLEANUP_FREE_HIVEX_NODE --#define CLEANUP_FREE_HIVEX_NODE_LIST --#define CLEANUP_FREE_HIVEX_VALUE --#define CLEANUP_FREE_HIVEX_VALUE_LIST --#define CLEANUP_FREE_INTERNAL_MOUNTABLE --#define CLEANUP_FREE_INTERNAL_MOUNTABLE_LIST --#define CLEANUP_FREE_TSK_DIRENT --#define CLEANUP_FREE_TSK_DIRENT_LIST --#define CLEANUP_FREE_YARA_DETECTION --#define CLEANUP_FREE_YARA_DETECTION_LIST --#endif /* !HAVE_ATTRIBUTE_CLEANUP */ - - /* These functions are used internally by the CLEANUP_* macros. - * Don't call them directly. -diff --git a/common/utils/cleanups.h b/common/utils/cleanups.h -index 932114f6e..be52d0728 100644 ---- a/common/utils/cleanups.h -+++ b/common/utils/cleanups.h -@@ -19,7 +19,6 @@ - #ifndef GUESTFS_CLEANUPS_H_ - #define GUESTFS_CLEANUPS_H_ - --#ifdef HAVE_ATTRIBUTE_CLEANUP - #define CLEANUP_FREE \ - __attribute__((cleanup(guestfs_int_cleanup_free))) - #define CLEANUP_HASH_FREE \ -@@ -50,23 +49,6 @@ - __attribute__((cleanup(guestfs_int_cleanup_xmlXPathFreeObject))) - #define CLEANUP_PCRE2_MATCH_DATA_FREE \ - __attribute__((cleanup(guestfs_int_cleanup_pcre2_match_data_free))) --#else --#define CLEANUP_FREE --#define CLEANUP_HASH_FREE --#define CLEANUP_UNLINK_FREE --#define CLEANUP_CLOSE --#define CLEANUP_FCLOSE --#define CLEANUP_PCLOSE --#define CLEANUP_FREE_STRING_LIST --#define CLEANUP_XMLFREE --#define CLEANUP_XMLBUFFERFREE --#define CLEANUP_XMLFREEDOC --#define CLEANUP_XMLFREEURI --#define CLEANUP_XMLFREETEXTWRITER --#define CLEANUP_XMLXPATHFREECONTEXT --#define CLEANUP_XMLXPATHFREEOBJECT --#define CLEANUP_PCRE2_MATCH_DATA_FREE --#endif - - /* These functions are used internally by the CLEANUP_* macros. - * Don't call them directly. -diff --git a/daemon/daemon.h b/daemon/daemon.h -index e050588cad..5fc53245c9 100644 ---- a/daemon/daemon.h -+++ b/daemon/daemon.h -@@ -93,11 +93,7 @@ extern char *read_whole_file (const char *filename, size_t *size_r); - extern char *mountable_to_string (const mountable_t *mountable); - extern void cleanup_free_mountable (mountable_t *mountable); - --#ifdef HAVE_ATTRIBUTE_CLEANUP - #define CLEANUP_FREE_MOUNTABLE __attribute__((cleanup(cleanup_free_mountable))) --#else --#define CLEANUP_FREE_MOUNTABLE --#endif - - /* cleanups.c */ - /* These functions are used internally by the CLEANUP_* macros. -@@ -106,13 +102,8 @@ extern void cleanup_free_mountable (mountable_t *mountable); - extern void cleanup_aug_close (void *ptr); - extern void cleanup_free_stringsbuf (void *ptr); - --#ifdef HAVE_ATTRIBUTE_CLEANUP - #define CLEANUP_AUG_CLOSE __attribute__((cleanup(cleanup_aug_close))) - #define CLEANUP_FREE_STRINGSBUF __attribute__((cleanup(cleanup_free_stringsbuf))) --#else --#define CLEANUP_AUG_CLOSE --#define CLEANUP_FREE_STRINGSBUF --#endif - - /* mount.c */ - extern int is_root_mounted (void); -diff --git a/daemon/sh.c b/daemon/sh.c -index 92ce08be0f..21d4deeabc 100644 ---- a/daemon/sh.c -+++ b/daemon/sh.c -@@ -32,13 +32,8 @@ - - #include "ignore-value.h" - --#ifdef HAVE_ATTRIBUTE_CLEANUP - #define CLEANUP_BIND_STATE __attribute__((cleanup(free_bind_state))) - #define CLEANUP_RESOLVER_STATE __attribute__((cleanup(free_resolver_state))) --#else --#define CLEANUP_BIND_STATE --#define CLEANUP_RESOLVER_STATE --#endif - - struct bind_state { - bool mounted; -diff --git a/daemon/yara.c b/daemon/yara.c -index 21137b7333..9350dd27b9 100644 ---- a/daemon/yara.c -+++ b/daemon/yara.c -@@ -39,12 +39,8 @@ - - #include - --#ifdef HAVE_ATTRIBUTE_CLEANUP - #define CLEANUP_DESTROY_YARA_COMPILER \ - __attribute__((cleanup(cleanup_destroy_yara_compiler))) --#else --#define CLEANUP_DESTROY_YARA_COMPILER --#endif - - struct write_callback_data { - int fd; -@@ -208,10 +204,6 @@ compile_rules_file (const char *rules_path) - } - - err: --#ifndef HAVE_ATTRIBUTE_CLEANUP -- yr_compiler_destroy (compiler); --#endif -- - return ret; - } - -diff --git a/generator/c.ml b/generator/c.ml -index 447059b8a3..838e7f4267 100644 ---- a/generator/c.ml -+++ b/generator/c.ml -@@ -817,7 +817,6 @@ and generate_client_structs_cleanups_h () = - #ifndef GUESTFS_STRUCTS_CLEANUPS_H_ - #define GUESTFS_STRUCTS_CLEANUPS_H_ - --#ifdef HAVE_ATTRIBUTE_CLEANUP - "; - - List.iter ( -@@ -828,16 +827,7 @@ and generate_client_structs_cleanups_h () = - pr " __attribute__((cleanup(guestfs_int_cleanup_free_%s_list)))\n" name - ) structs; - -- pr "#else /* !HAVE_ATTRIBUTE_CLEANUP */\n"; -- -- List.iter ( -- fun { s_name = name } -> -- pr "#define CLEANUP_FREE_%s\n" (String.uppercase_ascii name); -- pr "#define CLEANUP_FREE_%s_LIST\n" (String.uppercase_ascii name) -- ) structs; -- - pr "\ --#endif /* !HAVE_ATTRIBUTE_CLEANUP */ - - /* These functions are used internally by the CLEANUP_* macros. - * Don't call them directly. -diff --git a/generator/daemon.ml b/generator/daemon.ml -index 78a2412d2e..9ab9e12dfb 100644 ---- a/generator/daemon.ml -+++ b/generator/daemon.ml -@@ -127,8 +127,6 @@ let generate_daemon_stubs actions () = - args_passed_to_daemon in - - if args_passed_to_daemon <> [] then ( -- pr "#ifdef HAVE_ATTRIBUTE_CLEANUP\n"; -- pr "\n"; - pr "#define CLEANUP_XDR_FREE_%s_ARGS \\\n" uc_name; - pr " __attribute__((cleanup(cleanup_xdr_free_%s_args)))\n" name; - pr "\n"; -@@ -140,9 +138,6 @@ let generate_daemon_stubs actions () = - name; - pr "}\n"; - pr "\n"; -- pr "#else /* !HAVE_ATTRIBUTE_CLEANUP */\n"; -- pr "#define CLEANUP_XDR_FREE_%s_ARGS\n" uc_name; -- pr "#endif /* !HAVE_ATTRIBUTE_CLEANUP */\n"; - pr "\n" - ); - -@@ -1315,7 +1310,6 @@ let generate_daemon_structs_cleanups_h () = - #ifndef GUESTFS_DAEMON_STRUCTS_CLEANUPS_H_ - #define GUESTFS_DAEMON_STRUCTS_CLEANUPS_H_ - --#ifdef HAVE_ATTRIBUTE_CLEANUP - "; - - List.iter ( -@@ -1326,16 +1320,7 @@ let generate_daemon_structs_cleanups_h () = - pr " __attribute__((cleanup(cleanup_free_int_%s_list)))\n" name - ) structs; - -- pr "#else /* !HAVE_ATTRIBUTE_CLEANUP */\n"; -- -- List.iter ( -- fun { s_name = name } -> -- pr "#define CLEANUP_FREE_%s\n" (String.uppercase_ascii name); -- pr "#define CLEANUP_FREE_%s_LIST\n" (String.uppercase_ascii name) -- ) structs; -- - pr "\ --#endif /* !HAVE_ATTRIBUTE_CLEANUP */ - - /* These functions are used internally by the CLEANUP_* macros. - * Don't call them directly. -diff --git a/lib/guestfs-internal.h b/lib/guestfs-internal.h -index 174ca135f7..f9f4628aa2 100644 ---- a/lib/guestfs-internal.h -+++ b/lib/guestfs-internal.h -@@ -661,11 +661,7 @@ extern void guestfs_int_end_stringsbuf (guestfs_h *g, struct stringsbuf *sb); - - extern void guestfs_int_free_stringsbuf (struct stringsbuf *sb); - --#ifdef HAVE_ATTRIBUTE_CLEANUP - #define CLEANUP_FREE_STRINGSBUF __attribute__((cleanup(guestfs_int_cleanup_free_stringsbuf))) --#else --#define CLEANUP_FREE_STRINGSBUF --#endif - extern void guestfs_int_cleanup_free_stringsbuf (struct stringsbuf *sb); - - /* proto.c */ -@@ -785,11 +781,7 @@ extern int guestfs_int_cmd_pipe_run (struct command *cmd, const char *mode); - extern int guestfs_int_cmd_pipe_wait (struct command *cmd); - extern char *guestfs_int_cmd_get_pipe_errors (struct command *cmd); - --#ifdef HAVE_ATTRIBUTE_CLEANUP - #define CLEANUP_CMD_CLOSE __attribute__((cleanup(guestfs_int_cleanup_cmd_close))) --#else --#define CLEANUP_CMD_CLOSE --#endif - extern void guestfs_int_cleanup_cmd_close (struct command **); - - /* launch-*.c constructors */ -diff --git a/lib/info.c b/lib/info.c -index 4dee7a26a6..b60fc8b39f 100644 ---- a/lib/info.c -+++ b/lib/info.c -@@ -43,7 +43,6 @@ - #include "guestfs-internal.h" - #include "guestfs-internal-actions.h" - --#ifdef HAVE_ATTRIBUTE_CLEANUP - #define CLEANUP_JSON_T_DECREF __attribute__((cleanup(cleanup_json_t_decref))) - - static void -@@ -52,10 +51,6 @@ cleanup_json_t_decref (void *ptr) - json_decref (* (json_t **) ptr); - } - --#else --#define CLEANUP_JSON_T_DECREF --#endif -- - static json_t *get_json_output (guestfs_h *g, const char *filename); - static int qemu_img_supports_U_option (guestfs_h *g); - static void set_child_rlimits (struct command *); -diff --git a/lib/launch-libvirt.c b/lib/launch-libvirt.c -index fed6dcc863..d01f65780c 100644 ---- a/lib/launch-libvirt.c -+++ b/lib/launch-libvirt.c -@@ -97,7 +97,6 @@ xmlBufferDetach (xmlBufferPtr buf) - } - #endif - --#ifdef HAVE_ATTRIBUTE_CLEANUP - #define CLEANUP_VIRSECRETFREE __attribute__((cleanup(cleanup_virSecretFree))) - - static void -@@ -108,10 +107,6 @@ cleanup_virSecretFree (void *ptr) - virSecretFree (secret_obj); - } - --#else /* !HAVE_ATTRIBUTE_CLEANUP */ --#define CLEANUP_VIRSECRETFREE --#endif -- - /* List used to store a mapping of secret to libvirt secret UUID. */ - struct secret { - char *secret; -diff --git a/lib/qemu.c b/lib/qemu.c -index 027790e4e7..886c92e5db 100644 ---- a/lib/qemu.c -+++ b/lib/qemu.c -@@ -46,7 +46,6 @@ - #include "guestfs-internal.h" - #include "guestfs_protocol.h" - --#ifdef HAVE_ATTRIBUTE_CLEANUP - #define CLEANUP_JSON_T_DECREF __attribute__((cleanup(cleanup_json_t_decref))) - - static void -@@ -55,10 +54,6 @@ cleanup_json_t_decref (void *ptr) - json_decref (* (json_t **) ptr); - } - --#else --#define CLEANUP_JSON_T_DECREF --#endif -- - struct qemu_data { - int generation; /* MEMO_GENERATION read from qemu.stat */ - uint64_t prev_size; /* Size of qemu binary when cached. */ -diff --git a/m4/guestfs-c.m4 b/m4/guestfs-c.m4 -index 44c64b6d67..49109cc8fe 100644 ---- a/m4/guestfs-c.m4 -+++ b/m4/guestfs-c.m4 -@@ -109,15 +109,12 @@ main (int argc, char *argv[]) - AC_MSG_RESULT([yes]) - AC_DEFINE([HAVE_ATTRIBUTE_CLEANUP],[1],[Define to 1 if '__attribute__((cleanup(...)))' works with this compiler.]) - ],[ -- AC_MSG_WARN( -+ AC_MSG_ERROR( - ['__attribute__((cleanup(...)))' does not work. - - You may not be using a sufficiently recent version of GCC or CLANG, or - you may be using a C compiler which does not support this attribute, --or the configure test may be wrong. -- --The code will still compile, but is likely to leak memory and other --resources when it runs.])]) -+or the configure test may be wrong.])]) - dnl restore CFLAGS - CFLAGS="${acx_nbdkit_save_CFLAGS}" - --- -2.46.0 - diff --git a/0005-appliance-Use-stable-owner-group-and-mtime-in-applia.patch b/0005-appliance-Use-stable-owner-group-and-mtime-in-applia.patch deleted file mode 100644 index a1f81a5..0000000 --- a/0005-appliance-Use-stable-owner-group-and-mtime-in-applia.patch +++ /dev/null @@ -1,56 +0,0 @@ -From 53632b4b8245a6dd67c95015d52d1f4c562b14ed Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Mon, 21 Oct 2024 11:50:05 +0100 -Subject: [PATCH 5/5] appliance: Use stable owner, group and mtime in appliance - tarballs - -Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2320025 -Signed-off-by: Richard W.M. Jones ---- - appliance/Makefile.am | 11 ++++++++--- - 1 file changed, 8 insertions(+), 3 deletions(-) - -diff --git a/appliance/Makefile.am b/appliance/Makefile.am -index 8cb9bd1fff..7edc90e61f 100644 ---- a/appliance/Makefile.am -+++ b/appliance/Makefile.am -@@ -113,12 +113,17 @@ packagelist: packagelist.in Makefile guestfsd.deps - cmp -s $@ $@-t || mv $@-t $@ - rm -f $@-t - -+# Use stable times and owner/group (RHBZ#2320025). -+TAR_COMMAND := tar -z \ -+ --owner=0 --group=0 \ -+ $${SOURCE_DATE_EPOCH:+--mtime=@"$$SOURCE_DATE_EPOCH"} -+ - supermin.d/daemon.tar.gz: ../daemon/guestfsd - rm -f $@ $@-t - rm -rf tmp-d - mkdir -p tmp-d$(DAEMON_SUPERMIN_DIR) tmp-d/etc - ln ../daemon/guestfsd tmp-d$(DAEMON_SUPERMIN_DIR)/guestfsd -- ( cd tmp-d && tar zcf - * ) > $@-t -+ ( cd tmp-d && $(TAR_COMMAND) -cf - * ) > $@-t - rm -r tmp-d - mv $@-t $@ - -@@ -139,7 +144,7 @@ supermin.d/hostfiles: hostfiles.in Makefile - - supermin.d/init.tar.gz: init - rm -f $@ $@-t -- ( cd $(srcdir) && tar zcf - init ) > $@-t -+ ( cd $(srcdir) && $(TAR_COMMAND) -cf - init ) > $@-t - mv $@-t $@ - - # We should put this file in /lib/udev/rules.d, but put it in /etc so -@@ -149,7 +154,7 @@ supermin.d/udev-rules.tar.gz: 99-guestfs-serial.rules - rm -rf tmp-u - mkdir -p tmp-u/etc/udev/rules.d - for f in $^; do ln $$f tmp-u/etc/udev/rules.d/$$(basename $$f); done -- ( cd tmp-u && tar zcf - etc ) > $@-t -+ ( cd tmp-u && $(TAR_COMMAND) -cf - etc ) > $@-t - rm -r tmp-u - mv $@-t $@ - --- -2.46.0 - diff --git a/libguestfs.spec b/libguestfs.spec index d1da8a0..fb5e46b 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -30,7 +30,7 @@ ExcludeArch: %{ix86} %global verify_tarball_signature 1 # The source directory. -%global source_directory 1.54-stable +%global source_directory 1.55-development # Filter perl provides. %{?perl_default_filter} @@ -41,8 +41,8 @@ ExcludeArch: %{ix86} Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 -Version: 1.54.0 -Release: 4%{?dist} +Version: 1.55.1 +Release: 1%{?dist} License: LGPL-2.1-or-later # Build only for architectures that have a kernel @@ -76,16 +76,6 @@ Source7: libguestfs.keyring # Maintainer script which helps with handling patches. Source8: copy-patches.sh -# All patches upstream in > 1.54.0 -Patch: 0001-website-Add-links-for-1.54-and-1.55-download-locatio.patch -Patch: 0002-tests-gdisk-test-expand-gpt.pl-Implement-SKIP-rule-f.patch -# Add support for Windows Server 2025 -Patch: 0003-lib-inspect-osinfo.c-Add-Windows-Server-2025-osinfo.patch -Patch: 0004-build-Assume-__attribute__-cleanup-always-works.patch -# Use stable owner, group and mtime in appliance tarballs -# https://bugzilla.redhat.com/show_bug.cgi?id=2320025 -Patch: 0005-appliance-Use-stable-owner-group-and-mtime-in-applia.patch - BuildRequires: autoconf, automake, libtool, gettext-devel # Basic build requirements. @@ -136,7 +126,7 @@ BuildRequires: libcap-devel %if !0%{?rhel} BuildRequires: libldm-devel %endif -BuildRequires: jansson-devel +BuildRequires: json-c-devel BuildRequires: systemd-devel BuildRequires: bash-completion-devel BuildRequires: /usr/bin/ping @@ -295,7 +285,7 @@ Requires: (%{name}-appliance = %{epoch}:%{version}-%{release} or %{name}-no # The daemon dependencies are not included automatically, because it # is buried inside the appliance, so list them here. Requires: augeas-libs%{?_isa} >= 1.7.0 -Requires: jansson%{?_isa} +Requires: json-c%{?_isa} Requires: libacl%{?_isa} Requires: libcap%{?_isa} Requires: libselinux%{?_isa} @@ -1110,6 +1100,10 @@ rm ocaml/html/.gitignore %changelog +* Tue Oct 22 2024 Richard W.M. Jones - 1:1.55.1-1 +- New upstream development version 1.55.1 +- Replace jansson with json-c + * Tue Oct 22 2024 Richard W.M. Jones - 1:1.54.0-4 - Rebuild for Jansson 2.14 (https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/3PYINSQGKQ4BB25NQUI2A2UCGGLAG5ND/) diff --git a/sources b/sources index e8f63e9..6a3639c 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (libguestfs-1.54.0.tar.gz) = 45fd91a36384c15737820c9157d4a8a670c94177ab917a2600fef04ecbc8d6531ef04a4a86bea6540e04a550de7dfacbef9645f2869e7c5eab6cb63058ff2d86 -SHA512 (libguestfs-1.54.0.tar.gz.sig) = 97c27a5cafa533587ae2e22a54fed16d37c5366cca2a4c40cb098a8dacf62ee8b1bcee9d28f63b01e7034f0f211e8a8c71368ae418f1bfba4970ca1942bf40f3 +SHA512 (libguestfs-1.55.1.tar.gz) = 827f848aeee15c63ed8421f56000a86f532e6d106f85e603b6650185f608d25f4044db6999d10c3af2d8769f4a7f6d56c448fa2edeb4fb0c1bf479f527873655 +SHA512 (libguestfs-1.55.1.tar.gz.sig) = fde95a95cd32c3c275ac8baf1109e306202e3853b196b0eb1ab63995ca68bcf75be21eecdf1b1314a2305c47feec8ba687230922d675ed5f6c142a33af09e30e From 969d54fb5aef9c9177a5e7425839bcc262619ecd Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 18 Nov 2024 14:52:30 +0000 Subject: [PATCH 185/243] New upstream development version 1.55.2 --- libguestfs.spec | 5 ++++- sources | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index fb5e46b..1ca2b3a 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -41,7 +41,7 @@ ExcludeArch: %{ix86} Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 -Version: 1.55.1 +Version: 1.55.2 Release: 1%{?dist} License: LGPL-2.1-or-later @@ -1100,6 +1100,9 @@ rm ocaml/html/.gitignore %changelog +* Mon Nov 18 2024 Richard W.M. Jones - 1:1.55.2-1 +- New upstream development version 1.55.2 + * Tue Oct 22 2024 Richard W.M. Jones - 1:1.55.1-1 - New upstream development version 1.55.1 - Replace jansson with json-c diff --git a/sources b/sources index 6a3639c..40fe20c 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (libguestfs-1.55.1.tar.gz) = 827f848aeee15c63ed8421f56000a86f532e6d106f85e603b6650185f608d25f4044db6999d10c3af2d8769f4a7f6d56c448fa2edeb4fb0c1bf479f527873655 -SHA512 (libguestfs-1.55.1.tar.gz.sig) = fde95a95cd32c3c275ac8baf1109e306202e3853b196b0eb1ab63995ca68bcf75be21eecdf1b1314a2305c47feec8ba687230922d675ed5f6c142a33af09e30e +SHA512 (libguestfs-1.55.2.tar.gz) = 86bed33d6cea563a2127f82a71ef91a3de4f4532b682341c64001d0fbe2f248d46eb5bcf892acdb50e87919094deadd88290667c2c25c7e950b3274ba1f432c8 +SHA512 (libguestfs-1.55.2.tar.gz.sig) = 9476c14c6ae4b6f7c0ac4cd7d212eed734a9712709dd01f24dd1bbedcd3254c7e259d4f9c1c2f6685aaeed3b7661fe9afc13df4278e8675e6cb4db12d565d517 From ff5b9715aa981d712b281069c260208d21aa40e8 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 18 Nov 2024 16:27:25 +0000 Subject: [PATCH 186/243] Make perl Guestfs.so writable https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/DH5N6XV2NJHBIMX226HPDFUMO5NODE2V/ --- libguestfs.spec | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libguestfs.spec b/libguestfs.spec index 1ca2b3a..aa4d4f8 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -802,6 +802,10 @@ find $RPM_BUILD_ROOT -name .packlist -delete find $RPM_BUILD_ROOT -name '*.bs' -delete find $RPM_BUILD_ROOT -name 'bindtests.pl' -delete +# debuginfo generation fails with debugedit >= 5.1 unless the files +# are writable: +find $RPM_BUILD_ROOT -name Guestfs.so -exec chmod u+w {} \; + # golang: Ignore what libguestfs upstream installs, and just copy the # source files to %%{_datadir}/gocode/src. %ifarch %{golang_arches} From d08c746e966ee9975e99acc35fa97490153601d6 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 26 Nov 2024 09:22:49 +0000 Subject: [PATCH 187/243] Remove squashfs-tools on RHEL Fixes: https://issues.redhat.com/browse/RHEL-68937 --- libguestfs.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libguestfs.spec b/libguestfs.spec index aa4d4f8..11a8277 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -248,8 +248,8 @@ BuildRequires: scrub BuildRequires: sed %if !0%{?rhel} BuildRequires: sleuthkit -%endif BuildRequires: squashfs-tools +%endif BuildRequires: strace %if !0%{?rhel} %ifarch %{ix86} x86_64 From 97c01ad3a0650644853dadfe86b9692eb6a9e55c Mon Sep 17 00:00:00 2001 From: Mamoru TASAKA Date: Wed, 8 Jan 2025 15:16:17 +0900 Subject: [PATCH 188/243] Rebuild for https://fedoraproject.org/wiki/Changes/Ruby_3.4 --- libguestfs.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libguestfs.spec b/libguestfs.spec index 11a8277..1334b4e 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -42,7 +42,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.55.2 -Release: 1%{?dist} +Release: 2%{?dist} License: LGPL-2.1-or-later # Build only for architectures that have a kernel @@ -1104,6 +1104,9 @@ rm ocaml/html/.gitignore %changelog +* Wed Jan 08 2025 Mamoru TASAKA - 1:1.55.2-2 +- Rebuild for https://fedoraproject.org/wiki/Changes/Ruby_3.4 + * Mon Nov 18 2024 Richard W.M. Jones - 1:1.55.2-1 - New upstream development version 1.55.2 From 884fa6683d581f5e0c18797811c6a231970abb5e Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 8 Jan 2025 17:31:25 +0000 Subject: [PATCH 189/243] New upstream development version 1.55.3 Baseline version of OCaml moved to 4.08 --- libguestfs.spec | 10 +++++++--- sources | 4 ++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index 1334b4e..2209790 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -41,8 +41,8 @@ ExcludeArch: %{ix86} Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 -Version: 1.55.2 -Release: 2%{?dist} +Version: 1.55.3 +Release: 1%{?dist} License: LGPL-2.1-or-later # Build only for architectures that have a kernel @@ -141,7 +141,7 @@ BuildRequires: gnupg2 %endif # For language bindings. -BuildRequires: ocaml +BuildRequires: ocaml >= 4.08 BuildRequires: ocaml-ocamldoc BuildRequires: ocaml-findlib-devel %if !0%{?rhel} @@ -1104,6 +1104,10 @@ rm ocaml/html/.gitignore %changelog +* Wed Jan 08 2025 Richard W.M. Jones - 1:1.55.3-1 +- New upstream development version 1.55.3 +- Baseline version of OCaml moved to 4.08 + * Wed Jan 08 2025 Mamoru TASAKA - 1:1.55.2-2 - Rebuild for https://fedoraproject.org/wiki/Changes/Ruby_3.4 diff --git a/sources b/sources index 40fe20c..e7dc362 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (libguestfs-1.55.2.tar.gz) = 86bed33d6cea563a2127f82a71ef91a3de4f4532b682341c64001d0fbe2f248d46eb5bcf892acdb50e87919094deadd88290667c2c25c7e950b3274ba1f432c8 -SHA512 (libguestfs-1.55.2.tar.gz.sig) = 9476c14c6ae4b6f7c0ac4cd7d212eed734a9712709dd01f24dd1bbedcd3254c7e259d4f9c1c2f6685aaeed3b7661fe9afc13df4278e8675e6cb4db12d565d517 +SHA512 (libguestfs-1.55.3.tar.gz) = 88f8f6e55cd52904193cf4c026ebbe34c25c707bf6bf0a34ac1d6e4a9c9f69b478e55eb46581ea47e820015ca432c38ec6252007f00394f297003596567d2bf0 +SHA512 (libguestfs-1.55.3.tar.gz.sig) = 7fd680e69f4a226ca8dbbc9862347bd169a669f436fd191de2702b2ed56c4f21e81540ed5dca659852362dccfccb952c0377506409070c82ce0e803e4f6d78b1 From f7d93df6a3e34c88464f5cc49724543ab453e0c8 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 9 Jan 2025 11:21:48 +0000 Subject: [PATCH 190/243] Rebuild for Ruby 3.4 again (RHBZ#2336525) --- libguestfs.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libguestfs.spec b/libguestfs.spec index 2209790..ba19e7e 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -42,7 +42,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.55.3 -Release: 1%{?dist} +Release: 2%{?dist} License: LGPL-2.1-or-later # Build only for architectures that have a kernel @@ -1104,6 +1104,9 @@ rm ocaml/html/.gitignore %changelog +* Thu Jan 09 2025 Richard W.M. Jones - 1:1.55.3-2 +- Rebuild for Ruby 3.4 again (RHBZ#2336525) + * Wed Jan 08 2025 Richard W.M. Jones - 1:1.55.3-1 - New upstream development version 1.55.3 - Baseline version of OCaml moved to 4.08 From b0b5282cc0a64e5adfe309b707e406a414e90f61 Mon Sep 17 00:00:00 2001 From: Jerry James Date: Fri, 10 Jan 2025 14:03:26 -0700 Subject: [PATCH 191/243] OCaml 5.3.0 rebuild for Fedora 42 --- libguestfs.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libguestfs.spec b/libguestfs.spec index ba19e7e..4623182 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -42,7 +42,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.55.3 -Release: 2%{?dist} +Release: 3%{?dist} License: LGPL-2.1-or-later # Build only for architectures that have a kernel @@ -1104,6 +1104,9 @@ rm ocaml/html/.gitignore %changelog +* Fri Jan 10 2025 Jerry James - 1:1.55.3-3 +- OCaml 5.3.0 rebuild for Fedora 42 + * Thu Jan 09 2025 Richard W.M. Jones - 1:1.55.3-2 - Rebuild for Ruby 3.4 again (RHBZ#2336525) From 64a8335772043010301ff060820f826a1d3b8a41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Sun, 12 Jan 2025 14:33:37 +0100 Subject: [PATCH 192/243] Rebuilt for the bin-sbin merge (2nd attempt) https://fedoraproject.org/wiki/Changes/Unify_bin_and_sbin --- libguestfs.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libguestfs.spec b/libguestfs.spec index 4623182..d666772 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -42,7 +42,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.55.3 -Release: 3%{?dist} +Release: 4%{?dist} License: LGPL-2.1-or-later # Build only for architectures that have a kernel @@ -1104,6 +1104,9 @@ rm ocaml/html/.gitignore %changelog +* Sun Jan 12 2025 Zbigniew Jędrzejewski-Szmek - 1:1.55.3-4 +- Rebuilt for the bin-sbin merge (2nd attempt) + * Fri Jan 10 2025 Jerry James - 1:1.55.3-3 - OCaml 5.3.0 rebuild for Fedora 42 From 655a9a1be9f2b46ae998a5697715cee4c84442e9 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 17 Jan 2025 11:27:12 +0000 Subject: [PATCH 193/243] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild --- libguestfs.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libguestfs.spec b/libguestfs.spec index d666772..3933a40 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -42,7 +42,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.55.3 -Release: 4%{?dist} +Release: 5%{?dist} License: LGPL-2.1-or-later # Build only for architectures that have a kernel @@ -1104,6 +1104,9 @@ rm ocaml/html/.gitignore %changelog +* Fri Jan 17 2025 Fedora Release Engineering - 1:1.55.3-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + * Sun Jan 12 2025 Zbigniew Jędrzejewski-Szmek - 1:1.55.3-4 - Rebuilt for the bin-sbin merge (2nd attempt) From b4cbc4fbfc6efa7fbaa99c00b72716925c0b4438 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 5 Feb 2025 13:53:19 +0000 Subject: [PATCH 194/243] New upstream development version 1.55.4 Contains upstream fix for bin/sbin merge brokenness. --- libguestfs.spec | 7 +++++-- sources | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index 3933a40..67821a9 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -41,8 +41,8 @@ ExcludeArch: %{ix86} Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 -Version: 1.55.3 -Release: 5%{?dist} +Version: 1.55.4 +Release: 1%{?dist} License: LGPL-2.1-or-later # Build only for architectures that have a kernel @@ -1104,6 +1104,9 @@ rm ocaml/html/.gitignore %changelog +* Wed Feb 05 2025 Richard W.M. Jones - 1:1.55.4-1 +- New upstream development version 1.55.4 + * Fri Jan 17 2025 Fedora Release Engineering - 1:1.55.3-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild diff --git a/sources b/sources index e7dc362..783aa95 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (libguestfs-1.55.3.tar.gz) = 88f8f6e55cd52904193cf4c026ebbe34c25c707bf6bf0a34ac1d6e4a9c9f69b478e55eb46581ea47e820015ca432c38ec6252007f00394f297003596567d2bf0 -SHA512 (libguestfs-1.55.3.tar.gz.sig) = 7fd680e69f4a226ca8dbbc9862347bd169a669f436fd191de2702b2ed56c4f21e81540ed5dca659852362dccfccb952c0377506409070c82ce0e803e4f6d78b1 +SHA512 (libguestfs-1.55.4.tar.gz) = da8e56e57d0745a49bc01f6ba48d11a4c63ea7cef99616d97fdea4414d8574cc48c4ecfc70b4b64454c77c221d0cea3fef2734686d6e548a3ca4de703ed211ca +SHA512 (libguestfs-1.55.4.tar.gz.sig) = 7e55b047da6808c10540132abc03979a9758a5d9bd015335cb3ee3351ab0b2850bdc0629df8cf8f47de27e4bd2930f225c31469d5baca0b601e67616e242dfd4 From d0aaeeedabbc7876231e72f2771b687093529865 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 18 Feb 2025 11:25:02 +0000 Subject: [PATCH 195/243] New upstream development version 1.55.5 --- libguestfs.spec | 5 ++++- sources | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index 67821a9..ba350c0 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -41,7 +41,7 @@ ExcludeArch: %{ix86} Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 -Version: 1.55.4 +Version: 1.55.5 Release: 1%{?dist} License: LGPL-2.1-or-later @@ -1104,6 +1104,9 @@ rm ocaml/html/.gitignore %changelog +* Tue Feb 18 2025 Richard W.M. Jones - 1:1.55.5-1 +- New upstream development version 1.55.5 + * Wed Feb 05 2025 Richard W.M. Jones - 1:1.55.4-1 - New upstream development version 1.55.4 diff --git a/sources b/sources index 783aa95..dcd8483 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (libguestfs-1.55.4.tar.gz) = da8e56e57d0745a49bc01f6ba48d11a4c63ea7cef99616d97fdea4414d8574cc48c4ecfc70b4b64454c77c221d0cea3fef2734686d6e548a3ca4de703ed211ca -SHA512 (libguestfs-1.55.4.tar.gz.sig) = 7e55b047da6808c10540132abc03979a9758a5d9bd015335cb3ee3351ab0b2850bdc0629df8cf8f47de27e4bd2930f225c31469d5baca0b601e67616e242dfd4 +SHA512 (libguestfs-1.55.5.tar.gz) = 01b08e0c72cb52c643406767b611599f2de776deea5927518f7dbceb590195655e4313fd17ce0f9d1a54bb8847943dcf816f6b63c17b570ce1a0bc68a5cf4381 +SHA512 (libguestfs-1.55.5.tar.gz.sig) = b54a392093677076d2ca0cf062fc87131f3bd62b0babb7ffba2ec874cc4837036a07a83793e06c8ae7a889b5275c20069af4668ccf87b8116b8a8ad67992b5f5 From 67218f97d2c921f12ae1bf5cb618b526a553e7e7 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 19 Feb 2025 17:03:34 +0000 Subject: [PATCH 196/243] New upstream development version 1.55.6 --- libguestfs.spec | 5 ++++- sources | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index ba350c0..a734ad9 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -41,7 +41,7 @@ ExcludeArch: %{ix86} Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 -Version: 1.55.5 +Version: 1.55.6 Release: 1%{?dist} License: LGPL-2.1-or-later @@ -1104,6 +1104,9 @@ rm ocaml/html/.gitignore %changelog +* Wed Feb 19 2025 Richard W.M. Jones - 1:1.55.6-1 +- New upstream development version 1.55.6 + * Tue Feb 18 2025 Richard W.M. Jones - 1:1.55.5-1 - New upstream development version 1.55.5 diff --git a/sources b/sources index dcd8483..6e57975 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (libguestfs-1.55.5.tar.gz) = 01b08e0c72cb52c643406767b611599f2de776deea5927518f7dbceb590195655e4313fd17ce0f9d1a54bb8847943dcf816f6b63c17b570ce1a0bc68a5cf4381 -SHA512 (libguestfs-1.55.5.tar.gz.sig) = b54a392093677076d2ca0cf062fc87131f3bd62b0babb7ffba2ec874cc4837036a07a83793e06c8ae7a889b5275c20069af4668ccf87b8116b8a8ad67992b5f5 +SHA512 (libguestfs-1.55.6.tar.gz) = 3dba2f8c2086024674375d054a214d34a028345e2f32cf439de38dfe2815ab2cc6cc64cff58b59ed2f38712006e1563fdf58713ccecfe155b7542742a4ee5104 +SHA512 (libguestfs-1.55.6.tar.gz.sig) = db4c89e918b2404f511734d34c98aedd58c3b1446d8831c7793958e1f70d24fe5378b331d015b53ad7f90ec04c9aa98fe7d6390b08e80fdac19691a4e30b95dd From 00b17b7430bd394c3381f2336ad85b5314a1cb5a Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 11 Mar 2025 15:34:52 +0000 Subject: [PATCH 197/243] New upstream development version 1.55.7 --- libguestfs.spec | 5 ++++- sources | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index a734ad9..cdb66fd 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -41,7 +41,7 @@ ExcludeArch: %{ix86} Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 -Version: 1.55.6 +Version: 1.55.7 Release: 1%{?dist} License: LGPL-2.1-or-later @@ -1104,6 +1104,9 @@ rm ocaml/html/.gitignore %changelog +* Tue Mar 11 2025 Richard W.M. Jones - 1:1.55.7-1 +- New upstream development version 1.55.7 + * Wed Feb 19 2025 Richard W.M. Jones - 1:1.55.6-1 - New upstream development version 1.55.6 diff --git a/sources b/sources index 6e57975..20c30e7 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (libguestfs-1.55.6.tar.gz) = 3dba2f8c2086024674375d054a214d34a028345e2f32cf439de38dfe2815ab2cc6cc64cff58b59ed2f38712006e1563fdf58713ccecfe155b7542742a4ee5104 -SHA512 (libguestfs-1.55.6.tar.gz.sig) = db4c89e918b2404f511734d34c98aedd58c3b1446d8831c7793958e1f70d24fe5378b331d015b53ad7f90ec04c9aa98fe7d6390b08e80fdac19691a4e30b95dd +SHA512 (libguestfs-1.55.7.tar.gz) = aa00378699914495d4450e13bd67cbb248854b2134e95be637de8a1f99c94cb088a5af82f1b89a7ec4e30002e85896a1526000f1eab0db9e0ad82d4783fba157 +SHA512 (libguestfs-1.55.7.tar.gz.sig) = aa8ff17b3cefe39ef8074d56680c1c1a13d609fceeb4b110f3e94c68386e3bba078a63847023b0d29604a68e38fbbdffcd724eae481bc230702147a3a989510a From 04ee36056b514104808abf0d15dab6e0c490c383 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 3 Apr 2025 19:10:06 +0100 Subject: [PATCH 198/243] New upstream development version 1.55.8 Remove oUnit --- libguestfs.spec | 7 +++++-- sources | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index cdb66fd..b6da4be 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -41,7 +41,7 @@ ExcludeArch: %{ix86} Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 -Version: 1.55.7 +Version: 1.55.8 Release: 1%{?dist} License: LGPL-2.1-or-later @@ -145,7 +145,6 @@ BuildRequires: ocaml >= 4.08 BuildRequires: ocaml-ocamldoc BuildRequires: ocaml-findlib-devel %if !0%{?rhel} -BuildRequires: ocaml-ounit-devel BuildRequires: lua BuildRequires: lua-devel %endif @@ -1104,6 +1103,10 @@ rm ocaml/html/.gitignore %changelog +* Thu Apr 03 2025 Richard W.M. Jones - 1:1.55.8-1 +- New upstream development version 1.55.8 +- Remove oUnit + * Tue Mar 11 2025 Richard W.M. Jones - 1:1.55.7-1 - New upstream development version 1.55.7 diff --git a/sources b/sources index 20c30e7..fc72b4e 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (libguestfs-1.55.7.tar.gz) = aa00378699914495d4450e13bd67cbb248854b2134e95be637de8a1f99c94cb088a5af82f1b89a7ec4e30002e85896a1526000f1eab0db9e0ad82d4783fba157 -SHA512 (libguestfs-1.55.7.tar.gz.sig) = aa8ff17b3cefe39ef8074d56680c1c1a13d609fceeb4b110f3e94c68386e3bba078a63847023b0d29604a68e38fbbdffcd724eae481bc230702147a3a989510a +SHA512 (libguestfs-1.55.8.tar.gz) = 86510eb82c03381d432bca2ef1d077a971e0d0f27c7852a81dff0228bd3745748a19dff597defb948dd182568a0a949aaa37a1bbd619a96f976b4974f7c81c92 +SHA512 (libguestfs-1.55.8.tar.gz.sig) = 08d64a4c1e885201961af6e48f95c7d2cccf6fa2ee5c50db5890b673f5e6397f09b89432a7ac1b5f6890424873b359c5f74d264bc2f243ed84fb1738c142cec1 From 566608b2fc4670d4039bc4d3cc196bc62d3ba1f8 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 4 Apr 2025 08:54:20 +0100 Subject: [PATCH 199/243] Disable tests on aarch64 https://gitlab.com/libvirt/libvirt/-/issues/762 --- libguestfs.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libguestfs.spec b/libguestfs.spec index b6da4be..6763158 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -14,7 +14,10 @@ ExcludeArch: %{ix86} # broken. To perform the full test suite, see instructions here: # https://www.redhat.com/archives/libguestfs/2015-September/msg00078.html %if !0%{?rhel} -%global test_arches aarch64 %{power64} s390x x86_64 +#%%global test_arches aarch64 %{power64} s390x x86_64 +# aarch64 broken in Rawhide: +# https://gitlab.com/libvirt/libvirt/-/issues/762 +%global test_arches %{power64} s390x x86_64 %else # RHEL 9 only: # x86-64: "/lib64/libc.so.6: CPU ISA level is lower than required" From 1fc58abcdda7a5eea0a7521ec853833ead6e39f8 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 16 Apr 2025 22:02:34 +0100 Subject: [PATCH 200/243] New upstream development version 1.55.9 Remove flex and bison --- libguestfs.spec | 8 +++++--- sources | 4 ++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index 6763158..2c760df 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -44,7 +44,7 @@ ExcludeArch: %{ix86} Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 -Version: 1.55.8 +Version: 1.55.9 Release: 1%{?dist} License: LGPL-2.1-or-later @@ -107,8 +107,6 @@ BuildRequires: pcre2-devel BuildRequires: file-devel BuildRequires: libvirt-devel BuildRequires: gperf -BuildRequires: flex -BuildRequires: bison BuildRequires: rpm-devel BuildRequires: cpio BuildRequires: libconfig-devel @@ -1106,6 +1104,10 @@ rm ocaml/html/.gitignore %changelog +* Wed Apr 16 2025 Richard W.M. Jones - 1:1.55.9-1 +- New upstream development version 1.55.9 +- Remove flex and bison + * Thu Apr 03 2025 Richard W.M. Jones - 1:1.55.8-1 - New upstream development version 1.55.8 - Remove oUnit diff --git a/sources b/sources index fc72b4e..62ea16b 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (libguestfs-1.55.8.tar.gz) = 86510eb82c03381d432bca2ef1d077a971e0d0f27c7852a81dff0228bd3745748a19dff597defb948dd182568a0a949aaa37a1bbd619a96f976b4974f7c81c92 -SHA512 (libguestfs-1.55.8.tar.gz.sig) = 08d64a4c1e885201961af6e48f95c7d2cccf6fa2ee5c50db5890b673f5e6397f09b89432a7ac1b5f6890424873b359c5f74d264bc2f243ed84fb1738c142cec1 +SHA512 (libguestfs-1.55.9.tar.gz) = 0d73bc3d62d1902244a22d52cbbeb5c68f8bfab5402ad38d3b9d6e2ec4991f78063cf3263f48fa71d31e8a0c0ec9ea38433c9c428c83fa1ce6a9bdf3f16443e8 +SHA512 (libguestfs-1.55.9.tar.gz.sig) = 31715a343758dcec36cd7114e6a1882a020428078430c278711761433526f13596b5e7d54e510d724ad473e1abec34bab0249282b48f5f266ca8d13db7ee7d7b From a1eed9c04c9e64cf24bc83a0da2cd6b05f7400c3 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 25 Apr 2025 17:05:22 +0100 Subject: [PATCH 201/243] Fix RHEL gating tests These would always fail because libvirt doesn't start up after being installed. You would see errors like: libguestfs: opening libvirt handle: URI = qemu:///system, auth = default+wrapper, flags = 0 libvirt: XML-RPC error : Failed to connect socket to '/var/run/libvirt/virtqemud-sock': No such file or directory libguestfs: error: could not connect to libvirt (URI = qemu:///system): Failed to connect socket to '/var/run/libvirt/virtqemud-sock': No such file or directory [code=38 int1=2] --- tests/run-libguestfs-test-tool.sh | 10 ++++++++++ tests/tests.yml | 7 ++++--- 2 files changed, 14 insertions(+), 3 deletions(-) create mode 100755 tests/run-libguestfs-test-tool.sh diff --git a/tests/run-libguestfs-test-tool.sh b/tests/run-libguestfs-test-tool.sh new file mode 100755 index 0000000..d36d5ea --- /dev/null +++ b/tests/run-libguestfs-test-tool.sh @@ -0,0 +1,10 @@ +#!/bin/bash - +set -e +set -x + +# This only makes sure that libguestfs isn't totally broken. + +# Fix libvirt. +systemctl restart virtqemud virtsecretd virtstoraged virtnetworkd + +libguestfs-test-tool diff --git a/tests/tests.yml b/tests/tests.yml index 180fe76..3809111 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -5,9 +5,10 @@ - role: standard-test-basic tags: - classic + required_packages: + - libguestfs + - libvirt-daemon-kvm tests: - libguestfs-test-tool: dir: . - run: libguestfs-test-tool - required_packages: - - libguestfs + run: ./run-libguestfs-test-tool.sh From d165325dd3ce053895d072781295a9eb5ef951b5 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sat, 26 Apr 2025 11:29:48 +0100 Subject: [PATCH 202/243] New upstream development version 1.55.10 Fix macro in comment --- libguestfs.spec | 8 ++++++-- sources | 4 ++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index 2c760df..a71d7b9 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -14,7 +14,7 @@ ExcludeArch: %{ix86} # broken. To perform the full test suite, see instructions here: # https://www.redhat.com/archives/libguestfs/2015-September/msg00078.html %if !0%{?rhel} -#%%global test_arches aarch64 %{power64} s390x x86_64 +#%%global test_arches aarch64 %%{power64} s390x x86_64 # aarch64 broken in Rawhide: # https://gitlab.com/libvirt/libvirt/-/issues/762 %global test_arches %{power64} s390x x86_64 @@ -44,7 +44,7 @@ ExcludeArch: %{ix86} Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 -Version: 1.55.9 +Version: 1.55.10 Release: 1%{?dist} License: LGPL-2.1-or-later @@ -1104,6 +1104,10 @@ rm ocaml/html/.gitignore %changelog +* Sat Apr 26 2025 Richard W.M. Jones - 1:1.55.10-1 +- New upstream development version 1.55.10 +- Fix macro in comment + * Wed Apr 16 2025 Richard W.M. Jones - 1:1.55.9-1 - New upstream development version 1.55.9 - Remove flex and bison diff --git a/sources b/sources index 62ea16b..1a834be 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (libguestfs-1.55.9.tar.gz) = 0d73bc3d62d1902244a22d52cbbeb5c68f8bfab5402ad38d3b9d6e2ec4991f78063cf3263f48fa71d31e8a0c0ec9ea38433c9c428c83fa1ce6a9bdf3f16443e8 -SHA512 (libguestfs-1.55.9.tar.gz.sig) = 31715a343758dcec36cd7114e6a1882a020428078430c278711761433526f13596b5e7d54e510d724ad473e1abec34bab0249282b48f5f266ca8d13db7ee7d7b +SHA512 (libguestfs-1.55.10.tar.gz) = c896bba5a14fb43a0889eb8e76b41a8cd2399c02decc2dc2c33777a9c247460d9e4972562fbc4ae0c3933257c11f15b35b0a8e719036d9ecf25887f7b848a677 +SHA512 (libguestfs-1.55.10.tar.gz.sig) = 31e6537b7ee25fe4eb9c8724333f8fd4fd5038da1bbbbeff6bd55209172e7562fee82dfe6bd479f818786ccea3fffe16464772f03b98c92a91fe965e3b5329e2 From 797a52157580e7cbde205731cdb4cb98de02b720 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sat, 26 Apr 2025 13:18:45 +0100 Subject: [PATCH 203/243] Remove file-devel BR MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is no longer needed because of: commit 2b2be31af09694761c3657d0f7d9299ed722b914 Author: Richard W.M. Jones Date: Tue Apr 22 11:59:25 2025 +0100 build: Remove test for libmagic libmagic (part of the "file" command) was required in earlier versions of libguestfs, but this requirement was effectively removed in commit b48da89dd6 ("daemon: Reimplement ‘file_architecture’ API in OCaml") back in 2017. Or to be more precise, we now use the "file" command inside the daemon, which may or may not use libmagic but we no longer link to the library directly. Reported-by: Mohamed Akram Fixes: commit b48da89dd6edce325f4c1f2956435c4d383ebe77 Related: https://github.com/libguestfs/libguestfs/issues/184 --- libguestfs.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/libguestfs.spec b/libguestfs.spec index a71d7b9..e37ff36 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -104,7 +104,6 @@ BuildRequires: libselinux-utils BuildRequires: libselinux-devel BuildRequires: fuse, fuse-devel BuildRequires: pcre2-devel -BuildRequires: file-devel BuildRequires: libvirt-devel BuildRequires: gperf BuildRequires: rpm-devel From 958e08bd8184c15f6d55a02969d4b4bf8deed3db Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 30 Apr 2025 18:53:29 +0100 Subject: [PATCH 204/243] Remove libguestfs-zfs subpackage zfs-fuse has been unmaintained for a very long time. In fact, the website has gone. https://bugzilla.redhat.com/show_bug.cgi?id=2214965 --- libguestfs.spec | 44 +++++--------------------------------------- 1 file changed, 5 insertions(+), 39 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index e37ff36..cbf53f9 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -45,7 +45,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.55.10 -Release: 1%{?dist} +Release: 2%{?dist} License: LGPL-2.1-or-later # Build only for architectures that have a kernel @@ -265,12 +265,6 @@ BuildRequires: xz %if !0%{?rhel} BuildRequires: zerofree %endif -%if !0%{?rhel} -%ifnarch %{arm} aarch64 s390 s390x riscv64 -# http://zfs-fuse.net/issues/94 -BuildRequires: zfs-fuse -%endif -%endif BuildRequires: zstd # Main package requires the appliance. This allows the appliance to @@ -365,9 +359,6 @@ For enhanced features, install: libguestfs-ufs adds UFS (BSD) support %endif libguestfs-xfs adds XFS support -%if !0%{?rhel} - libguestfs-zfs adds ZFS support -%endif For developers: @@ -498,20 +489,6 @@ This adds XFS support to %{name}. Install it if you want to process disk images containing XFS. -%if !0%{?rhel} -%ifnarch %{arm} aarch64 s390 s390x riscv64 -%package zfs -Summary: ZFS support for %{name} -License: GPL-2.0-or-later -Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release} - -%description zfs -This adds ZFS support to %{name}. Install it if you want to process -disk images containing ZFS. -%endif -%endif - - %package inspect-icons Summary: Additional dependencies for inspecting guest icons License: LGPL-2.1-or-later @@ -850,13 +827,6 @@ move_to strace zz-packages-rescue move_to vim-minimal zz-packages-rescue move_to rsync zz-packages-rsync move_to xfsprogs zz-packages-xfs -%if !0%{?rhel} -%ifnarch %{arm} aarch64 s390 s390x riscv64 -move_to zfs-fuse zz-packages-zfs -%endif -%else -remove zfs-fuse -%endif %if !0%{?rhel} # On Fedora you need kernel-modules-extra to be able to mount @@ -974,14 +944,6 @@ rm ocaml/html/.gitignore %files xfs %{_libdir}/guestfs/supermin.d/zz-packages-xfs -%if !0%{?rhel} -%ifnarch %{arm} aarch64 s390 s390x riscv64 -%files zfs -%{_libdir}/guestfs/supermin.d/zz-packages-zfs -%endif -%endif - - %files inspect-icons # no files @@ -1103,6 +1065,10 @@ rm ocaml/html/.gitignore %changelog +* Wed May 07 2025 Richard W.M. Jones - 1:1.55.10-2 +- Remove file-devel BR +- Remove libguestfs-zfs subpackage + * Sat Apr 26 2025 Richard W.M. Jones - 1:1.55.10-1 - New upstream development version 1.55.10 - Fix macro in comment From bc325acc763bc429cfc087e4fe2750d4e8dd369e Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 9 May 2025 15:46:34 +0100 Subject: [PATCH 205/243] New upstream development version 1.55.11 --- libguestfs.spec | 7 +++++-- sources | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index cbf53f9..988716c 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -44,8 +44,8 @@ ExcludeArch: %{ix86} Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 -Version: 1.55.10 -Release: 2%{?dist} +Version: 1.55.11 +Release: 1%{?dist} License: LGPL-2.1-or-later # Build only for architectures that have a kernel @@ -1065,6 +1065,9 @@ rm ocaml/html/.gitignore %changelog +* Fri May 09 2025 Richard W.M. Jones - 1:1.55.11-1 +- New upstream development version 1.55.11 + * Wed May 07 2025 Richard W.M. Jones - 1:1.55.10-2 - Remove file-devel BR - Remove libguestfs-zfs subpackage diff --git a/sources b/sources index 1a834be..2317097 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (libguestfs-1.55.10.tar.gz) = c896bba5a14fb43a0889eb8e76b41a8cd2399c02decc2dc2c33777a9c247460d9e4972562fbc4ae0c3933257c11f15b35b0a8e719036d9ecf25887f7b848a677 -SHA512 (libguestfs-1.55.10.tar.gz.sig) = 31e6537b7ee25fe4eb9c8724333f8fd4fd5038da1bbbbeff6bd55209172e7562fee82dfe6bd479f818786ccea3fffe16464772f03b98c92a91fe965e3b5329e2 +SHA512 (libguestfs-1.55.11.tar.gz) = 3c2bf753ad1bf9dd1809f50e9e39dd154e97a33de7848b9d08feac23f543cc1100b928f1533a6ea4882125202793694c2917ea5561ccbd0c72154a7313cf9050 +SHA512 (libguestfs-1.55.11.tar.gz.sig) = 42764c07832f02349f8d28482aa2aefd394b66b940d84765623491879b8960b22f567c51565f32dab204cc83aa8fa26b46fd181c10a43da05db29d2ee704deb0 From 0893711f75be0da43099c6a37cb88fbd10845750 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 9 May 2025 15:54:59 +0100 Subject: [PATCH 206/243] Backport upstream patch to really remove zfs-fuse dependency --- 0001-appliance-Remove-zfs-fuse.patch | 38 ++++++++++++++++++++++++++++ libguestfs.spec | 8 ++++-- 2 files changed, 44 insertions(+), 2 deletions(-) create mode 100644 0001-appliance-Remove-zfs-fuse.patch diff --git a/0001-appliance-Remove-zfs-fuse.patch b/0001-appliance-Remove-zfs-fuse.patch new file mode 100644 index 0000000..bb32b09 --- /dev/null +++ b/0001-appliance-Remove-zfs-fuse.patch @@ -0,0 +1,38 @@ +From f6b1a7b57f96f002074e626d58b58f4244080ec9 Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Fri, 9 May 2025 15:52:30 +0100 +Subject: [PATCH] appliance: Remove zfs-fuse + +zfs-fuse has been unmaintained for a very long time. In fact, the +website has gone. This means that whatever we need for zfs (probably +some kind of license-compatible kernel module) is not going to be +provided by zfs-fuse. + +See: https://bugzilla.redhat.com/show_bug.cgi?id=2214965 +--- + appliance/packagelist.in | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/appliance/packagelist.in b/appliance/packagelist.in +index d0637631d..f8c80af24 100644 +--- a/appliance/packagelist.in ++++ b/appliance/packagelist.in +@@ -51,7 +51,6 @@ ifelse(REDHAT,1, + systemd dnl for /sbin/reboot and udevd + vim-minimal + xz +- zfs-fuse + zstd + ) + +@@ -95,7 +94,6 @@ dnl isc-dhcp-client has been replaced with dhcpcd-base + ufsutils + vim-tiny + xz-utils +- zfs-fuse + zstd + uuid-runtime + ) +-- +2.49.0 + diff --git a/libguestfs.spec b/libguestfs.spec index 988716c..9124a4a 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -45,7 +45,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.55.11 -Release: 1%{?dist} +Release: 2%{?dist} License: LGPL-2.1-or-later # Build only for architectures that have a kernel @@ -79,6 +79,9 @@ Source7: libguestfs.keyring # Maintainer script which helps with handling patches. Source8: copy-patches.sh +# Upstream patch that removes zfs-fuse +Patch: 0001-appliance-Remove-zfs-fuse.patch + BuildRequires: autoconf, automake, libtool, gettext-devel # Basic build requirements. @@ -1065,8 +1068,9 @@ rm ocaml/html/.gitignore %changelog -* Fri May 09 2025 Richard W.M. Jones - 1:1.55.11-1 +* Fri May 09 2025 Richard W.M. Jones - 1:1.55.11-2 - New upstream development version 1.55.11 +- Backport upstream patch to really remove zfs-fuse dependency * Wed May 07 2025 Richard W.M. Jones - 1:1.55.10-2 - Remove file-devel BR From 1317c346ab8f653a9d1a0586a7780518d01520ac Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 19 May 2025 14:59:53 +0100 Subject: [PATCH 207/243] New upstream development version 1.55.12 --- libguestfs.spec | 7 +++++-- sources | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index 9124a4a..2ff1641 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -44,8 +44,8 @@ ExcludeArch: %{ix86} Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 -Version: 1.55.11 -Release: 2%{?dist} +Version: 1.55.12 +Release: 1%{?dist} License: LGPL-2.1-or-later # Build only for architectures that have a kernel @@ -1068,6 +1068,9 @@ rm ocaml/html/.gitignore %changelog +* Mon May 19 2025 Richard W.M. Jones - 1:1.55.12-1 +- New upstream development version 1.55.12 + * Fri May 09 2025 Richard W.M. Jones - 1:1.55.11-2 - New upstream development version 1.55.11 - Backport upstream patch to really remove zfs-fuse dependency diff --git a/sources b/sources index 2317097..31a585f 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (libguestfs-1.55.11.tar.gz) = 3c2bf753ad1bf9dd1809f50e9e39dd154e97a33de7848b9d08feac23f543cc1100b928f1533a6ea4882125202793694c2917ea5561ccbd0c72154a7313cf9050 -SHA512 (libguestfs-1.55.11.tar.gz.sig) = 42764c07832f02349f8d28482aa2aefd394b66b940d84765623491879b8960b22f567c51565f32dab204cc83aa8fa26b46fd181c10a43da05db29d2ee704deb0 +SHA512 (libguestfs-1.55.12.tar.gz) = 87f7c209e5b5787c212746a1fb434342b75b9dd80dd4fc01b53877150f7d194d3d856b0acac0606236029601b595e2c0db8af582b00364cf162e91394c74be10 +SHA512 (libguestfs-1.55.12.tar.gz.sig) = 177730330cf94cf2a3d17fee3427482b2206d824f24928d4a5fa4bf0ef3248f319d648a17fa337f23af7b9c39b62b86eab6d0465454efda7b3c6e5a306a74c99 From 698d9ad820269c6c0f467e04b60ec0c19666cf9e Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 19 May 2025 15:02:45 +0100 Subject: [PATCH 208/243] Remove patch that is now upstream --- 0001-appliance-Remove-zfs-fuse.patch | 38 ---------------------------- libguestfs.spec | 3 --- 2 files changed, 41 deletions(-) delete mode 100644 0001-appliance-Remove-zfs-fuse.patch diff --git a/0001-appliance-Remove-zfs-fuse.patch b/0001-appliance-Remove-zfs-fuse.patch deleted file mode 100644 index bb32b09..0000000 --- a/0001-appliance-Remove-zfs-fuse.patch +++ /dev/null @@ -1,38 +0,0 @@ -From f6b1a7b57f96f002074e626d58b58f4244080ec9 Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Fri, 9 May 2025 15:52:30 +0100 -Subject: [PATCH] appliance: Remove zfs-fuse - -zfs-fuse has been unmaintained for a very long time. In fact, the -website has gone. This means that whatever we need for zfs (probably -some kind of license-compatible kernel module) is not going to be -provided by zfs-fuse. - -See: https://bugzilla.redhat.com/show_bug.cgi?id=2214965 ---- - appliance/packagelist.in | 2 -- - 1 file changed, 2 deletions(-) - -diff --git a/appliance/packagelist.in b/appliance/packagelist.in -index d0637631d..f8c80af24 100644 ---- a/appliance/packagelist.in -+++ b/appliance/packagelist.in -@@ -51,7 +51,6 @@ ifelse(REDHAT,1, - systemd dnl for /sbin/reboot and udevd - vim-minimal - xz -- zfs-fuse - zstd - ) - -@@ -95,7 +94,6 @@ dnl isc-dhcp-client has been replaced with dhcpcd-base - ufsutils - vim-tiny - xz-utils -- zfs-fuse - zstd - uuid-runtime - ) --- -2.49.0 - diff --git a/libguestfs.spec b/libguestfs.spec index 2ff1641..124ab8d 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -79,9 +79,6 @@ Source7: libguestfs.keyring # Maintainer script which helps with handling patches. Source8: copy-patches.sh -# Upstream patch that removes zfs-fuse -Patch: 0001-appliance-Remove-zfs-fuse.patch - BuildRequires: autoconf, automake, libtool, gettext-devel # Basic build requirements. From 383ca879905489826be71cb0684e42415da4dcfb Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 19 May 2025 16:19:17 +0100 Subject: [PATCH 209/243] Add temporary workaround for gettext bug: https://bugzilla.redhat.com/show_bug.cgi?id=2366708 --- libguestfs.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libguestfs.spec b/libguestfs.spec index 124ab8d..6b59aab 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -669,6 +669,9 @@ for %{name}. %setup -q %autopatch -p1 +# ACLOCAL_PATH is temporarily required to work around +# https://bugzilla.redhat.com/show_bug.cgi?id=2366708 +export ACLOCAL_PATH=/usr/share/gettext/m4/ autoreconf -fiv # For sVirt to work, the local temporary directory we use in the tests From f00974982e2fca39b5decdb67dc5238053f5faee Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 20 May 2025 14:57:07 +0100 Subject: [PATCH 210/243] New upstream development version 1.55.13 --- libguestfs.spec | 5 ++++- sources | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index 6b59aab..9f25e87 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -44,7 +44,7 @@ ExcludeArch: %{ix86} Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 -Version: 1.55.12 +Version: 1.55.13 Release: 1%{?dist} License: LGPL-2.1-or-later @@ -1068,6 +1068,9 @@ rm ocaml/html/.gitignore %changelog +* Tue May 20 2025 Richard W.M. Jones - 1:1.55.13-1 +- New upstream development version 1.55.13 + * Mon May 19 2025 Richard W.M. Jones - 1:1.55.12-1 - New upstream development version 1.55.12 diff --git a/sources b/sources index 31a585f..e17c099 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (libguestfs-1.55.12.tar.gz) = 87f7c209e5b5787c212746a1fb434342b75b9dd80dd4fc01b53877150f7d194d3d856b0acac0606236029601b595e2c0db8af582b00364cf162e91394c74be10 -SHA512 (libguestfs-1.55.12.tar.gz.sig) = 177730330cf94cf2a3d17fee3427482b2206d824f24928d4a5fa4bf0ef3248f319d648a17fa337f23af7b9c39b62b86eab6d0465454efda7b3c6e5a306a74c99 +SHA512 (libguestfs-1.55.13.tar.gz) = 7f66969e3217426ecf9155777f1b07512db289e0661c2736837c6ea25c9fb6db26854d9e0e1d1306007b8a70b6ccd96de55869db370c356106760437457eb422 +SHA512 (libguestfs-1.55.13.tar.gz.sig) = 8b7dd0daf6ca026d1d0796a2c4102248298e54ea841f2a6ca3b6f1eb314b7160732261e9d25f6c3be08090878a3c76ec24c9954be0517b477a98fac2a7fc3daf From 0209f60e48e6d484a27534c0462963edbf480a99 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Tue, 3 Jun 2025 00:20:10 +0200 Subject: [PATCH 211/243] Rebuilt for Python 3.14 --- libguestfs.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libguestfs.spec b/libguestfs.spec index 9f25e87..220a31d 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -45,7 +45,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.55.13 -Release: 1%{?dist} +Release: 2%{?dist} License: LGPL-2.1-or-later # Build only for architectures that have a kernel @@ -1068,6 +1068,9 @@ rm ocaml/html/.gitignore %changelog +* Mon Jun 02 2025 Python Maint - 1:1.55.13-2 +- Rebuilt for Python 3.14 + * Tue May 20 2025 Richard W.M. Jones - 1:1.55.13-1 - New upstream development version 1.55.13 From de1ecfc7384a2d16d03f3e245e193c7377b0e320 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 3 Jun 2025 16:35:34 +0100 Subject: [PATCH 212/243] New upstream development version 1.55.14 --- libguestfs.spec | 7 +++++-- sources | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index 220a31d..25b25d4 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -44,8 +44,8 @@ ExcludeArch: %{ix86} Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 -Version: 1.55.13 -Release: 2%{?dist} +Version: 1.55.14 +Release: 1%{?dist} License: LGPL-2.1-or-later # Build only for architectures that have a kernel @@ -1068,6 +1068,9 @@ rm ocaml/html/.gitignore %changelog +* Tue Jun 03 2025 Richard W.M. Jones - 1:1.55.14-1 +- New upstream development version 1.55.14 + * Mon Jun 02 2025 Python Maint - 1:1.55.13-2 - Rebuilt for Python 3.14 diff --git a/sources b/sources index e17c099..0d433cc 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (libguestfs-1.55.13.tar.gz) = 7f66969e3217426ecf9155777f1b07512db289e0661c2736837c6ea25c9fb6db26854d9e0e1d1306007b8a70b6ccd96de55869db370c356106760437457eb422 -SHA512 (libguestfs-1.55.13.tar.gz.sig) = 8b7dd0daf6ca026d1d0796a2c4102248298e54ea841f2a6ca3b6f1eb314b7160732261e9d25f6c3be08090878a3c76ec24c9954be0517b477a98fac2a7fc3daf +SHA512 (libguestfs-1.55.14.tar.gz) = 2830d9dca02f2dce654c2f9a09c4511e34862ee26d8c9823cf001ae159194e278f104da6b1b7d2c6ed23dfb8c6d24bf4324f4d81cf0d6b6d0403f4746dbe4266 +SHA512 (libguestfs-1.55.14.tar.gz.sig) = 304cfaf4cc449968fc5b4fcb85b2be9d16abbc6f8fefec82394e963e0e265038b0583fd0595893029794136321f8a9b7e0bd659980b00199c490ff75275dbb9a From a92e54d898556667cefb827c47787510960795a4 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Fri, 6 Jun 2025 09:30:51 +0200 Subject: [PATCH 213/243] Rebuilt for Python 3.14 --- libguestfs.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libguestfs.spec b/libguestfs.spec index 25b25d4..2068358 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -45,7 +45,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.55.14 -Release: 1%{?dist} +Release: 2%{?dist} License: LGPL-2.1-or-later # Build only for architectures that have a kernel @@ -1068,6 +1068,9 @@ rm ocaml/html/.gitignore %changelog +* Fri Jun 06 2025 Python Maint - 1:1.55.14-2 +- Rebuilt for Python 3.14 + * Tue Jun 03 2025 Richard W.M. Jones - 1:1.55.14-1 - New upstream development version 1.55.14 From 6a0f5623dc0b9b94b6e78a4bd225be6f68046c74 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 11 Jun 2025 14:50:08 +0100 Subject: [PATCH 214/243] New upstream stable version 1.56.0 Remove BR xz-devel as it is not needed. --- libguestfs.spec | 11 +++++++---- sources | 4 ++-- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index 2068358..ca1356a 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -33,7 +33,7 @@ ExcludeArch: %{ix86} %global verify_tarball_signature 1 # The source directory. -%global source_directory 1.55-development +%global source_directory 1.56-stable # Filter perl provides. %{?perl_default_filter} @@ -44,8 +44,8 @@ ExcludeArch: %{ix86} Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 -Version: 1.55.14 -Release: 2%{?dist} +Version: 1.56.0 +Release: 1%{?dist} License: LGPL-2.1-or-later # Build only for architectures that have a kernel @@ -109,7 +109,6 @@ BuildRequires: gperf BuildRequires: rpm-devel BuildRequires: cpio BuildRequires: libconfig-devel -BuildRequires: xz-devel %if !0%{?rhel} BuildRequires: zip BuildRequires: unzip @@ -1068,6 +1067,10 @@ rm ocaml/html/.gitignore %changelog +* Wed Jun 11 2025 Richard W.M. Jones - 1:1.56.0-1 +- New upstream stable version 1.56.0 +- Remove BR xz-devel as it is not needed. + * Fri Jun 06 2025 Python Maint - 1:1.55.14-2 - Rebuilt for Python 3.14 diff --git a/sources b/sources index 0d433cc..283bfab 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (libguestfs-1.55.14.tar.gz) = 2830d9dca02f2dce654c2f9a09c4511e34862ee26d8c9823cf001ae159194e278f104da6b1b7d2c6ed23dfb8c6d24bf4324f4d81cf0d6b6d0403f4746dbe4266 -SHA512 (libguestfs-1.55.14.tar.gz.sig) = 304cfaf4cc449968fc5b4fcb85b2be9d16abbc6f8fefec82394e963e0e265038b0583fd0595893029794136321f8a9b7e0bd659980b00199c490ff75275dbb9a +SHA512 (libguestfs-1.56.0.tar.gz) = 2aae2a4222680000ff06954adf074825e2f6ef182694d84b3e0f39ba4b2e942b3a214f438f937341fd5c72be67620d97330639739720cde6312502fc81d868ae +SHA512 (libguestfs-1.56.0.tar.gz.sig) = 481ec244a787ea19343ee4b7e6820d5273b483a0c1e29b934a7608e9efefae9562db5fd6d33d6bf76997de4eeeff966e6d33a3873ecaee8432150b5a9d86d8f3 From c399a6571dfa3ec7b2cb2dc32c04042c9635ad47 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 11 Jun 2025 22:55:44 +0100 Subject: [PATCH 215/243] Add upstream patch to fix ACPI --- ...-Enable-ACPI-for-the-libvirt-backend.patch | 42 +++++++++++++++++++ libguestfs.spec | 3 ++ 2 files changed, 45 insertions(+) create mode 100644 0001-lib-Enable-ACPI-for-the-libvirt-backend.patch diff --git a/0001-lib-Enable-ACPI-for-the-libvirt-backend.patch b/0001-lib-Enable-ACPI-for-the-libvirt-backend.patch new file mode 100644 index 0000000..e4186d8 --- /dev/null +++ b/0001-lib-Enable-ACPI-for-the-libvirt-backend.patch @@ -0,0 +1,42 @@ +From 7cf0ed750ef7119503fc72cb19c29a269a893e8e Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Wed, 11 Jun 2025 22:45:51 +0100 +Subject: [PATCH] lib: Enable ACPI for the libvirt backend + +Many years ago we used to pass acpi=off on the Linux kernel command +line. In commit db1f811b2 we stopped doing that (around 2016). +However unless you also use: + + + + + +then it turns out that libvirt disables ACPI generation at the qemu +level. None of this mattered until SeaBIOS 1.17 changed its +behaviour, causing ACPI to be required for virtio devices to work. + +Updates: commit db1f811b29b055625ae1b03cf0daa9fed0d443ac +Related: https://bugzilla.redhat.com/show_bug.cgi?id=2372329 +Thanks: Gerd Hoffmann +--- + lib/launch-libvirt.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/lib/launch-libvirt.c b/lib/launch-libvirt.c +index aa9534c68..40b57f7ca 100644 +--- a/lib/launch-libvirt.c ++++ b/lib/launch-libvirt.c +@@ -1175,6 +1175,10 @@ construct_libvirt_xml_cpu (guestfs_h *g, + + single_element_format ("vcpu", "%d", g->smp); + ++ start_element ("features") { ++ empty_element ("acpi"); ++ } end_element (); ++ + start_element ("clock") { + attribute ("offset", "utc"); + +-- +2.49.0 + diff --git a/libguestfs.spec b/libguestfs.spec index ca1356a..94fb1db 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -79,6 +79,9 @@ Source7: libguestfs.keyring # Maintainer script which helps with handling patches. Source8: copy-patches.sh +# Upstream patch, fixing ACPI. +Patch: 0001-lib-Enable-ACPI-for-the-libvirt-backend.patch + BuildRequires: autoconf, automake, libtool, gettext-devel # Basic build requirements. From aa5924b4a3dadd328f62b77776a66adf170b9e75 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 12 Jun 2025 08:14:17 +0100 Subject: [PATCH 216/243] Further upstream patch for ACPI https://bugzilla.redhat.com/show_bug.cgi?id=2372329 --- ...-Enable-ACPI-for-the-libvirt-backend.patch | 2 +- ...-ACPI-feature-flag-conditional-on-x8.patch | 36 +++++++++++++++++++ libguestfs.spec | 1 + 3 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 0002-lib-Make-libvirt-ACPI-feature-flag-conditional-on-x8.patch diff --git a/0001-lib-Enable-ACPI-for-the-libvirt-backend.patch b/0001-lib-Enable-ACPI-for-the-libvirt-backend.patch index e4186d8..3908759 100644 --- a/0001-lib-Enable-ACPI-for-the-libvirt-backend.patch +++ b/0001-lib-Enable-ACPI-for-the-libvirt-backend.patch @@ -1,7 +1,7 @@ From 7cf0ed750ef7119503fc72cb19c29a269a893e8e Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 11 Jun 2025 22:45:51 +0100 -Subject: [PATCH] lib: Enable ACPI for the libvirt backend +Subject: [PATCH 1/2] lib: Enable ACPI for the libvirt backend Many years ago we used to pass acpi=off on the Linux kernel command line. In commit db1f811b2 we stopped doing that (around 2016). diff --git a/0002-lib-Make-libvirt-ACPI-feature-flag-conditional-on-x8.patch b/0002-lib-Make-libvirt-ACPI-feature-flag-conditional-on-x8.patch new file mode 100644 index 0000000..8adee47 --- /dev/null +++ b/0002-lib-Make-libvirt-ACPI-feature-flag-conditional-on-x8.patch @@ -0,0 +1,36 @@ +From f6fe0611a8980694b8e4e33b9c824805d353679f Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Thu, 12 Jun 2025 08:11:56 +0100 +Subject: [PATCH 2/2] lib: Make libvirt ACPI feature flag conditional on x86 or + Arm + +On ppc64 and s390x it failed with an error like: + + unsupported configuration: machine type 'pseries-10.0' does not support ACPI + +Updates: commit 7cf0ed750ef7119503fc72cb19c29a269a893e8e +Related: https://bugzilla.redhat.com/show_bug.cgi?id=2372329 +--- + lib/launch-libvirt.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/lib/launch-libvirt.c b/lib/launch-libvirt.c +index 40b57f7ca..55a4ad41c 100644 +--- a/lib/launch-libvirt.c ++++ b/lib/launch-libvirt.c +@@ -1175,9 +1175,12 @@ construct_libvirt_xml_cpu (guestfs_h *g, + + single_element_format ("vcpu", "%d", g->smp); + ++#if defined(__i386__) || defined(__x86_64__) || \ ++ defined(__arm__) || defined(__aarch64__) + start_element ("features") { + empty_element ("acpi"); + } end_element (); ++#endif + + start_element ("clock") { + attribute ("offset", "utc"); +-- +2.49.0 + diff --git a/libguestfs.spec b/libguestfs.spec index 94fb1db..8eaf5ca 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -81,6 +81,7 @@ Source8: copy-patches.sh # Upstream patch, fixing ACPI. Patch: 0001-lib-Enable-ACPI-for-the-libvirt-backend.patch +Patch: 0002-lib-Make-libvirt-ACPI-feature-flag-conditional-on-x8.patch BuildRequires: autoconf, automake, libtool, gettext-devel From 091dfaf12e910b2266c7e7fa18822957235ef4d7 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 16 Jun 2025 16:57:46 +0100 Subject: [PATCH 217/243] New upstream stable version 1.56.1 Remove upstream ACPI / seabios fixes included in this version. --- ...-Enable-ACPI-for-the-libvirt-backend.patch | 42 ------------------- ...-ACPI-feature-flag-conditional-on-x8.patch | 36 ---------------- libguestfs.spec | 10 ++--- 3 files changed, 5 insertions(+), 83 deletions(-) delete mode 100644 0001-lib-Enable-ACPI-for-the-libvirt-backend.patch delete mode 100644 0002-lib-Make-libvirt-ACPI-feature-flag-conditional-on-x8.patch diff --git a/0001-lib-Enable-ACPI-for-the-libvirt-backend.patch b/0001-lib-Enable-ACPI-for-the-libvirt-backend.patch deleted file mode 100644 index 3908759..0000000 --- a/0001-lib-Enable-ACPI-for-the-libvirt-backend.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 7cf0ed750ef7119503fc72cb19c29a269a893e8e Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Wed, 11 Jun 2025 22:45:51 +0100 -Subject: [PATCH 1/2] lib: Enable ACPI for the libvirt backend - -Many years ago we used to pass acpi=off on the Linux kernel command -line. In commit db1f811b2 we stopped doing that (around 2016). -However unless you also use: - - - - - -then it turns out that libvirt disables ACPI generation at the qemu -level. None of this mattered until SeaBIOS 1.17 changed its -behaviour, causing ACPI to be required for virtio devices to work. - -Updates: commit db1f811b29b055625ae1b03cf0daa9fed0d443ac -Related: https://bugzilla.redhat.com/show_bug.cgi?id=2372329 -Thanks: Gerd Hoffmann ---- - lib/launch-libvirt.c | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/lib/launch-libvirt.c b/lib/launch-libvirt.c -index aa9534c68..40b57f7ca 100644 ---- a/lib/launch-libvirt.c -+++ b/lib/launch-libvirt.c -@@ -1175,6 +1175,10 @@ construct_libvirt_xml_cpu (guestfs_h *g, - - single_element_format ("vcpu", "%d", g->smp); - -+ start_element ("features") { -+ empty_element ("acpi"); -+ } end_element (); -+ - start_element ("clock") { - attribute ("offset", "utc"); - --- -2.49.0 - diff --git a/0002-lib-Make-libvirt-ACPI-feature-flag-conditional-on-x8.patch b/0002-lib-Make-libvirt-ACPI-feature-flag-conditional-on-x8.patch deleted file mode 100644 index 8adee47..0000000 --- a/0002-lib-Make-libvirt-ACPI-feature-flag-conditional-on-x8.patch +++ /dev/null @@ -1,36 +0,0 @@ -From f6fe0611a8980694b8e4e33b9c824805d353679f Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Thu, 12 Jun 2025 08:11:56 +0100 -Subject: [PATCH 2/2] lib: Make libvirt ACPI feature flag conditional on x86 or - Arm - -On ppc64 and s390x it failed with an error like: - - unsupported configuration: machine type 'pseries-10.0' does not support ACPI - -Updates: commit 7cf0ed750ef7119503fc72cb19c29a269a893e8e -Related: https://bugzilla.redhat.com/show_bug.cgi?id=2372329 ---- - lib/launch-libvirt.c | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/lib/launch-libvirt.c b/lib/launch-libvirt.c -index 40b57f7ca..55a4ad41c 100644 ---- a/lib/launch-libvirt.c -+++ b/lib/launch-libvirt.c -@@ -1175,9 +1175,12 @@ construct_libvirt_xml_cpu (guestfs_h *g, - - single_element_format ("vcpu", "%d", g->smp); - -+#if defined(__i386__) || defined(__x86_64__) || \ -+ defined(__arm__) || defined(__aarch64__) - start_element ("features") { - empty_element ("acpi"); - } end_element (); -+#endif - - start_element ("clock") { - attribute ("offset", "utc"); --- -2.49.0 - diff --git a/libguestfs.spec b/libguestfs.spec index 8eaf5ca..a093d15 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -44,7 +44,7 @@ ExcludeArch: %{ix86} Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 -Version: 1.56.0 +Version: 1.56.1 Release: 1%{?dist} License: LGPL-2.1-or-later @@ -79,10 +79,6 @@ Source7: libguestfs.keyring # Maintainer script which helps with handling patches. Source8: copy-patches.sh -# Upstream patch, fixing ACPI. -Patch: 0001-lib-Enable-ACPI-for-the-libvirt-backend.patch -Patch: 0002-lib-Make-libvirt-ACPI-feature-flag-conditional-on-x8.patch - BuildRequires: autoconf, automake, libtool, gettext-devel # Basic build requirements. @@ -1071,6 +1067,10 @@ rm ocaml/html/.gitignore %changelog +* Mon Jun 16 2025 Richard W.M. Jones - 1:1.56.1-1 +- New upstream stable version 1.56.1 +- Remove upstream ACPI / seabios fixes included in this version. + * Wed Jun 11 2025 Richard W.M. Jones - 1:1.56.0-1 - New upstream stable version 1.56.0 - Remove BR xz-devel as it is not needed. From 5bc9c98e58eacdba7f648b65e1a4d7c18929a866 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 16 Jun 2025 16:59:45 +0100 Subject: [PATCH 218/243] Forgot to upload sources --- sources | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sources b/sources index 283bfab..046d6b3 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (libguestfs-1.56.0.tar.gz) = 2aae2a4222680000ff06954adf074825e2f6ef182694d84b3e0f39ba4b2e942b3a214f438f937341fd5c72be67620d97330639739720cde6312502fc81d868ae -SHA512 (libguestfs-1.56.0.tar.gz.sig) = 481ec244a787ea19343ee4b7e6820d5273b483a0c1e29b934a7608e9efefae9562db5fd6d33d6bf76997de4eeeff966e6d33a3873ecaee8432150b5a9d86d8f3 +SHA512 (libguestfs-1.56.1.tar.gz) = 8ec8db8b3de7471c7ab77161fa98349d7b6f88a803ab563f1859606a2ef55737f323b1cf3ef2ebb3055770f4140aabb056f97099ef76fa7ad0f7bd792cc699fc +SHA512 (libguestfs-1.56.1.tar.gz.sig) = 80fcdf73e8a4b453e96b40b8a29d91dcad0418865d8472300f5e1d972f849b0d2cfd0e204bb20b79285471756c9180f259dc4aa10c56cfdf7153ffb1ef646036 From 712bdd9c94ffef40da1152a78138584835cb1fcf Mon Sep 17 00:00:00 2001 From: Jitka Plesnikova Date: Mon, 7 Jul 2025 16:01:36 +0200 Subject: [PATCH 219/243] Perl 5.42 rebuild --- libguestfs.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libguestfs.spec b/libguestfs.spec index a093d15..35d5e98 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -45,7 +45,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.56.1 -Release: 1%{?dist} +Release: 2%{?dist} License: LGPL-2.1-or-later # Build only for architectures that have a kernel @@ -1067,6 +1067,9 @@ rm ocaml/html/.gitignore %changelog +* Mon Jul 07 2025 Jitka Plesnikova - 1:1.56.1-2 +- Perl 5.42 rebuild + * Mon Jun 16 2025 Richard W.M. Jones - 1:1.56.1-1 - New upstream stable version 1.56.1 - Remove upstream ACPI / seabios fixes included in this version. From 17b450096e794849433d4502756a539f642404e8 Mon Sep 17 00:00:00 2001 From: Jerry James Date: Sat, 12 Jul 2025 13:13:15 -0600 Subject: [PATCH 220/243] Rebuild to fix OCaml dependencies --- libguestfs.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libguestfs.spec b/libguestfs.spec index 35d5e98..56d7c70 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -45,7 +45,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.56.1 -Release: 2%{?dist} +Release: 3%{?dist} License: LGPL-2.1-or-later # Build only for architectures that have a kernel @@ -1067,6 +1067,9 @@ rm ocaml/html/.gitignore %changelog +* Sat Jul 12 2025 Jerry James - 1:1.56.1-3 +- Rebuild to fix OCaml dependencies + * Mon Jul 07 2025 Jitka Plesnikova - 1:1.56.1-2 - Perl 5.42 rebuild From e602e8ba97e0d15e4540906ac1a8cef13d728683 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 24 Jul 2025 19:46:01 +0000 Subject: [PATCH 221/243] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild --- libguestfs.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libguestfs.spec b/libguestfs.spec index 56d7c70..c73d72c 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -45,7 +45,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.56.1 -Release: 3%{?dist} +Release: 4%{?dist} License: LGPL-2.1-or-later # Build only for architectures that have a kernel @@ -1067,6 +1067,9 @@ rm ocaml/html/.gitignore %changelog +* Thu Jul 24 2025 Fedora Release Engineering - 1:1.56.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + * Sat Jul 12 2025 Jerry James - 1:1.56.1-3 - Rebuild to fix OCaml dependencies From ad9f3a5f157429e8205521a8bed0f7215580e1a9 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 13 Aug 2025 17:12:57 +0100 Subject: [PATCH 222/243] New upstream development version 1.57.1 --- libguestfs.spec | 9 ++++++--- sources | 4 ++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index c73d72c..f17dfbc 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -33,7 +33,7 @@ ExcludeArch: %{ix86} %global verify_tarball_signature 1 # The source directory. -%global source_directory 1.56-stable +%global source_directory 1.57-development # Filter perl provides. %{?perl_default_filter} @@ -44,8 +44,8 @@ ExcludeArch: %{ix86} Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 -Version: 1.56.1 -Release: 4%{?dist} +Version: 1.57.1 +Release: 1%{?dist} License: LGPL-2.1-or-later # Build only for architectures that have a kernel @@ -1067,6 +1067,9 @@ rm ocaml/html/.gitignore %changelog +* Wed Aug 13 2025 Richard W.M. Jones - 1:1.57.1-1 +- New upstream development version 1.57.1 + * Thu Jul 24 2025 Fedora Release Engineering - 1:1.56.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild diff --git a/sources b/sources index 046d6b3..7bd905b 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (libguestfs-1.56.1.tar.gz) = 8ec8db8b3de7471c7ab77161fa98349d7b6f88a803ab563f1859606a2ef55737f323b1cf3ef2ebb3055770f4140aabb056f97099ef76fa7ad0f7bd792cc699fc -SHA512 (libguestfs-1.56.1.tar.gz.sig) = 80fcdf73e8a4b453e96b40b8a29d91dcad0418865d8472300f5e1d972f849b0d2cfd0e204bb20b79285471756c9180f259dc4aa10c56cfdf7153ffb1ef646036 +SHA512 (libguestfs-1.57.1.tar.gz) = 11aa4afc6ccfdf63af3afdebccf650a2ad4b378d1c89287b6c29303100041f2be120f12b9c4f4084f492b3584c55b56864756ba159413bd5955b09a176270309 +SHA512 (libguestfs-1.57.1.tar.gz.sig) = 47b0192c651c990b9eb9423a39a88750ff246af4a562a2e276653508e224288b083d802d8dbe154f5c69d8d05bec2b3719241ad0b9f88f9aa88620fa14fc430d From c5c2923895e982888675719be18075f1940139d6 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 15 Aug 2025 10:58:57 +0100 Subject: [PATCH 223/243] New upstream development version 1.57.2 --- libguestfs.spec | 5 ++++- sources | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index f17dfbc..64504dd 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -44,7 +44,7 @@ ExcludeArch: %{ix86} Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 -Version: 1.57.1 +Version: 1.57.2 Release: 1%{?dist} License: LGPL-2.1-or-later @@ -1067,6 +1067,9 @@ rm ocaml/html/.gitignore %changelog +* Fri Aug 15 2025 Richard W.M. Jones - 1:1.57.2-1 +- New upstream development version 1.57.2 + * Wed Aug 13 2025 Richard W.M. Jones - 1:1.57.1-1 - New upstream development version 1.57.1 diff --git a/sources b/sources index 7bd905b..91132ae 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (libguestfs-1.57.1.tar.gz) = 11aa4afc6ccfdf63af3afdebccf650a2ad4b378d1c89287b6c29303100041f2be120f12b9c4f4084f492b3584c55b56864756ba159413bd5955b09a176270309 -SHA512 (libguestfs-1.57.1.tar.gz.sig) = 47b0192c651c990b9eb9423a39a88750ff246af4a562a2e276653508e224288b083d802d8dbe154f5c69d8d05bec2b3719241ad0b9f88f9aa88620fa14fc430d +SHA512 (libguestfs-1.57.2.tar.gz) = 3a63c218a755afbc824c158fd9999f75d1b2b4bc2c9b312eaf114414d1694ee5512a43ef806a5720eca83662f7203c5727a802721bc0bc77274e8b5362324fca +SHA512 (libguestfs-1.57.2.tar.gz.sig) = 660c5ad78b2a1c3066a02445e39eaf894b673afd840d25fe2920514152c20d2b2e7e34a10a0dcaec575ac8ddde9632952fb8fbbad3a99d9aea1b077ba90004e7 From 9eeb0986a8fc776b0b44930e73e7204a8066b1b7 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Fri, 15 Aug 2025 12:55:58 +0200 Subject: [PATCH 224/243] Rebuilt for Python 3.14.0rc2 bytecode --- libguestfs.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libguestfs.spec b/libguestfs.spec index 64504dd..23d6cf9 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -45,7 +45,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.57.2 -Release: 1%{?dist} +Release: 2%{?dist} License: LGPL-2.1-or-later # Build only for architectures that have a kernel @@ -1067,6 +1067,9 @@ rm ocaml/html/.gitignore %changelog +* Fri Aug 15 2025 Python Maint - 1:1.57.2-2 +- Rebuilt for Python 3.14.0rc2 bytecode + * Fri Aug 15 2025 Richard W.M. Jones - 1:1.57.2-1 - New upstream development version 1.57.2 From 82cadaec7f6d6745b358d6885e834ce232de92b1 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 29 Aug 2025 12:50:51 +0100 Subject: [PATCH 225/243] Unify Fedora and RHEL 10.2 spec files --- libguestfs.spec | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index 23d6cf9..0a4ba6f 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -13,17 +13,10 @@ ExcludeArch: %{ix86} # we only do a sanity check that kernel/qemu/libvirt/appliance is not # broken. To perform the full test suite, see instructions here: # https://www.redhat.com/archives/libguestfs/2015-September/msg00078.html -%if !0%{?rhel} #%%global test_arches aarch64 %%{power64} s390x x86_64 # aarch64 broken in Rawhide: # https://gitlab.com/libvirt/libvirt/-/issues/762 %global test_arches %{power64} s390x x86_64 -%else -# RHEL 9 only: -# x86-64: "/lib64/libc.so.6: CPU ISA level is lower than required" -# (RHBZ#1919389) -%global test_arches NONE -%endif # Trim older changelog entries. # https://lists.fedoraproject.org/pipermail/devel/2013-April/thread.html#181627 @@ -127,7 +120,10 @@ BuildRequires: libldm-devel %endif BuildRequires: json-c-devel BuildRequires: systemd-devel +BuildRequires: bash-completion +%if !0%{?rhel} BuildRequires: bash-completion-devel +%endif BuildRequires: /usr/bin/ping BuildRequires: curl BuildRequires: xz @@ -951,6 +947,7 @@ rm ocaml/html/.gitignore %files bash-completion +%if !0%{?rhel} %dir %{bash_completions_dir} %{bash_completions_dir}/guestfish %{bash_completions_dir}/guestmount @@ -961,6 +958,18 @@ rm ocaml/html/.gitignore %{bash_completions_dir}/virt-rescue %{bash_completions_dir}/virt-tar-in %{bash_completions_dir}/virt-tar-out +%else +%dir %{_datadir}/bash-completion/completions +%{_datadir}/bash-completion/completions/guestfish +%{_datadir}/bash-completion/completions/guestmount +%{_datadir}/bash-completion/completions/guestunmount +%{_datadir}/bash-completion/completions/libguestfs-test-tool +%{_datadir}/bash-completion/completions/virt-copy-in +%{_datadir}/bash-completion/completions/virt-copy-out +%{_datadir}/bash-completion/completions/virt-rescue +%{_datadir}/bash-completion/completions/virt-tar-in +%{_datadir}/bash-completion/completions/virt-tar-out +%endif %files -n ocaml-%{name} From 6fa34707b2d0729ac2d12c4580eb4c479d67fe6d Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 9 Sep 2025 19:17:48 +0100 Subject: [PATCH 226/243] New upstream development version 1.57.3 --- libguestfs.spec | 7 +++++-- sources | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index 0a4ba6f..0e35b36 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -37,8 +37,8 @@ ExcludeArch: %{ix86} Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 -Version: 1.57.2 -Release: 2%{?dist} +Version: 1.57.3 +Release: 1%{?dist} License: LGPL-2.1-or-later # Build only for architectures that have a kernel @@ -1076,6 +1076,9 @@ rm ocaml/html/.gitignore %changelog +* Tue Sep 09 2025 Richard W.M. Jones - 1:1.57.3-1 +- New upstream development version 1.57.3 + * Fri Aug 15 2025 Python Maint - 1:1.57.2-2 - Rebuilt for Python 3.14.0rc2 bytecode diff --git a/sources b/sources index 91132ae..40d0b27 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (libguestfs-1.57.2.tar.gz) = 3a63c218a755afbc824c158fd9999f75d1b2b4bc2c9b312eaf114414d1694ee5512a43ef806a5720eca83662f7203c5727a802721bc0bc77274e8b5362324fca -SHA512 (libguestfs-1.57.2.tar.gz.sig) = 660c5ad78b2a1c3066a02445e39eaf894b673afd840d25fe2920514152c20d2b2e7e34a10a0dcaec575ac8ddde9632952fb8fbbad3a99d9aea1b077ba90004e7 +SHA512 (libguestfs-1.57.3.tar.gz) = 09e0297c9ad47ca322c74f65eef6056dee140e6a625ab7bdd26ea76a9b1483288897ceaf24deff9c1373aa8dd791ce875261c5e07db14dc59a9c2a042ec99227 +SHA512 (libguestfs-1.57.3.tar.gz.sig) = c2c30b7728284156cc2ace79ce1f2eeb0b7d37064d09067033b0c4a2d3befac5e540eb1c436e41e1799f3133ab0c410d612312d66c66f237c4c7896b8a7a6cf6 From 83dda87efe69aaab5ecde0d1e07822bc76c20c34 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Fri, 19 Sep 2025 12:26:34 +0200 Subject: [PATCH 227/243] Rebuilt for Python 3.14.0rc3 bytecode --- libguestfs.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libguestfs.spec b/libguestfs.spec index 0e35b36..fc92276 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -38,7 +38,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.57.3 -Release: 1%{?dist} +Release: 2%{?dist} License: LGPL-2.1-or-later # Build only for architectures that have a kernel @@ -1076,6 +1076,9 @@ rm ocaml/html/.gitignore %changelog +* Fri Sep 19 2025 Python Maint - 1:1.57.3-2 +- Rebuilt for Python 3.14.0rc3 bytecode + * Tue Sep 09 2025 Richard W.M. Jones - 1:1.57.3-1 - New upstream development version 1.57.3 From af1ea247c4a71bde1e4449ba45d27918a68ce125 Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Thu, 18 Sep 2025 12:26:32 -0400 Subject: [PATCH 228/243] Fix bash-completion conditional ELN (the future RHEL 11) tracks rawhide and therefore also has bash-completion-devel and the %bash_completions_dir macro. --- libguestfs.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index fc92276..f482ed7 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -121,7 +121,7 @@ BuildRequires: libldm-devel BuildRequires: json-c-devel BuildRequires: systemd-devel BuildRequires: bash-completion -%if !0%{?rhel} +%if 0%{?fedora} || 0%{?rhel} >= 11 BuildRequires: bash-completion-devel %endif BuildRequires: /usr/bin/ping @@ -947,7 +947,7 @@ rm ocaml/html/.gitignore %files bash-completion -%if !0%{?rhel} +%if 0%{?fedora} || 0%{?rhel} >= 11 %dir %{bash_completions_dir} %{bash_completions_dir}/guestfish %{bash_completions_dir}/guestmount From 10655b63e04e6c4f5ab5cf6ee781a2a1fd208208 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 30 Sep 2025 09:49:21 +0100 Subject: [PATCH 229/243] Enable aarch64 tests The libvirt bug is now fixed. Thanks: Cole Robinson --- libguestfs.spec | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index f482ed7..89dcd5c 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -13,10 +13,7 @@ ExcludeArch: %{ix86} # we only do a sanity check that kernel/qemu/libvirt/appliance is not # broken. To perform the full test suite, see instructions here: # https://www.redhat.com/archives/libguestfs/2015-September/msg00078.html -#%%global test_arches aarch64 %%{power64} s390x x86_64 -# aarch64 broken in Rawhide: -# https://gitlab.com/libvirt/libvirt/-/issues/762 -%global test_arches %{power64} s390x x86_64 +%global test_arches aarch64 %%{power64} s390x x86_64 # Trim older changelog entries. # https://lists.fedoraproject.org/pipermail/devel/2013-April/thread.html#181627 From 9cb066543f52591aa1c036d7888d1d31637ae0f7 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 30 Sep 2025 09:50:43 +0100 Subject: [PATCH 230/243] New upstream development version 1.57.4 --- libguestfs.spec | 8 ++++++-- sources | 4 ++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index 89dcd5c..3e94b99 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -34,8 +34,8 @@ ExcludeArch: %{ix86} Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 -Version: 1.57.3 -Release: 2%{?dist} +Version: 1.57.4 +Release: 1%{?dist} License: LGPL-2.1-or-later # Build only for architectures that have a kernel @@ -1073,6 +1073,10 @@ rm ocaml/html/.gitignore %changelog +* Tue Sep 30 2025 Richard W.M. Jones - 1:1.57.4-1 +- New upstream development version 1.57.4 +- Enable aarch64 tests + * Fri Sep 19 2025 Python Maint - 1:1.57.3-2 - Rebuilt for Python 3.14.0rc3 bytecode diff --git a/sources b/sources index 40d0b27..98b9840 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (libguestfs-1.57.3.tar.gz) = 09e0297c9ad47ca322c74f65eef6056dee140e6a625ab7bdd26ea76a9b1483288897ceaf24deff9c1373aa8dd791ce875261c5e07db14dc59a9c2a042ec99227 -SHA512 (libguestfs-1.57.3.tar.gz.sig) = c2c30b7728284156cc2ace79ce1f2eeb0b7d37064d09067033b0c4a2d3befac5e540eb1c436e41e1799f3133ab0c410d612312d66c66f237c4c7896b8a7a6cf6 +SHA512 (libguestfs-1.57.4.tar.gz) = 8f856323536866a0c000299bdce7de89bb66773f948943654e39dce37aee9359c486c626b9a1190bb4b44a53d70f76a86130363c285c9a2bfa504da1e470613d +SHA512 (libguestfs-1.57.4.tar.gz.sig) = bd83857dc81611e42edef8ec718a57399ecd9464479f4c5bc7b0dfe49a212a6428b098a835a49f54d47c3711bdbe0272c1ebc68c351733fdce608c82fe82a896 From 877a247a542c0385859cea868becbc4578008e08 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 13 Oct 2025 19:38:00 +0100 Subject: [PATCH 231/243] OCaml 5.4.0 rebuild --- libguestfs.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libguestfs.spec b/libguestfs.spec index 3e94b99..f22e736 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -35,7 +35,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.57.4 -Release: 1%{?dist} +Release: 2%{?dist} License: LGPL-2.1-or-later # Build only for architectures that have a kernel @@ -1073,6 +1073,9 @@ rm ocaml/html/.gitignore %changelog +* Mon Oct 13 2025 Richard W.M. Jones - 1:1.57.4-2 +- OCaml 5.4.0 rebuild + * Tue Sep 30 2025 Richard W.M. Jones - 1:1.57.4-1 - New upstream development version 1.57.4 - Enable aarch64 tests From 90bb4d2bafd39a9c7d383fa0d4760ce04a2e6104 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 15 Oct 2025 08:32:40 +0200 Subject: [PATCH 232/243] rebuild for https://fedoraproject.org/wiki/Changes/php85 --- libguestfs.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libguestfs.spec b/libguestfs.spec index f22e736..241a638 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -35,7 +35,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.57.4 -Release: 2%{?dist} +Release: 3%{?dist} License: LGPL-2.1-or-later # Build only for architectures that have a kernel @@ -1073,6 +1073,9 @@ rm ocaml/html/.gitignore %changelog +* Wed Oct 15 2025 Remi Collet - 1:1.57.4-3 +- rebuild for https://fedoraproject.org/wiki/Changes/php85 + * Mon Oct 13 2025 Richard W.M. Jones - 1:1.57.4-2 - OCaml 5.4.0 rebuild From 1edc00676a6e26c1a062f302f966d0bef0cb4301 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 15 Oct 2025 12:04:09 +0100 Subject: [PATCH 233/243] Require passt https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/YDHKKQSDURTMSKSN6GW3QGQI43DTFXNH/ --- libguestfs.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index 241a638..eecabc7 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -35,7 +35,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.57.4 -Release: 3%{?dist} +Release: 4%{?dist} License: LGPL-2.1-or-later # Build only for architectures that have a kernel @@ -305,7 +305,7 @@ Recommends: libvirt-daemon-config-network Requires: libvirt-daemon-driver-qemu >= 7.1.0 Requires: libvirt-daemon-driver-secret Requires: libvirt-daemon-driver-storage-core -Recommends: passt +Requires: passt Requires: (selinux-policy >= 3.11.1-63 if selinux-policy) %ifarch aarch64 @@ -1073,6 +1073,10 @@ rm ocaml/html/.gitignore %changelog +* Wed Oct 15 2025 Richard W.M. Jones - 1:1.57.4-4 +- Require passt +- https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/YDHKKQSDURTMSKSN6GW3QGQI43DTFXNH/ + * Wed Oct 15 2025 Remi Collet - 1:1.57.4-3 - rebuild for https://fedoraproject.org/wiki/Changes/php85 From 737237a79ef195fd5cedd1157c1743aacba7289e Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 17 Oct 2025 10:11:17 +0100 Subject: [PATCH 234/243] Test the direct backend in %check --- libguestfs.spec | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/libguestfs.spec b/libguestfs.spec index eecabc7..7626bee 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -753,6 +753,15 @@ if ! make quickcheck QUICKCHECK_TEST_TOOL_ARGS="-t 1200"; then cat $HOME/.cache/libvirt/qemu/log/* exit 1 fi + +# As libvirt is the default backend, test that the direct backend +# works too. It's a good place to get test coverage across all the +# architectures. +if ! LIBGUESTFS_BACKEND=direct \ + make quickcheck QUICKCHECK_TEST_TOOL_ARGS="-t 1200"; then + cat $HOME/.cache/libvirt/qemu/log/* + exit 1 +fi %endif From 1084cf6b179e7b86b44f5003aa4b7ec853e1d7ef Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 17 Oct 2025 11:07:52 +0100 Subject: [PATCH 235/243] New upstream development version 1.57.5 Test direct backend in %check --- libguestfs.spec | 8 ++++++-- sources | 4 ++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index 7626bee..c0c91bc 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -34,8 +34,8 @@ ExcludeArch: %{ix86} Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 -Version: 1.57.4 -Release: 4%{?dist} +Version: 1.57.5 +Release: 1%{?dist} License: LGPL-2.1-or-later # Build only for architectures that have a kernel @@ -1082,6 +1082,10 @@ rm ocaml/html/.gitignore %changelog +* Fri Oct 17 2025 Richard W.M. Jones - 1:1.57.5-1 +- New upstream development version 1.57.5 +- Test direct backend in %%check + * Wed Oct 15 2025 Richard W.M. Jones - 1:1.57.4-4 - Require passt - https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/YDHKKQSDURTMSKSN6GW3QGQI43DTFXNH/ diff --git a/sources b/sources index 98b9840..9ed7f34 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (libguestfs-1.57.4.tar.gz) = 8f856323536866a0c000299bdce7de89bb66773f948943654e39dce37aee9359c486c626b9a1190bb4b44a53d70f76a86130363c285c9a2bfa504da1e470613d -SHA512 (libguestfs-1.57.4.tar.gz.sig) = bd83857dc81611e42edef8ec718a57399ecd9464479f4c5bc7b0dfe49a212a6428b098a835a49f54d47c3711bdbe0272c1ebc68c351733fdce608c82fe82a896 +SHA512 (libguestfs-1.57.5.tar.gz) = b8db1a16984db602dcee0b02386fbdbe7d06636da3934cccceca8b1907cff6c7cf38a87450acc856ff2b3eb1ee620cbb7d12144b6a51712d96bc136f5b8774a7 +SHA512 (libguestfs-1.57.5.tar.gz.sig) = c87208a79786cce2048abc79f2afbfd200b936ce142d50afccf777390735c74273bb5d19cc3dd700415d856a6b75998d11271157d681721772c612a217498bf9 From e7046fe55bc2dc7e7e7bf3c88eabedd1cee7ed80 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 4 Nov 2025 16:23:38 +0000 Subject: [PATCH 236/243] New upstream development version 1.57.6 --- libguestfs.spec | 5 ++++- sources | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index c0c91bc..7d5b49b 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -34,7 +34,7 @@ ExcludeArch: %{ix86} Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 -Version: 1.57.5 +Version: 1.57.6 Release: 1%{?dist} License: LGPL-2.1-or-later @@ -1082,6 +1082,9 @@ rm ocaml/html/.gitignore %changelog +* Tue Nov 04 2025 Richard W.M. Jones - 1:1.57.6-1 +- New upstream development version 1.57.6 + * Fri Oct 17 2025 Richard W.M. Jones - 1:1.57.5-1 - New upstream development version 1.57.5 - Test direct backend in %%check diff --git a/sources b/sources index 9ed7f34..3845e6b 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (libguestfs-1.57.5.tar.gz) = b8db1a16984db602dcee0b02386fbdbe7d06636da3934cccceca8b1907cff6c7cf38a87450acc856ff2b3eb1ee620cbb7d12144b6a51712d96bc136f5b8774a7 -SHA512 (libguestfs-1.57.5.tar.gz.sig) = c87208a79786cce2048abc79f2afbfd200b936ce142d50afccf777390735c74273bb5d19cc3dd700415d856a6b75998d11271157d681721772c612a217498bf9 +SHA512 (libguestfs-1.57.6.tar.gz) = 35bd4e446a1126ff4fbe0aa1b5c6292a3dd474a0c1e34a6fbc0cedfc6dfad29b0b5610ab60b1dc73e21065da932c202189b106648c8b5743f9a8a9365b731d14 +SHA512 (libguestfs-1.57.6.tar.gz.sig) = cc865542c9bc9c97d2ea98d66f2b11e57d46d5d04026e2770a385ac6ba8a77fe83a25cbd2d1b2a10688c153b1d832b78080d28711622c19ea546f6c50f5ab9fa From 3ac14b503cbd06ae925083870ff929d2a34b50c3 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 4 Dec 2025 17:00:02 +0000 Subject: [PATCH 237/243] New upstream development version 1.57.7 --- libguestfs.spec | 5 ++++- sources | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index 7d5b49b..bb758ae 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -34,7 +34,7 @@ ExcludeArch: %{ix86} Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 -Version: 1.57.6 +Version: 1.57.7 Release: 1%{?dist} License: LGPL-2.1-or-later @@ -1082,6 +1082,9 @@ rm ocaml/html/.gitignore %changelog +* Thu Dec 04 2025 Richard W.M. Jones - 1:1.57.7-1 +- New upstream development version 1.57.7 + * Tue Nov 04 2025 Richard W.M. Jones - 1:1.57.6-1 - New upstream development version 1.57.6 diff --git a/sources b/sources index 3845e6b..46d190f 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (libguestfs-1.57.6.tar.gz) = 35bd4e446a1126ff4fbe0aa1b5c6292a3dd474a0c1e34a6fbc0cedfc6dfad29b0b5610ab60b1dc73e21065da932c202189b106648c8b5743f9a8a9365b731d14 -SHA512 (libguestfs-1.57.6.tar.gz.sig) = cc865542c9bc9c97d2ea98d66f2b11e57d46d5d04026e2770a385ac6ba8a77fe83a25cbd2d1b2a10688c153b1d832b78080d28711622c19ea546f6c50f5ab9fa +SHA512 (libguestfs-1.57.7.tar.gz) = edeafef8f8c11dd2ced85cd723a817d3696ce6b71441467b03645f335392fbc8f3a73a9fb8cd6b5a352055788228eedc14889fadf0c03ad8162ab775ca78a76d +SHA512 (libguestfs-1.57.7.tar.gz.sig) = b33f657439cf65ebc1ccd7f79f9db7a9e793c751282f7ca0b0fe026082d621a6df25b2af2c8d3560defd38584e0199ce1a34bbd723178302ce822fb49e5c431f From 12272cf017288df61859d4059e7a434adabdf087 Mon Sep 17 00:00:00 2001 From: Tom spot Callaway Date: Wed, 17 Dec 2025 13:40:57 -0500 Subject: [PATCH 238/243] rebuild for new libconfig --- libguestfs.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libguestfs.spec b/libguestfs.spec index bb758ae..47ac041 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -35,7 +35,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.57.7 -Release: 1%{?dist} +Release: 2%{?dist} License: LGPL-2.1-or-later # Build only for architectures that have a kernel @@ -1082,6 +1082,9 @@ rm ocaml/html/.gitignore %changelog +* Wed Dec 17 2025 Tom Callaway - 1:1.57.7-2 +- rebuild for new libconfig + * Thu Dec 04 2025 Richard W.M. Jones - 1:1.57.7-1 - New upstream development version 1.57.7 From bba1b606eadfaf91cdc3545adb39c28b14bb0b68 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 5 Nov 2025 10:33:28 +0000 Subject: [PATCH 239/243] Fix double-% in macro --- libguestfs.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libguestfs.spec b/libguestfs.spec index 47ac041..c1cbe86 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -13,7 +13,7 @@ ExcludeArch: %{ix86} # we only do a sanity check that kernel/qemu/libvirt/appliance is not # broken. To perform the full test suite, see instructions here: # https://www.redhat.com/archives/libguestfs/2015-September/msg00078.html -%global test_arches aarch64 %%{power64} s390x x86_64 +%global test_arches aarch64 %{power64} s390x x86_64 # Trim older changelog entries. # https://lists.fedoraproject.org/pipermail/devel/2013-April/thread.html#181627 From 8c9c0123024d4861a93db70ce36f7e85fbcf071e Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 5 Jan 2026 16:14:55 +0000 Subject: [PATCH 240/243] New upstream development version 1.58.0 Require libvirt >= 11.10.0, qemu >= 7.2.0 and passt. --- libguestfs.spec | 22 +++++++++++++--------- sources | 4 ++-- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index c1cbe86..4226402 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -23,7 +23,7 @@ ExcludeArch: %{ix86} %global verify_tarball_signature 1 # The source directory. -%global source_directory 1.57-development +%global source_directory 1.58-stable # Filter perl provides. %{?perl_default_filter} @@ -34,8 +34,8 @@ ExcludeArch: %{ix86} Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 -Version: 1.57.7 -Release: 2%{?dist} +Version: 1.58.0 +Release: 1%{?dist} License: LGPL-2.1-or-later # Build only for architectures that have a kernel @@ -94,7 +94,7 @@ BuildRequires: libselinux-utils BuildRequires: libselinux-devel BuildRequires: fuse, fuse-devel BuildRequires: pcre2-devel -BuildRequires: libvirt-devel +BuildRequires: libvirt-devel >= 11.10.0 BuildRequires: gperf BuildRequires: rpm-devel BuildRequires: cpio @@ -106,7 +106,7 @@ BuildRequires: unzip BuildRequires: systemd-units BuildRequires: netpbm-progs BuildRequires: icoutils -BuildRequires: libvirt-daemon-kvm >= 7.1.0 +BuildRequires: libvirt-daemon-kvm %if !0%{?rhel} BuildRequires: perl(Expect) %endif @@ -126,7 +126,7 @@ BuildRequires: curl BuildRequires: xz BuildRequires: zstd BuildRequires: libzstd-devel -BuildRequires: /usr/bin/qemu-img +BuildRequires: qemu-img >= 7.2.0 %if 0%{verify_tarball_signature} BuildRequires: gnupg2 @@ -283,7 +283,7 @@ Requires: systemd-libs%{?_isa} Requires: fuse # For core APIs: -Requires: /usr/bin/qemu-img +Requires: qemu-img Requires: coreutils Requires: grep Requires: tar @@ -292,7 +292,7 @@ Requires: tar Requires: xz # For qemu direct and libvirt backends. -Requires: qemu-kvm-core +Requires: qemu-kvm-core >= 7.2.0 %if !0%{?rhel} Suggests: qemu-block-curl Suggests: qemu-block-iscsi @@ -302,7 +302,7 @@ Suggests: qemu-block-rbd Suggests: qemu-block-ssh %endif Recommends: libvirt-daemon-config-network -Requires: libvirt-daemon-driver-qemu >= 7.1.0 +Requires: libvirt-daemon-driver-qemu >= 11.10.0 Requires: libvirt-daemon-driver-secret Requires: libvirt-daemon-driver-storage-core Requires: passt @@ -1082,6 +1082,10 @@ rm ocaml/html/.gitignore %changelog +* Mon Jan 05 2026 Richard W.M. Jones - 1:1.58.0-1 +- New upstream development version 1.58.0 +- Require libvirt >= 11.10.0, qemu >= 7.2.0 and passt. + * Wed Dec 17 2025 Tom Callaway - 1:1.57.7-2 - rebuild for new libconfig diff --git a/sources b/sources index 46d190f..23cf369 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (libguestfs-1.57.7.tar.gz) = edeafef8f8c11dd2ced85cd723a817d3696ce6b71441467b03645f335392fbc8f3a73a9fb8cd6b5a352055788228eedc14889fadf0c03ad8162ab775ca78a76d -SHA512 (libguestfs-1.57.7.tar.gz.sig) = b33f657439cf65ebc1ccd7f79f9db7a9e793c751282f7ca0b0fe026082d621a6df25b2af2c8d3560defd38584e0199ce1a34bbd723178302ce822fb49e5c431f +SHA512 (libguestfs-1.58.0.tar.gz) = 67abbd37fe64935ae5cca13dbe1860fe2eab9df492fd134eacbdc1831e6034c849855e76118ce0002d3ac83205122947582dbe47b66f12b94dcb51155881501a +SHA512 (libguestfs-1.58.0.tar.gz.sig) = e07758ed3901f9ae95dace16cbb4de194dbbde788155efcde7982226785928d1805af6939f201d74770923ad55997f1d465f9594cb81bc2435c0ea882ce546d8 From 895518e9b79a163625fc7fef85dc929102f45b25 Mon Sep 17 00:00:00 2001 From: Mamoru TASAKA Date: Thu, 8 Jan 2026 23:04:30 +0900 Subject: [PATCH 241/243] Rebuild for https://fedoraproject.org/wiki/Changes/Ruby_4.0 --- libguestfs.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libguestfs.spec b/libguestfs.spec index 4226402..641a90a 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -35,7 +35,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.58.0 -Release: 1%{?dist} +Release: 2%{?dist} License: LGPL-2.1-or-later # Build only for architectures that have a kernel @@ -1082,6 +1082,9 @@ rm ocaml/html/.gitignore %changelog +* Thu Jan 08 2026 Mamoru TASAKA - 1:1.58.0-2 +- Rebuild for https://fedoraproject.org/wiki/Changes/Ruby_4.0 + * Mon Jan 05 2026 Richard W.M. Jones - 1:1.58.0-1 - New upstream development version 1.58.0 - Require libvirt >= 11.10.0, qemu >= 7.2.0 and passt. From 7adc61bd28a6cae7a370c7b198844b14b5993738 Mon Sep 17 00:00:00 2001 From: Mamoru TASAKA Date: Thu, 8 Jan 2026 23:14:08 +0900 Subject: [PATCH 242/243] Change irb BR for ruby4.0 --- libguestfs.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libguestfs.spec b/libguestfs.spec index 641a90a..a311561 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -158,7 +158,7 @@ BuildRequires: rubygem-rake BuildRequires: rubygem(json) BuildRequires: rubygem(rdoc) BuildRequires: rubygem(test-unit) -BuildRequires: ruby-irb +BuildRequires: rubygem(irb) BuildRequires: php-devel BuildRequires: gobject-introspection-devel BuildRequires: gjs From 27d75aee6dcd830c12e57987c8903b321b3ec8b1 Mon Sep 17 00:00:00 2001 From: Jerry James Date: Mon, 12 Jan 2026 15:56:46 -0700 Subject: [PATCH 243/243] Fix a changelog entry --- libguestfs.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libguestfs.spec b/libguestfs.spec index a311561..66ef8e2 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -1134,7 +1134,7 @@ rm ocaml/html/.gitignore * Thu Jul 24 2025 Fedora Release Engineering - 1:1.56.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild -* Sat Jul 12 2025 Jerry James - 1:1.56.1-3 +* Sat Jul 12 2025 Jerry James - 1:1.56.1-3 - Rebuild to fix OCaml dependencies * Mon Jul 07 2025 Jitka Plesnikova - 1:1.56.1-2