1
0
forked from pool/virtualbox
virtualbox/vboxconfig.sh

61 lines
1.9 KiB
Bash
Raw Normal View History

#!/bin/bash
2017-05-10 20:01:46 +02:00
#
# Script to build VirtualBox host kernel modules
# Copyright C 2017 by Larry Finger
#
# This script is part of the openSUSE VirtualBox package
#
SOURCE="/usr/src/kernel-modules/virtualbox/src"
2017-05-10 20:01:46 +02:00
LOGFILE="/var/log/virtualbox.log"
INCLUDE="/lib/modules/`uname -r`/build/include"
#
Accepting request 765913 from home:lwfinger:branches:Virtualization - Version update to 6.1.2 (released January 14 2020i by Oracle) 18 Vulnerabilities fixed: CVE-2020-2674 CVE-2020-2682 CVE-2020-2698 CVE-2020-2701 CVE-2020-2702 CVE-2020-2726 CVE-2020-2681 CVE-2020-2689 CVE-2020-2690 CVE-2020-2691 CVE-2020-2692 CVE-2020-2703 CVE-2020-2704 CVE-2020-2705 CVE-2020-2725 CVE-2020-2678 CVE-2020-2727 CVE-2020-2693 See bsc#1161050 File "fixes_for_leap15.2.patch" added to fix build for Leap 15.2. As announced earlier by Oracle, 32-bit builds are no longer supported. This is a maintenance release. The following items were fixed and/or added: Virtualization core: fixed performance issue observed with Windows XP guests on AMD hosts (6.0.0 regression; bug #19152) Virtualization core: consistent IBRS/IBPB CPUID feature reporting, avoids crash of NetBSD 9.0 RC1 installer (bug #19146) GUI: fixed updating of runtime info GUI: in Display settings, do not show "2D video acceleration" checkbox if it is meaningless for the selected graphics adapter Audio: fixed audio input handling when VRDE is enabled Audio: fixed crash in the HDA emulation when using multi-speaker configurations Storage: fixed use of encrypted disks with snapshots involved (6.1.0 regression; bug #19160) Storage: improve performance of virtio-scsi Storage: read-only support for compressed clusters in QCOW2 images Linux host: Support Linux 5.5 (guest additions not yet) Windows guest: accelerate 2D video decoding (scaling and color space conversion) if the VM is configured to use VBoxSVGA with 3D enabled Windows guest: fix guest additions installer to upgrade the mouse filter driver reliably Windows guest: when uninstalling older Guest Additions with old 3D support enabled try restoring original Direct3D files Linux guest: improve resize and multi-monitor handling for VMs using VMSVGA (known remaining issue: do not disable a monitor "in the middle", causes confusion) - Version update to 6.1.0 (released December 10 2019 by Oracle) - Fixes bsc#1132102. - Removed file "set_graphics_type.patch" as the problem is fixed upstream. This is a major update. The following major new features were added: - Implemented support for importing a virtual machine from Oracle Cloud Infrastructure - Extended support for exporting a virtual machine to Oracle Cloud Infrastructure, allowing the creation of multiple virtual machines without re-uploading. Also added option to export a VM to the cloud using the more efficient OBS-URL: https://build.opensuse.org/request/show/765913 OBS-URL: https://build.opensuse.org/package/show/Virtualization/virtualbox?expand=0&rev=526
2020-01-20 21:15:41 +01:00
# Test if vboxdrv module loaded. If it is, skip everything else
loaded=$(lsmod | grep vboxdrv)
if [ -n "$loaded" ] ; then
echo "Kernel modules are loaded, unload them via"
echo "systemctl stop vboxdrv.service if you wish to rebuild them."
echo "Quitting .."
exit 1
fi
#
# Check if virtualbox-host-source is installed, quit if not
if ! rpm -qf "$SOURCE/Makefile" &>/dev/null ; then
echo "Sources for building host modules are not present,"
echo "Use 'sudo zypper install virtualbox-host-source kernel-devel kernel-default-devel' to install them. Quitting .."
exit 1
fi
#
# Check if virtualbox-host-source version matches virtualbox version
if [ "$(rpm -q virtualbox virtualbox-host-source --queryformat='%{version}-%{release}\n' 2>/dev/null | sort -u | wc -l)" -ne "1" ] ; then
echo "virtualbox-host-source package version doesn't match the version of virtualbox package."
echo "This situation is probably not fatal, thus we will try to continue .."
2017-05-10 20:01:46 +02:00
fi
# Prerequisites are available, start build
pushd $SOURCE > /dev/null 2>&1
echo "Building kernel modules..."
make clean &>/dev/null
2017-05-10 20:01:46 +02:00
make > $LOGFILE 2>&1
if [ "$?" -ne 0 ] ; then
2017-05-10 20:01:46 +02:00
echo ""
echo "Build of VirtualBox host kernel modules failed."
echo "Look at $LOGFILE to find reasons."
popd > /dev/null 2>&1
exit 1
else
echo "Kernel modules built correctly. They will now be installed."
fi
make install >> $LOGFILE 2>&1
if [ "$?" -ne 0 ] ; then
2017-05-10 20:01:46 +02:00
echo ""
echo "Installation of VirtualBox host kernel modules failed."
echo "Look at $LOGFILE to find reasons."
popd > /dev/null 2>&1
exit 1
fi
depmod -a
Accepting request 765913 from home:lwfinger:branches:Virtualization - Version update to 6.1.2 (released January 14 2020i by Oracle) 18 Vulnerabilities fixed: CVE-2020-2674 CVE-2020-2682 CVE-2020-2698 CVE-2020-2701 CVE-2020-2702 CVE-2020-2726 CVE-2020-2681 CVE-2020-2689 CVE-2020-2690 CVE-2020-2691 CVE-2020-2692 CVE-2020-2703 CVE-2020-2704 CVE-2020-2705 CVE-2020-2725 CVE-2020-2678 CVE-2020-2727 CVE-2020-2693 See bsc#1161050 File "fixes_for_leap15.2.patch" added to fix build for Leap 15.2. As announced earlier by Oracle, 32-bit builds are no longer supported. This is a maintenance release. The following items were fixed and/or added: Virtualization core: fixed performance issue observed with Windows XP guests on AMD hosts (6.0.0 regression; bug #19152) Virtualization core: consistent IBRS/IBPB CPUID feature reporting, avoids crash of NetBSD 9.0 RC1 installer (bug #19146) GUI: fixed updating of runtime info GUI: in Display settings, do not show "2D video acceleration" checkbox if it is meaningless for the selected graphics adapter Audio: fixed audio input handling when VRDE is enabled Audio: fixed crash in the HDA emulation when using multi-speaker configurations Storage: fixed use of encrypted disks with snapshots involved (6.1.0 regression; bug #19160) Storage: improve performance of virtio-scsi Storage: read-only support for compressed clusters in QCOW2 images Linux host: Support Linux 5.5 (guest additions not yet) Windows guest: accelerate 2D video decoding (scaling and color space conversion) if the VM is configured to use VBoxSVGA with 3D enabled Windows guest: fix guest additions installer to upgrade the mouse filter driver reliably Windows guest: when uninstalling older Guest Additions with old 3D support enabled try restoring original Direct3D files Linux guest: improve resize and multi-monitor handling for VMs using VMSVGA (known remaining issue: do not disable a monitor "in the middle", causes confusion) - Version update to 6.1.0 (released December 10 2019 by Oracle) - Fixes bsc#1132102. - Removed file "set_graphics_type.patch" as the problem is fixed upstream. This is a major update. The following major new features were added: - Implemented support for importing a virtual machine from Oracle Cloud Infrastructure - Extended support for exporting a virtual machine to Oracle Cloud Infrastructure, allowing the creation of multiple virtual machines without re-uploading. Also added option to export a VM to the cloud using the more efficient OBS-URL: https://build.opensuse.org/request/show/765913 OBS-URL: https://build.opensuse.org/package/show/Virtualization/virtualbox?expand=0&rev=526
2020-01-20 21:15:41 +01:00
modprobe -av vboxnetflt vboxnetadp
2017-05-10 20:01:46 +02:00
popd > /dev/null 2>&1
echo "Kernel modules are installed and loaded."
exit 0