Subject: CVS commit: pkgsrc/net/openntpd
To: None <>
From: Peter Postma <>
List: pkgsrc-changes
Date: 06/28/2005 17:13:25
Module Name:	pkgsrc
Committed By:	peter
Date:		Tue Jun 28 17:13:25 UTC 2005

Modified Files:
	pkgsrc/net/openntpd: Makefile distinfo

Log Message:
Update to openntpd-3.7p1.

 - (dtucker) [ defines.h] Add flags to allow ntpd to build on
   AIX, mostly from tomwilliams14 at
 - (dtucker) [contrib/redhat/openntpd.spec] Specfile update from Bernhard
   Weisshuhn (bkw at weisshuhn de):
  - Use 'ntp' (not _ntp) with id 38 as privsep user
  - Add openssl-devel to Build-Requires
  - mkdir -p /var/empty/ntpd
  - Added ChangeLog, README LICENCE and CREDITS as docfiles
  - removed fluff, use %{_variables} where appropriate
 - (dtucker) [] Fall back to builtin arc4random if we don't find
   a usable OpenSSL.
 - (dtucker) [README] Update known-working platforms and misc info.
 - (dtucker) [README] Add CVS Id.
 - (dtucker) [ includes.h] Check for and include arpa/nameser.h,
   fixes build on Solaris 2.5.1.
 - (dtucker) [version.h contrib/redhat/openntpd.spec] Enter 3.7p1.

 - (dtucker) OpenBSD CVS Sync
  - 2005/01/27 15:44:00
    [client.c ntp.c ntpd.h]
    Scale query interval by the overall offset not per-peer offset, so we
    don't query outliers more often than any other server.  ok henning@
  - 2005/01/28 13:01:32
    [client.c server.c]
    Make network unreachable errors non-fatal; ok henning@
  - 2005/01/28 13:32:24
    fatal() if daemon() fails, Alexander von Gernler <>
  - 2005/01/28 13:37:20
    [client.c ntp.c ntpd.h]
    Simplify interval scaling and randomize query intervals; ok henning@
  - 2005/02/02 19:52:32
    usage() is __dead
    pt out by Alexander v Gernler
  - 2005/02/02 19:57:09
    [buffer.c ntpd.h]
    buffer structs and API ssize_t -> size_t; from bgpd
  - 2005/02/02 20:03:52
  - 2005/02/03 11:53:33
    [client.c ntpd.h]
    Implement simple duplicate suppression of peer errors; ok henning@
  - 2005/02/21 18:58:43
    fix an error message
  - 2005/02/22 13:03:24
    when sending a query already returns a failure, we're not going to see
    a reply to that query.
    if we get errors for all queries and the initial settime() is still due
    and thus the parent process still waits (not yet daemonized!), send an
    IMSG_SETTIME with offset 0.
    shortens the delay dramatically when you boot without network
    idea from a discussion with theo
  - 2005/03/06 19:36:52
    fix error message, Benedikt Steinbusch <>
  - 2005/03/08 13:31:40
    let client_query return 0 if it requested dns resolution
  - 2005/03/08 15:28:55
    from the "shut the fuck up, ntpd" department:
    move log_debug call to tell about skipping the settime due to lack of
    answers down slightly below the 2nd (and final) log_init call so it becomes
    a -d only thing. tested by dlg and me
  - 2005/03/08 15:37:16
    missing break spotted by lint
  - 2005/03/08 15:59:36
    from the "shut the fuck up, ntpd" department:
    don't whine about temporary dns errors
  - 2005/03/08 17:27:14
  - 2005/03/08 17:33:43
    when trying short-circuit the wait for the first reply for -s, only
    do so when
    -we tried to send at least one query (that is the change)
    -we could not send ou a single one without failure (this was already in
     place but catched too much)
    problem independently noticed by nick and danh, ok mickey danh, testing by
  - 2005/03/09 15:07:00
    when, after processing all complete imsgs we found in the buffer,
    there are some bytes left (less than an imsg header, or less than the
    imsg header len field says) we copy it to the very beginning of the buffer.
    use memmove instead of memcpy since it is not guaranteed that there's no
    overlap. while memcpy on OpenBSD is safe, it might not elsewhere, and
    we want our code to be correct anyways.
    funny enough theo and I talked at length about that last week in dublin,
    and I said I believe I had no memcpys with the chance of overlap in ntpd/
    bgpd - well, here is one, and Alexander von Gernler <>
    pointed me to it.
  - 2005/03/09 21:31:11
    [config.c ntpd.c]
    nasty: host_dns used to run before forking and chrooting etc, so it was
    guaranteed that its res_init() call was done once before fork etc...
    that is no longer the case. call res_init() in main() early.
  - 2005/03/13 11:06:27
    Fixes in ntpd_settime (ie ntpd -s):
    - Handle errors from syscalls better
    - Prevent curtime.tv_usec from being negative for negative offsets.
    - Don't claim to have done settimeofday if it fails.
    ok henning@
    (brought to my attention by holger at
 - (dtucker) [defines.h] defined __dead if the system doesn't.

 - (dtucker) [defines.h] Fix SA_LEN macro for platforms that have different
   sized sockaddr_in and sockaddr_in6 structs but don't define their own
   SA_LEN.  Patch from Leonardo C. Filho <leonardo at fesppr br>.

 - (dtucker) OpenBSD CVS Sync
  - 2004/12/22 17:04:11
    d can be negative, take that into account when comparing to the logging
    threshold. spotted by Constantine Murenin <>, mickey ok
  - 2004/12/23 17:10:10
  - 2005/01/27 11:32:29
    [client.c ntp.c ntpd.h]
    Delay before retrying a query on timeout; ok henning@

 - (dtucker) [LICENCE] Fix typos and omissions, tidy up formatting.
 - (dtucker) [LICENCE] Add CVS Id.

 - (dtucker) [LICENCE] Add an OpenSSH-style licence summary.

 - (dtucker) OpenBSD CVS Sync
  - 2004/12/20 16:10:05
    some typos in log messages.
  - 2004/12/22 06:34:52
    if our first getpwnam(), testing for NTPD_USER, succeeded, but the second
    returns NULL, we don't need loooong explanations, but at least some
    indicator what went wrong, From: Michael Knudsen <>
  - 2004/12/22 06:36:11
    Save original value returned by getifaddrs to free later; ok henning@
 - (dtucker) [openbsd-compat/uidswap.c] Include includes.h

 - (dtucker) [README] Queries and bug reports to me.
 - (dtucker) [ defines.h] on QNX, socklen_t is really size_t.
 - (dtucker) [ openbsd-compat/ openbsd-compat/port-qnx.c]
   Add an adjtime() function for QNX, written by Anthony O.Zabelin.

 - (dtucker) [includes.h openbsd-compat/ openbsd-compat/atomicio.c
   openbsd-compat/atomicio.h openbsd-compat/bsd-arc4random.c
   openbsd-compat/openbsd-compat.h]:  Add atomicio from OpenSSH and use for
   reading entropy sources to ensure complete reads.
 - (dtucker) [defines.h] Remove some dead code.
 - (dtucker) [openbsd-compat/bsd-arc4random.c] Use atomicio for write too.

 - (dtucker) [ ntp.c ntpd.c openbsd-compat/
   openbsd-compat/bsd-poll.c openbsd-compat/bsd-poll.h
   openbsd-compat/openbsd-compat.h] Add a poll() replacement built around
   select() and enable for platforms that don't have poll (eg QNX4).  Poll
   header file from OpenBSD, function written by me, tested on QNX4 by
   Anthony O.Zabelin.
 - (dtucker) [] Alphabetize system-specific case block.
 - (dtucker) [ bsd-misc.c] Add a dummy setgroups() function for
   platforms that don't have it; from Anthony O.Zabelin.
 - (dtucker) [ openbsd-compat/bsd-snprintf.c] Make "long long"
   support optional.  From Anthony O.Zabelin.
 - (dtucker) [ defines.h] Define __func__ macro as required,
   stolen from OpenSSH.
 - (dtucker) [] Add configure-time settings for QNX4.  From
   Anthony O.Zabelin.
 - (dtucker) [config.c] Add includes.h
 - (dtucker) [ includes.h] Check for sys/timers.h and include.
 - (dtucker) [openbsd-compat/bsd-arc4random.c] Add support for using EGD/PRNGD
   sockets directly when configured --with-builtin-arc4random.
 - (dtucker) [openbsd-compat/bsd-arc4random.c] Remove debugging messages.
 - (dtucker) OpenBSD CVS Sync
  - 2004/12/15 00:44:20
    If polling a server results in an error, drop that server to the maximum
    poll interval;  ok henning@
  - 2004/12/15 13:24:21
    Factor out interval scaling code; ok henning@
  - 2004/12/15 13:29:25
    Poll unsynchronized servers at the maximum interval and log a message about
    them when in debug mode; ok henning@
  - 2004/12/16 01:38:59
    [config.c ntpd.h]
    Limit the number of addresses used by the 'servers' directive to 8;
    ok henning@

 - (dtucker) [includes.h ntpd.c] Fix warnings for RCSID from picky compilers
   and user RCSID for the release string.  Pointed out by Jason Mader.
 - (dtucker) [includes.h] Undef sa_len macro if it's defined, to prevent
   name collisions on IRIX.  With Jason Mader.
 - (dtucker) [] Zap a GNUmake-ism, spotted by Jason Mader.
 - (dtucker) [openbsd-compat/bsd-misc.c openbsd-compat/openbsd-compat.h]
   Tweak again to prevent warnings.

 - (dtucker) [] On IRIX, determine IOV_MAX from sysconf(8), based
   on info from Jason Mader.
 - (dtucker) [] Move __need_IOV_MAX define into the Linux-specific
   block, suggested by Jason Mader.
 - (dtucker) [openbsd-compat/bsd-misc.c] Cast argv0 to char * to keep IRIX's
   compiler happy.  From Jason Mader.
 - (dtucker) [] Add rules to ensure openbsd-compat gets rebuilt
 - (dtucker) OpenBSD CVS Sync
  - 2004/12/07 11:06:12
  - 2004/12/08 16:47:38
    [client.c ntp.h ntp_msg.c server.c util.c]
    uniquely name members of s_fixedpt and l_fixedpt; henning@ ok
  - 2004/12/08 18:35:16
    use two tiny macros for copying fields out to simplify reading; henning@ ok
  - 2004/12/09 21:24:46
    [client.c ntpd.h]
    define TRUSTLEVEL_MAX for the trustedlevel value of 10; henning@ ok
  - 2004/12/10 04:54:18
    typos, then -> than, from Michael Knudsen
  - 2004/12/13 13:22:52
    [client.c ntp.h]
    Discard replies with alarm flag set or invalid stratum; ok henning@
  - 2004/12/13 13:36:02
    Check for error status from poll() too; ok henning@
  - 2004/12/14 07:27:13
    sendto() takes socklen_t as an argument; ok henning@

 - (dtucker) [openbsd-compat/asprintf.c] unsigned char -> char, silences
   warning from IRIX's compiler.  From Jason Mader (jason at ncac gwu edu).

 - (dtucker) [ntpd.8] Remove some OpenBSD-specific references from the man
   page.  From Christian Gut (cycloon at is-root org).
 - (dtucker) [] Add defines needed for uid swapping functions
   to work on IRIX.  From Jason Mader (jason at ncac gwu edu).

To generate a diff of this commit:
cvs rdiff -r1.11 -r1.12 pkgsrc/net/openntpd/Makefile
cvs rdiff -r1.5 -r1.6 pkgsrc/net/openntpd/distinfo

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.