From 96b5411d1da1354a67721f621575bff18f9128a1 Mon Sep 17 00:00:00 2001 From: "CanbiZ (MickLesk)" <47820557+MickLesk@users.noreply.github.com> Date: Mon, 2 Mar 2026 10:35:30 +0100 Subject: [PATCH] Use PG_VERSION var; default to vendor repos Pass PG_VERSION from the Mealie installer (replace POSTGRES_VERSION with PG_VERSION) and update misc/tools.func to prefer vendor package repos by default. Adjusted comments/examples for setup_mysql and setup_postgresql to reflect the new default behavior, and changed the local default for USE_MYSQL_REPO to true. These changes align variable naming in the installer and clarify that official MySQL/PGDG repositories are used unless explicitly disabled. --- install/mealie-install.sh | 2 +- misc/tools.func | 22 +++++++++++----------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/install/mealie-install.sh b/install/mealie-install.sh index ad963b8d6..cae7fac85 100644 --- a/install/mealie-install.sh +++ b/install/mealie-install.sh @@ -28,7 +28,7 @@ $STD apt install -y \ msg_ok "Installed Dependencies" PYTHON_VERSION="3.12" setup_uv -POSTGRES_VERSION="16" setup_postgresql +PG_VERSION="16" setup_postgresql NODE_MODULE="yarn" NODE_VERSION="24" setup_nodejs fetch_and_deploy_gh_release "mealie" "mealie-recipes/mealie" "tarball" "latest" "/opt/mealie" PG_DB_NAME="mealie_db" PG_DB_USER="mealie_user" PG_DB_GRANT_SUPERUSER="true" setup_postgresql_db diff --git a/misc/tools.func b/misc/tools.func index e198cedc6..0ebde4bd5 100644 --- a/misc/tools.func +++ b/misc/tools.func @@ -5650,20 +5650,20 @@ function setup_mongodb() { # - Handles Debian Trixie libaio1t64 transition # # Variables: -# USE_MYSQL_REPO - Set to "true" to use official MySQL repository -# (default: false, uses distro packages) +# USE_MYSQL_REPO - Use official MySQL repository (default: true) +# Set to "false" to use distro packages instead # MYSQL_VERSION - MySQL version to install when using official repo # (e.g. 8.0, 8.4) (default: 8.0) # # Examples: -# setup_mysql # Uses distro package (recommended) -# USE_MYSQL_REPO=true setup_mysql # Uses official MySQL repo -# USE_MYSQL_REPO=true MYSQL_VERSION="8.4" setup_mysql # Specific version +# setup_mysql # Uses official MySQL repo, 8.0 +# MYSQL_VERSION="8.4" setup_mysql # Specific version from MySQL repo +# USE_MYSQL_REPO=false setup_mysql # Uses distro package instead # ------------------------------------------------------------------------------ function setup_mysql() { local MYSQL_VERSION="${MYSQL_VERSION:-8.0}" - local USE_MYSQL_REPO="${USE_MYSQL_REPO:-false}" + local USE_MYSQL_REPO="${USE_MYSQL_REPO:-true}" local DISTRO_ID DISTRO_CODENAME DISTRO_ID=$(awk -F= '/^ID=/{print $2}' /etc/os-release | tr -d '"') DISTRO_CODENAME=$(awk -F= '/^VERSION_CODENAME=/{print $2}' /etc/os-release) @@ -6364,15 +6364,15 @@ EOF # - Restores dumped data post-upgrade # # Variables: -# USE_PGDG_REPO - Set to "true" to use official PGDG repository -# (default: false, uses distro packages) +# USE_PGDG_REPO - Use official PGDG repository (default: true) +# Set to "false" to use distro packages instead # PG_VERSION - Major PostgreSQL version (e.g. 15, 16) (default: 16) # PG_MODULES - Comma-separated list of modules (e.g. "postgis,contrib") # # Examples: -# setup_postgresql # Uses distro package (recommended) -# USE_PGDG_REPO=true setup_postgresql # Uses official PGDG repo -# USE_PGDG_REPO=true PG_VERSION="17" setup_postgresql # Specific version from PGDG +# setup_postgresql # Uses PGDG repo, PG 16 +# PG_VERSION="17" setup_postgresql # Specific version from PGDG +# USE_PGDG_REPO=false setup_postgresql # Uses distro package instead # ------------------------------------------------------------------------------ function setup_postgresql() {