summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsajolida <sajolida@pimienta.org>2015-11-12 12:45:24 +0000
committersajolida <sajolida@pimienta.org>2015-11-12 15:32:39 +0000
commit45486b05b7a6841c34fe3c9b544c1eec391c2343 (patch)
tree52cbf65cf7e18176fc04319fdc6e7900ad95f94b
parent34fb27f11986b36e414c9b854d2c305a776b413d (diff)
Remove more hooks (#10508)
-rwxr-xr-xconfig/chroot_local-hooks/50-virtualbox75
1 files changed, 0 insertions, 75 deletions
diff --git a/config/chroot_local-hooks/50-virtualbox b/config/chroot_local-hooks/50-virtualbox
deleted file mode 100755
index 937c00c..0000000
--- a/config/chroot_local-hooks/50-virtualbox
+++ /dev/null
@@ -1,75 +0,0 @@
-#!/bin/sh
-
-set -e
-
-echo "Building VirtualBox guest modules"
-
-hw_arch="`dpkg --print-architecture`"
-if [ "$hw_arch" != i386 -a "$hw_arch" != amd64 ]; then
- exit 0
-fi
-
-available_gcc_version=4.7
-wanted_gcc_version=4.8
-
-# the -dkms package must be installed *after* dkms to be properly registered
-apt-get install --yes build-essential dkms dpatch
-
-# temporary workaround: pretend the "wanted" GCC is available, so that
-# the modules can build.
-# /usr/src/linux-headers-3.*-common/scripts/gcc-version.sh
-# is the one who says they should be run using that version.
-apt-get install --yes gcc-${available_gcc_version}
-
-# Create and install fake GCC package
-apt-get install --yes equivs
-cat > /root/gcc-${wanted_gcc_version}.control << EOF
-Section: devel
-Priority: optional
-Homepage: https://tails.boum.org/
-Standards-Version: 3.6.2
-
-Package: gcc-${wanted_gcc_version}
-Maintainer: Tails developers <amnesia@boum.org>
-Architecture: all
-Description: (Fake) GNU C compiler
- Work around the fact that our Linux headers depend on gcc-${wanted_gcc_version},
- which is unavailable on Wheezy.
-EOF
-cd /root ; equivs-build /root/gcc-${wanted_gcc_version}.control
-dpkg -i gcc-${wanted_gcc_version}_1.0_all.deb
-ln -sf /usr/bin/gcc-${available_gcc_version} /usr/bin/gcc-${wanted_gcc_version}
-rm /root/gcc-${wanted_gcc_version}.control /root/gcc-${wanted_gcc_version}_1.0_all.deb
-
-# Versions of the module prior to 4.2 do not built on 3.8 and later [Debian #704130].
-# Install version from Wheezy backports.
-apt-get install --yes virtualbox-guest-utils virtualbox-guest-dkms virtualbox-guest-x11
-
-# Have the modules built for every installed kernel
-for KERNEL in /boot/vmlinuz-* ; do
- KERNEL_VERSION="$(basename ${KERNEL} | sed -e 's|vmlinuz-||')"
- MODULES_VERSION="$(dpkg-query -W -f='${Version\n}' virtualbox-guest-dkms)"
-
- # Installing the headers should trigger the building of the modules for that kernel
- apt-get install --yes linux-headers-$KERNEL_VERSION
- # Only build and install if it was not done already
- if [ ! "$(dkms status -k $KERNEL_VERSION -m virtualbox-guest -v $MODULES_VERSION)" ]; then
- dkms build -k $KERNEL_VERSION -m virtualbox-guest -v $MODULES_VERSION
- dkms install -k $KERNEL_VERSION -m virtualbox-guest -v $MODULES_VERSION
- fi
-
-done
-
-# clean the build directory
-rm -r /var/lib/dkms/virtualbox-guest/
-
-# 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
-
-# Also copy the udev rules installed by virtualbox-guest-dkms to enable guest
-# additions by default.
-cp -a /lib/udev/rules.d/60-virtualbox-guest-dkms.rules /etc/udev/rules.d/
-
-# remove temporary workaround
-rm /usr/bin/gcc-${wanted_gcc_version}