FS#41157 - [spamassassin] Provide a systemd timer for sa-update

Attached to Project: Arch Linux
Opened by Stefan Tatschner (rumpelsepp) - Thursday, 10 July 2014, 10:32 GMT
Last edited by Florian Pritz (bluewind) - Monday, 07 August 2017, 08:27 GMT
Task Type Feature Request
Category Packages: Extra
Status Closed
Assigned To Florian Pritz (bluewind)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 2
Private No

Details

Hi,

I think providing a systemd.timer for sa-update in spamassassin would be useful. I have attached my effort as a starting point.
This task depends upon

Closed by  Florian Pritz (bluewind)
Monday, 07 August 2017, 08:27 GMT
Reason for closing:  Won't implement
Comment by Stefan Tatschner (rumpelsepp) - Thursday, 10 July 2014, 10:33 GMT Comment by Stefan Tatschner (rumpelsepp) - Thursday, 10 July 2014, 13:01 GMT
I had to add SuccessExitStatus=1 to the service because sa-update returns 1 (and therefor the timer fails) when there are no fresh updates.
Comment by Dave Reisner (falconindy) - Thursday, 10 July 2014, 14:00 GMT
Type=simple is wrong for a service which runs and exits. It should be Type=oneshot.
Comment by Dave Reisner (falconindy) - Thursday, 10 July 2014, 14:01 GMT
Also, have you approached upstream about including this? The unit seems like a good candidate for pushing upstream...
Comment by Stefan Tatschner (rumpelsepp) - Thursday, 10 July 2014, 14:19 GMT
I don't like bugzilla... here you are: https://issues.apache.org/SpamAssassin/show_bug.cgi?id=7066
Comment by Stefan Tatschner (rumpelsepp) - Thursday, 10 July 2014, 15:36 GMT
The files will be included upstream. As I have not enough experience with systemd files I would like to ask if anyone could do a little review.

- should the timer run daily? hourly? something else?
- is the service file complete? I think it should depend on internet connection. How do I include this correctly?
Comment by Florian Pritz (bluewind) - Thursday, 10 July 2014, 15:44 GMT
Depending on what actually uses spamassassin some services (spampd, amavis, spamd, ..) have to be restarted for the changes to take effect. Also I believe if you ever ran sa-compile then only the compiled rules will be used and your timer/service doesn't recompile after an update.

Correct me if I'm wrong please.
Comment by Stefan Tatschner (rumpelsepp) - Friday, 11 July 2014, 13:03 GMT
I have done some reading in the internet and it seems that you are right. But how can I restart another service from a service file? Is this even possible?

For sa-compile: I think we should include recompiling. Can I include this in spamassassin-rulesupdate.service or is it better to create another service?
Comment by Florian Pritz (bluewind) - Saturday, 12 July 2014, 15:08 GMT
This is very related to the old bug: https://bugs.archlinux.org/task/37865

There might be people that don't compile their rules (for whatever reason) so don't force them to by putting it into the service. You should also think about the other usecases mentioned in the linked bugreport (multiple update channels; run at a different interval than the one you specifiy). Most things could probably be solved by telling users to override the service file, but let's be honest, that's way more complicated than just using good old "crontab -e".

Really not worth it IMHO.
Comment by Eli Schwartz (eschwartz) - Sunday, 06 August 2017, 23:50 GMT
What is the status of this?

Loading...