build(baseline): use submodule content as-is (authoritative), no LF normalize

Live has mixed CRLF/LF and content drift vs the submodule HEADs, so normalizing
would break the currently-matching files. The baseline reflects the authoritative
developer repos; line-ending handling is a verifier concern.

Signed-off-by: LÁZÁR Imre <imre@illusion.hu>
Assisted-by: claude-code@claude-opus-4-8
This commit is contained in:
LÁZÁR Imre AI Agent 2026-07-16 13:49:14 +02:00
parent 323e93c51c
commit 84f387bbd6

View File

@ -66,16 +66,13 @@ if [ -d "$ROOT/overrides" ]; then
rsync -a --exclude='.gitkeep' "$ROOT/overrides/" "$OUT/" rsync -a --exclude='.gitkeep' "$ROOT/overrides/" "$OUT/"
fi fi
# 5b) Deploy transform for the submodule-sourced dirs: the developer repos # NOTE: common_cadline_libraries + maintenance come from the authoritative
# (cadcommonlib, maintenance) store CRLF line-endings; the deployed live form # developer submodules (cadcommonlib, maintenance) as-is. Their content currently
# is LF. Normalize the text files to LF so the baseline byte-matches deployment. # diverges from the live docroot (mixed line-endings + a content drift on
log "normalize: line-endings (common_cadline_libraries, maintenance) -> LF" # crm_hardlock.class.php / POfile.php) because live was not last deployed from the
for dir in "$OUT/common_cadline_libraries" "$OUT/maintenance"; do # submodule HEADs. The baseline reflects the authoritative repos; the HIDS flags
[ -d "$dir" ] || continue # the live divergence until live is re-deployed or the drift is reconciled.
find "$dir" -type f 2>/dev/null | while IFS= read -r f; do # Line-ending normalization is intentionally left to the verifier, not applied here.
grep -Iq . "$f" 2>/dev/null && sed -i 's/\r$//' "$f"
done
done
# 6) Safety net — malware IOC + scan artifacts must never appear in the baseline # 6) Safety net — malware IOC + scan artifacts must never appear in the baseline
# (the sources above already exclude them; this is defensive, documented in # (the sources above already exclude them; this is defensive, documented in