Source: openntpd
Version: 1:6.2p3-4.2
Severity: important
Tags: patch
X-Debbugs-Cc: [email protected]

See files enclosed.

-- System Information:
Debian Release: forky/sid
  APT prefers unstable-debug
  APT policy: (500, 'unstable-debug'), (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 6.12.74+deb13+1-amd64 (SMP w/8 CPU threads; PREEMPT)
Locale: LANG=fi_FI.UTF-8, LC_CTYPE=fi_FI.UTF-8 (charmap=UTF-8), LANGUAGE=fi:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
From: Martin-Éric Racine <[email protected]>
Subject: Just use random servers from the Debian public NTP Pool
Origin: Debian

Updated from Dererk <[email protected]> original patch.

--- openntpd-6.8p1.orig/ntpd.conf
+++ openntpd-6.8p1/ntpd.conf
@@ -2,9 +2,29 @@
 #
 # See ntpd.conf(5) and /etc/examples/ntpd.conf
 
-servers pool.ntp.org
-server time.cloudflare.com
-sensor *
+# Addresses to listen on (ntpd does not listen by default)
+#listen on *
+#listen on 127.0.0.1
+#listen on ::1
+
+# sync to a single server
+#server ntp.example.org
+
+# use a random selection of NTP Pool Time Servers
+# see http://support.ntp.org/bin/view/Servers/NTPPoolServers
+#servers pool.ntp.org
+
+# Choose servers announced from Debian NTP Pool
+servers 0.debian.pool.ntp.org
+servers 1.debian.pool.ntp.org
+servers 2.debian.pool.ntp.org
+servers 3.debian.pool.ntp.org
+
+# use a specific local timedelta sensor (radio clock, etc)
+#sensor nmea0
+
+# use all detected timedelta sensors
+#sensor *
 
 constraint from "9.9.9.9"              # quad9 v4 without DNS
 constraint from "2620:fe::fe"          # quad9 v6 without DNS
Author: Sergey B Kirpichev <[email protected]>
Description: Document syslog priority 
Bug-Debian: 502162

Refreshed for 5.7p4.

Index: openntpd-6.8p1/src/ntpd.8
===================================================================
--- openntpd-6.8p1.orig/src/ntpd.8      2020-12-07 08:20:35.000000000 +0000
+++ openntpd-6.8p1/src/ntpd.8   2026-03-28 07:07:04.000000000 +0000
@@ -120,13 +120,13 @@
 typically
 .Xr ntpd.conf 5 ,
 and its initial clock drift from
-.Pa /var/db/ntpd.drift .
+.Pa /var/lib/openntpd/ntpd.drift .
 Clock drift is periodically written to the drift file thereafter.
 .Sh FILES
-.Bl -tag -width "/var/db/ntpd.driftXXX" -compact
+.Bl -tag -width "/var/lib/openntpd/ntpd.driftXXX" -compact
 .It Pa /etc/ntpd.conf
 Default configuration file.
-.It Pa /var/db/ntpd.drift
+.It Pa /var/lib/openntpd/ntpd.drift
 Drift file.
 .It Pa /var/run/ntpd.sock
 Socket file for communication with
Subject: add support for GNU/kFreeBSD
From: Steven Chamberlain <[email protected]>
Date: Sun, 21 Feb 2016 02:05:49 +0000
Refreshed for 6.0p1

Index: openntpd-6.8p1/compat/arc4random.h
===================================================================
--- openntpd-6.8p1.orig/compat/arc4random.h     2026-03-28 07:07:25.255442697 
+0000
+++ openntpd-6.8p1/compat/arc4random.h  2026-03-28 07:07:25.251442639 +0000
@@ -3,7 +3,7 @@
 
 #include <sys/param.h>
 
-#if defined(__FreeBSD__)
+#if defined(__FreeBSD_kernel__)
 #include "arc4random_freebsd.h"
 
 #elif defined(__linux__)
Index: openntpd-6.8p1/m4/check-os-options.m4
===================================================================
--- openntpd-6.8p1.orig/m4/check-os-options.m4  2026-03-28 07:07:25.255442697 
+0000
+++ openntpd-6.8p1/m4/check-os-options.m4       2026-03-28 07:07:25.251442639 
+0000
@@ -27,6 +27,11 @@
                AC_DEFINE([SPT_TYPE], [SPT_REUSEARGV])
                AC_SUBST([PROG_LDADD], ['-lresolv'])
                ;;
+       kfreebsd*)
+               HOST_OS=freebsd
+               CFLAGS="$CFLAGS -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_GNU_SOURCE"
+               AC_SUBST([PROG_LDADD], ['-lpthread'])
+               ;;
        *freebsd*)
                HOST_OS=freebsd
                HOST_ABI=elf
Index: openntpd-6.8p1/compat/arc4random_freebsd.h
===================================================================
--- openntpd-6.8p1.orig/compat/arc4random_freebsd.h     2026-03-28 
07:07:25.255442697 +0000
+++ openntpd-6.8p1/compat/arc4random_freebsd.h  2026-03-28 07:07:25.251442639 
+0000
@@ -32,6 +32,11 @@
 #define _ARC4_LOCK()   pthread_mutex_lock(&arc4random_mtx)
 #define _ARC4_UNLOCK() pthread_mutex_unlock(&arc4random_mtx)
 
+#ifdef __GLIBC__
+extern void *__dso_handle;
+extern int __register_atfork(void (*)(void), void(*)(void), void (*)(void), 
void *);
+#define _ARC4_ATFORK(f) __register_atfork(NULL, NULL, (f), __dso_handle)
+#else
 /*
  * Unfortunately, pthread_atfork() is broken on FreeBSD (at least 9 and 10) if
  * a program does not link to -lthr. Callbacks registered with pthread_atfork()
@@ -39,6 +44,7 @@
  * wraparound.
  */
 #define _ARC4_ATFORK(f) pthread_atfork(NULL, NULL, (f))
+#endif
 
 static inline void
 _getentropy_fail(void)
01-use-debian-ntp-pool.patch
02-syslog.patch
03-kfreebsd.patch

Reply via email to