Subject: pkg/30911: Some packages fail on Solaris2.8 and 2.9 with
To: None <,,>
From: None <>
List: pkgsrc-bugs
Date: 08/04/2005 12:19:01
>Number:         30911
>Category:       pkg
>Synopsis:       Some packages fail on Solaris2.8 and 2.9 with
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Aug 04 12:19:01 +0000 2005
>Originator:     Rob Quinn
>Release:        pkgsrc-current
Some (but not all) of my packages fail to build under Solaris2.8 and 2.9 with "/bin/sh: bad substitution".

I can't get access to my mailbox at the moment, though I can send email.  I will monitor this ticket for any questions or updates.

crn-oss:/usr/pkgsrc/converters/libiconv #bmake
cc -c -I. -I. -I.. -I../include -I./../include -I../srclib -I./../srclib -I../lib -O -pipe -I/usr/pkg/include -I/usr/pkg/include -DINSTALLDIR=\"/usr/pkg/bin\" -DLOCALEDIR=\"/usr/pkg/share/locale\" ./iconv.c
test `ls -ld . | sed -e 's/^d\(.........\).*/\1/'` = rwxrwxrwx || chmod 777 .
cd po && /usr/pkg/bin/bmake all
cd man && /usr/pkg/bin/bmake all
if test -d tests; then cd tests && /usr/pkg/bin/bmake all; fi
/bin/sh: bad substitution
*** Error code 1

bmake: stopped in /usr/pkgsrc/converters/libiconv
===> There was an error during the ``build'' phase.
===> Please investigate the following for more information:
===>      * log of the build
===>      * /usr/obj/pkg/converters/libiconv/work/.work.log
*** Error code 1

bmake: stopped in /usr/pkgsrc/converters/libiconv

"bmake -d x" suggests the problem location is around line 274 or 282 of mk/install/

+ /usr/ucb/echo PRE-INSTALL|UNPACK) 
+ /usr/ucb/echo         ${CAT} > ./+FILES << 'EOF_FILES' 
+ /usr/pkg/bin/nbsed -e s!@PREFIX@!/usr/pkg!g -e s!@LOCALBASE@!/usr/pkg!g -e s!@X11BASE@!/usr/openwin!g -e s!@DEPOTBASE@!/usr/pkg/packages!g -e s!@VARBASE@!/var!g -e s!@PKG_SYSCONFBASE@!/usr/pkg/etc!g -e s!@PKG_SYSCONFDEPOTBASE@!!g -e s!@PKG_SYSCONFBASEDIR@!/usr/pkg/etc!g -e s!@PKG_SYSCONFDIR@!/usr/pkg/etc!g -e s!@CONF_DEPENDS@!!g -e s!@PKGBASE@!libiconv!g -e s!@PKG_INSTALLATION_TYPE@!overwrite!g -e s!@PKG_USER_HOME@!/nonexistent!g -e s!@PKG_USER_SHELL@!/usr/bin/false!g -e s!@RCD_SCRIPTS_SHELL@!/bin/ksh!g -e s!@PKG_CREATE_USERGROUP@!YES!g -e s!@PKG_CONFIG@!YES!g -e s!@PKG_RCD_SCRIPTS@!NO!g -e s!@PKG_REGISTER_SHELLS@!YES!g -e s!@AWK@!/usr/bin/nawk!g -e s!@BASENAME@!/usr/bin/basename!g -e s!@CAT@!/usr/bin/cat!g -e s!@CHGRP@!/usr/bin/chgrp!g -e s!@CHMOD@!/usr/bin/chmod!g -e s!@CHOWN@!/usr/bin/chown!g -e s!@CMP@!/bin/cmp!g -e s!@CP@!/bin/cp!g -e s!@DIRNAME@!/usr/bin/dirname!g -e s!@ECHO@!/usr/ucb/echo!g -e s!@ECHO_N@!/usr/ucb/echo -n!g -e s!@EGREP@!/usr/xpg4/bin/grep -E!g -e s!@E
 XPR@!/usr/xpg4/bin/expr!g -e s!@FALSE@!/usr/bin/false!g -e s!@FIND@!/usr/bin/find!g -e s!@GREP@!/usr/xpg4/bin/grep!g -e s!@GROUPADD@!/usr/sbin/groupadd!g -e s!@GTAR@!/usr/pkg/bin/tar!g -e s!@HEAD@!/usr/bin/head!g -e s!@ID@!/usr/xpg4/bin/id!g -e s!@INSTALL_INFO@!!g -e s!@LINKFARM@!/usr/pkg/sbin/linkfarm!g -e s!@LN@!/usr/bin/ln!g -e s!@LS@!/usr/bin/ls!g -e s!@MKDIR@!/usr/bin/mkdir -p!g -e s!@MV@!/usr/bin/mv!g -e s!@PERL5@!/usr/pkg/bin/perl!g -e s!@PKG_ADMIN@!/usr/pkg/sbin/pkg_admin!g -e s!@PKG_INFO@!/usr/pkg/sbin/pkg_info!g -e s!@PWD_CMD@!/bin/pwd!g -e s!@RM@!/usr/bin/rm!g -e s!@RMDIR@!/usr/bin/rmdir!g -e s!@SED@!/usr/pkg/bin/nbsed!g -e s!@SETENV@!/usr/bin/env!g -e s!@SH@!/bin/ksh!g -e s!@SORT@!/usr/bin/sort!g -e s!@SU@!/usr/bin/su!g -e s!@TEST@!test!g -e s!@TOUCH@!/usr/bin/touch!g -e s!@TR@!/usr/bin/tr!g -e s!@TRUE@!/usr/bin/true!g -e s!@USERADD@!/usr/sbin/useradd!g -e s!@XARGS@!/usr/bin/xargs!g ../../mk/install/files 
+ /usr/ucb/echo  
+ eval set -- 
+ set -- 
+ test 2 -gt 0 
+ shift 
+ shift 
/bin/sh: bad substitution
*** Error code 1

A work-around is to use mk/install/ from 20050719.

crn-sen:/usr/pkgsrc/mk/install #cvs update -D 20050719