[Libguestfs] [PATCH 2/2] build: switch embedded copy of ocaml-augeas

Pino Toscano ptoscano at redhat.com
Mon Dec 16 15:57:34 UTC 2019


Use the newer copy shipped locally as 3rdparty, 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..3409782af 100644
--- a/.gitignore
+++ b/.gitignore
@@ -34,6 +34,7 @@ Makefile.in
 
 /.sc-*
 
+/3rdparty/ocaml-augeas/.depend
 /aclocal.m4
 /align/stamp-virt-alignment-scan.pod
 /align/virt-alignment-scan
diff --git a/Makefile.am b/Makefile.am
index 65106369e..0c52806bd 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 += 3rdparty/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/|3rdparty/)' | \
 	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|3rdparty)/' | \
 	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..e72c46709 100644
--- a/configure.ac
+++ b/configure.ac
@@ -213,6 +213,7 @@ AC_CONFIG_FILES([run],
                 [chmod +x,-w run])
 
 AC_CONFIG_FILES([Makefile
+                 3rdparty/ocaml-augeas/Makefile
                  align/Makefile
                  appliance/Makefile
                  bash/Makefile
@@ -226,7 +227,6 @@ AC_CONFIG_FILES([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..f6852fcb5 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../3rdparty/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)/3rdparty/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..26874384f 100644
--- a/docs/guestfs-hacking.pod
+++ b/docs/guestfs-hacking.pod
@@ -51,6 +51,20 @@ then you may find files which appear to be missing.
 
 =over 4
 
+=item F<3rdparty>
+
+Embedded copies of other libraries, mostly for convenience (and the embedded
+library is not widespread enough).
+
+=over 4
+
+=item F<3rdparty/ocaml-augeas>
+
+Bindings for the Augeas library.  These come from the ocaml-augeas
+library L<http://git.annexia.org/?p=ocaml-augeas.git>
+
+=back
+
 =item F<align>
 
 L<virt-alignment-scan(1)> command and documentation.
@@ -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<common/mlaugeas>
-
-Bindings for the Augeas library.  These come from the ocaml-augeas
-library L<http://git.annexia.org/?p=ocaml-augeas.git>
-
 =item F<common/mlcustomize>
 
 Library code associated with C<virt-customize> but also used in other
diff --git a/ocaml-dep.sh.in b/ocaml-dep.sh.in
index 9de8497fd..a68631fff 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
+3rdparty/ocaml-augeas
 common/mlgettext
 common/mlpcre
 common/mlprogress
-- 
2.23.0




More information about the Libguestfs mailing list