Repository navigation
fix(gui-client): don't stop service after upgrade on Fedora - #10539
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
thomaseizinger
enabled auto-merge
October 9, 2025 07:11
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR fixes a package upgrade issue where the tunnel service was being unconditionally stopped during package upgrades on Fedora systems. The fix adds conditional logic to only stop the service during actual uninstalls, not upgrades.
Key changes:
- Added conditional check for package manager arguments to distinguish between upgrades and removals
- Added error suppression (
|| true) to systemctl commands to prevent script failures
Member
Author
|
This has been bugging me for a while and I couldn't figure out what was wrong for ages! I thought it was just a Fedora thing 🤷 |
thomaseizinger
disabled auto-merge
October 9, 2025 11:46
Member
Author
|
I think it might be more correct to try and detect that we are being upgraded and are on Fedora and then simply early exit. |
jamilbk
approved these changes
Oct 9, 2025
thomaseizinger
force-pushed
the
fix/no-stop-prerm
branch
from
October 9, 2025 23:39
0fc574e to
6245954
Compare
thomaseizinger
enabled auto-merge
October 9, 2025 23:41
This branch was successfully deployed
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.
On Fedora, when a package gets upgraded, the new package is installed first, followed by the uninstall of the old package. As a result, the
prermscript is called after thepostinstscript of the new package.In our
prermscript, we stop the tunnel service. On package upgrades, this results in us stopping the tunnel service after installing the new package, confronting the user with an error that the tunnel service is not running.rpmpasses arguments to these maintenance scripts. In the case ofprerm, we receive the count of how many other instances of this packages are installed. To fix this bug, we check whether the first argument to the script is "1", meaning that we are being upgraded and should not stop the tunnel service.