Changeset 87038 in vbox for trunk/src/VBox/Installer/solaris
- Timestamp:
- Dec 3, 2020 10:20:02 PM (4 years ago)
- Location:
- trunk/src/VBox/Installer/solaris
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Installer/solaris/makepackage.sh
r87035 r87038 94 94 package_spec_append_content() 95 95 { 96 rm -rf "$1/vbox-repo" 96 97 pkgsend generate "$1" | pkgfmt >> "$PACKAGE_SPEC" 97 98 } … … 111 112 package_create() 112 113 { 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" 114 118 115 119 pkgdepend generate -m -d "$1" "$PACKAGE_SPEC.1" | pkgfmt > "$PACKAGE_SPEC.2" 116 120 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 122 129 pkgrepo create "$1/vbox-repo" 123 130 pkgrepo -s "$1/vbox-repo" set publisher/prefix=virtualbox … … 130 137 131 138 # 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" 133 141 #rm -rf "$1/vbox-repo" 134 142 } … … 160 168 cd "$1" 161 169 # 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|v irtualbox\.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" 163 171 cd - 164 172 "$VBOX_AWK" 'NF == 3 && $1 == "s" && $2 == "none" { $3="/"$3 } { print }' "$PACKAGE_SPEC" > "$PACKAGE_SPEC.tmp" … … 204 212 205 213 # 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"' 207 215 package_spec_fixup_filelist '$3 == "/platform/i86pc/kernel/drv/amd64/vboxdrv"' '$6 = "sys"' 208 216 209 217 # 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"' 211 219 package_spec_fixup_filelist '$3 == "/platform/i86pc/kernel/drv/amd64/vboxflt"' '$6 = "sys"' 212 220 213 221 # 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"' 215 223 package_spec_fixup_filelist '$3 == "/platform/i86pc/kernel/drv/amd64/vboxbow"' '$6 = "sys"' 216 224 217 225 # 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"' 219 227 package_spec_fixup_filelist '$3 == "/platform/i86pc/kernel/drv/amd64/vboxnet"' '$6 = "sys"' 220 228 221 229 # 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"' 223 231 package_spec_fixup_filelist '$3 == "/platform/i86pc/kernel/drv/amd64/vboxusbmon"' '$6 = "sys"' 224 232 225 233 # 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"' 227 235 package_spec_fixup_filelist '$3 == "/platform/i86pc/kernel/drv/amd64/vboxusb"' '$6 = "sys"' 228 236 … … 256 264 echo " --- start of $PACKAGE_SPEC ---" 257 265 cat "$PACKAGE_SPEC" 258 echo " --- end of $PACKAGE_SPEC --- 266 echo " --- end of $PACKAGE_SPEC ---" 259 267 } 260 268 -
trunk/src/VBox/Installer/solaris/vbox-ips.mog
r87035 r87038 9 9 10 10 # 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> 19 19 20 20 # 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> 22 23 23 24 # 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> 26 27 27 28 # 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> 30 47 31 48 # 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> 38 51 39 # pkg doesn't lookup /kernel/misc/amd64 but looks up /kernel/misc/amd64/misc/amd64. whatever40 # 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> 42 55 43 56 # todo: 44 57 # resolve dependencies properly for python 45 58 <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.