summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorYurii Kolesnykov2018-11-17 12:31:28 +0100
committerYurii Kolesnykov2018-11-17 12:31:28 +0100
commiteb76aee12ada05dfe93f6b4e108fd888f3b7d0a5 (patch)
tree5249391e353053efaedd39baf162bd648609f2fc
downloadaur-eb76aee12ada05dfe93f6b4e108fd888f3b7d0a5.tar.gz
init,6.0.0.126642
-rw-r--r--.SRCINFO69
-rw-r--r--.gitignore6
-rw-r--r--009-include-path.patch85
-rw-r--r--10-vboxdrv.rules5
-rw-r--r--PKGBUILD216
-rw-r--r--VBoxFixUSB16
-rw-r--r--dkms.conf35
-rw-r--r--do_dkms67
-rw-r--r--vboxweb.conf11
-rw-r--r--vboxweb.rc86
-rw-r--r--virtualbox-beta-bin.install47
11 files changed, 643 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..b0730fe4375
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,69 @@
+pkgbase = virtualbox-beta-bin
+ pkgdesc = Oracle VM VirtualBox Binary Edition (Oracle branded non-OSE version)
+ pkgver = 6.0.0.126642
+ pkgrel = 1
+ url = https://www.virtualbox.org/
+ install = virtualbox-beta-bin.install
+ arch = i686
+ arch = x86_64
+ license = GPL2
+ makedepends = linux-headers
+ depends = dkms
+ depends = fontconfig
+ depends = gcc
+ depends = libgl
+ depends = libidl2
+ depends = libxcursor
+ depends = libxinerama
+ depends = libxmu
+ depends = python
+ depends = sdl
+ optdepends = virtualbox-ext-oracle: for Oracle extensions
+ optdepends = linux-headers: build the module for Arch kernel
+ optdepends = linux-lts-headers: build the module for LTS Arch kernel
+ provides = virtualbox-beta
+ provides = virtualbox=6.0.0_BETA2
+ provides = virtualbox-sdk
+ provides = VIRTUALBOX-HOST-MODULES
+ provides = virtualbox-host-dkms
+ provides = virtualbox-guest-iso
+ conflicts = virtualbox
+ conflicts = virtualbox-sdk
+ conflicts = virtualbox-host-dkms
+ conflicts = virtualbox-host-modules-arch
+ replaces = virtualbox_bin
+ replaces = virtualbox-sun
+ noextract = VirtualBoxSDK-6.0.0_BETA2-126642.zip
+ options = !strip
+ options = !emptydirs
+ backup = etc/vbox/vbox.cfg
+ backup = etc/conf.d/vboxweb
+ source = https://download.virtualbox.org/virtualbox/6.0.0_BETA2/VirtualBoxSDK-6.0.0_BETA2-126642.zip
+ source = VBoxAuth-r75527.h::https://www.virtualbox.org/svn/vbox/trunk/include/VBox/VBoxAuth.h?p=75527
+ source = VBoxAuthPAM-r75527.c::https://www.virtualbox.org/svn/vbox/trunk/src/VBox/HostServices/auth/pam/VBoxAuthPAM.c?p=75527
+ source = VBoxAuthSimple-r75527.cpp::https://www.virtualbox.org/svn/vbox/trunk/src/VBox/HostServices/auth/simple/VBoxAuthSimple.cpp?p=75527
+ source = VBoxFixUSB
+ source = 10-vboxdrv.rules
+ source = vboxweb.rc
+ source = vboxweb.conf
+ source = do_dkms
+ source = dkms.conf
+ source = 009-include-path.patch
+ sha256sums = c818959c8310f3f323c75c29cacac86b749ca258373d48479efd41d26b2e4391
+ sha256sums = 23e3e0e6abfaa69bf0aa046c0ee070d19435b97cb4bfbb16bba65a2783502154
+ sha256sums = 815f6e2e3ab687356aad0e6f59eef6e266514fb12a6b569d239d834e0a480f37
+ sha256sums = 99deff35d8a600f20223b96ba409451834e58ac21a589a989dd82a2d6fe006ae
+ sha256sums = 0aebe22abab402ea6b6573af637a99d8056a904920a52d84fb97729219219c23
+ sha256sums = 69417a9e8855cab8e4878886abe138f559fd17ae487d4cd19c8a24974a8bbec2
+ sha256sums = 656905de981ffa24f6f921c920538854a235225053f44baedacc07b46ca0cf56
+ sha256sums = 12dbba3b59991f2b68cddeeeda20236aeff63e11b7e2d1b08d9d6a82225f6651
+ sha256sums = cc1c0500ab07bc13563d99037f776bf64bdc90bb521e31e2e0b04e42ea5bb36a
+ sha256sums = e9df0fff15184d0a90abe17707bdbe1931582433bbc14ded4fb3b0252653c801
+ sha256sums = 5112f0e1ba3bd0bd92ef2edb2d21024e265abb02841aa29aa05410526adc273f
+ source_i686 = http://download.virtualbox.org/virtualbox/6.0.0_BETA2/VirtualBox-6.0.0_BETA2-126642-Linux_x86.run
+ sha256sums_i686 = 2db1e18d175561474e2dfdd1b674103b89c35ade732aaf8802e02969ca09b559
+ source_x86_64 = http://download.virtualbox.org/virtualbox/6.0.0_BETA2/VirtualBox-6.0.0_BETA2-126642-Linux_amd64.run
+ sha256sums_x86_64 = 3ed0e18aecbb03f63ca18938d4f019f4dff4b6cedfe2b0e88868e714592854a0
+
+pkgname = virtualbox-beta-bin
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000000..2d9b0c152a7
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,6 @@
+*.run
+*75527*
+src
+pkg
+*.pkg.*
+*.zip
diff --git a/009-include-path.patch b/009-include-path.patch
new file mode 100644
index 00000000000..845ae9df92e
--- /dev/null
+++ b/009-include-path.patch
@@ -0,0 +1,85 @@
+diff --git a/src/VBox/HostDrivers/Support/vboxdrv/Makefile b/src/VBox/HostDrivers/Support/vboxdrv/Makefile
+index d199047..34d895f 100644
+--- a/src/VBox/HostDrivers/Support/vboxdrv/Makefile
++++ b/src/VBox/HostDrivers/Support/vboxdrv/Makefile
+@@ -131,7 +131,7 @@ ifdef VBOX_WITH_NATIVE_DTRACE
+ MOD_OBJS += SUPDrvDTrace.o
+ endif
+
+-MOD_INCL = $(addprefix -I$(KBUILD_EXTMOD),/ /include /r0drv/linux)
++MOD_INCL = $(addprefix -I$(KBUILD_EXTMOD)/vboxdrv,/ /include /r0drv/linux)
+ ifdef VBOX_WITH_NATIVE_DTRACE
+ MOD_INCL += -I/usr/include/linux -I/usr/include
+ endif
+@@ -157,7 +157,7 @@ ifdef VBOX_WITH_TEXT_MODMEM_HACK
+ endif
+
+ # build defs
+-MOD_CFLAGS = -include $(KBUILD_EXTMOD)/include/VBox/SUPDrvMangling.h \
++MOD_CFLAGS = -include $(KBUILD_EXTMOD)/vboxdrv/include/VBox/SUPDrvMangling.h \
+ -fno-omit-frame-pointer -fno-pie
+
+ include $(obj)/Makefile.include.footer
+diff --git a/src/VBox/HostDrivers/Support/vboxnetadp/Makefile b/src/VBox/HostDrivers/Support/vboxnetadp/Makefile
+index 694cb5c..8487820 100644
+--- a/src/VBox/HostDrivers/Support/vboxnetadp/Makefile
++++ b/src/VBox/HostDrivers/Support/vboxnetadp/Makefile
+@@ -34,7 +34,7 @@ MOD_OBJS += math/gcc/divdi3.o \
+ math/gcc/umoddi3.o
+ endif
+
+-MOD_INCL = $(addprefix -I$(KBUILD_EXTMOD),/ /include /r0drv/linux)
++MOD_INCL = $(addprefix -I$(KBUILD_EXTMOD)/vboxnetadp,/ /include /r0drv/linux)
+ MOD_DEFS = -DRT_OS_LINUX -DIN_RING0 -DIN_RT_R0 -DIN_SUP_R0 -DVBOX \
+ -DRT_WITH_VBOX -DVBOX_WITH_HARDENING \
+ -Wno-declaration-after-statement
+@@ -59,6 +59,6 @@ ifdef VBOX_USE_INSERT_PAGE
+ endif
+
+ # build defs
+-MOD_CFLAGS = -include $(KBUILD_EXTMOD)/include/VBox/SUPDrvMangling.h -fno-pie
++MOD_CFLAGS = -include $(KBUILD_EXTMOD)/vboxnetadp/include/VBox/SUPDrvMangling.h -fno-pie
+
+ include $(obj)/Makefile.include.footer
+diff --git a/src/VBox/HostDrivers/Support/vboxnetflt/Makefile b/src/VBox/HostDrivers/Support/vboxnetflt/Makefile
+index e262c61..ca956d5 100644
+--- a/src/VBox/HostDrivers/Support/vboxnetflt/Makefile
++++ b/src/VBox/HostDrivers/Support/vboxnetflt/Makefile
+@@ -38,7 +38,7 @@ MOD_OBJS += math/gcc/divdi3.o \
+ math/gcc/umoddi3.o
+ endif
+
+-MOD_INCL = $(addprefix -I$(KBUILD_EXTMOD),/ /include /r0drv/linux)
++MOD_INCL = $(addprefix -I$(KBUILD_EXTMOD)/vboxnetflt,/ /include /r0drv/linux)
+ MOD_DEFS = -DRT_OS_LINUX -DIN_RING0 -DIN_RT_R0 \
+ -DIN_SUP_R0 -DVBOX -DRT_WITH_VBOX -DVBOX_WITH_HARDENING \
+ -Wno-declaration-after-statement
+@@ -63,6 +63,6 @@ ifdef VBOX_USE_INSERT_PAGE
+ endif
+
+ # build defs
+-MOD_CFLAGS = -include $(KBUILD_EXTMOD)/include/VBox/SUPDrvMangling.h -fno-pie
++MOD_CFLAGS = -include $(KBUILD_EXTMOD)/vboxnetflt/include/VBox/SUPDrvMangling.h -fno-pie
+
+ include $(obj)/Makefile.include.footer
+diff --git a/src/VBox/HostDrivers/Support/vboxpci/Makefile b/src/VBox/HostDrivers/Support/vboxpci/Makefile
+index 6b3878a..7b8a8a2 100644
+--- a/src/VBox/HostDrivers/Support/vboxpci/Makefile
++++ b/src/VBox/HostDrivers/Support/vboxpci/Makefile
+@@ -38,7 +38,7 @@ MOD_OBJS += math/gcc/divdi3.o \
+ math/gcc/umoddi3.o
+ endif
+
+-MOD_INCL = $(addprefix -I$(KBUILD_EXTMOD),/ /include /r0drv/linux)
++MOD_INCL = $(addprefix -I$(KBUILD_EXTMOD)/vboxpci,/ /include /r0drv/linux)
+ MOD_DEFS = -DRT_OS_LINUX -DIN_RING0 -DIN_RT_R0 -DIN_SUP_R0 -DVBOX \
+ -DRT_WITH_VBOX -DVBOX_WITH_HARDENING
+ ifeq ($(BUILD_TARGET_ARCH),amd64)
+@@ -60,6 +60,6 @@ ifdef VBOX_USE_INSERT_PAGE
+ endif
+
+ # build defs
+-MOD_CFLAGS = -include $(KBUILD_EXTMOD)/include/VBox/SUPDrvMangling.h -fno-pie
++MOD_CFLAGS = -include $(KBUILD_EXTMOD)/vboxpci/include/VBox/SUPDrvMangling.h -fno-pie
+
+ include $(obj)/Makefile.include.footer
diff --git a/10-vboxdrv.rules b/10-vboxdrv.rules
new file mode 100644
index 00000000000..12b7ab57afc
--- /dev/null
+++ b/10-vboxdrv.rules
@@ -0,0 +1,5 @@
+KERNEL=="vboxdrv", NAME="vboxdrv", OWNER="root", GROUP="root", MODE="0600"
+SUBSYSTEM=="usb_device", ACTION=="add", RUN="VBoxCreateUSBNode.sh $major $minor $attr{bDeviceClass}"
+SUBSYSTEM=="usb", ACTION=="add", ENV{DEVTYPE}=="usb_device", RUN="VBoxCreateUSBNode.sh $major $minor $attr{bDeviceClass}"
+SUBSYSTEM=="usb_device", ACTION=="remove", RUN="VBoxCreateUSBNode.sh --remove $major $minor"
+SUBSYSTEM=="usb", ACTION=="remove", ENV{DEVTYPE}=="usb_device", RUN="VBoxCreateUSBNode.sh --remove $major $minor"
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..e0aa90d1fb0
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,216 @@
+# Maintainer: Yurii Kolesnykov <root@yurikoles.com>
+# Contributor: Daniel Bermond < gmail: danielbermond >
+# Contributor: Rainmaker <rainmaker52@gmail.com>
+# Contributor: gary9872 <garysBoXatgeemale.com>
+# Contributor: khomutsky <bogdan@khomutsky.com>
+# Contributor: M0Rf30
+
+pkgname=virtualbox-beta-bin
+pkgver=6.0.0.126642
+_pkgver=6.0.0_BETA2
+_build=126642
+_rev=75527
+pkgrel=1
+pkgdesc='Oracle VM VirtualBox Binary Edition (Oracle branded non-OSE version)'
+arch=('i686' 'x86_64')
+url='https://www.virtualbox.org/'
+license=('GPL2')
+depends=('dkms' 'fontconfig' 'gcc' 'libgl' 'libidl2' 'libxcursor' 'libxinerama'
+ 'libxmu' 'python' 'sdl')
+makedepends=('linux-headers')
+optdepends=('virtualbox-ext-oracle: for Oracle extensions'
+ 'linux-headers: build the module for Arch kernel'
+ 'linux-lts-headers: build the module for LTS Arch kernel')
+provides=(virtualbox-beta "virtualbox=${_pkgver}" 'virtualbox-sdk' 'VIRTUALBOX-HOST-MODULES'
+ 'virtualbox-host-dkms' 'virtualbox-guest-iso')
+conflicts=('virtualbox' 'virtualbox-sdk' 'virtualbox-host-dkms' 'virtualbox-host-modules-arch')
+replaces=('virtualbox_bin' 'virtualbox-sun')
+backup=('etc/vbox/vbox.cfg' 'etc/conf.d/vboxweb')
+options=('!strip' '!emptydirs')
+install="${pkgname}.install"
+source=("https://download.virtualbox.org/virtualbox/${_pkgver}/VirtualBoxSDK-${_pkgver}-${_build}.zip"
+ "VBoxAuth-r${_rev}.h"::"https://www.virtualbox.org/svn/vbox/trunk/include/VBox/VBoxAuth.h?p=${_rev}"
+ "VBoxAuthPAM-r${_rev}.c"::"https://www.virtualbox.org/svn/vbox/trunk/src/VBox/HostServices/auth/pam/VBoxAuthPAM.c?p=${_rev}"
+ "VBoxAuthSimple-r${_rev}.cpp"::"https://www.virtualbox.org/svn/vbox/trunk/src/VBox/HostServices/auth/simple/VBoxAuthSimple.cpp?p=${_rev}"
+ 'VBoxFixUSB'
+ '10-vboxdrv.rules'
+ 'vboxweb.rc'
+ 'vboxweb.conf'
+ 'do_dkms'
+ 'dkms.conf'
+ '009-include-path.patch')
+source_i686=("http://download.virtualbox.org/virtualbox/${_pkgver}/VirtualBox-${_pkgver}-${_build}-Linux_x86.run")
+source_x86_64=("http://download.virtualbox.org/virtualbox/${_pkgver}/VirtualBox-${_pkgver}-${_build}-Linux_amd64.run")
+noextract=("VirtualBoxSDK-${_pkgver}-${_build}.zip")
+sha256sums=('c818959c8310f3f323c75c29cacac86b749ca258373d48479efd41d26b2e4391'
+ '23e3e0e6abfaa69bf0aa046c0ee070d19435b97cb4bfbb16bba65a2783502154'
+ '815f6e2e3ab687356aad0e6f59eef6e266514fb12a6b569d239d834e0a480f37'
+ '99deff35d8a600f20223b96ba409451834e58ac21a589a989dd82a2d6fe006ae'
+ '0aebe22abab402ea6b6573af637a99d8056a904920a52d84fb97729219219c23'
+ '69417a9e8855cab8e4878886abe138f559fd17ae487d4cd19c8a24974a8bbec2'
+ '656905de981ffa24f6f921c920538854a235225053f44baedacc07b46ca0cf56'
+ '12dbba3b59991f2b68cddeeeda20236aeff63e11b7e2d1b08d9d6a82225f6651'
+ 'cc1c0500ab07bc13563d99037f776bf64bdc90bb521e31e2e0b04e42ea5bb36a'
+ 'e9df0fff15184d0a90abe17707bdbe1931582433bbc14ded4fb3b0252653c801'
+ '5112f0e1ba3bd0bd92ef2edb2d21024e265abb02841aa29aa05410526adc273f')
+sha256sums_i686=('2db1e18d175561474e2dfdd1b674103b89c35ade732aaf8802e02969ca09b559')
+sha256sums_x86_64=('3ed0e18aecbb03f63ca18938d4f019f4dff4b6cedfe2b0e88868e714592854a0')
+
+prepare() {
+ [ "$CARCH" = 'i686' ] && local _arch='x86'
+ [ "$CARCH" = 'x86_64' ] && local _arch='amd64'
+
+ mkdir -p "${pkgname}-${_pkgver}"
+
+ # extract the main source file
+ yes | sh "VirtualBox-${_pkgver}-${_build}-Linux_${_arch}.run" \
+ --target "${srcdir}/${pkgname}-${_pkgver}" \
+ --nox11 \
+ --noexec \
+ &> /dev/null
+
+ # extract sdk
+ cd "${pkgname}-${_pkgver}"
+ bsdtar -xf "${srcdir}/VirtualBoxSDK-${_pkgver}-${_build}.zip"
+}
+
+package() {
+ local _installdir='/opt/VirtualBox'
+
+ # install bundled files
+ printf '%s\n' ' -> Installing bundled files...'
+ install -d "${pkgdir}/${_installdir}"
+ tar -jxf "${srcdir}/${pkgname}-${_pkgver}/VirtualBox.tar.bz2" -C "${pkgdir}/${_installdir}"
+
+ # apply patch 009-include-path (thanks to Christian Hesse)
+ printf '%s\n' " -> Applying patch '009-includepath.patch'..."
+ cd "${pkgdir}/${_installdir}/src/vboxhost/"
+ patch -Np5 -i "${srcdir}/009-include-path.patch"
+
+ # hardened build: mark binaries suid root, create symlinks for working around
+ # unsupported $ORIGIN/.. in VBoxC.so and make sure the
+ # directory is only writable by the user (paranoid)
+ cd "${pkgdir}/${_installdir}"
+ chmod 4511 VirtualBox VBox{SDL,Headless,NetDHCP,NetNAT,NetAdpCtl,VolInfo}
+ for _lib in VBox{VMM,RT}.so
+ do
+ ln -s "${_installdir}/${_lib}" "components/${_lib}"
+ done
+ chmod go-w "${pkgdir}/${_installdir}"
+
+ # install SDK
+ printf '%s\n' ' -> Installing SDK...'
+ cd "${srcdir}/${pkgname}-${_pkgver}"
+ pushd 'sdk/installer' >/dev/null
+ VBOX_INSTALL_PATH="$_installdir" python vboxapisetup.py install --root "$pkgdir"
+ popd >/dev/null
+ rm -r "${pkgdir}/${_installdir}/sdk"
+ mkdir -p "${pkgdir}/${_installdir}/sdk"
+ cp -a sdk/bindings "${pkgdir}/${_installdir}/sdk"
+ cp -a sdk/docs "${pkgdir}/${_installdir}"
+ install -D -m644 "${srcdir}/VBoxAuth-r${_rev}.h" "${pkgdir}/${_installdir}/sdk/bindings/auth/include/VBoxAuth.h"
+ install -D -m644 "${srcdir}/VBoxAuthPAM-r${_rev}.c" "${pkgdir}/${_installdir}/sdk/bindings/auth/VBoxAuthPAM.cpp"
+ install -D -m644 "${srcdir}/VBoxAuthSimple-r${_rev}.cpp" "${pkgdir}/${_installdir}/sdk/bindings/auth/VBoxAuthSimple.cpp"
+
+ # install udev rules
+ printf '%s\n' ' -> Installing udev rules...'
+ cd "${pkgdir}/${_installdir}"
+ install -D -m0644 "${srcdir}/10-vboxdrv.rules" "${pkgdir}/usr/lib/udev/rules.d/10-vboxdrv.rules"
+ ## we need to copy and not symlink VBoxCreateUSBNode.sh in /usr/lib/udev to avoid udevd
+ ## to look /opt when /opt is not mounted. This can be done until VBoxCreateUSBNode.sh doesn't
+ ## need more stuff from /opt
+ cp -a VBoxCreateUSBNode.sh "${pkgdir}/usr/lib/udev/"
+
+ printf '%s\n' ' -> Installing scripts...'
+
+ # install VBoxFixUSB script
+ install -D -m0755 "${srcdir}/VBoxFixUSB" VBoxFixUSB
+
+ # install vboxweb initscript
+ install -D -m0755 "${srcdir}/vboxweb.rc" "${pkgdir}/etc/rc.d/vboxweb"
+ install -D -m0644 "${srcdir}/vboxweb.conf" "${pkgdir}/etc/conf.d/vboxweb"
+
+ printf '%s\n' ' -> Creating needed symlinks...'
+
+ # symlink the launchers (second link can fail if fs is not case sensitive)
+ install -d -m0755 "${pkgdir}/usr/bin"
+ for _bin in VirtualBox VBox{Headless,Manage,SDL,SVC,Tunctl,NetAdpCtl,FixUSB} rdesktop-vrdp
+ do
+ ln -s "${_installdir}/${_bin}" "${pkgdir}/usr/bin/${_bin}"
+ ln -s "${_installdir}/${_bin}" "${pkgdir}/usr/bin/${_bin,,}" &>/dev/null || :
+ done
+
+ # symlink the desktop icon and .desktop files
+ install -d -m0755 "${pkgdir}/usr/"{share/applications,share/pixmaps}
+ ln -s "${_installdir}/VBox.png" "${pkgdir}/usr/share/pixmaps/VBox.png"
+ ln -s "${_installdir}/icons/128x128/virtualbox.png" "${pkgdir}/usr/share/pixmaps/virtualbox.png"
+ ln -s "${_installdir}/virtualbox.desktop" "${pkgdir}/usr/share/applications/virtualbox.desktop"
+
+ # symlink mime info
+ install -d -m0755 "${pkgdir}/usr/share/mime/packages"
+ ln -s "${_installdir}/virtualbox.xml" "${pkgdir}/usr/share/mime/packages/virtualbox.xml"
+
+ # symlink doc
+ install -d -m0755 "${pkgdir}/usr/share/doc/${pkgname}"
+ ln -s "${_installdir}/VirtualBox.chm" "${pkgdir}/usr/share/doc/${pkgname}/virtualbox.chm"
+
+ # symlink icons
+ pushd icons >/dev/null
+ for _dir in *
+ do
+ cd "$_dir"
+ install -d -m0755 "${pkgdir}/usr/share/icons/hicolor/${_dir}/"{apps,mimetypes}
+ for _icon in *
+ do
+ if [ "$_icon" = 'virtualbox.png' ]
+ then
+ ln -s "${_installdir}/icons/${_dir}/${_icon}" "${pkgdir}/usr/share/icons/hicolor/${_dir}/apps/${_icon}"
+ else
+ ln -s "${_installdir}/icons/${_dir}/${_icon}" "${pkgdir}/usr/share/icons/hicolor/${_dir}/mimetypes/${_icon}"
+ fi
+ done
+ cd - >/dev/null
+ done
+ popd >/dev/null
+
+ # with the relase of VirtualBox 5.1.0, Oracle dropped DKMS support from their package
+ # we will restore DKMS with the use of these config files
+ printf '%s\n' ' -> Installing DKMS support...'
+ install -D -m0755 "${srcdir}/do_dkms" -t "${pkgdir}/${_installdir}/src/vboxhost"
+ ## update module version
+ cd "$srcdir"
+ cp -a dkms.conf "${pkgname}-${_pkgver}"
+ sed -i "s/PACKAGE_VERSION=/PACKAGE_VERSION=${_pkgver}/" "${pkgname}-${_pkgver}/dkms.conf"
+ install -D -m0644 "${pkgname}-${_pkgver}/dkms.conf" -t "${pkgdir}/${_installdir}/src/vboxhost"
+
+ # module sources in /usr/src
+ printf '%s\n' ' -> Installing module sources...'
+ install -d -m0755 "${pkgdir}/usr/src"
+ mv "${pkgdir}/${_installdir}/src/vboxhost" "${pkgdir}/usr/src/vboxhost-${_pkgver}"
+
+ # write the configuration file
+ printf '%s\n' ' -> Writing the configuration file...'
+ install -D -m0644 /dev/null "${pkgdir}/etc/vbox/vbox.cfg"
+ cat > "${pkgdir}/etc/vbox/vbox.cfg" <<EOF
+# VirtualBox installation directory
+INSTALL_DIR='${_installdir}'
+
+# VirtualBox version
+INSTALL_VER='${_pkgver}'
+INSTALL_REV='${_build}'
+EOF
+
+ # write modules-load.d configuration to ensure that modules are loaded at boot
+ printf '%s\n' " -> Writing 'modules-load.d' configuration..."
+ install -D -m644 /dev/null "${pkgdir}/usr/lib/modules-load.d/${pkgname}.conf"
+ printf '%s\n' '# Load virtualbox kernel modules at boot ' >"${pkgdir}/usr/lib/modules-load.d/${pkgname}.conf"
+ printf '%s\n\n' "# This file was installed by the ${pkgname} AUR package" >>"${pkgdir}/usr/lib/modules-load.d/${pkgname}.conf"
+ printf '%s\n' 'vboxdrv' >>"${pkgdir}/usr/lib/modules-load.d/${pkgname}.conf"
+ printf '%s\n' 'vboxpci' >>"${pkgdir}/usr/lib/modules-load.d/${pkgname}.conf"
+ printf '%s\n' 'vboxnetadp' >>"${pkgdir}/usr/lib/modules-load.d/${pkgname}.conf"
+ printf '%s\n' 'vboxnetflt' >>"${pkgdir}/usr/lib/modules-load.d/${pkgname}.conf"
+
+ # fix permissions (change executables from 4711 to 4755)
+ printf '%s\n' ' -> Fixing permissions...'
+ chmod 4755 "${pkgdir}/${_installdir}"/{VBox{Headless,Net{AdpCtl,DHCP,NAT},SDL,VolInfo},VirtualBox}
+}
diff --git a/VBoxFixUSB b/VBoxFixUSB
new file mode 100644
index 00000000000..f4c1ebe6f01
--- /dev/null
+++ b/VBoxFixUSB
@@ -0,0 +1,16 @@
+#!/bin/bash
+# 2012: Seblu was here
+
+. /etc/vbox/vbox.cfg
+
+# Build our device tree
+for i in /sys/bus/usb/devices/*; do
+ if test -r "$i/dev"; then
+ dev="`cat "$i/dev" 2> /dev/null`"
+ major="`expr "$dev" : '\(.*\):' 2> /dev/null`"
+ minor="`expr "$dev" : '.*:\(.*\)' 2> /dev/null`"
+ class="`cat $i/bDeviceClass 2> /dev/null`"
+ sh "$INSTALL_DIR/VBoxCreateUSBNode.sh" "$major" "$minor" "$class" 2>/dev/null
+ fi
+done
+# vim:set ts=2 sw=2 ft=sh et:
diff --git a/dkms.conf b/dkms.conf
new file mode 100644
index 00000000000..1b0a07b95d8
--- /dev/null
+++ b/dkms.conf
@@ -0,0 +1,35 @@
+## @file
+# Linux DKMS config script for the VirtualBox guest kernel modules
+#
+
+#
+# Copyright (C) 2006-2015 Oracle Corporation
+#
+# This file is part of VirtualBox Open Source Edition (OSE), as
+# available from http://www.virtualbox.org. This file is free software;
+# you can redistribute it and/or modify it under the terms of the GNU
+# General Public License (GPL) as published by the Free Software
+# Foundation, in version 2 as it comes in the "COPYING" file of the
+# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+#
+
+PACKAGE_NAME="vboxhost"
+PACKAGE_VERSION=
+AUTOINSTALL=yes
+
+BUILT_MODULE_NAME[0]="vboxdrv"
+BUILT_MODULE_LOCATION[0]="vboxdrv"
+DEST_MODULE_LOCATION[0]="/kernel/misc"
+
+BUILT_MODULE_NAME[1]="vboxnetflt"
+BUILT_MODULE_LOCATION[1]="vboxnetflt"
+DEST_MODULE_LOCATION[1]="/kernel/misc"
+
+BUILT_MODULE_NAME[2]="vboxnetadp"
+BUILT_MODULE_LOCATION[2]="vboxnetadp"
+DEST_MODULE_LOCATION[2]="/kernel/misc"
+
+BUILT_MODULE_NAME[3]="vboxpci"
+BUILT_MODULE_LOCATION[3]="vboxpci"
+DEST_MODULE_LOCATION[3]="/kernel/misc"
diff --git a/do_dkms b/do_dkms
new file mode 100644
index 00000000000..cc9c7d67605
--- /dev/null
+++ b/do_dkms
@@ -0,0 +1,67 @@
+#!/bin/sh
+
+#
+# Script to register/build/unregister a kernel module with DKMS.
+#
+# Copyright (C) 2010-2015 Oracle Corporation
+#
+# This file is part of VirtualBox Open Source Edition (OSE), as
+# available from http://www.virtualbox.org. This file is free software;
+# you can redistribute it and/or modify it under the terms of the GNU
+# General Public License (GPL) as published by the Free Software
+# Foundation, in version 2 as it comes in the "COPYING" file of the
+# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+#
+
+ACTION=
+if [ "$1" = "install" ]; then
+ ACTION="install"
+ MODULE="$2"
+ VERSION="$3"
+elif [ "$1" = "uninstall" ]; then
+ shift
+ ACTION="uninstall"
+ OLDMODULES="$*"
+ break
+fi
+
+DKMS=`which dkms 2>/dev/null`
+if [ -n "$DKMS" ]
+then
+ if [ "$ACTION" = "uninstall" ]; then
+
+ echo "Uninstalling modules from DKMS"
+ for m in $OLDMODULES
+ do
+ $DKMS status -m $m | while read line
+ # first, remove _any_ old module
+ do
+ if echo "$line" | grep -q added > /dev/null ||
+ echo "$line" | grep -q built > /dev/null ||
+ echo "$line" | grep -q installed > /dev/null; then
+ # either 'vboxvideo, <version>: added'
+ # or 'vboxvideo, <version>, ...: installed'
+ version=`echo "$line" | sed "s/$m,\([^,]*\)[,:].*/\1/;t;d"`
+ echo " removing old DKMS module $m version $version"
+ $DKMS remove -m $m -v $version --all
+ fi
+ done
+ done
+ exit 0
+
+ elif [ "$ACTION" = "install" ]; then
+
+ echo "Attempting to install using DKMS"
+ if $DKMS add -m $MODULE -v $VERSION &&
+ $DKMS build -m $MODULE -v $VERSION &&
+ $DKMS install -m $MODULE -v $VERSION --force
+ then
+ exit 0
+ fi
+ echo "Failed to install using DKMS, attempting to install without"
+
+ fi
+fi
+
+exit 1
diff --git a/vboxweb.conf b/vboxweb.conf
new file mode 100644
index 00000000000..49d82d828ea
--- /dev/null
+++ b/vboxweb.conf
@@ -0,0 +1,11 @@
+# WebService Mandatory Variables
+#VBOXWEB_USER=
+
+# WebService Variables
+#VBOXWEB_LOGFILE=
+#$VBOXWEB_HOST=
+#$VBOXWEB_PORT=
+#$VBOXWEB_TIMEOUT=
+#$VBOXWEB_CHECK_INTERVAL=
+#$VBOXWEB_THREADS=
+#$VBOXWEB_KEEPALIVE=
diff --git a/vboxweb.rc b/vboxweb.rc
new file mode 100644
index 00000000000..97273e3c739
--- /dev/null
+++ b/vboxweb.rc
@@ -0,0 +1,86 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+. /etc/vbox/vbox.cfg
+. /etc/conf.d/vboxweb
+
+BINARY="$INSTALL_DIR/vboxwebsrv"
+
+start() {
+ stat_busy "Starting VirtualBox Web Service";
+ if ! pidof -o %PPID $BINARY >/dev/null; then
+ [[ "$VBOXWEB_USER" ]] || stat_die
+ lsmod | grep -q "vboxdrv[^_-]" || stat_die
+ PARAMS="--background"
+ [[ "$VBOXWEB_HOST" ]] && PARAMS+=" -H $VBOXWEB_HOST"
+ [[ "$VBOXWEB_PORT" ]] && PARAMS+=" -p $VBOXWEB_PORT"
+ [[ "$VBOXWEB_TIMEOUT" ]] && PARAMS+=" -t $VBOXWEB_TIMEOUT"
+ [[ "$VBOXWEB_CHECK_INTERVAL" ]] && PARAMS+=" -i $VBOXWEB_CHECK_INTERVAL"
+ [[ "$VBOXWEB_THREADS" ]] && PARAMS+=" -T $VBOXWEB_THREADS"
+ [[ "$VBOXWEB_KEEPALIVE" ]] && PARAMS+=" -k $VBOXWEB_KEEPALIVE"
+ [[ "$VBOXWEB_LOGFILE" ]] && PARAMS+=" -F $VBOXWEB_LOGFILE"
+ # prevent inheriting this setting to VBoxSVC
+ unset VBOX_RELEASE_LOG_DEST
+ su - $VBOXWEB_USER -c "$BINARY $PARAMS" &>/dev/null
+ # ugly: wait until the final process has forked
+ sleep .2
+ if pidof -o %PPID $BINARY >/dev/null; then
+ add_daemon vboxweb
+ stat_done
+ else
+ stat_die
+ fi
+ else
+ stat_die
+ fi
+}
+
+stop() {
+ stat_busy "Stopping VirtualBox Web Service"
+ PID=$(pidof -o %PPID $BINARY)
+ [[ $PID ]] && kill $PID &>/dev/null
+ if ! pidof -o %PPID $BINARY >/dev/null; then
+ rm_daemon vboxweb
+ stat_done
+ else
+ stat_die
+ fi
+}
+
+restart() {
+ stop && start
+}
+
+status() {
+ stat_busy "Checking for VirtualBox Web Service"
+ if pidof -o %PPID $BINARY >/dev/null; then
+ stat_done
+ else
+ stat_fail
+ false
+ fi
+}
+
+case "$1" in
+start)
+ start
+ ;;
+stop)
+ stop
+ ;;
+restart)
+ restart
+ ;;
+force-reload)
+ restart
+ ;;
+status)
+ status
+ ;;
+*)
+ echo "Usage: $0 {start|stop|restart|status}"
+ exit 1
+esac
+
+# vim:set ts=2 sw=2 ft=sh et:
diff --git a/virtualbox-beta-bin.install b/virtualbox-beta-bin.install
new file mode 100644
index 00000000000..d64b47cbf0d
--- /dev/null
+++ b/virtualbox-beta-bin.install
@@ -0,0 +1,47 @@
+# arg 1: the new package version
+post_install() {
+ # Add vboxusers group, GID 108 is reserved (http://wiki.archlinux.org/index.php/UID_and_GID_list),
+ getent group vboxusers &> /dev/null || groupadd -f -g 108 vboxusers
+
+ # Load new udev rule for module vboxdrv
+ udevadm control --reload-rules
+
+ # Show warnings
+ cat <<EOF
+
+==> Remember to add allowed users to the vboxusers group:
+==> # gpasswd -a USERNAME vboxusers
+EOF
+}
+
+# arg 1: the new package version
+# arg 2: the old package version
+pre_upgrade() {
+ # Remove any stuff remaining from the module compilation
+ rm -Rf "/opt/VirtualBox"
+}
+
+# arg 1: the new package version
+# arg 2: the old package version
+post_upgrade() {
+ post_install "$1"
+ (($(vercmp $2 '4.1.14-2') < 0 )) && cat <<EOF || true
+
+==> **Warning**
+==> This version drop vboxdrv initscript.
+==> Please change to dkms instead of vboxdrv in DAEMONS in rc.conf.
+==>
+EOF
+}
+
+# arg 1: the old package version
+post_remove() {
+ # Remove any stuff remaining from the module compilation
+ rm -Rf "/opt/VirtualBox"
+
+ # Remove any run files
+ rm -Rf "/var/run/VirtualBox"
+
+ # remove vboxusers group
+ groupdel vboxusers &>/dev/null || true
+}