Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't clean up update directory when Autoupdate receives SIGTERM #2479

Merged
merged 2 commits into from
Dec 20, 2023

Conversation

zorgiepoo
Copy link
Member

@zorgiepoo zorgiepoo commented Dec 20, 2023

Under rare circumstances, if Autoupdate receives SIGTERM (like during system shutdown) while the installer queue is installing an update this could cause potential corruption.

Fixes #2478

Misc Checklist

  • My change requires a documentation update on Sparkle's website repository
  • My change requires changes to generate_appcast, generate_keys, or sign_update

Testing

I tested and verified my change by using one or multiple of these methods:

  • Sparkle Test App
  • Unit Tests
  • My own app
  • Other (please specify)

Cannot reproduce actual corruption issue without inserting sleep() calls at specific points + sending a quit event to Autoupdate as the timing window is hard to target / rare. The change here is removing cleanup code that was not necessary (because old items get cleared out the next time an update is installed).

Tested Autoupdate can still be terminated gracefully via SIGTERM.

macOS version tested: 14.1.2 (23B92)

Under rare circumstances, if Autoupdate receives SIGTERM while the installer queue is installing an update this could cause potential corruption.
@zorgiepoo zorgiepoo added this to the 2.5.2 milestone Dec 20, 2023
SIGTERM is still needed for the daemon/agent to exit gracefully.
@zorgiepoo zorgiepoo merged commit b84c1b1 into 2.x Dec 20, 2023
2 checks passed
@zorgiepoo zorgiepoo deleted the remove-sigterm-cleanup branch December 20, 2023 03:49
zorgiepoo added a commit that referenced this pull request Dec 20, 2023
Under rare circumstances, if Autoupdate receives SIGTERM while the installer queue is installing an update this could cause potential corruption.
zorgiepoo added a commit that referenced this pull request May 13, 2024
Under rare circumstances, if Autoupdate receives SIGTERM while the installer queue is installing an update this could cause potential corruption.

This is a port of #2479 to 2.2.x branch.
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.

Updated app bundle missing the MacOS executable (app "damaged or incomplete")
1 participant