Opened 8 years ago

Closed 6 years ago

Last modified 6 years ago

#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)

chrony.conf.in (2.1 KB) - added by florian@… 8 years ago.
chrony-netchanged.c (1.9 KB) - added by florian@… 8 years ago.
chrony-netchange.in (830 bytes) - added by florian@… 8 years ago.
Portfile (4.0 KB) - added by florian@… 8 years ago.
Portfile.2 (3.9 KB) - added by ldldr 6 years ago.
Portfile v. 3.2

Download all attachments as: .zip

Change History (28)

Changed 8 years ago by florian@…

Attachment: chrony.conf.in added

Changed 8 years ago by florian@…

Attachment: chrony-netchanged.c added

Changed 8 years ago by florian@…

Attachment: chrony-netchange.in added

comment:1 Changed 8 years ago by mf2k (Frank Schima)

Keywords: haspatch maintainer removed

comment:2 Changed 8 years ago by ryandesign (Ryan Carsten Schmidt)

Thanks. Some comments:

  • The $Id$ line should be $Id$, not $Id:$.
  • There should be a blank line after the PortSystem 1.0 line.
  • The system invocation in your post-build block should use the -W argument to specify the working directory rather than calling cd manually.
  • The 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.
  • Must you use startupitem.start and startupitem.stop? Using startupitem.executable is preferable.
  • Your livecheck.url has a doubled slash.

Changed 8 years ago by florian@…

Attachment: Portfile added

comment:3 in reply to:  2 Changed 8 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:4 Changed 8 years ago by mojca (Mojca Miklavec)

Cc: mojca@… added

Cc Me!

comment:5 Changed 7 years ago by l2dy (Zero King)

Cc: l2dy added

comment:6 Changed 7 years ago by l2dy (Zero King)

Can you update this to 3.2?

comment:7 in reply to:  6 ; Changed 6 years ago by ldldr

Replying to l2dy:

Can you update this to 3.2?

Done.

comment:8 in reply to:  7 Changed 6 years ago by l2dy (Zero King)

Replying to ldldr:

Replying to l2dy:

Can you update this to 3.2?

Done.

If you're the ticket reporter, please add your GitHub handle to the maintainer line. e.g. maintainers {eprofs.de:florian @ldldr} openmaintainer

comment:9 Changed 6 years ago by ldldr

Cc: ldldr added

comment:10 Changed 6 years ago by ldldr

Thanks, I forgot. I prefer to be contacted via GutHub only:

maintainers @ldldr openmaintainer

comment:11 Changed 6 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 in reply to:  11 Changed 6 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 Changed 6 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 in reply to:  13 Changed 6 years ago by ldldr

Replying to l2dy:

We don't need ${prefix}/etc/chrony/chrony/, right?

Correct. Copy-paste-mistake...

comment:15 Changed 6 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.

Changed 6 years ago by ldldr

Attachment: Portfile.2 added

Portfile v. 3.2

comment:17 Changed 6 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: newclosed

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.

Note: See TracTickets for help on using tickets.