Commit ce3fce70 authored by intrigeri's avatar intrigeri

Switch back to building the upstream aufs kernel module ourselves (refs: #15309)

aufs-dkms is not ready for 4.15 (https://bugs.debian.org/890733).

This reverts commit 31a272ad
and adjusts more stuff.
parent b6ed417c
......@@ -11,3 +11,6 @@
[submodule "submodules/mirror-pool-dispatcher"]
path = submodules/mirror-pool-dispatcher
url = https://git-tails.immerda.ch/mirror-pool-dispatcher
[submodule "submodules/aufs4-standalone"]
path = submodules/aufs4-standalone
url = https://github.com/sfjro/aufs4-standalone.git
......@@ -204,6 +204,10 @@ install -m 0755 \
submodules/mirror-pool-dispatcher/lib/js/mirror-dispatcher.js \
config/chroot_local-includes/usr/local/lib/nodejs/
# aufs4-standalone
rm -rf config/chroot_local-includes/usr/src/aufs4-standalone
cp -a submodules/aufs4-standalone config/chroot_local-includes/usr/src/
# custom debootstrap script, setting some APT magic to log downloads:
patch \
--follow-symlinks \
......
#! /bin/sh
set -e
set -u
echo "Building the aufs module"
. /usr/share/amnesia/build/variables
apt-get install --yes \
build-essential \
"linux-source-${KERNEL_SOURCE_VERSION}"
# aufs build needs fs/mount.h, which is in linux-source-* but not
# in linux-headers-*, so we'll symlink it.
tar --directory=/usr/src \
-xf "/usr/src/linux-source-${KERNEL_SOURCE_VERSION}.tar."*
arch=amd64
linux_headers_arch_pkg="linux-headers-${KERNEL_VERSION}-amd64"
linux_headers_common_pkg="linux-headers-${KERNEL_VERSION}-common"
apt-get install --yes "$linux_headers_arch_pkg" "$linux_headers_common_pkg"
ln -s \
"/usr/src/linux-source-${KERNEL_SOURCE_VERSION}/fs" \
"/usr/src/linux-headers-${KERNEL_VERSION}-${arch}/fs"
(
cd /usr/src/aufs4-standalone
perl -pi -E \
's{\A CONFIG_AUFS_DEBUG \s* = \s* y $}{CONFIG_AUFS_DEBUG =}xms' \
config.mk
KDIR="/usr/src/linux-headers-${KERNEL_VERSION}-${arch}"
make clean KDIR="$KDIR"
make install KDIR="$KDIR"
)
for modules_dir in /lib/modules/*/extra ; do
if [ ! -f "${modules_dir}/aufs.ko" ]; then
echo "Can not find aufs.ko module in '${modules_dir}" >&2
exit 1
fi
done
depmod "${KERNEL_VERSION}-${arch}"
apt-get remove --yes "$linux_headers_arch_pkg" "$linux_headers_common_pkg"
rm -r /usr/src/aufs4-standalone
rm -r "/usr/src/linux-source-${KERNEL_SOURCE_VERSION}"
......@@ -4,7 +4,7 @@ set -e
set -u
set -x
echo "Building dkms modules"
echo "Building VirtualBox guest modules"
. /usr/share/amnesia/build/variables
......@@ -32,7 +32,6 @@ apt-get install --yes \
apt-get install --yes \
"linux-headers-${KERNEL_VERSION}-amd64" \
aufs-dkms \
virtualbox-guest-dkms
for log in $(ls /var/lib/dkms/*/*/build/make.log); do
......@@ -44,12 +43,6 @@ done
# dkms.conf for a DKMS module includes a BUILD_EXCLUSIVE directive
# which does not match our kernel version, the modules won't be built
# and then we should abort the build.
for modules_dir in /lib/modules/*/kernel/fs/aufs ; do
if [ ! -f "${modules_dir}/aufs.ko" ]; then
echo "Can not find aufs.ko module in '${modules_dir}" >&2
exit 1
fi
done
for module in vboxguest vboxsf vboxvideo ; do
for modules_dir in /lib/modules/*/updates ; do
if [ ! -f "${modules_dir}/${module}.ko" ]; then
......@@ -61,7 +54,6 @@ 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/aufs-dkms.prerm
rm /var/lib/dpkg/info/virtualbox-guest-dkms.prerm
# Also copy the udev rules installed by virtualbox-guest-dkms to enable guest
......
......@@ -15,6 +15,7 @@ apt-get --yes purge \
'^linux-compiler-*' \
'^linux-kbuild-*' \
'^linux-headers-*' \
'^linux-source-*' \
build-essential debhelper dkms dpkg-dev \
gcc gcc-6 \
intltool-debian \
......
Subproject commit caea84a33dce187ad77f9ee524d7ec46acc69c63
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