Skip to content

Commit 04944c9

Browse files
oliviacrainjslobodzian
authored andcommitted
[main extended] Enable libguestfs (#1970)
* 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
1 parent 39a3f0a commit 04944c9

36 files changed

+560
-405
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ SPECS/**/*.msp
2020
SPECS/**/*.rar
2121
SPECS/**/*.rpm
2222
SPECS/**/*.tar
23+
SPECS/**/*.tbz
2324
SPECS/**/*.tgz
2425
SPECS/**/*.txz
2526
SPECS/**/*.xar

SPECS-EXTENDED/libguestfs/libguestfs-1.44.0.tar.gz.sig

Lines changed: 0 additions & 17 deletions
This file was deleted.
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
From 3950979b8f49a743ac976551b16284340539d6df Mon Sep 17 00:00:00 2001
2+
From: Alexandre Iooss <[email protected]>
3+
Date: Fri, 27 Aug 2021 16:47:24 +0200
4+
Subject: [PATCH] build: Define HAVE_RPM, HAVE_DPKG and HAVE_PACMAN
5+
6+
When using option `--with-distro`, `HAVE_RPM`, `HAVE_DPKG` and
7+
`HAVE_PACMAN` are not defined and make the configure phase fail.
8+
This makes sure that these conditionals are always defined.
9+
10+
(cherry picked from commit 210959cc344d6a4a1e3afa26d276b130651def74)
11+
---
12+
m4/guestfs-appliance.m4 | 18 +++++++++---------
13+
1 file changed, 9 insertions(+), 9 deletions(-)
14+
15+
diff --git a/m4/guestfs-appliance.m4 b/m4/guestfs-appliance.m4
16+
index 8b9ddcb5d..66aea5f98 100644
17+
--- a/m4/guestfs-appliance.m4
18+
+++ b/m4/guestfs-appliance.m4
19+
@@ -114,16 +114,16 @@ AC_ARG_WITH([distro],
20+
AC_MSG_ERROR([/etc/os-release not available, please specify the distro using --with-distro=DISTRO])
21+
fi
22+
]
23+
- AM_CONDITIONAL([HAVE_RPM],
24+
- [AS_CASE([$DISTRO], [REDHAT | SUSE | OPENMANDRIVA | MAGEIA ], [true],
25+
- [*], [false])])
26+
- AM_CONDITIONAL([HAVE_DPKG],
27+
- [AS_CASE([$DISTRO], [DEBIAN | UBUNTU ], [true],
28+
- [*], [false])])
29+
- AM_CONDITIONAL([HAVE_PACMAN],
30+
- [AS_CASE([$DISTRO], [ARCHLINUX | FRUGALWARE ], [true],
31+
- [*], [false])])
32+
)
33+
+AM_CONDITIONAL([HAVE_RPM],
34+
+ [AS_CASE([$DISTRO], [REDHAT | SUSE | OPENMANDRIVA | MAGEIA ], [true],
35+
+ [*], [false])])
36+
+AM_CONDITIONAL([HAVE_DPKG],
37+
+ [AS_CASE([$DISTRO], [DEBIAN | UBUNTU ], [true],
38+
+ [*], [false])])
39+
+AM_CONDITIONAL([HAVE_PACMAN],
40+
+ [AS_CASE([$DISTRO], [ARCHLINUX | FRUGALWARE ], [true],
41+
+ [*], [false])])
42+
AC_SUBST([DISTRO])
43+
44+
dnl Add extra packages to the appliance.
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
From cc4ecbe236914f9b391ecf3815008547472632f8 Mon Sep 17 00:00:00 2001
2+
From: "Richard W.M. Jones" <[email protected]>
3+
Date: Tue, 2 Mar 2021 10:39:15 +0000
4+
Subject: [PATCH] mlstdutils/std_utils.ml: Fix for OCaml 4.12.
5+
6+
We were using a default function from somewhere called "compare"
7+
instead of the actual function (Pervasives.compare / Stdlib.compare).
8+
Since the wrong default function was used it had a different type from
9+
what we expected:
10+
11+
File "std_utils.ml", line 312, characters 36-37:
12+
312 | | (y, y') :: _ when cmp x y = 0 -> y'
13+
^
14+
Error: This expression has type int but an expression was expected of type
15+
'weak1 list -> int
16+
---
17+
common/mlstdutils/std_utils.ml | 2 +-
18+
1 file changed, 1 insertion(+), 1 deletion(-)
19+
20+
diff --git a/common/mlstdutils/std_utils.ml b/common/mlstdutils/std_utils.ml
21+
index 4237ea5..8847717 100644
22+
--- a/common/mlstdutils/std_utils.ml
23+
+++ b/common/mlstdutils/std_utils.ml
24+
@@ -307,7 +307,7 @@ module List = struct
25+
| x::xs, y::ys, z::zs -> (x, y, z) :: combine3 xs ys zs
26+
| _ -> invalid_arg "combine3"
27+
28+
- let rec assoc_lbl ?(cmp = compare) ~default x = function
29+
+ let rec assoc_lbl ?(cmp = Pervasives.compare) ~default x = function
30+
| [] -> default
31+
| (y, y') :: _ when cmp x y = 0 -> y'
32+
| _ :: ys -> assoc_lbl ~cmp ~default x ys

SPECS-EXTENDED/libguestfs/libguestfs.signatures.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
"copy-patches.sh": "9e0112d9b85f80f48697ffefbb6cc3a1eda527ea5ff065f48e08440dfba573e8",
55
"guestfish.sh": "5efae0e6b38c7a137265bc1f3988dc9734a99a08a87ffbcfa1715aefe3982d29",
66
"libguestfs-1.44.0.tar.gz": "0ec7b44a4c50e928583c56099da31ceb9680766043bd7d468f3ca7b741c55d21",
7-
"yum.conf.in": "b391659cc5cd6ce3b48613429aaec4fab26543fb0b185d03597613475cd34755"
7+
"yum.conf.in": "2ca1e0ea6814436211715f14975e211263db10f09fca1fdef51c5aa3fe52a357"
88
}
9-
}
9+
}

0 commit comments

Comments
 (0)