diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 09:20:55 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 09:20:55 +0000 |
commit | 751abe5af6e60af060ea7979512574d903a49eb0 (patch) | |
tree | 991d21305c4f60a4b0c13964436f8b8e08fee34b /debian/patches/BUILD_EXCLUSIVE_CONFIG.patch | |
parent | Adding upstream version 3.0.10. (diff) | |
download | dkms-751abe5af6e60af060ea7979512574d903a49eb0.tar.xz dkms-751abe5af6e60af060ea7979512574d903a49eb0.zip |
Adding debian version 3.0.10-8+deb12u1.debian/3.0.10-8+deb12u1debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/patches/BUILD_EXCLUSIVE_CONFIG.patch')
-rw-r--r-- | debian/patches/BUILD_EXCLUSIVE_CONFIG.patch | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/debian/patches/BUILD_EXCLUSIVE_CONFIG.patch b/debian/patches/BUILD_EXCLUSIVE_CONFIG.patch new file mode 100644 index 0000000..26701a1 --- /dev/null +++ b/debian/patches/BUILD_EXCLUSIVE_CONFIG.patch @@ -0,0 +1,41 @@ +Author: Andreas Beckmann <anbe@debian.org> +Description: add BUILD_EXCLUSIVE_CONFIG + support build exclusion depending on kernel features being present/absent, + e.g. BUILD_EXCLUSIVE_CONFIG="CONFIG_FOO !CONFIG_BAR" +Forwarded: https://github.com/dell/dkms/issues/219 + +--- a/dkms.in ++++ b/dkms.in +@@ -28,6 +28,7 @@ shopt -s extglob + readonly dkms_conf_variables="CLEAN PACKAGE_NAME + PACKAGE_VERSION POST_ADD POST_BUILD POST_INSTALL POST_REMOVE PRE_BUILD + PRE_INSTALL BUILD_DEPENDS BUILD_EXCLUSIVE_KERNEL BUILD_EXCLUSIVE_ARCH ++ BUILD_EXCLUSIVE_CONFIG + build_exclude OBSOLETE_BY MAKE MAKE_MATCH + PATCH PATCH_MATCH patch_array BUILT_MODULE_NAME + built_module_name BUILT_MODULE_LOCATION built_module_location +@@ -622,6 +623,15 @@ read_conf() + # Set build_exclude + [[ $BUILD_EXCLUSIVE_KERNEL && ! $1 =~ $BUILD_EXCLUSIVE_KERNEL ]] && build_exclude="yes" + [[ $BUILD_EXCLUSIVE_ARCH && ! $2 =~ $BUILD_EXCLUSIVE_ARCH ]] && build_exclude="yes" ++ if [[ $BUILD_EXCLUSIVE_CONFIG && -e $kernel_source_dir/.config ]]; then ++ local kconf ++ for kconf in $BUILD_EXCLUSIVE_CONFIG ; do ++ case "$kconf" in ++ !*) grep -q -E "^${kconf#!}=[ym]" $kernel_source_dir/.config && build_exclude="yes" ;; ++ *) grep -q -E "^${kconf}=[ym]" $kernel_source_dir/.config || build_exclude="yes" ;; ++ esac ++ done ++ fi + + # Fail if absolutely no DEST_MODULE_LOCATION + if ((${#dest_module_location[@]} == 0)); then +@@ -1009,7 +1019,7 @@ prepare_build() + + # Error out if build_exclude is set + [[ $build_exclude ]] && die 77 \ +- $"The $base_dir/dkms.conf for module $module includes a BUILD_EXCLUSIVE directive which does not match this kernel/arch."\ ++ $"The $base_dir/dkms.conf for module $module includes a BUILD_EXCLUSIVE directive which does not match this kernel/arch/config."\ + $"This indicates that it should not be built." + + # Error out if source_tree is basically empty (binary-only dkms tarball w/ --force check) |