summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoranonym <anonym@riseup.net>2017-03-26 15:28:04 +0200
committeranonym <anonym@riseup.net>2017-03-27 00:32:09 +0200
commitc4926f9b38841fe82754de3ff86aa7ff741498ad (patch)
tree3725e45e59dd3deebd4970f0f705e4cabf0477c1
parent96ea8317d1f764be6a8cfdd8ce6e0da0b7ece3df (diff)
-rwxr-xr-xconfig/chroot_local-hooks/50-dkms33
-rw-r--r--config/chroot_local-includes/lib/live/config/0000-qubes6
-rw-r--r--config/chroot_local-packageslists/tails-common.list2
3 files changed, 40 insertions, 1 deletions
diff --git a/config/chroot_local-hooks/50-dkms b/config/chroot_local-hooks/50-dkms
index 1757e2b..d43ef90 100755
--- a/config/chroot_local-hooks/50-dkms
+++ b/config/chroot_local-hooks/50-dkms
@@ -14,7 +14,8 @@ apt-get install --yes build-essential dkms
apt-get install --yes \
"linux-headers-${KERNEL_VERSION}-amd64" \
aufs-dkms \
- virtualbox-guest-dkms
+ virtualbox-guest-dkms \
+ qubes-kernel-vm-support
MODULES_VERSION="$(dpkg-query -W -f='${Version}\n' virtualbox-guest-dkms \
| sed -E 's,-.*,,')"
@@ -25,6 +26,36 @@ dkms install \
-a amd64 -k "${KERNEL_VERSION}-amd64" \
-m virtualbox-guest -v "$MODULES_VERSION"
+MODULES_VERSION="$(dpkg-query -W -f='${Version}\n' qubes-kernel-vm-support \
+ | sed -E 's,[-+].*,,')"
+(
+ cd "/usr/src/u2mfn-${MODULES_VERSION}"
+ patch -p1 <<EOF
+--- a/u2mfn.c 2017-03-26 23:45:32.417520134 +0200
++++ b/u2mfn.c 2017-03-26 23:44:06.615915088 +0200
+@@ -75,7 +75,10 @@
+ switch (cmd) {
+ case U2MFN_GET_MFN_FOR_PAGE:
+ down_read(&current->mm->mmap_sem);
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 6, 0)
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0)
++ ret = get_user_pages
++ (data, 1, (FOLL_WRITE | FOLL_FORCE), &user_page, 0);
++#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 6, 0)
+ ret = get_user_pages
+ (data, 1, 1, 0, &user_page, 0);
+ #else
+EOF
+)
+
+dkms build \
+ -a amd64 -k "${KERNEL_VERSION}-amd64" \
+ -m u2mfn -v "${MODULES_VERSION}" && \
+dkms install \
+ -a amd64 -k "${KERNEL_VERSION}-amd64" \
+ -m u2mfn -v "${MODULES_VERSION}" || \
+ ( echo ; echo ; cat /var/lib/dkms/u2mfn/3.2.3/build/make.log ; echo ; echo ; bash ; false )
+
# clean the build directory
# rm -r /var/lib/dkms/virtualbox-guest/
diff --git a/config/chroot_local-includes/lib/live/config/0000-qubes b/config/chroot_local-includes/lib/live/config/0000-qubes
new file mode 100644
index 0000000..37beb63
--- /dev/null
+++ b/config/chroot_local-includes/lib/live/config/0000-qubes
@@ -0,0 +1,6 @@
+# Qubes magic :)
+
+# This should be done as a build hook, but then we need to cleanup
+# 'user' from some statoverride file blah.
+deluser user || :
+rm -rf /home/user
diff --git a/config/chroot_local-packageslists/tails-common.list b/config/chroot_local-packageslists/tails-common.list
index 60d9f7c..a8b2fd8 100644
--- a/config/chroot_local-packageslists/tails-common.list
+++ b/config/chroot_local-packageslists/tails-common.list
@@ -411,6 +411,8 @@ python3-yaml
# Qubes OS guest-support
qubes-core-agent
qubes-gui-agent
+xserver-xorg-input-qubes
+xserver-xorg-video-dummyqbs
# Less sure about the ones below
libxvmc1
x11-session-utils