NetBSD Problem Report #36277

From rhialto@falu.nl  Sat May  5 15:02:16 2007
Return-Path: <rhialto@falu.nl>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by narn.NetBSD.org (Postfix) with ESMTP id 6D56463BA19
	for <gnats-bugs@gnats.NetBSD.org>; Sat,  5 May 2007 15:02:16 +0000 (UTC)
Message-Id: <200705051502.l45F2BM7021947@radl.falu.nl>
Date: Sat, 5 May 2007 17:02:11 +0200 (CEST)
From: Rhialto <rhialto@falu.nl>
Reply-To: rhialto@falu.nl
To: gnats-bugs@NetBSD.org
Cc: rhialto@falu.nl
Subject: Perl fails to build due to ' in uname output
X-Send-Pr-Version: 3.95

>Number:         36277
>Category:       pkg
>Synopsis:       lang/perl fails to build due to ' in uname output
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat May 05 15:05:00 +0000 2007
>Originator:     Rhialto
>Release:        NetBSD 3.0
>Organization:

>Environment:


System: NetBSD radl.falu.nl 3.0 NetBSD 3.0 (Radl's Pervasion of the Incorrect Chord) #2: Sun Nov 26 21:46:18 CET 2006 root@radl.falu.nl:/usr/src/sys/arch/amd64/compile/RADL amd64
Architecture: x86_64
Machine: amd64
>Description:
	I was building pkgsrc-2007Q1 with pkg_comp, and it failed with
	lang/perl:

What extensions do you wish to load dynamically?
[B ByteLoader Cwd DB_File Data/Dumper Devel/DProf Devel/PPPort Devel/Peek Digest/MD5 Encode Fcntl File/Glob Filter/Util/Call I18N/Langinfo IO IPC/SysV List/Util MIME/Base64 NDBM_File Opcode POSIX PerlIO/encoding PerlIO/scalar PerlIO/via SDBM_File Socket Storable Sys/Hostname Sys/Syslog Time/HiRes Unicode/Normalize XS/APItest XS/Typemap attrs re threads threads/shared]
What extensions do you wish to load statically? [none]
Stripping down executable paths...
Creating config.sh...
./config.sh: 779: Syntax error: ")" unexpected
*** Error code 2

Stop.

	Sure enough, line 779 reads

myuname='netbsd radl.falu.nl 3.0 netbsd 3.0 (radl's pervasion of the incorrect chord) #2: sun nov 26 21:46:18 cet 2006 root@radl.falu.nl:usrsrcsysarchamd64compileradl amd64 '

	Note the ' in "radl's".

	Strangely enough, the / characters that also occur in the output from
	uname -a (reproduced above in the System: section) are removed
	even though they seem harmless to me.

>How-To-Repeat:
	Compile a kernel from a config file with 

ident 		"Radl's Pervasion of the Incorrect Chord"

	and then try to compile perl.

	I wonder what other packages will break...

>Fix:

	A new patch file

--- Configure.dist	2007-05-05 16:33:23.000000000 +0200
+++ Configure	2007-05-05 16:55:12.000000000 +0200
@@ -2965,7 +2965,7 @@
 $test -z "$myuname" && myuname=`hostname 2>/dev/null`
 # 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/^[^=]*=//' -e "s/['/]//g" | \
 	./tr '[A-Z]' '[a-z]' | $tr $trnl ' '`
 newmyuname="$myuname"
 dflt=n

-Olaf.
-- 
___ Olaf 'Rhialto' Seibert      -- You author it, and I'll reader it.
\X/ rhialto/at/xs4all.nl        -- Cetero censeo "authored" delendum esse.

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.