Index: trunk/Config.kmk
===================================================================
--- trunk/Config.kmk	(revision 82440)
+++ trunk/Config.kmk	(revision 82441)
@@ -483,5 +483,6 @@
 VBOX_WITH_AUDIO_MMNOTIFICATION_CLIENT = 1
 # Enable PCI passthrough support.
-VBOX_WITH_PCI_PASSTHROUGH = 1
+# (disabled with 6.1, since it's not complete/useful enough)
+VBOX_WITH_PCI_PASSTHROUGH =
 # Enable statically linked dbus support.
 if1of ($(KBUILD_TARGET), linux solaris)
@@ -2313,5 +2314,5 @@
   ifdef VBOX_WITH_NEW_XCODE
    if defined(VBOX_WITH_REM) && "$(VBOX_XCODE_VERSION)" >= "4.2"
-    $(warning Xcode $(VBOX_XCODE_VERSION) is not able to correctly build the recompiler! Please disabled it: 'VBOX_WITH_REM=')
+    $(warning Xcode $(VBOX_XCODE_VERSION) is not able to correctly build the recompiler! Please disable it: 'VBOX_WITH_REM=')
    endif
    ifdef KBUILD_USE_KOBJCACHE
Index: trunk/debian/LocalConfig.kmk
===================================================================
--- trunk/debian/LocalConfig.kmk	(revision 82440)
+++ trunk/debian/LocalConfig.kmk	(revision 82441)
@@ -5,5 +5,5 @@
 
 #
-# Copyright (C) 2006-2017 Oracle Corporation
+# Copyright (C) 2006-2019 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
Index: trunk/debian/control
===================================================================
--- trunk/debian/control	(revision 82440)
+++ trunk/debian/control	(revision 82441)
@@ -18,6 +18,8 @@
 Pre-Depends: debconf (>= 1.1) | debconf-2.0
 Depends: ${shlibs:Depends}, debconf (>= 0.5) | debconf-2.0, psmisc, adduser
-Recommends: ${alsa}, ${pulse}, ${sdlttf},
-  linux-headers, gcc, make, binutils
+Recommends: ${alsa}, ${pulse}, ${sdlttf}, kmod | kldutils | module-init-tools,
+  linux-headers-generic | linux-headers-generic-pae | linux-headers-686-pae | linux-headers-amd64 | linux-headers-2.6-686 | linux-headers-2.6-amd64 | linux-headers,
+  linux-image, gcc, make | build-essential | dpkg-dev, binutils,
+  pdf-viewer, libgl1
 Description: Oracle VM VirtualBox
  VirtualBox is a powerful PC virtualization solution allowing you to run a
@@ -30,5 +32,5 @@
 Package: virtualbox-ose-dbg
 Architecture: i386 amd64
-Depends: virtualbox-ose (= ${Source-Version})
+Depends: virtualbox-ose (= ${binary:Version})
 Description: Oracle VM VirtualBox debugging symbols
  VirtualBox is a powerful PC virtualization solution allowing you to run a
Index: trunk/debian/lintian-override.in
===================================================================
--- trunk/debian/lintian-override.in	(revision 82440)
+++ trunk/debian/lintian-override.in	(revision 82441)
@@ -22,12 +22,8 @@
 %VERPKG%: shlib-with-non-pic-code usr/lib/virtualbox/components/VBoxC.so
 %VERPKG%: shlib-with-non-pic-code usr/lib/virtualbox/VBoxHeadless.so
-%VERPKG%: shlib-with-non-pic-code usr/lib/virtualbox/VBoxOGLhostcrutil.so
-%VERPKG%: shlib-with-non-pic-code usr/lib/virtualbox/VBoxOGLhosterrorspu.so
-%VERPKG%: shlib-with-non-pic-code usr/lib/virtualbox/VBoxOGLrenderspu.so
 %VERPKG%: shlib-with-non-pic-code usr/lib/virtualbox/VBoxPython.so
 %VERPKG%: shlib-with-non-pic-code usr/lib/virtualbox/VBoxREM32.so
 %VERPKG%: shlib-with-non-pic-code usr/lib/virtualbox/VBoxREM64.so
 %VERPKG%: shlib-with-non-pic-code usr/lib/virtualbox/VBoxSDL.so
-%VERPKG%: shlib-with-non-pic-code usr/lib/virtualbox/VBoxSharedCrOpenGL.so
 %VERPKG%: shlib-with-non-pic-code usr/lib/virtualbox/VirtualBox.so
 %VERPKG%: shlib-with-non-pic-code usr/lib/virtualbox/VBoxDbg.so
@@ -41,4 +37,5 @@
 %VERPKG%: binary-without-manpage usr/bin/VBoxVRDP
 %VERPKG%: binary-without-manpage usr/bin/VirtualBox
+%VERPKG%: binary-without-manpage usr/bin/VirtualBoxVM
 %VERPKG%: binary-without-manpage usr/bin/rdesktop-vrdp
 %VERPKG%: binary-without-manpage usr/bin/vboxballoonctrl
@@ -49,8 +46,7 @@
 %VERPKG%: binary-without-manpage usr/bin/vboxwebsrv
 %VERPKG%: binary-without-manpage usr/bin/virtualbox
+%VERPKG%: binary-without-manpage usr/bin/virtualboxvm
 %VERPKG%: unstripped-binary-or-object usr/lib/virtualbox/VBoxDDRC.rc
-%VERPKG%: unstripped-binary-or-object usr/lib/virtualbox/VBoxDD2RC.rc
 %VERPKG%: unstripped-binary-or-object usr/lib/virtualbox/VBoxDDR0.r0
-%VERPKG%: unstripped-binary-or-object usr/lib/virtualbox/VBoxDD2R0.r0
 %VERPKG%: unstripped-binary-or-object usr/lib/virtualbox/VMMRC.rc
 %VERPKG%: unstripped-binary-or-object usr/lib/virtualbox/VMMR0.r0
@@ -85,7 +81,4 @@
 %VERPKG%: binary-or-shlib-defines-rpath ./usr/lib/virtualbox/VBoxKeyboard.so /usr/lib/virtualbox
 %VERPKG%: binary-or-shlib-defines-rpath ./usr/lib/virtualbox/VBoxManage /usr/lib/virtualbox
-%VERPKG%: binary-or-shlib-defines-rpath ./usr/lib/virtualbox/VBoxOGLhostcrutil.so /usr/lib/virtualbox
-%VERPKG%: binary-or-shlib-defines-rpath ./usr/lib/virtualbox/VBoxOGLhosterrorspu.so /usr/lib/virtualbox
-%VERPKG%: binary-or-shlib-defines-rpath ./usr/lib/virtualbox/VBoxOGLrenderspu.so /usr/lib/virtualbox
 %VERPKG%: binary-or-shlib-defines-rpath ./usr/lib/virtualbox/VBoxPython.so /usr/lib/virtualbox
 %VERPKG%: binary-or-shlib-defines-rpath ./usr/lib/virtualbox/VBoxREM.so /usr/lib/virtualbox
@@ -98,5 +91,4 @@
 %VERPKG%: binary-or-shlib-defines-rpath ./usr/lib/virtualbox/VBoxSettings.so /usr/lib/virtualbox
 %VERPKG%: binary-or-shlib-defines-rpath ./usr/lib/virtualbox/VBoxSharedClipboard.so /usr/lib/virtualbox
-%VERPKG%: binary-or-shlib-defines-rpath ./usr/lib/virtualbox/VBoxSharedCrOpenGL.so /usr/lib/virtualbox
 %VERPKG%: binary-or-shlib-defines-rpath ./usr/lib/virtualbox/VBoxSharedFolders.so /usr/lib/virtualbox
 %VERPKG%: binary-or-shlib-defines-rpath ./usr/lib/virtualbox/VBoxDragAndDropSvc.so /usr/lib/virtualbox
@@ -108,4 +100,5 @@
 %VERPKG%: binary-or-shlib-defines-rpath ./usr/lib/virtualbox/VBoxAuth.so /usr/lib/virtualbox
 %VERPKG%: binary-or-shlib-defines-rpath ./usr/lib/virtualbox/VirtualBox /usr/lib/virtualbox
+%VERPKG%: binary-or-shlib-defines-rpath ./usr/lib/virtualbox/VirtualBoxVM /usr/lib/virtualbox
 %VERPKG%: binary-or-shlib-defines-rpath ./usr/lib/virtualbox/VirtualBox.so /usr/lib/virtualbox
 %VERPKG%: binary-or-shlib-defines-rpath ./usr/lib/virtualbox/VBoxExtPackHelperApp /usr/lib/virtualbox
Index: trunk/debian/postinst
===================================================================
--- trunk/debian/postinst	(revision 82441)
+++ trunk/debian/postinst	(revision 82441)
@@ -0,0 +1,102 @@
+#!/bin/sh
+# $Id$
+## @file
+# VirtualBox postinst
+#
+
+#
+# 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.
+#
+
+# we can be called with the following arguments (6.5 of Debian policy):
+#  configure:         (our version): installing/configuring new version
+#  abort-upgrade:     (old version): upgrading to a new version failed
+#  abort-remove:      (our version): removing this package failed
+#  abort-deconfigure: (our version): error during resolving conflicts
+
+## @todo Do we really gain anything from not just executing everything
+##       unconditionally?
+
+LOG="/var/log/vbox-install.log"
+
+# defaults
+[ -r /etc/default/virtualbox ] && . /etc/default/virtualbox
+
+if [ "$1" = "configure" ]; then
+
+  # for debconf
+  . /usr/share/debconf/confmodule
+  db_version 2.0
+
+  # remove old cruft
+  if [ -f /etc/init.d/vboxdrv.sh ]; then
+    echo "Found old version of /etc/init.d/vboxdrv.sh, removing."
+    rm /etc/init.d/vboxdrv.sh
+    update-rc.d vboxdrv.sh remove >/dev/null
+  fi
+  if [ -f /etc/vbox/vbox.cfg ]; then
+    echo "Found old version of /etc/vbox/vbox.cfg, removing."
+    rm /etc/vbox/vbox.cfg
+  fi
+
+  # create users groups (disable with INSTALL_NO_GROUP=1 in /etc/default/virtualbox)
+  if [ "$INSTALL_NO_GROUP" != "1" ]; then
+    db_input low virtualbox/group-vboxusers || true
+    db_go || true
+    addgroup --system vboxusers || true
+  fi
+
+  # The starters need to be Suid root. They drop the privileges before starting
+  # the real frontend.
+  if test -e /usr/lib/virtualbox/VirtualBoxVM; then
+    if ! dpkg-statoverride --list /usr/lib/virtualbox/VirtualBoxVM > /dev/null 2>&1; then
+      chmod 4511 /usr/lib/virtualbox/VirtualBoxVM
+    fi
+  else
+    if ! dpkg-statoverride --list /usr/lib/virtualbox/VirtualBox > /dev/null 2>&1; then
+      chmod 4511 /usr/lib/virtualbox/VirtualBox
+    fi
+  fi
+  if ! dpkg-statoverride --list /usr/lib/virtualbox/VBoxHeadless > /dev/null 2>&1; then
+    chmod 4511 /usr/lib/virtualbox/VBoxHeadless
+  fi
+  if ! dpkg-statoverride --list /usr/lib/virtualbox/VBoxSDL > /dev/null 2>&1; then
+    chmod 4511 /usr/lib/virtualbox/VBoxSDL
+  fi
+  if ! dpkg-statoverride --list /usr/lib/virtualbox/VBoxNetDHCP > /dev/null 2>&1; then
+    chmod 4511 /usr/lib/virtualbox/VBoxNetDHCP
+  fi
+  if ! dpkg-statoverride --list /usr/lib/virtualbox/VBoxNetNAT > /dev/null 2>&1; then
+    chmod 4511 /usr/lib/virtualbox/VBoxNetNAT
+  fi
+  if ! dpkg-statoverride --list /usr/lib/virtualbox/VBoxNetAdpCtl > /dev/null 2>&1; then
+    chmod 4511 /usr/lib/virtualbox/VBoxNetAdpCtl
+  fi
+  if [ -x /usr/lib/virtualbox/VBoxVolInfo ]; then
+    if ! dpkg-statoverride --list /usr/lib/virtualbox/VBoxVolInfo > /dev/null 2>&1; then
+      chmod 4511 /usr/lib/virtualbox/VBoxVolInfo
+    fi
+  fi
+fi # $1 = "configure"
+
+#DEBHELPER#
+
+if test "${INSTALL_NO_VBOXDRV}" = 1; then
+  POSTINST_START=--nostart
+else
+  POSTINST_START=
+fi
+
+# Install and start the new service scripts.
+/usr/lib/virtualbox/prerm-common.sh || true
+/usr/lib/virtualbox/postinst-common.sh ${POSTINST_START} > /dev/null || true
+
+exit 0
Index: trunk/debian/postinst.in
===================================================================
--- trunk/debian/postinst.in	(revision 82440)
+++ 	(revision )
@@ -1,171 +1,0 @@
-#!/bin/sh
-#
-# Copyright (C) 2006-2012 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.
-#
-
-# we can be called with the following arguments (6.5 of Debian policy):
-#  configure:         (our version): installing/configuring new version
-#  abort-upgrade:     (old version): upgrading to a new version failed
-#  abort-remove:      (our version): removing this package failed
-#  abort-deconfigure: (our version): error during resolving conflicts
-
-#include installer-common.sh
-
-LOG="/var/log/vbox-install.log"
-
-# defaults
-[ -r /etc/default/virtualbox ] && . /etc/default/virtualbox
-
-if [ "$1" = "configure" ]; then
-
-  # for debconf
-  . /usr/share/debconf/confmodule
-  db_version 2.0
-
-  # remove old cruft
-  if [ -f /etc/init.d/vboxdrv.sh ]; then
-    echo "Found old version of /etc/init.d/vboxdrv.sh, removing."
-    rm /etc/init.d/vboxdrv.sh
-    update-rc.d vboxdrv.sh remove >/dev/null
-  fi
-  if [ -f /etc/vbox/vbox.cfg ]; then
-    echo "Found old version of /etc/vbox/vbox.cfg, removing."
-    rm /etc/vbox/vbox.cfg
-  fi
-
-  # create users groups (disable with INSTALL_NO_GROUP=1 in /etc/default/virtualbox)
-  if [ "$INSTALL_NO_GROUP" != "1" ]; then
-    db_input low virtualbox/group-vboxusers || true
-    db_go || true
-    addgroup --system vboxusers || true
-  fi
-
-  # install udev rule (disable with INSTALL_NO_UDEV=1 in
-  # /etc/default/virtualbox) and /dev/vboxdrv and /dev/vboxusb/*/* device nodes
-  install_device_node_setup root 0600 /usr/share/virtualbox "${usb_group}"
-
-  # The starters need to be Suid root. They drop the privileges before starting
-  # the real frontend.
-  if ! dpkg-statoverride --list /usr/lib/virtualbox/VirtualBox > /dev/null 2>&1; then
-    chmod 4511 /usr/lib/virtualbox/VirtualBox
-  fi
-  if ! dpkg-statoverride --list /usr/lib/virtualbox/VBoxHeadless > /dev/null 2>&1; then
-    chmod 4511 /usr/lib/virtualbox/VBoxHeadless
-  fi
-  if ! dpkg-statoverride --list /usr/lib/virtualbox/VBoxSDL > /dev/null 2>&1; then
-    chmod 4511 /usr/lib/virtualbox/VBoxSDL
-  fi
-  if ! dpkg-statoverride --list /usr/lib/virtualbox/VBoxNetDHCP > /dev/null 2>&1; then
-    chmod 4511 /usr/lib/virtualbox/VBoxNetDHCP
-  fi
-  if ! dpkg-statoverride --list /usr/lib/virtualbox/VBoxNetNAT > /dev/null 2>&1; then
-    chmod 4511 /usr/lib/virtualbox/VBoxNetNAT
-  fi
-  if ! dpkg-statoverride --list /usr/lib/virtualbox/VBoxNetAdpCtl > /dev/null 2>&1; then
-    chmod 4511 /usr/lib/virtualbox/VBoxNetAdpCtl
-  fi
-  if [ -x /usr/lib/virtualbox/VBoxVolInfo ]; then
-    if ! dpkg-statoverride --list /usr/lib/virtualbox/VBoxVolInfo > /dev/null 2>&1; then
-      chmod 4511 /usr/lib/virtualbox/VBoxVolInfo
-    fi
-  fi
-
-  # if INSTALL_NO_VBOXDRV is set to 1, remove all shipped modules
-  if [ "$INSTALL_NO_VBOXDRV" = "1" ]; then
-    rm -f /lib/modules/*/misc/vboxdrv.ko
-    rm -f /lib/modules/*/misc/vboxnetflt.ko
-    rm -f /lib/modules/*/misc/vboxnetadp.ko
-  fi
-
-fi # $1 = "configure"
-
-#DEBHELPER#
-
-if [ "$1" = "configure" ]; then
-  # Start vboxdrv/vboxballoonctrl/vboxweb-service manually as we use our own error handling in postrm
-  if [ -x "/etc/init.d/vboxdrv" ]; then
-    update-rc.d vboxdrv defaults 20 80 >/dev/null
-
-    BUILD_MODULES=0
-    REGISTER_MODULES=1
-    # Disable module compilation with INSTALL_NO_VBOXDRV=1 in /etc/default/virtualbox
-    if [ ! -f /lib/modules/`uname -r`/misc/vboxdrv.ko ]; then
-      REGISTER_MODULES=0
-      if [ "$INSTALL_NO_VBOXDRV" != "1" ]; then
-        db_get virtualbox/module-compilation-allowed
-        if [ "$RET" = "false" ]; then
-          cat << EOF
-Unable to find a precompiled module for the current kernel
-though module compilation denied by debconf setting.
-EOF
-        else
-          db_input low virtualbox/module-compilation-allowed || true
-          db_go || true
-          db_get virtualbox/module-compilation-allowed
-          if [ "$RET" = "true" ]; then
-            BUILD_MODULES=1
-          fi
-        fi
-      fi
-    fi
-
-    if [ $BUILD_MODULES -eq 1 ]; then
-      if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
-        invoke-rc.d vboxdrv setup || true
-      else
-        /etc/init.d/vboxdrv setup || true
-      fi
-    else
-      # shipped modules found, register sources at DKMS anyway
-      if lsmod | grep -q "vboxdrv[^_-]"; then
-        /etc/init.d/vboxdrv stop || true
-      fi
-      if [ $REGISTER_MODULES -eq 1 ]; then
-        DKMS=`which dkms 2>/dev/null`
-        if [ -n "$DKMS" ]; then
-          $DKMS add -m vboxhost -v %VER% > /dev/null 2>&1 || true
-        fi
-      fi
-      if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
-        invoke-rc.d vboxdrv start || exit $?
-      else
-        /etc/init.d/vboxdrv start || exit $?
-      fi
-    fi
-  fi
-  if [ -x "/etc/init.d/vboxballoonctrl-service" ]; then
-    update-rc.d vboxballoonctrl-service defaults 35 65 >/dev/null
-    if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
-        invoke-rc.d vboxballoonctrl-service start || exit $?
-    else
-        /etc/init.d/vboxballoonctrl-service start || exit $?
-    fi
-  fi
-  if [ -x "/etc/init.d/vboxautostart-service" ]; then
-    update-rc.d vboxautostart-service defaults 35 65 >/dev/null
-    if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
-        invoke-rc.d vboxautostart-service start || exit $?
-    else
-        /etc/init.d/vboxautostart-service start || exit $?
-    fi
-  fi
-  if [ -x "/etc/init.d/vboxweb-service" ]; then
-    update-rc.d vboxweb-service defaults 35 65 >/dev/null
-    if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
-        invoke-rc.d vboxweb-service start || exit $?
-    else
-        /etc/init.d/vboxweb-service start || exit $?
-    fi
-  fi
-
-fi # $1 = "configure"
-
-exit 0
Index: trunk/debian/postrm
===================================================================
--- trunk/debian/postrm	(revision 82440)
+++ trunk/debian/postrm	(revision 82441)
@@ -1,6 +1,10 @@
 #!/bin/sh
+# $Id$
+## @file
+# VirtualBox post remove.
+#
 
 #
-# Copyright (C) 2006-2012 Oracle Corporation
+# Copyright (C) 2006-2019 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
Index: trunk/debian/preinst
===================================================================
--- trunk/debian/preinst	(revision 82441)
+++ trunk/debian/preinst	(revision 82441)
@@ -0,0 +1,71 @@
+#!/bin/bash
+# $Id$
+## @file
+# VirtualBox pre-install.
+#
+
+#
+# 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.
+#
+
+# we can be called with the following arguments (6.5 of Debian policy):
+#  install:          (our version): install our version
+#  upgrade:          (our version): upgrade to our version
+#  abort-upgrade:    (old version): upgrade to a new version failed
+
+# defaults
+[ -r /etc/default/virtualbox ] && . /etc/default/virtualbox
+
+if [ "$1" = "install" -o "$1" = "upgrade" ]; then
+
+  . /usr/share/debconf/confmodule
+  db_version 2.0
+  db_capb backup
+
+  # check for old installation
+  if [ -r /etc/vbox/vbox.cfg ]; then
+    . /etc/vbox/vbox.cfg
+    if [ "x$INSTALL_DIR" != "x" -a -d "$INSTALL_DIR" ]; then
+      db_fset virtualbox/old-installation-found seen false || true
+      db_input critical virtualbox/old-installation-found || true
+      db_go || true
+      exit 1
+    fi
+    # we will remove that file in postinst
+  fi
+
+  # check for active VMs
+  # Execute the installed package's pre-uninstaller if present.
+  /usr/lib/virtualbox/prerm-common.sh 2>/dev/null || true
+  # Stop services from older versions without pre-uninstaller.
+  invoke-rc.d vboxballoonctrl-service stop 2>/dev/null || true
+  /etc/init.d/vboxballoonctrl-service stop 2>/dev/null || true
+  invoke-rc.d vboxautostart-service stop 2>/dev/null || true
+  /etc/init.d/vboxautostart-service stop 2>/dev/null || true
+  invoke-rc.d vboxweb-service stop 2>/dev/null || true
+  /etc/init.d/vboxweb-service stop 2>/dev/null || true
+  VBOXSVC_PID=`pidof VBoxSVC 2>/dev/null || true`
+  if [ -n "$VBOXSVC_PID" ]; then
+    # ask the daemon to terminate immediately
+    kill -USR1 $VBOXSVC_PID
+    sleep 1
+    if pidof VBoxSVC > /dev/null 2>&1; then
+      db_fset virtualbox/old-running seen false || true
+      db_input critical virtualbox/old-running || true
+      db_go || true
+      exit 1
+    fi
+  fi
+
+fi # "$1" = "install" -o "$1" = "upgrade"
+
+#DEBHELPER#
+
Index: trunk/debian/preinst.in
===================================================================
--- trunk/debian/preinst.in	(revision 82440)
+++ 	(revision )
@@ -1,98 +1,0 @@
-#!/bin/bash
-#
-# Copyright (C) 2006-2012 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.
-#
-
-# we can be called with the following arguments (6.5 of Debian policy):
-#  install:          (our version): install our version
-#  upgrade:          (our version): upgrade to our version
-#  abort-upgrade:    (old version): upgrade to a new version failed
-
-# defaults
-[ -r /etc/default/virtualbox ] && . /etc/default/virtualbox
-
-if [ "$1" = "install" -o "$1" = "upgrade" ]; then
-
-  . /usr/share/debconf/confmodule
-  db_version 2.0
-  db_capb backup
-
-  # check for active VMs
-  VBOXSVC_PID=`pidof VBoxSVC 2> /dev/null || true`
-  if [ -n "$VBOXSVC_PID" ]; then
-    if [ -f /etc/init.d/vboxballoonctrl-service ]; then
-      # try graceful termination; terminate the ballon control service first
-      if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
-        invoke-rc.d vboxballoonctrl-service stop || true
-      else
-        /etc/init.d/vboxballoonctrl-service stop || true
-      fi
-    fi
-    if [ -f /etc/init.d/vboxweb-service ]; then
-      # try graceful termination; terminate the webservice first
-      if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
-        invoke-rc.d vboxweb-service stop || true
-      else
-        /etc/init.d/vboxweb-service stop || true
-      fi
-    fi
-    kill -USR1 $VBOXSVC_PID
-    sleep 1
-    if pidof VBoxSVC > /dev/null 2>&1; then
-      db_fset virtualbox/old-running seen false || true
-      db_input critical virtualbox/old-running || true
-      db_go || true
-      exit 1
-    fi
-  fi
-
-  # check for old installation
-  if [ -r /etc/vbox/vbox.cfg ]; then
-    . /etc/vbox/vbox.cfg
-    if [ "x$INSTALL_DIR" != "x" -a -d "$INSTALL_DIR" ]; then
-      db_fset virtualbox/old-installation-found seen false || true
-      db_input critical virtualbox/old-installation-found || true
-      db_go || true
-      exit 1
-    fi
-    # we will remove that file in postinst
-  fi
-
-  # check for old vboxdrv modules
-  if [ "$INSTALL_NO_VBOXDRV" != "1" ]; then
-    if find /lib/modules -name "vboxdrv\.*" 2>/dev/null|grep -q vboxdrv; then
-      # old modules found
-      db_get virtualbox/delete-old-modules || true
-      if [ "$RET" = "false" ]; then
-        cat << EOF
-Old vboxdrv kernel modules found in
-EOF
-        find /lib/modules -name "vboxdrv\.*" 2>/dev/null|sed "s+\(.*\)+  \1+g"
-        cat << EOF
-Removing of these modules denied by debconf setting
-EOF
-      else
-        db_input low virtualbox/delete-old-modules || true
-        db_go || true
-        db_get virtualbox/delete-old-modules || true
-        if [ "$RET" = "true" ]; then
-          find /lib/modules -name "vboxdrv\.*" 2>/dev/null|xargs rm -f 2>/dev/null
-          find /lib/modules -name "vboxnetflt\.*" 2>/dev/null|xargs rm -f 2>/dev/null
-          find /lib/modules -name "vboxnetadp\.*" 2>/dev/null|xargs rm -f 2>/dev/null
-        fi
-      fi
-    fi
-  fi
-
-fi # "$1" = "install" -o "$1" = "upgrade"
-
-#DEBHELPER#
-
Index: trunk/debian/prerm
===================================================================
--- trunk/debian/prerm	(revision 82441)
+++ trunk/debian/prerm	(revision 82441)
@@ -0,0 +1,47 @@
+#!/bin/sh
+# $Id$
+## @file
+# VirtualBox pre-removal.
+#
+
+#
+# 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.
+#
+
+# we can be called with the following arguments (6.5 of Debian policy):
+#  upgrade:          (new version): upgrade to a new version
+#  failed-upgrade:   (our version): failed to upgrade
+#  remove:           (our version): remove this package
+#  deconfigure:      (our version): removing conflicting version
+
+rm -f /etc/udev/rules.d/60-vboxdrv.rules
+rm -f /etc/vbox/license_agreed
+rm -f /etc/vbox/module_not_compiled
+
+# defaults
+[ -r /etc/default/virtualbox ] && . /etc/default/virtualbox
+
+. /usr/share/debconf/confmodule
+db_version 2.0
+db_capb backup
+
+if ! /usr/lib/virtualbox/prerm-common.sh > /dev/null 2>&1; then
+  if [ "$1" != "failed-upgrade" ]; then
+    db_fset virtualbox/old-running seen false || true
+    db_input critical virtualbox/old-running || true
+    db_go || true
+  fi
+  exit 1
+fi
+
+#DEBHELPER#
+
+exit 0
Index: trunk/debian/prerm.in
===================================================================
--- trunk/debian/prerm.in	(revision 82440)
+++ 	(revision )
@@ -1,88 +1,0 @@
-#!/bin/sh
-
-#
-# Copyright (C) 2006-2012 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.
-#
-
-# we can be called with the following arguments (6.5 of Debian policy):
-#  upgrade:          (new version): upgrade to a new version
-#  failed-upgrade:   (our version): failed to upgrade
-#  remove:           (our version): remove this package
-#  purge:            (our version): purge this package
-#  deconfigure:      (our version): removing conflicting version
-
-rm -f /etc/udev/rules.d/60-vboxdrv.rules
-rm -f /etc/vbox/license_agreed
-rm -f /etc/vbox/module_not_compiled
-
-# defaults
-[ -r /etc/default/virtualbox ] && . /etc/default/virtualbox
-
-if [ "$1" = "upgrade" -o "$1" = "remove" -o "$1" = "failed-upgrade" ]; then
-  . /usr/share/debconf/confmodule
-  db_version 2.0
-  db_capb backup
-
-  # check for active VMs
-  VBOXSVC_PID=`pidof VBoxSVC 2>/dev/null`
-  if [ -n "$VBOXSVC_PID" ]; then
-    # try graceful termination; terminate the balloon control servic first
-    if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
-      invoke-rc.d vboxballoonctrl-service stop || true
-    else
-      /etc/init.d/vboxballoonctrl-service stop || true
-    fi
-    # try graceful termination; terminate the webservice first
-    if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
-      invoke-rc.d vboxweb-service stop || true
-    else
-      /etc/init.d/vboxweb-service stop || true
-    fi
-    kill -USR1 $VBOXSVC_PID
-    sleep 1
-    if pidof VBoxSVC > /dev/null 2>&1; then
-      if [ "$1" != "failed-upgrade" ]; then
-        db_fset virtualbox/old-running seen false || true
-        db_input critical virtualbox/old-running || true
-        db_go || true
-      fi
-      exit 1
-    fi
-  fi
-fi
-
-# make sure we de-register the DMKS modules before the files get removed
-if [ "$1" = "upgrade" -o "$1" = "remove" -o "$1" = "deconfigure" ]; then
-  DKMS=`which dkms 2>/dev/null`
-  if [ -n "$DKMS" ]; then
-    $DKMS remove -m vboxhost -v %VER% --all > /dev/null 2>&1 || true
-  fi
-fi
-
-# stop vboxnet/vboxdrv manually as we use our own error handling in postrm
-if [ -x "/etc/init.d/vboxdrv" ]; then
-  if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
-    invoke-rc.d vboxdrv stop || exit $?
-  else
-    /etc/init.d/vboxdrv stop || exit $?
-  fi
-fi
-if [ -x "/etc/init.d/vboxnet" ]; then
-  if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
-    invoke-rc.d vboxnet stop || exit $?
-  else
-    /etc/init.d/vboxnet stop || exit $?
-  fi
-fi
-
-#DEBHELPER#
-
-exit 0
Index: trunk/debian/rules
===================================================================
--- trunk/debian/rules	(revision 82440)
+++ trunk/debian/rules	(revision 82441)
@@ -1,5 +1,10 @@
 #!/usr/bin/make -f
+# $Id$
+## @file
+# VirtualBox rules.
 #
-# Copyright (C) 2006-2012 Oracle Corporation
+
+#
+# Copyright (C) 2006-2019 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
@@ -13,5 +18,5 @@
 
 #export DH_VERBOSE=1
-export DH_COMPAT=4
+export DH_COMPAT=5
 
 # possible overrides:
@@ -49,4 +54,5 @@
 NOWEBSVC ?= $(ose)
 NOWINE   := $(if $(NODOCS),$(if $(STAGEDISO),1,),)$(ose)
+PYTHON   := $(firstword $(shell which python) $(shell which python3))
 
 ifneq ($(wildcard $(verfile)),)
@@ -78,7 +84,6 @@
 	     VBOX_WITHOUT_EXTPACK_PUEL_PACKING=1 \
 	     VBOX_WITHOUT_EXTPACK_VNC_PACKING=1 \
-	     $(if $(filter _Debian_squeeze _Ubuntu_lucid,$(debrel)),,VBOX_WITH_VMSVGA3D=1) \
+	     VBOX_WITH_VMSVGA3D=1 \
 	     VBOX_DO_STRIP= \
-	     VBOX_WITH_MULTIVERSION_PYTHON= \
 	     VBOX_PATH_PACKAGE_DOCS="\"/usr/share/doc/$(verpkg)\"" \
 	     $(if $(ose),,VBOX_WITH_DOCS_CHM=1) \
@@ -118,18 +123,17 @@
 	rm -rf $(moddir)
 	mkdir $(moddir)
-	make -C $(builddir)/bin/src/vboxdrv clean
 	for d in $(wildcard /lib/modules/*); do \
 	    if [ -L $$d/build ]; then \
 	        make -C $(builddir)/bin/src/vboxdrv KERN_VER=$$(basename $$d) clean && \
-	        make -j4 -C $(builddir)/bin/src/vboxdrv KBUILD_VERBOSE= KERN_VER=$$(basename $$d) all \
+	        make -j4 -C $(builddir)/bin/src/vboxdrv KBUILD_VERBOSE= KERN_VER=$$(basename $$d) all; \
 	        make -C $(builddir)/bin/src/vboxnetflt KERN_VER=$$(basename $$d) clean && \
 		(cp $(builddir)/bin/src/vboxdrv/Module.symvers $(builddir)/bin/src/vboxnetflt || true) && \
-	        make -j4 -C $(builddir)/bin/src/vboxnetflt KBUILD_VERBOSE= KERN_VER=$$(basename $$d) all \
+	        make -j4 -C $(builddir)/bin/src/vboxnetflt KBUILD_VERBOSE= KERN_VER=$$(basename $$d) all; \
 	        make -C $(builddir)/bin/src/vboxnetadp KERN_VER=$$(basename $$d) clean && \
 		(cp $(builddir)/bin/src/vboxdrv/Module.symvers $(builddir)/bin/src/vboxnetadp || true) && \
-	        make -j4 -C $(builddir)/bin/src/vboxnetadp KBUILD_VERBOSE= KERN_VER=$$(basename $$d) all \
+	        make -j4 -C $(builddir)/bin/src/vboxnetadp KBUILD_VERBOSE= KERN_VER=$$(basename $$d) all; \
 	        make -C $(builddir)/bin/src/vboxpci KERN_VER=$$(basename $$d) clean && \
 		(cp $(builddir)/bin/src/vboxdrv/Module.symvers $(builddir)/bin/src/vboxpci || true) && \
-	        make -j4 -C $(builddir)/bin/src/vboxpci KBUILD_VERBOSE= KERN_VER=$$(basename $$d) all \
+	        make -j4 -C $(builddir)/bin/src/vboxpci KBUILD_VERBOSE= KERN_VER=$$(basename $$d) all; true; \
 	    fi; \
 	done
@@ -137,5 +141,5 @@
 	make -C $(builddir)/bin/src/vboxnetflt clean
 	make -C $(builddir)/bin/src/vboxnetadp clean
-	make -C $(builddir)/bin/src/vboxpci clean
+	make -C $(builddir)/bin/src/vboxpci clean; true
 	touch debian/modules-stamp
 
@@ -143,7 +147,4 @@
 	dh_testdir
 	dh_testroot
-	rm -f debian/preinst debian/postinst debian/prerm
-	rm -f debian/$(package).init debian/vboxdrv.init
-	rm -f debian/vboxballoonctrl-service.init debian/vboxautostart-service.init debian/vboxweb-service.init
 	rm -f debian/AutoConfig.kmk debian/configure.log debian/env.sh
 	rm -f debian/modules-stamp debian/build-stamp debian/configure-stamp
@@ -165,10 +166,31 @@
 	dh_installdirs
 	tar -xC $(prefix)/opt -f $(builddir)/bin/VirtualBox.tar
+	install -d -g 0 -o 0 $(prefix)/usr/share/applications
+	install -d -g 0 -o 0 $(prefix)/usr/lib
+	install -d -g 0 -o 0 $(prefix)/usr/bin
+	install -d -g 0 -o 0 $(prefix)/usr/share/$(package)
+	install -d -g 0 -o 0 $(prefix)/usr/share/doc/$(verpkg)
+	$(if $(NOQT),,mv $(archdir)/virtualbox.desktop \
+	   $(prefix)/usr/share/applications/virtualbox.desktop)
+	install -d -g 0 -o 0 $(prefix)/usr/share/pixmaps
+	$(if $(NOQT),,install -d -g 0 -o 0 $(prefix)/usr/share/icons/hicolor)
+	$(if $(NOQT),,cp $(archdir)/icons/128x128/virtualbox.png \
+	   $(prefix)/usr/share/pixmaps/virtualbox.png)
+	$(if $(NOQT),,mv $(archdir)/nls $(prefix)/usr/share/$(package))
+	$(if $(NOQT),,cd $(archdir)/icons; for i in *; do \
+	    for j in $$i/virtualbox.*; do \
+	        if [ -f $$j ]; then \
+	            if [ ! -d $(prefix)/usr/share/icons/hicolor/$$i/apps ]; then \
+	                install -d -g 0 -o 0 $(prefix)/usr/share/icons/hicolor/$$i/apps; \
+	            fi; \
+	            mv $$j $(prefix)/usr/share/icons/hicolor/$$i/apps; \
+	        fi; \
+	    done; \
+	    install -d -g 0 -o 0 $(prefix)/usr/share/icons/hicolor/$$i/mimetypes; \
+	    mv $$i/* $(prefix)/usr/share/icons/hicolor/$$i/mimetypes || true; \
+	    rmdir $$i; \
+	done)
+	$(if $(NOQT),,rmdir $(archdir)/icons)
 	$(if $(NOQT),,mv $(archdir)/virtualbox.xml debian/$(verpkg).sharedmimeinfo)
-	$(archdir)/scripts/install.sh --package $(package) --root $(prefix) \
-	    --prefix /usr $(if $(NOQT),--no-qt) $(if $(ose),--ose) \
-	    $(if $(HEADLESS),--headless) $(if $(NOWEBSVC),--no-web-service) \
-	    --install-folder /lib/$(package) --no-helpers
-	install -d -g 0 -o 0 $(prefix)/usr/share/doc/$(verpkg)
 	install -d -g 0 -o 0 $(prefix)/usr/share/lintian/overrides
 	sed \
@@ -176,6 +198,16 @@
 	    debian/lintian-override.in > \
 	   $(prefix)/usr/share/lintian/overrides/$(verpkg)
+	mv $(archdir)/VBox.png \
+	   $(prefix)/usr/share/pixmaps/VBox.png
+	mv $(archdir)/src  $(prefix)/usr/share/$(package)
+	rm $(archdir)/VBox.sh
+	install -D -g 0 -o 0 -m 644 $(vboxroot)/src/VBox/Installer/linux/VBox.sh $(prefix)/usr/bin/VBox
+	mv $(archdir)/VBoxSysInfo.sh $(prefix)/usr/share/$(package)
+	if [ -r $(archdir)/VBoxDTrace ]; then \
+	    mv $(archdir)/VBoxDTrace $(prefix)/usr/bin; \
+	fi
+	mv $(archdir)/VBoxTunctl $(prefix)/usr/bin
 	$(if $(NOMODS),,for d in $(moddir)/*; do \
-	    if [ -f $$d/vboxdrv.ko -a -f $$d/vboxnetflt.ko -a -f $$d/vboxnetadp.ko -a -f $$d/vboxpci.ko ]; then \
+	    if [ -f $$d/vboxdrv.ko -a -f $$d/vboxnetflt.ko -a -f $$d/vboxnetadp.ko ]; then \
 	        install -D -g 0 -o 0 -m 0644 \
 		    $$d/vboxdrv.ko $(prefix)/lib/modules/$$(basename $$d)/misc/vboxdrv.ko; \
@@ -184,6 +216,8 @@
 	        install -D -g 0 -o 0 -m 0644 \
 		    $$d/vboxnetadp.ko $(prefix)/lib/modules/$$(basename $$d)/misc/vboxnetadp.ko; \
-	        install -D -g 0 -o 0 -m 0644 \
-		    $$d/vboxpci.ko $(prefix)/lib/modules/$$(basename $$d)/misc/vboxpci.ko; \
+	        if [ -f $$d/vboxpci.ko ]; then \
+	            install -D -g 0 -o 0 -m 0644 \
+		        $$d/vboxpci.ko $(prefix)/lib/modules/$$(basename $$d)/misc/vboxpci.ko; \
+	        fi \
 	    fi \
 	    done)
@@ -194,37 +228,54 @@
 	rm $(addprefix $(archdir)/,UserManual*.pdf VirtualBox*.chm \
 	    LICENSE)
+	for i in rdesktop-vrdp.tar.gz additions/VBoxGuestAdditions.iso; do \
+	    mv $(archdir)/$$i $(prefix)/usr/share/$(package); done
+	$(if $(HEADLESS),,mv $(archdir)/rdesktop-vrdp $(prefix)/usr/bin)
+	$(if $(HEADLESS),,mv $(archdir)/rdesktop-vrdp-keymaps $(prefix)/usr/share/$(package))
 else
 	dh_installdocs \
 	    $(archdir)/UserManual*.pdf
 	rm $(addprefix $(archdir)/,UserManual*.pdf)
+	for i in additions/VBoxGuestAdditions.iso; do \
+	    mv $(archdir)/$$i $(prefix)/usr/share/$(package); done
 endif
 	mv $(archdir) $(prefix)/usr/lib/$(package)
+	if [ -f $(prefix)/usr/lib/$(package)/libQt5CoreVBox.so.5 ]; then \
+	    ../../../../tools/linux.$(chrarch)/bin/chrpath \
+	        --keepgoing --replace /usr/lib/$(package) \
+	        $(prefix)/usr/lib/$(package)/*.so.5 \
+	        $(prefix)/usr/lib/$(package)/plugins/platforms/*.so; \
+	        $(prefix)/usr/lib/$(package)/plugins/xcbglintegrations/*.so; \
+	    echo "[Paths]" > $(prefix)/usr/lib/$(package)/qt.conf; \
+	    echo "Plugins = /usr/lib/$(package)/plugins" >> $(prefix)/usr/lib/$(package)/qt.conf; \
+	fi
+	export VBOX_INSTALL_PATH=/usr/lib/$(package) && \
+	    cd $(builddir)/bin/sdk/installer && \
+	    $(PYTHON) ./vboxapisetup.py install --root $(prefix)
+	rm -rf $(prefix)/usr/lib/$(package)/sdk/installer
 	ln -s ../VBoxVMM.so $(prefix)/usr/lib/$(package)/components/VBoxVMM.so
 	rmdir $(prefix)/opt
+	dh_link \
+	    $(if $(NOQT),,usr/bin/VBox          usr/bin/VirtualBox) \
+	    $(if $(NOQT),,usr/bin/VBox          usr/bin/virtualbox) \
+	    $(if $(NOQT),,usr/bin/VBox          usr/bin/VirtualBoxVM) \
+	    $(if $(NOQT),,usr/bin/VBox          usr/bin/virtualboxvm) \
+	    usr/bin/VBox                        usr/bin/VBoxManage \
+	    usr/bin/VBox                        usr/bin/vboxmanage \
+	    $(if $(HEADLESS),,usr/bin/VBox      usr/bin/VBoxSDL) \
+	    $(if $(HEADLESS),,usr/bin/VBox      usr/bin/vboxsdl) \
+	    $(if $(ose),,usr/bin/VBox           usr/bin/VBoxVRDP) \
+	    usr/bin/VBox                        usr/bin/VBoxHeadless \
+	    usr/bin/VBox                        usr/bin/vboxheadless \
+	    usr/bin/VBox                        usr/bin/VBoxBugReport \
+	    usr/bin/VBox                        usr/bin/vboxbugreport \
+	    usr/bin/VBox                        usr/bin/VBoxBalloonCtrl \
+	    usr/bin/VBox                        usr/bin/vboxballoonctrl \
+	    usr/bin/VBox                        usr/bin/VBoxAutostart \
+	    usr/bin/VBox                        usr/bin/vboxautostart \
+	    $(if $(NOWEBSVC),,usr/bin/VBox      usr/bin/vboxwebsrv) \
+	    $(if $(NOVBOXIMG),,usr/lib/virtualbox/vbox-img usr/bin/vbox-img) \
+	    $(if $(NOVBOXIMGMOUNT),,usr/lib/virtualbox/vboximg-mount usr/bin/vboximg-mount) \
+	    usr/share/virtualbox/src/vboxhost   usr/src/vboxhost-$(ver)
 	$(if $(NOMODS),,dh_installmodules)
-	sed \
-	    -e 's|%NOLSB%||g' \
-	    -e 's|%DEBIAN%|yes|g' \
-	    -e 's|%PACKAGE%|virtualbox|g' \
-	    -e "s|%VERSION%|$(VBOX_VERSION_STRING)|g" \
-	    -e "s|%GROUP%|$(if $(VBOX_WITHOUT_HARDENING),vboxusers,root)|g" \
-	    $(vboxroot)/src/VBox/Installer/linux/vboxdrv.sh.in > debian/vboxdrv.init
-	dh_installinit --name=vboxdrv --noscripts
-	cp $(vboxroot)/src/VBox/Installer/linux/vboxballoonctrl-service.sh debian/vboxballoonctrl-service.init
-	dh_installinit --name=vboxballoonctrl-service --noscripts
-	cp $(vboxroot)/src/VBox/Installer/linux/vboxautostart-service.sh debian/vboxautostart-service.init
-	dh_installinit --name=vboxautostart-service --noscripts
-	cp $(vboxroot)/src/VBox/Installer/linux/vboxweb-service.sh debian/vboxweb-service.init
-	dh_installinit --name=vboxweb-service --noscripts
-	sed -e 's|%VER%|$(ver)|g' \
-	    debian/preinst.in > debian/preinst
-	sed -e 's|%VER%|$(ver)|g' \
-	    debian/prerm.in > debian/prerm
-	sed -e 's|%VER%|$(ver)|g' \
-	    -e '/#include installer-common.sh/ {' \
-	    -e "r $(vboxroot)/src/VBox/Installer/linux/installer-common.sh" \
-	    -e 'd' \
-	    -e '}' \
-	    debian/postinst.in > debian/postinst
 	dh_installdebconf
 	dh_installchangelogs
@@ -236,9 +287,10 @@
 	    $(addprefix --exclude=lib,$(addsuffix VBox.so.5,\
 	      Qt5Core Qt5Gui Qt5Widgets Qt5PrintSupport Qt5OpenGL Qt5DBus Qt5XcbQpa Qt5X11Extras)) \
-	    --exclude=libqxcb.so
-endif
-	mkdir -p $(current)/debian/$(verpkg)-dbg/usr/lib
+	    --exclude=libqxcb.so --exclude=libqxcb-glx-integration.so
+endif
+	mkdir -p $(current)/debian/$(verpkg)-dbg/usr/lib/$(package)
+	mv $(prefix)/usr/lib/$(package)/*.debug $(current)/debian/$(verpkg)-dbg/usr/lib/$(package)
 ifeq ($(DEBUG),)
-	mv $(current)/debian/$(verpkg)/usr/lib/debug $(current)/debian/$(verpkg)-dbg/usr/lib
+	mv $(prefix)/usr/lib/debug $(current)/debian/$(verpkg)-dbg/usr/lib
 endif
 	$(firstword $(shell which dh_python2) $(shell which dh_python3))
@@ -248,5 +300,6 @@
 	dh_installdeb
 	dh_perl
-	LD_LIBRARY_PATH=$(prefix)/usr/lib/virtualbox dh_shlibdeps
+	# for some reason, the Qt libraries couldn't be found on newer releases (e.g. Ubuntu hardy)
+	LD_LIBRARY_PATH=$(prefix)/usr/lib/virtualbox dh_shlibdeps --exclude=VBoxPython
 	dh_gencontrol -- \
 	  -Valsa=$(if $(HEADLESS),,libasound2) \
Index: trunk/debian/templates
===================================================================
--- trunk/debian/templates	(revision 82440)
+++ trunk/debian/templates	(revision 82441)
@@ -17,5 +17,5 @@
  by 'uname -r') and execute
    
-   /etc/init.d/vboxdrv setup
+   /sbin/vboxconfig
    
  as root.
@@ -28,59 +28,7 @@
  'uname -r' herausfinden können) und führen Sie danach
    
-   /etc/init.d/vboxdrv setup
+   /sbin/vboxconfig
    
  mit Root-Rechten aus.
-
-Template: virtualbox/module-compilation-allowed
-Type: boolean
-Default: true
-Description: Should the vboxdrv kernel module be compiled now?
- Unable to find a precompiled module for the current kernel!
- .
- Without a suitable kernel module you will not be able to start any VMs. It is
- strongly recommended that you compile a kernel module now. This requires
- kernel headers and the tools to build kernel modules (gcc, make, binutils, ...).
- However if you know that a suitable kernel module already exists at another
- location, you might want to override the default by setting
- KDIR=<full_path_to_vboxdrv_module> in /etc/default/virtualbox. You can also
- build the module later by executing
-   
-   /etc/init.d/vboxdrv setup
-   
- as root.
-Description-de.UTF-8: Soll das Kernmodul jetzt compiliert werden?
- Es konnte kein Kernmodul für den aktuellen Linux-Kern gefunden werden!
- .
- Ohne ein passendes Kernmodul können Sie keine VM starten. Daher sollten Sie
- jetzt ein Kernmodul compilieren. Dazu werden die Kern-Header und die Programme
- zum Bauen eines Kernmoduls (gcc, make, binutils, ...) benötigt. Falls Sie
- bereits ein passendes Kernmodul in ein anderes Verzeichnis installiert haben,
- können Sie den Verzeichnisnamen durch Hinzufügen von KDIR=<voller_Pfad_zu_vboxdrv>
- in der Datei /etc/default/virtualbox angeben. Sie können das Kernmodul auch
- später compilieren, indem Sie
-   
-   /etc/init.d/vboxdrv setup
-   
- mit Root-Rechten ausführen.
-
-Template: virtualbox/delete-old-modules
-Type: boolean
-Default: true
-Description: Delete old vboxdrv kernel modules?
- Old vboxdrv kernel modules found. You should remove these modules as they
- might interfere with this version of VirtualBox. You can force re-compilation
- of the module later by executing
-   
-   /etc/init.d/vboxdrv setup
-   
- as root.
-Description-de.UTF-8: Alte Kernmodule löschen?
- Es wurden alte vboxdrv-Kernmodule gefunden. Diese sollten gelöscht werden, da sie
- eventuell nicht mit dieser Version von VirtualBox zusammen arbeiten. Das Compilieren
- des Kernmoduls können Sie später durch
-   
-   /etc/init.d/vboxdrv setup
-   
- erzwingen.
 
 Template: virtualbox/old-installation-found
Index: trunk/doc/manual/user_ChangeLogImpl.xml
===================================================================
--- trunk/doc/manual/user_ChangeLogImpl.xml	(revision 82440)
+++ trunk/doc/manual/user_ChangeLogImpl.xml	(revision 82441)
@@ -46,4 +46,11 @@
       <listitem>
         <para>
+          Linux host: Drop PCI passthrough, the current code is too incomplete
+          (cannot handle PCIe devices at all), i.e. not useful enough
+        </para>
+      </listitem>
+
+      <listitem>
+        <para>
         </para>
       </listitem>
Index: trunk/src/VBox/Installer/linux/debian/control
===================================================================
--- trunk/src/VBox/Installer/linux/debian/control	(revision 82440)
+++ trunk/src/VBox/Installer/linux/debian/control	(revision 82441)
@@ -4,10 +4,10 @@
 Maintainer: Oracle Corporation <info@virtualbox.org>
 Standards-Version: 3.2.1
-Build-Depends: debhelper (>= 5), libz-dev, libssl-dev, 
+Build-Depends: debhelper (>= 5), libz-dev, libssl-dev,
   libsdl1.2-dev, uuid-dev, libxcursor-dev,
   libidl-dev, libpam0g-dev, iasl, xsltproc, linux-headers-generic,
   wine, java2-runtime, lsb-release, g++-multilib [amd64],
   libc6-dev-i386 [amd64], ia32-libs [amd64], libasound-dev,
-  libpulse-dev, libxml2-dev, python-dev,
+  libpulse-dev, libxml2-dev, python-dev, gsoap,
   libcap2-dev, libgl1-mesa-dev, libglu1-mesa-dev, libxmu-dev,
   libxext-dev, libcurl-dev, libxrandr-dev, openjdk-6-jdk | sun-java6-jdk
Index: trunk/src/VBox/Installer/linux/debian/rules
===================================================================
--- trunk/src/VBox/Installer/linux/debian/rules	(revision 82440)
+++ trunk/src/VBox/Installer/linux/debian/rules	(revision 82441)
@@ -64,5 +64,4 @@
 -include $(vboxroot)/SVN_REVISION
 svnrev   :=$(if $(svn_revision),$(svn_revision),)
-
 NOMODS   ?= $(ose)
 NOQT     ?= $(HEADLESS)
@@ -107,6 +106,5 @@
 	     $(if $(NOWEBSVC),,$(if $(ose),--enable-webservice,)) \
 	     $(if $(VNC),--enable-vnc,) \
-	     --disable-extpack \
-	     $(if $(filter DEBIAN_7_0,$(debdist)),--build-libopus,)
+	     --disable-extpack
 
 bld_flags := AUTOCFG=$(current)/debian/AutoConfig.kmk \
@@ -167,11 +165,11 @@
 	        make -C $(builddir)/bin/src/vboxpci KERN_VER=$$(basename $$d) clean && \
 		(cp $(builddir)/bin/src/vboxdrv/Module.symvers $(builddir)/bin/src/vboxpci || true) && \
-	        make -j4 -C $(builddir)/bin/src/vboxpci KBUILD_VERBOSE= KERN_VER=$$(basename $$d) all; \
-	        make -C $(builddir)/bin/src/vboxdrv KERN_VER=$$(basename $$d) clean; \
-	        make -C $(builddir)/bin/src/vboxnetflt KERN_VER=$$(basename $$d) clean; \
-	        make -C $(builddir)/bin/src/vboxnetadp KERN_VER=$$(basename $$d) clean; \
-	        make -C $(builddir)/bin/src/vboxpci KERN_VER=$$(basename $$d) clean; \
+	        make -j4 -C $(builddir)/bin/src/vboxpci KBUILD_VERBOSE= KERN_VER=$$(basename $$d) all; true; \
 	    fi; \
 	done
+	make -C $(builddir)/bin/src/vboxdrv clean
+	make -C $(builddir)/bin/src/vboxnetflt clean
+	make -C $(builddir)/bin/src/vboxnetadp clean
+	make -C $(builddir)/bin/src/vboxpci clean; true
 	touch debian/modules-stamp
 
@@ -212,5 +210,5 @@
 	$(if $(NOQT),,mv $(archdir)/nls $(prefix)/usr/share/$(package))
 	$(if $(NOQT),,cd $(archdir)/icons; for i in *; do \
-        for j in $$i/virtualbox.*; do \
+	    for j in $$i/virtualbox.*; do \
 	        if [ -f $$j ]; then \
 	            if [ ! -d $(prefix)/usr/share/icons/hicolor/$$i/apps ]; then \
@@ -235,5 +233,5 @@
 	mv $(archdir)/src  $(prefix)/usr/share/$(package)
 	rm $(archdir)/VBox.sh
-	install -D -g 0 -o 0 -m 644 VBox.sh $(prefix)/usr/bin/VBox
+	install -D -g 0 -o 0 -m 644 $(vboxroot)/src/VBox/Installer/linux/VBox.sh $(prefix)/usr/bin/VBox
 	mv $(archdir)/VBoxSysInfo.sh $(prefix)/usr/share/$(package)
 	if [ -r $(archdir)/VBoxDTrace ]; then \
@@ -242,5 +240,5 @@
 	mv $(archdir)/VBoxTunctl $(prefix)/usr/bin
 	$(if $(NOMODS),,for d in $(moddir)/*; do \
-	    if [ -f $$d/vboxdrv.ko -a -f $$d/vboxnetflt.ko -a -f $$d/vboxnetadp.ko -a -f $$d/vboxpci.ko ]; then \
+	    if [ -f $$d/vboxdrv.ko -a -f $$d/vboxnetflt.ko -a -f $$d/vboxnetadp.ko ]; then \
 	        install -D -g 0 -o 0 -m 0644 \
 		    $$d/vboxdrv.ko $(prefix)/lib/modules/$$(basename $$d)/misc/vboxdrv.ko; \
@@ -249,6 +247,8 @@
 	        install -D -g 0 -o 0 -m 0644 \
 		    $$d/vboxnetadp.ko $(prefix)/lib/modules/$$(basename $$d)/misc/vboxnetadp.ko; \
-	        install -D -g 0 -o 0 -m 0644 \
-		    $$d/vboxpci.ko $(prefix)/lib/modules/$$(basename $$d)/misc/vboxpci.ko; \
+	        if [ -f $$d/vboxpci.ko ]; then \
+	            install -D -g 0 -o 0 -m 0644 \
+		        $$d/vboxpci.ko $(prefix)/lib/modules/$$(basename $$d)/misc/vboxpci.ko; \
+	        fi \
 	    fi \
 	    done)
Index: trunk/src/VBox/Installer/linux/rpm/VirtualBox.tmpl.spec
===================================================================
--- trunk/src/VBox/Installer/linux/rpm/VirtualBox.tmpl.spec	(revision 82440)
+++ trunk/src/VBox/Installer/linux/rpm/VirtualBox.tmpl.spec	(revision 82441)
@@ -142,9 +142,11 @@
       KBUILD_VERBOSE= KERN_VER=$(basename $d) INSTALL_MODULE_PATH=$RPM_BUILD_ROOT -j4 \
       %INSTMOD%
-    ./src/vboxhost/build_in_tmp \
-      --use-module-symvers /tmp/vboxdrv-Module.symvers \
-      --module-source `pwd`/src/vboxhost/vboxpci \
-      KBUILD_VERBOSE= KERN_VER=$(basename $d) INSTALL_MODULE_PATH=$RPM_BUILD_ROOT -j4 \
-      %INSTMOD%
+    if [ -e `pwd`/src/vboxhost/vboxpci ]; then
+      ./src/vboxhost/build_in_tmp \
+        --use-module-symvers /tmp/vboxdrv-Module.symvers \
+        --module-source `pwd`/src/vboxhost/vboxpci \
+        KBUILD_VERBOSE= KERN_VER=$(basename $d) INSTALL_MODULE_PATH=$RPM_BUILD_ROOT -j4 \
+        %INSTMOD%
+    fi
   fi
 done
