diff options
-rw-r--r-- | net/openntpd/Makefile | 14 | ||||
-rw-r--r-- | net/openntpd/distinfo | 4 | ||||
-rw-r--r-- | net/openntpd/files/openntpd.in | 2 | ||||
-rw-r--r-- | net/openntpd/files/patch-compat_adjfreq__freebsd.c | 23 | ||||
-rw-r--r-- | net/openntpd/files/patch-include_signal.h | 10 | ||||
-rw-r--r-- | net/openntpd/files/patch-src_constraint.c | 4 | ||||
-rw-r--r-- | net/openntpd/files/patch-src_ntpd.8 | 14 | ||||
-rw-r--r-- | net/openntpd/files/patch-src_ntpd.c | 18 | ||||
-rw-r--r-- | net/openntpd/files/patch-src_ntpd.conf.5 | 4 | ||||
-rw-r--r-- | net/openntpd/files/patch-src_server.c | 47 |
10 files changed, 77 insertions, 63 deletions
diff --git a/net/openntpd/Makefile b/net/openntpd/Makefile index fe256228f236..a98c3cb926b9 100644 --- a/net/openntpd/Makefile +++ b/net/openntpd/Makefile @@ -1,8 +1,7 @@ # $FreeBSD$ PORTNAME= openntpd -PORTVERSION= 5.7p4 -PORTREVISION= 2 +PORTVERSION= 5.9p1 PORTEPOCH= 2 CATEGORIES= net MASTER_SITES= OPENBSD/OpenNTPD @@ -20,20 +19,19 @@ USE_RC_SUBR= openntpd GNU_CONFIGURE= yes CONFIGURE_ARGS= --disable-silent-rules -# * LibreSSL fails with the certificiate bundle from ca_root_nss; -# 3.22.2 appears to work just fine (unlike 3.22). -# * USE_OPENSSL does not handle LibreSSL yet. - OPTIONS_DEFINE= RESSL RESSL_DESC= SSL/TLS support via LibreSSL OPTIONS_DEFAULT= RESSL -RESSL_LIB_DEPENDS= libtls.so:security/libressl +# Requires libtls from LibreSSL >= 2.3.2 +RESSL_USE= openssl=yes +RESSL_VARS= with_openssl_port=yes \ + openssl_port=security/libressl-devel RESSL_CONFIGURE_WITH= cacert=${LOCALBASE}/etc/ssl/cert.pem RESSL_CPPFLAGS= -I${LOCALBASE}/include RESSL_LDFLAGS= -L${LOCALBASE}/lib -RESSL_RUN_DEPENDS= ca_root_nss>=3.22.2:security/ca_root_nss +RESSL_RUN_DEPENDS= ca_root_nss>=0:security/ca_root_nss pre-build: ${REINPLACE_CMD} -e 's,%%PREFIX%%,${PREFIX},g' \ diff --git a/net/openntpd/distinfo b/net/openntpd/distinfo index fe0a66d029da..7dd80e83bc37 100644 --- a/net/openntpd/distinfo +++ b/net/openntpd/distinfo @@ -1,2 +1,2 @@ -SHA256 (openntpd-5.7p4.tar.gz) = a993d95976e375acc0ab1a677fd268f55024477835633c8ae404895046bccb23 -SIZE (openntpd-5.7p4.tar.gz) = 427900 +SHA256 (openntpd-5.9p1.tar.gz) = 200c04056d4d6441653cac71d515611f3903aa7b15b8f5661a40dab3fb3697b3 +SIZE (openntpd-5.9p1.tar.gz) = 432844 diff --git a/net/openntpd/files/openntpd.in b/net/openntpd/files/openntpd.in index 0f1def797344..2e0a9c5df41a 100644 --- a/net/openntpd/files/openntpd.in +++ b/net/openntpd/files/openntpd.in @@ -17,7 +17,7 @@ check_process() { - pgrep -f 'ntpd: \[priv\]' + pgrep -f $command } name=openntpd diff --git a/net/openntpd/files/patch-compat_adjfreq__freebsd.c b/net/openntpd/files/patch-compat_adjfreq__freebsd.c deleted file mode 100644 index e0e881df87fb..000000000000 --- a/net/openntpd/files/patch-compat_adjfreq__freebsd.c +++ /dev/null @@ -1,23 +0,0 @@ ---- compat/adjfreq_freebsd.c.orig 2015-03-12 04:42:13 UTC -+++ compat/adjfreq_freebsd.c -@@ -57,3 +57,20 @@ adjfreq(const int64_t *freq, int64_t *ol - - return 0; - } -+ -+/* -+ * The RTC is only updated if the clock is not marked as unsynced. -+ */ -+ -+void -+update_status(int synced) -+{ -+ struct timex txc = { 0 }; -+ -+ txc.modes = MOD_STATUS; -+ if (!synced) -+ txc.status = STA_UNSYNC; -+ if (ntp_adjtime(&txc) == -1) -+ log_warn("ntp_adjtime (3) failed"); -+ return; -+} diff --git a/net/openntpd/files/patch-include_signal.h b/net/openntpd/files/patch-include_signal.h new file mode 100644 index 000000000000..703a6cbc2da6 --- /dev/null +++ b/net/openntpd/files/patch-include_signal.h @@ -0,0 +1,10 @@ +--- include/signal.h.orig 2015-05-04 09:54:32 UTC ++++ include/signal.h +@@ -8,3 +8,7 @@ + #ifndef SIGINFO + #define SIGINFO SIGUSR1 + #endif ++ ++#ifndef _NSIG ++#define _NSIG NSIG ++#endif diff --git a/net/openntpd/files/patch-src_constraint.c b/net/openntpd/files/patch-src_constraint.c index d10ba1c19ee8..a6f46a88dde2 100644 --- a/net/openntpd/files/patch-src_constraint.c +++ b/net/openntpd/files/patch-src_constraint.c @@ -1,6 +1,6 @@ ---- src/constraint.c.orig 2015-03-14 21:24:11 UTC +--- src/constraint.c.orig 2016-03-28 13:51:51 UTC +++ src/constraint.c -@@ -665,7 +665,7 @@ httpsdate_request(struct httpsdate *http +@@ -905,7 +905,7 @@ httpsdate_request(struct httpsdate *http * or ANSI C's asctime() - the latter doesn't include * the timezone which is required here. */ diff --git a/net/openntpd/files/patch-src_ntpd.8 b/net/openntpd/files/patch-src_ntpd.8 index f1790d9b2278..11dd15c89dd0 100644 --- a/net/openntpd/files/patch-src_ntpd.8 +++ b/net/openntpd/files/patch-src_ntpd.8 @@ -1,6 +1,6 @@ ---- src/ntpd.8.orig 2015-03-18 16:25:53 UTC +--- src/ntpd.8.orig 2016-03-28 13:51:51 UTC +++ src/ntpd.8 -@@ -57,7 +57,7 @@ Use +@@ -56,7 +56,7 @@ Use .Ar file as the configuration file, instead of the default @@ -9,7 +9,7 @@ .It Fl n Configtest mode. Only check the configuration file for validity. -@@ -100,19 +100,19 @@ will be logged. +@@ -99,19 +99,19 @@ will be logged. After the local clock is synchronized, .Nm adjusts the clock frequency using the @@ -33,9 +33,9 @@ for more information on the boot process and enabling daemons. .Pp -@@ -137,8 +137,8 @@ signal on systems without - it writes its peer and sensor status to - .Xr syslog 3 . +@@ -124,8 +124,8 @@ and its initial clock drift from + .Pa /var/db/ntpd.drift . + Clock drift is periodically written to the drift file thereafter. .Sh FILES -.Bl -tag -width "/var/db/ntpd.driftXXX" -compact -.It Pa /etc/ntpd.conf @@ -44,7 +44,7 @@ Default configuration file. .It Pa /var/db/ntpd.drift Drift file. -@@ -148,12 +148,12 @@ Socket file for communication with +@@ -135,12 +135,12 @@ Socket file for communication with .El .Sh SEE ALSO .Xr date 1 , diff --git a/net/openntpd/files/patch-src_ntpd.c b/net/openntpd/files/patch-src_ntpd.c deleted file mode 100644 index eb4601ab9b86..000000000000 --- a/net/openntpd/files/patch-src_ntpd.c +++ /dev/null @@ -1,18 +0,0 @@ ---- src/ntpd.c.orig 2015-03-25 01:18:56 UTC -+++ src/ntpd.c -@@ -53,6 +53,7 @@ const char *ctl_lookup_option(char * - void show_status_msg(struct imsg *); - void show_peer_msg(struct imsg *, int); - void show_sensor_msg(struct imsg *, int); -+void update_status(int); - - volatile sig_atomic_t quit = 0; - volatile sig_atomic_t reconfig = 0; -@@ -423,6 +424,7 @@ ntpd_adjtime(double d) - else if (!firstadj && olddelta.tv_sec == 0 && olddelta.tv_usec == 0) - synced = 1; - firstadj = 0; -+ update_status(synced); - return (synced); - } - diff --git a/net/openntpd/files/patch-src_ntpd.conf.5 b/net/openntpd/files/patch-src_ntpd.conf.5 index 063446be9971..bafd70764599 100644 --- a/net/openntpd/files/patch-src_ntpd.conf.5 +++ b/net/openntpd/files/patch-src_ntpd.conf.5 @@ -1,6 +1,6 @@ ---- src/ntpd.conf.5.orig 2015-03-18 16:25:53 UTC +--- src/ntpd.conf.5.orig 2016-03-28 13:51:51 UTC +++ src/ntpd.conf.5 -@@ -222,8 +222,8 @@ constraints from "https://www.google.com +@@ -218,8 +218,8 @@ constraints from "https://www.google.com .Ed .El .Sh FILES diff --git a/net/openntpd/files/patch-src_server.c b/net/openntpd/files/patch-src_server.c new file mode 100644 index 000000000000..52e37f601d9f --- /dev/null +++ b/net/openntpd/files/patch-src_server.c @@ -0,0 +1,47 @@ +--- src/server.c.orig 2016-03-28 13:51:51 UTC ++++ src/server.c +@@ -36,14 +36,14 @@ setup_listeners(struct servent *se, stru + struct ifaddrs *ifa, *ifap; + struct sockaddr *sa; + #ifdef SO_RTABLE +- struct if_data *ifd; ++ struct ifreq ifr; + #endif + u_int8_t *a6; + size_t sa6len = sizeof(struct in6_addr); + u_int new_cnt = 0; + int tos = IPTOS_LOWDELAY; + #ifdef SO_RTABLE +- int rdomain = 0; ++ int rdomain, fd; + #endif + + TAILQ_FOREACH(lap, &lconf->listen_addrs, entry) { +@@ -56,16 +56,21 @@ setup_listeners(struct servent *se, stru + sa = ifap->ifa_addr; + if (sa == NULL || SA_LEN(sa) == 0) + continue; +-#ifdef SO_RTABLE +- if (sa->sa_family == AF_LINK) { +- ifd = ifap->ifa_data; +- rdomain = ifd->ifi_rdomain; +- } +-#endif + if (sa->sa_family != AF_INET && + sa->sa_family != AF_INET6) + continue; + #ifdef SO_RTABLE ++ strlcpy(ifr.ifr_name, ifap->ifa_name, ++ sizeof(ifr.ifr_name)); ++ ++ fd = socket(AF_INET, SOCK_DGRAM, 0); ++ if (ioctl(fd, SIOCGIFRDOMAIN, ++ (caddr_t)&ifr) == -1) ++ rdomain = 0; ++ else ++ rdomain = ifr.ifr_rdomainid; ++ close(fd); ++ + if (lap->rtable != -1 && rdomain != lap->rtable) + continue; + #endif |