Brought to you by the "I haven't rebuilt the libguestfs universe in a while" saga -- now with working test suite. Pino Toscano (5): build: remove extra gnulib submodule build: remove extra checks and submodules build: stop using gnulib in test-harness build: remove unused gnulib modules Remove extra entries from podfiles .gitmodules | 3 -- Makefile.am | 2 - bootstrap | 61 +-------------------------- configure.ac | 2 - m4/guestfs-c.m4 | 12 ------ m4/guestfs-libraries.m4 | 90 +--------------------------------------- m4/guestfs-perl.m4 | 27 +----------- m4/guestfs-progs.m4 | 14 +------ po-docs/podfiles | 12 ------ test-harness/Makefile.am | 4 +- 10 files changed, 5 insertions(+), 222 deletions(-) -- 2.21.0
Pino Toscano
2019-Nov-27 14:40 UTC
[Libguestfs] [v2v PATCH v2 1/5] build: remove extra gnulib submodule
There is already the "gnulib" submodule, so the ".gnulib" submodule is redundant. Moreover, it is not actually used by git, as its name starts with dot (which is a configuration separator). --- .gitmodules | 3 --- 1 file changed, 3 deletions(-) diff --git a/.gitmodules b/.gitmodules index f42d9bc7..fb96af87 100644 --- a/.gitmodules +++ b/.gitmodules @@ -4,6 +4,3 @@ [submodule "common"] path = common url = https://github.com/libguestfs/libguestfs-common -[submodule ".gnulib"] - path = .gnulib - url = https://git.savannah.gnu.org/git/gnulib.git -- 2.21.0
Pino Toscano
2019-Nov-27 14:40 UTC
[Libguestfs] [v2v PATCH v2 2/5] build: remove extra checks and submodules
Remove various redundant checks for headers, functions, libraries,
tools, and other stuff not actually used neither by virt-v2v nor by its
submodules from common.
Also, stop building the mlaugeas, and windows submodules, as they are
not used.
---
Makefile.am | 2 -
configure.ac | 2 -
m4/guestfs-c.m4 | 12 ------
m4/guestfs-libraries.m4 | 90 +----------------------------------------
m4/guestfs-perl.m4 | 27 +------------
m4/guestfs-progs.m4 | 14 +------
6 files changed, 3 insertions(+), 144 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index e80076bb..039921c2 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -34,10 +34,8 @@ endif
SUBDIRS += common/qemuopts
SUBDIRS += common/utils
SUBDIRS += common/mlutils
-SUBDIRS += common/mlaugeas
SUBDIRS += common/mlpcre
SUBDIRS += common/options
-SUBDIRS += common/windows
SUBDIRS += common/mlgettext
SUBDIRS += common/mlxml
SUBDIRS += common/mltools
diff --git a/configure.ac b/configure.ac
index fa893380..bc199df9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -102,7 +102,6 @@ dnl NB: Remove common/mlstdutils/guestfs_config.ml in future
XXX
AC_CONFIG_FILES([Makefile
bash/Makefile
common/options/Makefile
- common/mlaugeas/Makefile
common/mlcustomize/Makefile
common/mlgettext/Makefile
common/mllibvirt/Makefile
@@ -115,7 +114,6 @@ AC_CONFIG_FILES([Makefile
common/mlxml/Makefile
common/qemuopts/Makefile
common/utils/Makefile
- common/windows/Makefile
docs/Makefile
gnulib/lib/Makefile
gnulib/tests/Makefile
diff --git a/m4/guestfs-c.m4 b/m4/guestfs-c.m4
index e20721f5..55b180e0 100644
--- a/m4/guestfs-c.m4
+++ b/m4/guestfs-c.m4
@@ -138,18 +138,6 @@ AM_PROG_CC_C_O
# deal with CPU architectures that do not exist.
CFLAGS="$CFLAGS -fno-strict-overflow -Wno-strict-overflow"
-dnl Work out how to specify the linker script to the linker.
-VERSION_SCRIPT_FLAGS=-Wl,--version-script-`/usr/bin/ld --help 2>&1 |
grep -- --version-script >/dev/null` || \
- VERSION_SCRIPT_FLAGS="-Wl,-M -Wl,"
-AC_SUBST(VERSION_SCRIPT_FLAGS)
-
-dnl Use -fvisibility=hidden by default in the library.
-dnl http://gcc.gnu.org/wiki/Visibility
-AS_IF([test -n "$GCC"],
- [AC_SUBST([GCC_VISIBILITY_HIDDEN], [-fvisibility=hidden])],
- [AC_SUBST([GCC_VISIBILITY_HIDDEN], [:])])
-
dnl Check support for 64 bit file offsets.
AC_SYS_LARGEFILE
diff --git a/m4/guestfs-libraries.m4 b/m4/guestfs-libraries.m4
index 09d764f8..41f3a975 100644
--- a/m4/guestfs-libraries.m4
+++ b/m4/guestfs-libraries.m4
@@ -26,17 +26,9 @@ AC_DEFINE_UNQUOTED([host_cpu],["$host_cpu"],[Host
architecture.])
dnl Headers.
AC_CHECK_HEADERS([\
byteswap.h \
- endian.h \
- sys/endian.h \
errno.h \
- linux/fs.h \
linux/magic.h \
- linux/raid/md_u.h \
- linux/rtc.h \
- printf.h \
- sys/inotify.h \
sys/mount.h \
- sys/resource.h \
sys/socket.h \
sys/statfs.h \
sys/statvfs.h \
@@ -45,33 +37,12 @@ AC_CHECK_HEADERS([\
sys/un.h \
sys/vfs.h \
sys/wait.h \
- windows.h \
- sys/xattr.h])
+ windows.h])
dnl Functions.
AC_CHECK_FUNCS([\
- be32toh \
fsync \
- futimens \
- getxattr \
- htonl \
- htons \
- inotify_init1 \
- lgetxattr \
- listxattr \
- llistxattr \
- lsetxattr \
- lremovexattr \
- mknod \
- ntohl \
- ntohs \
- posix_fallocate \
posix_fadvise \
- removexattr \
- setitimer \
- setrlimit \
- setxattr \
- sigaction \
statfs \
statvfs \
sync])
@@ -79,30 +50,6 @@ AC_CHECK_FUNCS([\
dnl Which header file defines major, minor, makedev.
AC_HEADER_MAJOR
-dnl Check for UNIX_PATH_MAX, creating a custom one if not available.
-AC_MSG_CHECKING([for UNIX_PATH_MAX])
-AC_COMPILE_IFELSE([
- AC_LANG_PROGRAM([[
-#include <sys/un.h>
- ]], [[
-#ifndef UNIX_PATH_MAX
-#error UNIX_PATH_MAX not defined
-#endif
- ]])], [
- AC_MSG_RESULT([yes])
- ], [
- AC_MSG_RESULT([no])
- AC_MSG_CHECKING([for size of sockaddr_un.sun_path])
- AC_COMPUTE_INT(unix_path_max, [sizeof (myaddr.sun_path)], [
-#include <sys/un.h>
-struct sockaddr_un myaddr;
- ], [
- AC_MSG_ERROR([cannot get it])
- ])
- AC_MSG_RESULT([$unix_path_max])
- AC_DEFINE_UNQUOTED([UNIX_PATH_MAX], $unix_path_max, [Custom value for
UNIX_PATH_MAX])
- ])
-
dnl GNU gettext tools (optional).
AC_CHECK_PROG([XGETTEXT],[xgettext],[xgettext],[no])
AC_CHECK_PROG([MSGCAT],[msgcat],[msgcat],[no])
@@ -123,22 +70,6 @@ AM_CONDITIONAL([HAVE_GNU_GETTEXT],
dnl Check for gettext.
AM_GNU_GETTEXT([external])
-dnl Check for libselinux (optional).
-AC_CHECK_HEADERS([selinux/selinux.h])
-AC_CHECK_LIB([selinux],[setexeccon],[
- have_libselinux="$ac_cv_header_selinux_selinux_h"
- SELINUX_LIBS="-lselinux"
-
- old_LIBS="$LIBS"
- LIBS="$LIBS $SELINUX_LIBS"
- AC_CHECK_FUNCS([setcon getcon])
- LIBS="$old_LIBS"
-],[have_libselinux=no])
-if test "x$have_libselinux" = "xyes"; then
- AC_DEFINE([HAVE_LIBSELINUX],[1],[Define to 1 if you have libselinux.])
-fi
-AC_SUBST([SELINUX_LIBS])
-
dnl Check for PCRE (required)
PKG_CHECK_MODULES([PCRE], [libpcre], [], [
AC_CHECK_PROGS([PCRE_CONFIG], [pcre-config pcre2-config], [no])
@@ -149,25 +80,6 @@ PKG_CHECK_MODULES([PCRE], [libpcre], [], [
PCRE_LIBS=`$PCRE_CONFIG --libs`
])
-dnl Check for Augeas >= 1.2.0 (required).
-PKG_CHECK_MODULES([AUGEAS],[augeas >= 1.2.0])
-
-dnl Check for aug_source function, added in Augeas 1.8.0.
-old_LIBS="$LIBS"
-LIBS="$AUGEAS_LIBS"
-AC_CHECK_FUNCS([aug_source])
-LIBS="$old_LIBS"
-
-dnl libmagic (required)
-AC_CHECK_LIB([magic],[magic_file],[
- AC_CHECK_HEADER([magic.h],[
- AC_SUBST([MAGIC_LIBS], ["-lmagic"])
- ], [])
-],[])
-AS_IF([test -z "$MAGIC_LIBS"],
- [AC_MSG_ERROR([libmagic (part of the "file" command) is required.
- Please install the file devel package])])
-
dnl libvirt (highly recommended)
AC_ARG_WITH([libvirt],[
AS_HELP_STRING([--without-libvirt],
diff --git a/m4/guestfs-perl.m4 b/m4/guestfs-perl.m4
index 71d02d97..16a83752 100644
--- a/m4/guestfs-perl.m4
+++ b/m4/guestfs-perl.m4
@@ -38,35 +38,10 @@ dnl Define the path to the podwrapper program.
PODWRAPPER="\$(guestfs_am_v_podwrapper)$PERL $(pwd)/podwrapper.pl"
AC_SUBST([PODWRAPPER])
-dnl Check for Perl for Perl bindings and Perl tools.
-AC_ARG_ENABLE([perl],
- AS_HELP_STRING([--disable-perl], [disable Perl language bindings]),
- [],
- [enable_perl=yes])
-AS_IF([test "x$enable_perl" != "xno"],[
- dnl Check for Perl modules that must be present to compile and
- dnl test the Perl bindings.
- missing_perl_modules=no
- for pm in Test::More Module::Build; do
- AC_MSG_CHECKING([for $pm])
- if ! $PERL -M$pm -e1 >&AS_MESSAGE_LOG_FD 2>&1; then
- AC_MSG_RESULT([no])
- missing_perl_modules=yes
- else
- AC_MSG_RESULT([yes])
- fi
- done
- if test "x$missing_perl_modules" = "xyes"; then
- AC_MSG_WARN([some Perl modules required to compile or test the Perl
bindings are missing])
- fi
-])
-AM_CONDITIONAL([HAVE_PERL],
- [test "x$enable_perl" != "xno" && test
"x$PERL" != "xno" && test
"x$missing_perl_modules" != "xyes"])
-
dnl Check for Perl modules needed by Perl virt tools (virt-df, etc.)
AS_IF([test "x$PERL" != "xno"],[
missing_perl_modules=no
- for pm in Pod::Usage Getopt::Long Sys::Virt Locale::TextDomain Win::Hivex
Win::Hivex::Regedit ; do
+ for pm in Pod::Usage Getopt::Long ; do
AC_MSG_CHECKING([for $pm])
if ! $PERL -M$pm -e1 >&AS_MESSAGE_LOG_FD 2>&1; then
AC_MSG_RESULT([no])
diff --git a/m4/guestfs-progs.m4 b/m4/guestfs-progs.m4
index 97a5bfc3..5f481a75 100644
--- a/m4/guestfs-progs.m4
+++ b/m4/guestfs-progs.m4
@@ -48,12 +48,8 @@ dnl po4a for translating man pages and POD files (optional).
AC_CHECK_PROG([PO4A],[po4a],[po4a],[no])
AM_CONDITIONAL([HAVE_PO4A], [test "x$PO4A" != "xno"])
-dnl Check for db_dump, db_load (optional).
-GUESTFS_FIND_DB_TOOL([DB_DUMP], [dump])
+dnl Check for db_load (optional).
GUESTFS_FIND_DB_TOOL([DB_LOAD], [load])
-if test "x$DB_DUMP" != "xno"; then
- AC_DEFINE_UNQUOTED([DB_DUMP],["$DB_DUMP"],[Name of db_dump
program.])
-fi
if test "x$DB_LOAD" != "xno"; then
AC_DEFINE_UNQUOTED([DB_LOAD],["$DB_LOAD"],[Name of db_load
program.])
fi
@@ -77,11 +73,3 @@ AS_IF([test "x$VALGRIND" != "xno"],[
])
AC_SUBST([VG])
AM_SUBST_NOTMAKE([VG])
-
-dnl Check for fuser (used in FUSE stuff).
-AC_PATH_PROGS([FUSER],[fuser],[/sbin/fuser])
-AC_DEFINE_UNQUOTED([FUSER],["$FUSER"],[Name of fuser program.])
-
-dnl Check for true (used in tests).
-AC_PATH_PROGS([TOOL_TRUE],[true],[/bin/true])
-AC_DEFINE_UNQUOTED([TOOL_TRUE],["$TOOL_TRUE"],[Name of 'true'
program.])
--
2.21.0
Pino Toscano
2019-Nov-27 14:40 UTC
[Libguestfs] [v2v PATCH v2 3/5] build: stop using gnulib in test-harness
It does not directly use gnulib headers, and none of its OCaml helper submodules link to gnulib. --- test-harness/Makefile.am | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/test-harness/Makefile.am b/test-harness/Makefile.am index aef00d6d..157cee4f 100644 --- a/test-harness/Makefile.am +++ b/test-harness/Makefile.am @@ -39,7 +39,6 @@ OCAMLPACKAGES = \ -package str,unix,guestfs \ -I $(top_builddir)/common/utils/.libs \ -I $(top_builddir)/lib/.libs \ - -I $(top_builddir)/gnulib/lib/.libs \ -I $(top_builddir)/common/mlstdutils \ -I $(top_builddir)/common/mlxml \ -I $(top_builddir)/common/mltools \ @@ -73,8 +72,7 @@ libv2vth_a_CPPFLAGS = \ -DGUESTFS_PRIVATE=1 \ -I$(top_builddir) -I$(OCAMLLIB) \ -I$(top_srcdir)/common/utils -I$(top_builddir)/common/utils \ - -I$(top_srcdir)/lib -I$(top_builddir)/lib \ - -I$(top_srcdir)/gnulib/lib -I$(top_builddir)/gnulib/lib + -I$(top_srcdir)/lib -I$(top_builddir)/lib libv2vth_a_CFLAGS = \ $(WARN_CFLAGS) $(WERROR_CFLAGS) \ -- 2.21.0
Pino Toscano
2019-Nov-27 14:40 UTC
[Libguestfs] [v2v PATCH v2 4/5] build: remove unused gnulib modules
Leave only the modules explicitly used. --- bootstrap | 61 +------------------------------------------------------ 1 file changed, 1 insertion(+), 60 deletions(-) diff --git a/bootstrap b/bootstrap index aaf038d9..f8bcb629 100755 --- a/bootstrap +++ b/bootstrap @@ -103,80 +103,21 @@ gnulib_tool=$GNULIB_SRCDIR/gnulib-tool <$gnulib_tool || exit modules=' -accept4 -areadlink -areadlinkat -arpa_inet -base64 -byteswap c-ctype -cloexec -closeout -connect -dup3 -error -filevercmp -fstatat -fts -full-read -full-write -futimens -getaddrinfo -getline getprogname -gitlog-to-changelog -glob -gnu-make -gnumakefile hash -hash-pjw -human -iconv ignore-value -intprops lock maintainer-makefile manywarnings -memmem -mkdtemp -mkstemps -netdb -netinet_in -nonblocking -openat -perror -pipe2 -pread -ptsname_r -read-file -readlink -select -setenv -sleep -socket -stat-time -strchrnul -strerror -strndup -symlinkat -sys_select sys_types -sys_wait tls -vasprintf -vc-list-files -warnings -xalloc -xalloc-die -xgetcwd xstrtol -xstrtoll -xvasprintf ' # If any tests fail, avoid including them by adding them to # this list. -avoid="--avoid=dummy --avoid=getlogin_r-tests" +avoid="" $gnulib_tool \ $avoid \ -- 2.21.0
Pino Toscano
2019-Nov-27 14:40 UTC
[Libguestfs] [v2v PATCH v2 5/5] Remove extra entries from podfiles
--- po-docs/podfiles | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/po-docs/podfiles b/po-docs/podfiles index d1f86067..1623f848 100644 --- a/po-docs/podfiles +++ b/po-docs/podfiles @@ -10,15 +10,3 @@ ../docs/virt-v2v-support.pod ../docs/virt-v2v.pod ../test-harness/virt-v2v-test-harness.pod -../virt-v2v-1.41.8/common/mlcustomize/customize-options.pod -../virt-v2v-1.41.8/common/mlcustomize/customize-synopsis.pod -../virt-v2v-1.41.8/docs/virt-v2v-copy-to-local.pod -../virt-v2v-1.41.8/docs/virt-v2v-hacking.pod -../virt-v2v-1.41.8/docs/virt-v2v-input-vmware.pod -../virt-v2v-1.41.8/docs/virt-v2v-input-xen.pod -../virt-v2v-1.41.8/docs/virt-v2v-output-local.pod -../virt-v2v-1.41.8/docs/virt-v2v-output-openstack.pod -../virt-v2v-1.41.8/docs/virt-v2v-output-rhv.pod -../virt-v2v-1.41.8/docs/virt-v2v-support.pod -../virt-v2v-1.41.8/docs/virt-v2v.pod -../virt-v2v-1.41.8/test-harness/virt-v2v-test-harness.pod -- 2.21.0
Maybe Matching Threads
- [v2v PATCH 0/5] Various build cleanups
- [PATCH 00/16] Refactoring of configure.ac and guestfs.pod
- [PATCH 0/9] Small bits of non-Linux porting - #2
- [PATCH v2 REPOST] lib: Allow db_dump package to be a weak dependency
- [PATCH v2 0/2] lib: Allow db_dump package to be a weak dependency