From 7d8fa777f3eb9951f89a4bcd3409394d9da19077bc3c0dd263c20f6cccce938b Mon Sep 17 00:00:00 2001 From: Larry Finger Date: Thu, 8 Nov 2018 20:10:03 +0000 Subject: [PATCH 1/4] - Update "fixes_for_4.20.patch" for one additional API change so that Kernel_HEAD_standard will build. The description of VB was modified as suggested by Jan Engelhardt. OBS-URL: https://build.opensuse.org/package/show/Virtualization/virtualbox?expand=0&rev=453 --- fixes_for_4.20.patch | 17 +++++++++++++++++ virtualbox.changes | 7 +++++++ virtualbox.spec | 10 ++++++---- 3 files changed, 30 insertions(+), 4 deletions(-) diff --git a/fixes_for_4.20.patch b/fixes_for_4.20.patch index 94fdfff..15fca5a 100644 --- a/fixes_for_4.20.patch +++ b/fixes_for_4.20.patch @@ -173,3 +173,20 @@ Index: VirtualBox-5.2.20/include/iprt/time.h #endif /* various ways of detecting struct timespec */ +Index: VirtualBox-5.2.20/src/VBox/Additions/linux/drm/vbox_fb.c +=================================================================== +--- VirtualBox-5.2.20.orig/src/VBox/Additions/linux/drm/vbox_fb.c ++++ VirtualBox-5.2.20/src/VBox/Additions/linux/drm/vbox_fb.c +@@ -297,8 +297,12 @@ static int vboxfb_create(struct drm_fb_h + * The last flag forces a mode set on VT switches even if the kernel + * does not think it is needed. + */ ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 20, 0) ++ info->flags = FBINFO_DEFAULT | FBINFO_MISC_ALWAYS_SETPAR; ++#else + info->flags = FBINFO_DEFAULT | FBINFO_CAN_FORCE_OUTPUT | + FBINFO_MISC_ALWAYS_SETPAR; ++#endif + info->fbops = &vboxfb_ops; + + ret = fb_alloc_cmap(&info->cmap, 256, 0); diff --git a/virtualbox.changes b/virtualbox.changes index 78c9298..0a44bfb 100644 --- a/virtualbox.changes +++ b/virtualbox.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu Nov 8 19:53:22 UTC 2018 - Larry Finger + +- Update "fixes_for_4.20.patch" for one additional API change so that + Kernel_HEAD_standard will build. + The description of VB was modified as suggested by Jan Engelhardt. + ------------------------------------------------------------------- Tue Nov 6 08:47:25 UTC 2018 - Dominique Leuenberger diff --git a/virtualbox.spec b/virtualbox.spec index 02c9ef9..e2f5652 100644 --- a/virtualbox.spec +++ b/virtualbox.spec @@ -233,10 +233,12 @@ BuildRequires: xorg-x11-libXt-devel-32bit %posttrans %description -VirtualBox is an extremely feature rich, high performance product -for enterprise customers, it is also the only professional solution -that is freely available as Open Source Software under the terms of the -GNU Public License (GPL). +VirtualBox is a hosted hypervisor for x86 computers. It supports the +creation and management of guest virtual machines running versions +and derivations of Windows, Linux, BSD, OS/2, Solaris, Haiku, OSx86 +and others, and limited virtualization of macOS guests on Apple +hardware. VirtualBox is freely available as Open Source Software under +the terms of the GNU Public License (GPL). ########################################## %package qt From c72893c4329be1878ba69a0ad7811eb70652b1cb1c48b1b4c5d0087b9cf70e3c Mon Sep 17 00:00:00 2001 From: Larry Finger Date: Fri, 9 Nov 2018 20:17:28 +0000 Subject: [PATCH 2/4] =?UTF-8?q?-=20Version=20bump=20to=205.2.22=20(release?= =?UTF-8?q?d=20November=2009=202018=20by=20Oracle)=20This=20is=20a=20maint?= =?UTF-8?q?enance=20release.=20The=20following=20items=20were=20fixed=20an?= =?UTF-8?q?d/or=20added:=20Audio:=20fixed=20a=20regression=20in=20the=20Co?= =?UTF-8?q?re=20Audio=20backend=20causing=20a=20hang=20when=20returning=20?= =?UTF-8?q?from=20host=20sleep=20when=20processing=20input=20buffers=20Aud?= =?UTF-8?q?io:=20fixed=20a=20potential=20crash=20in=20the=20HDA=20emulatio?= =?UTF-8?q?n=20if=20a=20stream=20has=20no=20valid=20mixer=20sink=20attache?= =?UTF-8?q?d=20--=20thanks=20to=20Rink=20Springer=20(rink@=C3=A2=C2=80?= =?UTF-8?q?=C2=A6)=20Linux=20Additions:=20disable=203D=20for=20recent=20gu?= =?UTF-8?q?ests=20using=20Wayland=20(bug=20#18116)=20Linux=20Additions:=20?= =?UTF-8?q?fix=20for=20rebuilding=20kernel=20modules=20for=20new=20kernels?= =?UTF-8?q?=20on=20RPM=20guests=20Linux=20Additions:=20further=20fixes=20f?= =?UTF-8?q?or=20Linux=204.19=20Linux=20Additions:=20fixed=20errors=20rebui?= =?UTF-8?q?lding=20initrd=20files=20with=20dracut=20on=20EL=206=20(bug=201?= =?UTF-8?q?8055#)=20Linux=20Additions:=20fixed=205.2.20=20regression:=20gu?= =?UTF-8?q?ests=20not=20remembering=20the=20screen=20size=20after=20shutdo?= =?UTF-8?q?wn=20and=20restart=20(bug=20#18078)=20Patch=20file=20"gcc8-conf?= =?UTF-8?q?igure.patch"=20removed.=20The=20issue=20is=20fixed=20upstream.?= =?UTF-8?q?=20Patch=20file=20"fixes=5Ffor=5F4.19.patch"=20removed.=20The?= =?UTF-8?q?=20issue=20is=20fixed=20upstream.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit OBS-URL: https://build.opensuse.org/package/show/Virtualization/virtualbox?expand=0&rev=454 --- UserManual.pdf | 4 +-- VirtualBox-5.2.20-patched.tar.bz2 | 3 -- VirtualBox-5.2.22-patched.tar.bz2 | 3 ++ fixes_for_4.19.patch | 14 -------- gcc8-configure.patch | 11 ------ vbox-vboxadd-init-script.diff | 60 +++++++++++++++---------------- virtualbox.changes | 18 ++++++++++ virtualbox.spec | 19 ++++------ 8 files changed, 60 insertions(+), 72 deletions(-) delete mode 100644 VirtualBox-5.2.20-patched.tar.bz2 create mode 100644 VirtualBox-5.2.22-patched.tar.bz2 delete mode 100644 fixes_for_4.19.patch delete mode 100644 gcc8-configure.patch diff --git a/UserManual.pdf b/UserManual.pdf index 0986cc3..635648b 100644 --- a/UserManual.pdf +++ b/UserManual.pdf @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1fec3d098423c7f73a7c96389ee005f311c61efb45962b4a29320e93c30ac13e -size 4456573 +oid sha256:71512fe7f20eab44ef00d36937a46ed0da51a3f1caa01e9fd4585e0bc7225ba9 +size 4459021 diff --git a/VirtualBox-5.2.20-patched.tar.bz2 b/VirtualBox-5.2.20-patched.tar.bz2 deleted file mode 100644 index 01f0242..0000000 --- a/VirtualBox-5.2.20-patched.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e0b05bf26f812e1b56d1d790a6774eda9ead7bc6f4f99df7f530888aacb1be2b -size 83363280 diff --git a/VirtualBox-5.2.22-patched.tar.bz2 b/VirtualBox-5.2.22-patched.tar.bz2 new file mode 100644 index 0000000..1b0c3f1 --- /dev/null +++ b/VirtualBox-5.2.22-patched.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:137cb45ec6203764d16b844aae5ffd07c29f0bd3c55005d905a957a60c5ad3fe +size 83356066 diff --git a/fixes_for_4.19.patch b/fixes_for_4.19.patch deleted file mode 100644 index 40d8bef..0000000 --- a/fixes_for_4.19.patch +++ /dev/null @@ -1,14 +0,0 @@ -Index: VirtualBox-5.2.20/src/VBox/Additions/linux/drm/vbox_mode.c -=================================================================== ---- VirtualBox-5.2.20.orig/src/VBox/Additions/linux/drm/vbox_mode.c -+++ VirtualBox-5.2.20/src/VBox/Additions/linux/drm/vbox_mode.c -@@ -495,8 +495,8 @@ static void vbox_set_edid(struct drm_con - drm_connector_update_edid_property(connector, (struct edid *)edid); - #else - drm_mode_connector_update_edid_property(connector, (struct edid *)edid); --} - #endif -+} - - static int vbox_get_modes(struct drm_connector *connector) - { diff --git a/gcc8-configure.patch b/gcc8-configure.patch deleted file mode 100644 index 76226e3..0000000 --- a/gcc8-configure.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/configure 2018-04-20 13:44:45.259234618 +0200 -+++ b/configure -@@ -440,7 +445,7 @@ - elif [ $cc_maj -lt 4 \ - -o \( $cc_maj -eq 4 -a $cc_min -lt 4 -a "$OS" != "darwin" \) \ - -o \( $cc_maj -eq 4 -a $cc_min -lt 2 -a "$OS" = "darwin" \) \ -- -o $cc_maj -gt 7 ]; then -+ -o $cc_maj -gt 8 ]; then - log_failure "gcc version $cc_maj.$cc_min found, expected gcc 4.x...7.x" - fail really - else diff --git a/vbox-vboxadd-init-script.diff b/vbox-vboxadd-init-script.diff index 4df3835..f4e97e8 100644 --- a/vbox-vboxadd-init-script.diff +++ b/vbox-vboxadd-init-script.diff @@ -1,7 +1,7 @@ -Index: VirtualBox-5.2.20/src/VBox/Additions/linux/installer/vboxadd.sh +Index: VirtualBox-5.2.22/src/VBox/Additions/linux/installer/vboxadd.sh =================================================================== ---- VirtualBox-5.2.20.orig/src/VBox/Additions/linux/installer/vboxadd.sh -+++ VirtualBox-5.2.20/src/VBox/Additions/linux/installer/vboxadd.sh +--- VirtualBox-5.2.22.orig/src/VBox/Additions/linux/installer/vboxadd.sh ++++ VirtualBox-5.2.22/src/VBox/Additions/linux/installer/vboxadd.sh @@ -26,11 +26,14 @@ # Provides: vboxadd # Required-Start: @@ -66,7 +66,7 @@ Index: VirtualBox-5.2.20/src/VBox/Additions/linux/installer/vboxadd.sh @@ -224,9 +206,8 @@ start() begin "Starting." # If we got this far assume that the slow set-up has been done. - QUICKSETUP=yes + QUICKSETUP=start - if test -z "${INSTALL_NO_MODULE_BUILDS}"; then - uname -r | grep -q -E '^2\.6|^3|^4' 2>/dev/null && - ps -A -o comm | grep -q '/*udevd$' 2>/dev/null || @@ -84,9 +84,9 @@ Index: VirtualBox-5.2.20/src/VBox/Additions/linux/installer/vboxadd.sh fail "modprobe vboxguest failed" } case "$no_udev" in 1) -@@ -270,7 +251,8 @@ start() - rm -Rf /var/lib/VBoxGuestAdditions/lib - if /usr/bin/VBoxClient --check3d 2>/dev/null; then +@@ -284,7 +265,8 @@ start() + fi + if test -n "${setup_gl}"; then mkdir -p /var/lib/VBoxGuestAdditions/lib - ln -sf "${INSTALL_DIR}/lib/VBoxOGL.so" /var/lib/VBoxGuestAdditions/lib/libGL.so.1 + ln -sf "/usr/lib64/VBoxOGL.so" /var/lib/VBoxGuestAdditions/lib/libGL.so.1 @@ -94,7 +94,7 @@ Index: VirtualBox-5.2.20/src/VBox/Additions/linux/installer/vboxadd.sh # SELinux for the OpenGL libraries, so that gdm can load them during the # acceleration support check. This prevents an "Oh no, something has gone # wrong!" error when starting EL7 guests. -@@ -281,6 +263,15 @@ start() +@@ -295,6 +277,15 @@ start() chcon -h -t lib_t "/var/lib/VBoxGuestAdditions/lib/libGL.so.1" fi echo "/var/lib/VBoxGuestAdditions/lib" > /etc/ld.so.conf.d/00vboxvideo.conf @@ -110,7 +110,7 @@ Index: VirtualBox-5.2.20/src/VBox/Additions/linux/installer/vboxadd.sh fi ldconfig -@@ -455,9 +446,9 @@ create_udev_rule() +@@ -488,9 +479,9 @@ create_udev_rule() echo "KERNEL=${udev_fix}\"vboxuser\", NAME=\"vboxuser\", OWNER=\"vboxadd\", MODE=\"0666\"" >> /etc/udev/rules.d/60-vboxadd.rules fi } @@ -123,7 +123,7 @@ Index: VirtualBox-5.2.20/src/VBox/Additions/linux/installer/vboxadd.sh # And a post-installation script for rebuilding modules when a new kernel # is installed. mkdir -p /etc/kernel/postinst.d /etc/kernel/prerm.d -@@ -487,20 +478,13 @@ shared_folder_setup() +@@ -521,20 +512,13 @@ shared_folder_setup() ## @todo It would be nicer if the kernel module just parsed parameters # itself instead of needing a separate binary to do that. ln -sf "${INSTALL_DIR}/other/mount.vboxsf" /sbin @@ -146,7 +146,7 @@ Index: VirtualBox-5.2.20/src/VBox/Additions/linux/installer/vboxadd.sh export BUILD_TYPE export USERNAME -@@ -517,16 +501,33 @@ setup() +@@ -551,16 +535,33 @@ setup() shared_folder_setup if running_vboxguest || running_vboxadd; then info "Running kernel modules will not be replaced until the system is restarted" @@ -185,7 +185,7 @@ Index: VirtualBox-5.2.20/src/VBox/Additions/linux/installer/vboxadd.sh depmod # Remove old module sources -@@ -536,13 +537,14 @@ cleanup() +@@ -570,13 +571,14 @@ cleanup() fi # Clean-up X11-related bits @@ -204,10 +204,10 @@ Index: VirtualBox-5.2.20/src/VBox/Additions/linux/installer/vboxadd.sh fi rm /etc/udev/rules.d/60-vboxadd.rules 2>/dev/null } -Index: VirtualBox-5.2.20/src/VBox/Additions/linux/installer/vboxadd-service.sh +Index: VirtualBox-5.2.22/src/VBox/Additions/linux/installer/vboxadd-service.sh =================================================================== ---- VirtualBox-5.2.20.orig/src/VBox/Additions/linux/installer/vboxadd-service.sh -+++ VirtualBox-5.2.20/src/VBox/Additions/linux/installer/vboxadd-service.sh +--- VirtualBox-5.2.22.orig/src/VBox/Additions/linux/installer/vboxadd-service.sh ++++ VirtualBox-5.2.22/src/VBox/Additions/linux/installer/vboxadd-service.sh @@ -26,7 +26,7 @@ # Provides: vboxadd-service # Required-Start: vboxadd @@ -217,10 +217,10 @@ Index: VirtualBox-5.2.20/src/VBox/Additions/linux/installer/vboxadd-service.sh # Default-Stop: 0 1 6 # X-Conflicts-With: systemd-timesyncd.service # Description: VirtualBox Additions Service -Index: VirtualBox-5.2.20/src/VBox/Installer/linux/vboxautostart-service.sh +Index: VirtualBox-5.2.22/src/VBox/Installer/linux/vboxautostart-service.sh =================================================================== ---- VirtualBox-5.2.20.orig/src/VBox/Installer/linux/vboxautostart-service.sh -+++ VirtualBox-5.2.20/src/VBox/Installer/linux/vboxautostart-service.sh +--- VirtualBox-5.2.22.orig/src/VBox/Installer/linux/vboxautostart-service.sh ++++ VirtualBox-5.2.22/src/VBox/Installer/linux/vboxautostart-service.sh @@ -23,7 +23,7 @@ # Provides: vboxautostart-service # Required-Start: vboxdrv @@ -230,10 +230,10 @@ Index: VirtualBox-5.2.20/src/VBox/Installer/linux/vboxautostart-service.sh # Default-Stop: 0 1 6 # Description: VirtualBox autostart service ### END INIT INFO -Index: VirtualBox-5.2.20/src/VBox/Installer/linux/vboxballoonctrl-service.sh +Index: VirtualBox-5.2.22/src/VBox/Installer/linux/vboxballoonctrl-service.sh =================================================================== ---- VirtualBox-5.2.20.orig/src/VBox/Installer/linux/vboxballoonctrl-service.sh -+++ VirtualBox-5.2.20/src/VBox/Installer/linux/vboxballoonctrl-service.sh +--- VirtualBox-5.2.22.orig/src/VBox/Installer/linux/vboxballoonctrl-service.sh ++++ VirtualBox-5.2.22/src/VBox/Installer/linux/vboxballoonctrl-service.sh @@ -23,7 +23,7 @@ # Provides: vboxballoonctrl-service # Required-Start: vboxdrv @@ -243,10 +243,10 @@ Index: VirtualBox-5.2.20/src/VBox/Installer/linux/vboxballoonctrl-service.sh # Default-Stop: 0 1 6 # Description: VirtualBox watchdog daemon ### END INIT INFO -Index: VirtualBox-5.2.20/src/VBox/ValidationKit/testboxscript/linux/testboxscript-service.sh +Index: VirtualBox-5.2.22/src/VBox/ValidationKit/testboxscript/linux/testboxscript-service.sh =================================================================== ---- VirtualBox-5.2.20.orig/src/VBox/ValidationKit/testboxscript/linux/testboxscript-service.sh -+++ VirtualBox-5.2.20/src/VBox/ValidationKit/testboxscript/linux/testboxscript-service.sh +--- VirtualBox-5.2.22.orig/src/VBox/ValidationKit/testboxscript/linux/testboxscript-service.sh ++++ VirtualBox-5.2.22/src/VBox/ValidationKit/testboxscript/linux/testboxscript-service.sh @@ -31,7 +31,7 @@ # Provides: testboxscript-service # Required-Start: $network @@ -256,10 +256,10 @@ Index: VirtualBox-5.2.20/src/VBox/ValidationKit/testboxscript/linux/testboxscrip # Default-Stop: 0 1 6 # Description: TestBoxScript service ### END INIT INFO -Index: VirtualBox-5.2.20/src/VBox/ValidationKit/utils/TestExecServ/linux/vboxtxs-nat.sh +Index: VirtualBox-5.2.22/src/VBox/ValidationKit/utils/TestExecServ/linux/vboxtxs-nat.sh =================================================================== ---- VirtualBox-5.2.20.orig/src/VBox/ValidationKit/utils/TestExecServ/linux/vboxtxs-nat.sh -+++ VirtualBox-5.2.20/src/VBox/ValidationKit/utils/TestExecServ/linux/vboxtxs-nat.sh +--- VirtualBox-5.2.22.orig/src/VBox/ValidationKit/utils/TestExecServ/linux/vboxtxs-nat.sh ++++ VirtualBox-5.2.22/src/VBox/ValidationKit/utils/TestExecServ/linux/vboxtxs-nat.sh @@ -31,7 +31,7 @@ # Provides: vboxtxs # Required-Start: $network @@ -269,10 +269,10 @@ Index: VirtualBox-5.2.20/src/VBox/ValidationKit/utils/TestExecServ/linux/vboxtxs # Default-Stop: 0 1 6 # Description: VirtualBox Test Execution Service ### END INIT INFO -Index: VirtualBox-5.2.20/src/VBox/ValidationKit/utils/TestExecServ/linux/vboxtxs.sh +Index: VirtualBox-5.2.22/src/VBox/ValidationKit/utils/TestExecServ/linux/vboxtxs.sh =================================================================== ---- VirtualBox-5.2.20.orig/src/VBox/ValidationKit/utils/TestExecServ/linux/vboxtxs.sh -+++ VirtualBox-5.2.20/src/VBox/ValidationKit/utils/TestExecServ/linux/vboxtxs.sh +--- VirtualBox-5.2.22.orig/src/VBox/ValidationKit/utils/TestExecServ/linux/vboxtxs.sh ++++ VirtualBox-5.2.22/src/VBox/ValidationKit/utils/TestExecServ/linux/vboxtxs.sh @@ -31,7 +31,7 @@ # Provides: vboxtxs # Required-Start: $network diff --git a/virtualbox.changes b/virtualbox.changes index 0a44bfb..e96ce70 100644 --- a/virtualbox.changes +++ b/virtualbox.changes @@ -1,3 +1,21 @@ +------------------------------------------------------------------- +Fri Nov 9 19:30:20 UTC 2018 - Larry Finger + +- Version bump to 5.2.22 (released November 09 2018 by Oracle) + +This is a maintenance release. The following items were fixed and/or added: + +Audio: fixed a regression in the Core Audio backend causing a hang when returning from host sleep when processing input buffers +Audio: fixed a potential crash in the HDA emulation if a stream has no valid mixer sink attached -- thanks to Rink Springer (rink@…) +Linux Additions: disable 3D for recent guests using Wayland (bug #18116) +Linux Additions: fix for rebuilding kernel modules for new kernels on RPM guests +Linux Additions: further fixes for Linux 4.19 +Linux Additions: fixed errors rebuilding initrd files with dracut on EL 6 (bug 18055#) +Linux Additions: fixed 5.2.20 regression: guests not remembering the screen size after shutdown and restart (bug #18078) + +Patch file "gcc8-configure.patch" removed. The issue is fixed upstream. +Patch file "fixes_for_4.19.patch" removed. The issue is fixed upstream. + ------------------------------------------------------------------- Thu Nov 8 19:53:22 UTC 2018 - Larry Finger diff --git a/virtualbox.spec b/virtualbox.spec index e2f5652..1f60b9e 100644 --- a/virtualbox.spec +++ b/virtualbox.spec @@ -40,7 +40,7 @@ python3 -O -c "import sys, os, compileall; br='%{buildroot}'; compileall.compile %define _udevrulesdir %{_sysconfdir}/udev/rules.d Name: virtualbox # ********* If the VB version exceeds 5.2.x, notify the libvirt maintainer!! -Version: 5.2.20 +Version: 5.2.22 Release: 0 Summary: VirtualBox is an Emulator License: GPL-2.0-or-later @@ -123,16 +123,13 @@ Patch119: fixes_for_leap15.patch Patch120: fixes_for_python.patch # Remove vboxvideo from build Patch121: remove_vbox_video_build.patch -Patch124: gcc8-configure.patch # Fix build for Qt 5.11 -Patch125: fixes_for_Qt5.11.patch +Patch122: fixes_for_Qt5.11.patch # Switch to Python 3.6 -Patch126: switch_to_python3.6.patch -Patch127: fix_32_bit_builds.patch -# Fix API changes for kernel 4.19+ -Patch128: fixes_for_4.19.patch +Patch123: switch_to_python3.6.patch +Patch124: fix_32_bit_builds.patch # Fix API changes for kernel 4.20+ -Patch129: fixes_for_4.20.patch +Patch125: fixes_for_4.20.patch # BuildRequires: LibVNCServer-devel BuildRequires: SDL-devel @@ -433,12 +430,10 @@ as an "extpack" for VirtualBox. The implementation is licensed under GPL. %endif %patch120 -p1 %patch121 -p1 +%patch122 -p1 +%patch123 -p1 %patch124 -p1 %patch125 -p1 -%patch126 -p1 -%patch127 -p1 -%patch128 -p1 -%patch129 -p1 #copy user manual cp %{SOURCE1} UserManual.pdf From b2ba7248818387324a63c3bdce6552c35328196ff2e0b8852dcddc7dba6cddee Mon Sep 17 00:00:00 2001 From: Larry Finger Date: Fri, 9 Nov 2018 22:28:17 +0000 Subject: [PATCH 3/4] Add file "change_default_net_adapter.patch" to set PCnet-FAST III as the default adapter. This helps with the vulnerability listed in bsc#1115041. OBS-URL: https://build.opensuse.org/package/show/Virtualization/virtualbox?expand=0&rev=455 --- change_default_net_adapter.patch | 51 ++++++++++++++++++++++++++++++++ virtualbox.changes | 2 +- virtualbox.spec | 3 ++ 3 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 change_default_net_adapter.patch diff --git a/change_default_net_adapter.patch b/change_default_net_adapter.patch new file mode 100644 index 0000000..027a8b9 --- /dev/null +++ b/change_default_net_adapter.patch @@ -0,0 +1,51 @@ +Index: VirtualBox-5.2.22/src/VBox/Main/src-all/Global.cpp +=================================================================== +--- VirtualBox-5.2.22.orig/src/VBox/Main/src-all/Global.cpp ++++ VirtualBox-5.2.22/src/VBox/Main/src-all/Global.cpp +@@ -181,18 +181,18 @@ const Global::OSType Global::sOSTypes[] + + { "Linux", "Linux", "Linux24_64", "Linux 2.4 (64-bit)", + VBOXOSTYPE_Linux24_x64, VBOXOSHINT_64BIT | VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC | VBOXOSHINT_RTCUTC, +- 128, 16, 4 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE, ++ 128, 16, 4 * _1G64, NetworkAdapterType_Am79C973, 0, StorageControllerType_PIIX4, StorageBus_IDE, + StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3, AudioControllerType_AC97, AudioCodecType_AD1980 }, + + { "Linux", "Linux", "Linux26", "Linux 2.6 / 3.x / 4.x (32-bit)", + VBOXOSTYPE_Linux26, VBOXOSHINT_RTCUTC | VBOXOSHINT_USBTABLET | VBOXOSHINT_X2APIC, +- 512, 16, 8 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE, ++ 512, 16, 8 * _1G64, NetworkAdapterType_Am79C973, 0, StorageControllerType_PIIX4, StorageBus_IDE, + StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3, AudioControllerType_AC97, AudioCodecType_AD1980 }, + + { "Linux", "Linux", "Linux26_64", "Linux 2.6 / 3.x / 4.x (64-bit)", + VBOXOSTYPE_Linux26_x64, VBOXOSHINT_64BIT | VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC | VBOXOSHINT_RTCUTC + | VBOXOSHINT_USBTABLET | VBOXOSHINT_X2APIC, +- 1024, 16, 8 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE, ++ 1024, 16, 8 * _1G64, NetworkAdapterType_Am79C973, 0, StorageControllerType_PIIX4, StorageBus_IDE, + StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3, AudioControllerType_AC97, AudioCodecType_AD1980 }, + + { "Linux", "Linux", "ArchLinux", "Arch Linux (32-bit)", +@@ -219,13 +219,13 @@ const Global::OSType Global::sOSTypes[] + + { "Linux", "Linux", "OpenSUSE", "openSUSE (32-bit)", + VBOXOSTYPE_OpenSUSE, VBOXOSHINT_RTCUTC | VBOXOSHINT_USBTABLET | VBOXOSHINT_X2APIC, +- 1024, 16, 8 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE, ++ 1024, 16, 8 * _1G64, NetworkAdapterType_Am79C973, 0, StorageControllerType_PIIX4, StorageBus_IDE, + StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3, AudioControllerType_AC97, AudioCodecType_AD1980 }, + + { "Linux", "Linux", "OpenSUSE_64", "openSUSE (64-bit)", + VBOXOSTYPE_OpenSUSE_x64, VBOXOSHINT_64BIT | VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC | VBOXOSHINT_RTCUTC + | VBOXOSHINT_USBTABLET | VBOXOSHINT_X2APIC, +- 1024, 16, 8 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE, ++ 1024, 16, 8 * _1G64, NetworkAdapterType_Am79C973, 0, StorageControllerType_PIIX4, StorageBus_IDE, + StorageControllerType_IntelAhci, StorageBus_SATA, ChipsetType_PIIX3, AudioControllerType_AC97, AudioCodecType_AD1980 }, + + { "Linux", "Linux", "Fedora", "Fedora (32-bit)", +@@ -323,7 +323,7 @@ const Global::OSType Global::sOSTypes[] + { "Linux", "Linux", "Linux_64", "Other Linux (64-bit)", + VBOXOSTYPE_Linux_x64, VBOXOSHINT_64BIT | VBOXOSHINT_PAE | VBOXOSHINT_HWVIRTEX | VBOXOSHINT_IOAPIC + | VBOXOSHINT_RTCUTC | VBOXOSHINT_USBTABLET | VBOXOSHINT_X2APIC, +- 512, 16, 8 * _1G64, NetworkAdapterType_I82540EM, 0, StorageControllerType_PIIX4, StorageBus_IDE, ++ 512, 16, 8 * _1G64, NetworkAdapterType_Am79C973, 0, StorageControllerType_PIIX4, StorageBus_IDE, + StorageControllerType_PIIX4, StorageBus_IDE, ChipsetType_PIIX3, AudioControllerType_AC97, AudioCodecType_STAC9700 }, + + { "Solaris", "Solaris", "Solaris", "Oracle Solaris 10 5/09 and earlier (32-bit)", diff --git a/virtualbox.changes b/virtualbox.changes index e96ce70..ac4c90d 100644 --- a/virtualbox.changes +++ b/virtualbox.changes @@ -15,7 +15,7 @@ Linux Additions: fixed 5.2.20 regression: guests not remembering the screen size Patch file "gcc8-configure.patch" removed. The issue is fixed upstream. Patch file "fixes_for_4.19.patch" removed. The issue is fixed upstream. - +Add file "change_default_net_adapter.patch" to set PCnet-FAST III as the default adapter. This helps with the vulnerability listed in bsc#1115041. ------------------------------------------------------------------- Thu Nov 8 19:53:22 UTC 2018 - Larry Finger diff --git a/virtualbox.spec b/virtualbox.spec index 1f60b9e..9494a55 100644 --- a/virtualbox.spec +++ b/virtualbox.spec @@ -130,6 +130,8 @@ Patch123: switch_to_python3.6.patch Patch124: fix_32_bit_builds.patch # Fix API changes for kernel 4.20+ Patch125: fixes_for_4.20.patch +# Change default network adapter +Patch126: change_default_net_adapter.patch # BuildRequires: LibVNCServer-devel BuildRequires: SDL-devel @@ -434,6 +436,7 @@ as an "extpack" for VirtualBox. The implementation is licensed under GPL. %patch123 -p1 %patch124 -p1 %patch125 -p1 +%patch126 -p1 #copy user manual cp %{SOURCE1} UserManual.pdf From 19f1afc1f5bfcccdd5c43b6ffdf68a26c2d4f02608d73ddbfe861f81c42d3509 Mon Sep 17 00:00:00 2001 From: Larry Finger Date: Tue, 27 Nov 2018 01:05:54 +0000 Subject: [PATCH 4/4] - Fix the changes for kernel 4.20 API differences. The previous version compiled but had an error in logic. OBS-URL: https://build.opensuse.org/package/show/Virtualization/virtualbox?expand=0&rev=457 --- fixes_for_4.20.patch | 93 +++++++++++--------------------------------- virtualbox.changes | 5 +++ 2 files changed, 28 insertions(+), 70 deletions(-) diff --git a/fixes_for_4.20.patch b/fixes_for_4.20.patch index 15fca5a..61521f5 100644 --- a/fixes_for_4.20.patch +++ b/fixes_for_4.20.patch @@ -1,7 +1,7 @@ -Index: VirtualBox-5.2.20/src/VBox/HostDrivers/VBoxNetAdp/linux/VBoxNetAdp-linux.c +Index: VirtualBox-5.2.22/src/VBox/HostDrivers/VBoxNetAdp/linux/VBoxNetAdp-linux.c =================================================================== ---- VirtualBox-5.2.20.orig/src/VBox/HostDrivers/VBoxNetAdp/linux/VBoxNetAdp-linux.c -+++ VirtualBox-5.2.20/src/VBox/HostDrivers/VBoxNetAdp/linux/VBoxNetAdp-linux.c +--- VirtualBox-5.2.22.orig/src/VBox/HostDrivers/VBoxNetAdp/linux/VBoxNetAdp-linux.c ++++ VirtualBox-5.2.22/src/VBox/HostDrivers/VBoxNetAdp/linux/VBoxNetAdp-linux.c @@ -84,8 +84,11 @@ static long VBoxNetAdpLinuxIOCtlUnlocked #endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 36) */ @@ -27,85 +27,38 @@ Index: VirtualBox-5.2.20/src/VBox/HostDrivers/VBoxNetAdp/linux/VBoxNetAdp-linux. .get_link = ethtool_op_get_link, }; -@@ -200,10 +207,64 @@ static void vboxNetAdpEthGetDrvinfo(stru +@@ -200,8 +207,18 @@ static void vboxNetAdpEthGetDrvinfo(stru "N/A"); } -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 20, 0) -+static bool -+convert_link_ksettings_to_legacy_settings( -+ struct ethtool_cmd *legacy_settings, -+ const struct ethtool_link_ksettings *link_ksettings) -+{ -+ bool retval = true; -+ -+ memset(legacy_settings, 0, sizeof(*legacy_settings)); -+ /* this also clears the deprecated fields in legacy structure: -+ * __u8 transceiver; -+ * __u32 maxtxpkt; -+ * __u32 maxrxpkt; -+ */ -+ -+ retval &= ethtool_convert_link_mode_to_legacy_u32( -+ &legacy_settings->supported, -+ link_ksettings->link_modes.supported); -+ retval &= ethtool_convert_link_mode_to_legacy_u32( -+ &legacy_settings->advertising, -+ link_ksettings->link_modes.advertising); -+ retval &= ethtool_convert_link_mode_to_legacy_u32( -+ &legacy_settings->lp_advertising, -+ link_ksettings->link_modes.lp_advertising); -+ ethtool_cmd_speed_set(legacy_settings, link_ksettings->base.speed); -+ legacy_settings->duplex -+ = link_ksettings->base.duplex; -+ legacy_settings->port -+ = link_ksettings->base.port; -+ legacy_settings->phy_address -+ = link_ksettings->base.phy_address; -+ legacy_settings->autoneg -+ = link_ksettings->base.autoneg; -+ legacy_settings->mdio_support -+ = link_ksettings->base.mdio_support; -+ legacy_settings->eth_tp_mdix -+ = link_ksettings->base.eth_tp_mdix; -+ legacy_settings->eth_tp_mdix_ctrl -+ = link_ksettings->base.eth_tp_mdix_ctrl; -+ legacy_settings->transceiver -+ = link_ksettings->base.transceiver; -+ return retval; -+} -+#endif - +- /* ethtool_ops::get_settings */ +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 20, 0) +static int vboxNetAdpEthGetSettings(struct net_device *pNetDev, struct ethtool_link_ksettings *link_ksettings) ++{ ++ link_ksettings->link_modes.supported[0] = 0; ++ ethtool_link_ksettings_zero_link_mode(link_ksettings, advertising); ++ link_ksettings->base.speed = SPEED_10; ++ link_ksettings->base.duplex = DUPLEX_FULL; ++ link_ksettings->base.port = PORT_TP; ++ link_ksettings->base.phy_address = 0; ++ link_ksettings->base.autoneg = AUTONEG_DISABLE; +#else static int vboxNetAdpEthGetSettings(struct net_device *pNetDev, struct ethtool_cmd *cmd) -+#endif { -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 20, 0) -+ struct ethtool_cmd *cmd = kzalloc(sizeof(struct ethtool_cmd), GFP_KERNEL); -+ if (!cmd) -+ return 1; -+ convert_link_ksettings_to_legacy_settings(cmd, link_ksettings); -+#endif cmd->supported = 0; - cmd->advertising = 0; - #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27) -@@ -218,6 +279,9 @@ static int vboxNetAdpEthGetSettings(stru +@@ -218,6 +235,7 @@ static int vboxNetAdpEthGetSettings(stru cmd->autoneg = AUTONEG_DISABLE; cmd->maxtxpkt = 0; cmd->maxrxpkt = 0; -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 20, 0) -+ kfree(cmd); +#endif return 0; } -Index: VirtualBox-5.2.20/src/VBox/Runtime/r0drv/linux/time-r0drv-linux.c +Index: VirtualBox-5.2.22/src/VBox/Runtime/r0drv/linux/time-r0drv-linux.c =================================================================== ---- VirtualBox-5.2.20.orig/src/VBox/Runtime/r0drv/linux/time-r0drv-linux.c -+++ VirtualBox-5.2.20/src/VBox/Runtime/r0drv/linux/time-r0drv-linux.c +--- VirtualBox-5.2.22.orig/src/VBox/Runtime/r0drv/linux/time-r0drv-linux.c ++++ VirtualBox-5.2.22/src/VBox/Runtime/r0drv/linux/time-r0drv-linux.c @@ -171,11 +171,19 @@ RTDECL(PRTTIMESPEC) RTTimeNow(PRTTIMESPE { IPRT_LINUX_SAVE_EFL_AC(); @@ -127,10 +80,10 @@ Index: VirtualBox-5.2.20/src/VBox/Runtime/r0drv/linux/time-r0drv-linux.c #else /* < 2.6.16 */ struct timeval Tv; do_gettimeofday(&Tv); -Index: VirtualBox-5.2.20/include/iprt/time.h +Index: VirtualBox-5.2.22/include/iprt/time.h =================================================================== ---- VirtualBox-5.2.20.orig/include/iprt/time.h -+++ VirtualBox-5.2.20/include/iprt/time.h +--- VirtualBox-5.2.22.orig/include/iprt/time.h ++++ VirtualBox-5.2.22/include/iprt/time.h @@ -54,7 +54,6 @@ typedef struct RTTIMESPEC int64_t i64NanosecondsRelativeToUnixEpoch; } RTTIMESPEC; @@ -173,10 +126,10 @@ Index: VirtualBox-5.2.20/include/iprt/time.h #endif /* various ways of detecting struct timespec */ -Index: VirtualBox-5.2.20/src/VBox/Additions/linux/drm/vbox_fb.c +Index: VirtualBox-5.2.22/src/VBox/Additions/linux/drm/vbox_fb.c =================================================================== ---- VirtualBox-5.2.20.orig/src/VBox/Additions/linux/drm/vbox_fb.c -+++ VirtualBox-5.2.20/src/VBox/Additions/linux/drm/vbox_fb.c +--- VirtualBox-5.2.22.orig/src/VBox/Additions/linux/drm/vbox_fb.c ++++ VirtualBox-5.2.22/src/VBox/Additions/linux/drm/vbox_fb.c @@ -297,8 +297,12 @@ static int vboxfb_create(struct drm_fb_h * The last flag forces a mode set on VT switches even if the kernel * does not think it is needed. diff --git a/virtualbox.changes b/virtualbox.changes index ac4c90d..d26eada 100644 --- a/virtualbox.changes +++ b/virtualbox.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Nov 27 01:04:06 UTC 2018 - Larry Finger + +- Fix the changes for kernel 4.20 API differences. The previous version compiled but had an error in logic. + ------------------------------------------------------------------- Fri Nov 9 19:30:20 UTC 2018 - Larry Finger