From 87d64c162d59af9cbfd7082f2ce7b2ae2d69b127 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Wed, 9 Oct 2019 01:33:25 +0000 Subject: [PATCH] scst: Unbreak the build for RHEL 6 / CentOS 6 git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8610 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scripts/sign-modules | 7 ++++++- scst/src/certs/Makefile | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/sign-modules b/scripts/sign-modules index 6b79fb847..c9cfdf46f 100755 --- a/scripts/sign-modules +++ b/scripts/sign-modules @@ -9,7 +9,12 @@ fi scst_dir=$(dirname "$(cd "$(dirname "$0")" && pwd)") -CONFIG_MODULE_SIG_HASH=$(sed -n 's/^CONFIG_MODULE_SIG_HASH="\([^"]*\)"$/\1/p' "${KDIR}/.config") +if [ ! -e "${KDIR}/scripts/sign-file" ]; then + echo "Not signing modules because no sign-file executable" + exit +fi + +CONFIG_MODULE_SIG_HASH=$(sed -n 's/^CONFIG_MODULE_SIG_HASH="\([^"]*\)"$/\1/p' "${KDIR}/.config" | { read -r line; [ -n "$line" ] && echo "$line" || echo sha256; }) sed 's,^kernel/,,' < modules.order | \ while read -r f; do diff --git a/scst/src/certs/Makefile b/scst/src/certs/Makefile index 90818f69d..2c9d76ff0 100644 --- a/scst/src/certs/Makefile +++ b/scst/src/certs/Makefile @@ -1,4 +1,4 @@ -CONFIG_MODULE_SIG_HASH := $(shell sed -n 's/^CONFIG_MODULE_SIG_HASH="\([^"]*\)"$$/\1/p' "$(KDIR)/.config") +CONFIG_MODULE_SIG_HASH := $(shell sed -n 's/^CONFIG_MODULE_SIG_HASH="\([^"]*\)"$$/\1/p' "$(KDIR)/.config" | { read -r line; [ -n "$$line" ] && echo "$$line" || echo sha256; }) all: $(shell grep -q '^CONFIG_MODULE_SIG=y$$' "$(KDIR)/.config" && \ echo module_signing_enabled)