| Summary: | systemd.eclass: add support for ntp-units.d | ||
|---|---|---|---|
| Product: | Gentoo Linux | Reporter: | Kacper Kowalik (Xarthisius) (RETIRED) <xarthisius> |
| Component: | Eclasses | Assignee: | Gentoo systemd Team <systemd> |
| Status: | RESOLVED FIXED | ||
| Severity: | enhancement | CC: | aklhfex, alexander, egorov_egor, gentoo, jeremie.horhant, kirelagin |
| Priority: | Normal | ||
| Version: | unspecified | ||
| Hardware: | All | ||
| OS: | Linux | ||
| URL: | http://thread.gmane.org/gmane.linux.gentoo.systemd/11 | ||
| Whiteboard: | |||
| Package list: | Runtime testing required: | --- | |
| Attachments: | Patch rev1 | ||
|
Description
Kacper Kowalik (Xarthisius) (RETIRED)
2013-02-18 16:29:50 UTC
It seems that this lacks proper documentation. Source code tells me a single ntp-units.d file can contain multiple providers, and the daemon simply concatenates the list from all files there.
I'd assume that an NTP daemon with 'native' systemd install should install ntp-units.d file along with the unit, correct? Assuming that, I'd say we could simply give systemd_dontpunit().
That function would install the unit using systemd_dounit() and add installed using name to ntp-units.d file. I'm not sure if the name of the latter file is really important, we could just put ${PN} there, I guess.
(In reply to comment #1) > It seems that this lacks proper documentation. Source code tells me a single > ntp-units.d file can contain multiple providers, and the daemon simply > concatenates the list from all files there. > Documentation is here: http://www.freedesktop.org/wiki/Software/systemd/timedated Basically, the order (lexograpically) of the files controls which service is started when you run "timedatectl set-ntp true". Hmm, I wonder if we actually want to decide on the order. If yes, then I think that's mostly fine. It would need a few changes though: 1) parameter checking. 2) I think we shouldn't append '.service', take the full name instead. 3) the description should note that 'listname' is expected to be NN-something. 4) the name... it should somehow explicitly state it's not a function 'just' installing a file but creating it. It seems to me that half a year of making design decisions is a bit too much for a function required by three packages to put one one-line file each… Patch sent to the ml for review: http://thread.gmane.org/gmane.linux.gentoo.systemd/11 Created attachment 361404 [details, diff]
Patch rev1
+ 22 Oct 2013; Michał Górny <mgorny@gentoo.org> systemd.eclass: + Add systemd_enable_ntpunit wrt bug #458132. |