Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#36120 - [mlocate] Systemd Unit and Timer support

Attached to Project: Arch Linux
Opened by MMH (mmh) - Friday, 12 July 2013, 13:31 GMT
Last edited by Gaetan Bisson (vesath) - Wednesday, 31 July 2013, 05:30 GMT
Task Type Feature Request
Category Packages: Core
Status Closed
Assigned To Gaetan Bisson (vesath)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
Since systemd could take care of timer controlled activation, a systemd.timer could be added to the mlocate or the systemd-arch-units package and enabled by default.
This task depends upon

Closed by  Gaetan Bisson (vesath)
Wednesday, 31 July 2013, 05:30 GMT
Reason for closing:  Deferred
Comment by Gaetan Bisson (vesath) - Friday, 26 July 2013, 22:55 GMT
Do you care to write one?
Comment by MMH (mmh) - Monday, 29 July 2013, 15:44 GMT
I attached a draft of the service unit based on the cron job which is part of the mlocate package.

I think systemd has great capabilities to be a MINIMAL drop-in replacement for cron. Personally I switched to systemd-cron[1] which is sufficient for my needs. It respects the /etc/cron.{hourly, daily, weekly, monthly} directories, but it would be nice if the core packages ship a systemd unit anyway.

[1] https://bbs.archlinux.org/viewtopic.php?id=164122
Comment by MMH (mmh) - Monday, 29 July 2013, 15:48 GMT
Further information on how to replace cron with systemd: http://blog.higgsboson.tk/2013/06/09/use-systemd-as-a-cron-replacement/
Comment by Gaetan Bisson (vesath) - Monday, 29 July 2013, 17:58 GMT
Actually I am really not sure about this, and I deeply apologize for asking you to write a timer file before thinking this through.
Currently we have cronie in the base group providing a default cron daemon which is used by quite a few packages in our distribution to run periodic tasks; if we are to switch to systemd timers, this should be a concerted effort, not just random packages doing this in they own right.
I would probably support this, but I do not want to take any action in that sense before a discussion has taken place and a consensus be reached on arch-dev-public. And since I will be on holiday the next two weeks, that will probably not happen soon.
If you wish, I can edit your feature request into one requiring all crontab be converted to systemd timers, and we'll see what other developers have to say about this.
Comment by MMH (mmh) - Monday, 29 July 2013, 20:36 GMT
Thank you for your kind and fast reply.
I totally agree with you. I guess one would run into issues if the cron job AND the systemd unit get shipped within a single package.
For this reason I kindly ask you to either close this request or edit it as you proposed. I'd appreciate it if you go for the second option.

I still think replacing cronie with systemd timers is a good idea.
For the moment I provide an customized mlocate package on the AUR[1] for those who replaced cronie with alternatives, e.g. systemd-cron.

[1] https://aur.archlinux.org/packages/mlocate-systemd/
Comment by Gaetan Bisson (vesath) - Wednesday, 31 July 2013, 05:30 GMT
I thought a little more about this and figured there were many ways we could go. To be sure we are entirely clear, I will close this bug report and ask you to open a new one describing how you would like to see this implemented in practice.

One possible way would be to add the systemd-cron service files to our systemd package (or ship them in a separate package) and inform users that they may disable their cron daemon and enable those serivces instead. That will take care of /etc/cron.* but what should users with more featureful crontabs do? We should provide a featureful default cron execution mechanism in [core] and as long as systemd is not feature-complete for that we should stick with cronie. That is my opinion at the moment anyhow. Feel free to create a fresh bug report and let us know how you would implement this. You may assign it to systemd and cronie (or other packages, depending on which are involved in your plans).

Cheers.

Loading...