VirtualBox

Changeset 87098 in vbox for trunk/src


Ignore:
Timestamp:
Dec 16, 2020 11:56:58 PM (4 years ago)
Author:
vboxsync
Message:

Installer/solaris: Clean up #! in vboxshell.py to make it compatible with pkgdepend, and add dependencies to make IPS package work. Eliminate mid-command line TAB chars in Makefile.kmk and simplify patterns to be handled by egrep. Add license to IPS package.

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

Legend:

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

    r87039 r87098  
    6767        $(VBOX_PATH_SI_SCRATCH)/$(PKG_FILENAME).pkg \
    6868        $(PATH_STAGE_BIN)/$(PKG_FILENAME).tar.gz \
    69         $(VBOX_PATH_SI_SCRATCH)/$(PKG_FILENAME).p5p \
     69        $(PATH_STAGE_BIN)/$(PKG_FILENAME).p5p \
    7070        $(PATH_STAGE_BIN)/VirtualBoxDebug.tar.bz2 \
    7171        $(VBOX_PATH_SI_SCRATCH)/dist-copy.ts
     
    213213SOLARIS_INSTALLER_FILES = \
    214214        vbox.space
     215
     216## @def SOLARIS_INSTALLER_LICENSE
     217# List of files that are copied directly from INST_BIN to VBOX_PATH_SI_SCRATCH_PKG (/).
     218# LICENSE is needed by IPS packaging only.
     219SOLARIS_FILE_LIST_VARS += SOLARIS_INSTALLER_LICENSE
     220SOLARIS_INSTALLER_LICENSE.SUBDIRS := no
     221SOLARIS_INSTALLER_LICENSE.STRIP   := no
     222SOLARIS_INSTALLER_LICENSE.MODE    := 0644
     223SOLARIS_INSTALLER_LICENSE.SRC     := $(PATH_STAGE_BIN)
     224SOLARIS_INSTALLER_LICENSE.DST     := $(VBOX_PATH_SI_SCRATCH_PKG)
     225SOLARIS_INSTALLER_LICENSE = \
     226        LICENSE
    215227
    216228## @def SOLARIS_DRIVER_BINS
     
    419431        VBox.sh \
    420432        pkginstall.sh \
    421         $(if $(VBOX_WITH_PYTHON),vboxshell.py,) \
    422433        smf-vboxballoonctrl.sh \
    423434        smf-vboxautostart.sh \
     
    559570                $(VBOX_SI_DEP_ON_MAKEFILE) \
    560571                | $$(dir $$@)
    561         $(call MSG_L1,Creating $(PKG_FILENAME).pkg: Copying files)
     572        $(call MSG_L1,Copying files to package staging area)
    562573# Start with a clean slate, don't want to pick up random garbage.
    563574        $(RM) -Rf -- "$(VBOX_PATH_SI_SCRATCH_PKG)/"
     
    606617        $(if-expr defined(VBOX_WITH_ADDITIONS_PACKING) \
    607618        ,$(INSTALL) -m 0644 $(PATH_STAGE_BIN)/additions/VBoxGuestAdditions.iso  $(VBOX_PATH_SI_SCRATCH_PKG)/opt/VirtualBox/,)
    608         $(LN_SYMLINK) -f ./pkginstall.sh        $(VBOX_PATH_SI_SCRATCH_PKG)/opt/VirtualBox/ipsinstall.sh
    609         $(SED)  -e "s/_HARDENED_/$(if $(VBOX_WITH_HARDENED),hardened,)/" \
     619        $(LN_SYMLINK) -f ./pkginstall.sh $(VBOX_PATH_SI_SCRATCH_PKG)/opt/VirtualBox/ipsinstall.sh
     620        $(SED) -e "s/_HARDENED_/$(if $(VBOX_WITH_HARDENED),hardened,)/" \
    610621                --output $(VBOX_PATH_SI_SCRATCH_PKG)/opt/VirtualBox/vboxconfig.sh \
    611622                 $(VBOX_PATH_SOL_INST_SRC)/vboxconfig.sh
    612623        $(CHMOD) 0755 $(VBOX_PATH_SOL_INST_SRC)/vboxconfig.sh
    613         $(INSTALL) -m 0644 $(VBOX_PATH_SOL_INST_SRC)/vbox.pkgresponse   $(VBOX_PATH_SI_SCRATCH_PKG)/opt/VirtualBox/autoresponse
     624        $(INSTALL) -m 0644 $(VBOX_PATH_SOL_INST_SRC)/vbox.pkgresponse $(VBOX_PATH_SI_SCRATCH_PKG)/opt/VirtualBox/autoresponse
     625        $(if-expr defined(VBOX_WITH_PYTHON) \
     626        ,$(SED) -e "s@^#!.*@#!/usr/bin/python2@" \
     627                --output $(VBOX_PATH_SI_SCRATCH_PKG)/opt/VirtualBox/vboxshell.py \
     628                $(PATH_STAGE_BIN)/vboxshell.py,)
    614629
    615630# VirtualBox: Arch specific files.
     
    633648
    634649        $(if-expr defined(VBOX_WITH_EFIFW_PACKING) \
    635         ,$(LN_SYMLINK) ../VBoxEFI32.fd ../VBoxEFI64.fd  $(VBOX_PATH_SI_SCRATCH_PKG)/opt/VirtualBox/$(VBOX_SI_ARCH)/,)
     650        ,$(LN_SYMLINK) ../VBoxEFI32.fd ../VBoxEFI64.fd $(VBOX_PATH_SI_SCRATCH_PKG)/opt/VirtualBox/$(VBOX_SI_ARCH)/,)
    636651
    637652# Links to /usr/bin.
     
    640655
    641656# Desktop stuff in /usr/share/applications/.
    642         $(SED)  -e "s+@VBOX_PRODUCT@+$(VBOX_PRODUCT)+" \
     657        $(SED) -e "s+@VBOX_PRODUCT@+$(VBOX_PRODUCT)+" \
    643658                -e "s+@VBOX_DOC_PATH@+/opt/VirtualBox+" \
    644659                --output $(VBOX_PATH_SI_SCRATCH_PKG)/usr/share/applications/virtualbox.desktop \
     
    647662
    648663# Desktop stuff in /usr/share/mime/packages/ (S10 cannot deal with icon information in virtualbox.xml).
    649         $(SED)  -e '/<icon/d' \
     664        $(SED) -e '/<icon/d' \
    650665                --output $(VBOX_PATH_SI_SCRATCH_PKG)/usr/share/mime/packages/virtualbox.xml \
    651666                $(VBOX_PATH_INST_COMMON_SRC)/virtualbox.xml
     
    653668
    654669# Desktop stuff in /usr/share/application-registry.
    655         $(SED)  -e "s+@VBOX_PRODUCT@+$(VBOX_PRODUCT)+" \
     670        $(SED) -e "s+@VBOX_PRODUCT@+$(VBOX_PRODUCT)+" \
    656671                --output $(VBOX_PATH_SI_SCRATCH_PKG)/usr/share/application-registry/virtualbox.applications \
    657672                $(VBOX_PATH_SOL_INST_SRC)/virtualbox.applications.in
     
    665680
    666681# Files related to package creation.
    667         $(SED)  -e "s/@VBOX_PRODUCT@/$(VBOX_PRODUCT)/g" \
     682        $(SED) -e "s/@VBOX_PRODUCT@/$(VBOX_PRODUCT)/g" \
    668683                -e "s/@VBOX_VENDOR@/$(VBOX_VENDOR)/g" \
    669684                -e "s/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g" \
     
    673688                --output $(VBOX_PATH_SI_SCRATCH_PKG)/vbox.pkginfo \
    674689                $(VBOX_PATH_SOL_INST_SRC)/vbox.pkginfo
    675         $(SED)  -e "s/@VBOX_PRODUCT@/$(VBOX_PRODUCT)/g" \
     690        $(SED) -e "s/@VBOX_PRODUCT@/$(VBOX_PRODUCT)/g" \
    676691                -e "s/@VBOX_VENDOR@/$(VBOX_VENDOR)/g" \
    677692                -e "s/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g" \
     
    732747# Creates the IPS style installer package.
    733748#
    734 solaris-package-ips:: $(VBOX_PATH_SI_SCRATCH)/$(PKG_FILENAME).p5p
    735 $(VBOX_PATH_SI_SCRATCH)/$(PKG_FILENAME).p5p: \
     749solaris-package-ips:: $(PATH_STAGE_BIN)/$(PKG_FILENAME).p5p
     750$(PATH_STAGE_BIN)/$(PKG_FILENAME).p5p: \
    736751                $(VBOX_PATH_SI_SCRATCH)/dist-copy.ts \
    737752                $(VBOX_SI_DEP_ON_MAKEFILE) \
  • trunk/src/VBox/Installer/solaris/makepackage.sh

    r87038 r87098  
    6666    VBOX_PKGNAME=SUNWvbox
    6767fi
    68 # need GNU grep because Solaris egrep does not support word matching
    69 VBOX_GGREP=/usr/gnu/bin/grep
     68# any egrep should do the job, the one from /usr/xpg4/bin isn't required
     69VBOX_EGREP=/usr/bin/egrep
    7070# need dynamic regex support which isn't available in S11 /usr/bin/awk
    7171VBOX_AWK=/usr/xpg4/bin/awk
    72 
    73 # check for GNU grep we use which might not ship with all Solaris
    74 if [ ! -f "$VBOX_GGREP" ] && [ ! -h "$VBOX_GGREP" ]; then
    75     echo "## GNU grep not found in $VBOX_GGREP."
    76     exit 1
    77 fi
    7872
    7973# bail out on non-zero exit status
     
    139133    rm -f "$1/$2"
    140134    pkgrecv -a -s "$1/vbox-repo" -d "$1/$2" -m latest "$3"
    141     #rm -rf "$1/vbox-repo"
     135    rm -rf "$1/vbox-repo"
    142136}
    143137
     
    168162    cd "$1"
    169163    # Exclude directories to not cause install-time conflicts with existing system directories
    170     find . ! -type d | "$VBOX_GGREP" -v -wE 'prototype|makepackage\.sh|vbox\.pkginfo|postinstall\.sh|checkinstall\.sh|preremove\.sh|vbox\.space|vbox-ips.mog|virtualbox\.p5m.*|vbox-repo' | LC_COLLATE=C sort | pkgproto >> "$PACKAGE_SPEC"
     164    find . ! -type d | "$VBOX_EGREP" -v '^\./(LICENSE|prototype|makepackage\.sh|vbox\.pkginfo|postinstall\.sh|checkinstall\.sh|preremove\.sh|vbox\.space|vbox-ips.mog|virtualbox\.p5m.*)$' | LC_COLLATE=C sort | pkgproto >> "$PACKAGE_SPEC"
    171165    cd -
    172166    "$VBOX_AWK" 'NF == 3 && $1 == "s" && $2 == "none" { $3="/"$3 } { print }' "$PACKAGE_SPEC" > "$PACKAGE_SPEC.tmp"
     
    178172    # Include opt/VirtualBox and subdirectories as we want uninstall to clean up directory structure.
    179173    # Include var/svc for manifest class action script does not create them.
    180     find . -type d | "$VBOX_GGREP" -E 'opt/VirtualBox|var/svc/manifest/application/virtualbox' | LC_COLLATE=C sort | pkgproto >> "$PACKAGE_SPEC"
     174    find . -type d | "$VBOX_EGREP" 'opt/VirtualBox|var/svc/manifest/application/virtualbox' | LC_COLLATE=C sort | pkgproto >> "$PACKAGE_SPEC"
    181175    cd -
    182176    "$VBOX_AWK" 'NF == 6 && $1 == "d" && $2 == "none" { $3="/"$3 } { print }' "$PACKAGE_SPEC" > "$PACKAGE_SPEC.tmp"
  • trunk/src/VBox/Installer/solaris/vbox-ips.mog

    r87045 r87098  
    77set name=variant.opensolaris.zone value=global value=nonglobal
    88set name=info.classification value=org.opensolaris.category.2008:System/Virtualization
     9license LICENSE license="GPLv2 (virtualbox)"
     10# The data-xkb was renamed to xkeyboard-config in S11.4, so adjust this when
     11# we have moved our builds away from S11.3.
     12depend fmri=pkg:/x11/keyboard/data-xkb type=require
     13depend fmri=pkg:/system/font/xorg/xorg-core type=require
     14depend fmri=pkg:/system/font/truetype/dejavu type=require
    915
    1016# Drop system directories to not have conflicting permissions
     
    5460<transform dir file path=var/svc/manifest/.*$ -> set group sys>
    5561<transform file path=var/svc/manifest/.*\.xml$ -> default restart_fmri svc:/system/manifest-import:default>
    56 
    57 # todo:
    58 # resolve dependencies properly for python
    59 <transform file path=opt/VirtualBox/vboxshell\.py$ -> drop>
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