Am Dienstag, 27. November 2018, 15:27:44 CET schrieb Cristian Rodríguez:
El 27-11-2018 a las 5:31, Eric Schirra escribió:
Hello,
1.) I must create two files. A service- and a timer-file
But rpmlint says now i must also create %service_add_pre
<package>.service and so on.
But why? This service file is not a 'normal' service file. It is
only used for timer.
2.) Rpmlint rise up warning: suse-missing-rclink <package>
But why? See above. It is only a file for systemd.timer.
RPMLINT does not have the knowledge of this special cases, you shall not restart/start/stop the service in this case, maybe not even the timer.
Imho the rpmlint checks must fix and adapted to systemd.timer When will this implement?
3.) <package>.noarch: W: non-etc-or-var-file-marked-as-conffile /usr/lib/systemd/system/<package>.service
<package>.noarch: W: non-etc-or-var-file-marked-as-conffile
/usr/lib/systemd/system<package>.timer
A file not in /etc or /var is marked as being a configuration file.
Please put
your conf files in /etc or /var.
service files stored in /usr/lib/systemd/system are not configuration files. remove the %config from them
But i must tag in spec with config(noreplace), because a user
perhaps want to change
the time or logfile or something else. What should i do to prevent time or command changes at update?
No, if the user wants to change a service definition shall store the changed unit file in /etc/systemd/system/ and reload. this is the documented mode of usage.
What? I must search the right file under /usr/lib/systemd and copy the timer file to /etc/systemd/system and change it in this location. Right? Must i also copy the dependent service?
5.) When i want run a timer every day and i insert a * for day field, systemd rise up an error.
So i must the 'day field' empty. Is this an bug from systemd? Or is
this volitional?
On time field i must insert *. Where is there the logic?
Everyday is "daily" or "*-*-* 00:00:00", but you do not want this.. you want any or a combination of OnActiveSec=, OnBootSec=, OnStartupSec=, OnUnitActiveSec=, OnUnitInactiveSec=. You most likely want to trigger when 24 hours passed for the computer since the last time it was executed.. and not for the wall clock, which is subject to time adjustments by NTP, DST, leap seconds..etc..
No. I want start the timer every day on the same absolute time. OnCalendar=*-*-* *:05:00 What is with my point 4? I need or want e mail if service failed. Like with cron. What is the benefit from sytemd.timer? Imho nothing. I must generate a timer file, a service file and perhaps a timer file in /etc/ systemd/system. I have minimum two locations for configuration. All is more work and more complex. Crazy and unreproducible. :-( Regards Eric -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org