From d901bf5df9d22af271582c28d9dc279a6794f3d0 Mon Sep 17 00:00:00 2001 From: Michael Osipov Date: Wed, 22 Nov 2023 14:08:23 +0100 Subject: java/openjdk*: Allow users to specify an alternative cacerts file Similar to certificate management with certctl(8) users can use custom enterprise CAs. These need to be assembled into a custom cacerts file. Therefore, an admin can install a custom truststore to an arbitrary location and have the OpenJDK port symlink to it by adding OPENJDK_SYMLINK_CACERTS to make.conf. E.g., OPENJDK_SYMLINK_CACERTS=/usr/local/etc/ssl/cacerts. PR: 229329 Approved by: jrm (mentor), otis (mentor), glewis Differential Revision: https://reviews.freebsd.org/D42720 --- java/openjdk21/Makefile | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'java/openjdk21/Makefile') diff --git a/java/openjdk21/Makefile b/java/openjdk21/Makefile index f0dfc09f0d52..d02be6878d59 100644 --- a/java/openjdk21/Makefile +++ b/java/openjdk21/Makefile @@ -1,6 +1,7 @@ PORTNAME= openjdk DISTVERSIONPREFIX= jdk- DISTVERSION= ${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_PATCH_VERSION}+${JDK_BUILD_NUMBER}-${BSD_JDK_VERSION} +PORTREVISION= 1 CATEGORIES= java devel PKGNAMESUFFIX?= ${JDK_MAJOR_VERSION} @@ -182,6 +183,12 @@ post-patch: -e 's|%%ICONV_LIBS%%|${ICONV_LIBS}|' \ ${WRKSRC}/make/autoconf/libraries.m4 +post-build: +.if defined(OPENJDK_SYMLINK_CACERTS) + @${RM} ${JDK_IMAGEDIR}/lib/security/cacerts + @${LN} -sf ${OPENJDK_SYMLINK_CACERTS} ${JDK_IMAGEDIR}/lib/security/cacerts +.endif + do-install: @${MKDIR} ${STAGEDIR}${INSTALLDIR} @cd ${JDK_IMAGEDIR} && ${COPYTREE_SHARE} . ${STAGEDIR}${INSTALLDIR} -- cgit v1.2.3