In metaconfig.git, the branch master has been updated <http://perl5.git.perl.org/metaconfig.git/commitdiff/05a827803ab3908a795df94f6ed3890e24a6df2f?hp=0faba262ea1a8ba12b856b3281389cecde4bb2a9>
- Log ----------------------------------------------------------------- commit 05a827803ab3908a795df94f6ed3890e24a6df2f Author: Andy Dougherty <[email protected]> Date: Tue Feb 19 09:23:11 2013 -0500 Fix [perl #116523] Configure is confused by '=' in output from uname -a Previously, Configure used to try to post-process the output of uname -a. This was to support Xenix, which gave output like this: sysname=XENIX nodename=whatever release=2.3.2 .. etc... Configure attempted to parse that output and build up a $myuname variable that resembled those generated on traditional Unix systems. More recently, a user reported uname -a output on a CVS checkout of NetBSD that also included information such as root=username@hostname:/dirname module=src branch=HEAD The Configure code misparsed that and ended up throwing most of it away. This patch takes the simplest approach and just skips the attempt to process the Xenix output. ----------------------------------------------------------------------- Summary of changes: U/modified/Oldconfig.U | 22 ++++++++++------------ 1 files changed, 10 insertions(+), 12 deletions(-) diff --git a/U/modified/Oldconfig.U b/U/modified/Oldconfig.U index a160b1e..b30a511 100644 --- a/U/modified/Oldconfig.U +++ b/U/modified/Oldconfig.U @@ -62,9 +62,9 @@ sh awk sed test cat rm lns tr n c contains Loc Options Tr src trnl ln ?MAKE: -pick wipe $@ %< ?S:myuname: -?S: The output of 'uname -a' if available, otherwise the hostname. On Xenix, -?S: pseudo variables assignments in the output are stripped, thank you. The -?S: whole thing is then lower-cased. +?S: The output of 'uname -a' if available, otherwise the hostname. +?S: The whole thing is then lower-cased and slashes and single quotes are +?S: removed. ?S:. ?S:hint: ?S: Gives the type of hints used for previous answers. May be one of @@ -120,15 +120,13 @@ case "$config_sh" in ?X: Now not using a subshell but instead $test. myuname=`$uname -a 2>/dev/null` $test -z "$myuname" && myuname=`hostname 2>/dev/null` -?X: Special mention for Xenix, whose 'uname -a' gives us output like this: -?X: sysname=XENIX -?X: nodename=whatever -?X: release=2.3.2 .. etc... -?X: Therefore, we strip all this variable assignment junk and remove all the -?X: new lines to keep the myuname variable sane... --RAM +# Downcase everything to avoid ambiguity. +# Remove slashes and single quotes so we can use parts of this in +# directory and file names. +# Remove newlines so myuname is sane to use elsewhere. # tr '[A-Z]' '[a-z]' would not work in EBCDIC # because the A-Z/a-z are not consecutive. -myuname=`echo $myuname | $sed -e 's/^[^=]*=//' -e "s,['/],,g" | \ +myuname=`echo $myuname | $sed -e "s,['/],,g" | \ ./tr '[A-Z]' '[a-z]' | $tr $trnl ' '` ?X: Save the value we just computed to reset myuname after we get done here. newmyuname="$myuname" @@ -233,8 +231,8 @@ EOM osname=uwin && osvers="$5" -?X: If we have uname, we already computed a suitable uname -a output, correctly -?X: formatted for Xenix, and it lies in $myuname. +?X: If we have uname, we already computed a suitable uname -a output, +?X: and it lies in $myuname. if $test -f $uname; then set X $myuname shift -- perl5 metaconfig repository
