VirtualBox

Changeset 8123 in vbox for trunk/src/VBox/Installer/solaris


Ignore:
Timestamp:
Apr 18, 2008 8:09:29 AM (17 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
29826
Message:

Solaris host installer: report errors and fail rather than create empty packages.

Location:
trunk/src/VBox/Installer/solaris
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Installer/solaris/Makefile.kmk

    r7864 r8123  
    225225        $(QUIET)$(INSTALL) -m 0644 $(PATH_ROOT)/doc/ReadMe-Solaris.txt                                          $(SOLARISINSTDIR)/ReadMe.txt
    226226        $(call MSG_L1,Creating install package: $(PKGFILENAME).tar.gz)
    227         $(QUIET)$(SOLARISINSTDIR)/makepackage.sh $(SOLARISINSTDIR) $(PKGFILENAME) $(BUILD_TARGET_ARCH) 1>/dev/null 2>/dev/null
     227        $(QUIET)$(SOLARISINSTDIR)/makepackage.sh $(SOLARISINSTDIR) $(PKGFILENAME) $(BUILD_TARGET_ARCH)
    228228        $(QUIET)$(INSTALL) -m 0755 $(SOLARISINSTDIR)/$(PKGFILENAME).tar.gz $(PATH_BIN)
    229229
  • trunk/src/VBox/Installer/solaris/makepackage.sh

    r8080 r8123  
    11#!/bin/sh
     2set -e
    23# innotek VirtualBox
    34# VirtualBox Solaris package creation script.
     
    2324fi
    2425
     26MY_PKGNAME=SUNWvbox
     27MY_GGREP=/usr/sfw/bin/ggrep
     28MY_AWK=/usr/bin/awk
     29MY_GTAR=/usr/sfw/bin/gtar
     30
     31# check for GNU grep we use which might not ship with all Solaris
     32if test ! -f "$MY_GGREP" || test ! -h "$MY_GGREP"; then
     33    echo "## GNU grep not found in $MY_GGREP."
     34    exit 1
     35fi
     36
     37# check for GNU tar we use which might not ship with all Solaris
     38if test ! -f "$MY_GTAR" || test ! -h "$MY_GTAR"; then
     39    echo "## GNU tar not found in $MY_GTAR."
     40    exit 1
     41fi
     42
     43
     44# prepare file list
    2545cd "$1"
    2646echo 'i pkginfo=./vbox.pkginfo' > prototype
     
    2949echo 'i space=./vbox.space' >> prototype
    3050echo 'e sed /etc/devlink.tab ? ? ?' >> prototype
    31 find . -print | /usr/sfw/bin/ggrep -v -E 'prototype|makepackage.sh|vbox.pkginfo|postinstall.sh|preremove.sh|ReadMe.txt|vbox.space' | pkgproto >> prototype
    32 /usr/bin/awk 'NF == 6 && $2 == "none" { $5 = "root"; $6 = "bin" } { print }' prototype > prototype2
    33 /usr/bin/awk 'NF == 6 && $2 == "none" { $3 = "opt/VirtualBox/"$3"="$3 } { print }' prototype2 > prototype
     51find . -print | $MY_GGREP -v -E 'prototype|makepackage.sh|vbox.pkginfo|postinstall.sh|preremove.sh|ReadMe.txt|vbox.space' | pkgproto >> prototype
     52
     53# don't grok for the sed class files
     54$MY_AWK 'NF == 6 && $2 == "none" { $5 = "root"; $6 = "bin" } { print }' prototype > prototype2
     55$MY_AWK 'NF == 6 && $2 == "none" { $3 = "opt/VirtualBox/"$3"="$3 } { print }' prototype2 > prototype
    3456
    3557# install the kernel module to the right place.
    3658if test "$3" = "x86"; then
    37     /usr/bin/awk 'NF == 6 && $3 == "opt/VirtualBox/vboxdrv=vboxdrv" { $3 = "platform/i86pc/kernel/drv/vboxdrv=vboxdrv" } { print }' prototype > prototype2
     59    $MY_AWK 'NF == 6 && $3 == "opt/VirtualBox/vboxdrv=vboxdrv" { $3 = "platform/i86pc/kernel/drv/vboxdrv=vboxdrv" } { print }' prototype > prototype2
    3860else
    39     /usr/bin/awk 'NF == 6 && $3 == "opt/VirtualBox/vboxdrv=vboxdrv" { $3 = "platform/i86pc/kernel/drv/amd64/vboxdrv=vboxdrv" } { print }' prototype > prototype2
     61    $MY_AWK 'NF == 6 && $3 == "opt/VirtualBox/vboxdrv=vboxdrv" { $3 = "platform/i86pc/kernel/drv/amd64/vboxdrv=vboxdrv" } { print }' prototype > prototype2
    4062fi
    4163
    42 /usr/bin/awk 'NF == 6 && $3 == "opt/VirtualBox/vboxdrv.conf=vboxdrv.conf" { $3 = "platform/i86pc/kernel/drv/vboxdrv.conf=vboxdrv.conf" } { print }' prototype2 > prototype
     64$MY_AWK 'NF == 6 && $3 == "opt/VirtualBox/vboxdrv.conf=vboxdrv.conf" { $3 = "platform/i86pc/kernel/drv/vboxdrv.conf=vboxdrv.conf" } { print }' prototype2 > prototype
    4365
    4466rm prototype2
    45 pkgmk -o -r .
    46 pkgtrans -s -o /var/spool/pkg `pwd`/$2 SUNWvbox
    47 /usr/sfw/bin/gtar zcvf $2.tar.gz $2 autoresponse ReadMe.txt
    48 rm -rf /var/spool/pkg/SUNWvbox
    4967
     68# explicitly set timestamp to shutup warning
     69VBOXPKG_TIMESTAMP=vbox`date '+%Y%m%d%H%M%S'`
     70
     71# create the package instance
     72pkgmk -p $VBOXPKG_TIMESTAMP -o -r .
     73if test $? -ne 0; then
     74    exit 1
     75fi
     76
     77# translate into package datastream
     78pkgtrans -s -o /var/spool/pkg `pwd`/$2 "$MY_PKGNAME"
     79if test $? -ne 0; then
     80    exit 1
     81fi
     82
     83$MY_GTAR zcvf $2.tar.gz $2 autoresponse ReadMe.txt
     84
     85if test  $? -eq 0; then
     86    echo "## Packaging and transfer completed successfully!"
     87fi
     88rm -rf "/var/spool/pkg/$MY_PKGNAME"
     89exit $?
     90
  • trunk/src/VBox/Installer/solaris/vbox.space

    r7692 r8123  
    11# Space file for VirtualBox installer
    2 opt 800 1
     2# We only create a few links so we don't need much space
     3# pathname blocks inodes
     4/ 1000 8
    35
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette