Compare commits

..

11 Commits

Author SHA1 Message Date
MickLesk
82eac757d6 fix: whitespace cleanup and indentation fix in tools.func 2026-03-01 20:22:57 +01:00
MickLesk
31c7a86a4d Merge remote-tracking branch 'origin/main' into refactor/tools-func-stability
# Conflicts:
#	misc/tools.func
2026-03-01 20:18:36 +01:00
CanbiZ
950b32fef8 tools.func: Smarter parallel jobs calculation with load awareness
- get_parallel_jobs: Add memory-based limiting (1.5GB/job), load awareness,
  and container detection for conservative limits
- get_default_php_version: Add future versions (Debian 14, Ubuntu 26.04),
  update defaults to 8.3
- get_default_python_version: Add future versions, update defaults to 3.12
2026-01-05 17:36:51 +01:00
CanbiZ
01ba7356e0 foirmatting 2026-01-05 17:12:54 +01:00
CanbiZ
ef7015e232 Optimize tools.func: intelligent fallbacks, retry logic, caching, DNS pre-check
- curl_with_retry: DNS pre-check + exponential backoff
- download_gpg_key: Auto-detect key format, validation
- ensure_dependencies: Batch dpkg-query check, individual fallback
- install_packages_with_retry: Progressive recovery (dpkg fix, broken deps, individual packages)
- verify_repo_available: Caching with TTL to avoid repeated HTTP requests
- get_fallback_suite: Dynamic HTTP availability check cascade
- ensure_apt_working: APT lock handling, progressive recovery
- safe_service_restart: Wait-for-ready with configurable timeout, retry logic
- get_latest_github_release: Fallback to tags API, prerelease support, rate limit handling
2026-01-05 17:09:16 +01:00
CanbiZ
c118377665 Optimize tools.func: fix typos, duplicate debug_log, Node.js version, PG backup, Intel VPL 2026-01-05 17:05:24 +01:00
CanbiZ
8022525b49 Fix removed features in refactor branch
- Add libmfx-gen1.2 back for Intel Quick Sync Video encoding (Debian 12+13)
- Restore tmpfiles.d configuration for MariaDB /run/mysqld persistence
- Fix MariaDB fallback version from 11.4 to 12.2 (latest GA version)

These changes were incorrectly removed in the refactor commits.
2026-01-05 16:55:26 +01:00
MickLesk
c8dbce6e58 typo 2025-12-28 20:40:02 +01:00
MickLesk
0d821dd704 feat(tools.func): extend retry logic to all major downloads
Added curl_with_retry to all critical download operations:
- Adminer download
- Composer installer
- FFmpeg (binary and source)
- Go tarball
- Ghostscript source
- ImageMagick source
- rbenv and ruby-build
- uv (astral-sh)
- yq binary
- Go version check

Extended timeouts for large downloads:
- CURL_TIMEOUT=300 for FFmpeg, Go (large tarballs)
- CURL_TIMEOUT=180 for Ghostscript, ImageMagick

Remaining without retry (intentional):
- download_with_progress (specialized function)
- Rustup installer (piped to shell)
- Portainer version check (non-critical)

Total curl_with_retry/download_gpg_key usage: 27 locations
2025-12-26 19:03:41 +01:00
MickLesk
52061ea0db feat(tools.func): add retry logic and debug mode for stability
New helper functions:
- curl_with_retry: Robust curl wrapper with retry logic (3 attempts)
- curl_api_with_retry: API calls with HTTP status handling
- download_gpg_key: GPG key download with retry and dearmor support
- debug_log: Conditional debug output when TOOLS_DEBUG=true

Replaced critical curl calls:
- MongoDB GPG key download
- NodeSource GPG key download
- PostgreSQL GPG key download
- PHP (Sury) keyring download
- MySQL GPG key download
- setup_deb822_repo GPG import

Benefits:
- Automatic retry on transient network failures
- Configurable timeouts (CURL_TIMEOUT, CURL_CONNECT_TO)
- Debug mode for troubleshooting (TOOLS_DEBUG=true)
- Consistent error handling across all GPG key imports
2025-12-26 18:50:56 +01:00
MickLesk
5c82757c69 refactor(tools.func): use distro packages by default for stability
- fetch_and_deploy_gh_release: add validation for empty app names
  - Derives app name from repo if not provided
  - Prevents '/root/.: Is a directory' error (fixes #10342)

- setup_hwaccel: fix Intel driver app names for fetch_and_deploy_gh_release
  - Add proper app names: intel-igc-core, intel-igc-opencl, libigdgmm12, intel-opencl-icd

- setup_mariadb: use distro packages by default
  - Default: apt packages (default-mysql-server, mariadb-server)
  - Optional: USE_MARIADB_REPO=true for official MariaDB repo
  - Fixes GPG key/mirror availability issues

- setup_mysql: use distro packages by default
  - Default: apt packages (default-mysql-server, mysql-server)
  - Optional: USE_MYSQL_REPO=true for official MySQL repo
  - Keeps Debian Trixie 8.4 LTS handling when using official repo

- setup_postgresql: use distro packages by default
  - Default: apt packages (postgresql, postgresql-client)
  - Optional: USE_PGDG_REPO=true for official PGDG repo

- setup_docker: use distro packages by default
  - Default: docker.io package
  - Optional: USE_DOCKER_REPO=true for official Docker repo
  - Maintains Portainer support in both modes

This refactoring prioritizes stability by using well-tested distro
packages while maintaining the option to use official repos for
specific version requirements.
2025-12-26 18:42:48 +01:00
6 changed files with 821 additions and 231 deletions

View File

@@ -410,17 +410,8 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
</details>
## 2026-03-02
## 2026-03-01
### 🚀 Updated Scripts
- #### 🐞 Bug Fixes
- Sparkyfitness: use pnpm [@tomfrenzel](https://github.com/tomfrenzel) ([#12445](https://github.com/community-scripts/ProxmoxVE/pull/12445))
- OpenArchiver: Fix installation [@tremor021](https://github.com/tremor021) ([#12447](https://github.com/community-scripts/ProxmoxVE/pull/12447))
## 2026-02-28
### 🚀 Updated Scripts

View File

@@ -29,6 +29,8 @@ function update_script() {
exit
fi
NODE_VERSION="25" setup_nodejs
if check_for_gh_release "sparkyfitness" "CodeWithCJ/SparkyFitness"; then
msg_info "Stopping Services"
systemctl stop sparkyfitness-server nginx
@@ -46,9 +48,6 @@ function update_script() {
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "sparkyfitness" "CodeWithCJ/SparkyFitness" "tarball"
PNPM_VERSION="$(jq -r '.packageManager | split("@")[1]' /opt/sparkyfitness/package.json)"
NODE_VERSION="25" NODE_MODULE="pnpm@${PNPM_VERSION}" setup_nodejs
msg_info "Updating Sparky Fitness Backend"
cd /opt/sparkyfitness/SparkyFitnessServer
$STD npm install
@@ -56,8 +55,8 @@ function update_script() {
msg_info "Updating Sparky Fitness Frontend (Patience)"
cd /opt/sparkyfitness/SparkyFitnessFrontend
$STD pnpm install
$STD pnpm run build
$STD npm install
$STD npm run build
cp -a /opt/sparkyfitness/SparkyFitnessFrontend/dist/. /var/www/sparkyfitness/
msg_ok "Updated Sparky Fitness Frontend"

View File

@@ -1,5 +1,5 @@
{
"generated": "2026-03-02T00:20:30Z",
"generated": "2026-03-01T18:07:06Z",
"versions": [
{
"slug": "2fauth",
@@ -942,9 +942,9 @@
{
"slug": "nightscout",
"repo": "nightscout/cgm-remote-monitor",
"version": "v15.0.5",
"version": "15.0.4",
"pinned": false,
"date": "2026-03-01T21:22:37Z"
"date": "2026-02-28T17:07:02Z"
},
{
"slug": "nocodb",
@@ -956,9 +956,9 @@
{
"slug": "nodebb",
"repo": "NodeBB/NodeBB",
"version": "v4.9.1",
"version": "v4.9.0",
"pinned": false,
"date": "2026-03-01T20:52:43Z"
"date": "2026-02-27T19:20:51Z"
},
{
"slug": "nodecast-tv",
@@ -1215,9 +1215,9 @@
{
"slug": "pulse",
"repo": "rcourtman/Pulse",
"version": "v5.1.16",
"version": "v5.1.15",
"pinned": false,
"date": "2026-03-01T23:13:09Z"
"date": "2026-02-27T15:17:24Z"
},
{
"slug": "pve-scripts-local",
@@ -1278,9 +1278,9 @@
{
"slug": "rdtclient",
"repo": "rogerfar/rdt-client",
"version": "v2.0.125",
"version": "v2.0.124",
"pinned": false,
"date": "2026-03-01T18:29:10Z"
"date": "2026-02-24T03:18:03Z"
},
{
"slug": "reactive-resume",
@@ -1579,9 +1579,9 @@
{
"slug": "trilium",
"repo": "TriliumNext/Trilium",
"version": "v0.102.0",
"version": "v0.101.3",
"pinned": false,
"date": "2026-03-01T20:37:40Z"
"date": "2026-01-08T18:05:22Z"
},
{
"slug": "trip",

View File

@@ -38,7 +38,6 @@ sed -i "s|^DATABASE_URL=.*|DATABASE_URL=\"postgresql://$PG_DB_USER:$PG_DB_PASS@l
sed -i "s|^MEILI_HOST=.*|MEILI_HOST=http://localhost:7700|g" /opt/openarchiver/.env
sed -i "s|^MEILI_MASTER_KEY=.*|MEILI_MASTER_KEY=$MEILISEARCH_MASTER_KEY|g" /opt/openarchiver/.env
sed -i "s|^REDIS_HOST=.*|REDIS_HOST=localhost|g" /opt/openarchiver/.env
sed -i "s|^REDIS_USER=.*|REDIS_USER=|g" /opt/openarchiver/.env
sed -i "s|^REDIS_PASSWORD=.*|REDIS_PASSWORD=|g" /opt/openarchiver/.env
sed -i "s|^STORAGE_LOCAL_ROOT_PATH=.*|STORAGE_LOCAL_ROOT_PATH=/opt/openarchiver-data|g" /opt/openarchiver/.env
sed -i "s|^JWT_SECRET=.*|JWT_SECRET=$JWT_KEY|g" /opt/openarchiver/.env

View File

@@ -17,14 +17,12 @@ msg_info "Installing Dependencies"
$STD apt install -y nginx
msg_ok "Installed Dependencies"
NODE_VERSION="25" setup_nodejs
PG_VERSION="18" setup_postgresql
PG_DB_NAME="sparkyfitness" PG_DB_USER="sparky" PG_DB_GRANT_SUPERUSER="true" setup_postgresql_db
fetch_and_deploy_gh_release sparkyfitness "CodeWithCJ/SparkyFitness" "tarball" "latest"
PNPM_VERSION="$(jq -r '.packageManager | split("@")[1]' /opt/sparkyfitness/package.json)"
NODE_VERSION="25" NODE_MODULE="pnpm@${PNPM_VERSION}" setup_nodejs
msg_info "Configuring Sparky Fitness"
mkdir -p "/etc/sparkyfitness" "/var/lib/sparkyfitness/uploads" "/var/lib/sparkyfitness/backup" "/var/www/sparkyfitness"
cp "/opt/sparkyfitness/docker/.env.example" "/etc/sparkyfitness/.env"
@@ -52,8 +50,8 @@ msg_ok "Built Backend"
msg_info "Building Frontend (Patience)"
cd /opt/sparkyfitness/SparkyFitnessFrontend
$STD pnpm install
$STD pnpm run build
$STD npm install
$STD npm run build
cp -a /opt/sparkyfitness/SparkyFitnessFrontend/dist/. /var/www/sparkyfitness/
msg_ok "Built Frontend"

File diff suppressed because it is too large Load Diff