- Update to version 1.48.6

* This is a bug fix release. No upstream changelog.
- Drop f162e47e-m4-Fix-configure-disable-ocaml.patch

OBS-URL: https://build.opensuse.org/package/show/Virtualization/libguestfs?expand=0&rev=530
This commit is contained in:
Charles Arnold 2022-11-29 19:57:00 +00:00 committed by Git OBS Bridge
parent e077767708
commit 1909e063be
7 changed files with 29 additions and 311 deletions

View File

@ -1,289 +0,0 @@
Subject: m4: Fix ./configure --disable-ocaml
From: Richard W.M. Jones rjones@redhat.com Wed Jul 20 09:23:37 2022 +0100
Date: Wed Jul 20 10:53:08 2022 +0100:
Git: f162e47ecfee711f2c3bcc761de17e502fe7ab5e
OCaml is required to compile libguestfs, however we should still be
able to disable the OCaml bindings. This didn't work because using
--disable-ocaml caused various configure tests to be skipped which are
required to compile the daemon. In particular the check for
caml_alloc_initialized_string, resulting in this error:
pcre-c.c:47:1: error: static declaration of caml_alloc_initialized_string follows non-static declaration
caml_alloc_initialized_string (mlsize_t len, const char *p)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Also OCaml gettext is not required by libguestfs. There are no *.ml
files used by libguestfs which require translation.
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2108425
Fixes: https://bugs.gentoo.org/820053
Fixes: commit 733d2182b64df7abc5c5cd7d78177baa6079628c
(cherry picked from commit adfaf25a12b97b18f8a22d96803cd0920bfd25f7)
diff --git a/Makefile.am b/Makefile.am
index aac0d68fe..474f7a8da 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -37,7 +37,6 @@ SUBDIRS += include lib docs examples
SUBDIRS += common/mlutils
SUBDIRS += bundled/ocaml-augeas
SUBDIRS += common/mlpcre
-SUBDIRS += common/mlgettext
if ENABLE_DAEMON
SUBDIRS += daemon
endif
@@ -208,9 +207,8 @@ maintainer-upload-website:
# docs/C_SOURCE_FILES
# - source files scanned for internal documentation
# po/POTFILES - files with ordinary extensions, but not OCaml files
-# po/POTFILES-ml - OCaml files, which need a special tool to translate
-dist-hook: docs/C_SOURCE_FILES po/POTFILES po/POTFILES-ml
+dist-hook: docs/C_SOURCE_FILES po/POTFILES
# This has to be in the top-level Makefile.am so that we have access
# to DIST_SUBDIRS.
@@ -446,6 +444,7 @@ maintainer-check-extra-dist:
cd common; git ls-files | sed 's,^,common/,' ) | \
grep -v '^common$$' | \
grep -v '^common/mlcustomize/' | \
+ grep -v '^common/mlgettext/' | \
grep -v '^common/mlprogress/' | \
grep -v '^common/mltools/' | \
grep -v '^common/mlv2v/' | \
diff --git a/configure.ac b/configure.ac
index 60380c7f7..fed17dbb9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -211,7 +211,6 @@ AC_CONFIG_FILES([Makefile
bundled/ocaml-augeas/Makefile
common/errnostring/Makefile
common/edit/Makefile
- common/mlgettext/Makefile
common/mlpcre/Makefile
common/mlstdutils/Makefile
common/mlstdutils/guestfs_config.ml
diff --git a/docs/guestfs-building.pod b/docs/guestfs-building.pod
index b93a611a6..296a288e3 100644
--- a/docs/guestfs-building.pod
+++ b/docs/guestfs-building.pod
@@ -560,8 +560,7 @@ Note that disabling OCaml (bindings) or Perl will have the knock-on
effect of disabling parts of the test suite and some tools.
OCaml is required to build libguestfs and this requirement cannot be
-removed. Using I<--disable-ocaml> only disables the bindings and
-OCaml tools.
+removed. Using I<--disable-ocaml> only disables the bindings.
=item B<--disable-fuse>
diff --git a/m4/guestfs-ocaml-gettext.m4 b/m4/guestfs-ocaml-gettext.m4
deleted file mode 100644
index ad1ca0d52..000000000
--- a/m4/guestfs-ocaml-gettext.m4
+++ /dev/null
@@ -1,64 +0,0 @@
-# libguestfs
-# Copyright (C) 2009-2020 Red Hat Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-dnl Write a common gettext module used by each OCaml tool.
-dnl If OCaml gettext is not available then we write dummy functions.
-
-AC_DEFUN([GUESTFS_CREATE_COMMON_GETTEXT_ML],[
- dnl Check for ocaml-gettext package to translate OCaml tools.
- AC_CHECK_OCAML_PKG(gettext)
-
- AC_MSG_NOTICE([creating $1])
- rm -f $1
-
- cat <<EOF > $1
-(* This file is generated automatically by ./configure. *)
-
-EOF
-
- if test "x$OCAML_PKG_gettext" != "xno"; then
- # ocaml-gettext available: real module.
- cat <<EOF >>$1
-module Gettext = Gettext.Program (
- struct
- let textdomain = "$PACKAGE_NAME"
- let codeset = None
- let dir = None
- let dependencies = [[]]
- end
-) (GettextStub.Native)
-EOF
- else
- # No gettext: module containing dummy gettext functions.
- cat <<EOF >>$1
-module Gettext = struct
- external s_ : string -> string = "%identity"
- external f_ : ('a, 'b, 'c, 'd, 'e, 'f) format6
- -> ('a, 'b, 'c, 'd, 'e, 'f) format6
- = "%identity"
- let sn_ : string -> string -> int -> string
- = fun s p n -> if n = 1 then s else p
- let fn_ : ('a, 'b, 'c, 'd, 'e, 'f) format6
- -> ('a, 'b, 'c, 'd, 'e, 'f) format6
- -> int -> ('a, 'b, 'c, 'd, 'e, 'f) format6
- = fun s p n -> if n = 1 then s else p
-end
-EOF
- fi
-
- chmod -w $1
-])
diff --git a/m4/guestfs-ocaml.m4 b/m4/guestfs-ocaml.m4
index 1023baebc..55508d6b9 100644
--- a/m4/guestfs-ocaml.m4
+++ b/m4/guestfs-ocaml.m4
@@ -15,7 +15,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-dnl Check for OCaml (required, for OCaml bindings and OCaml tools).
+dnl Check for OCaml (required)
dnl OCAMLC and OCAMLFIND have to be unset first, otherwise
dnl AC_CHECK_TOOL (inside AC_PROG_OCAML) will not look.
@@ -32,9 +32,9 @@ AS_IF([test "x$OCAMLFIND" = "xno"],[
AC_MSG_ERROR([OCaml findlib is required])
])
-dnl --disable-ocaml only disables OCaml bindings and OCaml virt tools.
+dnl --disable-ocaml only disables OCaml bindings.
AC_ARG_ENABLE([ocaml],
- AS_HELP_STRING([--disable-ocaml], [disable OCaml language bindings and tools]),
+ AS_HELP_STRING([--disable-ocaml], [disable OCaml language bindings]),
[],
[enable_ocaml=yes])
@@ -132,51 +132,29 @@ AS_IF([test "x$have_Hivex_OPEN_UNSAFE" = "xno"],[
])
AC_SUBST([HIVEX_OPEN_UNSAFE_FLAG])
-OCAML_PKG_gettext=no
-OCAML_PKG_ounit2=no
-ounit_is_v2=no
-AS_IF([test "x$OCAMLC" != "xno"],[
- # Create common/mlgettext/common_gettext.ml gettext functions or stubs.
-
- # If we're building in a different directory, then common/mlgettext
- # might not exist yet, so create it:
- mkdir -p common/mlgettext
-
- GUESTFS_CREATE_COMMON_GETTEXT_ML([common/mlgettext/common_gettext.ml])
-
- AC_CHECK_OCAML_PKG(ounit2)
-
- # oUnit >= 2 is required, so check that it has OUnit2.
- if test "x$OCAML_PKG_ounit2" != "xno"; then
- AC_CHECK_OCAML_MODULE(ounit_is_v2,[OUnit.OUnit2],OUnit2,[+ounit2])
- fi
-])
-AM_CONDITIONAL([HAVE_OCAML_PKG_GETTEXT],
- [test "x$OCAML_PKG_gettext" != "xno"])
+# oUnit is optional, used by some tests in common/mlstdutils (that we
+# should replace with regular tests one day). If used, oUnit >= 2 is
+# required.
+if test "x$OCAML_PKG_ounit2" != "xno"; then
+ AC_CHECK_OCAML_MODULE(ounit_is_v2,[OUnit.OUnit2],OUnit2,[+ounit2])
+fi
AM_CONDITIONAL([HAVE_OCAML_PKG_OUNIT],
[test "x$OCAML_PKG_ounit2" != "xno" && test "x$ounit_is_v2" != "xno"])
-AC_CHECK_PROG([OCAML_GETTEXT],[ocaml-gettext],[ocaml-gettext],[no])
-AM_CONDITIONAL([HAVE_OCAML_GETTEXT],
- [test "x$OCAML_PKG_gettext" != "xno" && test "x$OCAML_GETTEXT" != "xno"])
-
dnl Check if OCaml has caml_alloc_initialized_string (added 2017).
-AS_IF([test "x$OCAMLC" != "xno" && test "x$OCAMLFIND" != "xno" && \
- test "x$enable_ocaml" = "xyes"],[
- AC_MSG_CHECKING([for caml_alloc_initialized_string])
- cat >conftest.c <<'EOF'
+AC_MSG_CHECKING([for caml_alloc_initialized_string])
+cat >conftest.c <<'EOF'
#include <caml/alloc.h>
int main () { char *p = (void *) caml_alloc_initialized_string; return 0; }
EOF
- AS_IF([$OCAMLC conftest.c >&AS_MESSAGE_LOG_FD 2>&1],[
- AC_MSG_RESULT([yes])
- AC_DEFINE([HAVE_CAML_ALLOC_INITIALIZED_STRING],[1],
- [caml_alloc_initialized_string found at compile time.])
- ],[
- AC_MSG_RESULT([no])
- ])
- rm -f conftest.c conftest.o
+AS_IF([$OCAMLC conftest.c >&AS_MESSAGE_LOG_FD 2>&1],[
+ AC_MSG_RESULT([yes])
+ AC_DEFINE([HAVE_CAML_ALLOC_INITIALIZED_STRING],[1],
+ [caml_alloc_initialized_string found at compile time.])
+],[
+ AC_MSG_RESULT([no])
])
+rm -f conftest.c conftest.o
dnl Flags we want to pass to every OCaml compiler call.
OCAML_WARN_ERROR="-warn-error +C+D+E+F+L+M+P+S+U+V+Y+Z+X+52-3-6 -w -6"
diff --git a/po/Makefile.am b/po/Makefile.am
index f1509d60f..8b9c03720 100644
--- a/po/Makefile.am
+++ b/po/Makefile.am
@@ -26,13 +26,12 @@ MSGID_BUGS_ADDRESS = https://bugzilla.redhat.com/enter_bug.cgi?component=libgues
linguas := $(shell cat $(srcdir)/LINGUAS)
POTFILES := $(shell $(SED) 's,^,$(top_srcdir)/,' $(srcdir)/POTFILES)
-POTFILES_ML := $(shell $(SED) 's,^,$(top_srcdir)/,' $(srcdir)/POTFILES-ml)
POFILES := $(linguas:%=%.po)
GMOFILES := $(linguas:%=%.gmo)
EXTRA_DIST = \
LINGUAS \
- POTFILES POTFILES-ml \
+ POTFILES \
$(DOMAIN).pot \
$(POFILES) \
$(GMOFILES)
@@ -60,14 +59,9 @@ XGETTEXT_ARGS = \
FIX_CHARSET = \
$(SED) -i 's|text/plain; charset=CHARSET|text/plain; charset=utf-8|g'
-$(DOMAIN).pot: Makefile POTFILES $(POTFILES) POTFILES-ml $(POTFILES_ML)
+$(DOMAIN).pot: Makefile POTFILES $(POTFILES)
rm -f $@-t
touch $@-t
-if HAVE_OCAML_GETTEXT
- cd $(top_srcdir) && $(OCAML_GETTEXT) --action extract --extract-pot $(abs_srcdir)/$@-t $(shell cat $(abs_srcdir)/POTFILES-ml)
- \
- $(FIX_CHARSET) $@-t
-endif
$(XGETTEXT) -j -o $@-t $(XGETTEXT_ARGS) \
--files-from=$(abs_srcdir)/POTFILES
$(FIX_CHARSET) $@-t
diff --git a/po/POTFILES-ml b/po/POTFILES-ml
deleted file mode 100644
index 36932d142..000000000
--- a/po/POTFILES-ml
+++ /dev/null
@@ -1,6 +0,0 @@
-common/mlgettext/common_gettext.ml
-common/mlpcre/PCRE.ml
-common/mlstdutils/guestfs_config.ml
-common/mlstdutils/std_utils.ml
-common/mlstdutils/stringMap.ml
-common/mlstdutils/stringSet.ml

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:9dc22b6c5a45f19c2cba911a37b3a8d86f62744521b10eb53c3d3907e5080312
size 19189712

View File

@ -1,17 +0,0 @@
-----BEGIN PGP SIGNATURE-----
iQJFBAABCAAvFiEE93dPsa0HSn6Mh2fqkXOPc+G3aKAFAmLFql8RHHJpY2hAYW5u
ZXhpYS5vcmcACgkQkXOPc+G3aKAV2hAAzOcZseFTUFFoj4M5riqXqtBN3W+fr/O7
v0wzJ9sY31Ftk8KFKKgpwOn4UFXYMPXY7Hm94GRAYjYBAtx9Viyyt7B6PbV7mVZ0
WHLlZcg3ZsliF23s3EoHfgTGFfKLkjDwfPlmChC260Ffhq4KKvnwu/DobY/CDLHG
0cvrjb0OOYibBGbq58AHYR6QlVH/ScAuLSA1aRAd06bbpixufRR1oh1MtFA1iSvC
yjNH0joLFiu0uuD7KFH66YX2nFNrO24r0LxJkwT5G7GHlZJStJUpvs/QHa8Tw5Zt
Z1JMk9yB9EMPYimdVDm7m6eDBxTx8YbF7u6G8JdHRXgAPBt4O09XX7WGxxmh9Dc4
M+QkpiubEOG6qwBythJJ6sTSRLKIAPeVfHEOauXg8n45Tbk5jYwthMKbnD9ETb3t
QKdMr5g+DZUO0LfbOvP0GtD+b1jK4iu4BcWDquQBXpDTbx7LUfSuTDrWItehEnBp
/K6FRbakNZEroLR5VA9WAa6sE+2B3gg1OG+KHypHuw4hfpmutvVA8wnPgyw3j+WK
xdcRp65NUMUkKRE/FTwp1MkY1Y2S9M9iAPX+CopdHPVoq9O2YE+K6Rv1EdJjmKZK
EwLzX08Xcj9T/U9GEfV+QdIzitCuxf7x9ULEDcFozFnuHXww+JLdR0EmIDkUwl7C
Z0KKsy18Eq8=
=WB1H
-----END PGP SIGNATURE-----

3
libguestfs-1.48.6.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:0c03cdb2f3460fa492e8423a003e3aa7d51a1311906e01467d1fb90ebf336ac5
size 19179600

View File

@ -0,0 +1,17 @@
-----BEGIN PGP SIGNATURE-----
iQJFBAABCAAvFiEE93dPsa0HSn6Mh2fqkXOPc+G3aKAFAmOEn2URHHJpY2hAYW5u
ZXhpYS5vcmcACgkQkXOPc+G3aKCUZQ/+NqyxeiHmbcAUVZgaS8R5z8qqzwQQedRR
gUzUIk5bdH/AKNCZ6cr/pMUMdo5TEtR2V5z8RFD0pe9maYLmGOosxpFHOHELasrr
KO3l5uWz/swBUTR83IJi3LU1bu91dwoaGmIQA1KGy8wcaA6z9mwxWtNbx4pF7jqM
evWZZE/rLRyLze4tiUU0bzbYhpIu31PZ5hd9o+FPj6TbmRFwn3jbc1wfWuDxXG3D
igYkd+RbaeI09VdslcNzCxdZc3yeaunq/v0kI32OIqltOpw98RUv8zFxxZbgWPP5
zb6JaAAs3ThZVqesFvfVxRbArxpi4Sfr1L6b0TsHb22p9ACLNS3taJhnsUrFQtx9
fC6g8u45tDalV14cylyyH5yZ4iCShzf5iHKGdXi/dxyS1xilkcsesgABuv/m8XRC
X8rtiDme8CETtTcxXdATgsmfjoyba9IdS4pUq+JC5jpRbIHek3fSffSxGnzydj+d
PwfLEXZlZbxNuCOmdpXUUbwyIoUw7xajVSn+dZAkdnosn0u4JberGdrG/A/bvDOQ
8ABSYE8Rs1iqIFcMl9uwqDtVf0hsNcGC4K5YTLRIODuiOm7H3JfbT7GT4L6lz4K8
hmelktKn4Mq4iLsgrEj1ZHEzJ2jgEFcv4TZoAYwpbH2xXwj6b/9NqycOeHQaQMR1
/m3Ri79S9x8=
=EbDM
-----END PGP SIGNATURE-----

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Tue Nov 29 11:45:36 MST 2022 - carnold@suse.com
- Update to version 1.48.6
* This is a bug fix release. No upstream changelog.
- Drop f162e47e-m4-Fix-configure-disable-ocaml.patch
-------------------------------------------------------------------
Thu Oct 20 13:40:22 UTC 2022 - Ludwig Nussel <lnussel@suse.de>

View File

@ -18,7 +18,7 @@
Name: libguestfs
ExclusiveArch: x86_64 ppc64 ppc64le s390x aarch64
Version: 1.48.4
Version: 1.48.6
Release: 0
Summary: Access and modify virtual machine disk images
License: GPL-2.0-or-later
@ -32,7 +32,6 @@ Source100: mount-rootfs-and-chroot.sh
Source101: README
# Patches
Patch1: f162e47e-m4-Fix-configure-disable-ocaml.patch
BuildRequires: bison
BuildRequires: file-devel
@ -47,6 +46,7 @@ BuildRequires: ocaml-hivex-devel
BuildRequires: po4a
BuildRequires: readline-devel
BuildRequires: supermin >= 5.1.18
BuildRequires: zstd
BuildRequires: ocamlfind(findlib)
BuildRequires: perl(Getopt::Long)
BuildRequires: perl(Locale::TextDomain)