fix29: удалён legacy, введён Debian 13-only и обновлён rollback
This commit is contained in:
+1
-1
@@ -13,7 +13,7 @@ reboot_module -> awg2-reboot-scheduler
|
||||
|
||||
## Поддерживаемая build-среда
|
||||
|
||||
- Debian/Ubuntu с `apt`.
|
||||
- Debian 13 с `apt`.
|
||||
- amd64/x86_64.
|
||||
- Rust toolchain из `rust-toolchain.toml` (`1.95.0` в текущем дереве).
|
||||
- `Cargo.lock` обязателен: build gate работает в `--locked` режиме.
|
||||
|
||||
+42
-11
@@ -125,19 +125,23 @@ setup_root_runner() {
|
||||
}
|
||||
|
||||
ensure_supported_host() {
|
||||
if [[ -f /etc/os-release ]]; then
|
||||
# shellcheck disable=SC1091
|
||||
source /etc/os-release
|
||||
case "${ID:-}" in
|
||||
debian|ubuntu) ;;
|
||||
*) echo "Unsupported OS: ${ID:-unknown}. Only Debian/Ubuntu are supported."; exit 1 ;;
|
||||
esac
|
||||
if [[ ! -f /etc/os-release ]]; then
|
||||
echo "Unsupported OS: missing /etc/os-release. Only Debian 13 amd64 is supported."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# shellcheck disable=SC1091
|
||||
source /etc/os-release
|
||||
|
||||
if [[ "${ID:-}" != "debian" || "${VERSION_ID:-}" != "13" ]]; then
|
||||
echo "Unsupported OS: ${PRETTY_NAME:-unknown}. Only Debian 13 amd64 is supported."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
local arch
|
||||
arch="$(uname -m)"
|
||||
if [[ "$arch" != "x86_64" && "$arch" != "amd64" ]]; then
|
||||
echo "Unsupported arch: $arch. Only amd64/x86_64 is supported."
|
||||
arch="$(dpkg --print-architecture 2>/dev/null || uname -m)"
|
||||
if [[ "$arch" != "amd64" && "$arch" != "x86_64" ]]; then
|
||||
echo "Unsupported arch: $arch. Only amd64 is supported."
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
@@ -366,6 +370,33 @@ if command -v systemctl >/dev/null 2>&1; then
|
||||
systemctl daemon-reload || true
|
||||
fi
|
||||
|
||||
exit 0
|
||||
EOF
|
||||
|
||||
cat >"$staging/DEBIAN/preinst" <<'EOF'
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
if [ ! -r /etc/os-release ]; then
|
||||
echo "awg2-harness supports only Debian 13 amd64" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
. /etc/os-release
|
||||
|
||||
if [ "${ID:-}" != "debian" ] || [ "${VERSION_ID:-}" != "13" ]; then
|
||||
echo "awg2-harness supports only Debian 13 amd64; got ${PRETTY_NAME:-unknown}" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if command -v dpkg >/dev/null 2>&1; then
|
||||
arch="$(dpkg --print-architecture)"
|
||||
if [ "$arch" != "amd64" ]; then
|
||||
echo "awg2-harness supports only amd64; got $arch" >&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
exit 0
|
||||
EOF
|
||||
|
||||
@@ -380,7 +411,7 @@ fi
|
||||
exit 0
|
||||
EOF
|
||||
|
||||
chmod 0755 "$staging/DEBIAN/postinst" "$staging/DEBIAN/postrm"
|
||||
chmod 0755 "$staging/DEBIAN/preinst" "$staging/DEBIAN/postinst" "$staging/DEBIAN/postrm"
|
||||
|
||||
mkdir -p "$DIST_DIR"
|
||||
local pkg_name
|
||||
|
||||
Reference in New Issue
Block a user