git: d901bf5df9d2 - main - java/openjdk*: Allow users to specify an alternative cacerts file
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 09 Feb 2024 19:53:11 UTC
The branch main has been updated by michaelo: URL: https://cgit.FreeBSD.org/ports/commit/?id=d901bf5df9d22af271582c28d9dc279a6794f3d0 commit d901bf5df9d22af271582c28d9dc279a6794f3d0 Author: Michael Osipov <michaelo@FreeBSD.org> AuthorDate: 2023-11-22 13:08:23 +0000 Commit: Michael Osipov <michaelo@FreeBSD.org> CommitDate: 2024-02-09 19:52:07 +0000 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/openjdk11/Makefile | 7 +++++++ java/openjdk17/Makefile | 7 +++++++ java/openjdk21/Makefile | 7 +++++++ java/openjdk8/Makefile | 5 +++++ 4 files changed, 26 insertions(+) diff --git a/java/openjdk11/Makefile b/java/openjdk11/Makefile index 65dd031607ae..01bac3655923 100644 --- a/java/openjdk11/Makefile +++ b/java/openjdk11/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} @@ -192,6 +193,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} diff --git a/java/openjdk17/Makefile b/java/openjdk17/Makefile index 0f9ff6cd2768..32cee2adfc7b 100644 --- a/java/openjdk17/Makefile +++ b/java/openjdk17/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} @@ -180,6 +181,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} 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} 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