On 03/22/2013 09:31 AM, Jim Meyering wrote: > Network connectivity?
Yes, that's what it was. A corrupted DNS cache, apparently. (Which leads me to wonder: how trustworthy is that part of the build procedure, anyway? But moving on....) > I haven't investigated that for some time, but thought it was > due to my (personal) use of gettext that's a little older than the > latest, in which I presume that offending macro use has been removed. Unfortunately it was more complicated than that. Even with a newer gettext it installed macros from gettext 0.17. I fiddled with it and the following patch fixed things for me. It may be a bit belt-and-suspenders, in that it insists on 0.18.2 when that might not strictly be necessary with the other changes I made, but to some extent I quit while I was ahead. >From dce7832def4c669225226832f6a34e6e1b6ffea1 Mon Sep 17 00:00:00 2001 From: Paul Eggert <[email protected]> Date: Sat, 23 Mar 2013 00:21:45 -0700 Subject: [PATCH] maint: update build procedure to recent gettext etc. * bootstrap.conf (gnulib_modules): Add vararrays. (needed_gnulib_files, unnecessary_gettext_files): New vars. (bootstrap_post_import_hook): New function, to implement these vars. (excluded_files): Remove; 'bootstrap' no longer supports this. Its function is now performed by unnecessary_gettext_files. (buildreq): Update automake to 1.12.2, to avoid CVE-2012-3386. * configure.ac (AM_GNU_GETTEXT_VERSION): Bump from 0.17 to 0.18.2, to lessen the probability that we'll have outlandishly old files during a build. * m4/vararrays.m4: Remove from repository, as we now use the gnulib version. --- bootstrap.conf | 48 ++++++++++++++++++++++++++++++++++++++---------- configure.ac | 2 +- m4/vararrays.m4 | 35 ----------------------------------- 3 files changed, 39 insertions(+), 46 deletions(-) delete mode 100644 m4/vararrays.m4 diff --git a/bootstrap.conf b/bootstrap.conf index 00e75e3..240754b 100644 --- a/bootstrap.conf +++ b/bootstrap.conf @@ -73,6 +73,7 @@ system-quote unistd unlocked-io update-copyright +vararrays verify version-etc version-etc-fsf @@ -106,18 +107,36 @@ grep '^[ ]*AM_GNU_GETTEXT(external\>' configure.ac > /dev/null && grep '^[ ]*AM_GNU_GETTEXT(\[external\]' configure.ac > /dev/null && gettext_external=1 +needed_gnulib_files= +unnecessary_gettext_files= + if test $gettext_external = 1; then # Gettext supplies these files, but we don't need them since # we don't have an intl subdirectory. - excluded_files=' - m4/glibc2.m4 - m4/intdiv0.m4 - m4/lcmessage.m4 - m4/printf-posix.m4 - m4/uintmax_t.m4 - m4/ulonglong.m4 - m4/visibility.m4 -' + unnecessary_gettext_files=' + m4/glibc2.m4 + m4/intdiv0.m4 + m4/intl.m4 + m4/intldir.m4 + m4/intmax.m4 + m4/lcmessage.m4 + m4/lock.m4 + m4/printf-posix.m4 + m4/threadlib.m4 + m4/uintmax_t.m4 + m4/visibility.m4 + ' + + # Gettext supplies these files, but the gnulib version of these files + # typically is more up-to-date. We don't use gnulib's gettext module, + # as it's too heavyweight, so grab the files one at a time instead. + needed_gnulib_files=' + m4/gettext.m4 + m4/intlmacosx.m4 + m4/nls.m4 + m4/po.m4 + m4/progtest.m4 + ' fi gnulib_tool_option_extras="--tests-base=gnulib-tests --with-tests @@ -130,7 +149,7 @@ gnulib_tool_option_extras="--tests-base=gnulib-tests --with-tests # Build prerequisites buildreq="\ autoconf 2.61 -automake 1.11 +automake 1.12.2 autopoint - gettext - git 1.4.4 @@ -145,6 +164,15 @@ tar - # Automake requires that ChangeLog exist. touch ChangeLog || exit 1 +bootstrap_post_import_hook() +{ + for file in $needed_gnulib_files; do + echo "$0: $gnulib_tool --copy-file $file $file ..." + $gnulib_tool --copy-file $file $file || exit + done + rm -f $unnecessary_gettext_files || exit +} + bootstrap_epilogue() { perl -pi -e "s/\@PACKAGE\@/$package/g" README-release diff --git a/configure.ac b/configure.ac index 7d29646..aea40fc 100644 --- a/configure.ac +++ b/configure.ac @@ -161,7 +161,7 @@ test -f $srcdir/.tarball-version \ || SRC_VERSION_C=../src/version.c AM_GNU_GETTEXT([external], [need-ngettext]) -AM_GNU_GETTEXT_VERSION([0.17]) +AM_GNU_GETTEXT_VERSION([0.18.2]) XGETTEXT="AWK='$AWK' \$(SHELL) \$(top_srcdir)/exgettext $XGETTEXT" AC_CONFIG_FILES([ diff --git a/m4/vararrays.m4 b/m4/vararrays.m4 deleted file mode 100644 index bf957ef..0000000 --- a/m4/vararrays.m4 +++ /dev/null @@ -1,35 +0,0 @@ -# Check for variable-length arrays. - -#serial 2 - -# From Paul Eggert - -# Copyright (C) 2001, 2009-2013 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 -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. - -AC_DEFUN([AC_C_VARARRAYS], -[ - AC_CACHE_CHECK([for variable-length arrays], - ac_cv_c_vararrays, - [AC_TRY_COMPILE( - [], - [static int x; char a[++x]; a[sizeof a - 1] = 0; return a[0];], - ac_cv_c_vararrays=yes, - ac_cv_c_vararrays=no)]) - if test $ac_cv_c_vararrays = yes; then - AC_DEFINE([HAVE_C_VARARRAYS], [1], - [Define to 1 if C supports variable-length arrays.]) - fi -]) -- 1.7.11.7
