mirror of
https://github.com/rustfs/rustfs.git
synced 2026-09-10 22:25:51 +00:00
test(scanner): add release bundle evidence descriptors (#7595)
* test(scanner): merge release evidence descriptors Co-Authored-By: heihutu <heihutu@gmail.com> Co-Authored-By: zhi22915 <qiuzgang@gmail.com> * test(scanner): add authority and legacy release descriptors Co-Authored-By: heihutu <heihutu@gmail.com> Co-Authored-By: zhi22915 <qiuzgang@gmail.com> * test(scanner): add scoped ack release descriptor Co-Authored-By: heihutu <heihutu@gmail.com> Co-Authored-By: zhi22915 <qiuzgang@gmail.com> * test(scanner): require all release evidence fields Co-Authored-By: heihutu <heihutu@gmail.com> Co-Authored-By: zhi22915 <qiuzgang@gmail.com> * test(scanner): add mrf release descriptor producer Add a standalone W13 MRF descriptor producer for measured G07/G08/P4 raw artifacts, with fail-closed self-tests for missing responsibility cases, disk-full ENOSPC observations, synthetic artifacts, and short P4 cleanup soaks. Also bind G12 quota path evidence to explicit case lists so W16 descriptors cannot pass without reset and settlement coverage. Co-Authored-By: heihutu <heihutu@gmail.com> Co-Authored-By: zhi22915 <qiuzgang@gmail.com> * test(scanner): reuse mrf release descriptor producer Route the W13 runner through the shared MRF descriptor producer so measured runs and offline re-packaging use the same fail-closed validation. Co-Authored-By: heihutu <heihutu@gmail.com> Co-Authored-By: zhi22915 <qiuzgang@gmail.com> --------- Co-authored-by: zhi22915 <qiuzgang@gmail.com>
This commit is contained in:
+10
-5
@@ -29,7 +29,7 @@ MIN_MINOR=11
|
||||
UV_PYTHON_SPEC="${RUSTFS_UV_PYTHON:-3.12}"
|
||||
|
||||
version_ok() {
|
||||
"$1" -c "import sys; raise SystemExit(0 if sys.version_info >= (${MIN_MAJOR}, ${MIN_MINOR}) else 1)" \
|
||||
"$@" -c "import sys; raise SystemExit(0 if sys.version_info >= (${MIN_MAJOR}, ${MIN_MINOR}) else 1)" \
|
||||
>/dev/null 2>&1
|
||||
}
|
||||
|
||||
@@ -55,20 +55,25 @@ if [ "${1:-}" = "--print-interpreter" ]; then
|
||||
fi
|
||||
|
||||
if [ -n "${RUSTFS_PYTHON:-}" ]; then
|
||||
if ! command -v "${RUSTFS_PYTHON}" >/dev/null 2>&1; then
|
||||
read -r -a rustfs_python_cmd <<< "${RUSTFS_PYTHON}"
|
||||
if [ "${#rustfs_python_cmd[@]}" -eq 0 ]; then
|
||||
echo >&2 "❌ RUSTFS_PYTHON='${RUSTFS_PYTHON}' is not an executable command."
|
||||
exit 1
|
||||
fi
|
||||
if ! version_ok "${RUSTFS_PYTHON}"; then
|
||||
if ! command -v "${rustfs_python_cmd[0]}" >/dev/null 2>&1; then
|
||||
echo >&2 "❌ RUSTFS_PYTHON='${RUSTFS_PYTHON}' is not an executable command."
|
||||
exit 1
|
||||
fi
|
||||
if ! version_ok "${rustfs_python_cmd[@]}"; then
|
||||
echo >&2 "❌ RUSTFS_PYTHON='${RUSTFS_PYTHON}' is older than Python ${MIN_MAJOR}.${MIN_MINOR}."
|
||||
echo >&2 " The repository's checkers import tomllib (Python ${MIN_MAJOR}.${MIN_MINOR}+)."
|
||||
exit 1
|
||||
fi
|
||||
if [ "${print_only}" = "1" ]; then
|
||||
command -v "${RUSTFS_PYTHON}"
|
||||
printf '%s\n' "${RUSTFS_PYTHON}"
|
||||
exit 0
|
||||
fi
|
||||
exec "${RUSTFS_PYTHON}" "$@"
|
||||
exec "${rustfs_python_cmd[@]}" "$@"
|
||||
fi
|
||||
|
||||
for candidate in python3.14 python3.13 python3.12 python3.11 python3 python; do
|
||||
|
||||
Reference in New Issue
Block a user