Rebase to new stable branch version 1.46.0

resolves: rhbz#2011711
This commit is contained in:
Richard W.M. Jones 2021-10-08 12:58:48 +01:00
parent 61eede1ba3
commit f8febbf143
16 changed files with 258 additions and 320 deletions

View File

@ -0,0 +1,153 @@
From e2f8db27d0af5217eb5d0487e0713309559d4489 Mon Sep 17 00:00:00 2001
From: Laszlo Ersek <lersek@redhat.com>
Date: Tue, 21 Sep 2021 21:29:39 +0200
Subject: [PATCH] Go bindings: fix "C array of strings" -- char** -- allocation
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The current "arg_string_list" and "free_string_list" implementations go
back to commit b6f01f32606d ("Add Go (language) bindings.", 2013-07-03).
There are two problems with them:
- "free_string_list" doesn't actually free anything,
- at the *first* such g.Internal_test() call site that passes an
Ostringlist member inside the Optargs argument, namely:
> g.Internal_test ("abc",
> string_addr ("def"),
> []string{},
> false,
> 0,
> 0,
> "123",
> "456",
> []byte{'a', 'b', 'c', '\000', 'a', 'b', 'c'},
> &guestfs.OptargsInternal_test{Ostringlist_is_set: true,
> Ostringlist: []string{}
> }
> )
the "golang/run-bindtests" case crashes:
> panic: runtime error: cgo argument has Go pointer to Go pointer
>
> goroutine 1 [running]:
> libguestfs.org/guestfs.(*Guestfs).Internal_test.func7(0xc000018180,
> 0xadfb60, 0xadfb80, 0xc000010048, 0x0, 0x0, 0x0, 0xae3e10, 0xae3e30,
> 0xade3a0, ...)
> golang/src/libguestfs.org/guestfs/guestfs.go:6729 +0xa9
> libguestfs.org/guestfs.(*Guestfs).Internal_test(0xc000018180, 0x4ee3a5,
> 0x3, 0xc000061be8, 0xc000061af8, 0x0, 0x0, 0xc000061a00, 0x0, 0x0, ...)
> golang/src/libguestfs.org/guestfs/guestfs.go:6729 +0x3c9
> main.main()
> golang/bindtests/bindtests.go:77 +0x151e
> exit status 2
> FAIL run-bindtests (exit status: 1)
In Daniel P. Berrangé's words [1],
> You're allowed to pass a Go pointer to C via CGo, but the memory that
> points to is not allowed to contained further Go pointers. So the struct
> fields must strictly use a C pointer.
One pattern to solve the problem has been shown on stackoverflow [2].
Thus, rewrite the "arg_string_list" and "free_string_list" functions
almost entirely in C, following that example.
While this approach is not the most idiomatic Go, as a solution exists
without C helper functions [3], it should still be acceptable, at least as
an incremental improvement, for letting "golang/run-bindtests" pass.
[1] https://listman.redhat.com/archives/libguestfs/2021-September/msg00118.html
[2] https://stackoverflow.com/questions/35924545/golang-cgo-panic-runtime-error-cgo-argument-has-go-pointer-to-go-pointer
[3] https://listman.redhat.com/archives/libguestfs/2021-September/msg00106.html
Cc: "Daniel P. Berrangé" <berrange@redhat.com>
Cc: "Richard W.M. Jones" <rjones@redhat.com>
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Message-Id: <20210921192939.32468-1-lersek@redhat.com>
Tested-by: "Richard W.M. Jones" <rjones@redhat.com>
Acked-by: "Richard W.M. Jones" <rjones@redhat.com>
---
generator/golang.ml | 47 ++++++++++++++++++++++++++++++++++++---------
1 file changed, 38 insertions(+), 9 deletions(-)
diff --git a/generator/golang.ml b/generator/golang.ml
index d328abe4e..0d6a92367 100644
--- a/generator/golang.ml
+++ b/generator/golang.ml
@@ -52,6 +52,40 @@ _go_guestfs_create_flags (unsigned flags)
{
return guestfs_create_flags (flags);
}
+
+// Passing a Go pointer to C via CGo is allowed, but the memory that points to
+// is not allowed to contain further Go pointers. The helper functions below
+// are one way to implement this, although the same can be achieved purely in
+// Go as well. See the discussion here:
+// <https://listman.redhat.com/archives/libguestfs/2021-September/msg00101.html>.
+typedef char *pChar;
+
+pChar *allocStringArray (size_t nmemb)
+{
+ pChar *array;
+
+ array = malloc (sizeof (pChar) * (nmemb + 1));
+ array[nmemb] = NULL;
+ return array;
+}
+
+void storeString (pChar *array, size_t idx, pChar string)
+{
+ array[idx] = string;
+}
+
+void freeStringArray (pChar *array)
+{
+ pChar *position;
+ pChar string;
+
+ position = array;
+ while ((string = *position) != NULL) {
+ free (string);
+ position++;
+ }
+ free (array);
+}
*/
import \"C\"
@@ -148,12 +182,11 @@ func (g *Guestfs) Close () *GuestfsError {
* C strings and golang []string.
*/
func arg_string_list (xs []string) **C.char {
- r := make ([]*C.char, 1 + len (xs))
+ r := C.allocStringArray (C.size_t (len (xs)))
for i, x := range xs {
- r[i] = C.CString (x)
+ C.storeString (r, C.size_t (i), C.CString (x));
}
- r[len (xs)] = nil
- return &r[0]
+ return (**C.char) (r)
}
func count_string_list (argv **C.char) int {
@@ -167,11 +200,7 @@ func count_string_list (argv **C.char) int {
}
func free_string_list (argv **C.char) {
- for *argv != nil {
- //C.free (*argv)
- argv = (**C.char) (unsafe.Pointer (uintptr (unsafe.Pointer (argv)) +
- unsafe.Sizeof (*argv)))
- }
+ C.freeStringArray ((*C.pChar) (argv))
}
func return_string_list (argv **C.char) []string {
--
2.31.1

View File

@ -1,38 +0,0 @@
From e68a844eb406f0b32cc2c4e60ca66bc1a7f94bdc Mon Sep 17 00:00:00 2001
From: Martin Kletzander <mkletzan@redhat.com>
Date: Mon, 31 May 2021 21:16:29 +0200
Subject: [PATCH] build: Don't use non-POSIX tests
The `test` builtin/binary usually accepts `==` for string comparison, it is
mostly accepted for typos and people being used to double equals, but is not
documented and not always accepted either. Since autoconf uses the default
shell, it might just fail in some cases with:
./configure: 29986: test: xrustc: unexpected operator
./configure: 29990: test: xcargo: unexpected operator
Just change it to single equals as it is done everywhere else.
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
---
m4/guestfs-rust.m4 | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/m4/guestfs-rust.m4 b/m4/guestfs-rust.m4
index aa12a9ef5..1dffd8118 100644
--- a/m4/guestfs-rust.m4
+++ b/m4/guestfs-rust.m4
@@ -24,8 +24,8 @@ AS_IF([test "x$enable_rust" != "xno"],[
AC_CHECK_PROG([RUSTC],[rustc],[rustc],[no])
AC_CHECK_PROG([CARGO],[cargo],[cargo],[no])
- AS_IF([test "x$RUSTC" == "xno"], [AC_MSG_WARN([rustc not found])])
- AS_IF([test "x$CARGO" == "xno"], [AC_MSG_WARN([cargo not found])])
+ AS_IF([test "x$RUSTC" = "xno"], [AC_MSG_WARN([rustc not found])])
+ AS_IF([test "x$CARGO" = "xno"], [AC_MSG_WARN([cargo not found])])
],[
RUSTC=no
CARGO=no
--
2.31.1

View File

@ -0,0 +1,39 @@
From 3f6f2fb8f6997e5e993d0e493470323476f33243 Mon Sep 17 00:00:00 2001
From: Laszlo Ersek <lersek@redhat.com>
Date: Fri, 1 Oct 2021 14:53:38 +0200
Subject: [PATCH] daemon/inspect_fs_unix: recognize modern Pardus GNU/Linux
releases
Recent Pardus releases seem to have abandoned the original
"/etc/pardus-release" file, which the current Pardus detection, from
commit 233530d3541d ("inspect: Add detection of Pardus.", 2010-10-29), is
based upon.
Instead, Pardus apparently adopted the "/etc/os-release" specification
<https://www.freedesktop.org/software/systemd/man/os-release.html>, with
"ID=pardus". Extend the "distro_of_os_release_id" function accordingly.
Keep the original method for recognizing earlier releases.
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1993842
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Message-Id: <20211001125338.8956-1-lersek@redhat.com>
Acked-by: Richard W.M. Jones <rjones@redhat.com>
---
daemon/inspect_fs_unix.ml | 1 +
1 file changed, 1 insertion(+)
diff --git a/daemon/inspect_fs_unix.ml b/daemon/inspect_fs_unix.ml
index 557f32833..652bacc0f 100644
--- a/daemon/inspect_fs_unix.ml
+++ b/daemon/inspect_fs_unix.ml
@@ -151,6 +151,7 @@ and distro_of_os_release_id = function
| "openmandriva" -> Some DISTRO_OPENMANDRIVA
| "opensuse" -> Some DISTRO_OPENSUSE
| s when String.is_prefix s "opensuse-" -> Some DISTRO_OPENSUSE
+ | "pardus" -> Some DISTRO_PARDUS
| "pld" -> Some DISTRO_PLD_LINUX
| "rhel" -> Some DISTRO_RHEL
| "sles" | "sled" -> Some DISTRO_SLES
--
2.31.1

View File

@ -1,86 +0,0 @@
From e84c63a2ca4bf2366af96eb1a1222cf494e228c9 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Tue, 27 Jul 2021 08:55:27 +0100
Subject: [PATCH] python: Don't leak fields when creating Python structs
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
When creating and returning a Python struct we were adding fields from
the C struct, but did not reduce the ref count on the temporary value
after it had been moved to the struct, resulting in a memory leak.
Reported-by: 朱丹 <zhudan24@huawei.com>
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1985912
---
generator/python.ml | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/generator/python.ml b/generator/python.ml
index b3d3a5579..1afd05dd6 100644
--- a/generator/python.ml
+++ b/generator/python.ml
@@ -173,44 +173,52 @@ and generate_python_structs () =
pr " if (value == NULL)\n";
pr " goto err;\n";
pr " PyDict_SetItemString (dict, \"%s\", value);\n" name;
+ pr " Py_DECREF (value);\n"
| name, FBuffer ->
pr " value = PyBytes_FromStringAndSize (%s->%s, %s->%s_len);\n"
typ name typ name;
pr " if (value == NULL)\n";
pr " goto err;\n";
pr " PyDict_SetItemString (dict, \"%s\", value);\n" name;
+ pr " Py_DECREF (value);\n"
| name, FUUID ->
pr " value = guestfs_int_py_fromstringsize (%s->%s, 32);\n"
typ name;
pr " if (value == NULL)\n";
pr " goto err;\n";
pr " PyDict_SetItemString (dict, \"%s\", value);\n" name;
+ pr " Py_DECREF (value);\n"
| name, (FBytes|FUInt64) ->
pr " value = PyLong_FromUnsignedLongLong (%s->%s);\n" typ name;
pr " if (value == NULL)\n";
pr " goto err;\n";
pr " PyDict_SetItemString (dict, \"%s\", value);\n" name;
+ pr " Py_DECREF (value);\n"
| name, FInt64 ->
pr " value = PyLong_FromLongLong (%s->%s);\n" typ name;
pr " if (value == NULL)\n";
pr " goto err;\n";
pr " PyDict_SetItemString (dict, \"%s\", value);\n" name;
+ pr " Py_DECREF (value);\n"
| name, FUInt32 ->
pr " value = PyLong_FromUnsignedLong (%s->%s);\n" typ name;
pr " if (value == NULL)\n";
pr " goto err;\n";
pr " PyDict_SetItemString (dict, \"%s\", value);\n" name;
+ pr " Py_DECREF (value);\n"
| name, FInt32 ->
pr " value = PyLong_FromLong (%s->%s);\n" typ name;
pr " if (value == NULL)\n";
pr " goto err;\n";
pr " PyDict_SetItemString (dict, \"%s\", value);\n" name;
+ pr " Py_DECREF (value);\n"
| name, FOptPercent ->
pr " if (%s->%s >= 0) {\n" typ name;
pr " value = PyFloat_FromDouble ((double) %s->%s);\n" typ name;
pr " if (value == NULL)\n";
pr " goto err;\n";
pr " PyDict_SetItemString (dict, \"%s\", value);\n" name;
+ pr " Py_DECREF (value);\n";
pr " }\n";
pr " else {\n";
pr " Py_INCREF (Py_None);\n";
@@ -222,6 +230,7 @@ and generate_python_structs () =
pr " if (value == NULL)\n";
pr " goto err;\n";
pr " PyDict_SetItemString (dict, \"%s\", value);\n" name;
+ pr " Py_DECREF (value);\n"
) cols;
pr " return dict;\n";
pr " err:\n";
--
2.31.1

View File

@ -1,34 +0,0 @@
From 90a076fe19ead3c517ba2b45edfcc7fffec9860d Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Fri, 6 Aug 2021 08:26:51 +0100
Subject: [PATCH] appliance: Add IBM850 iconv converter for syslinux
$ guestfish -N fs:vfat:2G syslinux /dev/sda1
libguestfs: error: syslinux: Error converting to codepage 850 Invalid argument
...
This happens because of the default codepage requested by syslinux
(code page 850) combined with the appliance missing the iconv
converter for this codepage.
Reported-by: Yongkui Guo
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1990720
---
appliance/packagelist.in | 1 +
1 file changed, 1 insertion(+)
diff --git a/appliance/packagelist.in b/appliance/packagelist.in
index cede0ac0b..b5f9d9dc7 100644
--- a/appliance/packagelist.in
+++ b/appliance/packagelist.in
@@ -28,6 +28,7 @@ ifelse(REDHAT,1,
dhclient
gfs-utils
gfs2-utils
+ glibc-gconv-extra dnl syslinux requires IBM850 iconv converter
grub
hfsplus-tools
iproute
--
2.31.1

View File

@ -0,0 +1,33 @@
From 63c9cd933af75ca759fa2f2bbdbb07a699df5b30 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Tue, 5 Oct 2021 20:51:19 +0100
Subject: [PATCH] m4/guestfs-ocaml.m4: Fix deprecated warning format
In OCaml 4.13:
Alert ocaml_deprecated_cli: Setting a warning with a sequence of lowercase or uppercase letters,
like 'CDEFLMPSUVYZX', is deprecated.
Use the equivalent signed form: +C+D+E+F+L+M+P+S+U+V+Y+Z+X+52-3.
(cherry picked from
guestfs-tools commit fa4f59e1d99c08d7e0bae2a7cb54f254a6506d67)
---
m4/guestfs-ocaml.m4 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/m4/guestfs-ocaml.m4 b/m4/guestfs-ocaml.m4
index 4b8a44dee..d7f9462ea 100644
--- a/m4/guestfs-ocaml.m4
+++ b/m4/guestfs-ocaml.m4
@@ -232,7 +232,7 @@ EOF
])
dnl Flags we want to pass to every OCaml compiler call.
-OCAML_WARN_ERROR="-warn-error CDEFLMPSUVYZX+52-3"
+OCAML_WARN_ERROR="-warn-error +C+D+E+F+L+M+P+S+U+V+Y+Z+X+52-3"
AC_SUBST([OCAML_WARN_ERROR])
OCAML_FLAGS="-g -annot $safe_string_option"
AC_SUBST([OCAML_FLAGS])
--
2.31.1

View File

@ -1,4 +1,4 @@
From 9dc4c156eef3ad0eb62aa50acbc4198fd1e335cc Mon Sep 17 00:00:00 2001
From ed8c7ae81786c9de45fa320fe699dbd715f52d87 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Fri, 21 Dec 2012 15:50:11 +0000
Subject: [PATCH] RHEL: Remove libguestfs live (RHBZ#798980).

View File

@ -1,82 +0,0 @@
From 8a4761c0fb720078757ecaafd26be18293253f2c Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Wed, 8 Sep 2021 16:06:22 +0100
Subject: [PATCH] lib: direct: Remove use of sga
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
sga (or "sgabios" or "Serial Graphics Adapter") is an option ROM for
seabios which directs output to the serial adapter. This is very
useful for debugging BIOS problems during boot.
RHEL wants to deprecate this feature (in fact, they just deprecated it
without telling us). However there is an equivalent feature in
seabios (seabios >= 1.11 / qemu >= 2.11.0) which can be enabled using
either -nographic or -machine graphics=off
This commit removes sga and enables -machine graphics=off in the
direct backend.
References (for RHEL 9 qemu change):
https://bugzilla.redhat.com/show_bug.cgi?id=2002325
https://bugzilla.redhat.com/show_bug.cgi?id=2000845
https://lists.nongnu.org/archive/html/qemu-devel/2021-09/msg02417.html
https://listman.redhat.com/archives/libvir-list/2021-September/msg00205.html
For the libvirt backend we will continue to use <bios useserial=yes>.
This currently breaks when sga is not available, but I talked to Dan
and the plan there is to adapt libvirt so the same XML will enable
-machine graphics=off. IOW libguestfs does not need to make any
change.
References (for libvirt change):
https://bugzilla.redhat.com/show_bug.cgi?id=2003092
https://listman.redhat.com/archives/libvir-list/2021-September/msg00193.html
Thanks: Gerd Hoffman, Daniel Berrangé
(cherry picked from commit e14ff937422115e23094ca4cce80ec9fb01c10b3)
---
lib/launch-direct.c | 19 +++++++------------
1 file changed, 7 insertions(+), 12 deletions(-)
diff --git a/lib/launch-direct.c b/lib/launch-direct.c
index 972e77e13..e5b9a5611 100644
--- a/lib/launch-direct.c
+++ b/lib/launch-direct.c
@@ -544,6 +544,13 @@ launch_direct (guestfs_h *g, void *datav, const char *arg)
append_list ("gic-version=host");
#endif
append_list_format ("accel=%s", accel_val);
+#if defined(__i386__) || defined(__x86_64__)
+ /* Tell seabios to send debug messages to the serial port.
+ * This used to be done by sgabios.
+ */
+ if (g->verbose)
+ append_list ("graphics=off");
+#endif
} end_list ();
cpu_model = guestfs_int_get_cpu_model (has_kvm && !force_tcg);
@@ -665,18 +672,6 @@ launch_direct (guestfs_h *g, void *datav, const char *arg)
} end_list ();
#endif
- if (g->verbose &&
- guestfs_int_qemu_supports_device (g, data->qemu_data,
- "Serial Graphics Adapter")) {
- /* Use sgabios instead of vgabios. This means we'll see BIOS
- * messages on the serial port, and also works around this bug
- * in qemu 1.1.0:
- * https://bugs.launchpad.net/qemu/+bug/1021649
- * QEmu has included sgabios upstream since just before 1.0.
- */
- arg ("-device", "sga");
- }
-
/* Set up virtio-serial for the communications channel. */
start_list ("-chardev") {
append_list ("socket");
--
2.31.1

View File

@ -1,4 +1,4 @@
From 421f0716461427ec1deddaea3e51ba6ba7ccf71c Mon Sep 17 00:00:00 2001
From dfd61ba102e4de9e7fb00106e0e73aa2cc4e11fd Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Thu, 18 Jul 2013 18:31:53 +0100
Subject: [PATCH] RHEL: Remove 9p APIs from RHEL (RHBZ#921710).
@ -204,7 +204,7 @@ index 743a96abd..000000000
- return 0;
-}
diff --git a/daemon/Makefile.am b/daemon/Makefile.am
index 6f13bd43c..cc4dbcd85 100644
index 7322bfa5d..872eaa8bc 100644
--- a/daemon/Makefile.am
+++ b/daemon/Makefile.am
@@ -84,7 +84,6 @@ guestfsd_SOURCES = \
@ -228,7 +228,7 @@ index 6a97d8b0e..896314e7e 100644
daemon/actions.h
daemon/augeas.c
diff --git a/generator/actions_core.ml b/generator/actions_core.ml
index bb602ee02..db8156c51 100644
index 5933282dc..c6ffa2f6a 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.

View File

@ -1,49 +0,0 @@
From 6be87872732ca8e298152a9eeebde151fe2bd4a2 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
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
(cherry picked from commit 45de287447bb18d59749fbfc1ec5072413090109)
---
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.31.1

View File

@ -1,4 +1,4 @@
From b7007f7b1524c8f5d001eda10ebf040b0ae4ca43 Mon Sep 17 00:00:00 2001
From 01e9dd07579f6852ab94b215c66d6d7bd0cb022d Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Mon, 29 Jul 2013 14:47:56 +0100
Subject: [PATCH] RHEL: Disable 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 db8156c51..b87071e3b 100644
index c6ffa2f6a..91dce1db5 100644
--- a/generator/actions_core.ml
+++ b/generator/actions_core.ml
@@ -297,29 +297,6 @@ F<filename> is interpreted as a local file or device.

View File

@ -1,4 +1,4 @@
From dbca97559bc6d44d91dafbf3b7435a0d909fb6fa Mon Sep 17 00:00:00 2001
From 85adb673dd4705faaac3194d131f2c40bb7a1c78 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Fri, 19 Sep 2014 13:38:20 +0100
Subject: [PATCH] RHEL: Remove User-Mode Linux (RHBZ#1144197).

View File

@ -1,4 +1,4 @@
From b7dd5ace0488cfa0b9caa3ea673edb13324d806e Mon Sep 17 00:00:00 2001
From 36b483bb8150a09c7fa6aecb25bf5524fe2e7b93 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Tue, 7 Jul 2015 09:28:03 -0400
Subject: [PATCH] RHEL: Reject use of libguestfs-winsupport features except for

View File

@ -1,4 +1,4 @@
From fa865ee05a6269c46b1cd2fe5311ac6663260e29 Mon Sep 17 00:00:00 2001
From 94995cf9710042557dd5ca86695be13b5ffa50d4 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Tue, 29 Jun 2021 15:29:11 +0100
Subject: [PATCH] RHEL: Create /etc/crypto-policies/back-ends/opensslcnf.config
@ -9,10 +9,10 @@ https://bugzilla.redhat.com/show_bug.cgi?id=1977214#c13
1 file changed, 8 insertions(+)
diff --git a/appliance/init b/appliance/init
index b1c4d09ea..be46f9648 100755
index 7076821d2..fe6497b4d 100755
--- a/appliance/init
+++ b/appliance/init
@@ -70,6 +70,14 @@ if ! test -e /etc/mtab; then
@@ -76,6 +76,14 @@ if ! test -e /etc/mtab; then
ln -s /proc/mounts /etc/mtab
fi
@ -24,9 +24,9 @@ index b1c4d09ea..be46f9648 100755
+ 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
# Static nodes must happen before udev is started.
# Set up kmod static-nodes (RHBZ#1011907).
--
2.31.1

View File

@ -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.6
Release: 14%{?dist}
Version: 1.46.0
Release: 1%{?dist}
License: LGPLv2+
# Build only for architectures that have a kernel
@ -95,20 +95,18 @@ Source8: copy-patches.sh
# https://github.com/libguestfs/libguestfs/commits/rhel-9.0.0
# Patches.
Patch0001: 0001-build-Don-t-use-non-POSIX-tests.patch
Patch0002: 0002-python-Don-t-leak-fields-when-creating-Python-struct.patch
Patch0003: 0003-appliance-Add-IBM850-iconv-converter-for-syslinux.patch
Patch0004: 0004-lib-direct-Remove-use-of-sga.patch
Patch0005: 0005-lib-Autodetect-backing-format-for-qemu-img-create-b.patch
Patch0001: 0001-Go-bindings-fix-C-array-of-strings-char-allocation.patch
Patch0002: 0002-daemon-inspect_fs_unix-recognize-modern-Pardus-GNU-L.patch
Patch0003: 0003-m4-guestfs-ocaml.m4-Fix-deprecated-warning-format.patch
# Downstream (RHEL-only) patches.
%if 0%{?rhel}
Patch0006: 0006-RHEL-Remove-libguestfs-live-RHBZ-798980.patch
Patch0007: 0007-RHEL-Remove-9p-APIs-from-RHEL-RHBZ-921710.patch
Patch0008: 0008-RHEL-Disable-unsupported-remote-drive-protocols-RHBZ.patch
Patch0009: 0009-RHEL-Remove-User-Mode-Linux-RHBZ-1144197.patch
Patch0010: 0010-RHEL-Reject-use-of-libguestfs-winsupport-features-ex.patch
Patch0011: 0011-RHEL-Create-etc-crypto-policies-back-ends-opensslcnf.patch
Patch0004: 0004-RHEL-Remove-libguestfs-live-RHBZ-798980.patch
Patch0005: 0005-RHEL-Remove-9p-APIs-from-RHEL-RHBZ-921710.patch
Patch0006: 0006-RHEL-Disable-unsupported-remote-drive-protocols-RHBZ.patch
Patch0007: 0007-RHEL-Remove-User-Mode-Linux-RHBZ-1144197.patch
Patch0008: 0008-RHEL-Reject-use-of-libguestfs-winsupport-features-ex.patch
Patch0009: 0009-RHEL-Create-etc-crypto-policies-back-ends-opensslcnf.patch
%endif
%if 0%{patches_touch_autotools}
@ -967,7 +965,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
@ -1148,6 +1146,10 @@ rm ocaml/html/.gitignore
%changelog
* Fri Oct 08 2021 Richard W.M. Jones <rjones@redhat.com> - 1:1.46.0-1
- Rebase to new stable branch version 1.46.0
resolves: rhbz#2011711
* Tue Sep 14 2021 Richard W.M. Jones <rjones@redhat.com> - 1:1.45.6-14
- Specify backing format for qemu 6.1
resolves: rhbz#1999419

View File

@ -1,2 +1,2 @@
SHA512 (libguestfs-1.45.6.tar.gz) = 018aec83d153aeabb7c0b255e6d5b40b03ff6d0de12dc1e0557fc35215db593aaa871c4bc1f44e785f74bf02a367aec0e90157f8ff159cccc820ebf1afd2258a
SHA512 (libguestfs-1.45.6.tar.gz.sig) = 8f0be35a265356e7bd823b3d9302449ac62d633de8a9bd40ca457bcb4e4d2aebc827c4867bfdb6f3e3a4f34ade168103f5af0a44b667c875be7721e275433dbe
SHA512 (libguestfs-1.46.0.tar.gz) = 9b1670dff924e046ab82ff1ce6e25428d95b88700b507d4f1dd68a309641e376d14520c7b5aa5bbb81a6ba5c708ebcc46b6fe0970d903a3ed79e76d4ccdca614
SHA512 (libguestfs-1.46.0.tar.gz.sig) = d4c8e4629377d42e8e9f1cc88ad7885999c9ae94a2ee2e683960b397b1a92411c289bddb65d4c3c350915bba16c949011639614b9ec54037bf43833e917b7858