NetBSD Problem Report #37122
From martin@duskware.de Fri Oct 12 22:03:31 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 4E71563B9B8
for <gnats-bugs@gnats.netbsd.org>; Fri, 12 Oct 2007 22:03:31 +0000 (UTC)
Message-Id: <20071012154732.12C0163B9B8@narn.NetBSD.org>
Date: Fri, 12 Oct 2007 15:47:32 +0000 (UTC)
From: uli@habel.name
Reply-To: uli@habel.name
To: netbsd-bugs-owner@NetBSD.org
Subject: mk/bulk/upload breakage on Solaris
X-Send-Pr-Version: www-1.0
>Number: 37122
>Category: pkg
>Synopsis: mk/bulk/upload breakage on Solaris
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: pkg-manager
>State: closed
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Fri Oct 12 22:05:00 +0000 2007
>Closed-Date: Mon Dec 12 01:58:00 +0000 2016
>Last-Modified: Mon Dec 12 01:58:00 +0000 2016
>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:
When running the script mk/bulk/upload it breaks on Solaris due to missing tools and a broken sh implementation.
>How-To-Repeat:
run sh mk/bulk/upload on a Solaris host
>Fix:
The attached patch fixes 3 things:
- check the operating system and sets the variable sh to "/bin/ksh" on Solaris
- completed list of tools for Solaris
- wrong call of the sort-packages script with the shell "sh" instead of $sh
Patch below:
--- upload.orig 2007-10-12 16:48:33.000000000 +0200
+++ upload 2007-10-12 17:35:22.000000000 +0200
@@ -9,6 +9,14 @@
PKG_ADMIN="pkg_admin"
PKG_INFO="pkg_info"
+opsys=`uname -s`
+case "$opsys" in
+ SunOS)
+ sh="/bin/ksh";;
+ *)
+ sh="/bin/sh";;
+esac
+
set -eu
#
@@ -168,6 +176,11 @@
CKSUM="cksum";
SYSVSUM="sum";
;;
+SunOS) BMAKE=bmake;
+ BSDSUM="sum -r";
+ CKSUM="cksum";
+ SYSVSUM="/usr/ucb/sum";
+ ;;
*) BMAKE=bmake ;;
esac
@@ -278,7 +291,7 @@
cd $packages
echo "upload> Checking for restricted and vulnerable packages"
-(cd All && env PKG_INFO="${pkg_info}" OUTDIR="${TMP}" PKGVULNDIR="${distdir}" sh "${pkgsrcdir}/mk/bulk/sort-packages")
+(cd All && env PKG_INFO="${pkg_info}" OUTDIR="${TMP}" PKGVULNDIR="${distdir}" ${sh} "${pkgsrcdir}/mk/bulk/sort-packages")
# Add the name of the package file, including all its symlinks to the
# list of files to be uploaded.
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed
State-Changed-By: maya@NetBSD.org
State-Changed-When: Mon, 12 Dec 2016 01:58:00 +0000
State-Changed-Why:
Lots of changes in pkgsrc means this is no longer relevant. sorry it was not merged at the time. I imagine the new stuff does work well on Solaris, as it's heavily used by joyent.
>Unformatted:
(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-2014
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.