anchor.diff:  in pre-packaged distributions, be it the original Oracle VirtualBox, or
   any of the OSE builds in illumos distributions.
   
  += Applying and using the patch to install VirtualBox
  +
  +NOTE: The instructions below were tested on an OpenIndiana Hipster 2015.0
  +installation.
  +
  +* Download a VirtualBox distribution for "SunOS" (x86/amd64) hosts from
  +http://download.virtualbox.org/virtualbox/ and unpack the archive, e.g.:
  +----
  +:; mkdir -p /tmp/vbox
  +:; cd /tmp/vbox
  +:; wget -c https://raw.githubusercontent.com/jimklimov/vboxconfig_sh/master/vboxconfig.sh.patch
  +:; wget -c http://dlc-cdn.sun.com/virtualbox/4.3.28/VirtualBox-4.3.28-100309-SunOS.tar.gz && \
  +   gzip -cd < "`ls -1 VirtualBox-*-SunOS.tar.gz | tail -1`" | tar xvf -
  +
  +VirtualBox-4.3.28-SunOS-amd64-r100309.pkg
  +LICENSE
  +autoresponse
  +ReadMe.txt
  +----
  +
  +* Unpack the package into individual files (this creates a subdirectory
  +named `SUNWvbox` under the target directory `./` in our example case):
  +----
  +:; yes '' | pkgtrans "`ls -1 VirtualBox-*-SunOS*pkg | tail -1`" ./
  +:; du -ks SUNWvbox/
  +210448  SUNWvbox/
  +:; find SUNWvbox/ | grep vboxc
  +SUNWvbox/root/opt/VirtualBox/vboxconfig.sh
  +----
  +
  +* Apply the patch:
  +----
  +:; ( cd SUNWvbox/root/opt/VirtualBox/ && gpatch -p1 ) < vboxconfig.sh.patch
  +----
  +
  +* Fix up the SVR4 package metadata (embed new size and checksum of the
  +resulting file into the `pkgmap`):
  +----
  +:; CSSZ="`/bin/cksum -B1 -s SUNWvbox/root/opt/VirtualBox/vboxconfig.sh | awk '{print $2" "$1}'`" && \
  +   echo "$CSSZ"
  +45116 6865
  +
  +:; sed 's,^\(.* f .* /opt/VirtualBox/vboxconfig.sh [^ ]* [^ ]* [^ ]* \)\([^ ]* [^ ]* \)\([^ ]*\)$,\1'"$CSSZ "'\3,' \
  +    -i SUNWvbox/pkgmap
  +----
  +
  +* NOTE: The next step covers installation of the resulting patched package
  +on a hypervisor host. Keep in mind that this process will disrupt networking,
  +so initiate the installation only from an out-of-band connection (console)
  +or at least a non-disruptable session (VNC, `screen`) so that the SSH link
  +disconnection will not botch the installation.
  +
  +* Hope that all went well above, and install the package (in case of upgrading
  +or retrying, remove an old one first):
  +----
  +:; cd /tmp/vbox && \
  +   if [ -d /var/sadm/pkg/SUNWvbox ] ; then yes y | pkgrm SUNWvbox ; fi && \
  +   yes '' | pkgadd -d . -a ./autoresponse
  +----
  +
  +
  +Good luck,
   Jim Klimov
   
   ----------------
  
positive.code: The "illumos-fix" is my work in progress as I develop and test the script,
  as well as rebase it to newer upstream versions over time.
  
  The "master" branch is a sort of release variant of the "illumos-fix" -
  whatever seems stable enough to publish and use for everybody daring enough ;)
  
  ## License
  
  Common license for the script is GPLv2 as in VirtualBox OSE.
  My changes were initially released under MIT License which is even less
  
negative.code: = About
  
  This repository contains the `vboxconfig.sh` script fixed to properly detect
  non-"Oracle Solaris 11" platforms during VirtualBox installations.
  