[Libguestfs] [PATCH v2 5/5] build: remove unused gnulib modules

Pino Toscano ptoscano at redhat.com
Mon Sep 23 16:23:21 UTC 2019


Remove gnulib modules that provide stuff clearly not used within
libguestfs (library, daemon, and C tools).  Among directly and
indirectly modules used previous (and now no more), they are:

  cycle-check
  d-ino
  dev-ino
  dup3
  dup3-tests
  fcntl-safer
  fcntl-safer-tests
  fdopendir
  fdopendir-tests
  filevercmp
  filevercmp-tests
  ftell
  ftell-tests
  ftello
  ftello-tests
  fts
  getaddrinfo
  getaddrinfo-tests
  getcwd
  getcwd-tests
  gnu-make
  hostent
  i-ring
  i-ring-tests
  iconv
  iconv-tests
  inet_ntop
  inet_ntop-tests
  isatty
  isatty-tests
  openat-safer
  openat-safer-tests
  opendirat
  ptsname_r
  ptsname_r-tests
  read-file
  read-file-tests
  rewinddir
  servent
  ttyname_r
  ttyname_r-tests
  xgetcwd

Some of the removed modules are still used pulled indirectly as
dependency of other modules.  There should be no behaviour change on
recent Linux distros, although older distros were not tested (adding
a module back is easy, anyway).

Remove accordingly unused automake variables, and ignored files.
---
 bootstrap          | 17 ---------------
 daemon/Makefile.am |  4 ----
 lib/Makefile.am    |  5 -----
 m4/.gitignore      | 52 ----------------------------------------------
 4 files changed, 78 deletions(-)

diff --git a/bootstrap b/bootstrap
index aaf038d98..9e5a8b72d 100755
--- a/bootstrap
+++ b/bootstrap
@@ -104,34 +104,26 @@ gnulib_tool=$GNULIB_SRCDIR/gnulib-tool
 
 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
@@ -141,24 +133,18 @@ 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
@@ -166,9 +152,6 @@ tls
 vasprintf
 vc-list-files
 warnings
-xalloc
-xalloc-die
-xgetcwd
 xstrtol
 xstrtoll
 xvasprintf
diff --git a/daemon/Makefile.am b/daemon/Makefile.am
index 49dbf1998..7c71920c4 100644
--- a/daemon/Makefile.am
+++ b/daemon/Makefile.am
@@ -225,13 +225,9 @@ guestfsd_LDADD = \
 	$(HIVEX_LIBS) \
 	$(SD_JOURNAL_LIBS) \
 	$(top_builddir)/gnulib/lib/.libs/libgnu.a \
-	$(GETADDRINFO_LIB) \
-	$(HOSTENT_LIB) \
-	$(INET_NTOP_LIB) \
 	$(LIBSOCKET) \
 	$(LIB_CLOCK_GETTIME) \
 	$(LIBINTL) \
-	$(SERVENT_LIB) \
 	$(PCRE_LIBS) \
 	$(TSK_LIBS) \
 	$(RPC_LIBS) \
diff --git a/lib/Makefile.am b/lib/Makefile.am
index 95b5edb4e..e5df96fe2 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -154,15 +154,10 @@ libguestfs_la_LIBADD = \
 	$(SELINUX_LIBS) \
 	$(JANSSON_LIBS) \
 	../gnulib/lib/libgnu.la \
-	$(GETADDRINFO_LIB) \
-	$(HOSTENT_LIB) \
-	$(INET_NTOP_LIB) \
 	$(LIBSOCKET) \
 	$(LIB_CLOCK_GETTIME) \
 	$(LTLIBINTL) \
 	$(LTLIBTHREAD) \
-	$(LTLIBICONV) \
-	$(SERVENT_LIB) \
 	$(RPC_LIBS)
 
 # Force libtool to name the library 'libguestfs.so.0.$(MAX_PROC_NR).0'.
diff --git a/m4/.gitignore b/m4/.gitignore
index 16ae9c415..c41044f84 100644
--- a/m4/.gitignore
+++ b/m4/.gitignore
@@ -2,51 +2,38 @@
 /absolute-header.m4
 /accept4.m4
 /alloca.m4
-/argmatch.m4
 /arpa_inet_h.m4
 /asm-underscore.m4
 /base64.m4
 /btowc.m4
 /builtin-expect.m4
 /byteswap.m4
-/canonicalize-lgpl.m4
 /chdir-long.m4
-/chown.m4
 /clock_time.m4
-/cloexec.m4
 /closedir.m4
 /close.m4
 /codeset.m4
 /ctype.m4
-/cycle-check.m4
-/d-ino.m4
 /dirent_h.m4
 /dirfd.m4
 /dirname.m4
-/dos.m4
 /double-slash-root.m4
 /d-type.m4
 /dup2.m4
-/dup3.m4
 /dup.m4
 /eealloc.m4
 /environ.m4
 /errno_h.m4
 /error.m4
-/exitfail.m4
 /exponentd.m4
 /extensions.m4
 /extern-inline.m4
 /fatal-signal.m4
 /fchdir.m4
-/fclose.m4
 /fcntl_h.m4
 /fcntl.m4
 /fcntl-o.m4
-/fcntl-safer.m4
-/fdopendir.m4
 /fdopen.m4
-/fflush.m4
 /filenamecat.m4
 /flexmember.m4
 /float_h.m4
@@ -54,23 +41,13 @@
 /fnmatch.m4
 /fpending.m4
 /fpieee.m4
-/fpurge.m4
-/freading.m4
-/fseeko.m4
 /fstatat.m4
 /fstat.m4
-/ftell.m4
-/ftello.m4
 /ftruncate.m4
-/fts.m4
 /futimens.m4
-/getaddrinfo.m4
-/getcwd-abort-bug.m4
 /getcwd.m4
-/getcwd-path-max.m4
 /getdelim.m4
 /getdtablesize.m4
-/getgroups.m4
 /getline.m4
 /getlogin.m4
 /getlogin_r.m4
@@ -79,20 +56,14 @@
 /getprogname.m4
 /gettime.m4
 /gettimeofday.m4
-/getugroups.m4
 /glob_h.m4
 /glob.m4
 /gnulib-common.m4
 /gnulib-comp.m4
 /gnulib-tool.m4
-/gnu-make.m4
-/hash.m4
 /host-cpu-c-abi.m4
-/hostent.m4
 /human.m4
-/iconv.m4
 /include_next.m4
-/inet_ntop.m4
 /inet_pton.m4
 /__inline.m4
 /intlmacosx.m4
@@ -103,13 +74,9 @@
 /inttypes.m4
 /inttypes-pri.m4
 /ioctl.m4
-/i-ring.m4
-/isatty.m4
 /isblank.m4
-/isc-posix.m4
 /langinfo_h.m4
 /largefile.m4
-/lchown.m4
 /lcmessage.m4
 /lib-ld.m4
 /lib-link.m4
@@ -125,7 +92,6 @@
 /locale-zh.m4
 /localtime-buffer.m4
 /lock.m4
-/longdouble.m4
 /longlong.m4
 /lseek.m4
 /lstat.m4
@@ -143,7 +109,6 @@
 /memmem.m4
 /mempcpy.m4
 /memrchr.m4
-/mgetgroups.m4
 /minmax.m4
 /mkdir.m4
 /mkdtemp.m4
@@ -175,26 +140,22 @@
 /pthread_rwlock_rdlock.m4
 /pthread_sigmask.m4
 /pthread-thread.m4
-/ptsname_r.m4
 /putenv.m4
 /quotearg.m4
 /quote.m4
 /raise.m4
 /rawmemchr.m4
 /readdir.m4
-/read-file.m4
 /readlinkat.m4
 /readlink.m4
 /read.m4
 /realloc.m4
-/rewinddir.m4
 /rmdir.m4
 /safe-read.m4
 /safe-write.m4
 /save-cwd.m4
 /sched_h.m4
 /select.m4
-/servent.m4
 /setenv.m4
 /setlocale.m4
 /sh-filename.m4
@@ -202,7 +163,6 @@
 /sig_atomic_t.m4
 /signalblocking.m4
 /signal_h.m4
-/signed.m4
 /size_max.m4
 /sleep.m4
 /snprintf.m4
@@ -230,11 +190,8 @@
 /string_h.m4
 /strndup.m4
 /strnlen.m4
-/strtoimax.m4
 /strtoll.m4
-/strtol.m4
 /strtoull.m4
-/strtoul.m4
 /strtoumax.m4
 /symlinkat.m4
 /symlink.m4
@@ -252,16 +209,12 @@
 /time_h.m4
 /timespec.m4
 /tls.m4
-/ttyname_r.m4
-/ulonglong.m4
-/ungetc.m4
 /unistd_h.m4
 /unistd-safer.m4
 /unlinkat.m4
 /unlinkdir.m4
 /unlink.m4
 /usleep.m4
-/utimbuf.m4
 /utimecmp.m4
 /utime_h.m4
 /utime.m4
@@ -276,20 +229,15 @@
 /warnings.m4
 /warn-on-use.m4
 /wchar_h.m4
-/wchar.m4
 /wchar_t.m4
 /wcrtomb.m4
 /wctob.m4
 /wctomb.m4
 /wctype_h.m4
-/wctype.m4
 /wint_t.m4
 /write.m4
 /xalloc.m4
-/xgetcwd.m4
 /xsize.m4
-/xstrndup.m4
-/xstrtol.m4
 /xstrtol.m4
 /xvasprintf.m4
 /yield.m4
-- 
2.21.0




More information about the Libguestfs mailing list