Fridrich Strba 2017-09-12 14:27:13 +00:00 committed by Git OBS Bridge
parent 3816928309
commit 15ac7ed2ba
3 changed files with 86 additions and 1 deletions

View File

@ -0,0 +1,80 @@
From c83aec1d026b9567e7e6d982e4d19f3a566b66d2 Mon Sep 17 00:00:00 2001
From: Stephan Bergmann <sbergman@redhat.com>
Date: Mon, 28 Aug 2017 15:35:43 +0200
Subject: [PATCH] tdf#100501: Adapt to Java 9 (at least on Linux x86-64)
Checking with both jdk-9+181_linux-x64_bin.tar.gz and
jre-9+181_linux-x64_bin.tar.gz as currently available at
<http://jdk.java.net/9/> "JDK 9 Early-Access Builds":
For one, make SunVersion::init understand <http://openjdk.java.net/jeps/223>
"JEP 223: New Version-String Scheme" at least insofar as to accept strings like
"9" with less than three dot-separated segments (where the missing segments are
treated like "0").
For another, at least for Linux x86-64, libjvm.so is now apparently located in a
path without an "amd64" architecture segment, "lib/server/libjvm.so". (But
could that also be "client"?) Other platforms may need further adjustments.
Change-Id: Idcebc833472c81a1dc74dcdd481b0a37274a8713
(cherry picked from commit 52ffad9bb7be800790de6d918154dbeade88cadd, plus
cda4cea7cdfc9a8de814b901b3b957f029d36aaf "tdf#100501: Fix thinko")
Reviewed-on: https://gerrit.libreoffice.org/41678
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
---
jvmfwk/plugins/sunmajor/pluginlib/sunjre.cxx | 3 ++-
jvmfwk/plugins/sunmajor/pluginlib/sunversion.cxx | 7 ++++++-
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunjre.cxx b/jvmfwk/plugins/sunmajor/pluginlib/sunjre.cxx
index 7f7c4943c8be..7543f497eb83 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/sunjre.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/sunjre.cxx
@@ -68,7 +68,10 @@ char const* const* SunInfo::getRuntimePaths(int * size)
"/lib/" JFW_PLUGIN_ARCH "/client/libjvm.so",
"/lib/" JFW_PLUGIN_ARCH "/server/libjvm.so",
"/lib/" JFW_PLUGIN_ARCH "/classic/libjvm.so",
- "/lib/" JFW_PLUGIN_ARCH "/jrockit/libjvm.so"
+ "/lib/" JFW_PLUGIN_ARCH "/jrockit/libjvm.so",
+ "/lib/server/libjvm.so",
+ "/lib/client/libjvm.so",
+ "/lib/zero/libjvm.so"
#endif
};
*size = SAL_N_ELEMENTS(ar);
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunversion.cxx b/jvmfwk/plugins/sunmajor/pluginlib/sunversion.cxx
index 85f31a383fc6..fb4227da1964 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/sunversion.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/sunversion.cxx
@@ -88,7 +88,7 @@ bool SunVersion::init(const char *szVersion)
! (nPartPos == 0) // prevents: ".4.1", "..1", part must start with digit
&& (
//separators after maintenance (1.4.1_01, 1.4.1-beta, or 1.4.1)
- ((pCur == pEnd || *pCur == '_' || *pCur == '-') && (nPart == 2 ))
+ (pCur == pEnd || *pCur == '_' || *pCur == '-')
||
//separators between major-minor and minor-maintenance
(nPart < 2 && *pCur == '.') )
@@ -97,6 +97,8 @@ bool SunVersion::init(const char *szVersion)
pCur + 1 != pEnd
|| rtl::isAsciiDigit(static_cast<unsigned char>(*pCur))) )
{
+ bool afterMaint = pCur == pEnd || *pCur == '_' || *pCur == '-';
+
int len = pCur - pLast;
if (len >= 127)
return false;
@@ -107,6 +109,9 @@ bool SunVersion::init(const char *szVersion)
pLast = pCur;
m_arVersionParts[nPart] = atoi(buf);
+
+ if (afterMaint)
+ nPart = 2;
nPart ++;
nPartPos = 0;
if (nPart == 3)
--
2.14.1

View File

@ -9,6 +9,8 @@ Tue Sep 12 08:41:51 UTC 2017 - fstrba@suse.com
* 0001-Adapt-getcompver.awk-to-Java-9.patch * 0001-Adapt-getcompver.awk-to-Java-9.patch
+ Adapt getcompver.awk to Java 9 where the version might be + Adapt getcompver.awk to Java 9 where the version might be
single digit single digit
* 0001-tdf-100501-Adapt-to-Java-9-at-least-on-Linux-x86-64.patch
+ Make LibreOffice find Java 9 JVM at runtime
* java-encoding.patch * java-encoding.patch
+ Replace one unnecessary UTF-8 character by an ASCII one + Replace one unnecessary UTF-8 character by an ASCII one

View File

@ -88,7 +88,9 @@ Patch100: 0001-This-hunk-breaks-jdk9-build.patch
Patch101: 0002-Detect-libjawt-automatically-on-java9-too.patch Patch101: 0002-Detect-libjawt-automatically-on-java9-too.patch
# PATCH-FIX-UPSTREAM: addapt getcompver.awk to java 9 # PATCH-FIX-UPSTREAM: addapt getcompver.awk to java 9
Patch102: 0001-Adapt-getcompver.awk-to-Java-9.patch Patch102: 0001-Adapt-getcompver.awk-to-Java-9.patch
Patch103: java-encoding.patch # PATCH-FIX-UPSTREAM: Make LibreOffice find Java 9 JVM at runtime
Patch103: 0001-tdf-100501-Adapt-to-Java-9-at-least-on-Linux-x86-64.patch
Patch104: java-encoding.patch
# try to save space by using hardlinks # try to save space by using hardlinks
Patch990: install-with-hardlinks.diff Patch990: install-with-hardlinks.diff
BuildRequires: %{name}-share-linker BuildRequires: %{name}-share-linker
@ -920,6 +922,7 @@ Provides additional %{langname} translations and resources for %{project}. \
%patch101 -p1 %patch101 -p1
%patch102 -p1 %patch102 -p1
%patch103 -p1 %patch103 -p1
%patch104 -p1
%patch990 -p1 %patch990 -p1
# Do not generate doxygen timestamp # Do not generate doxygen timestamp