Bug 989115

Summary: Add a missing requirement on crontabs for the cron job to the spec file
Product: [Fedora] Fedora Reporter: Jóhann B. Guðmundsson <johannbg>
Component: snapperAssignee: Ondrej Kozina <okozina>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: agk, lvm-team, msnitzer, okozina
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: snapper-0.1.5-2.fc20 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-07-31 09:38:36 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 947037    
Attachments:
Description Flags
Spec file fixes patch none

Description Jóhann B. Guðmundsson 2013-07-27 16:59:13 UTC
Description of problem:

Please update your package according to the packing guidelines
http://fedoraproject.org/wiki/Packaging:CronFiles
Thanks


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Jóhann B. Guðmundsson 2013-07-27 17:00:20 UTC
Created attachment 779136 [details]
Spec file fixes patch

Comment 2 Ondrej Kozina 2013-07-29 07:19:36 UTC
I'll investigate the possibility to replace cron files with systemd timer files. Moreover, there's RFE for that in upstream: https://github.com/openSUSE/snapper/issues/18

Comment 3 Jóhann B. Guðmundsson 2013-07-29 08:12:48 UTC
Well there are some scalability issues with systemd timers that have not been quite sorted out yet which we will probably be discussing in the systemd hackfest that will take place in BRNO after a week or so and and we have not made changes to the packaging guidelines for timer units.

Upstream is using "for CONFIG in $SNAPPER_CONFIGS" which means a) it needs to be template units and b) the sysconfig environment file would be dropped for this in the cron script and separate template units created for each task {number,timeline,empty-pre-post,create}) and you will have change the requirements to systemd according to [1] 

You can try these unit as a base for the template units. 


### Begin snapper-timeline-create.service ###

[Unit]
Description=Snapper Timeline Creator
Documentation=man:snapper(8)

[Service]
ExecStart=/usr/sbin/snapper --config=myconfig --quiet create --description="timeline" --cleanup-algorithm="timeline"

### End snapper-timeline-create.service ###


### Begn snapper-timeline-create.service ###

[Unit]
Description=Snapper Timeline Create Time Trigger
Documentation=snapper(8)

[Timer]
Unit=snapper-timeline-create.service
OnBootSec=1hour
OnUnitActiveSec=1h

[Install]
WantedBy=multi-user.target

### End snapper-timeline-create.timer ###

1. http://fedoraproject.org/wiki/Packaging:ScriptletSnippets#Systemd