aboutsummaryrefslogtreecommitdiff
path: root/system/virtualbox
diff options
context:
space:
mode:
authorHeinz Wiesinger <pprkut@slackbuilds.org>2021-09-05 15:43:50 +0200
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2021-09-06 08:50:26 +0700
commit6ce5f2e08cc88df07d2f388d0d16b4326f11597c (patch)
treefea614c26134214058150fddb0f2469360b6ab39 /system/virtualbox
parent9300de686f63f12333821b32a46eb75e7b786c09 (diff)
system/virtualbox: Script simplifications and python3 support
This drops two switches for the SlackBuild, HARDENING and HEADLESS. Both of those are gone since the potential benefit is minimal. Upstream has defaulted to hardening enabled pretty much since the very beginning. Every official build has it enabled too and thus also all documentation and bug reports etc. assume it being enabled. If you really want it disabled you can still edit the SlackBuild. Headless adds very little other than resulting in a smaller package and shorter build times. Same as with hardening, if you really want a headless version, you can still edit the SlackBuild. Signed-off-by: Heinz Wiesinger <pprkut@slackbuilds.org> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system/virtualbox')
-rw-r--r--system/virtualbox/README7
-rw-r--r--system/virtualbox/virtualbox.SlackBuild65
2 files changed, 24 insertions, 48 deletions
diff --git a/system/virtualbox/README b/system/virtualbox/README
index f8a9c427e89ac..3a2addeca9c88 100644
--- a/system/virtualbox/README
+++ b/system/virtualbox/README
@@ -1,16 +1,9 @@
VirtualBox Open Source Edition (OSE) is a general-purpose full
virtualizer for x86 hardware.
-By default VirtualBox will be compiled with hardening enabled. That
-means all binaries will be run suid root, which is the default
-behaviour of upstream packages. However, you are still able
-to disable this by passing HARDENING=no to the script.
-
You have to create a vboxusers group, e.g. "groupadd -g 215 vboxusers"
and make your user a member of that group.
-To compile a headless virtualbox pass HEADLESS=yes to the script.
-
To enable the webservice pass WEBSERVICE=yes to the script. This will
require gsoap as optional dependency.
diff --git a/system/virtualbox/virtualbox.SlackBuild b/system/virtualbox/virtualbox.SlackBuild
index dd2b99c1171b1..ddedab4817f1b 100644
--- a/system/virtualbox/virtualbox.SlackBuild
+++ b/system/virtualbox/virtualbox.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/bash
-# Slackware build script for virtualbox-ose
+# Slackware build script for virtualbox
# Copyright 2008-2021 Heinz Wiesinger, Amsterdam, The Netherlands
# Copyright 2008 Mauro Giachero <mauro.giachero@gmail.com>
@@ -12,23 +12,23 @@
# 1. Redistributions of this script must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
-# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
-# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
-# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
-# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=virtualbox
SRCNAM=VirtualBox
VERSION=${VERSION:-6.1.26}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -55,9 +55,6 @@ OUTPUT=${OUTPUT:-/tmp}
# kmk doesn't support MAKEFLAGS, so we use JOBS here
JOBS=${JOBS:-3}
-# Define Variable Names
-gui=""
-
# Check for vboxusers group here
if ! grep ^vboxusers: /etc/group 2>&1 > /dev/null; then
echo " You must have a vboxusers group to run this script."
@@ -65,23 +62,6 @@ if ! grep ^vboxusers: /etc/group 2>&1 > /dev/null; then
exit 1
fi
-# Enable Hardening - Defaulting to yes as requested by upstream
-if [ "${HARDENING:-yes}" = "yes" ]; then
- harden="--enable-hardening"
-else
- harden="--disable-hardening"
-fi
-
-# Support for the Qt & SDL frontends
-if [ "${HEADLESS:-no}" = "no" ]; then
- guiapp="VirtualBox VirtualBoxVM VBoxSDL"
- suidgui="VirtualBoxVM VBoxSDL"
-else
- gui+=" --build-headless"
- guiapp=""
- suidgui=""
-fi
-
# Enable building of java bindings
if [ "${JAVA:-no}" = "no" ]; then
java="--disable-java"
@@ -147,6 +127,9 @@ patch -d src/VBox/Installer/linux -i $CWD/vboxdrv.sh-setup.diff
# Fix wrong path to rdesktop-vrdp-keymaps
patch -p1 -i $CWD/006-rdesktop-vrdp-keymap-path.patch
+# Skip python2 detection
+sed -i 's|python2.7 python2.6 ||' ./configure
+
# Remove gcc version check and fix the qt5 flags
sed -i 's/^check_gcc$/#check_gcc/' ./configure
patch -p1 < $CWD/configure.patch
@@ -159,9 +142,8 @@ sed -i "s|CXX_FLAGS=\"\"|CXX_FLAGS=\"$SLKCFLAGS -std=c++11\"|" ./configure
--enable-vde \
--enable-vnc \
--with-makeself=/usr/bin/echo \
+ --enable-hardening \
$web_service \
- $harden \
- $gui \
$sw_virt \
$java
@@ -217,7 +199,7 @@ cd out/linux.$BUILDDIR/release/bin/
export VBOX_INSTALL_PATH=/usr/lib$LIBDIRSUFFIX/virtualbox
cd sdk/installer
- python ./vboxapisetup.py install --prefix "/usr" --root $PKG
+ python3 ./vboxapisetup.py install --prefix "/usr" --root $PKG
cd -
rm -rf sdk/installer
@@ -232,8 +214,11 @@ cd out/linux.$BUILDDIR/release/bin/
mv $PKG/usr/lib$LIBDIRSUFFIX/virtualbox/VBox.sh $PKG/usr/lib$LIBDIRSUFFIX/virtualbox/VBox
cd $TMP/$SRCNAM-${VERSION}
+# Drop broken symlink
+rm -f $PKG/usr/lib$LIBDIRSUFFIX/virtualbox/components/VBoxREM.so
+
for i in VBoxManage VBoxHeadless VBoxVRDP VBoxBalloonCtrl VBoxBugReport \
- VBoxAutostart $guiapp $vboxwebsrv; do
+ VBoxAutostart VirtualBox VirtualBoxVM VBoxSDL $vboxwebsrv; do
ln -s /usr/lib$LIBDIRSUFFIX/virtualbox/VBox $PKG/usr/bin/$i
done
@@ -256,11 +241,9 @@ if [ "$vboxwebsrv" = "vboxwebsrv" ]; then
sed -i "s/\[ -z \"\$DEBIAN\"/#\[ -z \"\$DEBIAN\"/" $PKG/etc/rc.d/rc.vboxweb-service.new
fi
-if [ "$harden" = "--enable-hardening" ]; then
- for i in VBoxHeadless $suidgui VBoxNetDHCP VBoxNetAdpCtl VBoxNetNAT; do
- chmod 4711 $PKG/usr/lib$LIBDIRSUFFIX/virtualbox/$i
- done
-fi
+for i in VBoxHeadless VirtualBoxVM VBoxSDL VBoxNetDHCP VBoxNetAdpCtl VBoxNetNAT; do
+ chmod 4711 $PKG/usr/lib$LIBDIRSUFFIX/virtualbox/$i
+done
# install headers. Needed by some third party tools
cp -rf include/* $PKG/usr/include/virtualbox/