From 7bb437b29f2787349af040e556b87b844c902af6 Mon Sep 17 00:00:00 2001 From: CyberMind-FR Date: Thu, 22 Jan 2026 05:32:05 +0100 Subject: [PATCH] fix(lyrion): Fix Lyrion download in chroot with better error handling - Remove -q (quiet) flag from wget to show download errors - Use architecture-specific tarball (60MB) instead of multi-arch (126MB) - Add fallback to multi-arch tarball if ARM download fails - Add explicit error messages for download and extraction failures - Verify download file exists and is non-empty before extraction The previous -q flag was hiding the actual wget error, making it difficult to diagnose download failures in the chroot environment. Co-Authored-By: Claude Opus 4.5 --- package/secubox/secubox-app-lyrion/Makefile | 2 +- .../files/usr/sbin/lyrionctl | 40 +++++++++++++++++-- 2 files changed, 37 insertions(+), 5 deletions(-) diff --git a/package/secubox/secubox-app-lyrion/Makefile b/package/secubox/secubox-app-lyrion/Makefile index b8d78369..3c42578b 100644 --- a/package/secubox/secubox-app-lyrion/Makefile +++ b/package/secubox/secubox-app-lyrion/Makefile @@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=secubox-app-lyrion PKG_RELEASE:=1 -PKG_VERSION:=2.0.1 +PKG_VERSION:=2.0.2 PKG_ARCH:=all PKG_MAINTAINER:=CyberMind Studio PKG_LICENSE:=Apache-2.0 diff --git a/package/secubox/secubox-app-lyrion/files/usr/sbin/lyrionctl b/package/secubox/secubox-app-lyrion/files/usr/sbin/lyrionctl index 4d376d4f..270df70c 100755 --- a/package/secubox/secubox-app-lyrion/files/usr/sbin/lyrionctl +++ b/package/secubox/secubox-app-lyrion/files/usr/sbin/lyrionctl @@ -311,13 +311,45 @@ apk add --no-cache \ curl \ wget -# Download and install Lyrion (full tarball with CPAN modules) +# Download and install Lyrion cd /tmp -wget -q "https://downloads.lms-community.org/LyrionMusicServer_v9.0.3/lyrionmusicserver-9.0.3.tgz" -O lyrion.tar.gz || \ -wget -q "https://downloads.lms-community.org/nightly/lyrionmusicserver-9.0.4-1768197566.tgz" -O lyrion.tar.gz + +# Detect architecture for appropriate tarball +LYRION_ARCH="" +case "$(uname -m)" in + aarch64|arm*) LYRION_ARCH="arm-linux" ;; +esac + +# Try ARM-specific tarball first (smaller ~60MB), then fall back to multi-arch (~126MB) +echo "Downloading Lyrion Music Server..." +LYRION_URL="" +if [ -n "$LYRION_ARCH" ]; then + LYRION_URL="https://downloads.lms-community.org/LyrionMusicServer_v9.0.3/lyrionmusicserver-9.0.3-${LYRION_ARCH}.tgz" +else + LYRION_URL="https://downloads.lms-community.org/LyrionMusicServer_v9.0.3/lyrionmusicserver-9.0.3.tgz" +fi + +echo "URL: $LYRION_URL" +wget -O lyrion.tar.gz "$LYRION_URL" || { + echo "Primary download failed, trying multi-arch tarball..." + LYRION_URL="https://downloads.lms-community.org/LyrionMusicServer_v9.0.3/lyrionmusicserver-9.0.3.tgz" + wget -O lyrion.tar.gz "$LYRION_URL" || { + echo "ERROR: All download attempts failed" + exit 1 + } +} + +# Verify download succeeded +if [ ! -f lyrion.tar.gz ] || [ ! -s lyrion.tar.gz ]; then + echo "ERROR: Failed to download Lyrion tarball" + exit 1 +fi mkdir -p /opt/lyrion -tar xzf lyrion.tar.gz -C /opt/lyrion --strip-components=1 +tar xzf lyrion.tar.gz -C /opt/lyrion --strip-components=1 || { + echo "ERROR: Failed to extract Lyrion tarball" + exit 1 +} rm -f lyrion.tar.gz # Remove conflicting bundled CPAN modules (use system modules instead)