Subject: bug#20944: closed (closing: [FYI: 3 commits pushed:)

From: [email-masked] (GNU bug Tracking System)
Date: Fri, 03 Jul 2015 17:35:03 +0000

Your bug report

#20944: FYI: 3 commits pushed:

which was filed against the cppi package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
20944: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=20944
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: closing: [FYI: 3 commits pushed:
From: Jim Meyering <[email-masked]>
To: [email-masked]
Date: Fri, 3 Jul 2015 10:33:46 -0700
List-Id: <debbugs-submit.debbugs.gnu.org>

closing this ticket

Subject: FYI: 3 commits pushed:
From: Jim Meyering <[email-masked]>
To: [email-masked]
Date: Tue, 30 Jun 2015 12:18:18 -0700
List-Id: <debbugs-submit.debbugs.gnu.org>

The one that matters is the obstack_blank -> obstack_blank_fast change:

dc36fc9 maint: update gnulib, bootstrap and init.sh
c3fd2ab cppi: do not use obstack_blank with a negative size
7d772fd maint: update copyright year ranges to include 2015
From 7d772fd219e646f18f2ffbfe5d1b67d7428d270f Mon Sep 17 00:00:00 2001
From: Jim Meyering <[email-masked]>
Date: Tue, 30 Jun 2015 11:24:12 -0700
Subject: [PATCH 1/3] maint: update copyright year ranges to include 2015

---
 ChangeLog.1        | 2 +-
 README-hacking     | 2 +-
 bootstrap          | 2 +-
 bootstrap.conf     | 2 +-
 cfg.mk             | 2 +-
 src/cppi.l         | 2 +-
 src/system.h       | 3 ++-
 tests/help-version | 2 +-
 tests/init.sh      | 2 +-
 9 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/ChangeLog.1 b/ChangeLog.1
index fe8d9ba..b5180cb 100644
--- a/ChangeLog.1
+++ b/ChangeLog.1
@@ -713,7 +713,7 @@

 	-----

-	Copyright (C) 1997-2013 Free Software Foundation, Inc.
+	Copyright (C) 1997-2015 Free Software Foundation, Inc.

 	Copying and distribution of this file, with or without
 	modification, are permitted provided the copyright notice
diff --git a/README-hacking b/README-hacking
index 2d37fac..0913118 100644
--- a/README-hacking
+++ b/README-hacking
@@ -49,7 +49,7 @@ Enjoy!

 -----

-Copyright (C) 2002-2013 Free Software Foundation, Inc.
+Copyright (C) 2002-2015 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
diff --git a/bootstrap b/bootstrap
index a3e68f0..fff8c8e 100755
--- a/bootstrap
+++ b/bootstrap
@@ -4,7 +4,7 @@ scriptversion=2013-12-05.23; # UTC

 # Bootstrap this package from checked-out sources.

-# Copyright (C) 2003-2014 Free Software Foundation, Inc.
+# Copyright (C) 2003-2015 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
diff --git a/bootstrap.conf b/bootstrap.conf
index 20fbfe3..10a72bd 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -1,6 +1,6 @@
 # Bootstrap configuration.

-# Copyright (C) 2006-2013 Free Software Foundation, Inc.
+# Copyright (C) 2006-2015 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
diff --git a/cfg.mk b/cfg.mk
index 3e4bad2..17a32ee 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -1,5 +1,5 @@
 # Customize maint.mk                           -*- makefile -*-
-# Copyright (C) 2003-2013 Free Software Foundation, Inc.
+# Copyright (C) 2003-2015 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
diff --git a/src/cppi.l b/src/cppi.l
index 9bd3ca9..5fc1534 100644
--- a/src/cppi.l
+++ b/src/cppi.l
@@ -1,5 +1,5 @@
 /* flex-lexer for cppi
-   Copyright (C) 1997-2013 Free Software Foundation, Inc.
+   Copyright (C) 1997-2015 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
diff --git a/src/system.h b/src/system.h
index 09070d0..1f7954c 100644
--- a/src/system.h
+++ b/src/system.h
@@ -1,5 +1,6 @@
 /* system-dependent definitions; derived from those of coreutils
-   Copyright (C) 1989, 1991-2008, 2010-2013 Free Software Foundation, Inc.
+   Copyright (C) 1989, 1991-2008, 2010-2015 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
diff --git a/tests/help-version b/tests/help-version
index ab78a45..e4c8fc5 100755
--- a/tests/help-version
+++ b/tests/help-version
@@ -2,7 +2,7 @@
 # Make sure all these programs work properly
 # when invoked with --help or --version.

-# Copyright (C) 2000-2013 Free Software Foundation, Inc.
+# Copyright (C) 2000-2015 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
diff --git a/tests/init.sh b/tests/init.sh
index fbd293d..37fc7b6 100755
--- a/tests/init.sh
+++ b/tests/init.sh
@@ -1,6 +1,6 @@
 # source this file; set up for tests

-# Copyright (C) 2009-2014 Free Software Foundation, Inc.
+# Copyright (C) 2009-2015 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
-- 
2.3.7

From c3fd2ab3c90ce2fbdd7fe1e813f76a22a8d206ce Mon Sep 17 00:00:00 2001
From: Jim Meyering <[email-masked]>
Date: Tue, 30 Jun 2015 11:26:26 -0700
Subject: [PATCH 2/3] cppi: do not use obstack_blank with a negative size

* src/cppi.l (top): Use obstack_blank_fast, not obstack_blank,
with a negative size, since the obstack API has changed to
disallow the usage of the former.
---
 src/cppi.l | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/cppi.l b/src/cppi.l
index 5fc1534..a62f973 100644
--- a/src/cppi.l
+++ b/src/cppi.l
@@ -207,7 +207,7 @@ pop (void)
 {
   int pair_size = sizeof (struct KL_pair);
   assert (OPENER_STACK_HEIGHT > 0);
-  obstack_blank (&opener_stack, -pair_size);
+  obstack_blank_fast (&opener_stack, -pair_size);
 }

 static inline void
-- 
2.3.7

From dc36fc9195296c7b4a3d479342c8871f5c69881d Mon Sep 17 00:00:00 2001
From: Jim Meyering <[email-masked]>
Date: Tue, 30 Jun 2015 11:24:24 -0700
Subject: [PATCH 3/3] maint: update gnulib, bootstrap and init.sh

---
 bootstrap     | 60 +++++++++++++++++++++++++++++++++++------------------------
 gnulib        |  2 +-
 tests/init.sh | 21 +++++++++++++++++++++
 3 files changed, 58 insertions(+), 25 deletions(-)
 mode change 100755 => 100644 tests/init.sh

diff --git a/bootstrap b/bootstrap
index fff8c8e..e72894c 100755
--- a/bootstrap
+++ b/bootstrap
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Print a version string.
-scriptversion=2013-12-05.23; # UTC
+scriptversion=2014-12-08.12; # UTC

 # Bootstrap this package from checked-out sources.

@@ -42,6 +42,9 @@ export LC_ALL

 local_gl_dir=gl

+# Honour $PERL, but work even if there is none
+PERL="${PERL-perl}"
+
 me=$0

 usage() {
@@ -210,7 +213,17 @@ bootstrap_sync=false
 use_git=true

 check_exists() {
-  ($1 --version </dev/null) >/dev/null 2>&1
+  if test "$1" = "--verbose"; then
+    ($2 --version </dev/null) >/dev/null 2>&1
+    if test $? -ge 126; then
+      # If not found, run with diagnostics as one may be
+      # presented with env variables to set to find the right version
+      ($2 --version </dev/null)
+    fi
+  else
+    ($1 --version </dev/null) >/dev/null 2>&1
+  fi
+
   test $? -lt 126
 }

@@ -408,7 +421,7 @@ sort_ver() { # sort -V is not generally available
 get_version() {
   app=$1

-  $app --version >/dev/null 2>&1 || return 1
+  $app --version >/dev/null 2>&1 || { $app --version; return 1; }

   $app --version 2>&1 |
   sed -n '# Move version to start of line.
@@ -446,6 +459,7 @@ check_versions() {
     test "$appvar" = TAR && appvar=AMTAR
     case $appvar in
         GZIP) ;; # Do not use $GZIP:  it contains gzip options.
+        PERL::*) ;; # Keep perl modules as-is
         *) eval "app=\${$appvar-$app}" ;;
     esac

@@ -463,11 +477,22 @@ check_versions() {
           ret=1
           continue
         } ;;
+      # Another check is for perl modules.  These can be written as
+      # e.g. perl::XML::XPath in case of XML::XPath module, etc.
+      perl::*)
+        # Extract module name
+        app="${app#perl::}"
+        if ! $PERL -m"$app" -e 'exit 0' >/dev/null 2>&1; then
+          warn_ "Error: perl module '$app' not found"
+          ret=1
+        fi
+        continue
+        ;;
     esac
     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.
-      if ! check_exists $app; then
+      if ! check_exists --verbose $app; then
         warn_ "Error: '$app' not found"
         ret=1
       fi
@@ -598,8 +623,8 @@ case ${GNULIB_SRCDIR--} in
   # Note that $use_git is necessarily true in this case.
   if git_modules_config submodule.gnulib.url >/dev/null; then
     echo "$0: getting gnulib files..."
-    git submodule init || exit $?
-    git submodule update || exit $?
+    git submodule init -- "$gnulib_path" || exit $?
+    git submodule update -- "$gnulib_path" || exit $?

   elif [ ! -d "$gnulib_path" ]; then
     echo "$0: getting gnulib files..."
@@ -628,13 +653,14 @@ case ${GNULIB_SRCDIR--} in
       # This fallback allows at least git 1.5.5.
       if test -f "$gnulib_path"/gnulib-tool; then
         # Since file already exists, assume submodule init already complete.
-        git submodule update || exit $?
+        git submodule update -- "$gnulib_path" || exit $?
       else
         # Older git can't clone into an empty directory.
         rmdir "$gnulib_path" 2>/dev/null
         git clone --reference "$GNULIB_SRCDIR" \
           "$(git_modules_config submodule.gnulib.url)" "$gnulib_path" \
-          && git submodule init && git submodule update \
+          && git submodule init -- "$gnulib_path" \
+          && git submodule update -- "$gnulib_path" \
           || exit $?
       fi
     fi
@@ -807,21 +833,6 @@ version_controlled_file() {
   fi
 }

-# Avoid boostrap failure with gettext/autopoint bug in version 0.18.3.1
-# http://lists.gnu.org/archive/html/coreutils/2013-11/msg00038.html
-# Remove in 2015 when distros have upgraded to >= 0.18.3.2
-autopoint_version=$(get_version $AUTOPOINT)
-# Note autopoint returns version 0.18.3 for version 0.18.3.1
-if test "$autopoint_version" = '0.18.3' ; then
-  if test "$package" = 'coreutils' ; then
-    test -e 'm4/cu-progs.m4' || touch 'm4/cu-progs.m4'
-  fi
-  if ! test -e 'build-aux/git-version-gen' ; then
-    printf "#!/bin/sh\n" > 'build-aux/git-version-gen'
-    chmod a+x 'build-aux/git-version-gen'
-  fi
-fi
-
 # NOTE: we have to be careful to run both autopoint and libtoolize
 # before gnulib-tool, since gnulib-tool is likely to provide newer
 # versions of files "installed" by these two programs.
@@ -904,7 +915,8 @@ if test $use_libtool = 1; then
   esac
 fi
 echo "$0: $gnulib_tool $gnulib_tool_options --import ..."
-$gnulib_tool $gnulib_tool_options --import $gnulib_modules &&
+$gnulib_tool $gnulib_tool_options --import $gnulib_modules \
+  || die "gnulib-tool failed"

 for file in $gnulib_files; do
   symlink_to_dir "$GNULIB_SRCDIR" $file \
diff --git a/gnulib b/gnulib
index 157c42e..1873886 160000
--- a/gnulib
+++ b/gnulib
@@ -1 +1 @@
-Subproject commit 157c42eff782e18fd921b2815f5869c1f53edde7
+Subproject commit 18738862eba59f7277f396dc4bd11d9834c2c7bc
diff --git a/tests/init.sh b/tests/init.sh
old mode 100755
new mode 100644
index 37fc7b6..9f403c5
--- a/tests/init.sh
+++ b/tests/init.sh
@@ -93,6 +93,27 @@ skip_ () { warn_ "$ME_: skipped test: $@"; Exit 77; }
 fatal_ () { warn_ "$ME_: hard error: $@"; Exit 99; }
 framework_failure_ () { warn_ "$ME_: set-up failure: $@"; Exit 99; }

+# This is used to simplify checking of the return value
+# which is useful when ensuring a command fails as desired.
+# I.e., just doing `command ... &&fail=1` will not catch
+# a segfault in command for example.  With this helper you
+# instead check an explicit exit code like
+#   returns_ 1 command ... || fail
+returns_ () {
+  # Disable tracing so it doesn't interfere with stderr of the wrapped command
+  { set +x; } 2>/dev/null
+
+  local exp_exit="$1"
+  shift
+  "$@"
+  test $? -eq $exp_exit && ret_=0 || ret_=1
+
+  if test "$VERBOSE" = yes && test "$gl_set_x_corrupts_stderr_" = false; then
+    set -x
+  fi
+  { return $ret_; } 2>/dev/null
+}
+
 # Sanitize this shell to POSIX mode, if possible.
 DUALCASE=1; export DUALCASE
 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
-- 
2.3.7