From: "André Draszik" <git@andred.net>
To: yocto@yoctoproject.org
Subject: [meta-java][PATCH 3/3] openjdk-8: use ca-certificates-java
Date: Fri, 30 Mar 2018 09:40:19 +0100 [thread overview]
Message-ID: <20180330084019.18955-4-git@andred.net> (raw)
In-Reply-To: <20180330084019.18955-1-git@andred.net>
From: André Draszik <andre.draszik@jci.com>
The OpenJDK-8 package currently comes with a trustStore
that was generated at OpenJDK-8-native build time from
*all* certificates available in the system, not just from
those that are marked as trusted.
This isn't right...
openjdk-8 and openjre-8 now RDEPENDS on (and use) the CA
certificates as provided by the ca-certificates-java
package just added.
This makes sure that Java now uses the same trusted CA
certificates as the rest of the system.
Signed-off-by: André Draszik <andre.draszik@jci.com>
---
recipes-core/openjdk/openjdk-8-common.inc | 2 ++
recipes-core/openjdk/openjdk-8-cross.inc | 12 +++++++++++-
2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/recipes-core/openjdk/openjdk-8-common.inc b/recipes-core/openjdk/openjdk-8-common.inc
index b2020c3..c8d157e 100644
--- a/recipes-core/openjdk/openjdk-8-common.inc
+++ b/recipes-core/openjdk/openjdk-8-common.inc
@@ -254,3 +254,5 @@ def version_specific_cflags(d):
CFLAGS_append = " ${@version_specific_cflags(d)}"
CXXFLAGS_append = " ${@version_specific_cflags(d)}"
CXX_append = " -std=gnu++98"
+
+RDEPENDS_${PN} = "ca-certificates-java"
diff --git a/recipes-core/openjdk/openjdk-8-cross.inc b/recipes-core/openjdk/openjdk-8-cross.inc
index d70c946..6795c92 100644
--- a/recipes-core/openjdk/openjdk-8-cross.inc
+++ b/recipes-core/openjdk/openjdk-8-cross.inc
@@ -57,7 +57,6 @@ EXTRA_OECONF_append = "\
--with-sys-root=${STAGING_DIR_HOST} \
--with-tools-dir=${STAGING_DIR_NATIVE} \
--with-boot-jdk=${STAGING_LIBDIR_NATIVE}/jvm/openjdk-8-native \
- --with-cacerts-file=${STAGING_LIBDIR_NATIVE}/jvm/openjdk-8-native/jre/lib/security/cacerts \
\
--disable-precompiled-headers \
--disable-zip-debug-info \
@@ -88,6 +87,17 @@ do_install_append() {
pack200 --repack --effort=9 --segment-limit=-1 --modification-time=latest --strip-debug "$0"'
fi
fi
+
+ if [ -d ${D}${JDK_HOME} ] ; then
+ rm ${D}${JDK_HOME}/jre/lib/security/cacerts
+ ln -s ${@os.path.relpath("${sysconfdir}/ssl/certs/java/cacerts", "${JDK_HOME}/jre/lib/security/cacerts")} \
+ ${D}${JDK_HOME}/jre/lib/security/cacerts
+ fi
+ if [ -d ${D}${JRE_HOME} ] ; then
+ rm ${D}${JRE_HOME}/lib/security/cacerts
+ ln -s ${@os.path.relpath("${sysconfdir}/ssl/certs/java/cacerts", "${JRE_HOME}/lib/security/cacerts")} \
+ ${D}${JRE_HOME}/lib/security/cacerts
+ fi
}
export MAKE_VERBOSE = "y"
--
2.16.2
next prev parent reply other threads:[~2018-03-30 8:40 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-30 8:40 [meta-java][PATCH 0/3] Java CA certificates updates André Draszik
2018-03-30 8:40 ` [meta-java][PATCH 1/3] ca-certificates-java: add recipe to generate trustStore André Draszik
2018-04-02 6:43 ` [meta-java][PATCH v2] " André Draszik
2018-06-13 9:22 ` [yocto] " Richard Leitner
2018-06-15 8:03 ` Richard Leitner
2018-03-30 8:40 ` [meta-java][PATCH 2/3] layer.conf: add ca-certificates-java to SIGGEN_EXCLUDERECIPES_ABISAFE André Draszik
2018-03-30 8:40 ` André Draszik [this message]
2018-06-15 8:00 ` [meta-java][PATCH 3/3] openjdk-8: use ca-certificates-java Richard Leitner
2018-06-15 8:19 ` [yocto] " Richard Leitner
2018-06-15 8:58 ` Maxin B. John
2018-06-15 9:21 ` Henning Heinold
2018-06-15 12:49 ` Otavio Salvador
2018-08-20 13:42 ` [meta-java][PATCH 3/3] openjdk-8: use ca-certificates-java (was: Re: Fwd: [yocto] [meta-java][PATCH 3/3] openjdk-8: use ca-certificates-java) André Draszik
2018-08-20 13:54 ` Richard Leitner
2018-04-09 13:55 ` [meta-java][PATCH 0/3] Java CA certificates updates Maxin B. John
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180330084019.18955-4-git@andred.net \
--to=git@andred.net \
--cc=yocto@yoctoproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.