Moves APT pinning for NodeSource to occur before removing existing Debian nodejs packages, ensuring Debian's nodejs is not reinstalled. Cleans up logic for removing conflicting packages and clarifies the order of operations in setup_nodejs.
Enhances the setup_nodejs function to remove Debian-packaged Node.js if present, set APT preferences to prioritize NodeSource packages, and verify npm availability after installation. These changes help avoid conflicts between Debian and NodeSource Node.js versions and ensure npm is properly installed.
Added detailed comments at the top of misc/tools.func describing its purpose, key features, and usage examples. This improves clarity for maintainers and users of the helper functions.
Introduced upgrade_packages_with_retry to handle package upgrades with retry logic, similar to existing install_packages_with_retry. Refactored Java, MariaDB, and other install/upgrade flows to use the new retry functions and ensure_dependencies for more robust package management. Improved error handling and repository preparation steps.
Introduces unified helper functions for cleaning up keyrings, stopping services, verifying tool versions, and cleaning legacy installs. Adds a retry mechanism for package installation and a repository preparation function to streamline setup and error handling. Refactors all tool setup and removal logic to use these helpers, reducing code duplication and improving maintainability.
Expanded the removal of GPG keyrings and repository configuration files for MariaDB, MySQL, MongoDB, Node.js, PHP, PostgreSQL, Java (Adoptium), and ClickHouse in both removal and setup functions. This ensures all possible keyring locations are cleaned before new installations, reducing risk of conflicts and improving idempotency. Also improved PHP-FPM service cleanup and added version verification for MongoDB setup.
Updated the entire misc/tools.func script to use consistent 2-space indentation for improved readability and maintainability. No functional changes were made.
Corrects the case of the release name in the LibreNMS installer to 'librenms' and updates Node.js installation commands to use the $STD variable for consistent output and logging.
Adds robust error handling and fallback logic for network operations in setup_ffmpeg, setup_gs, setup_hwaccel, setup_java, setup_mariadb, setup_ruby, setup_clickhouse, setup_uv, and setup_yq functions. Now uses timeouts, checks for empty responses, and provides alternative installation paths or informative warnings when API or mirror requests fail. This improves reliability in environments with intermittent or restricted network access.
Introduces functions for checking tool installation and version, removing old versions, determining if upgrades are needed, and managing repositories for major tools (MariaDB, MongoDB, Node.js, PHP, PostgreSQL, MySQL). Refactors setup functions for Composer, FFmpeg, Go, Ghostscript, ImageMagick, Java, local IP helper, MariaDB, MongoDB, MySQL, and Node.js to use these new utilities, improving idempotency, upgrade handling, and error reporting. Enhances repository setup with parameter validation and error handling.
Enhanced the setup_mariadb function to better handle MariaDB repository updates, version checks, and upgrade flows. The script now updates the repository if the version differs, provides clearer messaging, and ensures proper upgrade steps for both repository and package updates.
This commit adds error checking and user-friendly error messages to various package installation, archive extraction, and build steps throughout the script. It ensures that failures in commands such as apt, curl, tar, unzip, make, and others are detected, appropriate cleanup is performed, and informative error messages are displayed, improving robustness and debuggability.
Replaces various install/upgrade messages with standardized 'Setup <package> <version>' and 'msg_ok' calls for consistency. Removes redundant or verbose info/warning messages, simplifies dependency installation logic, and ensures error handling uses '|| true' where appropriate. This improves readability and reduces unnecessary output during package setup.
Enhanced the LXC container creation process to prompt for available template versions if the requested template is missing, allowing users to select from available options interactively. Also refactored the hardware acceleration setup function for better readability and consistency, and made minor whitespace and formatting adjustments.
Refactored MySQL installation logic to use Bookworm packages for Debian testing/unstable (Trixie, Forky, Sid) instead of blocking installation. Added conditional purge of MySQL packages only if installed and improved messaging for unsupported distributions.
Updated the setup_postgresql function to use runuser instead of su for executing pg_dumpall and psql as the postgres user. This improves compatibility and security when running these commands.
Bumps Node.js version from 22 to 24 in ente-install.sh. Enhances MySQL setup in tools.func to explicitly block installation on Debian Trixie/forky/sid due to incompatibility, providing alternative solutions and clearer messaging.
Adds explicit installation of MariaDB dependencies before setup. Updates MySQL setup to handle unsupported Debian testing/unstable suites by falling back to bookworm if available, with improved error messaging. Ensures PostgreSQL binaries are added to PATH during installation. Expands Ruby setup to install all required build dependencies.
Replaces the inlined VAAPI passthrough logic in misc/build.func with calls to an external passthrough.func script, streamlining and centralizing hardware passthrough handling. Adds a new misc/passthrough.func file and introduces a hwaccel_setup_in_ct helper in misc/tools.func for hardware acceleration setup inside containers.