VirtualBox

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


Ignore:
Timestamp:
Dec 3, 2020 10:20:02 PM (4 years ago)
Author:
vboxsync
Message:

Installer/solaris: Theoretically usable IPS packaging (permissions etc. are in place now). bugref:5999

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

Legend:

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

    r87035 r87038  
    9494package_spec_append_content()
    9595{
     96    rm -rf "$1/vbox-repo"
    9697    pkgsend generate "$1" | pkgfmt >> "$PACKAGE_SPEC"
    9798}
     
    111112package_create()
    112113{
    113     pkgmogrify -DVBOX_PKGNAME="$VBOX_PKGNAME" "$PACKAGE_SPEC" vbox-ips.mog | pkgfmt > "$PACKAGE_SPEC.1"
     114    VBOX_DEF_HARDENED=
     115    [ -z "$HARDENED" ] && VBOX_DEF_HARDENED='#'
     116
     117    pkgmogrify -DVBOX_PKGNAME="$VBOX_PKGNAME" -DHARDENED_ONLY="$VBOX_DEF_HARDENED" "$PACKAGE_SPEC" "$1/vbox-ips.mog" | pkgfmt > "$PACKAGE_SPEC.1"
    114118
    115119    pkgdepend generate -m -d "$1" "$PACKAGE_SPEC.1" | pkgfmt > "$PACKAGE_SPEC.2"
    116120
    117     pkgdepend resolve -m -v "$PACKAGE_SPEC.2"
    118 
    119     pkglint "$PACKAGE_SPEC.2.res"
    120 
    121     rm -rf "$1/vbox-repo"
     121    pkgdepend resolve -m "$PACKAGE_SPEC.2"
     122
     123    # Too expensive, and in this form not useful since it does not have
     124    # the package manifests without using options -r (for repo access) and
     125    # -c (for caching the data). Not viable since the cache would be lost
     126    # for every build.
     127    #pkglint "$PACKAGE_SPEC.2.res"
     128
    122129    pkgrepo create "$1/vbox-repo"
    123130    pkgrepo -s "$1/vbox-repo" set publisher/prefix=virtualbox
     
    130137
    131138    # Convert into package archive
    132     pkgrecv -s "$1/vbox-repo" -a -d "$2" -m latest "$3"
     139    rm -f "$1/$2"
     140    pkgrecv -a -s "$1/vbox-repo" -d "$1/$2" -m latest "$3"
    133141    #rm -rf "$1/vbox-repo"
    134142}
     
    160168    cd "$1"
    161169    # Exclude directories to not cause install-time conflicts with existing system directories
    162     find . ! -type d | "$VBOX_GGREP" -v -wE 'prototype|makepackage\.sh|vbox\.pkginfo|postinstall\.sh|checkinstall\.sh|preremove\.sh|vbox\.space|virtualbox\.p5m.*' | LC_COLLATE=C sort | pkgproto >> "$PACKAGE_SPEC"
     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"
    163171    cd -
    164172    "$VBOX_AWK" 'NF == 3 && $1 == "s" && $2 == "none" { $3="/"$3 } { print }' "$PACKAGE_SPEC" > "$PACKAGE_SPEC.tmp"
     
    204212
    205213    # HostDriver vboxdrv
    206     package_spec_fixup_filelist '$3 == "/platform/i86pc/kernel/drv/vboxdrv"'                                    '$6 = "sys"'
     214    package_spec_fixup_filelist '$3 == "/platform/i86pc/kernel/drv/vboxdrv.conf"'                               '$6 = "sys"'
    207215    package_spec_fixup_filelist '$3 == "/platform/i86pc/kernel/drv/amd64/vboxdrv"'                              '$6 = "sys"'
    208216
    209217    # NetFilter vboxflt
    210     package_spec_fixup_filelist '$3 == "/platform/i86pc/kernel/drv/vboxflt"'                                    '$6 = "sys"'
     218    package_spec_fixup_filelist '$3 == "/platform/i86pc/kernel/drv/vboxflt.conf"'                               '$6 = "sys"'
    211219    package_spec_fixup_filelist '$3 == "/platform/i86pc/kernel/drv/amd64/vboxflt"'                              '$6 = "sys"'
    212220
    213221    # NetFilter vboxbow
    214     package_spec_fixup_filelist '$3 == "/platform/i86pc/kernel/drv/vboxbow"'                                    '$6 = "sys"'
     222    package_spec_fixup_filelist '$3 == "/platform/i86pc/kernel/drv/vboxbow.conf"'                               '$6 = "sys"'
    215223    package_spec_fixup_filelist '$3 == "/platform/i86pc/kernel/drv/amd64/vboxbow"'                              '$6 = "sys"'
    216224
    217225    # NetAdapter vboxnet
    218     package_spec_fixup_filelist '$3 == "/platform/i86pc/kernel/drv/vboxnet"'                                    '$6 = "sys"'
     226    package_spec_fixup_filelist '$3 == "/platform/i86pc/kernel/drv/vboxnet.conf"'                               '$6 = "sys"'
    219227    package_spec_fixup_filelist '$3 == "/platform/i86pc/kernel/drv/amd64/vboxnet"'                              '$6 = "sys"'
    220228
    221229    # USBMonitor vboxusbmon
    222     package_spec_fixup_filelist '$3 == "/platform/i86pc/kernel/drv/vboxusbmon"'                                 '$6 = "sys"'
     230    package_spec_fixup_filelist '$3 == "/platform/i86pc/kernel/drv/vboxusbmon.conf"'                            '$6 = "sys"'
    223231    package_spec_fixup_filelist '$3 == "/platform/i86pc/kernel/drv/amd64/vboxusbmon"'                           '$6 = "sys"'
    224232
    225233    # USB Client vboxusb
    226     package_spec_fixup_filelist '$3 == "/platform/i86pc/kernel/drv/vboxusb"'                                    '$6 = "sys"'
     234    package_spec_fixup_filelist '$3 == "/platform/i86pc/kernel/drv/vboxusb.conf"'                               '$6 = "sys"'
    227235    package_spec_fixup_filelist '$3 == "/platform/i86pc/kernel/drv/amd64/vboxusb"'                              '$6 = "sys"'
    228236
     
    256264    echo " --- start of $PACKAGE_SPEC  ---"
    257265    cat "$PACKAGE_SPEC"
    258     echo " --- end of $PACKAGE_SPEC --- "
     266    echo " --- end of $PACKAGE_SPEC ---"
    259267}
    260268
  • trunk/src/VBox/Installer/solaris/vbox-ips.mog

    r87035 r87038  
    99
    1010# Drop system directories to not have conflicting permissions
    11 <transform dir path=etc$->drop>
    12 <transform dir path=opt$->drop>
    13 <transform dir path=platform.*$->drop>
    14 <transform dir path=usr.*$->drop>
    15 <transform dir path=var$->drop>
    16 <transform dir path=var/svc$->drop>
    17 <transform dir path=var/svc/manifest$->drop>
    18 <transform dir path=var/svc/manifest/application$->drop>
     11<transform dir path=etc$ -> drop>
     12<transform dir path=opt$ -> drop>
     13<transform dir path=platform.*$ -> drop>
     14<transform dir path=usr.*$ -> drop>
     15<transform dir path=var$ -> drop>
     16<transform dir path=var/svc$ -> drop>
     17<transform dir path=var/svc/manifest$ -> drop>
     18<transform dir path=var/svc/manifest/application$ -> drop>
    1919
    2020# Drop all files in root, they are for packaging purposes
    21 <transform file path=[^/]*$->drop>
     21<transform file path=[^/]*$ -> drop>
     22<transform dir file path=vbox-repo.*$ -> drop>
    2223
    2324# Drop STREAMS based NetFilter driver, obsolete for Solaris 11
    24 <transform file path=platform/i86pc/kernel/drv/amd64/vboxflt$->drop>
    25 <transform file path=platform/i86pc/kernel/drv/vboxflt\.conf$->drop>
     25<transform file path=platform/i86pc/kernel/drv/amd64/vboxflt$ -> drop>
     26<transform file path=platform/i86pc/kernel/drv/vboxflt\.conf$ -> drop>
    2627
    2728# Drop legacy libraries, needed only for Solaris 10
    28 <transform dir path=opt/VirtualBox/amd64/legacy$->drop>
    29 <transform file path=opt/VirtualBox/amd64/legacy/.*$->drop>
     29<transform dir path=opt/VirtualBox/amd64/legacy$ -> drop>
     30<transform file path=opt/VirtualBox/amd64/legacy/.*$ -> drop>
     31
     32# Drop all API helper libraries for python 2.x other than 2.7
     33<transform file path=opt/VirtualBox/VBoxPython2_[^7].*\.so.*$->drop>
     34
     35# Tweak: do not try to get the dependencies for libGL.so which is needed by Qt
     36<transform file path=opt/VirtualBox/amd64/libQt5GuiVBox\.so\.5$ -> set pkg.depend.runpath /usr/lib/mesa/amd64:$PKGDEPEND_RUNPATH>
     37<transform file path=opt/VirtualBox/amd64/libQt5PrintSupportVBox\.so\.5$ -> set pkg.depend.runpath /usr/lib/mesa/amd64:$PKGDEPEND_RUNPATH>
     38<transform file path=opt/VirtualBox/amd64/libQt5WidgetsVBox\.so\.5$ -> set pkg.depend.runpath /usr/lib/mesa/amd64:$PKGDEPEND_RUNPATH>
     39<transform file path=opt/VirtualBox/amd64/libQt5X11ExtrasVBox\.so\.5$ -> set pkg.depend.runpath /usr/lib/mesa/amd64:$PKGDEPEND_RUNPATH>
     40<transform file path=opt/VirtualBox/amd64/libQt5XcbQpaVBox\.so\.5$ -> set pkg.depend.runpath /usr/lib/mesa/amd64:$PKGDEPEND_RUNPATH>
     41<transform file path=opt/VirtualBox/amd64/plugins/platforms/libqxcb\.so$ -> set pkg.depend.runpath /usr/lib/mesa/amd64:$PKGDEPEND_RUNPATH>
     42<transform file path=opt/VirtualBox/amd64/plugins/xcbglintegrations/libqxcb-glx-integration\.so$ -> set pkg.depend.runpath /usr/lib/mesa/amd64:$PKGDEPEND_RUNPATH>
     43
     44# Some binaries must be SUID.
     45<transform file path=opt/VirtualBox/amd64/(VBoxNetAdpCtl|VBoxNetDHCP|VBoxNetNAT)$ -> set mode 4755>
     46$(HARDENED_ONLY)<transform file path=opt/VirtualBox/amd64/(VirtualBoxVM|VBoxHeadless|VBoxSDL)$ -> set mode 4755>
    3047
    3148# Set the appropriate pkg variant for drivers (global zone only)
    32 #<transform file path=opt/VirtualBox/.*$->add pkg.depend.runpath $PKGDEPEND_RUNPATH:/opt/VirtualBox/amd64>
    33 <transform file path=platform/i86pc/kernel/drv/amd64/vboxdrv$->add variant.opensolaris.zone global>
    34 <transform file path=platform/i86pc/kernel/drv/amd64/vboxbow$->add variant.opensolaris.zone global>
    35 <transform file path=platform/i86pc/kernel/drv/amd64/vboxnet$->add variant.opensolaris.zone global>
    36 <transform file path=platform/i86pc/kernel/drv/amd64/vboxusb$->add variant.opensolaris.zone global>
    37 <transform file path=platform/i86pc/kernel/drv/amd64/vboxusbmon$->add variant.opensolaris.zone global>
     49<transform file path=platform/i86pc/kernel/drv/amd64/[^/]*$ -> add variant.opensolaris.zone global>
     50<transform file path=platform/i86pc/kernel/drv/.*$ -> set group sys>
    3851
    39 # pkg doesn't lookup /kernel/misc/amd64 but looks up /kernel/misc/amd64/misc/amd64. whatever
    40 # the below transform for drivers fixes where pkg resolves it's dependencies (we link drivers with -N misc/*)
    41 #<transform file path=platform/i86pc/kernel/drv/amd64/.*$->add pkg.depend.runpath $PKGDEPEND_RUNPATH:/kernel>
     52# Handle SMF manifests
     53<transform dir file path=var/svc/manifest/.*$ -> set group sys>
     54<transform file path=var/svc/manifest/.*\.xml$ -> default restart_fmri svc:/system/manifest-import:default>
    4255
    4356# todo:
    4457# resolve dependencies properly for python
    4558<transform file path=opt/VirtualBox/vboxshell\.py$->drop>
    46 <transform file path=opt/VirtualBox/VBoxPython2_[^7].*\.so.*$->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