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.
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.
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.. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org