Bug 174263 - New port: net/chrony - System Clock Synchronization Client and Server
Summary: New port: net/chrony - System Clock Synchronization Client and Server
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Steve Wills
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-07 15:20 UTC by Masaki TAGAWA
Modified: 2014-04-08 18:16 UTC (History)
1 user (show)

See Also:


Attachments
chrony.shar (7.32 KB, text/plain)
2012-12-07 15:20 UTC, Masaki TAGAWA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Masaki TAGAWA 2012-12-07 15:20:00 UTC
Chrony is a pair of programs which are used to maintain the accuracy of the
system clock on a computer. The two programs are called chronyd and chronyc.

Chronyd is a daemon which runs in background on the system. It obtains
measurements via the network of the system clock's offset relative to time
servers on other systems and adjusts the system time accordingly. For isolated
systems, the user can periodically enter the correct time by hand (using
		Chronyc). In either case, Chronyd determines the rate at which the computer
gains or loses time, and compensates for this. Chronyd implements the NTP 
protocol and can act as either a client or a server.

Chronyc provides a user interface to Chronyd for monitoring its performance and
configuring various settings. It can do so while running on the same computer
as the Chronyd instance it is controlling or a different computer.

WWW: http://chrony.tuxfamily.org/
Comment 1 Edwin Groothuis freebsd_committer 2012-12-07 15:20:09 UTC
Responsible Changed
From-To: freebsd-ports-bugs->swills

swills@ wants his PRs (via the GNATS Auto Assign Tool)
Comment 2 dfilter service freebsd_committer 2014-04-08 18:07:06 UTC
Author: danfe
Date: Tue Apr  8 17:06:58 2014
New Revision: 350635
URL: http://svnweb.freebsd.org/changeset/ports/350635
QAT: https://qat.redports.org/buildarchive/r350635/

Log:
  Add a port of system clock synchronization client and server (chrony).
  
  WWW: http://chrony.tuxfamily.org/
  
  PR:	ports/174263

Added:
  head/net/chrony/
  head/net/chrony/Makefile   (contents, props changed)
  head/net/chrony/distinfo   (contents, props changed)
  head/net/chrony/files/
  head/net/chrony/files/chronyd.in   (contents, props changed)
  head/net/chrony/files/patch-examples-chrony.conf.example   (contents, props changed)
  head/net/chrony/files/patch-examples-chrony.conf.example2   (contents, props changed)
  head/net/chrony/pkg-descr   (contents, props changed)
  head/net/chrony/pkg-message   (contents, props changed)
  head/net/chrony/pkg-plist   (contents, props changed)
Modified:
  head/net/Makefile

Modified: head/net/Makefile
==============================================================================
--- head/net/Makefile	Tue Apr  8 16:50:13 2014	(r350634)
+++ head/net/Makefile	Tue Apr  8 17:06:58 2014	(r350635)
@@ -67,6 +67,7 @@
     SUBDIR += cagibi
     SUBDIR += callweaver
     SUBDIR += ccxstream
+    SUBDIR += chrony
     SUBDIR += citrix_ica
     SUBDIR += clamz
     SUBDIR += click

Added: head/net/chrony/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/chrony/Makefile	Tue Apr  8 17:06:58 2014	(r350635)
@@ -0,0 +1,41 @@
+# Created by: Masaki TAGAWA <masaki@club.kyutech.ac.jp>
+# $FreeBSD$
+
+PORTNAME=	chrony
+PORTVERSION=	1.29.1
+CATEGORIES=	net
+MASTER_SITES=	http://download.tuxfamily.org/chrony/
+
+MAINTAINER=	masaki@club.kyutech.ac.jp
+COMMENT=	System clock synchronization client and server
+
+LICENSE=	GPLv2
+
+# XXX: should theoretically work on others, but at least on PowerPC it dies
+# with ``Could not open any NTP socket'' message :(
+ONLY_FOR_ARCHS=	i386 amd64
+
+USES=		gmake
+HAS_CONFIGURE=	yes
+CONFIGURE_ARGS=	--sysconfdir=${PREFIX}/etc --mandir=${MANPREFIX}/man \
+		--datarootdir=${DATADIR} --docdir=${DOCSDIR}
+USE_RC_SUBR=	chronyd
+
+PORTDOCS=	README chrony.txt
+
+# XXX: there are also other potentially useful options worth looking into:
+#  --without-nss        Don't use NSS even if it is available
+#  --without-tomcrypt   Don't use libtomcrypt even if it is available
+#  --disable-pps        Disable PPS API support
+OPTIONS_DEFINE=		IPV6
+OPTIONS_DEFAULT=	IPV6
+
+IPV6_CATEGORIES=	ipv6
+IPV6_CONFIGURE_OFF=	--disable-ipv6
+
+post-install:
+.for f in chrony.conf.example chrony.conf.example2 chrony.keys.example
+	${INSTALL_DATA} ${WRKSRC}/examples/${f} ${STAGEDIR}${PREFIX}/etc
+.endfor
+
+.include <bsd.port.mk>

Added: head/net/chrony/distinfo
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/chrony/distinfo	Tue Apr  8 17:06:58 2014	(r350635)
@@ -0,0 +1,2 @@
+SHA256 (chrony-1.29.1.tar.gz) = 658c9bb4d8c8d8ec7d0908429aa266e5f8413ba86bd4acbfd2f9669f6065af27
+SIZE (chrony-1.29.1.tar.gz) = 392889

Added: head/net/chrony/files/chronyd.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/chrony/files/chronyd.in	Tue Apr  8 17:06:58 2014	(r350635)
@@ -0,0 +1,19 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+# PROVIDE: chronyd
+# REQUIRE: DAEMON
+#
+
+. /etc/rc.subr
+
+name=chronyd
+rcvar=chronyd_enable
+command=%%PREFIX%%/sbin/${name}
+
+load_rc_config ${name}
+
+: ${chronyd_enable="NO"}
+
+run_rc_command "$1"

Added: head/net/chrony/files/patch-examples-chrony.conf.example
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/chrony/files/patch-examples-chrony.conf.example	Tue Apr  8 17:06:58 2014	(r350635)
@@ -0,0 +1,45 @@
+--- examples/chrony.conf.example.orig	2014-01-31 20:12:59 +0800
++++ examples/chrony.conf.example
+@@ -42,6 +42,13 @@
+ # Failing that, there are a lot of public NTP servers.  There is a list
+ # you can access at http://support.ntp.org/bin/view/Servers/WebHome or
+ # you can use servers from the pool.ntp.org project.
++#
++# The option `iburst' is used for faster initial synchronization.
++
++server 0.freebsd.pool.ntp.org iburst
++server 1.freebsd.pool.ntp.org iburst
++server 2.freebsd.pool.ntp.org iburst
++#server 3.freebsd.pool.ntp.org iburst
+ 
+ ! server 0.pool.ntp.org iburst
+ ! server 1.pool.ntp.org iburst
+@@ -98,7 +105,7 @@ driftfile /var/lib/chrony/drift
+ # exchanges between cooperating machines.)  Again, this option is
+ # assumed by default.
+ 
+-keyfile /etc/chrony.keys
++keyfile /usr/local/etc/chrony.keys
+ 
+ # Tell chronyd which numbered key in the file is used as the password
+ # for chronyc. (You can pick any integer up to 2**32-1.  '1' is just a
+@@ -129,7 +136,7 @@ commandkey 1
+ # still running and bail out.  If you want to change the path to the PID
+ # file, uncomment this line and edit it.  The default path is shown.
+ 
+-! pidfile /var/run/chronyd.pid
++pidfile /var/run/chronyd.pid
+ 
+ #######################################################################
+ ### INITIAL CLOCK CORRECTION
+@@ -152,8 +159,8 @@ commandkey 1
+ # produce some graphs of your system's timekeeping performance, or you
+ # need help in debugging a problem.
+ 
+-! logdir /var/log/chrony
+-! log measurements statistics tracking
++logdir /var/log/chrony
++log measurements statistics tracking
+ 
+ # If you have real time clock support enabled (see below), you might want
+ # this line instead:

Added: head/net/chrony/files/patch-examples-chrony.conf.example2
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/chrony/files/patch-examples-chrony.conf.example2	Tue Apr  8 17:06:58 2014	(r350635)
@@ -0,0 +1,33 @@
+--- examples/chrony.conf.example2.orig	2014-01-31 20:12:59 +0800
++++ examples/chrony.conf.example2
+@@ -1,9 +1,17 @@
+ # Use public servers from the pool.ntp.org project.
+ # Please consider joining the pool (http://www.pool.ntp.org/join.html).
+-server 0.pool.ntp.org iburst
+-server 1.pool.ntp.org iburst
+-server 2.pool.ntp.org iburst
+-server 3.pool.ntp.org iburst
++#
++# The option `iburst' is used for faster initial synchronization.
++#
++server 0.freebsd.pool.ntp.org iburst
++server 1.freebsd.pool.ntp.org iburst
++server 2.freebsd.pool.ntp.org iburst
++#server 3.freebsd.pool.ntp.org iburst
++
++#server 0.pool.ntp.org iburst
++#server 1.pool.ntp.org iburst
++#server 2.pool.ntp.org iburst
++#server 3.pool.ntp.org iburst
+ 
+ # Ignore stratum in source selection.
+ stratumweight 0
+@@ -28,7 +36,7 @@ bindcmdaddress ::1
+ # Serve time even if not synchronized to any NTP server.
+ #local stratum 10
+ 
+-keyfile /etc/chrony.keys
++keyfile /usr/local/etc/chrony.keys
+ 
+ # Specify the key used as password for chronyc.
+ commandkey 1

Added: head/net/chrony/pkg-descr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/chrony/pkg-descr	Tue Apr  8 17:06:58 2014	(r350635)
@@ -0,0 +1,16 @@
+chrony is a pair of programs which are used to maintain the accuracy of the
+system clock on a computer; the two programs are called chronyd and chronyc.
+
+chronyd is a daemon which runs in background on the system.  It obtains
+measurements via the network of the system clock's offset relative to time
+servers on other systems and adjusts the system time accordingly.  For
+isolated systems, the user can periodically enter the correct time by hand
+(using chronyc).  In either case, chronyd determines the rate at which the
+computer gains or loses time, and compensates for this.  chronyd implements
+the NTP protocol and can act as either a client or a server.
+
+chronyc provides a user interface to chronyd for monitoring its performance
+and configuring various settings.  It can do so while running on the same
+computer as the chronyd instance it is controlling or a different computer.
+
+WWW: http://chrony.tuxfamily.org/

Added: head/net/chrony/pkg-message
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/chrony/pkg-message	Tue Apr  8 17:06:58 2014	(r350635)
@@ -0,0 +1,5 @@
+Unfortunately, this software has shameful history of several vulnerabilities
+previously discovered.  FreeBSD Project cannot guarantee that this spree had
+come to an end.  It is further complicated, as chronyd(8) requires superuser
+permissions to operate; please type ``make deinstall'' to deinstall the port
+if tight security is a concern.

Added: head/net/chrony/pkg-plist
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/chrony/pkg-plist	Tue Apr  8 17:06:58 2014	(r350635)
@@ -0,0 +1,10 @@
+bin/chronyc
+etc/chrony.conf.example
+etc/chrony.conf.example2
+etc/chrony.keys.example
+man/man1/chrony.1.gz
+man/man1/chronyc.1.gz
+man/man5/chrony.conf.5.gz
+man/man8/chronyd.8.gz
+@mode 4755
+sbin/chronyd
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 3 Alexey Dokuchaev freebsd_committer 2014-04-08 18:13:24 UTC
State Changed
From-To: open->closed

Thanks; port was added as of r350635 (with modifications and the latest 
version).  Sorry swills@, I needed it to debug clock drifting issues on 
PowerPC; hope you don't mind that I've committed your PR.