bug-gzip
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

FYI: 3 build/maint patches


From: Jim Meyering
Subject: FYI: 3 build/maint patches
Date: Tue, 12 Jul 2011 13:30:48 +0200


>From 7651976bb92b398bbd7ea9da937a7c4d94d622ee Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Tue, 12 Jul 2011 12:26:46 +0200
Subject: [PATCH 1/3] build: update gnulib submodule to latest

---
 gnulib |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/gnulib b/gnulib
index 91fd934..39434c8 160000
--- a/gnulib
+++ b/gnulib
@@ -1 +1 @@
-Subproject commit 91fd934273607a4a395917d5230bd8dd5c866d94
+Subproject commit 39434c8500eba74bb0c3284a61bc2a8bba633c9f
--
1.7.6.430.g34be2


>From e63ba1629ad53132b3775befefd2e52bad25510a Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Tue, 12 Jul 2011 12:38:33 +0200
Subject: [PATCH 2/3] maint: use gnulib's realloc-gnu and malloc-gnu modules

* bootstrap.conf (gnulib_modules): Use realloc-gnu and malloc-gnu,
rather than the now-deprecated realloc and malloc modules.
---
 bootstrap.conf |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/bootstrap.conf b/bootstrap.conf
index ef10471..a2e22ba 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -42,12 +42,12 @@ ignore-value
 lib-ignore
 lstat
 maintainer-makefile
-malloc
+malloc-gnu
 manywarnings
 perror
 printf-posix
 readme-release
-realloc
+realloc-gnu
 stat-time
 sys_stat
 time
--
1.7.6.430.g34be2


>From dc9369793648fe7d17d45239c00c97f2d80bc3de Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Tue, 12 Jul 2011 12:40:51 +0200
Subject: [PATCH 3/3] maint: update init.sh and bootstrap from gnulib

* bootstrap: Update from gnulib.
* tests/init.sh: Update from gnulib.
---
 bootstrap     |   48 +++++++++++++++++++++++++++++++++++-------------
 tests/init.sh |   12 ++++++++----
 2 files changed, 43 insertions(+), 17 deletions(-)

diff --git a/bootstrap b/bootstrap
index 7cbb5dc..b286beb 100755
--- a/bootstrap
+++ b/bootstrap
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Print a version string.
-scriptversion=2011-04-05.18; # UTC
+scriptversion=2011-06-22.06; # UTC

 # Bootstrap this package from checked-out sources.

@@ -290,7 +290,7 @@ sort_patterns() {
     P
     x
     s/^\n//
-  }'
+  }' | sed '/^$/d'
 }

 # If $STR is not already on a line by itself in $FILE, insert it,
@@ -421,17 +421,31 @@ check_versions() {
     # Honor $APP variables ($TAR, $AUTOCONF, etc.)
     appvar=`echo $app | tr '[a-z]-' '[A-Z]_'`
     test "$appvar" = TAR && appvar=AMTAR
-    eval "app=\${$appvar-$app}"
-    inst_ver=$(get_version $app)
-    if [ ! "$inst_ver" ]; then
-      echo "$me: Error: '$app' not found" >&2
-      ret=1
-    elif [ ! "$req_ver" = "-" ]; then
-      latest_ver=$(sort_ver $req_ver $inst_ver | cut -d' ' -f2)
-      if [ ! "$latest_ver" = "$inst_ver" ]; then
-        echo "$me: Error: '$app' version == $inst_ver is too old" >&2
-        echo "       '$app' version >= $req_ver is required" >&2
+    case $appvar in
+        GZIP) ;; # Do not use $GZIP:  it contains gzip options.
+        *) eval "app=\${$appvar-$app}" ;;
+    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.
+      $app --version >/dev/null 2>&1
+      if [ 126 -le $? ]; then
+        echo "$me: Error: '$app' not found" >&2
+        ret=1
+      fi
+    else
+      # Require app to produce a new enough version string.
+      inst_ver=$(get_version $app)
+      if [ ! "$inst_ver" ]; then
+        echo "$me: Error: '$app' not found" >&2
         ret=1
+      else
+        latest_ver=$(sort_ver $req_ver $inst_ver | cut -d' ' -f2)
+        if [ ! "$latest_ver" = "$inst_ver" ]; then
+          echo "$me: Error: '$app' version == $inst_ver is too old" >&2
+          echo "       '$app' version >= $req_ver is required" >&2
+          ret=1
+        fi
       fi
     fi
   done
@@ -656,10 +670,18 @@ symlink_to_dir()
         cp -fp "$src" "$dst"
       }
     else
+      # Leave any existing symlink alone, if it already points to the source,
+      # so that broken build tools that care about symlink times
+      # aren't confused into doing unnecessary builds.  Conversely, if the
+      # existing symlink's time stamp is older than the source, make it afresh,
+      # so that broken tools aren't confused into skipping needed builds.  See
+      # <http://lists.gnu.org/archive/html/bug-gnulib/2011-05/msg00326.html>.
       test -h "$dst" &&
       src_ls=`ls -diL "$src" 2>/dev/null` && set $src_ls && src_i=$1 &&
       dst_ls=`ls -diL "$dst" 2>/dev/null` && set $dst_ls && dst_i=$1 &&
-      test "$src_i" = "$dst_i" || {
+      test "$src_i" = "$dst_i" &&
+      both_ls=`ls -dt "$src" "$dst"` &&
+      test "X$both_ls" = "X$dst$nl$src" || {
         dot_dots=
         case $src in
         /*) ;;
diff --git a/tests/init.sh b/tests/init.sh
index 71c6516..0da6c1e 100644
--- a/tests/init.sh
+++ b/tests/init.sh
@@ -68,8 +68,8 @@ Exit () { set +e; (exit $1); exit $1; }

 # Print warnings (e.g., about skipped and failed tests) to this file number.
 # Override by defining to say, 9, in init.cfg, and putting say,
-# "export ...ENVVAR_SETTINGS...; exec 9>&2; $(SHELL)" in the definition
-# of TESTS_ENVIRONMENT in your tests/Makefile.am file.
+#   export ...ENVVAR_SETTINGS...; $(SHELL) 9>&2
+# in the definition of TESTS_ENVIRONMENT in your tests/Makefile.am file.
 # This is useful when using automake's parallel tests mode, to print
 # the reason for skip/failure to console, rather than to the .log files.
 : ${stderr_fileno_=2}
@@ -77,6 +77,7 @@ Exit () { set +e; (exit $1); exit $1; }
 warn_ () { echo "$@" 1>&$stderr_fileno_; }
 fail_ () { warn_ "$ME_: failed test: $@"; Exit 1; }
 skip_ () { warn_ "$ME_: skipped test: $@"; Exit 77; }
+fatal_ () { warn_ "$ME_: hard error: $@"; Exit 99; }
 framework_failure_ () { warn_ "$ME_: set-up failure: $@"; Exit 99; }

 # Sanitize this shell to POSIX mode, if possible.
@@ -167,7 +168,10 @@ else
     st_=$?

     # $re_shell_ works just fine.  Use it.
-    test $st_ = 10 && break
+    if test $st_ = 10; then
+      gl_set_x_corrupts_stderr_=false
+      break
+    fi

     # If this is our first marginally acceptable shell, remember it.
     if test "$st_:$marginal_" = 9: ; then
@@ -400,7 +404,7 @@ mktempd_ ()
 {
   case $# in
   2);;
-  *) fail_ "Usage: $ME DIR TEMPLATE";;
+  *) fail_ "Usage: mktempd_ DIR TEMPLATE";;
   esac

   destdir_=$1
--
1.7.6.430.g34be2



reply via email to

[Prev in Thread] Current Thread [Next in Thread]