fix(installer): stage the Linux install without a throwaway archive - #64
Merged
Conversation
install-linux.sh built the package into a temp dir with package-linux.sh in its default targz mode, copied only the staged folder into place, then deleted the tar.gz unread. On a small or tmpfs /tmp that unused ~600 MB archive stalled the install after the staged folder was already complete, before any files reached the target (reported for an install onto a separate /mnt mount). package-linux.sh and package-linux.ps1 gain --format none, which stops after the staged folder. install-linux.sh and install-linux-legacy.sh pass it, and the temp tree is now removed by an EXIT trap installed only for direct execution, so sourcing the script (as the prerequisite test does) no longer clobbers the caller's trap. scripts/tests/install-linux-staging.sh covers the format validation, the case ordering, and the cleanup behavior; a new Optimum.Tests fact runs it on Linux. CI: ci-bootstrap-scripts.yml becomes ci-scripts.yml and also runs the staging test on changes to the installer and packaging scripts. Addresses #23
Zaldaryon
added a commit
that referenced
this pull request
Aug 31, 2026
Cherry-picked onto the v0.3.14 tag from PR #64 (main). install-linux.sh built the package with package-linux.sh in its default targz mode, copied only the staged folder into place, then deleted the tar.gz unread. On a small or tmpfs /tmp that unused archive stalled the install after the staged folder was ready and before any files reached the target. package-linux.sh and package-linux.ps1 gain --format none; both Linux installers pass it, and the temp tree is removed by an EXIT trap set only for direct execution. Scoped to the scripts the installer runs from this tag; the CI and test files from PR #64 are not included here.
1 task
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.
Problem
Follow-up to #23. With the Git clone fix in #61 and #63 the bootstrap now runs to completion, but the install then stalls before any files reach the target directory. The reporter installs onto a separate mount (
/mnt/zoomin) with/tmpon the system drive.install-linux.shbuilds the package into amktemp -ddirectory by runningpackage-linux.shwith no--format, so it defaults totargz. Afterpackage-linux.shprintsFolder ready:it always runs section 7, which builds a full~600 MBgzip tarball in that same temp directory.install-linux.shnever uses that tarball: it copies the staged folder into place and then deletes the whole temp directory. On a small or tmpfs/tmpthe unused archive step exhausts the temp space or pushes the machine into swap, and the install hangs afterFolder ready:and beforeInstalling Optimum to ....install-windows.ps1already avoids this: it callspackage.ps1without-Zip, andpackage.ps1skipsCompress-Archiveunless-Zipis passed.Change
scripts/package-linux.shandscripts/package-linux.ps1accept--format none(-Format none), which stops after the staged folder and skips the archive. Everything up toFolder ready:is unchanged.scripts/install-linux.shandscripts/install-linux-legacy.shpass--format none. The temp tree is now removed by anEXITtrap that is installed only in the direct-execution guard at the end of the file, replacing the oldrm -rf "$(dirname "$temp_source")". Installing the trap at file scope would clobber the caller'sEXITtrap when the script is sourced, whichscripts/tests/install-linux-prerequisites.shdoes.Tests
scripts/tests/install-linux-staging.shchecks thatpackage-linux.shrejects an unknown--format, that thenone)arm sits before the catch-all, thatcleanup_stageis a safe no-op with nothing staged and removes the tree when set, and that sourcing either installer adds noEXITtrap.Optimum.Testsruns it on Linux (LinuxInstallerStagingShellTestPasses) and asserts the script wiring (LinuxInstallerStagesWithoutABuiltThenDeletedArchive).ci-bootstrap-scripts.ymlbecomesci-scripts.ymland runs the new staging test alongsidemake bootstrap-git-teston changes to the bootstrap, installer, and packaging scripts.Verification
bash scripts/tests/install-linux-staging.shpasses.dotnet test Optimum.Tests --filter InstallerReleaseCoverageTests: 26 passed.bash -non the changed shell scripts and the PowerShell parser onpackage-linux.ps1pass.shellcheckadds no new diagnostics.make checkpasses.A full end to end install was not run here (no built game tree). The reporter's
/mnt/zoominfilesystem is not reproducible on this host.Addresses #23.