svn commit: r530840 - in head/net/chrony: . files
Matthias Andree
mandree at FreeBSD.org
Sun Apr 5 21:20:21 UTC 2020
Author: mandree
Date: Sun Apr 5 21:20:10 2020
New Revision: 530840
URL: https://svnweb.freebsd.org/changeset/ports/530840
Log:
net/chrony: make NETTLE build robust, improve rc script, re-enable NSS
Changes by Colin T.:
* Always require pkgconfig instead of only requiring it for NSS,
because otherwise chrony does not link reliably to nettle. [1]
* Add pidfile to rc.d script to stop it from complaining when
stopping chronyd. [1]
* Document chronyd_* options in rc.d script. [1]
Changes by Matthias Andree:
* Move USES line up to please portlint.
* Add HTMLDOCS option, to build and install HTML docs. IMPLIES DOCS.
Needs textproc/asciidoctor (rubygem) as build requisite.
* Turn CRYPTLIB into a _RADIO to choose at most one from NSS + NETTLE.
* Under WITH_DEBUG, add --enable-debug to CONFIGURE_ARGS.
* Remove @ (silent) from Makefile commands.
* Remove NSS_BROKEN, chrony 3.5 appears to work with NSS. Updates [3].
PR: 244534 [1]
PR: 242510 [2]
PR: 223840 [3]
Submitted by: Colin T. <bugzilla at nulldir.e4ward.com> [1]
Reported by: Matt Smith <freebsd at xtaz.uk> [2]
Approved by: maintainer timeout (yonas at fizk.net, 36 days)
Modified:
head/net/chrony/Makefile
head/net/chrony/files/chronyd.in
head/net/chrony/pkg-plist
Modified: head/net/chrony/Makefile
==============================================================================
--- head/net/chrony/Makefile Sun Apr 5 21:20:03 2020 (r530839)
+++ head/net/chrony/Makefile Sun Apr 5 21:20:10 2020 (r530840)
@@ -3,6 +3,7 @@
PORTNAME= chrony
PORTVERSION= 3.5
+PORTREVISION= 1
CATEGORIES= net
MASTER_SITES= http://download.tuxfamily.org/chrony/
@@ -12,10 +13,10 @@ COMMENT= System clock synchronization client and serve
LICENSE= GPLv2
LICENSE_FILE= ${WRKSRC}/COPYING
+USES= cpe gmake libedit pkgconfig
USERS= chronyd
GROUPS= chronyd
-USES= cpe gmake libedit
CPE_VENDOR= tuxfamily
HAS_CONFIGURE= yes
CONFIGURE_ARGS= --prefix=${PREFIX} \
@@ -34,22 +35,39 @@ PORTEXAMPLES= chrony.conf.example1 chrony.conf.example
# XXX: there are also other potentially useful options worth looking into:
# --disable-pps Disable PPS API support
-OPTIONS_DEFINE= DOCS EXAMPLES IPV6 NETTLE NSS
+OPTIONS_DEFINE= DOCS HTMLDOCS EXAMPLES IPV6
OPTIONS_DEFAULT= NETTLE
+OPTIONS_RADIO= CRYPTLIB
+OPTIONS_RADIO_CRYPTLIB= NETTLE NSS
+HTMLDOCS_IMPLIES= DOCS
+OPTIONS_SUB= yes
+HTMLDOCS_DESC= Build HTML docs (IMPLIES DOCS, needs ruby, asciidoctor)
NETTLE_DESC= Nettle crypto library support
-NSS_DESC= Add support for more hashing algorithms
+NSS_DESC= NSS-based support for more hashing algorithms
IPV6_CONFIGURE_OFF= --disable-ipv6
NETTLE_CONFIGURE_OFF= --without-nettle
NETTLE_LIB_DEPENDS= libnettle.so:security/nettle
-NSS_BROKEN= Crashes on startup with NSS. See https://bugs.freebsd.org/223840
NSS_CONFIGURE_OFF= --without-nss
NSS_LIB_DEPENDS= libfreebl3.so:security/nss
-NSS_USES= pkgconfig
+HTMLDOCS_BUILD_DEPENDS+=asciidoctor:textproc/rubygem-asciidoctor
+HTMLDOCS_ALL_TARGET= docs
+HTMLDOCS_INSTALL_TARGET=docs
+
+.include <bsd.port.pre.mk>
+
+.if defined(WITH_DEBUG)
+CONFIGURE_ARGS+= --enable-debug
+.endif
+
+.if ${PORT_OPTIONS:MHTMLDOCS}
+PORTDOCS+= doc/*.html
+.endif
+
post-patch:
- @cd ${WRKSRC}/examples && \
+ cd ${WRKSRC}/examples && \
${REINPLACE_CMD} -e 's!%%PREFIX%%!${PREFIX}!g' ${PORTEXAMPLES}
post-install:
@@ -59,12 +77,13 @@ post-install:
${STAGEDIR}${PREFIX}/etc/chrony.conf.sample
post-install-DOCS-on:
- @${MKDIR} ${STAGEDIR}${DOCSDIR}
+ ${MKDIR} ${STAGEDIR}${DOCSDIR}
+ ${RM} doc/installation.html
cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR}
post-install-EXAMPLES-on:
- @${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
+ ${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
cd ${WRKSRC}/examples && \
${INSTALL_DATA} ${PORTEXAMPLES} ${STAGEDIR}${EXAMPLESDIR}
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
Modified: head/net/chrony/files/chronyd.in
==============================================================================
--- head/net/chrony/files/chronyd.in Sun Apr 5 21:20:03 2020 (r530839)
+++ head/net/chrony/files/chronyd.in Sun Apr 5 21:20:10 2020 (r530840)
@@ -4,17 +4,32 @@
#
# PROVIDE: chronyd
# REQUIRE: DAEMON
+# KEYWORD: nojail shutdown
#
+# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
+# to enable this service:
+#
+# chronyd_enable (bool): Set it to "YES" to enable chronyd
+# Default is "NO"
+# chronyd_config (str): Set full path to configuration file.
+# Default is "%%PREFIX%%/etc/chrony.conf"
+# chronyd_flags (str): Flags passed to chronyd(8)
+# Default is ""
+#
. /etc/rc.subr
name=chronyd
rcvar=chronyd_enable
-command=%%PREFIX%%/sbin/${name}
-rc_flags="${chronyd_flags}"
load_rc_config ${name}
-: ${chronyd_enable="NO"}
+: ${chronyd_enable:="NO"}
+: ${chronyd_config:="%%PREFIX%%/etc/chrony.conf"}
+
+command=%%PREFIX%%/sbin/${name}
+command_args="-f ${chronyd_config}"
+pidfile=/var/run/chrony/${name}.pid
+required_files=${chronyd_config}
run_rc_command "$1"
Modified: head/net/chrony/pkg-plist
==============================================================================
--- head/net/chrony/pkg-plist Sun Apr 5 21:20:03 2020 (r530839)
+++ head/net/chrony/pkg-plist Sun Apr 5 21:20:10 2020 (r530840)
@@ -5,3 +5,8 @@ man/man5/chrony.conf.5.gz
man/man8/chronyd.8.gz
sbin/chronyd
@dir(chronyd,chronyd) /var/db/chrony
+%%HTMLDOCS%%%%DOCSDIR%%/chrony.conf.html
+%%HTMLDOCS%%%%DOCSDIR%%/chronyc.html
+%%HTMLDOCS%%%%DOCSDIR%%/chronyd.html
+%%HTMLDOCS%%%%DOCSDIR%%/faq.html
+%%HTMLDOCS%%%%DOCSDIR%%/installation.html
More information about the svn-ports-head
mailing list