From 128db5320acd383853f2be03dde654a68359b320 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 21 Oct 2025 17:09:20 +0200 Subject: [PATCH 1/2] Update tools.func --- misc/tools.func | 84 +++++++++++++++++++++++++++---------------------- 1 file changed, 47 insertions(+), 37 deletions(-) diff --git a/misc/tools.func b/misc/tools.func index 3d5ce870..1fbcc698 100644 --- a/misc/tools.func +++ b/misc/tools.func @@ -2399,52 +2399,20 @@ function setup_mysql() { fi if [[ "$NEED_INSTALL" == true ]]; then - # For Debian Trixie+, use native packages due to libaio1t64 transition - if [[ "$DISTRO_ID" == "debian" ]] && [[ "$DISTRO_CODENAME" =~ ^(trixie|forky|sid)$ ]]; then - msg_info "Using Debian native MySQL packages for ${DISTRO_CODENAME} (libaio1t64 compatibility)" - - # Stop existing MySQL if running - $STD systemctl stop mysql 2>/dev/null || true - - # Only purge if MySQL is actually installed - if dpkg -l 2>/dev/null | grep -q "^ii.*mysql-server"; then - $STD apt purge -y mysql-server* mysql-client* mysql-common 2>/dev/null || true - fi - - # Update and install from Debian repos - $STD apt update - - if ! $STD apt install -y mysql-server mysql-client; then - msg_error "Failed to install MySQL from Debian repository" - return 1 - fi - - # Verify installation - if ! command -v mysql >/dev/null 2>&1; then - msg_warn "MySQL installed but mysql command not immediately available - retrying after shell refresh" - hash -r - if ! command -v mysql >/dev/null 2>&1; then - msg_error "MySQL installed but mysql command still not found" - return 1 - fi - fi - - cache_installed_version "mysql" "$MYSQL_VERSION" - msg_ok "Installed MySQL $MYSQL_VERSION from Debian repository" - return 0 - fi - - # For stable Debian and Ubuntu - use upstream MySQL repo # Cleanup old repository files cleanup_old_repo_files "mysql" - # Determine suite + # Determine suite - use bookworm for Debian testing/unstable local SUITE if [[ "$DISTRO_ID" == "debian" ]]; then case "$DISTRO_CODENAME" in bookworm | bullseye) SUITE="$DISTRO_CODENAME" ;; + trixie | forky | sid) + msg_warn "Using MySQL Bookworm packages on Debian ${DISTRO_CODENAME}" + SUITE="bookworm" + ;; *) SUITE="bookworm" # Fallback to bookworm for unknown Debian versions ;; @@ -2462,6 +2430,48 @@ function setup_mysql() { $STD apt purge -y mysql-server* mysql-client* mysql-common 2>/dev/null || true fi + # Handle libaio dependency for Debian Trixie+ (time64 transition) + if [[ "$DISTRO_ID" == "debian" ]] && [[ "$DISTRO_CODENAME" =~ ^(trixie|forky|sid)$ ]]; then + msg_info "Installing libaio compatibility for Debian ${DISTRO_CODENAME}" + + # Install libaio1t64 if not present + if ! dpkg -l libaio1t64 2>/dev/null | grep -q "^ii"; then + $STD apt update + $STD apt install -y libaio1t64 + fi + + # Create dummy libaio1 package for dependency satisfaction + local TEMP_DIR="/tmp/libaio1-compat-$$" + mkdir -p "$TEMP_DIR" + cd "$TEMP_DIR" + + # Create control file + mkdir -p DEBIAN + cat > DEBIAN/control < libaio1t64 transition + This is a transitional dummy package to satisfy dependencies on libaio1 + while actually using libaio1t64 (time64 transition). +EOF + + # Build the dummy package + cd /tmp + dpkg-deb -b "$TEMP_DIR" libaio1-compat.deb >/dev/null 2>&1 + + # Install it + $STD dpkg -i libaio1-compat.deb + + # Cleanup + rm -rf "$TEMP_DIR" libaio1-compat.deb + + msg_ok "libaio1 compatibility package installed" + fi + # Use standardized repo setup setup_deb822_repo \ "mysql" \ From 6c2ea268de0c408ffd477927e581f41ff743b0eb Mon Sep 17 00:00:00 2001 From: Tobias <96661824+CrazyWolf13@users.noreply.github.com> Date: Wed, 22 Oct 2025 08:38:01 +0200 Subject: [PATCH 2/2] test: dynamic update --- ct/gitea-mirror.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ct/gitea-mirror.sh b/ct/gitea-mirror.sh index bfe93ff8..4c5fca19 100644 --- a/ct/gitea-mirror.sh +++ b/ct/gitea-mirror.sh @@ -13,6 +13,7 @@ var_disk="${var_disk:-6}" var_os="${var_os:-debian}" var_version="${var_version:-12}" var_unprivileged="${var_unprivileged:-1}" +var_app_version="${var_app_version:-latest}" header_info "$APP" @@ -97,7 +98,7 @@ fi msg_ok "Installed Bun" rm -rf /opt/gitea-mirror - fetch_and_deploy_gh_release "gitea-mirror" "RayLabsHQ/gitea-mirror" "tarball" "v3.8.1" + fetch_and_deploy_gh_release "gitea-mirror" "RayLabsHQ/gitea-mirror" "tarball" $var_app_version msg_info "Updating and rebuilding ${APP}" cd /opt/gitea-mirror