mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-03-12 23:01:16 +00:00
Compare commits
14 Commits
add-script
...
arm64-buil
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
24f1347990 | ||
|
|
866b6950c0 | ||
|
|
44ec223d20 | ||
|
|
4ab3a24d03 | ||
|
|
231945dfa7 | ||
|
|
7c051fb648 | ||
|
|
6f8aa6eadc | ||
|
|
35b3b93ca6 | ||
|
|
78979189c1 | ||
|
|
a6a83b9541 | ||
|
|
e4db6be257 | ||
|
|
b9d401b178 | ||
|
|
6f62656c96 | ||
|
|
087f817bf6 |
@@ -196,7 +196,7 @@ explain_exit_code() {
|
||||
103) echo "Validation: Shell is not Bash" ;;
|
||||
104) echo "Validation: Not running as root (or invoked via sudo)" ;;
|
||||
105) echo "Validation: Proxmox VE version not supported" ;;
|
||||
106) echo "Validation: Architecture not supported (ARM / PiMox)" ;;
|
||||
106) echo "Validation: Unsupported architecture (requires amd64 or arm64)" ;;
|
||||
107) echo "Validation: Kernel key parameters unreadable" ;;
|
||||
108) echo "Validation: Kernel key limits exceeded" ;;
|
||||
109) echo "Proxmox: No available container ID after max attempts" ;;
|
||||
@@ -348,10 +348,10 @@ explain_exit_code() {
|
||||
json_escape() {
|
||||
# Escape a string for safe JSON embedding using awk (handles any input size).
|
||||
# Pipeline: strip ANSI → remove control chars → escape \ " TAB → join lines with \n
|
||||
printf '%s' "$1" \
|
||||
| sed 's/\x1b\[[0-9;]*[a-zA-Z]//g' \
|
||||
| tr -d '\000-\010\013\014\016-\037\177\r' \
|
||||
| awk '
|
||||
printf '%s' "$1" |
|
||||
sed 's/\x1b\[[0-9;]*[a-zA-Z]//g' |
|
||||
tr -d '\000-\010\013\014\016-\037\177\r' |
|
||||
awk '
|
||||
BEGIN { ORS = "" }
|
||||
{
|
||||
gsub(/\\/, "\\\\") # backslash → \\
|
||||
|
||||
676
misc/build.func
676
misc/build.func
File diff suppressed because it is too large
Load Diff
@@ -344,9 +344,15 @@ pve_check() {
|
||||
# - Provides link to ARM64-compatible scripts
|
||||
# ------------------------------------------------------------------------------
|
||||
arch_check() {
|
||||
if [ "$(dpkg --print-architecture)" != "amd64" ]; then
|
||||
msg_error "This script will not work with PiMox (ARM architecture detected)."
|
||||
msg_warn "Visit https://github.com/asylumexp/Proxmox for ARM64 support."
|
||||
local arch
|
||||
arch="$(dpkg --print-architecture)"
|
||||
if [[ "$arch" != "amd64" && "$arch" != "arm64" ]]; then
|
||||
msg_error "This script requires amd64 or arm64 (detected: $arch)."
|
||||
sleep 2
|
||||
exit 106
|
||||
fi
|
||||
if [[ "$arch" == "arm64" && "${var_arm64:-}" != "yes" ]]; then
|
||||
msg_error "This script does not yet support arm64."
|
||||
sleep 2
|
||||
exit 106
|
||||
fi
|
||||
|
||||
@@ -99,7 +99,7 @@ if ! declare -f explain_exit_code &>/dev/null; then
|
||||
103) echo "Validation: Shell is not Bash" ;;
|
||||
104) echo "Validation: Not running as root (or invoked via sudo)" ;;
|
||||
105) echo "Validation: Proxmox VE version not supported" ;;
|
||||
106) echo "Validation: Architecture not supported (ARM / PiMox)" ;;
|
||||
106) echo "Validation: Unsupported architecture (requires amd64 or arm64)" ;;
|
||||
107) echo "Validation: Kernel key parameters unreadable" ;;
|
||||
108) echo "Validation: Kernel key limits exceeded" ;;
|
||||
109) echo "Proxmox: No available container ID after max attempts" ;;
|
||||
|
||||
@@ -2822,10 +2822,13 @@ function fetch_and_deploy_codeberg_release() {
|
||||
# Fall back to architecture heuristic
|
||||
if [[ -z "$url_match" ]]; then
|
||||
for u in $assets; do
|
||||
if [[ "$u" =~ ($arch|amd64|x86_64|aarch64|arm64).*\.deb$ ]]; then
|
||||
url_match="$u"
|
||||
break
|
||||
if [[ "${arch,,}" =~ ^(amd64|x86_64)$ ]]; then
|
||||
[[ "$u" =~ (amd64|x86_64).*\.deb$ ]] || continue
|
||||
elif [[ "${arch,,}" =~ ^(arm64|aarch64)$ ]]; then
|
||||
[[ "$u" =~ (arm64|aarch64).*\.deb$ ]] || continue
|
||||
fi
|
||||
url_match="$u"
|
||||
break
|
||||
done
|
||||
fi
|
||||
|
||||
@@ -3122,7 +3125,11 @@ _gh_scan_older_releases() {
|
||||
done)
|
||||
fi
|
||||
if [[ "$has_match" != "true" ]]; then
|
||||
has_match=$(echo "$releases_list" | jq -r ".[$i].assets[].browser_download_url" | grep -qE "($arch|amd64|x86_64|aarch64|arm64).*\.deb$" && echo true)
|
||||
if [[ "${arch,,}" =~ ^(amd64|x86_64)$ ]]; then
|
||||
has_match=$(echo "$releases_list" | jq -r ".[$i].assets[].browser_download_url" | grep -qE '(amd64|x86_64).*\.deb$' && echo true)
|
||||
elif [[ "${arch,,}" =~ ^(arm64|aarch64)$ ]]; then
|
||||
has_match=$(echo "$releases_list" | jq -r ".[$i].assets[].browser_download_url" | grep -qE '(arm64|aarch64).*\.deb$' && echo true)
|
||||
fi
|
||||
fi
|
||||
if [[ "$has_match" != "true" ]]; then
|
||||
has_match=$(echo "$releases_list" | jq -r ".[$i].assets[].browser_download_url" | grep -qE '\.deb$' && echo true)
|
||||
@@ -3328,10 +3335,13 @@ function fetch_and_deploy_gh_release() {
|
||||
# If no match via explicit pattern, fall back to architecture heuristic
|
||||
if [[ -z "$url_match" ]]; then
|
||||
for u in $assets; do
|
||||
if [[ "$u" =~ ($arch|amd64|x86_64|aarch64|arm64).*\.deb$ ]]; then
|
||||
url_match="$u"
|
||||
break
|
||||
if [[ "${arch,,}" =~ ^(amd64|x86_64)$ ]]; then
|
||||
[[ "$u" =~ (amd64|x86_64).*\.deb$ ]] || continue
|
||||
elif [[ "${arch,,}" =~ ^(arm64|aarch64)$ ]]; then
|
||||
[[ "$u" =~ (arm64|aarch64).*\.deb$ ]] || continue
|
||||
fi
|
||||
url_match="$u"
|
||||
break
|
||||
done
|
||||
fi
|
||||
|
||||
@@ -3362,10 +3372,13 @@ function fetch_and_deploy_gh_release() {
|
||||
fi
|
||||
if [[ -z "$url_match" ]]; then
|
||||
for u in $assets; do
|
||||
if [[ "$u" =~ ($arch|amd64|x86_64|aarch64|arm64).*\.deb$ ]]; then
|
||||
url_match="$u"
|
||||
break
|
||||
if [[ "${arch,,}" =~ ^(amd64|x86_64)$ ]]; then
|
||||
[[ "$u" =~ (amd64|x86_64).*\.deb$ ]] || continue
|
||||
elif [[ "${arch,,}" =~ ^(arm64|aarch64)$ ]]; then
|
||||
[[ "$u" =~ (arm64|aarch64).*\.deb$ ]] || continue
|
||||
fi
|
||||
url_match="$u"
|
||||
break
|
||||
done
|
||||
fi
|
||||
if [[ -z "$url_match" ]]; then
|
||||
@@ -3733,7 +3746,12 @@ function setup_ffmpeg() {
|
||||
|
||||
# Binary fallback mode
|
||||
if [[ "$TYPE" == "binary" ]]; then
|
||||
if ! CURL_TIMEOUT=300 curl_with_retry "https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-amd64-static.tar.xz" "$TMP_DIR/ffmpeg.tar.xz"; then
|
||||
local ffmpeg_arch
|
||||
case "$(dpkg --print-architecture 2>/dev/null || echo amd64)" in
|
||||
arm64) ffmpeg_arch="arm64" ;;
|
||||
*) ffmpeg_arch="amd64" ;;
|
||||
esac
|
||||
if ! CURL_TIMEOUT=300 curl_with_retry "https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-${ffmpeg_arch}-static.tar.xz" "$TMP_DIR/ffmpeg.tar.xz"; then
|
||||
msg_error "Failed to download FFmpeg binary"
|
||||
rm -rf "$TMP_DIR"
|
||||
return 1
|
||||
@@ -3815,7 +3833,12 @@ function setup_ffmpeg() {
|
||||
# If no source download (either VERSION empty or download failed), use binary
|
||||
if [[ -z "$VERSION" ]]; then
|
||||
msg_info "Setup FFmpeg from pre-built binary"
|
||||
if ! CURL_TIMEOUT=300 curl_with_retry "https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-amd64-static.tar.xz" "$TMP_DIR/ffmpeg.tar.xz"; then
|
||||
local ffmpeg_arch
|
||||
case "$(dpkg --print-architecture 2>/dev/null || echo amd64)" in
|
||||
arm64) ffmpeg_arch="arm64" ;;
|
||||
*) ffmpeg_arch="amd64" ;;
|
||||
esac
|
||||
if ! CURL_TIMEOUT=300 curl_with_retry "https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-${ffmpeg_arch}-static.tar.xz" "$TMP_DIR/ffmpeg.tar.xz"; then
|
||||
msg_error "Failed to download FFmpeg pre-built binary"
|
||||
rm -rf "$TMP_DIR"
|
||||
return 1
|
||||
@@ -7881,7 +7904,12 @@ function setup_yq() {
|
||||
msg_info "Setup yq $LATEST_VERSION"
|
||||
fi
|
||||
|
||||
if ! curl_with_retry "https://github.com/${GITHUB_REPO}/releases/download/v${LATEST_VERSION}/yq_linux_amd64" "$TMP_DIR/yq"; then
|
||||
local yq_arch
|
||||
case "$(dpkg --print-architecture 2>/dev/null || echo amd64)" in
|
||||
arm64) yq_arch="arm64" ;;
|
||||
*) yq_arch="amd64" ;;
|
||||
esac
|
||||
if ! curl_with_retry "https://github.com/${GITHUB_REPO}/releases/download/v${LATEST_VERSION}/yq_linux_${yq_arch}" "$TMP_DIR/yq"; then
|
||||
msg_error "Failed to download yq"
|
||||
rm -rf "$TMP_DIR"
|
||||
return 1
|
||||
|
||||
Reference in New Issue
Block a user