import libguestfs-1.46.0-5.el9

This commit is contained in:
CentOS Sources 2021-12-07 13:26:14 -05:00 committed by Stepan Oksanichenko
parent fa5fabaa67
commit 30cb5425ea
19 changed files with 422 additions and 203 deletions

2
.gitignore vendored
View File

@ -1,2 +1,2 @@
SOURCES/libguestfs-1.45.6.tar.gz
SOURCES/libguestfs-1.46.0.tar.gz
SOURCES/libguestfs.keyring

View File

@ -1,2 +1,2 @@
1351e7078f21ac7233141e2146d0bc3e85d72c6f SOURCES/libguestfs-1.45.6.tar.gz
7f8f969a579861efc457bdacf3c39a4931de7ec2 SOURCES/libguestfs-1.46.0.tar.gz
1bbc40f501a7fef9eef2a39b701a71aee2fea7c4 SOURCES/libguestfs.keyring

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 69751394dccdf5ade209b42aa97b498b59f42010 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,4 +1,4 @@
From 3b7d5e86beb84d0a0fefe34d442dc3becdbf1fd5 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,4 +1,4 @@
From 3ee38c13db6bf6bcea375f66a38fb848d0251d83 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 a651907e06fb488ef91fdf8b624cf1d527cfb057 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 0315e1f00e229c990226203a3e04af1820f688c2 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 75d88b5fd89655b8c3ac2a385a5ac2f8dea560e5 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

@ -0,0 +1,100 @@
From ab80c515bfd527e1609d4e5ffd7c6b18d5a202dc Mon Sep 17 00:00:00 2001
From: Laszlo Ersek <lersek@redhat.com>
Date: Wed, 13 Oct 2021 18:30:23 +0200
Subject: [PATCH] daemon: inspection: Add support for Kylin (RHBZ#1995391).
Similar-to: cd08039d2427b584237265237c713d8cf46536a0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Message-Id: <20211013163023.21786-1-lersek@redhat.com>
Acked-by: Richard W.M. Jones <rjones@redhat.com>
(cherry picked from commit 305b02e7e74afc3777b2291783cd7634fb76ecaf)
---
daemon/inspect_fs.ml | 2 ++
daemon/inspect_fs_unix.ml | 1 +
daemon/inspect_types.ml | 2 ++
daemon/inspect_types.mli | 1 +
generator/actions_inspection.ml | 4 ++++
5 files changed, 10 insertions(+)
diff --git a/daemon/inspect_fs.ml b/daemon/inspect_fs.ml
index 02b5a0470..77f0f6aea 100644
--- a/daemon/inspect_fs.ml
+++ b/daemon/inspect_fs.ml
@@ -275,6 +275,7 @@ and check_package_format { distro } =
Some PACKAGE_FORMAT_RPM
| Some DISTRO_DEBIAN
| Some DISTRO_KALI_LINUX
+ | Some DISTRO_KYLIN (* supposedly another Ubuntu derivative *)
| Some DISTRO_LINUX_MINT
| Some DISTRO_UBUNTU ->
Some PACKAGE_FORMAT_DEB
@@ -345,6 +346,7 @@ and check_package_management { distro; version } =
| Some DISTRO_ALTLINUX
| Some DISTRO_DEBIAN
| Some DISTRO_KALI_LINUX
+ | Some DISTRO_KYLIN (* supposedly another Ubuntu derivative *)
| Some DISTRO_LINUX_MINT
| Some DISTRO_UBUNTU ->
Some PACKAGE_MANAGEMENT_APT
diff --git a/daemon/inspect_fs_unix.ml b/daemon/inspect_fs_unix.ml
index 652bacc0f..7f6eb92e9 100644
--- a/daemon/inspect_fs_unix.ml
+++ b/daemon/inspect_fs_unix.ml
@@ -146,6 +146,7 @@ and distro_of_os_release_id = function
| "frugalware" -> Some DISTRO_FRUGALWARE
| "gentoo" -> Some DISTRO_GENTOO
| "kali" -> Some DISTRO_KALI_LINUX
+ | "kylin" -> Some DISTRO_KYLIN
| "mageia" -> Some DISTRO_MAGEIA
| "neokylin" -> Some DISTRO_NEOKYLIN
| "openmandriva" -> Some DISTRO_OPENMANDRIVA
diff --git a/daemon/inspect_types.ml b/daemon/inspect_types.ml
index 18e410ce0..e2bc7165c 100644
--- a/daemon/inspect_types.ml
+++ b/daemon/inspect_types.ml
@@ -79,6 +79,7 @@ and distro =
| DISTRO_FRUGALWARE
| DISTRO_GENTOO
| DISTRO_KALI_LINUX
+ | DISTRO_KYLIN
| DISTRO_LINUX_MINT
| DISTRO_MAGEIA
| DISTRO_MANDRIVA
@@ -211,6 +212,7 @@ and string_of_distro = function
| DISTRO_FRUGALWARE -> "frugalware"
| DISTRO_GENTOO -> "gentoo"
| DISTRO_KALI_LINUX -> "kalilinux"
+ | DISTRO_KYLIN -> "kylin"
| DISTRO_LINUX_MINT -> "linuxmint"
| DISTRO_MAGEIA -> "mageia"
| DISTRO_MANDRIVA -> "mandriva"
diff --git a/daemon/inspect_types.mli b/daemon/inspect_types.mli
index d12f7a61a..43c79818f 100644
--- a/daemon/inspect_types.mli
+++ b/daemon/inspect_types.mli
@@ -86,6 +86,7 @@ and distro =
| DISTRO_FRUGALWARE
| DISTRO_GENTOO
| DISTRO_KALI_LINUX
+ | DISTRO_KYLIN
| DISTRO_LINUX_MINT
| DISTRO_MAGEIA
| DISTRO_MANDRIVA
diff --git a/generator/actions_inspection.ml b/generator/actions_inspection.ml
index 690afd460..0c6d39b43 100644
--- a/generator/actions_inspection.ml
+++ b/generator/actions_inspection.ml
@@ -214,6 +214,10 @@ Gentoo.
Kali Linux.
+=item \"kylin\"
+
+Kylin.
+
=item \"linuxmint\"
Linux Mint.
--
2.31.1

View File

@ -0,0 +1,31 @@
From 5c67c45b98e8471596d5fb08da76956581ab135d Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Mon, 22 Nov 2021 15:09:41 +0000
Subject: [PATCH] xfs: Document lazy-counters setting cannot be changed in XFS
version 5
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2024022
(cherry picked from commit e7f72ab146b9c2aaee92a600a1fcbefb0202d41c)
---
generator/actions_core.ml | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/generator/actions_core.ml b/generator/actions_core.ml
index 91dce1db5..155d739fe 100644
--- a/generator/actions_core.ml
+++ b/generator/actions_core.ml
@@ -7600,7 +7600,10 @@ can modify parameters.
Some of the parameters of a mounted filesystem can be examined
and modified using the C<guestfs_xfs_info> and
-C<guestfs_xfs_growfs> calls." };
+C<guestfs_xfs_growfs> calls.
+
+Beginning with XFS version 5, it is no longer possible to modify
+the lazy-counters setting (ie. C<lazycounter> parameter has no effect)." };
{ defaults with
name = "xfs_repair"; added = (1, 19, 36);
--
2.31.1

View File

@ -1,17 +0,0 @@
-----BEGIN PGP SIGNATURE-----
iQJFBAABCAAvFiEE93dPsa0HSn6Mh2fqkXOPc+G3aKAFAmCvzBkRHHJpY2hAYW5u
ZXhpYS5vcmcACgkQkXOPc+G3aKAHgxAApu8ZwOLMKF88hHOKTUvOYBilEq7FiDtW
9hVgm/aCIwNxTwgODfP7aZtkiyId5wjBrP8ADl3tN6sWkPqn2+B4XenOIEvXNfFV
7I6920YWjO7oVrgjdi9ErjRXpkJ+HuKq98xqu6xtbeRZ35fO9bNMRnntU4BaXfi/
lND+KfbSONJKl/MqLBK73A3ZDzRG3qvdl73270tx5l0IsEShpVEoqeXsR/vL+Y26
5h8sB/7RnqpSCBjUWIhaj1faGfVl4Dle7QEVD8giu38V1bxsaf5glELShMWSS5xc
lwvC7NJIvbzEkVV8d+bzW7uoRI7DQS+fxnJ8HcDzqUtLMoyGHDMQt4fU2iHQbvAd
QNAuuXuS1tYykL0QKrA9sXTB0rrbMi5jZH+NhANN+AmuXETXoap54NX1dCIKKzk3
HySm+AiG7+sYdWv607oM35VzkzJqzW08fABFgbevPQSoD+Qvn44428QlFHxXZ1ZQ
Mn/pkZ5P5H8IhymM3oJ8hq0UaCIyu/M4qgvEgBwytmY3OqkZanimOZGDZxNgEH+Y
4yq0Veo2oZO9AcGw3Ve9U/BjDzGLgIAKd2s/S9wPszBkKClQUSOmwlOyFNDEQLQk
tCfekW91aSBsGDoBu+0FUKrw1slGPmUJl5QLaEyAEsA+ky7Ut8bfwNhbdedz0JbH
Q7jbq65QmWg=
=iC06
-----END PGP SIGNATURE-----

View File

@ -0,0 +1,17 @@
-----BEGIN PGP SIGNATURE-----
iQJFBAABCAAvFiEE93dPsa0HSn6Mh2fqkXOPc+G3aKAFAmFMh4QRHHJpY2hAYW5u
ZXhpYS5vcmcACgkQkXOPc+G3aKBDBBAAuXwIyIs2XfkDX9W/MvNrX37pVRJugEdi
HHpw+4dn9rNSzGYBEAXJ7qTAXt6ZvNG0x/YcPrbWIuoLGtEa5AVs8tPsObMpdeKw
lYxk4GZhKwWN20RfJalolKmkes1LAfnu5+YTOUj+hPxk++u9IBs5CDTVemwP+XaN
eWyCukH9KOl/DxgsRNvjurvuGD0hAjCfKEcfVU5tMDa4e0NtCJc3G9QMBQn5gEZ/
plk1D8CBa+93ZNXapKji+8cqgcnhkl8y9tujaLIdaNHQ2Y0ptLGQWNIozWrE5iF0
9upC1kT3hJjx9+uF4dUv7kzU8By1x4AHUh9iQsVnfk6Kb+tpQDRrhF0o/dZJ0tib
Q8ADToiGEaXecMun1vsXRHOdaMSn/Nqrvkn8DRJTxqLFlE3oZLOigxxPdWwmdCtX
pe4ONpx9LrTtmROfDAKv8awNFLRXzbmUDOhY7tn/JTMKugdeOJkKBy5VvLrkM40Z
HtHsntt/B/J1FoK5TLDxcNrQo5u7MfPmnhn09AVf9OaItrh1wRCjFYCtcOt/Pxqw
xGyqsGJ32Es5r1QnY/hIjl/kkxkG6rfqRYBoU/QThmgvYxn+lM58SUOunM9aC+Ub
3taY77ge+M7ylNCx7+gJnwIF9ZltvJJ3zZ+LJ1PzcfL2ns6d/Om8/icrESS2fvFD
3w/keerUf9U=
=NsMY
-----END PGP SIGNATURE-----

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: 12%{?dist}
Version: 1.46.0
Release: 5%{?dist}
License: LGPLv2+
# Build only for architectures that have a kernel
@ -95,19 +95,17 @@ 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
# Downstream (RHEL-only) patches.
%if 0%{?rhel}
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
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
Patch0010: 0010-daemon-inspection-Add-support-for-Kylin-RHBZ-1995391.patch
Patch0011: 0011-xfs-Document-lazy-counters-setting-cannot-be-changed.patch
%if 0%{patches_touch_autotools}
BuildRequires: autoconf, automake, libtool, gettext-devel
@ -357,7 +355,7 @@ Suggests: qemu-block-ssh
Recommends: libvirt-daemon-config-network
Requires: libvirt-daemon-driver-qemu >= 7.1.0
Requires: libvirt-daemon-driver-secret
Recommends: libvirt-daemon-driver-storage-core
Requires: libvirt-daemon-driver-storage-core
Requires: selinux-policy >= 3.11.1-63
%ifarch aarch64
@ -780,6 +778,7 @@ fi
%endif
PYTHON=%{__python3} \
--with-default-backend=libvirt \
--enable-appliance-format-auto \
%if !0%{?rhel}
--with-extra="fedora=%{fedora},release=%{release},libvirt" \
%else
@ -965,7 +964,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
@ -1146,6 +1145,28 @@ rm ocaml/html/.gitignore
%changelog
* Tue Nov 23 2021 Richard W.M. Jones <rjones@redhat.com> - 1:1.46.0-5
- Add --enable-appliance-format-auto
- Add support for Kylin
- Document lazy-counters setting cannot be changed in XFS version 5
resolves: rhbz#2025944, rhbz#1995391, rhbz#2024022
* Fri Oct 29 2021 Richard W.M. Jones <rjones@redhat.com> - 1:1.46.0-4
- Require libvirt-daemon-driver-storage-core
resolves: rhbz#2018358
* 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
* Mon Sep 13 2021 Richard W.M. Jones <rjones@redhat.com> - 1:1.45.6-13
- Remove use of sga
resolves: rhbz#2002325
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 1:1.45.6-12
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688