diff options
Diffstat (limited to 'debian/patches/0007-prepare_build-use-return-code-77-if-skipping-due-to-.patch')
-rw-r--r-- | debian/patches/0007-prepare_build-use-return-code-77-if-skipping-due-to-.patch | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/debian/patches/0007-prepare_build-use-return-code-77-if-skipping-due-to-.patch b/debian/patches/0007-prepare_build-use-return-code-77-if-skipping-due-to-.patch new file mode 100644 index 0000000..2f2cf9b --- /dev/null +++ b/debian/patches/0007-prepare_build-use-return-code-77-if-skipping-due-to-.patch @@ -0,0 +1,66 @@ +From 3638f1119debd177b46836cdf7502d25e9888042 Mon Sep 17 00:00:00 2001 +From: Andreas Beckmann <anbe@debian.org> +Date: Fri, 17 Mar 2023 10:54:49 +0100 +Subject: [PATCH] prepare_build: use return code 77 if skipping due to + BUILD_EXCLUSIVE_* + +error code 9 is used at multiple locations throughout the dkms code +to indicate different unrelated errors + +error code 77 has been used by GNU autotest for skipped tests and was +later adopted by other testing frameworks +--- + dkms.8.in | 11 +++++++---- + dkms.in | 2 +- + dkms_common.postinst | 2 +- + run_test.sh | 4 ++-- + 4 files changed, 11 insertions(+), 8 deletions(-) + +diff --git a/dkms.8.in b/dkms.8.in +index b003da6..b197878 100644 +--- a/dkms.8.in ++++ b/dkms.8.in +@@ -654,10 +654,13 @@ missing or broken dependencies cause non-fatal warnings. + .TP + .B BUILD_EXCLUSIVE_KERNEL= + This optional directive allows you to specify a regular expression which defines +-the subset of kernels which DKMS is allowed to build your module for. If the kernel +-being built for does not match against this regular expression, the dkms build +-will error out. For example, if you set it as ="^2\.4.*", your module would not be +-built for 2.6 kernels. ++the subset of kernels which DKMS is allowed to build your module for. ++If the kernel being built for does not match against this regular expression (or ++does not the satisfy the constraints of any other ++.B BUILD_EXCLUSIVE_* ++directive), the dkms build will error out with exit code 77. ++For example, if you set it as ="^2\.4.*", your module would not be built for 2.6 ++or later kernels. + .TP + .B BUILD_EXCLUSIVE_ARCH= + This optional directive functions very similarly to +diff --git a/dkms.in b/dkms.in +index 0383bef..128157b 100644 +--- a/dkms.in ++++ b/dkms.in +@@ -1023,7 +1023,7 @@ prepare_build() + read_conf_or_die "$kernelver" "$arch" + + # Error out if build_exclude is set +- [[ $build_exclude ]] && die 9 \ ++ [[ $build_exclude ]] && die 77 \ + $"The $base_dir/dkms.conf for module $module includes a BUILD_EXCLUSIVE directive which does not match this kernel/arch."\ + $"This indicates that it should not be built." + +diff --git a/dkms_common.postinst b/dkms_common.postinst +index 3f1ddf3..a66a23f 100644 +--- a/dkms_common.postinst ++++ b/dkms_common.postinst +@@ -238,7 +238,7 @@ for KERNEL in $KERNELS; do + set +e + dkms build -m $NAME -v $VERSION -k $KERNEL $ARCH > /dev/null + case $? in +- 9) ++ 77) + set -e + echo "Skipped." + continue |