Accepting request 538835 from Java:Factory

October 2017 CPU (Security fixes)

OBS-URL: https://build.opensuse.org/request/show/538835
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/java-1_8_0-openjdk?expand=0&rev=54
This commit is contained in:
Dominique Leuenberger 2017-11-09 12:52:42 +00:00 committed by Git OBS Bridge
commit 86efa66fab
16 changed files with 337 additions and 166 deletions

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:38e24d556aa269a5168e251b1fa97e84467a722fff27fa2f81de315854f18a33
size 6743892
oid sha256:c20ed439e32c6d72321097289bf7ac19bfae172a90efe23e08c54e63c53b402c
size 6742092

View File

@ -1,66 +0,0 @@
--- openjdk/jdk/src/share/classes/sun/util/calendar/ZoneInfoFile.java 2017-07-27 02:47:51.000000000 +0200
+++ openjdk/jdk/src/share/classes/sun/util/calendar/ZoneInfoFile.java 2017-09-30 21:28:03.040474683 +0200
@@ -31,6 +31,7 @@
import java.io.DataInputStream;
import java.io.File;
import java.io.FileInputStream;
+import java.io.InputStream;
import java.io.IOException;
import java.io.StreamCorruptedException;
import java.security.AccessController;
@@ -47,6 +48,7 @@
import java.util.Map;
import java.util.Map.Entry;
import java.util.Objects;
+import java.util.Properties;
import java.util.Set;
import java.util.SimpleTimeZone;
import java.util.concurrent.ConcurrentHashMap;
@@ -251,7 +253,15 @@
AccessController.doPrivileged(new PrivilegedAction<Object>() {
public Object run() {
try {
- String libDir = System.getProperty("java.home") + File.separator + "lib";
+ final String homeDir = System.getProperty("java.home");
+ if (homeDir == null) {
+ throw new Error("java.home is not set");
+ }
+ String libDir = homeDir + File.separator + "lib";
+ String otherDir = getZoneInfoDir(libDir);
+ if (otherDir != null)
+ libDir = otherDir;
+
try (DataInputStream dis = new DataInputStream(
new BufferedInputStream(new FileInputStream(
new File(libDir, "tzdb.dat"))))) {
@@ -264,6 +274,30 @@
}
});
}
+
+ private static String getZoneInfoDir(final String libDir) {
+ return AccessController.doPrivileged (new PrivilegedAction<String>() {
+ public String run() {
+ try {
+ File f = new File(libDir + File.separator + "tz.properties");
+ InputStream in = new FileInputStream(f);
+ BufferedInputStream bin = new BufferedInputStream(in);
+ Properties props = new Properties();
+ props.load(bin);
+ bin.close();
+ String dir = props.getProperty("sun.zoneinfo.dir");
+ if (dir == null)
+ return null;
+ File tzdbdat = new File(dir, "tzdb.dat");
+ if (tzdbdat.exists())
+ return dir;
+ return null;
+ } catch (Exception x) {
+ return null;
+ }
+ }
+ });
+ }
private static void addOldMapping() {
for (String[] alias : oldMappings) {

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:0b03af9726b6d47811166ab8343b553de33b4285f780c6c6df98a2e697613a0c
size 937092
oid sha256:ad9d8ee4124afa374fb362fc2cbbcbd9efae186ade413a539e36004e70603662
size 938380

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:a6e974e8447a661e5ae5a17e44b703395d7fc551af540890de4dcda481ebee38
size 6820580
oid sha256:2fd0b65c57255136b0fcf8ba0b5f5acdbb409af9c35ae4e84cfe7f93fdbfcfd5
size 6820148

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:8eaa6ac93d4a1989460109246f78427acc5493f847c7b2fc80d3a5d918d811c9
size 1492912

3
icedtea-3.6.0.tar.xz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:d0a0a9ce58b3ed29f2deecef8b78f28a79315f4a6330ee833410f79cbf48417e
size 1489504

View File

@ -1,21 +0,0 @@
--- openjdk/jdk/src/solaris/classes/sun/nio/fs/LinuxFileStore.java 2017-08-23 11:40:26.690809603 +0200
+++ openjdk/jdk/src/solaris/classes/sun/nio/fs/LinuxFileStore.java 2017-08-23 11:44:28.314815334 +0200
@@ -74,8 +74,16 @@
} catch (UnixException x) {
x.rethrowAsIOException(parent);
}
- if (attrs.dev() != dev())
- break;
+ if (attrs.dev() != dev()) {
+
+ // step 3: lookup mounted file systems (use /proc/mounts to ensure we
+ // find the file system even when not in /etc/mtab)
+ byte[] dir = path.asByteArray();
+ for (UnixMountEntry entry: fs.getMountEntries("/proc/mounts")) {
+ if (Arrays.equals(dir, entry.dir()))
+ return entry;
+ }
+ }
path = parent;
parent = parent.getParent();
}

View File

@ -1,3 +1,228 @@
-------------------------------------------------------------------
Fri Nov 3 11:36:40 UTC 2017 - fstrba@suse.com
- Added patch:
* tzdb_dat.patch
+ Patch also the other place in jdk that loads the tzdb.dat
file
-------------------------------------------------------------------
Thu Nov 2 06:30:45 UTC 2017 - fstrba@suse.com
- Update to version jdk8u151 (icedtea 3.6.0)
* Security fixes
+ S8165543: Better window framing
+ S8169026, CVE-2017-10274: Handle smartcard clean up better
(bsc#1064071)
+ S8169966: Larger AWT menus
+ S8170218: Improved Font Metrics
+ S8171252: Improve exception checking
+ S8171261: Stability fixes for lcms
+ S8174109, CVE-2017-10281: Better queuing priorities
(bsc#1064072)
+ S8174966, CVE-2017-10285: Unreferenced references
(bsc#1064073)
+ S8175940: More certificate subject checking
+ S8176751, CVE-2017-10295: Better URL connections (bsc#1064075)
+ S8178794, CVE-2017-10388: Correct Kerberos ticket grants
(bsc#1064086)
+ S8180024: Improve construction of objects during
deserialization
+ S8180711, CVE-2017-10346: Better invokespecial checks
(bsc#1064078)
+ S8181100, CVE-2017-10350: Better Base Exceptions (bsc#1064082)
+ S8181323, CVE-2017-10347: Better timezone processing
(bsc#1064079)
+ S8181327, CVE-2017-10349: Better X processing (bsc#1064081)
+ S8181370, CVE-2017-10345: Better keystore handling
(bsc#1064077)
+ S8181432, CVE-2017-10348: Better processing of unresolved
permissions (bsc#1064080)
+ S8181597, CVE-2017-10357: Process Proxy presentation
(bsc#1064085)
+ S8181612, CVE-2017-10355: More stable connection processing
(bsc#1064083)
+ S8181692, CVE-2017-10356: Update storage implementations
(bsc#1064084)
+ S8183028, CVE-2016-10165: Improve CMS header processing
(bsc#1064069)
+ S8184682, CVE-2016-9840, CVE-2016-9841, CVE-2016-9842,
CVE-2016-9843: Upgrade compression library (bsc#1064070)
* New features
+ PR3469: Alternative path to tzdb.dat
+ PR3483: Separate addition of nss.cfg and tz.properties into
separate targets
+ PR3484: Move SystemTap support to its own target
+ PR3485: Support additional targets for the bootstrap build
* Import of OpenJDK 8 u151 build 12
+ S8029659: Keytool, print key algorithm of certificate or key
entry
+ S8057810: New defaults for DSA keys in jarsigner and keytool
+ S8075484, PR3473, RH1490713: SocketInputStream.socketRead0
can hang even with soTimeout set
+ S8077670: sun/security/krb5/auto/MaxRetries.java may fail
with BindException
+ S8087144: sun/security/krb5/auto/MaxRetries.java fails with
Retry count is -1 less
+ S8153146: sun/security/krb5/auto/MaxRetries.java failed with
timeout
+ S8157561: Ship the unlimited policy files in JDK Updates
+ S8158517: Minor optimizations to ISO10126PADDING
+ S8171319: keytool should print out warnings when reading or
generating cert/cert req using weak algorithms
+ S8177569: keytool should not warn if signature algorithm
used in cacerts is weak
+ S8177837: need to upgrade install tools
+ S8178714: PKIX validator nameConstraints check failing after
change 8175940
+ S8179423: 2 security tests started failing for
JDK 1.6.0 u161 b05
+ S8179564: Missing @bug for tests added with JDK-8165367
+ S8181048: Refactor existing providers to refer to the same
constants for default values for key length
+ S8182879: Add warnings to keytool when using JKS and JCEKS
+ S8184937: LCMS error 13: Couldn't link the profiles
+ S8185039: Incorrect GPL header causes RE script to miss swap
to commercial header for licensee source bundle
+ S8185040: Incorrect GPL header causes RE script to miss swap
to commercial header for licensee source bundle
+ S8185778: 8u151 L10n resource file update
+ S8185845: Add SecurityTools.java test library
+ S8186503: sun/security/tools/jarsigner/DefaultSigalg.java
failed after backport to JDK 6/7/8
+ S8186533: 8u151 L10n resource file update md20
+ S8186674: Remove JDK-8174109 from CPU Aug 21 week builds
* Backports
+ S8035496, PR3487: G1 ARM: missing remset entry noticed by
VerifyAfterGC for vm/gc/concurrent/lp50yp10rp70mr30st0
+ S8146086, PR3439, RH1478402: Publishing two webservices on
same port fails with "java.net.BindException: Address already
in use"
+ S8184673, PR3475, RH1487266: Fix compatibility issue in
AlgorithmChecker for 3rd party JCE providers
+ S8185164, PR3438: GetOwnedMonitorInfo() returns incorrect
owned monitor
+ S8187822, PR3478, RH1494230: C2 conditonal move optimization
might create broken graph
* Bug fixes
+ PR3479, RH1486025: ECC and NSS JVM crash
+ PR3486: Path to jvm.cfg is wrong in add-systemtap-boot
+ S8165852, PR3468: (fs) Mount point not found for a file
which is present in overlayfs
+ S8188030, PR3459, RH1484079: AWT java apps fail to start
when some minimal fonts are present
* PPC port
+ S8145913, PR3466, RH1498309: PPC64: add Montgomery multiply
intrinsic
+ S8168318, PR3466, RH1498320: PPC64: Use cmpldi instead of
li/cmpld
+ S8170328, PR3466, RH1498321: PPC64: Use andis instead of
lis/and
+ S8181810, PR3466, RH1498319: PPC64: Leverage extrdi for
bitfield extract
* AArch64 port
+ S8161190, PR3488: AArch64: Fix overflow in immediate cmp
instruction
+ S8187224, PR3488: aarch64: some inconsistency between
aarch64_ad.m4 and aarch64.ad
* SystemTap
+ PR3467, RH1492139: Hotspot object_alloc tapset uses
HeapWordSize incorrectly
* Shenandoah
+ Add missing UseShenandoahGC checks to C2
+ [backport] Add JVMTI notifications to Shenandoah GC pauses.
+ [backport] After Evac verification should run consistently
+ [backport] All definitions should start with Shenandoah*
+ [backport] Allocation latency tracing
+ [backport] Allow allocations in pinned regions
+ [backport] Assorted monitoring support fixes
+ [backport] Avoid Full STW GC on System.gc() + related fixes
+ [backport] BrooksPointer tracing overwhelms -Xlog:gc=trace
+ [backport] Cannot do more than 1000 Full GCs
+ [backport] Cap heap size for TestRegionSizeArgs test
+ [backport] Cleanup "dirty" mentions
+ [backport] Cleanup unused methods and statements + Trivial
cleanup: removed unused field, etc.
+ [backport] Common pause marker to capture everything
before/after pause
+ [backport] Consistent print_on and tty handling
+ [backport] "continuous" heuristics
+ [backport] Disable biased locking by default
+ [backport] Fix build error: avoid loops with empty bodies
+ [backport] Fix build error: switches over enums should take
all enums
+ [backport] Fix build error: verifier liveness should not be
implicitly casted to size_t
+ [backport] Fixed assertion failures when printing heap
region to trace output
+ [backport] Fixed C calling convention of shenandoah_wb() on
Windows
+ [backport] LotsOfCycles test always degrades to Full GC
+ [backport] Made ShenandoahPrinter debug only
+ [backport] Make sure different Verifier levels work
+ [backport] Make sure we have at least one memory pool per
memory manager (JMX) + JMX double-counts heap used size
+ [backport] Mark heuristics diagnostic/experimental
+ [backport] Move Verifier "start" message under (gc,start)
+ [backport] On-demand commit as heap resizing strategy
+ [backport] Periodic GC
+ [backport] PhiNode::has_only_data_users() needs to apply to
shenandoah barrier only
+ [backport] Pinning humongous regions should be allowed
+ [backport] Reclaimed humongous regions should count towards
immediate garbage
+ [backport] Refactor region flags into finite state machine
+ [backport] Refactor ShConcThread dispatch
+ [backport] Refactor ShenandoahFreeSet + Fast-forward over
humongous regions to keep "current" non-humongous
+ [backport] Refactor ShenandoahHeapLock
+ [backport] Refactor ShenandoahHeapRegionSet
+ [backport] Region (byte|word) shifts as the replacement for
divisions
+ [backport] Rehash -XX:-UseTLAB in tests + Rehash allocation
tests
+ [backport] Rename inline guards
+ [backport] Selectable humongous threshold + Humongous top()
should be correct for iteration
+ [backport] Shortcut concurrent cycle when enough immediate
garbage is reclaimed
+ [backport] Templatize and improve inlining of arraycopy and
clone barriers.
+ [backport] TestRegionSampling test
+ [backport] TestSmallHeap test for Shenandoah
+ [backport] Uncommit heap regions after given delay
+ [backport] Underflow in adaptive free_threshold calculation
+ [backport] Unlock more GC-specific tests for Shenandoah
+ [backport] Update counters on slow-path more rarely
+ [backport] Verifier should avoid pushing on stack when
walking objects past TAMS
+ [backport] Verifier should walk cset and humongous regions
+ [backport] Verify humongous regions liveness
+ [backport] Verify liveness data
+ Correct way to fix Windows call convention issue
+ Fix build error in release config.
+ Fixed Fixed message logging
+ Handle Java heap initialization and expansion failures
+ Make sure -verbose:gc, PrintGC, PrintGCDetails work
consistently
+ Missing barriers on constant oops + acmp rework + cas fix +
write barrier on constant oop fix
+ Missing UseShenandoahGC check in
LibraryCallKit::inline_multiplyToLen()
+ Missing UseShenandoahGC check to C2
+ OOME in SurrogateLockerThread deadlocks the GC cycle
+ Properly unlock ShenandoahVerify
+ Remove unused memory_for, fixing the build
+ Remove useless code following acmp rework
+ Revert accidental G1 closure rename
+ Test bug: test library and flags in TestHeapAlloc
+ UnlockDiagnosticVMOptions flag is needed for ShenandoahVerify
+ Write barrier pin and expand cleanup
- Removed patches:
* alternative-tzdb_dat.patch
* java-1_8_0-openjdk-linuxfilestore.patch
+ Integrated upstream
-------------------------------------------------------------------
Sun Oct 8 12:44:35 UTC 2017 - fstrba@suse.com

View File

@ -18,7 +18,7 @@
%{!?aarch64:%global aarch64 aarch64 arm64 armv8}
%global jit_arches %{ix86} x86_64 ppc64 ppc64le %{aarch64} %{arm}
%global icedtea_version 3.5.1
%global icedtea_version 3.6.0
%global icedtea_sound_version 1.0.1
%global buildoutputdir openjdk.build/
# Convert an absolute path to a relative path. Each symbolic link is
@ -32,7 +32,8 @@
# priority must be 6 digits in total
%global priority 1805
%global javaver 1.8.0
%global updatever 144
%global updatever 151
%global buildver 12
# Standard JPackage directories and symbolic links.
%global sdklnk java-%{javaver}-openjdk
%global archname %{sdklnk}
@ -203,8 +204,7 @@ Patch1000: icedtea-3.0.1-sunec.patch
Patch1001: java-1_8_0-openjdk-suse-desktop-files.patch
Patch2000: java-1_8_0-openjdk-gcc6.patch
Patch2001: disable-doclint-by-default.patch
Patch2002: java-1_8_0-openjdk-linuxfilestore.patch
Patch2003: alternative-tzdb_dat.patch
Patch2002: tzdb_dat.patch
BuildRequires: alsa-lib-devel
BuildRequires: autoconf
BuildRequires: automake
@ -431,33 +431,6 @@ this package unless you really need to.
%patch1000 -p1
%patch1001 -p1
# Extract systemtap tapsets
%if %{with_systemtap}
for file in tapset/*.in; do
OUTPUT_FILE=`echo $file | sed -e s:\.in$::g`
%ifnarch %{arm}
sed -e s:@ABS_SERVER_LIBJVM_SO@:%{_jvmdir}/%{jredir}/lib/%{archinstall}/server/libjvm.so:g $file > $file.1
%else
sed -e '/@ABS_SERVER_LIBJVM_SO@/d' $file > $file.1
%endif
# TODO find out which architectures other than ix86 and arm have a client vm
%ifarch %{ix86} %{arm}
sed -e s:@ABS_CLIENT_LIBJVM_SO@:%{_jvmdir}/%{jredir}/lib/%{archinstall}/client/libjvm.so:g $file.1 > $OUTPUT_FILE
%else
sed -e '/@ABS_CLIENT_LIBJVM_SO@/d' $file.1 > $OUTPUT_FILE
%endif
sed -i -e s:@ABS_JAVA_HOME_DIR@:%{_jvmdir}/%{sdkdir}:g $OUTPUT_FILE
sed -i -e s:@INSTALL_ARCH_DIR@:%{archinstall}:g $OUTPUT_FILE
done
%endif
%build
export LANG=C
unset JAVA_HOME
@ -484,6 +457,10 @@ export NSS_LIBS="$NSS_SOFTOKN_LIBS"
sh autogen.sh
%configure \
--disable-downloading \
--with-tzdata-dir=%{_datadir}/javazi \
--with-pkgversion="build %{javaver}_%{updatever}-b%{buildver} suse-%{release}-%{_arch}" \
--with-jdk-home="%{_sysconfdir}/alternatives/java_sdk" \
%if %{with_sunec}
--enable-sunec \
%endif
@ -492,18 +469,11 @@ sh autogen.sh
%else
--disable-bootstrap \
%endif
--disable-downloading \
--with-abs-install-dir=%{_jvmdir}/%{sdkdir} \
%ifnarch %{arm} %{aarch64}
--with-parallel-jobs="${NUM_PROC}" \
%endif
%ifarch s390
--with-boot-jdk-jvmargs="-Xms256M -Xmx768M" \
%endif
--with-pkgversion="suse-%{release}-%{_arch}" \
--with-jdk-home="%{_sysconfdir}/alternatives/java_sdk" \
%if %{with_systemtap}
--enable-systemtap \
%endif
%if %{with zero}
--enable-zero \
@ -573,9 +543,7 @@ patch -p0 -i %{PATCH104}
patch -p0 -i %{PATCH2000}
patch -p0 -i %{PATCH2001}
patch -p0 -i %{PATCH2002}
patch -p0 -i %{PATCH2003}
(cd openjdk/common/autoconf
bash ./autogen.sh
@ -621,9 +589,6 @@ echo "" >> $JAVA_HOME/jre/lib/pulseaudio.properties
popd
%endif
# Copy tz.properties
echo "sun.zoneinfo.dir=%{_datadir}/javazi" >> $JAVA_HOME/jre/lib/tz.properties
# Check debug symbols are present and can identify code
SERVER_JVM="$JAVA_HOME/jre/lib/%{archinstall}/server/libjvm.so"
if [ -f "$SERVER_JVM" ] ; then
@ -645,19 +610,6 @@ export STRIP_KEEP_SYMTAB=libjvm*
# skip /usr/lib/rpm/brp-check-bytecode-version:
export NO_BRP_CHECK_BYTECODE_VERSION=true
%if %{with_systemtap}
# Install systemtap support files.
install -dm 755 %{buildroot}%{_jvmdir}/%{sdkdir}/tapset
for i in tapset/*.stp; do
cp -a $i %{buildroot}%{_jvmdir}/%{sdkdir}/tapset/$(basename $i .stp)-%{javaver}.stp
done
install -d -m 755 %{buildroot}%{tapsetdir}
pushd %{buildroot}%{tapsetdir}
RELATIVE=$(%{abs2rel} %{_jvmdir}/%{sdkdir}/tapset %{tapsetdir})
ln -sf $RELATIVE/*.stp .
popd
%endif
pushd %{buildoutputdir}images/j2sdk-image
# Install main files.
@ -725,6 +677,21 @@ pushd %{buildoutputdir}images/j2sdk-image
[ -f bin/java-rmi.cgi ] && mv bin/java-rmi.cgi sample/rmi
cp -a sample %{buildroot}%{_jvmdir}/%{sdkdir}
%if %{with_systemtap}
# Install systemtap support files.
cp -a tapset %{buildroot}%{_jvmdir}/%{sdkdir}
pushd %{buildroot}%{_jvmdir}/%{sdkdir}/tapset
for i in *.stp; do
mv $i $(basename $i .stp)-%{javaver}.stp
done
popd
install -d -m 755 %{buildroot}%{tapsetdir}
pushd %{buildroot}%{tapsetdir}
RELATIVE=$(%{abs2rel} %{_jvmdir}/%{sdkdir}/tapset %{tapsetdir})
ln -sf $RELATIVE/*.stp .
popd
%endif
popd
# Install Javadoc documentation.
@ -1091,6 +1058,9 @@ fi
%dir %{_jvmdir}/%{jredir}/lib/images/cursors
%dir %{_jvmdir}/%{jredir}/lib/management
%dir %{_jvmdir}/%{jredir}/lib/security
%dir %{_jvmdir}/%{jredir}/lib/security/policy
%dir %{_jvmdir}/%{jredir}/lib/security/policy/limited
%dir %{_jvmdir}/%{jredir}/lib/security/policy/unlimited
%dir %{_libdir}/jvm-exports
%dir %{_libdir}/jvm-private
@ -1121,8 +1091,10 @@ fi
%{_mandir}/man1/servertool-%{sdklnk}.1*
%{_mandir}/man1/tnameserv-%{sdklnk}.1*
%{_mandir}/man1/unpack200-%{sdklnk}.1*
%{_jvmdir}/%{jredir}/lib/security/US_export_policy.jar
%{_jvmdir}/%{jredir}/lib/security/local_policy.jar
%{_jvmdir}/%{jredir}/lib/security/policy/limited/US_export_policy.jar
%{_jvmdir}/%{jredir}/lib/security/policy/limited/local_policy.jar
%{_jvmdir}/%{jredir}/lib/security/policy/unlimited/US_export_policy.jar
%{_jvmdir}/%{jredir}/lib/security/policy/unlimited/local_policy.jar
%files devel
%dir %{_jvmdir}/%{sdkdir}/bin

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:96a844aec7d873a260a22622b028165d862bd5842a64091ed0818309a49225a0
size 2296924
oid sha256:b1b7b78a1079153410c1a1d20c749f92660faceb25d7e51515731bf4c6cd5f1d
size 2297468

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:86ae65fb5a7566216639b915abdf6f2c8522c0bfcc1bf4fe521bc3ce0a72046e
size 2267608
oid sha256:33fa2d3507498dd94d0313a2d8cd989ee1a56ef19d7203f01df79f82a1680e05
size 2268316

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:65286cbd774afd95b8fd2c50c30d9d33d08156243805b10cb373a6463e66dea4
size 39030920
oid sha256:e86575ce39c19b46f0ca9d0c6a807504f3eee092e8307aa7614cc8822742446f
size 39075276

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:fe554a5d3bcd7d5f2a545f6e06a50e3d5adf2619d1566b80acb0b3926953566b
size 2066912
oid sha256:2ced1f044e25d5f659413bb8fc93cf0c46dbffd2af7096f7cdb24cb67968c611
size 2065880

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:9e47a8838ff9f6aca596c9f07e6af6a24f7db486d1809a6e07d77cd2ecc32555
size 2225708
oid sha256:7245ba3bd15896e6f41300f370dd16a64bfa8fa6bdd69a099c0f14bd7e6546a8
size 2231644

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:5834862d650ed290d88610d60abbfbb1f8bf47cd485051e1617ffee011cede28
size 333312
oid sha256:cb76591cd13fbb276ce2ac695e3b416ec58072f660c6d93c27bf003c03821d57
size 333636

61
tzdb_dat.patch Normal file
View File

@ -0,0 +1,61 @@
--- openjdk/jdk/src/share/classes/java/time/zone/TzdbZoneRulesProvider.java 2017-10-30 18:28:40.000000000 +0100
+++ openjdk/jdk/src/share/classes/java/time/zone/TzdbZoneRulesProvider.java 2017-11-03 11:51:41.617320377 +0100
@@ -74,6 +74,7 @@
import java.util.Map;
import java.util.NavigableMap;
import java.util.Objects;
+import java.util.Properties;
import java.util.Set;
import java.util.TreeMap;
import java.util.concurrent.ConcurrentHashMap;
@@ -106,7 +107,15 @@
*/
public TzdbZoneRulesProvider() {
try {
- String libDir = System.getProperty("java.home") + File.separator + "lib";
+ final String homeDir = System.getProperty("java.home");
+ if (homeDir == null) {
+ throw new Error("java.home is not set");
+ }
+ String libDir = homeDir + File.separator + "lib";
+ String otherDir = getZoneInfoDir(libDir);
+ if (otherDir != null)
+ libDir = otherDir;
+
try (DataInputStream dis = new DataInputStream(
new BufferedInputStream(new FileInputStream(
new File(libDir, "tzdb.dat"))))) {
@@ -117,6 +126,23 @@
}
}
+ private static String getZoneInfoDir(final String libDir) {
+ File f = new File(libDir + File.separator + "tz.properties");
+ try (BufferedInputStream bin = new BufferedInputStream(new FileInputStream(f))) {
+ Properties props = new Properties();
+ props.load(bin);
+ String dir = props.getProperty("sun.zoneinfo.dir");
+ if (dir == null)
+ return null;
+ File tzdbdat = new File(dir, "tzdb.dat");
+ if (tzdbdat.exists())
+ return dir;
+ return null;
+ } catch (Exception x) {
+ return null;
+ }
+ }
+
@Override
protected Set<String> provideZoneIds() {
return new HashSet<>(regionIds);
--- openjdk/jdk/src/share/classes/sun/util/calendar/ZoneInfoFile.java 2017-10-30 18:28:40.000000000 +0100
+++ openjdk/jdk/src/share/classes/sun/util/calendar/ZoneInfoFile.java 2017-11-03 11:18:55.381711882 +0100
@@ -31,7 +31,6 @@
import java.io.DataInputStream;
import java.io.File;
import java.io.FileInputStream;
-import java.io.InputStream;
import java.io.IOException;
import java.io.StreamCorruptedException;
import java.security.AccessController;