Re: FYI: [PATCH] bootstrap: adopt autoconf echo normalization code.

2011-12-23 Thread Gary V. Vaughan
Hi Eric,

On 19 Dec 2011, at 20:48, Eric Blake wrote:
> On 12/18/2011 12:46 AM, Gary V. Vaughan wrote:
>> Pushed as obvious.
>> 
>> Dash shipped with Ubutu-11.10 as /bin/sh, among others, still
>> has a crippled echo builtin that mis-handles backslashes.
> 
> That's an unfair characterization.  Rather, dash ships an echo builtin
> that complies with POSIX by default (which mandates backslash
> interpretation), while bash ships an echo builtin that ignores backslash
> by default, but can be made to comply with POSIX via 'shopt -s xpg_echo'.

I wasn't aware of the POSIX distinction, although while dash my be strictly
correct, it does mean that POSIX compliant echo is essentially useless for
bootstrap (and autoconf, and libtool etc etc)... entailing an ugly blob of
code to detect and circumvent any echo implementation that behaves that way.

>> +++ b/build-aux/options-parser
>> @@ -173,6 +173,46 @@ basename='s|^.*/||'
>> nl='
>> '
>> 
>> +# There are still modern systems that have problems with `echo' mis-
>> +# handling backslashes, among others, so make sure $bs_echo is set to a
>> +# command that correctly interprets backslashes.
> 
> Again, a mis-characterization of the problem.

No offense implied or intended by that comment, and I'll be happy to apply
a followup patch if you submit something preferable.

>> +# (this code from Autoconf 2.68)
>> +
>> +# Printing a long string crashes Solaris 7 /usr/bin/printf.
>> +bs_echo='\\\'
>> +bs_echo=$bs_echo$bs_echo$bs_echo$bs_echo$bs_echo
>> +bs_echo=$bs_echo$bs_echo$bs_echo$bs_echo$bs_echo$bs_echo
>> +# Prefer a ksh shell builtin over an external printf program on Solaris,
>> +# but without wasting forks for bash or zsh.
>> +if test -z "$BASH_VERSION$ZSH_VERSION" \
>> +&& (test "X`print -r -- $bs_echo`" = "X$bs_echo") 2>/dev/null; then
>> +  bs_echo='print -r --'
>> +  bs_echo_n='print -rn --'
> 
> Also, I'm not sure that I like the name $bs_echo - it's not namespace
> clean.  I would have expected something more like $lt_echo.

lt_ is the libtool namespace, and options-parser is a module of bootstrap,
so I used bs_.

After the initial encouragement on the gnulib list, I wrote bootstrap for
gnulib, but it looks like it won't ever make it upstream in its previous
form, so I split it into a reusable options-parser script that provides the
hooks and requires framework and uses it to implement a pluggable shell
script options parser that can be extended by writing a few functions...
and then on top of that my much improved extract-trace script which is a
standalone proof of concept that m4 can be used more easily and profitably
for parsing configure.{ac,in} than ad-hoc sed scripts, and finally with the
saner bootstrap implemented on top of both of those.

When I next have some time to hand-hold the process, I'll make another attempt
at getting gnulib to accept this version of bootstrap, which I hope will prove
a bit easier with the separation into smaller chunks, each useful in its own
right, and then try and get autoreconf and others to adopt the extract-trace
script and/or approach over brittle ad-hoc sed scripts.

Cheers,
-- 
Gary V. Vaughan (gary AT gnu DOT org)


FYI: [PATCH] gnulib: update gnulib submodule.

2011-12-23 Thread Gary V. Vaughan
Pushed as obvious.

I have no idea how I ended up with a gnulib subproject that
looks for all the world like f51babfaf is a public commit, but
which at least 2 other folks cannot see, so updating to the
latest master.

Among others, this fixes the reference to a local commit.
* gnulib: Updated to todays master HEAD revision.

Signed-off-by: Gary V. Vaughan 
---
 gnulib |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/gnulib b/gnulib
index f51babf..576e46c 16
--- a/gnulib
+++ b/gnulib
@@ -1 +1 @@
-Subproject commit f51babfaf400eb509f854cad509f5e649b9182b1
+Subproject commit 576e46cb89ee781ec9f8352723b5dc96d3c7fd1f
-- 
1.7.8

Cheers,
-- 
Gary V. Vaughan (gary AT gnu DOT org)



FYI: [PATCH] bootstrap: fix Autoconf version typo.

2011-12-23 Thread Gary V. Vaughan
Pushed as obvious.

I must have forgotten to rerun `git add build-aux/options-parser` in
my local tree between fixing this very short-lived typo and pushing
the patch that came after it.  Sorry about that.

* build-aux/options-parses: s/2\.62/2.68/

Signed-off-by: Gary V. Vaughan 
---
 build-aux/options-parser |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/build-aux/options-parser b/build-aux/options-parser
index 07a9731..9d42418 100644
--- a/build-aux/options-parser
+++ b/build-aux/options-parser
@@ -176,7 +176,7 @@ nl='
 # There are still modern systems that have problems with `echo' mis-
 # handling backslashes, among others, so make sure $bs_echo is set to a
 # command that correctly interprets backslashes.
-# (this code from Autoconf 2.62)
+# (this code from Autoconf 2.68)
 
 # Printing a long string crashes Solaris 7 /usr/bin/printf.
 
bs_echo='\\\'
-- 
1.7.8

Cheers,
-- 
Gary V. Vaughan (gary AT gnu DOT org)



FYI: [PATCH] gnulib: update gnulib submodule.

2011-12-23 Thread Gary V. Vaughan
Belay that, on my final pre-push `./bootstrap&&./configure&&make all check`
it turns out that upstream README-release changed a colon into a period,
so our local gnulib-tool patch needed updating accordingly.  This is the
version of the patch I'm pushing.

Among others, this fixes the reference to a local commit.
* gnulib: Updated to todays master HEAD revision.
* gl/top/README-release.diff: Update to account for changes to
gnulib/top/README-release since the last gnulib update.

Signed-off-by: Gary V. Vaughan 
---
 gl/top/README-release.diff |8 
 gnulib |2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/gl/top/README-release.diff b/gl/top/README-release.diff
index 9f89724..4cc43f3 100644
--- a/gl/top/README-release.diff
+++ b/gl/top/README-release.diff
@@ -1,5 +1,5 @@
 gnulib/top/README-release  2011-10-23 14:32:58.0 +0700
-+++ gl/top/README-release  2011-10-23 14:38:40.0 +0700
+--- gnulib/top/README-release  2011-12-24 08:28:59.0 +0700
 gl/top/README-release  2011-12-24 09:01:01.0 +0700
 @@ -1,5 +1,9 @@
  Here are most of the steps we (maintainers) follow when making a release.
  
@@ -10,11 +10,11 @@
  * start from a clean, up-to-date git directory.
  
  make -k maintainer-clean || { ./configure && make maintainer-clean; }
-@@ -18,12 +24,24 @@
+@@ -18,12 +22,24 @@
  
  http://hydra.nixos.org/jobset/gnu/@PACKAGE@-master
  
--* Run "./bootstrap && ./configure".  This downloads any new translations:
+-* Run "./bootstrap && ./configure".  This downloads any new translations.
 +* Double check that serial number updates in public m4 files weren't
 +  forgotten since last release (they should be updated in git along with
 +  commits that require it so that users can work with git snapshots).
diff --git a/gnulib b/gnulib
index f51babf..576e46c 16
--- a/gnulib
+++ b/gnulib
@@ -1 +1 @@
-Subproject commit f51babfaf400eb509f854cad509f5e649b9182b1
+Subproject commit 576e46cb89ee781ec9f8352723b5dc96d3c7fd1f
-- 
1.7.8

Cheers,
-- 
Gary V. Vaughan (gary AT gnu DOT org)