diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-11 08:17:34 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-11 08:17:34 +0000 |
commit | 8784fb72e8eee3d983d30ac46e0ec3709d4f0ab0 (patch) | |
tree | 041e487e60a900d7d85f57307892acb586640822 /debian/patches | |
parent | Adding upstream version 7.0.14-dfsg. (diff) | |
download | virtualbox-8784fb72e8eee3d983d30ac46e0ec3709d4f0ab0.tar.xz virtualbox-8784fb72e8eee3d983d30ac46e0ec3709d4f0ab0.zip |
Adding debian version 7.0.14-dfsg-4.debian/7.0.14-dfsg-4
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
28 files changed, 1028 insertions, 0 deletions
diff --git a/debian/patches/01-build-arch.patch b/debian/patches/01-build-arch.patch new file mode 100644 index 00000000..3a188d92 --- /dev/null +++ b/debian/patches/01-build-arch.patch @@ -0,0 +1,14 @@ +Description: Correctly check build architecture. +Author: Michael Meskes <meskes@debian.org> + +--- a/configure ++++ b/configure +@@ -381,7 +381,7 @@ test_execute_path() + check_environment() + { + test_header environment +- BUILD_CPU=`uname -m` ++ BUILD_CPU=`dpkg-architecture -qDEB_HOST_GNU_CPU` + [ "$OS" = "solaris" ] && BUILD_CPU=`isainfo | cut -f 1 -d ' '` + case "$BUILD_CPU" in + i[3456789]86|x86|i86pc|BePC) diff --git a/debian/patches/02-gsoap-build-fix.patch b/debian/patches/02-gsoap-build-fix.patch new file mode 100644 index 00000000..f67b4818 --- /dev/null +++ b/debian/patches/02-gsoap-build-fix.patch @@ -0,0 +1,14 @@ +Interim build fix for gsoap > 2.8.13 +Index: virtualbox/src/VBox/Main/webservice/Makefile.kmk +=================================================================== +--- virtualbox.orig/src/VBox/Main/webservice/Makefile.kmk ++++ virtualbox/src/VBox/Main/webservice/Makefile.kmk +@@ -848,7 +848,7 @@ + $(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" diff --git a/debian/patches/04-vboxdrv-references.patch b/debian/patches/04-vboxdrv-references.patch new file mode 100644 index 00000000..fbe3ea75 --- /dev/null +++ b/debian/patches/04-vboxdrv-references.patch @@ -0,0 +1,77 @@ +Description: Change error messages for vboxdrv failure, according to virtualbox-dkms. +Author: Daniel Hahler <ubuntu@thequod.de> + +Index: virtualbox/src/VBox/VMM/VMMR3/VM.cpp +=================================================================== +--- virtualbox.orig/src/VBox/VMM/VMMR3/VM.cpp ++++ virtualbox/src/VBox/VMM/VMMR3/VM.cpp +@@ -281,12 +281,8 @@ + + #ifdef RT_OS_LINUX + case VERR_SUPDRV_COMPONENT_NOT_FOUND: +- pszError = N_("One of the kernel modules was not successfully loaded. Make sure " +- "that VirtualBox is correctly installed, and if you are using EFI " +- "Secure Boot that the modules are signed if necessary in the right " +- "way for your host system. Then try to recompile and reload the " +- "kernel modules by executing " +- "'/sbin/vboxconfig' as root"); ++ pszError = N_("Please install the virtualbox-dkms package " ++ "and execute 'modprobe vboxdrv' as root"); + break; + #endif + +@@ -352,12 +348,8 @@ + { + case VERR_VM_DRIVER_LOAD_ERROR: + #ifdef RT_OS_LINUX +- pszError = N_("VirtualBox kernel driver not loaded. The vboxdrv kernel module " +- "was either not loaded, /dev/vboxdrv is not set up properly, " +- "or you are using EFI Secure Boot and the module is not signed " +- "in the right way for your system. If necessary, try setting up " +- "the kernel module again by executing " +- "'/sbin/vboxconfig' as root"); ++ pszError = N_("Please install the virtualbox-dkms package " ++ "and execute 'modprobe vboxdrv' as root"); + #else + pszError = N_("VirtualBox kernel driver not loaded"); + #endif +@@ -396,12 +388,8 @@ + case VERR_INVALID_HANDLE: /** @todo track down and fix this error. */ + case VERR_VM_DRIVER_NOT_INSTALLED: + #ifdef RT_OS_LINUX +- pszError = N_("VirtualBox kernel driver not Installed. The vboxdrv kernel module " +- "was either not loaded, /dev/vboxdrv is not set up properly, " +- "or you are using EFI Secure Boot and the module is not signed " +- "in the right way for your system. If necessary, try setting up " +- "the kernel module again by executing " +- "'/sbin/vboxconfig' as root"); ++ pszError = N_("Please install the virtualbox-dkms package " ++ "and execute 'modprobe vboxdrv' as root"); + #else + pszError = N_("VirtualBox kernel driver not installed"); + #endif +Index: virtualbox/src/VBox/Frontends/VirtualBox/src/main.cpp +=================================================================== +--- virtualbox.orig/src/VBox/Frontends/VirtualBox/src/main.cpp ++++ virtualbox/src/VBox/Frontends/VirtualBox/src/main.cpp +@@ -98,8 +98,9 @@ + + QString g_QStrHintLinuxNoDriver = QApplication::tr( + "The VirtualBox Linux kernel driver is either not loaded or not set " +- "up correctly. Please try setting it up again by executing<br/><br/>" +- " <font color=blue>'/sbin/vboxconfig'</font><br/><br/>" ++ "up correctly. Please reinstall virtualbox-dkms " ++ "package and load the kernel module by executing<br/><br/>" ++ " <font color=blue>'modprobe vboxdrv'</font><br/><br/>" + "as root.<br/><br/>" + "If your system has EFI Secure Boot enabled you may also need to sign " + "the kernel modules (vboxdrv, vboxnetflt, vboxnetadp, vboxpci) before " +@@ -118,7 +119,7 @@ + "The VirtualBox kernel modules do not match this version of " + "VirtualBox. The installation of VirtualBox was apparently not " + "successful. Executing<br/><br/>" +- " <font color=blue>'/sbin/vboxconfig'</font><br/><br/>" ++ " <font color=blue>'modprobe vboxdrv'</font><br/><br/>" + "may correct this. Make sure that you are not mixing builds " + "of VirtualBox from different sources." + ); diff --git a/debian/patches/06-xsession.patch b/debian/patches/06-xsession.patch new file mode 100644 index 00000000..9a15d84a --- /dev/null +++ b/debian/patches/06-xsession.patch @@ -0,0 +1,22 @@ +Description: Make Xsession.d script ignore errors. +Author: Michael Meskes <meskes@debian.org> + +Index: virtualbox/src/VBox/Additions/x11/Installer/98vboxadd-xclient +=================================================================== +--- virtualbox.orig/src/VBox/Additions/x11/Installer/98vboxadd-xclient ++++ virtualbox/src/VBox/Additions/x11/Installer/98vboxadd-xclient +@@ -40,9 +40,9 @@ + # This script can also be triggered by a connection over SSH, which is not + # what we had in mind, so we do not start VBoxClient in that case. We do + # not use "exit" here as this script is "source"d, not executed. +- /usr/bin/VBoxClient --clipboard +- /usr/bin/VBoxClient --checkhostversion +- /usr/bin/VBoxClient --seamless +- /usr/bin/VBoxClient --draganddrop +- /usr/bin/VBoxClient --vmsvga-session # In case VMSVGA emulation is enabled ++ /usr/bin/VBoxClient --clipboard || true ++ /usr/bin/VBoxClient --checkhostversion || true ++ /usr/bin/VBoxClient --seamless || true ++ /usr/bin/VBoxClient --draganddrop || true ++ /usr/bin/VBoxClient --vmsvga-session || true # In case VMSVGA emulation is enabled + fi diff --git a/debian/patches/07-vboxnetflt-reference.patch b/debian/patches/07-vboxnetflt-reference.patch new file mode 100644 index 00000000..a29efde0 --- /dev/null +++ b/debian/patches/07-vboxnetflt-reference.patch @@ -0,0 +1,16 @@ +Description: Made error message tell about missing vboxnetflt module. +Author: Michael Meskes <meskes@debian.org> + +Index: virtualbox/src/VBox/Devices/Network/DrvIntNet.cpp +=================================================================== +--- virtualbox.orig/src/VBox/Devices/Network/DrvIntNet.cpp ++++ virtualbox/src/VBox/Devices/Network/DrvIntNet.cpp +@@ -1991,7 +1991,7 @@ + return VERR_PDM_NO_ATTACHED_DRIVER; + } + return PDMDrvHlpVMSetError(pDrvIns, rc, RT_SRC_POS, +- N_("Failed to open/create the internal network '%s'"), pThis->szNetwork); ++ N_("Failed to open/create the internal network '%s' (you might need to modprobe vboxnetflt to make it accessible)"), pThis->szNetwork); + } + + AssertRelease(OpenReq.hIf != INTNET_HANDLE_INVALID); diff --git a/debian/patches/102989.patch b/debian/patches/102989.patch new file mode 100644 index 00000000..f228c0d2 --- /dev/null +++ b/debian/patches/102989.patch @@ -0,0 +1,34 @@ +Index: include/iprt/string.h +=================================================================== +--- a/include/iprt/string.h (revision 102988) ++++ b/include/iprt/string.h (revision 102989) +@@ -245,7 +245,29 @@ + # define RT_BCOPY_UNFORTIFIED(a_pDst, a_pSrc, a_cbToCopy) memcpy((a_pDst), (a_pSrc), (a_cbToCopy)) + #endif /* !RT_OS_LINUX && !__KERNEL__ */ + ++/** @def RT_STRSCPY ++ * Copy string and NULL-terminate output buffer. ++ * ++ * This macro should mostly be used in Linux kernel code. This is ++ * the replacement for deprecated strlcpy. It was deprecated since 3.16.60 ++ * when strscpy was introduced as an alternative. Finally, strlcpy was ++ * completely removed from kernel code in 6.8.0. ++ * ++ * @param a_pDst Pointer to the destination string buffer. ++ * @param a_pSrc Pointer to the source NULL-terminated string buffer. ++ * @param a_cbToCopy Size of destination buffer.. ++ */ ++#if defined(RT_OS_LINUX) && defined(__KERNEL__) ++# if (RTLNX_VER_MIN(3,16,60)) ++# define RT_STRSCPY(a_pDst, a_pSrc, a_cbToCopy) strscpy((a_pDst), (a_pSrc), (a_cbToCopy)) ++# else /* < 3.16.60 */ ++# define RT_STRSCPY(a_pDst, a_pSrc, a_cbToCopy) strlcpy((a_pDst), (a_pSrc), (a_cbToCopy)) ++# endif ++#else /* !RT_OS_LINUX && !__KERNEL__ */ ++# define RT_STRSCPY(a_pDst, a_pSrc, a_cbToCopy) strscpy((a_pDst), (a_pSrc), (a_cbToCopy)) ++#endif /* !RT_OS_LINUX && !__KERNEL__ */ + ++ + #ifdef IN_RING3 + + /** diff --git a/debian/patches/102990.patch b/debian/patches/102990.patch new file mode 100644 index 00000000..3cd42586 --- /dev/null +++ b/debian/patches/102990.patch @@ -0,0 +1,107 @@ +Index: src/VBox/Additions/common/VBoxGuest/VBoxGuest-linux.c +=================================================================== +--- a/src/VBox/Additions/common/VBoxGuest/VBoxGuest-linux.c (revision 102989) ++++ b/src/VBox/Additions/common/VBoxGuest/VBoxGuest-linux.c (revision 102990) +@@ -1410,7 +1410,7 @@ + RTLogGroupSettings(pLogger, pszValue); + } + else if (pParam->name[0] != 'd') +- strlcpy(&g_szLogGrp[0], pszValue, sizeof(g_szLogGrp)); ++ RT_STRSCPY(&g_szLogGrp[0], pszValue, sizeof(g_szLogGrp)); + + return 0; + } +@@ -1436,7 +1436,7 @@ + RTLogFlags(pLogger, pszValue); + } + else if (pParam->name[0] != 'd') +- strlcpy(&g_szLogFlags[0], pszValue, sizeof(g_szLogFlags)); ++ RT_STRSCPY(&g_szLogFlags[0], pszValue, sizeof(g_szLogFlags)); + return 0; + } + +@@ -1461,7 +1461,7 @@ + RTLogDestinations(pLogger, pszValue); + } + else if (pParam->name[0] != 'd') +- strlcpy(&g_szLogDst[0], pszValue, sizeof(g_szLogDst)); ++ RT_STRSCPY(&g_szLogDst[0], pszValue, sizeof(g_szLogDst)); + return 0; + } + +Index: src/VBox/Additions/linux/drm/vbox_drv.h +=================================================================== +--- a/src/VBox/Additions/linux/drm/vbox_drv.h (revision 102989) ++++ b/src/VBox/Additions/linux/drm/vbox_drv.h (revision 102990) +@@ -538,9 +538,7 @@ + int vbox_irq_init(struct vbox_private *vbox); + void vbox_irq_fini(struct vbox_private *vbox); + void vbox_report_hotplug(struct vbox_private *vbox); +-#if RTLNX_VER_MAX(5,15,0) && !RTLNX_RHEL_MAJ_PREREQ(9,1) && !RTLNX_SUSE_MAJ_PREREQ(15,5) + irqreturn_t vbox_irq_handler(int irq, void *arg); +-#endif + + /* vbox_hgsmi.c */ + void *hgsmi_buffer_alloc(struct gen_pool *guest_pool, size_t size, +Index: src/VBox/Additions/linux/sharedfolders/vfsmod.c +=================================================================== +--- a/src/VBox/Additions/linux/sharedfolders/vfsmod.c (revision 102989) ++++ b/src/VBox/Additions/linux/sharedfolders/vfsmod.c (revision 102990) +@@ -1408,7 +1408,7 @@ + switch (opt) { + case Opt_iocharset: + case Opt_nls: +- strlcpy(info->nls_name, param->string, sizeof(info->nls_name)); ++ RT_STRSCPY(info->nls_name, param->string, sizeof(info->nls_name)); + break; + case Opt_uid: + info->uid = result.uint_32; +@@ -1469,7 +1469,7 @@ + printk(KERN_WARNING "vboxsf: cache mode (%u) is out of range, using default instead.\n", result.uint_32); + break; + case Opt_tag: +- strlcpy(info->szTag, param->string, sizeof(info->szTag)); ++ RT_STRSCPY(info->szTag, param->string, sizeof(info->szTag)); + break; + default: + return invalf(fc, "Invalid mount option: '%s'", param->key); +@@ -1528,7 +1528,7 @@ + } + + /* fc->source (the shared folder name) is set after vbsf_init_fs_ctx() */ +- strlcpy(info->name, fc->source, sizeof(info->name)); ++ RT_STRSCPY(info->name, fc->source, sizeof(info->name)); + + # if RTLNX_VER_MAX(5,3,0) + return vfs_get_super(fc, vfs_get_independent_super, vbsf_read_super_aux); +Index: src/VBox/Additions/linux/sharedfolders/regops.c +=================================================================== +--- a/src/VBox/Additions/linux/sharedfolders/regops.c (revision 102989) ++++ b/src/VBox/Additions/linux/sharedfolders/regops.c (revision 102990) +@@ -3505,7 +3505,7 @@ + }; + + /** file_operations::mmap wrapper for logging purposes. */ +-extern int vbsf_reg_mmap(struct file *file, struct vm_area_struct *vma) ++static int vbsf_reg_mmap(struct file *file, struct vm_area_struct *vma) + { + int rc; + SFLOGFLOW(("vbsf_reg_mmap: file=%p vma=%p\n", file, vma)); +@@ -3786,7 +3786,7 @@ + } + + # if RTLNX_VER_MIN(5,19,0) || RTLNX_RHEL_RANGE(9,3, 9,99) +-int vbsf_write_begin(struct file *file, struct address_space *mapping, loff_t pos, ++static int vbsf_write_begin(struct file *file, struct address_space *mapping, loff_t pos, + unsigned len, struct page **pagep, void **fsdata) + { + vbsf_write_begin_warn(pos, len, 0); +@@ -3793,7 +3793,7 @@ + return simple_write_begin(file, mapping, pos, len, pagep, fsdata); + } + # else +-int vbsf_write_begin(struct file *file, struct address_space *mapping, loff_t pos, ++static int vbsf_write_begin(struct file *file, struct address_space *mapping, loff_t pos, + unsigned len, unsigned flags, struct page **pagep, void **fsdata) + { + vbsf_write_begin_warn(pos, len, flags); diff --git a/debian/patches/102992.patch b/debian/patches/102992.patch new file mode 100644 index 00000000..58319078 --- /dev/null +++ b/debian/patches/102992.patch @@ -0,0 +1,25 @@ +Index: include/iprt/string.h +=================================================================== +--- a/include/iprt/string.h (revision 102991) ++++ b/include/iprt/string.h (revision 102992) +@@ -255,16 +255,16 @@ + * + * @param a_pDst Pointer to the destination string buffer. + * @param a_pSrc Pointer to the source NULL-terminated string buffer. +- * @param a_cbToCopy Size of destination buffer.. ++ * @param a_cbDst Size of destination buffer. + */ + #if defined(RT_OS_LINUX) && defined(__KERNEL__) + # if (RTLNX_VER_MIN(3,16,60)) +-# define RT_STRSCPY(a_pDst, a_pSrc, a_cbToCopy) strscpy((a_pDst), (a_pSrc), (a_cbToCopy)) ++# define RT_STRSCPY(a_pDst, a_pSrc, a_cbDst) (void)strscpy((a_pDst), (a_pSrc), (a_cbDst)) + # else /* < 3.16.60 */ +-# define RT_STRSCPY(a_pDst, a_pSrc, a_cbToCopy) strlcpy((a_pDst), (a_pSrc), (a_cbToCopy)) ++# define RT_STRSCPY(a_pDst, a_pSrc, a_cbDst) strlcpy((a_pDst), (a_pSrc), (a_cbDst)) + # endif + #else /* !RT_OS_LINUX && !__KERNEL__ */ +-# define RT_STRSCPY(a_pDst, a_pSrc, a_cbToCopy) strscpy((a_pDst), (a_pSrc), (a_cbToCopy)) ++# define RT_STRSCPY(a_pDst, a_pSrc, a_cbDst) (void)strscpy((a_pDst), (a_pSrc), (a_cbDst)) + #endif /* !RT_OS_LINUX && !__KERNEL__ */ + + diff --git a/debian/patches/102993.patch b/debian/patches/102993.patch new file mode 100644 index 00000000..6b0c0e9b --- /dev/null +++ b/debian/patches/102993.patch @@ -0,0 +1,13 @@ +Index: include/iprt/string.h +=================================================================== +--- a/include/iprt/string.h (revision 102992) ++++ b/include/iprt/string.h (revision 102993) +@@ -258,7 +258,7 @@ + * @param a_cbDst Size of destination buffer. + */ + #if defined(RT_OS_LINUX) && defined(__KERNEL__) +-# if (RTLNX_VER_MIN(3,16,60)) ++# if (RTLNX_VER_MIN(4,3,0)) + # define RT_STRSCPY(a_pDst, a_pSrc, a_cbDst) (void)strscpy((a_pDst), (a_pSrc), (a_cbDst)) + # else /* < 3.16.60 */ + # define RT_STRSCPY(a_pDst, a_pSrc, a_cbDst) strlcpy((a_pDst), (a_pSrc), (a_cbDst)) diff --git a/debian/patches/102994.patch b/debian/patches/102994.patch new file mode 100644 index 00000000..93a51709 --- /dev/null +++ b/debian/patches/102994.patch @@ -0,0 +1,23 @@ +Index: include/iprt/string.h +=================================================================== +--- a/include/iprt/string.h (revision 102993) ++++ b/include/iprt/string.h (revision 102994) +@@ -259,12 +259,16 @@ + */ + #if defined(RT_OS_LINUX) && defined(__KERNEL__) + # if (RTLNX_VER_MIN(4,3,0)) +-# define RT_STRSCPY(a_pDst, a_pSrc, a_cbDst) (void)strscpy((a_pDst), (a_pSrc), (a_cbDst)) ++# define RT_STRSCPY(a_pDst, a_pSrc, a_cbDst) \ ++ { \ ++ ssize_t _ret; \ ++ _ret = strscpy((a_pDst), (a_pSrc), (a_cbDst)); \ ++ } + # else /* < 3.16.60 */ + # define RT_STRSCPY(a_pDst, a_pSrc, a_cbDst) strlcpy((a_pDst), (a_pSrc), (a_cbDst)) + # endif + #else /* !RT_OS_LINUX && !__KERNEL__ */ +-# define RT_STRSCPY(a_pDst, a_pSrc, a_cbDst) (void)strscpy((a_pDst), (a_pSrc), (a_cbDst)) ++# define RT_STRSCPY(a_pDst, a_pSrc, a_cbDst) strlcpy((a_pDst), (a_pSrc), (a_cbDst)) + #endif /* !RT_OS_LINUX && !__KERNEL__ */ + + diff --git a/debian/patches/102999.patch b/debian/patches/102999.patch new file mode 100644 index 00000000..2c0e3ef3 --- /dev/null +++ b/debian/patches/102999.patch @@ -0,0 +1,22 @@ +Index: include/iprt/string.h +=================================================================== +--- a/include/iprt/string.h (revision 102998) ++++ b/include/iprt/string.h (revision 102999) +@@ -249,7 +249,7 @@ + * Copy string and NULL-terminate output buffer. + * + * This macro should mostly be used in Linux kernel code. This is +- * the replacement for deprecated strlcpy. It was deprecated since 3.16.60 ++ * the replacement for deprecated strlcpy. It was deprecated since 4.3.0 + * when strscpy was introduced as an alternative. Finally, strlcpy was + * completely removed from kernel code in 6.8.0. + * +@@ -264,7 +264,7 @@ + ssize_t _ret; \ + _ret = strscpy((a_pDst), (a_pSrc), (a_cbDst)); \ + } +-# else /* < 3.16.60 */ ++# else /* < 4.3.0 */ + # define RT_STRSCPY(a_pDst, a_pSrc, a_cbDst) strlcpy((a_pDst), (a_pSrc), (a_cbDst)) + # endif + #else /* !RT_OS_LINUX && !__KERNEL__ */ diff --git a/debian/patches/103024.patch b/debian/patches/103024.patch new file mode 100644 index 00000000..5bd2ba30 --- /dev/null +++ b/debian/patches/103024.patch @@ -0,0 +1,101 @@ +Index: include/iprt/string.h +=================================================================== +--- a/include/iprt/string.h (revision 103023) ++++ b/include/iprt/string.h (revision 103024) +@@ -245,33 +245,7 @@ + # define RT_BCOPY_UNFORTIFIED(a_pDst, a_pSrc, a_cbToCopy) memcpy((a_pDst), (a_pSrc), (a_cbToCopy)) + #endif /* !RT_OS_LINUX && !__KERNEL__ */ + +-/** @def RT_STRSCPY +- * Copy string and NULL-terminate output buffer. +- * +- * This macro should mostly be used in Linux kernel code. This is +- * the replacement for deprecated strlcpy. It was deprecated since 4.3.0 +- * when strscpy was introduced as an alternative. Finally, strlcpy was +- * completely removed from kernel code in 6.8.0. +- * +- * @param a_pDst Pointer to the destination string buffer. +- * @param a_pSrc Pointer to the source NULL-terminated string buffer. +- * @param a_cbDst Size of destination buffer. +- */ +-#if defined(RT_OS_LINUX) && defined(__KERNEL__) +-# if (RTLNX_VER_MIN(4,3,0)) +-# define RT_STRSCPY(a_pDst, a_pSrc, a_cbDst) \ +- { \ +- ssize_t _ret; \ +- _ret = strscpy((a_pDst), (a_pSrc), (a_cbDst)); \ +- } +-# else /* < 4.3.0 */ +-# define RT_STRSCPY(a_pDst, a_pSrc, a_cbDst) strlcpy((a_pDst), (a_pSrc), (a_cbDst)) +-# endif +-#else /* !RT_OS_LINUX && !__KERNEL__ */ +-# define RT_STRSCPY(a_pDst, a_pSrc, a_cbDst) strlcpy((a_pDst), (a_pSrc), (a_cbDst)) +-#endif /* !RT_OS_LINUX && !__KERNEL__ */ + +- + #ifdef IN_RING3 + + /** +Index: src/VBox/Additions/common/VBoxGuest/VBoxGuest-linux.c +=================================================================== +--- a/src/VBox/Additions/common/VBoxGuest/VBoxGuest-linux.c (revision 103023) ++++ b/src/VBox/Additions/common/VBoxGuest/VBoxGuest-linux.c (revision 103024) +@@ -1410,8 +1410,7 @@ + RTLogGroupSettings(pLogger, pszValue); + } + else if (pParam->name[0] != 'd') +- RT_STRSCPY(&g_szLogGrp[0], pszValue, sizeof(g_szLogGrp)); +- ++ RTStrCopy(&g_szLogGrp[0], sizeof(g_szLogGrp), pszValue); + return 0; + } + +@@ -1436,7 +1435,7 @@ + RTLogFlags(pLogger, pszValue); + } + else if (pParam->name[0] != 'd') +- RT_STRSCPY(&g_szLogFlags[0], pszValue, sizeof(g_szLogFlags)); ++ RTStrCopy(&g_szLogFlags[0], sizeof(g_szLogFlags), pszValue); + return 0; + } + +@@ -1461,7 +1460,7 @@ + RTLogDestinations(pLogger, pszValue); + } + else if (pParam->name[0] != 'd') +- RT_STRSCPY(&g_szLogDst[0], pszValue, sizeof(g_szLogDst)); ++ RTStrCopy(&g_szLogDst[0], sizeof(g_szLogDst), pszValue); + return 0; + } + +Index: src/VBox/Additions/linux/sharedfolders/vfsmod.c +=================================================================== +--- a/src/VBox/Additions/linux/sharedfolders/vfsmod.c (revision 103023) ++++ b/src/VBox/Additions/linux/sharedfolders/vfsmod.c (revision 103024) +@@ -1408,7 +1408,7 @@ + switch (opt) { + case Opt_iocharset: + case Opt_nls: +- RT_STRSCPY(info->nls_name, param->string, sizeof(info->nls_name)); ++ RTStrCopy(info->nls_name, sizeof(info->nls_name), param->string); + break; + case Opt_uid: + info->uid = result.uint_32; +@@ -1469,7 +1469,7 @@ + printk(KERN_WARNING "vboxsf: cache mode (%u) is out of range, using default instead.\n", result.uint_32); + break; + case Opt_tag: +- RT_STRSCPY(info->szTag, param->string, sizeof(info->szTag)); ++ RTStrCopy(info->szTag, sizeof(info->szTag), param->string); + break; + default: + return invalf(fc, "Invalid mount option: '%s'", param->key); +@@ -1528,7 +1528,7 @@ + } + + /* fc->source (the shared folder name) is set after vbsf_init_fs_ctx() */ +- RT_STRSCPY(info->name, fc->source, sizeof(info->name)); ++ RTStrCopy(info->name, sizeof(info->name), fc->source); + + # if RTLNX_VER_MAX(5,3,0) + return vfs_get_super(fc, vfs_get_independent_super, vbsf_read_super_aux); diff --git a/debian/patches/103066.patch b/debian/patches/103066.patch new file mode 100644 index 00000000..7346d559 --- /dev/null +++ b/debian/patches/103066.patch @@ -0,0 +1,80 @@ +Index: src/VBox/Runtime/common/log/log.cpp +=================================================================== +--- a/src/VBox/Runtime/common/log/log.cpp (revision 103065) ++++ b/src/VBox/Runtime/common/log/log.cpp (revision 103066) +@@ -548,7 +548,7 @@ + uint32_t const fFlags = RT_LO_U16(fFlagsAndGroup); + uint16_t const iGroup = RT_HI_U16(fFlagsAndGroup); + if ( iGroup != UINT16_MAX +- && ( (pLoggerInt->afGroups[iGroup < pLoggerInt->cGroups ? iGroup : 0] & (fFlags | RTLOGGRPFLAGS_ENABLED)) ++ && ( (*(pLoggerInt->afGroups + (iGroup < pLoggerInt->cGroups ? iGroup : 0)) & (fFlags | RTLOGGRPFLAGS_ENABLED)) + != (fFlags | RTLOGGRPFLAGS_ENABLED))) + pLoggerInt = NULL; + } +@@ -1555,7 +1555,7 @@ + pLoggerInt->fFlags |= RTLOGFLAGS_DISABLED; + iGroup = pLoggerInt->cGroups; + while (iGroup-- > 0) +- pLoggerInt->afGroups[iGroup] = 0; ++ *(pLoggerInt->afGroups + iGroup) = 0; + + /* + * Flush it. +@@ -1788,9 +1788,9 @@ + for (i = 0; i < pLoggerInt->cGroups; i++) + { + if (fEnabled) +- pLoggerInt->afGroups[i] |= fFlags; ++ *(pLoggerInt->afGroups + i) |= fFlags; + else +- pLoggerInt->afGroups[i] &= ~fFlags; ++ *(pLoggerInt->afGroups + i) &= ~fFlags; + } + } + else +@@ -4158,7 +4158,7 @@ + || !pszFormat || !*pszFormat) + return VINF_LOG_DISABLED; + if ( iGroup != ~0U +- && (pLoggerInt->afGroups[iGroup] & (fFlags | RTLOGGRPFLAGS_ENABLED)) != (fFlags | RTLOGGRPFLAGS_ENABLED)) ++ && (*(pLoggerInt->afGroups + iGroup) & (fFlags | RTLOGGRPFLAGS_ENABLED)) != (fFlags | RTLOGGRPFLAGS_ENABLED)) + return VINF_LOG_DISABLED; + + /* +Index: src/VBox/Runtime/r0drv/linux/memobj-r0drv-linux.c +=================================================================== +--- a/src/VBox/Runtime/r0drv/linux/memobj-r0drv-linux.c (revision 103065) ++++ b/src/VBox/Runtime/r0drv/linux/memobj-r0drv-linux.c (revision 103066) +@@ -425,7 +425,7 @@ + { + fContiguous = true; + for (iPage = 0; iPage < cPages; iPage++) +- pMemLnx->apPages[iPage] = &paPages[iPage]; ++ *(pMemLnx->apPages + iPage) = &paPages[iPage]; + } + else if (fContiguous) + { +@@ -441,11 +441,11 @@ + * IPRT_USE_APPLY_TO_PAGE_RANGE_FOR_EXEC. */ + for (iPage = 0; iPage < cPages; iPage++) + { +- pMemLnx->apPages[iPage] = alloc_page(fFlagsLnx | __GFP_NOWARN); +- if (RT_UNLIKELY(!pMemLnx->apPages[iPage])) ++ *(pMemLnx->apPages + iPage) = alloc_page(fFlagsLnx | __GFP_NOWARN); ++ if (RT_UNLIKELY(!*(pMemLnx->apPages + iPage))) + { + while (iPage-- > 0) +- __free_page(pMemLnx->apPages[iPage]); ++ __free_page(*(pMemLnx->apPages + iPage)); + rtR0MemObjDelete(&pMemLnx->Core); + return rcNoMem; + } +@@ -622,7 +622,7 @@ + { + size_t iPage = pMemLnx->cPages; + while (iPage-- > 0) +- if (PageHighMem(pMemLnx->apPages[iPage])) ++ if (PageHighMem(*(pMemLnx->apPages + iPage))) + { + fMustMap = true; + break; diff --git a/debian/patches/103067.patch b/debian/patches/103067.patch new file mode 100644 index 00000000..702f82d2 --- /dev/null +++ b/debian/patches/103067.patch @@ -0,0 +1,66 @@ +Index: src/VBox/Additions/linux/sharedfolders/vfsmod.c +=================================================================== +--- a/src/VBox/Additions/linux/sharedfolders/vfsmod.c (revision 103066) ++++ b/src/VBox/Additions/linux/sharedfolders/vfsmod.c (revision 103067) +@@ -473,8 +473,7 @@ + + path->u16Length = 1; + path->u16Size = 2; +- path->String.utf8[0] = '/'; +- path->String.utf8[1] = 0; ++ RTStrCopy(path->String.utf8, path->u16Size, "/"); + + /* + * Stat the root directory (for inode info). +Index: src/VBox/Additions/linux/sharedfolders/dirops.c +=================================================================== +--- a/src/VBox/Additions/linux/sharedfolders/dirops.c (revision 103066) ++++ b/src/VBox/Additions/linux/sharedfolders/dirops.c (revision 103067) +@@ -492,7 +492,7 @@ + cchSrcName = pEntry->name.u16Length; + AssertLogRelBreak(offEntryInBuf + RT_UOFFSETOF(SHFLDIRINFO, name.String) + cbSrcName <= cbValid); + AssertLogRelBreak(cchSrcName < cbSrcName); +- AssertLogRelBreak(pEntry->name.String.ach[cchSrcName] == '\0'); ++ AssertLogRelBreak(*(pEntry->name.String.ach + cchSrcName) == '\0'); + + /* + * Filter out '.' and '..' entires. +@@ -500,7 +500,7 @@ + if ( cchSrcName > 2 + || pEntry->name.String.ach[0] != '.' + || ( cchSrcName == 2 +- && pEntry->name.String.ach[1] != '.')) { ++ && *(pEntry->name.String.ach + 1) != '.')) { + int const d_type = vbsf_get_d_type(pEntry->Info.Attr.fMode); + ino_t const d_ino = (ino_t)offPos + 0xbeef; /* very fake */ + bool fContinue; +Index: src/VBox/Additions/linux/sharedfolders/utils.c +=================================================================== +--- a/src/VBox/Additions/linux/sharedfolders/utils.c (revision 103066) ++++ b/src/VBox/Additions/linux/sharedfolders/utils.c (revision 103067) +@@ -1047,9 +1047,9 @@ + RT_BCOPY_UNFORTIFIED(&tmp->String.utf8[0], d_name, d_len + 1); + else { + RT_BCOPY_UNFORTIFIED(&tmp->String.utf8[0], p_name, p_len); +- tmp->String.utf8[p_len] = '/'; +- RT_BCOPY_UNFORTIFIED(&tmp->String.utf8[p_len + 1], d_name, d_len); +- tmp->String.utf8[p_len + 1 + d_len] = '\0'; ++ *(tmp->String.utf8 + p_len) = '/'; ++ RT_BCOPY_UNFORTIFIED(tmp->String.utf8 + p_len + 1, d_name, d_len); ++ *(tmp->String.utf8 + p_len + 1 + d_len) = '\0'; + } + + *result = tmp; +Index: include/VBox/VBoxGuestLibSharedFoldersInline.h +=================================================================== +--- a/include/VBox/VBoxGuestLibSharedFoldersInline.h (revision 103066) ++++ b/include/VBox/VBoxGuestLibSharedFoldersInline.h (revision 103067) +@@ -1505,7 +1505,7 @@ + pReq->StrPath.u16Length = (uint16_t)cchPath; + pReq->StrPath.u16Size = (uint16_t)cchPath + 1; + RT_BCOPY_UNFORTIFIED(pReq->StrPath.String.ach, pszPath, cchPath); +- pReq->StrPath.String.ach[cchPath] = '\0'; ++ *(pReq->StrPath.String.ach + cchPath) = '\0'; + + { + int vrc = VbglR0SfHostReqReadLinkContig(idRoot, pvBuf, PhysBuffer, cbBuffer, pReq); diff --git a/debian/patches/12-make-module.patch b/debian/patches/12-make-module.patch new file mode 100644 index 00000000..50fd0056 --- /dev/null +++ b/debian/patches/12-make-module.patch @@ -0,0 +1,14 @@ +Description: Fix ARCH setting in modules Makefiles. +Author: Michael Meskes <meskes@debian.org>, Gianfranco Costamagna <locutusofborg@debian.org> + +--- a/src/VBox/Installer/linux/Makefile-header.gmk ++++ b/src/VBox/Installer/linux/Makefile-header.gmk +@@ -60,7 +60,7 @@ + # + + # VBOX_KBUILD_TARGET_ARCH = amd64|x86 +-ifeq ($(filter-out x86_64 amd64 AMD64,$(shell uname -m)),) ++ifeq ($(filter-out x86_64 amd64 AMD64,$(shell dpkg-architecture -qDEB_HOST_GNU_CPU)),) + VBOX_KBUILD_TARGET_ARCH_DEFAULT := amd64 + else + VBOX_KBUILD_TARGET_ARCH_DEFAULT := x86 diff --git a/debian/patches/13-module-mismatch.patch b/debian/patches/13-module-mismatch.patch new file mode 100644 index 00000000..daf70995 --- /dev/null +++ b/debian/patches/13-module-mismatch.patch @@ -0,0 +1,22 @@ +Description: Adjusts failure message with Debian specific solution. +Author: Daniel Baumann <daniel@debian.org> + +Index: virtualbox/src/VBox/VMM/VMMR3/VM.cpp +=================================================================== +--- virtualbox.orig/src/VBox/VMM/VMMR3/VM.cpp ++++ virtualbox/src/VBox/VMM/VMMR3/VM.cpp +@@ -399,9 +399,11 @@ + break; + case VERR_VERSION_MISMATCH: + case VERR_VM_DRIVER_VERSION_MISMATCH: +- pszError = N_("The VirtualBox support driver which is running is from a different " +- "version of VirtualBox. You can correct this by stopping all " +- "running instances of VirtualBox and reinstalling the software."); ++ pszError = N_("The version of the VirtualBox kernel modules and the version of " ++ "VirtualBox application are not matching. You can correct this by " ++ "either installing the correct virtualbox-modules package " ++ "(if available) through apt-get or by building it manually with: " ++ "module-assistant auto-install virtualbox"); + break; + default: + pszError = N_("Unknown error initializing kernel driver"); diff --git a/debian/patches/16-no-update.patch b/debian/patches/16-no-update.patch new file mode 100644 index 00000000..db2baef4 --- /dev/null +++ b/debian/patches/16-no-update.patch @@ -0,0 +1,110 @@ + +Description: Disable "Check for Updates" action. +Bug-Ubuntu: https://bugs.launchpad.net/bugs/272212 +Author: Daniel Hahler <ubuntu@thequod.de>, Felix Geyer <fgeyer@debian.org>, Gianfranco Costamagna <locutusofborg@debian.org> + +Index: virtualbox/doc/manual/en_US/user_Introduction.xml +=================================================================== +--- virtualbox.orig/doc/manual/en_US/user_Introduction.xml ++++ virtualbox/doc/manual/en_US/user_Introduction.xml +@@ -6090,14 +6090,14 @@ + <xref linkend="specialcharacters"/>. + </para> + </listitem> +- ++ <!-- + <listitem> + <para> + <emphasis role="bold">Update.</emphasis> Enables you to + specify various settings for Automatic Updates. + </para> + </listitem> +- ++ --> + <listitem> + <para> + <emphasis role="bold">Language.</emphasis> Enables you to +Index: virtualbox/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.cpp +=================================================================== +--- virtualbox.orig/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.cpp ++++ virtualbox/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.cpp +@@ -2420,7 +2420,7 @@ + bool UIExtraDataManager::applicationUpdateEnabled() + { + /* 'True' unless 'restriction' feature allowed: */ +- return !isFeatureAllowed(GUI_PreventApplicationUpdate); ++ return false; + } + + QString UIExtraDataManager::applicationUpdateData() +Index: virtualbox/src/VBox/Frontends/VirtualBox/src/settings/UISettingsDialogSpecific.cpp +=================================================================== +--- virtualbox.orig/src/VBox/Frontends/VirtualBox/src/settings/UISettingsDialogSpecific.cpp ++++ virtualbox/src/VBox/Frontends/VirtualBox/src/settings/UISettingsDialogSpecific.cpp +@@ -48,10 +48,10 @@ + #ifdef VBOX_WS_WIN + # include "UIGlobalSettingsInterface.h" + #endif +-#ifdef VBOX_GUI_WITH_NETWORK_MANAGER +-# include "UIGlobalSettingsProxy.h" +-# include "UIGlobalSettingsUpdate.h" +-#endif ++//#ifdef VBOX_GUI_WITH_NETWORK_MANAGER ++//# include "UIGlobalSettingsProxy.h" ++//# include "UIGlobalSettingsUpdate.h" ++//#endif + + /* GUI includes: Machine Settings: */ + #include "UIMachineSettingsAudio.h" +@@ -100,7 +100,7 @@ + + #ifdef VBOX_GUI_WITH_NETWORK_MANAGER + /* Update page: */ +- m_pSelector->setItemText(GlobalSettingsPageType_Update, tr("Update")); ++ //m_pSelector->setItemText(GlobalSettingsPageType_Update, tr("Update")); + #endif + + /* Language page: */ +@@ -111,7 +111,7 @@ + + #ifdef VBOX_GUI_WITH_NETWORK_MANAGER + /* Proxy page: */ +- m_pSelector->setItemText(GlobalSettingsPageType_Proxy, tr("Proxy")); ++ //m_pSelector->setItemText(GlobalSettingsPageType_Proxy, tr("Proxy")); + #endif + + #ifdef VBOX_WS_WIN +@@ -227,14 +227,14 @@ + } + #ifdef VBOX_GUI_WITH_NETWORK_MANAGER + /* Update page: */ +- case GlobalSettingsPageType_Update: ++ /*case GlobalSettingsPageType_Update: + { + pSettingsPage = new UIGlobalSettingsUpdate; + addItem(":/refresh_32px.png", ":/refresh_24px.png", ":/refresh_16px.png", + iPageIndex, "#update", pSettingsPage); + addPageHelpKeyword(iPageIndex, "preferences"); + break; +- } ++ }*/ + #endif /* VBOX_GUI_WITH_NETWORK_MANAGER */ + /* Language page: */ + case GlobalSettingsPageType_Language: +@@ -256,14 +256,14 @@ + } + #ifdef VBOX_GUI_WITH_NETWORK_MANAGER + /* Proxy page: */ +- case GlobalSettingsPageType_Proxy: ++ /*case GlobalSettingsPageType_Proxy: + { + pSettingsPage = new UIGlobalSettingsProxy; + addItem(":/proxy_32px.png", ":/proxy_24px.png", ":/proxy_16px.png", + iPageIndex, "#proxy", pSettingsPage); + addPageHelpKeyword(iPageIndex, "preferences"); + break; +- } ++ }*/ + #endif /* VBOX_GUI_WITH_NETWORK_MANAGER */ + #ifdef VBOX_WS_WIN + /* Interface page: */ diff --git a/debian/patches/23-remove-invalid-chars-check.patch b/debian/patches/23-remove-invalid-chars-check.patch new file mode 100644 index 00000000..ba040e41 --- /dev/null +++ b/debian/patches/23-remove-invalid-chars-check.patch @@ -0,0 +1,18 @@ +Description: Remove check for invalid characters in the build path since we have fixed + kBuild to handle those paths starting from version 1:0.1.98svn2318-7. +Author: Felix Geyer <fgeyer@debian.org> + +--- a/configure ++++ b/configure +@@ -195,11 +195,6 @@ BUILD_TYPE="release" + # the restricting tool is ar (mri mode). + INVALID_CHARS="[^A-Za-z0-9/\\$:._-]" + +-if (cd `dirname $0`; pwd)|grep -q "$INVALID_CHARS"; then +- echo "Error: VBox base path contains invalid characters!" +- exit 1 +-fi +- + # Posix /bin/sh isn't supporting echo -n. Use printf instead. + ECHO_N="printf" + diff --git a/debian/patches/27-hide-host-cache-warning.patch b/debian/patches/27-hide-host-cache-warning.patch new file mode 100644 index 00000000..b20a775b --- /dev/null +++ b/debian/patches/27-hide-host-cache-warning.patch @@ -0,0 +1,43 @@ +Description: Silently enable the host I/O cache when the image is on an ext4/XFS partition. + No need to warn users about it. +Author: Felix Geyer <fgeyer@debian.org> + +Index: virtualbox/src/VBox/Main/src-client/ConsoleImpl2.cpp +=================================================================== +--- virtualbox.orig/src/VBox/Main/src-client/ConsoleImpl2.cpp ++++ virtualbox/src/VBox/Main/src-client/ConsoleImpl2.cpp +@@ -4628,34 +4628,12 @@ + if ( enmFsTypeFile == RTFSTYPE_EXT4 + || enmFsTypeFile == RTFSTYPE_XFS) + { +- i_atVMRuntimeErrorCallbackF(0, "Ext4PartitionDetected", +- N_("The host I/O cache for at least one controller is disabled " +- "and the medium '%s' for this VM " +- "is located on an %s partition. There is a known Linux " +- "kernel bug which can lead to the corruption of the virtual " +- "disk image under these conditions.\n" +- "Either enable the host I/O cache permanently in the VM " +- "settings or put the disk image and the snapshot folder " +- "onto a different file system.\n" +- "The host I/O cache will now be enabled for this medium"), +- strFile.c_str(), enmFsTypeFile == RTFSTYPE_EXT4 ? "ext4" : "xfs"); + *pfUseHostIOCache = true; + } + else if ( ( enmFsTypeSnap == RTFSTYPE_EXT4 + || enmFsTypeSnap == RTFSTYPE_XFS) + && !mfSnapshotFolderExt4WarningShown) + { +- i_atVMRuntimeErrorCallbackF(0, "Ext4PartitionDetected", +- N_("The host I/O cache for at least one controller is disabled " +- "and the snapshot folder for this VM " +- "is located on an %s partition. There is a known Linux " +- "kernel bug which can lead to the corruption of the virtual " +- "disk image under these conditions.\n" +- "Either enable the host I/O cache permanently in the VM " +- "settings or put the disk image and the snapshot folder " +- "onto a different file system.\n" +- "The host I/O cache will now be enabled for this medium"), +- enmFsTypeSnap == RTFSTYPE_EXT4 ? "ext4" : "xfs"); + *pfUseHostIOCache = true; + mfSnapshotFolderExt4WarningShown = true; + } diff --git a/debian/patches/28-no-selinux-fedora.patch b/debian/patches/28-no-selinux-fedora.patch new file mode 100644 index 00000000..c57e0a63 --- /dev/null +++ b/debian/patches/28-no-selinux-fedora.patch @@ -0,0 +1,18 @@ +Description: Don't install the selinux-fedora modules. +Author: Felix Geyer <fgeyer@debian.org> + +Index: virtualbox/src/VBox/Additions/linux/Makefile.kmk +=================================================================== +--- virtualbox.orig/src/VBox/Additions/linux/Makefile.kmk ++++ virtualbox/src/VBox/Additions/linux/Makefile.kmk +@@ -301,9 +301,7 @@ + lnx_add_inst-noexec_SOURCES = \ + $(VBOX_REL_X11_ADD_INST)vboxclient.desktop \ + $(VBOX_REL_X11_ADD_INST)vboxvideo.ids \ +- $(if $(VBOX_WITH_LIGHTDM_GREETER_PACKING),lightdm-greeter/vbox-greeter.desktop,) \ +- selinux-fedora/vbox_x11.pp \ +- selinux-fedora/vbox_accel.pp ++ $(if $(VBOX_WITH_LIGHTDM_GREETER_PACKING),lightdm-greeter/vbox-greeter.desktop,) + + INSTALLS += lnx_add_inst-license + lnx_add_inst-license_INST = $(VBOX_LNX_ADD_INST_OUT_DIR) diff --git a/debian/patches/29-fix-ftbfs-as-needed.patch b/debian/patches/29-fix-ftbfs-as-needed.patch new file mode 100644 index 00000000..690a0ab9 --- /dev/null +++ b/debian/patches/29-fix-ftbfs-as-needed.patch @@ -0,0 +1,16 @@ +Description: Fix FTBFS with ld --as-needed. +Origin: vendor, http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/app-emulation/virtualbox/files/virtualbox-4.1.4-asneeded.patch?revision=1.2&view=markup + +Index: virtualbox/Config.kmk +=================================================================== +--- virtualbox.orig/Config.kmk 2015-04-02 15:46:59.611743003 +0200 ++++ virtualbox/Config.kmk 2015-04-02 15:46:59.611743003 +0200 +@@ -6658,7 +6658,7 @@ + TEMPLATE_VBoxBldProg_LDFLAGS.amd64 = -m64 + TEMPLATE_VBoxBldProg_LDFLAGS.sparc64 = -m64 + ifeq ($(KBUILD_HOST),linux) +-TEMPLATE_VBoxBldProg_LIBS = pthread m rt dl ++TEMPLATE_VBoxBldProg_LIBS = pthread m rt dl crypt + else ifeq ($(KBUILD_HOST),os2) + TEMPLATE_VBoxBldProg_TOOL = GXX3OMF + TEMPLATE_VBoxBldProg_LIBS = socket iconv diff --git a/debian/patches/32-disable-guest-version-check.patch b/debian/patches/32-disable-guest-version-check.patch new file mode 100644 index 00000000..e7339240 --- /dev/null +++ b/debian/patches/32-disable-guest-version-check.patch @@ -0,0 +1,16 @@ +Description: Disable notifications about outdated guest additions. +Author: Felix Geyer <fgeyer@debian.org> + +Index: virtualbox/src/VBox/Additions/x11/VBoxClient/hostversion.cpp +=================================================================== +--- virtualbox.orig/src/VBox/Additions/x11/VBoxClient/hostversion.cpp ++++ virtualbox/src/VBox/Additions/x11/VBoxClient/hostversion.cpp +@@ -94,7 +94,7 @@ + * Guest Additions. Distributors are encouraged to customise this. */ + RTStrPrintf(szMsg, sizeof(szMsg), "Your virtual machine is currently running the Guest Additions version %s. Since you are running a version of the Guest Additions provided by the operating system you installed in the virtual machine we recommend that you update it to at least version %s using that system's update features, or alternatively that you remove this version and then install the " VBOX_VENDOR_SHORT " Guest Additions package using the install option from the Devices menu. Please consult the documentation for the operating system you are running to find out how to update or remove the current Guest Additions package.", pszGuestVersion, pszHostVersion); + # endif /* VBOX_OSE */ +- rc = VBClShowNotify(szTitle, szMsg); ++ //rc = VBClShowNotify(szTitle, szMsg); + } + + /* Store host version to not notify again */ diff --git a/debian/patches/35-libvdeplug-soname.patch b/debian/patches/35-libvdeplug-soname.patch new file mode 100644 index 00000000..b79680ca --- /dev/null +++ b/debian/patches/35-libvdeplug-soname.patch @@ -0,0 +1,24 @@ +Description: Revert http://www.virtualbox.org/changeset/36310 + The libvdeplug.so symlink is only shipped in the -dev package. +Author: Felix Geyer <fgeyer@debian.org> + +Index: virtualbox/include/VBox/VDEPlugSymDefs.h +=================================================================== +--- virtualbox.orig/include/VBox/VDEPlugSymDefs.h ++++ virtualbox/include/VBox/VDEPlugSymDefs.h +@@ -1,5 +1,5 @@ + /** @file +- * Symbols from libvdeplug.so to be loaded at runtime for DrvVDE.cpp ++ * Symbols from libvdeplug.so.2 to be loaded at runtime for DrvVDE.cpp + */ + + /* +@@ -34,7 +34,7 @@ + */ + + /** The file name of the DBus library */ +-#define VBOX_LIB_VDE_PLUG_NAME "libvdeplug.so" ++#define VBOX_LIB_VDE_PLUG_NAME "libvdeplug.so.2" + #define RT_RUNTIME_LOADER_LIB_NAME VBOX_LIB_VDE_PLUG_NAME + + /** The name of the loader function */ diff --git a/debian/patches/36-fix-vnc-version-string.patch b/debian/patches/36-fix-vnc-version-string.patch new file mode 100644 index 00000000..694b6573 --- /dev/null +++ b/debian/patches/36-fix-vnc-version-string.patch @@ -0,0 +1,26 @@ +Description: fix version string for VNC plugin module. +Index: virtualbox/Config.kmk +=================================================================== +--- virtualbox.orig/Config.kmk ++++ virtualbox/Config.kmk +@@ -3859,6 +3859,7 @@ + -e 's+@VBOX_VERSION_MINOR@+$(VBOX_VERSION_MINOR)+g' \ + -e 's+@VBOX_VERSION_BUILD@+$(VBOX_VERSION_BUILD)+g' \ + -e 's+@VBOX_VERSION_STRING@+$(VBOX_VERSION_STRING)+g' \ ++ -e 's+@VBOX_VERSION_STRING_RAW@+$(VBOX_VERSION_STRING_RAW)+g' \ + -e 's+@VBOX_SVN_REV@+$(VBOX_SVN_REV)+g' \ + -e 's+@VBOX_VENDOR@+$(VBOX_VENDOR)+g' \ + -e 's+@VBOX_VENDOR_SHORT@+$(VBOX_VENDOR_SHORT)+g' \ +Index: virtualbox/src/VBox/ExtPacks/VNC/ExtPack.xml +=================================================================== +--- virtualbox.orig/src/VBox/ExtPacks/VNC/ExtPack.xml ++++ virtualbox/src/VBox/ExtPacks/VNC/ExtPack.xml +@@ -2,7 +2,7 @@ + <VirtualBoxExtensionPack xmlns="http://www.virtualbox.org/VirtualBoxExtensionPack" version="1.0"> + <Name>VNC</Name> + <Description>VNC plugin module</Description> +- <Version revision="@VBOX_SVN_REV@">@VBOX_VERSION_STRING@</Version> ++ <Version revision="@VBOX_SVN_REV@">@VBOX_VERSION_STRING_RAW@</Version> + <MainModule>VBoxVNCMain</MainModule> + <VRDEModule>VBoxVNC</VRDEModule> + <ShowLicense/> diff --git a/debian/patches/37-do-not-run-if-not-in-vm.patch b/debian/patches/37-do-not-run-if-not-in-vm.patch new file mode 100644 index 00000000..9ae3fcd5 --- /dev/null +++ b/debian/patches/37-do-not-run-if-not-in-vm.patch @@ -0,0 +1,29 @@ +Description: Check if we are running in a virtual machine before wasting time +running virtualbox guest things +Author: Kevin Puetz (puetzk) + +Origin: https://bugs.launchpad.net/ubuntu/+source/virtualbox/+bug/1762491/comments/9 +Last-Update: 2018-07-19 + +Index: virtualbox/src/VBox/Additions/x11/Installer/98vboxadd-xclient +=================================================================== +--- virtualbox.orig/src/VBox/Additions/x11/Installer/98vboxadd-xclient ++++ virtualbox/src/VBox/Additions/x11/Installer/98vboxadd-xclient +@@ -25,6 +25,17 @@ + # SPDX-License-Identifier: GPL-3.0-only + # + ++in_virtual_machine() ++{ ++ if [ -z "$(lspci -d 80ee:cafe)" ]; then ++ echo "VirtualBox Additions disabled, not in a Virtual Machine" >&2 ++ return 1 ++ fi ++ ++ return 0 ++} ++in_virtual_machine || return ++ + # Sanity check: if non-writeable PID-files are present in the user home + # directory VBoxClient will fail to start. + for i in $HOME/.vboxclient-*.pid; do diff --git a/debian/patches/fix-kernel-build.patch b/debian/patches/fix-kernel-build.patch new file mode 100644 index 00000000..5645d89a --- /dev/null +++ b/debian/patches/fix-kernel-build.patch @@ -0,0 +1,39 @@ +Origin: https://bugs.launchpad.net/ubuntu/+source/virtualbox/+bug/2053024 +Author: Xu Zhen (xuzhen666) +Forwarded: irc +diff --git a/src/VBox/HostDrivers/Support/SUPDrvTracer.cpp b/src/VBox/HostDrivers/Support/SUPDrvTracer.cpp +index 7b25b5cec..5cc50bf15 100644 +--- a/src/VBox/HostDrivers/Support/SUPDrvTracer.cpp ++++ b/src/VBox/HostDrivers/Support/SUPDrvTracer.cpp +@@ -1476,6 +1476,8 @@ SUPR0DECL(int) SUPR0TracerDeregisterImpl(void *hMod, PSUPDRVSESSION pSession) + SUPR0_EXPORT_SYMBOL(SUPR0TracerDeregisterImpl); + + ++#include <asm/nospec-branch.h> ++#include <asm/linkage.h> + /* + * The probe function is a bit more fun since we need tail jump optimizating. + * +@@ -1495,11 +1497,13 @@ SUPR0TracerFireProbe: \n\ + # if defined(RT_ARCH_AMD64) + __asm__("\ + movq g_pfnSupdrvProbeFireKernel(%rip), %rax \n\ ++ " ANNOTATE_RETPOLINE_SAFE " \n\ + jmp *%rax \n\ + "); + # elif defined(RT_ARCH_X86) + __asm__("\ + movl g_pfnSupdrvProbeFireKernel, %eax \n\ ++ " ANNOTATE_RETPOLINE_SAFE " \n\ + jmp *%eax \n\ + "); + # else +@@ -1511,7 +1515,7 @@ __asm__("\ + .type supdrvTracerProbeFireStub,@function \n\ + .global supdrvTracerProbeFireStub \n\ + supdrvTracerProbeFireStub: \n\ +- ret \n\ ++ " ASM_RET " \n\ + .size supdrvTracerProbeFireStub, . - supdrvTracerProbeFireStub \n\ + \n\ + .previous \n\ diff --git a/debian/patches/gcc-13.patch b/debian/patches/gcc-13.patch new file mode 100644 index 00000000..e1234cce --- /dev/null +++ b/debian/patches/gcc-13.patch @@ -0,0 +1,12 @@ +diff --git a/src/libs/dxvk-native-1.9.2a/src/util/util_bit.h b/src/libs/dxvk-native-1.9.2a/src/util/util_bit.h +index 3c65c70df..d283792f2 100644 +--- a/src/libs/dxvk-native-1.9.2a/src/util/util_bit.h ++++ b/src/libs/dxvk-native-1.9.2a/src/util/util_bit.h +@@ -16,6 +16,7 @@ + #include "util_likely.h" + #include "util_math.h" + ++#include <cstdint> + #include <cstring> + #include <iterator> + #include <type_traits> diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 00000000..b13e272b --- /dev/null +++ b/debian/patches/series @@ -0,0 +1,27 @@ +01-build-arch.patch +02-gsoap-build-fix.patch +04-vboxdrv-references.patch +06-xsession.patch +07-vboxnetflt-reference.patch +12-make-module.patch +13-module-mismatch.patch +16-no-update.patch +23-remove-invalid-chars-check.patch +27-hide-host-cache-warning.patch +28-no-selinux-fedora.patch +#29-fix-ftbfs-as-needed.patch +32-disable-guest-version-check.patch +35-libvdeplug-soname.patch +36-fix-vnc-version-string.patch +37-do-not-run-if-not-in-vm.patch +gcc-13.patch +102989.patch +102990.patch +102992.patch +102993.patch +102994.patch +102999.patch +103024.patch +103066.patch +103067.patch +fix-kernel-build.patch |