[PATCH] build: update to latest gnulib

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

 



Pick up recent gnulib improvements.

* .gnulib: Update to latest.
* bootstrap: Resync.
* bootstrap.conf (gnulib_tool_option_extras): Adjust to bootstrap
changes.
* gnulib/lib/Makefile.am: Likewise.
---

I'm not sure that we are desparate for any of these patches, so
much as it's nice to re-sync now that 0.9.9 is out.

* .gnulib 6b93d00...8bb68d3 (128):
  > strptime: silence gcc warnings
  > inet_ntop: silence gcc warning
  > getloadavg test: skip the test on GNU/Linux without /proc mounted
  > regex: Avoid link error on MSVC 9.
  > doc: Mention --with-tests option.
  > users.txt: order package names lexicographically.
  > maint.mk: fix description in comment
  > ignore-value: remove deprecated ignore_ptr function
  > test-init.sh: avoid a subshell
  > setlocale tests: Avoid test failure on Solaris 11 2011-11.
  > posix_spawn_file_actions_addopen: Work around Solaris 11 2011-11 bug.
  > posix_spawn_file_actions_adddup2: Work around Solaris 11 2011-11 bug.
  > posix_spawn_file_actions_addclose: Work around Solaris 11 2011-11 bug.
  > doc: Update for Solaris 11 2011-11.
  > mktime: Avoid compilation error on Solaris 11.
  > doc: Small fix.
  > autoupdate
  > Add lgpl-3.0 module.
  > select.c: indent with spaces, not TABs
  > autoupdate
  > Add ChangeLog entries for last 3 commits.
  > quotearg: do not use grave accent for left quote
  > quotearg: fall back to Unicode single quotes in UTF-8 and GB-18030 locales
  > quotearg: fix Wikipedia link
  > Fix for mingw with MSVC9.
  > Talk about "native Windows API", not "Woe32".
  > argp: Avoid crash if translator uses % characters in a translation.
  > doc: add ChangeLog entry for previous change
  > doc: C11 and C++11 are now official
  > uc-is-grapheme-break tests: Tweak.
  > test-init.sh: correct the test for diff -u
  > doc: fix minor quoting issues, mostly with `
  > In commentary, do not use ` to quote.
  > Use ', not `, for quoting output.
  > strtoimax: Don't force a replacement on systems where intmax_t is int.
  > doc: Mention NetBSD bugs.
  > strtoumax tests: Enhance tests.
  > strtoimax: Work around AIX 5.1 bug.
  > inttypes: Modernize.
  > init.sh: don't waste a subshell just to redirect stderr
  > test-init.sh: avoid failure on HP-UX 11.00
  > Tests for module 'strtoull'.
  > Tests for module 'strtoll'.
  > Tests for module 'strtoul'.
  > Tests for module 'strtol'.
  > update from texinfo
  > autoupdate
  > test-init.sh: accommodate Solaris 5.10's different diff -u output
  > test-posixtm: don't assume signed integer wraparound
  > Spell out "Windows 9x" and "Windows XP".
  > test-vc-list-files-cvs.sh: remove obsolete comment
  > autoupdate
  > update from texinfo
  > Talk about "native Windows API", not "Win32".
  > isatty: Support for MSVC 9.
  > maint.mk: remove temporary transition aid from over 1.5 years ago
  > init.sh: do not try to accommodate compare arguments starting with "-"
  > Enhance tests for module 'isatty'.
  > New module 'isatty'.
  > canonicalize: Tweak 2011-12-29 commit.
  > gitlog-to-changelog: describe input syntax in --help output
  > gitlog-to-changelog: fix typo in --help: show backslash before email @
  > gitlog-to-changelog: don't malfunction when name contains %-directive
  > gitlog-to-changelog: Copyright-paperwork-exempt: yes == (tiny change)
  > test-framework-sh: init.sh: fix "make dist" failure
  > autoupdate
  > maint: update all copyright year number ranges
  > version-etc: update copyright year reported by --version
  > canonicalize: only stat() when required
  > doc: cover st_ino issues once; add OpenVMS etc.
  > same-inode: port to OpenVMS
  > canonicalize: fix references to stat() and lstat()
  > autoupdate
  > gitlog-to-changelog: remove a little duplication
  > canonicalize: add support for not resolving symlinks
  > autoupdate
  > update from texinfo
  > gitlog-to-changelog: do not clump multi-paragraph entries
  > update from texinfo
  > announce-gen: fix `cmd' typo in diagnostic
  > update from texinfo
  > autoupdate
  > test-framework-sh: distribute init.sh
  > autoupdate
  > maint: remove explicit Files: tests/init.sh; depend on test-framework-sh
  > test-framework-sh: add minimal tests of init.sh's compare function
  > test-framework-sh: new module
  > init.sh: do not emit simulated diff output to stderr
  > .gitignore: ignore gnulib.dvi and regex.info
  > init.sh: correct previous change
  > correct previous ChangeLog entry: s/set -x/set -e/
  > init.sh: avoid unwarranted test failure when using "set -x"
  > bootstrap: fix it to honor $ACLOCAL_FLAGS once again
  > bootstrap: remove some now-unneeded code
  > ftoastr: fix typo
  > README-release: fix punctuation
  > bootstrap: correct the recent buildreq change
  > build: let bootstrap resort to wget for downloading .po files
  > * m4/stdint.m4 (gl_STDINT_H): Finish up previous change.
  > stdint: don't assume C++11 when compiling with g++
  > alloca: protect comment from gnulib-tool
  > ChangeLog: fix encoding typo
  > localcharset: Use an absolute path in TESTS_ENVIRONMENT.
  > strftime-tests: also test nanoseconds
  > inttypes, stdint: add C++11 support
  > Fix ChangeLog typo in previous commit.
  > nonblocking tests: Fix test failure on Linux/MIPS.
  > argmatch: don't hard-code `' when listing valid option arguments
  > autoupdate
  > autoupdate
  > bootstrap: detect tools required by gnulib-tool
  > sethostname: Port to Windows platforms.
  > tests: Avoid spurious error message on platforms without mktemp program.
  > sethostname: Fix documentation.
  > gnulib-tool: Verify that the License field is present and non-empty.
  > sethostname tests: Fix link error on mingw.
  > sethostname tests: Fix compilation error on mingw.
  > sethostname tests: Avoid a gcc warning.
  > Tweak last commit.
  > Add a test suite for the sethostname module.
  > Tweak last commit.
  > Integrate the sethostname module into unistd
  > Tweak last commit.
  > Add a new sethostname module
  > Tweak last commit.
  > Split the HOST_NAME_MAX detection into a separate m4 macro
  > Fix module descriptions syntax.
  > stdalign: port to Clang 3.0

 .gnulib                |    2 +-
 bootstrap              |  240 +++++++++++++++---------------------------------
 bootstrap.conf         |    3 +-
 gnulib/lib/Makefile.am |   11 ++-
 4 files changed, 89 insertions(+), 167 deletions(-)

diff --git a/.gnulib b/.gnulib
index 6b93d00..8bb68d3 160000
--- a/.gnulib
+++ b/.gnulib
@@ -1 +1 @@
-Subproject commit 6b93d00f5410ec183e3a70ebf8e418e3b1bb0191
+Subproject commit 8bb68d37569145a772000ce8db87397529f5b3cf
diff --git a/bootstrap b/bootstrap
index f76db9a..66da981 100755
--- a/bootstrap
+++ b/bootstrap
@@ -1,10 +1,10 @@
 #! /bin/sh
 # Print a version string.
-scriptversion=2011-08-11.17; # UTC
+scriptversion=2012-01-06.07; # UTC

 # Bootstrap this package from checked-out sources.

-# Copyright (C) 2003-2011 Free Software Foundation, Inc.
+# Copyright (C) 2003-2012 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
@@ -38,10 +38,6 @@ export LC_ALL

 local_gl_dir=gl

-# Temporary directory names.
-bt='._bootmp'
-bt_regex=`echo "$bt"| sed 's/\./[.]/g'`
-bt2=${bt}2
 me=$0

 usage() {
@@ -88,6 +84,9 @@ gnulib_modules=
 # Any gnulib files needed that are not in modules.
 gnulib_files=

+: ${AUTOPOINT=autopoint}
+: ${AUTORECONF=autoreconf}
+
 # A function to be called to edit gnulib.mk right after it's created.
 # Override it via your own definition in bootstrap.conf.
 gnulib_mk_hook() { :; }
@@ -105,6 +104,11 @@ po_download_command_format=\
 "rsync --delete --exclude '*.s1' -Lrtvz \
  'translationproject.org::tp/latest/%s/' '%s'"

+# Fallback for downloading .po files (if rsync fails).
+po_download_command_format2=\
+"wget --mirror -nd -q -np -A.po -P '%s' \
+ http://translationproject.org/latest/%s/";
+
 extract_package_name='
   /^AC_INIT(/{
      /.*,.*,.*, */{
@@ -312,8 +316,8 @@ insert_vc_ignore() {
   pattern="$2"
   case $vc_ignore_file in
   *.gitignore)
-    # A .gitignore entry that does not start with `/' applies
-    # recursively to subdirectories, so prepend `/' to every
+    # A .gitignore entry that does not start with '/' applies
+    # recursively to subdirectories, so prepend '/' to every
     # .gitignore entry.
     pattern=`echo "$pattern" | sed s,^,/,`;;
   esac
@@ -473,6 +477,32 @@ if test $use_libtool = 1; then
   find_tool LIBTOOLIZE glibtoolize libtoolize
 fi

+# gnulib-tool requires at least automake and autoconf.
+# If either is not listed, add it (with minimum version) as a prerequisite.
+case $buildreq in
+  *automake*) ;;
+  *) buildreq="automake 1.9
+$buildreq" ;;
+esac
+case $buildreq in
+  *autoconf*) ;;
+  *) buildreq="autoconf 2.59
+$buildreq" ;;
+esac
+
+# When we can deduce that gnulib-tool will require patch,
+# and when patch is not already listed as a prerequisite, add it, too.
+if test ! -d "$local_gl_dir" \
+    || find "$local_gl_dir" -name '*.diff' -exec false {} +; then
+  :
+else
+  case $buildreq in
+    *patch*) ;;
+    *) buildreq="patch -
+$buildreq" ;;
+  esac
+fi
+
 if ! printf "$buildreq" | check_versions; then
   echo >&2
   if test -f README-prereq; then
@@ -583,6 +613,9 @@ download_po_files() {
   domain=$2
   echo "$me: getting translations into $subdir for $domain..."
   cmd=`printf "$po_download_command_format" "$domain" "$subdir"`
+  eval "$cmd" && return
+  # Fallback to HTTP.
+  cmd=`printf "$po_download_command_format2" "$subdir" "$domain"`
   eval "$cmd"
 }

@@ -703,56 +736,32 @@ symlink_to_dir()
   }
 }

-cp_mark_as_generated()
-{
-  cp_src=$1
-  cp_dst=$2
+# 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.
+# Then, *after* gnulib-tool (see below), we have to be careful to
+# run autoreconf in such a way that it does not run either of these
+# two just-pre-run programs.

-  if cmp -s "$cp_src" "$GNULIB_SRCDIR/$cp_dst"; then
-    symlink_to_dir "$GNULIB_SRCDIR" "$cp_dst"
-  elif cmp -s "$cp_src" "$local_gl_dir/$cp_dst"; then
-    symlink_to_dir $local_gl_dir "$cp_dst"
-  else
-    case $cp_dst in
-      *.[ch])             c1='/* '; c2=' */';;
-      *.texi)             c1='@c '; c2=     ;;
-      *.m4|*/Make*|Make*) c1='# ' ; c2=     ;;
-      *)                  c1=     ; c2=     ;;
-    esac
+# Import from gettext.
+with_gettext=yes
+grep '^[	 ]*AM_GNU_GETTEXT_VERSION(' configure.ac >/dev/null || \
+    with_gettext=no

-    # If the destination directory doesn't exist, create it.
-    # This is required at least for "lib/uniwidth/cjk.h".
-    dst_dir=`dirname "$cp_dst"`
-    test -d "$dst_dir" || mkdir -p "$dst_dir"
-
-    if test -z "$c1"; then
-      cmp -s "$cp_src" "$cp_dst" || {
-        # Copy the file first to get proper permissions if it
-        # doesn't already exist.  Then overwrite the copy.
-        echo "$me: cp -f $cp_src $cp_dst" &&
-        rm -f "$cp_dst" &&
-        cp "$cp_src" "$cp_dst-t" &&
-        sed "s!$bt_regex/!!g" "$cp_src" > "$cp_dst-t" &&
-        mv -f "$cp_dst-t" "$cp_dst"
-      }
-    else
-      # Copy the file first to get proper permissions if it
-      # doesn't already exist.  Then overwrite the copy.
-      cp "$cp_src" "$cp_dst-t" &&
-      (
-        echo "$c1-*- buffer-read-only: t -*- vi: set ro:$c2" &&
-        echo "${c1}DO NOT EDIT! GENERATED AUTOMATICALLY!$c2" &&
-        sed "s!$bt_regex/!!g" "$cp_src"
-      ) > $cp_dst-t &&
-      if cmp -s "$cp_dst-t" "$cp_dst"; then
-        rm -f "$cp_dst-t"
-      else
-        echo "$me: cp $cp_src $cp_dst # with edits" &&
-        mv -f "$cp_dst-t" "$cp_dst"
-      fi
-    fi
-  fi
-}
+if test $with_gettext = yes; then
+  # Released autopoint has the tendency to install macros that have been
+  # obsoleted in current gnulib, so run this before gnulib-tool.
+  echo "$0: $AUTOPOINT --force"
+  $AUTOPOINT --force || exit
+fi
+
+# Autoreconf runs aclocal before libtoolize, which causes spurious
+# warnings if the initial aclocal is confused by the libtoolized
+# (or worse out-of-date) macro directory.
+if grep '^[    ]*LT_INIT' configure.ac >/dev/null; then
+  echo "running: $LIBTOOLIZE --copy --install"
+  $LIBTOOLIZE --copy --install
+fi

 version_controlled_file() {
   dir=$1
@@ -771,83 +780,17 @@ version_controlled_file() {
   test $found = yes
 }

-slurp() {
-  for dir in . `(cd $1 && find * -type d -print)`; do
-    copied=
-    sep=
-    for file in `ls -a $1/$dir`; do
-      case $file in
-      .|..) continue;;
-      # FIXME: should all file names starting with "." be ignored?
-      .*) continue;;
-      esac
-      test -d $1/$dir/$file && continue
-      for excluded_file in $excluded_files; do
-        test "$dir/$file" = "$excluded_file" && continue 2
-      done
-      if test $file = Makefile.am && test "X$gnulib_mk" != XMakefile.am; then
-        copied=$copied${sep}$gnulib_mk; sep=$nl
-        remove_intl='/^[^#].*\/intl/s/^/#/;'"s!$bt_regex/!!g"
-        sed "$remove_intl" $1/$dir/$file |
-        cmp - $dir/$gnulib_mk > /dev/null || {
-          echo "$me: Copying $1/$dir/$file to $dir/$gnulib_mk ..." &&
-          rm -f $dir/$gnulib_mk &&
-          sed "$remove_intl" $1/$dir/$file >$dir/$gnulib_mk &&
-          gnulib_mk_hook $dir/$gnulib_mk
-        }
-      elif { test "${2+set}" = set && test -r $2/$dir/$file; } ||
-           version_controlled_file $dir $file; then
-        echo "$me: $dir/$file overrides $1/$dir/$file"
-      else
-        copied=$copied$sep$file; sep=$nl
-        cp_mark_as_generated $1/$dir/$file $dir/$file
-      fi || exit
-    done
-
-    for dot_ig in x $vc_ignore; do
-      test $dot_ig = x && continue
-      ig=$dir/$dot_ig
-      if test -n "$copied"; then
-        insert_vc_ignore $ig "$copied"
-        # If an ignored file name ends with .in.h, then also add
-        # the name with just ".h".  Many gnulib headers are generated,
-        # e.g., stdint.in.h -> stdint.h, dirent.in.h ->..., etc.
-        # Likewise for .gperf -> .h, .y -> .c, and .sin -> .sed
-        f=`echo "$copied" |
-          sed '
-            s/\.in\.h$/.h/
-            s/\.sin$/.sed/
-            s/\.y$/.c/
-            s/\.gperf$/.h/
-          '
-        `
-        insert_vc_ignore $ig "$f"
-
-        # For files like sys_stat.in.h and sys_time.in.h, record as
-        # ignorable the directory we might eventually create: sys/.
-        f=`echo "$copied"|sed 's/sys_.*\.in\.h$/sys/'`
-        insert_vc_ignore $ig "$f"
-      fi
-    done
-  done
-}
-
-
-# Create boot temporary directories to import from gnulib and gettext.
-rm -fr $bt $bt2 &&
-mkdir $bt $bt2 || exit
-
 # Import from gnulib.

 gnulib_tool_options="\
  --import\
  --no-changelog\
- --aux-dir $bt/$build_aux\
- --doc-base $bt/$doc_base\
+ --aux-dir $build_aux\
+ --doc-base $doc_base\
  --lib $gnulib_name\
- --m4-base $bt/$m4_base/\
- --source-base $bt/$source_base/\
- --tests-base $bt/$tests_base\
+ --m4-base $m4_base/\
+ --source-base $source_base/\
+ --tests-base $tests_base\
  --local-dir $local_gl_dir\
  $gnulib_tool_option_extras\
 "
@@ -859,26 +802,11 @@ if test $use_libtool = 1; then
 fi
 echo "$0: $gnulib_tool $gnulib_tool_options --import ..."
 $gnulib_tool $gnulib_tool_options --import $gnulib_modules &&
-slurp $bt || exit

 for file in $gnulib_files; do
   symlink_to_dir "$GNULIB_SRCDIR" $file || exit
 done

-
-# Import from gettext.
-with_gettext=yes
-grep '^[	 ]*AM_GNU_GETTEXT_VERSION(' configure.ac >/dev/null || \
-    with_gettext=no
-
-if test $with_gettext = yes; then
-  echo "$0: (cd $bt2; ${AUTOPOINT-autopoint}) ..."
-  cp configure.ac $bt2 &&
-  (cd $bt2 && ${AUTOPOINT-autopoint} && rm configure.ac) &&
-  slurp $bt2 $bt || exit
-fi
-rm -fr $bt $bt2 || exit
-
 # Remove any dangling symlink matching "*.m4" or "*.[ch]" in some
 # gnulib-populated directories.  Such .m4 files would cause aclocal to fail.
 # The following requires GNU find 4.2.3 or newer.  Considering the usual
@@ -891,28 +819,12 @@ find "$m4_base" "$source_base" \
   -depth \( -name '*.m4' -o -name '*.[ch]' \) \
   -type l -xtype l -delete > /dev/null 2>&1

-# Reconfigure, getting other files.
-
-# Skip autoheader if it's not needed.
-grep -E '^[	 ]*AC_CONFIG_HEADERS?\>' configure.ac >/dev/null ||
-  AUTOHEADER=true
-
-for command in \
-  libtool \
-  "${ACLOCAL-aclocal} --force -I '$m4_base' $ACLOCAL_FLAGS" \
-  "${AUTOCONF-autoconf} --force" \
-  "${AUTOHEADER-autoheader} --force" \
-  "${AUTOMAKE-automake} --add-missing --copy --force-missing"
-do
-  if test "$command" = libtool; then
-    test $use_libtool = 0 \
-      && continue
-    command="${LIBTOOLIZE-libtoolize} -c -f"
-  fi
-  echo "$0: $command ..."
-  eval "$command" || exit
-done
-
+# Tell autoreconf not to invoke autopoint or libtoolize; they were run above.
+echo "running: AUTOPOINT=true LIBTOOLIZE=true " \
+    "$AUTORECONF --verbose --install --no-recursive -I $m4_base $ACLOCAL_FLAGS"
+AUTOPOINT=true LIBTOOLIZE=true \
+    $AUTORECONF --verbose --install --no-recursive -I $m4_base $ACLOCAL_FLAGS \
+  || exit 1

 # Get some extra files from gnulib, overriding existing files.
 for file in $gnulib_extra_files; do
diff --git a/bootstrap.conf b/bootstrap.conf
index c352718..04c7645 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -1,6 +1,6 @@
 # Bootstrap configuration.

-# Copyright (C) 2010-2011 Red Hat, Inc.
+# Copyright (C) 2010-2012 Red Hat, Inc.

 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -171,6 +171,7 @@ tests_base=gnulib/tests
 gnulib_tool_option_extras="\
  --lgpl=2\
  --with-tests\
+ --makefile-name=gnulib.mk\
  --avoid=pt_chown\
 "
 local_gl_dir=gnulib/local
diff --git a/gnulib/lib/Makefile.am b/gnulib/lib/Makefile.am
index 3445c6d..7ec8648 100644
--- a/gnulib/lib/Makefile.am
+++ b/gnulib/lib/Makefile.am
@@ -1,8 +1,17 @@
 ## Makefile for gnulib/lib				-*-Makefile-*-

-## Copyright (C) 2011 Red Hat, Inc.
+## Copyright (C) 2011-2012 Red Hat, Inc.
 ## See COPYING.LIB for the License of this software

+# Initialize variables, so gnulib.mk can append to them
+BUILT_SOURCES =
+CLEANFILES =
+EXTRA_DIST =
+MOSTLYCLEANDIRS =
+MOSTLYCLEANFILES =
+SUFFIXES =
+noinst_LTLIBRARIES =
+
 include gnulib.mk

 INCLUDES = $(GETTEXT_CPPFLAGS)
-- 
1.7.7.5

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]