From 463fa34a79d841653bccd091bc73165519f9abe7 Mon Sep 17 00:00:00 2001 From: Robert Baldyga Date: Thu, 24 Sep 2026 14:51:00 +0200 Subject: [PATCH 1/2] configure: Ensure configure reproducibility Enforce locale while sorting config files, to make generated_headers.h content identical for the same kernel on different systems. Also sort config file, so that it shows no diff when compared. Signed-off-by: Robert Baldyga --- configure | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/configure b/configure index 4b311f7f8..a93471412 100755 --- a/configure +++ b/configure @@ -157,7 +157,7 @@ cat > $BUILD_CONFIG_FILE <<-EOF WITH_NETLINK=${WITH_NETLINK:-0} EOF -CONFIG_FILES=`ls $SCRIPTPATH/configure.d/*.conf | sort` +CONFIG_FILES=`ls $SCRIPTPATH/configure.d/*.conf | LC_ALL=C sort` FILES_COUNT=`echo $CONFIG_FILES | wc -w` CONFIG_FILE=$SCRIPTPATH/"config.out" @@ -197,6 +197,7 @@ generate_config() { exit 1 fi + LC_ALL=C sort -o ${CONFIG_FILE} ${CONFIG_FILE} echo "$KERNEL_DIR_TAG $(realpath "$KERNEL_DIR")" >> ${CONFIG_FILE} } From 11c9a1f1ef50886eb059d55d28d005c39f16283f Mon Sep 17 00:00:00 2001 From: Robert Baldyga Date: Thu, 24 Sep 2026 14:55:01 +0200 Subject: [PATCH 2/2] configure: Fix config file ordering grep patern Compare only agains the files at the end of the path. This avoids wrong ordering in situation when one of the directories on the full path to the sources location contains "1_" or "2_" string, e.g. "/home/user/open-cas-linux_v26.9_rc/configure.d/". Signed-off-by: Robert Baldyga --- configure | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure b/configure index a93471412..499f7a64f 100755 --- a/configure +++ b/configure @@ -204,8 +204,8 @@ generate_config() { generate_header() { rm -f $SCRIPTPATH/modules/generated_defines.h # Configs starting with '1_' have to be put as first in header - FIRST=$(echo $CONFIG_FILES | tr ' ' '\n' | grep '1_') - SECOND=$(echo $CONFIG_FILES | tr ' ' '\n' | grep '2_') + FIRST=$(echo $CONFIG_FILES | tr ' ' '\n' | grep '/1_[^/]*$') + SECOND=$(echo $CONFIG_FILES | tr ' ' '\n' | grep '/2_[^/]*$') echo "#ifndef __GENERATED_DEFINES_H__" >> $SCRIPTPATH/modules/generated_defines.h echo "#define __GENERATED_DEFINES_H__" >> $SCRIPTPATH/modules/generated_defines.h