From 8ceebe9df77c73f821bfa8c03fdfaf8bc687fbfa Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 27 Apr 2021 12:43:42 +0100 Subject: [PATCH] Merge fedora/rawhide into c9s. resolves: rhbz#1950629 Except this is not a merge, for stupid tooling reasons. --- README.md | 3 + guestfs-tools.spec | 431 +++++++++++++++++++++++++++++++++++++++++++++ libguestfs.keyring | Bin 0 -> 2823 bytes sources | 2 + 4 files changed, 436 insertions(+) create mode 100644 README.md create mode 100644 guestfs-tools.spec create mode 100644 libguestfs.keyring create mode 100644 sources diff --git a/README.md b/README.md new file mode 100644 index 0000000..f2f3b96 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# guestfs-tools + +The guestfs-tools package diff --git a/guestfs-tools.spec b/guestfs-tools.spec new file mode 100644 index 0000000..43facfd --- /dev/null +++ b/guestfs-tools.spec @@ -0,0 +1,431 @@ +# Architectures that we run the test suite on. +# +# As the test suite takes a very long time to run and is somewhat +# unreliable on !x86 architectures, only run it on x86-64. +%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" +# (RHBZ#1919389) +%global test_arches NONE +%endif + +# Verify tarball signature with GPGv2. +%global verify_tarball_signature 1 + +# If there are patches which touch autotools files, set this to 1. +%global patches_touch_autotools %{nil} + +# The source directory. +%global source_directory 1.46-stable + +# Filter perl provides. +%{?perl_default_filter} + +Summary: Tools to access and modify virtual machine disk images +Name: guestfs-tools +Version: 1.46.0 +Release: 1%{?dist} +License: GPLv2+ + +# Build only for architectures that have a kernel +ExclusiveArch: %{kernel_arches} + +# Source and patches. +URL: http://libguestfs.org/ +Source0: http://download.libguestfs.org/guestfs-tools/%{source_directory}/%{name}-%{version}.tar.gz +%if 0%{verify_tarball_signature} +Source1: http://download.libguestfs.org/guestfs-tools/%{source_directory}/%{name}-%{version}.tar.gz.sig +%endif + +# Keyring used to verify tarball signature. +%if 0%{verify_tarball_signature} +Source2: libguestfs.keyring +%endif + +%if 0%{patches_touch_autotools} +BuildRequires: autoconf, automake, libtool, gettext-devel +%endif + +# Basic build requirements. +BuildRequires: gcc, gcc-c++ +BuildRequires: make +BuildRequires: libguestfs-devel >= 1.45.3-1 +BuildRequires: libguestfs-xfs +BuildRequires: perl(Pod::Simple) +BuildRequires: perl(Pod::Man) +BuildRequires: perl(Module::Build) +BuildRequires: perl(Test::More) +BuildRequires: /usr/bin/pod2text +BuildRequires: po4a +BuildRequires: pcre2-devel +BuildRequires: libxml2-devel +BuildRequires: jansson-devel +BuildRequires: libvirt-devel +BuildRequires: libxcrypt-devel +BuildRequires: ncurses-devel +BuildRequires: ocaml-libguestfs-devel +BuildRequires: ocaml-findlib-devel +BuildRequires: ocaml-gettext-devel +%if !0%{?rhel} +BuildRequires: ocaml-ounit-devel +%endif +BuildRequires: flex +BuildRequires: bison +BuildRequires: xz-devel +%if !0%{?rhel} +BuildRequires: zip +BuildRequires: unzip +%endif +%if !0%{?rhel} +BuildRequires: perl(Expect) +%endif +BuildRequires: bash-completion +BuildRequires: /usr/bin/qemu-img +BuildRequires: xorriso +BuildRequires: perl(Locale::TextDomain) +BuildRequires: perl(Sys::Guestfs) +BuildRequires: perl(Win::Hivex) +BuildRequires: perl(Win::Hivex::Regedit) + +%if 0%{verify_tarball_signature} +BuildRequires: gnupg2 +%endif + +# For virt-builder: +Requires: curl +Requires: gnupg2 +Requires: /usr/bin/qemu-img +Requires: xz + +# For virt-builder-repository: +Suggests: osinfo-db + +# For virt-inspector, since Fedora and RHEL >= 7 use XFS: +Recommends: libguestfs-xfs + +# For virt-edit and virt-customize: +Suggests: perl + +# This replaces the libguestfs-tools-c package. +Provides: libguestfs-tools-c = 1:%{version}-%{release} +Obsoletes: libguestfs-tools-c <= 1:1.45.2-1 + + +%description +guestfs-tools is a set of tools that 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. + +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-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-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'. + + +%package -n virt-win-reg +Summary: Access and modify the Windows Registry of a Windows VM +License: GPLv2+ +BuildArch: noarch + +# This replaces the libguestfs-tools package. +Provides: libguestfs-tools = 1:%{version}-%{release} +Obsoletes: libguestfs-tools <= 1:1.45.2-1 + + +%description -n virt-win-reg +Virt-win-reg lets you look at and modify the Windows Registry of +Windows virtual machines. + + +%if !0%{?rhel} +%package -n virt-dib +Summary: Safe and secure diskimage-builder replacement +License: GPLv2+ +# This subpackage (only) must have an Epoch of 1 because it +# replaces a package in libguestfs which had an Epoch of 1. +Epoch: 1 + +Requires: libguestfs-dib >= 1:1.45.2-1 + + +%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. +%endif + + +%package bash-completion +Summary: Bash tab-completion scripts for %{name} +BuildArch: noarch +Requires: bash-completion >= 2.0 +Requires: %{name} = %{version}-%{release} + + +%description bash-completion +Install this package if you want intelligent bash tab-completion +for the virt-* tools. + + +%package man-pages-ja +Summary: Japanese (ja) man pages for %{name} +BuildArch: noarch +Requires: %{name} = %{version}-%{release} + +%description man-pages-ja +%{name}-man-pages-ja contains Japanese (ja) man pages +for %{name}. + + +%package man-pages-uk +Summary: Ukrainian (uk) man pages for %{name} +BuildArch: noarch +Requires: %{name} = %{version}-%{release} + +%description man-pages-uk +%{name}-man-pages-uk contains Ukrainian (uk) man pages +for %{name}. + + +%prep +%if 0%{verify_tarball_signature} +%{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}' +%endif +%setup -q +%autopatch -p1 + +%if 0%{patches_touch_autotools} +autoreconf -i +%endif + + +%build +%{configure} + +# 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. +make -j1 -C builder index-parse.c + +make V=1 %{?_smp_mflags} + + +%check +%ifarch %{test_arches} +# Enable debugging. +export LIBGUESTFS_DEBUG=1 +export LIBGUESTFS_TRACE=1 + +# This test is currently broken and needs further investigation. +export SKIP_TEST_MACHINE_READABLE_SH=1 + +# This test fails for me in local mock and Koji, but not when running +# in an unrestricted environment. +export SKIP_TEST_VIRT_FORMAT_SH=1 + +# This test takes too long to run under Koji and times out. It runs +# fine with KVM enabled. +export SKIP_TEST_VIRT_RESIZE_PL=1 + +if ! make check -k ; then + # Dump out the log files of any failing tests to make + # debugging test failures easier. + for f in `find -name test-suite.log | xargs grep -l ^FAIL:`; do + echo '*****' $f '*****' + cat $f + echo + done + exit 1 +fi +%endif + + +%install +make DESTDIR=$RPM_BUILD_ROOT install + +# Delete libtool files. +find $RPM_BUILD_ROOT -name '*.la' -delete + +# Move installed documentation back to the source directory so +# we can install it using a %%doc rule. +mv $RPM_BUILD_ROOT%{_docdir}/%{name} installed-docs +gzip --best installed-docs/*.xml + +# Find locale files. +%find_lang %{name} + + +# Fix upgrades from old libguestfs-tools-c package +# which had /etc/virt-builder -> xdg/virt-builder. +# https://docs.fedoraproject.org/en-US/packaging-guidelines/Directory_Replacement/ +# This can be removed in Fedora > 36. +%pretrans -p +path = "/etc/virt-builder" +st = posix.stat(path) +if st and st.type == "link" then + os.remove(path) +end + + +%files -f %{name}.lang +%license COPYING +%doc README +%doc installed-docs/* +%dir %{_sysconfdir}/virt-builder +%dir %{_sysconfdir}/virt-builder/repos.d +%config(noreplace) %{_sysconfdir}/virt-builder/repos.d/* +%{_bindir}/virt-alignment-scan +%{_bindir}/virt-builder +%{_bindir}/virt-builder-repository +%{_bindir}/virt-cat +%{_bindir}/virt-customize +%{_bindir}/virt-df +%{_bindir}/virt-diff +%{_bindir}/virt-edit +%{_bindir}/virt-filesystems +%{_bindir}/virt-format +%{_bindir}/virt-get-kernel +%{_bindir}/virt-index-validate +%{_bindir}/virt-inspector +%{_bindir}/virt-log +%{_bindir}/virt-ls +%{_bindir}/virt-make-fs +%{_bindir}/virt-resize +%{_bindir}/virt-sparsify +%{_bindir}/virt-sysprep +%{_bindir}/virt-tail +%{_mandir}/man1/virt-alignment-scan.1* +%{_mandir}/man1/virt-builder-repository.1* +%{_mandir}/man1/virt-builder.1* +%{_mandir}/man1/virt-cat.1* +%{_mandir}/man1/virt-customize.1* +%{_mandir}/man1/virt-df.1* +%{_mandir}/man1/virt-diff.1* +%{_mandir}/man1/virt-edit.1* +%{_mandir}/man1/virt-filesystems.1* +%{_mandir}/man1/virt-format.1* +%{_mandir}/man1/virt-get-kernel.1* +%{_mandir}/man1/virt-index-validate.1* +%{_mandir}/man1/virt-inspector.1* +%{_mandir}/man1/virt-log.1* +%{_mandir}/man1/virt-ls.1* +%{_mandir}/man1/virt-make-fs.1* +%{_mandir}/man1/virt-resize.1* +%{_mandir}/man1/virt-sparsify.1* +%{_mandir}/man1/virt-sysprep.1* +%{_mandir}/man1/virt-tail.1* + + +%files -n virt-win-reg +%license COPYING +%doc README +%{_bindir}/virt-win-reg +%{_mandir}/man1/virt-win-reg.1* + + +%if !0%{?rhel} +%files -n virt-dib +%license COPYING +%doc README +%{_bindir}/virt-dib +%{_mandir}/man1/virt-dib.1* +%endif + + +%files bash-completion +%license COPYING +%dir %{_datadir}/bash-completion/completions +%{_datadir}/bash-completion/completions/virt-* + + +%files man-pages-ja +%lang(ja) %{_mandir}/ja/man1/*.1* + + +%files man-pages-uk +%lang(uk) %{_mandir}/uk/man1/*.1* + + +%changelog +* Tue Apr 27 2021 Richard W.M. Jones - 1.46.0-1 +- New stable branch version 1.46.0. + +* Wed Apr 07 2021 Richard W.M. Jones - 1.45.3-4 +- Use Epoch 1 for virt-dib subpackage (only). + +* Wed Mar 31 2021 Richard W.M. Jones - 1.45.3-3 +- Add BR xorriso, needed to run the tests. + +* Mon Mar 29 2021 Richard W.M. Jones - 1.45.3-1 +- New upstream version 1.45.3. +- Fix symlink replacement of virt-builder directory (RHBZ#1943838). + +* Fri Mar 26 2021 Richard W.M. Jones - 1.45.2-5 +- Skip test-virt-resize.pl that takes too long to run. + +* Thu Mar 25 2021 Richard W.M. Jones - 1.45.2-4 +- Add perl(Test::More) dependency for the Perl test suite. +- Add perl(Module::Build) dependency for the Perl bindings. +- Fix ounit2 dependency again. + +* Wed Mar 24 2021 Richard W.M. Jones - 1.45.2-2 +- Add perl(Locale::TextDomain) dependency for virt-win-reg. +- Fix ounit2 dependency upstream. + +* Tue Mar 23 2021 Richard W.M. Jones - 1.45.2-1 +- New guestfs-tools package, split off from libguestfs. diff --git a/libguestfs.keyring b/libguestfs.keyring new file mode 100644 index 0000000000000000000000000000000000000000..bb3eb5537b7c398a10b7e2b26ca00af011d1a73e GIT binary patch literal 2823 zcma*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_C^pJ@OJh;qD77 z`}&Nz_D*Iq6f;t7?Bqxowet8!npZ$`6NXiVD@~AY_g*>B){{F>D1? zN$g|68|pA_wcr~kt)JAUlnukx>iU8KA)f_4{X1&=@-!^E^P8QCNsCiKiUK_F>Xsli+q$Z*{a2b32CMwb3D{%D_`*E!rm9<3xmVE)l89dYVw5nlryxm zap55S(@vrBI7zH^ydCt_O(Ugr9>qJgQm;i{)`fD?)7n|Jj)=c?=qu9x3%|TVwl?!x z?-#a4>J7h7(TrYP9;;VFFnL~q)11l=W{2zM0PM_#^G-;w9~Y(6gf0(xy$5NJB{8G) z2_PZQC}tF@|I|RCJ_Ct6H6l-=E50j$d5Ku9&`{QVe8Z;T+VX2372^TDbVX-o_tL$y zfM36H?e10e)+AoUd;Ar?$c*rS7DBr*maRLN9n|78-|^BE1bP6RW%uVWO+Eh#-^#2q zU1o2OGeEnJe`vc1&bKa=PK5K>MrUoy*4Di*xQ~Hr8YK=ae$S@5;A6m-C*^N>H6QiE z+Z~%eGDDNK_vktjC^nxMUEXZReG3G^_uml$%lONCD~B)o&u@Ar}fQG5;T#E%^U88SI<&z@~yy|THGE%E1PbI z?F^r&ZTiw{?xi@{*DAy6C4z2C)^HACOJ!QTq)OKNiy$F_ao^+$ziBa!`o*phmK_>s za)NY_nGb%M+@h1zb zdfh2x>9W=SlC19X_yB5T8jPIITr(IuajP65y|~iU>niq=mN|NI*0)B&ixQw`dlhcIFP)G9WnV`}K3C{4m}cRO<&1vJ^K5DAVUo*Z<@ zunwMvxU0NO;ORRnw0-LRLg3}q^7?BlO`eOGFQ3pD@ literal 0 HcmV?d00001 diff --git a/sources b/sources new file mode 100644 index 0000000..e57c1d3 --- /dev/null +++ b/sources @@ -0,0 +1,2 @@ +SHA512 (guestfs-tools-1.46.0.tar.gz) = 5ee9503910d36b3d46ac7b55b11a122e632d97e22f47bd90274ccbd9bc804545567491a88d18f88978113a96f671efeb86604aee6e797d93ae8c3472e63e9fe3 +SHA512 (guestfs-tools-1.46.0.tar.gz.sig) = 7b9776d512e400b4f0159c557af5d13a3a22188799d8137a3eb1c9f884bfcb6e8eb4cd258cb781b6f5c9d7d6a0864c44dd60b183554244550dd1b9d94e8dc1cf