Hello community, here is the log from the commit of package virtualbox.12285 for openSUSE:Leap:15.1:Update checked in at 2020-04-11 14:16:17 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Leap:15.1:Update/virtualbox.12285 (Old) and /work/SRC/openSUSE:Leap:15.1:Update/.virtualbox.12285.new.3248 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "virtualbox.12285" Sat Apr 11 14:16:17 2020 rev:1 rq:792443 version:6.0.18 Changes: -------- New Changes file: --- /dev/null 2020-04-01 01:12:57.297512941 +0200 +++ /work/SRC/openSUSE:Leap:15.1:Update/.virtualbox.12285.new.3248/virtualbox.changes 2020-04-11 14:16:22.116055995 +0200 @@ -0,0 +1,6120 @@ +------------------------------------------------------------------- +Wed Apr 8 01:46:39 UTC 2020 - Larry Finger <larry.fin...@gmail.com> + +- Deleted file "fixes_for_5.3.patch" - fixed upstream. + +- Version bump to 6.0.18 (released February 21 2020 by Oracle) + + This is a maintenance release. The following items were fixed and/or added: + + GUI: Update medium location shown im VM details when the Virtual Media Manager was used to move it + Virtualization core: Ignore writes to MSR_IA32_TSX_CTRL to avoid Windows 10 VM crashes on very new Intel CPUs (bug #19169) + DVD: Fix possible crash when ejecting the medium + USB: Fix isochronous transfers to the VM for xHCI + Serial: Avoid hangs due to inconsistent handshake signals when the config keeps it is disconnected + Serial: Improve host serial port passthrough handling on Windows host + VBoxManage: fixed creating a new VM using the default settings parameter (bug #19310) + Linux guest: Support Linux 5.5 (bug #19145) + Linux guest: Shared folder fix for loopback mounting of images + +- Version bump to 6.0.16 (released January 14 2020 by Oracle) + + This is a maintenance release. The following items were fixed and/or added: + + Virtualization core: fixed delivery of debug exceptions when the guest single-steps under certain rare conditions (6.0.0 regression) + Virtualization core: fixed performance issue observed with Windows XP guests on AMD hosts (6.0.0 regression; bug #19152) + Storage: Fix crash when using host DVD drive without medium + Graphics: Improved fix for flickering on Windows host + Audio: fixed crash in the HDA emulation when using multi-speaker configurations + VBoxManage: fix "updateguestadditions" sub-command of "guestcontrol" + VBoxManage: show graphics controller type in VM info + API: support Python 3.8 + Linux host: fix systemd service dependency for web service + Linux host: Support Linux 5.5 (guest additions not yet) + Linux host and guest: Support Linux 5.4 (bug #18945) + Windows guest: Many fixes for drawing problems in the driver for VBoxSVGA + 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) + Linux guest: Fix missing symbol issue for shared folder kernel module affecting some Linux 4.x kernels (bug #18926) + macOS Guest Additions: Fix permissions of the uninstall tool (bug #19044) + +- Version bump to 6.0.14 (released October 15 2019 by Oracle) + + This is a maintenance release. The following items were fixed and/or added: + + Virtualization core: fixed an invalid-guest state guru meditation in some rare circumstances on Intel hosts + Virtualization core: some fixes for systems with lots of processors + Audio: relaxed VRM / VRA (variable rate audio) bit checks to provide more compatibility for guests running ALSA setups with the AC'97 emulation + USB: made device capturing for passthrough more accurate and reliable on Windows host + Network: fixed potential issue with interrupt signalling for network adapters in UEFI guests + 3D: fixed flicker and redraw issues when using VBoxSVGA or VMSVGA graphics adapter (bugs #18562, #18956) + 3D: fixed crash with some applications when using VBoxSVGA or VMSVGA graphics adapter (bug #18638) + Linux host: support Linux 5.3, thank you Larry Finger (see also bug #18911) + Linux host: improve python version detection during rpm package creation, can change package dependencies and fix some installation problems + Linux guests: calls to aio_read(3) and aio_write(3) may fail inside shared folders (bug #18805) + Linux guests: fix problem with shared folder unmounting in service script, thank you Denis Ryndine (bug #18853) + Linux guests: VBox 6.0.10 GAs fail to compile on Red Hat/CentOS/Oracle Linux 7.7 and Red Hat 8.1 Beta (bug #18917) + +------------------------------------------------------------------- +Sun Sep 8 05:01:47 UTC 2019 - Larry Finger <larry.fin...@gmail.com> + +Added file "README.build" to documentation with instructions for me and any eventual successors. + +- Version update to 6.0.12 (released September 03 2019 by Oracle) + +This is a maintenance release. The following items were fixed and/or added: + +OCI export: handle empty disk image correctly +API: fix potential crash when using the medium I/O functionality +VBoxManage: fixed documentation of VBoxManage modifyvm uarttype documentation (bug #18759) +Network: scrub inbound TCP URG pointer, working around incorrect OOB handling +USB: Improved identification of power-saved devices on Windows hosts +Audio: in the AC97 work around buggy guest drivers which reprogram the sampling rate, breaking audio in and/or audio out +Linux host and guest: fix kernel module build for SLES 12 SP4 kernel +3D: fixed state saving and loading when the VBoxVGA graphics adapter is used with 3D enabled (bug #18802, 6.0.10 regression) +Windows guests: fixed mouse cursor visibility updating +Windows guests: fixed graphics corruption in Windows 10 search menu with VBoxSVGA adapter +Windows guests: fixed dwm.exe crashes related to the WDDM driver for VBoxSVGA adapter when the VM has lots of RAM +MacOS Guest Additions fail to start in 6.0.10 (bug #18793) +Windows guests: fixed crashes when using shared folders (bug #18766) +Linux guests: unprivileged users unable to create files inside shared folders (bug #18737) +Linux guests: improve compatibility of vboxvideo.ko kernel module build logic (bug #18869) + + +------------------------------------------------------------------- +Mon Jul 29 06:40:41 UTC 2019 - Larry Finger <larry.fin...@gmail.com> + +- Merge host kmp and guest kmp into a single kmp. The existence of two different kernel module + packages is believed to be the reason that it is possible for a new kernel not to include + the necessary kernel modules (boo#1142955). + Files "virtualbox-host-kmp-files" and "virtualbox-guest-kmp-files" are deleted. + File "virtualbox-kmp-files" is added. + Files "virtualbox-host-preamble" and virtualbox-guest-preamble" are deleted. + File "virtualbox-kmp-preamble" is added. + File "fix_conflict_between_host_and_guest.patch" is added. + +------------------------------------------------------------------- +Sat Jul 27 01:53:12 UTC 2019 - Larry Finger <larry.fin...@gmail.com> + +- Script vboxdrv.sh, which is called from the systemd service file, incorrectly called a routine + that does not exist when the kernel modules were not available. This call is changed to /sbin/vboxconfig + that will build the modules if the requisite packages are available. If that is not true, the + systemctl status vboxdrv will list the command needed to load the missing packages. This change + address part of boo#1142995. + +------------------------------------------------------------------- +Thu Jul 18 11:48:00 UTC 2019 - Larry Finger <larry.fin...@gmail.com> + +- Version update to 6.0.10 (released July 16 2019 by Oracle) + +This is a maintenance release. The following items were fixed and/or added: + +Various vulnerabilities are fixed (bsc#1141801) inclding +CVE-2019-2859 CVE-2019-2867 CVE-2019-2866 CVE-2019-2864 CVE-2019-2865 CVE-2019-1543 CVE-2019-2863 +CVE-2019-2848 CVE-2019-2877 CVE-2019-2873 CVE-2019-2874 CVE-2019-2875 CVE-2019-2876 CVE-2019-2850 + +User interface: fix issue inputing controller names (bug #11579) +User interface: fix resize problems with recent Linux hosts (bug #18677) +Serial: fixed guru meditation when raw mode is enabled (bug #18632) +Serial: fixed possible VM crash under certain circumstances +USB: Fixed "unrecoverable error" problems in OHCI emulation (bug #18593, 6.0.6 regression) +USB: improve captured device identification +VBoxManage: fix reversed reporting of audio input and output (thank you Socratis Kalogrianitis) +VBoxManage: fix controlling recording for running machine (bug #18723) +Guest control service: various fixes +Linux hosts: kernel module build fixes for various kernels (bug #18316) +Linux hosts: support UEFI secure boot driver signing on Ubuntu and Debian hosts (bug #11577) +Linux hosts: fix focus grabbing problems with recent Qt versions (builds from source only; thank you Fabian Vogt (SUSE) and Larry Finger; bug #18745) +Windows guests: many shared folders fixes +Windows guests: fix other services failing if seamless mode was not available +Linux guests: kernel module build fixes for various kernels (bugs #18677 and #18697; fixes by Larry Finger and Gianfranco Costamagna) +Linux guests: do not try to load old versions of libcrypt on recent guests in Guest Additions tools (bug #18682) +Linux guests: udev rules for guest kernel modules did not always take effect in time +Linux guests/VMSVGA: do not forget the guest screen size after a guest reboot +OS/2 guests: various shared folder fixes + +File "fixes_for_5.2.patch" is deleted - fixed upstream. +File "fixes_for_5.3.patch" is added to handle API changes in kernel 5.3. +File "fixes_for_Leap15.1.patch" is deleted - fixed upstream. +File "fixes_focus_steal.patch" is deleted - fixed upstream. + +------------------------------------------------------------------- +Mon Jul 15 19:31:05 UTC 2019 - Larry Finger <larry.fin...@gmail.com> + +- Revise instructions for case when VirtualBoxVM has the wrong privilege. + Rework conditional code when applying patch for SLE15_SP1. + File "fixes_for_SLE15.patch" deleted. + +------------------------------------------------------------------- +Sat Jul 6 02:24:37 UTC 2019 - Larry Finger <larry.fin...@gmail.com> + +- Fix Virtualbox for problem with stealing focus under Qt 5.13. File "fixes_focus_steal.patch" is added. + +------------------------------------------------------------------- +Mon Jun 10 18:09:09 UTC 2019 - Larry Finger <larry.fin...@gmail.com> + +- Fix build for SLE15 SP1 - add file "fixes_for_SLE15.patch" + +------------------------------------------------------------------- +Thu May 30 02:58:13 UTC 2019 - Larry Finger <larry.fin...@gmail.com> + +- Kernel 5.2, now in Kernel_HEAD_stardard, has some API changes. These are + handled in the new file "fixes_for_5.2.patch". + +------------------------------------------------------------------- +Tue May 28 03:58:33 UTC 2019 - Larry Finger <larry.fin...@gmail.com> + +- Unused file "fix_LTO_builds.patch" removed. + +------------------------------------------------------------------- +Mon May 27 09:07:45 UTC 2019 - Hans-Peter Jansen <h...@urpla.net> + +- separate vboxautostart.sh from vboxdrv.sh +- add vboxautostart.service +- clean up vboxdrv.sh +- fix build of vboxvideo kernel module by replacing the relative + drm include patch with an absolute include path (with sed) +- build vboxvideo kernel module for openSUSE >= 15.0 +- apply fixes_for_Leap15.1.patch conditionally only +- add minimal patch fixes_for_Leap42.3.patch to build for 42.3 +- fix path typo: %{_datadir}/pixmaps/virtalbox + -> %{_datadir}/pixmaps/virtualbox + +------------------------------------------------------------------- +Thu May 16 17:50:44 UTC 2019 - Larry Finger <larry.fin...@gmail.com> + +- Version bump to 6.0.8 (released May 13 2019 by Oracle) + +This is a maintenance release. The following items were fixed and/or added: + +Core: fix saved state resume failures (bugs #18265 and #18331) +User interface: show full file location in New Medium window. +User interface: fix mouse click pass-through problems in multi-screen virtual machines (6.0.6 regression, bug #18567) +Graphics: fixed a crash when powering off a VM without graphics controller (bug #18570) +API: partial fix for dealing with VM config conflicting with other VMs related to medium UUIDs, now correctly flags VM as inaccessible (bug #17908) +Linux hosts: fix kernel module build breakage in non-default build set-ups (bug #18620, thank you Ambroz Bizjak) +Linux hosts: fix kernel module build breakage in debug build set-ups (bug #18621, thank you Ambroz Bizjak) +Windows guests: notice file size increases in shared folders which were missed in certain cases +Linux guests: make shared folders work with Linux 3.16.35 ++++ 5923 more lines (skipped) ++++ between /dev/null ++++ and /work/SRC/openSUSE:Leap:15.1:Update/.virtualbox.12285.new.3248/virtualbox.changes New: ---- Fix_for_server_1.19.patch README.autostart README.build UserManual.pdf VirtualBox-6.0.18-patched.tar.bz2 _constraints _service fix_conflict_between_host_and_guest.patch fix_lib_search.patch fix_usb_rules.sh fixes_for_Leap42.3.patch fixes_for_Qt5.11.patch fixes_for_python.patch fixes_for_qt5.13.patch gcc5-real-support.patch internal-headers.patch modify_for_4_8_bo_move.patch remove_vbox_video_build.patch security_fixes.patch smap.diff switch_to_python3.4+.patch vbox-default-os-type.diff vbox-deprec-gsoap-service-proxies.diff vbox-disable-updates.diff vbox-fpie.diff vbox-gsoapssl-deps.diff vbox-no-build-dates.diff vbox-permissions_warning.diff vbox-python-detection.diff vbox-smc-napa.diff vbox-suid-warning.diff vbox-usb-warning.diff vbox-vboxadd-init-script.diff vbox-vboxdrv-init-script.diff vbox_fix_for_gcc7.patch vbox_remove_smp_mflags.patch vboxadd-service.service vboxautostart.service vboxautostart.sh vboxconfig.sh vboxdrv.service vboxdrv.sh vboxguestconfig.sh vboxweb-service.service vboxweb-service.sh virtualbox-60-vboxdrv.rules virtualbox-60-vboxguest.rules virtualbox-LocalConfig.kmk virtualbox-default.virtualbox virtualbox-fix-ui-background-color.patch virtualbox-kmp-files virtualbox-kmp-preamble virtualbox-patch-source.sh virtualbox-rpmlintrc virtualbox-sed-params.patch virtualbox-snpritnf-buffer-overflow.patch virtualbox-wrapper.sh virtualbox.changes virtualbox.spec ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ virtualbox.spec ++++++ ++++ 1094 lines (skipped) ++++++ Fix_for_server_1.19.patch ++++++ Index: VirtualBox-6.0.2/src/VBox/Additions/x11/vboxvideo/vboxvideo.c =================================================================== --- VirtualBox-6.0.2.orig/src/VBox/Additions/x11/vboxvideo/vboxvideo.c +++ VirtualBox-6.0.2/src/VBox/Additions/x11/vboxvideo/vboxvideo.c @@ -1236,7 +1236,11 @@ static Bool VBOXScreenInit(ScreenPtr pSc #endif /* Register block and wake-up handlers for getting new screen size hints. */ +#if XORG_VERSION_CURRENT >= 11900000 + RegisterBlockAndWakeupHandlers(vboxBlockHandler, (ServerWakeupHandlerProcPtr)NoopDDA, (pointer)pScrn); +#else RegisterBlockAndWakeupHandlers(vboxBlockHandler, (WakeupHandlerProcPtr)NoopDDA, (pointer)pScrn); +#endif /* software cursor */ miDCInitialize(pScreen, xf86GetPointerScreenFuncs()); Index: VirtualBox-6.0.2/src/VBox/Additions/x11/vboxvideo/pointer.c =================================================================== --- VirtualBox-6.0.2.orig/src/VBox/Additions/x11/vboxvideo/pointer.c +++ VirtualBox-6.0.2/src/VBox/Additions/x11/vboxvideo/pointer.c @@ -39,6 +39,10 @@ #include "cursorstr.h" #include "servermd.h" +#if XORG_VERSION_CURRENT >= 11900000 +#include <bits/sigset.h> +typedef __sigset_t sigset_t; +#endif #include "vboxvideo.h" #ifdef XORG_7X Index: VirtualBox-6.0.2/src/VBox/Additions/x11/vboxvideo/edid.c =================================================================== --- VirtualBox-6.0.2.orig/src/VBox/Additions/x11/vboxvideo/edid.c +++ VirtualBox-6.0.2/src/VBox/Additions/x11/vboxvideo/edid.c @@ -35,6 +35,10 @@ * Michael Thayer <michael.tha...@oracle.com> */ +#if XORG_VERSION_CURRENT >= 11900000 +#include <bits/sigset.h> +typedef __sigset_t sigset_t; +#endif #include "misc.h" #include "xf86DDC.h" #include "xf86Crtc.h" ++++++ README.autostart ++++++ Prerequisites ============= Users, that want to use the VirtualBox autostart feature, have to be members of the vboxusers group. E.g.: sudo usermod -aG vboxusers USERNAME Preparation =========== For each autostart user, add a section in /etc/vbox/autostart.cfg: USERNAME = { allow = true } Users work ========== The *first* time a user configures autostart, the command: VBoxManage setproperty autostartdbpath /etc/vbox needs to be run. Note: The autostart options are stored in the /etc/vbox file, and in the VM itself. If moving a VM, these options may need to be set again. Prepare a VM to start automatically: VBoxManage modifyvm <uuid|vmname> --autostart-enabled <on|off> Choose a shut down mode: VBoxManage modifyvm <uuid|vmname> --autostop-type <disabled|savestate|poweroff|acpishutdown> Restart the vboxdrv service to start the VMs in question sudo service vboxdrv restart ++++++ README.build ++++++ Instructions for creating a separate VirtualBox project and building the packages Although it is possible to modify a project at the openSUSE Build System (OBS), I have found it to be more convenient to use the various osc commands to create a local copy, edit it on my own computer to fix any problems, and then push the result to OBS. A. Create a new sub-project: 1. Branch the package: osc branch Virtualization virtualbox 2. Checkout the package using the "osc co" command listed B. Build the project: 1. Use "osc build" to build. This step is rather compute intensive and takes about an hour on my Toshiba laptop with a dual-core Intel Core i7 CPU with hyper-threading, 12 GB RAM, and an SSD. 2. The build results are stored in the /var/tmp/build-root tree. These files can occupy a lot of disc space, particularly when one builds several flavors. To keep from running out of space on the / partition, I mount /var/tmp on a separate partition. At present, I have used about 43 GiB in that partition. 3. Special flavors: When a new kernel is released, there may be several API changes that affect builds of the kernel modules used by VirtualBox. In Factory, the project that contains the latest kernels is "Kernel-HEAD-standard". To run a test build with this kernel, use the command "osc build Kernel-HEAD-standard". When switching between kernel projects, use of the "--clean" switch is advised, otherwise strange "missing library" messages will result. 4. On occasion, there may be breakage in the build when there is an update with python or Qt. Use the "--alternative-project=<xxx>" switch to force usage of the revised component. C. Steps to take with a new release: 1. When Orable releases a new version, you will need to download then new tarball from https://download.virtualbox.org/virtualbox/. While downloading the file, I also get the new UserManual.pdf. 2. openSUSE makes some changes to the tarball by running the command bash ./virtualbox-patch-source.sh <name of tarball just downloaded> This command unpacks the tar file, makes some modifications to the source, and recreates the tar file with "patched" in its name. Any further modifications are made by patches that are applied during the build process. Do NOT make any further changes to the tar file. 3. Edit the "Version" line near the start of virtualbox.spec to select the new version. 4. Use "osc rm <old version>" and "osc add <new version>" to get the new file into osc. The local build will work without these changes, but the remote operations will fail.` ++++++ _constraints ++++++ <?xml version="1.0"?> <constraints> <hardware> <physicalmemory> <size unit="M">8000</size> </physicalmemory> <disk> <size unit="G">5</size> </disk> </hardware> </constraints> ++++++ _service ++++++ <services> <service name="refresh_patches" mode="disabled"> <param name="changesgenerate">enable</param> </service> </services> ++++++ fix_conflict_between_host_and_guest.patch ++++++ Index: VirtualBox-6.0.10/src/VBox/Additions/common/VBoxGuest/VBoxGuest-haiku.c =================================================================== --- VirtualBox-6.0.10.orig/src/VBox/Additions/common/VBoxGuest/VBoxGuest-haiku.c +++ VirtualBox-6.0.10/src/VBox/Additions/common/VBoxGuest/VBoxGuest-haiku.c @@ -130,7 +130,7 @@ static struct vboxguest_module_info g_VB RTMemAllocExTag, RTMemContAlloc, RTMemContFree, - RTMemFreeEx, + RTMemFreeExG, RTMpIsCpuPossible, RTMpNotificationDeregister, RTMpNotificationRegister, ++++++ fix_lib_search.patch ++++++ Index: VirtualBox-6.0.12/configure =================================================================== --- VirtualBox-6.0.12.orig/configure +++ VirtualBox-6.0.12/configure @@ -1546,14 +1546,14 @@ EOF INCQT5="$q/include $q/include/QtCore" FLGQT5="-DQT_SHARED" I_INCQT5=`prefix_I "$INCQT5"` - LIBQT5="-L$q/lib -lQt5CoreVBox" + LIBQT5="-L$q/lib -L$q/usr/lib64 -lQt5CoreVBox" TOOLQT5="$q" if test_compile "$LIBQT5 $LIBPTHREAD $I_INCQT5 $FLGQT5" qt5 qt5 nofatal && test_execute_path "`L_to_PATH "$LIBQT5"`" nofatal; then foundqt5=2 # internal break; fi - LIBQT5="-L$q/lib -lQt5Core" + LIBQT5="-L$q/lib -L$q/usr/lib64 -lQt5Core" if test_compile "$LIBQT5 $LIBPTHREAD $I_INCQT5 $FLGQT5" qt5 qt5 nofatal && test_execute_path "`L_to_PATH "$LIBQT5"`" nofatal; then foundqt5=1 # no pkg-config, Qt directory Index: VirtualBox-6.0.12/src/VBox/Additions/common/crOpenGL/Makefile.kmk =================================================================== --- VirtualBox-6.0.12.orig/src/VBox/Additions/common/crOpenGL/Makefile.kmk +++ VirtualBox-6.0.12/src/VBox/Additions/common/crOpenGL/Makefile.kmk @@ -224,15 +224,7 @@ VBoxOGL_LIBS.win += \ $(PATH_STAGE_LIB)/additions/VBoxCrHgsmi$(VBOX_SUFF_LIB) if1of ($(KBUILD_TARGET), linux solaris freebsd) - ifdef VBOX_USE_SYSTEM_GL_HEADERS VBoxOGL_LIBS += Xcomposite Xdamage Xfixes Xext - else - VBoxOGL_LIBS += \ - $(PATH_STAGE_LIB)/libXcomposite.so \ - $(PATH_STAGE_LIB)/libXdamage.so \ - $(PATH_STAGE_LIB)/libXfixes.so \ - $(PATH_STAGE_LIB)/libXext.so - endif ifdef VBoxOGL_FAKEDRI ifeq ($(KBUILD_TARGET), freebsd) VBoxOGL_LIBS += \ ++++++ fix_usb_rules.sh ++++++ #!/bin/bash # script to disable USB passthru in /etc/udev/rules.d/60-vboxdrv.rules # if already disabled, clear the comment character sed -i 's/#SUBSYSTEM==\"usb/SUBSYSTEM==\"usb/' /etc/udev/rules.d/60-vboxdrv.rules # now comment the usb lines sed -i 's/SUBSYSTEM==\"usb/#SUBSYSTEM==\"usb/' /etc/udev/rules.d/60-vboxdrv.rules ++++++ fixes_for_Leap42.3.patch ++++++ Index: b/src/VBox/Additions/linux/sharedfolders/regops.c =================================================================== --- a/src/VBox/Additions/linux/sharedfolders/regops.c +++ b/src/VBox/Additions/linux/sharedfolders/regops.c @@ -1436,7 +1436,7 @@ DECLINLINE(int) vbsf_lock_user_pages(uin # elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 6, 0) ssize_t cPagesLocked = get_user_pages_unlocked(uPtrFrom, cPages, fWrite, 1 /*force*/, papPages); # elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 4, 168) && LINUX_VERSION_CODE < KERNEL_VERSION(4, 5, 0) - ssize_t cPagesLocked = get_user_pages_unlocked(current, current->mm, uPtrFrom, cPages, papPages, + ssize_t cPagesLocked = get_user_pages_unlocked(uPtrFrom, cPages, papPages, fWrite ? FOLL_WRITE | FOLL_FORCE : FOLL_FORCE); # elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 0, 0) ssize_t cPagesLocked = get_user_pages_unlocked(current, current->mm, uPtrFrom, cPages, fWrite, 1 /*force*/, papPages); ++++++ fixes_for_Qt5.11.patch ++++++ Index: VirtualBox-6.0.2/src/VBox/Frontends/VirtualBox/src/precomp_vcc.h =================================================================== --- VirtualBox-6.0.2.orig/src/VBox/Frontends/VirtualBox/src/precomp_vcc.h +++ VirtualBox-6.0.2/src/VBox/Frontends/VirtualBox/src/precomp_vcc.h @@ -83,6 +83,7 @@ #include <QtWidgets/qgraphicsitem.h> #include <QtWidgets/qgraphicslayoutitem.h> #include <QtWidgets/qgraphicswidget.h> +#include <QtWidgets/qbuttongroup.h> #include <QtCore/QMetaType> #include <QtGui/qevent.h> #include <QtGui/qtouchdevice.h> Index: VirtualBox-6.0.2/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsProxy.cpp =================================================================== --- VirtualBox-6.0.2.orig/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsProxy.cpp +++ VirtualBox-6.0.2/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsProxy.cpp @@ -18,6 +18,7 @@ /* Qt includes: */ #include <QButtonGroup> #include <QRegExpValidator> +#include <QButtonGroup> /* GUI includes: */ #include "QIWidgetValidator.h" ++++++ fixes_for_python.patch ++++++ To eliminate an rpmlint error, the shebang for this script should be changed to use python directly, rather than through env. When openSUSE switches to Python3, the shebang below should be changed to "#!/usr/bin/python3". Larry Finger Index: VirtualBox-5.1.30/src/VBox/Frontends/VBoxShell/vboxshell.py =================================================================== --- VirtualBox-5.1.30.orig/src/VBox/Frontends/VBoxShell/vboxshell.py +++ VirtualBox-5.1.30/src/VBox/Frontends/VBoxShell/vboxshell.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/python3 # -*- coding: utf-8 -*- # $Id: vboxshell.py $ ++++++ fixes_for_qt5.13.patch ++++++ Index: VirtualBox-6.0.6/include/VBox/VBoxGL2D.h =================================================================== --- VirtualBox-6.0.6.orig/include/VBox/VBoxGL2D.h +++ VirtualBox-6.0.6/include/VBox/VBoxGL2D.h @@ -113,7 +113,7 @@ typedef GLvoid (APIENTRY *PFNVBOXVHWA_UN /* GL_ARB_pixel_buffer_object*/ #ifndef Q_WS_MAC /* apears to be defined on mac */ -typedef ptrdiff_t GLsizeiptr; +typedef long int GLsizeiptr; #endif #ifndef GL_READ_ONLY Index: VirtualBox-6.0.6/include/VBox/HostServices/glext.h =================================================================== --- VirtualBox-6.0.6.orig/include/VBox/HostServices/glext.h +++ VirtualBox-6.0.6/include/VBox/HostServices/glext.h @@ -3395,7 +3395,10 @@ typedef char GLchar; /* native charact #ifndef GL_VERSION_1_5 /* GL types for handling large vertex buffer objects */ typedef ptrdiff_t GLintptr; +#if __BITS_PER_LONG != 64 typedef ptrdiff_t GLsizeiptr; +#else +typedef long int GLsizeiptr; #endif #ifndef GL_ARB_vertex_buffer_object Index: VirtualBox-6.0.6/src/VBox/Additions/3D/mesa/mesa-17.3.9/include/GL/glext.h =================================================================== --- VirtualBox-6.0.6.orig/src/VBox/Additions/3D/mesa/mesa-17.3.9/include/GL/glext.h +++ VirtualBox-6.0.6/src/VBox/Additions/3D/mesa/mesa-17.3.9/include/GL/glext.h @@ -465,7 +465,12 @@ GLAPI void APIENTRY glBlendEquation (GLe #ifndef GL_VERSION_1_5 #define GL_VERSION_1_5 1 #include <stddef.h> +#include <QtCore/qglobal.h> +#if __BITS_PER_LONG != 64 typedef ptrdiff_t GLsizeiptr; +#else +typedef long int GLsizeiptr; +#endif typedef ptrdiff_t GLintptr; #define GL_BUFFER_SIZE 0x8764 #define GL_BUFFER_USAGE 0x8765 Index: VirtualBox-6.0.6/src/VBox/Additions/x11/x11include/mesa-11.0.7/GL/glcorearb.h =================================================================== --- VirtualBox-6.0.6.orig/src/VBox/Additions/x11/x11include/mesa-11.0.7/GL/glcorearb.h +++ VirtualBox-6.0.6/src/VBox/Additions/x11/x11include/mesa-11.0.7/GL/glcorearb.h @@ -614,7 +614,11 @@ GLAPI void APIENTRY glBlendEquation (GLe #ifndef GL_VERSION_1_5 #define GL_VERSION_1_5 1 #include <stddef.h> +#if __BITS_PER_LONG != 64 typedef ptrdiff_t GLsizeiptr; +#else +typedef long int GLsizeiptr; +#endif typedef ptrdiff_t GLintptr; #define GL_BUFFER_SIZE 0x8764 #define GL_BUFFER_USAGE 0x8765 Index: VirtualBox-6.0.6/src/VBox/Additions/x11/x11include/mesa-11.0.7/GL/glext.h =================================================================== --- VirtualBox-6.0.6.orig/src/VBox/Additions/x11/x11include/mesa-11.0.7/GL/glext.h +++ VirtualBox-6.0.6/src/VBox/Additions/x11/x11include/mesa-11.0.7/GL/glext.h @@ -465,7 +465,11 @@ GLAPI void APIENTRY glBlendEquation (GLe #ifndef GL_VERSION_1_5 #define GL_VERSION_1_5 1 #include <stddef.h> +#if __BITS_PER_LONG != 64 typedef ptrdiff_t GLsizeiptr; +#else +typedef long int GLsizeiptr; +#endif typedef ptrdiff_t GLintptr; #define GL_BUFFER_SIZE 0x8764 #define GL_BUFFER_USAGE 0x8765 Index: VirtualBox-6.0.6/src/VBox/Additions/x11/x11include/mesa-7.2/GL/glext.h =================================================================== --- VirtualBox-6.0.6.orig/src/VBox/Additions/x11/x11include/mesa-7.2/GL/glext.h +++ VirtualBox-6.0.6/src/VBox/Additions/x11/x11include/mesa-7.2/GL/glext.h @@ -3708,7 +3708,11 @@ typedef char GLchar; /* native charact #ifndef GL_VERSION_1_5 /* GL types for handling large vertex buffer objects */ typedef ptrdiff_t GLintptr; +#if __BITS_PER_LONG != 64 typedef ptrdiff_t GLsizeiptr; +#else +typedef long int GLsizeiptr; +#endif #endif #ifndef GL_ARB_vertex_buffer_object Index: VirtualBox-6.0.6/src/VBox/Devices/Graphics/vmsvga_glext/glext.h =================================================================== --- VirtualBox-6.0.6.orig/src/VBox/Devices/Graphics/vmsvga_glext/glext.h +++ VirtualBox-6.0.6/src/VBox/Devices/Graphics/vmsvga_glext/glext.h @@ -6194,7 +6194,11 @@ typedef char GLchar; #ifndef GL_VERSION_1_5 /* GL types for handling large vertex buffer objects */ typedef ptrdiff_t GLintptr; +#if __BITS_PER_LONG != 64 typedef ptrdiff_t GLsizeiptr; +#else +typedef long int GLsizeiptr; +#endif #endif #ifndef GL_ARB_vertex_buffer_object Index: VirtualBox-6.0.6/src/VBox/GuestHost/OpenGL/include/GL/glext.h =================================================================== --- VirtualBox-6.0.6.orig/src/VBox/GuestHost/OpenGL/include/GL/glext.h +++ VirtualBox-6.0.6/src/VBox/GuestHost/OpenGL/include/GL/glext.h @@ -3717,7 +3717,11 @@ typedef char GLchar; /* native charact #ifndef GL_VERSION_1_5 /* GL types for handling large vertex buffer objects */ typedef ptrdiff_t GLintptr; +#if __BITS_PER_LONG != 64 typedef ptrdiff_t GLsizeiptr; +#else +typedef long int GLsizeiptr; +#endif #endif #ifndef GL_ARB_vertex_buffer_object Index: VirtualBox-6.0.6/src/VBox/GuestHost/OpenGL/include/chromium.h =================================================================== --- VirtualBox-6.0.6.orig/src/VBox/GuestHost/OpenGL/include/chromium.h +++ VirtualBox-6.0.6/src/VBox/GuestHost/OpenGL/include/chromium.h @@ -506,7 +506,11 @@ PROC WINAPI wglGetProcAddress_prox( LPCS #ifndef GL_VERSION_1_5 typedef ptrdiff_t GLintptr; +#if __BITS_PER_LONG != 64 typedef ptrdiff_t GLsizeiptr; +#else +typedef long int GLsizeiptr; +#endif /* prototype these functions for opengl_stub/getprocaddress.c */ extern void APIENTRY glGenQueries(GLsizei n, GLuint *ids); ++++++ gcc5-real-support.patch ++++++ Index: VirtualBox-5.2.0/configure =================================================================== --- VirtualBox-5.2.0.orig/configure +++ VirtualBox-5.2.0/configure @@ -429,8 +429,13 @@ check_gcc() log_failure "cannot execute '$CXX -dumpversion'" fail really fi - cc_maj=`echo $cc_ver|cut -d. -f1` - cc_min=`echo $cc_ver|cut -d. -f2` + if echo $cc_ver | grep -q '\.'; then + cc_maj=`echo $cc_ver|cut -d. -f1` + cc_min=`echo $cc_ver|cut -d. -f2` + else + cc_maj=$cc_ver + cc_min=0 + fi if [ "x$cc_ver" != "x$cxx_ver" ]; then log_failure "gcc version $cc_ver does not match g++ version $cxx_ver" fail really ++++++ internal-headers.patch ++++++ Index: VirtualBox-6.0.2/src/VBox/Additions/x11/vboxvideo/Makefile.kmk =================================================================== --- VirtualBox-6.0.2.orig/src/VBox/Additions/x11/vboxvideo/Makefile.kmk +++ VirtualBox-6.0.2/src/VBox/Additions/x11/vboxvideo/Makefile.kmk @@ -23,6 +23,9 @@ vboxvideo_70_DEFS := \ ifeq ($(KBUILD_TARGET),solaris) # don't use .solaris or anything here. vboxvideo_70_DEFS += __EXTENSIONS__ ## @todo Why this? endif +if1of ($(KBUILD_TARGET), linux) + vboxvideo_70_DEFS += _POSIX_SOURCE ## X requires POSIX extensions +endif vboxvideo_13_DEFS := $(vboxvideo_70_DEFS) VBOXVIDEO_13 vboxvideo_15_DEFS := \ $(vboxvideo_13_DEFS) NO_ANSIC PCIACCESS XSERVER_LIBPCIACCESS _XORG_SERVER_H_ _DIX_CONFIG_H_ Index: VirtualBox-6.0.2/src/VBox/Additions/x11/vboxvideo/edid.c =================================================================== --- VirtualBox-6.0.2.orig/src/VBox/Additions/x11/vboxvideo/edid.c +++ VirtualBox-6.0.2/src/VBox/Additions/x11/vboxvideo/edid.c @@ -35,10 +35,6 @@ * Michael Thayer <michael.tha...@oracle.com> */ -#if XORG_VERSION_CURRENT >= 11900000 -#include <bits/sigset.h> -typedef __sigset_t sigset_t; -#endif #include "misc.h" #include "xf86DDC.h" #include "xf86Crtc.h" Index: VirtualBox-6.0.2/src/VBox/Additions/x11/vboxvideo/pointer.c =================================================================== --- VirtualBox-6.0.2.orig/src/VBox/Additions/x11/vboxvideo/pointer.c +++ VirtualBox-6.0.2/src/VBox/Additions/x11/vboxvideo/pointer.c @@ -39,10 +39,6 @@ #include "cursorstr.h" #include "servermd.h" -#if XORG_VERSION_CURRENT >= 11900000 -#include <bits/sigset.h> -typedef __sigset_t sigset_t; -#endif #include "vboxvideo.h" #ifdef XORG_7X Index: VirtualBox-6.0.2/src/VBox/Additions/x11/vboxvideo/vboxvideo.h =================================================================== --- VirtualBox-6.0.2.orig/src/VBox/Additions/x11/vboxvideo/vboxvideo.h +++ VirtualBox-6.0.2/src/VBox/Additions/x11/vboxvideo/vboxvideo.h @@ -42,8 +42,8 @@ # pragma once #endif -#include <VBoxVideoGuest.h> -#include <VBoxVideo.h> +#include <VBox/Graphics/VBoxVideoGuest.h> +#include <VBox/Graphics/VBoxVideo.h> #include "version-generated.h" #define VBOX_VENDORID 0x80EE ++++++ modify_for_4_8_bo_move.patch ++++++ Index: VirtualBox-6.0.2/src/VBox/Runtime/r0drv/linux/alloc-r0drv-linux.c =================================================================== --- VirtualBox-6.0.2.orig/src/VBox/Runtime/r0drv/linux/alloc-r0drv-linux.c +++ VirtualBox-6.0.2/src/VBox/Runtime/r0drv/linux/alloc-r0drv-linux.c @@ -35,7 +35,7 @@ #include <iprt/assert.h> #include <iprt/errcore.h> #include "r0drv/alloc-r0drv.h" - +#include <linux/kmemleak.h> #if (defined(RT_ARCH_AMD64) || defined(DOXYGEN_RUNNING)) && !defined(RTMEMALLOC_EXEC_HEAP) # if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 23) @@ -294,6 +294,7 @@ DECLHIDDEN(int) rtR0MemAllocEx(size_t cb fFlags &= ~RTMEMHDR_FLAG_KMALLOC; pHdr = vmalloc(cb + sizeof(*pHdr)); } + kmemleak_not_leak(pHdr); } else pHdr = vmalloc(cb + sizeof(*pHdr)); ++++++ remove_vbox_video_build.patch ++++++ Index: VirtualBox-5.2.24/Makefile.kmk =================================================================== --- VirtualBox-5.2.24.orig/Makefile.kmk +++ VirtualBox-5.2.24/Makefile.kmk @@ -701,7 +701,6 @@ VBOX_CORE_DOXYFILE_INPUT_DIRS = \ src/VBox/Additions/x11/vboxmouse \ src/VBox/Additions/x11/vboxmouse/xorg70 \ src/VBox/Additions/x11/vboxmouse/xorg71 \ - src/VBox/Additions/x11/vboxvideo \ src/VBox/NetworkServices \ src/VBox/NetworkServices/DHCP \ src/VBox/NetworkServices/NAT \ Index: VirtualBox-5.2.24/src/VBox/Additions/x11/vboxvideo/Makefile.kmk =================================================================== --- VirtualBox-5.2.24.orig/src/VBox/Additions/x11/vboxvideo/Makefile.kmk +++ VirtualBox-5.2.24/src/VBox/Additions/x11/vboxvideo/Makefile.kmk @@ -398,7 +398,8 @@ vboxvideo_drv_118_INCS += $(PATH_ROOT)/s vboxvideo_drv_118_SOURCES := $(vboxvideo_drv_17_SOURCES) vboxvideo_drv_118_LIBS += $(vboxvideo_drv_70_LIBS) -ifdef VBOX_USE_SYSTEM_XORG_HEADERS +# Fix to never build +ifdef XX_VBOX_USE_SYSTEM_XORG_HEADERS # Build using local X.Org headers. We assume X.Org Server 1.7 or later. DLLS := $(filter-out vboxvideo_drv_%,$(DLLS)) vboxvideo_drv_system SYSMODS := $(filter-out vboxvideo_drv%,$(SYSMODS)) Index: VirtualBox-5.2.24/src/VBox/Additions/x11/Makefile.kmk =================================================================== --- VirtualBox-5.2.24.orig/src/VBox/Additions/x11/Makefile.kmk +++ VirtualBox-5.2.24/src/VBox/Additions/x11/Makefile.kmk @@ -22,7 +22,7 @@ include $(KBUILD_PATH)/subheader.kmk if1of ($(KBUILD_TARGET), freebsd linux netbsd openbsd solaris) include $(PATH_SUB_CURRENT)/VBoxClient/Makefile.kmk ifndef VBOX_NO_LEGACY_XORG_X11 - include $(PATH_SUB_CURRENT)/vboxvideo/Makefile.kmk +# include $(PATH_SUB_CURRENT)/vboxvideo/Makefile.kmk ifn1of ($(KBUILD_TARGET), netbsd solaris) include $(PATH_SUB_CURRENT)/vboxmouse/Makefile.kmk endif ++++++ security_fixes.patch ++++++ # This patch file is to warn future maintainers of VirtualBox on openSUSE # platforms that the distributed versions of vboxadd.sh and vboxdrv.sh # contain security holes. If you need to use these scripts in the future, # please consult the Security Group at openSUSE. # # January 31, 2019 - Larry Finger # Index: VirtualBox-6.0.6/src/VBox/Additions/linux/installer/vboxadd.sh =================================================================== --- VirtualBox-6.0.6.orig/src/VBox/Additions/linux/installer/vboxadd.sh +++ VirtualBox-6.0.6/src/VBox/Additions/linux/installer/vboxadd.sh @@ -489,9 +489,11 @@ dmnstatus() fi } -for i; do - case "$i" in quiet) QUIET=yes;; esac -done +echo "This script has insecurities. It must never be used in openSUSE without consultine Security." +exit 1 + +case "$2" in quiet) + QUIET=yes;; case "$1" in # Does setup without clean-up first and marks all kernels currently found on the # system so that we can see later if any were added. Index: VirtualBox-6.0.6/src/VBox/Installer/linux/vboxdrv.sh =================================================================== --- VirtualBox-6.0.6.orig/src/VBox/Installer/linux/vboxdrv.sh +++ VirtualBox-6.0.6/src/VBox/Installer/linux/vboxdrv.sh @@ -37,6 +37,9 @@ DEVICE=/dev/vboxdrv MODPROBE=/sbin/modprobe SCRIPTNAME=vboxdrv.sh +echo "This script has insecurities. It must never be used in openSUSE without consultine Security." +exit 1 + # The below is GNU-specific. See VBox.sh for the longer Solaris/OS X version. TARGET=`readlink -e -- "${0}"` || exit 1 SCRIPT_DIR="${TARGET%/[!/]*}" ++++++ smap.diff ++++++ Index: VirtualBox-5.1.4/src/VBox/HostDrivers/Support/linux/SUPDrv-linux.c =================================================================== --- VirtualBox-5.1.4.orig/src/VBox/HostDrivers/Support/linux/SUPDrv-linux.c +++ VirtualBox-5.1.4/src/VBox/HostDrivers/Support/linux/SUPDrv-linux.c @@ -50,6 +50,12 @@ # include <iprt/power.h> # define VBOX_WITH_SUSPEND_NOTIFICATION #endif +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 7, 0) +# include <asm/smap.h> +#else +static inline void clac(void) { } +static inline void stac(void) { } +#endif #include <linux/sched.h> #include <linux/miscdevice.h> ++++++ switch_to_python3.4+.patch ++++++ Index: VirtualBox-6.0.18/configure =================================================================== --- VirtualBox-6.0.18.orig/configure +++ VirtualBox-6.0.18/configure @@ -1977,17 +1977,17 @@ extern "C" int main(void) { Py_Initialize(); printf("found version %s", PY_VERSION); -#if PY_VERSION_HEX >= 0x02060000 +#if PY_VERSION_HEX >= 0x03040000 printf(", OK.\n"); return 0; #else - printf(", expected version 2.6 or higher\n"); + printf(", expected version 3.4 or higher\n"); return 1; #endif } EOF found= - SUPPYTHONLIBS="python2.7 python2.6 python3.1 python3.2 python3.3 python3.4 python3.4m python3.5 python3.5m python3.6 python3.6m python3.7 python3.7m python3.8 python3.8m" + SUPPYTHONLIBS="python3.4 python3.4m python3.5 python3.5m python3.6m python3.6 python3.7m python3.7 python3.7 python3.7m python3.8 python3.8m" for p in $PYTHONDIR; do for d in $SUPPYTHONLIBS; do for b in lib/x86_64-linux-gnu lib/i386-linux-gnu lib64 lib/64 lib; do Index: VirtualBox-6.0.18/src/VBox/Installer/linux/routines.sh =================================================================== --- VirtualBox-6.0.18.orig/src/VBox/Installer/linux/routines.sh +++ VirtualBox-6.0.18/src/VBox/Installer/linux/routines.sh @@ -393,11 +393,12 @@ maybe_run_python_bindings_installer() { VBOX_INSTALL_PATH="${1}" # Check for python2 only, because the generic package does not provide - # any XPCOM bindings support for python3 since there is no standard ABI. - for p in python python2 python2.6 python 2.7; do - if [ "`$p -c 'import sys -if sys.version_info >= (2, 6) and sys.version_info < (3, 0): - print \"test\"' 2> /dev/null`" = "test" ]; then + VBOX_INSTALL_PATH="${1}" + + PYTHON=python3 + if [ "`python3 -c 'import sys +if sys.version_info >= (2, 6): + print \"test\"' 2> /dev/null`" != "test" ]; then PYTHON=$p fi done Index: VirtualBox-6.0.18/src/bldprogs/scm.cpp =================================================================== --- VirtualBox-6.0.18.orig/src/bldprogs/scm.cpp +++ VirtualBox-6.0.18/src/bldprogs/scm.cpp @@ -2206,7 +2206,7 @@ static int scmProcessFileInner(PSCMRWSTA pszTreatAs = "shell"; else if ( (cchFirst >= 15 && strncmp(pchFirst, "/usr/bin/python", 15) == 0) || (cchFirst >= 19 && strncmp(pchFirst, "/usr/bin/env python", 19) == 0) ) - pszTreatAs = "python"; + pszTreatAs = "python3"; else if ( (cchFirst >= 13 && strncmp(pchFirst, "/usr/bin/perl", 13) == 0) || (cchFirst >= 17 && strncmp(pchFirst, "/usr/bin/env perl", 17) == 0) ) pszTreatAs = "perl"; Index: VirtualBox-6.0.18/src/libs/libxml2-2.9.4/configure =================================================================== --- VirtualBox-6.0.18.orig/src/libs/libxml2-2.9.4/configure +++ VirtualBox-6.0.18/src/libs/libxml2-2.9.4/configure @@ -15153,10 +15153,10 @@ PYTHON_SITE_PACKAGES= PYTHON_TESTS= pythondir= if test "$with_python" != "no" ; then - if test -x "$with_python/bin/python" + if test -x "$with_python/bin/python3" then - echo Found python in $with_python/bin/python - PYTHON="$with_python/bin/python" + echo Found python in $with_python/bin/python3 + PYTHON="$with_python/bin/python3" else if test -x "$with_python/python.exe" then @@ -15174,7 +15174,8 @@ if test "$with_python" != "no" ; then with_python=`$PYTHON -c "import sys; print(sys.exec_prefix)"` else # Extract the first word of "python python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5", so it can be a program name with args. -set dummy python python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5; ac_word=$2 +PYTHON=python3 +set dummy python3 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_PYTHON+:} false; then : Index: VirtualBox-6.0.18/src/VBox/ValidationKit/testboxscript/setup.sh =================================================================== --- VirtualBox-6.0.18.orig/src/VBox/ValidationKit/testboxscript/setup.sh +++ VirtualBox-6.0.18/src/VBox/ValidationKit/testboxscript/setup.sh @@ -652,7 +652,7 @@ import sys;\ x = sys.version_info[0] == 2 and (sys.version_info[1] >= 6 or (sys.version_info[1] == 5 and sys.version_info[2] >= 1));\ sys.exit(not x);\ "; - for python in python2.7 python2.6 python2.5 python; + for python in python3.6 python2.7 python2.6 python2.5 python; do python=`which ${python} 2> /dev/null` if [ -n "${python}" -a -x "${python}" ]; then Index: VirtualBox-6.0.18/src/VBox/Installer/linux/rpm/VirtualBox.tmpl.spec =================================================================== --- VirtualBox-6.0.18.orig/src/VBox/Installer/linux/rpm/VirtualBox.tmpl.spec +++ VirtualBox-6.0.18/src/VBox/Installer/linux/rpm/VirtualBox.tmpl.spec @@ -101,7 +101,7 @@ install -m 755 -d $RPM_BUILD_ROOT/usr/sh %if %{?with_python:1}%{!?with_python:0} (export VBOX_INSTALL_PATH=/usr/lib/virtualbox && \ cd ./sdk/installer && \ - %{vbox_python} ./vboxapisetup.py install --prefix %{_prefix} --root $RPM_BUILD_ROOT) + %{python3} ./vboxapisetup.py install --prefix %{_prefix} --root $RPM_BUILD_ROOT) %endif rm -rf sdk/installer mv nls $RPM_BUILD_ROOT/usr/share/virtualbox Index: VirtualBox-6.0.18/src/libs/libxml2-2.9.4/libxml.spec.in =================================================================== --- VirtualBox-6.0.18.orig/src/libs/libxml2-2.9.4/libxml.spec.in +++ VirtualBox-6.0.18/src/libs/libxml2-2.9.4/libxml.spec.in @@ -101,11 +101,11 @@ rm -fr %{buildroot} make install DESTDIR=%{buildroot} -%if 0%{?with_python3} +%if 0%{?with_python} make clean -%configure --with-python=%{__python3} +%configure --with-python=python3 make install DESTDIR=%{buildroot} -%endif # with_python3 +%endif # with_python rm -f $RPM_BUILD_ROOT%{_libdir}/*.la Index: VirtualBox-6.0.18/src/libs/libxml2-2.9.4/libxml2.spec =================================================================== --- VirtualBox-6.0.18.orig/src/libs/libxml2-2.9.4/libxml2.spec +++ VirtualBox-6.0.18/src/libs/libxml2-2.9.4/libxml2.spec @@ -103,7 +103,7 @@ make install DESTDIR=%{buildroot} %if 0%{?with_python3} make clean -%configure --with-python=%{__python3} +%configure --with-python=python3 make install DESTDIR=%{buildroot} %endif # with_python3 Index: VirtualBox-6.0.18/src/libs/xpcom18a4/python/src/ErrorUtils.cpp =================================================================== --- VirtualBox-6.0.18.orig/src/libs/xpcom18a4/python/src/ErrorUtils.cpp +++ VirtualBox-6.0.18/src/libs/xpcom18a4/python/src/ErrorUtils.cpp @@ -439,6 +439,8 @@ char *PyTraceback_AsString(PyObject *exc { // a temp scope so I can use temp locals. #if PY_MAJOR_VERSION <= 2 char *tempResult = PyString_AsString(obResult); +#elif PY_MINOR_VERSION <= 6 + char *tempResult = PyUnicode_AsUTF8(obResult); #else /* PyUnicode_AsUTF8() is const char * as of Python 3.7, char * earlier. */ const char *tempResult = (const char *)PyUnicode_AsUTF8(obResult); Index: VirtualBox-6.0.18/src/libs/xpcom18a4/python/src/PyGBase.cpp =================================================================== --- VirtualBox-6.0.18.orig/src/libs/xpcom18a4/python/src/PyGBase.cpp +++ VirtualBox-6.0.18/src/libs/xpcom18a4/python/src/PyGBase.cpp @@ -183,7 +183,11 @@ PyG_Base::~PyG_Base() // Get the correct interface pointer for this object given the IID. void *PyG_Base::ThisAsIID( const nsIID &iid ) { - if (this==NULL) return NULL; +#if PY_MINOR_VERSION <= 6 + if (!this) return NULL; +#else + if (!this) return NULL; +#endif if (iid.Equals(NS_GET_IID(nsISupports))) return (nsISupports *)(nsIInternalPython *)this; if (iid.Equals(NS_GET_IID(nsISupportsWeakReference))) ++++++ vbox-default-os-type.diff ++++++ Index: VirtualBox-6.0.0/src/VBox/Frontends/VirtualBox/src/widgets/UINameAndSystemEditor.cpp =================================================================== --- VirtualBox-6.0.0.orig/src/VBox/Frontends/VirtualBox/src/widgets/UINameAndSystemEditor.cpp +++ VirtualBox-6.0.0/src/VBox/Frontends/VirtualBox/src/widgets/UINameAndSystemEditor.cpp @@ -251,15 +251,15 @@ void UINameAndSystemEditor::sltFamilyCha if (iIndexWin7 != -1) m_pComboType->setCurrentIndex(iIndexWin7); } - /* Or select Oracle Linux item for Linux family as default: */ + /* Or select openSUSE item for Linux family as default: */ else if (m_strFamilyId == "Linux") { - QString strDefaultID = "Oracle"; + QString strDefaultID = "openSUSE"; if (ARCH_BITS == 64 && m_fSupportsHWVirtEx && m_fSupportsLongMode) strDefaultID += "_64"; - const int iIndexUbuntu = m_pComboType->findData(strDefaultID, TypeID); - if (iIndexUbuntu != -1) - m_pComboType->setCurrentIndex(iIndexUbuntu); + const int iIndexOpenSUSE = m_pComboType->findData(strDefaultID, TypeID); + if (iIndexOpenSUSE != -1) + m_pComboType->setCurrentIndex(iIndexOpenSUSE); } /* Else simply select the first one present: */ else ++++++ vbox-deprec-gsoap-service-proxies.diff ++++++ Index: VirtualBox-5.1.4/src/VBox/Main/webservice/Makefile.kmk =================================================================== --- VirtualBox-5.1.4.orig/src/VBox/Main/webservice/Makefile.kmk +++ VirtualBox-5.1.4/src/VBox/Main/webservice/Makefile.kmk @@ -724,7 +724,7 @@ $(VBOXWEB_OUT_DIR)/gsoap_generate_all_ts $(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) ifeq ($(KBUILD_TARGET),win) # MSC -Wall workaround. $(CP) -f "$(VBOXWEB_SOAP_CLIENT_H)" "$(VBOXWEB_SOAP_CLIENT_H).tmp" $(SED) -f $(VBOX_PATH_WEBSERVICE)/stdsoap2.sed --output "$(VBOXWEB_SOAP_CLIENT_H)" "$(VBOXWEB_SOAP_CLIENT_H).tmp" ++++++ vbox-disable-updates.diff ++++++ Index: VirtualBox-6.0.0/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsUpdate.cpp =================================================================== --- VirtualBox-6.0.0.orig/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsUpdate.cpp +++ VirtualBox-6.0.0/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsUpdate.cpp @@ -110,8 +110,8 @@ void UIGlobalSettingsUpdate::getFromCach /* Get old update data from the cache: */ const UIDataSettingsGlobalUpdate &oldUpdateData = m_pCache->base(); - /* Load old update data from the cache: */ - m_pCheckBoxUpdate->setChecked(oldUpdateData.m_fCheckEnabled); + /* Disable old update data from the cache: */ + m_pCheckBoxUpdate->setChecked(false); if (m_pCheckBoxUpdate->isChecked()) { m_pComboBoxUpdatePeriod->setCurrentIndex(oldUpdateData.m_periodIndex); Index: VirtualBox-6.0.0/src/VBox/Frontends/VirtualBox/src/settings/UISettingsDialogSpecific.cpp =================================================================== --- VirtualBox-6.0.0.orig/src/VBox/Frontends/VirtualBox/src/settings/UISettingsDialogSpecific.cpp +++ VirtualBox-6.0.0/src/VBox/Frontends/VirtualBox/src/settings/UISettingsDialogSpecific.cpp @@ -91,8 +91,6 @@ void UISettingsDialogGlobal::retranslate m_pSelector->setItemText(GlobalSettingsPageType_Input, tr("Input")); #ifdef VBOX_GUI_WITH_NETWORK_MANAGER - /* Update page: */ - m_pSelector->setItemText(GlobalSettingsPageType_Update, tr("Update")); #endif /* Language page: */ @@ -208,16 +206,6 @@ void UISettingsDialogGlobal::prepare() iPageIndex, "#input", pSettingsPage); break; } -#ifdef VBOX_GUI_WITH_NETWORK_MANAGER - /* Update page: */ - case GlobalSettingsPageType_Update: - { - pSettingsPage = new UIGlobalSettingsUpdate; - addItem(":/refresh_32px.png", ":/refresh_24px.png", ":/refresh_16px.png", - iPageIndex, "#update", pSettingsPage); - break; - } -#endif /* VBOX_GUI_WITH_NETWORK_MANAGER */ /* Language page: */ case GlobalSettingsPageType_Language: { ++++++ vbox-fpie.diff ++++++ Index: VirtualBox-5.1.4/Config.kmk =================================================================== --- VirtualBox-5.1.4.orig/Config.kmk +++ VirtualBox-5.1.4/Config.kmk @@ -4852,6 +4852,9 @@ TEMPLATE_VBOXR3HARDENEDEXE_LDFLAGS.darwi ifeq ($(KBUILD_TARGET),linux) # not necessary except USE_LIB_PCAP is defined in SUPR3HardenedMain.cpp # TEMPLATE_VBOXR3HARDENEDEXE_LIBS += cap + TEMPLATE_VBOXR3HARDENEDEXE_CXXFLAGS.linux = $(TEMPLATE_VBOXR3EXE_CXXFLAGS.linux) -fPIE + TEMPLATE_VBOXR3HARDENEDEXE_CFLAGS.linux = $(TEMPLATE_VBOXR3EXE_CFLAGS.linux) -fPIE + TEMPLATE_VBOXR3HARDENEDEXE_LDFLAGS.linux = $(TEMPLATE_VBOXR3EXE_LDFLAGS.linux) -pie endif ifeq ($(KBUILD_TARGET),win) # No CRT! TEMPLATE_VBOXR3HARDENEDEXE_SDKS = VBOX_NTDLL $(TEMPLATE_VBOXR3EXE_SDKS) @@ -4871,8 +4874,8 @@ ifeq ($(KBUILD_TARGET),win) # No CRT! TEMPLATE_VBOXR3HARDENEDEXE_LIBS.amd64 = $(NOT_SUCH_VARIABLE) else ifn1of ($(KBUILD_TARGET), os2 solaris) # We want to keep the RPATH on Solaris to be able to find libgcc_1/libstdc++ within $(VBOX_WITH_RUNPATH) - TEMPLATE_VBOXR3HARDENEDEXE_LDFLAGS = $(filter-out '$(VBOX_GCC_RPATH_OPT)%,$(TEMPLATE_VBOXR3EXE_LDFLAGS)) - TEMPLATE_VBOXR3HARDENEDEXE_LDFLAGS.linux = $(filter-out $(VBOX_GCC_ORIGIN_OPT),$(TEMPLATE_VBOXR3EXE_LDFLAGS.linux)) + TEMPLATE_VBOXR3HARDENEDEXE_LDFLAGS = $(filter-out '$(VBOX_GCC_RPATH_OPT)%,$(TEMPLATE_VBOXR3EXE_LDFLAGS)) -pie + TEMPLATE_VBOXR3HARDENEDEXE_LDFLAGS.linux = $(filter-out $(VBOX_GCC_ORIGIN_OPT),$(TEMPLATE_VBOXR3EXE_LDFLAGS.linux)) -pie endif # ++++++ vbox-gsoapssl-deps.diff ++++++ Index: VirtualBox-5.1.2/src/VBox/Main/webservice/Makefile.kmk =================================================================== --- VirtualBox-5.1.2.orig/src/VBox/Main/webservice/Makefile.kmk +++ VirtualBox-5.1.2/src/VBox/Main/webservice/Makefile.kmk @@ -303,6 +303,7 @@ endif vboxwebsrv_LIBS += \ $(PATH_STAGE_LIB)/vboxsoap$(VBOX_SUFF_LIB) \ $(VBOX_GSOAP_CXX_LIBS) \ + ssl crypto z \ $(LIB_RUNTIME) vboxwebsrv_LIBS.solaris += socket nsl ifdef VBOX_WITH_WEBSERVICES_SSL @@ -483,6 +484,7 @@ $$(VBOX_JWSSRC_JAR): $$(VBOX_JWS_JAR) | webtest_LIBS += \ $(PATH_STAGE_LIB)/vboxsoap$(VBOX_SUFF_LIB) \ $(VBOX_GSOAP_CXX_LIBS) \ + ssl crypto z \ $(LIB_RUNTIME) webtest_LIBS.solaris += nsl ifdef VBOX_WITH_WEBSERVICES_SSL ++++++ vbox-no-build-dates.diff ++++++ Index: VirtualBox-6.0.0/src/VBox/Frontends/VBoxFB/VBoxFB.cpp =================================================================== --- VirtualBox-6.0.0.orig/src/VBox/Frontends/VBoxFB/VBoxFB.cpp +++ VirtualBox-6.0.0/src/VBox/Frontends/VBoxFB/VBoxFB.cpp @@ -62,7 +62,7 @@ int main(int argc, char *argv[]) printf("VirtualBox DirectFB GUI built %s %s\n" "(C) 2004-" VBOX_C_YEAR " " VBOX_VENDOR "\n" - "(C) 2004-2005 secunet Security Networks AG\n", __DATE__, __TIME__); + "(C) 2004-2005 secunet Security Networks AG\n"); for (;;) { Index: VirtualBox-6.0.0/src/VBox/Runtime/common/string/uniread.cpp =================================================================== --- VirtualBox-6.0.0.orig/src/VBox/Runtime/common/string/uniread.cpp +++ VirtualBox-6.0.0/src/VBox/Runtime/common/string/uniread.cpp @@ -1036,7 +1036,7 @@ int PrintHeader(const char *argv0, const " * IPRT - Unicode Tables.\n" " *\n" " * Automatically Generated from %s\n" - " * by %s (" __DATE__ " " __TIME__ ")\n" + " * by %s\n" " */\n" "\n" "/*\n" Index: VirtualBox-6.0.0/src/libs/xpcom18a4/nsprpub/lib/libc/src/plvrsion.c =================================================================== --- VirtualBox-6.0.0.orig/src/libs/xpcom18a4/nsprpub/lib/libc/src/plvrsion.c +++ VirtualBox-6.0.0/src/libs/xpcom18a4/nsprpub/lib/libc/src/plvrsion.c @@ -42,16 +42,13 @@ /**************************IDENTITY AND VERSIONING***********************/ /************************************************************************/ #include "_pl_bld.h" -#if !defined(_BUILD_TIME) -#ifdef HAVE_LONG_LONG -#define _BUILD_TIME 0 -#else + +#undef _BUILD_TIME #define _BUILD_TIME {0, 0} -#endif -#endif -#if !defined(_BUILD_STRING) + +#undef _BUILD_STRING #define _BUILD_STRING "" -#endif + #if !defined(_PRODUCTION) #define _PRODUCTION "" #endif Index: VirtualBox-6.0.0/src/libs/xpcom18a4/nsprpub/pr/src/prvrsion.c =================================================================== --- VirtualBox-6.0.0.orig/src/libs/xpcom18a4/nsprpub/pr/src/prvrsion.c +++ VirtualBox-6.0.0/src/libs/xpcom18a4/nsprpub/pr/src/prvrsion.c @@ -44,16 +44,10 @@ #ifndef XP_MAC #include "_pr_bld.h" #endif -#if !defined(_BUILD_TIME) -#ifdef HAVE_LONG_LONG -#define _BUILD_TIME 0 -#else +#undef _BUILD_TIME #define _BUILD_TIME {0, 0} -#endif -#endif -#if !defined(_BUILD_STRING) +#undef _BUILD_STRING #define _BUILD_STRING "" -#endif #if !defined(_PRODUCTION) #define _PRODUCTION "" #endif Index: VirtualBox-6.0.0/src/libs/xpcom18a4/nsprpub/lib/prstreams/plvrsion.c =================================================================== --- VirtualBox-6.0.0.orig/src/libs/xpcom18a4/nsprpub/lib/prstreams/plvrsion.c +++ VirtualBox-6.0.0/src/libs/xpcom18a4/nsprpub/lib/prstreams/plvrsion.c @@ -42,16 +42,13 @@ /**************************IDENTITY AND VERSIONING***********************/ /************************************************************************/ #include "_pl_bld.h" -#if !defined(_BUILD_TIME) -#ifdef HAVE_LONG_LONG -#define _BUILD_TIME 0 -#else + +#undef _BUILD_TIME #define _BUILD_TIME {0, 0} -#endif -#endif -#if !defined(_BUILD_STRING) + +#undef _BUILD_STRING #define _BUILD_STRING "" -#endif + #if !defined(_PRODUCTION) #define _PRODUCTION "" #endif Index: VirtualBox-6.0.0/src/libs/xpcom18a4/nsprpub/lib/ds/plvrsion.c =================================================================== --- VirtualBox-6.0.0.orig/src/libs/xpcom18a4/nsprpub/lib/ds/plvrsion.c +++ VirtualBox-6.0.0/src/libs/xpcom18a4/nsprpub/lib/ds/plvrsion.c @@ -42,16 +42,13 @@ /**************************IDENTITY AND VERSIONING***********************/ /************************************************************************/ #include "_pl_bld.h" -#if !defined(_BUILD_TIME) -#ifdef HAVE_LONG_LONG -#define _BUILD_TIME 0 -#else + +#undef _BUILD_TIME #define _BUILD_TIME {0, 0} -#endif -#endif -#if !defined(_BUILD_STRING) + +#undef _BUILD_STRING #define _BUILD_STRING "" -#endif + #if !defined(_PRODUCTION) #define _PRODUCTION "" #endif Index: VirtualBox-6.0.0/src/VBox/HostServices/SharedOpenGL/OpenGLTest/OpenGLTestApp.cpp =================================================================== --- VirtualBox-6.0.0.orig/src/VBox/HostServices/SharedOpenGL/OpenGLTest/OpenGLTestApp.cpp +++ VirtualBox-6.0.0/src/VBox/HostServices/SharedOpenGL/OpenGLTest/OpenGLTestApp.cpp @@ -147,7 +147,7 @@ static int vboxInitLogging(const char *p #endif "Log opened %s\n", VBOX_VERSION_STRING, RTBldCfgRevision(), VBOX_BUILD_TARGET, - __DATE__, __TIME__, szTmp); + "openSUSE", "Buildservice", szTmp); vrc = RTSystemQueryOSInfo(RTSYSOSINFO_PRODUCT, szTmp, sizeof(szTmp)); if (RT_SUCCESS(vrc) || vrc == VERR_BUFFER_OVERFLOW) Index: VirtualBox-6.0.0/src/VBox/Devices/PC/BIOS/bios.c =================================================================== --- VirtualBox-6.0.0.orig/src/VBox/Devices/PC/BIOS/bios.c +++ VirtualBox-6.0.0/src/VBox/Devices/PC/BIOS/bios.c @@ -143,7 +143,7 @@ void set_mode(uint8_t mode); #define BX_PCIBIOS 1 #define BX_APPNAME "VirtualBox" -#define BIOS_BUILD_DATE __DATE__ +#define BIOS_BUILD_DATE "openSUSE Buildservice" //-------------------------------------------------------------------------- // print_bios_banner // displays a the bios version Index: VirtualBox-6.0.0/src/VBox/Additions/common/VBoxService/VBoxService.cpp =================================================================== --- VirtualBox-6.0.0.orig/src/VBox/Additions/common/VBoxService/VBoxService.cpp +++ VirtualBox-6.0.0/src/VBox/Additions/common/VBoxService/VBoxService.cpp @@ -242,7 +242,7 @@ static DECLCALLBACK(void) vgsvcLogHeader "VBoxService %s r%s (verbosity: %u) %s (%s %s) release log\n" "Log opened %s\n", RTBldCfgVersion(), RTBldCfgRevisionStr(), g_cVerbosity, VBOX_BUILD_TARGET, - __DATE__, __TIME__, szTmp); + "openSUSE", "Build Service", szTmp); int vrc = RTSystemQueryOSInfo(RTSYSOSINFO_PRODUCT, szTmp, sizeof(szTmp)); if (RT_SUCCESS(vrc) || vrc == VERR_BUFFER_OVERFLOW) Index: VirtualBox-6.0.0/src/VBox/ExtPacks/BusMouseSample/Makefile.kmk =================================================================== --- VirtualBox-6.0.0.orig/src/VBox/ExtPacks/BusMouseSample/Makefile.kmk +++ VirtualBox-6.0.0/src/VBox/ExtPacks/BusMouseSample/Makefile.kmk @@ -187,7 +187,7 @@ $(VBOX_PATH_PACKAGES)/$(VBOX_BUSMOUSE_MA $(VBoxBusMouseIns_0_OUTDIR)/Stage/ExtPack.manifest \ $(VBoxBusMouseIns_0_OUTDIR)/Stage/ExtPack.signature # Tar it up. - tar -cvf - -C $(VBoxBusMouseIns_0_OUTDIR)/Stage/ . | gzip -9c > $@ + tar -cvf - -C $(VBoxBusMouseIns_0_OUTDIR)/Stage/ . | gzip -9nc > $@ # Clean up $(RM) -Rf $(VBoxBusMouseIns_0_OUTDIR)/Stage/ Index: VirtualBox-6.0.0/src/VBox/ExtPacks/Skeleton/Makefile.kmk =================================================================== --- VirtualBox-6.0.0.orig/src/VBox/ExtPacks/Skeleton/Makefile.kmk +++ VirtualBox-6.0.0/src/VBox/ExtPacks/Skeleton/Makefile.kmk @@ -161,7 +161,7 @@ $(VBOX_PATH_PACKAGES)/$(VBOX_SKELETON_MA $(VBoxSkeletonIns_0_OUTDIR)/Stage/ExtPack.manifest \ $(VBoxSkeletonIns_0_OUTDIR)/Stage/ExtPack.signature # Tar it up. - tar -cvf - -C $(VBoxSkeletonIns_0_OUTDIR)/Stage/ . | gzip -9c > $@ + tar -cvf - -C $(VBoxSkeletonIns_0_OUTDIR)/Stage/ . | gzip -9nc > $@ # Clean up $(RM) -Rf $(VBoxSkeletonIns_0_OUTDIR)/Stage/ Index: VirtualBox-6.0.0/src/VBox/ExtPacks/VBoxDTrace/Makefile.kmk =================================================================== --- VirtualBox-6.0.0.orig/src/VBox/ExtPacks/VBoxDTrace/Makefile.kmk +++ VirtualBox-6.0.0/src/VBox/ExtPacks/VBoxDTrace/Makefile.kmk @@ -342,7 +342,7 @@ if defined(VBOX_WITH_EXTPACK_VBOXDTRACE) $(VBoxDTraceIns_0_OUTDIR)/Stage/ExtPack.manifest \ $(VBoxDTraceIns_0_OUTDIR)/Stage/ExtPack.signature # Tar it up. - tar -cvf - -C $(VBoxDTraceIns_0_OUTDIR)/Stage/ . | gzip -9c > $@ + tar -cvf - -C $(VBoxDTraceIns_0_OUTDIR)/Stage/ . | gzip -9nc > $@ # Clean up $(RM) -Rf $(VBoxDTraceIns_0_OUTDIR)/Stage/ Index: VirtualBox-6.0.0/src/VBox/ExtPacks/VNC/Makefile.kmk =================================================================== --- VirtualBox-6.0.0.orig/src/VBox/ExtPacks/VNC/Makefile.kmk +++ VirtualBox-6.0.0/src/VBox/ExtPacks/VNC/Makefile.kmk @@ -154,7 +154,7 @@ $(VBOX_PATH_PACKAGES)/$(VBOX_VNC_MANGLED $(VBoxVNCIns_0_OUTDIR)/Stage/ExtPack.manifest \ $(VBoxVNCIns_0_OUTDIR)/Stage/ExtPack.signature # Tar it up. - tar -cvf - -C $(VBoxVNCIns_0_OUTDIR)/Stage/ . | gzip -9c > $@ + tar -cvf - -C $(VBoxVNCIns_0_OUTDIR)/Stage/ . | gzip -9nc > $@ # Clean up $(RM) -Rf $(VBoxVNCIns_0_OUTDIR)/Stage/ Index: VirtualBox-6.0.0/src/VBox/Additions/common/VBoxGuest/VBoxGuest-win.cpp =================================================================== --- VirtualBox-6.0.0.orig/src/VBox/Additions/common/VBoxGuest/VBoxGuest-win.cpp +++ VirtualBox-6.0.0/src/VBox/Additions/common/VBoxGuest/VBoxGuest-win.cpp @@ -316,7 +316,7 @@ NTSTATUS DriverEntry(PDRIVER_OBJECT pDrv } VGDrvCommonInitLoggers(); - LogFunc(("Driver built: %s %s\n", __DATE__, __TIME__)); + LogFunc(("Driver built: %s %s\n", "no date", "no time")); /* * Check if the NT version is supported and initialize g_enmVGDrvNtVer. Index: VirtualBox-6.0.0/src/VBox/Additions/linux/lightdm-greeter/vbox-greeter.cpp =================================================================== --- VirtualBox-6.0.0.orig/src/VBox/Additions/linux/lightdm-greeter/vbox-greeter.cpp +++ VirtualBox-6.0.0/src/VBox/Additions/linux/lightdm-greeter/vbox-greeter.cpp @@ -872,7 +872,7 @@ static DECLCALLBACK(void) vboxGreeterLog "vbox-greeter %s r%s (verbosity: %d) %s (%s %s) release log\n" "Log opened %s\n", RTBldCfgVersion(), RTBldCfgRevisionStr(), g_iVerbosity, VBOX_BUILD_TARGET, - __DATE__, __TIME__, szTmp); + "no date", "no time", szTmp); int vrc = RTSystemQueryOSInfo(RTSYSOSINFO_PRODUCT, szTmp, sizeof(szTmp)); if (RT_SUCCESS(vrc) || vrc == VERR_BUFFER_OVERFLOW) Index: VirtualBox-6.0.0/src/VBox/Additions/solaris/Mouse/vboxms.c =================================================================== --- VirtualBox-6.0.0.orig/src/VBox/Additions/solaris/Mouse/vboxms.c +++ VirtualBox-6.0.0/src/VBox/Additions/solaris/Mouse/vboxms.c @@ -256,7 +256,7 @@ static VBMSSTATE g_OpenNodeSt int _init(void) { int rc; - LogRelFlow((DEVICE_NAME ": built on " __DATE__ " at " __TIME__ "\n")); + LogRelFlow((DEVICE_NAME ": built on " "no date" " at " "no time" "\n")); mutex_init(&g_OpenNodeState.InitMtx, NULL, MUTEX_DRIVER, NULL); /* * Prevent module autounloading. Index: VirtualBox-6.0.0/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/GenVtf/GenVtf.h =================================================================== --- VirtualBox-6.0.0.orig/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/GenVtf/GenVtf.h +++ VirtualBox-6.0.0/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/GenVtf/GenVtf.h @@ -102,7 +102,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF // #define UTILITY_MAJOR_VERSION 0 #define UTILITY_MINOR_VERSION 1 -#define UTILITY_DATE __DATE__ +#define UTILITY_DATE "no date" // // The maximum number of arguments accepted from the command line. Index: VirtualBox-6.0.0/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/VolInfo/VolInfo.c =================================================================== --- VirtualBox-6.0.0.orig/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/VolInfo/VolInfo.c +++ VirtualBox-6.0.0/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/VolInfo/VolInfo.c @@ -170,7 +170,7 @@ Returns: UTILITY_MAJOR_VERSION, UTILITY_MINOR_VERSION, __BUILD_VERSION, - __DATE__ + "no date" ); // Index: VirtualBox-6.0.0/src/VBox/HostDrivers/VBoxUSB/win/dev/VBoxUsbDev.cpp =================================================================== --- VirtualBox-6.0.0.orig/src/VBox/HostDrivers/VBoxUSB/win/dev/VBoxUsbDev.cpp +++ VirtualBox-6.0.0/src/VBox/HostDrivers/VBoxUSB/win/dev/VBoxUsbDev.cpp @@ -118,7 +118,7 @@ static NTSTATUS vboxUsbDdiAddDevice(PDRI static VOID vboxUsbDdiUnload(PDRIVER_OBJECT pDriverObject) { RT_NOREF1(pDriverObject); - LogRel(("VBoxUsb::DriverUnload. Built Date (%s) Time (%s)\n", __DATE__, __TIME__)); + LogRel(("VBoxUsb::DriverUnload. Built Date (%s) Time (%s)\n", "no date", "no time")); VBoxDrvToolStrFree(&g_VBoxUsbGlobals.RegPath); vboxUsbRtGlobalsTerm(); @@ -274,7 +274,7 @@ RT_C_DECLS_END NTSTATUS DriverEntry(IN PDRIVER_OBJECT pDriverObject, IN PUNICODE_STRING pRegistryPath) { - LogRel(("VBoxUsb::DriverEntry. Built Date (%s) Time (%s)\n", __DATE__, __TIME__)); + LogRel(("VBoxUsb::DriverEntry. Built Date (%s) Time (%s)\n", "no date", "no time")); NTSTATUS Status = vboxUsbRtGlobalsInit(); Assert(Status == STATUS_SUCCESS); Index: VirtualBox-6.0.0/src/VBox/HostDrivers/VBoxUSB/win/mon/VBoxUsbMon.cpp =================================================================== --- VirtualBox-6.0.0.orig/src/VBox/HostDrivers/VBoxUSB/win/mon/VBoxUsbMon.cpp +++ VirtualBox-6.0.0/src/VBox/HostDrivers/VBoxUSB/win/mon/VBoxUsbMon.cpp @@ -1936,7 +1936,7 @@ NTSTATUS _stdcall DriverEntry(PDRIVER_OB RTLogDestinations(0, "debugger"); #endif - LOGREL(("Built %s %s", __DATE__, __TIME__)); + LOGREL(("Built %s %s", "no date", "no time")); memset (&g_VBoxUsbMonGlobals, 0, sizeof (g_VBoxUsbMonGlobals)); #ifdef VBOX_USB3PORT Index: VirtualBox-6.0.0/src/VBox/Main/glue/VBoxLogRelCreate.cpp =================================================================== --- VirtualBox-6.0.0.orig/src/VBox/Main/glue/VBoxLogRelCreate.cpp +++ VirtualBox-6.0.0/src/VBox/Main/glue/VBoxLogRelCreate.cpp @@ -61,7 +61,7 @@ static DECLCALLBACK(void) vboxHeaderFoot #endif "Log opened %s\n", g_pszLogEntity, VBOX_VERSION_STRING, RTBldCfgRevision(), - RTBldCfgTargetDotArch(), __DATE__, __TIME__, szTmp); + RTBldCfgTargetDotArch(), "no date", "no time", szTmp); pfnLog(pReleaseLogger, "Build Type: %s\n", KBUILD_TYPE); int vrc = RTSystemQueryOSInfo(RTSYSOSINFO_PRODUCT, szTmp, sizeof(szTmp)); Index: VirtualBox-6.0.0/src/libs/xpcom18a4/nsprpub/pr/tests/depend.c =================================================================== --- VirtualBox-6.0.0.orig/src/libs/xpcom18a4/nsprpub/pr/tests/depend.c +++ VirtualBox-6.0.0/src/libs/xpcom18a4/nsprpub/pr/tests/depend.c @@ -141,7 +141,7 @@ int main(int argc, char **argv) { PRIntn tab = 0; const PRVersionInfo *info = DummyLibVersion(); - const char *buildDate = __DATE__, *buildTime = __TIME__; + const char *buildDate = "no date", *buildTime = "no time"; printf("Depend.c build time is %s %s\n", buildDate, buildTime); Index: VirtualBox-6.0.0/src/libs/xpcom18a4/xpcom/tests/StringFactoringTests/profile_main.cpp =================================================================== --- VirtualBox-6.0.0.orig/src/libs/xpcom18a4/xpcom/tests/StringFactoringTests/profile_main.cpp +++ VirtualBox-6.0.0/src/libs/xpcom18a4/xpcom/tests/StringFactoringTests/profile_main.cpp @@ -458,7 +458,7 @@ int main() { - cout << "String performance profiling. Compiled " __DATE__ " " __TIME__ << endl; + cout << "String performance profiling. Compiled nodate no time" << endl; #ifdef TEST_STD_STRING cout << "Testing std::string." << endl; #else Index: VirtualBox-6.0.0/src/libs/xpcom18a4/xpcom/tests/StringFactoringTests/test_main.cpp =================================================================== --- VirtualBox-6.0.0.orig/src/libs/xpcom18a4/xpcom/tests/StringFactoringTests/test_main.cpp +++ VirtualBox-6.0.0/src/libs/xpcom18a4/xpcom/tests/StringFactoringTests/test_main.cpp @@ -425,7 +425,7 @@ int main() { int tests_failed = 0; - cout << "String unit tests. Compiled " __DATE__ " " __TIME__ << endl; + cout << "String unit tests. Compiled no date no time" << endl; #if 0 { Index: VirtualBox-6.0.0/src/libs/xpcom18a4/xpcom/tests/TestCOMPtr.cpp =================================================================== --- VirtualBox-6.0.0.orig/src/libs/xpcom18a4/xpcom/tests/TestCOMPtr.cpp +++ VirtualBox-6.0.0/src/libs/xpcom18a4/xpcom/tests/TestCOMPtr.cpp @@ -102,7 +102,7 @@ class test_message public: test_message() { - printf("BEGIN unit tests for |nsCOMPtr|, compiled " __DATE__ "\n"); + printf("BEGIN unit tests for |nsCOMPtr|, compiled no date\n"); } ~test_message() Index: VirtualBox-6.0.0/src/VBox/Additions/3D/mesa/mesa-17.3.9/src/util/build_id.c =================================================================== --- VirtualBox-6.0.0.orig/src/VBox/Additions/3D/mesa/mesa-17.3.9/src/util/build_id.c +++ VirtualBox-6.0.0/src/VBox/Additions/3D/mesa/mesa-17.3.9/src/util/build_id.c @@ -29,9 +29,8 @@ #include "build_id.h" -#ifndef NT_GNU_BUILD_ID +#undef NT_GNU_BUILD_ID #define NT_GNU_BUILD_ID 3 -#endif #ifndef ElfW #define ElfW(type) Elf_##type ++++++ vbox-permissions_warning.diff ++++++ Index: VirtualBox-4.3.6/src/apps/Makefile.kmk =================================================================== --- VirtualBox-4.3.6.orig/src/apps/Makefile.kmk +++ VirtualBox-4.3.6/src/apps/Makefile.kmk @@ -34,5 +34,7 @@ if1of ($(KBUILD_TARGET),darwin solaris l endif endif +include $(PATH_SUB_CURRENT)/VBoxPermissionMessage/Makefile.kmk + include $(FILE_KBUILD_SUB_FOOTER) Index: VirtualBox-4.3.6/src/apps/VBoxPermissionMessage/Makefile.kmk =================================================================== --- /dev/null +++ VirtualBox-4.3.6/src/apps/VBoxPermissionMessage/Makefile.kmk @@ -0,0 +1,32 @@ +# $Id: Makefile.kmk 28800 2010-04-27 08:22:32Z vboxsync $ +## @file +# +# VBoxPermissionMessage is wrapper for suse users +# +# +# Copyright (C) 2009 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. +# + + +SUB_DEPTH = ../../.. +include $(KBUILD_PATH)/subheader.kmk + +PROGRAMS += VBoxPermissionMessage + +VBoxPermissionMessage_TEMPLATE = VBOXQTGUIEXE +VBoxPermissionMessage_SOURCES = VBoxPermissionMessage.cpp +VBoxPermissionMessage_QT_MODULES = Core Gui +VBoxPermissionMessage_QT_MODULES += Widgets + +#INSTALLS += VBoxPermissionMessage + +include $(KBUILD_PATH)/subfooter.kmk + Index: VirtualBox-4.3.6/src/apps/VBoxPermissionMessage/VBoxPermissionMessage.cpp =================================================================== --- /dev/null +++ VirtualBox-4.3.6/src/apps/VBoxPermissionMessage/VBoxPermissionMessage.cpp @@ -0,0 +1,12 @@ +#include <QtWidgets/QApplication> +#include <QtWidgets/QMessageBox> +int main(int argc, char *argv[]) +{ + QApplication app(argc, argv); + QMessageBox msgBox; + msgBox.setWindowTitle(QObject::tr("Permissions problem !")); + msgBox.setText(QObject::tr("You are not a member of the \"vboxusers\" group. Please add yourself to this group before starting VirtualBox. You could do it using: Yast / Security and Users / User and Group management. Don't forget re-login your user account!")); + int ret = msgBox.exec(); + app.quit(); + return 0; +} \ No newline at end of file ++++++ vbox-python-detection.diff ++++++ Index: VirtualBox-5.1.8/src/libs/xpcom18a4/python/gen_python_deps.py =================================================================== --- VirtualBox-5.1.8.orig/src/libs/xpcom18a4/python/gen_python_deps.py +++ VirtualBox-5.1.8/src/libs/xpcom18a4/python/gen_python_deps.py @@ -86,7 +86,7 @@ def main(argv): else: multi = 1 - if multi == 0: + if not multi: prefixes = ["/usr"] versions = [str(sys.version_info[0])+'.'+str(sys.version_info[1]), str(sys.version_info[0])+'.'+str(sys.version_info[1])+'m'] @@ -114,24 +114,25 @@ def main(argv): continue for p in prefixes: c = checkPair(p, v, dllpre, dllsuff, bitness_magic) - if c is not None: + if c: known[v] = c break - keys = list(known.keys()) - # we want default to be the lowest versioned Python - keys.sort() - d = None # We need separator other than newline, to sneak through $(shell) sep = "|" - for k in keys: - if d is None: - d = k - vers = k.replace('.', '').upper() - print_vars(vers, known[k], sep, bitness_magic) - if d is not None: - print_vars("DEF", known[d], sep, bitness_magic) + + if not known: + # this type of problem should be detected in configure + # print_vars("DEF", defaultpaths, sep, bitness_magic) + pass else: print(argv[0] + ": No Python development package found!", file=sys.stderr) + if multi: + for ver, paths in known.items(): + print_vars(ver.replace('.', '').upper(), paths, sep, bitness_magic) + else: + ver = versions[0] + paths = known[ver] + print_vars(ver.replace('.', ''), paths, sep, bitness_magic) if __name__ == '__main__': main(sys.argv) ++++++ vbox-smc-napa.diff ++++++ Index: VirtualBox-5.1.2/src/VBox/Devices/PC/vbox.dsl =================================================================== --- VirtualBox-5.1.2.orig/src/VBox/Devices/PC/vbox.dsl +++ VirtualBox-5.1.2/src/VBox/Devices/PC/vbox.dsl @@ -1179,7 +1179,7 @@ DefinitionBlock ("DSDT.aml", "DSDT", 1, Device (SMC) { Name (_HID, EisaId ("APP0001")) - Name (_CID, "smc-napa") + Name (_CID, "smcnapa") Method (_STA, 0, NotSerialized) { ++++++ vbox-suid-warning.diff ++++++ Index: VirtualBox-6.0.4/src/apps/Makefile.kmk =================================================================== --- VirtualBox-6.0.4.orig/src/apps/Makefile.kmk +++ VirtualBox-6.0.4/src/apps/Makefile.kmk @@ -33,5 +33,7 @@ include $(PATH_SUB_CURRENT)/VBoxPermissi include $(PATH_SUB_CURRENT)/VBoxUSB_DevRules/Makefile.kmk +include $(PATH_SUB_CURRENT)/VBoxSUIDMessage/Makefile.kmk + include $(FILE_KBUILD_SUB_FOOTER) Index: VirtualBox-6.0.4/src/apps/VBoxSUIDMessage/Makefile.kmk =================================================================== --- /dev/null +++ VirtualBox-6.0.4/src/apps/VBoxSUIDMessage/Makefile.kmk @@ -0,0 +1,33 @@ +# $Id: Makefile.kmk 28800 2010-04-27 08:22:32Z vboxsync $ +## @file +# +# VBoxSUIDMessage is wrapper for suse users +# +# +# Copyright (C) 2009 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. +# + + +SUB_DEPTH = ../../.. +include $(KBUILD_PATH)/subheader.kmk + +PROGRAMS += VBoxSUIDMessage + +VBoxSUIDMessage_TEMPLATE = VBOXQTGUIEXE +VBoxSUIDMessage_SOURCES = VBoxSUIDMessage.cpp +VBoxSUIDMessage_QT_MODULES = Core Gui +VBoxSUIDMessage_QT_MODULES += Widgets + +#INSTALLS += VBoxSUIDMessage + +include $(KBUILD_PATH)/subfooter.kmk + + Index: VirtualBox-6.0.4/src/apps/VBoxSUIDMessage/VBoxSUIDMessage.cpp =================================================================== --- /dev/null +++ VirtualBox-6.0.4/src/apps/VBoxSUIDMessage/VBoxSUIDMessage.cpp @@ -0,0 +1,15 @@ +#include <QtWidgets/QApplication> +#include <QtWidgets/QMessageBox> +int main(int argc, char *argv[]) +{ + QApplication app(argc, argv); + QMessageBox msgBox; + msgBox.setWindowTitle(QObject::tr("File Permissions problem !")); + msgBox.setText(QObject::tr("File VirtualBoxVM must be SUID, but the file permissions are wrong.\n\n" + "To fix this problem, please run\n" + "sudo chmod 4750 /usr/lib/virtualbox/VirtualBoxVM\n\n" + "Until this is done, Virtual Machines cannot run.")); + msgBox.exec(); + app.quit(); + return 0; +} ++++++ vbox-usb-warning.diff ++++++ Index: VirtualBox-5.1.22/src/apps/Makefile.kmk =================================================================== --- VirtualBox-5.1.22.orig/src/apps/Makefile.kmk +++ VirtualBox-5.1.22/src/apps/Makefile.kmk @@ -31,5 +31,7 @@ endif include $(PATH_SUB_CURRENT)/VBoxPermissionMessage/Makefile.kmk +include $(PATH_SUB_CURRENT)/VBoxUSB_DevRules/Makefile.kmk + include $(FILE_KBUILD_SUB_FOOTER) Index: VirtualBox-5.1.22/src/apps/VBoxUSB_DevRules/Makefile.kmk =================================================================== --- /dev/null +++ VirtualBox-5.1.22/src/apps/VBoxUSB_DevRules/Makefile.kmk @@ -0,0 +1,30 @@ +# $Id: Makefile.kmk 28800 2010-04-27 08:22:32Z vboxsync $ +## @file +# +# VBoxUSB_DevRules is wrapper for suse users +# +# 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. +# + + +SUB_DEPTH = ../../.. +include $(KBUILD_PATH)/subheader.kmk + +PROGRAMS += VBoxUSB_DevRules + +VBoxUSB_DevRules_TEMPLATE = VBOXQTGUIEXE +VBoxUSB_DevRules_SOURCES = VBoxUSB_DevRules.cpp +VBoxUSB_DevRules_QT_MODULES = Core Gui +VBoxUSB_DevRules_QT_MODULES += Widgets + +#INSTALLS += VBoxUSB_DevRules + +include $(KBUILD_PATH)/subfooter.kmk + + Index: VirtualBox-5.1.22/src/apps/VBoxUSB_DevRules/VBoxUSB_DevRules.cpp =================================================================== --- /dev/null +++ VirtualBox-5.1.22/src/apps/VBoxUSB_DevRules/VBoxUSB_DevRules.cpp @@ -0,0 +1,25 @@ +#include <QtWidgets/QApplication> +#include <QtWidgets/QMessageBox> +#include <QtWidgets/QPushButton>+ +int main(int argc, char *argv[]) +{ + QApplication app(argc, argv); + QMessageBox msgBox; + QPushButton *myYesButton = msgBox.addButton("Enable", QMessageBox::YesRole); + QPushButton *myNoButton = msgBox.addButton("Disable", QMessageBox::NoRole); + msgBox.setWindowTitle(QObject::tr("USB Rules and Permissions !")); + msgBox.setText(QObject::tr("USB passthrough requires read/write access to USB devices. " + "As a result, it opens a security hole.\n\n" + "Nonetheless, this feature is extremely useful and it may be worth the security risk. " + "Thus the code defaults to enabling it.\n\nIf you agree that the risk is acceptable, then click 'Enable'.\n" + "You will not be asked this question again when VB is updated. If you later change your mind, run 'rm ~/.vbox/*'\n\n" + "If you wish to disable USB passthrough to plug the security hole, then click 'Disable'. " + "You will be asked for the system password, and /etc/udev/rules.d/60-vboxdrv.rules will be changed.\n\n" + "These changes cannot be preserved through VB updates, thus this screen will be displayed again at that time.")); + msgBox.exec(); + app.quit(); + if (msgBox.clickedButton() == myYesButton) + return 0; + return 1; +} + ++++++ vbox-vboxadd-init-script.diff ++++++ Index: VirtualBox-6.0.10/src/VBox/Additions/linux/installer/vboxadd.sh =================================================================== --- VirtualBox-6.0.10.orig/src/VBox/Additions/linux/installer/vboxadd.sh +++ VirtualBox-6.0.10/src/VBox/Additions/linux/installer/vboxadd.sh @@ -26,11 +26,14 @@ # Provides: vboxadd # Required-Start: # Required-Stop: -# Default-Start: 2 3 4 5 +# Should-Start: $remote_fs +# Should-Stop: $remote_fs +# Default-Start: 2 3 5 # Default-Stop: 0 1 6 # X-Start-Before: display-manager # X-Service-Type: oneshot # Description: VirtualBox Linux Additions kernel modules +# Short-Description: VirtualBox Linux Additions kernel modules ### END INIT INFO ## @todo This file duplicates a lot of script with vboxdrv.sh. When making @@ -121,20 +124,11 @@ module_build_log() dev=/dev/vboxguest userdev=/dev/vboxuser -config=/var/lib/VBoxGuestAdditions/config owner=vboxadd group=1 -if test -r $config; then - . $config -else - fail "Configuration file $config not found" -fi -test -n "$INSTALL_DIR" -a -n "$INSTALL_VER" || - fail "Configuration file $config not complete" MODULE_SRC="$INSTALL_DIR/src/vboxguest-$INSTALL_VER" BUILDINTMP="$MODULE_SRC/build_in_tmp" - running_vboxguest() { lsmod | grep -q "vboxguest[^_-]" @@ -177,12 +171,6 @@ do_vboxguest_non_udev() fail "Cannot create device $dev with major $maj and minor $min" } fi - chown $owner:$group $dev 2>/dev/null || { - rm -f $dev 2>/dev/null - rm -f $userdev 2>/dev/null - rmmod vboxguest 2>/dev/null - fail "Cannot change owner $owner:$group for device $dev" - } if [ ! -c $userdev ]; then maj=10 @@ -193,12 +181,6 @@ do_vboxguest_non_udev() rmmod vboxguest 2>/dev/null fail "Cannot create device $userdev with major $maj and minor $min" } - chown $owner:$group $userdev 2>/dev/null || { - rm -f $dev 2>/dev/null - rm -f $userdev 2>/dev/null - rmmod vboxguest 2>/dev/null - fail "Cannot change owner $owner:$group for device $userdev" - } fi fi } @@ -260,7 +242,7 @@ cleanup_modules() done if test -z "${keep}"; then rm -rf /lib/modules/"${KERN_VER}" - rm -f /boot/initrd.img-"${KERN_VER}" + rm -f /boot/initrd.img-"${KERN_VER}" fi done for i in ${OLDMODULES}; do @@ -359,9 +341,9 @@ create_udev_rule() udevcontrol reload_rules >/dev/null 2>&1 || true fi } - -create_module_rebuild_script() -{ + # And an rc file to re-build the kernel modules and re-set-up the X server. + ln -sf "$lib_path/$PACKAGE/vboxadd" /sbin/rcvboxadd + #ln -sf "$lib_path/$PACKAGE/vboxadd-x11" /sbin/rcvboxadd-x11 # And a post-installation script for rebuilding modules when a new kernel # is installed. mkdir -p /etc/kernel/postinst.d /etc/kernel/prerm.d @@ -406,47 +388,15 @@ shared_folder_setup() # setup_script setup() { - # chcon is needed on old Fedora/Redhat systems. No one remembers which. - test ! -e /etc/selinux/config || - chcon -t bin_t "$BUILDINTMP" 2>/dev/null - - if test -z "$INSTALL_NO_MODULE_BUILDS"; then - info "Building the VirtualBox Guest Additions kernel modules. This may take a while." - info "To build modules for other installed kernels, run" - info " /sbin/rcvboxadd quicksetup <version>" - info "or" - info " /sbin/rcvboxadd quicksetup all" - if test -d /lib/modules/"$TARGET_VER"/build; then - setup_modules "$TARGET_VER" - depmod - else - info "Kernel headers not found for target kernel $TARGET_VER. \ -Please install them and execute - /sbin/rcvboxadd setup" - fi - fi - create_vbox_user - create_udev_rule - test -n "${INSTALL_NO_MODULE_BUILDS}" || create_module_rebuild_script - shared_folder_setup - if running_vboxguest || running_vboxadd; then - info "Running kernel modules will not be replaced until the system is restarted" - fi - - # Put the X.Org driver in place. This is harmless if it is not needed. - # Also set up the OpenGL library. - myerr=`"${INSTALL_DIR}/init/vboxadd-x11" setup 2>&1` - test -z "${myerr}" || log "${myerr}" - - return 0 + begin "Recompiling VirtualBox kernel module, NOT. It has been packaged." + succ_msg } # cleanup_script cleanup() { - if test -z "${INSTALL_NO_MODULE_BUILDS}"; then - # Delete old versions of VBox modules. - cleanup_modules + # Delete old versions of VBox modules. + cleanup_modules depmod # Remove old module sources @@ -456,12 +406,13 @@ cleanup() fi # Clean-up X11-related bits - "${INSTALL_DIR}/init/vboxadd-x11" cleanup + #/sbin/rcvboxadd-x11 cleanup # Remove other files - if test -z "${INSTALL_NO_MODULE_BUILDS}"; then - rm -f /etc/kernel/postinst.d/vboxadd /etc/kernel/prerm.d/vboxadd - rmdir -p /etc/kernel/postinst.d /etc/kernel/prerm.d 2>/dev/null || true + rm /sbin/rcvboxadd 2>/dev/null + #rm /sbin/rcvboxadd-x11 2>/dev/null + rm -f /etc/kernel/postinst.d/vboxadd /etc/kernel/prerm.d/vboxadd + rmdir -p /etc/kernel/postinst.d /etc/kernel/prerm.d 2>/dev/null || true fi rm -f /sbin/mount.vboxsf 2>/dev/null rm -f /etc/udev/rules.d/60-vboxadd.rules 2>/dev/null @@ -494,7 +445,7 @@ start() rm -f $userdev || { fail "Cannot remove $userdev" } - $MODPROBE vboxguest >/dev/null 2>&1 || + $MODPROBE vboxguest >/dev/null 2>&1 || { fail "modprobe vboxguest failed" case "$no_udev" in 1) sleep .5;; Index: VirtualBox-6.0.10/src/VBox/Additions/linux/installer/vboxadd-service.sh =================================================================== --- VirtualBox-6.0.10.orig/src/VBox/Additions/linux/installer/vboxadd-service.sh +++ VirtualBox-6.0.10/src/VBox/Additions/linux/installer/vboxadd-service.sh @@ -26,7 +26,7 @@ # Provides: vboxadd-service # Required-Start: vboxadd # Required-Stop: vboxadd -# Default-Start: 2 3 4 5 +# Default-Start: 2 3 5 # Default-Stop: 0 1 6 # X-Conflicts-With: systemd-timesyncd.service # Description: VirtualBox Additions Service Index: VirtualBox-6.0.10/src/VBox/Installer/linux/vboxautostart-service.sh =================================================================== --- VirtualBox-6.0.10.orig/src/VBox/Installer/linux/vboxautostart-service.sh +++ VirtualBox-6.0.10/src/VBox/Installer/linux/vboxautostart-service.sh @@ -23,7 +23,7 @@ # Provides: vboxautostart-service # Required-Start: vboxdrv # Required-Stop: vboxdrv -# Default-Start: 2 3 4 5 +# Default-Start: 2 3 5 # Default-Stop: 0 1 6 # Description: VirtualBox autostart service ### END INIT INFO Index: VirtualBox-6.0.10/src/VBox/Installer/linux/vboxballoonctrl-service.sh =================================================================== --- VirtualBox-6.0.10.orig/src/VBox/Installer/linux/vboxballoonctrl-service.sh +++ VirtualBox-6.0.10/src/VBox/Installer/linux/vboxballoonctrl-service.sh @@ -23,7 +23,7 @@ # Provides: vboxballoonctrl-service # Required-Start: vboxdrv # Required-Stop: vboxdrv -# Default-Start: 2 3 4 5 +# Default-Start: 2 3 5 # Default-Stop: 0 1 6 # Description: VirtualBox watchdog daemon ### END INIT INFO Index: VirtualBox-6.0.10/src/VBox/ValidationKit/testboxscript/linux/testboxscript-service.sh =================================================================== --- VirtualBox-6.0.10.orig/src/VBox/ValidationKit/testboxscript/linux/testboxscript-service.sh +++ VirtualBox-6.0.10/src/VBox/ValidationKit/testboxscript/linux/testboxscript-service.sh @@ -31,7 +31,7 @@ # Provides: testboxscript-service # Required-Start: $network # Required-Stop: -# Default-Start: 2 3 4 5 +# Default-Start: 2 3 5 # Default-Stop: 0 1 6 # Description: TestBoxScript service ### END INIT INFO Index: VirtualBox-6.0.10/src/VBox/ValidationKit/utils/TestExecServ/linux/vboxtxs-nat.sh =================================================================== --- VirtualBox-6.0.10.orig/src/VBox/ValidationKit/utils/TestExecServ/linux/vboxtxs-nat.sh +++ VirtualBox-6.0.10/src/VBox/ValidationKit/utils/TestExecServ/linux/vboxtxs-nat.sh @@ -31,7 +31,7 @@ # Provides: vboxtxs # Required-Start: $network # Required-Stop: -# Default-Start: 2 3 4 5 +# Default-Start: 2 3 5 # Default-Stop: 0 1 6 # Description: VirtualBox Test Execution Service ### END INIT INFO Index: VirtualBox-6.0.10/src/VBox/ValidationKit/utils/TestExecServ/linux/vboxtxs.sh =================================================================== --- VirtualBox-6.0.10.orig/src/VBox/ValidationKit/utils/TestExecServ/linux/vboxtxs.sh +++ VirtualBox-6.0.10/src/VBox/ValidationKit/utils/TestExecServ/linux/vboxtxs.sh @@ -31,7 +31,7 @@ # Provides: vboxtxs # Required-Start: $network # Required-Stop: -# Default-Start: 2 3 4 5 +# Default-Start: 2 3 5 # Default-Stop: 0 1 6 # Description: VirtualBox Test Execution Service ### END INIT INFO ++++++ vbox-vboxdrv-init-script.diff ++++++ Index: VirtualBox-6.0.10/src/VBox/Installer/linux/vboxdrv.sh =================================================================== --- VirtualBox-6.0.10.orig/src/VBox/Installer/linux/vboxdrv.sh +++ VirtualBox-6.0.10/src/VBox/Installer/linux/vboxdrv.sh @@ -19,11 +19,12 @@ # ### BEGIN INIT INFO # Provides: vboxdrv -# Required-Start: $syslog -# Required-Stop: -# Default-Start: 2 3 4 5 +# Required-Start: $syslog $remote_fs +# Required-Stop: $syslog $remote_fs +# Default-Start: 2 3 5 # Default-Stop: 0 1 6 -# Short-Description: VirtualBox Linux kernel module +# Short-Description: VirtualBox Linux module +# Description: VirtualBox Linux kernel module ### END INIT INFO ## @todo This file duplicates a lot of script with vboxadd.sh. When making @@ -312,13 +313,6 @@ See the documenatation for your Linux di fi fi # ensure permissions - if ! chown :"${GROUP}" $DEVICE 2>/dev/null; then - rmmod vboxpci 2>/dev/null - rmmod vboxnetadp 2>/dev/null - rmmod vboxnetflt 2>/dev/null - rmmod vboxdrv 2>/dev/null - failure "Cannot change group ${GROUP} for device $DEVICE" - fi if ! $MODPROBE vboxnetflt > /dev/null 2>&1; then failure "modprobe vboxnetflt failed. Please use 'dmesg' to find out why" fi @@ -448,48 +442,8 @@ cleanup() # setup_script setup() { - begin_msg "Building VirtualBox kernel modules" console - log "Building the main VirtualBox module." - 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 - 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 - log "Building the net adaptor 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 - 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 - rm -f /etc/vbox/module_not_compiled - depmod -a - sync - succ_msg "VirtualBox kernel modules built" +# Try to build the host kernel modules in case prepackaging has failed + /sbin/vboxconfig # Secure boot on Ubuntu and Debian. if test -n "$HAVE_SEC_BOOT" && type update-secureboot-policy >/dev/null 2>&1; then ++++++ vbox_fix_for_gcc7.patch ++++++ Index: VirtualBox-5.1.22/src/VBox/Devices/PC/ipxe/src/arch/i386/interface/pxe/pxe_preboot.c =================================================================== --- VirtualBox-5.1.22.orig/src/VBox/Devices/PC/ipxe/src/arch/i386/interface/pxe/pxe_preboot.c +++ VirtualBox-5.1.22/src/VBox/Devices/PC/ipxe/src/arch/i386/interface/pxe/pxe_preboot.c @@ -262,6 +262,7 @@ pxenv_restart_tftp ( struct s_PXENV_TFTP /* Restart NBP */ rmlongjmp ( pxe_restart_nbp, PXENV_RESTART_TFTP ); + return 0; } /* PXENV_START_UNDI ++++++ vbox_remove_smp_mflags.patch ++++++ Index: VirtualBox-5.1.16/src/libs/libxml2-2.9.4/libxml.spec.in =================================================================== --- VirtualBox-5.1.16.orig/src/libs/libxml2-2.9.4/libxml.spec.in +++ VirtualBox-5.1.16/src/libs/libxml2-2.9.4/libxml.spec.in @@ -94,7 +94,7 @@ at parse time or later once the document %build %configure -make %{_smp_mflags} +make %install rm -fr %{buildroot} Index: VirtualBox-5.1.16/src/libs/libxml2-2.9.4/libxml2.spec =================================================================== --- VirtualBox-5.1.16.orig/src/libs/libxml2-2.9.4/libxml2.spec +++ VirtualBox-5.1.16/src/libs/libxml2-2.9.4/libxml2.spec @@ -94,7 +94,7 @@ at parse time or later once the document %build %configure -make %{_smp_mflags} +make %install rm -fr %{buildroot} ++++++ vboxadd-service.service ++++++ [Unit] SourcePath=/etc/init.d/vboxadd-service Description=Start/Stop VirtualBox Guest Linux module After=remote-fs.target Wants=remote-fs.target [Service] Type=simple Restart=no TimeoutSec=5min IgnoreSIGPIPE=no KillMode=process GuessMainPID=no RemainAfterExit=yes SuccessExitStatus=5 6 ExecStart=/usr/lib/virtualbox/vboxadd-service start ExecStop=/usr/lib/virtualbox/vboxadd-service stop [Install] WantedBy=multi-user.target.wants ++++++ vboxautostart.service ++++++ [Unit] SourcePath=/usr/lib/virtualbox/vboxautostart.sh Description=VirtualBox Linux autostart module Requires=vboxdrv.service After=vboxdrv.service After=network.target After=time-sync.target After=nss-user-lookup.target [Service] ExecStart=/usr/lib/virtualbox/vboxautostart.sh start ExecStop=/usr/lib/virtualbox/vboxautostart.sh stop Type=oneshot RemainAfterExit=yes TimeoutStopSec=0 [Install] WantedBy=multi-user.target ++++++ vboxautostart.sh ++++++ #!/bin/sh # VirtualBox autostart service init script. # # Copyright (C) 2012-2019 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. # # chkconfig: 345 35 65 # description: VirtualBox autostart service # ### BEGIN INIT INFO # Provides: vboxautostart-service # Required-Start: vboxdrv # Required-Stop: vboxdrv # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Description: VirtualBox autostart service ### END INIT INFO PATH=/sbin:/bin:/usr/sbin:/usr/bin:$PATH SCRIPTNAME=vboxautostart.sh # read vbox config [ -f /etc/vbox/vbox.cfg ] && . /etc/vbox/vbox.cfg # read autostart config [ -r /etc/default/virtualbox ] && . /etc/default/virtualbox begin_msg() { test -n "${2}" && echo "${SCRIPTNAME}: ${1}." logger -t "${SCRIPTNAME}" "${1}." } succ_msg() { logger -t "${SCRIPTNAME}" "${1}." } fail_msg() { echo "${SCRIPTNAME}: failed: ${1}." >&2 logger -t "${SCRIPTNAME}" "failed: ${1}." } vboxdrvrunning() { lsmod | grep -q "vboxdrv[^_-]" } start_vms() { OLD_IFS=$IFS IFS=$'\n' [ -z "$VBOXAUTOSTART_DB" ] && return [ -z "$VBOXAUTOSTART_CONFIG" ] && return begin_msg "Starting VirtualBox VMs configured for autostart" console; vboxdrvrunning || { fail_msg "VirtualBox kernel module not loaded!" exit 0 } # read autostart config file if [ -r $VBOXAUTOSTART_CONFIG ]; then # prevent inheriting this setting to VBoxSVC unset VBOX_RELEASE_LOG_DEST # find all the files of type username.start var=$(ls $VBOXAUTOSTART_DB | grep start | grep -v auto) # process each file of that type for i in $var; do # Extract the user name - the first word on the line user=$(echo $i | head -n1 | cut -d "." -f1) # autostart the VMs for that user begin_msg "Starting VMs for user $user" console su - $user -c "/usr/lib/virtualbox/VBoxAutostart --start --config $VBOXAUTOSTART_CONFIG" succ_msg "VMs for user $user started" done fi IFS=$OLD_IFS } stop_vms() { OLD_IFS=$IFS IFS=$'\n' [ -z "$VBOXAUTOSTART_DB" ] && return [ -z "$VBOXAUTOSTART_CONFIG" ] && return # read autostart config file if [ -r $VBOXAUTOSTART_CONFIG ]; then # prevent inheriting this setting to VBoxSVC unset VBOX_RELEASE_LOG_DEST # find all the files of type username.stop var=$(ls $VBOXAUTOSTART_DB | grep stop | grep -v auto) # process each file of that type for i in $var; do # Extract the user name - the first word on the line user=$(echo $i | head -n1 | cut -d "." -f1) # autostop the VMs for that user begin_msg "Stopping VMs for user $user" console su - $user -c "/usr/lib/virtualbox/VBoxAutostart --stop --config $VBOXAUTOSTART_CONFIG" succ_msg "VMs for user $user stopped" done fi IFS=$OLD_IFS } case "$1" in start) start_vms ;; stop) stop_vms ;; *) echo "Usage: $0 {start|stop}" exit 1 esac exit 0 ++++++ vboxconfig.sh ++++++ #!/bin/bash # # 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" LOGFILE="/var/log/virtualbox.log" INCLUDE="/lib/modules/`uname -r`/build/include" # # Test if vboxpci module loaded. If it is, skip everything else loaded=$(lsmod | grep vboxpci) 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 .." fi # Prerequisites are available, start build pushd $SOURCE > /dev/null 2>&1 echo "Building kernel modules..." make clean &>/dev/null make > $LOGFILE 2>&1 if [ "$?" -ne 0 ] ; then 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 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 modprobe -av vboxnetflt vboxnetadp vboxpci popd > /dev/null 2>&1 echo "Kernel modules are installed and loaded." exit 0 ++++++ vboxdrv.service ++++++ [Unit] SourcePath=/usr/lib/virtualbox/vboxdrv.sh Description=VirtualBox Linux kernel module Before=runlevel2.target runlevel3.target runlevel5.target shutdown.target After= Conflicts=shutdown.target [Service] Type=forking Restart=no TimeoutSec=5min IgnoreSIGPIPE=no KillMode=process GuessMainPID=no RemainAfterExit=yes ExecStart=/usr/lib/virtualbox/vboxdrv.sh start ExecStop=/usr/lib/virtualbox/vboxdrv.sh stop [Install] WantedBy=multi-user.target ++++++ vboxdrv.sh ++++++ #! /bin/sh # Oracle VM VirtualBox # Linux kernel module init script # # 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. # # chkconfig: 345 20 80 # description: VirtualBox Linux kernel module # ### BEGIN INIT INFO # Provides: vboxdrv # Required-Start: $syslog $remote_fs # Required-Stop: $syslog $remote_fs # Default-Start: 2 3 5 # Default-Stop: 0 1 6 # Short-Description: VirtualBox Linux module # Description: VirtualBox Linux kernel module ### END INIT INFO PATH=/sbin:/bin:/usr/sbin:/usr/bin:$PATH DEVICE=/dev/vboxdrv LOG="/var/log/vbox-install.log" MODPROBE=/sbin/modprobe SCRIPTNAME=vboxdrv.sh INSTALL_DIR=/usr/lib/virtualbox # The below is GNU-specific. See VBox.sh for the longer Solaris/OS X version. TARGET=`readlink -e -- "${0}"` || exit 1 SCRIPT_DIR="${TARGET%/[!/]*}" if $MODPROBE -c | grep -q '^allow_unsupported_modules *0'; then MODPROBE="$MODPROBE --allow-unsupported-modules" fi [ -f /etc/vbox/vbox.cfg ] && . /etc/vbox/vbox.cfg export BUILD_TYPE export USERNAME export USER=$USERNAME VIRTUALBOX="${INSTALL_DIR}/VirtualBox" VBOXMANAGE="${INSTALL_DIR}/VBoxManage" BUILDINTMP="${MODULE_SRC}/build_in_tmp" if test -u "${VBOXMANAGE}"; then GROUP=root DEVICE_MODE=0600 else GROUP=vboxusers DEVICE_MODE=0660 fi [ -r /etc/default/virtualbox ] && . /etc/default/virtualbox begin_msg() { test -n "${2}" && echo "${SCRIPTNAME}: ${1}." logger -t "${SCRIPTNAME}" "${1}." } succ_msg() { logger -t "${SCRIPTNAME}" "${1}." } fail_msg() { echo "${SCRIPTNAME}: failed: ${1}." >&2 logger -t "${SCRIPTNAME}" "failed: ${1}." } failure() { fail_msg "$1" exit 1 } running() { lsmod | grep -q "$1[^_-]" } ## 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 } start_drv() { begin_msg "Starting VirtualBox services" console if [ -d /proc/xen ]; then failure "Running VirtualBox in a Xen environment is not supported" fi if ! running vboxdrv; then if ! rm -f $DEVICE; then failure "Cannot remove $DEVICE" fi if ! $MODPROBE vboxdrv > /dev/null 2>&1; then /sbin/vboxconfig if ! $MODPROBE vboxdrv > /dev/null 2>&1; then failure "modprobe vboxdrv failed. Please use 'dmesg' to find out why" fi fi sleep .2 fi # ensure the character special exists if [ ! -c $DEVICE ]; then MAJOR=`sed -n 's;\([0-9]\+\) vboxdrv$;\1;p' /proc/devices` if [ ! -z "$MAJOR" ]; then MINOR=0 else MINOR=`sed -n 's;\([0-9]\+\) vboxdrv$;\1;p' /proc/extra` if [ ! -z "$MINOR" ]; then MAJOR=10 fi fi if [ -z "$MAJOR" ]; then rmmod vboxdrv 2>/dev/null failure "Cannot locate the VirtualBox device" fi if ! mknod -m 0660 $DEVICE c $MAJOR $MINOR 2>/dev/null; then rmmod vboxdrv 2>/dev/null failure "Cannot create device $DEVICE with major $MAJOR and minor $MINOR" fi fi # ensure permissions if ! $MODPROBE vboxnetflt > /dev/null 2>&1; then failure "modprobe vboxnetflt failed. Please use 'dmesg' to find out why" fi if ! $MODPROBE vboxnetadp > /dev/null 2>&1; then failure "modprobe vboxnetadp failed. Please use 'dmesg' to find out why" fi if ! $MODPROBE vboxpci > /dev/null 2>&1; then failure "modprobe vboxpci failed. Please use 'dmesg' to find out why" fi # Create the /dev/vboxusb directory if the host supports that method # of USB access. The USB code checks for the existance of that path. if grep -q usb_device /proc/devices; then mkdir -p -m 0750 /dev/vboxusb 2>/dev/null chown root:vboxusers /dev/vboxusb 2>/dev/null fi succ_msg "VirtualBox services started" } stop_drv() { begin_msg "Stopping VirtualBox services" console if running vboxpci; then if ! rmmod vboxpci 2>/dev/null; then failure "Cannot unload module vboxpci" fi fi if running vboxnetadp; then if ! rmmod vboxnetadp 2>/dev/null; then failure "Cannot unload module vboxnetadp" fi fi if running vboxdrv; then if running vboxnetflt; then if ! rmmod vboxnetflt 2>/dev/null; then failure "Cannot unload module vboxnetflt" fi fi if ! rmmod vboxdrv 2>/dev/null; then failure "Cannot unload module vboxdrv" fi if ! rm -f $DEVICE; then failure "Cannot unlink $DEVICE" fi fi succ_msg "VirtualBox services stopped" } cleanup_vb() { for i in /lib/modules/*; do # We could just do "rm -f", but we only want to try deleting folders if # we are sure they were ours, i.e. they had our modules in beforehand. if test -e "${i}/extra/vboxdrv.ko" \ || test -e "${i}/extra/vboxnetadp.ko" \ || test -e "${i}/extra/vboxnetflt.ko" \ || test -e "${i}/extra/vboxpci.ko"; then rm -f "${i}/extra/vboxdrv.ko" "${i}/extra/vboxnetadp.ko" \ "${i}/extra/vboxnetflt.ko" "${i}/extra/vboxpci.ko" # Remove the kernel version folder if it was empty except for us. test "`echo ${i}/extra/* ${i}/extra/.?* ${i}/* ${i}/.?*`" \ = "${i}/extra/* ${i}/extra/.. ${i}/extra ${i}/.." && rmdir "${i}/extra" "${i}" # We used to leave empty folders. version=`expr "${i}" : "/lib/modules/\(.*\)"` depmod -a "${version}" fi done } # setup_script setup_vb() { # Try to build the host kernel modules in case prepackaging has failed /sbin/vboxconfig } dmnstatus() { if running vboxdrv; then str="vboxdrv" if running vboxnetflt; then str="$str, vboxnetflt" if running vboxnetadp; then str="$str, vboxnetadp" fi fi if running vboxpci; then str="$str, vboxpci" fi echo "VirtualBox kernel modules ($str) are loaded." for i in $SHUTDOWN_USERS; do # don't create the ipcd directory with wrong permissions! if [ -d /tmp/.vbox-$i-ipc ]; then export VBOX_IPC_SOCKETID="$i" VMS=`$VBOXMANAGE --nologo list runningvms | sed -e 's/^".*".*{\(.*\)}/\1/' 2>/dev/null` if [ -n "$VMS" ]; then echo "The following VMs are currently running:" for v in $VMS; do echo " $v" done fi fi done else echo "VirtualBox kernel module is not loaded." fi } case "$1" in start) start_drv ;; stop) stop_drv ;; restart) "$0" stop && "$0" start ;; setup) # 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_drv && cleanup_vb setup_usb "$GROUP" "$DEVICE_MODE" "$INSTALL_DIR" setup_vb && start_drv ;; cleanup) stop_drv && cleanup_vb cleanup_usb ;; force-reload) "$0" stop "$0" start ;; status) dmnstatus ;; *) echo "Usage: $0 {start|stop|stop_vms|restart|force-reload|status}" exit 1 esac exit 0 ++++++ vboxguestconfig.sh ++++++ #!/bin/bash # # Script to build VirtualBox guest kernel modules # Copyright C 2017 by Larry Finger # # This script is part of the openSUSE VirtualBox package # SOURCE="/usr/src/kernel-modules/" LOGFILE="/var/log/virtualbox.log" INCLUDE="/lib/modules/`uname -r`/build/include" # # Test if vboxguest module loaded. If it is, skip everything else loaded=$(lsmod | grep vboxguest) if [ -n "$loaded" ] ; then echo "Kernel modules available. but we will continue..." fi # # Check if virtualbox-guest-source is installed, quit if not if ! rpm -qf "$SOURCE/additions/guest_src.tar.bz2" &>/dev/null ; then echo "Sources for building guest modules are not present," echo "Use 'sudo zypper install virtualbox-guest-source' to install them. Quitting .." exit 1 fi # unpack source pushd $SOURCE > /dev/null 2>&1 tar jxf additions/guest_src.tar.bz2 > /dev/null 2>&1 popd > /dev/null 2>&1 # # Check if virtualbox-guest-source version matches virtualbox version if [ "$(rpm -q virtualbox virtualbox-guest-source --queryformat='%{version}-%{release}\n' 2>/dev/null | sort -u | wc -l)" -ne "1" ] ; then echo "virtualbox-guest-source package version doesn't match the version of virtualbox package." echo "This situation is probably not fatal, thus we will try to continue .." fi # Prerequisites are available, start build pushd $SOURCE/additions/src > /dev/null 2>&1 echo "Building kernel modules..." make > $LOGFILE 2>&1 if [ "$?" -ne 0 ] ; then echo "" echo "Build of VirtualBox guest 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 echo "" echo "Installation of VirtualBox guest kernel modules failed." echo "Look at $LOGFILE to find reasons." popd > /dev/null 2>&1 exit 1 fi depmod -a modprobe -av vboxsf vboxguest vboxvideo cd ../.. rm -rf additions popd > /dev/null 2>&1 echo "Kernel modules are installed and loaded." exit 0 ++++++ vboxweb-service.service ++++++ [Unit] SourcePath=/usr/lib/virtualbox/vboxweb-service.sh Description= Before=runlevel2.target runlevel3.target runlevel4.target runlevel5.target shutdown.target After=vboxdrv.service Conflicts=shutdown.target [Service] Type=forking Restart=no TimeoutSec=5min IgnoreSIGPIPE=no KillMode=process GuessMainPID=no RemainAfterExit=yes ExecStart=/usr/lib/virtualbox/vboxweb-service.sh start ExecStop=/usr/lib/virtualbox/vboxweb-service.sh stop [Install] WantedBy=multi-user.target ++++++ vboxweb-service.sh ++++++ #!/bin/sh # $Id: vboxweb-service.sh 127855 2019-01-01 01:45:53Z bird $ ## @file # VirtualBox web service API daemon init script. # # # Copyright (C) 2006-2019 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. # # chkconfig: 345 35 65 # description: VirtualBox web service API # ### BEGIN INIT INFO # Provides: vboxweb-service # Required-Start: vboxdrv # Required-Stop: vboxdrv # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Description: VirtualBox web service API ### END INIT INFO PATH=$PATH:/bin:/sbin:/usr/sbin SCRIPTNAME=vboxweb-service.sh [ -f /etc/vbox/vbox.cfg ] && . /etc/vbox/vbox.cfg if [ -n "$INSTALL_DIR" ]; then binary="$INSTALL_DIR/vboxwebsrv" vboxmanage="$INSTALL_DIR/VBoxManage" else binary="/usr/lib/virtualbox/vboxwebsrv" vboxmanage="/usr/lib/virtualbox/VBoxManage" fi # 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 $binary ] || exit 0 [ -r /etc/default/virtualbox ] && . /etc/default/virtualbox PIDFILE="/var/run/${SCRIPTNAME}" # Preamble for Gentoo if [ "`which $0`" = "/sbin/rc" ]; then shift fi begin_msg() { test -n "${2}" && echo "${SCRIPTNAME}: ${1}." logger -t "${SCRIPTNAME}" "${1}." } succ_msg() { logger -t "${SCRIPTNAME}" "${1}." } fail_msg() { echo "${SCRIPTNAME}: failed: ${1}." >&2 logger -t "${SCRIPTNAME}" "failed: ${1}." } start_daemon() { usr="$1" shift su - $usr -c "$*" } killproc() { killall $1 rm -f $PIDFILE } if which start-stop-daemon >/dev/null 2>&1; then start_daemon() { usr="$1" shift bin="$1" shift start-stop-daemon --background --chuid $usr --start --exec $bin -- $@ } killproc() { start-stop-daemon --stop --exec $@ } fi vboxdrvrunning() { lsmod | grep vboxdrv } check_single_user() { if [ -n "$2" ]; then fail_msg "VBOXWEB_USER must not contain multiple users!" exit 1 fi } start() { if ! test -f $PIDFILE; then [ -z "$VBOXWEB_USER" ] && exit 0 begin_msg "Starting VirtualBox web service" console; check_single_user $VBOXWEB_USER temp=$(lsmod | grep vboxdrv) echo $temp if [ -z "$temp" ]; then fail_msg "VirtualBox kernel module not loaded!" exit 1 fi PARAMS="--background" [ -n "$VBOXWEB_HOST" ] && PARAMS="$PARAMS -H $VBOXWEB_HOST" [ -n "$VBOXWEB_PORT" ] && PARAMS="$PARAMS -p $VBOXWEB_PORT" [ -n "$VBOXWEB_SSL_KEYFILE" ] && PARAMS="$PARAMS -s -K $VBOXWEB_SSL_KEYFILE" [ -n "$VBOXWEB_SSL_PASSWORDFILE" ] && PARAMS="$PARAMS -a $VBOXWEB_SSL_PASSWORDFILE" [ -n "$VBOXWEB_SSL_CACERT" ] && PARAMS="$PARAMS -c $VBOXWEB_SSL_CACERT" [ -n "$VBOXWEB_SSL_CAPATH" ] && PARAMS="$PARAMS -C $VBOXWEB_SSL_CAPATH" [ -n "$VBOXWEB_SSL_DHFILE" ] && PARAMS="$PARAMS -D $VBOXWEB_SSL_DHFILE" [ -n "$VBOXWEB_SSL_RANDFILE" ] && PARAMS="$PARAMS -r $VBOXWEB_SSL_RANDFILE" [ -n "$VBOXWEB_TIMEOUT" ] && PARAMS="$PARAMS -t $VBOXWEB_TIMEOUT" [ -n "$VBOXWEB_CHECK_INTERVAL" ] && PARAMS="$PARAMS -i $VBOXWEB_CHECK_INTERVAL" [ -n "$VBOXWEB_THREADS" ] && PARAMS="$PARAMS -T $VBOXWEB_THREADS" [ -n "$VBOXWEB_KEEPALIVE" ] && PARAMS="$PARAMS -k $VBOXWEB_KEEPALIVE" [ -n "$VBOXWEB_AUTHENTICATION" ] && PARAMS="$PARAMS -A $VBOXWEB_AUTHENTICATION" [ -n "$VBOXWEB_LOGFILE" ] && PARAMS="$PARAMS -F $VBOXWEB_LOGFILE" [ -n "$VBOXWEB_ROTATE" ] && PARAMS="$PARAMS -R $VBOXWEB_ROTATE" [ -n "$VBOXWEB_LOGSIZE" ] && PARAMS="$PARAMS -S $VBOXWEB_LOGSIZE" [ -n "$VBOXWEB_LOGINTERVAL" ] && PARAMS="$PARAMS -I $VBOXWEB_LOGINTERVAL" # set authentication method + password hash if [ -n "$VBOXWEB_AUTH_LIBRARY" ]; then su - "$VBOXWEB_USER" -c "$vboxmanage setproperty websrvauthlibrary \"$VBOXWEB_AUTH_LIBRARY\"" if [ $? -ne 0 ]; then fail_msg "Error $? setting webservice authentication library to $VBOXWEB_AUTH_LIBRARY" fi fi if [ -n "$VBOXWEB_AUTH_PWHASH" ]; then su - "$VBOXWEB_USER" -c "$vboxmanage setextradata global \"VBoxAuthSimple/users/$VBOXWEB_USER\" \"$VBOXWEB_AUTH_PWHASH\"" if [ $? -ne 0 ]; then fail_msg "Error $? setting webservice password hash" fi fi # prevent inheriting this setting to VBoxSVC unset VBOX_RELEASE_LOG_DEST start_daemon $VBOXWEB_USER $binary $PARAMS > /dev/null 2>&1 # ugly: wait until the final process has forked sleep .1 PID=`pidof $binary 2>/dev/null` if [ -n "$PID" ]; then echo "$PID" > $PIDFILE RETVAL=0 succ_msg "VirtualBox web service started" else RETVAL=1 fail_msg "VirtualBox web service failed to start" fi fi return $RETVAL } stop() { if test -f $PIDFILE; then begin_msg "Stopping VirtualBox web service" console; killproc $binary RETVAL=$? # Be careful: wait 1 second, making sure that everything is cleaned up. sleep 1 if ! pidof $binary > /dev/null 2>&1; then rm -f $PIDFILE succ_msg "VirtualBox web service stopped" else fail_msg "VirtualBox web service failed to stop" fi fi return $RETVAL } restart() { stop && start } status() { echo -n "Checking for VBox Web Service" if [ -f $PIDFILE ]; then echo " ...running" else echo " ...not running" fi } case "$1" in start) start ;; stop) stop ;; restart) restart ;; force-reload) restart ;; status) status ;; setup) ;; cleanup) ;; *) echo "Usage: $0 {start|stop|restart|status}" exit 1 esac exit $RETVAL ++++++ virtualbox-60-vboxdrv.rules ++++++ KERNEL=="vboxdrv", NAME="vboxdrv", OWNER="root", GROUP="root", MODE="0600" KERNEL=="vboxdrvu", NAME="vboxdrvu", OWNER="root", GROUP="root", MODE="0666" KERNEL=="vboxnetctl", NAME="vboxnetctl", OWNER="root", GROUP="root", MODE="0600" SUBSYSTEM=="usb_device", ACTION=="add", RUN+="/usr/lib/virtualbox/VBoxCreateUSBNode.sh $major $minor $attr{bDeviceClass}" SUBSYSTEM=="usb", ACTION=="add", ENV{DEVTYPE}=="usb_device", RUN+="/usr/lib/virtualbox/VBoxCreateUSBNode.sh $major $minor $attr{bDeviceClass}" SUBSYSTEM=="usb_device", ACTION=="remove", RUN+="/usr/lib/virtualbox/VBoxCreateUSBNode.sh --remove $major $minor" SUBSYSTEM=="usb", ACTION=="remove", ENV{DEVTYPE}=="usb_device", RUN+="/usr/lib/virtualbox/VBoxCreateUSBNode.sh --remove $major $minor" ++++++ virtualbox-60-vboxguest.rules ++++++ KERNEL=="vboxguest", NAME="vboxguest", OWNER="root", MODE="0660" ENV{ID_INPUT}="1", ENV{ID_INPUT_MOUSE}="1" KERNEL=="vboxuser", NAME="vboxuser", OWNER="root", GROUP="users", MODE="0660" ++++++ virtualbox-default.virtualbox ++++++ # /etc/default/virtualbox # # ------------------------------------------------------------------------------------------------- # Autostart # ------------------------------------------------------------------------------------------------- VBOXAUTOSTART_DB=/etc/vbox VBOXAUTOSTART_CONFIG=/etc/vbox/autostart.cfg # ------------------------------------------------------------------------------------------------- # By default, vboxdrv creates a file /etc/udev/rules.d/60-vboxdrv.rules every time, it is started, # that allows full control of this hosts usb devices in virtual machines (given, you allow accessing # them with the GUI). # In order to control this ability yourself, copy the generated /etc/udev/rules.d/60-vboxdrv.rules # file to another name and modify to your needs, e.g. comment out all lines beginning with SUBSYSTEM, # which will make this hosts usb devices inaccessible AND enable the next line. #INSTALL_NO_UDEV=1 ++++++ virtualbox-fix-ui-background-color.patch ++++++ Index: b/src/VBox/Frontends/VirtualBox/src/manager/tools/UITools.cpp =================================================================== --- a/src/VBox/Frontends/VirtualBox/src/manager/tools/UITools.cpp +++ b/src/VBox/Frontends/VirtualBox/src/manager/tools/UITools.cpp @@ -114,10 +114,6 @@ void UITools::preparePalette() { /* Setup palette: */ setAutoFillBackground(true); - QPalette pal = palette(); - QColor bodyColor = pal.color(QPalette::Active, QPalette::Midlight).darker(110); - pal.setColor(QPalette::Window, bodyColor); - setPalette(pal); } void UITools::prepareLayout() Index: b/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManager.cpp =================================================================== --- a/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManager.cpp +++ b/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManager.cpp @@ -1299,7 +1299,7 @@ void UIVirtualBoxManager::prepareMenuBar /* Make sure menu-bar fills own solid background: */ menuBar()->setAutoFillBackground(true); QPalette pal = menuBar()->palette(); - const QColor color = pal.color(QPalette::Active, QPalette::Mid).lighter(160); + const QColor color = pal.color(QPalette::Active, QPalette::Window); pal.setColor(QPalette::Active, QPalette::Button, color); menuBar()->setPalette(pal); } Index: b/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooser.cpp =================================================================== --- a/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooser.cpp +++ b/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooser.cpp @@ -121,10 +121,6 @@ void UIChooser::preparePalette() { /* Setup palette: */ setAutoFillBackground(true); - QPalette pal = palette(); - QColor bodyColor = pal.color(QPalette::Active, QPalette::Midlight).darker(110); - pal.setColor(QPalette::Window, bodyColor); - setPalette(pal); } void UIChooser::prepareLayout() Index: b/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserItemMachine.cpp =================================================================== --- a/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserItemMachine.cpp +++ b/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserItemMachine.cpp @@ -1025,7 +1025,7 @@ void UIChooserItemMachine::paintBackgrou else { /* Prepare color: */ - QColor backgroundColor = pal.color(QPalette::Active, QPalette::Mid); + QColor backgroundColor = pal.color(QPalette::Active, QPalette::Button); /* Draw gradient: */ QLinearGradient bgGrad(rectangle.topLeft(), rectangle.bottomLeft()); bgGrad.setColorAt(0, backgroundColor.lighter(m_iDefaultLightnessMax)); @@ -1054,7 +1054,7 @@ void UIChooserItemMachine::paintBackgrou /* Default background: */ else { - QColor backgroundColor = pal.color(QPalette::Active, QPalette::Mid); + QColor backgroundColor = pal.color(QPalette::Active, QPalette::Button); color1 = backgroundColor.lighter(m_iDefaultLightnessMax); color2 = backgroundColor.lighter(m_iDefaultLightnessMax - 70); } @@ -1075,7 +1075,7 @@ void UIChooserItemMachine::paintBackgrou /* Default background: */ else { - QColor backgroundColor = pal.color(QPalette::Active, QPalette::Mid); + QColor backgroundColor = pal.color(QPalette::Active, QPalette::Button); color1 = backgroundColor.lighter(m_iDefaultLightnessMin); color2 = backgroundColor.lighter(m_iDefaultLightnessMin - 40); } @@ -1110,7 +1110,7 @@ void UIChooserItemMachine::paintFrame(QP strokeColor = pal.color(QPalette::Active, QPalette::Highlight).lighter(m_iHoverLightnessMin - 50); /* Default frame: */ else - strokeColor = pal.color(QPalette::Active, QPalette::Mid).lighter(m_iDefaultLightnessMin); + strokeColor = pal.color(QPalette::Active, QPalette::Button).lighter(m_iDefaultLightnessMin); /* Create/assign pen: */ QPen pen(strokeColor); Index: b/src/VBox/Frontends/VirtualBox/src/manager/tools/UIToolsItem.cpp =================================================================== --- a/src/VBox/Frontends/VirtualBox/src/manager/tools/UIToolsItem.cpp +++ b/src/VBox/Frontends/VirtualBox/src/manager/tools/UIToolsItem.cpp @@ -710,7 +710,7 @@ void UIToolsItem::paintBackground(QPaint /* Prepare color: */ const QColor backgroundColor = isEnabled() ? pal.color(QPalette::Active, QPalette::Highlight) - : pal.color(QPalette::Disabled, QPalette::Midlight); + : pal.color(QPalette::Disabled, QPalette::Highlight); /* Draw gradient: */ QLinearGradient bgGrad(rectangle.topLeft(), rectangle.bottomLeft()); bgGrad.setColorAt(0, backgroundColor.lighter(m_iHighlightLightnessMax)); @@ -749,7 +749,7 @@ void UIToolsItem::paintBackground(QPaint /* Prepare color: */ const QColor backgroundColor = isEnabled() ? pal.color(QPalette::Active, QPalette::Highlight) - : pal.color(QPalette::Disabled, QPalette::Midlight); + : pal.color(QPalette::Disabled, QPalette::Highlight); /* Draw gradient: */ QLinearGradient bgGrad(rectangle.topLeft(), rectangle.bottomLeft()); bgGrad.setColorAt(0, backgroundColor.lighter(m_iHoverLightnessMax)); @@ -787,8 +787,8 @@ void UIToolsItem::paintBackground(QPaint { /* Prepare color: */ const QColor backgroundColor = isEnabled() - ? pal.color(QPalette::Active, QPalette::Mid) - : pal.color(QPalette::Disabled, QPalette::Midlight); + ? pal.color(QPalette::Active, QPalette::Window) + : pal.color(QPalette::Disabled, QPalette::Window); /* Draw gradient: */ QLinearGradient bgGrad(rectangle.topLeft(), rectangle.bottomLeft()); bgGrad.setColorAt(0, backgroundColor.lighter(m_iDefaultLightnessMax)); @@ -821,7 +821,7 @@ void UIToolsItem::paintFrame(QPainter *p strokeColor = pal.color(QPalette::Active, QPalette::Highlight).lighter(m_iHoverLightnessMin - 50); /* Default frame: */ else - strokeColor = pal.color(QPalette::Active, QPalette::Mid).lighter(m_iDefaultLightnessMin); + strokeColor = pal.color(QPalette::Active, QPalette::Button).lighter(m_iDefaultLightnessMin); /* Create/assign pen: */ QPen pen(strokeColor); Index: b/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManagerWidget.cpp =================================================================== --- a/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManagerWidget.cpp +++ b/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManagerWidget.cpp @@ -355,14 +355,6 @@ void UIVirtualBoxManagerWidget::prepare( { /* Configure palette: */ setAutoFillBackground(true); - QPalette pal = palette(); -#ifdef VBOX_WS_MAC - const QColor color = pal.color(QPalette::Active, QPalette::Mid).lighter(145); -#else - const QColor color = pal.color(QPalette::Active, QPalette::Mid).lighter(160); -#endif - pal.setColor(QPalette::Window, color); - setPalette(pal); /* Prepare: */ prepareWidgets(); @@ -490,7 +482,7 @@ void UIVirtualBoxManagerWidget::prepareW } /* Adjust splitter colors according to main widgets it splits: */ - m_pSplitter->configureColor(palette().color(QPalette::Active, QPalette::Midlight).darker(110)); + m_pSplitter->configureColor(palette().color(QPalette::Active, QPalette::Button).darker(110)); /* Set the initial distribution. The right site is bigger. */ m_pSplitter->setStretchFactor(0, 2); m_pSplitter->setStretchFactor(1, 3); Index: b/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserItem.cpp =================================================================== --- a/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserItem.cpp +++ b/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserItem.cpp @@ -642,7 +642,7 @@ void UIChooserItem::paintFlatButton(QPai /* Prepare colors: */ const QPalette pal = QApplication::palette(); - const QColor color = pal.color(QPalette::Active, QPalette::Mid); + const QColor color = pal.color(QPalette::Active, QPalette::Button); /* Prepare pen: */ QPen pen; Index: b/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserView.cpp =================================================================== --- a/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserView.cpp +++ b/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserView.cpp @@ -178,10 +178,6 @@ void UIChooserView::prepare() void UIChooserView::preparePalette() { /* Setup palette: */ - QPalette pal = qApp->palette(); - const QColor bodyColor = pal.color(QPalette::Active, QPalette::Midlight).darker(110); - pal.setColor(QPalette::Base, bodyColor); - setPalette(pal); } void UIChooserView::resizeEvent(QResizeEvent *pEvent) Index: b/src/VBox/Frontends/VirtualBox/src/manager/tools/UIToolsView.cpp =================================================================== --- a/src/VBox/Frontends/VirtualBox/src/manager/tools/UIToolsView.cpp +++ b/src/VBox/Frontends/VirtualBox/src/manager/tools/UIToolsView.cpp @@ -182,10 +182,6 @@ void UIToolsView::prepare() void UIToolsView::preparePalette() { /* Setup palette: */ - QPalette pal = qApp->palette(); - const QColor bodyColor = pal.color(QPalette::Active, QPalette::Midlight).darker(110); - pal.setColor(QPalette::Base, bodyColor); - setPalette(pal); } void UIToolsView::resizeEvent(QResizeEvent *pEvent) Index: b/src/VBox/Frontends/VirtualBox/src/manager/details/UIDetailsElement.cpp =================================================================== --- a/src/VBox/Frontends/VirtualBox/src/manager/details/UIDetailsElement.cpp +++ b/src/VBox/Frontends/VirtualBox/src/manager/details/UIDetailsElement.cpp @@ -667,7 +667,7 @@ void UIDetailsElement::paintBackground(Q const QPalette pal = palette(); /* Paint default background: */ - const QColor defaultColor = pal.color(QPalette::Active, QPalette::Mid); + const QColor defaultColor = pal.color(QPalette::Active, QPalette::Window); const QColor dcTone1 = defaultColor.lighter(m_iDefaultToneFinal); const QColor dcTone2 = defaultColor.lighter(m_iDefaultToneStart); QLinearGradient gradientDefault(fullRect.topLeft(), fullRect.bottomLeft()); @@ -708,7 +708,7 @@ void UIDetailsElement::paintFrame(QPaint : optionRect; /* Paint frame: */ - const QColor strokeColor = palette().color(QPalette::Active, QPalette::Mid).lighter(m_iDefaultToneStart); + const QColor strokeColor = palette().color(QPalette::Active, QPalette::Window).lighter(m_iDefaultToneStart); QPen pen(strokeColor); pen.setWidth(0); pPainter->setPen(pen); Index: b/src/VBox/Frontends/VirtualBox/src/widgets/UIToolBar.cpp =================================================================== --- a/src/VBox/Frontends/VirtualBox/src/widgets/UIToolBar.cpp +++ b/src/VBox/Frontends/VirtualBox/src/widgets/UIToolBar.cpp @@ -110,7 +110,7 @@ void UIToolBar::paintEvent(QPaintEvent * const QRect rectangle = pEvent->rect(); /* Prepare gradient: */ - const QColor backgroundColor = palette().color(QPalette::Active, QPalette::Mid); + const QColor backgroundColor = palette().color(QPalette::Active, QPalette::Window); QLinearGradient gradient(rectangle.topLeft(), rectangle.bottomLeft()); gradient.setColorAt(0, backgroundColor.lighter(130)); gradient.setColorAt(1, backgroundColor.lighter(125)); Index: b/src/VBox/Frontends/VirtualBox/src/manager/details/UIDetailsSet.cpp =================================================================== --- a/src/VBox/Frontends/VirtualBox/src/manager/details/UIDetailsSet.cpp +++ b/src/VBox/Frontends/VirtualBox/src/manager/details/UIDetailsSet.cpp @@ -700,7 +700,7 @@ void UIDetailsSet::paintBackground(QPain const QRect optionRect = pOptions->rect; /* Paint default background: */ - const QColor defaultColor = palette().color(QPalette::Active, QPalette::Midlight).darker(110); + const QColor defaultColor = palette().color(QPalette::Active, QPalette::Window).darker(110); pPainter->fillRect(optionRect, defaultColor); /* Restore painter: */ Index: b/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserItemGlobal.cpp =================================================================== --- a/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserItemGlobal.cpp +++ b/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserItemGlobal.cpp @@ -655,7 +655,7 @@ void UIChooserItemGlobal::paintBackgroun pPainter->fillRect(rectangle, bgGrad); #else /* Prepare color: */ - QColor backgroundColor = pal.color(QPalette::Active, QPalette::Mid).lighter(160); + QColor backgroundColor = pal.color(QPalette::Active, QPalette::Window).lighter(160); /* Draw gradient: */ pPainter->fillRect(rectangle, backgroundColor); #endif @@ -686,7 +686,7 @@ void UIChooserItemGlobal::paintFrame(QPa strokeColor = pal.color(QPalette::Active, QPalette::Highlight).lighter(m_iHoverLightnessMin - 50); /* Default frame: */ else - strokeColor = pal.color(QPalette::Active, QPalette::Mid).lighter(m_iDefaultLightnessMin); + strokeColor = pal.color(QPalette::Active, QPalette::Window).lighter(m_iDefaultLightnessMin); /* Create/assign pen: */ QPen pen(strokeColor); Index: b/src/VBox/Frontends/VirtualBox/src/manager/details/UIDetailsGroup.cpp =================================================================== --- a/src/VBox/Frontends/VirtualBox/src/manager/details/UIDetailsGroup.cpp +++ b/src/VBox/Frontends/VirtualBox/src/manager/details/UIDetailsGroup.cpp @@ -288,7 +288,7 @@ void UIDetailsGroup::paintBackground(QPa #ifdef VBOX_WS_MAC const QColor defaultColor = palette().color(QPalette::Active, QPalette::Mid).lighter(145); #else - const QColor defaultColor = palette().color(QPalette::Active, QPalette::Mid).lighter(160); + const QColor defaultColor = palette().color(QPalette::Active, QPalette::Window).lighter(160); #endif pPainter->fillRect(optionRect, defaultColor); Index: b/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserItemGroup.cpp =================================================================== --- a/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserItemGroup.cpp +++ b/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserItemGroup.cpp @@ -1630,7 +1630,7 @@ void UIChooserItemGroup::paintBackground const QPalette pal = palette(); const QColor headerColor = pal.color(QPalette::Active, model()->currentItems().contains(this) ? - QPalette::Highlight : QPalette::Midlight); + QPalette::Highlight : QPalette::Button); /* Root-item: */ if (isRoot()) @@ -1714,7 +1714,7 @@ void UIChooserItemGroup::paintFrame(QPai const QPalette pal = palette(); const QColor strokeColor = pal.color(QPalette::Active, model()->currentItems().contains(this) ? - QPalette::Highlight : QPalette::Midlight).darker(headerDarkness() + 10); + QPalette::Highlight : QPalette::Button).darker(headerDarkness() + 10); /* Create/assign pen: */ QPen pen(strokeColor); ++++++ virtualbox-kmp-files ++++++ %defattr (-,root,root) %dir /lib/modules/%2-%1/ %dir /lib/modules/%2-%1/extra /lib/modules/%2-%1/extra/vboxdrv.ko /lib/modules/%2-%1/extra/vboxnetadp.ko /lib/modules/%2-%1/extra/vboxnetflt.ko /lib/modules/%2-%1/extra/vboxpci.ko /lib/modules/%2-%1/extra/vboxsf.ko /lib/modules/%2-%1/extra/vboxvideo.ko /lib/modules/%2-%1/extra/vboxguest.ko ++++++ virtualbox-kmp-preamble ++++++ Requires: kernel-%1 Provides: virtualbox-kmp = %version ++++++ virtualbox-patch-source.sh ++++++ #!/bin/bash REMOVE_DIRS=( src/VBox/Additions/WINNT src/VBox/Additions/os2 kBuild/bin kBuild/msgstyles kBuild/tools kBuild/sdks tools/darwin.x86 tools/darwin.amd64 tools/freebsd.x86 tools/os2.x86 tools/solaris.x86 tools/solaris.amd64 tools/win.amd64 tools/win.x86 tools/linux.x86 tools/linux.amd64 ) set -o errexit CMDNAME=${0##*/} SOURCEDIR=${0%$CMDNAME} BASENAME=${1%.tar.bz2} trap "rm -rf \"$BASENAME-patched.tar\" \"$BASENAME-patched.tar.bz2\"" ERR for (( N=0 ; N<${#REMOVE_DIRS[@]} ; N++ )) ; do #REMOVE_DIRS[N]="$BASENAME/${REMOVE_DIRS[N]}" # use a wildcard because VirtualBox-1.6.0-OSE != VirtualBox-1.6.0_OSE REMOVE_DIRS[N]="*/${REMOVE_DIRS[N]}" done cd "$SOURCEDIR" >/dev/null if ! test -f "$BASENAME.tar.bz2" ; then exit 0 fi if test -f "$BASENAME-patched.tar.bz2" ; then if test "$BASENAME.tar.bz2" -ot "$BASENAME-patched.tar.bz2" ; then if test $CMDNAME -ot "$BASENAME-patched.tar.bz2" ; then exit 0 fi fi fi cp -a "$BASENAME.tar.bz2" "$BASENAME-patched.tar.bz2" bunzip2 "$BASENAME-patched.tar.bz2" tar --wildcards --delete -f "$BASENAME-patched.tar" "${REMOVE_DIRS[@]}" bzip2 "$BASENAME-patched.tar" ++++++ virtualbox-rpmlintrc ++++++ addFilter("incoherent-init-script-name vboxdrv") addFilter("incoherent-init-script-name vboxadd") addFilter("xorg-x11-driver-virtualbox-ose.* shlib-policy-missing-suffix") ++++++ virtualbox-sed-params.patch ++++++ Index: VirtualBox-6.0.0/src/VBox/Main/Makefile.kmk =================================================================== --- VirtualBox-6.0.0.orig/src/VBox/Main/Makefile.kmk +++ VirtualBox-6.0.0/src/VBox/Main/Makefile.kmk @@ -1521,7 +1521,7 @@ $(VBoxAPIWrap_0_OUTDIR)/VBoxAPI.d.ts \ $(QUIET)$(VBOX_XSLTPROC) --stringparam KBUILD_HOST $(KBUILD_HOST) \ --stringparam generating "dtrace-probes" \ -o "$@" $(VBoxAPIWrap_VBOX_XSLT) $(VBOX_XIDL_FILE) - $(QUIET)$(SED) -e '' -o "$@.tmp" \ + $(QUIET)$(SED) -e '' --output "$@.tmp" \ "$(VBOX_PATH_MAIN_SRC)/src-all/VBoxAPI-start$(if-expr "$(VBOX_HOST_DTRACE_VERSION)" == "dtrace: Sun D 1.6.2",-alternative,).d" \ "$@" \ "$(VBOX_PATH_MAIN_SRC)/src-all/VBoxAPI-end$(if-expr "$(VBOX_HOST_DTRACE_VERSION)" == "dtrace: Sun D 1.6.2",-alternative,).d" Index: VirtualBox-6.0.0/src/VBox/Devices/Makefile.kmk =================================================================== --- VirtualBox-6.0.0.orig/src/VBox/Devices/Makefile.kmk +++ VirtualBox-6.0.0/src/VBox/Devices/Makefile.kmk @@ -859,8 +859,7 @@ VBOX_WITH_VMSVGA3D_DYNAMIC_LOAD = 1 $(call MSG_TOOL,iasl,VBoxDD,$<,$@) $(QUIET)$(RM) -f $@ $@.tmp $@.pre $(QUIET)$(TOOL_$(VBOX_GCC_TOOL)_CC) -E -P -x c -o $@.pre $< - $(QUIET)$(SED) -e "s/<NL>/\n/g" \ - --output $@.pre1 $@.pre + $(QUIET)$(SED) -e "s/<NL>/\n/g" $@.pre > $@.pre1 $(QUIET)$(VBOX_IASLCMD) -tc -vs -p $@ $@.pre1 $(QUIET)$(MV) -f $@ $@.tmp $(QUIET)$(SED) -e "s/AmlCode\|vboxssdt_cpuhotplug_aml_code/AmlCodeSsdtCpuHotPlug/g" \ ++++++ virtualbox-snpritnf-buffer-overflow.patch ++++++ Index: VirtualBox-5.1.4/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_subr.c =================================================================== --- VirtualBox-5.1.4.orig/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_subr.c +++ VirtualBox-5.1.4/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_subr.c @@ -833,6 +833,7 @@ dt_gmatch(const char *s, const char *p) #else return (p == NULL || *p == '\0' || RTStrSimplePatternMatch(p, s)); /** @todo implement gmatch. */ #endif + return 0; } char * ++++++ virtualbox-wrapper.sh ++++++ #!/bin/bash export QT_NO_KDE_INTEGRATION=1 # make certain that the user/group combination is valid /usr/bin/id -nG | grep -v -e "root" -e "vboxusers" >/dev/null && /usr/lib/virtualbox/VBoxPermissionMessage && exit # # Handle the issue regarding USB passthru # The following conditions apply: # 1. If ~/.vbox/enable exists, the user accepts the security risk. # 2. If ~/.vbox/disable exists, the user does not accept the risk. That file will contain the inode of /usr/lib/udev/rules.d/60-vboxdrv.rules. # When that changes, the VBoxUSB_DevRules will again be displayed as that means that VB has been reloaded. # devrules() { /usr/lib/virtualbox/VBoxUSB_DevRules if [ $? -eq 0 ] ; then # User accepts the risk touch ~/.vbox/enable rm -f ~/.vbox/disable else # User declines the risk - save the inode echo "" > ~/.vbox/disable rm -f ~/.vbox/enable fi } # Start of main routine # # Ensure that ~/.vbox exists mkdir -p ~/.vbox/ # Get the inode for /usr/lib/udev/rules.d/60-vboxdrv.rules INODE=$(stat /usr/lib/udev/rules.d/60-vboxdrv.rules | grep Inode | cut -d' ' -f3) if [ ! -f ~/.vbox/enable ] && [ ! -f ~/.vbox/disable ] ; then # Neither file exists - find what the user wants devrules fi # Get the original Inode if it exists if [ -f ~/.vbox/disable ] ; then read LINE < ~/.vbox/disable else LINE=" " fi # If user originally declined, make certain that /usr/lib/udev/rules.d/60-vboxdrv.rules has not been changed if [ -f ~/.vbox/disable ] && [ "$LINE" != "$INODE" ] && [ "$LINE" != "" ] ; then # disable is selected and the Inode has changed - ask again devrules fi if [ -f ~/.vbox/disable ] ; then echo $INODE > ~/.vbox/disable if [ "$LINE" != "$INODE" ] ; then if [ -f /usr/bin/kdesu ] ; then kdesu /sbin/vbox-fix-usb-rules.sh fi if [ -f /usr/bin/gnomesu ] ; then gnomesu /sbin/vbox-fix-usb-rules.sh fi fi fi # Check that /usr/lib/virtualbox/VirtualBoxVM has SUID permissions PERM=$(ls -l /usr/lib/virtualbox/VirtualBoxVM | grep rwsr) if [ -z "$PERM" ] then logger -s "Wrong permissions for VirtualBoxVM - use 'sudo chmod 4711 /usr/lib/virtualbox/VirtualBoxVM' to fix" /usr/lib/virtualbox/VBoxSUIDMessage exit 1 fi # Now run the VB GUI LD_LIBRARY_PATH="/usr/lib/virtualbox${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" /usr/lib/virtualbox/VirtualBox6 $@