From f9edfd6391586fdf285cb290a653be8ff011f3b5 Mon Sep 17 00:00:00 2001 From: DefensiveDepth Date: Sun, 14 Dec 2025 12:03:44 -0500 Subject: [PATCH] Add trailing nl if it doesnt already exist --- salt/manager/tools/sbin/soup | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/salt/manager/tools/sbin/soup b/salt/manager/tools/sbin/soup index 51c77733b..75ad34618 100755 --- a/salt/manager/tools/sbin/soup +++ b/salt/manager/tools/sbin/soup @@ -1174,11 +1174,12 @@ hash_normalized_file() { return 1 fi - sed -E \ + # Ensure trailing newline for consistent hashing regardless of source file + { sed -E \ -e 's/^[[:space:]]+//; s/[[:space:]]+$//' \ -e '/^$/d' \ -e 's|--url=http://[^:]+:7788|--url=http://MANAGER:7788|' \ - "$file" | sha256sum | awk '{print $1}' + "$file"; echo; } | sed '/^$/d' | sha256sum | awk '{print $1}' } # Known-default hashes for so-rule-update (ETOPEN ruleset)