From d30ae1b648b9c657d627438317d72a6df3799c10 Mon Sep 17 00:00:00 2001 From: Jiri Vanek Date: Fri, 29 Sep 2017 18:30:30 +0200 Subject: [PATCH] "enabled" system nss --- enableCommentedOutSystemNss.patch | 11 +++++++++++ java-9-openjdk.spec | 12 +++++++++--- nss.cfg => nss.cfg.in | 0 3 files changed, 20 insertions(+), 3 deletions(-) create mode 100644 enableCommentedOutSystemNss.patch rename nss.cfg => nss.cfg.in (100%) diff --git a/enableCommentedOutSystemNss.patch b/enableCommentedOutSystemNss.patch new file mode 100644 index 0000000..97593e7 --- /dev/null +++ b/enableCommentedOutSystemNss.patch @@ -0,0 +1,11 @@ +diff -r 5b86f66575b7 src/share/lib/security/java.security-linux +--- openjdk/jdk/src/java.base/share/conf/security/java.security Tue May 16 13:29:05 2017 -0700 ++++ openjdk/jdk/src/java.base/share/conf/security/java.security Tue Jun 06 14:05:12 2017 +0200 +@@ -83,6 +83,7 @@ + #ifndef solaris + security.provider.tbd=SunPKCS11 + #endif ++#security.provider.tbd=SunPKCS11 ${java.home}/lib/security/nss.cfg + + # + # A list of preferred providers for specific algorithms. These providers will diff --git a/java-9-openjdk.spec b/java-9-openjdk.spec index dbf2578..1597056 100644 --- a/java-9-openjdk.spec +++ b/java-9-openjdk.spec @@ -848,7 +848,7 @@ Provides: java-%{javaver}-%{origin}-accessiblity = %{epoch}:%{version}-%{release Name: java-%{majorver}-%{origin} Version: %{newjavaver}.%{buildver} -Release: 2%{?dist} +Release: 3%{?dist} # java-1.5.0-ibm from jpackage.org set Epoch to 1 for unknown reasons, # and this change was brought into RHEL-4. java-1.5.0-ibm packages # also included the epoch in their virtual provides. This created a @@ -883,7 +883,7 @@ Source9: jconsole.desktop.in Source10: policytool.desktop.in # nss configuration file -Source11: nss.cfg +Source11: nss.cfg.in # Removed libraries that we link instead Source12: remove-intree-libraries.sh @@ -925,6 +925,9 @@ Patch104: bootcycle_jobs.patch Patch400: ppc_stack_overflow_fix.patch Patch401: aarch64BuildFailure.patch +# Non-OpenJDK fixes +Patch1000: enableCommentedOutSystemNss.patch + BuildRequires: autoconf BuildRequires: automake BuildRequires: alsa-lib-devel @@ -1231,6 +1234,7 @@ sh %{SOURCE12} %patch401 -p1 popd +%patch1000 # Extract systemtap tapsets %if %{with_systemtap} @@ -1272,6 +1276,8 @@ for file in %{SOURCE9} %{SOURCE10} ; do done done +# Setup nss.cfg +sed -e s:@NSS_LIBDIR@:%{NSS_LIBDIR}:g %{SOURCE11} > nss.cfg %build # How many cpu's do we have? @@ -1372,7 +1378,7 @@ popd >& /dev/null export JAVA_HOME=$(pwd)/%{buildoutputdir $suffix}/images/%{jdkimage} # Install nss.cfg right away as we will be using the JRE above -install -m 644 %{SOURCE11} $JAVA_HOME/conf/security/ +install -m 644 nss.cfg $JAVA_HOME/conf/security/ # Use system-wide tzdata rm $JAVA_HOME/lib/tzdb.dat diff --git a/nss.cfg b/nss.cfg.in similarity index 100% rename from nss.cfg rename to nss.cfg.in