feat(etl): add ET: Legacy downloader and update module#4896
Merged
feat(etl): add ET: Legacy downloader and update module#4896
Conversation
Refactors ET: Legacy to use a dedicated update module instead of hardcoded installation files. The new update_etl.sh module leverages the GitHub API to check for, download, and apply the latest builds from GameServerManagers/etlserver-build.
Registers the update_etl.sh module within the core modules to enable the fetching and execution of ET: Legacy updates.
Ensures that the update and check-update commands are available for ET: Legacy by including the etl shortname in the getopt command registration logic.
Updates the game log directory to the "legacy" folder and enhances local build detection by parsing etconsole.log for version information, falling back to build.txt if necessary.
Updates the minimum glibc requirement to 2.17 and switches the local build detection to use the gamelogdir variable instead of a hardcoded path.
Updates the MD5 hash parsing to use a specific regex for 32-character hexadecimal strings, providing a more robust extraction from the release body than relying on the last field of the line.
Updates the Xonotic update module to fetch the SHA512 hash from the remote download server, allowing for build verification and identification.
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes ET: Legacy configuration defaults and improves updater behavior for ET: Legacy and Xonotic within the LinuxGSM module set.
Changes:
- Add a new
update_etl.shmodule and wire it into install/update flows for theetlshortname. - Update Xonotic remote build hash retrieval to populate
remotebuildhashfrom a published SHA-512 file. - Correct ET: Legacy defaults (
glibcrequirement andgamelogdir) inetlserver’s default config.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| lgsm/modules/update_xnt.sh | Adds remote SHA-512 hash retrieval for Xonotic downloads. |
| lgsm/modules/update_etl.sh | New updater module for ET: Legacy (remote build detection, local build detection, download/extract). |
| lgsm/modules/install_server_files.sh | Removes hardcoded ETL legacy tarball path and routes ETL installs through update_etl.sh. |
| lgsm/modules/core_modules.sh | Adds update_etl.sh() module fetch wrapper. |
| lgsm/modules/core_getopt.sh | Enables update/check-update commands for etl in getopt options. |
| lgsm/modules/command_update.sh | Routes etl updates to update_etl.sh. |
| lgsm/modules/command_check_update.sh | Routes etl check-updates to update_etl.sh. |
| lgsm/config-default/config-lgsm/etlserver/_default.cfg | Fixes glibc requirement and corrects gamelogdir for ET: Legacy. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Tag format is xonotic-v0.8.6 but the sha512 file is named xonotic-0.8.6.sha512 (without the v). Using remotebuildtag directly produced a 404. Deriving from remotebuildfilename (which already has the v stripped by tr -d v) gives the correct URL.
f076a21 to
4770ff4
Compare
…on-empty dirs
Using mv to move extracted directories fails in two cases:
- Cross-device moves (e.g. tmp and serverfiles on different Docker volumes)
- Target directory already exists and is non-empty (update scenario)
Replace find+mv with cp -a which handles both cases by copying recursively
and merging into the destination. Also replace the hardcoded 'Xonotic'
temp_extractdir with ${extractsrc} to be generic.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds a native downloader and update module for ET: Legacy (
etlserver), replacing the old static file install with a dynamic GitHub Releases-based updater. Also fixes several bugs found during development and a pre-existing bug in the Xonotic hash verification.New:
update_etl.shGameServerManagers/etlserver-buildGitHub Releases APINew: ETL update wired into core
update_etl.shtocore_modules.shetlbranch tocommand_update.sh,command_check_update.sh, andinstall_server_files.shetltocore_getopt.shupdate exclusion list (uses own updater, not SteamCMD)install_server_files.shetlserver/_default.cfgfixes:gamelogdir: was${serverfiles}/Logs(copy-pasted from bf1942), corrected to${serverfiles}/legacyglibc: was"2.7", corrected to"2.17"(confirmed via./etlserver dg)update_etl.shfixes:fn_update_localbuild: now reads${gamelogdir}/etconsole.logfirst (greps forInitializing legacy game ^2vX.Y.Z), falls back tobuild.txt, then"0"awk '{print $NF}'withgrep -oE '[a-f0-9]{32}'for format-agnostic extractionupdate_xnt.shfix:remotebuildhash: was derived from${remotebuildtag}(e.g.xonotic-v0.8.6.sha512) which 404s; corrected to use${remotebuildfilename}(e.g.xonotic-0.8.6.sha512)core_dl.shfixes:extractsrc: replacedfind+mvwithcp -ato handle cross-device moves and updates to non-empty directories...in hash verification output lineFixes #4532
Type of change
Checklist
PR will not be merged until all steps are complete.
developbranch as its base.Documentation
If documentation does need updating either update it by creating a PR (preferred) or request a documentation update.
Thank you for your Pull Request!