[PATCH] build: update gnulib submodule to latest
* gnulib: Update to latest. * NEWS: Document 2 bugs fixed. --- NEWS | 10 ++ gnulib | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 0d380a8ae..0a5130331 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,16 @@ GNU coreutils NEWS-*- outline -*- * Noteworthy changes in release ?.? (-??-??) [?] +** Bug fixes + + ls and printf fix shell quoted output in the edge case of escaped + first and last characters, and single quotes in the string. + [bug introduced in coreutils-8.26] + + mv works again with macFUSE file systems. Previously it would + have exited with a "Function not implemented" error. + [bug introduced in coreutils-8.28] + * Noteworthy changes in release 9.5 (2024-03-28) [stable] diff --git a/gnulib b/gnulib index 259829e78..83a61464b 16 --- a/gnulib +++ b/gnulib @@ -1 +1 @@ -Subproject commit 259829e78b9e434771388269cd7ff3f55ce74057 +Subproject commit 83a61464bd251ccd031ca3188d8be151f6591470 -- 2.44.0
[PATCH] build: update gnulib submodule to latest
* gnulib: Update to latest. * src/dd.c: Avoid error macro redefinition. --- gnulib | 2 +- src/dd.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/gnulib b/gnulib index e2bd71038..4f7dce3fc 16 --- a/gnulib +++ b/gnulib @@ -1 +1 @@ -Subproject commit e2bd71038406e06eeedb4139cb61f3b43aeb3b2f +Subproject commit 4f7dce3fc20179ed6c24b7d84b82a99b6f410fef diff --git a/src/dd.c b/src/dd.c index 2808a79ab..f41966969 100644 --- a/src/dd.c +++ b/src/dd.c @@ -17,6 +17,7 @@ /* Written by Paul Rubin, David MacKenzie, and Stuart Kemp. */ #include +#define _GL_NO_INLINE_ERROR /* Avoid gnulib's error macro. */ #include #include -- 2.40.1
Re: [PATCH] build: update gnulib submodule to latest
On 07/04/2022 18:08, Bernhard Voelker wrote: Hi Padraig, On 4/7/22 18:43, Pádraig Brady wrote: * gnulib: Update to latest * src/copy.c: Replace deprecated {l,}statat(), with fstatat(). bootstrap now warns: Notice from module statat: This module is obsolete. Please use fstatat instead, and decide whether you want AT_NO_AUTOMOUNT in each fstatat call. The attached fixes it. Good catch, Pushed. thanks. Pádraig
Re: [PATCH] build: update gnulib submodule to latest
Hi Padraig, On 4/7/22 18:43, Pádraig Brady wrote: > * gnulib: Update to latest > * src/copy.c: Replace deprecated {l,}statat(), with fstatat(). bootstrap now warns: Notice from module statat: This module is obsolete. Please use fstatat instead, and decide whether you want AT_NO_AUTOMOUNT in each fstatat call. The attached fixes it. Have a nice day, BernyFrom d44f2a80f3c7d38845eb56148c3c0fd92668c5db Mon Sep 17 00:00:00 2001 From: Bernhard Voelker Date: Thu, 7 Apr 2022 18:59:16 +0200 Subject: [PATCH] maint: remove obsolete statat gnulib module * bootstrap.conf (gnulib_modules): Remove statat. --- bootstrap.conf | 1 - 1 file changed, 1 deletion(-) diff --git a/bootstrap.conf b/bootstrap.conf index 5ca56f917..c1399e30c 100644 --- a/bootstrap.conf +++ b/bootstrap.conf @@ -247,7 +247,6 @@ gnulib_modules=" stat-macros stat-size stat-time - statat stdbool stdlib-safer stpcpy -- 2.35.1
[PATCH] build: update gnulib submodule to latest
* gnulib: Update to latest * src/copy.c: Replace deprecated {l,}statat(), with fstatat(). * src/cp.c: Likewise. * src/install.c: Likewise. * src/remove.c: Likewise. --- gnulib| 2 +- src/copy.c| 24 ++-- src/cp.c | 6 +++--- src/install.c | 2 +- src/remove.c | 5 +++-- 5 files changed, 22 insertions(+), 17 deletions(-) diff --git a/gnulib b/gnulib index a2735049f..58c597d13 16 --- a/gnulib +++ b/gnulib @@ -1 +1 @@ -Subproject commit a2735049fd84b3ec0cae33c020459995cc7e678f +Subproject commit 58c597d13bc57dce3e97ea97856573f2d68ccb8c diff --git a/src/copy.c b/src/copy.c index b8c367c96..cb31067cd 100644 --- a/src/copy.c +++ b/src/copy.c @@ -1535,7 +1535,8 @@ same_file_ok (char const *src_name, struct stat const *src_sb, if (!same) return true; - if (lstatat (dst_dirfd, dst_relname, _dst_sb) != 0 + if (fstatat (dst_dirfd, dst_relname, _dst_sb, + AT_SYMLINK_NOFOLLOW) != 0 || lstat (src_name, _src_sb) != 0) return true; @@ -1688,7 +1689,7 @@ same_file_ok (char const *src_name, struct stat const *src_sb, if ( ! S_ISLNK (dst_sb_link->st_mode)) tmp_dst_sb = *dst_sb_link; - else if (statat (dst_dirfd, dst_relname, _dst_sb) != 0) + else if (fstatat (dst_dirfd, dst_relname, _dst_sb, 0) != 0) return true; if ( ! SAME_INODE (tmp_src_sb, tmp_dst_sb)) @@ -1907,7 +1908,7 @@ source_is_dst_backup (char const *srcbase, struct stat const *src_st, dst_relname + strlen (dst_relname), simple_backup_suffix); struct stat dst_back_sb; - int dst_back_status = statat (dst_dirfd, dst_back, _back_sb); + int dst_back_status = fstatat (dst_dirfd, dst_back, _back_sb, 0); free (dst_back); return dst_back_status == 0 && SAME_INODE (*src_st, dst_back_sb); } @@ -2312,12 +2313,13 @@ copy_internal (char const *src_name, char const *dst_name, struct stat *dst_lstat_sb; /* If we did not follow symlinks above, good: use that data. - Otherwise, call lstatat here, in case dst_name is a symlink. */ + Otherwise, use AT_SYMLINK_NOFOLLOW, in case dst_name is a symlink. */ if (have_dst_lstat) dst_lstat_sb = _sb; else { - if (lstatat (dst_dirfd, dst_relname, _buf) == 0) + if (fstatat (dst_dirfd, dst_relname, _buf, + AT_SYMLINK_NOFOLLOW) == 0) dst_lstat_sb = _buf; else lstat_ok = false; @@ -2650,7 +2652,8 @@ copy_internal (char const *src_name, char const *dst_name, for writing the directory's contents. Check if these permissions are there. */ - if (lstatat (dst_dirfd, dst_relname, _sb) != 0) + if (fstatat (dst_dirfd, dst_relname, _sb, + AT_SYMLINK_NOFOLLOW) != 0) { error (0, errno, _("cannot stat %s"), quoteaf (dst_name)); goto un_backup; @@ -2739,8 +2742,8 @@ copy_internal (char const *src_name, char const *dst_name, the failure and say dst_name is in the current directory. Other things will fail later. */ || stat (".", _sb) != 0 -|| (statat (dst_dirfd, dst_parent, _parent_sb) -!= 0) +|| (fstatat (dst_dirfd, dst_parent, _parent_sb, + 0) != 0) || SAME_INODE (dot_sb, dst_parent_sb)); free (dst_parent); @@ -2916,7 +2919,7 @@ copy_internal (char const *src_name, char const *dst_name, /* Now that the destination file is very likely to exist, add its info to the set. */ struct stat sb; - if (lstatat (dst_dirfd, dst_relname, ) == 0) + if (fstatat (dst_dirfd, dst_relname, , AT_SYMLINK_NOFOLLOW) == 0) record_file (x->dest_info, dst_relname, ); } @@ -3016,7 +3019,8 @@ copy_internal (char const *src_name, char const *dst_name, the lstat, but deducing the current destination mode is tricky in the presence of implementation-defined rules for special mode bits. */ - if (new_dst && lstatat (dst_dirfd, dst_relname, _sb) != 0) + if (new_dst && fstatat (dst_dirfd, dst_relname, _sb, + AT_SYMLINK_NOFOLLOW) != 0) { error (0, errno, _("cannot stat %s"), quoteaf (dst_name)); return false; diff --git a/src/cp.c b/src/cp.c index b73f2cb49..b2a20b900 100644 --- a/src/cp.c +++ b/src/cp.c @@ -391,7 +391,7 @@ make_dir_parents_private (char const *const_dir, size_t src_offset, /* XXX: If all dirs are present at the destination, no permissions or security contexts will be updated. */ - if (statat
[PATCH] build: update gnulib submodule to latest
* gnulib: Update to latest. This fixes a gnulib test failure in base64, among other fixes. * cfg.mk: Disable sc_indent as it's too invasive for now. --- cfg.mk | 3 ++- gnulib | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/cfg.mk b/cfg.mk index de198d992..3b76f7f7e 100644 --- a/cfg.mk +++ b/cfg.mk @@ -26,7 +26,8 @@ VC_LIST_ALWAYS_EXCLUDE_REGEX = src/blake2/.*$$ # Tests not to run as part of "make distcheck". local-checks-to-skip = \ - sc_proper_name_utf8_requires_ICONV + sc_proper_name_utf8_requires_ICONV \ + sc_indent # Tools used to bootstrap this package, used for "announcement". bootstrap-tools = autoconf,automake,gnulib,bison diff --git a/gnulib b/gnulib index 452e8a8f7..b6bae60d8 16 --- a/gnulib +++ b/gnulib @@ -1 +1 @@ -Subproject commit 452e8a8f7b07a794b1de3813062a992509f5c0c9 +Subproject commit b6bae60d83eda6b168368fa40f42ade9dfc86df0 -- 2.26.2
[PATCH] build: update gnulib submodule to latest
Coreutils mistakenly did not list xstrndup as a module that it depends on directly. When the latest Gnulib removed the dirname module's dependency on xstrndup, this mistake caused coreutils to not build. Since all of Coreutils's uses of xstrndup know the string length, xmemdup0 is a better match for what's needed. Since the size args are typically signed or derived from subtracting pointers, the new Gnulib ximemdup0 function is a better match yet. So, use ximemdup0 instead of xstrndup. * src/cut.c, src/dircolors.c, src/expand-common.c, src/expand.c: * src/numfmt.c, src/set-fields.c, src/unexpand.c: Do not include xstrndup.h; no longer needed. * src/dircolors.c (parse_line): * src/expand-common.c (parse_tab_stops): * src/numfmt.c (parse_format_string): * src/set-fields.c (set_fields): Use ximemdup0 instead of xstrndup. --- gnulib | 2 +- src/cut.c | 1 - src/dircolors.c | 5 ++--- src/expand-common.c | 3 +-- src/expand.c| 1 - src/numfmt.c| 3 +-- src/set-fields.c| 3 +-- src/unexpand.c | 1 - 8 files changed, 6 insertions(+), 13 deletions(-) diff --git a/gnulib b/gnulib index 1a7295076..ff7c8b21e 16 --- a/gnulib +++ b/gnulib @@ -1 +1 @@ -Subproject commit 1a72950760b1fce763ff834de0d545caab8a983c +Subproject commit ff7c8b21e259fdc4bc721ed55519cfee06739efa diff --git a/src/cut.c b/src/cut.c index 4189dcfd0..78b82c80e 100644 --- a/src/cut.c +++ b/src/cut.c @@ -34,7 +34,6 @@ #include "fadvise.h" #include "getndelim2.h" #include "hash.h" -#include "xstrndup.h" #include "set-fields.h" diff --git a/src/dircolors.c b/src/dircolors.c index a1ab81bc8..fea0cdf01 100644 --- a/src/dircolors.c +++ b/src/dircolors.c @@ -29,7 +29,6 @@ #include "obstack.h" #include "quote.h" #include "stdio--.h" -#include "xstrndup.h" /* The official name of this program (e.g., no 'g' prefix). */ #define PROGRAM_NAME "dircolors" @@ -163,7 +162,7 @@ parse_line (char const *line, char **keyword, char **arg) ++p; } - *keyword = xstrndup (keyword_start, p - keyword_start); + *keyword = ximemdup0 (keyword_start, p - keyword_start); if (*p == '\0') return; @@ -185,7 +184,7 @@ parse_line (char const *line, char **keyword, char **arg) continue; ++p; - *arg = xstrndup (arg_start, p - arg_start); + *arg = ximemdup0 (arg_start, p - arg_start); } /* FIXME: Write a string to standard out, while watching for "dangerous" diff --git a/src/expand-common.c b/src/expand-common.c index 82fce3b78..55df8dc0f 100644 --- a/src/expand-common.c +++ b/src/expand-common.c @@ -24,7 +24,6 @@ #include "error.h" #include "fadvise.h" #include "quote.h" -#include "xstrndup.h" #include "expand-common.h" @@ -200,7 +199,7 @@ parse_tab_stops (char const *stops) if (!DECIMAL_DIGIT_ACCUMULATE (tabval, *stops - '0', uintmax_t)) { size_t len = strspn (num_start, "0123456789"); - char *bad_num = xstrndup (num_start, len); + char *bad_num = ximemdup0 (num_start, len); error (0, 0, _("tab stop is too large %s"), quote (bad_num)); free (bad_num); ok = false; diff --git a/src/expand.c b/src/expand.c index 56fe27a53..dd9d2981a 100644 --- a/src/expand.c +++ b/src/expand.c @@ -39,7 +39,6 @@ #include #include "system.h" #include "die.h" -#include "xstrndup.h" #include "expand-common.h" diff --git a/src/numfmt.c b/src/numfmt.c index c54f96d27..fda03b4dd 100644 --- a/src/numfmt.c +++ b/src/numfmt.c @@ -29,7 +29,6 @@ #include "quote.h" #include "system.h" #include "xstrtol.h" -#include "xstrndup.h" #include "set-fields.h" @@ -1141,7 +1140,7 @@ parse_format_string (char const *fmt) quote (fmt)); if (prefix_len) -format_str_prefix = xstrndup (fmt, prefix_len); +format_str_prefix = ximemdup0 (fmt, prefix_len); if (fmt[suffix_pos] != '\0') format_str_suffix = xstrdup (fmt + suffix_pos); diff --git a/src/set-fields.c b/src/set-fields.c index 320a16ba8..42f6c2189 100644 --- a/src/set-fields.c +++ b/src/set-fields.c @@ -21,7 +21,6 @@ #include "system.h" #include "error.h" #include "quote.h" -#include "xstrndup.h" #include "set-fields.h" /* Array of `struct field_range_pair' holding all the finite ranges. */ @@ -254,7 +253,7 @@ set_fields (char const *fieldstr, unsigned int options) complain only about the first number. */ /* Determine the length of the offending number. */ size_t len = strspn (num_start, "0123456789"); - char *bad_num = xstrndup (num_start, len); + char *bad_num = ximemdup0 (num_start, len); error (0, 0, (options & SETFLD_ERRMSG_USE_POS) ?_("byte/character offset %s is too large") :_("field number %s is too large"), diff --git a/src/unexpand.c b/src/unexpand.c index 697623080..db0b74f24 100644 --- a/src/unexpand.c +++ b/src/unexpand.c @@ -40,7
[PATCH] build: update gnulib submodule to latest
* bootstrap.conf, src/copy.c, src/mv.c, src/shred.c: Adjust to renaming of renameat2 to renameatu. --- bootstrap.conf | 2 +- gnulib | 2 +- src/copy.c | 4 ++-- src/mv.c | 4 ++-- src/shred.c| 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/bootstrap.conf b/bootstrap.conf index 4da4f9415..fcf29dc23 100644 --- a/bootstrap.conf +++ b/bootstrap.conf @@ -210,7 +210,7 @@ gnulib_modules=" remove rename renameat - renameat2 + renameatu rmdir root-dev-ino rpmatch diff --git a/gnulib b/gnulib index 16aa5a2ef..2522322e5 16 --- a/gnulib +++ b/gnulib @@ -1 +1 @@ -Subproject commit 16aa5a2efe82e01a147b4022258fa9a272f67625 +Subproject commit 2522322e5304e7d86c63e607e2bc83c8d8b0a889 diff --git a/src/copy.c b/src/copy.c index 58d2f6eb6..1a9cdd1a8 100644 --- a/src/copy.c +++ b/src/copy.c @@ -53,7 +53,7 @@ #include "ignore-value.h" #include "ioblksize.h" #include "quote.h" -#include "renameat2.h" +#include "renameatu.h" #include "root-uid.h" #include "same.h" #include "savedir.h" @@ -1873,7 +1873,7 @@ copy_internal (char const *src_name, char const *dst_name, if (x->move_mode) { if (rename_errno < 0) -rename_errno = (renameat2 (AT_FDCWD, src_name, AT_FDCWD, dst_name, +rename_errno = (renameatu (AT_FDCWD, src_name, AT_FDCWD, dst_name, RENAME_NOREPLACE) ? errno : 0); new_dst = rename_errno == 0; diff --git a/src/mv.c b/src/mv.c index b6dd72d67..36fd1af4b 100644 --- a/src/mv.c +++ b/src/mv.c @@ -31,7 +31,7 @@ #include "error.h" #include "filenamecat.h" #include "remove.h" -#include "renameat2.h" +#include "renameatu.h" #include "root-dev-ino.h" #include "priv-set.h" @@ -456,7 +456,7 @@ main (int argc, char **argv) { assert (2 <= n_files); if (n_files == 2) -x.rename_errno = (renameat2 (AT_FDCWD, file[0], AT_FDCWD, file[1], +x.rename_errno = (renameatu (AT_FDCWD, file[0], AT_FDCWD, file[1], RENAME_NOREPLACE) ? errno : 0); if (x.rename_errno != 0 && target_directory_operand (file[n_files - 1])) diff --git a/src/shred.c b/src/shred.c index 2ddaadd38..270b1e942 100644 --- a/src/shred.c +++ b/src/shred.c @@ -93,7 +93,7 @@ #include "human.h" #include "randint.h" #include "randread.h" -#include "renameat2.h" +#include "renameatu.h" #include "stat-size.h" /* Default number of times to overwrite. */ @@ -1096,7 +1096,7 @@ wipename (char *oldname, char const *qoldname, struct Options const *flags) memset (base, nameset[0], len); base[len] = 0; bool rename_ok; -while (! (rename_ok = (renameat2 (AT_FDCWD, oldname, AT_FDCWD, newname, +while (! (rename_ok = (renameatu (AT_FDCWD, oldname, AT_FDCWD, newname, RENAME_NOREPLACE) == 0)) && errno == EEXIST && incname (base, len)) -- 2.17.1
[PATCH] build: update gnulib submodule to latest
Removes extraneous parse-datetime.c generated during build --- gnulib | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnulib b/gnulib index d318147..405cd67 16 --- a/gnulib +++ b/gnulib @@ -1 +1 @@ -Subproject commit d3181471f95c870e9485be947608be84f7fe5325 +Subproject commit 405cd675384221b541b460c43de26d159914fe0a -- 2.9.3
[PATCH] build: update gnulib submodule to latest
This includes a tweak to support building the gnulib base32 module with -Wsuggest-attribute=const --- gnulib | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnulib b/gnulib index a89e344..7ab64d2 16 --- a/gnulib +++ b/gnulib @@ -1 +1 @@ -Subproject commit a89e3449698f97ea0f9c5fbd73aa054009858471 +Subproject commit 7ab64d2610ca5aa78006bef91091dfa0268adf64 -- 2.4.1
[PATCH] build: update gnulib submodule to latest
* gnulib: Sync recent cleanups and the fix for missing df entries in the presence of bind mounts: http://bugs.gnu.org/17833 * NEWS: Detail the df bug fix. --- NEWS |5 + gnulib |2 +- 2 files changed, 6 insertions(+), 1 deletions(-) diff --git a/NEWS b/NEWS index 4e90b79..5a029f4 100644 --- a/NEWS +++ b/NEWS @@ -51,6 +51,11 @@ GNU coreutils NEWS-*- outline -*- than error messages or values for the wrong file system. [These bugs were present in the beginning.] + df now outputs all appropriate entries in the presence of bind mounts. + On some systems, entries would have been incorrectly elided due to + them being considered dummy mounts. + [bug introduced in coreutils-8.22] + du now silently ignores directory cycles introduced with bind mounts. Previously it would issue a warning and exit with a failure status. [bug introduced in coreutils-8.1] diff --git a/gnulib b/gnulib index c6e14bb..648f4ae 16 --- a/gnulib +++ b/gnulib @@ -1 +1 @@ -Subproject commit c6e14bbd5d404d147504acdd74c3fd17d5ef1088 +Subproject commit 648f4ae7311d1ad00658fc314e1a6c896f47e618 -- 1.7.7.6
[PATCH] build: update gnulib submodule to latest; also bootstrap to latest
Notes tests/init.sh is still in sync with gnulib. * bootstrap: Update to latest. * gnulib: Sync many fixes/changes, including: a fix for http://bugs.gnu.org/15066 and preparation for http://bugs.gnu.org/15421 --- bootstrap | 83 +--- gnulib|2 +- 2 files changed, 47 insertions(+), 38 deletions(-) diff --git a/bootstrap b/bootstrap index 0cbea66..e31d17d 100755 --- a/bootstrap +++ b/bootstrap @@ -1,6 +1,6 @@ #! /bin/sh # Print a version string. -scriptversion=2013-05-08.20; # UTC +scriptversion=2013-08-15.22; # UTC # Bootstrap this package from checked-out sources. @@ -209,12 +209,16 @@ bootstrap_sync=false # Use git to update gnulib sources use_git=true +check_exists() { + ($1 --version /dev/null) /dev/null 21 + test $? -lt 126 +} + # find_tool ENVVAR NAMES... # - # Search for a required program. Use the value of ENVVAR, if set, -# otherwise find the first of the NAMES that can be run (i.e., -# supports --version). If found, set ENVVAR to the program name, -# die otherwise. +# otherwise find the first of the NAMES that can be run. +# If found, set ENVVAR to the program name, die otherwise. # # FIXME: code duplication, see also gnu-web-doc-update. find_tool () @@ -224,27 +228,21 @@ find_tool () find_tool_names=$@ eval find_tool_res=\$$find_tool_envvar if test x$find_tool_res = x; then -for i -do - if ($i --version /dev/null) /dev/null 21; then - find_tool_res=$i - break +for i; do + if check_exists $i; then +find_tool_res=$i +break fi done - else -find_tool_error_prefix=\$$find_tool_envvar: fi - test x$find_tool_res != x \ -|| die one of these is required: $find_tool_names - ($find_tool_res --version /dev/null) /dev/null 21 \ -|| die ${find_tool_error_prefix}cannot run $find_tool_res --version + if test x$find_tool_res = x; then +warn_ one of these is required: $find_tool_names; +die alternatively set $find_tool_envvar to a compatible tool + fi eval $find_tool_envvar=\$find_tool_res eval export $find_tool_envvar } -# Find sha1sum, named gsha1sum on MacPorts, and shasum on Mac OS X 10.6. -find_tool SHA1SUM sha1sum gsha1sum shasum - # Override the default configuration, if necessary. # Make sure that bootstrap.conf is sourced from the current directory # if we were invoked as sh bootstrap. @@ -256,12 +254,12 @@ esac # Extra files from gnulib, which override files from other sources. test -z ${gnulib_extra_files} \ gnulib_extra_files= -$build_aux/install-sh -$build_aux/mdate-sh -$build_aux/texinfo.tex -$build_aux/depcomp -$build_aux/config.guess -$build_aux/config.sub +build-aux/install-sh +build-aux/mdate-sh +build-aux/texinfo.tex +build-aux/depcomp +build-aux/config.guess +build-aux/config.sub doc/INSTALL @@ -326,7 +324,7 @@ insert_if_absent() { die Error: Duplicate entries in $file: $duplicate_entries fi linesold=$(gitignore_entries $file | wc -l) - linesnew=$(echo $str | gitignore_entries - $file | sort -u | wc -l) + linesnew=$( { echo $str; cat $file; } | gitignore_entries | sort -u | wc -l) if [ $linesold != $linesnew ] ; then { echo $str | cat - $file $file.bak mv $file.bak $file; } \ || die insert_if_absent $file $str: failed @@ -469,8 +467,7 @@ check_versions() { if [ $req_ver = - ]; then # Merely require app to exist; not all prereq apps are well-behaved # so we have to rely on $? rather than get_version. - $app --version /dev/null 21 - if [ 126 -le $? ]; then + if ! check_exists $app; then warn_ Error: '$app' not found ret=1 fi @@ -503,6 +500,12 @@ print_versions() { # can't depend on column -t } +# Find sha1sum, named gsha1sum on MacPorts, shasum on Mac OS X 10.6. +# Also find the compatible sha1 utility on the BSDs +if test x$SKIP_PO = x; then + find_tool SHA1SUM sha1sum gsha1sum shasum sha1 +fi + use_libtool=0 # We'd like to use grep -E, to see if any of LT_INIT, # AC_PROG_LIBTOOL, AM_PROG_LIBTOOL is used in configure.ac, @@ -551,10 +554,10 @@ fi echo $0: Bootstrapping from checked-out $package sources... # See if we can use gnulib's git-merge-changelog merge driver. -if test -d .git (git --version) /dev/null 2/dev/null ; then +if $use_git test -d .git check_exists git; then if git config merge.merge-changelog.driver /dev/null ; then : - elif (git-merge-changelog --version) /dev/null 2/dev/null ; then + elif check_exists git-merge-changelog; then echo $0: initializing git-merge-changelog driver git config merge.merge-changelog.name 'GNU-style ChangeLog merge driver' git config merge.merge-changelog.driver 'git-merge-changelog %O %A %B' @@ -574,13 +577,17 @@ git_modules_config () { test -f .gitmodules git config --file
[PATCH] build: update gnulib submodule to latest
FYI, From 7700751c5feff007a1b5054769d0e8d90638a62f Mon Sep 17 00:00:00 2001 From: Jim Meyering meyer...@redhat.com Date: Tue, 12 Jul 2011 15:40:53 +0200 Subject: [PATCH] build: update gnulib submodule to latest --- gnulib |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/gnulib b/gnulib index 6eedb6a..bd399f0 16 --- a/gnulib +++ b/gnulib @@ -1 +1 @@ -Subproject commit 6eedb6a104486c2df4384195e5dfc487d97c5beb +Subproject commit bd399f07ee4f383fad038efad25a659fcdc0bbb0 -- 1.7.6.430.g34be2
[coreutils] [PATCH] build: update gnulib submodule to latest; update bootstrap, too
FYI, From d27d6d371f3f7ede14b6bde79ddd45307d30fa47 Mon Sep 17 00:00:00 2001 From: Jim Meyering meyer...@redhat.com Date: Thu, 1 Jul 2010 23:43:55 +0200 Subject: [PATCH] build: update gnulib submodule to latest; update bootstrap, too * gnulib: Update to latest, for hash.c improvement. * bootstrap: Update from gnulib, too. --- bootstrap |8 +--- gnulib|2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/bootstrap b/bootstrap index e55b3d2..2422549 100755 --- a/bootstrap +++ b/bootstrap @@ -1,6 +1,6 @@ #! /bin/sh # Print a version string. -scriptversion=2010-04-30.16; # UTC +scriptversion=2010-05-17.18; # UTC # Bootstrap this package from checked-out sources. @@ -409,6 +409,7 @@ git_modules_config () { } gnulib_path=`git_modules_config submodule.gnulib.path` +: ${gnulib_path=gnulib} # Get gnulib files. @@ -424,7 +425,8 @@ case ${GNULIB_SRCDIR--} in trap cleanup_gnulib 1 2 13 15 -git clone -h|grep -- --depth /dev/null shallow='--depth 2' || shallow= +shallow= +git clone -h 21 | grep -- --depth /dev/null shallow='--depth 2' git clone $shallow git://git.sv.gnu.org/gnulib $gnulib_path || cleanup_gnulib @@ -488,7 +490,7 @@ update_po_files() { test -d $ref_po_dir || mkdir $ref_po_dir || return download_po_files $ref_po_dir $domain \ ls $ref_po_dir/*.po 2/dev/null | - sed 's|.*/||; s|\.po$||' $po_dir/LINGUAS + sed 's|.*/||; s|\.po$||' $po_dir/LINGUAS || return langs=`cd $ref_po_dir echo *.po|sed 's/\.po//g'` test $langs = '*' langs=x diff --git a/gnulib b/gnulib index ef5acf2..7773f84 16 --- a/gnulib +++ b/gnulib @@ -1 +1 @@ -Subproject commit ef5acf202788003cdc70813756e173cd6b7dd5a1 +Subproject commit 7773f84fe1aa3bb17defad704ee87f2615894ae4 -- 1.7.2.rc1.192.g262ff
bug#5825: [PATCH] build: update gnulib submodule to latest
FYI, From b48a444e351f6c974af35f11eca7ba0106fedcc4 Mon Sep 17 00:00:00 2001 From: Jim Meyering meyer...@redhat.com Date: Fri, 2 Apr 2010 20:30:48 +0200 Subject: [PATCH] build: update gnulib submodule to latest * cfg.mk: Update to use new _sc_search_regexp interface. Run this: perl -pi -e 's/\b_prohibit_regexp\b/_sc_search_regexp/;' -e 's/\bmsg=/halt=/; s/\bre=/prohibit=/;' cfg.mk and then adjust backslashes so they still line up. --- cfg.mk | 36 ++-- gnulib |2 +- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/cfg.mk b/cfg.mk index 1da4d38..75ce77a 100644 --- a/cfg.mk +++ b/cfg.mk @@ -200,15 +200,15 @@ sc_no_exec_perl_coreutils: # Don't use readlink or readlinkat directly sc_prohibit_readlink: - @re='\readlink(at)? \('\ - msg='do not use readlink(at); use via xreadlink or areadlink*' \ - $(_prohibit_regexp) + @prohibit='\readlink(at)? \(' \ + halt='do not use readlink(at); use via xreadlink or areadlink*' \ + $(_sc_search_regexp) # Don't use address of stat or lstat functions sc_prohibit_stat_macro_address: - @re='\l?stat '':|l?stat\'\ - msg='stat() and lstat() may be function-like macros'\ - $(_prohibit_regexp) + @prohibit='\l?stat '':|l?stat\' \ + halt='stat() and lstat() may be function-like macros' \ + $(_sc_search_regexp) # Ensure that date's --help output stays in sync with the info # documentation for GNU strftime. The only exception is %N, @@ -227,22 +227,22 @@ sc_strftime_check: # Indent only with spaces. sc_prohibit_tab_based_indentation: - @re='^ *' \ - msg='TAB in indentation; use only spaces' \ - $(_prohibit_regexp) + @prohibit='^ * ' \ + halt='TAB in indentation; use only spaces' \ + $(_sc_search_regexp) # Don't use indent-tabs-mode: nil anymore. No longer needed. sc_prohibit_emacs__indent_tabs_mode__setting: - @re='^( *[*#] *)?indent-tabs-mode:' \ - msg='use of emacs indent-tabs-mode: setting'\ - $(_prohibit_regexp) + @prohibit='^( *[*#] *)?indent-tabs-mode:' \ + halt='use of emacs indent-tabs-mode: setting' \ + $(_sc_search_regexp) # Ensure that each file that contains fail=1 also contains fail=0. # Otherwise, setting file=1 in the environment would make tests fail unexpectedly. sc_prohibit_fail_0: - @re='\fail=0\'\ - msg='fail=0 initialization' \ - $(_prohibit_regexp) + @prohibit='\fail=0\' \ + halt='fail=0 initialization'\ + $(_sc_search_regexp) # Ensure that stdio--.h is used where appropriate. sc_require_stdio_safer: @@ -258,9 +258,9 @@ sc_require_stdio_safer: # Prefer xnanosleep over other less-precise sleep methods sc_prohibit_sleep: - @re='\(nano|u)?sleep \(' \ - msg='prefer xnanosleep over other sleep interfaces' \ - $(_prohibit_regexp) + @prohibit='\(nano|u)?sleep \(' \ + halt='prefer xnanosleep over other sleep interfaces'\ + $(_sc_search_regexp) ### _p0 = \([^'/]\|\([^\]\|[\].\)*\|'\([^\']\|[\].\)*' diff --git a/gnulib b/gnulib index e936a81..655a3ee 16 --- a/gnulib +++ b/gnulib @@ -1 +1 @@ -Subproject commit e936a81c04962903122ea0d8b6af63c5fce4beaf +Subproject commit 655a3ee56ace8f42bdf0660277a5aa4b6eeff6ca -- 1.7.0.4.293.ga50de
[PATCH] build: update gnulib submodule to latest; adapt a patch
Staying in sync with gnulib required a little more work, this time. I posted the patch-xform script to bug-gnulib today and will add it to gnulib's build-aux/ directory soon. From 5a514de955684edeb8b8fc27c9338204dd640109 Mon Sep 17 00:00:00 2001 From: Jim Meyering meyer...@redhat.com Date: Fri, 11 Dec 2009 19:18:04 +0100 Subject: [PATCH] build: update gnulib submodule to latest; adapt a patch * gl/lib/tempname.c.diff: Adjust patch to apply to gnulib, now that most TABs in indentation have been converted to spaces by running this command: f=tempname.c.diff; patch-xform $f k mv k $f --- gl/lib/tempname.c.diff | 72 gnulib |2 +- 2 files changed, 37 insertions(+), 37 deletions(-) diff --git a/gl/lib/tempname.c.diff b/gl/lib/tempname.c.diff index 8ffc506..1bf1119 100644 --- a/gl/lib/tempname.c.diff +++ b/gl/lib/tempname.c.diff @@ -127,48 +127,48 @@ index 2da5afe..562955a 100644 +XX[i] = letters[randint_genmax (rand_src, sizeof letters - 2)]; switch (kind) - { + { @@ -276,7 +271,7 @@ __gen_tempname (char *tmpl, int suffixlen, int flags, int kind) - break; - - case __GT_NOCREATE: --/* This case is backward from the other three. __gen_tempname -+/* This case is backward from the other three. This function -succeeds if __xstat fails because the name does not exist. -Note the continue to bypass the common logic at the bottom -of the loop. */ + break; + + case __GT_NOCREATE: +- /* This case is backward from the other three. __gen_tempname ++ /* This case is backward from the other three. This function + succeeds if __xstat fails because the name does not exist. + Note the continue to bypass the common logic at the bottom + of the loop. */ @@ -285,11 +280,15 @@ __gen_tempname (char *tmpl, int suffixlen, int flags, int kind) - if (errno == ENOENT) - { - __set_errno (save_errno); --return 0; -+fd = 0; -+goto done; - } - else -- /* Give up now. */ -- return -1; -+ { -+/* Give up now. */ -+fd = -1; -+goto done; -+ } - } - continue; + if (errno == ENOENT) + { + __set_errno (save_errno); +- return 0; ++ fd = 0; ++ goto done; + } + else +-/* Give up now. */ +-return -1; ++{ ++ /* Give up now. */ ++ fd = -1; ++ goto done; ++} + } + continue; @@ -301,13 +300,32 @@ __gen_tempname (char *tmpl, int suffixlen, int flags, int kind) if (fd = 0) - { - __set_errno (save_errno); --return fd; -+goto done; - } + { + __set_errno (save_errno); +- return fd; ++ goto done; + } else if (errno != EEXIST) -- return -1; -+ { -+fd = -1; -+goto done; -+ } +-return -1; ++{ ++ fd = -1; ++ goto done; ++} } + randint_all_free (rand_src); diff --git a/gnulib b/gnulib index 63983c0..a3984e0 16 --- a/gnulib +++ b/gnulib @@ -1 +1 @@ -Subproject commit 63983c0aac914c1a585cb6a7d0b16dc170b6ee3e +Subproject commit a3984e06bca84a7654624dd754a7c4c7a5a39a59 -- 1.6.6.rc1.319.g9b57d