#50121 closed submission (fixed)
submission: chrony NTP server
Reported by: | florian@… | Owned by: | macports-tickets@… |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | Cc: | mojca (Mojca Miklavec), l2dy (Zero King), ldldr | |
Port: | chrony |
Description
Most distributions today use chrony as NTP server because it performs better on systems that do not run continuously or on systems which are only temporarily connected to the internet (e.g. notebooks or dial-up connections) whereas ntpd needs regular polling of the reference to work well. See http://chrony.tuxfamily.org/faq.html and http://chrony.tuxfamily.org/comparison.html for more.
This submission includes a helper application which I designed to monitor the network reachability and which tells chronyd when the internet link is available or not using the mechanism described at http://chrony.tuxfamily.org/manual.html#Infrequent-connection.
A graphical front end which can show the overall server performance (tracking) and the state of individual remote time servers is available at http://whatroute.net/chronycontrol.html
This submission contains the following files:
sysutils/chrony/Portfile sysutils/chrony/files/chrony-netchange.in sysutils/chrony/files/chrony-netchanged.c sysutils/chrony/files/chrony.conf.in
Attachments (5)
Change History (28)
Changed 9 years ago by florian@…
Attachment: | chrony.conf.in added |
---|
Changed 9 years ago by florian@…
Attachment: | chrony-netchanged.c added |
---|
Changed 9 years ago by florian@…
Attachment: | chrony-netchange.in added |
---|
comment:1 Changed 9 years ago by mf2k (Frank Schima)
Keywords: | haspatch maintainer removed |
---|
comment:2 follow-up: 3 Changed 9 years ago by ryandesign (Ryan Carsten Schmidt)
Changed 9 years ago by florian@…
comment:3 Changed 9 years ago by florian@…
Thanks for your comments. I addressed your points and replaced the attached Portfile.
Regarding the usage of startupitem.start
and startupitem.stop
: I know that startupitem.executable
is preferred. It is however unclear to me how two independent applications (chronyd and chrony-netchanged) can be started at once with startupitem.executable
. Can you give me a hint?
comment:5 Changed 7 years ago by l2dy (Zero King)
Cc: | l2dy added |
---|
comment:7 follow-up: 8 Changed 7 years ago by ldldr
comment:8 Changed 7 years ago by l2dy (Zero King)
comment:9 Changed 7 years ago by ldldr
Cc: | ldldr added |
---|
comment:10 Changed 7 years ago by ldldr
Thanks, I forgot. I prefer to be contacted via GutHub only:
maintainers @ldldr openmaintainer
comment:11 follow-up: 12 Changed 7 years ago by l2dy (Zero King)
This reinplace didn't change anything, maybe the pid path was moved to another file?
---> Patching conf.c: s|/var/run/chronyd.pid|/opt/local/var/run/chrony/chronyd.pid| DEBUG: Executing reinplace: /usr/bin/sed s|/var/run/chronyd.pid|/opt/local/var/run/chrony/chronyd.pid| </opt/local/var/macports/build/_Users_travis_build_macports_macports-ports_sysutils_chrony/chrony/work/chrony-3.2/conf.c >@file11 Warning: reinplace s|/var/run/chronyd.pid|/opt/local/var/run/chrony/chronyd.pid| didn't change anything in /opt/local/var/macports/build/_Users_travis_build_macports_macports-ports_sysutils_chrony/chrony/work/chrony-3.2/conf.c
comment:12 Changed 7 years ago by ldldr
Replying to l2dy:
This reinplace didn't change anything, maybe the pid path was moved to another file?
Thanks for the hint, you are a sharp-eyed reviewer. This reinplace is obsolete since we can use the new configure command line argument --with-pidfile
.
comment:13 follow-up: 14 Changed 7 years ago by l2dy (Zero King)
--- a/sysutils/chrony/Portfile +++ b/sysutils/chrony/Portfile @@ -46,7 +46,7 @@ post-build { post-destroot { xinstall -m 755 ${worksrcpath}/chrony-netchanged ${destroot}${prefix}/sbin/chrony-netchanged - xinstall -m 755 -d ${destroot}${prefix}/etc/${name}/${name} + xinstall -m 755 -d ${destroot}${prefix}/etc/${name} xinstall -m 0644 ${filespath}/${name}.conf.in \ ${destroot}${prefix}/etc/${name}/${name}.conf-dist reinplace "s|@PREFIX@|${prefix}|" ${destroot}${prefix}/etc/${name}/${name}.conf-dist
We don't need ${prefix}/etc/chrony/chrony/
, right?
comment:14 Changed 7 years ago by ldldr
comment:15 Changed 7 years ago by mf2k (Frank Schima)
Comments on this latest version:
- The
# $Id$
line is no longer used since we switched to GitHub, so it should be deleted. - The homepage redirects to https and should be updated.
- Add
size
to checksums.
comment:16 Changed 7 years ago by ldldr
Done. Btw, the size
argument is undocumented in https://guide.macports.org/chunked/reference.phases.html#reference.phases.checksum
comment:17 Changed 7 years ago by l2dy (Zero King)
According to https://developer.apple.com/documentation/systemconfiguration/1514903-scnetworkreachabilitysetcallback?language=objc, the callback is only called when the reachability of the target changes. So until connectivity changes, pool.ntp.org stays "offline" (with default chrony.conf).
chronyc> activity 200 OK 0 sources online 1 sources offline 0 sources doing burst (return to online) 0 sources doing burst (return to offline) 0 sources with unknown address
comment:18 Changed 6 years ago by lbschenkel (Leonardo Brondani Schenkel)
I submitted this port in commit https://github.com/macports/macports-ports/commit/b73103922c68469183e21080b97de3edbf6335fa without realizing that this ticket existed. Sorry about that. Should I close this?
comment:19 Changed 6 years ago by mf2k (Frank Schima)
Just add the following line to the commit message of your PR:
Closes: https://trac.macports.org/ticket/50121
comment:20 Changed 6 years ago by lbschenkel (Leonardo Brondani Schenkel)
Yes, I understand that, but I was made aware of this ticket after my commit was pushed to master. Are you suggesting an empty commit?
comment:21 Changed 6 years ago by lbschenkel (Leonardo Brondani Schenkel)
I did not mean to take over the port, btw. Is anybody still interested in maintainership?
comment:22 Changed 6 years ago by mf2k (Frank Schima)
Resolution: | → fixed |
---|---|
Status: | new → closed |
Oh sorry. I will close this ticket then.
comment:23 Changed 6 years ago by mf2k (Frank Schima)
Florian: Please let us know if you want to be added as a co-maintainer.
Thanks. Some comments:
$Id$
line should be$Id$
, not$Id:$
.PortSystem 1.0
line.system
invocation in your post-build block should use the-W
argument to specify the working directory rather than callingcd
manually.system
invocation in your post-build block is not building for the requested architecture. You should add[get_canonical_archflags]
to the flags sent to the compiler.destroot.keepdirs
statements should usually be made outside of a phase.startupitem.start
andstartupitem.stop
? Usingstartupitem.executable
is preferable.livecheck.url
has a doubled slash.