Skip to content

Commit

Permalink
[main extended] Enable libguestfs (#1970)
Browse files Browse the repository at this point in the history
* Remove libreport support from mdadm

* Conditionally pull in perl-Sys-Virt test deps

* Fix dependency resolution for ocaml-ctypes

* Upgrade to latest ocaml-gettext

* Fix ocaml-ounit build

* Upgrade ocaml-base to latest

* Upgrade ocaml-migrate-parsetree to latest

* Upgrade ocaml-stdio to 0.15.0

* Upgrade ocaml-parsexp to 0.15.0

* Upgrade ocaml-ppxlib to 0.24.0

* Upgrade ocaml-sexplib to 0.15.0

* Upgrade ocaml-sexplib0 to 0.15.0

* Upgrade supermin to 5.2.1

* Fixup libguestfs patches and configuration
  • Loading branch information
oliviacrain authored and jslobodzian committed Jan 21, 2022
1 parent 39a3f0a commit 04944c9
Show file tree
Hide file tree
Showing 36 changed files with 560 additions and 405 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ SPECS/**/*.msp
SPECS/**/*.rar
SPECS/**/*.rpm
SPECS/**/*.tar
SPECS/**/*.tbz
SPECS/**/*.tgz
SPECS/**/*.txz
SPECS/**/*.xar
Expand Down
17 changes: 0 additions & 17 deletions SPECS-EXTENDED/libguestfs/libguestfs-1.44.0.tar.gz.sig

This file was deleted.

44 changes: 44 additions & 0 deletions SPECS-EXTENDED/libguestfs/libguestfs-config-rpm.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
From 3950979b8f49a743ac976551b16284340539d6df Mon Sep 17 00:00:00 2001
From: Alexandre Iooss <[email protected]>
Date: Fri, 27 Aug 2021 16:47:24 +0200
Subject: [PATCH] build: Define HAVE_RPM, HAVE_DPKG and HAVE_PACMAN

When using option `--with-distro`, `HAVE_RPM`, `HAVE_DPKG` and
`HAVE_PACMAN` are not defined and make the configure phase fail.
This makes sure that these conditionals are always defined.

(cherry picked from commit 210959cc344d6a4a1e3afa26d276b130651def74)
---
m4/guestfs-appliance.m4 | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/m4/guestfs-appliance.m4 b/m4/guestfs-appliance.m4
index 8b9ddcb5d..66aea5f98 100644
--- a/m4/guestfs-appliance.m4
+++ b/m4/guestfs-appliance.m4
@@ -114,16 +114,16 @@ AC_ARG_WITH([distro],
AC_MSG_ERROR([/etc/os-release not available, please specify the distro using --with-distro=DISTRO])
fi
]
- AM_CONDITIONAL([HAVE_RPM],
- [AS_CASE([$DISTRO], [REDHAT | SUSE | OPENMANDRIVA | MAGEIA ], [true],
- [*], [false])])
- AM_CONDITIONAL([HAVE_DPKG],
- [AS_CASE([$DISTRO], [DEBIAN | UBUNTU ], [true],
- [*], [false])])
- AM_CONDITIONAL([HAVE_PACMAN],
- [AS_CASE([$DISTRO], [ARCHLINUX | FRUGALWARE ], [true],
- [*], [false])])
)
+AM_CONDITIONAL([HAVE_RPM],
+ [AS_CASE([$DISTRO], [REDHAT | SUSE | OPENMANDRIVA | MAGEIA ], [true],
+ [*], [false])])
+AM_CONDITIONAL([HAVE_DPKG],
+ [AS_CASE([$DISTRO], [DEBIAN | UBUNTU ], [true],
+ [*], [false])])
+AM_CONDITIONAL([HAVE_PACMAN],
+ [AS_CASE([$DISTRO], [ARCHLINUX | FRUGALWARE ], [true],
+ [*], [false])])
AC_SUBST([DISTRO])

dnl Add extra packages to the appliance.
32 changes: 32 additions & 0 deletions SPECS-EXTENDED/libguestfs/libguestfs-ocaml413compat.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
From cc4ecbe236914f9b391ecf3815008547472632f8 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <[email protected]>
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 4237ea5..8847717 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
4 changes: 2 additions & 2 deletions SPECS-EXTENDED/libguestfs/libguestfs.signatures.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
"copy-patches.sh": "9e0112d9b85f80f48697ffefbb6cc3a1eda527ea5ff065f48e08440dfba573e8",
"guestfish.sh": "5efae0e6b38c7a137265bc1f3988dc9734a99a08a87ffbcfa1715aefe3982d29",
"libguestfs-1.44.0.tar.gz": "0ec7b44a4c50e928583c56099da31ceb9680766043bd7d468f3ca7b741c55d21",
"yum.conf.in": "b391659cc5cd6ce3b48613429aaec4fab26543fb0b185d03597613475cd34755"
"yum.conf.in": "2ca1e0ea6814436211715f14975e211263db10f09fca1fdef51c5aa3fe52a357"
}
}
}
Loading

0 comments on commit 04944c9

Please sign in to comment.