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/openjdk8/Makefile | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'java/openjdk8') diff --git a/java/openjdk8/Makefile b/java/openjdk8/Makefile index 98a331ac61f4..95f003bd208d 100644 --- a/java/openjdk8/Makefile +++ b/java/openjdk8/Makefile @@ -1,5 +1,6 @@ PORTNAME= openjdk PORTVERSION= ${JDK_MAJOR_VERSION}.${JDK_UPDATE_VERSION}.${JDK_BUILD_NUMBER}.${BSD_JDK_VERSION} +PORTREVISION= 1 CATEGORIES= java devel MASTER_SITES= LOCAL/jkim:jtreg PKGNAMESUFFIX?= ${JDK_MAJOR_VERSION} @@ -288,6 +289,10 @@ post-build: build.tools.tzdb.TzdbZoneRulesCompiler \ -C ${JDK_BUILDDIR}/jdk/btclasses build/tools/tzdb .endif +.if defined(OPENJDK_SYMLINK_CACERTS) + @${RM} ${JRE_IMAGEDIR}/lib/security/cacerts + @${LN} -sf ${OPENJDK_SYMLINK_CACERTS} ${JRE_IMAGEDIR}/lib/security/cacerts +.endif post-build-TZUPDATE-on: @${RM} -r ${JRE_IMAGEDIR}/lib/zi -- cgit v1.2.3