diff --git a/net/chrony/Makefile b/net/chrony/Makefile index 7b2e1654d237..52f85d4601af 100644 --- a/net/chrony/Makefile +++ b/net/chrony/Makefile @@ -1,110 +1,110 @@ PORTNAME= chrony -DISTVERSION= 4.8 +DISTVERSION= 4.9 PORTREVISION= 0 CATEGORIES= net -MASTER_SITES= https://chrony-project.org/releases/ \ - LOCAL/mandree +MASTER_SITES= https://chrony-project.org/releases/ +# the signature file has pattern https://chrony-project.org/releases/chrony-${DISTVERSION}-tar-gz-asc.txt # overridden in net/chrony-lite MAINTAINER?= mandree@FreeBSD.org COMMENT?= System clock synchronization client and server WWW= https://chrony-project.org/ LICENSE= GPLv2 LICENSE_FILE= ${WRKSRC}/COPYING USES= cpe gmake libedit pkgconfig CPE_VENDOR= tuxfamily USE_RC_SUBR= chronyd HAS_CONFIGURE= yes CONFIGURE_ARGS= --chronyvardir=/var/db/${PORTNAME} \ --datarootdir=${DATADIR} \ --docdir=${DOCSDIR} \ --enable-ntp-signd \ --mandir=${PREFIX}/share/man \ --prefix=${PREFIX} \ --sysconfdir=${PREFIX}/etc \ --without-tomcrypt ALL_TARGET= all INSTALL_TARGET= install TEST_TARGET= check LDFLAGS+= -L${LOCALBASE}/lib CONFLICTS_INSTALL?= chrony-lite PORTDOCS= FAQ NEWS README PORTEXAMPLES= chrony.conf.example1 chrony.conf.example2 chrony.conf.example3 \ chrony.keys.example # XXX: there are also other potentially useful options worth looking into: # --disable-pps Disable PPS API support OPTIONS_DEFINE= DOCS EXAMPLES HTMLDOCS NTS USER OPTIONS_DEFAULT= NETTLE NTS USER OPTIONS_GROUP= SECHASH OPTIONS_GROUP_SECHASH= NETTLE NSS OPTIONS_SUB= yes HTMLDOCS_DESC= Build HTML docs (IMPLIES DOCS, needs ruby, asciidoctor) NETTLE_DESC= Nettle crypto library support for secure hash and NTS NSS_DESC= NSS-based support for more hashing algorithms NTS_DESC= Support Network Time Security (NTS, uses GnuTLS & Nettle) SECHASH_DESC= Support for secure hash functions USER_DESC= Run as user/group chronyd (unset: user/group ntpd) HTMLDOCS_IMPLIES= DOCS HTMLDOCS_BUILD_DEPENDS+= asciidoctor:textproc/rubygem-asciidoctor HTMLDOCS_ALL_TARGET= docs HTMLDOCS_INSTALL_TARGET= docs NETTLE_PREVENTS= NSS NETTLE_LIB_DEPENDS= libnettle.so:security/nettle NETTLE_CONFIGURE_OFF= --without-nettle NSS_LIB_DEPENDS= libfreebl3.so:security/nss NSS_CONFIGURE_OFF= --without-nss NTS_IMPLIES= NETTLE NTS_LIB_DEPENDS= libgnutls.so:security/gnutls NTS_CONFIGURE_OFF= --without-gnutls USER_CONFIGURE_ON= --with-user=chronyd USER_CONFIGURE_OFF= --with-user=ntpd USER_VARS= GROUPS=chronyd \ USERS=chronyd .include .if defined(WITH_DEBUG) CONFIGURE_ARGS+= --enable-debug .endif .if ${PORT_OPTIONS:MHTMLDOCS} PORTDOCS+= doc/*.html .endif post-patch: cd ${WRKSRC}/examples && \ ${REINPLACE_CMD} -e 's!%%PREFIX%%!${PREFIX}!g' \ -e 's!/var/lib!/var/db!g' \ ${PORTEXAMPLES:M*.conf.example*} post-install: ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/chronyc ${STRIP_CMD} ${STAGEDIR}${PREFIX}/sbin/chronyd ${INSTALL_DATA} ${WRKSRC}/examples/chrony.conf.example3 \ ${STAGEDIR}${PREFIX}/etc/chrony.conf.sample post-install-DOCS-on: ${MKDIR} ${STAGEDIR}${DOCSDIR} ${RM} doc/installation.html cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR} post-install-EXAMPLES-on: ${MKDIR} ${STAGEDIR}${EXAMPLESDIR} cd ${WRKSRC}/examples && \ ${INSTALL_DATA} ${PORTEXAMPLES} ${STAGEDIR}${EXAMPLESDIR} .include diff --git a/net/chrony/distinfo b/net/chrony/distinfo index e6be01363ebf..1714fe82973a 100644 --- a/net/chrony/distinfo +++ b/net/chrony/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1756301202 -SHA256 (chrony-4.8.tar.gz) = 33ea8eb2a4daeaa506e8fcafd5d6d89027ed6f2f0609645c6f149b560d301706 -SIZE (chrony-4.8.tar.gz) = 649368 +TIMESTAMP = 1787853020 +SHA256 (chrony-4.9.tar.gz) = 4924c6f530105bcd5b9e9e33c48a2ae1bfd889222c8480bc41601110efc864d0 +SIZE (chrony-4.9.tar.gz) = 663809 diff --git a/net/chrony/files/patch-examples_chrony.conf.example1 b/net/chrony/files/patch-examples_chrony.conf.example1 index f8a354382dea..f0880ad1fb65 100644 --- a/net/chrony/files/patch-examples_chrony.conf.example1 +++ b/net/chrony/files/patch-examples_chrony.conf.example1 @@ -1,9 +1,9 @@ ---- examples/chrony.conf.example1.orig 2020-09-16 10:09:52 UTC +--- examples/chrony.conf.example1.orig 2026-08-27 12:38:15 UTC +++ examples/chrony.conf.example1 @@ -1,5 +1,5 @@ - # Use public NTP servers from the pool.ntp.org project. + # Use four public NTP servers from the pool.ntp.org project. -pool pool.ntp.org iburst +pool 0.freebsd.pool.ntp.org iburst # Record the rate at which the system clock gains/losses time. driftfile /var/lib/chrony/drift diff --git a/net/chrony/files/patch-examples_chrony.conf.example2 b/net/chrony/files/patch-examples_chrony.conf.example2 index 1fa8f827bd92..6897acbda234 100644 --- a/net/chrony/files/patch-examples_chrony.conf.example2 +++ b/net/chrony/files/patch-examples_chrony.conf.example2 @@ -1,19 +1,20 @@ ---- examples/chrony.conf.example2.orig 2020-09-16 10:09:52 UTC +--- examples/chrony.conf.example2.orig 2026-08-27 12:38:15 UTC +++ examples/chrony.conf.example2 -@@ -1,6 +1,6 @@ - # Use public servers from the pool.ntp.org project. - # Please consider joining the pool (http://www.pool.ntp.org/join.html). +@@ -5,7 +5,7 @@ + # Use four public NTP servers from the pool.ntp.org project. If this + # host has a static public IP address, please consider joining the pool: + # https://www.ntppool.org/join.html -pool pool.ntp.org iburst +pool 0.freebsd.pool.ntp.org iburst # Record the rate at which the system clock gains/losses time. driftfile /var/lib/chrony/drift -@@ -29,7 +29,7 @@ rtcsync +@@ -34,7 +34,7 @@ rtcsync #authselectmode require # Specify file containing keys for NTP authentication. -#keyfile /etc/chrony.keys +#keyfile %%PREFIX%%/etc/chrony.keys # Save NTS keys and cookies. ntsdumpdir /var/lib/chrony diff --git a/net/chrony/files/patch-examples_chrony.conf.example3 b/net/chrony/files/patch-examples_chrony.conf.example3 index 15ba4a8557b4..0e9711ea2a3d 100644 --- a/net/chrony/files/patch-examples_chrony.conf.example3 +++ b/net/chrony/files/patch-examples_chrony.conf.example3 @@ -1,42 +1,42 @@ ---- examples/chrony.conf.example3.orig 2020-09-16 10:09:52 UTC +--- examples/chrony.conf.example3.orig 2026-08-27 12:38:15 UTC +++ examples/chrony.conf.example3 @@ -1,7 +1,7 @@ ####################################################################### # # 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. The more obscure options are not included. Refer # to the documentation for these. # -@@ -31,7 +31,9 @@ - ! server bar.example.net iburst - ! server baz.example.net iburst +@@ -33,7 +33,9 @@ + ! server ntp2.example.net iburst + ! server ntp3.example.net iburst -! pool pool.ntp.org iburst +# This is a reasonable default setting to have on in typical cases for +# a workstation with a full-time internet connection: +pool 0.freebsd.pool.ntp.org iburst ####################################################################### ### AVOIDING POTENTIALLY BOGUS CHANGES TO YOUR CLOCK -@@ -84,7 +86,7 @@ driftfile /var/lib/chrony/drift +@@ -86,7 +88,7 @@ driftfile /var/lib/chrony/drift # If you want to enable NTP authentication with symmetric keys, you will need # to uncomment the following line and edit the file to set up the keys. -! keyfile /etc/chrony.keys +! keyfile %%PREFIX%%/etc/chrony.keys # If you specify an NTP server with the nts option to enable authentication # with the Network Time Security (NTS) mechanism, or enable server NTS with -@@ -164,6 +166,10 @@ ntsdumpdir /var/lib/chrony +@@ -166,6 +168,10 @@ ntsdumpdir /var/lib/chrony # only need this if you really enjoy looking at the logs, you want to # produce some graphs of your system's timekeeping performance, or you # need help in debugging a problem. +# +# If you enable logging, you may want to add an entry to a log rotation +# utility's configuration (e.g., newsyslog(8)). 'chronyc cyclelogs' +# should be used to signal chronyd that a log file has been renamed. ! logdir /var/log/chrony ! log measurements statistics tracking diff --git a/net/chrony/files/patch-test_unit_socket.c b/net/chrony/files/patch-test_unit_socket.c deleted file mode 100644 index fd9e71d17078..000000000000 --- a/net/chrony/files/patch-test_unit_socket.c +++ /dev/null @@ -1,30 +0,0 @@ -commit 120bf44989391164c924e97d3142dc1352ab7970 -Author: Miroslav Lichvar -Date: Thu Aug 28 09:33:34 2025 +0200 - - test: fix socket unit test to use non-blocking accepted sockets - - SCK_AcceptConnection() always returns a non-blocking socket. Clear the - O_NONBLOCK flag in the socket unit test, which relies on blocking, to - avoid failures. - - Reported-by: Matthias Andree - ---- test/unit/socket.c.orig 2025-08-27 12:05:31 UTC -+++ test/unit/socket.c -@@ -191,6 +191,7 @@ test_unit(void) - s3 = SCK_AcceptConnection(s1, &sa2); - TEST_CHECK(UTI_CompareIPs(&sa1.ip_addr, &sa2.ip_addr, NULL) == 0); - -+ fcntl(s3, F_SETFL, fcntl(s3, F_GETFL) & ~O_NONBLOCK); - send_and_recv(SCK_ADDR_IP, 1, 1, s3, s2); - - SCK_ShutdownConnection(s2); -@@ -227,6 +228,7 @@ test_unit(void) - s3 = SCK_AcceptConnection(s1, &sa2); - TEST_CHECK(sa2.ip_addr.family == IPADDR_UNSPEC); - -+ fcntl(s3, F_SETFL, fcntl(s3, F_GETFL) & ~O_NONBLOCK); - send_and_recv(SCK_ADDR_UNIX, 1, i % 2, s3, s2); - - if (i % 4) diff --git a/net/chrony/files/patch-util.c b/net/chrony/files/patch-util.c index abee9f8bbfef..ca3d68778f51 100644 --- a/net/chrony/files/patch-util.c +++ b/net/chrony/files/patch-util.c @@ -1,11 +1,11 @@ ---- util.c.orig 2017-01-31 10:22:11 UTC +--- util.c.orig 2026-08-27 12:38:15 UTC +++ util.c -@@ -738,7 +738,7 @@ UTI_TimespecToNtp64(struct timespec *src +@@ -790,7 +790,7 @@ UTI_TimespecToNtp64(const struct timespec *src, NTP_in hi = lo = 0; } else { hi = htonl(sec + JAN_1970); - lo = htonl(NSEC_PER_NTP64 * nsec); + lo = htonl((uint32_t)(NSEC_PER_NTP64 * nsec)); /* Add the fuzz */ if (fuzz) {