NetBSD Problem Report #37123

From martin@duskware.de  Fri Oct 12 22:03:38 2007
Return-Path: <martin@duskware.de>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by narn.NetBSD.org (Postfix) with ESMTP id 373FA63BA4A
	for <gnats-bugs@gnats.netbsd.org>; Fri, 12 Oct 2007 22:03:38 +0000 (UTC)
Message-Id: <20071012155427.6238B63BA35@narn.NetBSD.org>
Date: Fri, 12 Oct 2007 15:54:27 +0000 (UTC)
From: uli@habel.name
Reply-To: uli@habel.name
To: netbsd-bugs-owner@NetBSD.org
Subject: mk/bulk/do-sandbox-build breakage with "sh"  on Solaris
X-Send-Pr-Version: www-1.0

>Number:         37123
>Category:       pkg
>Synopsis:       mk/bulk/do-sandbox-build breakage with "sh"  on Solaris
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Fri Oct 12 22:05:01 +0000 2007
>Originator:     Ulrich Habel
>Release:        Solaris 5.9/sparc
>Organization:
>Environment:
SunOS sun-install 5.9 Generic_122300-07 sun4u sparc SUNW,Sun-Fire-V240
>Description:
The script mk/bulk/do-sandbox-build calls the script "build" with the /bin/sh shell. The command fails to a incompatible sh shell on Solaris.
>How-To-Repeat:
call the script mk/bulk/do-sandbox-build on a Solaris host
>Fix:
I added an opsys detection to the script and set the sh variable to /bin/ksh if the OS is SunOS.

the patch is below:

--- do-sandbox-upload.orig      2007-10-12 16:38:41.000000000 +0200
+++ do-sandbox-upload   2007-10-12 17:08:21.000000000 +0200
@@ -2,12 +2,19 @@
 #      $NetBSD: do-sandbox-upload,v 1.5 2005/07/13 22:07:46 rillig Exp $

 #
-# Script to start a sandbox build
+# Script to upload a sandbox build
 #
 # See pkgsrc/doc/pkgsrc.txt for documentation!
 #

-sh="/bin/sh"
+opsys=`uname -s`
+case "$opsys" in
+    SunOS)
+      sh="/bin/ksh";;
+    *)
+      sh="/bin/sh";;
+esac
+
 upload="mk/bulk/upload"

 chroot /usr/sandbox \

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.