--- /dev/null
+From b470270d44e8dc37a2417c1157eefdd9c3d65dd1 Mon Sep 17 00:00:00 2001
+From: "Richard W.M. Jones" <rjones@redhat.com>
+Date: Wed, 24 Mar 2021 18:30:45 +0000
+Subject: [PATCH 6/6] builder: Use correct ounit2 module.
+
+Fixes: commit 4354a3126152a2748cc9097cba139b3908ccc342
+---
+ builder/Makefile.am | 2 +-
+ m4/guestfs-ocaml.m4 | 10 +++++-----
+ 2 files changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/builder/Makefile.am b/builder/Makefile.am
+index 4d2e07843c..f49a3b0aaa 100644
+--- a/builder/Makefile.am
++++ b/builder/Makefile.am
+@@ -192,7 +192,7 @@ if HAVE_OCAML_PKG_GETTEXT
+ OCAMLPACKAGES += -package gettext-stub
+ endif
+ if HAVE_OCAML_PKG_OUNIT
+-OCAMLPACKAGES_TESTS += -package oUnit
++OCAMLPACKAGES_TESTS += -package ounit2
+ endif
+
+ OCAMLCLIBS = \
+diff --git a/m4/guestfs-ocaml.m4 b/m4/guestfs-ocaml.m4
+index a2f6cada9f..f5ac7eff29 100644
+--- a/m4/guestfs-ocaml.m4
++++ b/m4/guestfs-ocaml.m4
+@@ -105,7 +105,7 @@ if test "x$OCAML_PKG_guestfs" = "xno"; then
+ fi
+
+ OCAML_PKG_gettext=no
+-OCAML_PKG_oUnit=no
++OCAML_PKG_ounit2=no
+ ounit_is_v2=no
+ have_Bytes_module=no
+ AS_IF([test "x$OCAMLC" != "xno"],[
+@@ -117,11 +117,11 @@ AS_IF([test "x$OCAMLC" != "xno"],[
+
+ GUESTFS_CREATE_COMMON_GETTEXT_ML([common/mlgettext/common_gettext.ml])
+
+- AC_CHECK_OCAML_PKG(oUnit)
++ AC_CHECK_OCAML_PKG(ounit2)
+
+ # oUnit >= 2 is required, so check that it has OUnit2.
+- if test "x$OCAML_PKG_oUnit" != "xno"; then
+- AC_CHECK_OCAML_MODULE(ounit_is_v2,[OUnit.OUnit2],OUnit2,[+oUnit])
++ if test "x$OCAML_PKG_ounit2" != "xno"; then
++ AC_CHECK_OCAML_MODULE(ounit_is_v2,[OUnit.OUnit2],OUnit2,[+ounit2])
+ fi
+
+ # Check if we have the 'Bytes' module. If not (OCaml < 4.02) then
+@@ -141,7 +141,7 @@ AS_IF([test "x$OCAMLC" != "xno"],[
+ AM_CONDITIONAL([HAVE_OCAML_PKG_GETTEXT],
+ [test "x$OCAML_PKG_gettext" != "xno"])
+ AM_CONDITIONAL([HAVE_OCAML_PKG_OUNIT],
+- [test "x$OCAML_PKG_oUnit" != "xno" && test "x$ounit_is_v2" != "xno"])
++ [test "x$OCAML_PKG_ounit2" != "xno" && test "x$ounit_is_v2" != "xno"])
+
+ AC_CHECK_PROG([OCAML_GETTEXT],[ocaml-gettext],[ocaml-gettext],[no])
+ AM_CONDITIONAL([HAVE_OCAML_GETTEXT],
+--
+2.29.0.rc2
+
Summary: Tools to access and modify virtual machine disk images
Name: guestfs-tools
Version: 1.45.2
-Release: 1%{?dist}
+Release: 2%{?dist}
License: GPLv2+
# Build only for architectures that have a kernel
Patch3: 0003-build-Remove-dependency-on-gobject-introspection.patch
Patch4: 0004-build-Remove-dependency-on-perl-Sys-Virt.patch
Patch5: 0005-builder-Get-rid-of-etc-xdg-and-XDG_CONFIG_DIRS-nonse.patch
+Patch6: 0006-builder-Use-correct-ounit2-module.patch
%if 0%{patches_touch_autotools}
BuildRequires: autoconf, automake, libtool, gettext-devel
%endif
BuildRequires: bash-completion
BuildRequires: /usr/bin/qemu-img
+BuildRequires: perl(Locale::TextDomain)
BuildRequires: perl(Sys::Guestfs)
BuildRequires: perl(Win::Hivex)
BuildRequires: perl(Win::Hivex::Regedit)
%changelog
+* Wed Mar 24 2021 Richard W.M. Jones <rjones@redhat.com> - 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 <rjones@redhat.com> - 1.45.2-1
- New guestfs-tools package, split off from libguestfs.