I've updated findutils to a newer version of gnulib (the patch is attached).
There should be a performance increase for ftsfind here, but Jim Meyering has a further patch to findutils to improve performance on filesystems which do not populate the d_type member of struct dirent. I will update the NEWS file once I have evaluated Jim's patch. Thanks, James.
From bece71c9b0a2a226a53c5acca82bac06fd934522 Mon Sep 17 00:00:00 2001 From: James Youngman <[email protected]> Date: Sat, 21 Feb 2009 14:55:56 +0000 Subject: [PATCH] Update gnulib version; follow gnulib-tool's Makefile.am edit suggestions. To: [email protected] Update gnulib version. * import-gnulib.config (gpl3_update_files): No longer need to update the licenses of build-aux/mdate-sh, build-aux/texinfo.tex or build-aux/ylwrap as they are already GPLv3+. (modules): Use the strdup-posix module instead of strdup, and stop using the obsolete modules memcmp and memset, since we now assume those functions will already be present on the host system. * import-gnulib.sh (rehack): Be more verbose about which files actually needed a license edit and which did not. Follow gnulib-tool's Makefile.am edit suggestions. * find/Makefile.am (LDADD): Use $(LIBINTL) instead of @INTLLIBS@ and use $(LIB_CLOCK_GETTIME) instead of @lib_clock_gett...@. * lib/Makefile.am: Likewise. * locate/Makefile.am: Likewise. * xargs/Makefile.am: Likewise. * import-gnulib.sh (hack_gnulib_tool_output): Add m4/gnulib-cache.m4 to EXTRA_DIST in gnulib/Makefile.am, as gnulib-tool suggests. --- ChangeLog | 22 ++++++++++++++++++++++ find/Makefile.am | 2 +- import-gnulib.config | 13 +++++-------- import-gnulib.sh | 13 ++++++------- lib/Makefile.am | 2 +- locate/Makefile.am | 2 +- xargs/Makefile.am | 2 +- 7 files changed, 37 insertions(+), 19 deletions(-) diff --git a/ChangeLog b/ChangeLog index e2a9418..17d9eb4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,25 @@ +2009-02-21 James Youngman <[email protected]> + + Update gnulib version. + * import-gnulib.config (gpl3_update_files): No longer need to + update the licenses of build-aux/mdate-sh, build-aux/texinfo.tex + or build-aux/ylwrap as they are already GPLv3+. + (modules): Use the strdup-posix module instead of strdup, and stop + using the obsolete modules memcmp and memset, since we now assume + those functions will already be present on the host system. + * import-gnulib.sh (rehack): Be more verbose about which files + actually needed a license edit and which did not. + + Follow gnulib-tool's Makefile.am edit suggestions. + * find/Makefile.am (LDADD): Use $(LIBINTL) instead of @INTLLIBS@ + and use $(LIB_CLOCK_GETTIME) instead of @lib_clock_gett...@. + * lib/Makefile.am: Likewise. + * locate/Makefile.am: Likewise. + * xargs/Makefile.am: Likewise. + * import-gnulib.sh (hack_gnulib_tool_output): Add + m4/gnulib-cache.m4 to EXTRA_DIST in gnulib/Makefile.am, as + gnulib-tool suggests. + 2009-02-21 Jim Meyering <[email protected]> find: avoid warning about unused local, remove unnecessary include. diff --git a/find/Makefile.am b/find/Makefile.am index b001509..39827b4 100644 --- a/find/Makefile.am +++ b/find/Makefile.am @@ -26,7 +26,7 @@ endif EXTRA_DIST = defs.h $(man_MANS) INCLUDES = -I../gnulib/lib -I$(top_srcdir)/lib -I$(top_srcdir)/gnulib/lib -I../intl -DLOCALEDIR=\"$(localedir)\" -LDADD = ./libfindtools.a ../lib/libfind.a ../gnulib/lib/libgnulib.a @INTLLIBS@ @LIB_CLOCK_GETTIME@ @FINDLIBS@ +LDADD = ./libfindtools.a ../lib/libfind.a ../gnulib/lib/libgnulib.a $(LIBINTL) $(LIB_CLOCK_GETTIME) @FINDLIBS@ man_MANS = find.1 SUBDIRS = . testsuite diff --git a/import-gnulib.config b/import-gnulib.config index 71c4d66..6ea1d2d 100644 --- a/import-gnulib.config +++ b/import-gnulib.config @@ -16,11 +16,7 @@ build-aux/missing build-aux/texinfo.tex ' -gpl3_update_files=' -build-aux/mdate-sh -build-aux/texinfo.tex -build-aux/ylwrap -' +gpl3_update_files='' # Modules needed for findutils. @@ -56,8 +52,6 @@ lstat malloc mbscasestr mbsstr -memcmp -memset mktime modechange mountlist @@ -72,7 +66,7 @@ stat-macros stat-time stpcpy strcasestr -strdup +strdup-posix strftime strtol strtoul @@ -92,3 +86,6 @@ xstrtol xstrtoumax yesno ' + +# Obsolete modules we've removed. +# memcmp memset diff --git a/import-gnulib.sh b/import-gnulib.sh index 2bc35c0..00db007 100755 --- a/import-gnulib.sh +++ b/import-gnulib.sh @@ -1,7 +1,7 @@ #! /bin/sh # # import-gnulib.sh -- imports a copy of gnulib into findutils -# Copyright (C) 2003,2004,2005,2006,2007 Free Software Foundation, Inc. +# Copyright (C) 2003,2004,2005,2006,2007,2009 Free Software Foundation, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -137,16 +137,18 @@ run_gnulib_tool() { } rehack() { - echo "Updating the license of $1" + printf "Updating the license of $1... " # Use cp to get the permissions right first cp -fp "$1" "$1".new sed -e \ 's/Free Software Foundation\([;,]\) either version [2]/Free Software Foundation\1 either version 3/' < "$1" > "$1".new if cmp "$1" "$1".new >/dev/null then + echo "no change needed." rm -f "$1".new else rm -f "$1" && mv "$1".new "$1" + echo "done." fi } @@ -161,7 +163,6 @@ copyhack() { dst="$dst"/"$(basename $src)" fi cp -fp "$src" "$dst" && rehack "$dst" - } @@ -183,12 +184,9 @@ hack_gnulib_tool_output() { esac copyhack "${gnulibdir}"/"$file" "$dest" || exit done - - - cat > gnulib/Makefile.am <<EOF -# Copyright (C) 2004 Free Software Foundation, Inc. +# Copyright (C) 2004, 2009 Free Software Foundation, Inc. # # This file is free software, distributed under the terms of the GNU # General Public License. As a special exception to the GNU General @@ -199,6 +197,7 @@ hack_gnulib_tool_output() { # This file was generated by $0 $original_cmd_line_args. # SUBDIRS = lib +EXTRA_DIST = m4/gnulib-cache.m4 EOF } diff --git a/lib/Makefile.am b/lib/Makefile.am index 8f8319a..2440d45 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -25,7 +25,7 @@ MAINTAINERCLEANFILES = INCLUDES = -I../gnulib/lib -I$(top_srcdir)/gnulib/lib -LDADD = ../gnulib/lib/libgnulib.a @LIBINTL@ +LDADD = ../gnulib/lib/libgnulib.a $(LIBINTL) libfind_a_SOURCES += modetype.h nextelem.h printquoted.h listfile.h \ regextype.h dircallback.h diff --git a/locate/Makefile.am b/locate/Makefile.am index fd9f1f5..a626153 100644 --- a/locate/Makefile.am +++ b/locate/Makefile.am @@ -19,7 +19,7 @@ code_SOURCES = code.c word_io.c INCLUDES = -I$(top_srcdir)/lib -I../gnulib/lib -I$(top_srcdir)/gnulib/lib -I../intl -DLOCATE_DB=\"$(LOCATE_DB)\" -DLOCALEDIR=\"$(localedir)\" -LDADD = ../lib/libfind.a ../gnulib/lib/libgnulib.a @INTLLIBS@ +LDADD = ../lib/libfind.a ../gnulib/lib/libgnulib.a $(LIBINTL) $(PROGRAMS) $(LIBPROGRAMS): ../lib/libfind.a ../gnulib/lib/libgnulib.a diff --git a/xargs/Makefile.am b/xargs/Makefile.am index 20b4c29..0f02337 100644 --- a/xargs/Makefile.am +++ b/xargs/Makefile.am @@ -3,7 +3,7 @@ localedir = $(datadir)/locale bin_PROGRAMS = xargs man_MANS = xargs.1 INCLUDES = -I.. -I../gnulib/lib -I$(top_srcdir)/gnulib/lib -I$(top_srcdir)/lib -I../intl -DLOCALEDIR=\"$(localedir)\" -LDADD = ../lib/libfind.a ../gnulib/lib/libgnulib.a @INTLLIBS@ +LDADD = ../lib/libfind.a ../gnulib/lib/libgnulib.a $(LIBINTL) EXTRA_DIST = $(man_MANS) SUBDIRS = . testsuite -- 1.5.6.5
From f0a010f5d81c837d55bf37b75f4c65757cde2fc2 Mon Sep 17 00:00:00 2001 From: James Youngman <[email protected]> Date: Sat, 21 Feb 2009 15:15:11 +0000 Subject: [PATCH] Update gnulib version. To: [email protected] * import-gnulib.config (gnulib_version): Update from d4b129b8e5f8a8d1198020fd6fc79310d305936c to df70a4bf4a1e84171918db09b639ae1a14c2a9b2. This pulls in the following relevant changes: fts: correct internal computation of nlinks (optimization-related) fts: move a function definition "up" (no semantic change) fts: arrange not to stat non-directories in more cases fts: add #if guards so that the fts_lgpl module still builds fts: avoid used-uninitialized error due to recent change regex: avoid compilation failure with upcoming gcc-4.4 regex: fix glibc bug 697 regex: fix glibc bug 9697 Other changes may also be relevant; for details please check gnulib/ChangeLog. --- ChangeLog | 15 +++++++++++++++ import-gnulib.config | 2 +- 2 files changed, 16 insertions(+), 1 deletions(-) diff --git a/ChangeLog b/ChangeLog index 17d9eb4..79a4b66 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,21 @@ 2009-02-21 James Youngman <[email protected]> Update gnulib version. + * import-gnulib.config (gnulib_version): Update from + d4b129b8e5f8a8d1198020fd6fc79310d305936c to + df70a4bf4a1e84171918db09b639ae1a14c2a9b2. This pulls in the + following relevant changes: + fts: correct internal computation of nlinks (optimization-related) + fts: move a function definition "up" (no semantic change) + fts: arrange not to stat non-directories in more cases + fts: add #if guards so that the fts_lgpl module still builds + fts: avoid used-uninitialized error due to recent change + regex: avoid compilation failure with upcoming gcc-4.4 + regex: fix glibc bug 697 + regex: fix glibc bug 9697 + Other changes may also be relevant; for details please check gnulib/ChangeLog. + + Improvements to import-gnulib.config, import-gnulib.sh. * import-gnulib.config (gpl3_update_files): No longer need to update the licenses of build-aux/mdate-sh, build-aux/texinfo.tex or build-aux/ylwrap as they are already GPLv3+. diff --git a/import-gnulib.config b/import-gnulib.config index 6ea1d2d..8e07ee9 100644 --- a/import-gnulib.config +++ b/import-gnulib.config @@ -1,7 +1,7 @@ # findutils gnulib.config -*- sh -*- # What version of gnulib to use? -gnulib_version="d4b129b8e5f8a8d1198020fd6fc79310d305936c" +gnulib_version="df70a4bf4a1e84171918db09b639ae1a14c2a9b2" destdir="gnulib" # Random extra gnulib files needed for findutils. -- 1.5.6.5
