diff --git a/.gitignore b/.gitignore index 3b1d468..cd08666 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ -SOURCES/libguestfs-1.45.6.tar.gz +SOURCES/libguestfs-1.46.0.tar.gz SOURCES/libguestfs.keyring diff --git a/.libguestfs.metadata b/.libguestfs.metadata index a73cafa..79c82fe 100644 --- a/.libguestfs.metadata +++ b/.libguestfs.metadata @@ -1,2 +1,2 @@ -1351e7078f21ac7233141e2146d0bc3e85d72c6f SOURCES/libguestfs-1.45.6.tar.gz +7f8f969a579861efc457bdacf3c39a4931de7ec2 SOURCES/libguestfs-1.46.0.tar.gz 1bbc40f501a7fef9eef2a39b701a71aee2fea7c4 SOURCES/libguestfs.keyring diff --git a/SOURCES/0001-Go-bindings-fix-C-array-of-strings-char-allocation.patch b/SOURCES/0001-Go-bindings-fix-C-array-of-strings-char-allocation.patch new file mode 100644 index 0000000..f70a54e --- /dev/null +++ b/SOURCES/0001-Go-bindings-fix-C-array-of-strings-char-allocation.patch @@ -0,0 +1,153 @@ +From e2f8db27d0af5217eb5d0487e0713309559d4489 Mon Sep 17 00:00:00 2001 +From: Laszlo Ersek +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é" +Cc: "Richard W.M. Jones" +Signed-off-by: Laszlo Ersek +Message-Id: <20210921192939.32468-1-lersek@redhat.com> +Tested-by: "Richard W.M. Jones" +Acked-by: "Richard W.M. Jones" +--- + 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: ++// . ++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 + diff --git a/SOURCES/0001-build-Don-t-use-non-POSIX-tests.patch b/SOURCES/0001-build-Don-t-use-non-POSIX-tests.patch deleted file mode 100644 index 055f21c..0000000 --- a/SOURCES/0001-build-Don-t-use-non-POSIX-tests.patch +++ /dev/null @@ -1,38 +0,0 @@ -From e68a844eb406f0b32cc2c4e60ca66bc1a7f94bdc Mon Sep 17 00:00:00 2001 -From: Martin Kletzander -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 ---- - 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 - diff --git a/SOURCES/0002-daemon-inspect_fs_unix-recognize-modern-Pardus-GNU-L.patch b/SOURCES/0002-daemon-inspect_fs_unix-recognize-modern-Pardus-GNU-L.patch new file mode 100644 index 0000000..34d2d81 --- /dev/null +++ b/SOURCES/0002-daemon-inspect_fs_unix-recognize-modern-Pardus-GNU-L.patch @@ -0,0 +1,39 @@ +From 3f6f2fb8f6997e5e993d0e493470323476f33243 Mon Sep 17 00:00:00 2001 +From: Laszlo Ersek +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 +, 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 +Message-Id: <20211001125338.8956-1-lersek@redhat.com> +Acked-by: Richard W.M. Jones +--- + 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 + diff --git a/SOURCES/0002-python-Don-t-leak-fields-when-creating-Python-struct.patch b/SOURCES/0002-python-Don-t-leak-fields-when-creating-Python-struct.patch deleted file mode 100644 index 09c9f43..0000000 --- a/SOURCES/0002-python-Don-t-leak-fields-when-creating-Python-struct.patch +++ /dev/null @@ -1,86 +0,0 @@ -From e84c63a2ca4bf2366af96eb1a1222cf494e228c9 Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -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: 朱丹 -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 - diff --git a/SOURCES/0003-appliance-Add-IBM850-iconv-converter-for-syslinux.patch b/SOURCES/0003-appliance-Add-IBM850-iconv-converter-for-syslinux.patch deleted file mode 100644 index bb2f9d2..0000000 --- a/SOURCES/0003-appliance-Add-IBM850-iconv-converter-for-syslinux.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 90a076fe19ead3c517ba2b45edfcc7fffec9860d Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -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 - diff --git a/SOURCES/0003-m4-guestfs-ocaml.m4-Fix-deprecated-warning-format.patch b/SOURCES/0003-m4-guestfs-ocaml.m4-Fix-deprecated-warning-format.patch new file mode 100644 index 0000000..d8631a7 --- /dev/null +++ b/SOURCES/0003-m4-guestfs-ocaml.m4-Fix-deprecated-warning-format.patch @@ -0,0 +1,33 @@ +From 63c9cd933af75ca759fa2f2bbdbb07a699df5b30 Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +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 + diff --git a/SOURCES/0004-RHEL-Remove-libguestfs-live-RHBZ-798980.patch b/SOURCES/0004-RHEL-Remove-libguestfs-live-RHBZ-798980.patch index e46f5dc..ec41d00 100644 --- a/SOURCES/0004-RHEL-Remove-libguestfs-live-RHBZ-798980.patch +++ b/SOURCES/0004-RHEL-Remove-libguestfs-live-RHBZ-798980.patch @@ -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" Date: Fri, 21 Dec 2012 15:50:11 +0000 Subject: [PATCH] RHEL: Remove libguestfs live (RHBZ#798980). diff --git a/SOURCES/0005-RHEL-Remove-9p-APIs-from-RHEL-RHBZ-921710.patch b/SOURCES/0005-RHEL-Remove-9p-APIs-from-RHEL-RHBZ-921710.patch index feebb1f..1bdb11f 100644 --- a/SOURCES/0005-RHEL-Remove-9p-APIs-from-RHEL-RHBZ-921710.patch +++ b/SOURCES/0005-RHEL-Remove-9p-APIs-from-RHEL-RHBZ-921710.patch @@ -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" 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. diff --git a/SOURCES/0006-RHEL-Disable-unsupported-remote-drive-protocols-RHBZ.patch b/SOURCES/0006-RHEL-Disable-unsupported-remote-drive-protocols-RHBZ.patch index 27ff625..c245ac1 100644 --- a/SOURCES/0006-RHEL-Disable-unsupported-remote-drive-protocols-RHBZ.patch +++ b/SOURCES/0006-RHEL-Disable-unsupported-remote-drive-protocols-RHBZ.patch @@ -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" 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 is interpreted as a local file or device. diff --git a/SOURCES/0007-RHEL-Remove-User-Mode-Linux-RHBZ-1144197.patch b/SOURCES/0007-RHEL-Remove-User-Mode-Linux-RHBZ-1144197.patch index 63ba111..998760d 100644 --- a/SOURCES/0007-RHEL-Remove-User-Mode-Linux-RHBZ-1144197.patch +++ b/SOURCES/0007-RHEL-Remove-User-Mode-Linux-RHBZ-1144197.patch @@ -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" Date: Fri, 19 Sep 2014 13:38:20 +0100 Subject: [PATCH] RHEL: Remove User-Mode Linux (RHBZ#1144197). diff --git a/SOURCES/0008-RHEL-Reject-use-of-libguestfs-winsupport-features-ex.patch b/SOURCES/0008-RHEL-Reject-use-of-libguestfs-winsupport-features-ex.patch index 608fe4a..95b89f7 100644 --- a/SOURCES/0008-RHEL-Reject-use-of-libguestfs-winsupport-features-ex.patch +++ b/SOURCES/0008-RHEL-Reject-use-of-libguestfs-winsupport-features-ex.patch @@ -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" Date: Tue, 7 Jul 2015 09:28:03 -0400 Subject: [PATCH] RHEL: Reject use of libguestfs-winsupport features except for diff --git a/SOURCES/0009-RHEL-Create-etc-crypto-policies-back-ends-opensslcnf.patch b/SOURCES/0009-RHEL-Create-etc-crypto-policies-back-ends-opensslcnf.patch index 029fdf3..67403cc 100644 --- a/SOURCES/0009-RHEL-Create-etc-crypto-policies-back-ends-opensslcnf.patch +++ b/SOURCES/0009-RHEL-Create-etc-crypto-policies-back-ends-opensslcnf.patch @@ -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" 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 diff --git a/SOURCES/0010-daemon-inspection-Add-support-for-Kylin-RHBZ-1995391.patch b/SOURCES/0010-daemon-inspection-Add-support-for-Kylin-RHBZ-1995391.patch new file mode 100644 index 0000000..836726a --- /dev/null +++ b/SOURCES/0010-daemon-inspection-Add-support-for-Kylin-RHBZ-1995391.patch @@ -0,0 +1,100 @@ +From ab80c515bfd527e1609d4e5ffd7c6b18d5a202dc Mon Sep 17 00:00:00 2001 +From: Laszlo Ersek +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 +Message-Id: <20211013163023.21786-1-lersek@redhat.com> +Acked-by: Richard W.M. Jones +(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 + diff --git a/SOURCES/0011-xfs-Document-lazy-counters-setting-cannot-be-changed.patch b/SOURCES/0011-xfs-Document-lazy-counters-setting-cannot-be-changed.patch new file mode 100644 index 0000000..48a1b0d --- /dev/null +++ b/SOURCES/0011-xfs-Document-lazy-counters-setting-cannot-be-changed.patch @@ -0,0 +1,31 @@ +From 5c67c45b98e8471596d5fb08da76956581ab135d Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +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 and +-C calls." }; ++C calls. ++ ++Beginning with XFS version 5, it is no longer possible to modify ++the lazy-counters setting (ie. C parameter has no effect)." }; + + { defaults with + name = "xfs_repair"; added = (1, 19, 36); +-- +2.31.1 + diff --git a/SOURCES/libguestfs-1.45.6.tar.gz.sig b/SOURCES/libguestfs-1.45.6.tar.gz.sig deleted file mode 100644 index 21d01a0..0000000 --- a/SOURCES/libguestfs-1.45.6.tar.gz.sig +++ /dev/null @@ -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----- diff --git a/SOURCES/libguestfs-1.46.0.tar.gz.sig b/SOURCES/libguestfs-1.46.0.tar.gz.sig new file mode 100644 index 0000000..25134a9 --- /dev/null +++ b/SOURCES/libguestfs-1.46.0.tar.gz.sig @@ -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----- diff --git a/SPECS/libguestfs.spec b/SPECS/libguestfs.spec index 13dcb1d..9e2d52f 100644 --- a/SPECS/libguestfs.spec +++ b/SPECS/libguestfs.spec @@ -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 - 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 - 1:1.46.0-4 +- Require libvirt-daemon-driver-storage-core + resolves: rhbz#2018358 + +* Fri Oct 08 2021 Richard W.M. Jones - 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 - 1:1.45.6-14 +- Specify backing format for qemu 6.1 + resolves: rhbz#1999419 + +* Mon Sep 13 2021 Richard W.M. Jones - 1:1.45.6-13 +- Remove use of sga + resolves: rhbz#2002325 + * Mon Aug 09 2021 Mohan Boddu - 1:1.45.6-12 - Rebuilt for IMA sigs, glibc 2.34, aarch64 flags Related: rhbz#1991688