From 09b92a07290565d1fa84e9b1b6762d44d8d9ea04 Mon Sep 17 00:00:00 2001 From: "Manikandan K. S." Date: Mon, 27 Jul 2026 21:14:33 +0530 Subject: [PATCH] dkms: ensure shell scripts are executable in builds Add PRE_BUILD step to find and chmod +x all .sh files before building. DKMS may not preserve file permissions when copying source to the build directory, causing build failures on some systems. Fixes #1258 --- kernel-open/dkms.conf | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/kernel-open/dkms.conf b/kernel-open/dkms.conf index aef54d352b..fa0898ad21 100644 --- a/kernel-open/dkms.conf +++ b/kernel-open/dkms.conf @@ -2,6 +2,10 @@ PACKAGE_NAME="nvidia" PACKAGE_VERSION="__VERSION_STRING" AUTOINSTALL="yes" +# Ensure shell scripts are executable before building. DKMS may not preserve +# file permissions when copying source to the build directory. +PRE_BUILD="find . -type f -name '*.sh' -exec chmod +x {} +" + # By default, DKMS will add KERNELRELEASE to the make command line; however, # this will cause the kernel module build to infer that it was invoked via # Kbuild directly instead of DKMS. The dkms(8) manual page recommends quoting