diff --git a/0001-add-Linux-distribution-OPENEULER.patch b/0001-add-Linux-distribution-OPENEULER.patch new file mode 100644 index 0000000000000000000000000000000000000000..6cd442bae236a6ddb4ea81196cf65d5ad00eeafb --- /dev/null +++ b/0001-add-Linux-distribution-OPENEULER.patch @@ -0,0 +1,25 @@ +From 3e8fe938e3349265c96d98975d7459d84ebc1b8e Mon Sep 17 00:00:00 2001 +From: jianli-97 +Date: Tue, 20 Sep 2022 11:03:45 +0800 +Subject: [PATCH] add Linux distribution OPENEULER + +--- + m4/guestfs-appliance.m4 | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/m4/guestfs-appliance.m4 b/m4/guestfs-appliance.m4 +index 4e63ef4..a6ebfe9 100644 +--- a/m4/guestfs-appliance.m4 ++++ b/m4/guestfs-appliance.m4 +@@ -113,7 +113,7 @@ AC_ARG_WITH([distro], + fi + )" + AS_CASE([$DISTRO], +- [FEDORA | RHEL | CENTOS | ALMALINUX | CLOUDLINUX | ROCKY], ++ [FEDORA | RHEL | CENTOS | OPENEULER | ALMALINUX | CLOUDLINUX | ROCKY], + [DISTRO=REDHAT], + [OPENSUSE* | SLED | SLES],[DISTRO=SUSE], + [ARCH | MANJARO | ARTIX],[DISTRO=ARCHLINUX], +-- +2.30.0 + 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/0003-port-to-php-8.0.0.patch index 32bb213a2fdcda3ae603ece25c8b60ab66fc6fcd..0f5b3b829e0d3d9e2a760c4bf25148c97dc970a1 100644 --- a/0003-port-to-php-8.0.0.patch +++ b/0003-port-to-php-8.0.0.patch @@ -11,15 +11,6 @@ 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; - - #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 guestfs_php_handle_dtor (zend_resource *rsrc) #else 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 deleted file mode 100644 index 9c9b9d3569875dd2e8220a30c881c9a6928e0155..0000000000000000000000000000000000000000 --- a/fix-not-striped.patch +++ /dev/null @@ -1,37 +0,0 @@ -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 - ---- - appliance/Makefile.am | 1 + - p2v/Makefile.am | 1 + - 2 files changed, 2 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 - 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.48.3.tar.gz similarity index 55% rename from libguestfs-1.40.2.tar.gz rename to libguestfs-1.48.3.tar.gz index 548ca2b39fe549e9e9dec720c51edad9a037aa50..f28540b951b87bfae5d7098b81a2bbcdf96d2056 100644 Binary files a/libguestfs-1.40.2.tar.gz and b/libguestfs-1.48.3.tar.gz differ diff --git a/libguestfs.spec b/libguestfs.spec index 1e8062907a512693428681c2d43787e2bf145460..fd51a608296e502c809dd8bc196530adcabe8d0b 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -3,25 +3,17 @@ %undefine _strict_symbol_defs_build Name: libguestfs -Version: 1.40.2 -Release: 17 +Version: 1.48.3 +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.48-stable/libguestfs-1.48.3.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: 0003-port-to-php-8.0.0.patch +Patch0002: 0001-add-Linux-distribution-OPENEULER.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 @@ -32,7 +24,7 @@ BuildRequires: perl(Win::Hivex::Regedit), ocaml, ocaml-ocamldoc, ocaml-findlib-d 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 -BuildRequires: jpackage-utils, php-devel, gobject-introspection-devel, gjs, acl, attr, augeas-libs, bash, binutils, btrfs-progs, lzop, mdadm, nilfs-utils +BuildRequires: jpackage-utils, php-devel, vala, gobject-introspection-devel, gjs, acl, attr, augeas-libs, bash, binutils, btrfs-progs, lzop, mdadm, nilfs-utils BuildRequires: bzip2, coreutils, cpio, cryptsetup, debootstrap, dhclient, diffutils, dosfstools, e2fsprogs, file, findutils, gawk, gdisk, gfs2-utils BuildRequires: grep, gzip, hivex, iproute, iputils, jfsutils, kmod, kpartx, less, libcap, libldm, libselinux, libxml2, lsof, lsscsi, lvm2, strace BuildRequires: openssh-clients, parted, pciutils, pcre, policycoreutils, procps, psmisc, qemu-img, reiserfs-utils, rsync, scrub, sed, sleuthkit, squashfs-tools @@ -46,10 +38,6 @@ Requires: /usr/bin/less, /usr/bin/vi, gnupg2, xz, curl, perl(Sys::Virt), pe Suggests: osinfo-db Recommends: libguestfs-xfs, nbdkit, nbdkit-plugin-python3, nbdkit-plugin-vddk Conflicts: libguestfs-winsupport -%ifarch aarch64 x86_64 -Provides: %{name}-benchmarking%{?_isa} %{name}-benchmarking -Obsoletes: %{name}-benchmarking < %{version}-%{release} -%endif Provides: %{name}-forensics%{?_isa} %{name}-forensics Obsoletes: %{name}-forensics < %{version}-%{release} Provides: %{name}-gfs2%{?_isa} %{name}-gfs2 @@ -102,6 +90,13 @@ libguestfs has been in continuous development since 2009, with a 250 page manual enterprise environments, and with many happy and successful users. Dozens of projects are using libguestfs today. +%package appliance +Summary: Appliance for %{name} +Requires: supermin >= 5.1.18 + +%description appliance +%{name}-appliance provides the appliance used by libguestfs. + %package devel Summary: Development files for %{name} Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release}, pkgconfig, xz @@ -174,6 +169,14 @@ Requires: %{name}-gobject = %{epoch}:%{version}-%{release} %description gobject-devel This package includes development files of GOBject bindings for %{name}. +%package vala +Summary: Vala for %{name} +Requires: %{name}-devel%{?_isa} = %{epoch}:%{version}-%{release} +Requires: vala + +%description vala +%{name}-vala contains GObject bindings for %{name}. + %package help Summary: man files for %{name} Requires: man @@ -223,7 +226,6 @@ fi %global localconfigure %{localconfigure} --disable-golang %global localmake \ - %make_build -C builder index-parse.c \ %make_build V=1 INSTALLDIRS=vendor %{localconfigure} @@ -244,8 +246,6 @@ wait %check %install -gzip -9 ChangeLog - %make_install INSTALLDIRS=vendor NO_PACKLIST=1 cd ../%{name}-%{version}-python3 @@ -260,9 +260,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,48 +269,65 @@ 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/* +%license COPYING COPYING.LIB +%doc README +%{_bindir}/guestfish +%{_bindir}/guestmount +%{_bindir}/guestunmount %{_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-* -%{_libdir}/guestfs/ +%{_bindir}/virt-copy-in +%{_bindir}/virt-copy-out +%{_bindir}/virt-tar-in +%{_bindir}/virt-tar-out %{_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/* +%{_mandir}/man1/guestfish.1* +%{_mandir}/man1/guestfs-faq.1* +%{_mandir}/man1/guestfs-performance.1* +%{_mandir}/man1/guestfs-recipes.1* +%{_mandir}/man1/guestfs-release-notes-1*.1* +%{_mandir}/man1/guestfs-release-notes.1* +%{_mandir}/man1/guestfs-security.1* +%{_mandir}/man1/guestmount.1* +%{_mandir}/man1/guestunmount.1* +%{_mandir}/man1/libguestfs-test-tool.1* +%{_mandir}/man1/virt-copy-in.1* +%{_mandir}/man1/virt-copy-out.1* +%{_mandir}/man1/virt-tar-in.1* +%{_mandir}/man1/virt-tar-out.1* +%{_mandir}/man5/libguestfs-tools.conf.5* %config %{_sysconfdir}/profile.d/guestfish.sh +%config(noreplace) %{_sysconfdir}/libguestfs-tools.conf +%{_bindir}/virt-rescue +%{_mandir}/man1/virt-rescue.1* %dir %{_datadir}/bash-completion/completions -%{_datadir}/bash-completion/completions/guest* +%{_datadir}/bash-completion/completions/guestfish +%{_datadir}/bash-completion/completions/guestmount +%{_datadir}/bash-completion/completions/guestunmount %{_datadir}/bash-completion/completions/libguestfs-test-tool -%{_datadir}/bash-completion/completions/virt-* +%{_datadir}/bash-completion/completions/virt-copy-in +%{_datadir}/bash-completion/completions/virt-copy-out +%{_datadir}/bash-completion/completions/virt-rescue +%{_datadir}/bash-completion/completions/virt-tar-in +%{_datadir}/bash-completion/completions/virt-tar-out %files devel +%doc AUTHORS HACKING TODO README +%doc examples/*.c %{_libdir}/libguestfs.so +%{_sbindir}/libguestfs-make-fixed-appliance +%{_mandir}/man1/guestfs-building.1* +%{_mandir}/man1/guestfs-hacking.1* +%{_mandir}/man1/guestfs-internals.1* +%{_mandir}/man1/guestfs-testing.1* +%{_mandir}/man1/libguestfs-make-fixed-appliance.1* +%{_mandir}/man3/guestfs.3* +%{_mandir}/man3/guestfs-examples.3* +%{_mandir}/man3/libguestfs.3* %{_includedir}/guestfs.h %{_libdir}/pkgconfig/libguestfs.pc -%{_sbindir}/libguestfs-make-fixed-appliance %files -n ocaml-%{name} %{_libdir}/ocaml/guestfs @@ -330,22 +344,27 @@ install -m 0644 utils/boot-benchmark/boot-benchmark.1 $RPM_BUILD_ROOT%{_mandir}/ %{_libdir}/ocaml/guestfs/*.cmxa %{_libdir}/ocaml/guestfs/*.cmx %{_libdir}/ocaml/guestfs/*.mli +%{_mandir}/man3/guestfs-ocaml.3* %files -n perl-Sys-Guestfs %doc perl/examples/*.pl %{perl_vendorarch}/* +%{_mandir}/man3/Sys::Guestfs.3pm* +%{_mandir}/man3/guestfs-perl.3* %files -n python3-%{name} %doc python/examples/*.py %{python3_sitearch}/libguestfsmod*.so %{python3_sitearch}/guestfs.py %{python3_sitearch}/__pycache__/guestfs*.py* +%{_mandir}/man3/guestfs-python.3* %files -n ruby-%{name} %doc ruby/examples/*.rb %doc ruby/doc/site/* %{ruby_vendorlibdir}/guestfs.rb %{ruby_vendorarchdir}/_guestfs.so +%{_mandir}/man3/guestfs-ruby.3* %files -n php-%{name} %doc php/README-PHP @@ -357,6 +376,7 @@ install -m 0644 utils/boot-benchmark/boot-benchmark.1 $RPM_BUILD_ROOT%{_mandir}/ %doc lua/examples/*.lua %doc lua/examples/LICENSE %{_libdir}/lua/*/guestfs.so +%{_mandir}/man3/guestfs-lua.3* %files gobject %{_libdir}/libguestfs-gobject-1.0.so.0* @@ -369,16 +389,25 @@ install -m 0644 utils/boot-benchmark/boot-benchmark.1 $RPM_BUILD_ROOT%{_mandir}/ %{_includedir}/guestfs-gobject/*.h %{_datadir}/gir-1.0/Guestfs-1.0.gir %{_libdir}/pkgconfig/libguestfs-gobject-1.0.pc +%{_mandir}/man3/guestfs-gobject.3* + +%files appliance +%{_libdir}/guestfs/ + +%files vala +%{_datadir}/vala/vapi/libguestfs-gobject-1.0.deps +%{_datadir}/vala/vapi/libguestfs-gobject-1.0.vapi %files help %{_mandir}/man*/* %lang(ja) %{_mandir}/ja/man*/* %lang(uk) %{_mandir}/uk/man*/* -%exclude %{_mandir}/man1/virt-list-filesystems.1* -%exclude %{_mandir}/man1/virt-list-partitions.1* -%exclude %{_mandir}/man1/virt-tar.1* +%exclude %{_mandir}/man1/virt-tar*.1* %changelog +* Mon Sep 19 2022 lijian - 1:1.48.3-1 +- Update to Stable Version 1.48.3 + * Thu May 26 2022 Jun Yang - 1:1.40.2-17 - Remove unnecessary dependency of kernel package