From fb7e21be9620f5862d2a9692be423ed69826f773 Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Mon, 16 Dec 2019 16:42:24 +0100 Subject: [PATCH] build: switch embedded copy of ocaml-augeas Use the newer copy shipped locally as bundled, instead of the one in the common submodule, as the latter copy will go away soon. --- .gitignore | 1 + Makefile.am | 6 +++--- configure.ac | 2 +- daemon/Makefile.am | 4 ++-- docs/guestfs-hacking.pod | 19 ++++++++++++++----- ocaml-dep.sh.in | 2 +- 6 files changed, 22 insertions(+), 12 deletions(-) diff --git a/.gitignore b/.gitignore index 8dfd2895c..7efd9b907 100644 --- a/.gitignore +++ b/.gitignore @@ -109,6 +109,7 @@ Makefile.in /builder/virt-index-validate /builder/virt-index-validate.1 /builder/*.xz +/bundled/ocaml-augeas/.depend /cat/stamp-virt-*.pod /cat/virt-cat /cat/virt-cat.1 diff --git a/Makefile.am b/Makefile.am index 65106369e..daa1b5bd6 100644 --- a/Makefile.am +++ b/Makefile.am @@ -45,7 +45,7 @@ SUBDIRS += lib docs examples # The daemon and the appliance. SUBDIRS += common/mlutils -SUBDIRS += common/mlaugeas +SUBDIRS += bundled/ocaml-augeas SUBDIRS += common/mlpcre if ENABLE_DAEMON SUBDIRS += daemon @@ -316,7 +316,7 @@ ChangeLog: configure.ac docs/C_SOURCE_FILES: configure.ac rm -f $@ $@-t find $(DIST_SUBDIRS) -name '*.[ch]' | \ - grep -v -E '^(builder/index-parse\.|builder/index-scan\.|common/mllibvirt/libvirt_c\.c|examples/|gnulib/|gobject/|java/com_redhat_et_libguestfs|perl/|php/extension/config\.h|ruby/ext/guestfs/extconf\.h|tests/|test-data/)' | \ + grep -v -E '^(builder/index-parse\.|builder/index-scan\.|common/mllibvirt/libvirt_c\.c|examples/|gnulib/|gobject/|java/com_redhat_et_libguestfs|perl/|php/extension/config\.h|ruby/ext/guestfs/extconf\.h|tests/|test-data/|bundled/)' | \ grep -v -E '/(guestfs|rc)_protocol\.' | \ grep -v -E '.*/errnostring\.' | \ grep -v -E '.*-gperf\.' | \ @@ -328,7 +328,7 @@ po/POTFILES: configure.ac rm -f $@ $@-t cd $(srcdir); \ find $(DIST_SUBDIRS) -name '*.c' -o -name '*.pl' -o -name '*.pm' | \ - grep -v -E '^(examples|gnulib|perl/(blib|examples)|po-docs|tests|test-data)/' | \ + grep -v -E '^(examples|gnulib|perl/(blib|examples)|po-docs|tests|test-data|bundled)/' | \ grep -v -E '/((guestfs|rc)_protocol\.c)$$' | \ grep -v -E '^python/utils\.c$$' | \ grep -v -E '^perl/lib/Sys/Guestfs\.c$$' | \ diff --git a/configure.ac b/configure.ac index 64f352323..5f8310a64 100644 --- a/configure.ac +++ b/configure.ac @@ -223,10 +223,10 @@ AC_CONFIG_FILES([Makefile builder/test-config/virt-builder/repos.d/test-index.conf builder/test-simplestreams/virt-builder/repos.d/cirros.conf builder/test-website/virt-builder/repos.d/libguestfs.conf + bundled/ocaml-augeas/Makefile cat/Makefile common/errnostring/Makefile common/edit/Makefile - common/mlaugeas/Makefile common/mlcustomize/Makefile common/mlgettext/Makefile common/mlpcre/Makefile diff --git a/daemon/Makefile.am b/daemon/Makefile.am index 20440aaee..ab3019cc1 100644 --- a/daemon/Makefile.am +++ b/daemon/Makefile.am @@ -214,7 +214,7 @@ guestfsd_LDFLAGS = \ -L$(shell $(OCAMLC) -where)/hivex \ -L../common/mlutils \ -L../common/mlstdutils \ - -L../common/mlaugeas \ + -L../bundled/ocaml-augeas \ -L../common/mlpcre guestfsd_LDADD = \ ../common/errnostring/liberrnostring.la \ @@ -341,7 +341,7 @@ XOBJECTS = $(BOBJECTS:.cmo=.cmx) OCAMLPACKAGES = \ -package str,unix,hivex \ - -I $(top_builddir)/common/mlaugeas \ + -I $(top_builddir)/bundled/ocaml-augeas \ -I $(top_builddir)/common/mlstdutils \ -I $(top_builddir)/common/mlutils \ -I $(top_builddir)/common/utils/.libs \ diff --git a/docs/guestfs-hacking.pod b/docs/guestfs-hacking.pod index 9ee448d57..39591c103 100644 --- a/docs/guestfs-hacking.pod +++ b/docs/guestfs-hacking.pod @@ -71,6 +71,20 @@ Various build scripts used by autotools. L command and documentation. +=item F + +Embedded copies of other libraries, mostly for convenience (and the embedded +library is not widespread enough). + +=over 4 + +=item F + +Bindings for the Augeas library. These come from the ocaml-augeas +library L + +=back + =item F The L, L, L, @@ -94,11 +108,6 @@ The communication protocol used between the library and the daemon running inside the appliance has to encode errnos as strings, which is handled by this library. -=item F - -Bindings for the Augeas library. These come from the ocaml-augeas -library L - =item F Library code associated with C but also used in other diff --git a/ocaml-dep.sh.in b/ocaml-dep.sh.in index 9de8497fd..b92e67fcf 100755 --- a/ocaml-dep.sh.in +++ b/ocaml-dep.sh.in @@ -33,7 +33,7 @@ set -e # directories must have unique names (eg. not ‘Utils’) else # dependencies don't get built right. include_dirs=" -common/mlaugeas +bundled/ocaml-augeas common/mlgettext common/mlpcre common/mlprogress