Skip to content

feat(etl): add ET: Legacy downloader and update module#4896

Merged
dgibbs64 merged 10 commits intodevelopfrom
feat/etl-downloader
Apr 19, 2026
Merged

feat(etl): add ET: Legacy downloader and update module#4896
dgibbs64 merged 10 commits intodevelopfrom
feat/etl-downloader

Conversation

@dgibbs64
Copy link
Copy Markdown
Member

@dgibbs64 dgibbs64 commented Apr 19, 2026

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.sh

  • Fetches the latest ET: Legacy release from the GameServerManagers/etlserver-build GitHub Releases API
  • Selects the i386+ET 2.60b compatible build asset automatically
  • Verifies the downloaded archive against the MD5 hash from the release notes
  • Supports install, update, and check-update commands

New: ETL update wired into core

  • Added update_etl.sh to core_modules.sh
  • Added etl branch to command_update.sh, command_check_update.sh, and install_server_files.sh
  • Added etl to core_getopt.sh update exclusion list (uses own updater, not SteamCMD)
  • Removed the old hardcoded static install from install_server_files.sh

etlserver/_default.cfg fixes:

  • Fixed gamelogdir: was ${serverfiles}/Logs (copy-pasted from bf1942), corrected to ${serverfiles}/legacy
  • Fixed glibc: was "2.7", corrected to "2.17" (confirmed via ./etlserver dg)

update_etl.sh fixes:

  • Fixed fn_update_localbuild: now reads ${gamelogdir}/etconsole.log first (greps for Initializing legacy game ^2vX.Y.Z), falls back to build.txt, then "0"
  • Fixed MD5 hash extraction: replaced awk '{print $NF}' with grep -oE '[a-f0-9]{32}' for format-agnostic extraction

update_xnt.sh fix:

  • Fixed 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.sh fixes:

  • Fixed zip extraction with extractsrc: replaced find+mv with cp -a to handle cross-device moves and updates to non-empty directories
  • Fixed duplicate ... in hash verification output line

Fixes #4532

Type of change

  • Bug fix (a change which fixes an issue).
  • New feature (a change which adds functionality).
  • New Server (new server added).
  • Refactor (restructures existing code).
  • Comment update (typo, spelling, explanation, examples, etc).

Checklist

PR will not be merged until all steps are complete.

  • This pull request links to an issue.
  • This pull request uses the develop branch as its base.
  • This pull request subject follows the Conventional Commits standard.
  • This code follows the style guidelines of this project.
  • I have performed a self-review of my code.
  • I have checked that this code is commented where required.
  • I have provided a detailed enough description of this PR.
  • I have checked if documentation needs updating.

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!

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.
Copilot AI review requested due to automatic review settings April 19, 2026 09:30
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.sh module and wire it into install/update flows for the etl shortname.
  • Update Xonotic remote build hash retrieval to populate remotebuildhash from a published SHA-512 file.
  • Correct ET: Legacy defaults (glibc requirement and gamelogdir) in etlserver’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.

Comment thread lgsm/modules/update_xnt.sh Outdated
@dgibbs64 dgibbs64 added this to the v26.1.0 milestone Apr 19, 2026
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.
@dgibbs64 dgibbs64 force-pushed the feat/etl-downloader branch from f076a21 to 4770ff4 Compare April 19, 2026 09:43
…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.
@dgibbs64 dgibbs64 changed the title fix(etl,xnt): fix gamelogdir, glibc, local build detection, MD5 parsing and xnt hash verification feat(etl): add ET: Legacy downloader and update module Apr 19, 2026
@dgibbs64 dgibbs64 merged commit cba689a into develop Apr 19, 2026
5 checks passed
@dgibbs64 dgibbs64 deleted the feat/etl-downloader branch April 19, 2026 10:12
@dgibbs64 dgibbs64 mentioned this pull request Apr 19, 2026
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants