Skip to content

feat: implement AppImage auto-updater for Linux#9269

Open
derspotter wants to merge 2 commits intonextcloud:masterfrom
derspotter:feat/appimage-updater
Open

feat: implement AppImage auto-updater for Linux#9269
derspotter wants to merge 2 commits intonextcloud:masterfrom
derspotter:feat/appimage-updater

Conversation

@derspotter
Copy link

This PR implements a self-update mechanism for the Linux AppImage.

Changes:

  • Added AppImageUpdater class (inherits OCUpdater) to handle AppImage-specific update logic.
  • Implemented detection of AppImage environment (APPIMAGE env var).
  • Added manual handling of 302 Found redirects to support GitHub Releases downloads.
  • Added buffer clearing logic to prevent binary corruption when servers send HTML bodies with redirects.
  • Implemented a temporary bash script mechanism to replace the running AppImage file and restart the application.
  • Updated Updater::create factory to instantiate AppImageUpdater on Linux when applicable.
  • Updated CMakeLists.txt and build-appimage.sh to include the new files and ensure clean builds.

Fixes:

  • Fixes issues where the updater would not follow GitHub release redirects.
  • Fixes binary corruption issues caused by writing redirect responses to the file.
  • Enables seamless updates for AppImage users.

@github-actions
Copy link

github-actions bot commented Jan 4, 2026

Hello there,
Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.

We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process.

Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6

Thank you for contributing to Nextcloud and we hope to hear from you soon!

(If you believe you should not receive this message, you can add yourself to the blocklist.)

Copy link
Member

@nilsding nilsding left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution! Some points:

I am also curious about the "Fixes" mentioned in the PR description, did you run into those while implementing the AppImageUpdater class?

@github-actions
Copy link

github-actions bot commented Feb 4, 2026

Artifact containing the AppImage: nextcloud-appimage-pr-9269.zip

Digest: sha256:a1cf988be09cd6816a165f04443c5b849d42cbfb487b4bbc996561145023097c

To test this change/fix you can download the above artifact file, unzip it, and run it.

Please make sure to quit your existing Nextcloud app and backup your data.

Copy link
Collaborator

@mgallien mgallien left a comment

Choose a reason for hiding this comment

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

see my inline comments
please use auto as much as possible
I will try to test it locally

@derspotter
Copy link
Author

I tried to resolve everything in 02a29e7 and kindly ask for a new review.

@derspotter
Copy link
Author

derspotter commented Feb 5, 2026

Update: pushed a fix to keep updater dialogs in the foreground.
Summary:

  • Added helper that waits for an active window, then parents update dialogs to it (WindowModal), with a 2s fallback to ApplicationModal if no window appears. Re-raises dialogs on focus changes and keeps them on top to avoid being hidden behind the setup wizard.\n- Applied to both OCUpdater (NSIS) and AppImageUpdater error dialogs.
  • Tested via AppImage build 10006 on Linux: update-failed dialog now appears in the foreground.

@derspotter derspotter force-pushed the feat/appimage-updater branch from 317fd61 to b7fc310 Compare February 5, 2026 19:06
Signed-off-by: der_spotter <jayjag@posteo.de>
Signed-off-by: der_spotter <jayjag@posteo.de>
@derspotter derspotter force-pushed the feat/appimage-updater branch from b7fc310 to fce3b27 Compare February 5, 2026 19:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants