diff --git a/0001-libguestfs-PYTHON_LIBS-is-not-set-in-Python-3.8.patch b/0001-libguestfs-PYTHON_LIBS-is-not-set-in-Python-3.8.patch deleted file mode 100644 index 97f6646288a473a0869e42e0f0bf220b39ffd79a..0000000000000000000000000000000000000000 --- a/0001-libguestfs-PYTHON_LIBS-is-not-set-in-Python-3.8.patch +++ /dev/null @@ -1,65 +0,0 @@ -From 5791e6ec31d267fd109e644efc76d465e019379c Mon Sep 17 00:00:00 2001 -From: chengzihan2 -Date: Sat, 20 Jun 2020 21:51:22 +0800 -Subject: [PATCH] libguestfs: PYTHON_LIBS is not set in Python 3.8 - -Follow those steps: - - obs build - -and then obs build faild: -error: File not found: -/usr/lib64/python3.8/site-packages/libguestfsmod*.so -/usr/lib64/python3.8/site-packages/guestfs.py -/usr/lib64/python3.8/site-packages/__pycache__/guestfs*.py - -Python 3.8 no longer links C extensions to -lpython, instead relying -on the fact that the python binary itself already contains those -symbols. This means $PYTHON_LIBS is empty and so the Python bindings -are not built. - -Use a different test to see if the python module is avaiblable. - -Signed-off-by: chengzihan2 ---- - m4/guestfs-python.m4 | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -diff --git a/m4/guestfs-python.m4 b/m4/guestfs-python.m4 -index 7d4c991..befa9b1 100644 ---- a/m4/guestfs-python.m4 -+++ b/m4/guestfs-python.m4 -@@ -33,14 +33,17 @@ AS_IF([test "x$enable_python" != "xno"],[ - PYTHON_VERSION_MINOR=`$PYTHON -c "import sys; print (sys.version_info@<:@1@:>@)"` - PYTHON_VERSION="$PYTHON_VERSION_MAJOR.$PYTHON_VERSION_MINOR" - AC_MSG_RESULT([$PYTHON_VERSION]) -+ - # Debian: python-2.7.pc, python-3.2.pc - PKG_CHECK_MODULES([PYTHON], [python-"$PYTHON_VERSION"],[ -+ have_python_module=1 - AC_SUBST([PYTHON_CFLAGS]) - AC_SUBST([PYTHON_LIBS]) - AC_SUBST([PYTHON_VERSION]) - AC_DEFINE([HAVE_PYTHON],[1],[Python library found at compile time]) - ],[ - PKG_CHECK_MODULES([PYTHON], [python],[ -+ have_python_module=1 - AC_SUBST([PYTHON_CFLAGS]) - AC_SUBST([PYTHON_LIBS]) - AC_SUBST([PYTHON_VERSION]) -@@ -49,6 +52,7 @@ AS_IF([test "x$enable_python" != "xno"],[ - AC_MSG_WARN([python $PYTHON_VERSION not found]) - ]) - ]) -+ - AC_MSG_CHECKING([Python prefix]) - PYTHON_PREFIX=`$PYTHON -c "import sys; print (sys.prefix)"` - AC_MSG_RESULT([$PYTHON_PREFIX]) -@@ -101,4 +105,4 @@ AS_IF([test "x$enable_python" != "xno"],[ - AC_SUBST(PYTHON_EXT_SUFFIX) - ]) - AM_CONDITIONAL([HAVE_PYTHON], -- [test "x$PYTHON" != "xno" && test "x$PYTHON_LIBS" != "x" ]) -+ [test "x$PYTHON" != "xno" && test "x$have_python_module" = "x1" ]) --- -2.23.0 - diff --git a/0001-tests-Use-explicit-backing-format-for-all-backing-di.patch b/0001-tests-Use-explicit-backing-format-for-all-backing-di.patch deleted file mode 100644 index e9c45656b758df788578d7b976ed85ed442dd006..0000000000000000000000000000000000000000 --- a/0001-tests-Use-explicit-backing-format-for-all-backing-di.patch +++ /dev/null @@ -1,145 +0,0 @@ -From 815eab8a66ba6ae5bea7445abb0fa8b54e01e158 Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Thu, 6 Feb 2020 15:47:54 +0000 -Subject: [PATCH] tests: Use explicit backing format for all backing disks. - -Libvirt 6.0 now requires that every disk in the backing chain has an -explicit backing format. For example this will be rejected by -libvirt: - - qemu-img create -f qcow2 -b backing-disk disk.qcow2 - -with the error: - - Original error from libvirt: Requested operation is not valid: - format of backing image 'backing-disk' of image 'disk.qcow2' was not - specified in the image metadata (See - https://libvirt.org/kbase/backing_chains.html for troubleshooting) - [code=55 int1=-1] - -Instead you have to use the -F option to specify the format, eg: - - qemu-img create -f qcow2 -b backing-disk -F raw disk.qcow2 ---- - customize/test-virt-customize.sh | 2 +- - test-data/blank-disks/Makefile.am | 2 +- - tests/relative-paths/test-relative-paths.sh | 30 ++++++++++----------- - 3 files changed, 17 insertions(+), 17 deletions(-) - -diff --git a/customize/test-virt-customize.sh b/customize/test-virt-customize.sh -index 0c5231b4e..7817e67d4 100755 ---- a/customize/test-virt-customize.sh -+++ b/customize/test-virt-customize.sh -@@ -27,7 +27,7 @@ f=$top_builddir/test-data/phony-guests/fedora.img - fq=test-virt-customize-img.qcow - out=test-virt-customize.out - rm -f $fq $out --qemu-img create -f qcow2 -b $f $fq -+qemu-img create -f qcow2 -b $f -F raw $fq - - # Add --no-network so UML works. - $VG virt-customize --format qcow2 -a $fq --no-network \ -diff --git a/test-data/blank-disks/Makefile.am b/test-data/blank-disks/Makefile.am -index da5692da3..6dd42bc1f 100644 ---- a/test-data/blank-disks/Makefile.am -+++ b/test-data/blank-disks/Makefile.am -@@ -50,4 +50,4 @@ blank-disk-1M.qcow2: - qemu-img create -f qcow2 -o preallocation=metadata $@ 1M - - blank-disk-with-backing.qcow2: blank-disk-1M.raw -- qemu-img create -f qcow2 -b $^ $@ -+ qemu-img create -f qcow2 -b $^ -F raw $@ -diff --git a/tests/relative-paths/test-relative-paths.sh b/tests/relative-paths/test-relative-paths.sh -index 379225903..ed9aa80d8 100755 ---- a/tests/relative-paths/test-relative-paths.sh -+++ b/tests/relative-paths/test-relative-paths.sh -@@ -36,63 +36,63 @@ mkdir -p dir1/dir2 - # Regular overlay files. - - qemu-img create -f qcow2 backing1 10M --qemu-img create -f qcow2 -b $(pwd)/backing1 overlay1 -+qemu-img create -f qcow2 -b $(pwd)/backing1 -F qcow2 overlay1 - - qemu-img create -f qcow2 backing2 10M --qemu-img create -f qcow2 -b backing2 overlay2 -+qemu-img create -f qcow2 -b backing2 -F qcow2 overlay2 - - qemu-img create -f qcow2 backing3 10M --qemu-img create -f qcow2 -b ./backing3 overlay3 -+qemu-img create -f qcow2 -b ./backing3 -F qcow2 overlay3 - - qemu-img create -f qcow2 backing4 10M --qemu-img create -f qcow2 -b ../../tests/relative-paths/backing4 overlay4 -+qemu-img create -f qcow2 -b ../../tests/relative-paths/backing4 -F qcow2 overlay4 - - qemu-img create -f qcow2 backing5 10M - pushd dir1 --qemu-img create -f qcow2 -b ../backing5 overlay5 -+qemu-img create -f qcow2 -b ../backing5 -F qcow2 overlay5 - popd - - qemu-img create -f qcow2 backing6 10M - pushd dir1/dir2 --qemu-img create -f qcow2 -b ../../backing6 overlay6 -+qemu-img create -f qcow2 -b ../../backing6 -F qcow2 overlay6 - popd - - qemu-img create -f qcow2 dir1/backing7 10M --qemu-img create -f qcow2 -b dir1/backing7 overlay7 -+qemu-img create -f qcow2 -b dir1/backing7 -F qcow2 overlay7 - - qemu-img create -f qcow2 dir1/dir2/backing8 10M --qemu-img create -f qcow2 -b dir1/dir2/backing8 overlay8 -+qemu-img create -f qcow2 -b dir1/dir2/backing8 -F qcow2 overlay8 - - qemu-img create -f qcow2 dir1/dir2/backing9 10M - pushd dir1 --qemu-img create -f qcow2 -b dir2/backing9 overlay9 -+qemu-img create -f qcow2 -b dir2/backing9 -F qcow2 overlay9 - popd - - qemu-img create -f qcow2 dir1/backing10 10M - pushd dir1/dir2 --qemu-img create -f qcow2 -b ../backing10 overlay10 -+qemu-img create -f qcow2 -b ../backing10 -F qcow2 overlay10 - popd - - qemu-img create -f qcow2 dir1/backing11 10M - pushd dir1 --qemu-img create -f qcow2 -b backing11 overlay11 -+qemu-img create -f qcow2 -b backing11 -F qcow2 overlay11 - popd - - # Symbolic links. - - qemu-img create -f qcow2 backing12 10M --qemu-img create -f qcow2 -b backing12 overlay12 -+qemu-img create -f qcow2 -b backing12 -F qcow2 overlay12 - ln -s overlay12 link12 - - qemu-img create -f qcow2 dir1/backing13 10M - pushd dir1 --qemu-img create -f qcow2 -b backing13 overlay13 -+qemu-img create -f qcow2 -b backing13 -F qcow2 overlay13 - popd - ln -s dir1/overlay13 link13 - - qemu-img create -f qcow2 dir1/dir2/backing14 10M - pushd dir1 --qemu-img create -f qcow2 -b dir2/backing14 overlay14 -+qemu-img create -f qcow2 -b dir2/backing14 -F qcow2 overlay14 - popd - pushd dir1/dir2 - ln -s ../overlay14 link14 -@@ -100,7 +100,7 @@ popd - - qemu-img create -f qcow2 dir1/backing15 10M - pushd dir1/dir2 --qemu-img create -f qcow2 -b ../backing15 overlay15 -+qemu-img create -f qcow2 -b ../backing15 -F qcow2 overlay15 - popd - pushd dir1 - ln -s dir2/overlay15 link15 --- -2.27.0 - diff --git a/0002-fts-remove-NOSTAT_LEAF_OPTIMIZATION.patch b/0002-fts-remove-NOSTAT_LEAF_OPTIMIZATION.patch deleted file mode 100644 index 9467fdf6b3252f76ab3f5e3b9f745dbdbf767344..0000000000000000000000000000000000000000 --- a/0002-fts-remove-NOSTAT_LEAF_OPTIMIZATION.patch +++ /dev/null @@ -1,162 +0,0 @@ -From 47bf2cf3184027c1eb9c1dfeea5c5b8b2d69710d Mon Sep 17 00:00:00 2001 -From: Paul Eggert -Date: Wed, 15 Apr 2020 20:50:32 -0700 -Subject: [PATCH] fts: remove NOSTAT_LEAF_OPTIMIZATION -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -It caused ‘find’and ‘du’to dump core, and it was useful -only for obsolescent Linux filesystems anyway. Problem reported in: -https://lists.gnu.org/r/bug-gnulib/2020-04/msg00068.html -Quite possibly there is still a serious underlying fts bug with -tight-loop-check and mutating file systems, but if so this patch -should cause the bug to be triggered less often. -* lib/fts.c (enum leaf_optimization): Remove -NOSTAT_LEAF_OPTIMIZATION, as it’s problematic. -(S_MAGIC_REISERFS, S_MAGIC_XFS): Remove; no longer needed. -(leaf_optimization): Remove special cases for ReiserFS and XFS. -(fts_read): Remove NOSTAT_LEAF_OPTIMIZATION code. -* lib/fts_.h (struct _ftsent.fts_n_dirs_remaining): -Remove. All uses removed. - ---- - gnulib/lib/fts.c | 56 ++++++++------------------------------------------------ - gnulib/lib/fts_.h | 5 ----- - 2 files changed, 8 insertions(+), 53 deletions(-) - -diff --git a/gnulib/lib/fts.c b/gnulib/lib/fts.c -index 5e8e895..57d8cb3 100644 ---- a/gnulib/lib/fts.c -+++ b/gnulib/lib/fts.c -@@ -445,7 +445,6 @@ fts_open (char * const *argv, - if ((parent = fts_alloc(sp, "", 0)) == NULL) - goto mem2; - parent->fts_level = FTS_ROOTPARENTLEVEL; -- parent->fts_n_dirs_remaining = -1; - } - - /* The classic fts implementation would call fts_stat with -@@ -634,9 +633,8 @@ fts_close (FTS *sp) - } - - /* Minimum link count of a traditional Unix directory. When leaf -- optimization is OK and MIN_DIR_NLINK <= st_nlink, then st_nlink is -- an upper bound on the number of subdirectories (counting "." and -- ".."). */ -+ optimization is OK and a directory's st_nlink == MIN_DIR_NLINK, -+ then the directory has no subdirectories. */ - enum { MIN_DIR_NLINK = 2 }; - - /* Whether leaf optimization is OK for a directory. */ -@@ -645,12 +643,8 @@ enum leaf_optimization - /* st_nlink is not reliable for this directory's subdirectories. */ - NO_LEAF_OPTIMIZATION, - -- /* Leaf optimization is OK, but is not useful for avoiding stat calls. */ -- OK_LEAF_OPTIMIZATION, -- -- /* Leaf optimization is not only OK: it is useful for avoiding -- stat calls, because dirent.d_type does not work. */ -- NOSTAT_LEAF_OPTIMIZATION -+ /* st_nlink == 2 means the directory lacks subdirectories */ -+ OK_LEAF_OPTIMIZATION - }; - - #if defined __linux__ \ -@@ -663,9 +657,7 @@ enum leaf_optimization - # define S_MAGIC_CIFS 0xFF534D42 - # define S_MAGIC_NFS 0x6969 - # define S_MAGIC_PROC 0x9FA0 --# define S_MAGIC_REISERFS 0x52654973 - # define S_MAGIC_TMPFS 0x1021994 --# define S_MAGIC_XFS 0x58465342 - - # ifdef HAVE___FSWORD_T - typedef __fsword_t fsword; -@@ -782,23 +774,15 @@ dirent_inode_sort_may_be_useful (FTSENT const *p, int dir_fd) - } - - /* Given an FTS entry P for a directory with descriptor DIR_FD, -- return true if it is both useful and valid to apply leaf optimization. -- The optimization is useful only for file systems that lack usable -- dirent.d_type info. The optimization is valid if an st_nlink value -- of at least MIN_DIR_NLINK is an upper bound on the number of -- subdirectories of D, counting "." and ".." as subdirectories. -+ return whether it is valid to apply leaf optimization. -+ The optimization is valid if a directory's st_nlink value equal -+ to MIN_DIR_NLINK means the directory has no subdirectories. - DIR_FD is negative if unavailable. */ - static enum leaf_optimization - leaf_optimization (FTSENT const *p, int dir_fd) - { - switch (filesystem_type (p, dir_fd)) - { -- /* List here the file system types that may lack usable dirent.d_type -- info, yet for which the optimization does apply. */ -- case S_MAGIC_REISERFS: -- case S_MAGIC_XFS: /* XFS lacked it until 2013-08-22 commit. */ -- return NOSTAT_LEAF_OPTIMIZATION; -- - case 0: - /* Leaf optimization is unsafe if the file system type is unknown. */ - FALLTHROUGH; -@@ -1023,26 +1007,7 @@ check_for_dir: - if (p->fts_info == FTS_NSOK) - { - if (p->fts_statp->st_size == FTS_STAT_REQUIRED) -- { -- FTSENT *parent = p->fts_parent; -- if (parent->fts_n_dirs_remaining == 0 -- && ISSET(FTS_NOSTAT) -- && ISSET(FTS_PHYSICAL) -- && (leaf_optimization (parent, sp->fts_cwd_fd) -- == NOSTAT_LEAF_OPTIMIZATION)) -- { -- /* nothing more needed */ -- } -- else -- { -- p->fts_info = fts_stat(sp, p, false); -- if (S_ISDIR(p->fts_statp->st_mode) -- && p->fts_level != FTS_ROOTLEVEL -- && 0 < parent->fts_n_dirs_remaining -- && parent->fts_n_dirs_remaining != (nlink_t) -1) -- parent->fts_n_dirs_remaining--; -- } -- } -+ p->fts_info = fts_stat(sp, p, false); - else - fts_assert (p->fts_statp->st_size == FTS_NO_STAT_REQUIRED); - } -@@ -1826,11 +1791,6 @@ err: memset(sbp, 0, sizeof(struct stat)); - } - - if (S_ISDIR(sbp->st_mode)) { -- p->fts_n_dirs_remaining -- = ((sbp->st_nlink < MIN_DIR_NLINK -- || p->fts_level <= FTS_ROOTLEVEL) -- ? -1 -- : sbp->st_nlink - (ISSET (FTS_SEEDOT) ? 0 : MIN_DIR_NLINK)); - if (ISDOT(p->fts_name)) { - /* Command-line "." and ".." are real directories. */ - return (p->fts_level == FTS_ROOTLEVEL ? FTS_D : FTS_DOT); -diff --git a/gnulib/lib/fts_.h b/gnulib/lib/fts_.h -index a34a296..fc0df6e 100644 ---- a/gnulib/lib/fts_.h -+++ b/gnulib/lib/fts_.h -@@ -219,11 +219,6 @@ typedef struct _ftsent { - - size_t fts_namelen; /* strlen(fts_name) */ - -- /* If not (nlink_t) -1, an upper bound on the number of -- remaining subdirectories of interest. If this becomes -- zero, some work can be avoided. */ -- nlink_t fts_n_dirs_remaining; -- - # define FTS_D 1 /* preorder directory */ - # define FTS_DC 2 /* directory that causes cycles */ - # define FTS_DEFAULT 3 /* none of the above */ --- -2.23.0 - diff --git a/0003-port-to-php-8.0.0.patch b/001-port-to-php-8.0.0.patch similarity index 46% rename from 0003-port-to-php-8.0.0.patch rename to 001-port-to-php-8.0.0.patch index 32bb213a2fdcda3ae603ece25c8b60ab66fc6fcd..3c6c9ef3dc32e09414f6a930326f2579f9152665 100644 --- a/0003-port-to-php-8.0.0.patch +++ b/001-port-to-php-8.0.0.patch @@ -5,22 +5,12 @@ Subject: [PATCH] port to php 8.0.0 --- generator/php.ml | 17 ++++++++++------- - 1 file changed, 10 insertions(+), 7 deletions(-) - -diff --git a/generator/php.ml b/generator/php.ml -index e07813f..b2da116 100644 ---- a/generator/php.ml -+++ b/generator/php.ml -@@ -96,7 +96,7 @@ static int res_guestfs_h; + 1 file changed, 6 insertions(+), 3 deletions(-) - #if ZEND_MODULE_API_NO >= 20151012 - # define GUESTFS_RETURN_STRING(x, duplicate) \\ -- do { if (duplicate) RETURN_STRING(x) else { RETVAL_STRING(x); efree ((char *)x); return; } } while (0) -+ do { if (duplicate) { RETURN_STRING(x); } else { RETVAL_STRING(x); efree ((char *)x); return; } } while (0) - # define guestfs_add_assoc_string(arg, key, str, dup) \\ - add_assoc_string(arg, key, str) - # define guestfs_add_assoc_stringl(arg, key, str, len, dup) \\ -@@ -177,7 +177,7 @@ static void +diff -ruN libguestfs/generator/php.ml libguestfs-1.49.5/generator/php.ml +--- libguestfs/generator/php.ml 2022-11-16 02:11:11.207197930 +0800 ++++ libguestfs-1.49.5/generator/php.ml 2022-11-16 02:13:35.829265696 +0800 +@@ -218,7 +218,7 @@ guestfs_php_handle_dtor (zend_resource *rsrc) #else static void @@ -29,7 +19,7 @@ index e07813f..b2da116 100644 #endif { guestfs_h *g = (guestfs_h *) rsrc->ptr; -@@ -193,13 +193,16 @@ PHP_MINIT_FUNCTION (guestfs_php) +@@ -234,6 +234,9 @@ return SUCCESS; } @@ -37,19 +27,9 @@ index e07813f..b2da116 100644 +ZEND_END_ARG_INFO() + static zend_function_entry guestfs_php_functions[] = { -- PHP_FE (guestfs_create, NULL) -- PHP_FE (guestfs_last_error, NULL) -+ PHP_FE (guestfs_create, arginfo_void) -+ PHP_FE (guestfs_last_error, arginfo_void) - "; - - List.iter ( -- fun { name } -> pr " PHP_FE (guestfs_%s, NULL)\n" name -+ fun { name } -> pr " PHP_FE (guestfs_%s, arginfo_void)\n" name - ) (actions |> external_functions |> sort); - - pr " { NULL, NULL, NULL } -@@ -247,7 +250,7 @@ PHP_FUNCTION (guestfs_last_error) + PHP_FE (guestfs_create, arginfo_create) + PHP_FE (guestfs_last_error, arginfo_last_error) +@@ -288,7 +291,7 @@ zval *z_g; guestfs_h *g; @@ -58,7 +38,7 @@ index e07813f..b2da116 100644 &z_g) == FAILURE) { RETURN_FALSE; } -@@ -353,7 +356,7 @@ PHP_FUNCTION (guestfs_last_error) +@@ -394,7 +397,7 @@ ) else param_string in @@ -67,6 +47,3 @@ index e07813f..b2da116 100644 param_string; pr " &z_g"; List.iter ( --- -2.23.0 - diff --git a/Fix-defaut-function-compare-error.patch b/Fix-defaut-function-compare-error.patch deleted file mode 100644 index ad54c9b4f22eb4b4f046a7ae25978d8e81434a95..0000000000000000000000000000000000000000 --- a/Fix-defaut-function-compare-error.patch +++ /dev/null @@ -1,28 +0,0 @@ -From cc4ecbe236914f9b391ecf3815008547472632f8 Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -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 - -diff --git a/common/mlstdutils/std_utils.ml b/common/mlstdutils/std_utils.ml -index 70156d1..3cacf36 100644 ---- a/common/mlstdutils/std_utils.ml -+++ b/common/mlstdutils/std_utils.ml -@@ -305,7 +305,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 diff --git a/Fix-verbose-error.patch b/Fix-verbose-error.patch deleted file mode 100644 index 846a4649b15d4fe29162e9c49c42d39eb490e38e..0000000000000000000000000000000000000000 --- a/Fix-verbose-error.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 1941593585574849dd72c458535cd80b4d858266 Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Fri, 10 Dec 2021 10:20:34 +0000 -Subject: [PATCH] Disable OCaml warning 6 completely - -Warning 6 "labels-omitted" is not useful. It's fine to omit labels on -positional arguments. - -Example: - - File "perl_edit.ml", line 30, characters 2-13: - 30 | c_edit_file (verbose ()) g (Guestfs.c_pointer g) file expr - ^^^^^^^^^^^ - Warning 6 [labels-omitted]: label verbose was omitted in the application of this function. - -The function is specified as: - - external c_edit_file : verbose:bool -> Guestfs.t -> int64 -> string -> string -> unit - -The complaint is that the verbose: label has been omitted from the -first argument when the function is called, but IMO this is a -stylistic thing, not a bug. - -(cherry picked from -guestfs-tools commit 577f7aee4b1c720f4c4826115b49a0c3870b149e) - -diff --git a/m4/guestfs-ocaml.m4 b/m4/guestfs-ocaml.m4 -index 3c504ce..5604574 100644 ---- a/m4/guestfs-ocaml.m4 -+++ b/m4/guestfs-ocaml.m4 -@@ -222,7 +222,7 @@ AS_IF([test "x$have_Hivex_OPEN_UNSAFE" = "xno"],[ - AC_SUBST([HIVEX_OPEN_UNSAFE_FLAG]) - - dnl Flags we want to pass to every OCaml compiler call. --OCAML_WARN_ERROR="-warn-error CDEFLMPSUVYZX+52-3" -+OCAML_WARN_ERROR="-warn-error CDEFLMPSUVYZX+52-3 -w -6" - AC_SUBST([OCAML_WARN_ERROR]) - OCAML_FLAGS="-g -annot $safe_string_option" - AC_SUBST([OCAML_FLAGS]) diff --git a/fix-not-striped.patch b/fix-not-striped.patch index 9c9b9d3569875dd2e8220a30c881c9a6928e0155..87df2ca242c36d3fc9f0908cf53c45796cd54f78 100644 --- a/fix-not-striped.patch +++ b/fix-not-striped.patch @@ -5,33 +5,16 @@ Subject: [PATCH] fix not striped --- appliance/Makefile.am | 1 + - p2v/Makefile.am | 1 + - 2 files changed, 2 insertions(+) + 1 files changed, 1 insertions(+) -diff --git a/appliance/Makefile.am b/appliance/Makefile.am -index fc424b1..3f74636 100644 ---- a/appliance/Makefile.am -+++ b/appliance/Makefile.am -@@ -92,6 +92,7 @@ supermin.d/daemon.tar.gz: ../daemon/guestfsd guestfs_shadow.aug - mkdir -p tmp-d$(DAEMON_SUPERMIN_DIR) tmp-d/etc tmp-d/usr/share/guestfs +diff -ruN libguestfs/appliance/Makefile.am libguestfs-1.49.5/appliance/Makefile.am +--- libguestfs/appliance/Makefile.am 2022-11-16 02:11:11.123199053 +0800 ++++ libguestfs-1.49.5/appliance/Makefile.am 2022-11-16 02:13:36.113261902 +0800 +@@ -118,6 +118,7 @@ + rm -rf tmp-d + mkdir -p tmp-d$(DAEMON_SUPERMIN_DIR) tmp-d/etc ln ../daemon/guestfsd tmp-d$(DAEMON_SUPERMIN_DIR)/guestfsd - ln $(srcdir)/guestfs_shadow.aug tmp-d/usr/share/guestfs/guestfs_shadow.aug + strip tmp-d/usr/sbin/guestfsd ( cd tmp-d && tar zcf - * ) > $@-t rm -r tmp-d mv $@-t $@ -diff --git a/p2v/Makefile.am b/p2v/Makefile.am -index 92e2c50..a101d22 100644 ---- a/p2v/Makefile.am -+++ b/p2v/Makefile.am -@@ -75,6 +75,7 @@ virtp2vlib_DATA = virt-p2v.xz - - virt-p2v.xz: virt-p2v - rm -f $@ $@-t -+ strip $< - xz --best --keep --stdout $< > $@-t - mv $@-t $@ - --- -2.30.0 - diff --git a/libguestfs-1.40.2.tar.gz b/libguestfs-1.49.5.tar.gz similarity index 55% rename from libguestfs-1.40.2.tar.gz rename to libguestfs-1.49.5.tar.gz index 548ca2b39fe549e9e9dec720c51edad9a037aa50..2a5b12b8895deb024f60f43399bbf8a027a3eaf1 100644 Binary files a/libguestfs-1.40.2.tar.gz and b/libguestfs-1.49.5.tar.gz differ diff --git a/libguestfs.spec b/libguestfs.spec index 1e8062907a512693428681c2d43787e2bf145460..e64b917116756d939343f1de4788eb1ec34c1e6f 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -3,32 +3,25 @@ %undefine _strict_symbol_defs_build Name: libguestfs -Version: 1.40.2 -Release: 17 +Version: 1.49.5 +Release: 1 Epoch: 1 Summary: A set of tools for accessing and modifying virtual machine (VM) disk images License: LGPLv2+ URL: http://libguestfs.org/ -Source0: http://download.libguestfs.org/1.40-stable/libguestfs-1.40.2.tar.gz +Source0: https://download.libguestfs.org/1.49-development/libguestfs-1.49.5.tar.gz Source1: guestfish.sh Source2: yum.conf.in -Patch0000: 0001-libguestfs-PYTHON_LIBS-is-not-set-in-Python-3.8.patch -Patch0001: 0002-fts-remove-NOSTAT_LEAF_OPTIMIZATION.patch -Patch0002: 0003-port-to-php-8.0.0.patch -Patch0003: fix-not-striped.patch -# https://github.com/libguestfs/libguestfs-common/commit/cc4ecbe236914f9b391ecf3815008547472632f8 -Patch0004: Fix-defaut-function-compare-error.patch -# https://github.com/libguestfs/libguestfs/commit/1941593585574849dd72c458535cd80b4d858266 -Patch0005: Fix-verbose-error.patch -# https://github.com/libguestfs/libguestfs/commit/815eab8a66ba6ae5bea7445abb0fa8b54e01e158 -Patch0006: 0001-tests-Use-explicit-backing-format-for-all-backing-di.patch +Patch0001: 001-port-to-php-8.0.0.patch +Patch0002: fix-not-striped.patch +Patch0003: support_OPENEULER_to_configure.patch BuildRequires: gcc-c++, rpcgen, libtirpc-devel, supermin-devel >= 5.1.18, hivex-devel >= 1.2.7-7, ocaml-hivex-devel, perl(Pod::Simple), perl(Pod::Man) BuildRequires: /usr/bin/pod2text, po4a, augeas-devel >= 1.7.0, readline-devel, genisoimage, libxml2-devel, createrepo, glibc-static, libselinux-utils BuildRequires: libselinux-devel, fuse, fuse-devel, pcre-devel, file-devel, libvirt-devel, gperf, flex, bison, libdb-utils, cpio, libconfig-devel, xz-devel BuildRequires: zip, unzip, systemd-units, netpbm-progs, icoutils, libvirt-daemon-qemu, perl(Expect), libacl-devel, libcap-devel, libldm-devel, jansson-devel -BuildRequires: systemd-devel, bash-completion, /usr/bin/ping, /usr/bin/wget, curl, xz, gtk3-devel, dbus-devel, /usr/bin/qemu-img, perl(Win::Hivex) -BuildRequires: perl(Win::Hivex::Regedit), ocaml, ocaml-ocamldoc, ocaml-findlib-devel, ocaml-gettext-devel, ocaml-ounit-devel, ocaml-libvirt-devel >= 0.6.1.4-5 +BuildRequires: systemd-devel, bash-completion, /usr/bin/ping, /usr/bin/wget, curl, xz, gtk3-devel, dbus-devel, /usr/bin/qemu-img +BuildRequires: ocaml, ocaml-ocamldoc, ocaml-findlib-devel, ocaml-gettext-devel, ocaml-ounit-devel, ocaml-libvirt-devel >= 0.6.1.4-5 BuildRequires: lua, lua-devel, perl-devel, perl-generators, perl-macros, perl(Sys::Virt), perl(Test::More), perl(Test::Pod) >= 1.00, perl(Test::Pod::Coverage) >= 1.00 BuildRequires: perl(Module::Build), perl(ExtUtils::CBuilder), perl(Locale::TextDomain), python3-devel BuildRequires: libvirt-python3, ruby-devel, rubygem-rake, rubygem(json), rubygem(rdoc), rubygem(test-unit), ruby-irb, java-1.8.0-openjdk, java-1.8.0-openjdk-devel @@ -42,7 +35,7 @@ BuildRequires: syslinux syslinux-extlinux %endif Requires: supermin >= 5.1.18, augeas-libs%{?_isa} >= 1.7.0, libacl%{?_isa}, libcap%{?_isa}, hivex%{?_isa}, pcre%{?_isa}, libselinux%{?_isa}, systemd-libs%{?_isa} Requires: yajl%{?_isa}, libdb-utils, fuse, /usr/bin/qemu-img, libvirt-daemon-kvm >= 0.10.2-3, selinux-policy >= 3.11.1-63, bundled(gnulib), /usr/bin/hexedit, binutils -Requires: /usr/bin/less, /usr/bin/vi, gnupg2, xz, curl, perl(Sys::Virt), perl(Win::Hivex) >= 1.2.7, gawk, gzip, unzip, /usr/bin/virsh +Requires: /usr/bin/less, /usr/bin/vi, gnupg2, xz, curl, perl(Sys::Virt), gawk, gzip, unzip, libvirt Suggests: osinfo-db Recommends: libguestfs-xfs, nbdkit, nbdkit-plugin-python3, nbdkit-plugin-vddk Conflicts: libguestfs-winsupport @@ -223,7 +216,7 @@ fi %global localconfigure %{localconfigure} --disable-golang %global localmake \ - %make_build -C builder index-parse.c \ + %make_build \ %make_build V=1 INSTALLDIRS=vendor %{localconfigure} @@ -244,7 +237,6 @@ wait %check %install -gzip -9 ChangeLog %make_install INSTALLDIRS=vendor NO_PACKLIST=1 @@ -260,9 +252,6 @@ find $RPM_BUILD_ROOT -name perllocal.pod -delete find $RPM_BUILD_ROOT -name '*.bs' -delete find $RPM_BUILD_ROOT -name 'bindtests.pl' -delete -mv $RPM_BUILD_ROOT%{_docdir}/libguestfs installed-docs -gzip --best installed-docs/*.xml - install -d $RPM_BUILD_ROOT%{_libdir}/guestfs install -d $RPM_BUILD_ROOT%{_sysconfdir}/profile.d install -m 0644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/profile.d @@ -272,37 +261,18 @@ rm -rf $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs/dllv2v_test_harness* rm -rf ocaml/html/.gitignore -%ifarch aarch64 x86_64 -libtool --mode=install install -m 0755 utils/boot-analysis/boot-analysis $RPM_BUILD_ROOT%{_bindir}/libguestfs-boot-analysis -libtool --mode=install install -m 0755 utils/boot-benchmark/boot-benchmark $RPM_BUILD_ROOT%{_bindir}/libguestfs-boot-benchmark -install -m 0755 utils/boot-benchmark/boot-benchmark-range.pl $RPM_BUILD_ROOT%{_bindir}/libguestfs-boot-benchmark-range.pl -install -m 0644 utils/boot-analysis/boot-analysis.1 $RPM_BUILD_ROOT%{_mandir}/man1/libguestfs-boot-analysis.1 -install -m 0644 utils/boot-benchmark/boot-benchmark.1 $RPM_BUILD_ROOT%{_mandir}/man1/libguestfs-boot-benchmark.1 -%endif %find_lang %{name} %files -f %{name}.lang -%doc COPYING README AUTHORS HACKING examples/*.c installed-docs/* +%doc COPYING README AUTHORS HACKING examples/*.c %{_bindir}/libguestfs-test-tool -%ifarch aarch64 x86_64 -%{_bindir}/libguestfs-boot-analysis -%{_bindir}/libguestfs-boot-benchmark* -%endif %{_bindir}/guest* %{_bindir}/virt-* -%exclude %{_bindir}/virt-list-filesystems -%exclude %{_bindir}/virt-list-partitions -%exclude %{_bindir}/virt-tar -%{_datadir}/virt-* -%{_libdir}/virt-* +%exclude %{_bindir}/virt-tar* %{_libdir}/guestfs/ %{_libdir}/libguestfs.so.* %config(noreplace) %{_sysconfdir}/libguestfs-tools.conf -%{_sysconfdir}/virt-builder -%dir %{_sysconfdir}/xdg/virt-builder -%dir %{_sysconfdir}/xdg/virt-builder/repos.d -%config %{_sysconfdir}/xdg/virt-builder/repos.d/* %config %{_sysconfdir}/profile.d/guestfish.sh %dir %{_datadir}/bash-completion/completions %{_datadir}/bash-completion/completions/guest* @@ -379,6 +349,9 @@ install -m 0644 utils/boot-benchmark/boot-benchmark.1 $RPM_BUILD_ROOT%{_mandir}/ %exclude %{_mandir}/man1/virt-tar.1* %changelog +* Sat Nov 12 2022 dan - 1:1.49.5-1 +- update to 1.49.5 + * Thu May 26 2022 Jun Yang - 1:1.40.2-17 - Remove unnecessary dependency of kernel package diff --git a/support_OPENEULER_to_configure.patch b/support_OPENEULER_to_configure.patch new file mode 100644 index 0000000000000000000000000000000000000000..b8a87eb5e43160bccb39ab18661a5ace721f062d --- /dev/null +++ b/support_OPENEULER_to_configure.patch @@ -0,0 +1,100 @@ +From 77c67d0e597f5408c3d005ef624ef3d417271e0e Mon Sep 17 00:00:00 2001 +From: sunguoshuai +Date: Thu, 9 Sep 2021 21:34:40 +0800 +Subject: [PATCH] fix not striped + +--- + libguestfs/configure | 28 + 1 - + libguestfs/m4/guestfs-appliance.m4 | 22 + 1 - + 2 files changed, 50 insertions(+), 2 deletions(-) + +diff -ruN libguestfs/configure libguestfs-1.49.5/configure +--- libguestfs/configure 2022-11-16 23:45:04.603664947 +0800 ++++ libguestfs-1.49.5/configure 2022-11-17 01:11:33.528806347 +0800 +@@ -26381,7 +26381,7 @@ + fi ) | tr '[:lower:]' '[:upper:]' + )" + case $DISTRO in #( +- FEDORA | RHEL | CENTOS | ALMALINUX | CLOUDLINUX \ ++ FEDORA | RHEL | CENTOS | OPENEULER | ALMALINUX | CLOUDLINUX \ + | ROCKY) : + DISTRO=REDHAT ;; #( + OPENSUSE* | SLED | SLES) : +@@ -26395,11 +26395,37 @@ + esac + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DISTRO (from /etc/os-release)" >&5 + printf "%s\n" "$DISTRO (from /etc/os-release)" >&6; } ++ ++elif test -f /etc/openEuler-release; then ++ echo "/etc/openEuler-release:" >&5 ++ cat /etc/openEuler-release >&5 ++ DISTRO="$( ++ . /etc/openEuler-release ++ ( if test -n "$ID_LIKE"; then ++ echo $ID_LIKE | $AWK '{print $1}' ++ else ++ echo $ID ++ fi ) | tr '[:lower:]' '[:upper:]' ++ )" ++ case $DISTRO in #( ++ FEDORA | RHEL | CENTOS | OPENEULER | ALMALINUX | CLOUDLINUX \ ++ | ROCKY) : ++ DISTRO=REDHAT ;; #( ++ OPENSUSE* | SLED | SLES) : ++ DISTRO=SUSE ;; #( ++ ARCH | MANJARO | ARTIX) : ++ DISTRO=ARCHLINUX ;; #( ++ OPENMANDRIVA) : ++ DISTRO=OPENMANDRIVA ;; #( ++ *) : ++ ;; ++esac ++ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DISTRO (from /etc/openEuler-release)" >&5 ++printf "%s\n" "$DISTRO (from /etc/openEuler-release)" >&6; } + else + as_fn_error $? "/etc/os-release not available, please specify the distro using --with-distro=DISTRO" "$LINENO" 5 + fi + +- + fi + + +diff -ruN libguestfs/m4/guestfs-appliance.m4 libguestfs-1.49.5/m4/guestfs-appliance.m4 +--- libguestfs/m4/guestfs-appliance.m4 2022-11-16 23:45:04.608664963 +0800 ++++ libguestfs-1.49.5/m4/guestfs-appliance.m4 2022-11-17 00:54:05.276385306 +0800 +@@ -114,13 +114,34 @@ + fi ) | tr '@<:@:lower:@:>@' '@<:@:upper:@:>@' + )" + AS_CASE([$DISTRO], +- [FEDORA | RHEL | CENTOS | ALMALINUX | CLOUDLINUX \ ++ [FEDORA | RHEL | CENTOS | OPENEULER | ALMALINUX | CLOUDLINUX \ + | ROCKY], + [DISTRO=REDHAT], + [OPENSUSE* | SLED | SLES],[DISTRO=SUSE], + [ARCH | MANJARO | ARTIX],[DISTRO=ARCHLINUX], + [OPENMANDRIVA],[DISTRO=OPENMANDRIVA]) + AC_MSG_RESULT([$DISTRO (from /etc/os-release)]) ++ ++ elif test -f /etc/openEuler-release; then ++ echo "/etc/openEuler-release:" >&AS_MESSAGE_LOG_FD ++ cat /etc/openEuler-release >&AS_MESSAGE_LOG_FD ++ DISTRO="$( ++ . /etc/openEuler-release ++ ( if test -n "$ID_LIKE"; then ++ echo $ID_LIKE | $AWK '{print $1}' ++ else ++ echo $ID ++ fi ) | tr '@<:@:lower:@:>@' '@<:@:upper:@:>@' ++ )" ++ AS_CASE([$DISTRO], ++ [FEDORA | RHEL | CENTOS | OPENEULER | ALMALINUX | CLOUDLINUX \ ++ | ROCKY], ++ [DISTRO=REDHAT], ++ [OPENSUSE* | SLED | SLES],[DISTRO=SUSE], ++ [ARCH | MANJARO | ARTIX],[DISTRO=ARCHLINUX], ++ [OPENMANDRIVA],[DISTRO=OPENMANDRIVA]) ++ AC_MSG_RESULT([$DISTRO (from /etc/openEuler-release)]) ++ + else + AC_MSG_ERROR([/etc/os-release not available, please specify the distro using --with-distro=DISTRO]) + fi