diff --git a/.gitignore b/.gitignore index ce4ecd1..4eaaea2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,2 @@ -SOURCES/jdk8u-aarch64-jdk8u65-b17.tar.xz -SOURCES/jdk8u-jdk8u65-b17.tar.xz +SOURCES/aarch64-jdk8u71-b15.tar.xz SOURCES/systemtap-tapset.tar.gz diff --git a/.java-1.8.0-openjdk.metadata b/.java-1.8.0-openjdk.metadata index a73a3ba..97a2a50 100644 --- a/.java-1.8.0-openjdk.metadata +++ b/.java-1.8.0-openjdk.metadata @@ -1,3 +1,2 @@ -ed9cc63e8d5035083293782de07f286de93100f5 SOURCES/jdk8u-aarch64-jdk8u65-b17.tar.xz -a2d502f3c093628e8547515087c43a11ccfa25fe SOURCES/jdk8u-jdk8u65-b17.tar.xz +ba60eca5ce60ff55b05f885e1d6f4a56c40267e1 SOURCES/aarch64-jdk8u71-b15.tar.xz 8dd5345808d840741a9619becc84302f44b54e78 SOURCES/systemtap-tapset.tar.gz diff --git a/SOURCES/8143855.patch b/SOURCES/8143855.patch new file mode 100644 index 0000000..5d398de --- /dev/null +++ b/SOURCES/8143855.patch @@ -0,0 +1,29 @@ +# HG changeset patch +# User andrew +# Date 1448509207 0 +# Thu Nov 26 03:40:07 2015 +0000 +# Node ID 4a4a5b8b3dfe44b25d2a40ba987e5243b3ebc9db +# Parent 110735ab93eca3bd6e9b157955a942e00aed72e1 +8143855: Bad printf formatting in frame_zero.cpp +Summary: Backport subset of 8075967 fix that resolves this issue. +Reviewed-by: dholmes + +diff -r 110735ab93ec -r 4a4a5b8b3dfe src/cpu/zero/vm/frame_zero.cpp +--- openjdk/hotspot/src/cpu/zero/vm/frame_zero.cpp Wed Nov 04 13:38:38 2015 +0100 ++++ openjdk/hotspot/src/cpu/zero/vm/frame_zero.cpp Thu Nov 26 03:40:07 2015 +0000 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright 2007, 2008, 2009, 2010, 2011 Red Hat, Inc. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * +@@ -216,7 +216,7 @@ + valuebuf[buflen - 1] = '\0'; + + // Print the result +- st->print_cr(" " PTR_FORMAT ": %-21s = %s", addr, fieldbuf, valuebuf); ++ st->print_cr(" " PTR_FORMAT ": %-21s = %s", p2i(addr), fieldbuf, valuebuf); + } + } + diff --git a/SOURCES/8146566.patch b/SOURCES/8146566.patch new file mode 100644 index 0000000..b5728bc --- /dev/null +++ b/SOURCES/8146566.patch @@ -0,0 +1,23 @@ +diff -r 3bde96c2f7f5 make/CompileDemos.gmk +--- openjdk.orig/jdk/make/CompileDemos.gmk Tue Jan 12 11:47:16 2016 +0000 ++++ openjdk/jdk/make/CompileDemos.gmk Tue Jan 12 15:47:25 2016 +0000 +@@ -229,7 +229,7 @@ + BUILD_DEMO_JVMTI_$1_LANG := $4 + endif + ifeq (C++, $4) +- $1_EXTRA_CXX := $(LDFLAGS_CXX_JDK) $(LIBCXX) ++ $1_EXTRA_CXX := $$(LDFLAGS_CXX_JDK) $(LIBCXX) + endif + + $1_CXXFLAGS := $(CXXFLAGS_JDKLIB) -I$(JDK_TOPDIR)/src/share/demo/jvmti/$1 \ +@@ -251,8 +251,8 @@ + LANG := $$(BUILD_DEMO_JVMTI_$1_LANG), \ + OPTIMIZATION := LOW, \ + CXXFLAGS := $$($1_CXXFLAGS), \ +- LDFLAGS := $(filter-out -incremental:no -opt:ref, $(LDFLAGS_JDKLIB)), \ +- LDFLAGS_macosx := $(call SET_EXECUTABLE_ORIGIN), \ ++ LDFLAGS := $(filter-out -incremental:no -opt:ref, $$(LDFLAGS_JDKLIB)), \ ++ LDFLAGS_macosx := $$(call SET_EXECUTABLE_ORIGIN), \ + LDFLAGS_SUFFIX := $$($1_EXTRA_CXX), \ + LDFLAGS_SUFFIX_posix := $5, \ + LDFLAGS_SUFFIX_windows := $6, \ diff --git a/SOURCES/enableArm64.patch b/SOURCES/enableArm64.patch deleted file mode 100644 index bb5863b..0000000 --- a/SOURCES/enableArm64.patch +++ /dev/null @@ -1,112 +0,0 @@ ---- /dev/null -+++ jdk8/jdk/src/solaris/bin/aarch64/jvm.cfg -@@ -0,0 +1,2 @@ -+-server KNOWN -+-client IGNORE ---- jdk8/common/autoconf/generated-configure.sh -+++ jdk8/common/autoconf/generated-configure.sh -@@ -6731,8 +6731,9 @@ - # The aliases save the names the user supplied, while $host etc. - # will get canonicalized. - test -n "$target_alias" && -- test "$program_prefix$program_suffix$program_transform_name" = \ -- NONENONEs,x,x, && -+ test "$target_alias" != "$host_alias" && -+ test "$program_prefix$program_suffix$program_transform_name" = \ -+ NONENONEs,x,x, && - program_prefix=${target_alias}- - - # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target" -@@ -7950,6 +7963,9 @@ - if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then - INCLUDE_SA=false - fi -+ if test "x$OPENJDK_TARGET_CPU" = xaarch64; then -+ INCLUDE_SA=false -+ fi - if test "x$VAR_CPU" = xppc64 ; then - INCLUDE_SA=false - fi -@@ -29957,6 +29973,9 @@ - s390) - ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31" - ;; -+ aarch64) -+ ZERO_ARCHFLAG="" -+ ;; - *) - ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" - esac ---- jdk8/common/autoconf/jdk-options.m4 -+++ jdk8/common/autoconf/jdk-options.m4 -@@ -117,11 +117,6 @@ - JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'` - JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'` - -- if test "x$JVM_VARIANT_CLIENT" = xtrue; then -- if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then -- AC_MSG_ERROR([You cannot build a client JVM for a 64-bit machine.]) -- fi -- fi - if test "x$JVM_VARIANT_KERNEL" = xtrue; then - if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then - AC_MSG_ERROR([You cannot build a kernel JVM for a 64-bit machine.]) -@@ -159,6 +154,9 @@ - INCLUDE_SA=false - fi - if test "x$VAR_CPU" = xppc64 ; then -+ INCLUDE_SA=false -+ fi -+ if test "x$OPENJDK_TARGET_CPU" = xaarch64; then - INCLUDE_SA=false - fi - if test "x$OPENJDK_TARGET_CPU" = xaarch64; then -@@ -460,12 +458,6 @@ - AC_MSG_ERROR([Update version must have a value]) - elif test "x$with_update_version" != x; then - JDK_UPDATE_VERSION="$with_update_version" -- # On macosx 10.7, it's not possible to set --with-update-version=0X due -- # to a bug in expr (which reduces it to just X). To work around this, we -- # always add a 0 to one digit update versions. -- if test "${#JDK_UPDATE_VERSION}" = "1"; then -- JDK_UPDATE_VERSION="0${JDK_UPDATE_VERSION}" -- fi - fi - - AC_ARG_WITH(user-release-suffix, [AS_HELP_STRING([--with-user-release-suffix], ---- jdk8/common/autoconf/toolchain.m4 -+++ jdk8/common/autoconf/toolchain.m4 -@@ -1158,6 +1158,9 @@ - s390) - ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31" - ;; -+ aarch64) -+ ZERO_ARCHFLAG="" -+ ;; - *) - ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" - esac ---- jdk8/jdk/make/lib/SoundLibraries.gmk -+++ jdk8/jdk/make/lib/SoundLibraries.gmk -@@ -138,6 +138,10 @@ - - ifeq ($(OPENJDK_TARGET_CPU), ppc64) - LIBJSOUND_CFLAGS += -DX_ARCH=X_PPC64 -+ endif -+ -+ ifeq ($(OPENJDK_TARGET_CPU), aarch64) -+ LIBJSOUND_CFLAGS += -DX_ARCH=X_AARCH64 - endif - endif - ---- jdk8/jdk/make/CompileJavaClasses.gmk -+++ jdk8/jdk/make/CompileJavaClasses.gmk -@@ -390,7 +390,7 @@ - - ########################################################################################## - --all: $(BUILD_JDK) $(BUILD_SECURITY) $(COPY_EXTRA) \ -+all: $(BUILD_JDK) $(BUILD_SECURITY) $(BUILD_JOBJC) $(BUILD_JOBJC_HEADERS) $(COPY_EXTRA) \ - $(JDK_OUTPUTDIR)/classes/META-INF/services/com.sun.tools.xjc.Plugin \ - $(BUILD_ACCESSBRIDGE_32) $(BUILD_ACCESSBRIDGE_64) \ - $(BUILD_ACCESSBRIDGE_LEGACY) diff --git a/SOURCES/java-1.8.0-openjdk-PStack-808293.patch b/SOURCES/java-1.8.0-openjdk-PStack-808293.patch deleted file mode 100644 index eb8b8a0..0000000 --- a/SOURCES/java-1.8.0-openjdk-PStack-808293.patch +++ /dev/null @@ -1,40 +0,0 @@ ---- jdk8/hotspot/agent/src/share/classes/sun/jvm/hotspot/tools/PStack.java 2012-04-06 02:26:33.322164601 +0200 -+++ jdk8/hotspot/agent/src/share/classes/sun/jvm/hotspot/tools/PStack.java 2012-04-06 02:26:57.958514071 +0200 -@@ -1,5 +1,6 @@ - /* - * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 2012, Red Hat Inc. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it -@@ -84,7 +85,8 @@ - out.print("----------------- "); - out.print(th); - out.println(" -----------------"); -- while (f != null) { -+ int maxStack = 256; -+ while (f != null && maxStack-- > 0) { - ClosestSymbol sym = f.closestSymbolToPC(); - Address pc = f.pc(); - out.print(pc + "\t"); -@@ -158,10 +160,19 @@ - } - } - } -+ Address oldPC = f.pc(); -+ Address oldFP = f.localVariableBase(); - f = f.sender(th); -+ if (f != null -+ && oldPC.equals(f.pc()) -+ && oldFP.equals(f.localVariableBase())) { -+ // We didn't make any progress -+ f = null; -+ } - } - } catch (Exception exp) { -- exp.printStackTrace(); -+ // exp.printStackTrace(); -+ out.println("bad stack: " + exp); - // continue, may be we can do a better job for other threads - } - if (concurrentLocks) { diff --git a/SOURCES/java-1.8.0-openjdk-rh1191652-hotspot-aarch64.patch b/SOURCES/java-1.8.0-openjdk-rh1191652-hotspot-aarch64.patch index cd75fec..865ecb3 100644 --- a/SOURCES/java-1.8.0-openjdk-rh1191652-hotspot-aarch64.patch +++ b/SOURCES/java-1.8.0-openjdk-rh1191652-hotspot-aarch64.patch @@ -1,7 +1,15 @@ -diff -r dbbde6b99709 make/defs.make ---- openjdk/hotspot/make/defs.make Thu Oct 15 03:31:35 2015 +0100 -+++ openjdk/hotspot/make/defs.make Thu Oct 15 04:22:45 2015 +0100 -@@ -315,6 +315,13 @@ +# HG changeset patch +# User andrew +# Date 1424102734 0 +# Mon Feb 16 16:05:34 2015 +0000 +# Node ID 4fdaf786d977aa77afdb68b8829579d31069e39c +# Parent 01a0011cc101f3308c5876db8282c0fc5e3ba2e6 +PR2236: ppc64le should report its os.arch as ppc64le so tools can detect it +Summary: Use ppc64le as the arch directory on that platform and report it in os.arch + +--- openjdk/hotspot/make/defs.make.orig 2015-03-03 17:05:51.000000000 -0500 ++++ openjdk/hotspot/make/defs.make 2015-03-03 19:18:20.000000000 -0500 +@@ -319,6 +319,13 @@ LIBARCH/ppc64 = ppc64 LIBARCH/zero = $(ZERO_LIBARCH) diff --git a/SOURCES/java-1.8.0-openjdk-rh1191652-hotspot.patch b/SOURCES/java-1.8.0-openjdk-rh1191652-hotspot.patch deleted file mode 100644 index dd76f2d..0000000 --- a/SOURCES/java-1.8.0-openjdk-rh1191652-hotspot.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff -r 9d6eb2757167 make/defs.make ---- openjdk/hotspot/make/defs.make Wed Feb 11 18:56:26 2015 -0800 -+++ openjdk/hotspot/make/defs.make Tue Feb 17 16:39:22 2015 +0000 -@@ -317,6 +317,13 @@ - LIBARCH/ppc64 = ppc64 - LIBARCH/zero = $(ZERO_LIBARCH) - -+ # Override LIBARCH for ppc64le -+ ifeq ($(ARCH), ppc64) -+ ifeq ($(OPENJDK_TARGET_CPU_ENDIAN), little) -+ LIBARCH = ppc64le -+ endif -+ endif -+ - LP64_ARCH += sparcv9 amd64 ia64 ppc64 zero - endif - \ No newline at end of file diff --git a/SOURCES/java-1.8.0-openjdk-rh1191652-jdk.patch b/SOURCES/java-1.8.0-openjdk-rh1191652-jdk.patch index e32ffb6..5157f40 100644 --- a/SOURCES/java-1.8.0-openjdk-rh1191652-jdk.patch +++ b/SOURCES/java-1.8.0-openjdk-rh1191652-jdk.patch @@ -1,5 +1,6 @@ ---- openjdk/jdk/make/lib/SoundLibraries.gmk.orig 2015-03-03 20:52:33.000000000 -0500 -+++ openjdk/jdk/make/lib/SoundLibraries.gmk 2015-03-03 20:54:39.000000000 -0500 +diff -r 1fe56343ecc8 make/lib/SoundLibraries.gmk +--- openjdk/jdk/make/lib/SoundLibraries.gmk Tue Jan 12 21:01:12 2016 +0000 ++++ openjdk/jdk/make/lib/SoundLibraries.gmk Wed Jan 13 00:18:02 2016 +0000 @@ -140,6 +140,10 @@ LIBJSOUND_CFLAGS += -DX_ARCH=X_PPC64 endif @@ -11,21 +12,21 @@ ifeq ($(OPENJDK_TARGET_CPU), aarch64) LIBJSOUND_CFLAGS += -DX_ARCH=X_AARCH64 endif -diff -r 87c95759b92b src/share/native/com/sun/media/sound/SoundDefs.h ---- openjdk/jdk/src/share/native/com/sun/media/sound/SoundDefs.h Wed Feb 11 18:55:05 2015 -0800 -+++ openjdk/jdk/src/share/native/com/sun/media/sound/SoundDefs.h Tue Feb 17 18:25:01 2015 +0000 -@@ -43,6 +43,8 @@ - #define X_ZERO 6 +diff -r 1fe56343ecc8 src/share/native/com/sun/media/sound/SoundDefs.h +--- openjdk/jdk/src/share/native/com/sun/media/sound/SoundDefs.h Tue Jan 12 21:01:12 2016 +0000 ++++ openjdk/jdk/src/share/native/com/sun/media/sound/SoundDefs.h Wed Jan 13 00:18:02 2016 +0000 +@@ -44,6 +44,8 @@ #define X_ARM 7 #define X_PPC 8 -+#define X_PPC64 9 -+#define X_PPC64LE 10 + #define X_AARCH64 9 ++#define X_PPC64 10 ++#define X_PPC64LE 11 // ********************************** // Make sure you set X_PLATFORM and X_ARCH defines correctly. -diff -r 87c95759b92b src/solaris/bin/ppc64le/jvm.cfg +diff -r 1fe56343ecc8 src/solaris/bin/ppc64le/jvm.cfg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 -+++ openjdk/jdk/src/solaris/bin/ppc64le/jvm.cfg Tue Feb 17 18:25:01 2015 +0000 ++++ openjdk/jdk/src/solaris/bin/ppc64le/jvm.cfg Wed Jan 13 00:18:02 2016 +0000 @@ -0,0 +1,33 @@ +# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. diff --git a/SOURCES/libjpeg-turbo-1.4-compat.patch b/SOURCES/libjpeg-turbo-1.4-compat.patch deleted file mode 100644 index 26ffc7b..0000000 --- a/SOURCES/libjpeg-turbo-1.4-compat.patch +++ /dev/null @@ -1,33 +0,0 @@ -Remove uses of FAR in jpeg code - -Upstream libjpeg-trubo removed the (empty) FAR macro: -http://sourceforge.net/p/libjpeg-turbo/code/1312/ - -Adjust our code to not use the undefined FAR macro anymore. - -diff --git a/src/share/native/sun/awt/image/jpeg/imageioJPEG.c b/src/share/native/sun/awt/image/jpeg/imageioJPEG.c ---- jdk8/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c -+++ jdk8/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c -@@ -1385,7 +1385,7 @@ - /* and fill it in */ - dst_ptr = icc_data; - for (seq_no = first; seq_no < last; seq_no++) { -- JOCTET FAR *src_ptr = icc_markers[seq_no]->data + ICC_OVERHEAD_LEN; -+ JOCTET *src_ptr = icc_markers[seq_no]->data + ICC_OVERHEAD_LEN; - unsigned int length = - icc_markers[seq_no]->data_length - ICC_OVERHEAD_LEN; - -diff --git a/src/share/native/sun/awt/image/jpeg/jpegdecoder.c b/src/share/native/sun/awt/image/jpeg/jpegdecoder.c ---- jdk8/jdk/src/share/native/sun/awt/image/jpeg/jpegdecoder.c -+++ jdk8/jdk/src/share/native/sun/awt/image/jpeg/jpegdecoder.c -@@ -41,9 +41,8 @@ - #include "jni.h" - #include "jni_util.h" - --/* undo "system_boolean" hack and undef FAR since we don't use it anyway */ -+/* undo "system_boolean" hack since we don't use it anyway */ - #undef boolean --#undef FAR - #include - #include "jerror.h" - diff --git a/SOURCES/no_strict_overflow.patch b/SOURCES/no_strict_overflow.patch new file mode 100644 index 0000000..53fa41c --- /dev/null +++ b/SOURCES/no_strict_overflow.patch @@ -0,0 +1,16 @@ +diff -r 1fe56343ecc8 make/lib/Awt2dLibraries.gmk +--- openjdk/jdk/make/lib/Awt2dLibraries.gmk Tue Jan 12 21:01:12 2016 +0000 ++++ openjdk/jdk/make/lib/Awt2dLibraries.gmk Thu Jan 14 00:47:01 2016 +0000 +@@ -904,6 +904,12 @@ + BUILD_LIBFONTMANAGER_ExtensionSubtables.cpp_CXXFLAGS := -fno-strict-aliasing + endif + ++# Turn off strict overflow with GCC for IndicRearrangementProcessor.cpp ++ifeq ($(OPENJDK_TARGET_OS), linux) ++ BUILD_LIBFONTMANAGER_IndicRearrangementProcessor.cpp_CXXFLAGS := -fno-strict-overflow ++ BUILD_LIBFONTMANAGER_IndicRearrangementProcessor2.cpp_CXXFLAGS := -fno-strict-overflow ++endif ++ + $(eval $(call SetupNativeCompilation,BUILD_LIBFONTMANAGER, \ + LIBRARY := fontmanager, \ + OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \ diff --git a/SOURCES/pr2462-01.patch b/SOURCES/pr2462-01.patch new file mode 100644 index 0000000..09de4f9 --- /dev/null +++ b/SOURCES/pr2462-01.patch @@ -0,0 +1,200 @@ +# HG changeset patch +# User kizune +# Date 1403186822 -14400 +# Thu Jun 19 18:07:02 2014 +0400 +# Node ID ad88ac6bac57e540e87fdb5d9ad15528b1beee11 +# Parent f0137fa5ba5298a73f14ae508463dc7e890a70a5 +8000650, PR2462: unpack200.exe should check gzip crc +Reviewed-by: ksrini + +diff -r f0137fa5ba52 -r ad88ac6bac57 src/share/native/com/sun/java/util/jar/pack/main.cpp +--- openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/main.cpp Thu Apr 23 13:48:02 2015 -0400 ++++ openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/main.cpp Thu Jun 19 18:07:02 2014 +0400 +@@ -62,6 +62,13 @@ + return unpacker::run(argc, argv); + } + ++// Dealing with big-endian arch ++#ifdef _BIG_ENDIAN ++#define SWAP_INT(a) (((a>>24)&0xff) | ((a<<8)&0xff0000) | ((a>>8)&0xff00) | ((a<<24)&0xff000000)) ++#else ++#define SWAP_INT(a) (a) ++#endif ++ + // Single-threaded, implementation, not reentrant. + // Includes a weak error check against MT access. + #ifndef THREAD_SELF +@@ -385,6 +392,7 @@ + u.start(); + } + } else { ++ u.gzcrc = 0; + u.start(peek, sizeof(peek)); + } + +@@ -425,7 +433,23 @@ + status = 1; + } + +- if (u.infileptr != null) { ++ if (!u.aborting() && u.infileptr != null) { ++ if (u.gzcrc != 0) { ++ // Read the CRC information from the gzip container ++ fseek(u.infileptr, -8, SEEK_END); ++ uint filecrc; ++ fread(&filecrc, sizeof(filecrc), 1, u.infileptr); ++ if (u.gzcrc != SWAP_INT(filecrc)) { // CRC error ++ if (strcmp(destination_file, "-") != 0) { ++ // Output is not stdout, remove it, it's broken ++ if (u.jarout != null) ++ u.jarout->closeJarFile(false); ++ remove(destination_file); ++ } ++ // Print out the error and exit with return code != 0 ++ u.abort("CRC error, invalid compressed data."); ++ } ++ } + fclose(u.infileptr); + u.infileptr = null; + } +diff -r f0137fa5ba52 -r ad88ac6bac57 src/share/native/com/sun/java/util/jar/pack/unpack.h +--- openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/unpack.h Thu Apr 23 13:48:02 2015 -0400 ++++ openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/unpack.h Thu Jun 19 18:07:02 2014 +0400 +@@ -171,6 +171,7 @@ + bytes inbytes; // direct + gunzip* gzin; // gunzip filter, if any + jar* jarout; // output JAR file ++ uint gzcrc; // CRC gathered from gzip content + + #ifndef PRODUCT + int nowrite; +diff -r f0137fa5ba52 -r ad88ac6bac57 src/share/native/com/sun/java/util/jar/pack/zip.cpp +--- openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/zip.cpp Thu Apr 23 13:48:02 2015 -0400 ++++ openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/zip.cpp Thu Jun 19 18:07:02 2014 +0400 +@@ -551,6 +551,7 @@ + break; + } + int nr = readlen - zs.avail_out; ++ u->gzcrc = crc32(u->gzcrc, (const unsigned char *)bufptr, nr); + numread += nr; + bufptr += nr; + assert(numread <= maxlen); +@@ -589,6 +590,7 @@ + zstream = NEW(z_stream, 1); + u->gzin = this; + u->read_input_fn = read_input_via_gzip; ++ u->gzcrc = crc32(0L, Z_NULL, 0); + } + + void gunzip::start(int magic) { +diff -r f0137fa5ba52 -r ad88ac6bac57 test/tools/pack200/PackChecksum.java +--- /dev/null Thu Jan 01 00:00:00 1970 +0000 ++++ openjdk/jdk/test/tools/pack200/PackChecksum.java Thu Jun 19 18:07:02 2014 +0400 +@@ -0,0 +1,107 @@ ++/* ++ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. ++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. ++ * ++ * This code is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License version 2 only, as ++ * published by the Free Software Foundation. ++ * ++ * This code is distributed in the hope that it will be useful, but WITHOUT ++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++ * version 2 for more details (a copy is included in the LICENSE file that ++ * accompanied this code). ++ * ++ * You should have received a copy of the GNU General Public License version ++ * 2 along with this work; if not, write to the Free Software Foundation, ++ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. ++ * ++ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA ++ * or visit www.oracle.com if you need additional information or have any ++ * questions. ++ */ ++import java.io.File; ++import java.io.FileOutputStream; ++import java.io.IOException; ++import java.io.RandomAccessFile; ++import java.util.ArrayList; ++import java.util.List; ++import java.util.jar.JarEntry; ++import java.util.jar.JarOutputStream; ++ ++/* ++ * @test ++ * @bug 8000650 ++ * @summary unpack200.exe should check gzip crc ++ * @compile -XDignore.symbol.file Utils.java PackChecksum.java ++ * @run main PackChecksum ++ * @author kizune ++ */ ++public class PackChecksum { ++ ++ public static void main(String... args) throws Exception { ++ testChecksum(); ++ } ++ ++ static void testChecksum() throws Exception { ++ ++ // Create a fresh .jar file ++ File testFile = new File("src_tools.jar"); ++ File testPack = new File("src_tools.pack.gz"); ++ generateJar(testFile); ++ List cmdsList = new ArrayList<>(); ++ ++ // Create .pack file ++ cmdsList.add(Utils.getPack200Cmd()); ++ cmdsList.add(testPack.getName()); ++ cmdsList.add(testFile.getName()); ++ Utils.runExec(cmdsList); ++ ++ // Mess up with the checksum of the packed file ++ RandomAccessFile raf = new RandomAccessFile(testPack, "rw"); ++ raf.seek(raf.length() - 8); ++ int val = raf.readInt(); ++ val = Integer.MAX_VALUE - val; ++ raf.seek(raf.length() - 8); ++ raf.writeInt(val); ++ raf.close(); ++ ++ File dstFile = new File("dst_tools.jar"); ++ cmdsList.clear(); ++ cmdsList.add(Utils.getUnpack200Cmd()); ++ cmdsList.add(testPack.getName()); ++ cmdsList.add(dstFile.getName()); ++ ++ boolean passed = false; ++ try { ++ Utils.runExec(cmdsList); ++ } catch (RuntimeException re) { ++ // unpack200 should exit with non-zero exit code ++ passed = true; ++ } ++ ++ // tidy up ++ if (testFile.exists()) testFile.delete(); ++ if (testPack.exists()) testPack.delete(); ++ if (dstFile.exists()) dstFile.delete(); ++ if (!passed) { ++ throw new Exception("File with incorrect CRC unpacked without the error."); ++ } ++ } ++ ++ static void generateJar(File result) throws IOException { ++ if (result.exists()) { ++ result.delete(); ++ } ++ ++ try (JarOutputStream output = new JarOutputStream(new FileOutputStream(result)); ) { ++ for (int i = 0 ; i < 100 ; i++) { ++ JarEntry e = new JarEntry("F-" + i + ".txt"); ++ output.putNextEntry(e); ++ } ++ output.flush(); ++ output.close(); ++ } ++ } ++ ++} diff --git a/SOURCES/pr2462-02.patch b/SOURCES/pr2462-02.patch new file mode 100644 index 0000000..47360e7 --- /dev/null +++ b/SOURCES/pr2462-02.patch @@ -0,0 +1,311 @@ +# HG changeset patch +# User mikael +# Date 1435336416 -3600 +# Fri Jun 26 17:33:36 2015 +0100 +# Node ID d64c0a9b8b5a43c1b7ba88a871f001fc6b44a3d4 +# Parent ad88ac6bac57e540e87fdb5d9ad15528b1beee11 +8074839, PR2462: Resolve disabled warnings for libunpack and the unpack200 binary +Reviewed-by: dholmes, ksrini + +diff -r ad88ac6bac57 -r d64c0a9b8b5a src/share/native/com/sun/java/util/jar/pack/bytes.h +--- openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/bytes.h Thu Jun 19 18:07:02 2014 +0400 ++++ openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/bytes.h Fri Jun 26 17:33:36 2015 +0100 +@@ -63,7 +63,7 @@ + bytes res; + res.ptr = ptr + beg; + res.len = end - beg; +- assert(res.len == 0 || inBounds(res.ptr) && inBounds(res.limit()-1)); ++ assert(res.len == 0 || (inBounds(res.ptr) && inBounds(res.limit()-1))); + return res; + } + // building C strings inside byte buffers: +diff -r ad88ac6bac57 -r d64c0a9b8b5a src/share/native/com/sun/java/util/jar/pack/jni.cpp +--- openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/jni.cpp Thu Jun 19 18:07:02 2014 +0400 ++++ openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/jni.cpp Fri Jun 26 17:33:36 2015 +0100 +@@ -292,7 +292,7 @@ + + if (uPtr->aborting()) { + THROW_IOE(uPtr->get_abort_message()); +- return false; ++ return null; + } + + // We have fetched all the files. +@@ -310,7 +310,7 @@ + JNIEXPORT jlong JNICALL + Java_com_sun_java_util_jar_pack_NativeUnpack_finish(JNIEnv *env, jobject pObj) { + unpacker* uPtr = get_unpacker(env, pObj, false); +- CHECK_EXCEPTION_RETURN_VALUE(uPtr, NULL); ++ CHECK_EXCEPTION_RETURN_VALUE(uPtr, 0); + size_t consumed = uPtr->input_consumed(); + free_unpacker(env, pObj, uPtr); + return consumed; +@@ -320,6 +320,7 @@ + Java_com_sun_java_util_jar_pack_NativeUnpack_setOption(JNIEnv *env, jobject pObj, + jstring pProp, jstring pValue) { + unpacker* uPtr = get_unpacker(env, pObj); ++ CHECK_EXCEPTION_RETURN_VALUE(uPtr, false); + const char* prop = env->GetStringUTFChars(pProp, JNI_FALSE); + CHECK_EXCEPTION_RETURN_VALUE(prop, false); + const char* value = env->GetStringUTFChars(pValue, JNI_FALSE); +diff -r ad88ac6bac57 -r d64c0a9b8b5a src/share/native/com/sun/java/util/jar/pack/main.cpp +--- openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/main.cpp Thu Jun 19 18:07:02 2014 +0400 ++++ openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/main.cpp Fri Jun 26 17:33:36 2015 +0100 +@@ -149,31 +149,28 @@ + return progname; + } + +-static const char* usage_lines[] = { +- "Usage: %s [-opt... | --option=value]... x.pack[.gz] y.jar\n", +- "\n", +- "Unpacking Options\n", +- " -H{h}, --deflate-hint={h} override transmitted deflate hint: true, false, or keep (default)\n", +- " -r, --remove-pack-file remove input file after unpacking\n", +- " -v, --verbose increase program verbosity\n", +- " -q, --quiet set verbosity to lowest level\n", +- " -l{F}, --log-file={F} output to the given log file, or '-' for standard output (default)\n", +- " -?, -h, --help print this message\n", +- " -V, --version print program version\n", +- " -J{X} Java VM argument (ignored)\n", +- null +-}; ++#define USAGE_HEADER "Usage: %s [-opt... | --option=value]... x.pack[.gz] y.jar\n" ++#define USAGE_OPTIONS \ ++ "\n" \ ++ "Unpacking Options\n" \ ++ " -H{h}, --deflate-hint={h} override transmitted deflate hint: true, false, or keep (default)\n" \ ++ " -r, --remove-pack-file remove input file after unpacking\n" \ ++ " -v, --verbose increase program verbosity\n" \ ++ " -q, --quiet set verbosity to lowest level\n" \ ++ " -l{F}, --log-file={F} output to the given log file, or '-' for standard output (default)\n" \ ++ " -?, -h, --help print this message\n" \ ++ " -V, --version print program version\n" \ ++ " -J{X} Java VM argument (ignored)\n" + + static void usage(unpacker* u, const char* progname, bool full = false) { + // WinMain does not set argv[0] to the progrname + progname = (progname != null) ? nbasename(progname) : "unpack200"; +- for (int i = 0; usage_lines[i] != null; i++) { +- fprintf(u->errstrm, usage_lines[i], progname); +- if (!full) { +- fprintf(u->errstrm, +- "(For more information, run %s --help .)\n", progname); +- break; +- } ++ ++ fprintf(u->errstrm, USAGE_HEADER, progname); ++ if (full) { ++ fprintf(u->errstrm, USAGE_OPTIONS); ++ } else { ++ fprintf(u->errstrm, "(For more information, run %s --help .)\n", progname); + } + } + +diff -r ad88ac6bac57 -r d64c0a9b8b5a src/share/native/com/sun/java/util/jar/pack/unpack.cpp +--- openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/unpack.cpp Thu Jun 19 18:07:02 2014 +0400 ++++ openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/unpack.cpp Fri Jun 26 17:33:36 2015 +0100 +@@ -222,9 +222,9 @@ + } + + #ifdef PRODUCT +- char* string() { return 0; } ++ const char* string() { return NULL; } + #else +- char* string(); // see far below ++ const char* string(); // see far below + #endif + }; + +@@ -715,13 +715,13 @@ + // Now we can size the whole archive. + // Read everything else into a mega-buffer. + rp = hdr.rp; +- int header_size_0 = (int)(rp - input.base()); // used-up header (4byte + 3int) +- int header_size_1 = (int)(rplimit - rp); // buffered unused initial fragment +- int header_size = header_size_0+header_size_1; ++ size_t header_size_0 = (rp - input.base()); // used-up header (4byte + 3int) ++ size_t header_size_1 = (rplimit - rp); // buffered unused initial fragment ++ size_t header_size = header_size_0 + header_size_1; + unsized_bytes_read = header_size_0; + CHECK; + if (foreign_buf) { +- if (archive_size > (size_t)header_size_1) { ++ if (archive_size > header_size_1) { + abort("EOF reading fixed input buffer"); + return; + } +@@ -735,7 +735,7 @@ + return; + } + input.set(U_NEW(byte, add_size(header_size_0, archive_size, C_SLOP)), +- (size_t) header_size_0 + archive_size); ++ header_size_0 + archive_size); + CHECK; + assert(input.limit()[0] == 0); + // Move all the bytes we read initially into the real buffer. +@@ -958,13 +958,13 @@ + nentries = next_entry; + + // place a limit on future CP growth: +- int generous = 0; ++ size_t generous = 0; + generous = add_size(generous, u->ic_count); // implicit name + generous = add_size(generous, u->ic_count); // outer + generous = add_size(generous, u->ic_count); // outer.utf8 + generous = add_size(generous, 40); // WKUs, misc + generous = add_size(generous, u->class_count); // implicit SourceFile strings +- maxentries = add_size(nentries, generous); ++ maxentries = (uint)add_size(nentries, generous); + + // Note that this CP does not include "empty" entries + // for longs and doubles. Those are introduced when +@@ -982,8 +982,9 @@ + } + + // Initialize *all* our entries once +- for (int i = 0 ; i < maxentries ; i++) ++ for (uint i = 0 ; i < maxentries ; i++) { + entries[i].outputIndex = REQUESTED_NONE; ++ } + + initGroupIndexes(); + // Initialize hashTab to a generous power-of-two size. +@@ -3676,21 +3677,22 @@ + + unpacker* debug_u; + +-static bytes& getbuf(int len) { // for debugging only! ++static bytes& getbuf(size_t len) { // for debugging only! + static int bn = 0; + static bytes bufs[8]; + bytes& buf = bufs[bn++ & 7]; +- while ((int)buf.len < len+10) ++ while (buf.len < len + 10) { + buf.realloc(buf.len ? buf.len * 2 : 1000); ++ } + buf.ptr[0] = 0; // for the sake of strcat + return buf; + } + +-char* entry::string() { ++const char* entry::string() { + bytes buf; + switch (tag) { + case CONSTANT_None: +- return (char*)""; ++ return ""; + case CONSTANT_Signature: + if (value.b.ptr == null) + return ref(0)->string(); +@@ -3710,26 +3712,28 @@ + break; + default: + if (nrefs == 0) { +- buf = getbuf(20); +- sprintf((char*)buf.ptr, TAG_NAME[tag]); ++ return TAG_NAME[tag]; + } else if (nrefs == 1) { + return refs[0]->string(); + } else { +- char* s1 = refs[0]->string(); +- char* s2 = refs[1]->string(); +- buf = getbuf((int)strlen(s1) + 1 + (int)strlen(s2) + 4 + 1); ++ const char* s1 = refs[0]->string(); ++ const char* s2 = refs[1]->string(); ++ buf = getbuf(strlen(s1) + 1 + strlen(s2) + 4 + 1); + buf.strcat(s1).strcat(" ").strcat(s2); + if (nrefs > 2) buf.strcat(" ..."); + } + } +- return (char*)buf.ptr; ++ return (const char*)buf.ptr; + } + + void print_cp_entry(int i) { + entry& e = debug_u->cp.entries[i]; +- char buf[30]; +- sprintf(buf, ((uint)e.tag < CONSTANT_Limit)? TAG_NAME[e.tag]: "%d", e.tag); +- printf(" %d\t%s %s\n", i, buf, e.string()); ++ ++ if ((uint)e.tag < CONSTANT_Limit) { ++ printf(" %d\t%s %s\n", i, TAG_NAME[e.tag], e.string()); ++ } else { ++ printf(" %d\t%d %s\n", i, e.tag, e.string()); ++ } + } + + void print_cp_entries(int beg, int end) { +diff -r ad88ac6bac57 -r d64c0a9b8b5a src/share/native/com/sun/java/util/jar/pack/unpack.h +--- openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/unpack.h Thu Jun 19 18:07:02 2014 +0400 ++++ openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/unpack.h Fri Jun 26 17:33:36 2015 +0100 +@@ -210,7 +210,7 @@ + byte* rp; // read pointer (< rplimit <= input.limit()) + byte* rplimit; // how much of the input block has been read? + julong bytes_read; +- int unsized_bytes_read; ++ size_t unsized_bytes_read; + + // callback to read at least one byte, up to available input + typedef jlong (*read_input_fn_t)(unpacker* self, void* buf, jlong minlen, jlong maxlen); +diff -r ad88ac6bac57 -r d64c0a9b8b5a src/share/native/com/sun/java/util/jar/pack/utils.cpp +--- openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/utils.cpp Thu Jun 19 18:07:02 2014 +0400 ++++ openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/utils.cpp Fri Jun 26 17:33:36 2015 +0100 +@@ -81,7 +81,7 @@ + int assert_failed(const char* p) { + char message[1<<12]; + sprintf(message, "@assert failed: %s\n", p); +- fprintf(stdout, 1+message); ++ fprintf(stdout, "%s", 1+message); + breakpoint(); + unpack_abort(message); + return 0; +diff -r ad88ac6bac57 -r d64c0a9b8b5a src/share/native/com/sun/java/util/jar/pack/zip.cpp +--- openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/zip.cpp Thu Jun 19 18:07:02 2014 +0400 ++++ openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/zip.cpp Fri Jun 26 17:33:36 2015 +0100 +@@ -84,7 +84,7 @@ + } + + // Write data to the ZIP output stream. +-void jar::write_data(void* buff, int len) { ++void jar::write_data(void* buff, size_t len) { + while (len > 0) { + int rc = (int)fwrite(buff, 1, len, jarfp); + if (rc <= 0) { +@@ -323,12 +323,12 @@ + // Total number of disks (int) + header64[36] = (ushort)SWAP_BYTES(1); + header64[37] = 0; +- write_data(header64, (int)sizeof(header64)); ++ write_data(header64, sizeof(header64)); + } + + // Write the End of Central Directory structure. + PRINTCR((2, "end-of-directory at %d\n", output_file_offset)); +- write_data(header, (int)sizeof(header)); ++ write_data(header, sizeof(header)); + + PRINTCR((2, "writing zip comment\n")); + // Write the comment. +@@ -590,7 +590,7 @@ + zstream = NEW(z_stream, 1); + u->gzin = this; + u->read_input_fn = read_input_via_gzip; +- u->gzcrc = crc32(0L, Z_NULL, 0); ++ u->gzcrc = crc32(0, Z_NULL, 0); + } + + void gunzip::start(int magic) { +diff -r ad88ac6bac57 -r d64c0a9b8b5a src/share/native/com/sun/java/util/jar/pack/zip.h +--- openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/zip.h Thu Jun 19 18:07:02 2014 +0400 ++++ openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/zip.h Fri Jun 26 17:33:36 2015 +0100 +@@ -68,8 +68,8 @@ + } + + // Private Methods +- void write_data(void* ptr, int len); +- void write_data(bytes& b) { write_data(b.ptr, (int)b.len); } ++ void write_data(void* ptr, size_t len); ++ void write_data(bytes& b) { write_data(b.ptr, b.len); } + void add_to_jar_directory(const char* fname, bool store, int modtime, + int len, int clen, uLong crc); + void write_jar_header(const char* fname, bool store, int modtime, diff --git a/SOURCES/removeSunEcProvider-RH1154143.patch b/SOURCES/removeSunEcProvider-RH1154143.patch index e549a9c..02955a2 100644 --- a/SOURCES/removeSunEcProvider-RH1154143.patch +++ b/SOURCES/removeSunEcProvider-RH1154143.patch @@ -1,6 +1,6 @@ -diff -r 135101850ef1 src/share/lib/security/java.security-linux ---- openjdk/jdk/src/share/lib/security/java.security-linux Wed Jun 03 20:23:19 2015 -0700 -+++ openjdk/jdk/src/share/lib/security/java.security-linux Thu Jul 02 04:02:18 2015 +0100 +diff -r 1fe56343ecc8 src/share/lib/security/java.security-linux +--- openjdk/jdk/src/share/lib/security/java.security-linux Tue Jan 12 21:01:12 2016 +0000 ++++ openjdk/jdk/src/share/lib/security/java.security-linux Tue Jan 12 23:59:19 2016 +0000 @@ -67,13 +67,13 @@ # security.provider.1=sun.security.provider.Sun @@ -22,12 +22,12 @@ diff -r 135101850ef1 src/share/lib/security/java.security-linux # # Sun Provider SecureRandom seed source. -@@ -500,7 +500,7 @@ +@@ -509,7 +509,7 @@ # # Example: # jdk.tls.disabledAlgorithms=MD5, SSLv3, DSA, RSA keySize < 2048 --jdk.tls.disabledAlgorithms=SSLv3, RC4, DH keySize < 768 -+jdk.tls.disabledAlgorithms=SSLv3, RC4, DH keySize < 768, EC, ECDHE, ECDH +-jdk.tls.disabledAlgorithms=SSLv3, RC4, MD5withRSA, DH keySize < 768 ++jdk.tls.disabledAlgorithms=SSLv3, RC4, MD5withRSA, DH keySize < 768, EC, ECDHE, ECDH # Legacy algorithms for Secure Socket Layer/Transport Layer Security (SSL/TLS) # processing in JSSE implementation. diff --git a/SOURCES/s390-size_t_format_flags.patch b/SOURCES/s390-size_t_format_flags.patch new file mode 100644 index 0000000..1c644b5 --- /dev/null +++ b/SOURCES/s390-size_t_format_flags.patch @@ -0,0 +1,130 @@ +diff -r cf43a852f486 src/share/vm/asm/codeBuffer.cpp +--- openjdk/hotspot/src/share/vm/asm/codeBuffer.cpp Wed Jan 13 03:43:29 2016 +0000 ++++ openjdk/hotspot/src/share/vm/asm/codeBuffer.cpp Wed Jan 13 05:30:26 2016 +0000 +@@ -977,7 +977,7 @@ + for (int n = (int) CodeBuffer::SECT_FIRST; n < (int) CodeBuffer::SECT_LIMIT; n++) { + CodeSection* sect = code_section(n); + if (!sect->is_allocated() || sect->is_empty()) continue; +- xtty->print_cr("", ++ xtty->print_cr("", + n, sect->limit() - sect->start(), sect->limit() - sect->end()); + } + xtty->print_cr(""); +diff -r cf43a852f486 src/share/vm/code/codeCache.cpp +--- openjdk/hotspot/src/share/vm/code/codeCache.cpp Wed Jan 13 03:43:29 2016 +0000 ++++ openjdk/hotspot/src/share/vm/code/codeCache.cpp Wed Jan 13 05:30:26 2016 +0000 +@@ -191,7 +191,7 @@ + } + if (PrintCodeCacheExtension) { + ResourceMark rm; +- tty->print_cr("code cache extended to [" INTPTR_FORMAT ", " INTPTR_FORMAT "] (" SSIZE_FORMAT " bytes)", ++ tty->print_cr("code cache extended to [" INTPTR_FORMAT ", " INTPTR_FORMAT "] (" INTX_FORMAT " bytes)", + (intptr_t)_heap->low_boundary(), (intptr_t)_heap->high(), + (address)_heap->high() - (address)_heap->low_boundary()); + } +diff -r cf43a852f486 src/share/vm/gc_implementation/g1/g1StringDedupTable.cpp +--- openjdk/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupTable.cpp Wed Jan 13 03:43:29 2016 +0000 ++++ openjdk/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupTable.cpp Wed Jan 13 05:30:26 2016 +0000 +@@ -556,7 +556,7 @@ + " [Table]\n" + " [Memory Usage: "G1_STRDEDUP_BYTES_FORMAT_NS"]\n" + " [Size: "SIZE_FORMAT", Min: "SIZE_FORMAT", Max: "SIZE_FORMAT"]\n" +- " [Entries: "UINTX_FORMAT", Load: "G1_STRDEDUP_PERCENT_FORMAT_NS", Cached: " UINTX_FORMAT ", Added: "UINTX_FORMAT", Removed: "UINTX_FORMAT"]\n" ++ " [Entries: "UINTX_FORMAT", Load: "G1_STRDEDUP_PERCENT_FORMAT_NS", Cached: " SIZE_FORMAT ", Added: "UINTX_FORMAT", Removed: "UINTX_FORMAT"]\n" + " [Resize Count: "UINTX_FORMAT", Shrink Threshold: "UINTX_FORMAT"("G1_STRDEDUP_PERCENT_FORMAT_NS"), Grow Threshold: "UINTX_FORMAT"("G1_STRDEDUP_PERCENT_FORMAT_NS")]\n" + " [Rehash Count: "UINTX_FORMAT", Rehash Threshold: "UINTX_FORMAT", Hash Seed: 0x%x]\n" + " [Age Threshold: "UINTX_FORMAT"]", +diff -r cf43a852f486 src/share/vm/memory/blockOffsetTable.cpp +--- openjdk/hotspot/src/share/vm/memory/blockOffsetTable.cpp Wed Jan 13 03:43:29 2016 +0000 ++++ openjdk/hotspot/src/share/vm/memory/blockOffsetTable.cpp Wed Jan 13 05:30:26 2016 +0000 +@@ -57,7 +57,7 @@ + gclog_or_tty->print_cr("BlockOffsetSharedArray::BlockOffsetSharedArray: "); + gclog_or_tty->print_cr(" " + " rs.base(): " INTPTR_FORMAT +- " rs.size(): " INTPTR_FORMAT ++ " rs.size(): " SIZE_FORMAT + " rs end(): " INTPTR_FORMAT, + p2i(rs.base()), rs.size(), p2i(rs.base() + rs.size())); + gclog_or_tty->print_cr(" " +diff -r cf43a852f486 src/share/vm/runtime/arguments.cpp +--- openjdk/hotspot/src/share/vm/runtime/arguments.cpp Wed Jan 13 03:43:29 2016 +0000 ++++ openjdk/hotspot/src/share/vm/runtime/arguments.cpp Wed Jan 13 05:30:26 2016 +0000 +@@ -1285,14 +1285,14 @@ + } + if (PrintGCDetails && Verbose) { + // Too early to use gclog_or_tty +- tty->print_cr("CMS ergo set MaxNewSize: " SIZE_FORMAT, MaxNewSize); ++ tty->print_cr("CMS ergo set MaxNewSize: " UINTX_FORMAT, MaxNewSize); + } + + // Code along this path potentially sets NewSize and OldSize + if (PrintGCDetails && Verbose) { + // Too early to use gclog_or_tty +- tty->print_cr("CMS set min_heap_size: " SIZE_FORMAT +- " initial_heap_size: " SIZE_FORMAT ++ tty->print_cr("CMS set min_heap_size: " UINTX_FORMAT ++ " initial_heap_size: " UINTX_FORMAT + " max_heap: " SIZE_FORMAT, + min_heap_size(), InitialHeapSize, max_heap); + } +@@ -1308,7 +1308,7 @@ + FLAG_SET_ERGO(uintx, NewSize, MIN2(preferred_max_new_size, (size_t)NewSize)); + if (PrintGCDetails && Verbose) { + // Too early to use gclog_or_tty +- tty->print_cr("CMS ergo set NewSize: " SIZE_FORMAT, NewSize); ++ tty->print_cr("CMS ergo set NewSize: " UINTX_FORMAT, NewSize); + } + } + // Unless explicitly requested otherwise, size old gen +@@ -1318,7 +1318,7 @@ + FLAG_SET_ERGO(uintx, OldSize, MIN2((size_t)(NewRatio*NewSize), max_heap - NewSize)); + if (PrintGCDetails && Verbose) { + // Too early to use gclog_or_tty +- tty->print_cr("CMS ergo set OldSize: " SIZE_FORMAT, OldSize); ++ tty->print_cr("CMS ergo set OldSize: " UINTX_FORMAT, OldSize); + } + } + } +@@ -1834,7 +1834,7 @@ + + if (PrintGCDetails && Verbose) { + // Cannot use gclog_or_tty yet. +- tty->print_cr(" Initial heap size " SIZE_FORMAT, (uintx)reasonable_initial); ++ tty->print_cr(" Initial heap size " SIZE_FORMAT, (size_t)reasonable_initial); + } + FLAG_SET_ERGO(uintx, InitialHeapSize, (uintx)reasonable_initial); + } +@@ -1844,7 +1844,7 @@ + set_min_heap_size(MIN2((uintx)reasonable_minimum, InitialHeapSize)); + if (PrintGCDetails && Verbose) { + // Cannot use gclog_or_tty yet. +- tty->print_cr(" Minimum heap size " SIZE_FORMAT, min_heap_size()); ++ tty->print_cr(" Minimum heap size " UINTX_FORMAT, min_heap_size()); + } + } + } +diff -r cf43a852f486 src/share/vm/utilities/globalDefinitions.hpp +--- openjdk/hotspot/src/share/vm/utilities/globalDefinitions.hpp Wed Jan 13 03:43:29 2016 +0000 ++++ openjdk/hotspot/src/share/vm/utilities/globalDefinitions.hpp Wed Jan 13 05:30:26 2016 +0000 +@@ -1382,12 +1382,21 @@ + + #define INTPTR_FORMAT_W(width) "%" #width PRIxPTR + ++#ifdef S390 ++#define SSIZE_FORMAT "%z" PRIdPTR ++#define SIZE_FORMAT "%z" PRIuPTR ++#define SIZE_FORMAT_HEX "0x%z" PRIxPTR ++#define SSIZE_FORMAT_W(width) "%" #width "z" PRIdPTR ++#define SIZE_FORMAT_W(width) "%" #width "z" PRIuPTR ++#define SIZE_FORMAT_HEX_W(width) "0x%" #width "z" PRIxPTR ++#else // !S390 + #define SSIZE_FORMAT "%" PRIdPTR + #define SIZE_FORMAT "%" PRIuPTR + #define SIZE_FORMAT_HEX "0x%" PRIxPTR + #define SSIZE_FORMAT_W(width) "%" #width PRIdPTR + #define SIZE_FORMAT_W(width) "%" #width PRIuPTR + #define SIZE_FORMAT_HEX_W(width) "0x%" #width PRIxPTR ++#endif // S390 + + #define INTX_FORMAT "%" PRIdPTR + #define UINTX_FORMAT "%" PRIuPTR diff --git a/SOURCES/soundFontPatch.patch b/SOURCES/soundFontPatch.patch new file mode 100644 index 0000000..2009642 --- /dev/null +++ b/SOURCES/soundFontPatch.patch @@ -0,0 +1,53 @@ +# HG changeset patch +# User omajid +# Date 1445973555 14400 +# Node ID 3e006ea10d21a7fcf15725c51f2ab7ededce53ab +# Parent dfeaf40df80032570558c031f37f6630dc729e3f +8140620: Find and load default.sf2 as the default soundbank on Linux +Reviewed-by: serb + ++++ openjdk/jdk/src/share/classes/com/sun/media/sound/SoftSynthesizer.java +--- openjdk/jdk/src/share/classes/com/sun/media/sound/SoftSynthesizer.java +@@ -671,6 +671,40 @@ + actions.add(new PrivilegedAction() { + public InputStream run() { + if (System.getProperties().getProperty("os.name") ++ .startsWith("Linux")) { ++ ++ File[] systemSoundFontsDir = new File[] { ++ /* Arch, Fedora, Mageia */ ++ new File("/usr/share/soundfonts/"), ++ new File("/usr/local/share/soundfonts/"), ++ /* Debian, Gentoo, OpenSUSE, Ubuntu */ ++ new File("/usr/share/sounds/sf2/"), ++ new File("/usr/local/share/sounds/sf2/"), ++ }; ++ ++ /* ++ * Look for a default.sf2 ++ */ ++ for (File systemSoundFontDir : systemSoundFontsDir) { ++ if (systemSoundFontDir.exists()) { ++ File defaultSoundFont = new File(systemSoundFontDir, "default.sf2"); ++ if (defaultSoundFont.exists()) { ++ try { ++ return new FileInputStream(defaultSoundFont); ++ } catch (IOException e) { ++ // continue with lookup ++ } ++ } ++ } ++ } ++ } ++ return null; ++ } ++ }); ++ ++ actions.add(new PrivilegedAction() { ++ public InputStream run() { ++ if (System.getProperties().getProperty("os.name") + .startsWith("Windows")) { + File gm_dls = new File(System.getenv("SystemRoot") + + "\\system32\\drivers\\gm.dls"); + + diff --git a/SPECS/java-1.8.0-openjdk.spec b/SPECS/java-1.8.0-openjdk.spec index 927f576..dd375f4 100644 --- a/SPECS/java-1.8.0-openjdk.spec +++ b/SPECS/java-1.8.0-openjdk.spec @@ -38,6 +38,13 @@ # note, that order normal_suffix debug_suffix, in case of both enabled, # is expected in one single case at the end of build +%global bootstrap_build 0 + +%if %{bootstrap_build} +%global targets bootcycle-images docs +%else +%global targets all +%endif %global aarch64 aarch64 arm64 armv8 # sometimes we need to distinguish big and little endian PPC64 @@ -46,6 +53,22 @@ %global multilib_arches %{power64} sparc64 x86_64 %global jit_arches %{ix86} x86_64 sparcv9 sparc64 %{aarch64} %{power64} +%ifarch %{aarch64} +# Disable hardened build on AArch64 as it didn't bootcycle +%undefine _hardened_build +%global ourcppflags "-fstack-protector-strong" +%global ourldflags %{nil} +%else +# Filter out flags from the optflags macro that cause problems with the OpenJDK build +# We filter out -O flags so that the optimisation of HotSpot is not lowered from O3 to O2 +# We filter out -Wall which will otherwise cause HotSpot to produce hundreds of thousands of warnings (100+mb logs) +# We replace it with -Wformat (required by -Werror=format-security) and -Wno-cpp to avoid FORTIFY_SOURCE warnings +# We filter out -fexceptions as the HotSpot build explicitly does -fno-exceptions and it's otherwise the default for C++ +%global ourflags %(echo %optflags | sed -e 's|-Wall|-Wformat -Wno-cpp|' | sed -r -e 's|-O[0-9]*||') +%global ourcppflags %(echo %ourflags | sed -e 's|-fexceptions||') "-fstack-protector-strong" +%global ourldflags %{__global_ldflags} +%endif + # With diabled nss is NSS deactivated, so in NSS_LIBDIR can be wrong path # the initialisation must be here. LAter the pkg-connfig have bugy behaviour #looks liekopenjdk RPM specific bug @@ -107,13 +130,6 @@ %global with_systemtap 0 %endif -# AArch64 currently uses a different OpenJDK source tarball -%ifarch %{aarch64} -%global openjdk_sourceid 1 -%else -%global openjdk_sourceid 0 -%endif - # Convert an absolute path to a relative path. Each symbolic link is # specified relative to the directory in which it is installed so that # it will resolve properly within chrooted installations. @@ -123,13 +139,19 @@ # Standard JPackage naming and versioning defines. %global origin openjdk -%global updatever 65 -%global buildver b17 -%global aarch64_updatever 65 -%global aarch64_buildver b17 -%global aarch64_changesetid aarch64-jdk8u%{aarch64_updatever}-%{aarch64_buildver} -# priority must be 7 digits in total -%global priority 18000%{updatever} +# note, following three variables are sedded from update_sources if used correctly. Hardcode them rather there. +%global project aarch64-port +%global repo jdk8u60 +%global revision aarch64-jdk8u71-b15 +# eg # jdk8u60-b27 -> jdk8u60 or # aarch64-jdk8u60-b27 -> aarch64-jdk8u60 (dont forget spec escape % by %%) +%global whole_update %(VERSION=%{revision}; echo ${VERSION%%-*}) +# eg jdk8u60 -> 60 or aarch64-jdk8u60 -> 60 +%global updatever %(VERSION=%{whole_update}; echo ${VERSION##*u}) +# eg jdk8u60-b27 -> b27 +%global buildver %(VERSION=%{revision}; echo ${VERSION##*-}) +# priority must be 7 digits in total. The expression is workarounding tip +%global priority %(TIP=18000%{updatever}; echo ${TIP/tip/99}) + %global javaver 1.8.0 # parametrized macros are order-sensitive @@ -181,8 +203,9 @@ exit 0 # The pretrans lua scriptlet prevents an unmodified java.security # from being replaced via an update. It gets created as # java.security.rpmnew instead. This invalidates the patch of -# JDK-8061210 of the January 2015 CPU or JDK-8043201 of the -# July 2015 CPU. We fix this via a post scriptlet which runs on updates. +# JDK-8061210 of the January 2015 CPU, JDK-8043201 of the +# July 2015 CPU and JDK-8141287 of the January 2016 CPU. We +# fix this via a post scriptlet which runs on updates. if [ "$1" -gt 1 ]; then javasecurity="%{_jvmdir}/%{uniquesuffix}/jre/lib/security/java.security" sum=$(md5sum "${javasecurity}" | cut -d' ' -f1) @@ -191,7 +214,8 @@ if [ "$1" -gt 1 ]; then "${sum}" = 'b138695d0c0ea947e64a21a627d973ba' -o \\ "${sum}" = 'd17958676bdb9f9d941c8a59655311fb' -o \\ "${sum}" = '5463aef7dbf0bbcfe79e0336a7f92701' -o \\ - "${sum}" = '400cc64d4dd31f36dc0cc2c701d603db' ]; then + "${sum}" = '400cc64d4dd31f36dc0cc2c701d603db' -o \\ + "${sum}" = '321342219bb130d238ff144b9e5dbfc1' ]; then if [ -f "${javasecurity}.rpmnew" ]; then mv -f "${javasecurity}.rpmnew" "${javasecurity}" fi @@ -206,9 +230,14 @@ fi %endif %endif +PRIORITY=%{priority} +if [ "%1" == %{debug_suffix} ]; then + let PRIORITY=PRIORITY-1 +fi + ext=.gz alternatives \\ - --install %{_bindir}/java java %{jrebindir %%1}/java %{priority} \\ + --install %{_bindir}/java java %{jrebindir %%1}/java $PRIORITY \\ --slave %{_jvmdir}/jre jre %{_jvmdir}/%{jredir %%1} \\ --slave %{_jvmjardir}/jre jre_exports %{_jvmjardir}/%{jrelnk %%1} \\ --slave %{_bindir}/jjs jjs %{jrebindir %%1}/jjs \\ @@ -219,12 +248,12 @@ alternatives \\ --slave %{_bindir}/rmiregistry rmiregistry %{jrebindir %%1}/rmiregistry \\ --slave %{_bindir}/servertool servertool %{jrebindir %%1}/servertool \\ --slave %{_bindir}/tnameserv tnameserv %{jrebindir %%1}/tnameserv \\ + --slave %{_bindir}/policytool policytool %{jrebindir %%1}/policytool \\ --slave %{_bindir}/unpack200 unpack200 %{jrebindir %%1}/unpack200 \\ --slave %{_mandir}/man1/java.1$ext java.1$ext \\ %{_mandir}/man1/java-%{uniquesuffix %%1}.1$ext \\ --slave %{_mandir}/man1/jjs.1$ext jjs.1$ext \\ %{_mandir}/man1/jjs-%{uniquesuffix %%1}.1$ext \\ - --slave %{_bindir}/policytool policytool %{jrebindir %%1}/policytool \\ --slave %{_mandir}/man1/keytool.1$ext keytool.1$ext \\ %{_mandir}/man1/keytool-%{uniquesuffix %%1}.1$ext \\ --slave %{_mandir}/man1/orbd.1$ext orbd.1$ext \\ @@ -239,18 +268,20 @@ alternatives \\ %{_mandir}/man1/servertool-%{uniquesuffix %%1}.1$ext \\ --slave %{_mandir}/man1/tnameserv.1$ext tnameserv.1$ext \\ %{_mandir}/man1/tnameserv-%{uniquesuffix %%1}.1$ext \\ + --slave %{_mandir}/man1/policytool.1$ext policytool.1$ext \\ + %{_mandir}/man1/policytool-%{uniquesuffix %%1}.1$ext \\ --slave %{_mandir}/man1/unpack200.1$ext unpack200.1$ext \\ %{_mandir}/man1/unpack200-%{uniquesuffix %%1}.1$ext for X in %{origin} %{javaver} ; do alternatives \\ --install %{_jvmdir}/jre-"$X" \\ - jre_"$X" %{_jvmdir}/%{jredir %%1} %{priority} \\ + jre_"$X" %{_jvmdir}/%{jredir %%1} $PRIORITY \\ --slave %{_jvmjardir}/jre-"$X" \\ jre_"$X"_exports %{_jvmdir}/%{jredir %%1} done -update-alternatives --install %{_jvmdir}/jre-%{javaver}-%{origin} jre_%{javaver}_%{origin} %{_jvmdir}/%{jrelnk %%1} %{priority} \\ +update-alternatives --install %{_jvmdir}/jre-%{javaver}-%{origin} jre_%{javaver}_%{origin} %{_jvmdir}/%{jrelnk %%1} $PRIORITY \\ --slave %{_jvmjardir}/jre-%{javaver} jre_%{javaver}_%{origin}_exports %{jvmjardir %%1} update-desktop-database %{_datadir}/applications &> /dev/null || : @@ -280,9 +311,15 @@ exit 0 } %global post_devel() %{expand: + +PRIORITY=%{priority} +if [ "%1" == %{debug_suffix} ]; then + let PRIORITY=PRIORITY-1 +fi + ext=.gz alternatives \\ - --install %{_bindir}/javac javac %{sdkbindir %%1}/javac %{priority} \\ + --install %{_bindir}/javac javac %{sdkbindir %%1}/javac $PRIORITY \\ --slave %{_jvmdir}/java java_sdk %{_jvmdir}/%{sdkdir %%1} \\ --slave %{_jvmjardir}/java java_sdk_exports %{_jvmjardir}/%{sdkdir %%1} \\ --slave %{_bindir}/appletviewer appletviewer %{sdkbindir %%1}/appletviewer \\ @@ -359,8 +396,6 @@ alternatives \\ %{_mandir}/man1/jstatd-%{uniquesuffix %%1}.1$ext \\ --slave %{_mandir}/man1/native2ascii.1$ext native2ascii.1$ext \\ %{_mandir}/man1/native2ascii-%{uniquesuffix %%1}.1$ext \\ - --slave %{_mandir}/man1/policytool.1$ext policytool.1$ext \\ - %{_mandir}/man1/policytool-%{uniquesuffix %%1}.1$ext \\ --slave %{_mandir}/man1/rmic.1$ext rmic.1$ext \\ %{_mandir}/man1/rmic-%{uniquesuffix %%1}.1$ext \\ --slave %{_mandir}/man1/schemagen.1$ext schemagen.1$ext \\ @@ -377,12 +412,12 @@ alternatives \\ for X in %{origin} %{javaver} ; do alternatives \\ --install %{_jvmdir}/java-"$X" \\ - java_sdk_"$X" %{_jvmdir}/%{sdkdir %%1} %{priority} \\ + java_sdk_"$X" %{_jvmdir}/%{sdkdir %%1} $PRIORITY \\ --slave %{_jvmjardir}/java-"$X" \\ java_sdk_"$X"_exports %{_jvmjardir}/%{sdkdir %%1} done -update-alternatives --install %{_jvmdir}/java-%{javaver}-%{origin} java_sdk_%{javaver}_%{origin} %{_jvmdir}/%{sdkdir %%1} %{priority} \\ +update-alternatives --install %{_jvmdir}/java-%{javaver}-%{origin} java_sdk_%{javaver}_%{origin} %{_jvmdir}/%{sdkdir %%1} $PRIORITY \\ --slave %{_jvmjardir}/java-%{javaver}-%{origin} java_sdk_%{javaver}_%{origin}_exports %{_jvmjardir}/%{sdkdir %%1} update-desktop-database %{_datadir}/applications &> /dev/null || : @@ -411,9 +446,15 @@ exit 0 } %global post_javadoc() %{expand: + +PRIORITY=%{priority} +if [ "%1" == %{debug_suffix} ]; then + let PRIORITY=PRIORITY-1 +fi + alternatives \\ --install %{_javadocdir}/java javadocdir %{_javadocdir}/%{uniquejavadocdir %%1}/api \\ - %{priority} + $PRIORITY exit 0 } @@ -456,9 +497,8 @@ exit 0 %{_mandir}/man1/servertool-%{uniquesuffix %%1}.1* %{_mandir}/man1/tnameserv-%{uniquesuffix %%1}.1* %{_mandir}/man1/unpack200-%{uniquesuffix %%1}.1* +%{_mandir}/man1/policytool-%{uniquesuffix %%1}.1* %config(noreplace) %{_jvmdir}/%{jredir %%1}/lib/security/nss.cfg -# removed {_jvmdir}/{jredir}/lib/audio/ -# see soundfont in install %ifarch %{jit_arches} %ifnarch %{power64} %attr(664, root, root) %ghost %{_jvmdir}/%{jredir %%1}/lib/%{archinstall}/server/classes.jsa @@ -505,7 +545,6 @@ exit 0 %{_mandir}/man1/jstat-%{uniquesuffix %%1}.1* %{_mandir}/man1/jstatd-%{uniquesuffix %%1}.1* %{_mandir}/man1/native2ascii-%{uniquesuffix %%1}.1* -%{_mandir}/man1/policytool-%{uniquesuffix %%1}.1* %{_mandir}/man1/rmic-%{uniquesuffix %%1}.1* %{_mandir}/man1/schemagen-%{uniquesuffix %%1}.1* %{_mandir}/man1/serialver-%{uniquesuffix %%1}.1* @@ -671,7 +710,7 @@ OrderWithRequires: %{name}-headless%1 = %{epoch}:%{version}-%{release} Name: java-%{javaver}-%{origin} Version: %{javaver}.%{updatever} -Release: 3.%{buildver}%{?dist} +Release: 2.%{buildver}%{?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 @@ -689,11 +728,11 @@ Group: Development/Languages License: ASL 1.1 and ASL 2.0 and GPL+ and GPLv2 and GPLv2 with exceptions and LGPL+ and LGPLv2 and MPLv1.0 and MPLv1.1 and Public Domain and W3C URL: http://openjdk.java.net/ -# Sources from internal security patched trees. -# ./generate_local_tarball.sh jdk8u%%{updatever}-%%{buildver} -# ./generate_local_tarball.sh %%{aarch64_changesetid} -Source0: jdk8u-jdk8u%{updatever}-%{buildver}.tar.xz -Source1: jdk8u-%{aarch64_changesetid}.tar.xz +# aarch64-port now contains integration forest of both aarch64 and normal jdk +# Source from upstream OpenJDK8 project. To regenerate, use +# VERSION=aarch64-jdk8u71-b15 FILE_NAME_ROOT=${VERSION} +# REPO_ROOT= generate_source_tarball.sh +Source0: %{revision}.tar.xz # Custom README for -src subpackage Source2: README.src @@ -725,51 +764,67 @@ Source101: config.sub # RPM/distribution specific patches +# Accessibility patches # Ignore AWTError when assistive technologies are loaded Patch1: %{name}-accessible-toolkit.patch - # Restrict access to java-atk-wrapper classes Patch3: java-atk-wrapper-security.patch -# RHBZ 808293 -Patch4: %{name}-PStack-808293.patch -# Allow multiple initialization of PKCS11 libraries -Patch5: multiple-pkcs11-library-init.patch -# Include all sources in src.zip -Patch7: include-all-srcs.patch -# Problem discovered with make 4.0 -Patch12: removeSunEcProvider-RH1154143.patch -Patch13: libjpeg-turbo-1.4-compat.patch -# -# OpenJDK specific patches -# +# Upstreamable patches +# PR2737: Allow multiple initialization of PKCS11 libraries +Patch5: multiple-pkcs11-library-init.patch +# PR2095, RH1163501: 2048-bit DH upper bound too small for Fedora infrastructure (sync with IcedTea 2.x) +Patch504: rh1163501.patch +# S4890063, PR2304, RH1214835: HPROF: default text truncated when using doe=n option (upstreaming post-CPU 2015/07) +Patch511: rh1214835.patch +# Turn off strict overflow on IndicRearrangementProcessor{,2}.cpp following 8140543: Arrange font actions +Patch512: no_strict_overflow.patch +# Arch-specific upstreamable patches # JVM heap size changes for s390 (thanks to aph) Patch100: %{name}-s390-java-opts.patch # Type fixing for s390 Patch102: %{name}-size_t.patch +# Use "%z" for size_t on s390 as size_t != intptr_t +Patch103: s390-size_t_format_flags.patch -Patch201: system-libjpeg.patch +# Patches which need backporting to 8u +# S8073139, RH1191652; fix name of ppc64le architecture +Patch601: %{name}-rh1191652-root.patch +Patch602: %{name}-rh1191652-jdk.patch +Patch603: %{name}-rh1191652-hotspot-aarch64.patch +# Include all sources in src.zip +Patch7: include-all-srcs.patch +# 8035341: Allow using a system installed libpng Patch202: system-libpng.patch +# 8042159: Allow using a system-installed lcms2 Patch203: system-lcms.patch - -Patch300: jstack-pr1845.patch - +# PR2462: Backport "8074839: Resolve disabled warnings for libunpack and the unpack200 binary" +# This fixes printf warnings that lead to build failure with -Werror=format-security from optflags +Patch502: pr2462-01.patch +Patch503: pr2462-02.patch +# S8140620, PR2769: Find and load default.sf2 as the default soundbank on Linux +Patch605: soundFontPatch.patch + +# Patches upstream and appearing in 8u76 # Fixes StackOverflowError on ARM32 bit Zero. See RHBZ#1206656 +# 8087120: [GCC5] java.lang.StackOverflowError on Zero JVM initialization on non x86 platforms Patch403: rhbz1206656_fix_current_stack_pointer.patch +# S8146566, PR2428: OpenJDK build can't handle commas in LDFLAGS +Patch501: 8146566.patch +# S8143855: Bad printf formatting in frame_zero.cpp +Patch505: 8143855.patch -# PR2095, RH1163501: 2048-bit DH upper bound too small for Fedora infrastructure (sync with IcedTea 2.x) -Patch504: rh1163501.patch -# S4890063, PR2304, RH1214835: HPROF: default text truncated when using doe=n option (upstreaming post-CPU 2015/07) -Patch511: rh1214835.patch +# Patches ineligible for 8u +# 8043805: Allow using a system-installed libjpeg +Patch201: system-libjpeg.patch -# RH1191652; fix name of ppc64le architecture -Patch600: %{name}-rh1191652-hotspot.patch -Patch601: %{name}-rh1191652-root.patch -Patch602: %{name}-rh1191652-jdk.patch -Patch603: %{name}-rh1191652-hotspot-aarch64.patch +# Local fixes +# Turns off ECC support as we don't ship the SunEC provider currently +Patch12: removeSunEcProvider-RH1154143.patch -Patch9999: enableArm64.patch +# Non-OpenJDK fixes +Patch300: jstack-pr1845.patch BuildRequires: autoconf BuildRequires: automake @@ -806,11 +861,6 @@ BuildRequires: tzdata-java >= 2015d # cacerts build requirement. BuildRequires: openssl -# execstack build requirement. -# no prelink on ARM yet -%ifnarch %{arm} %{aarch64} %{ppc64le} -BuildRequires: prelink -%endif %if %{with_systemtap} BuildRequires: systemtap-sdt-devel %endif @@ -995,13 +1045,14 @@ if [ %{include_debug_build} -eq 0 -a %{include_normal_build} -eq 0 ] ; then echo "you have disabled both include_debug_build and include_debug_build. no go." exit 13 fi -%setup -q -c -n %{uniquesuffix ""} -T -a %{openjdk_sourceid} +%setup -q -c -n %{uniquesuffix ""} -T -a 0 # https://bugzilla.redhat.com/show_bug.cgi?id=1189084 prioritylength=`expr length %{priority}` if [ $prioritylength -ne 7 ] ; then echo "priority must be 7 digits in total, violated" exit 14 fi +# For old patches ln -s openjdk jdk8 cp %{SOURCE2} . @@ -1018,52 +1069,38 @@ cp %{SOURCE101} openjdk/common/autoconf/build-aux/ # Remove libraries that are linked sh %{SOURCE12} -#pure aarch64 forest does not have them -%ifnarch %{aarch64} -# Add AArch64 support to configure & JDK build -%patch9999 -%endif - %patch201 %patch202 %patch203 -%ifnarch %{aarch64} -%endif - %patch1 %patch3 -%patch4 %patch5 %patch7 %patch12 -%patch13 # s390 build fixes %ifarch s390 %patch100 %patch102 +%patch103 %endif # Zero PPC fixes. %patch403 -# HotSpot ppc64le patch is different depending -# on whether we are using 2.5 or 2.6 HotSpot. -%ifarch %{aarch64} %patch603 -%else -%patch600 -%endif - -#pure aarch64 forest does not have them -%ifnarch %{aarch64} %patch601 %patch602 -%endif +%patch605 +%patch501 +%patch502 +%patch503 %patch504 +%patch505 %patch511 +%patch512 # Extract systemtap tapsets %if %{with_systemtap} @@ -1106,8 +1143,12 @@ done %build # How many cpu's do we have? -export NUM_PROC=`/usr/bin/getconf _NPROCESSORS_ONLN 2> /dev/null || :` +export NUM_PROC=%(/usr/bin/getconf _NPROCESSORS_ONLN 2> /dev/null || :) export NUM_PROC=${NUM_PROC:-1} +%if 0%{?_smp_ncpus_max} +# Honor %%_smp_ncpus_max +[ ${NUM_PROC} -gt %{?_smp_ncpus_max} ] && export NUM_PROC=%{?_smp_ncpus_max} +%endif # Build IcedTea and OpenJDK. %ifarch s390x sparc64 alpha %{power64} %{aarch64} @@ -1117,7 +1158,12 @@ export ARCH_DATA_MODEL=64 export CFLAGS="$CFLAGS -mieee" %endif -EXTRA_CFLAGS="-fstack-protector-strong" +# We use ourcppflags because the OpenJDK build seems to +# pass these to the HotSpot C++ compiler... +EXTRA_CFLAGS="%ourcppflags" +# Disable various optimizations to fix miscompliation. See: +# - https://bugzilla.redhat.com/show_bug.cgi?id=1120792 +EXTRA_CPP_FLAGS="%ourcppflags -fno-tree-vrp" # PPC/PPC64 needs -fno-tree-vectorize since -O3 would # otherwise generate wrong code producing segfaults. %ifarch %{power64} ppc @@ -1150,7 +1196,7 @@ bash ../../configure \ --with-update-version=%{updatever} \ --with-build-number=%{buildver} \ %ifarch %{aarch64} - --with-user-release-suffix="aarch64-%{aarch64_updatever}-%{aarch64_buildver}-%{aarch64_changesetid}" \ + --with-user-release-suffix="aarch64-%{updatever}-%{buildver}" \ %endif --with-boot-jdk=/usr/lib/jvm/java-openjdk \ --with-debug-level=$debugbuild \ @@ -1163,6 +1209,7 @@ bash ../../configure \ --with-stdc++lib=dynamic \ --with-extra-cxxflags="$EXTRA_CPP_FLAGS" \ --with-extra-cflags="$EXTRA_CFLAGS" \ + --with-extra-ldflags="%{ourldflags}" \ --with-num-cores="$NUM_PROC" cat spec.gmk @@ -1179,7 +1226,7 @@ make \ STRIP_POLICY=no_strip \ POST_STRIP_CMD="" \ LOG=trace \ - all + %{targets} # the build (erroneously) removes read permissions from some jars # this is a regression in OpenJDK 7 (our compiler): @@ -1244,10 +1291,6 @@ STRIP_KEEP_SYMTAB=libjvm* for suffix in %{build_loop} ; do -# there used to be and link to soundfont -# will be replaced by fix of http://mail.openjdk.java.net/pipermail/sound-dev/2015-October/000352.html -# once done, and have to go to fedora first. Removed from rhel7 for now - pushd %{buildoutputdir $suffix}/images/%{j2sdkimage} #install jsa directories so we can owe them @@ -1743,6 +1786,32 @@ end %endif %changelog +* Fri Jan 15 2016 Andrew Hughes - 1:1.8.0.71-2.b15 +- Add md5sum for previous java.security file so it gets updated. +- Resolves: rhbz#1295753 + +* Thu Jan 14 2016 Andrew Hughes - 1:1.8.0.71-1.b15 +- Restore upstream version of system LCMS patch removed by 'sync with Fedora' +- Add patch to turn off strict overflow on IndicRearrangementProcessor{,2}.cpp +- Resolves: rhbz#1295753 + +* Wed Jan 13 2016 Andrew Hughes - 1:1.8.0.71-0.b15 +- January 2016 security update to u71b15. +- Improve verbosity and helpfulness of tarball generation script. +- Remove RH1290936 workaround as RHEL does not have the hardened flags nor ARM32. +- Update patch documentation using version originally written for Fedora. +- Drop prelink requirement as we no longer use execstack. +- Drop ifdefbugfix patch as this is fixed upstream. +- Provide optional boostrap build and turn it off by default. +- Turn off additional CFLAGS/LDFLAGS on AArch64 as bootstrapping failed. +- Add patch for size_t formatting on s390 as size_t != intptr_t there. +- Resolves: rhbz#1295753 + +* Tue Jan 12 2016 Jiri Vanek - 1:1.8.0.65-4.b17 +- moved to integration forest +- sync with fedora (all but extracted luas and family) +- Resolves: rhbz#1295753 + * Mon Oct 19 2015 Jiri Vanek - 1:1.8.0.65-3.b17 - bumped release X.el7_1 is obviously > X.el7 :-/ - Resolves: rhbz#1257657