Commit a774ba2a authored by Cyril Brulebois's avatar Cyril Brulebois
Browse files

Install a virtualbox-guest-dkms-dummy package to satisfy dependencies (refs: #15532).

The virtualbox-guest-dkms package is to be installed only during the
build to prepare kernel modules, and to be removed afterwards. Since
the virtualbox 5.2.8-dfsg-7 upload, the virtualbox-guest-utils package
depends on virtualbox-guest-dkms (with a strict version) so let's
install a dummy package providing the required dependency, so that the
hook clean-up can remove the real virtualbox-guest-dkms package without
causing the virtualbox-guest-utils to go away in the process.

To be extra precise, virtualbox-guest-utils depends on:
  virtualbox-guest-dkms (= ${source:Version})
  | virtualbox-guest-source (= ${source:Version})
  | virtualbox-guest-modules

Since we're building modules from the virtualbox-guest-dkms package,
let's have a Provides field which reflects that.
parent 41db9a3f
......@@ -9,6 +9,7 @@ echo "Building VirtualBox guest modules"
. /usr/share/amnesia/build/variables
# Import ensure_hook_dependency_is_installed()
# and install_fake_package()
. /usr/local/lib/tails-shell-library/build.sh
# Any -dkms package must be installed *after* dkms to be properly registered
......@@ -38,3 +39,11 @@ done
# virtualbox-guest-dkms's postrm script deletes any previously
# built binary module; let's delete it before the package gets purged.
rm /var/lib/dpkg/info/virtualbox-guest-dkms.prerm
# Install a fake package so that the real virtualbox-guest-dkms can be purged
# when the clean-up for this hook happens, even if virtualbox-guest-utils
# depends on it. The 4th parameter needs to embed the real package version
# since there's a dependency on the source version between packages.
REAL_PKG_VERSION=$(dpkg-query -W -f='${Version}\n' virtualbox-guest-dkms)
FAKE_PKG_VERSION=${REAL_PKG_VERSION}+tails.fake1
install_fake_package virtualbox-guest-dkms-dummy "${FAKE_PKG_VERSION}" kernel "virtualbox-guest-dkms (= ${REAL_PKG_VERSION})"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment