misc scripts: add support for arm64 (#12639)

* misc scripts: add support for arm64

* Replace tools.func call that checks arch

* Update misc/build.func

Co-authored-by: Tobias <96661824+CrazyWolf13@users.noreply.github.com>

* Update misc/build.func

Co-authored-by: Tobias <96661824+CrazyWolf13@users.noreply.github.com>

* Update misc/build.func

Co-authored-by: Tobias <96661824+CrazyWolf13@users.noreply.github.com>

* Update misc/build.func

Co-authored-by: Tobias <96661824+CrazyWolf13@users.noreply.github.com>

* build.func: change back to VE

* build.func: remove arm64 support for focal, bullseye

Legacy support removed since no cts use them anymore.

* Improve arm64 support and arch-specific downloads

Add clearer architecture error messages and gate arm64 usage, plus implement architecture-aware behavior across the toolkit. Changes include: update exit-code messages to reference amd64/arm64, refuse arm64 unless explicitly enabled, show architecture in summaries, and use arch-specific package lists when installing in containers. Make downloads for FFmpeg and yq choose the correct amd64/arm64 binaries, tighten template download error handling and formatting, and clean up minor whitespace/comment issues. These changes aim to make arm64 handling explicit and downloads/installations more robust for non-amd64 systems.

* remove arm64 overlay

* update ifupdown2 source

* Revert "remove arm64 overlay"

This reverts commit 231945dfa7.

* Revert changes from "Improve arm64 support and arch-specific downloads"

* Reapply "Improve arm64 support and arch-specific downloads"

This reapplies commit 7c051fb648.

* Reapply "remove arm64 overlay"

This reverts commit 866b6950c0.

* Redo template name handling

* fix template name handling change

* add ensure_whiptail function

This is required as some arm64 systems will not have whiptail installed, as it is not installed by default.

* add arm64_notice function

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* fix for copilot detected bugs

---------

Co-authored-by: Tobias <96661824+CrazyWolf13@users.noreply.github.com>
Co-authored-by: CanbiZ (MickLesk) <47820557+MickLesk@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Sam Heinz
2026-06-11 16:14:32 +10:00
committed by GitHub
parent cd65eaedc0
commit 6851a02bdc
5 changed files with 442 additions and 240 deletions
+41 -3
View File
@@ -346,9 +346,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
@@ -1714,6 +1720,38 @@ function get_lxc_ip() {
export LOCAL_IP
}
# ------------------------------------------------------------------------------
# ensure_whiptail()
#
# - Ensures whiptail is installed
# - Some ARM64 systems will not have whiptail installed
# - Exits with error message if installation fails
# ------------------------------------------------------------------------------
ensure_whiptail() {
command -v whiptail >/dev/null 2>&1 && return 0
msg_info "Installing whiptail"
apt_update_safe
$STD apt-get install -y whiptail || {
msg_error "Failed to install whiptail"
exit 100
}
msg_ok "Installed whiptail"
}
# ------------------------------------------------------------------------------
# arm64_notice()
#
# - Shows a short warning when running scripts on ARM64 systems
# ------------------------------------------------------------------------------
arm64_notice() {
[[ "$(dpkg --print-architecture)" == "arm64" ]] || return 0
whiptail --backtitle "Proxmox VE Helper Scripts" \
--title "ARM64 SUPPORT" \
--ok-button "Continue" \
--msgbox "ARM64 support is in active development.\n\nSome scripts, packages, or application releases may not be fully tested or working yet." 10 68
}
# ==============================================================================
# SIGNAL TRAPS
# ==============================================================================