FS#64127 - [cronie] Add pacman hook to trigger a restart after libc upgrade

Attached to Project: Arch Linux
Opened by Mantas Mikulėnas (grawity) - Monday, 14 October 2019, 11:45 GMT
Last edited by Christian Hesse (eworm) - Monday, 14 October 2019, 12:11 GMT
Task Type Feature Request
Category Packages: Core
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

It is already known that cron workers will begin crashing after libc has been upgraded, due to symbol mismatches and delayed loading and all that.

Currently every users has to discover this on their own, and produce their own solutions/workarounds such as making a pacman hook, or using scripts from -contrib, or having a sticky note that says "restart cron", or just rebooting after every upgrade.

Practically the only affected service is cron – this does not occur with most other long-running services. Additionally, cron is generally safe to restart, as cronie.service has KillMode=process. Therefore I propose that cronie should start using a pacman hook to automate this restart.

Proposed hook:

===
[Trigger]
Operation = Upgrade
Type = File
Target = usr/lib/libc.*
Target = usr/lib/libpam.*

[Action]
When = PostTransaction
Description = Restarting cronie for libc upgrade...
Exec = /usr/bin/systemctl try-restart cronie
===

This post brought to you by, yet another Arch system where I forgot to copypaste the .hook and it missed several days of cronjobs.
This task depends upon

Closed by  Christian Hesse (eworm)
Monday, 14 October 2019, 12:11 GMT
Reason for closing:  Implemented
Additional comments about closing:  cronie 1.5.4-3
Comment by Christian Hesse (eworm) - Monday, 14 October 2019, 12:11 GMT
Actually I've thought about this myself...
So let's just add it.

Loading...