diff options
Diffstat (limited to '')
19 files changed, 809 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..de003265 --- /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 +@@ -356,7 +356,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..b2353c61 --- /dev/null +++ b/debian/patches/02-gsoap-build-fix.patch @@ -0,0 +1,14 @@ +Interim build fix for gsoap > 2.8.13 +Index: virtualbox-git-orig/src/VBox/Main/webservice/Makefile.kmk +=================================================================== +--- virtualbox-git-orig.orig/src/VBox/Main/webservice/Makefile.kmk 2013-12-02 12:32:51.211124975 -0500 ++++ virtualbox-git-orig/src/VBox/Main/webservice/Makefile.kmk 2013-12-02 12:36:04.531133954 -0500 +@@ -771,7 +771,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..7e3f7230 --- /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 +@@ -261,12 +261,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 + +@@ -329,12 +325,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 +@@ -373,12 +365,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 +@@ -90,8 +90,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 " +@@ -110,7 +111,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..a8fc105a --- /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 +@@ -30,9 +30,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 # 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 || 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..812e64ca --- /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 +@@ -1763,7 +1763,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/12-make-module.patch b/debian/patches/12-make-module.patch new file mode 100644 index 00000000..cb6e1fd2 --- /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 +@@ -45,7 +45,7 @@ + # (We have to support basic cross building (ARCH=i386|x86_64).) + # While at it, warn about BUILD_* vars found to help with user problems. + # +-ifeq ($(filter-out x86_64 amd64 AMD64,$(shell uname -m)),) ++ifeq ($(filter-out x86_64 amd64 AMD64,$(shell dpkg-architecture -qDEB_HOST_GNU_CPU)),) + BUILD_TARGET_ARCH_DEF := amd64 + else + BUILD_TARGET_ARCH_DEF := x86 diff --git a/debian/patches/13-module-mismatch.patch b/debian/patches/13-module-mismatch.patch new file mode 100644 index 00000000..c34b478c --- /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 +@@ -376,9 +376,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..c07f4371 --- /dev/null +++ b/debian/patches/16-no-update.patch @@ -0,0 +1,107 @@ +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 +@@ -4405,14 +4405,14 @@ + <xref linkend="specialcharacters"/>. + </para> + </listitem> +- ++ <!-- + <listitem> + <para> + <emphasis role="bold">Update.</emphasis> Enables the user to + specify various settings for Automatic Updates. + </para> + </listitem> +- ++ --> + <listitem> + <para> + <emphasis role="bold">Language.</emphasis> Enables the user 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 +@@ -2349,7 +2349,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 +@@ -33,10 +33,10 @@ + #include "UIGlobalSettingsInput.h" + #include "UIGlobalSettingsLanguage.h" + #include "UIGlobalSettingsNetwork.h" +-#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" +@@ -87,7 +87,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: */ +@@ -104,7 +104,7 @@ + + #ifdef VBOX_GUI_WITH_NETWORK_MANAGER + /* Proxy page: */ +- m_pSelector->setItemText(GlobalSettingsPageType_Proxy, tr("Proxy")); ++ //m_pSelector->setItemText(GlobalSettingsPageType_Proxy, tr("Proxy")); + #endif + + /* Polish the selector: */ +@@ -205,13 +205,13 @@ + } + #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); + break; +- } ++ }*/ + #endif /* VBOX_GUI_WITH_NETWORK_MANAGER */ + /* Language page: */ + case GlobalSettingsPageType_Language: +@@ -247,13 +247,13 @@ + } + #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); + break; +- } ++ }*/ + #endif /* VBOX_GUI_WITH_NETWORK_MANAGER */ + default: + break; 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..72379836 --- /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 +@@ -181,11 +181,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..6c9f3ace --- /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 +@@ -4149,34 +4149,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 '%ls' 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.raw(), 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..bf6e60f8 --- /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 +@@ -287,9 +287,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..70681935 --- /dev/null +++ b/debian/patches/32-disable-guest-version-check.patch @@ -0,0 +1,15 @@ +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 +@@ -45,6 +45,7 @@ + + static int showNotify(const char *pszHeader, const char *pszBody) + { ++ return VINF_SUCCESS; + int rc; + # ifdef VBOX_WITH_DBUS + DBusConnection *conn; diff --git a/debian/patches/35-libvdeplug-soname.patch b/debian/patches/35-libvdeplug-soname.patch new file mode 100644 index 00000000..81f5c7bc --- /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 + */ + + /* +@@ -24,7 +24,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..3f6af28f --- /dev/null +++ b/debian/patches/36-fix-vnc-version-string.patch @@ -0,0 +1,22 @@ +Description: fix version string for VNC plugin module. +--- a/Config.kmk ++++ b/Config.kmk +@@ -3247,6 +3247,7 @@ VBOX_EDIT_VERSION_AND_BUILD_CMD_FN = $(S + -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' \ +--- a/src/VBox/ExtPacks/VNC/ExtPack.xml ++++ b/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..2c4e68b7 --- /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 +@@ -15,6 +15,17 @@ + # hope that it will be useful, but WITHOUT ANY WARRANTY of any kind. + # + ++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/40-linux-5.13-support.patch b/debian/patches/40-linux-5.13-support.patch new file mode 100644 index 00000000..e95e2404 --- /dev/null +++ b/debian/patches/40-linux-5.13-support.patch @@ -0,0 +1,276 @@ +Subject: Fix build errors with linux 5.13 +Origin: upstream, https://www.virtualbox.org/browser/vbox/trunk +Bug: https://bugs.launchpad.net/bugs/1929193 + +diff -urpN virtualbox-6.1.22-dfsg.orig/src/VBox/Additions/linux/drm/vbox_drv.h virtualbox-6.1.22-dfsg/src/VBox/Additions/linux/drm/vbox_drv.h +--- virtualbox-6.1.22-dfsg.orig/src/VBox/Additions/linux/drm/vbox_drv.h 2021-04-28 16:24:47.000000000 +0000 ++++ virtualbox-6.1.22-dfsg/src/VBox/Additions/linux/drm/vbox_drv.h 2021-06-23 10:08:44.431714404 +0000 +@@ -46,20 +41,20 @@ + * Evaluates to true if the linux kernel version is equal or higher to the + * one specfied. */ + #define RTLNX_VER_MIN(a_Major, a_Minor, a_Patch) \ +- (LINUX_VERSION_CODE >= KERNEL_VERSION(a_Major, a_Minor, a_Patch)) ++ (LINUX_VERSION_CODE >= KERNEL_VERSION(a_Major, a_Minor, a_Patch)) + + /** @def RTLNX_VER_MAX + * Evaluates to true if the linux kernel version is less to the one specfied + * (exclusive). */ + #define RTLNX_VER_MAX(a_Major, a_Minor, a_Patch) \ +- (LINUX_VERSION_CODE < KERNEL_VERSION(a_Major, a_Minor, a_Patch)) ++ (LINUX_VERSION_CODE < KERNEL_VERSION(a_Major, a_Minor, a_Patch)) + + /** @def RTLNX_VER_RANGE + * Evaluates to true if the linux kernel version is equal or higher to the given + * minimum version and less (but not equal) to the maximum version (exclusive). */ + #define RTLNX_VER_RANGE(a_MajorMin, a_MinorMin, a_PatchMin, a_MajorMax, a_MinorMax, a_PatchMax) \ +- ( LINUX_VERSION_CODE >= KERNEL_VERSION(a_MajorMin, a_MinorMin, a_PatchMin) \ +- && LINUX_VERSION_CODE < KERNEL_VERSION(a_MajorMax, a_MinorMax, a_PatchMax) ) ++ ( LINUX_VERSION_CODE >= KERNEL_VERSION(a_MajorMin, a_MinorMin, a_PatchMin) \ ++ && LINUX_VERSION_CODE < KERNEL_VERSION(a_MajorMax, a_MinorMax, a_PatchMax) ) + + + /** @def RTLNX_RHEL_MIN +@@ -70,7 +65,7 @@ + */ + #if defined(RHEL_MAJOR) && defined(RHEL_MINOR) + # define RTLNX_RHEL_MIN(a_iMajor, a_iMinor) \ +- ((RHEL_MAJOR) > (a_iMajor) || ((RHEL_MAJOR) == (a_iMajor) && (RHEL_MINOR) >= (a_iMinor))) ++ ((RHEL_MAJOR) > (a_iMajor) || ((RHEL_MAJOR) == (a_iMajor) && (RHEL_MINOR) >= (a_iMinor))) + #else + # define RTLNX_RHEL_MIN(a_iMajor, a_iMinor) (0) + #endif +@@ -83,7 +78,7 @@ + */ + #if defined(RHEL_MAJOR) && defined(RHEL_MINOR) + # define RTLNX_RHEL_MAX(a_iMajor, a_iMinor) \ +- ((RHEL_MAJOR) < (a_iMajor) || ((RHEL_MAJOR) == (a_iMajor) && (RHEL_MINOR) < (a_iMinor))) ++ ((RHEL_MAJOR) < (a_iMajor) || ((RHEL_MAJOR) == (a_iMajor) && (RHEL_MINOR) < (a_iMinor))) + #else + # define RTLNX_RHEL_MAX(a_iMajor, a_iMinor) (0) + #endif +@@ -95,7 +90,7 @@ + */ + #if defined(RHEL_MAJOR) && defined(RHEL_MINOR) + # define RTLNX_RHEL_RANGE(a_iMajorMin, a_iMinorMin, a_iMajorMax, a_iMinorMax) \ +- (RTLNX_RHEL_MIN(a_iMajorMin, a_iMinorMin) && RTLNX_RHEL_MAX(a_iMajorMax, a_iMinorMax)) ++ (RTLNX_RHEL_MIN(a_iMajorMin, a_iMinorMin) && RTLNX_RHEL_MAX(a_iMajorMax, a_iMinorMax)) + #else + # define RTLNX_RHEL_RANGE(a_iMajorMin, a_iMinorMin, a_iMajorMax, a_iMinorMax) (0) + #endif +@@ -173,7 +168,9 @@ + #include <drm/ttm/ttm_bo_api.h> + #include <drm/ttm/ttm_bo_driver.h> + #include <drm/ttm/ttm_placement.h> ++#if RTLNX_VER_MAX(5,13,0) + #include <drm/ttm/ttm_memory.h> ++#endif + #if RTLNX_VER_MAX(5,12,0) + # include <drm/ttm/ttm_module.h> + #endif +@@ -222,7 +219,7 @@ static inline void drm_gem_object_put(st + VBVA_ADAPTER_INFORMATION_SIZE) + #define GUEST_HEAP_SIZE VBVA_ADAPTER_INFORMATION_SIZE + #define GUEST_HEAP_USABLE_SIZE (VBVA_ADAPTER_INFORMATION_SIZE - \ +- sizeof(HGSMIHOSTFLAGS)) ++ sizeof(struct hgsmi_host_flags)) + #define HOST_FLAGS_OFFSET GUEST_HEAP_USABLE_SIZE + + /** How frequently we refresh if the guest is not providing dirty rectangles. */ +@@ -232,7 +229,7 @@ static inline void drm_gem_object_put(st + static inline void *devm_kcalloc(struct device *dev, size_t n, size_t size, + gfp_t flags) + { +- return devm_kzalloc(dev, n * size, flags); ++ return devm_kzalloc(dev, n * size, flags); + } + #endif + +@@ -244,7 +241,7 @@ struct vbox_private { + u8 __iomem *guest_heap; + u8 __iomem *vbva_buffers; + struct gen_pool *guest_pool; +- struct VBVABUFFERCONTEXT *vbva_info; ++ struct vbva_buf_context *vbva_info; + bool any_pitch; + u32 num_crtcs; + /** Amount of available VRAM, including space used for buffers. */ +@@ -252,7 +249,7 @@ struct vbox_private { + /** Amount of available VRAM, not including space used for buffers. */ + u32 available_vram_size; + /** Array of structures for receiving mode hints. */ +- VBVAMODEHINT *last_mode_hints; ++ struct vbva_modehint *last_mode_hints; + + struct vbox_fbdev *fbdev; + +@@ -263,7 +260,11 @@ struct vbox_private { + struct drm_global_reference mem_global_ref; + struct ttm_bo_global_ref bo_global_ref; + #endif ++#if RTLNX_VER_MIN(5,13,0) ++ struct ttm_device bdev; ++#else + struct ttm_bo_device bdev; ++#endif + bool mm_initialised; + } ttm; + +diff -urpN virtualbox-6.1.22-dfsg.orig/src/VBox/Additions/linux/drm/vbox_ttm.c virtualbox-6.1.22-dfsg/src/VBox/Additions/linux/drm/vbox_ttm.c +--- virtualbox-6.1.22-dfsg.orig/src/VBox/Additions/linux/drm/vbox_ttm.c 2021-04-28 16:24:47.000000000 +0000 ++++ virtualbox-6.1.22-dfsg/src/VBox/Additions/linux/drm/vbox_ttm.c 2021-06-23 10:08:07.164057918 +0000 +@@ -48,7 +43,11 @@ + #endif + + ++#if RTLNX_VER_MIN(5,13,0) ++static inline struct vbox_private *vbox_bdev(struct ttm_device *bd) ++#else + static inline struct vbox_private *vbox_bdev(struct ttm_bo_device *bd) ++#endif + { + return container_of(bd, struct vbox_private, ttm.bdev); + } +@@ -188,7 +187,7 @@ static int vbox_ttm_io_mem_reserve(struc + mem->bus.size = mem->num_pages << PAGE_SHIFT; + mem->bus.base = 0; + mem->bus.is_iomem = false; +- if (!(man->flags & TTM_MEMTYPE_FLAG_MAPPABLE)) ++ if (!(man->flags & TTM_MEMTYPE_FLAG_MAPPABLE)) + return -EINVAL; + switch (mem->mem_type) { + case TTM_PL_SYSTEM: +@@ -205,8 +204,13 @@ static int vbox_ttm_io_mem_reserve(struc + return 0; + } + #else ++# if RTLNX_VER_MAX(5,13,0) + static int vbox_ttm_io_mem_reserve(struct ttm_bo_device *bdev, + struct ttm_resource *mem) ++# else /* > 5.13.0 */ ++static int vbox_ttm_io_mem_reserve(struct ttm_device *bdev, ++ struct ttm_resource *mem) ++# endif /* > 5.13.0 */ + { + struct vbox_private *vbox = vbox_bdev(bdev); + mem->bus.addr = NULL; +@@ -241,7 +245,12 @@ static int vbox_ttm_io_mem_reserve(struc + + + +-#if RTLNX_VER_MIN(5,10,0) ++#if RTLNX_VER_MIN(5,13,0) ++static void vbox_ttm_io_mem_free(struct ttm_device *bdev, ++ struct ttm_resource *mem) ++{ ++} ++#elif RTLNX_VER_MIN(5,10,0) + static void vbox_ttm_io_mem_free(struct ttm_bo_device *bdev, + struct ttm_resource *mem) + { +@@ -253,7 +262,13 @@ static void vbox_ttm_io_mem_free(struct + } + #endif + +-#if RTLNX_VER_MIN(5,10,0) ++#if RTLNX_VER_MIN(5,13,0) ++static void vbox_ttm_tt_destroy(struct ttm_device *bdev, struct ttm_tt *tt) ++{ ++ ttm_tt_fini(tt); ++ kfree(tt); ++} ++#elif RTLNX_VER_MIN(5,10,0) + static void vbox_ttm_tt_destroy(struct ttm_bo_device *bdev, struct ttm_tt *tt) + { + ttm_tt_fini(tt); +@@ -333,7 +348,11 @@ static int vbox_bo_move(struct ttm_buffe + } + #endif + ++#if RTLNX_VER_MIN(5,13,0) ++static struct ttm_device_funcs vbox_bo_driver = { ++#else /* < 5.13.0 */ + static struct ttm_bo_driver vbox_bo_driver = { ++#endif /* < 5.13.0 */ + .ttm_tt_create = vbox_ttm_tt_create, + #if RTLNX_VER_MIN(5,10,0) + .ttm_tt_destroy = vbox_ttm_tt_destroy, +@@ -370,14 +389,22 @@ int vbox_mm_init(struct vbox_private *vb + { + int ret; + struct drm_device *dev = vbox->dev; ++#if RTLNX_VER_MIN(5,13,0) ++ struct ttm_device *bdev = &vbox->ttm.bdev; ++#else + struct ttm_bo_device *bdev = &vbox->ttm.bdev; ++#endif + + #if RTLNX_VER_MAX(5,0,0) && !RTLNX_RHEL_MAJ_PREREQ(7,7) && !RTLNX_RHEL_MAJ_PREREQ(8,1) + ret = vbox_ttm_global_init(vbox); + if (ret) + return ret; + #endif ++#if RTLNX_VER_MIN(5,13,0) ++ ret = ttm_device_init(&vbox->ttm.bdev, ++#else + ret = ttm_bo_device_init(&vbox->ttm.bdev, ++#endif + #if RTLNX_VER_MAX(5,0,0) && !RTLNX_RHEL_MAJ_PREREQ(7,7) && !RTLNX_RHEL_MAJ_PREREQ(8,1) + vbox->ttm.bo_global_ref.ref.object, + #endif +@@ -429,7 +456,11 @@ int vbox_mm_init(struct vbox_private *vb + return 0; + + err_device_release: ++#if RTLNX_VER_MIN(5,13,0) ++ ttm_device_fini(&vbox->ttm.bdev); ++#else + ttm_bo_device_release(&vbox->ttm.bdev); ++#endif + #if RTLNX_VER_MAX(5,0,0) && !RTLNX_RHEL_MAJ_PREREQ(7,7) && !RTLNX_RHEL_MAJ_PREREQ(8,1) + err_ttm_global_release: + vbox_ttm_global_release(vbox); +@@ -446,7 +477,11 @@ void vbox_mm_fini(struct vbox_private *v + #else + arch_phys_wc_del(vbox->fb_mtrr); + #endif ++#if RTLNX_VER_MIN(5,13,0) ++ ttm_device_fini(&vbox->ttm.bdev); ++#else + ttm_bo_device_release(&vbox->ttm.bdev); ++#endif + #if RTLNX_VER_MAX(5,0,0) && !RTLNX_RHEL_MAJ_PREREQ(7,7) && !RTLNX_RHEL_MAJ_PREREQ(8,1) + vbox_ttm_global_release(vbox); + #endif +@@ -528,7 +563,9 @@ int vbox_bo_create(struct drm_device *de + { + struct vbox_private *vbox = dev->dev_private; + struct vbox_bo *vboxbo; ++#if RTLNX_VER_MAX(5,13,0) + size_t acc_size; ++#endif + int ret; + + vboxbo = kzalloc(sizeof(*vboxbo), GFP_KERNEL); +@@ -551,16 +588,20 @@ int vbox_bo_create(struct drm_device *de + + vbox_ttm_placement(vboxbo, VBOX_MEM_TYPE_VRAM | VBOX_MEM_TYPE_SYSTEM); + ++#if RTLNX_VER_MAX(5,13,0) + acc_size = ttm_bo_dma_acc_size(&vbox->ttm.bdev, size, + sizeof(struct vbox_bo)); ++#endif + + ret = ttm_bo_init(&vbox->ttm.bdev, &vboxbo->bo, size, + ttm_bo_type_device, &vboxbo->placement, + #if RTLNX_VER_MAX(4,17,0) && !RTLNX_RHEL_MAJ_PREREQ(7,6) && !RTLNX_SUSE_MAJ_PREREQ(15,1) && !RTLNX_SUSE_MAJ_PREREQ(12,5) + align >> PAGE_SHIFT, false, NULL, acc_size, +-#else ++#elif RTLNX_VER_MAX(5,13,0) /* < 5.13.0 */ + align >> PAGE_SHIFT, false, acc_size, +-#endif ++#else /* > 5.13.0 */ ++ align >> PAGE_SHIFT, false, ++#endif /* > 5.13.0 */ + #if RTLNX_VER_MIN(3,18,0) || RTLNX_RHEL_MAJ_PREREQ(7,2) + NULL, NULL, vbox_bo_ttm_destroy); + #else diff --git a/debian/patches/no-vboxrem.patch b/debian/patches/no-vboxrem.patch new file mode 100644 index 00000000..29d89295 --- /dev/null +++ b/debian/patches/no-vboxrem.patch @@ -0,0 +1,44 @@ +Description: don't add VBoxREM symlink +Forwarded: irc +Author: Gianfranco Costamagna <locutusofborg@debian.org> +Bug-Debian: https://bugs.debian.org/969793 +Last-Update: 2020-09-08 + +--- virtualbox-6.1.14-dfsg.orig/src/VBox/Installer/linux/deffiles ++++ virtualbox-6.1.14-dfsg/src/VBox/Installer/linux/deffiles +@@ -32,7 +32,6 @@ DEFAULT_FILE_NAMES=" \ + VBoxManage \ + VBoxNetDHCP \ + VBoxNetDHCP.so \ +- VBoxREM.so \ + VBoxRT.so \ + VBoxSDL \ + VBoxSDL.so \ +@@ -82,7 +81,6 @@ DEFAULT_FILE_NAMES=" \ + components/xpti.dat \ + components/VBoxC.so \ + components/VBoxDDU.so \ +- components/VBoxREM.so \ + components/VBoxRT.so \ + components/VBoxVMM.so \ + components/VBoxXPCOM.so \ +--- virtualbox-6.1.14-dfsg.orig/src/VBox/Installer/linux/uninstall.sh ++++ virtualbox-6.1.14-dfsg/src/VBox/Installer/linux/uninstall.sh +@@ -96,7 +96,6 @@ rm -f \ + /usr/bin/vboxdtrace \ + /usr/bin/vboxbugreport \ + $PREV_INSTALLATION/components/VBoxVMM.so \ +- $PREV_INSTALLATION/components/VBoxREM.so \ + $PREV_INSTALLATION/components/VBoxRT.so \ + $PREV_INSTALLATION/components/VBoxDDU.so \ + $PREV_INSTALLATION/components/VBoxXPCOM.so \ +--- virtualbox-6.1.14-dfsg.orig/src/VBox/Main/Makefile.kmk ++++ virtualbox-6.1.14-dfsg/src/VBox/Main/Makefile.kmk +@@ -1294,7 +1294,6 @@ if defined(VBOX_WITH_HARDENING) && "$(KB + VBoxMain-hardening-inst_INST = $(INST_BIN)components/ + VBoxMain-hardening-inst_SYMLINKS = \ + VBoxDDU.so=>../VBoxDDU.so \ +- VBoxREM.so=>../VBoxREM.so \ + VBoxRT.so=>../VBoxRT.so \ + VBoxVMM.so=>../VBoxVMM.so \ + VBoxXPCOM.so=>../VBoxXPCOM.so diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 00000000..89b00a24 --- /dev/null +++ b/debian/patches/series @@ -0,0 +1,18 @@ +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 +no-vboxrem.patch +40-linux-5.13-support.patch |