Closed LukeHandle closed 6 years ago
In Fedora, default enabled timers fall under the same policy as default enabled services.
https://fedoraproject.org/wiki/Packaging:DefaultServices
I'm not 100% sure if recap meets those requirements or not, but I don't see enough benefit to argue in favor of it. Cron jobs were enabled by default, systemd timers are not, that's kinda just how it is.
By that Wiki page (and my understanding), we would be allowed to as a local and non-persistent service? I guess a spec file update is another thing down the line and obviously has its own implications for a wider audience switching from cron to timers and ensuring adequate communication.
In this case with the make install
, I don't mind if we don't enable them, but if not, I suggest we are more helpful with the message.
What's the opinion for the Makefile specifically?
Thanks @LukeHandle and @carlwgeorge for the comments in here.
I created PR #160 to solve this, it will simply print the commands required to (en|dis)able timers, letting to the packagers of each distro to follow their best practices.
This is an example of how it will look like:
Installing:
$ sudo make install PREFIX=/usr BINPATH=/bin
Installing scripts...
Installing configuration...
Creating log directories...
Installing man pages...
Installing docs...
Installing systemd timers and services...
Use the following to enable the systemd timers:
sudo systemctl enable recap.timer --now
sudo systemctl enable recaplog.timer --now
sudo systemctl enable recap-onboot.timer --now
Uninstalling:
$ sudo make uninstall PREFIX=/usr BINPATH=/bin
Removing scripts...
Removing configuration...
Removing man pages...
Removing docs...
Removing systemd timers and services...
Use the following to disable the systemd timers:
sudo systemctl disable recap.timer --now
sudo systemctl disable recaplog.timer --now
sudo systemctl disable recap-onboot.timer --now
Closing this out as #160 was merged into development
When installing via make (eg. on Ubuntu systems), the cron is automatically enabled when
systemd
is not present - yet, the timer is not activated when it is.I understand there is a notice about such when installing, but the behaviour is not consistent or expected for people familiar with how
recap
normally works via package (or when not usingsystemd
).I would propose that as part of the make we enable the appropriate timers, or if we want to leave it up to the end user, give them some copy/paste commands. I had someone today not familiar about systemd timers get confused about the lack of cron job and went and added it manually.