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

feat: Check for services that require a post upgrade restart on packages upgrade #203

Merged
merged 10 commits into from
Jul 7, 2024

Conversation

Antiz96
Copy link
Owner

@Antiz96 Antiz96 commented Jul 6, 2024

Description

Check if any services need to be restarted after updating and offers to do so (if there are). The listing of the services is done via checkservices from archlinux/contrib (available in the [extra] archlinux-contrib package).

Important notes:

  • The services that may need a post upgrade restart are only checked if an actual package(s) upgrade has been performed by arch-update beforehand. This is because the listing of services via checkservices requires elevated privileges (as it needs to run systemctl daemon reload/reexec), and it would be unexpected to ask for a sudo/doas/run0 password everytime arch-update is executed (even if there's no update available). Checking for this only if an actual package(s) upgrade has been performed beforehand means we already have elevated privileges (as this is required for the package update itself anyway), and such needs for post upgrade service restarts are triggered on package(s) updates anyway, so it kinda makes sense only checking at that moment.
  • The dbus-broker.service and systemd-logind.service services are purposely excluded from the listing as they are known for creating issues on restart (see Support restarting dbus-broker bus1/dbus-broker#93 & https://askubuntu.com/questions/1057028/ubuntu-18-04-freezes-when-running-systemctl-restart-systemd-logind-service)
  • Most well-known display managers services are also excluded as restarting a display manager would cause your current session to close/terminate, which would be unexpected (that doesn't involve display managers from the AUR though).

Screenshots / Logs

image

Addressed feature request

Close #181

Check if any services need to be restarted after updating and offers to do so (if there are).
The listing of the services is done via `checkservices` from [archlinux/contrib](https://github.com/archlinux/contrib) (available in the [extra] [archlinux-contrib](https://archlinux.org/packages/extra/any/archlinux-contrib/) package).
The `dbus-broker.service` and `systemd-logind.service` services are purposely excluded from the listing as they are known for creating issues on restart (see bus1/dbus-broker#93 & https://askubuntu.com/questions/1057028/ubuntu-18-04-freezes-when-running-systemctl-restart-systemd-logind-service)

Close #181
@Antiz96 Antiz96 added this to the v2.2.0 milestone Jul 6, 2024
Copy link
Owner Author

@Antiz96 Antiz96 left a comment

Choose a reason for hiding this comment

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

LGTM

@Antiz96 Antiz96 changed the title feat: Check for services that require a post upgrade restart feat: Check for services that require a post upgrade restart on packages upgrade Jul 7, 2024
@Antiz96 Antiz96 merged commit d2af4a8 into main Jul 7, 2024
1 check passed
@Antiz96 Antiz96 deleted the check_services branch July 7, 2024 00:16
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.

Check if any services need to be restarted after updating and offers to do so (if there are)
1 participant