From e7c90c705fc89609e33aac46442b50cef810114f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Mon, 3 Jun 2019 23:42:11 +0200 Subject: [PATCH] Declare u2mfn module version, skip build for qubes kernels This will allow dkms to skip u2mfn module install if one is already shipped with the kernel package - which is the case for kernels delivered through dom0. Make the version high enough to be considered newer than dkms package. Sadly, it does not prevent module build. And the build fails becaue of mismatching compiler version (kernel headers include gcc plugins). Skip the build by setting BUILD_EXCLUSIVE_KERNEL in dkms.conf. Ideally, we'd set some value indicating "don't build on kernel *qubes*", but this variable does not support negation. So, set this variable to a dummy value after manually checking $kernelver variable. Fixes QubesOS/qubes-issues#4963 --- kernel-modules/u2mfn/dkms.conf.in | 4 ++++ kernel-modules/u2mfn/u2mfn.c | 1 + 2 files changed, 5 insertions(+) diff --git a/kernel-modules/u2mfn/dkms.conf.in b/kernel-modules/u2mfn/dkms.conf.in index 225807c..0a32c8e 100644 --- a/kernel-modules/u2mfn/dkms.conf.in +++ b/kernel-modules/u2mfn/dkms.conf.in @@ -6,3 +6,7 @@ PACKAGE_NAME="u2mfn" BUILT_MODULE_NAME[0]="u2mfn" DEST_MODULE_LOCATION[0]="/extra/" AUTOINSTALL=yes +# BUILD_EXCLUSIVE_KERNEL doesn't support negation :( +if echo "$kernelver"|grep -q qubes; then + BUILD_EXCLUSIVE_KERNEL=not-on-qubes-kernel +fi diff --git a/kernel-modules/u2mfn/u2mfn.c b/kernel-modules/u2mfn/u2mfn.c index 8b33a21..1209dc5 100644 --- a/kernel-modules/u2mfn/u2mfn.c +++ b/kernel-modules/u2mfn/u2mfn.c @@ -170,3 +170,4 @@ static void u2mfn_exit(void) module_init(u2mfn_init); module_exit(u2mfn_exit); MODULE_LICENSE("GPL"); +MODULE_VERSION("5.0.0");