summaryrefslogtreecommitdiff
path: root/net/chrony
diff options
context:
space:
mode:
authortron <tron@pkgsrc.org>2002-03-22 23:01:52 +0000
committertron <tron@pkgsrc.org>2002-03-22 23:01:52 +0000
commitbafd05dacd0d142267fd393dd6016f2abe79dddb (patch)
treeb11a0f6ae6e094dce09135016e5261e71906b860 /net/chrony
parent818e061eb00f3d94945a49be142e7a833a1caee2 (diff)
downloadpkgsrc-bafd05dacd0d142267fd393dd6016f2abe79dddb.tar.gz
Import new "chrony" package:
Daemon for maintaining the accuracy of computer clocks This packages was supplied by Juergen Hannken-Illjes in PR pkg/15729.
Diffstat (limited to 'net/chrony')
-rw-r--r--net/chrony/DESCR14
-rw-r--r--net/chrony/MESSAGE5
-rw-r--r--net/chrony/Makefile41
-rw-r--r--net/chrony/PLIST15
-rw-r--r--net/chrony/distinfo10
-rw-r--r--net/chrony/files/chronyd47
-rw-r--r--net/chrony/patches/patch-aa78
-rw-r--r--net/chrony/patches/patch-ab34
-rw-r--r--net/chrony/patches/patch-ac35
-rw-r--r--net/chrony/patches/patch-ad14
-rw-r--r--net/chrony/patches/patch-ae25
-rw-r--r--net/chrony/patches/patch-af9
12 files changed, 327 insertions, 0 deletions
diff --git a/net/chrony/DESCR b/net/chrony/DESCR
new file mode 100644
index 00000000000..dd39154b79f
--- /dev/null
+++ b/net/chrony/DESCR
@@ -0,0 +1,14 @@
+Chrony is a pair of programs for maintaining the accuracy of computer
+clocks.
+
+The reference time can be derived from either Network Time Protocol
+(NTP) servers (preferred), or wristwatch-and-keyboard (via chronyc).
+The main source of information about the Network Time Protocol is
+http://www.eecis.udel.edu/~ntp.
+
+It is designed so that it can work on computers which only have
+intermittent access to reference sources, for example computers which
+use a dial-up account to access the Internet. Of course, it will work
+on computers with permanent connections too.
+
+Chronyd can also operate as an RFC1305-compatible NTP server and peer.
diff --git a/net/chrony/MESSAGE b/net/chrony/MESSAGE
new file mode 100644
index 00000000000..ea18f8dd4bd
--- /dev/null
+++ b/net/chrony/MESSAGE
@@ -0,0 +1,5 @@
+Sample config files can be found here:
+
+ ${PREFIX}/share/examples/chrony
+
+Copy them to ${PREFIX}/etc and edit to suit your needs.
diff --git a/net/chrony/Makefile b/net/chrony/Makefile
new file mode 100644
index 00000000000..0d45273113a
--- /dev/null
+++ b/net/chrony/Makefile
@@ -0,0 +1,41 @@
+# $NetBSD: Makefile,v 1.1.1.1 2002/03/22 23:01:52 tron Exp $
+
+DISTNAME= chrony-1.17
+CATEGORIES= net
+MASTER_SITES= ftp://chrony.sunsite.dk/projects/chrony/
+
+MAINTAINER= hannken@netbsd.org
+HOMEPAGE= http://go.to/chrony
+COMMENT= Daemon for maintaining the accuracy of computer clocks
+
+HAS_CONFIGURE= YES
+CONFIGURE_ARGS+= --prefix=${LOCALBASE}
+
+EGDIR= ${LOCALBASE}/share/examples/chrony
+EGFILES= chrony.conf.example chrony.keys.example
+RCD_SCRIPTS= chronyd
+
+pre-install:
+ ${SED} ${FILES_SUBST_SED} \
+ ${FILESDIR}/chronyd > ${WRKDIR}/chronyd
+ for file in ${EGFILES}; do \
+ ${SED} ${FILES_SUBST_SED} \
+ ${WRKSRC}/examples/$${file} > \
+ ${WRKDIR}/$${file}; \
+ done
+
+post-install:
+ for script in ${RCD_SCRIPTS}; do \
+ ${INSTALL_SCRIPT} ${WRKDIR}/$${script} \
+ ${LOCALBASE}/etc/rc.d/$${script}; \
+ done
+ ${INSTALL_DATA_DIR} ${EGDIR}
+ for file in ${EGFILES}; do \
+ ${INSTALL_DATA} ${WRKDIR}/$${file} \
+ ${EGDIR}/$${file}; \
+ done
+
+.include "../../devel/readline/buildlink.mk"
+.include "../../devel/ncurses/buildlink.mk"
+.include "../../mk/bsd.pkg.install.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/net/chrony/PLIST b/net/chrony/PLIST
new file mode 100644
index 00000000000..3de9bb96d08
--- /dev/null
+++ b/net/chrony/PLIST
@@ -0,0 +1,15 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2002/03/22 23:01:52 tron Exp $
+bin/chronyc
+etc/rc.d/chronyd
+share/doc/chrony/COPYING
+share/doc/chrony/README
+share/doc/chrony/chrony.txt
+share/examples/chrony/chrony.conf.example
+share/examples/chrony/chrony.keys.example
+man/man1/chrony.1
+man/man1/chronyc.1
+man/man5/chrony.conf.5
+man/man8/chronyd.8
+sbin/chronyd
+@dirrm share/doc/chrony
+@dirrm share/examples/chrony
diff --git a/net/chrony/distinfo b/net/chrony/distinfo
new file mode 100644
index 00000000000..e032e7ef808
--- /dev/null
+++ b/net/chrony/distinfo
@@ -0,0 +1,10 @@
+$NetBSD: distinfo,v 1.1.1.1 2002/03/22 23:01:52 tron Exp $
+
+SHA1 (chrony-1.17.tar.gz) = 67615fb76a220f0119debae6cf46f2ab8f146976
+Size (chrony-1.17.tar.gz) = 283964 bytes
+SHA1 (patch-aa) = e3ff4b508be2451e9e6c451e354e86156a6580fa
+SHA1 (patch-ab) = d61a8b123ad471f263062f709ba852a420723b4a
+SHA1 (patch-ac) = b5a766e0db8fffbd66584ab6beb77cf8008786fd
+SHA1 (patch-ad) = 4d51086153119ba2d2a8691f13c02317f5b3c1f0
+SHA1 (patch-ae) = 2377448814346c85fe49468eec3e743e20accae8
+SHA1 (patch-af) = 1262d144bb74ad9b5b72d2715cd01a177d8fef1e
diff --git a/net/chrony/files/chronyd b/net/chrony/files/chronyd
new file mode 100644
index 00000000000..5a5937c95eb
--- /dev/null
+++ b/net/chrony/files/chronyd
@@ -0,0 +1,47 @@
+# PROVIDE: chronyd
+# REQUIRE: DAEMON
+
+. /etc/rc.subr
+
+name="chronyd"
+command="@PREFIX@/sbin/${name}"
+pidfile="/var/run/${name}.pid"
+required_files="@PREFIX@/etc/chrony.conf"
+extra_commands="online offline"
+online_cmd="chronyd_online"
+online_precmd="chronyd_precmd"
+offline_cmd="chronyd_offline"
+offline_precmd="chronyd_precmd"
+
+chronyd_precmd()
+{
+ local id kfile
+ id=`awk '$1 == "commandkey" { print $2 }' @PREFIX@/etc/chrony.conf`
+ if [ -z "$id" ]; then
+ echo "ERROR: no commandkey in @PREFIX@/etc/chrony.conf!"
+ exit 1
+ fi
+ kfile=`awk '$1 == "keyfile" { print $2 }' @PREFIX@/etc/chrony.conf`
+ if [ -z "$kfile" ]; then
+ echo "ERROR: no keyfile in @PREFIX@/etc/chrony.conf!"
+ exit 1
+ fi
+ chronyd_password=`awk '$1 == "'$id'" { print $2 }' $kfile`
+ if [ -z "$chronyd_password" ]; then
+ echo "ERROR: no key #$id in $kfile!"
+ exit 1
+ fi
+}
+
+chronyd_online()
+{
+ printf "password %s\nonline\n" $chronyd_password | @PREFIX@/bin/chronyc
+}
+
+chronyd_offline()
+{
+ printf "password %s\noffline\n" $chronyd_password | @PREFIX@/bin/chronyc
+}
+
+load_rc_config $name
+run_rc_command "$1"
diff --git a/net/chrony/patches/patch-aa b/net/chrony/patches/patch-aa
new file mode 100644
index 00000000000..15757a496f7
--- /dev/null
+++ b/net/chrony/patches/patch-aa
@@ -0,0 +1,78 @@
+$NetBSD: patch-aa,v 1.1.1.1 2002/03/22 23:01:52 tron Exp $
+
+--- Makefile.in.orig Sun Feb 17 23:23:12 2002
++++ Makefile.in
+@@ -43,7 +43,7 @@
+
+ DEFS=@SYSDEFS@
+
+-CFLAGS = $(CCWARNFLAGS) $(OPTFLAGS)
++CFLAGS = $(CCWARNFLAGS) $(OPTFLAGS) -DDEFAULT_CONF_FILE=\"$(INSTALL_PREFIX)/etc/chrony.conf\"
+
+ # Until we have a main procedure we can link, just build object files
+ # to test compilation
+@@ -51,10 +51,10 @@
+ all : chronyd chronyc
+
+ chronyd : $(OBJS) $(EXTRA_OBJS)
+- $(CC) $(OPTFLAGS) -o chronyd $(OBJS) $(EXTRA_OBJS) $(LIBS) $(EXTRA_LIBS)
++ $(CC) $(LDFLAGS) $(OPTFLAGS) -o chronyd $(OBJS) $(EXTRA_OBJS) $(LIBS) $(EXTRA_LIBS)
+
+ chronyc : $(CLI_OBJS)
+- $(CC) $(OPTFLAGS) -o chronyc $(CLI_OBJS) @READLINE_LINK@ $(LIBS) $(EXTRA_CLI_LIBS)
++ $(CC) $(LDFLAGS) $(OPTFLAGS) -o chronyc $(CLI_OBJS) @READLINE_LINK@ $(LIBS) $(EXTRA_CLI_LIBS)
+
+ client.o : client.c
+ $(CC) $(CFLAGS) $(DEFS) @READLINE_COMPILE@ -c $<
+@@ -79,37 +79,38 @@
+ [ -d $(INSTALL_PREFIX) ] || mkdir $(INSTALL_PREFIX)
+ [ -d $(INSTALL_PREFIX)/sbin ] || mkdir $(INSTALL_PREFIX)/sbin
+ [ -d $(INSTALL_PREFIX)/bin ] || mkdir $(INSTALL_PREFIX)/bin
+- [ -d $(INSTALL_PREFIX)/doc ] || mkdir $(INSTALL_PREFIX)/doc
++ [ -d $(INSTALL_PREFIX)/share ] || mkdir $(INSTALL_PREFIX)/share
+ [ -d $(INSTALL_PREFIX)/man ] || mkdir $(INSTALL_PREFIX)/man
++ [ -d $(INSTALL_PREFIX)/share/doc ] || mkdir $(INSTALL_PREFIX)/share/doc
+ [ -d $(INSTALL_PREFIX)/man/man1 ] || mkdir $(INSTALL_PREFIX)/man/man1
+ [ -d $(INSTALL_PREFIX)/man/man5 ] || mkdir $(INSTALL_PREFIX)/man/man5
+ [ -d $(INSTALL_PREFIX)/man/man8 ] || mkdir $(INSTALL_PREFIX)/man/man8
+- [ -d $(INSTALL_PREFIX)/doc/chrony ] || mkdir $(INSTALL_PREFIX)/doc/chrony
++ [ -d $(INSTALL_PREFIX)/share/doc/chrony ] || mkdir $(INSTALL_PREFIX)/share/doc/chrony
+ cp chronyd $(INSTALL_PREFIX)/sbin/chronyd
+ chown root $(INSTALL_PREFIX)/sbin/chronyd
+ chmod 555 $(INSTALL_PREFIX)/sbin/chronyd
+ cp chronyc $(INSTALL_PREFIX)/bin/chronyc
+ chown root $(INSTALL_PREFIX)/bin/chronyc
+ chmod 555 $(INSTALL_PREFIX)/bin/chronyc
+- cp chrony.txt $(INSTALL_PREFIX)/doc/chrony/chrony.txt
+- chown root $(INSTALL_PREFIX)/doc/chrony/chrony.txt
+- chmod 444 $(INSTALL_PREFIX)/doc/chrony/chrony.txt
+- cp COPYING $(INSTALL_PREFIX)/doc/chrony/COPYING
+- chown root $(INSTALL_PREFIX)/doc/chrony/COPYING
+- chmod 444 $(INSTALL_PREFIX)/doc/chrony/COPYING
+- cp README $(INSTALL_PREFIX)/doc/chrony/README
+- chown root $(INSTALL_PREFIX)/doc/chrony/README
+- chmod 444 $(INSTALL_PREFIX)/doc/chrony/README
++ cp chrony.txt $(INSTALL_PREFIX)/share/doc/chrony/chrony.txt
++ chown root $(INSTALL_PREFIX)/share/doc/chrony/chrony.txt
++ chmod 444 $(INSTALL_PREFIX)/share/doc/chrony/chrony.txt
++ cp COPYING $(INSTALL_PREFIX)/share/doc/chrony/COPYING
++ chown root $(INSTALL_PREFIX)/share/doc/chrony/COPYING
++ chmod 444 $(INSTALL_PREFIX)/share/doc/chrony/COPYING
++ cp README $(INSTALL_PREFIX)/share/doc/chrony/README
++ chown root $(INSTALL_PREFIX)/share/doc/chrony/README
++ chmod 444 $(INSTALL_PREFIX)/share/doc/chrony/README
+ cp chrony.1 $(INSTALL_PREFIX)/man/man1
+ chown root $(INSTALL_PREFIX)/man/man1/chrony.1
+ chmod 444 $(INSTALL_PREFIX)/man/man1/chrony.1
+ cp chronyc.1 $(INSTALL_PREFIX)/man/man1
+ chown root $(INSTALL_PREFIX)/man/man1/chronyc.1
+ chmod 444 $(INSTALL_PREFIX)/man/man1/chronyc.1
+- cp chronyd.8 $(INSTALL_PREFIX)/man/man8
++ sed 's|@PREFIX@|$(INSTALL_PREFIX)|g' chronyd.8 > $(INSTALL_PREFIX)/man/man8/chronyd.8
+ chown root $(INSTALL_PREFIX)/man/man8/chronyd.8
+ chmod 444 $(INSTALL_PREFIX)/man/man8/chronyd.8
+- cp chrony.conf.5 $(INSTALL_PREFIX)/man/man5
++ sed 's|@PREFIX@|$(INSTALL_PREFIX)|g' chrony.conf.5 > $(INSTALL_PREFIX)/man/man5/chrony.conf.5
+ chown root $(INSTALL_PREFIX)/man/man5/chrony.conf.5
+ chmod 444 $(INSTALL_PREFIX)/man/man5/chrony.conf.5
+
diff --git a/net/chrony/patches/patch-ab b/net/chrony/patches/patch-ab
new file mode 100644
index 00000000000..3b167f16626
--- /dev/null
+++ b/net/chrony/patches/patch-ab
@@ -0,0 +1,34 @@
+$NetBSD: patch-ab,v 1.1.1.1 2002/03/22 23:01:52 tron Exp $
+
+--- chrony.conf.5.orig Sun Feb 17 23:23:12 2002
++++ chrony.conf.5
+@@ -3,7 +3,7 @@
+ chrony.conf \- chronyd configuration file
+
+ .SH SYNOPSIS
+-.B /etc/chrony.conf
++.B @PREFIX@/etc/chrony.conf
+
+ .SH DESCRIPTION
+ \fIchrony\fR is a pair of programs for maintaining the accuracy of computer
+@@ -12,7 +12,7 @@
+
+ Assuming that you have found some servers, you need to set up a
+ configuration file to run \fIchrony\fR. The (compiled-in) default location
+-for this file is \fB/etc/chrony.conf\fR. Assuming that your ntp servers
++for this file is \fB@PREFIX@/etc/chrony.conf\fR. Assuming that your ntp servers
+ are called `a.b.c' and `d.e.f', your \fBchrony.conf\fR file could contain
+ as a minimum
+
+@@ -29,9 +29,9 @@
+ server a.b.c
+ server d.e.f
+ server g.h.i
+- keyfile /etc/chrony.keys
++ keyfile @PREFIX@/etc/chrony.keys
+ commandkey 1
+- driftfile /etc/chrony.drift
++ driftfile /var/db/chrony.drift
+
+
+ .SH "SEE ALSO"
diff --git a/net/chrony/patches/patch-ac b/net/chrony/patches/patch-ac
new file mode 100644
index 00000000000..2c1130e78fc
--- /dev/null
+++ b/net/chrony/patches/patch-ac
@@ -0,0 +1,35 @@
+$NetBSD: patch-ac,v 1.1.1.1 2002/03/22 23:01:52 tron Exp $
+
+--- chronyd.8.orig Sun Feb 17 23:23:14 2002
++++ chronyd.8
+@@ -24,10 +24,10 @@
+ priviliges.
+
+ If \fBchronyd\fR has been installed to its default location
+-\fI/usr/local/sbin/chronyd\fR, starting it is simply a matter of entering the
++\fI@PREFIX@/sbin/chronyd\fR, starting it is simply a matter of entering the
+ command:
+
+-\fI/usr/local/sbin/chronyd\fR
++\fI@PREFIX@/sbin/chronyd\fR
+
+ Information messages and warnings will be logged to syslog.
+
+@@ -43,7 +43,7 @@
+ .TP
+ \fB\-f\fR \fIconf-file\fR
+ This option can be used to specify an alternate location for the
+-configuration file (default \fI/etc/chrony.conf\fR).
++configuration file (default \fI@PREFIX@/etc/chrony.conf\fR).
+ .TP
+ .B \-r
+ This option will reload sample histories for each of the servers being used.
+@@ -83,7 +83,7 @@
+ This option displays \fBchronyd\fR's version number to the terminal and exits
+
+ .SH FILES
+-\fI/etc/chrony.conf\fR
++\fI@PREFIX@/etc/chrony.conf\fR
+
+ .SH VERSION
+ Version 1.17
diff --git a/net/chrony/patches/patch-ad b/net/chrony/patches/patch-ad
new file mode 100644
index 00000000000..629b3478415
--- /dev/null
+++ b/net/chrony/patches/patch-ad
@@ -0,0 +1,14 @@
+$NetBSD: patch-ad,v 1.1.1.1 2002/03/22 23:01:52 tron Exp $
+
+--- conf.c.orig Sun Feb 17 23:23:15 2002
++++ conf.c
+@@ -45,7 +45,9 @@
+
+ /* ================================================== */
+
++#ifndef DEFAULT_CONF_FILE
+ #define DEFAULT_CONF_FILE "/etc/chrony.conf"
++#endif
+
+ /* ================================================== */
+ /* Forward prototypes */
diff --git a/net/chrony/patches/patch-ae b/net/chrony/patches/patch-ae
new file mode 100644
index 00000000000..fafe7447691
--- /dev/null
+++ b/net/chrony/patches/patch-ae
@@ -0,0 +1,25 @@
+$NetBSD: patch-ae,v 1.1.1.1 2002/03/22 23:01:52 tron Exp $
+
+--- examples/chrony.conf.example.orig Sun Feb 17 23:23:19 2002
++++ examples/chrony.conf.example
+@@ -3,5 +3,5 @@
+ #
+ # This is an example chrony configuration file. You should copy it to
+-# /etc/chrony.conf after uncommenting and editing the options that you
++# @PREFIX@/etc/chrony.conf after uncommenting and editing the options that you
+ # want to enable. I have not included the more obscure options. Refer
+ # to the documentation for these.
+@@ -91,5 +91,5 @@
+ # generally want this, so it is uncommented.
+
+-driftfile /etc/chrony.drift
++driftfile /var/db/chrony.drift
+
+ # If you want to use the program called chronyc to configure aspects of
+@@ -100,5 +100,5 @@
+ # assumed by default.
+
+-keyfile /etc/chrony.keys
++keyfile @PREFIX@/etc/chrony.keys
+
+ # Tell chronyd which numbered key in the file is used as the password
diff --git a/net/chrony/patches/patch-af b/net/chrony/patches/patch-af
new file mode 100644
index 00000000000..72c9a253b21
--- /dev/null
+++ b/net/chrony/patches/patch-af
@@ -0,0 +1,9 @@
+$NetBSD: patch-af,v 1.1.1.1 2002/03/22 23:01:52 tron Exp $
+
+--- examples/chrony.keys.example.orig Sun Feb 17 23:23:19 2002
++++ examples/chrony.keys.example
+@@ -3,3 +3,3 @@
+ #
+-# This is an example chrony keys file. You should copy it to /etc/chrony.keys
++# This is an example chrony keys file. You should copy it to @PREFIX@/etc/chrony.keys
+ # after editing it to set up the key(s) you want to use. In most situations,