From 928046b744a6d3f93f5ba1351a6d700a62535a00 Mon Sep 17 00:00:00 2001 From: Antonio Russo Date: Wed, 30 May 2018 23:11:19 -0400 Subject: [PATCH] Explicitly state supported Linux versions Add META tags Linux-Maximum and Linux-Minimum. One pain point for package maintainers is ensuring the compatibility of the packaged version of ZFS with the Linux kernel. By providing an authoritative compatibility guide in the source tree, maintainers can automate compatibility checks. Additionally, increase META string extraction specificity. configure.ac finds Name and Version by a very simple `grep`, which might conceivably find other fields. Require the string be at the beginning of a line, and be followed by a colon to avoid such confusions. Reviewed-by: Brian Behlendorf Reviewed-by: Giuseppe Di Natale Reviewed-by: George Melikov Signed-off-by: Antonio Russo Closes #7571 --- META | 18 ++++++++++-------- README.md | 3 +++ configure.ac | 4 ++-- 3 files changed, 15 insertions(+), 10 deletions(-) diff --git a/META b/META index 5f82f03569..f0ef3487e1 100644 --- a/META +++ b/META @@ -1,8 +1,10 @@ -Meta: 1 -Name: zfs -Branch: 1.0 -Version: 0.7.0 -Release: 1 -Release-Tags: relext -License: CDDL -Author: OpenZFS on Linux +Meta: 1 +Name: zfs +Branch: 1.0 +Version: 0.7.0 +Release: 1 +Release-Tags: relext +License: CDDL +Author: OpenZFS on Linux +Linux-Maximum: 4.16 +Linux-Minimum: 2.6.32 diff --git a/README.md b/README.md index 49b3bfe462..59d167f8ec 100644 --- a/README.md +++ b/README.md @@ -26,3 +26,6 @@ We have a separate document with [contribution guidelines](./.github/CONTRIBUTIN ZFS on Linux is released under a CDDL license. For more details see the NOTICE, LICENSE and COPYRIGHT files; `UCRL-CODE-235197` + +# Supported Kernels + * The `META` file contains the officially recognized supported kernel versions. diff --git a/configure.ac b/configure.ac index e171e785f6..8e360f46e1 100644 --- a/configure.ac +++ b/configure.ac @@ -30,8 +30,8 @@ * CDDL HEADER END */ -AC_INIT(m4_esyscmd(grep Name META | cut -d ':' -f 2 | tr -d ' \n'), - m4_esyscmd(grep Version META | cut -d ':' -f 2 | tr -d ' \n')) +AC_INIT(m4_esyscmd(grep ^Name: META | cut -d ':' -f 2 | tr -d ' \n'), + m4_esyscmd(grep ^Version: META | cut -d ':' -f 2 | tr -d ' \n')) AC_LANG(C) ZFS_AC_META AC_CONFIG_AUX_DIR([config])