From b8989a7350cba35ce22f583a986586e47def3e85 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Mar 24 2016 23:00:15 +0000 Subject: import java-1.8.0-openjdk-1.8.0.77-0.b03.el7_2 --- diff --git a/.gitignore b/.gitignore index 4eaaea2..1c3a93e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ -SOURCES/aarch64-jdk8u71-b15.tar.xz +SOURCES/aarch64-port-jdk8u-aarch64-jdk8u77-b03.tar.xz SOURCES/systemtap-tapset.tar.gz diff --git a/.java-1.8.0-openjdk.metadata b/.java-1.8.0-openjdk.metadata index 97a2a50..242fe0a 100644 --- a/.java-1.8.0-openjdk.metadata +++ b/.java-1.8.0-openjdk.metadata @@ -1,2 +1,2 @@ -ba60eca5ce60ff55b05f885e1d6f4a56c40267e1 SOURCES/aarch64-jdk8u71-b15.tar.xz +a0284d124e9356661f2feb770ba829796809c4ef SOURCES/aarch64-port-jdk8u-aarch64-jdk8u77-b03.tar.xz 8dd5345808d840741a9619becc84302f44b54e78 SOURCES/systemtap-tapset.tar.gz diff --git a/SOURCES/8146566.patch b/SOURCES/8146566.patch deleted file mode 100644 index b5728bc..0000000 --- a/SOURCES/8146566.patch +++ /dev/null @@ -1,23 +0,0 @@ -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/java-1.8.0-openjdk-remove-intree-libraries.sh b/SOURCES/java-1.8.0-openjdk-remove-intree-libraries.sh index 1f022f6..5803037 100644 --- a/SOURCES/java-1.8.0-openjdk-remove-intree-libraries.sh +++ b/SOURCES/java-1.8.0-openjdk-remove-intree-libraries.sh @@ -5,6 +5,7 @@ JPEG_SRC=jdk8/jdk/src/share/native/sun/awt/image/jpeg GIF_SRC=jdk8/jdk/src/share/native/sun/awt/giflib PNG_SRC=jdk8/jdk/src/share/native/sun/awt/libpng LCMS_SRC=jdk8/jdk/src/share/native/sun/java2d/cmm/lcms +SUNEC_SRC=jdk8/jdk/src/share/native/sun/security/ec/impl echo "Removing built-in libs (they will be linked)" @@ -128,3 +129,10 @@ rm -vf ${LCMS_SRC}/lcms2.h rm -vf ${LCMS_SRC}/lcms2_internal.h rm -vf ${LCMS_SRC}/lcms2_plugin.h fi + +echo "Removing SunEC sources" +if [ ! -d ${SUNEC_SRC} ]; then + echo "${SUNEC_SRC} does not exist. Refusing to proceed." + exit 1 +fi +rm -rvf ${SUNEC_SRC} diff --git a/SOURCES/java-1.8.0-openjdk-s390-java-opts.patch b/SOURCES/java-1.8.0-openjdk-s390-java-opts.patch index 9e2b5b8..e2a4313 100644 --- a/SOURCES/java-1.8.0-openjdk-s390-java-opts.patch +++ b/SOURCES/java-1.8.0-openjdk-s390-java-opts.patch @@ -1,27 +1,46 @@ -diff -up jdk8/common/autoconf/boot-jdk.m4.s390 jdk8/common/autoconf/boot-jdk.m4 ---- jdk8/common/autoconf/boot-jdk.m4.s390 2014-10-28 13:10:36.000000000 -0400 -+++ jdk8/common/autoconf/boot-jdk.m4 2015-01-09 15:49:45.443809100 -0500 -@@ -319,21 +319,12 @@ AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK_AR +--- openjdk.orig/common/autoconf/boot-jdk.m4 2016-01-21 18:33:47.586288044 +0000 ++++ openjdk/common/autoconf/boot-jdk.m4 2016-02-05 15:56:09.012242707 +0000 +@@ -1,5 +1,6 @@ + # + # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. ++# Copyright 2014 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 +@@ -303,6 +323,9 @@ + + AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK_ARGUMENTS], + [ ++ # Ensure OPENJDK_TARGET_CPU_ARCH has been setup ++ AC_REQUIRE([PLATFORM_SETUP_OPENJDK_BUILD_AND_TARGET]) ++ + ############################################################################## + # + # Specify options for anything that is run with the Boot JDK. +@@ -325,16 +348,23 @@ + JAVA_FLAGS=$boot_jdk_jvmargs + AC_SUBST(JAVA_FLAGS) + +- AC_MSG_CHECKING([flags for boot jdk java command for big workloads]) # Starting amount of heap memory. - ADD_JVM_ARG_IF_OK([-Xms64M],boot_jdk_jvmargs_big,[$JAVA]) -+ ADD_JVM_ARG_IF_OK([-Xms256M],boot_jdk_jvmargs_big,[$JAVA]) ++ if test "x$OPENJDK_BUILD_CPU_ARCH" = "xs390"; then ++ ADD_JVM_ARG_IF_OK([-Xms256M],boot_jdk_jvmargs_big,[$JAVA]) ++ else ++ ADD_JVM_ARG_IF_OK([-Xms64M],boot_jdk_jvmargs_big,[$JAVA]) ++ fi # Maximum amount of heap memory. # Maximum stack size. -- if test "x$BUILD_NUM_BITS" = x32; then + if test "x$BOOT_JDK_BITS" = x32; then - JVM_MAX_HEAP=1100M -+ JVM_MAX_HEAP=768M ++ if test "x$OPENJDK_BUILD_CPU_ARCH" = "xs390"; then ++ JVM_MAX_HEAP=768M ++ else ++ JVM_MAX_HEAP=1100M ++ fi STACK_SIZE=768 -- else -- # Running Javac on a JVM on a 64-bit machine, takes more space since 64-bit -- # pointers are used. Apparently, we need to increase the heap and stack -- # space for the jvm. More specifically, when running javac to build huge -- # jdk batch -- JVM_MAX_HEAP=1600M -- STACK_SIZE=1536 -- fi - ADD_JVM_ARG_IF_OK([-Xmx$JVM_MAX_HEAP],boot_jdk_jvmargs_big,[$JAVA]) - ADD_JVM_ARG_IF_OK([-XX:ThreadStackSize=$STACK_SIZE],boot_jdk_jvmargs_big,[$JAVA]) - ADD_JVM_ARG_IF_OK([-XX:PermSize=32m],boot_jdk_jvmargs_big,[$JAVA]) + else + # Running Javac on a JVM on a 64-bit machine, takes more space since 64-bit diff --git a/SOURCES/java-1.8.0-openjdk-size_t.patch b/SOURCES/java-1.8.0-openjdk-size_t.patch index 406372a..c9c6b97 100644 --- a/SOURCES/java-1.8.0-openjdk-size_t.patch +++ b/SOURCES/java-1.8.0-openjdk-size_t.patch @@ -109,18 +109,6 @@ diff -up jdk8/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp.size_t jd } int region_size_log = log2_long((jlong) region_size); -diff -up jdk8/hotspot/src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp.size_t jdk8/hotspot/src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp ---- jdk8/hotspot/src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp.size_t 2015-05-19 12:16:26.000000000 -0400 -+++ jdk8/hotspot/src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp 2015-06-09 10:21:39.000000000 -0400 -@@ -833,7 +833,7 @@ OtherRegionsTable::do_cleanup_work(HRRSC - // This can be done by either mutator threads together with the - // concurrent refinement threads or GC threads. - uint HeapRegionRemSet::num_par_rem_sets() { -- return MAX2(DirtyCardQueueSet::num_par_ids() + ConcurrentG1Refine::thread_num(), (uint)ParallelGCThreads); -+ return MAX2(DirtyCardQueueSet::num_par_ids() + ConcurrentG1Refine::thread_num(), ParallelGCThreads); - } - - HeapRegionRemSet::HeapRegionRemSet(G1BlockOffsetSharedArray* bosa, diff -up jdk8/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp.size_t jdk8/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp --- jdk8/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp.size_t 2015-05-19 12:16:26.000000000 -0400 +++ jdk8/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp 2015-06-09 10:21:39.000000000 -0400 diff --git a/SOURCES/pr2462-01.patch b/SOURCES/pr2462-01.patch deleted file mode 100644 index 09de4f9..0000000 --- a/SOURCES/pr2462-01.patch +++ /dev/null @@ -1,200 +0,0 @@ -# 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 deleted file mode 100644 index 47360e7..0000000 --- a/SOURCES/pr2462-02.patch +++ /dev/null @@ -1,311 +0,0 @@ -# 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/pr2462.patch b/SOURCES/pr2462.patch new file mode 100644 index 0000000..17e1f69 --- /dev/null +++ b/SOURCES/pr2462.patch @@ -0,0 +1,302 @@ +# HG changeset patch +# User mikael +# Date 1426870964 25200 +# Fri Mar 20 10:02:44 2015 -0700 +# Node ID ee13ce369705a700b867f8c77423580b7b22cc13 +# Parent 7847ccfb240b35ed0dd328f0404b713b20e0905a +8074839: Resolve disabled warnings for libunpack and the unpack200 binary +Reviewed-by: dholmes, ksrini + +diff --git openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/bytes.h openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/bytes.h +--- openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/bytes.h ++++ openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/bytes.h +@@ -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 --git openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/jni.cpp openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/jni.cpp +--- openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/jni.cpp ++++ openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/jni.cpp +@@ -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 --git openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/main.cpp openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/main.cpp +--- openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/main.cpp ++++ openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/main.cpp +@@ -142,31 +142,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 --git openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/unpack.cpp openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/unpack.cpp +--- openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/unpack.cpp ++++ openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/unpack.cpp +@@ -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. +@@ -3677,21 +3678,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(); +@@ -3711,26 +3713,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 --git openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/unpack.h openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/unpack.h +--- openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/unpack.h ++++ openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/unpack.h +@@ -209,7 +209,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 --git openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/utils.cpp openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/utils.cpp +--- openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/utils.cpp ++++ openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/utils.cpp +@@ -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 --git openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/zip.cpp openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/zip.cpp +--- openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/zip.cpp ++++ openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/zip.cpp +@@ -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. +diff --git openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/zip.h openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/zip.h +--- openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/zip.h ++++ openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/zip.h +@@ -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/s390-size_t_format_flags.patch b/SOURCES/s390-size_t_format_flags.patch index 1c644b5..451c806 100644 --- a/SOURCES/s390-size_t_format_flags.patch +++ b/SOURCES/s390-size_t_format_flags.patch @@ -110,7 +110,7 @@ diff -r cf43a852f486 src/share/vm/utilities/globalDefinitions.hpp #define INTPTR_FORMAT_W(width) "%" #width PRIxPTR -+#ifdef S390 ++#if defined(S390) && !defined(_LP64) +#define SSIZE_FORMAT "%z" PRIdPTR +#define SIZE_FORMAT "%z" PRIuPTR +#define SIZE_FORMAT_HEX "0x%z" PRIxPTR diff --git a/SPECS/java-1.8.0-openjdk.spec b/SPECS/java-1.8.0-openjdk.spec index dd375f4..0a0a3ce 100644 --- a/SPECS/java-1.8.0-openjdk.spec +++ b/SPECS/java-1.8.0-openjdk.spec @@ -37,6 +37,7 @@ %global build_loop %{build_loop1} %{build_loop2} # note, that order normal_suffix debug_suffix, in case of both enabled, # is expected in one single case at the end of build +%global rev_build_loop %{build_loop2} %{build_loop1} %global bootstrap_build 0 @@ -141,8 +142,8 @@ %global origin openjdk # 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 +%global repo jdk8u +%global revision aarch64-jdk8u77-b03 # 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 @@ -710,7 +711,7 @@ OrderWithRequires: %{name}-headless%1 = %{epoch}:%{version}-%{release} Name: java-%{javaver}-%{origin} Version: %{javaver}.%{updatever} -Release: 2.%{buildver}%{?dist} +Release: 0.%{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 @@ -730,9 +731,10 @@ URL: http://openjdk.java.net/ # 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} +# VERSION=aarch64-jdk8u77-b03 FILE_NAME_ROOT=aarch64-port-jdk8u-${VERSION} # REPO_ROOT= generate_source_tarball.sh -Source0: %{revision}.tar.xz +# where the source is obtained from http://hg.openjdk.java.net/%%{project}/%%{repo} +Source0: %{project}-%{repo}-%{revision}.tar.xz # Custom README for -src subpackage Source2: README.src @@ -781,7 +783,7 @@ Patch511: rh1214835.patch Patch512: no_strict_overflow.patch # Arch-specific upstreamable patches -# JVM heap size changes for s390 (thanks to aph) +# PR2415: JVM -Xmx requirement is too high on s390 Patch100: %{name}-s390-java-opts.patch # Type fixing for s390 Patch102: %{name}-size_t.patch @@ -801,8 +803,7 @@ Patch202: system-libpng.patch Patch203: system-lcms.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 +Patch502: pr2462.patch # S8140620, PR2769: Find and load default.sf2 as the default soundbank on Linux Patch605: soundFontPatch.patch @@ -810,8 +811,6 @@ Patch605: soundFontPatch.patch # 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 @@ -1080,11 +1079,9 @@ sh %{SOURCE12} %patch12 # s390 build fixes -%ifarch s390 %patch100 %patch102 %patch103 -%endif # Zero PPC fixes. %patch403 @@ -1094,9 +1091,7 @@ sh %{SOURCE12} %patch602 %patch605 -%patch501 %patch502 -%patch503 %patch504 %patch505 %patch511 @@ -1195,9 +1190,6 @@ bash ../../configure \ --with-milestone="fcs" \ --with-update-version=%{updatever} \ --with-build-number=%{buildver} \ -%ifarch %{aarch64} - --with-user-release-suffix="aarch64-%{updatever}-%{buildver}" \ -%endif --with-boot-jdk=/usr/lib/jvm/java-openjdk \ --with-debug-level=$debugbuild \ --enable-unlimited-crypto \ @@ -1246,11 +1238,20 @@ export JAVA_HOME=$(pwd)/%{buildoutputdir $suffix}/images/%{j2sdkimage} # Install nss.cfg right away as we will be using the JRE above install -m 644 %{SOURCE11} $JAVA_HOME/jre/lib/security/ - # Use system-wide tzdata rm $JAVA_HOME/jre/lib/tzdb.dat ln -s %{_datadir}/javazi-1.8/tzdb.dat $JAVA_HOME/jre/lib/tzdb.dat +#build cycles +done + +%check + +# We test debug first as it will give better diagnostics on a crash +for suffix in %{rev_build_loop} ; do + +export JAVA_HOME=$(pwd)/%{buildoutputdir $suffix}/images/%{j2sdkimage} + # Check unlimited policy has been used $JAVA_HOME/bin/javac -d . %{SOURCE13} $JAVA_HOME/bin/java TestCryptoLevel @@ -1786,6 +1787,25 @@ end %endif %changelog +* Wed Mar 23 2016 Andrew Hughes - 1:1.8.0.77-0.b03 +- Remove what remains of the SunEC sources in the remove-intree-libraries script. +- Resolves: rhbz#1320664 + +* Wed Mar 23 2016 Andrew Hughes - 1:1.8.0.77-0.b03 +- Update to u77b03. +- Drop 8146566 which is applied upstream. +- Replace s390 Java options patch with general version from IcedTea. +- Apply s390 patches unconditionally to avoid arch-specific patch failures. +- Remove fragment of s390 size_t patch that unnecessarily removes a cast, breaking ppc64le. +- Remove aarch64-specific suffix as update/build version are now the same as for other archs. +- Only use z format specifier on s390, not s390x. +- Adjust tarball generation script to allow ecc_impl.h to be included. +- Correct spelling mistakes in tarball generation script. +- Synchronise minor changes from Fedora. +- Use a simple backport for PR2462/8074839. +- Don't backport the crc check for pack.gz. It's not tested well upstream. +- Resolves: rhbz#1320664 + * 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