git: 1d7ffb373c9d - main - pkgbase: reorganise caroot and openssl packages

From: Doug Rabson <dfr_at_FreeBSD.org>
Date: Sat, 05 Aug 2023 08:32:17 UTC
The branch main has been updated by dfr:

URL: https://cgit.FreeBSD.org/src/commit/?id=1d7ffb373c9d639c9645a6b09ae46b2b92adb2e3

commit 1d7ffb373c9d639c9645a6b09ae46b2b92adb2e3
Author:     Doug Rabson <dfr@FreeBSD.org>
AuthorDate: 2023-07-31 14:38:45 +0000
Commit:     Doug Rabson <dfr@FreeBSD.org>
CommitDate: 2023-08-05 08:30:35 +0000

    pkgbase: reorganise caroot and openssl packages
    
    This splits out the certctl utility into a new certctl package and the
    openssl libs into an openssl-lib package.
    
    PR:             272816
    Reviewed by:    manu
    Differential Revision: https://reviews.freebsd.org/D41321
---
 release/packages/Makefile.package            | 10 ++++++++--
 release/packages/{caroot.ucl => certctl.ucl} |  0
 release/packages/generate-ucl.sh             | 14 ++++++++------
 secure/lib/libcrypto/Makefile                |  2 +-
 secure/lib/libssl/Makefile                   |  2 +-
 usr.sbin/certctl/Makefile                    |  2 +-
 6 files changed, 19 insertions(+), 11 deletions(-)

diff --git a/release/packages/Makefile.package b/release/packages/Makefile.package
index 9bd2994c882a..e1256e02b2ad 100644
--- a/release/packages/Makefile.package
+++ b/release/packages/Makefile.package
@@ -26,10 +26,14 @@ bsdinstall_COMMENT= 	BSDInstall Utilities
 bsdinstall_DESC= 	BSDInstall Utilities
 bsnmp_COMMENT= 		BSNMP Utilities
 bsnmp_DESC= 		BSNMP Utilities
+caroot_COMMENT= 	SSL Certificates
+caroot_DESC= 		SSL Certificates
 clang_COMMENT= 		Clang Utilities
 clang_DESC= 		Clang Utilities
 clibs_COMMENT= 		Core C Libraries
 clibs_DESC= 		Core C Libraries
+certctl_COMMENT= 	SSL Certificate Utility
+certctl_DESC=		SSL Certificate Utility
 console-tools_COMMENT=	Console Utilities
 console-tools_DESC=	Console Utilities
 csh_COMMENT=		C Shell
@@ -113,8 +117,10 @@ nfs_COMMENT=		NFS Utilities
 nfs_DESC= 		NFS Utilities
 nvme-tools_COMMENT=	NVME Utilities
 nvme-tools_DESC=	NVME Utilities
-openssl_COMMENT=	OpenSSL Library and Utility
-openssl_DESC=		OpenSSL Library and Utility
+openssl_COMMENT=	OpenSSL Utility
+openssl_DESC=		OpenSSL Utility
+openssl-lib_COMMENT=	OpenSSL Libraries
+openssl-lib_DESC=	OpenSSL Libraries
 pkg-bootstrap_COMMENT=	pkg bootstrap Utility
 pkg-bootstrap_DESC=	pkg bootstrap Utility
 periodic_COMMENT=	Periodic Utility
diff --git a/release/packages/caroot.ucl b/release/packages/certctl.ucl
similarity index 100%
rename from release/packages/caroot.ucl
rename to release/packages/certctl.ucl
diff --git a/release/packages/generate-ucl.sh b/release/packages/generate-ucl.sh
index 2b1f71e95c11..0c90a9ec4553 100755
--- a/release/packages/generate-ucl.sh
+++ b/release/packages/generate-ucl.sh
@@ -42,8 +42,8 @@ main() {
 			# clibs should not have any dependencies or anything
 			# else imposed on it.
 			;;
-		caroot)
-			pkgdeps="openssl"
+		certctl)
+			pkgdeps="caroot openssl"
 			;;
 
 		# -dev packages that have no corresponding non-dev package
@@ -139,14 +139,16 @@ main() {
 
 	cp "${uclsource}" "${uclfile}"
 	if [ ! -z "${pkgdeps}" ]; then
-		cat <<EOF >> ${uclfile}
-deps: {
-	FreeBSD-${pkgdeps}: {
+		echo 'deps: {' >> ${uclfile}
+		for dep in ${pkgdeps}; do
+			cat <<EOF >> ${uclfile}
+	FreeBSD-${dep}: {
 		origin: "base",
 		version: "${PKG_VERSION}"
 	}
-}
 EOF
+		done
+		echo '}' >> ${uclfile}
 	fi
 	cap_arg="$( make -f ${srctree}/share/mk/bsd.endian.mk -VCAP_MKDB_ENDIAN )"
 	sed -i '' -e "s/%VERSION%/${PKG_VERSION}/" \
diff --git a/secure/lib/libcrypto/Makefile b/secure/lib/libcrypto/Makefile
index 89f330ca2800..6b2a1f3bd157 100644
--- a/secure/lib/libcrypto/Makefile
+++ b/secure/lib/libcrypto/Makefile
@@ -6,7 +6,7 @@ SUBDIR=		engines modules
 .include <bsd.own.mk>
 .include <src.opts.mk>
 
-PACKAGE=	openssl
+PACKAGE=	openssl-lib
 LIB=		crypto
 SHLIB_MAJOR=	30
 VERSION_MAP=	${.CURDIR}/Version.map
diff --git a/secure/lib/libssl/Makefile b/secure/lib/libssl/Makefile
index 4cf17b8d5c51..dc308bcfb146 100644
--- a/secure/lib/libssl/Makefile
+++ b/secure/lib/libssl/Makefile
@@ -5,7 +5,7 @@
 LIB=		ssl
 SHLIB_MAJOR=	30
 VERSION_MAP=	${.CURDIR}/Version.map
-PACKAGE=	openssl
+PACKAGE=	openssl-lib
 
 NO_LINT=
 
diff --git a/usr.sbin/certctl/Makefile b/usr.sbin/certctl/Makefile
index df5acb606143..d583bf3055bd 100644
--- a/usr.sbin/certctl/Makefile
+++ b/usr.sbin/certctl/Makefile
@@ -1,6 +1,6 @@
 # $FreeBSD$
 
-PACKAGE=	caroot
+PACKAGE=	certctl
 SCRIPTS=certctl.sh
 MAN=	certctl.8