fixes
Some checks failed
Bump build.func Revision / bump-revision (push) Has been cancelled

This commit is contained in:
CanbiZ 2025-10-20 08:15:43 +02:00
parent faf3bc57bd
commit 21525006d0
2 changed files with 2170 additions and 2128 deletions

View File

@ -169,16 +169,16 @@ apt-get install -y curl wget gpg jq git build-essential ca-certificates &>/dev/n
# ==============================================================================
# TEST 1: YQ - YAML Processor
# ==============================================================================
test_function "YQ" \
"setup_yq" \
"yq --version"
# test_function "YQ" \
# "setup_yq" \
# "yq --version"
# ==============================================================================
# TEST 2: ADMINER - Database Management
# ==============================================================================
test_function "Adminer" \
"setup_adminer" \
"test -f /usr/share/adminer/latest.php && echo 'Adminer installed'"
"dpkg -l adminer 2>/dev/null | grep -q '^ii' && a2query -c adminer 2>/dev/null && echo 'Adminer installed'"
# ==============================================================================
# TEST 3: CLICKHOUSE
@ -190,9 +190,9 @@ test_function "ClickHouse" \
# ==============================================================================
# TEST 4: POSTGRESQL
# ==============================================================================
test_function "PostgreSQL 17" \
"PG_VERSION=17 setup_postgresql" \
"psql --version"
# test_function "PostgreSQL 17" \
# "PG_VERSION=17 setup_postgresql" \
# "psql --version"
# ==============================================================================
# TEST 6: MARIADB
@ -229,44 +229,44 @@ fi
# ==============================================================================
# TEST 9: NODE.JS
# ==============================================================================
test_function "Node.js 22 with modules" \
"NODE_VERSION=22 NODE_MODULE='yarn,pnpm@10.1.0,pm2' setup_nodejs" \
"node --version && npm --version && yarn --version && pnpm --version && pm2 --version"
# test_function "Node.js 22 with modules" \
# "NODE_VERSION=22 NODE_MODULE='yarn,pnpm@10.1.0,pm2' setup_nodejs" \
# "node --version && npm --version && yarn --version && pnpm --version && pm2 --version"
# ==============================================================================
# TEST 10: PYTHON (UV)
# ==============================================================================
test_function "Python 3.12 via uv" \
"PYTHON_VERSION=3.12 setup_uv" \
"uv --version"
# test_function "Python 3.12 via uv" \
# "PYTHON_VERSION=3.12 setup_uv" \
# "uv --version"
# ==============================================================================
# TEST 11: PHP
# ==============================================================================
test_function "PHP 8.3 with FPM" \
"PHP_VERSION=8.3 PHP_FPM=YES PHP_MODULE='redis,imagick,apcu,zip,mbstring' setup_php" \
"php --version"
# test_function "PHP 8.3 with FPM" \
# "PHP_VERSION=8.3 PHP_FPM=YES PHP_MODULE='redis,imagick,apcu,zip,mbstring' setup_php" \
# "php --version"
# ==============================================================================
# TEST 12: COMPOSER
# ==============================================================================
test_function "Composer" \
"setup_composer" \
"composer --version"
# # ==============================================================================
# test_function "Composer" \
# "setup_composer" \
# "composer --version"
# ==============================================================================
# TEST 13: JAVA
# ==============================================================================
test_function "Java Temurin 21" \
"JAVA_VERSION=21 setup_java" \
"java --version"
# test_function "Java Temurin 21" \
# "JAVA_VERSION=21 setup_java" \
# "java --version"
# ==============================================================================
# TEST 14: GO
# ==============================================================================
test_function "Go (latest)" \
"GO_VERSION=latest setup_go" \
"go version"
# test_function "Go (latest)" \
# "GO_VERSION=latest setup_go" \
# "go version"
# ==============================================================================
# TEST 15: RUBY
@ -285,23 +285,23 @@ test_function "Rust (stable)" \
# ==============================================================================
# TEST 17: GHOSTSCRIPT
# ==============================================================================
test_function "Ghostscript" \
"setup_gs" \
"gs --version"
# test_function "Ghostscript" \
# "setup_gs" \
# "gs --version"
# ==============================================================================
# TEST 18: IMAGEMAGICK
# ==============================================================================
test_function "ImageMagick" \
"setup_imagemagick" \
"magick --version"
# test_function "ImageMagick" \
# "setup_imagemagick" \
# "magick --version"
# ==============================================================================
# TEST 19: FFMPEG
# ==============================================================================
test_function "FFmpeg n7.1.1 (full)" \
"FFMPEG_VERSION=n7.1.1 FFMPEG_TYPE=full setup_ffmpeg" \
"ffmpeg -version"
# test_function "FFmpeg n7.1.1 (full)" \
# "FFMPEG_VERSION=n7.1.1 FFMPEG_TYPE=full setup_ffmpeg" \
# "ffmpeg -version"
# ==============================================================================
# FINAL SUMMARY

View File

@ -525,6 +525,9 @@ cleanup_old_repo_files() {
# Remove old GPG keys from trusted.gpg.d
rm -f /etc/apt/trusted.gpg.d/"${app}"*.gpg
# Remove keyrings from /etc/apt/keyrings (FIX: This was missing!)
rm -f /etc/apt/keyrings/"${app}"*.gpg
# Remove duplicate .sources files (keep only the main one)
local sources_file="/etc/apt/sources.list.d/${app}.sources"
if [[ -f "$sources_file" ]]; then
@ -2225,7 +2228,29 @@ function setup_mysql() {
"amd64 arm64"
export DEBIAN_FRONTEND=noninteractive
$STD apt install -y mysql-server
# Update apt and check if package is available
if ! $STD apt update; then
msg_error "APT update failed for MySQL repository"
return 1
fi
if ! apt-cache policy mysql-server | grep -q 'Candidate:'; then
msg_error "MySQL ${MYSQL_VERSION} package not available for ${DISTRO_ID}-${DISTRO_CODENAME}"
return 1
fi
if ! $STD apt install -y mysql-server; then
msg_error "Failed to install MySQL ${MYSQL_VERSION}"
return 1
fi
# Verify installation
if ! command -v mysql >/dev/null 2>&1; then
msg_error "MySQL installation completed but mysql command not found"
return 1
fi
cache_installed_version "mysql" "$MYSQL_VERSION"
msg_ok "Installed MySQL $MYSQL_VERSION"
fi
@ -2703,10 +2728,27 @@ function setup_clickhouse() {
# Determine latest version if needed
if [[ "$CLICKHOUSE_VERSION" == "latest" ]]; then
CLICKHOUSE_VERSION=$(curl -fsSL https://packages.clickhouse.com/tgz/stable/ |
# Try multiple methods to get the latest version
CLICKHOUSE_VERSION=$(curl -fsSL https://packages.clickhouse.com/tgz/stable/ 2>/dev/null |
grep -oP 'clickhouse-common-static-\K[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+' |
sort -V |
tail -n1)
# Fallback: Try GitHub releases API
if [[ -z "$CLICKHOUSE_VERSION" ]]; then
CLICKHOUSE_VERSION=$(curl -fsSL https://api.github.com/repos/ClickHouse/ClickHouse/releases/latest 2>/dev/null |
grep -oP '"tag_name":\s*"v\K[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+' |
head -n1)
fi
# Final fallback: Parse HTML more liberally
if [[ -z "$CLICKHOUSE_VERSION" ]]; then
CLICKHOUSE_VERSION=$(curl -fsSL https://packages.clickhouse.com/tgz/stable/ 2>/dev/null |
grep -oP '[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+(?=/clickhouse)' |
sort -V |
tail -n1)
fi
if [[ -z "$CLICKHOUSE_VERSION" ]]; then
msg_error "Could not determine latest ClickHouse version"
return 1