From 7d134eef371553cd2911a818f4887cb488c5b3f7 Mon Sep 17 00:00:00 2001 From: vasilito Date: Sat, 11 Jul 2026 01:49:12 +0300 Subject: [PATCH] verify-fork-versions.sh: remove snapshot content-skip, add base fork to map Context: A relibc fork check via cargo compare exposed that the fork labeled 0.6.0 (matching a 2020-12-23 upstream tag) was on a completely different codebase from upstream master. The fork was imported as a snapshot. The verify-fork-versions.sh tool allowed this because 'snapshot' mode skipped byte-for-byte content comparison. Changes: 1. Remove 'snapshot = skip content check' behavior. All Cat 2 forks must pass actual content comparison against their claimed upstream tag. 2. Add base to local/fork-upstream-map.toml so it's checked too (was missing). Effect: Future 'fake version label' divergences (Cargo.toml says version X but source content does not match upstream X) will be caught by the preflight check instead of slipping through build. --- local/fork-upstream-map.toml | 1 + local/scripts/verify-fork-versions.sh | 7 ++----- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/local/fork-upstream-map.toml b/local/fork-upstream-map.toml index 338d5ff4df..d7aaedac44 100644 --- a/local/fork-upstream-map.toml +++ b/local/fork-upstream-map.toml @@ -38,3 +38,4 @@ kernel https://gitlab.redox-os.org/redox-os/kernel.git 0.5.12 sna bootloader https://gitlab.redox-os.org/redox-os/bootloader.git 1.0.0 snapshot installer https://gitlab.redox-os.org/redox-os/installer.git 0.2.42 snapshot userutils https://gitlab.redox-os.org/redox-os/userutils.git 0.1.0 snapshot +base https://gitlab.redox-os.org/redox-os/base.git main tracked diff --git a/local/scripts/verify-fork-versions.sh b/local/scripts/verify-fork-versions.sh index 1875906a6e..711e215e46 100755 --- a/local/scripts/verify-fork-versions.sh +++ b/local/scripts/verify-fork-versions.sh @@ -91,11 +91,8 @@ for fork_dir in local/sources/*/; do continue fi - # Snapshot forks: skip content comparison (unrelated git histories). - # Version format and suffix are still verified above. - if [ "$fork_mode" = "snapshot" ]; then - continue - fi + # snapshot mode no longer skips content check — must match upstream tag. + # Fetch the upstream tag's tree hash upstream_hash=$(cd /tmp && git ls-remote --tags "$upstream_url" "refs/tags/$upstream_tag" 2>/dev/null | awk '{print $1}' | head -1)