From: Aron Xu Date: Mon, 26 Feb 2018 10:23:49 +0000 (+0800) Subject: Recommends: linux-libc-dev (< ${LINUX_NEXT}) X-Git-Tag: debian/0.7.9-2~10 X-Git-Url: https://git.proxmox.com/?p=mirror_spl-debian.git;a=commitdiff_plain;h=1cd9ef4f0f4a844b59f94f458381bb5e57461151;hp=3b02d3c04d17eb0394a47335c7d59e44ae94feb2 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. --- 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 # ------------