Subject: pkg/36277: Perl fails to build due to ' in uname output
To: None <,,>
From: Rhialto <>
List: pkgsrc-bugs
Date: 05/05/2007 15:05:00
>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
System: NetBSD 3.0 NetBSD 3.0 (Radl's Pervasion of the Incorrect Chord) #2: Sun Nov 26 21:46:18 CET 2006 amd64
Architecture: x86_64
Machine: amd64
	I was building pkgsrc-2007Q1 with pkg_comp, and it failed with

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...
./ 779: Syntax error: ")" unexpected
*** Error code 2


	Sure enough, line 779 reads

myuname='netbsd 3.0 netbsd 3.0 (radl's pervasion of the incorrect chord) #2: sun nov 26 21:46:18 cet 2006 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.

	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...


	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 ' '`

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