VirtualBox

Changeset 8121 in vbox for trunk/src/VBox/Additions


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

Solaris guest installer: report errors and fail rather than create empty invalid packages

Location:
trunk/src/VBox/Additions/solaris
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/solaris/Installer/makepackage.sh

    r8081 r8121  
    11#!/bin/sh
     2set -e
    23# innotek VirtualBox
    34# VirtualBox Solaris Guest Additions package creation script.
     
    1819#       makespackage.sh $(PATH_TARGET)/install packagename
    1920
    20 if [ -z "$2" ]; then
     21if test -z "$2"; then
    2122    echo "Usage: $0 installdir packagename"
    2223    exit 1
    2324fi
    2425
     26MY_PKGNAME=SUNWvboxguest
     27MY_GREP=/usr/sfw/bin/ggrep
     28MY_AWK=/usr/bin/awk
     29
     30# check for GNU grep we use which might not ship with all Solaris
     31if test ! -f "$MY_GREP" || test ! -h "$MY_GREP"; then
     32    echo "## GNU grep not found in $MY_GREP."
     33    exit 1
     34fi
     35
     36# prepare file list.
    2537cd "$1"
    2638echo 'i pkginfo=./vboxguest.pkginfo' > prototype
    2739echo 'i postinstall=./postinstall.sh' >> prototype
    2840echo 'i preremove=./preremove.sh' >> prototype
     41echo 'i space=./vboxguest.space' >> prototype
    2942echo 'e sed /etc/devlink.tab ? ? ?' >> prototype
    30 find . -print | /usr/sfw/bin/ggrep -v -E 'prototype|makepackage.sh|vboxguest.pkginfo|postinstall.sh|preremove.sh' | pkgproto >> prototype
     43find . -print | /usr/sfw/bin/ggrep -v -E 'prototype|makepackage.sh|vboxguest.pkginfo|postinstall.sh|preremove.sh|vboxguest.space' | pkgproto >> prototype
    3144
    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/VirtualBoxAdditions/"$3"="$3 } { print }' prototype2 > prototype
     45# don't grok for the sed class files
     46$MY_AWK 'NF == 6 && $2 == "none" { $5 = "root"; $6 = "bin" } { print }' prototype > prototype2
     47$MY_AWK 'NF == 6 && $2 == "none" { $3 = "opt/VirtualBoxAdditions/"$3"="$3 } { print }' prototype2 > prototype
    3448
    3549# install the kernel module to the right place (for now only 32-bit guests)
    36 /usr/bin/awk 'NF == 6 && $3 == "opt/VirtualBoxAdditions/vboxguest=vboxguest" { $3 = "platform/i86pc/kernel/drv/vboxguest=vboxguest" } { print }' prototype > prototype2
    37 /usr/bin/awk 'NF == 6 && $3 == "opt/VirtualBoxAdditions/vboxguest.conf=vboxguest.conf" { $3 = "platform/i86pc/kernel/drv/vboxguest.conf=vboxguest.conf" } { print }' prototype2 > prototype
     50$MY_AWK 'NF == 6 && $3 == "opt/VirtualBoxAdditions/vboxguest=vboxguest" { $3 = "platform/i86pc/kernel/drv/vboxguest=vboxguest" } { print }' prototype > prototype2
     51$MY_AWK 'NF == 6 && $3 == "opt/VirtualBoxAdditions/vboxguest.conf=vboxguest.conf" { $3 = "platform/i86pc/kernel/drv/vboxguest.conf=vboxguest.conf" } { print }' prototype2 > prototype
    3852
    39 # install the vboxclient daemon
    40 #/usr/bin/awk 'NF == 6 && $3 == "opt/VirtualBoxAdditions/1099.vboxclient=1099.vboxclient" { $3 = "usr/dt/config/Xsession.d/1099.vboxclient=1099.vboxclient" } { print }' prototype > prototype2
    41 
    42 #install the timesync daemon
    43 /usr/bin/awk 'NF == 6 && $3 == "opt/VirtualBoxAdditions/vboxservice.xml=vboxservice.xml" { $3 = "/var/svc/manifest/system/virtualbox/vboxservice.xml=vboxservice.xml" } { print }' prototype2 > prototype
     53# install the timesync SMF service
     54$MY_AWK 'NF == 6 && $3 == "opt/VirtualBoxAdditions/vboxservice.xml=vboxservice.xml" { $3 = "/var/svc/manifest/system/virtualbox/vboxservice.xml=vboxservice.xml" } { print }' prototype2 > prototype
    4455
    4556rm prototype2
    46 pkgmk -o -r .
    47 pkgtrans -s -o /var/spool/pkg `pwd`/$2 SUNWvboxguest
    48 rm -rf /var/spool/pkg/SUNWvboxguest
    4957
     58# explicitly set timestamp to shutup warning
     59VBOXPKG_TIMESTAMP=vbox`date '+%Y%m%d%H%M%S'`
     60
     61# create the package instance
     62pkgmk -p $VBOXPKG_TIMESTAMP -o -r .
     63if test $? -ne 0; then
     64    exit 1
     65fi
     66
     67# translate into package datastream (errors are sent to stderr)
     68pkgtrans -s -o /var/spool/pkg `pwd`/$2 "$MY_PKGNAME"
     69if test $? -ne 0; then
     70    exit 1
     71fi
     72
     73rm -rf "/var/spool/pkg/$MY_PKGNAME"
     74exit $?
     75
  • trunk/src/VBox/Additions/solaris/Installer/postinstall.sh

    r7950 r8121  
    6464    echo "*** Unknown version of the X Window System installed."
    6565    echo "*** Failed to install the VirtualBox X Window System drivers."
    66    
     66
    6767    # Exit as partially failed installation
    6868    retval=2
  • trunk/src/VBox/Additions/solaris/Makefile.kmk

    r8016 r8121  
    2222ifneq ($(BUILD_PLATFORM),solaris)
    2323$(error "The Solaris guest additions installer can only be built on Solaris!")
     24endif
     25
     26ifeq ($(BUILD_PLATFORM),solaris)
     27 include $(PATH_SUB_CURRENT)/SharedFolders/Makefile.kmk
    2428endif
    2529
     
    8488        $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_SOLARIS_ADDITION_INSTALLER)/vboxguest.sh                     $(SOLARISINSTDIR)/vboxguest.sh
    8589        $(QUIET)$(INSTALL) -m 0644 $(VBOX_PATH_SOLARIS_ADDITION_INSTALLER)/vboxservice.xml                  $(SOLARISINSTDIR)/vboxservice.xml
     90        $(QUIET)$(INSTALL) -m 0644 $(VBOX_PATH_SOLARIS_ADDITION_INSTALLER)/vboxguest.space                  $(SOLARISINSTDIR)/vboxguest.space
    8691        $(QUIET)$(INSTALL) -m 0644 $(VBOX_PATH_X11_ADDITION_INSTALLER)/vboxclient.desktop                   $(SOLARISINSTDIR)/vboxclient.desktop
    8792        $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_X11_ADDITION_INSTALLER)/98vboxadd-xclient                    $(SOLARISINSTDIR)/1099.vboxclient
     
    104109        $(QUIET)$(INSTALL) -m 0644 $(VBOX_PATH_SOLARIS_ADDITION_INSTALLER)/vboxdevlink.sed                  $(SOLARISINSTDIR)/etc/devlink.tab
    105110        $(call MSG_L1,Creating install package: $@)
    106         $(QUIET)$(SOLARISINSTDIR)/makepackage.sh $(SOLARISINSTDIR) $(PKGFILENAME) 1>/dev/null 2>/dev/null
     111        $(QUIET)$(SOLARISINSTDIR)/makepackage.sh $(SOLARISINSTDIR) $(PKGFILENAME)
    107112        $(QUIET)$(INSTALL) -m 0644 $(SOLARISINSTDIR)/$(PKGFILENAME) $(PATH_BIN)/additions/$(PKGFILENAME)
    108113
Note: See TracChangeset for help on using the changeset viewer.

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