diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 92eedcf..b6c407f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,8 +15,8 @@ jobs: strategy: fail-fast: false matrix: - # 3.12: Ubuntu 24.04 nodes; 3.13: Debian 13 (no crypt/spwd modules). - python: ["3.11", "3.12", "3.13"] + # 3.12: Ubuntu 24.04, 3.13: Debian 13, 3.14: Ubuntu 26.04 (no crypt/spwd modules). + python: ["3.11", "3.12", "3.13", "3.14"] steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 diff --git a/image/build-iso.sh b/image/build-iso.sh index c468727..62266ce 100755 --- a/image/build-iso.sh +++ b/image/build-iso.sh @@ -3,7 +3,7 @@ set -euo pipefail # ========================================================== # Virtuality ISO builder -# Remasters the official Ubuntu Server 24.04 live ISO into a +# Remasters the official Ubuntu Server LTS live ISO (26.04 by default) into a # Virtuality installer: Ubuntu autoinstall + bundled Virtuality # source and Python wheels + first boot setup service. # @@ -16,7 +16,7 @@ REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" IMAGE_DIR="${REPO_ROOT}/image" ARCH="amd64" -UBUNTU_SERIES="24.04" +UBUNTU_SERIES="26.04" UBUNTU_ISO="" CACHE_DIR="${VIRTUALITY_ISO_CACHE:-${REPO_ROOT}/.cache/iso}" OUTPUT_DIR="${REPO_ROOT}/dist" @@ -32,7 +32,7 @@ LOCALE="en_US.UTF-8" KEYBOARD="us" TIMEZONE="Etc/UTC" WITH_WHEELS="1" -TARGET_PYTHON="3.12" +TARGET_PYTHON="" usage() { cat < $*"; } while [[ $# -gt 0 ]]; do case "$1" in --arch) ARCH="$2"; shift 2 ;; + --ubuntu) UBUNTU_SERIES="$2"; shift 2 ;; --ubuntu-iso) UBUNTU_ISO="$2"; shift 2 ;; --cache-dir) CACHE_DIR="$2"; shift 2 ;; --output) OUTPUT_DIR="$2"; shift 2 ;; @@ -89,6 +91,13 @@ while [[ $# -gt 0 ]]; do esac done +# Python of the target release decides which wheels are bundled. +case "$UBUNTU_SERIES" in + 26.04) TARGET_PYTHON="3.14" ;; + 24.04) TARGET_PYTHON="3.12" ;; + *) die "unsupported --ubuntu ${UBUNTU_SERIES} (26.04 or 24.04)" ;; +esac + case "$ARCH" in amd64) PY_PLATFORM_ARCH="x86_64"; MIRROR="https://releases.ubuntu.com/${UBUNTU_SERIES}" ;; arm64) PY_PLATFORM_ARCH="aarch64"; MIRROR="https://cdimage.ubuntu.com/releases/${UBUNTU_SERIES}/release" ;; diff --git a/install_virtuality_node.sh b/install_virtuality_node.sh index 2eb5c59..0da8ff7 100644 --- a/install_virtuality_node.sh +++ b/install_virtuality_node.sh @@ -92,6 +92,22 @@ run_logged() { fi } +# Installs the packages this distribution has; package names differ between +# Ubuntu 24.04/26.04 and Debian 13 (e.g. qemu-kvm became a virtual package). +install_available() { + local description="$1" + shift + local pkg available=() + for pkg in "$@"; do + if apt-cache show "$pkg" >/dev/null 2>&1; then + available+=("$pkg") + else + warn "Пакет ${pkg} недоступен в этом дистрибутиве, пропускаю" + fi + done + run_logged "$description" apt install -y "${available[@]}" +} + service_state() { systemctl is-active "$1" 2>/dev/null || echo "inactive"; } service_enabled() { systemctl is-enabled "$1" 2>/dev/null || echo "disabled"; } free_mb_for_path() { local path="$1"; mkdir -p "$path" 2>/dev/null || true; df -Pm "$path" | awk 'NR==2 {print $4}'; } @@ -153,17 +169,21 @@ step "Обновляем apt cache" run_logged "apt update выполнен" apt update step "Устанавливаем базовые утилиты и зависимости диагностики" -run_logged "Базовые пакеты и диагностические утилиты установлены" apt install -y \ +install_available "Базовые пакеты и диагностические утилиты установлены" \ curl wget git nano htop btop tree ncdu jq unzip xz-utils tar gzip ca-certificates gnupg lsb-release \ - software-properties-common apt-transport-https ufw rsync iproute2 iptables nftables dnsutils net-tools openssh-client + software-properties-common apt-transport-https ufw rsync iproute2 iptables nftables bind9-dnsutils net-tools openssh-client step "Устанавливаем KVM/QEMU/libvirt" -run_logged "Пакеты виртуализации установлены" apt install -y \ - qemu-kvm qemu-utils libvirt-daemon-system libvirt-clients virtinst \ - bridge-utils dnsmasq-base ovmf swtpm cloud-image-utils +case "$(uname -m)" in + aarch64|arm64) QEMU_SYSTEM_PACKAGES=(qemu-system-arm qemu-efi-aarch64) ;; + *) QEMU_SYSTEM_PACKAGES=(qemu-system-x86 ovmf) ;; +esac +install_available "Пакеты виртуализации установлены" \ + "${QEMU_SYSTEM_PACKAGES[@]}" qemu-utils libvirt-daemon-system libvirt-clients virtinst \ + bridge-utils dnsmasq-base swtpm cloud-image-utils step "Устанавливаем Cockpit и модули" -run_logged "Cockpit установлен" apt install -y \ +install_available "Cockpit установлен" \ cockpit cockpit-machines cockpit-networkmanager cockpit-storaged cockpit-packagekit step "Создаём структуру Virtuality"