Commit 9a5f7145 authored by Xuetian Weng's avatar Xuetian Weng

update virtualbox 5.1.2

parent abc47677
# Arch contributor: https://projects.archlinux.org/svntogit/community.git/plain/trunk/PKGBUILD?h=packages/dev86
pkgname=dev86
pkgver=0.16.21
pkgrel=1
pkgdesc="Simple C compiler to generate 8086 code"
arch=('i686' 'x86_64')
url="http://v3.sk/~lkundrak/dev86/"
license=(GPL)
if [ "${CARCH}" == "x86_64" ]; then
depends=('lib32-glibc')
makedepends=('bin86' 'gcc-multilib')
else
makedepends=('bin86')
fi
options=('!libtool' '!strip' '!makeflags' 'staticlibs')
source=(http://v3.sk/~lkundrak/dev86/Dev86src-$pkgver.tar.gz
mandir.patch)
md5sums=('6b96fe9d2d1c546842a4d1c7ef387e4c'
'509df653dec8956faf1a40a8c544d9ce')
prepare() {
cd $srcdir/$pkgname-$pkgver
patch -p1 <$srcdir/mandir.patch
}
build() {
cd $srcdir/$pkgname-$pkgver
make PREFIX=/usr DIST="$pkgdir"
}
package() {
cd $srcdir/$pkgname-$pkgver
mkdir -p $pkgdir/usr/share/man/man1
make install-all DIST="$pkgdir"
# remove all the stuff supplied by bin86
rm $pkgdir/usr/bin/{as,ld,nm,objdump,size}86
rm $pkgdir/usr/share/man/man1/{as,ld}86.1
}
diff -wbBur dev86-0.16.19.org/dis88/Makefile dev86-0.16.19/dis88/Makefile
--- dev86-0.16.19.org/dis88/Makefile 1998-07-31 17:01:40.000000000 +0400
+++ dev86-0.16.19/dis88/Makefile 2012-10-24 14:46:02.684587469 +0400
@@ -38,7 +38,7 @@
install: dis88
install -m 755 -s dis88 $(DIST)$(PREFIX)/bin/dis86
- install -m 644 dis88.1 $(DIST)$(PREFIX)/man/man1/dis86.1
+ install -m 644 dis88.1 $(DIST)$(PREFIX)/share/man/man1/dis86.1
$(OBJ): dis.h a.out.h
diff -wbBur dev86-0.16.19.org/Makefile dev86-0.16.19/Makefile
--- dev86-0.16.19.org/Makefile 2012-08-14 00:10:08.000000000 +0400
+++ dev86-0.16.19/Makefile 2012-10-24 14:45:50.917920191 +0400
@@ -17,7 +17,7 @@
LIBDIR= $(PREFIX)/lib/bcc
INCLDIR= $(PREFIX)/lib/bcc
ASLDDIR= $(BINDIR)
-MANDIR= $(PREFIX)/man
+MANDIR= $(PREFIX)/share/man
CFLAGS= -O
IFDEFNAME= ifdef
diff -wbBur dev86-0.16.19.org/man/Makefile dev86-0.16.19/man/Makefile
--- dev86-0.16.19.org/man/Makefile 1998-07-31 17:03:30.000000000 +0400
+++ dev86-0.16.19/man/Makefile 2012-10-24 14:45:55.494587123 +0400
@@ -1,5 +1,5 @@
-MANDIR=/usr/man
+MANDIR=/usr/share/man
MAN1PG=as86.1 bcc.1 elks.1 elksemu.1 ld86.1
MAN1DIR=$(MANDIR)/man1
This diff is collapsed.
# Arch contributor: https://projects.archlinux.org/svntogit/community.git/plain/trunk/PKGBUILD?h=packages/gsoap
pkgname=gsoap
pkgver=2.8.33
pkgrel=1
pkgdesc="Offers an XML language binding to ease the development of SOAP/XML Web services in C and C/C++"
url="http://www.cs.fsu.edu/~engelen/soap.html"
arch=('i686' 'x86_64')
license=('GPL' 'custom')
depends=('openssl' 'zlib' 'gcc-libs')
makedepends=('autoconf' 'automake')
options=('staticlibs')
source=(http://prdownloads.sourceforge.net/gsoap2/${pkgname}_${pkgver}.zip
LICENSE)
md5sums=('43dade7839252500f7671f8fe6a3739c'
'27aaa3f5166db94d44044c11a7b2c37b')
build() {
cd $srcdir/gsoap-2.8
# needed for programs which use gsoap and have -fPIC enabled
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=353724
export CFLAGS+=" -fPIC"
export CXXFLAGS+=" -fPIC"
./configure --prefix=/usr --enable-openssl
make -j1
}
package() {
cd $srcdir/gsoap-2.8
make DESTDIR=$pkgdir install
mkdir -p $pkgdir/usr/share/gsoap/import
mkdir -p $pkgdir/usr/share/gsoap/WS
cp -R gsoap/import $pkgdir/usr/share/gsoap/
cp -R gsoap/WS $pkgdir/usr/share/gsoap/
install -D ../LICENSE $pkgdir/usr/share/licenses/$pkgname/LICENSE
}
# 2013 © Sébastien Luttringer
--- a/src/VBox/Additions/common/crOpenGL/fakedri_drv.c 2013-09-04 21:03:47.040743507 +0200
+++ b/src/VBox/Additions/common/crOpenGL/fakedri_drv.c 2013-10-20 23:23:49.705371815 +0200
@@ -58,23 +58,8 @@
//#define DEBUG_DRI_CALLS
//@todo this could be different...
-#ifdef RT_ARCH_AMD64
-# ifdef RT_OS_FREEBSD
-# define DRI_DEFAULT_DRIVER_DIR "/usr/local/lib/dri"
-# define DRI_XORG_DRV_DIR "/usr/local/lib/xorg/modules/drivers/"
-# else
-# define DRI_DEFAULT_DRIVER_DIR "/usr/lib64/dri:/usr/lib/dri:/usr/lib/x86_64-linux-gnu/dri:/usr/lib/xorg/modules/dri"
+# define DRI_DEFAULT_DRIVER_DIR "/usr/lib/xorg/modules/dri"
# define DRI_XORG_DRV_DIR "/usr/lib/xorg/modules/drivers/"
-# endif
-#else
-# ifdef RT_OS_FREEBSD
-# define DRI_DEFAULT_DRIVER_DIR "/usr/local/lib/dri"
-# define DRI_XORG_DRV_DIR "/usr/local/lib/xorg/modules/drivers/"
-# else
-# define DRI_DEFAULT_DRIVER_DIR "/usr/lib/dri:/usr/lib/i386-linux-gnu/dri:/usr/lib/xorg/modules/dri"
-# define DRI_XORG_DRV_DIR "/usr/lib/xorg/modules/drivers/"
-# endif
-#endif
#ifdef DEBUG_DRI_CALLS
#define SWDRI_SHOWNAME(pext, func) \
Index: virtualbox/src/VBox/Additions/common/crOpenGL/Makefile.kmk
===================================================================
--- virtualbox.orig/src/VBox/Additions/common/crOpenGL/Makefile.kmk 2015-04-02 15:44:24.955670965 +0200
+++ virtualbox/src/VBox/Additions/common/crOpenGL/Makefile.kmk 2015-04-02 15:44:24.955670965 +0200
@@ -67,18 +67,12 @@
VBoxOGL_INCS = .
if1of ($(KBUILD_TARGET), linux solaris freebsd)
VBoxOGL_INCS += \
- $(VBOX_PATH_X11_ROOT)/libXdamage-1.1 \
- $(VBOX_PATH_X11_ROOT)/libXcomposite-0.4.0 \
- $(VBOX_PATH_X11_ROOT)/libXext-1.3.1 \
- $(VBOX_PATH_X11_ROOT)/libXfixes-4.0.3 \
- $(VBOX_PATH_X11_ROOT)/damageproto-1.1.0 \
- $(VBOX_PATH_X11_ROOT)/compositeproto-0.4 \
- $(VBOX_PATH_X11_ROOT)/fixesproto-4.0 \
- $(VBOX_PATH_X11_ROOT)/libx11-1.1.5-other \
- $(VBOX_PATH_X11_ROOT)/xextproto-7.1.1 \
- $(VBOX_PATH_X11_ROOT)/xproto-7.0.18 \
+ /usr/include/x11 \
+ /usr/include/xorg \
+ /usr/include/pixman-1 \
$(VBOX_MESA_INCS) \
- $(PATH_ROOT)/src/VBox/Additions/x11/x11include/libdrm-2.4.13
+ /usr/include/drm \
+ /usr/include/libdrm
VBoxOGL_DEFS += VBOX_NO_NATIVEGL
endif
@@ -213,10 +207,10 @@
if1of ($(KBUILD_TARGET), linux solaris freebsd)
VBoxOGL_LIBS += \
- $(PATH_STAGE_LIB)/libXcomposite.so \
- $(PATH_STAGE_LIB)/libXdamage.so \
- $(PATH_STAGE_LIB)/libXfixes.so \
- $(PATH_STAGE_LIB)/libXext.so
+ Xcomposite \
+ Xdamage \
+ Xfixes \
+ Xext
ifdef VBoxOGL_FAKEDRI
ifeq ($(KBUILD_TARGET), freebsd)
VBoxOGL_LIBS += \
--- a/src/VBox/Main/webservice/Makefile.kmk 2013-11-21 19:00:46.812761628 +0100
+++ b/src/VBox/Main/webservice/Makefile.kmk 2014-01-04 04:37:05.803599026 +0100
@@ -683,7 +683,7 @@
: $(VBOXWEB_GSOAPH_FROM_GSOAP) $(VBOXWEB_GSOAPH_FROM_XSLT) $(VBOX_NSMAP) $(RECOMPILE_ON_MAKEFILE_CURRENT) | $$(dir $$@)
$(call MSG_GENERATE,,lots of files,$(GSOAPH_RELEVANT))
$(RM) -f $@
- $(REDIRECT) -C $(VBOXWEB_OUT_DIR) -- $(VBOX_SOAPCPP2) $(VBOXWEB_SOAPCPP2_SKIP_FILES) -L -2 -w -I$(VBOX_PATH_GSOAP_IMPORT) $(GSOAPH_RELEVANT)
+ $(REDIRECT) -C $(VBOXWEB_OUT_DIR) -- $(VBOX_SOAPCPP2) $(VBOXWEB_SOAPCPP2_SKIP_FILES) -z1 -L -2 -w -I$(VBOX_PATH_GSOAP_IMPORT) $(GSOAPH_RELEVANT)
$(APPEND) $@ done
# copy the generated headers and stuff. This has to be a separate rule if we
# 2015 © Sébastien Luttringer
--- a/src/VBox/RDP/client-1.8.3/Makefile.kmk 2013-02-19 23:12:20.207464901 +0100
+++ b/src/VBox/RDP/client-1.8.3/Makefile.kmk 2014-01-04 04:17:26.700618600 +0100
@@ -41,7 +41,7 @@
EGD_SOCKET=\"/var/run/egd-pool\" WITH_RDPSND=1 HAVE_DIRENT_H=1 \
HAVE_ICONV=1 HAVE_SYS_STATVFS_H=1 \
HAVE_SYS_PARAM_H=1 HAVE_SYS_MOUNT_H=1 HAVE_STRUCT_STATVFS_F_NAMEMAX=1 \
- KEYMAP_PATH=$(if $(findstring RTPATH_APP_PRIVATE,$(CDEFS)),RTPATH_APP_PRIVATE,\"/opt/VirtualBox\")\"/rdesktop-vrdp-keymaps\" \
+ KEYMAP_PATH=$(if $(findstring RTPATH_APP_PRIVATE,$(CDEFS)),RTPATH_APP_PRIVATE,\"/usr/share/virtualbox\")\"/rdesktop-vrdp-keymaps\" \
RDESKTOP=1
ifdef WITH_BIRD_VD_HACKS
rdesktop-vrdp_DEFS += WITH_BIRD_VD_HACKS
# 2013 © Sébastien Luttringer
--- a/src/VBox/Frontends/VBoxShell/vboxshell.py 2014-01-03 01:38:41.831615590 +0100
+++ b/src/VBox/Frontends/VBoxShell/vboxshell.py 2014-01-04 04:23:33.884544420 +0100
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python2
# -*- coding: utf-8 -*-
# $Id: vboxshell.py 49841 2013-12-09 13:32:33Z vboxsync $
"""
......@@ -6,4 +6,3 @@ SUBSYSTEM=="usb_device", ACTION=="add", RUN+="/usr/share/virtualbox/VBoxCreateUS
SUBSYSTEM=="usb", ACTION=="add", ENV{DEVTYPE}=="usb_device", RUN+="/usr/share/virtualbox/VBoxCreateUSBNode.sh $major $minor $attr{bDeviceClass} vboxusers"
SUBSYSTEM=="usb_device", ACTION=="remove", RUN+="/usr/share/virtualbox/VBoxCreateUSBNode.sh --remove $major $minor"
SUBSYSTEM=="usb", ACTION=="remove", ENV{DEVTYPE}=="usb_device", RUN+="/usr/share/virtualbox/VBoxCreateUSBNode.sh --remove $major $minor"
ACTION=="add", KERNEL=="vboxguest", SUBSYSTEM=="misc", OWNER="root", MODE="0600"
ACTION=="add", KERNEL=="vboxuser", SUBSYSTEM=="misc", OWNER="root", MODE="0666"
# do not build test cases
VBOX_WITH_TESTCASES :=
VBOX_WITH_TESTSUITE :=
VBOX_WITH_VALIDATIONKIT :=
# archlinux path
VBOX_WITH_ORIGIN :=
VBOX_PATH_APP_PRIVATE_ARCH := /usr/lib/virtualbox
VBOX_PATH_SHARED_LIBS := $(VBOX_PATH_APP_PRIVATE_ARCH)
VBOX_WITH_RUNPATH := $(VBOX_PATH_APP_PRIVATE_ARCH)
VBOX_PATH_APP_PRIVATE := /usr/share/virtualbox
VBOX_PATH_APP_DOCS := /usr/share/doc/virtualbox
VBOX_PATH_PACKAGE_DOCS := $(VBOX_PATH_APP_DOCS)
VBOX_BLD_PYTHON = python2
VBOX_JAVA_HOME = /usr/lib/jvm/java-8-openjdk
# do not fail on warning
VBOX_GCC_WERR =
VBOX_GCC_WARN =
# fix gsoap missing zlib include and produce errors with --as-needed
VBOX_GSOAP_CXX_LIBS := gsoapssl++ z
# use system xorg
VBOX_USE_SYSTEM_XORG_HEADERS = 1
# no update request. update are handled via pacman
VBOX_WITH_UPDATE_REQUEST := 0
This diff is collapsed.
VirtualBox PUEL terms and conditions
License version 8, April 19, 2010
ORACLE CORPORATION (“ORACLE”) IS WILLING TO LICENSE THE PRODUCT (AS DEFINED IN § 1 BELOW) TO YOU ONLY UPON THE CONDITION THAT YOU ACCEPT ALL OF THE TERMS CONTAINED IN THIS VIRTUALBOX PERSONAL USE AND EVALUATION LICENSE AGREEMENT (“AGREEMENT”). PLEASE READ THE AGREEMENT CAREFULLY. BY DOWNLOADING OR INSTALLING THIS PRODUCT, YOU ACCEPT THE FULL TERMS OF THIS AGREEMENT.
IF YOU ARE AGREEING TO THIS LICENSE ON BEHALF OF AN ENTITY OTHER THAN AN INDIVIDUAL PERSON, YOU REPRESENT THAT YOU ARE BINDING AND HAVE THE RIGHT TO BIND THE ENTITY TO THE TERMS AND CONDITIONS OF THIS AGREEMENT.
§ 1 Subject of Agreement. “Product”, as referred to in this Agreement, shall be the binary software package “Oracle VM VirtualBox,” which Product allows for creating multiple virtual computers, each with different operating systems (“Guest Computers”), on a physical computer with a specific operating system (“Host Computer”), to allow for installing and executing these Guest Computers simultaneously. The Product consists of executable files in machine code for the Solaris, Windows, Linux, and Mac OS X operating systems as well as other data files as required by the executable files at run-time and documentation in electronic form. The Product includes all documentation and updates provided to You by Oracle under this Agreement and the terms of this Agreement will apply to all such documentation and updates unless a different license is provided with an update or documentation.
§ 2 Grant of license. (1) Oracle grants you a personal, non-exclusive, non-transferable, limited license without fees to reproduce, install, execute, and use internally the Product a Host Computer for your Personal Use, Educational Use, or Evaluation. “Personal Use” requires that you use the Product on the same Host Computer where you installed it yourself and that no more than one client connect to that Host Computer at a time for the purpose of displaying Guest Computers remotely. “Educational use” is any use in an academic institution (schools, colleges and universities, by teachers and students). “Evaluation” means testing the Product for a reasonable period (that is, normally for a few weeks); after expiry of that term, you are no longer permitted to evaluate the Product.
(2) The “VirtualBox Guest Additions” are a set of drivers and utilities that are shipped as a subset of the Product for the purpose of being installed inside a Guest Computer to improve its performance and cooperation with the rest of the Product. In addition to and independent of the rights granted by subsection 1, Oracle allows you to install, execute, copy and redistribute a) unmodified copies of the ISO installation medium of the VirtualBox Guest Additions as shipped with the Product and b) the VirtualBox Guest Additions together with the Guest Computer into which they have been installed.
§ 3 Restrictions and Reservation of Rights. (1) Any use beyond the provisions of § 2 is prohibited. The Product and copies thereof provided to you under this Agreement are copyrighted and licensed, not sold, to you by Oracle. Oracle reserves all copyrights and other intellectual property rights. This includes, but is not limited to, the right to modify, make available or public, rent out, lease, lend or otherwise distribute the Product. This does not apply as far as applicable law may require otherwise or if Oracle grants you additional rights of use in a separate agreement in writing.
(2) You may not do any of the following: (a) modify the Product. However if the documentation accompanying Product lists specific portions of Product, such as header files, class libraries, reference source code, and/or redistributable files, that may be handled differently, you may do so only as provided in the documentation; (b) rent, lease, lend or encumber the Product; (c) remove or alter any proprietary legends or notices contained in the Product; or (d) decompile, or reverse engineer the Product (unless enforcement of this restrictions is prohibited by applicable law).
(3) The Product is not designed, licensed or intended for use in the design, construction, operation or maintenance of any nuclear facility and Oracle and its licensors disclaim any express or implied warranty of fitness for such uses.
(4) No right, title or interest in or to any trademark, service mark, logo or trade name of Oracle or its licensors is granted under this Agreement.
§ 4 Termination. The Agreement is effective on the Date you receive the Product and remains effective until terminated. Your rights under this Agreement will terminate immediately without notice from Oracle if you materially breach it or take any action in derogation of Oracle's and/or its licensors' rights to Product. Oracle may terminate this Agreement should any Product become, or in Oracle's reasonable opinion likely to become, the subject of a claim of intellectual property infringement or trade secret misappropriation. Upon termination, you will cease use of, and destroy, Product and confirm compliance in writing to Oracle. Sections 3-9, inclusive, will survive termination of the Agreement.
§ 5 Disclaimer of Warranty. TO THE EXTENT NOT PROHIBITED BY APPLICABLE LAW, ORACLE PROVIDES THE PRODUCT “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, EXCEPT TO THE EXTENT THAT THESE DISCLAIMERS ARE HELD TO BE LEGALLY INVALID. The entire risk as to the quality and performance of the Product is with you. Should it prove defective, you assume the cost of all necessary servicing, repair, or correction. In addition, Oracle shall be allowed to provide updates to the Product in urgent cases. You are then obliged to install such updates. Such an urgent case includes, but is not limited to, a claim of rights to the Product by a third party.
§ 6 Limitation of Liability. TO THE EXTENT NOT PROHIBITED BY APPLICABLE LAW, IN NO EVENT WILL ORACLE OR ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR SPECIAL, INDIRECT, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF OR RELATED TO THE USE OF OR INABILITY TO USE PRODUCT, EVEN IF ORACLE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. In no event will Oracle's liability to you, whether in contract, tort (including negligence), or otherwise, exceed the amount paid by you for Product under this Agreement. Some states do not allow the exclusion of incidental or consequential damages, so some of the terms above may not be applicable to you.
§ 7 Third Party Code. Portions of Product may be provided with notices and open source licenses from communities and third parties that govern the use of those portions, and any licenses granted hereunder do not alter any rights and obligations You may have under such open source licenses, however, the disclaimer of warranty and limitation of liability provisions in this Agreement will apply to all the Product.
§ 8 Export Regulations. All Product, documents, technical data, and any other materials delivered under this Agreement are subject to U.S. export control laws and may be subject to export or import regulations in other countries. You agree to comply strictly with these laws and regulations and acknowledge that you have the responsibility to obtain any licenses to export, re-export, or import as may be required after delivery to you.
§ 9 U.S. Government Restricted Rights. If Product is being acquired by or on behalf of the U.S. Government or by a U.S. Government prime contractor or subcontractor (at any tier), then the Government's rights in Product and accompanying documentation will be only as set forth in this Agreement; this is in accordance with 48 CFR 227.7201 through 227.7202-4 (for Department of Defense (DOD) acquisitions) and with 48 CFR 2.101 and 12.212 (for non-DOD acquisitions).
§ 10 Miscellaneous. This Agreement is the entire agreement between you and Oracle relating to its subject matter. It supersedes all prior or contemporaneous oral or written communications, proposals, representations and warranties and prevails over any conflicting or additional terms of any quote, order, acknowledgment, or other communication between the parties relating to its subject matter during the term of this Agreement. No modification of this Agreement will be binding, unless in writing and signed by an authorized representative of each party. If any provision of this Agreement is held to be unenforceable, this Agreement will remain in effect with the provision omitted, unless omission would frustrate the intent of the parties, in which case this Agreement will immediately terminate. Course of dealing and other standard business conditions of the parties or the industry shall not apply. This Agreement is governed by the substantive and procedural laws of California and you and Oracle agree to submit to the exclusive jurisdiction of, and venue in, the courts in San Francisco, San Mateo, or Santa Clara counties in California in any dispute arising out of or relating to this Agreement.
--- VirtualBox-5.1.2/configure.orig 2016-07-21 23:15:11.118121629 +0100
+++ VirtualBox-5.1.2/configure 2016-07-21 23:17:07.133529084 +0100
@@ -1691,6 +1691,7 @@
if [ $? -eq 0 ]; then
echo "(Qt5 from pkg-config)" >> $LOG
FLGQT5=`pkg-config Qt5Core --cflags`
+ FLGQT5="-std=gnu++11 $FLGQT5"
INCQT5=`strip_I "$FLGQT5"`
LIBDIR5=`pkg-config Qt5Core --variable=libdir`
LIBQT5=`pkg-config Qt5Core --libs`
# Try to build module if don't exist when calling start
# This variable is automatically set to no when DKMS is in use
START_BUILD=Yes
# Disable use of DKMS
# Elsewhere script try to detect DKMS
DISABLE_DKMS=Yes
#!/bin/bash
# vboxreload: shortcut to reload virtualbox host modules
#
# Copyright © 2016 Sébastien Luttringer
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
(( UID > 0 )) && { echo 'You must be root' >&2; exit 1; }
modules=(vboxnetadp vboxnetflt vboxpci vboxdrv)
echo -n 'Unloading modules: '
for _m in "${modules[@]}"; do
lsmod|grep -q "$_m" && rmmod "$_m" && echo -n "$_m "
done
echo
echo -n 'Loading modules: '
for _m in "${modules[@]}"; do
modprobe "$_m" && echo -n "$_m "
done
echo
# vim:set ts=2 sw=2 ai et:
[Unit]
Description=VirtualBox Guest Service
ConditionVirtualization=oracle
[Service]
ExecStartPre=-/usr/bin/modprobe vboxguest
ExecStartPre=-/usr/bin/modprobe vboxsf
ExecStart=/usr/bin/VBoxService -f
[Install]
WantedBy=multi-user.target
......@@ -3,7 +3,10 @@ Description=VirtualBox Guest Service
ConditionVirtualization=oracle
[Service]
ExecStart=/usr/sbin/VBoxService -f
ExecStartPre=-/usr/bin/modprobe vboxguest
ExecStartPre=-/usr/bin/modprobe vboxvideo
ExecStartPre=-/usr/bin/modprobe vboxsf
ExecStart=/usr/bin/VBoxService -f
[Install]
WantedBy=multi-user.target
#!/bin/bash
. /etc/vbox/vbox.cfg
. /etc/conf.d/vboxdrv
if [ "$EUID" -ne "0" ]; then
echo "Please run this script with root privileges"
exit 0
fi
if [[ -n "$INSTALL_DIR" ]]; then
MODULE_SRC="$INSTALL_DIR/src/vboxhost"
else
echo "Missing /etc/vbox/vbox.cfg"
exit 0
fi
BUILDINTMP="$MODULE_SRC/build_in_tmp"
DODKMS="$MODULE_SRC/do_dkms"
# detection of dkms (if not disabled)
if [[ "$DISABLE_DKMS" =~ [yY][eE][sS] ]]; then
USE_DKMS=0
else
which dkms &>/dev/null
USE_DKMS=$((! $?))
fi
# STARTBUILD cannot be used with dkms
(( USE_DKMS == 1 )) && START_BUILD=no
load() {
if [[ "$START_BUILD" =~ [yY][eE][sS] ]]; then
# check if module exists
c=$('find' "/lib/modules/$(uname -r)" -type f -regex '.*/vbox\(drv\|netadp\|netflt\|pci\).ko' | wc -l)
((c == 0 )) && setup
fi
echo "Loading VirtualBox kernel modules"
# trivial loading
for module in vbox{drv,netadp,netflt,pci}; do
modprobe $module &>/dev/null
done
# check
for module in vbox{drv,netadp,netflt,pci}; do
if ! grep -q "^${module}" /proc/modules; then
echo "Module ${module} could not be loaded"
return 1
fi
done
}
unload() {
echo "Unloading VirtualBox kernel modules"
# trivial unload
for module in vbox{pci,netflt,netadp,drv}; do
if grep -q "^${module}" /proc/modules; then
modprobe -r $module &>/dev/null
fi
done
# check
for module in vbox{pci,drv,netadp,netflt}; do
if grep -q "^${module}" /proc/modules; then
echo "Module ${module} could not be unloaded"
return 1
fi
done
}
remove() {
unload
if (( USE_DKMS == 1 )); then
echo "Removing VirtualBox kernel modules with DKMS"
$DODKMS uninstall vboxhost vboxdrv vboxnetflt vboxnetadp > $LOG
else
echo "Removing VirtualBox kernel modules"
find "/lib/modules/$(uname -r)" -type f -regex '.*/vbox\(pci\|drv\|netadp\|netflt\).ko' -delete
fi
}
setup() {
if (( USE_DKMS == 1 )); then
echo "Trying to register the VirtualBox kernel modules using DKMS"
$DODKMS install vboxhost "$INSTALL_VER" >> $LOG
else
remove
echo "Compiling VirtualBox kernel modules"
LOG="/tmp/vbox-install.log"
if ! $BUILDINTMP \
--save-module-symvers /tmp/vboxdrv-Module.symvers \
--module-source "$MODULE_SRC/vboxdrv" \
--no-print-directory install > $LOG 2>&1; then
echo "Look at $LOG to find out what went wrong"
return 1
fi
if ! $BUILDINTMP \
--use-module-symvers /tmp/vboxdrv-Module.symvers \
--module-source "$MODULE_SRC/vboxnetflt" \
--no-print-directory install >> $LOG 2>&1; then
echo "Look at $LOG to find out what went wrong"
return 1
fi
if ! $BUILDINTMP \
--use-module-symvers /tmp/vboxdrv-Module.symvers \
--module-source "$MODULE_SRC/vboxnetadp" \
--no-print-directory install >> $LOG 2>&1; then
echo "Look at $LOG to find out what went wrong"
return 1
fi
if ! $BUILDINTMP \
--use-module-symvers /tmp/vboxdrv-Module.symvers \
--module-source "$MODULE_SRC/vboxpci" \
--no-print-directory install >> $LOG 2>&1; then
echo "Look at $LOG to find out what went wrong"
return 1
fi
depmod -A
fi
echo -e "\n==> Make sure to load the required modules to use VirtualBox"
}
fixusb() {
# 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
}
case "$1" in
setup)
setup
load
;;
fixusb)
fixusb
;;
remove)
remove
;;
*)
echo "usage: $0 {setup|fixusb}"
esac
[Unit]
Description=Creates the required USB nodes for VirtualBox
Wants=local-fs.target
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/bin/vboxsetup fixusb
[Install]
WantedBy=multi-user.target
# WebService Mandatory Variables
#VBOXWEB_USER=
# WebService Variables
#VBOXWEB_LOGFILE=
#$VBOXWEB_HOST=
#$VBOXWEB_PORT=
#$VBOXWEB_TIMEOUT=
#$VBOXWEB_CHECK_INTERVAL=
#$VBOXWEB_THREADS=
#$VBOXWEB_KEEPALIVE=
post_install () {
VBoxManage extpack install "/usr/share/virtualbox/extensions/Oracle_VM_VirtualBox_Extension_Pack-${1%%-*}.vbox-extpack" >/dev/null
}
pre_upgrade() {
post_remove $*
}
post_upgrade() {
post_install $*
}
post_remove() {
VBoxManage extpack uninstall "Oracle VM VirtualBox Extension Pack" >/dev/null
}
# vim:set ts=2 sw=2 ft=sh et:
#/bin/bash
# arg 1: the new package version
post_install() {
VBoxManage extpack install "/usr/share/virtualbox/extensions/VNC-${1%%-*}.vbox-extpack" >/dev/null
}
# arg 1: the new package version
# arg 2: the old package version
pre_upgrade() {
pre_remove "$2"
}
# arg 1: the new package version
# arg 2: the old package version
post_upgrade() {
post_install "$1"
}
# arg 1: the old package version
pre_remove() {
VBoxManage extpack uninstall 'VNC' >/dev/null
}
# vim:set ts=2 sw=2 ft=sh et:
created_rclocal=0
# arg 1: the new package version
post_install() {
vbox_create_workaround
# Run the VBoxLinuxAdditions Skript
/usr/share/virtualbox/guest-additions/VBoxLinuxAdditions.run
modprobe vboxsf
vbox_remove_workaround
# Show information
/bin/cat <<EOF
==> To start virtualbox guest service automatically, enable and
==> start the service through systemctl:
==> sudo systemctl enable vboxservice.service
==> sudo systemctl start vboxservice.service
EOF
}
# arg 1: the new package version
# arg 2: the old package version
post_upgrade() {
post_install "$1"
}
# arg 1: the old package version
post_remove() {
# ${1%-*} : version without pkgrel (4.2.2)
vbox_create_workaround
/opt/VBoxGuestAdditions-${1%-*}/uninstall.sh
vbox_remove_workaround
groupdel vboxsf >/dev/null 2>&1 || true
}
# Create rc.local file as workaround
vbox_create_workaround() {
# workaround: create /etc/rc.local, if not exists
if [ ! -e /etc/rc.local ]; then
touch /etc/rc.local
created_rclocal=1
fi
}
# Remove rc.local, if we created this file
vbox_remove_workaround() {
# If created_rclocal, remove /etc/rc.local
if [ ${created_rclocal} -eq 1 ]; then
rm -f /etc/rc.local
fi
# Remove rc.vbox* files
rm -f /etc/rc.d/rc.vbox*
}
## @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="vboxguest"
PACKAGE_VERSION=@VERSION@_OSE
AUTOINSTALL=yes
BUILT_MODULE_NAME[0]="vboxguest"
BUILT_MODULE_LOCATION[0]="vboxguest"
DEST_MODULE_LOCATION[0]="/kernel/misc"
BUILT_MODULE_NAME[1]="vboxsf"
BUILT_MODULE_LOCATION[1]="vboxsf"
DEST_MODULE_LOCATION[1]="/kernel/misc"
BUILT_MODULE_NAME[2]="vboxvideo"
BUILT_MODULE_LOCATION[2]="vboxvideo"
DEST_MODULE_LOCATION[2]="/kernel/misc"
#!/bin/bash
# arg 1: the new package version
# arg 2: the old package version
post_upgrade() {
if (( $(vercmp $2 5.0.16-3) < 0 )); then
echo '==> Since version 5.0.16-2 kernel modules are loaded at boot by systemd-modules-load.'
echo '==> Read modules-load.d man page to disable them.'
fi
}
# vim:set ts=2 sw=2 ft=sh et:
#!/bin/bash
# arg 1: the new package version
post_install() {
systemd-sysusers virtualbox-guest-utils.conf
}
# arg 1: the new package version
# arg 2: the old package version
post_upgrade() {
post_install "$1"
# rename /etc/rc.d/vboxservice
if [[ $(vercmp "$2" 4.1.18-3) < 0 ]]; then
echo "==> rc.d vbox-service script was renamed to vboxservice."
fi
# fix gid of vboxsf
if [[ $(vercmp "$2" 4.1.18-4) < 0 ]]; then
groupmod -g 109 vboxsf
fi
return 0
}
# vim:set ts=2 sw=2 ft=sh et:
## @file
# Linux DKMS config script for the VirtualBox guest kernel modules
#