Bugzilla – Bug 1115457
storeBackup: migrate from cron to systemd timers
Last modified: 2022-05-02 10:40:03 UTC
This bug is part of TRACKERBUG bug#1115430. Based on fate#323635 (Reduce usage of cron package in favor of systemd timers) we would like to minimize the number of packages that use cron in favour of systemd timers. It seems that your package uses cron. Please take a look at it and evaluate if it's possible to migrate your package to use systemd timers without impacting behaviour. If it's not possible, please write down the reason. Please note that by default, services are not enabled when the package is installed. You probably want your service to be enabled by default so you should create a submit request on systemd-presets-branding-openSUSE package, modifying default-openSUSE.preset file by adding "enable your_service_name.service".
"fate#323635" isn't a link and features.opensuse.org tells me that "Feature #323635 does either not exist or you are not authorized to access it.". Where can I find this feature?
(In reply to Jan Ritzerfeld from comment #1) > "fate#323635" isn't a link and features.opensuse.org tells me that "Feature > #323635 does either not exist or you are not authorized to access it.". > Where can I find this feature? This feature is unfortunately internal, it's mentioned here mainly for tracking purposes. If you have any questions or notes, feel free to ask (here or at the tracker bug if it applies for all packages that should be migrated). Thanks!
(In reply to Kristyna Streitova from comment #0) > ... modifying default-openSUSE.preset file by adding "enable > your_service_name.service". A small correction: it should be "enable your_timer.timer" of course. See [1] for more information about systemd timers packaging. Feel free to enhance this wiki page. Thanks! [1] https://en.opensuse.org/openSUSE:Systemd_packaging_guidelines#Systemd_timers
(In reply to Kristyna Streitova from comment #2) > This feature is unfortunately internal [...] That's indeed very unfortunate, since I'm just an external maintainer. So, would you please find an internal one to implement your internal feature requests by yourself?
It is internal because this idea was initially brought for SLES15, that's all :) However, we have public bugs opened for openSUSE now that describe this cron-systemd migration intention that we would like to follow in openSUSE Tumbleweed in the same way the other distributions do. If you are still missing any information about the migration, then feel free to ask. If you don't feel you can migrate your package then let me know and I can take a look at it. Thank you.
(In reply to Kristyna Streitova from comment #5) > [...] If you don't feel you can migrate your package then let me know and > I can take a look at it. That would be very nice, thank you.
Right now, I'm using storeBackup with cron. I (and most likely others) use a very distinct feature of /etc/cron.daily, namely that scripts are executed in a given order (in cron's case alphanumerical order). This is important because one might want to execute a script directly before and after using storeBackup, e.g., to mount/unmount the backup drive or start replication to an off-site machine. I have only little experience with systemd's timers, so my question is: Will it be possible to execute a script directly before and after a timer of systemd is triggered? Such a feature would be quite important.
I am taking this bug from Kristyna. Regarding the execution of scripts before and after storeBackup.timer runs; I think you could add an ExecPre and ExecPost scripts by adding them to the file /etc/systemd/system/storeBackup.service.d/override.conf.
This feature has been implemented in Factory.
This is an autogenerated message for OBS integration: This bug (1115457) was mentioned in https://build.opensuse.org/request/show/974370 Backports:SLE-15-SP4 / systemd-presets-branding-openSUSE