diff options
Diffstat (limited to 'system/virtualbox')
-rw-r--r-- | system/virtualbox/006-rdesktop-vrdp-keymap-path.patch | 4 | ||||
-rw-r--r-- | system/virtualbox/10-virtualbox.rules | 5 | ||||
-rw-r--r-- | system/virtualbox/LocalConfig.kmk | 11 | ||||
-rw-r--r-- | system/virtualbox/README | 12 | ||||
-rw-r--r-- | system/virtualbox/vboxdrv.sh-setup.diff | 642 | ||||
-rw-r--r-- | system/virtualbox/virtualbox-gsoap.patch | 40 | ||||
-rw-r--r-- | system/virtualbox/virtualbox.SlackBuild | 114 | ||||
-rw-r--r-- | system/virtualbox/virtualbox.info | 24 |
8 files changed, 648 insertions, 204 deletions
diff --git a/system/virtualbox/006-rdesktop-vrdp-keymap-path.patch b/system/virtualbox/006-rdesktop-vrdp-keymap-path.patch index 46c72c1ccf..217aa4970b 100644 --- a/system/virtualbox/006-rdesktop-vrdp-keymap-path.patch +++ b/system/virtualbox/006-rdesktop-vrdp-keymap-path.patch @@ -1,6 +1,6 @@ # 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 +--- a/src/VBox/RDP/client-1.8.4/Makefile.kmk 2013-02-19 23:12:20.207464901 +0100 ++++ b/src/VBox/RDP/client-1.8.4/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 \ diff --git a/system/virtualbox/10-virtualbox.rules b/system/virtualbox/10-virtualbox.rules index cdddafb97c..db7ade9e0a 100644 --- a/system/virtualbox/10-virtualbox.rules +++ b/system/virtualbox/10-virtualbox.rules @@ -1,7 +1,8 @@ KERNEL=="vboxdrv", NAME="vboxdrv", OWNER="root", GROUP="vboxusers", MODE="0660" KERNEL=="vboxdrvu", NAME="vboxdrvu", OWNER="root", GROUP="root", MODE="0666" KERNEL=="vboxnetctl", NAME="vboxnetctl", OWNER="root", GROUP="vboxusers", MODE="0660" -SUBSYSTEM=="usb_device", ACTION=="add", RUN+="/usr/share/virtualbox/VBoxCreateUSBNode.sh $major $minor $attr{bDeviceClass}" -SUBSYSTEM=="usb", ACTION=="add", ENV{DEVTYPE}=="usb_device", RUN+="/usr/share/virtualbox/VBoxCreateUSBNode.sh $major $minor $attr{bDeviceClass}" + +SUBSYSTEM=="usb_device", ACTION=="add", RUN+="/usr/share/virtualbox/VBoxCreateUSBNode.sh $major $minor $attr{bDeviceClass} vboxusers" +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" diff --git a/system/virtualbox/LocalConfig.kmk b/system/virtualbox/LocalConfig.kmk index 379c93fb45..8003032c10 100644 --- a/system/virtualbox/LocalConfig.kmk +++ b/system/virtualbox/LocalConfig.kmk @@ -5,6 +5,7 @@ DEFS += RTPATH_APP_PRIVATE=\"/usr/share/virtualbox\" # don't build testcases to save time, they are not needed for the package VBOX_WITH_TESTCASES := VBOX_WITH_TESTSUITE := +VBOX_WITH_VALIDATIONKIT := # don't build guest-additions, they will come in a separate build VBOX_WITHOUT_ADDITIONS := 1 @@ -32,3 +33,13 @@ VBOX_JAVA_HOME := /usr/LIBDIR/java # Do not build docs from source. Depends on texlive... VBOX_WITHOUT_DOCS := 1 + +# Use our CFLAGS +VBOX_GCC_OPT := CXXFLAGS + +# Don't display update requests as we manage updates via packages +VBOX_WITH_UPDATE_REQUEST := + +# Build useful tools linked to testcases +VBOX_WITH_VBOX_IMG := 1 +VBOX_WITH_VBOXIMGMOUNT := 1 diff --git a/system/virtualbox/README b/system/virtualbox/README index f8a9c427e8..9d3e7f6171 100644 --- a/system/virtualbox/README +++ b/system/virtualbox/README @@ -1,21 +1,14 @@ 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. If you want to build the java bindings, pass JAVA=yes to the script. -This will require jdk as optional dependency. +This will require zulu-openjdk8 as optional dependency. On x86_64, this by default builds without software virtualization. This means you need hardware virtualization in order to run 32bit guests on @@ -27,3 +20,6 @@ stock x86_64 system. This switch has no effect on x86 systems. If you want to attach VirtualBox to a VDE network you will need vde2. See README.SLACKWARE for some setup notes. + +Note to 32-bit users: VirtualBox no longer supports 32-bit x86, as of +version 6.0. diff --git a/system/virtualbox/vboxdrv.sh-setup.diff b/system/virtualbox/vboxdrv.sh-setup.diff index 0adf8ec237..80a04aa65e 100644 --- a/system/virtualbox/vboxdrv.sh-setup.diff +++ b/system/virtualbox/vboxdrv.sh-setup.diff @@ -1,93 +1,581 @@ ---- VirtualBox-4.3.4.orig/src/VBox/Installer/linux/vboxdrv.sh.in 2013-11-29 20:24:07.000000000 +0100 -+++ VirtualBox-4.3.4/src/VBox/Installer/linux/vboxdrv.sh.in 2013-12-08 18:08:09.667571974 +0100 -@@ -44,17 +44,13 @@ +--- vboxdrv.sh.orig 2024-02-28 15:40:56.680861821 +0100 ++++ vboxdrv.sh 2024-02-28 15:47:52.417842405 +0100 +@@ -45,39 +45,13 @@ + MODPROBE="$MODPROBE --allow-unsupported-modules" + fi + +-setup_log() +-{ +- test -n "${LOG}" && return 0 +- # Rotate log files +- LOG="/var/log/vbox-setup.log" +- mv "${LOG}.3" "${LOG}.4" 2>/dev/null +- mv "${LOG}.2" "${LOG}.3" 2>/dev/null +- mv "${LOG}.1" "${LOG}.2" 2>/dev/null +- mv "${LOG}" "${LOG}.1" 2>/dev/null +-} +- + [ -f /etc/vbox/vbox.cfg ] && . /etc/vbox/vbox.cfg + export VBOX_KBUILD_TYPE + export USERNAME + export USER=$USERNAME - if [ -n "$INSTALL_DIR" ]; then - VBOXMANAGE="$INSTALL_DIR/VBoxManage" -- MODULE_SRC="$INSTALL_DIR/src/vboxhost" - else - VBOXMANAGE="/usr/lib/virtualbox/VBoxManage" +-if test -n "${INSTALL_DIR}" && test -x "${INSTALL_DIR}/VirtualBox"; then +- MODULE_SRC="${INSTALL_DIR}/src/vboxhost" +-elif test -x /usr/lib/virtualbox/VirtualBox; then +- INSTALL_DIR=/usr/lib/virtualbox - MODULE_SRC="/usr/share/virtualbox/src/vboxhost" - fi --BUILDINTMP="$MODULE_SRC/build_in_tmp" --DODKMS="$MODULE_SRC/do_dkms" +-elif test -x "${SCRIPT_DIR}/VirtualBox"; then +- # Executing from the build directory +- INSTALL_DIR="${SCRIPT_DIR}" +- MODULE_SRC="${INSTALL_DIR}/src" +-else +- # Silently exit if the package was uninstalled but not purged. +- # Applies to Debian packages only (but shouldn't hurt elsewhere) +- exit 0 +-fi + VIRTUALBOX="${INSTALL_DIR}/VirtualBox" + VBOXMANAGE="${INSTALL_DIR}/VBoxManage" +-BUILDINTMP="${MODULE_SRC}/build_in_tmp" + if test -u "${VIRTUALBOX}"; then + GROUP=root + DEVICE_MODE=0600 +@@ -173,333 +147,12 @@ + lsmod | grep -q "$1[^_-]" + } + +-log() +-{ +- setup_log +- echo "${1}" >> "${LOG}" +-} +- +-module_build_log() +-{ +- setup_log +- echo "${1}" | egrep -v \ +- "^test -e include/generated/autoconf.h|^echo >&2|^/bin/false\)$" \ +- >> "${LOG}" +-} +- + # Detect VirtualBox version info or report error. + VBOX_VERSION="`"$VBOXMANAGE" -v | cut -d r -f1`" + [ -n "$VBOX_VERSION" ] || failure 'Cannot detect VirtualBox version number' + VBOX_REVISION="r`"$VBOXMANAGE" -v | cut -d r -f2`" + [ "$VBOX_REVISION" != "r" ] || failure 'Cannot detect VirtualBox revision number' + +-## Output the vboxdrv part of our udev rule. This is redirected to the right file. +-udev_write_vboxdrv() { +- VBOXDRV_GRP="$1" +- VBOXDRV_MODE="$2" +- +- echo "KERNEL==\"vboxdrv\", NAME=\"vboxdrv\", OWNER=\"root\", GROUP=\"$VBOXDRV_GRP\", MODE=\"$VBOXDRV_MODE\"" +- echo "KERNEL==\"vboxdrvu\", NAME=\"vboxdrvu\", OWNER=\"root\", GROUP=\"root\", MODE=\"0666\"" +- echo "KERNEL==\"vboxnetctl\", NAME=\"vboxnetctl\", OWNER=\"root\", GROUP=\"$VBOXDRV_GRP\", MODE=\"$VBOXDRV_MODE\"" +-} +- +-## Output the USB part of our udev rule. This is redirected to the right file. +-udev_write_usb() { +- INSTALLATION_DIR="$1" +- USB_GROUP="$2" +- +- echo "SUBSYSTEM==\"usb_device\", ACTION==\"add\", RUN+=\"$INSTALLATION_DIR/VBoxCreateUSBNode.sh \$major \$minor \$attr{bDeviceClass}${USB_GROUP}\"" +- echo "SUBSYSTEM==\"usb\", ACTION==\"add\", ENV{DEVTYPE}==\"usb_device\", RUN+=\"$INSTALLATION_DIR/VBoxCreateUSBNode.sh \$major \$minor \$attr{bDeviceClass}${USB_GROUP}\"" +- echo "SUBSYSTEM==\"usb_device\", ACTION==\"remove\", RUN+=\"$INSTALLATION_DIR/VBoxCreateUSBNode.sh --remove \$major \$minor\"" +- echo "SUBSYSTEM==\"usb\", ACTION==\"remove\", ENV{DEVTYPE}==\"usb_device\", RUN+=\"$INSTALLATION_DIR/VBoxCreateUSBNode.sh --remove \$major \$minor\"" +-} +- +-## Generate our udev rule file. This takes a change in udev rule syntax in +-## version 55 into account. It only creates rules for USB for udev versions +-## recent enough to support USB device nodes. +-generate_udev_rule() { +- VBOXDRV_GRP="$1" # The group owning the vboxdrv device +- VBOXDRV_MODE="$2" # The access mode for the vboxdrv device +- INSTALLATION_DIR="$3" # The directory VirtualBox is installed in +- USB_GROUP="$4" # The group that has permission to access USB devices +- NO_INSTALL="$5" # Set this to "1" to remove but not re-install rules +- +- # Extra space! +- case "$USB_GROUP" in ?*) USB_GROUP=" $USB_GROUP" ;; esac +- case "$NO_INSTALL" in "1") return ;; esac +- udev_write_vboxdrv "$VBOXDRV_GRP" "$VBOXDRV_MODE" +- udev_write_usb "$INSTALLATION_DIR" "$USB_GROUP" +-} +- +-## Install udev rule (disable with INSTALL_NO_UDEV=1 in +-## /etc/default/virtualbox). +-install_udev() { +- VBOXDRV_GRP="$1" # The group owning the vboxdrv device +- VBOXDRV_MODE="$2" # The access mode for the vboxdrv device +- INSTALLATION_DIR="$3" # The directory VirtualBox is installed in +- USB_GROUP="$4" # The group that has permission to access USB devices +- NO_INSTALL="$5" # Set this to "1" to remove but not re-install rules +- +- if test -d /etc/udev/rules.d; then +- generate_udev_rule "$VBOXDRV_GRP" "$VBOXDRV_MODE" "$INSTALLATION_DIR" \ +- "$USB_GROUP" "$NO_INSTALL" +- fi +- # Remove old udev description file +- rm -f /etc/udev/rules.d/10-vboxdrv.rules 2> /dev/null +-} +- +-## Create a usb device node for a given sysfs path to a USB device. +-install_create_usb_node_for_sysfs() { +- path="$1" # sysfs path for the device +- usb_createnode="$2" # Path to the USB device node creation script +- usb_group="$3" # The group to give ownership of the node to +- if test -r "${path}/dev"; then +- dev="`cat "${path}/dev" 2> /dev/null`" +- major="`expr "$dev" : '\(.*\):' 2> /dev/null`" +- minor="`expr "$dev" : '.*:\(.*\)' 2> /dev/null`" +- class="`cat ${path}/bDeviceClass 2> /dev/null`" +- sh "${usb_createnode}" "$major" "$minor" "$class" \ +- "${usb_group}" 2>/dev/null +- fi +-} +- +-udev_rule_file=/etc/udev/rules.d/60-vboxdrv.rules +-sysfs_usb_devices="/sys/bus/usb/devices/*" +- +-## Install udev rules and create device nodes for usb access +-setup_usb() { +- VBOXDRV_GRP="$1" # The group that should own /dev/vboxdrv +- VBOXDRV_MODE="$2" # The mode to be used for /dev/vboxdrv +- INSTALLATION_DIR="$3" # The directory VirtualBox is installed in +- USB_GROUP="$4" # The group that should own the /dev/vboxusb device +- # nodes unless INSTALL_NO_GROUP=1 in +- # /etc/default/virtualbox. Optional. +- usb_createnode="$INSTALLATION_DIR/VBoxCreateUSBNode.sh" +- # install udev rule (disable with INSTALL_NO_UDEV=1 in +- # /etc/default/virtualbox) +- if [ "$INSTALL_NO_GROUP" != "1" ]; then +- usb_group=$USB_GROUP +- vboxdrv_group=$VBOXDRV_GRP +- else +- usb_group=root +- vboxdrv_group=root +- fi +- install_udev "${vboxdrv_group}" "$VBOXDRV_MODE" \ +- "$INSTALLATION_DIR" "${usb_group}" \ +- "$INSTALL_NO_UDEV" > ${udev_rule_file} +- # Build our device tree +- for i in ${sysfs_usb_devices}; do # This line intentionally without quotes. +- install_create_usb_node_for_sysfs "$i" "${usb_createnode}" \ +- "${usb_group}" +- done +-} +- +-cleanup_usb() +-{ +- # Remove udev description file +- rm -f /etc/udev/rules.d/60-vboxdrv.rules +- rm -f /etc/udev/rules.d/10-vboxdrv.rules +- +- # Remove our USB device tree +- rm -rf /dev/vboxusb +-} +- +-# Returns path to module file as seen by modinfo(8) or empty string. +-module_path() +-{ +- mod="$1" +- [ -n "$mod" ] || return +- +- modinfo "$mod" 2>/dev/null | grep -e "^filename:" | tr -s ' ' | cut -d " " -f2 +-} +- +-# Returns module version if module is available or empty string. +-module_version() +-{ +- mod="$1" +- [ -n "$mod" ] || return +- +- modinfo "$mod" 2>/dev/null | grep -e "^version:" | tr -s ' ' | cut -d " " -f2 +-} +- +-# Returns module revision if module is available in the system or empty string. +-module_revision() +-{ +- mod="$1" +- [ -n "$mod" ] || return +- +- modinfo "$mod" 2>/dev/null | grep -e "^version:" | tr -s ' ' | cut -d " " -f3 +-} +- +-# Reads kernel configuration option. +-kernel_get_config_opt() +-{ +- opt_name="$1" +- [ -n "$opt_name" ] || return +- +- # Check if there is a kernel tool which can extract config option. +- if test -x /lib/modules/"$KERN_VER"/build/scripts/config; then +- /lib/modules/"$KERN_VER"/build/scripts/config \ +- --file /lib/modules/"$KERN_VER"/build/.config \ +- --state "$opt_name" 2>/dev/null +- elif test -f /lib/modules/"$KERN_VER"/build/.config; then +- # Extract config option manually. +- grep "$opt_name=" /lib/modules/"$KERN_VER"/build/.config | sed -e "s/^$opt_name=//" -e "s/\"//g" +- fi +-} +- +-# Reads CONFIG_MODULE_SIG_HASH from kernel config. +-kernel_module_sig_hash() +-{ +- kernel_get_config_opt "CONFIG_MODULE_SIG_HASH" +-} +- +-# Returns "1" if kernel module signature hash algorithm +-# is supported by us. Or empty string otherwise. +-module_sig_hash_supported() +-{ +- sig_hashalgo="$1" +- [ -n "$sig_hashalgo" ] || return +- +- # Go through supported list. +- [ "$sig_hashalgo" = "sha1" \ +- -o "$sig_hashalgo" = "sha224" \ +- -o "$sig_hashalgo" = "sha256" \ +- -o "$sig_hashalgo" = "sha384" \ +- -o "$sig_hashalgo" = "sha512" ] || return +- +- echo "1" +-} +- +-# Check if kernel configuration requires modules signature. +-kernel_requires_module_signature() +-{ +- vbox_sys_lockdown_path="/sys/kernel/security/lockdown" +- +- requires="" +- # We consider that if kernel is running in the following configurations, +- # it will require modules to be signed. +- if [ "$(kernel_get_config_opt "CONFIG_MODULE_SIG")" = "y" ]; then +- +- # Modules signature verification is hardcoded in kernel config. +- [ "$(kernel_get_config_opt "CONFIG_MODULE_SIG_FORCE")" = "y" ] && requires="1" +- +- # Unsigned modules loading is restricted by "lockdown" feature in runtime. +- if [ "$(kernel_get_config_opt "CONFIG_LOCK_DOWN_KERNEL")" = "y" \ +- -o "$(kernel_get_config_opt "CONFIG_SECURITY_LOCKDOWN_LSM")" = "y" \ +- -o "$(kernel_get_config_opt "CONFIG_SECURITY_LOCKDOWN_LSM_EARLY")" = "y" ]; then +- +- # Once lockdown level is set to something different than "none" (e.g., "integrity" +- # or "confidentiality"), kernel will reject unsigned modules loading. +- if [ -r "$vbox_sys_lockdown_path" ]; then +- [ -n "$(cat "$vbox_sys_lockdown_path" | grep "\[integrity\]")" ] && requires="1" +- [ -n "$(cat "$vbox_sys_lockdown_path" | grep "\[confidentiality\]")" ] && requires="1" +- fi +- +- # This configuration is used by a number of modern Linux distributions and restricts +- # unsigned modules loading when Secure Boot mode is enabled. +- [ "$(kernel_get_config_opt "CONFIG_LOCK_DOWN_IN_EFI_SECURE_BOOT")" = "y" -a -n "$HAVE_SEC_BOOT" ] && requires="1" +- fi +- fi +- +- [ -n "$requires" ] && echo "1" +-} +- +-# Returns "1" if module is signed and signature can be verified +-# with public key provided in DEB_PUB_KEY. Or empty string otherwise. +-module_signed() +-{ +- mod="$1" +- [ -n "$mod" ] || return +- +- extraction_tool=/lib/modules/"$(uname -r)"/build/scripts/extract-module-sig.pl +- mod_path=$(module_path "$mod" 2>/dev/null) +- openssl_tool=$(which openssl 2>/dev/null) +- # Do not use built-in printf! +- printf_tool=$(which printf 2>/dev/null) +- +- # Make sure all the tools required for signature validation are available. +- [ -x "$extraction_tool" ] || return +- [ -n "$mod_path" ] || return +- [ -n "$openssl_tool" ] || return +- [ -n "$printf_tool" ] || return +- +- # Make sure openssl can handle hash algorithm. +- sig_hashalgo=$(modinfo -F sig_hashalgo "$mod" 2>/dev/null) +- [ "$(module_sig_hash_supported $sig_hashalgo)" = "1" ] || return +- +- # Generate file names for temporary stuff. +- mod_pub_key=$(mktemp -u) +- mod_signature=$(mktemp -u) +- mod_unsigned=$(mktemp -u) +- +- # Convert public key in DER format into X509 certificate form. +- "$openssl_tool" x509 -pubkey -inform DER -in "$DEB_PUB_KEY" -out "$mod_pub_key" 2>/dev/null +- # Extract raw module signature and convert it into binary format. +- "$printf_tool" \\x$(modinfo -F signature "$mod" | sed -z 's/[ \t\n]//g' | sed -e "s/:/\\\x/g") 2>/dev/null > "$mod_signature" +- # Extract unsigned module for further digest calculation. +- "$extraction_tool" -0 "$mod_path" 2>/dev/null > "$mod_unsigned" +- +- # Verify signature. +- rc="" +- "$openssl_tool" dgst "-$sig_hashalgo" -binary -verify "$mod_pub_key" -signature "$mod_signature" "$mod_unsigned" 2>&1 >/dev/null && rc="1" +- # Clean up. +- rm -f $mod_pub_key $mod_signature $mod_unsigned +- +- # Check result. +- [ "$rc" = "1" ] || return +- +- echo "1" +-} +- +-# Returns "1" if externally built module is available in the system and its +-# version and revision number do match to current VirtualBox installation. +-# Or empty string otherwise. +-module_available() +-{ +- mod="$1" +- [ -n "$mod" ] || return +- +- [ "$VBOX_VERSION" = "$(module_version "$mod")" ] || return +- [ "$VBOX_REVISION" = "$(module_revision "$mod")" ] || return +- +- # Check if module belongs to VirtualBox installation. +- # +- # We have a convention that only modules from /lib/modules/*/misc +- # belong to us. Modules from other locations are treated as +- # externally built. +- mod_path="$(module_path "$mod")" +- +- # If module path points to a symbolic link, resolve actual file location. +- [ -L "$mod_path" ] && mod_path="$(readlink -e -- "$mod_path")" +- +- # File exists? +- [ -f "$mod_path" ] || return +- +- # Extract last component of module path and check whether it is located +- # outside of /lib/modules/*/misc. +- mod_dir="$(dirname "$mod_path" | sed 's;^.*/;;')" +- [ "$mod_dir" = "misc" ] || return +- +- # In case if kernel configuration requires module signature, check if module is signed. +- if test "$(kernel_requires_module_signature)" = "1"; then +- [ "$(module_signed "$mod")" = "1" ] || return +- fi +- +- echo "1" +-} +- +-# Check if required modules are installed in the system and versions match. +-setup_complete() +-{ +- [ "$(module_available vboxdrv)" = "1" ] || return +- [ "$(module_available vboxnetflt)" = "1" ] || return +- [ "$(module_available vboxnetadp)" = "1" ] || return +- +- # All modules are in place. +- echo "1" +-} +- + start() + { + begin_msg "Starting VirtualBox services" console +@@ -518,9 +171,6 @@ + + if ! running vboxdrv; then - # silently exit if the package was uninstalled but not purged, - # applies to Debian packages only (but shouldn't hurt elsewhere) --[ ! -f /etc/debian_release -o -x $VBOXMANAGE -a -x $BUILDINTMP ] || exit 0 -+[ ! -f /etc/debian_release -o -x $VBOXMANAGE ] || exit 0 +- # Check if system already has matching modules installed. +- [ "$(setup_complete)" = "1" ] || setup +- + if ! rm -f $DEVICE; then + failure "Cannot remove $DEVICE" + fi +@@ -572,8 +222,6 @@ + mkdir -p -m 0750 /dev/vboxusb 2>/dev/null + chown root:vboxusers /dev/vboxusb 2>/dev/null + fi +- # Remove any kernel modules left over from previously installed kernels. +- cleanup only_old + succ_msg "VirtualBox services started" + } + +@@ -654,153 +302,10 @@ + fi + } - if [ -n "$NOLSB" ]; then - if [ -f /etc/redhat-release ]; then -@@ -295,70 +291,7 @@ +-cleanup() +-{ +- # If this is set, only remove kernel modules for no longer installed +- # kernels. Note that only generated kernel modules should be placed +- # in /lib/modules/*/misc. Anything that we should not remove automatically +- # should go elsewhere. +- only_old="${1}" +- for i in /lib/modules/*; do +- # Check whether we are only cleaning up for uninstalled kernels. +- test -n "${only_old}" && test -e "${i}/kernel/drivers" && continue +- +- unset do_update +- for j in $MODULE_LIST; do +- for mod_ext in ko ko.gz ko.xz ko.zst; do +- test -f "${i}/misc/${j}.${mod_ext}" && do_update=1 && rm -f "${i}/misc/${j}.${mod_ext}" +- done +- done +- +- # Trigger depmod(8) only in case if directory content was modified +- # and save a bit of run time. +- test -n "$do_update" && depmod -a "$(basename "$i")" && sync +- +- # Remove the kernel version folder if it was empty except for us. +- test "`echo ${i}/misc/* ${i}/misc/.?* ${i}/* ${i}/.?*`" \ +- = "${i}/misc/* ${i}/misc/.. ${i}/misc ${i}/.." && +- rmdir "${i}/misc" "${i}" # We used to leave empty folders. +- done +-} +- # setup_script setup() { -- stop -- DKMS=`which dkms 2>/dev/null` -- if [ -n "$DKMS" ]; then -- begin_msg "Uninstalling old VirtualBox DKMS kernel modules" -- $DODKMS uninstall vboxhost vboxdrv vboxnetflt vboxnetadp > $LOG -- succ_msg +- begin_msg "Building VirtualBox kernel modules" console +- log "Building the main VirtualBox module." +- +- # Detect if kernel was built with clang. +- unset LLVM +- vbox_cc_is_clang=$(kernel_get_config_opt "CONFIG_CC_IS_CLANG") +- if test "${vbox_cc_is_clang}" = "y"; then +- log "Using clang compiler." +- export LLVM=1 - fi -- if find /lib/modules/`uname -r` -name "vboxpci\.*" 2>/dev/null|grep -q vboxpci; then -- begin_msg "Removing old VirtualBox pci kernel module" -- find /lib/modules/`uname -r` -name "vboxpci\.*" 2>/dev/null|xargs rm -f 2>/dev/null -- succ_msg -- fi -- if find /lib/modules/`uname -r` -name "vboxnetadp\.*" 2>/dev/null|grep -q vboxnetadp; then -- begin_msg "Removing old VirtualBox netadp kernel module" -- find /lib/modules/`uname -r` -name "vboxnetadp\.*" 2>/dev/null|xargs rm -f 2>/dev/null -- succ_msg -- fi -- if find /lib/modules/`uname -r` -name "vboxnetflt\.*" 2>/dev/null|grep -q vboxnetflt; then -- begin_msg "Removing old VirtualBox netflt kernel module" -- find /lib/modules/`uname -r` -name "vboxnetflt\.*" 2>/dev/null|xargs rm -f 2>/dev/null -- succ_msg -- fi -- if find /lib/modules/`uname -r` -name "vboxdrv\.*" 2>/dev/null|grep -q vboxdrv; then -- begin_msg "Removing old VirtualBox kernel module" -- find /lib/modules/`uname -r` -name "vboxdrv\.*" 2>/dev/null|xargs rm -f 2>/dev/null -- succ_msg +- +- if ! myerr=`$BUILDINTMP \ +- --save-module-symvers /tmp/vboxdrv-Module.symvers \ +- --module-source "$MODULE_SRC/vboxdrv" \ +- --no-print-directory install 2>&1`; then +- "${INSTALL_DIR}/check_module_dependencies.sh" || exit 1 +- log "Error building the module:" +- module_build_log "$myerr" +- failure "Look at $LOG to find out what went wrong" - fi -- if [ -n "$DKMS" ]; then -- begin_msg "Trying to register the VirtualBox kernel modules using DKMS" -- if ! $DODKMS install vboxhost $VERSION >> $LOG; then -- fail_msg "Failed, trying without DKMS" -- DKMS="" -- fi +- log "Building the net filter module." +- if ! myerr=`$BUILDINTMP \ +- --use-module-symvers /tmp/vboxdrv-Module.symvers \ +- --module-source "$MODULE_SRC/vboxnetflt" \ +- --no-print-directory install 2>&1`; then +- log "Error building the module:" +- module_build_log "$myerr" +- failure "Look at $LOG to find out what went wrong" - fi -- if [ -z "$DKMS" ]; then -- begin_msg "Recompiling VirtualBox kernel modules" -- if ! $BUILDINTMP \ -- --save-module-symvers /tmp/vboxdrv-Module.symvers \ -- --module-source "$MODULE_SRC/vboxdrv" \ -- --no-print-directory install >> $LOG 2>&1; then -- failure "Look at $LOG to find out what went wrong" -- fi -- if ! $BUILDINTMP \ -- --use-module-symvers /tmp/vboxdrv-Module.symvers \ -- --module-source "$MODULE_SRC/vboxnetflt" \ -- --no-print-directory install >> $LOG 2>&1; then -- failure "Look at $LOG to find out what went wrong" -- fi -- if ! $BUILDINTMP \ -- --use-module-symvers /tmp/vboxdrv-Module.symvers \ -- --module-source "$MODULE_SRC/vboxnetadp" \ -- --no-print-directory install >> $LOG 2>&1; then -- failure "Look at $LOG to find out what went wrong" -- fi -- if ! $BUILDINTMP \ -- --use-module-symvers /tmp/vboxdrv-Module.symvers \ -- --module-source "$MODULE_SRC/vboxpci" \ -- --no-print-directory install >> $LOG 2>&1; then -- failure "Look at $LOG to find out what went wrong" -- fi +- log "Building the net adapter module." +- if ! myerr=`$BUILDINTMP \ +- --use-module-symvers /tmp/vboxdrv-Module.symvers \ +- --module-source "$MODULE_SRC/vboxnetadp" \ +- --no-print-directory install 2>&1`; then +- log "Error building the module:" +- module_build_log "$myerr" +- failure "Look at $LOG to find out what went wrong" +- fi +- if test -e "$MODULE_SRC/vboxpci"; then +- log "Building the PCI pass-through module." +- if ! myerr=`$BUILDINTMP \ +- --use-module-symvers /tmp/vboxdrv-Module.symvers \ +- --module-source "$MODULE_SRC/vboxpci" \ +- --no-print-directory install 2>&1`; then +- log "Error building the module:" +- module_build_log "$myerr" +- failure "Look at $LOG to find out what went wrong" +- fi - fi - rm -f /etc/vbox/module_not_compiled -- succ_msg -- start +- depmod -a +- sync +- succ_msg "VirtualBox kernel modules built" +- +- # Sign kernel modules if kernel configuration requires it. +- if test "$(kernel_requires_module_signature)" = "1"; then +- begin_msg "Signing VirtualBox kernel modules" console +- +- # Generate new signing key if needed. +- [ -n "$HAVE_UPDATE_SECUREBOOT_POLICY_TOOL" ] && SHIM_NOTRIGGER=y update-secureboot-policy --new-key +- +- # Check if signing keys are in place. +- if test ! -f "$DEB_PUB_KEY" || ! test -f "$DEB_PRIV_KEY"; then +- # update-secureboot-policy tool present in the system, but keys were not generated. +- [ -n "$HAVE_UPDATE_SECUREBOOT_POLICY_TOOL" ] && fail_msg " +- +-update-secureboot-policy tool does not generate signing keys +-in your distribution, see below on how to generate them manually +-" +- +- # update-secureboot-policy not present in the system, recommend generate keys manually. +- failure " +- +-System is running in Secure Boot mode, however your distribution +-does not provide tools for automatic generation of keys needed for +-modules signing. Please consider to generate and enroll them manually: +- +- sudo mkdir -p /var/lib/shim-signed/mok +- sudo openssl req -nodes -new -x509 -newkey rsa:2048 -outform DER -addext \"extendedKeyUsage=codeSigning\" -keyout $DEB_PRIV_KEY -out $DEB_PUB_KEY +- sudo mokutil --import $DEB_PUB_KEY +- sudo reboot +- +-Restart \"rcvboxdrv setup\" after system is rebooted +-" +- fi +- +- # Check if signing tool is available. +- [ -n "$SIGN_TOOL" ] || failure "Unable to find signing tool" +- +- # Get kernel signature hash algorithm from kernel config and validate it. +- sig_hashalgo=$(kernel_module_sig_hash) +- [ "$(module_sig_hash_supported $sig_hashalgo)" = "1" ] \ +- || failure "Unsupported kernel signature hash algorithm $sig_hashalgo" +- +- # Sign modules. +- for i in $MODULE_LIST; do +- "$SIGN_TOOL" "$sig_hashalgo" "$DEB_PRIV_KEY" "$DEB_PUB_KEY" \ +- /lib/modules/"$KERN_VER"/misc/"$i".ko 2>/dev/null || failure "Unable to sign $i.ko" +- done +- +- # Enroll signing key if needed. +- if test -n "$HAVE_UPDATE_SECUREBOOT_POLICY_TOOL"; then +- # update-secureboot-policy "expects" DKMS modules. +- # Work around this and talk to the authors as soon +- # as possible to fix it. +- mkdir -p /var/lib/dkms/vbox-temp +- update-secureboot-policy --enroll-key 2>/dev/null || +- begin_msg "Failed to enroll secure boot key." console +- rmdir -p /var/lib/dkms/vbox-temp 2>/dev/null +- +- # Indicate that key has been enrolled and reboot is needed. +- HAVE_DEB_KEY=true +- fi +- succ_msg "Signing completed" +- fi + echo "Not implemented! Please use the virtualbox-kernel.SlackBuild available at SlackBuilds.org instead." } dmnstatus() +@@ -850,20 +355,7 @@ + stop && start + ;; + setup) +- test -n "${2}" && export KERN_VER="${2}" +- # Create udev rule and USB device nodes. +- ## todo Wouldn't it make more sense to install the rule to /lib/udev? This +- ## is not a user-created configuration file after all. +- ## todo Do we need a udev rule to create /dev/vboxdrv[u] at all? We have +- ## working fall-back code here anyway, and the "right" code is more complex +- ## than the fall-back. Unnecessary duplication? +- stop && cleanup +- setup_usb "$GROUP" "$DEVICE_MODE" "$INSTALL_DIR" +- start +- ;; +-cleanup) +- stop && cleanup +- cleanup_usb ++ setup + ;; + force-reload) + stop +@@ -873,7 +365,7 @@ + dmnstatus + ;; + *) +- echo "Usage: $0 {start|stop|stop_vms|restart|setup|cleanup|force-reload|status}" ++ echo "Usage: $0 {start|stop|stop_vms|restart|setup|force-reload|status}" + exit 1 + esac + diff --git a/system/virtualbox/virtualbox-gsoap.patch b/system/virtualbox/virtualbox-gsoap.patch deleted file mode 100644 index a8ba6f549c..0000000000 --- a/system/virtualbox/virtualbox-gsoap.patch +++ /dev/null @@ -1,40 +0,0 @@ -diff -u -r VirtualBox-5.0.10.orig/src/VBox/Main/webservice/Makefile.kmk VirtualBox-5.0.10/src/VBox/Main/webservice/Makefile.kmk ---- VirtualBox-5.0.10.orig/src/VBox/Main/webservice/Makefile.kmk 2015-11-10 18:06:29.000000000 +0100 -+++ VirtualBox-5.0.10/src/VBox/Main/webservice/Makefile.kmk 2015-11-22 09:58:21.669118291 +0100 -@@ -159,7 +159,6 @@ - RECOMPILE_ON_MAKEFILE_CURRENT := $(MAKEFILE_CURRENT) - - PATH_TARGET_SOAPDEMOXML := $(VBOXWEB_OUT_DIR)/demo_soapxml --PATH_TARGET_SOAPDEMOHEADERS := $(VBOXWEB_OUT_DIR)/demo_headers - PATH_TARGET_SOAPDEMONSMAPS := $(VBOXWEB_OUT_DIR)/demo_namespacemaps - PATH_TARGET_WEBTEST := $(VBOXWEB_OUT_DIR)/webtest - -@@ -515,8 +514,6 @@ - $(VBOXWEB_OUT_DIR)/gsoap_copy_all_ts \ - $(wildcard $(PATH_TARGET_SOAPDEMOXML)/*) \ - $(PATH_TARGET_SOAPDEMOXML)/dummy_file \ -- $(wildcard $(PATH_TARGET_SOAPDEMOHEADERS)/*) \ -- $(PATH_TARGET_SOAPDEMOHEADERS)/dummy_file \ - $(wildcard $(PATH_TARGET_SOAPDEMONSMAPS)/*) \ - $(PATH_TARGET_SOAPDEMONSMAPS)/dummy_file - -@@ -695,17 +692,14 @@ - # any more. Ignoring the exit code is the simple solution, accepting the error. - $(VBOXWEB_OUT_DIR)/gsoap_copy_all_ts: $(VBOXWEB_OUT_DIR)/gsoap_generate_all_ts | $$(dir $$@) - $(RM) -f $@ -- $(MKDIR) -p $(PATH_TARGET_SOAPDEMOXML) $(PATH_TARGET_SOAPDEMOHEADERS) $(PATH_TARGET_SOAPDEMONSMAPS) -+ $(MKDIR) -p $(PATH_TARGET_SOAPDEMOXML) $(PATH_TARGET_SOAPDEMONSMAPS) - ifdef VBOX_GSOAP_VERBOSE - $(MV_EXT) -f -- $(VBOXWEB_OUT_DIR)/*.req.xml $(VBOXWEB_OUT_DIR)/*.res.xml $(PATH_TARGET_SOAPDEMOXML)/ - endif -- -$(MV_EXT) -f -- $(VBOXWEB_OUT_DIR)/soapvbox*.h $(PATH_TARGET_SOAPDEMOHEADERS)/ - $(MV_EXT) -f -- $(VBOXWEB_OUT_DIR)/vboxBinding.nsmap $(PATH_TARGET_SOAPDEMONSMAPS)/ - $(APPEND) $@ done - --$(PATH_TARGET_SOAPDEMONSMAPS) \ --$(PATH_TARGET_SOAPDEMOHEADERS)/soapvboxBindingProxy.h \ --$(PATH_TARGET_SOAPDEMOHEADERS)/soapvboxBindingObject.h: $(VBOXWEB_OUT_DIR)/gsoap_copy_all_ts -+$(PATH_TARGET_SOAPDEMONSMAPS): $(VBOXWEB_OUT_DIR)/gsoap_copy_all_ts - - # soapcpp2 -2: generate SOAP 1.2 calls - # soapcpp2 -S: server-side code only diff --git a/system/virtualbox/virtualbox.SlackBuild b/system/virtualbox/virtualbox.SlackBuild index 1048ea0771..e4c4d04639 100644 --- a/system/virtualbox/virtualbox.SlackBuild +++ b/system/virtualbox/virtualbox.SlackBuild @@ -1,8 +1,8 @@ -#!/bin/sh +#!/bin/bash -# Slackware build script for virtualbox-ose +# Slackware build script for virtualbox -# Copyright 2008-2017 Heinz Wiesinger, Amsterdam, The Netherlands +# Copyright 2008-2024 Heinz Wiesinger, Amsterdam, The Netherlands # Copyright 2008 Mauro Giachero <mauro.giachero@gmail.com> # All rights reserved. # @@ -12,32 +12,42 @@ # 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:-5.0.40} +VERSION=${VERSION:-6.1.50} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} if [ -z "$ARCH" ]; then case "$( uname -m )" in - i?86) ARCH=i486 ;; + i?86) ARCH=i586 ;; arm*) ARCH=arm ;; *) ARCH=$( uname -m ) ;; esac fi -CWD=$(pwd) +# If the variable PRINT_PACKAGE_NAME is set, then this script will report what +# the name of the created package would be, and then exit. This information +# could be useful to other scripts. +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" + exit 0 +fi + TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} @@ -45,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." @@ -55,21 +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 qt4-frontend -if [ "${HEADLESS:-no}" = "no" ]; then - guiapp="VirtualBox VBoxSDL" -else - gui+=" --build-headless" - guiapp="" -fi - # Enable building of java bindings if [ "${JAVA:-no}" = "no" ]; then java="--disable-java" @@ -96,8 +88,8 @@ else sw_virt="" fi -if [ "$ARCH" = "i486" ]; then - SLKCFLAGS="-O2 -march=i486 -mtune=i686" +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" LIBDIRSUFFIX="" BUILDDIR="x86" elif [ "$ARCH" = "i686" ]; then @@ -132,25 +124,22 @@ MODE="755" # Use virtualbox-kernel.SlackBuild for this. patch -d src/VBox/Installer/linux -i $CWD/vboxdrv.sh-setup.diff -# Fix building against newer versions of gsoap -patch -p1 -i $CWD/virtualbox-gsoap.patch - # Fix wrong path to rdesktop-vrdp-keymaps patch -p1 -i $CWD/006-rdesktop-vrdp-keymap-path.patch -# Remove gcc version check -sed -i 's/^check_gcc$/#check_gcc/' ./configure +# Skip python2 detection and cheat about python-3.10 support +sed -i 's|python2.7 python2.6 |python3.10 |' ./configure + +# Use our CFLAGS +sed -i "s|CXX_FLAGS=\"\"|CXX_FLAGS=\"$SLKCFLAGS -std=c++11\"|" ./configure -CFLAGS="$SLKCFLAGS" \ -CXXFLAGS="$SLKCFLAGS" \ ./configure \ --disable-kmods \ --enable-vde \ --enable-vnc \ --with-makeself=/usr/bin/echo \ + --enable-hardening \ $web_service \ - $harden \ - $gui \ $sw_virt \ $java @@ -158,20 +147,16 @@ CXXFLAGS="$SLKCFLAGS" \ cp $CWD/LocalConfig.kmk . sed -i "s|LIBDIR|lib$LIBDIRSUFFIX|" ./LocalConfig.kmk +sed -i "s|CXXFLAGS|$SLKCFLAGS -std=c++11|" ./LocalConfig.kmk kmk -j ${JOBS} LOCALCFG=./LocalConfig.kmk -# build VBoxFUSE -cd src/VBox/ImageMounter/VBoxFUSE - kmk -j ${JOBS} -cd - - mkdir -p $PKG/usr/{lib$LIBDIRSUFFIX,share,include}/virtualbox \ $PKG/usr/{bin,src} \ $PKG/usr/share/{pixmaps,mime/packages} \ $PKG/etc/{default,rc.d,vbox} -for i in vboxdrv.sh.in vboxballoonctrl-service.sh vboxautostart-service.sh; do +for i in vboxdrv.sh vboxballoonctrl-service.sh vboxautostart-service.sh; do SCRIPT=$(echo $i | cut -d "." -f 1) cp -f src/VBox/Installer/linux/$i $PKG/etc/rc.d/rc.$SCRIPT.new sed -i "s/%PACKAGE%/virtualbox/g" $PKG/etc/rc.d/rc.$SCRIPT.new @@ -210,7 +195,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 @@ -218,17 +203,18 @@ cd out/linux.$BUILDDIR/release/bin/ install -m $MODE -g $GROUP VBoxSysInfo.sh $PKG/usr/share/virtualbox/ install -m $MODE -g $GROUP VBoxCreateUSBNode.sh $PKG/usr/share/virtualbox/ install -m $MODE -g $GROUP VBoxTunctl $PKG/usr/bin/ - install -m $MODE -g $GROUP VBoxFUSE $PKG/usr/bin/ - rm -f VBoxSysInfo.sh VBoxCreateUSBNode.sh VBoxTunctl VBoxFUSE + rm -f VBoxSysInfo.sh VBoxCreateUSBNode.sh VBoxTunctl mv * $PKG/usr/lib$LIBDIRSUFFIX/virtualbox/ chown -R root:$GROUP $PKG/usr/lib$LIBDIRSUFFIX/virtualbox/ chmod -R $MODE $PKG/usr/lib$LIBDIRSUFFIX/virtualbox/ mv $PKG/usr/lib$LIBDIRSUFFIX/virtualbox/VBox.sh $PKG/usr/lib$LIBDIRSUFFIX/virtualbox/VBox cd $TMP/$SRCNAM-${VERSION} -for i in VBoxManage vboxmanage VBoxHeadless \ - vboxheadless VBoxVRDP VBoxBalloonCtrl vboxballoonctrl \ - VBoxAutostart vboxautostart $guiapp $vboxwebsrv; do +# Drop broken symlink +rm -f $PKG/usr/lib$LIBDIRSUFFIX/virtualbox/components/VBoxREM.so + +for i in VBoxManage VBoxHeadless VBoxVRDP VBoxBalloonCtrl VBoxBugReport \ + VBoxAutostart VirtualBox VirtualBoxVM VBoxSDL $vboxwebsrv; do ln -s /usr/lib$LIBDIRSUFFIX/virtualbox/VBox $PKG/usr/bin/$i done @@ -238,6 +224,9 @@ if [ "${HEADLESS:-no}" = "no" ]; then done fi +ln -s /usr/lib$LIBDIRSUFFIX/virtualbox/vbox-img $PKG/usr/bin/ +ln -s /usr/lib$LIBDIRSUFFIX/virtualbox/vboximg-mount $PKG/usr/bin/ + if [ "$vboxwebsrv" = "vboxwebsrv" ]; then mkdir -p $PKG/var/{lib,log}/vboxweb chown vboxweb:vboxusers $PKG/var/{lib,log}/vboxweb @@ -248,15 +237,14 @@ 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 $guiapp VBoxNetDHCP VBoxNetAdpCtl; 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/ rm -f $PKG/usr/include/virtualbox/Makefile.kmk +find $PKG/usr/include/virtualbox -name "Makefile.kup" -print0 | xargs -0 rm -f cp -f $CWD/VBoxGuestAdditions_$VERSION.iso \ $PKG/usr/share/virtualbox/VBoxGuestAdditions.iso @@ -302,4 +290,4 @@ if [ "$vboxwebsrv" = "vboxwebsrv" ]; then fi cd $PKG -/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE diff --git a/system/virtualbox/virtualbox.info b/system/virtualbox/virtualbox.info index 11fef8a32a..44e1b2819c 100644 --- a/system/virtualbox/virtualbox.info +++ b/system/virtualbox/virtualbox.info @@ -1,16 +1,16 @@ PRGNAM="virtualbox" -VERSION="5.0.40" +VERSION="6.1.50" HOMEPAGE="https://www.virtualbox.org" -DOWNLOAD="http://download.virtualbox.org/virtualbox/5.0.40/VirtualBox-5.0.40.tar.bz2 \ - http://download.virtualbox.org/virtualbox/5.0.40/VBoxGuestAdditions_5.0.40.iso \ - http://download.virtualbox.org/virtualbox/5.0.40/UserManual.pdf \ - http://download.virtualbox.org/virtualbox/5.0.40/SDKRef.pdf" -MD5SUM="53b259e48a137b0185c169590e2dcb77 \ - 71afc65e09d1d4d02020f0403ac47622 \ - bdc4bf38dd3ed786385044841a4af147 \ - 684ac3f7d17532cd8396ea83ba1d57ea" -DOWNLOAD_x86_64="" -MD5SUM_x86_64="" +DOWNLOAD="UNSUPPORTED" +MD5SUM="" +DOWNLOAD_x86_64="http://download.virtualbox.org/virtualbox/6.1.50/VirtualBox-6.1.50.tar.bz2 \ + http://download.virtualbox.org/virtualbox/6.1.50/VBoxGuestAdditions_6.1.50.iso \ + http://download.virtualbox.org/virtualbox/6.1.50/UserManual.pdf \ + http://download.virtualbox.org/virtualbox/6.1.50/SDKRef.pdf" +MD5SUM_x86_64="57073540cb522ded3ad142c7f1fb01ac \ + 1041bbc411d15720694a76ca06c2795b \ + ede83ce195f62c406e5fd77639101a0f \ + 3cb39e3b30f5fb64c4ba00eee8a4833d" REQUIRES="acpica virtualbox-kernel" MAINTAINER="Heinz Wiesinger" -EMAIL="pprkut@liwjatan.at" +EMAIL="pprkut@slackbuilds.org" |