From 1cd9ef4f0f4a844b59f94f458381bb5e57461151 Mon Sep 17 00:00:00 2001 From: Aron Xu Date: Mon, 26 Feb 2018 18:23:49 +0800 Subject: [PATCH] Recommends: linux-libc-dev (< ${LINUX_NEXT}) This tries to prevent unexpected upgrades of kernel that is not known to be supported by the packaged version of ZFS/SPL. --- debian/control | 1 + debian/get_next.sh | 8 ++++++++ debian/linux_compat | 1 + debian/rules | 4 ++-- 4 files changed, 12 insertions(+), 2 deletions(-) create mode 100755 debian/get_next.sh create mode 100644 debian/linux_compat diff --git a/debian/control b/debian/control index a1fb61d..c3abf8d 100644 --- a/debian/control +++ b/debian/control @@ -24,6 +24,7 @@ Depends: dkms (>> 2.2.1.0), lsb-release, ${misc:Depends} Recommends: spl (>= ${source:Upstream-Version}), + linux-libc-dev (< 4.16) Provides: spl-modules Description: Solaris Porting Layer kernel modules for Linux The Solaris Porting Layer (SPL) is a Linux kernel module which provides diff --git a/debian/get_next.sh b/debian/get_next.sh new file mode 100755 index 0000000..890fd45 --- /dev/null +++ b/debian/get_next.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +SUPPORT=$(cat debian/linux_compat) +MAJOR=$(echo $SUPPORT|cut -d'.' -f1) +MINOR=$(echo $SUPPORT|cut -d'.' -f2) +NEXT=$((MINOR+1)) + +echo "${MAJOR}.${NEXT}" diff --git a/debian/linux_compat b/debian/linux_compat new file mode 100644 index 0000000..6ae0dcb --- /dev/null +++ b/debian/linux_compat @@ -0,0 +1 @@ +4.15 diff --git a/debian/rules b/debian/rules index b2fc86c..c7f2608 100755 --- a/debian/rules +++ b/debian/rules @@ -22,7 +22,7 @@ pmodules = $(PACKAGE)-modules-$(non_epoch_version) dh $@ --with dkms,autoreconf --parallel override_dh_auto_configure: - @cp debian/control.in debian/control + sed "s/@LINUX_COMPAT@/linux-libc-dev \(< $(shell debian/get_next.sh)\)/" debian/control.in > debian/control @# Embed the downstream version in the module. @sed \ @@ -61,7 +61,7 @@ override_dh_dkms: override_dh_auto_clean: dh_auto_clean @if test -e META.orig; then mv META.orig META; fi - cp debian/control.in debian/control + sed "s/@LINUX_COMPAT@/linux-libc-dev \(< $(shell debian/get_next.sh)\)/" debian/control.in > debian/control # ------------ -- 2.39.2