git: 2f9966ff63d6 - main - packages: add package for NTP

From: Warner Losh <imp_at_FreeBSD.org>
Date: Sat, 04 May 2024 13:43:14 UTC
The branch main has been updated by imp:

URL: https://cgit.FreeBSD.org/src/commit/?id=2f9966ff63d65bd474478888c9088eeae3f9c669

commit 2f9966ff63d65bd474478888c9088eeae3f9c669
Author:     Lexi Winter <lexi@le-Fay.ORG>
AuthorDate: 2024-05-04 13:41:46 +0000
Commit:     Warner Losh <imp@FreeBSD.org>
CommitDate: 2024-05-04 13:41:54 +0000

    packages: add package for NTP
    
    Reviewed by: imp, manu
    Pull Request: https://github.com/freebsd/freebsd-src/pull/1193
---
 libexec/rc/rc.d/Makefile                  | 6 ++++--
 release/packages/Makefile.package         | 2 ++
 usr.sbin/ntp/doc/Makefile                 | 1 +
 usr.sbin/ntp/doc/drivers/Makefile         | 1 +
 usr.sbin/ntp/doc/drivers/icons/Makefile   | 1 +
 usr.sbin/ntp/doc/drivers/scripts/Makefile | 1 +
 usr.sbin/ntp/doc/hints/Makefile           | 1 +
 usr.sbin/ntp/doc/icons/Makefile           | 1 +
 usr.sbin/ntp/doc/pic/Makefile             | 1 +
 usr.sbin/ntp/doc/scripts/Makefile         | 1 +
 usr.sbin/ntp/libntp/Makefile              | 1 +
 usr.sbin/ntp/libntpevent/Makefile         | 1 +
 usr.sbin/ntp/libopts/Makefile             | 1 +
 usr.sbin/ntp/libparse/Makefile            | 1 +
 usr.sbin/ntp/ntp-keygen/Makefile          | 1 +
 usr.sbin/ntp/ntpd/Makefile                | 1 +
 usr.sbin/ntp/ntpdate/Makefile             | 1 +
 usr.sbin/ntp/ntpdc/Makefile               | 1 +
 usr.sbin/ntp/ntpq/Makefile                | 1 +
 usr.sbin/ntp/ntptime/Makefile             | 1 +
 usr.sbin/ntp/sntp/Makefile                | 1 +
 usr.sbin/periodic/etc/daily/Makefile      | 7 +++++--
 22 files changed, 30 insertions(+), 4 deletions(-)

diff --git a/libexec/rc/rc.d/Makefile b/libexec/rc/rc.d/Makefile
index 9a04400e2924..da72474d8b82 100644
--- a/libexec/rc/rc.d/Makefile
+++ b/libexec/rc/rc.d/Makefile
@@ -67,7 +67,6 @@ CONFS=	DAEMON \
 	nfsuserd \
 	nisdomain \
 	${_nscd} \
-	ntpdate \
 	${_opensm} \
 	os-release \
 	pf \
@@ -283,7 +282,10 @@ _nscd=		nscd
 .endif
 
 .if ${MK_NTP} != "no"
-CONFS+=		ntpd
+CONFGROUPS+=	NTP
+NTP+=		ntpd \
+		ntpdate
+NTPPACKAGE=	ntp
 .endif
 
 .if ${MK_OFED} != "no"
diff --git a/release/packages/Makefile.package b/release/packages/Makefile.package
index aed7746e690f..87585f7eac38 100644
--- a/release/packages/Makefile.package
+++ b/release/packages/Makefile.package
@@ -120,6 +120,8 @@ newsyslog_COMMENT=	Newsyslog Utility
 newsyslog_DESC=		Newsyslog Utility
 nfs_COMMENT=		NFS Utilities
 nfs_DESC= 		NFS Utilities
+ntp_COMMENT=		Network Time Protocol server and client
+ntp_DESC=		Network Time Protocol server and client
 nuageinit_COMMENT=	CloudInit support scripts
 nuageinit_DESC=		CloudInit support scripts
 nvme-tools_COMMENT=	NVME Utilities
diff --git a/usr.sbin/ntp/doc/Makefile b/usr.sbin/ntp/doc/Makefile
index 345e75d54679..e87f4f734343 100644
--- a/usr.sbin/ntp/doc/Makefile
+++ b/usr.sbin/ntp/doc/Makefile
@@ -1,6 +1,7 @@
 
 .include <src.opts.mk>
 
+PACKAGE=ntp
 SUBDIR=	drivers hints icons pic scripts
 
 FILESDIR=	${SHAREDIR}/doc/ntp
diff --git a/usr.sbin/ntp/doc/drivers/Makefile b/usr.sbin/ntp/doc/drivers/Makefile
index 580a62a7a9ed..304d212b116b 100644
--- a/usr.sbin/ntp/doc/drivers/Makefile
+++ b/usr.sbin/ntp/doc/drivers/Makefile
@@ -1,6 +1,7 @@
 
 .include <src.opts.mk>
 
+PACKAGE=	ntp
 SUBDIR=		icons scripts
 FILESDIR=	${SHAREDIR}/doc/ntp/drivers
 
diff --git a/usr.sbin/ntp/doc/drivers/icons/Makefile b/usr.sbin/ntp/doc/drivers/icons/Makefile
index eda2a743078d..6c78893bfb58 100644
--- a/usr.sbin/ntp/doc/drivers/icons/Makefile
+++ b/usr.sbin/ntp/doc/drivers/icons/Makefile
@@ -1,6 +1,7 @@
 
 .include <src.opts.mk>
 
+PACKAGE=	ntp
 FILESDIR=	${SHAREDIR}/doc/ntp/drivers/icons
 
 .if ${MK_HTML} != "no"
diff --git a/usr.sbin/ntp/doc/drivers/scripts/Makefile b/usr.sbin/ntp/doc/drivers/scripts/Makefile
index 16b896553114..633c90fdc3e1 100644
--- a/usr.sbin/ntp/doc/drivers/scripts/Makefile
+++ b/usr.sbin/ntp/doc/drivers/scripts/Makefile
@@ -1,6 +1,7 @@
 
 .include <src.opts.mk>
 
+PACKAGE=	ntp
 FILESDIR=	${SHAREDIR}/doc/ntp/drivers/scripts
 
 .if ${MK_HTML} != "no"
diff --git a/usr.sbin/ntp/doc/hints/Makefile b/usr.sbin/ntp/doc/hints/Makefile
index 899e8adaea0f..aa3f25a5a268 100644
--- a/usr.sbin/ntp/doc/hints/Makefile
+++ b/usr.sbin/ntp/doc/hints/Makefile
@@ -1,6 +1,7 @@
 
 .include <src.opts.mk>
 
+PACKAGE=	ntp
 FILESDIR=	${SHAREDIR}/doc/ntp/hints
 
 .if ${MK_HTML} != "no"
diff --git a/usr.sbin/ntp/doc/icons/Makefile b/usr.sbin/ntp/doc/icons/Makefile
index b9608cc2f82e..d6c026341e09 100644
--- a/usr.sbin/ntp/doc/icons/Makefile
+++ b/usr.sbin/ntp/doc/icons/Makefile
@@ -1,6 +1,7 @@
 
 .include <src.opts.mk>
 
+PACKAGE=	ntp
 FILESDIR=	${SHAREDIR}/doc/ntp/icons
 
 .if ${MK_HTML} != "no"
diff --git a/usr.sbin/ntp/doc/pic/Makefile b/usr.sbin/ntp/doc/pic/Makefile
index 23cf769892da..1c1ede47ac04 100644
--- a/usr.sbin/ntp/doc/pic/Makefile
+++ b/usr.sbin/ntp/doc/pic/Makefile
@@ -1,6 +1,7 @@
 
 .include <src.opts.mk>
 
+PACKAGE=	ntp
 FILESDIR=	${SHAREDIR}/doc/ntp/pic
 
 .if ${MK_HTML} != "no"
diff --git a/usr.sbin/ntp/doc/scripts/Makefile b/usr.sbin/ntp/doc/scripts/Makefile
index 7b8255a02423..c0f57e97a164 100644
--- a/usr.sbin/ntp/doc/scripts/Makefile
+++ b/usr.sbin/ntp/doc/scripts/Makefile
@@ -1,6 +1,7 @@
 
 .include <src.opts.mk>
 
+PACKAGE=	ntp
 FILESDIR=	${SHAREDIR}/doc/ntp/scripts
 
 .if ${MK_HTML} != "no"
diff --git a/usr.sbin/ntp/libntp/Makefile b/usr.sbin/ntp/libntp/Makefile
index 7cf4a33b8c6d..e08f6d3b4659 100644
--- a/usr.sbin/ntp/libntp/Makefile
+++ b/usr.sbin/ntp/libntp/Makefile
@@ -5,6 +5,7 @@
 	${SRCTOP}/contrib/ntp/libntp/lib/isc/pthreads \
 	${SRCTOP}/contrib/ntp/libntp/lib/isc/unix \
 
+PACKAGE= ntp
 LIB= ntp
 INTERNALLIB=
 
diff --git a/usr.sbin/ntp/libntpevent/Makefile b/usr.sbin/ntp/libntpevent/Makefile
index 0c04dae95d47..e36b2f51e497 100644
--- a/usr.sbin/ntp/libntpevent/Makefile
+++ b/usr.sbin/ntp/libntpevent/Makefile
@@ -3,6 +3,7 @@
 
 .PATH: ${SRCTOP}/contrib/libevent
 
+PACKAGE= ntp
 LIB= ntpevent
 INTERNALLIB=
 
diff --git a/usr.sbin/ntp/libopts/Makefile b/usr.sbin/ntp/libopts/Makefile
index 170ff6db61da..97ae9fc4635b 100644
--- a/usr.sbin/ntp/libopts/Makefile
+++ b/usr.sbin/ntp/libopts/Makefile
@@ -1,6 +1,7 @@
 
 .PATH: ${SRCTOP}/contrib/ntp/sntp/libopts
 
+PACKAGE=ntp
 LIB=	opts
 INTERNALLIB=
 
diff --git a/usr.sbin/ntp/libparse/Makefile b/usr.sbin/ntp/libparse/Makefile
index e6c0bbb269cc..f79e2c761840 100644
--- a/usr.sbin/ntp/libparse/Makefile
+++ b/usr.sbin/ntp/libparse/Makefile
@@ -1,6 +1,7 @@
 
 .PATH: ${SRCTOP}/contrib/ntp/libparse
 
+PACKAGE=ntp
 LIB=	parse
 INTERNALLIB=
 
diff --git a/usr.sbin/ntp/ntp-keygen/Makefile b/usr.sbin/ntp/ntp-keygen/Makefile
index 71df31a475a7..a667e218a211 100644
--- a/usr.sbin/ntp/ntp-keygen/Makefile
+++ b/usr.sbin/ntp/ntp-keygen/Makefile
@@ -6,6 +6,7 @@ MAN=
 .PATH:	${SRCTOP}/contrib/ntp/util \
 	${SRCTOP}/contrib/ntp/ntpd
 
+PACKAGE=ntp
 PROG=	ntp-keygen
 SRCS=	ntp-keygen.c ntp-keygen-opts.c
 
diff --git a/usr.sbin/ntp/ntpd/Makefile b/usr.sbin/ntp/ntpd/Makefile
index d7b5010227f5..83f63ef02f7b 100644
--- a/usr.sbin/ntp/ntpd/Makefile
+++ b/usr.sbin/ntp/ntpd/Makefile
@@ -6,6 +6,7 @@ MAN=
 .PATH:	${SRCTOP}/contrib/ntp/ntpd \
 	${.OBJDIR}
 
+PACKAGE=	ntp
 DIRS=	ETC_NTP
 ETC_NTP=	/etc/ntp
 ETC_NTP_MODE=	0700
diff --git a/usr.sbin/ntp/ntpdate/Makefile b/usr.sbin/ntp/ntpdate/Makefile
index 03afbb5d708b..fa8000be2f19 100644
--- a/usr.sbin/ntp/ntpdate/Makefile
+++ b/usr.sbin/ntp/ntpdate/Makefile
@@ -3,6 +3,7 @@
 
 .PATH: ${SRCTOP}/contrib/ntp/ntpdate
 
+PACKAGE=ntp
 PROG=	ntpdate
 MAN=
 SRCS=	ntpdate.c version.c
diff --git a/usr.sbin/ntp/ntpdc/Makefile b/usr.sbin/ntp/ntpdc/Makefile
index 8502b7c1b503..d0d61941ac63 100644
--- a/usr.sbin/ntp/ntpdc/Makefile
+++ b/usr.sbin/ntp/ntpdc/Makefile
@@ -5,6 +5,7 @@ MAN=
 
 .PATH: ${SRCTOP}/contrib/ntp/ntpdc
 
+PACKAGE=ntp
 PROG=	ntpdc
 SRCS= 	ntpdc.c ntpdc_ops.c ntpdc-opts.c version.c
 
diff --git a/usr.sbin/ntp/ntpq/Makefile b/usr.sbin/ntp/ntpq/Makefile
index be1e9c9034ff..50cccba36a21 100644
--- a/usr.sbin/ntp/ntpq/Makefile
+++ b/usr.sbin/ntp/ntpq/Makefile
@@ -7,6 +7,7 @@ MAN=
 
 BINDIR=	/usr/bin
 
+PACKAGE=ntp
 PROG=	ntpq
 SRCS= 	ntpq.c ntpq-opts.c ntpq-subs.c version.c
 
diff --git a/usr.sbin/ntp/ntptime/Makefile b/usr.sbin/ntp/ntptime/Makefile
index 027021aa1b16..821e4e5d5cc3 100644
--- a/usr.sbin/ntp/ntptime/Makefile
+++ b/usr.sbin/ntp/ntptime/Makefile
@@ -1,6 +1,7 @@
 
 .PATH: ${SRCTOP}/contrib/ntp/util
 
+PACKAGE=ntp
 PROG=	ntptime
 MAN=
 
diff --git a/usr.sbin/ntp/sntp/Makefile b/usr.sbin/ntp/sntp/Makefile
index ebbfb77b4fab..15d1d7aeffdc 100644
--- a/usr.sbin/ntp/sntp/Makefile
+++ b/usr.sbin/ntp/sntp/Makefile
@@ -3,6 +3,7 @@
 
 .PATH:	${SRCTOP}/contrib/ntp/sntp
 
+PACKAGE=ntp
 PROG=	sntp
 MAN=
 SRCS= 	crypto.c kod_management.c log.c main.c networking.c \
diff --git a/usr.sbin/periodic/etc/daily/Makefile b/usr.sbin/periodic/etc/daily/Makefile
index 3bf4601f5145..fa3291d097ff 100644
--- a/usr.sbin/periodic/etc/daily/Makefile
+++ b/usr.sbin/periodic/etc/daily/Makefile
@@ -44,8 +44,11 @@ CONFS+=	130.clean-msgs
 .endif
 
 .if ${MK_NTP} != "no"
-CONFS+=	480.status-ntpd \
-	480.leapfile-ntpd
+CONFGROUPS+=	NTP
+NTP+=		480.status-ntpd \
+		480.leapfile-ntpd
+NTPMODE=	${BINMODE}
+NTPPACKAGE=	ntp
 .endif
 
 .if ${MK_SENDMAIL} != "no"