Files
openhuman/scripts/check-linux-tls-dependencies.sh
T
+16 8ea875c13d Promote main → release (conflict-resolved) (#5256)
Co-authored-by: YellowSnnowmann <167776381+YellowSnnowmann@users.noreply.github.com>
Co-authored-by: Steven Enamakel <31011319+senamakel@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Cyrus Gray <144336577+graycyrus@users.noreply.github.com>
Co-authored-by: Horst1993 <horst.w@gmicloud.ai>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: James Gentes <jgentes@users.noreply.github.com>
Co-authored-by: Sam <samrusani@users.noreply.github.com>
Co-authored-by: Sami Rusani <14844597+samrusani@users.noreply.github.com>
Co-authored-by: oxoxDev <164490987+oxoxDev@users.noreply.github.com>
Co-authored-by: Muhammad Ismail <78064250+myi1@users.noreply.github.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: nb213 <binyangzhu000@gmail.com>
Co-authored-by: binyangzhu000-sudo <224954946+binyangzhu000-sudo@users.noreply.github.com>
Co-authored-by: Steven Enamakel <enamakel@tinyhumans.ai>
Co-authored-by: CodeGhost21 <164498022+CodeGhost21@users.noreply.github.com>
Co-authored-by: sanil-23 <sanil@tinyhumans.ai>
Co-authored-by: M3gA-Mind <elvin@mahadao.com>
Co-authored-by: oxoxDev <oxoxdev@users.noreply.github.com>
Co-authored-by: mysma-9403 <64923976+mysma-9403@users.noreply.github.com>
Co-authored-by: mwakidenis <mwakidenice@gmail.com>
Co-authored-by: NgoQuocViet2001 <123613986+NgoQuocViet2001@users.noreply.github.com>
Co-authored-by: viet.ngo <viet.ngo@sotatek.com>
Co-authored-by: Maciej Myszkiewicz <mmyszkiewicz@bwcoders.com>
2026-07-29 04:21:25 +05:30

61 lines
1.9 KiB
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
target="${1:-x86_64-unknown-linux-gnu}"
forbidden='^(native-tls|openssl|openssl-sys) v'
check_world() {
local label="$1"
local manifest="$2"
local tree
tree="$(cargo tree --locked --manifest-path "$manifest" --target "$target" --prefix none)"
if [[ "$label" == core ]] &&
matches="$(printf '%s\n' "$tree" | grep -E "$forbidden")"; then
printf 'error: native TLS/OpenSSL dependencies found in %s for %s:\n%s\n' \
"$label" "$target" "$matches" >&2
exit 1
fi
# Tauri legitimately owns reqwest 0.13 for its dev proxy/updater. Sentry
# must never own that tree: OpenHuman supplies its reqwest 0.12 transport.
mapfile -t reqwest_013_versions < <(
printf '%s\n' "$tree" |
sed -nE 's/^reqwest v(0\.13\.[^ ]+).*/\1/p' |
sort -u
)
for version in "${reqwest_013_versions[@]}"; do
owners="$(
cargo tree --locked --manifest-path "$manifest" --target "$target" \
--invert "reqwest@$version" 2>/dev/null || true
)"
if printf '%s\n' "$owners" | grep -Eq '^sentry v'; then
printf 'error: Sentry owns reqwest %s in %s\n%s\n' \
"$version" "$label" "$owners" >&2
exit 1
fi
done
for package in native-tls openssl openssl-sys; do
owners="$(
cargo tree --locked --manifest-path "$manifest" --target "$target" \
--invert "$package" 2>/dev/null || true
)"
if printf '%s\n' "$owners" | grep -Eq '^sentry v'; then
printf 'error: Sentry owns %s in %s\n%s\n' \
"$package" "$label" "$owners" >&2
exit 1
fi
if [[ "$label" == tauri ]] &&
printf '%s\n' "$owners" | grep -Eq '^motosan-ai-oauth v'; then
printf 'error: motosan-ai-oauth owns %s in %s\n%s\n' \
"$package" "$label" "$owners" >&2
exit 1
fi
done
}
check_world core Cargo.toml
check_world tauri app/src-tauri/Cargo.toml
printf 'Linux TLS/Sentry dependency policy passed for both Cargo worlds (%s)\n' "$target"