mirror of
https://github.com/retspen/webvirtcloud
synced 2026-12-02 08:56:07 +00:00
fix(installer): openSUSE Leap 16
Leap 16 builds the libvirt and lxml bindings for Python 3.13 (python313-*); the installer asked for python3-libvirt, which it does not have, and stopped. On openSUSE it now installs the Python stack the distribution builds the libvirt binding for: 3.11 on Leap 15 and SLES 15, 3.13 on Leap 16 and Tumbleweed. The installer workflow tests Leap 16.0 too, and the README says which installs CI tests.
This commit is contained in:
parent
84d633af08
commit
2947995e8c
3 changed files with 23 additions and 11 deletions
1
.github/workflows/installer.yml
vendored
1
.github/workflows/installer.yml
vendored
|
|
@ -37,6 +37,7 @@ jobs:
|
|||
- debian:13
|
||||
- almalinux:10
|
||||
- opensuse/leap:15.6
|
||||
- opensuse/leap:16.0
|
||||
- openeuler/openeuler:24.03-lts
|
||||
steps:
|
||||
- name: Checkout Code
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ WebVirtCloud and `virt-manager`/`virsh` can manage the same libvirt host **concu
|
|||
|
||||
## Installation
|
||||
|
||||
The installer supports Ubuntu 22.04 / 24.04 / 26.04, Debian 12 / 13, RHEL / Rocky Linux / AlmaLinux / Oracle Linux 10, openEuler 24.03 LTS, openSUSE Leap 15.x / Tumbleweed and SLES 15; the panel runs on a virtual machine, a physical host or a KVM host itself and needs Python 3.10 or newer. CI tests Python 3.10–3.14 on Ubuntu (sqlite, and PostgreSQL on 3.12) and the Docker image; the distro installs are not tested in CI. Pick one of the three ways below, then do the [first login](#first-login).
|
||||
The installer supports Ubuntu 22.04 / 24.04 / 26.04, Debian 12 / 13, RHEL / Rocky Linux / AlmaLinux / Oracle Linux 10, openEuler 24.03 LTS, openSUSE Leap 15.x / 16.0 / Tumbleweed and SLES 15; the panel runs on a virtual machine, a physical host or a KVM host itself and needs Python 3.10 or newer. CI tests Python 3.10–3.14 on Ubuntu (sqlite, and PostgreSQL on 3.12), the Docker image, and the installer on Ubuntu 22.04 / 24.04 / 26.04, Debian 12 / 13, AlmaLinux 10, openEuler 24.03 and openSUSE Leap 15.6 / 16.0 (`dev/test-installer.sh`). Pick one of the three ways below, then do the [first login](#first-login).
|
||||
|
||||
### Installer
|
||||
|
||||
|
|
@ -192,10 +192,12 @@ systemctl daemon-reload && systemctl enable --now webvirt-cloud webvirt-novncd w
|
|||
systemctl enable nginx && nginx -t && systemctl restart nginx
|
||||
```
|
||||
|
||||
#### openSUSE Leap 15.x / Tumbleweed, SLES 15
|
||||
#### openSUSE Leap 15.x / 16.0 / Tumbleweed, SLES 15
|
||||
|
||||
On SLES 15, enable the Python 3 module and SUSE Package Hub first (`SUSEConnect -p sle-module-python3/15.7/x86_64` and `SUSEConnect -p PackageHub/15.7/x86_64`, with your service pack); the installer needs them too.
|
||||
|
||||
```bash
|
||||
# 1. System packages (Python 3.11 stack)
|
||||
# 1. System packages (Python 3.11 stack; on Leap 16 and Tumbleweed python313-* packages and python3.13 below)
|
||||
zypper --non-interactive install -y git hostname python311 python311-base python311-devel python311-pip python311-libvirt-python python311-lxml libvirt-devel libopenssl-devel gcc pkg-config nginx
|
||||
|
||||
# 2. Code
|
||||
|
|
|
|||
|
|
@ -76,6 +76,8 @@ readonly APP_NAME="webvirtcloud"
|
|||
readonly APP_PATH="/srv/$APP_NAME"
|
||||
|
||||
PYTHON="python3"
|
||||
# the interpreter a distribution's branch installed its bindings for, if it chose one
|
||||
WANT_PYTHON=""
|
||||
|
||||
progress () {
|
||||
spin[0]="-"
|
||||
|
|
@ -208,7 +210,7 @@ add_service_groups () {
|
|||
|
||||
check_python () {
|
||||
# dynamically find python >= 3.10 if default python3 is older
|
||||
for py_bin in python3.11 python3.12 python3.13 python3.10 python3; do
|
||||
for py_bin in $WANT_PYTHON python3.11 python3.12 python3.13 python3.10 python3; do
|
||||
if command -v "$py_bin" >/dev/null 2>&1; then
|
||||
if "$py_bin" -c 'import sys; sys.exit(0 if sys.version_info >= (3, 10) else 1)' >/dev/null 2>&1; then
|
||||
PYTHON="$py_bin"
|
||||
|
|
@ -629,7 +631,7 @@ case $distro in
|
|||
fi
|
||||
;;
|
||||
suse)
|
||||
# Install for openSUSE Leap 15.x / Tumbleweed / SLES 15
|
||||
# Install for openSUSE Leap 15.x / 16.0 / Tumbleweed / SLES 15
|
||||
tzone=\'$(get_timezone)\'
|
||||
|
||||
echo -n "* Updating installed packages."
|
||||
|
|
@ -638,12 +640,19 @@ case $distro in
|
|||
wait "$pid" || { echo "Updating the package lists failed." >&2; exit 1; }
|
||||
|
||||
echo "* Installing OS requirements."
|
||||
# On SUSE, install Python 3.11 stack to satisfy Python >= 3.10 requirement along with the native libvirt bindings
|
||||
if zypper se -s python311-devel >/dev/null 2>&1; then
|
||||
PACKAGES="git hostname python311 python311-base python311-devel python311-pip python311-libvirt-python python311-lxml libvirt-devel libopenssl-devel gcc pkg-config nginx"
|
||||
else
|
||||
PACKAGES="git hostname python3-devel python3-pip python3-virtualenv libvirt-devel python3-libvirt python3-lxml libopenssl-devel gcc pkg-config nginx"
|
||||
fi
|
||||
# the Python the distribution builds the libvirt binding for: 3.11 on Leap 15 and SLES 15,
|
||||
# 3.13 on Leap 16 and Tumbleweed; the venv is made with it
|
||||
py=""
|
||||
for version in 311 312 313; do
|
||||
found=$(zypper -q search -x "python$version-libvirt-python" 2>&1)
|
||||
case $? in
|
||||
0) py=python$version; WANT_PYTHON=python3.${version#3}; break ;;
|
||||
104) ;; # no such package
|
||||
*) echo "Searching the packages failed: $found" >&2; exit 1 ;;
|
||||
esac
|
||||
done
|
||||
[ -n "$py" ] || { echo "No libvirt binding for Python 3.11 or newer (python3XX-libvirt-python) was found." >&2; exit 1; }
|
||||
PACKAGES="git hostname $py $py-devel $py-pip $py-libvirt-python $py-lxml libvirt-devel libopenssl-devel gcc pkg-config nginx"
|
||||
install_packages
|
||||
|
||||
set_hosts
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue