Repository navigation
linux appimage self update - #125
Merged
elripalda merged 7 commits intoNov 13, 2026
Merged
Conversation
innateessence
force-pushed
the
feat/linux-appimage-self-update
branch
from
November 13, 2026 00:38
375851f to
770f5ab
Compare
Contributor
Author
|
Success, I suck at reviewing rust code but everything looks good to me. |
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are reported for the Linux AppImage self-update change.
No open issues 🎉
What changed in this PR
Adds in-place Linux AppImage self-updates to address #123, replacing the download-link behavior with a validated update and restart flow.
Changes:
- Validates Linux update metadata, checksums, download size, and runtime architecture before staging.
- Replaces the AppImage after the launcher exits, preserves the current display mode, and restores the previous image on immediate launch failure.
- Adds progress and retry handling, regression tests, and updater documentation.
| File | Description |
|---|---|
ui/tv.js |
Prevents controller dismissal of busy update dialogs. |
ui/more.js |
Keeps Linux update progress open and clears it on failure. |
ui/app.js |
Guards duplicate updates, preserves display mode, and shows update errors. |
tests/appimage-update.test.cjs |
Adds UI and shell-helper regression coverage. |
src-tauri/src/lib.rs |
Integrates AppImage updates, Linux metadata handling, and restart state. |
src-tauri/src/appimage.rs |
Validates AppImage container and native runtime architecture. |
src-tauri/src/appimage_update.sh |
Handles replacement, restart, rollback, and staging cleanup. |
src-tauri/src/appimage_update.rs |
Implements validated downloads, staging, and helper handoff with tests. |
docs/LAUNCHER-API.md |
Documents Linux update metadata, behavior, and recovery limits. |
Review effort: Balanced
Contributor
Author
|
@Xarishark You might be interested in this. No rush. |
…folder it can't change - A failed update goes through update-pending.json like the installer and the Mac updater: the old version's next start shows The Update Didn't Start with Try Again, and the second failure from the same file stops it being offered. The helper's own error file is gone; it notes what happened in launcher-trail.log instead. - When the swap fails, the unchanged launcher opens again instead of leaving no window. - A folder this account can't change is checked before the download, and a window names it and offers the new AppImage to download. - Staging folders an interrupted update left behind are removed at start once they're an hour old. - One trusted-download check (origin and path) for every platform's update URL; it still lets RL_API point at a local copy of the site for testing.
…w launcher The AppImage runtime passes its mount to every program it starts through descriptor 1023. The update helper inherited it and handed it to the new launcher, so the old runtime kept running until the new launcher closed. The helper now closes it before it starts.
…ress dialog on Windows
This was referenced Nov 13, 2026
Xarishark
marked this pull request as draft
November 13, 2026 02:33
The runtime keeps its FUSE process up until no program holds the read end of a pipe it hands every child, besides its mount at descriptor 1023. Closing 1023 alone left the pipe with the new launcher, so the old runtime still stayed. Everything past stdio is now close-on-exec in the helper (close_range, Linux 5.11+), with a test that an inheritable descriptor doesn't reach it.
This was referenced Nov 13, 2026
Collaborator
|
@innateessence this is now in series to be merged. when the previous PRs in the series get dealt with we will merge this also. Good Job! |
elripalda
marked this pull request as ready for review
November 13, 2026 12:03
# Conflicts: # src-tauri/src/lib.rs # ui/app.js # ui/tv.js
When the swap fails, the helper reopens the unchanged launcher in the background and exits. The test could remove its folder while that launcher was still writing there, and fail with ENOTEMPTY (9 of 40 runs).
5 of 6 tasks
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.
Series: launcher updates and Big Picture fixes. Merge one at a time, in this order. Each one stays a draft until the one before it is in.
This is 5 of 5. Rebased onto main after the other four. Three conflicts (checked by replaying the merges):
ui/tv.js: this PR's busy-dialog change is already in from Big Picture B no longer dismisses a busy dialog #127; drop it here.ui/app.js,updateFailedModal: keep Mac: the launcher updates itself from the release's disk image, with rollback #126's Mac branch and this PR's Linux branch, one after the other (both use "The Update Didn't Start").src-tauri/src/lib.rs,update_launcher: keep Mac: the launcher updates itself from the release's disk image, with rollback #126's Mac in-place path, use this PR'strusted_update_urlforok_host, and keep the old in-place AppImage block deleted (Linux returns earlier, throughappimage_update). Then run the tests on all three platforms.What this changes
Linux AppImages update themselves in place with a safer flow. Issue: #123
--bigpicture/ new--desktop).sha256,minorsize.Maintainer changes
update-pending.jsonis written before the handoff. When the old version is the one that starts next, it shows "The Update Didn't Start" with Try Again, and the second failure from the same file stops it being offered. The helper's own error file is gone; it notes what happened inlauncher-trail.log.update_launcher. It still letsRL_APIpoint at a local copy of the site (2289519).close_range, Linux 5.11+). Upstream tracks the same kind of orphan in AppImage orphan survives main process exit AppImage/type2-runtime#92.docs/LAUNCHER-API.mdcovers the above, and that an update error now closes the progress dialog on every platform (on Windows it used to stay open).How you tested it
By the author:
By the maintainer, on Bazzite (KDE Plasma, Wayland) in a VM:
cargo test(445) andnode --test tests/*.test.cjs(108) pass on Ubuntu 24.04 with the maintainer changes.~/Applicationsand through Gear Lever. [Linux] AppImage opens download link instead of self updating #123 didn't reproduce there; details were asked from the reporter.~/Applicationsupdated to Beta 41 and reopened in desktop mode, leaving no staging folder orupdate-pending.json.update-pending.json, the next start logged it, counted strike 1 inupdate-bad.json, showed "The Update Didn't Start", and Try Again updated to Beta 41.New strings for translation: "The Update Didn't Start" (shared with #126), its Linux message, "Try Again" (already exists), "RecompLauncher Can't Update Itself Here", its message, "Download It".
For the website (SDK guide): nothing; this doesn't change recomplauncher.json.
Screenshots
N/A
Checklist
recomplauncher.json: the schema and docs are updated too