]> git.proxmox.com Git - mirror_spl-debian.git/commitdiff
Recommends: linux-libc-dev (< ${LINUX_NEXT})
authorAron Xu <happyaron.xu@gmail.com>
Mon, 26 Feb 2018 10:23:49 +0000 (18:23 +0800)
committerAron Xu <happyaron.xu@gmail.com>
Mon, 26 Feb 2018 10:23:49 +0000 (18:23 +0800)
This tries to prevent unexpected upgrades of kernel that is not known
to be supported by the packaged version of ZFS/SPL.

debian/control
debian/get_next.sh [new file with mode: 0755]
debian/linux_compat [new file with mode: 0644]
debian/rules

index a1fb61dce56f2b8eb99a4883c20cb7cf1921dbc3..c3abf8d84ca26a58ccf98f453c66bd61ca3152ec 100644 (file)
@@ -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 (executable)
index 0000000..890fd45
--- /dev/null
@@ -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 (file)
index 0000000..6ae0dcb
--- /dev/null
@@ -0,0 +1 @@
+4.15
index b2fc86c91fd9bfca5dfbc908be0f96e4cf70cc43..c7f26088d69294c8508d1b9556eace77eb0ebe7a 100755 (executable)
@@ -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
 
 # ------------