From 95fcbdda9a28e820f217b98c7173fe1719d16688 Mon Sep 17 00:00:00 2001 From: Christian Breunig Date: Thu, 5 Nov 2026 17:27:50 +0000 Subject: Kernel: T9577: abort out-of-tree module builds on the first error Several build helpers kept going after a failing command, so a broken patch, compile or signing step could still produce a package and the calling build reported success. Unsigned modules could end up in an image this way. These helpers now stop at the first error. The Mellanox OFED build also exits non-zero when not run as root instead of silently succeeding. --- scripts/package-build/linux-kernel/build-accel-ppp-ng.sh | 1 + scripts/package-build/linux-kernel/build-mellanox-ofed.sh | 3 ++- scripts/package-build/linux-kernel/sign-modules.sh | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/package-build/linux-kernel/build-accel-ppp-ng.sh b/scripts/package-build/linux-kernel/build-accel-ppp-ng.sh index 6e62d879..fbf22707 100755 --- a/scripts/package-build/linux-kernel/build-accel-ppp-ng.sh +++ b/scripts/package-build/linux-kernel/build-accel-ppp-ng.sh @@ -1,4 +1,5 @@ #!/bin/sh +set -e ARCH_TRIPLET=$(dpkg-architecture -qDEB_HOST_MULTIARCH) CWD=$(pwd) diff --git a/scripts/package-build/linux-kernel/build-mellanox-ofed.sh b/scripts/package-build/linux-kernel/build-mellanox-ofed.sh index 76c1bd03..a8ba13e7 100755 --- a/scripts/package-build/linux-kernel/build-mellanox-ofed.sh +++ b/scripts/package-build/linux-kernel/build-mellanox-ofed.sh @@ -1,4 +1,5 @@ #!/bin/sh +set -e DROP_DEV_DBG_DEBS=1 DEB_DISTRO='debian12.1' CWD=$(pwd) @@ -7,7 +8,7 @@ KERNEL_VAR_FILE=${CWD}/kernel-vars if [ $(id -u) -ne 0 ]; then echo "Mellanox OFED script needs to be run as root" - exit + exit 1 fi require_amd64 "Mellanox OFED" diff --git a/scripts/package-build/linux-kernel/sign-modules.sh b/scripts/package-build/linux-kernel/sign-modules.sh index d1d822cb..90cad13a 100755 --- a/scripts/package-build/linux-kernel/sign-modules.sh +++ b/scripts/package-build/linux-kernel/sign-modules.sh @@ -1,4 +1,5 @@ #!/bin/sh +set -e BASE_DIR=$(dirname $0) MODULE_DIR=$1 -- cgit v1.2.3