Bug 1064537 - use systemd timer instead of cron job for sa-update
Summary: use systemd timer instead of cron job for sa-update
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: spamassassin
Version: 22
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Kevin Fenzi
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: cron-to-timer-units
TreeView+ depends on / blocked
 
Reported: 2014-02-12 19:46 UTC by Tomasz Torcz
Modified: 2015-04-03 17:41 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-04-03 17:41:37 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
sa-update.service (777 bytes, text/plain)
2014-02-12 19:46 UTC, Tomasz Torcz
no flags Details
sa-update.timer (352 bytes, text/plain)
2014-02-12 19:47 UTC, Tomasz Torcz
no flags Details

Description Tomasz Torcz 2014-02-12 19:46:39 UTC
Created attachment 862503 [details]
sa-update.service

Update to 3.4.0 is a great opportunity to replace cronjob with systemd timer. So please consider attached units instead of /etc/cron.d/sa-update.

Thanks.

Comment 1 Tomasz Torcz 2014-02-12 19:47:25 UTC
Created attachment 862504 [details]
sa-update.timer

Comment 2 Kevin Fenzi 2014-02-12 20:01:18 UTC
Guidelines for timer units are not yet done, so I don't want to add any before that happens. 

Thanks much for the attachments, but please note we shouldn't apply these yet until guidelines are done. 

Thanks.

Comment 3 Jóhann B. Guðmundsson 2014-03-25 10:53:15 UTC
What do you mean you wont apply these until guidelines are done?

Comment 4 Kevin Fenzi 2014-03-25 17:29:52 UTC
I think that statement is pretty clear?

Currently timer units are not mentioned in packaging guidelines. I'd like for them to be so we know we are all doing this the same way and it's the best practice. They would likely need to be mentioned at least in: 

https://fedoraproject.org/wiki/Packaging:Systemd#Activation
(time based activation should be added?)
The start by default policy? Should timer units always be run by default, even if the service is not?
Perhaps a note about not adding a dep to a package that doesn't otherwise need systemd just for a timer unit?

Comment 5 Jóhann B. Guðmundsson 2014-03-25 21:07:44 UTC
(In reply to Kevin Fenzi from comment #4)
> I think that statement is pretty clear?

Read the fesco meeting from the feature proposal. 

That will answer your questions

Comment 6 Jóhann B. Guðmundsson 2014-03-25 21:08:54 UTC
As well as provide you with a list of components that *might* be migrated. Components not on that list will not be migrated to timer units

Comment 7 Fedora Admin XMLRPC Client 2014-08-08 07:43:06 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 8 Fedora Admin XMLRPC Client 2014-08-08 07:45:34 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 9 Tomasz Torcz 2015-01-15 10:22:56 UTC
Packaging guidelines have been updated:
https://fedoraproject.org/wiki/Packaging:Systemd#Timer_activation

As spamassassin already ships unit file and depends on systemd, following is applicable:
"must use timer units instead of cron jobs, with no dependency or requirements on a crontab"

Comment 10 Warren Togami 2015-01-15 22:38:57 UTC
When this is done could you please keep the cron as a config boolean so the package can continue to operate when built on EL6?

Comment 11 Jaroslav Reznik 2015-03-03 16:59:00 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 22 development cycle.
Changing version to '22'.

More information and reason for this action is here:
https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora22

Comment 12 Kevin Fenzi 2015-04-03 17:41:37 UTC
ok. I have built and pushed to rawhide a version using timers. 

I'd like to let it cook there for a bit before going to stable releases.


Note You need to log in before you can comment on or make changes to this bug.