pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/37122: mk/bulk/upload breakage on Solaris



>Number:         37122
>Category:       pkg
>Synopsis:       mk/bulk/upload breakage  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:00 +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:
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.




Home | Main Index | Thread Index | Old Index