Archived
Two standing gaps in how this tree is guarded. vendor/ records what every lifted file is and what we changed, in prose -- prose nothing enforces. vendor/SHA256SUMS is the mechanical half: all 73 files under vendor/, the lifts, the patch series and the record itself, hashed; tests/vendor_sums.sh recomputes both directions -- a file whose content drifted from its record, and a file that arrived without being recorded -- and fails the suite (ctest: vendor_sums, in the fast tier). An unrecorded change to a lifted dependency now has to survive being a committed manifest update to ship, instead of slipping through a rebase the way 33108e4's silent reverts did through this branch's history. And no CI ran the suite at all. .woodpecker.yml (Codeberg CI) builds CPU-only with the media codecs present and runs the host preset -- everything but the gpu and oot tiers. The runner is the current Ubuntu LTS deliberately: the mp4 writer binds FFmpeg's >= 7 AVIO callbacks and 24.04's 6.1 does not compile it. Rehearsed on a native Ubuntu 26.04 box -- the same gcc 15.2 the image carries -- the host preset fails eight cases on this branch, and the same eight on plain upstream/main: arch, chatparse, engine_e2e, two gbnf shards, place, quant_ggml and avx_check. Pre-existing under gcc 15, partly machine-dependent (avx_check compares kernels op by op on the CPU it finds, and the gbnf shards flip under load); this branch adds none of them. CI's first red is upstream's to see.
35 lines
1.8 KiB
Bash
Executable File
35 lines
1.8 KiB
Bash
Executable File
#!/bin/sh
|
|
# vendor_sums.sh -- checks the vendor tree, byte for byte, against vendor/SHA256SUMS.
|
|
#
|
|
# vendor/UPSTREAM records what every lifted file is, from which commit, and what we changed. This
|
|
# script is the mechanical half of that record: every file under vendor/ -- the lifts, our patch
|
|
# series, the record itself -- is hashed, and anything that differs from its recorded hash or
|
|
# arrived without being recorded is an unrecorded change to a lifted dependency, which is exactly
|
|
# what the record exists to catch. The build does not consult it; a test does (ctest:
|
|
# vendor_sums), so it runs wherever the suite runs.
|
|
#
|
|
# tests/vendor_sums.sh <repo-root>
|
|
#
|
|
# Regenerate the manifest in the same commit that changes vendor/:
|
|
# find vendor -type f ! -name SHA256SUMS | sort | xargs sha256sum > vendor/SHA256SUMS
|
|
set -e
|
|
root=${1:?usage: vendor_sums.sh <repo-root>}
|
|
cd "$root"
|
|
command -v sha256sum >/dev/null || { echo "vendor_sums: sha256sum is required" >&2; exit 1; }
|
|
[ -f vendor/SHA256SUMS ] || { echo "vendor_sums: vendor/SHA256SUMS is missing" >&2; exit 1; }
|
|
sha256sum -c --status vendor/SHA256SUMS || {
|
|
echo "vendor_sums: a vendor file differs from its recorded hash;" \
|
|
"run sha256sum -c vendor/SHA256SUMS to see which" >&2
|
|
exit 1; }
|
|
# The other direction: sha256sum -c never notices a file the manifest does not name -- an added
|
|
# header sliding into a lift is silent without this half.
|
|
tmp=$(mktemp -d)
|
|
trap 'rm -rf "$tmp"' EXIT INT TERM
|
|
find vendor -type f ! -name SHA256SUMS | sort > "$tmp/have"
|
|
awk '{print $2}' vendor/SHA256SUMS | sort > "$tmp/want"
|
|
diff "$tmp/want" "$tmp/have" || {
|
|
echo "vendor_sums: the vendor tree and the manifest name different files;" \
|
|
"regenerate the manifest in the commit that changes vendor/" >&2
|
|
exit 1; }
|
|
echo "vendor_sums: $(wc -l < "$tmp/have") files, every hash matches"
|