[Libguestfs] [PATCH] build: remove unused gnulib modules
Richard W.M. Jones
rjones at redhat.com
Wed Sep 18 17:24:54 UTC 2019
On Wed, Sep 18, 2019 at 06:51:15PM +0200, Pino Toscano wrote:
> 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
> dev-ino
> dup3
> dup3-tests
> fcntl-safer
> fcntl-safer-tests
> filevercmp
> filevercmp-tests
> fts
> getaddrinfo
> getaddrinfo-tests
> hostent
> i-ring
> i-ring-tests
> inet_ntop
> inet_ntop-tests
> isatty
> isatty-tests
> openat-safer
> openat-safer-tests
> opendirat
> ptsname_r
> ptsname_r-tests
> servent
> ttyname_r
> ttyname_r-tests
>
> 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.
ACK
Out of interest how did you determine this?
Rich.
> bootstrap | 9 ---------
> daemon/Makefile.am | 4 ----
> lib/Makefile.am | 4 ----
> m4/.gitignore | 39 ---------------------------------------
> 4 files changed, 56 deletions(-)
>
> diff --git a/bootstrap b/bootstrap
> index aaf038d98..ee253b471 100755
> --- a/bootstrap
> +++ b/bootstrap
> @@ -104,7 +104,6 @@ gnulib_tool=$GNULIB_SRCDIR/gnulib-tool
>
> modules='
> accept4
> -areadlink
> areadlinkat
> arpa_inet
> base64
> @@ -113,15 +112,11 @@ c-ctype
> cloexec
> closeout
> connect
> -dup3
> error
> -filevercmp
> fstatat
> -fts
> full-read
> full-write
> futimens
> -getaddrinfo
> getline
> getprogname
> gitlog-to-changelog
> @@ -143,22 +138,18 @@ 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
> 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..97d3d8d6b 100644
> --- a/lib/Makefile.am
> +++ b/lib/Makefile.am
> @@ -154,15 +154,11 @@ 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..705b090f5 100644
> --- a/m4/.gitignore
> +++ b/m4/.gitignore
> @@ -2,51 +2,40 @@
> /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 +43,18 @@
> /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 +63,16 @@
> /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 +83,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 +101,6 @@
> /locale-zh.m4
> /localtime-buffer.m4
> /lock.m4
> -/longdouble.m4
> /longlong.m4
> /lseek.m4
> /lstat.m4
> @@ -143,7 +118,6 @@
> /memmem.m4
> /mempcpy.m4
> /memrchr.m4
> -/mgetgroups.m4
> /minmax.m4
> /mkdir.m4
> /mkdtemp.m4
> @@ -175,7 +149,6 @@
> /pthread_rwlock_rdlock.m4
> /pthread_sigmask.m4
> /pthread-thread.m4
> -/ptsname_r.m4
> /putenv.m4
> /quotearg.m4
> /quote.m4
> @@ -194,7 +167,6 @@
> /save-cwd.m4
> /sched_h.m4
> /select.m4
> -/servent.m4
> /setenv.m4
> /setlocale.m4
> /sh-filename.m4
> @@ -202,7 +174,6 @@
> /sig_atomic_t.m4
> /signalblocking.m4
> /signal_h.m4
> -/signed.m4
> /size_max.m4
> /sleep.m4
> /snprintf.m4
> @@ -230,11 +201,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,8 +220,6 @@
> /time_h.m4
> /timespec.m4
> /tls.m4
> -/ttyname_r.m4
> -/ulonglong.m4
> /ungetc.m4
> /unistd_h.m4
> /unistd-safer.m4
> @@ -261,7 +227,6 @@
> /unlinkdir.m4
> /unlink.m4
> /usleep.m4
> -/utimbuf.m4
> /utimecmp.m4
> /utime_h.m4
> /utime.m4
> @@ -276,20 +241,16 @@
> /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
>
> _______________________________________________
> Libguestfs mailing list
> Libguestfs at redhat.com
> https://www.redhat.com/mailman/listinfo/libguestfs
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
libguestfs lets you edit virtual machines. Supports shell scripting,
bindings from many languages. http://libguestfs.org
More information about the Libguestfs
mailing list