diff --git a/.java-1.7.0-openjdk.metadata b/.java-1.7.0-openjdk.metadata new file mode 100644 index 0000000..f5ecb39 --- /dev/null +++ b/.java-1.7.0-openjdk.metadata @@ -0,0 +1,4 @@ +fcc167de17354efb6e52cb387eb3e7dbb0316b53 SOURCES/class-rewriter.tar.gz +4708fedba257c5ba7aef6d416421bf207d190c5e SOURCES/systemtap-tapset-2013-10-02.tar.gz +241f89696fd5019bba8b98363c5091101ab602b3 SOURCES/openjdk-icedtea-2.4.3.tar.xz +fb72b6b1f4735ad9b5799d0b5058b0b1dec67b17 SOURCES/pulseaudio.tar.gz diff --git a/README.md b/README.md deleted file mode 100644 index 0e7897f..0000000 --- a/README.md +++ /dev/null @@ -1,5 +0,0 @@ -The master branch has no content - -Look at the c7 branch if you are working with CentOS-7, or the c4/c5/c6 branch for CentOS-4, 5 or 6 - -If you find this file in a distro specific branch, it means that no content has been checked in yet diff --git a/SOURCES/FixPPC64StackOverflow.patch b/SOURCES/FixPPC64StackOverflow.patch new file mode 100644 index 0000000..a205208 --- /dev/null +++ b/SOURCES/FixPPC64StackOverflow.patch @@ -0,0 +1,36 @@ +diff -r 0505a797849f src/os/linux/vm/os_linux.cpp +--- openjdk/hotspot/src/os/linux/vm/os_linux.cpp Wed Oct 23 05:23:32 2013 +0100 ++++ openjdk/hotspot/src/os/linux/vm/os_linux.cpp Thu Oct 24 14:21:47 2013 +0000 +@@ -4538,6 +4538,7 @@ + initial_time_count = os::elapsed_counter(); + pthread_mutex_init(&dl_mutex, NULL); + ++NOT_ZERO ( + // If the pagesize of the VM is greater than 8K determine the appropriate + // number of initial guard pages. The user can change this with the + // command line arguments, if needed. +@@ -4546,6 +4547,7 @@ + StackRedPages = 1; + StackShadowPages = round_to((StackShadowPages*Linux::vm_default_page_size()), vm_page_size()) / vm_page_size(); + } ++) + } + + // To install functions for atexit system call +@@ -4598,9 +4600,16 @@ + // size. Add a page for compiler2 recursion in main thread. + // Add in 2*BytesPerWord times page size to account for VM stack during + // class initialization depending on 32 or 64 bit VM. ++NOT_ZERO ( + os::Linux::min_stack_allowed = MAX2(os::Linux::min_stack_allowed, + (size_t)(StackYellowPages+StackRedPages+StackShadowPages) * Linux::page_size() + + (2*BytesPerWord COMPILER2_PRESENT(+1)) * Linux::vm_default_page_size()); ++) ++ZERO_ONLY ( ++ os::Linux::min_stack_allowed = MAX2(os::Linux::min_stack_allowed, ++ (size_t)(StackYellowPages+StackRedPages+StackShadowPages+ ++ 2*BytesPerWord COMPILER2_PRESENT(+1)) * Linux::page_size()); ++) + + size_t threadStackSizeInBytes = ThreadStackSize * K; + if (threadStackSizeInBytes != 0 && diff --git a/SOURCES/PStack-808293.patch b/SOURCES/PStack-808293.patch new file mode 100644 index 0000000..4637403 --- /dev/null +++ b/SOURCES/PStack-808293.patch @@ -0,0 +1,40 @@ +--- openjdk/hotspot/agent/src/share/classes/sun/jvm/hotspot/tools/PStack.java 2012-04-06 02:26:33.322164601 +0200 ++++ openjdk/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, 2012, 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 @@ + printUnknown(out); + } + } ++ 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 (isJava && concurrentLocks) { diff --git a/SOURCES/README.src b/SOURCES/README.src new file mode 100644 index 0000000..7a54b1b --- /dev/null +++ b/SOURCES/README.src @@ -0,0 +1,2 @@ +The java-1.7.0-openjdk-src subpackage contains the complete class library +source code for use by IDE indexers and debuggers. diff --git a/SOURCES/TestCryptoLevel.java b/SOURCES/TestCryptoLevel.java new file mode 100644 index 0000000..b32b7ae --- /dev/null +++ b/SOURCES/TestCryptoLevel.java @@ -0,0 +1,72 @@ +/* TestCryptoLevel -- Ensure unlimited crypto policy is in use. + Copyright (C) 2012 Red Hat, Inc. + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. + +This program 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 Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . +*/ + +import java.lang.reflect.Field; +import java.lang.reflect.Method; +import java.lang.reflect.InvocationTargetException; + +import java.security.Permission; +import java.security.PermissionCollection; + +public class TestCryptoLevel +{ + public static void main(String[] args) + throws NoSuchFieldException, ClassNotFoundException, + IllegalAccessException, InvocationTargetException + { + Class cls = null; + Method def = null, exempt = null; + + try + { + cls = Class.forName("javax.crypto.JceSecurity"); + } + catch (ClassNotFoundException ex) + { + System.err.println("Running a non-Sun JDK."); + System.exit(0); + } + try + { + def = cls.getDeclaredMethod("getDefaultPolicy"); + exempt = cls.getDeclaredMethod("getExemptPolicy"); + } + catch (NoSuchMethodException ex) + { + System.err.println("Running IcedTea with the original crypto patch."); + System.exit(0); + } + def.setAccessible(true); + exempt.setAccessible(true); + PermissionCollection defPerms = (PermissionCollection) def.invoke(null); + PermissionCollection exemptPerms = (PermissionCollection) exempt.invoke(null); + Class apCls = Class.forName("javax.crypto.CryptoAllPermission"); + Field apField = apCls.getDeclaredField("INSTANCE"); + apField.setAccessible(true); + Permission allPerms = (Permission) apField.get(null); + if (defPerms.implies(allPerms) && (exemptPerms == null || exemptPerms.implies(allPerms))) + { + System.err.println("Running with the unlimited policy."); + System.exit(0); + } + else + { + System.err.println("WARNING: Running with a restricted crypto policy."); + System.exit(-1); + } + } +} diff --git a/SOURCES/abrt_friendly_hs_log_jdk7.patch b/SOURCES/abrt_friendly_hs_log_jdk7.patch new file mode 100644 index 0000000..6e0afa6 --- /dev/null +++ b/SOURCES/abrt_friendly_hs_log_jdk7.patch @@ -0,0 +1,35 @@ +--- openjdk/hotspot/src/share/vm/utilities/vmError.cpp 2012-02-02 16:17:24.476664897 +0100 ++++ openjdk/hotspot/src/share/vm/utilities/vmError.cpp 2012-02-02 16:17:24.476664897 +0100 +@@ -929,6 +929,7 @@ + } + } + ++ /* + if (fd == -1) { + const char *cwd = os::get_current_directory(buffer, sizeof(buffer)); + size_t len = strlen(cwd); +@@ -938,6 +939,24 @@ + os::file_separator(), os::current_process_id()); + fd = open(buffer, O_RDWR | O_CREAT | O_TRUNC, 0666); + } ++ */ ++ ++ if (fd == -1) { ++ const char * tmpdir = os::get_temp_directory(); ++ // try temp directory if it exists. ++ if (tmpdir != NULL && tmpdir[0] != '\0') { ++ jio_snprintf(buffer, sizeof(buffer), "%s%sjvm-%u", ++ tmpdir, os::file_separator(), os::current_process_id()); ++ // if mkdir() failed, hs_err will be created in temporary directory ++ if (!mkdir(buffer, 0700)) { // only read+execute flags are needed ++ // but we need to write into the directory too ++ jio_snprintf(buffer, sizeof(buffer), "%s%sjvm-%u%shs_error.log", ++ tmpdir, os::file_separator(), os::current_process_id(), ++ os::file_separator()); ++ fd = open(buffer, O_WRONLY | O_CREAT | O_TRUNC, 0444); // read-only file ++ } ++ } ++ } + + if (fd == -1) { + const char * tmpdir = os::get_temp_directory(); diff --git a/SOURCES/fsg.sh b/SOURCES/fsg.sh new file mode 100644 index 0000000..062ffd4 --- /dev/null +++ b/SOURCES/fsg.sh @@ -0,0 +1,115 @@ +#!/bin/sh + +echo "Further liberating OpenJDK..." + +# PRx denotes bug x in the IcedTea bug database (http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=x) +# Sx denotes bug x in the Sun bug database (http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=x) + +# PR146/S6713083 +# Remove binaries +rm -vf \ + openjdk/jdk/test/sun/management/windows/revokeall.exe \ + openjdk/jdk/test/sun/management/jmxremote/bootstrap/linux-i586/launcher \ + openjdk/jdk/test/sun/management/jmxremote/bootstrap/solaris-sparc/launcher \ + openjdk/jdk/test/sun/management/jmxremote/bootstrap/solaris-i586/launcher + +rm -vf \ + openjdk/jdk/test/java/nio/channels/spi/SelectorProvider/inheritedChannel/lib/linux-i586/libLauncher.so \ + openjdk/jdk/test/java/nio/channels/spi/SelectorProvider/inheritedChannel/lib/solaris-i586/libLauncher.so \ + openjdk/jdk/test/java/nio/channels/spi/SelectorProvider/inheritedChannel/lib/solaris-sparc/libLauncher.so \ + openjdk/jdk/test/java/nio/channels/spi/SelectorProvider/inheritedChannel/lib/solaris-sparcv9/libLauncher.so \ + openjdk/jdk/test/tools/launcher/lib/i386/lib32/lib32/liblibrary.so \ + openjdk/jdk/test/tools/launcher/lib/i386/lib32/liblibrary.so \ + openjdk/jdk/test/tools/launcher/lib/sparc/lib32/lib32/liblibrary.so \ + openjdk/jdk/test/tools/launcher/lib/sparc/lib32/liblibrary.so \ + openjdk/jdk/test/tools/launcher/lib/sparc/lib64/lib64/liblibrary.so \ + openjdk/jdk/test/tools/launcher/lib/sparc/lib64/liblibrary.so + +rm -vf \ + openjdk/jdk/test/java/util/Locale/data/deflocale.exe \ + openjdk/jdk/test/java/util/Locale/data/deflocale.jds3 \ + openjdk/jdk/test/java/util/Locale/data/deflocale.rhel4 \ + openjdk/jdk/test/java/util/Locale/data/deflocale.sh \ + openjdk/jdk/test/java/util/Locale/data/deflocale.sol10 \ + openjdk/jdk/test/java/util/Locale/data/deflocale.winvista \ + openjdk/jdk/test/java/util/Locale/data/deflocale.winxp \ + +# Remove test sources with questionable license headers. +rm -vf \ + openjdk/jdk/test/java/util/ResourceBundle/Bug4168625Resource3.java \ + openjdk/jdk/test/java/util/ResourceBundle/Bug4168625Resource3_en_IE.java \ + openjdk/jdk/test/java/util/ResourceBundle/Bug4165815Test.java \ + openjdk/jdk/test/java/util/ResourceBundle/Bug4177489_Resource_jf.java \ + openjdk/jdk/test/java/util/ResourceBundle/Bug4168625Resource3_en_CA.java \ + openjdk/jdk/test/java/util/ResourceBundle/Bug4168625Getter.java \ + openjdk/jdk/test/java/util/ResourceBundle/Bug4177489Test.java \ + openjdk/jdk/test/java/util/ResourceBundle/Bug4168625Resource.java \ + openjdk/jdk/test/java/util/ResourceBundle/Bug4168625Resource2.java \ + openjdk/jdk/test/java/util/ResourceBundle/Bug4168625Resource3_en_US.java \ + openjdk/jdk/test/java/util/ResourceBundle/Bug4083270Test.java \ + openjdk/jdk/test/java/util/ResourceBundle/Bug4168625Resource3_en.java \ + openjdk/jdk/test/java/util/ResourceBundle/Bug4177489_Resource.java \ + openjdk/jdk/test/java/util/ResourceBundle/Bug4168625Test.java \ + openjdk/jdk/test/java/util/ResourceBundle/Bug4168625Resource2_en_US.java \ + openjdk/jdk/test/java/util/ResourceBundle/Bug4168625Class.java \ + openjdk/jdk/test/java/util/Locale/Bug4175998Test.java \ + openjdk/jdk/test/java/util/ResourceBundle/RBTestFmwk.java \ + openjdk/jdk/test/java/util/ResourceBundle/TestResource_fr.java \ + openjdk/jdk/test/java/util/ResourceBundle/Bug4179766Resource.java \ + openjdk/jdk/test/java/util/ResourceBundle/Bug4179766Getter.java \ + openjdk/jdk/test/java/util/ResourceBundle/Bug4179766Class.java \ + openjdk/jdk/test/java/util/ResourceBundle/TestResource.java \ + openjdk/jdk/test/java/util/ResourceBundle/FakeTestResource.java \ + openjdk/jdk/test/java/util/ResourceBundle/TestResource_de.java \ + openjdk/jdk/test/java/util/ResourceBundle/TestBug4179766.java \ + openjdk/jdk/test/java/util/ResourceBundle/TestResource_fr_CH.java \ + openjdk/jdk/test/java/util/ResourceBundle/ResourceBundleTest.java \ + openjdk/jdk/test/java/util/ResourceBundle/TestResource_it.java \ + openjdk/jdk/test/java/util/Locale/PrintDefaultLocale.java \ + openjdk/jdk/test/java/util/Locale/LocaleTest.java \ + openjdk/jdk/test/java/util/Locale/LocaleTestFmwk.java \ + openjdk/jdk/test/java/util/Locale/Bug4184873Test.java \ + openjdk/jdk/test/sun/text/resources/LocaleDataTest.java + +# Remove J2DBench sources, some of which have questionable license +# headers. +rm -rvf \ + openjdk/jdk/src/share/demo/java2d/J2DBench + +# BEGIN Debian/Ubuntu additions + +# binary files +rm -vf \ + openjdk/jdk/test/sun/net/idn/nfscis.spp + +# TODO +#$ find openjdk -name '*.jar' -o -name '*.class'|grep -v test + +# PR140, S6695776 +# Also see patches/icedtea-jscheme.patch +rm -rvf openjdk/corba/src/share/classes/com/sun/tools/corba/se/logutil/lib +rm -rvf openjdk/corba/src/share/classes/com/sun/tools/corba/se/logutil/scripts + +# PR139, S6710791 +rm -vf \ + openjdk/hotspot/agent/kk/src/share/lib/maf-1_0.jar \ + openjdk/hotspot/agent/kk/src/share/lib/jlfgr-1_0.jar \ + +# END Debian/Ubuntu additions + +echo "Removing support for proprietary SNMP plug" +rm -rvf openjdk/jdk/src/share/classes/sun/management/snmp +rm -rvf openjdk/jdk/src/share/classes/com/sun/jmx/snmp +rm -rvf openjdk/jdk/test/com/sun/jmx/snmp + +echo "Removing registration tests" +rm -rvf openjdk/jdk/test/com/sun/servicetag + +echo "Removing EC source code we don't build" +rm -vf openjdk/jdk/src/share/classes/sun/security/ec/ECDHKeyAgreement.java +rm -vf openjdk/jdk/src/share/classes/sun/security/ec/ECDSASignature.java +rm -vf openjdk/jdk/src/share/classes/sun/security/ec/ECKeyPairGenerator.java +rm -vf openjdk/jdk/src/share/classes/sun/security/ec/SunEC.java +rm -vf openjdk/jdk/src/share/classes/sun/security/ec/SunECEntries.java +rm -rvf openjdk/jdk/src/share/native/sun/security/ec +rm -rvf openjdk/jdk/make/sun/security/ec diff --git a/SOURCES/gstackbounds.patch b/SOURCES/gstackbounds.patch new file mode 100644 index 0000000..39a066a --- /dev/null +++ b/SOURCES/gstackbounds.patch @@ -0,0 +1,142 @@ +diff --git a/src/os/linux/vm/os_linux.cpp b/src/os/linux/vm/os_linux.cpp +--- openjdk/hotspot/src/os/linux/vm/os_linux.cpp ++++ openjdk/hotspot/src/os/linux/vm/os_linux.cpp +@@ -2763,39 +2763,47 @@ + // writing thread stacks don't use growable mappings (i.e. those + // creeated with MAP_GROWSDOWN), and aren't marked "[stack]", so this + // only applies to the main thread. +- +-static +-bool get_stack_bounds(uintptr_t *bottom, uintptr_t *top) { +- +- char buf[128]; +- int fd, sz; +- +- if ((fd = ::open("/proc/self/maps", O_RDONLY)) < 0) { ++static bool ++get_stack_bounds(uintptr_t *bottom, uintptr_t *top) ++{ ++ FILE *f = fopen("/proc/self/maps", "r"); ++ if (f == NULL) + return false; +- } +- +- const char kw[] = "[stack]"; +- const int kwlen = sizeof(kw)-1; +- +- // Address part of /proc/self/maps couldn't be more than 128 bytes +- while ((sz = os::get_line_chars(fd, buf, sizeof(buf))) > 0) { +- if (sz > kwlen && ::memcmp(buf+sz-kwlen, kw, kwlen) == 0) { +- // Extract addresses +- if (sscanf(buf, "%" SCNxPTR "-%" SCNxPTR, bottom, top) == 2) { +- uintptr_t sp = (uintptr_t) __builtin_frame_address(0); +- if (sp >= *bottom && sp <= *top) { +- ::close(fd); +- return true; +- } ++ ++ while (!feof(f)) { ++ size_t dummy; ++ char *str = NULL; ++ ssize_t len = getline(&str, &dummy, f); ++ if (len == -1) { ++ fclose(f); ++ if (str != NULL) ++ free(str); ++ return false; ++ } ++ ++ if (len > 0 && str[len-1] == '\n') { ++ str[len-1] = 0; ++ len--; ++ } ++ ++ static const char *stack_str = "[stack]"; ++ if (len > (ssize_t)strlen(stack_str) ++ && (strcmp(str + len - strlen(stack_str), stack_str) == 0)) { ++ if (sscanf(str, "%" SCNxPTR "-%" SCNxPTR, bottom, top) == 2) { ++ uintptr_t sp = (uintptr_t)__builtin_frame_address(0); ++ if (sp >= *bottom && sp <= *top) { ++ free(str); ++ fclose(f); ++ return true; + } +- } +- } +- +- ::close(fd); ++ } ++ } ++ free(str); ++ } ++ fclose(f); + return false; + } + +- + // If the (growable) stack mapping already extends beyond the point + // where we're going to put our guard pages, truncate the mapping at + // that point by munmap()ping it. This ensures that when we later +diff --git a/src/share/vm/runtime/os.cpp b/src/share/vm/runtime/os.cpp +--- openjdk/hotspot/src/share/vm/runtime/os.cpp ++++ openjdk/hotspot/src/share/vm/runtime/os.cpp +@@ -1353,43 +1353,6 @@ + return result; + } + +-// Read file line by line, if line is longer than bsize, +-// skip rest of line. +-int os::get_line_chars(int fd, char* buf, const size_t bsize){ +- size_t sz, i = 0; +- +- // read until EOF, EOL or buf is full +- while ((sz = (int) read(fd, &buf[i], 1)) == 1 && i < (bsize-2) && buf[i] != '\n') { +- ++i; +- } +- +- if (buf[i] == '\n') { +- // EOL reached so ignore EOL character and return +- +- buf[i] = 0; +- return (int) i; +- } +- +- buf[i+1] = 0; +- +- if (sz != 1) { +- // EOF reached. if we read chars before EOF return them and +- // return EOF on next call otherwise return EOF +- +- return (i == 0) ? -1 : (int) i; +- } +- +- // line is longer than size of buf, skip to EOL +- char ch; +- while (read(fd, &ch, 1) == 1 && ch != '\n') { +- // Do nothing +- } +- +- // return initial part of line that fits in buf. +- // If we reached EOF, it will be returned on next call. +- +- return (int) i; +-} + + void os::SuspendedThreadTask::run() { + assert(Threads_lock->owned_by_self() || (_thread == VMThread::vm_thread()), "must have threads lock to call this"); + +diff --git a/src/share/vm/runtime/os.hpp b/src/share/vm/runtime/os.hpp +--- openjdk/hotspot/src/share/vm/runtime/os.hpp ++++ openjdk/hotspot/src/share/vm/runtime/os.hpp +@@ -672,10 +672,6 @@ + // Hook for os specific jvm options that we don't want to abort on seeing + static bool obsolete_option(const JavaVMOption *option); + +- // Read file line by line. If line is longer than bsize, +- // rest of line is skipped. Returns number of bytes read or -1 on EOF +- static int get_line_chars(int fd, char *buf, const size_t bsize); +- + // Extensions + #include "runtime/os_ext.hpp" + + diff --git a/SOURCES/java-1.7.0-openjdk-accessible-toolkit.patch b/SOURCES/java-1.7.0-openjdk-accessible-toolkit.patch new file mode 100644 index 0000000..222dcfb --- /dev/null +++ b/SOURCES/java-1.7.0-openjdk-accessible-toolkit.patch @@ -0,0 +1,16 @@ +diff -uNr openjdk-orig/jdk/src/share/classes/java/awt/Toolkit.java openjdk/jdk/src/share/classes/java/awt/Toolkit.java +--- openjdk-orig/jdk/src/share/classes/java/awt/Toolkit.java 2009-01-23 11:59:47.000000000 -0500 ++++ openjdk/jdk/src/share/classes/java/awt/Toolkit.java 2009-01-23 12:05:20.000000000 -0500 +@@ -871,7 +871,11 @@ + return null; + } + }); +- loadAssistiveTechnologies(); ++ try { ++ loadAssistiveTechnologies(); ++ } catch ( AWTError error) { ++ // ignore silently ++ } + } finally { + // Make sure to always re-enable the JIT. + java.lang.Compiler.enable(); diff --git a/SOURCES/java-1.7.0-openjdk-aes-buffering.patch b/SOURCES/java-1.7.0-openjdk-aes-buffering.patch new file mode 100644 index 0000000..0ed0f95 --- /dev/null +++ b/SOURCES/java-1.7.0-openjdk-aes-buffering.patch @@ -0,0 +1,411 @@ +diff -up openjdk/jdk/src/share/classes/sun/security/pkcs11/P11Cipher.java.sav openjdk/jdk/src/share/classes/sun/security/pkcs11/P11Cipher.java +--- openjdk/jdk/src/share/classes/sun/security/pkcs11/P11Cipher.java.sav 2012-02-14 16:12:51.000000000 -0500 ++++ openjdk/jdk/src/share/classes/sun/security/pkcs11/P11Cipher.java 2012-05-02 14:07:20.642722122 -0400 +@@ -160,10 +160,16 @@ final class P11Cipher extends CipherSpi + // original IV, if in MODE_CBC or MODE_CTR + private byte[] iv; + +- // number of bytes buffered internally by the native mechanism and padBuffer +- // if we do the padding ++ // number of bytes buffered by the blockBuffer + private int bytesBuffered; + ++ // number of bytes buffered internally ++ private int bytesBufferedInt; ++ ++ // bytes buffered from an incomplete block ++ private byte[] blockBuffer; ++ private int blockBufferLen; ++ + P11Cipher(Token token, String algorithm, long mechanism) + throws PKCS11Exception, NoSuchAlgorithmException { + super(); +@@ -194,6 +200,9 @@ final class P11Cipher extends CipherSpi + // should not happen + throw new ProviderException(nspe); + } ++ ++ if (blockSize > 0) ++ blockBuffer = new byte[blockSize]; + } + + protected void engineSetMode(String mode) throws NoSuchAlgorithmException { +@@ -435,7 +444,9 @@ final class P11Cipher extends CipherSpi + throw ex; + } + bytesBuffered = 0; ++ bytesBufferedInt = 0; + padBufferLen = 0; ++ blockBufferLen = 0; + initialized = true; + } + +@@ -445,7 +456,7 @@ final class P11Cipher extends CipherSpi + return 0; + } + +- int result = inLen + bytesBuffered; ++ int result = inLen + bytesBuffered + bytesBufferedInt; + if (blockSize != 0) { + // minus the number of bytes in the last incomplete block. + result -= (result & (blockSize - 1)); +@@ -459,7 +470,7 @@ final class P11Cipher extends CipherSpi + return 0; + } + +- int result = inLen + bytesBuffered; ++ int result = inLen + bytesBuffered + bytesBufferedInt; + if (blockSize != 0 && encrypt && paddingType != PAD_NONE) { + // add the number of bytes to make the last block complete. + result += (blockSize - (result & (blockSize - 1))); +@@ -471,7 +482,9 @@ final class P11Cipher extends CipherSpi + private void reset() { + initialized = false; + bytesBuffered = 0; ++ bytesBufferedInt = 0; + padBufferLen = 0; ++ blockBufferLen = 0; + if (session != null) { + session = token.releaseSession(session); + } +@@ -547,48 +560,57 @@ final class P11Cipher extends CipherSpi + try { + ensureInitialized(); + int k = 0; +- if (encrypt) { +- k = token.p11.C_EncryptUpdate(session.id(), 0, in, inOfs, inLen, +- 0, out, outOfs, outLen); +- } else { +- int newPadBufferLen = 0; +- if (paddingObj != null) { +- if (padBufferLen != 0) { +- // NSS throws up when called with data not in multiple +- // of blocks. Try to work around this by holding the +- // extra data in padBuffer. +- if (padBufferLen != padBuffer.length) { +- int bufCapacity = padBuffer.length - padBufferLen; +- if (inLen > bufCapacity) { +- bufferInputBytes(in, inOfs, bufCapacity); +- inOfs += bufCapacity; +- inLen -= bufCapacity; +- } else { +- bufferInputBytes(in, inOfs, inLen); +- return 0; +- } +- } +- k = token.p11.C_DecryptUpdate(session.id(), +- 0, padBuffer, 0, padBufferLen, +- 0, out, outOfs, outLen); +- padBufferLen = 0; +- } +- newPadBufferLen = inLen & (blockSize - 1); +- if (newPadBufferLen == 0) { +- newPadBufferLen = padBuffer.length; +- } +- inLen -= newPadBufferLen; +- } +- if (inLen > 0) { +- k += token.p11.C_DecryptUpdate(session.id(), 0, in, inOfs, ++ int newBlockBufferLen = 0; ++ ++ // NSS throws up when called with data not in multiple ++ // of blocks. Try to work around this by holding the ++ // extra data in blockBuffer. ++ if (blockBufferLen != 0) { ++ if (blockBufferLen != blockBuffer.length) { ++ int bufCapacity = blockBuffer.length - blockBufferLen; ++ if (inLen >= bufCapacity) { ++ bufferInputBytes(in, inOfs, bufCapacity); ++ inOfs += bufCapacity; ++ inLen -= bufCapacity; ++ } else { ++ bufferInputBytes(in, inOfs, inLen); ++ return 0; ++ } ++ } ++ if (encrypt) { ++ k = token.p11.C_EncryptUpdate(session.id(), 0, blockBuffer, 0, ++ blockBufferLen, 0, out, outOfs, ++ outLen); ++ } else { ++ k = token.p11.C_DecryptUpdate(session.id(), 0, blockBuffer, 0, ++ blockBufferLen, 0, out, outOfs, ++ outLen); ++ } ++ blockBufferLen = 0; ++ bytesBuffered = 0; ++ } ++ ++ if (inLen == 0) ++ return k; ++ ++ newBlockBufferLen = inLen & (blockSize - 1); ++ if (!encrypt && paddingObj != null && newBlockBufferLen == 0) ++ // Hold the last block in the buffer if we need to unpad ++ newBlockBufferLen = blockBuffer.length; ++ inLen -= newBlockBufferLen; ++ ++ if (inLen > 0) { ++ if (encrypt) { ++ k = token.p11.C_EncryptUpdate(session.id(), 0, in, inOfs, + inLen, 0, out, (outOfs + k), (outLen - k)); +- } +- // update 'padBuffer' if using our own padding impl. +- if (paddingObj != null) { +- bufferInputBytes(in, inOfs + inLen, newPadBufferLen); +- } +- } +- bytesBuffered += (inLen - k); ++ } else { ++ k = token.p11.C_DecryptUpdate(session.id(), 0, in, inOfs, ++ inLen, 0, out, (outOfs + k), (outLen - k)); ++ } ++ } ++ ++ bufferInputBytes(in, inOfs + inLen, newBlockBufferLen); ++ bytesBufferedInt += (inLen - k); + return k; + } catch (PKCS11Exception e) { + if (e.getErrorCode() == CKR_BUFFER_TOO_SMALL) { +@@ -643,62 +665,65 @@ final class P11Cipher extends CipherSpi + } + + int k = 0; +- if (encrypt) { +- if (inAddr == 0 && inArray == null) { +- inArray = new byte[inLen]; +- inBuffer.get(inArray); +- } else { +- inBuffer.position(origPos + inLen); +- } +- k = token.p11.C_EncryptUpdate(session.id(), +- inAddr, inArray, inOfs, inLen, +- outAddr, outArray, outOfs, outLen); +- } else { +- int newPadBufferLen = 0; +- if (paddingObj != null) { +- if (padBufferLen != 0) { +- // NSS throws up when called with data not in multiple +- // of blocks. Try to work around this by holding the +- // extra data in padBuffer. +- if (padBufferLen != padBuffer.length) { +- int bufCapacity = padBuffer.length - padBufferLen; +- if (inLen > bufCapacity) { +- bufferInputBytes(inBuffer, bufCapacity); +- inOfs += bufCapacity; +- inLen -= bufCapacity; +- } else { +- bufferInputBytes(inBuffer, inLen); +- return 0; +- } +- } +- k = token.p11.C_DecryptUpdate(session.id(), 0, +- padBuffer, 0, padBufferLen, outAddr, outArray, +- outOfs, outLen); +- padBufferLen = 0; +- } +- newPadBufferLen = inLen & (blockSize - 1); +- if (newPadBufferLen == 0) { +- newPadBufferLen = padBuffer.length; +- } +- inLen -= newPadBufferLen; +- } +- if (inLen > 0) { +- if (inAddr == 0 && inArray == null) { +- inArray = new byte[inLen]; +- inBuffer.get(inArray); +- } else { +- inBuffer.position(inBuffer.position() + inLen); +- } +- k += token.p11.C_DecryptUpdate(session.id(), inAddr, +- inArray, inOfs, inLen, outAddr, outArray, +- (outOfs + k), (outLen - k)); +- } +- // update 'padBuffer' if using our own padding impl. +- if (paddingObj != null && newPadBufferLen != 0) { +- bufferInputBytes(inBuffer, newPadBufferLen); +- } +- } +- bytesBuffered += (inLen - k); ++ int newBlockBufferLen = 0; ++ ++ // NSS throws up when called with data not in multiple ++ // of blocks. Try to work around this by holding the ++ // extra data in blockBuffer. ++ if (blockBufferLen != 0) { ++ if (blockBufferLen != blockBuffer.length) { ++ int bufCapacity = blockBuffer.length - blockBufferLen; ++ if (inLen >= bufCapacity) { ++ bufferInputBytes(inBuffer, bufCapacity); ++ inOfs += bufCapacity; ++ inLen -= bufCapacity; ++ } else { ++ bufferInputBytes(inBuffer, inLen); ++ return 0; ++ } ++ } ++ if (encrypt) { ++ k = token.p11.C_EncryptUpdate(session.id(), 0, blockBuffer, 0, ++ blockBufferLen, outAddr, outArray, outOfs, ++ outLen); ++ } else { ++ k = token.p11.C_DecryptUpdate(session.id(), 0, blockBuffer, 0, ++ blockBufferLen, outAddr, outArray, outOfs, ++ outLen); ++ } ++ blockBufferLen = 0; ++ bytesBuffered = 0; ++ } ++ ++ if (inLen == 0) ++ return k; ++ ++ newBlockBufferLen = inLen & (blockSize - 1); ++ if (!encrypt && paddingObj != null && newBlockBufferLen == 0) ++ // Hold the last block in the buffer if we need to unpad ++ newBlockBufferLen = blockBuffer.length; ++ inLen -= newBlockBufferLen; ++ ++ if (inAddr == 0 && inArray == null) { ++ inArray = new byte[inLen]; ++ inBuffer.get(inArray); ++ } else { ++ inBuffer.position(inBuffer.position() + inLen); ++ } ++ ++ if (inLen > 0) { ++ if (encrypt) { ++ k = token.p11.C_EncryptUpdate(session.id(), inAddr, inArray, inOfs, ++ inLen, outAddr, outArray, (outOfs + k), (outLen - k)); ++ } else { ++ k = token.p11.C_DecryptUpdate(session.id(), inAddr, inArray, inOfs, ++ inLen, outAddr, outArray, (outOfs + k), (outLen - k)); ++ } ++ } ++ ++ bufferInputBytes(inBuffer, newBlockBufferLen); ++ bytesBufferedInt += (inLen - k); ++ + if (!(outBuffer instanceof DirectBuffer) && + !outBuffer.hasArray()) { + outBuffer.put(outArray, outOfs, k); +@@ -728,31 +753,42 @@ final class P11Cipher extends CipherSpi + try { + ensureInitialized(); + int k = 0; ++ if (blockBufferLen != 0) { ++ if (encrypt) { ++ k = token.p11.C_EncryptUpdate(session.id(), ++ 0, blockBuffer, 0, blockBufferLen, ++ 0, out, outOfs, outLen); ++ } else { ++ if (paddingObj == null) ++ k = token.p11.C_DecryptUpdate(session.id(), 0, ++ blockBuffer, 0, blockBufferLen, 0, ++ out, outOfs, outLen); ++ else ++ k = token.p11.C_DecryptUpdate(session.id(), 0, ++ blockBuffer, 0, blockBufferLen, 0, ++ padBuffer, 0, padBuffer.length); ++ } ++ } + if (encrypt) { + if (paddingObj != null) { + int actualPadLen = paddingObj.setPaddingBytes(padBuffer, +- requiredOutLen - bytesBuffered); +- k = token.p11.C_EncryptUpdate(session.id(), +- 0, padBuffer, 0, actualPadLen, +- 0, out, outOfs, outLen); ++ requiredOutLen - bytesBufferedInt); ++ k += token.p11.C_EncryptUpdate(session.id(), ++ 0, padBuffer, 0, actualPadLen, ++ 0, out, (outOfs + k), (outLen - k)); + } + k += token.p11.C_EncryptFinal(session.id(), + 0, out, (outOfs + k), (outLen - k)); + } else { + if (paddingObj != null) { +- if (padBufferLen != 0) { +- k = token.p11.C_DecryptUpdate(session.id(), 0, +- padBuffer, 0, padBufferLen, 0, padBuffer, 0, +- padBuffer.length); +- } + k += token.p11.C_DecryptFinal(session.id(), 0, padBuffer, k, + padBuffer.length - k); + int actualPadLen = paddingObj.unpad(padBuffer, k); + k -= actualPadLen; + System.arraycopy(padBuffer, 0, out, outOfs, k); + } else { +- k = token.p11.C_DecryptFinal(session.id(), 0, out, outOfs, +- outLen); ++ k += token.p11.C_DecryptFinal(session.id(), 0, out, (outOfs + k), ++ (outLen - k)); + } + } + return k; +@@ -793,6 +829,23 @@ final class P11Cipher extends CipherSpi + + int k = 0; + ++ if (blockBufferLen != 0) { ++ if (encrypt) { ++ k = token.p11.C_EncryptUpdate(session.id(), ++ 0, blockBuffer, 0, blockBufferLen, ++ outAddr, outArray, outOfs, outLen); ++ } else { ++ if (paddingObj == null) ++ k = token.p11.C_DecryptUpdate(session.id(), 0, ++ blockBuffer, 0, blockBufferLen, outAddr, ++ outArray, outOfs, outLen); ++ else ++ k = token.p11.C_DecryptUpdate(session.id(), 0, ++ blockBuffer, 0, blockBufferLen, 0, ++ padBuffer, 0, padBuffer.length); ++ } ++ } ++ + if (encrypt) { + if (paddingObj != null) { + int actualPadLen = paddingObj.setPaddingBytes(padBuffer, +@@ -805,12 +858,6 @@ final class P11Cipher extends CipherSpi + outAddr, outArray, (outOfs + k), (outLen - k)); + } else { + if (paddingObj != null) { +- if (padBufferLen != 0) { +- k = token.p11.C_DecryptUpdate(session.id(), +- 0, padBuffer, 0, padBufferLen, +- 0, padBuffer, 0, padBuffer.length); +- padBufferLen = 0; +- } + k += token.p11.C_DecryptFinal(session.id(), + 0, padBuffer, k, padBuffer.length - k); + int actualPadLen = paddingObj.unpad(padBuffer, k); +@@ -819,7 +866,8 @@ final class P11Cipher extends CipherSpi + outOfs = 0; + } else { + k = token.p11.C_DecryptFinal(session.id(), +- outAddr, outArray, outOfs, outLen); ++ outAddr, outArray, ++ (outOfs + k), (outLen - k)); + } + } + if ((!encrypt && paddingObj != null) || +@@ -875,14 +923,14 @@ final class P11Cipher extends CipherSpi + } + + private final void bufferInputBytes(byte[] in, int inOfs, int len) { +- System.arraycopy(in, inOfs, padBuffer, padBufferLen, len); +- padBufferLen += len; ++ System.arraycopy(in, inOfs, blockBuffer, blockBufferLen, len); ++ blockBufferLen += len; + bytesBuffered += len; + } + + private final void bufferInputBytes(ByteBuffer inBuffer, int len) { +- inBuffer.get(padBuffer, padBufferLen, len); +- padBufferLen += len; ++ inBuffer.get(blockBuffer, blockBufferLen, len); ++ blockBufferLen += len; + bytesBuffered += len; + } + } diff --git a/SOURCES/java-1.7.0-openjdk-aes-update_reset.patch b/SOURCES/java-1.7.0-openjdk-aes-update_reset.patch new file mode 100644 index 0000000..41753bb --- /dev/null +++ b/SOURCES/java-1.7.0-openjdk-aes-update_reset.patch @@ -0,0 +1,134 @@ +diff --git a/src/share/classes/sun/security/pkcs11/P11Cipher.java b/src/share/classes/sun/security/pkcs11/P11Cipher.java +--- openjdk/jdk/src/share/classes/sun/security/pkcs11/P11Cipher.java ++++ openjdk/jdk/src/share/classes/sun/security/pkcs11/P11Cipher.java +@@ -412,7 +412,8 @@ + token.p11.C_DecryptFinal(session.id(), 0, buffer, 0, bufLen); + } + } catch (PKCS11Exception e) { +- throw new ProviderException("Cancel failed", e); ++ if (e.getErrorCode() != CKR_OPERATION_NOT_INITIALIZED) ++ throw new ProviderException("Cancel failed", e); + } finally { + reset(); + } +@@ -747,6 +748,9 @@ + throws ShortBufferException, IllegalBlockSizeException, + BadPaddingException { + int requiredOutLen = doFinalLength(0); ++ boolean updating = false; ++ PKCS11Exception err = null; ++ + if (outLen < requiredOutLen) { + throw new ShortBufferException(); + } +@@ -754,6 +758,7 @@ + ensureInitialized(); + int k = 0; + if (blockBufferLen != 0) { ++ updating = true; + if (encrypt) { + k = token.p11.C_EncryptUpdate(session.id(), + 0, blockBuffer, 0, blockBufferLen, +@@ -768,14 +773,17 @@ + blockBuffer, 0, blockBufferLen, 0, + padBuffer, 0, padBuffer.length); + } ++ updating = false; + } + if (encrypt) { + if (paddingObj != null) { + int actualPadLen = paddingObj.setPaddingBytes(padBuffer, + requiredOutLen - bytesBufferedInt); ++ updating = true; + k += token.p11.C_EncryptUpdate(session.id(), + 0, padBuffer, 0, actualPadLen, + 0, out, (outOfs + k), (outLen - k)); ++ updating = false; + } + k += token.p11.C_EncryptFinal(session.id(), + 0, out, (outOfs + k), (outLen - k)); +@@ -793,10 +801,22 @@ + } + return k; + } catch (PKCS11Exception e) { ++ err = e; + handleException(e); + throw new ProviderException("doFinal() failed", e); + } finally { +- reset(); ++ if (err != null) { ++ if (err.getErrorCode() != CKR_BUFFER_TOO_SMALL) { ++ if (updating) ++ // Work around NSS not cancelling the ++ // operation on an error in update ++ cancelOperation(); ++ else ++ reset(); ++ } ++ } else { ++ reset(); ++ } + } + } + +@@ -805,6 +825,9 @@ + BadPaddingException { + int outLen = outBuffer.remaining(); + int requiredOutLen = doFinalLength(0); ++ boolean updating = false; ++ PKCS11Exception err = null; ++ + if (outLen < requiredOutLen) { + throw new ShortBufferException(); + } +@@ -830,6 +853,7 @@ + int k = 0; + + if (blockBufferLen != 0) { ++ updating = true; + if (encrypt) { + k = token.p11.C_EncryptUpdate(session.id(), + 0, blockBuffer, 0, blockBufferLen, +@@ -844,15 +868,18 @@ + blockBuffer, 0, blockBufferLen, 0, + padBuffer, 0, padBuffer.length); + } ++ updating = false; + } + + if (encrypt) { + if (paddingObj != null) { + int actualPadLen = paddingObj.setPaddingBytes(padBuffer, + requiredOutLen - bytesBuffered); ++ updating = true; + k = token.p11.C_EncryptUpdate(session.id(), + 0, padBuffer, 0, actualPadLen, + outAddr, outArray, outOfs, outLen); ++ updating = false; + } + k += token.p11.C_EncryptFinal(session.id(), + outAddr, outArray, (outOfs + k), (outLen - k)); +@@ -879,10 +906,22 @@ + } + return k; + } catch (PKCS11Exception e) { ++ err = e; + handleException(e); + throw new ProviderException("doFinal() failed", e); + } finally { +- reset(); ++ if (err != null) { ++ if (err.getErrorCode() != CKR_BUFFER_TOO_SMALL) { ++ if (updating) ++ // Work around NSS not cancelling the ++ // operation on an error in update ++ cancelOperation(); ++ else ++ reset(); ++ } ++ } else { ++ reset(); ++ } + } + } + diff --git a/SOURCES/java-1.7.0-openjdk-debugdocs.patch b/SOURCES/java-1.7.0-openjdk-debugdocs.patch new file mode 100644 index 0000000..dbfebb2 --- /dev/null +++ b/SOURCES/java-1.7.0-openjdk-debugdocs.patch @@ -0,0 +1,12 @@ +--- oldMakefile 2008-07-02 17:48:01.000000000 -0400 ++++ openjdk/Makefile 2008-07-02 17:48:09.000000000 -0400 +@@ -176,8 +176,7 @@ + + COMMON_DEBUG_FLAGS= \ + DEBUG_NAME=$(DEBUG_NAME) \ +- ALT_OUTPUTDIR=$(_OUTPUTDIR)-$(DEBUG_NAME) \ +- NO_DOCS=true ++ ALT_OUTPUTDIR=$(_OUTPUTDIR)-$(DEBUG_NAME) + + product_build: setup + @$(ECHO) $@ build started: `$(DATE) '+%y-%m-%d %H:%M'` diff --git a/SOURCES/java-1.7.0-openjdk-debuginfo.patch b/SOURCES/java-1.7.0-openjdk-debuginfo.patch new file mode 100644 index 0000000..263d59e --- /dev/null +++ b/SOURCES/java-1.7.0-openjdk-debuginfo.patch @@ -0,0 +1,20 @@ +--- openjdk/hotspot/build/linux/makefiles/saproc.make_back 2009-12-14 13:35:46.000000000 +0100 ++++ openjdk/hotspot/make/linux/makefiles/saproc.make 2009-12-14 13:36:47.000000000 +0100 +@@ -67,6 +67,7 @@ + -I$(BOOT_JAVA_HOME)/include/$(Platform_os_family) \ + $(SASRCFILES) \ + $(SA_LFLAGS) \ ++ -g \ + -o $@ \ + -lthread_db + +--- openjdk/hotspot/build/linux/makefiles/jsig.make_back 2009-12-14 13:34:56.000000000 +0100 ++++ openjdk/hotspot/make/linux/makefiles/jsig.make 2009-12-14 13:35:31.000000000 +0100 +@@ -44,6 +44,7 @@ + $(LIBJSIG): $(JSIGSRCDIR)/jsig.c $(LIBJSIG_MAPFILE) + @echo Making signal interposition lib... + $(QUIETLY) $(CC) $(SYMFLAG) $(ARCHFLAG) $(SHARED_FLAG) $(PICFLAG) \ ++ -g \ + $(LFLAGS_JSIG) -o $@ $< -ldl + + install_jsig: $(LIBJSIG) diff --git a/SOURCES/java-1.7.0-openjdk-freetype-check-fix.patch b/SOURCES/java-1.7.0-openjdk-freetype-check-fix.patch new file mode 100644 index 0000000..15c2d67 --- /dev/null +++ b/SOURCES/java-1.7.0-openjdk-freetype-check-fix.patch @@ -0,0 +1,22 @@ +diff -up openjdk/jdk/make/common/shared/Sanity.gmk.sav openjdk/jdk/make/common/shared/Sanity.gmk +--- openjdk/jdk/make/common/shared/Sanity.gmk.sav 2012-02-14 16:12:48.000000000 -0500 ++++ openjdk/jdk/make/common/shared/Sanity.gmk 2012-03-07 17:31:26.153840755 -0500 +@@ -814,12 +814,12 @@ ifdef OPENJDK + @(($(CD) $(BUILDDIR)/tools/freetypecheck && $(MAKE)) || \ + $(ECHO) "Failed to build freetypecheck." ) > $@ + +- sane-freetype: $(TEMPDIR)/freetypeinfo +- @if [ "`$(CAT) $< | $(GREP) Fail`" != "" ]; then \ +- $(ECHO) "ERROR: FreeType version " $(REQUIRED_FREETYPE_VERSION) \ +- " or higher is required. \n" \ +- "`$(CAT) $<` \n" >> $(ERROR_FILE) ; \ +- fi ++# sane-freetype: $(TEMPDIR)/freetypeinfo ++# @if [ "`$(CAT) $< | $(GREP) Fail`" != "" ]; then \ ++# $(ECHO) "ERROR: FreeType version " $(REQUIRED_FREETYPE_VERSION) \ ++# " or higher is required. \n" \ ++# "`$(CAT) $<` \n" >> $(ERROR_FILE) ; \ ++# fi + else + #do nothing (cross-compiling) + sane-freetype: diff --git a/SOURCES/java-1.7.0-openjdk-java-access-bridge-security.patch b/SOURCES/java-1.7.0-openjdk-java-access-bridge-security.patch new file mode 100644 index 0000000..6b4224b --- /dev/null +++ b/SOURCES/java-1.7.0-openjdk-java-access-bridge-security.patch @@ -0,0 +1,24 @@ +--- openjdk/jdk/src/share/lib/security/java.security-linux.orig ++++ openjdk/jdk/src/share/lib/security/java.security-linux +@@ -154,7 +154,9 @@ + com.sun.org.apache.xml.internal.security.,\ + com.sun.org.glassfish.,\ + org.jcp.xml.dsig.internal.,\ +- oracle.jrockit.jfr. ++ oracle.jrockit.jfr.,\ ++ org.GNOME.Accessibility.,\ ++ org.GNOME.Bonobo. + # + # List of comma-separated packages that start with or equal this string + # will cause a security exception to be thrown when +@@ -192,7 +194,9 @@ + com.sun.org.apache.xml.internal.security.,\ + com.sun.org.glassfish.,\ + org.jcp.xml.dsig.internal.,\ +- oracle.jrockit.jfr. ++ oracle.jrockit.jfr.,\ ++ org.GNOME.Accessibility.,\ ++ org.GNOME.Bonobo. + # + # Determines whether this properties file can be appended to + # or overridden on the command line via -Djava.security.properties diff --git a/SOURCES/java-1.7.0-openjdk-java-access-bridge-tck.patch b/SOURCES/java-1.7.0-openjdk-java-access-bridge-tck.patch new file mode 100644 index 0000000..36a23c0 --- /dev/null +++ b/SOURCES/java-1.7.0-openjdk-java-access-bridge-tck.patch @@ -0,0 +1,25 @@ +--- java-access-bridge-1.22.0/bridge/org/GNOME/Accessibility/JavaBridge.java.orig 2008-05-22 11:27:00.000000000 -0400 ++++ java-access-bridge-1.22.0/bridge/org/GNOME/Accessibility/JavaBridge.java 2008-05-22 11:28:02.000000000 -0400 +@@ -34,6 +34,9 @@ + import javax.accessibility.AccessibleRole; + import javax.accessibility.AccessibleText; + import javax.accessibility.AccessibleEditableText; ++import java.security.PrivilegedAction; ++import java.security.AccessController; ++ + + public class JavaBridge { + +@@ -332,7 +335,11 @@ + System.err.println ("Java Accessibility Bridge for GNOME loaded.\n"); + + // Not sure what kind of arguments should be sent to ORB +- String vm_rev = System.getProperty("java.version"); ++ String vm_rev = (String) AccessController.doPrivileged(new PrivilegedAction() { ++ public java.lang.Object run() { ++ return System.getProperty("java.version"); ++ } ++ }); + + if (vm_rev.compareTo("1.4.0") < 0) { + System.err.println("WARNING: Java Accessibility Bridge " + diff --git a/SOURCES/java-1.7.0-openjdk-nss-config-1.patch b/SOURCES/java-1.7.0-openjdk-nss-config-1.patch new file mode 100644 index 0000000..96d7744 --- /dev/null +++ b/SOURCES/java-1.7.0-openjdk-nss-config-1.patch @@ -0,0 +1,12 @@ +diff -Nru openjdk.orig/jdk/src/share/lib/security/java.security-linux openjdk/jdk/src/share/lib/security/java.security-linux +--- openjdk.orig/jdk/src/share/lib/security/java.security-linux 2011-09-22 01:56:22.000000000 +0100 ++++ openjdk/jdk/src/share/lib/security/java.security-linux 2011-09-22 13:51:56.234039451 +0100 +@@ -55,7 +55,7 @@ + # the NSS security provider was not enabled for this build; it can be enabled + # if NSS (libnss3) is available on the machine. The nss.cfg file may need + # editing to reflect the location of the NSS installation. +-#security.provider.10=sun.security.pkcs11.SunPKCS11 ${java.home}/lib/security/nss.cfg ++security.provider.10=sun.security.pkcs11.SunPKCS11 ${java.home}/lib/security/nss.cfg + + # + # Select the source of seed data for SecureRandom. By default an diff --git a/SOURCES/java-1.7.0-openjdk-nss-config-2.patch b/SOURCES/java-1.7.0-openjdk-nss-config-2.patch new file mode 100644 index 0000000..a763a17 --- /dev/null +++ b/SOURCES/java-1.7.0-openjdk-nss-config-2.patch @@ -0,0 +1,32 @@ +--- java.security 2011-09-22 01:56:22.000000000 +0100 ++++ java.security 2011-09-22 13:51:56.234039451 +0100 +@@ -43,19 +43,19 @@ + # + # List of providers and their preference orders (see above): + # +-security.provider.1=sun.security.provider.Sun +-security.provider.2=sun.security.rsa.SunRsaSign +-security.provider.3=sun.security.ec.SunEC +-security.provider.4=com.sun.net.ssl.internal.ssl.Provider +-security.provider.5=com.sun.crypto.provider.SunJCE +-security.provider.6=sun.security.jgss.SunProvider +-security.provider.7=com.sun.security.sasl.Provider +-security.provider.8=org.jcp.xml.dsig.internal.dom.XMLDSigRI +-security.provider.9=sun.security.smartcardio.SunPCSC ++security.provider.1=sun.security.pkcs11.SunPKCS11 ${java.home}/lib/security/nss.cfg ++security.provider.2=sun.security.provider.Sun ++security.provider.3=sun.security.rsa.SunRsaSign ++security.provider.4=sun.security.ec.SunEC ++security.provider.5=com.sun.net.ssl.internal.ssl.Provider ++security.provider.6=com.sun.crypto.provider.SunJCE ++security.provider.7=sun.security.jgss.SunProvider ++security.provider.8=com.sun.security.sasl.Provider ++security.provider.9=org.jcp.xml.dsig.internal.dom.XMLDSigRI ++security.provider.10=sun.security.smartcardio.SunPCSC + # the NSS security provider was not enabled for this build; it can be enabled + # if NSS (libnss3) is available on the machine. The nss.cfg file may need + # editing to reflect the location of the NSS installation. +-security.provider.10=sun.security.pkcs11.SunPKCS11 ${java.home}/lib/security/nss.cfg + + # + # Select the source of seed data for SecureRandom. By default an diff --git a/SOURCES/java-1.7.0-openjdk-nss-split_results.patch b/SOURCES/java-1.7.0-openjdk-nss-split_results.patch new file mode 100644 index 0000000..e4f7643 --- /dev/null +++ b/SOURCES/java-1.7.0-openjdk-nss-split_results.patch @@ -0,0 +1,142 @@ +diff --git a/src/share/classes/sun/security/pkcs11/P11Cipher.java b/src/share/classes/sun/security/pkcs11/P11Cipher.java +--- openjdk/jdk/src/share/classes/sun/security/pkcs11/P11Cipher.java ++++ openjdk/jdk/src/share/classes/sun/security/pkcs11/P11Cipher.java +@@ -560,7 +560,8 @@ + } + try { + ensureInitialized(); +- int k = 0; ++ int bufRes = 0; ++ int inRes = 0; + int newBlockBufferLen = 0; + + // NSS throws up when called with data not in multiple +@@ -579,21 +580,21 @@ + } + } + if (encrypt) { +- k = token.p11.C_EncryptUpdate(session.id(), 0, blockBuffer, 0, +- blockBufferLen, 0, out, outOfs, +- outLen); ++ bufRes = token.p11.C_EncryptUpdate(session.id(), 0, blockBuffer, 0, ++ blockBufferLen, 0, out, outOfs, ++ outLen); + } else { +- k = token.p11.C_DecryptUpdate(session.id(), 0, blockBuffer, 0, +- blockBufferLen, 0, out, outOfs, +- outLen); ++ bufRes = token.p11.C_DecryptUpdate(session.id(), 0, blockBuffer, 0, ++ blockBufferLen, 0, out, outOfs, ++ outLen); + } +- bytesBufferedInt += (blockBufferLen - k); ++ bytesBufferedInt += (blockBufferLen - bufRes); + blockBufferLen = 0; + bytesBuffered = 0; + } + + if (inLen == 0) +- return k; ++ return bufRes; + + if (blockBuffer != null) { + newBlockBufferLen = inLen & (blockSize - 1); +@@ -606,16 +607,18 @@ + + if (inLen > 0) { + if (encrypt) { +- k = token.p11.C_EncryptUpdate(session.id(), 0, in, inOfs, +- inLen, 0, out, (outOfs + k), (outLen - k)); ++ inRes = token.p11.C_EncryptUpdate(session.id(), 0, in, inOfs, ++ inLen, 0, out, (outOfs + bufRes), ++ (outLen - bufRes)); + } else { +- k = token.p11.C_DecryptUpdate(session.id(), 0, in, inOfs, +- inLen, 0, out, (outOfs + k), (outLen - k)); ++ inRes = token.p11.C_DecryptUpdate(session.id(), 0, in, inOfs, ++ inLen, 0, out, (outOfs + bufRes), ++ (outLen - bufRes)); + } +- bytesBufferedInt += (inLen - k); ++ bytesBufferedInt += (inLen - inRes); + } + +- return k; ++ return inRes + bufRes; + } catch (PKCS11Exception e) { + if (e.getErrorCode() == CKR_BUFFER_TOO_SMALL) { + throw (ShortBufferException) +@@ -668,7 +671,8 @@ + } + } + +- int k = 0; ++ int bufRes = 0; ++ int inRes = 0; + int newBlockBufferLen = 0; + + // NSS throws up when called with data not in multiple +@@ -687,21 +691,21 @@ + } + } + if (encrypt) { +- k = token.p11.C_EncryptUpdate(session.id(), 0, blockBuffer, 0, +- blockBufferLen, outAddr, outArray, outOfs, +- outLen); ++ bufRes = token.p11.C_EncryptUpdate(session.id(), 0, blockBuffer, 0, ++ blockBufferLen, outAddr, outArray, outOfs, ++ outLen); + } else { +- k = token.p11.C_DecryptUpdate(session.id(), 0, blockBuffer, 0, +- blockBufferLen, outAddr, outArray, outOfs, +- outLen); ++ bufRes = token.p11.C_DecryptUpdate(session.id(), 0, blockBuffer, 0, ++ blockBufferLen, outAddr, outArray, outOfs, ++ outLen); + } +- bytesBufferedInt += (blockBufferLen - k); ++ bytesBufferedInt += (blockBufferLen - bufRes); + blockBufferLen = 0; + bytesBuffered = 0; + } + + if (inLen == 0) +- return k; ++ return bufRes; + + if (blockBuffer != null) { + newBlockBufferLen = inLen & (blockSize - 1); +@@ -721,22 +725,25 @@ + + if (inLen > 0) { + if (encrypt) { +- k = token.p11.C_EncryptUpdate(session.id(), inAddr, inArray, inOfs, +- inLen, outAddr, outArray, (outOfs + k), (outLen - k)); ++ inRes = token.p11.C_EncryptUpdate(session.id(), inAddr, inArray, inOfs, ++ inLen, outAddr, outArray, (outOfs + bufRes), ++ (outLen - bufRes)); + } else { +- k = token.p11.C_DecryptUpdate(session.id(), inAddr, inArray, inOfs, +- inLen, outAddr, outArray, (outOfs + k), (outLen - k)); ++ inRes = token.p11.C_DecryptUpdate(session.id(), inAddr, inArray, inOfs, ++ inLen, outAddr, outArray, (outOfs + bufRes), ++ (outLen - bufRes)); + } +- bytesBufferedInt += (inLen - k); ++ bytesBufferedInt += (inLen - inRes); + } + ++ int total = inRes + bufRes; + if (!(outBuffer instanceof DirectBuffer) && + !outBuffer.hasArray()) { +- outBuffer.put(outArray, outOfs, k); ++ outBuffer.put(outArray, outOfs, total); + } else { +- outBuffer.position(outBuffer.position() + k); ++ outBuffer.position(outBuffer.position() + total); + } +- return k; ++ return total; + } catch (PKCS11Exception e) { + // Reset input buffer to its original position for + inBuffer.position(origPos); diff --git a/SOURCES/java-1.7.0-openjdk-nss-tck.patch b/SOURCES/java-1.7.0-openjdk-nss-tck.patch new file mode 100644 index 0000000..56b6572 --- /dev/null +++ b/SOURCES/java-1.7.0-openjdk-nss-tck.patch @@ -0,0 +1,210 @@ +diff --git a/src/share/classes/sun/security/pkcs11/P11Cipher.java b/src/share/classes/sun/security/pkcs11/P11Cipher.java +--- openjdk/jdk/src/share/classes/sun/security/pkcs11/P11Cipher.java ++++ openjdk/jdk/src/share/classes/sun/security/pkcs11/P11Cipher.java +@@ -69,7 +69,7 @@ + private static interface Padding { + // ENC: format the specified buffer with padding bytes and return the + // actual padding length +- int setPaddingBytes(byte[] paddingBuffer, int padLen); ++ int setPaddingBytes(byte[] paddingBuffer, int offset, int padLen); + + // DEC: return the length of trailing padding bytes given the specified + // padded data +@@ -90,8 +90,8 @@ + this.blockSize = blockSize; + } + +- public int setPaddingBytes(byte[] paddingBuffer, int padLen) { +- Arrays.fill(paddingBuffer, 0, padLen, (byte) (padLen & 0x007f)); ++ public int setPaddingBytes(byte[] paddingBuffer, int offset, int padLen) { ++ Arrays.fill(paddingBuffer, offset, offset + padLen, (byte) (padLen & 0x007f)); + return padLen; + } + +@@ -587,6 +587,7 @@ + blockBufferLen, 0, out, outOfs, + outLen); + } ++ bytesBufferedInt += (blockBufferLen - k); + blockBufferLen = 0; + bytesBuffered = 0; + } +@@ -594,11 +595,14 @@ + if (inLen == 0) + return k; + +- newBlockBufferLen = inLen & (blockSize - 1); +- if (!encrypt && paddingObj != null && newBlockBufferLen == 0) +- // Hold the last block in the buffer if we need to unpad +- newBlockBufferLen = blockBuffer.length; +- inLen -= newBlockBufferLen; ++ if (blockBuffer != null) { ++ newBlockBufferLen = inLen & (blockSize - 1); ++ if (!encrypt && paddingObj != null && newBlockBufferLen == 0) ++ // Hold the last block in the buffer if we need to unpad ++ newBlockBufferLen = blockBuffer.length; ++ inLen -= newBlockBufferLen; ++ bufferInputBytes(in, inOfs + inLen, newBlockBufferLen); ++ } + + if (inLen > 0) { + if (encrypt) { +@@ -608,10 +612,9 @@ + k = token.p11.C_DecryptUpdate(session.id(), 0, in, inOfs, + inLen, 0, out, (outOfs + k), (outLen - k)); + } ++ bytesBufferedInt += (inLen - k); + } + +- bufferInputBytes(in, inOfs + inLen, newBlockBufferLen); +- bytesBufferedInt += (inLen - k); + return k; + } catch (PKCS11Exception e) { + if (e.getErrorCode() == CKR_BUFFER_TOO_SMALL) { +@@ -692,6 +695,7 @@ + blockBufferLen, outAddr, outArray, outOfs, + outLen); + } ++ bytesBufferedInt += (blockBufferLen - k); + blockBufferLen = 0; + bytesBuffered = 0; + } +@@ -699,11 +703,14 @@ + if (inLen == 0) + return k; + +- newBlockBufferLen = inLen & (blockSize - 1); +- if (!encrypt && paddingObj != null && newBlockBufferLen == 0) +- // Hold the last block in the buffer if we need to unpad +- newBlockBufferLen = blockBuffer.length; +- inLen -= newBlockBufferLen; ++ if (blockBuffer != null) { ++ newBlockBufferLen = inLen & (blockSize - 1); ++ if (!encrypt && paddingObj != null && newBlockBufferLen == 0) ++ // Hold the last block in the buffer if we need to unpad ++ newBlockBufferLen = blockBuffer.length; ++ inLen -= newBlockBufferLen; ++ bufferInputBytes(inBuffer, newBlockBufferLen); ++ } + + if (inAddr == 0 && inArray == null) { + inArray = new byte[inLen]; +@@ -720,11 +727,9 @@ + k = token.p11.C_DecryptUpdate(session.id(), inAddr, inArray, inOfs, + inLen, outAddr, outArray, (outOfs + k), (outLen - k)); + } ++ bytesBufferedInt += (inLen - k); + } + +- bufferInputBytes(inBuffer, newBlockBufferLen); +- bytesBufferedInt += (inLen - k); +- + if (!(outBuffer instanceof DirectBuffer) && + !outBuffer.hasArray()) { + outBuffer.put(outArray, outOfs, k); +@@ -757,13 +762,22 @@ + try { + ensureInitialized(); + int k = 0; +- if (blockBufferLen != 0) { ++ if (encrypt) { ++ // Do we need to pad? ++ if (paddingObj != null) { ++ int actualPadLen = paddingObj.setPaddingBytes(blockBuffer, ++ blockBufferLen, blockSize - blockBufferLen); ++ blockBufferLen = blockSize; ++ } + updating = true; +- if (encrypt) { +- k = token.p11.C_EncryptUpdate(session.id(), +- 0, blockBuffer, 0, blockBufferLen, +- 0, out, outOfs, outLen); +- } else { ++ k = token.p11.C_EncryptUpdate(session.id(), ++ 0, blockBuffer, 0, blockBufferLen, ++ 0, out, outOfs, outLen); ++ updating = false; ++ k += token.p11.C_EncryptFinal(session.id(), ++ 0, out, (outOfs + k), (outLen - k)); ++ } else { ++ if (blockBufferLen != 0) { + if (paddingObj == null) + k = token.p11.C_DecryptUpdate(session.id(), 0, + blockBuffer, 0, blockBufferLen, 0, +@@ -773,21 +787,6 @@ + blockBuffer, 0, blockBufferLen, 0, + padBuffer, 0, padBuffer.length); + } +- updating = false; +- } +- if (encrypt) { +- if (paddingObj != null) { +- int actualPadLen = paddingObj.setPaddingBytes(padBuffer, +- requiredOutLen - bytesBufferedInt); +- updating = true; +- k += token.p11.C_EncryptUpdate(session.id(), +- 0, padBuffer, 0, actualPadLen, +- 0, out, (outOfs + k), (outLen - k)); +- updating = false; +- } +- k += token.p11.C_EncryptFinal(session.id(), +- 0, out, (outOfs + k), (outLen - k)); +- } else { + if (paddingObj != null) { + k += token.p11.C_DecryptFinal(session.id(), 0, padBuffer, k, + padBuffer.length - k); +@@ -852,38 +851,31 @@ + + int k = 0; + +- if (blockBufferLen != 0) { ++ if (encrypt) { ++ // Do we need to pad? ++ if (paddingObj != null) { ++ int actualPadLen = paddingObj.setPaddingBytes(blockBuffer, ++ blockBufferLen, blockSize - blockBufferLen); ++ blockBufferLen = blockSize; ++ } + updating = true; +- if (encrypt) { +- k = token.p11.C_EncryptUpdate(session.id(), ++ k = token.p11.C_EncryptUpdate(session.id(), + 0, blockBuffer, 0, blockBufferLen, + outAddr, outArray, outOfs, outLen); ++ updating = false; ++ k += token.p11.C_EncryptFinal(session.id(), ++ outAddr, outArray, (outOfs + k), (outLen - k)); ++ } else { ++ if (blockBufferLen != 0) { ++ k = token.p11.C_DecryptUpdate(session.id(), 0, ++ blockBuffer, 0, blockBufferLen, outAddr, ++ outArray, outOfs, outLen); + } else { +- if (paddingObj == null) +- k = token.p11.C_DecryptUpdate(session.id(), 0, +- blockBuffer, 0, blockBufferLen, outAddr, +- outArray, outOfs, outLen); +- else + k = token.p11.C_DecryptUpdate(session.id(), 0, + blockBuffer, 0, blockBufferLen, 0, + padBuffer, 0, padBuffer.length); + } +- updating = false; +- } + +- if (encrypt) { +- if (paddingObj != null) { +- int actualPadLen = paddingObj.setPaddingBytes(padBuffer, +- requiredOutLen - bytesBuffered); +- updating = true; +- k = token.p11.C_EncryptUpdate(session.id(), +- 0, padBuffer, 0, actualPadLen, +- outAddr, outArray, outOfs, outLen); +- updating = false; +- } +- k += token.p11.C_EncryptFinal(session.id(), +- outAddr, outArray, (outOfs + k), (outLen - k)); +- } else { + if (paddingObj != null) { + k += token.p11.C_DecryptFinal(session.id(), + 0, padBuffer, k, padBuffer.length - k); diff --git a/SOURCES/java-1.7.0-openjdk-ppc-zero-hotspot.patch b/SOURCES/java-1.7.0-openjdk-ppc-zero-hotspot.patch new file mode 100644 index 0000000..7b6195b --- /dev/null +++ b/SOURCES/java-1.7.0-openjdk-ppc-zero-hotspot.patch @@ -0,0 +1,14 @@ +--- openjdk/hotspot/src/os_cpu/linux_zero/vm/globals_linux_zero.hpp 2012-03-23 10:57:01.000000000 -0400 ++++ openjdk/hotspot/src/os_cpu/linux_zero/vm/globals_linux_zero.hpp 2012-03-23 10:57:00.000000000 -0400 +@@ -34,9 +34,9 @@ + define_pd_global(bool, DontYieldALot, false); + define_pd_global(intx, ThreadStackSize, 1664); + #ifdef _LP64 +-define_pd_global(intx, VMThreadStackSize, 1024); ++define_pd_global(intx, VMThreadStackSize, 1664); + #else +-define_pd_global(intx, VMThreadStackSize, 512); ++define_pd_global(intx, VMThreadStackSize, 1152); + #endif // _LP64 + define_pd_global(intx, CompilerThreadStackSize, 0); + define_pd_global(uintx, JVMInvokeMethodSlack, 8192); diff --git a/SOURCES/java-1.7.0-openjdk-ppc-zero-jdk.patch b/SOURCES/java-1.7.0-openjdk-ppc-zero-jdk.patch new file mode 100644 index 0000000..6dfcbd5 --- /dev/null +++ b/SOURCES/java-1.7.0-openjdk-ppc-zero-jdk.patch @@ -0,0 +1,23 @@ +--- openjdk/jdk/make/common/shared/Defs-java.gmk 2012-03-23 10:56:45.000000000 -0400 ++++ openjdk/jdk/make/common/shared/Defs-java.gmk 2012-03-23 10:56:45.000000000 -0400 +@@ -88,7 +88,7 @@ + + # 64-bit builds require a larger thread stack size. + ifeq ($(ARCH_DATA_MODEL), 32) +- JAVAC_JVM_FLAGS += -J-XX:ThreadStackSize=768 ++ JAVAC_JVM_FLAGS += -J-XX:ThreadStackSize=1152 + else + JAVAC_JVM_FLAGS += -J-XX:ThreadStackSize=1664 + endif +diff -up openjdk/corba/make/common/shared/Defs-java.gmk.ppc openjdk/corba/make/common/shared/Defs-java.gmk +--- openjdk/corba/make/common/shared/Defs-java.gmk.ppc 2012-03-24 11:44:34.450072733 +0100 ++++ openjdk/corba/make/common/shared/Defs-java.gmk 2012-03-24 11:44:53.300073137 +0100 +@@ -79,7 +79,7 @@ + + # 64-bit builds require a larger thread stack size. + ifeq ($(ARCH_DATA_MODEL), 32) +- JAVAC_JVM_FLAGS += -J-XX:ThreadStackSize=768 ++ JAVAC_JVM_FLAGS += -J-XX:ThreadStackSize=1152 + else + JAVAC_JVM_FLAGS += -J-XX:ThreadStackSize=1664 + endif diff --git a/SOURCES/java-abrt-luncher b/SOURCES/java-abrt-luncher new file mode 100644 index 0000000..681ef43 --- /dev/null +++ b/SOURCES/java-abrt-luncher @@ -0,0 +1,7 @@ +#!/bin/bash +if [ -e @LIB_DIR@ ] ; then + exec -a java @JAVA_PATH@ -agentpath:@LIB_DIR@=abrt=on "$@" +else + exec -a java @JAVA_PATH@ "$@" +fi + diff --git a/SOURCES/jconsole.desktop b/SOURCES/jconsole.desktop new file mode 100644 index 0000000..f7904c6 --- /dev/null +++ b/SOURCES/jconsole.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Name=OpenJDK Monitoring & Management Console #ARCH# +Comment=Monitor and manage OpenJDK applications for #ARCH# +Exec=/usr/bin/jconsole +Icon=java-1.7.0 +Terminal=false +Type=Application +StartupWMClass=sun-tools-jconsole-JConsole +Categories=Development;Monitor;Java; +Version=1.0 diff --git a/SOURCES/nss.cfg b/SOURCES/nss.cfg new file mode 100644 index 0000000..377a39c --- /dev/null +++ b/SOURCES/nss.cfg @@ -0,0 +1,5 @@ +name = NSS +nssLibraryDirectory = @NSS_LIBDIR@ +nssDbMode = noDb +attributes = compatibility +handleStartupErrors = ignoreMultipleInitialisation diff --git a/SOURCES/policytool.desktop b/SOURCES/policytool.desktop new file mode 100644 index 0000000..b0841b3 --- /dev/null +++ b/SOURCES/policytool.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Name=OpenJDK Policy Tool #ARCH# +Comment=Manage OpenJDK policy files for #ARCH# +Exec=/usr/bin/policytool +Icon=java-1.7.0 +Terminal=false +Type=Application +StartupWMClass=sun-security-tools-PolicyTool +Categories=Development;Java; +Version=1.0 diff --git a/SOURCES/pulse-soundproperties.patch b/SOURCES/pulse-soundproperties.patch new file mode 100644 index 0000000..271a323 --- /dev/null +++ b/SOURCES/pulse-soundproperties.patch @@ -0,0 +1,16 @@ +--- openjdk/jdk/src/share/lib/sound.properties 2008-08-28 04:15:18.000000000 -0400 ++++ openjdk/jdk/src/share/lib/sound.properties 2008-10-03 16:59:21.000000000 -0400 +@@ -37,3 +37,13 @@ + # Specify the default Receiver by provider and name: + # javax.sound.midi.Receiver=com.sun.media.sound.MidiProvider#SunMIDI1 + # ++ ++# javax.sound.sampled.Clip=org.classpath.icedtea.pulseaudio.PulseAudioMixerProvider ++# javax.sound.sampled.Port=org.classpath.icedtea.pulseaudio.PulseAudioMixerProvider ++# javax.sound.sampled.SourceDataLine=org.classpath.icedtea.pulseaudio.PulseAudioMixerProvider ++# javax.sound.sampled.TargetDataLine=org.classpath.icedtea.pulseaudio.PulseAudioMixerProvider ++ ++javax.sound.sampled.Clip=com.sun.media.sound.DirectAudioDeviceProvider ++javax.sound.sampled.Port=com.sun.media.sound.PortMixerProvider ++javax.sound.sampled.SourceDataLine=com.sun.media.sound.DirectAudioDeviceProvider ++javax.sound.sampled.TargetDataLine=com.sun.media.sound.DirectAudioDeviceProvider diff --git a/SOURCES/remove-buildids.sh b/SOURCES/remove-buildids.sh new file mode 100644 index 0000000..b31ecf6 --- /dev/null +++ b/SOURCES/remove-buildids.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +JAVA_HOME=$1 + +# remove build id in ELF file $1 +remove_buildid() { + echo "Removing build id from $1" + objcopy --rename-section=.note.gnu.build-id=.ignore.note.gnu.build-id "$1" +} + +remove_buildids_in() { + for f in $(find $1 -type f) ; do + echo "$f" + if [ -f $f ]; then + file $f | grep ELF > /dev/null 2>&1 + is_elf=$? + if [ $is_elf -eq 0 ] ; then + remove_buildid $f + fi + fi + done +} + +remove_buildids_in ${JAVA_HOME}/bin +remove_buildids_in ${JAVA_HOME}/lib +remove_buildids_in ${JAVA_HOME}/demo +remove_buildids_in ${JAVA_HOME}/jre/bin +remove_buildids_in ${JAVA_HOME}/jre/lib diff --git a/SOURCES/remove-intree-libraries.sh b/SOURCES/remove-intree-libraries.sh new file mode 100644 index 0000000..237049a --- /dev/null +++ b/SOURCES/remove-intree-libraries.sh @@ -0,0 +1,82 @@ +#!/bin/sh + +ZIP_SRC=openjdk/jdk/src/share/native/java/util/zip/zlib-* +JPEG_SRC=openjdk/jdk/src/share/native/sun/awt/image/jpeg/jpeg-6b +GIF_SRC=openjdk/jdk/src/share/native/sun/awt/giflib +PNG_SRC=openjdk/jdk/src/share/native/sun/awt/libpng + +echo "Removing built-in libs (they will be linked)" + +echo "Removing zlib" +if [ ! -d ${ZIP_SRC} ]; then + echo "${ZIP_SRC} does not exist. Refusing to proceed." + exit 1 +fi +rm -rvf ${ZIP_SRC} + +echo "Removing libjpeg" +if [ ! -f ${JPEG_SRC}/jdhuff.c ]; then # some file that sound definitely exist + echo "${JPEG_SRC} does not contain jpeg sources. Refusing to proceed." + exit 1 +fi + +rm -vf ${JPEG_SRC}/jcomapi.c +rm -vf ${JPEG_SRC}/jdapimin.c +rm -vf ${JPEG_SRC}/jdapistd.c +rm -vf ${JPEG_SRC}/jdcoefct.c +rm -vf ${JPEG_SRC}/jdcolor.c +rm -vf ${JPEG_SRC}/jddctmgr.c +rm -vf ${JPEG_SRC}/jdhuff.c +rm -vf ${JPEG_SRC}/jdinput.c +rm -vf ${JPEG_SRC}/jdmainct. +rm -vf ${JPEG_SRC}/jdmarker.c +rm -vf ${JPEG_SRC}/jdmaster.c +rm -vf ${JPEG_SRC}/jdmerge.c +rm -vf ${JPEG_SRC}/jdphuff.c +rm -vf ${JPEG_SRC}/jdpostct.c +rm -vf ${JPEG_SRC}/jdsample.c +rm -vf ${JPEG_SRC}/jerror.c +rm -vf ${JPEG_SRC}/jidctflt.c +rm -vf ${JPEG_SRC}/jidctfst.c +rm -vf ${JPEG_SRC}/jidctint.c +rm -vf ${JPEG_SRC}/jidctred.c +rm -vf ${JPEG_SRC}/jmemmgr.c +rm -vf ${JPEG_SRC}/jmemnobs.c +rm -vf ${JPEG_SRC}/jquant1.c +rm -vf ${JPEG_SRC}/jquant2.c +rm -vf ${JPEG_SRC}/jutils.c +rm -vf ${JPEG_SRC}/jcapimin.c +rm -vf ${JPEG_SRC}/jcapistd.c +rm -vf ${JPEG_SRC}/jccoefct.c +rm -vf ${JPEG_SRC}/jccolor.c +rm -vf ${JPEG_SRC}/jcdctmgr.c +rm -vf ${JPEG_SRC}/jchuff.c +rm -vf ${JPEG_SRC}/jcinit.c +rm -vf ${JPEG_SRC}/jcmainct.c +rm -vf ${JPEG_SRC}/jcmarker.c +rm -vf ${JPEG_SRC}/jcmaster.c +rm -vf ${JPEG_SRC}/jcparam.c +rm -vf ${JPEG_SRC}/jcphuff.c +rm -vf ${JPEG_SRC}/jcprepct.c +rm -vf ${JPEG_SRC}/jcsample.c +rm -vf ${JPEG_SRC}/jctrans.c +rm -vf ${JPEG_SRC}/jdtrans.c +rm -vf ${JPEG_SRC}/jfdctflt.c +rm -vf ${JPEG_SRC}/jfdctfst.c +rm -vf ${JPEG_SRC}/jfdctint.c +rm -vf ${JPEG_SRC}/README + +echo "Removing giflib" +if [ ! -d ${GIF_SRC} ]; then + echo "${GIF_SRC} does not exist. Refusing to proceed." + exit 1 +fi +rm -rvf ${GIF_SRC} + +echo "Removing libpng" +if [ ! -d ${PNG_SRC} ]; then + echo "${PNG_SRC} does not exist. Refusing to proceed." + exit 1 +fi +rm -rvf ${PNG_SRC} + diff --git a/SOURCES/rh905128-non_block_ciphers.patch b/SOURCES/rh905128-non_block_ciphers.patch new file mode 100644 index 0000000..a901b90 --- /dev/null +++ b/SOURCES/rh905128-non_block_ciphers.patch @@ -0,0 +1,62 @@ +diff --git a/src/share/classes/sun/security/pkcs11/P11Cipher.java b/src/share/classes/sun/security/pkcs11/P11Cipher.java +--- openjdk/jdk/src/share/classes/sun/security/pkcs11/P11Cipher.java ++++ openjdk/jdk/src/share/classes/sun/security/pkcs11/P11Cipher.java +@@ -770,17 +770,19 @@ + ensureInitialized(); + int k = 0; + if (encrypt) { +- // Do we need to pad? +- if (paddingObj != null) { +- int actualPadLen = paddingObj.setPaddingBytes(blockBuffer, +- blockBufferLen, blockSize - blockBufferLen); +- blockBufferLen = blockSize; ++ if (blockBuffer != null) { ++ // Do we need to pad? ++ if (paddingObj != null) { ++ int actualPadLen = paddingObj.setPaddingBytes(blockBuffer, ++ blockBufferLen, blockSize - blockBufferLen); ++ blockBufferLen = blockSize; ++ } ++ updating = true; ++ k = token.p11.C_EncryptUpdate(session.id(), ++ 0, blockBuffer, 0, blockBufferLen, ++ 0, out, outOfs, outLen); ++ updating = false; + } +- updating = true; +- k = token.p11.C_EncryptUpdate(session.id(), +- 0, blockBuffer, 0, blockBufferLen, +- 0, out, outOfs, outLen); +- updating = false; + k += token.p11.C_EncryptFinal(session.id(), + 0, out, (outOfs + k), (outLen - k)); + } else { +@@ -859,17 +861,19 @@ + int k = 0; + + if (encrypt) { +- // Do we need to pad? +- if (paddingObj != null) { +- int actualPadLen = paddingObj.setPaddingBytes(blockBuffer, +- blockBufferLen, blockSize - blockBufferLen); +- blockBufferLen = blockSize; +- } +- updating = true; +- k = token.p11.C_EncryptUpdate(session.id(), ++ if (blockBuffer != null) { ++ // Do we need to pad? ++ if (paddingObj != null) { ++ int actualPadLen = paddingObj.setPaddingBytes(blockBuffer, ++ blockBufferLen, blockSize - blockBufferLen); ++ blockBufferLen = blockSize; ++ } ++ updating = true; ++ k = token.p11.C_EncryptUpdate(session.id(), + 0, blockBuffer, 0, blockBufferLen, + outAddr, outArray, outOfs, outLen); +- updating = false; ++ updating = false; ++ } + k += token.p11.C_EncryptFinal(session.id(), + outAddr, outArray, (outOfs + k), (outLen - k)); + } else { diff --git a/SOURCES/rhino.patch b/SOURCES/rhino.patch new file mode 100644 index 0000000..3c11620 --- /dev/null +++ b/SOURCES/rhino.patch @@ -0,0 +1,157 @@ +diff -ur openjdk.orig/jdk/make/com/sun/Makefile openjdk/jdk/make/com/sun/Makefile +--- openjdk.orig/jdk/make/com/sun/Makefile 2012-02-14 16:12:48.000000000 -0500 ++++ openjdk/jdk/make/com/sun/Makefile 2012-02-22 14:25:10.327518016 -0500 +@@ -31,13 +31,6 @@ + PRODUCT = sun + include $(BUILDDIR)/common/Defs.gmk + +-ifndef OPENJDK +- ORG_EXISTS := $(call DirExists,$(CLOSED_SRC)/share/classes/sun/org,,) +- ifneq ("$(ORG_EXISTS)", "") +- SCRIPT_SUBDIR = script +- endif +-endif +- + # jarsigner is part of JRE + SUBDIRS = java security net/ssl jarsigner + +@@ -45,7 +38,7 @@ + SUBDIRS_desktop = image + SUBDIRS_enterprise = crypto/provider jndi \ + org rowset net/httpserver +-SUBDIRS_misc = $(SCRIPT_SUBDIR) tracing nio demo ++SUBDIRS_misc = script tracing nio demo + + # Omit mirror since it's built with the apt tool. + SUBDIRS_tools = tools +diff -ur openjdk.orig/jdk/make/com/sun/script/Makefile openjdk/jdk/make/com/sun/script/Makefile +--- openjdk.orig/jdk/make/com/sun/script/Makefile 2012-02-14 16:12:48.000000000 -0500 ++++ openjdk/jdk/make/com/sun/script/Makefile 2012-02-22 14:10:53.325225237 -0500 +@@ -31,6 +31,8 @@ + + AUTO_FILES_JAVA_DIRS = com/sun/script + ++OTHER_JAVACFLAGS = -classpath $(RHINO_JAR) ++ + # + # Files that need to be copied + # +diff -ur openjdk.orig/jdk/make/common/Release.gmk openjdk/jdk/make/common/Release.gmk +--- openjdk.orig/jdk/make/common/Release.gmk 2012-02-14 16:12:48.000000000 -0500 ++++ openjdk/jdk/make/common/Release.gmk 2012-02-22 14:10:53.325225237 -0500 +@@ -766,6 +766,7 @@ + $(CP) $(RT_JAR) $(JRE_IMAGE_DIR)/lib/rt.jar + $(CP) $(RESOURCES_JAR) $(JRE_IMAGE_DIR)/lib/resources.jar + $(CP) $(JSSE_JAR) $(JRE_IMAGE_DIR)/lib/jsse.jar ++ $(CP) $(RHINO_JAR) $(JRE_IMAGE_DIR)/lib/rhino.jar + ifneq ($(JFR_JAR),) + $(CP) $(JFR_JAR) $(JRE_IMAGE_DIR)/lib/jfr.jar + endif +diff -ur openjdk.orig/jdk/src/share/classes/com/sun/script/javascript/ExternalScriptable.java openjdk/jdk/src/share/classes/com/sun/script/javascript/ExternalScriptable.java +--- openjdk.orig/jdk/src/share/classes/com/sun/script/javascript/ExternalScriptable.java 2012-02-14 16:12:49.000000000 -0500 ++++ openjdk/jdk/src/share/classes/com/sun/script/javascript/ExternalScriptable.java 2012-02-22 14:10:53.325225237 -0500 +@@ -24,7 +24,7 @@ + */ + + package com.sun.script.javascript; +-import sun.org.mozilla.javascript.internal.*; ++import sun.org.mozilla.javascript.*; + import javax.script.*; + import java.util.*; + +diff -ur openjdk.orig/jdk/src/share/classes/com/sun/script/javascript/JavaAdapter.java openjdk/jdk/src/share/classes/com/sun/script/javascript/JavaAdapter.java +--- openjdk.orig/jdk/src/share/classes/com/sun/script/javascript/JavaAdapter.java 2012-02-14 16:12:49.000000000 -0500 ++++ openjdk/jdk/src/share/classes/com/sun/script/javascript/JavaAdapter.java 2012-02-22 14:10:53.325225237 -0500 +@@ -26,7 +26,7 @@ + package com.sun.script.javascript; + + import javax.script.Invocable; +-import sun.org.mozilla.javascript.internal.*; ++import sun.org.mozilla.javascript.*; + + /** + * This class implements Rhino-like JavaAdapter to help implement a Java +diff -ur openjdk.orig/jdk/src/share/classes/com/sun/script/javascript/JSAdapter.java openjdk/jdk/src/share/classes/com/sun/script/javascript/JSAdapter.java +--- openjdk.orig/jdk/src/share/classes/com/sun/script/javascript/JSAdapter.java 2012-02-14 16:12:49.000000000 -0500 ++++ openjdk/jdk/src/share/classes/com/sun/script/javascript/JSAdapter.java 2012-02-22 14:10:53.326225216 -0500 +@@ -25,7 +25,7 @@ + + package com.sun.script.javascript; + +-import sun.org.mozilla.javascript.internal.*; ++import sun.org.mozilla.javascript.*; + import java.util.*; + + /** +diff -ur openjdk.orig/jdk/src/share/classes/com/sun/script/javascript/RhinoClassShutter.java openjdk/jdk/src/share/classes/com/sun/script/javascript/RhinoClassShutter.java +--- openjdk.orig/jdk/src/share/classes/com/sun/script/javascript/RhinoClassShutter.java 2012-02-14 16:12:49.000000000 -0500 ++++ openjdk/jdk/src/share/classes/com/sun/script/javascript/RhinoClassShutter.java 2012-02-22 14:10:53.326225216 -0500 +@@ -26,7 +26,7 @@ + package com.sun.script.javascript; + + import java.util.*; +-import sun.org.mozilla.javascript.internal.*; ++import sun.org.mozilla.javascript.*; + + /** + * This class prevents script access to certain sensitive classes. +diff -ur openjdk.orig/jdk/src/share/classes/com/sun/script/javascript/RhinoCompiledScript.java openjdk/jdk/src/share/classes/com/sun/script/javascript/RhinoCompiledScript.java +--- openjdk.orig/jdk/src/share/classes/com/sun/script/javascript/RhinoCompiledScript.java 2012-02-14 16:12:49.000000000 -0500 ++++ openjdk/jdk/src/share/classes/com/sun/script/javascript/RhinoCompiledScript.java 2012-02-22 14:10:53.326225216 -0500 +@@ -25,7 +25,7 @@ + + package com.sun.script.javascript; + import javax.script.*; +-import sun.org.mozilla.javascript.internal.*; ++import sun.org.mozilla.javascript.*; + + /** + * Represents compiled JavaScript code. +diff -ur openjdk.orig/jdk/src/share/classes/com/sun/script/javascript/RhinoScriptEngineFactory.java openjdk/jdk/src/share/classes/com/sun/script/javascript/RhinoScriptEngineFactory.java +--- openjdk.orig/jdk/src/share/classes/com/sun/script/javascript/RhinoScriptEngineFactory.java 2012-02-14 16:12:49.000000000 -0500 ++++ openjdk/jdk/src/share/classes/com/sun/script/javascript/RhinoScriptEngineFactory.java 2012-02-22 14:10:53.326225216 -0500 +@@ -26,7 +26,7 @@ + package com.sun.script.javascript; + import javax.script.*; + import java.util.*; +-import sun.org.mozilla.javascript.internal.*; ++import sun.org.mozilla.javascript.*; + import com.sun.script.util.*; + + /** +diff -ur openjdk.orig/jdk/src/share/classes/com/sun/script/javascript/RhinoScriptEngine.java openjdk/jdk/src/share/classes/com/sun/script/javascript/RhinoScriptEngine.java +--- openjdk.orig/jdk/src/share/classes/com/sun/script/javascript/RhinoScriptEngine.java 2012-02-14 16:12:49.000000000 -0500 ++++ openjdk/jdk/src/share/classes/com/sun/script/javascript/RhinoScriptEngine.java 2012-02-22 14:10:53.327225198 -0500 +@@ -26,7 +26,7 @@ + package com.sun.script.javascript; + import com.sun.script.util.*; + import javax.script.*; +-import sun.org.mozilla.javascript.internal.*; ++import sun.org.mozilla.javascript.*; + import java.lang.reflect.Method; + import java.io.*; + import java.security.*; +diff -ur openjdk.orig/jdk/src/share/classes/com/sun/script/javascript/RhinoTopLevel.java openjdk/jdk/src/share/classes/com/sun/script/javascript/RhinoTopLevel.java +--- openjdk.orig/jdk/src/share/classes/com/sun/script/javascript/RhinoTopLevel.java 2012-02-14 16:12:49.000000000 -0500 ++++ openjdk/jdk/src/share/classes/com/sun/script/javascript/RhinoTopLevel.java 2012-02-22 14:10:53.327225198 -0500 +@@ -25,7 +25,7 @@ + + package com.sun.script.javascript; + +-import sun.org.mozilla.javascript.internal.*; ++import sun.org.mozilla.javascript.*; + import java.security.AccessControlContext; + import javax.script.*; + import java.security.AccessControlContext; +diff -ur openjdk.orig/jdk/src/share/classes/com/sun/script/javascript/RhinoWrapFactory.java openjdk/jdk/src/share/classes/com/sun/script/javascript/RhinoWrapFactory.java +--- openjdk.orig/jdk/src/share/classes/com/sun/script/javascript/RhinoWrapFactory.java 2012-02-14 16:12:49.000000000 -0500 ++++ openjdk/jdk/src/share/classes/com/sun/script/javascript/RhinoWrapFactory.java 2012-02-22 14:10:53.327225198 -0500 +@@ -27,7 +27,7 @@ + + import java.lang.reflect.*; + import static sun.security.util.SecurityConstants.*; +-import sun.org.mozilla.javascript.internal.*; ++import sun.org.mozilla.javascript.*; + + /** + * This wrap factory is used for security reasons. JSR 223 script diff --git a/SPECS/java-1.7.0-openjdk.spec b/SPECS/java-1.7.0-openjdk.spec new file mode 100644 index 0000000..1cd1f50 --- /dev/null +++ b/SPECS/java-1.7.0-openjdk.spec @@ -0,0 +1,1436 @@ +# If debug is 1, OpenJDK is built with all debug info present. +%global debug 0 + +# we remove the build id notes explicitly to avoid generating (potentially +# conflicting) files in the -debuginfo package +%undefine _missing_build_ids_terminate_build + +%global icedtea_version 2.4.3 +%global hg_tag icedtea-{icedtea_version} + +%global aarch64 aarch64 arm64 armv8 +%global multilib_arches %{power64} sparc64 x86_64 %{aarch64} +%global jit_arches %{ix86} x86_64 sparcv9 sparc64 + + +%global enable_nss 1 + +# 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 +%if %{enable_nss} +%global NSS_LIBDIR %(pkg-config --variable=libdir nss) +%else +%global NSS_LIBDIR "" +%endif + +%ifarch x86_64 +%global archbuild amd64 +%global archinstall amd64 +%endif +%ifarch ppc +%global archbuild ppc +%global archinstall ppc +%global archdef PPC +%endif +%ifarch %{power64} +%global archbuild ppc64 +%global archinstall ppc64 +%global archdef PPC +%endif +%ifarch %{ix86} +%global archbuild i586 +%global archinstall i386 +%endif +%ifarch ia64 +%global archbuild ia64 +%global archinstall ia64 +%endif +%ifarch s390 +%global archbuild s390 +%global archinstall s390 +%global archdef S390 +%endif +%ifarch s390x +%global archbuild s390x +%global archinstall s390x +%global archdef S390 +%endif +%ifarch %{arm} +%global archbuild arm +%global archinstall arm +%global archdef ARM +%endif +%ifarch %{aarch64} +%global archbuild aarch64 +%global archinstall aarch64 +%global archdef AARCH64 +%endif +# 32 bit sparc, optimized for v9 +%ifarch sparcv9 +%global archbuild sparc +%global archinstall sparc +%endif +# 64 bit sparc +%ifarch sparc64 +%global archbuild sparcv9 +%global archinstall sparcv9 +%endif +%ifnarch %{jit_arches} +%global archbuild %{_arch} +%global archinstall %{_arch} +%endif + +%if %{debug} +%global debugbuild debug_build +%else +%global debugbuild %{nil} +%endif + +%global buildoutputdir openjdk/build/linux-%{archbuild} + +%global with_pulseaudio 1 + +%ifarch %{jit_arches} +%global with_systemtap 1 +%else +%global with_systemtap 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. +%global script 'use File::Spec; print File::Spec->abs2rel($ARGV[0], $ARGV[1])' +%global abs2rel %{__perl} -e %{script} + +# Hard-code libdir on 64-bit architectures to make the 64-bit JDK +# simply be another alternative. +%global LIBDIR %{_libdir} +#backuped original one +%ifarch %{multilib_arches} +%global syslibdir %{_prefix}/lib64 +%global _libdir %{_prefix}/lib +%else +%global syslibdir %{_libdir} +%endif + +# Standard JPackage naming and versioning defines. +%global origin openjdk +%global updatever 45 +#Fedora have an bogus 60 instead of updatever. Fix when updatever>=60 in version: +%global buildver 15 +# Keep priority on 6digits in case updatever>9 +%global priority 1700%{updatever} +%global javaver 1.7.0 + +%global sdkdir %{uniquesuffix} +%global jrelnk jre-%{javaver}-%{origin}-%{version}-%{release}.%{_arch} + +%global jredir %{sdkdir}/jre +%global sdkbindir %{_jvmdir}/%{sdkdir}/bin +%global jrebindir %{_jvmdir}/%{jredir}/bin +%global jvmjardir %{_jvmjardir}/%{uniquesuffix} + +%global fullversion %{name}-%{version}-%{release} + +%global uniquesuffix %{fullversion}.%{_arch} +#we can copy the javadoc to not arched dir, or made it not noarch +%global uniquejavadocdir %{fullversion} + +%ifarch %{jit_arches} +# Where to install systemtap tapset (links) +# We would like these to be in a package specific subdir, +# but currently systemtap doesn't support that, so we have to +# use the root tapset dir for now. To distinquish between 64 +# and 32 bit architectures we place the tapsets under the arch +# specific dir (note that systemtap will only pickup the tapset +# for the primary arch for now). Systemtap uses the machine name +# aka build_cpu as architecture specific directory name. +%global tapsetroot /usr/share/systemtap + %ifarch %{ix86} + %global tapsetdir %{tapsetroot}/tapset/i386 + %else + %global tapsetdir %{tapsetroot}/tapset/%{_build_cpu} + %endif +%endif + +# Prevent brp-java-repack-jars from being run. +%global __jar_repack 0 + +Name: java-%{javaver}-%{origin} +Version: %{javaver}.%{updatever} +Release: %{icedtea_version}.4%{?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 +# situation where in-the-wild java-1.5.0-ibm packages provided "java = +# 1:1.5.0". In RPM terms, "1.6.0 < 1:1.5.0" since 1.6.0 is +# interpreted as 0:1.6.0. So the "java >= 1.6.0" requirement would be +# satisfied by the 1:1.5.0 packages. Thus we need to set the epoch in +# JDK package >= 1.6.0 to 1, and packages referring to JDK virtual +# provides >= 1.6.0 must specify the epoch, "java >= 1:1.6.0". +Epoch: 1 +Summary: OpenJDK Runtime Environment +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/ + +#head +#REPO=http://icedtea.classpath.org/hg/icedtea7-forest +#current release +#REPO=http://icedtea.classpath.org/hg/release/icedtea7-forest-2.4 +# hg clone $REPO/ openjdk -r %{hg_tag} +# hg clone $REPO/corba/ openjdk/corba -r %{hg_tag} +# hg clone $REPO/hotspot/ openjdk/hotspot -r %{hg_tag} +# hg clone $REPO/jaxp/ openjdk/jaxp -r %{hg_tag} +# hg clone $REPO/jaxws/ openjdk/jaxws -r %{hg_tag} +# hg clone $REPO/jdk/ openjdk/jdk -r %{hg_tag} +# hg clone $REPO/langtools/ openjdk/langtools -r %{hg_tag} +# find openjdk -name ".hg" -exec rm -rf '{}' \; +# sh /git/java-1.7.0-openjdk/rhel-X.Y/fsg.sh +# tar cJf openjdk-icedtea-%{icedtea_version}.tar.xz openjdk +Source0: openjdk-icedtea-%{icedtea_version}.tar.xz + +# README file +# This source is under maintainer's/java-team's control +Source2: README.src + +# Sources 6-12 are taken from hg clone http://icedtea.classpath.org/hg/icedtea7 +# Unless said differently, there is directory with required sources which should be enough to pack/rename + +# Class rewrite to rewrite rhino hierarchy +Source5: class-rewriter.tar.gz + +# Systemtap tapsets. Zipped up to keep it small. +# last update from http://icedtea.classpath.org/hg/icedtea7/file/8599fdfc398d/tapset +Source6: systemtap-tapset-2013-10-02.tar.gz + +# .desktop files. +Source7: policytool.desktop +Source77: jconsole.desktop + +# nss configuration file +Source8: nss.cfg + +# FIXME: Taken from IcedTea snapshot 877ad5f00f69, but needs to be moved out +# hg clone -r 877ad5f00f69 http://icedtea.classpath.org/hg/icedtea7 +Source9: pulseaudio.tar.gz + +# Removed libraries that we link instead +Source10: remove-intree-libraries.sh + +#http://icedtea.classpath.org/hg/icedtea7/file/933d082ec889/fsg.sh +# file to clean tarball, should be ketp updated as possible +Source1111: fsg.sh + +# Remove build ids from binaries +Source11: remove-buildids.sh + +# Ensure we aren't using the limited crypto policy +Source12: TestCryptoLevel.java + +Source13: java-abrt-luncher + +# RPM/distribution specific patches + +# Allow TCK to pass with access bridge wired in +Patch1: java-1.7.0-openjdk-java-access-bridge-tck.patch + +# Disable access to access-bridge packages by untrusted apps +Patch3: java-1.7.0-openjdk-java-access-bridge-security.patch + +# Ignore AWTError when assistive technologies are loaded +Patch4: java-1.7.0-openjdk-accessible-toolkit.patch + +# Build docs even in debug +Patch5: java-1.7.0-openjdk-debugdocs.patch + +# Add debuginfo where missing +Patch6: %{name}-debuginfo.patch + +# +# OpenJDK specific patches +# + +# Add rhino support +Patch100: rhino.patch + + +# Patch for PPC/PPC64 +Patch106: %{name}-ppc-zero-jdk.patch +Patch107: %{name}-ppc-zero-hotspot.patch +Patch121: FixPPC64StackOverflow.patch + +Patch120: %{name}-freetype-check-fix.patch + +#Start of NSS patches +# NSS/AES patch +Patch108: %{name}-aes-buffering.patch + +Patch113: %{name}-aes-update_reset.patch + +Patch114: %{name}-nss-tck.patch + +Patch115: %{name}-nss-split_results.patch + +Patch116: rh905128-non_block_ciphers.patch + +# NSS config patch for build time +Patch109: %{name}-nss-config-1.patch + + +# NSS config patch for runtime time +Patch111: %{name}-nss-config-2.patch + +#END of NSS patches + +# allow to create hs_pid.log in tmp (in 700 permissions) if working directory is unwritable +Patch200: abrt_friendly_hs_log_jdk7.patch + +# +# Optional component packages +# + +# Make the ALSA based mixer the default when building with the pulseaudio based +# mixer +Patch300: pulse-soundproperties.patch + +# Temporary patches + +#Workaround RH902004 +Patch402: gstackbounds.patch +Patch403: PStack-808293.patch +# End of tmp patches + +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: gcc-c++ +BuildRequires: alsa-lib-devel +BuildRequires: cups-devel +BuildRequires: desktop-file-utils +BuildRequires: giflib-devel +BuildRequires: lcms2-devel >= 2.5 +BuildRequires: libX11-devel +BuildRequires: libXi-devel +BuildRequires: libXp-devel +BuildRequires: libXt-devel +BuildRequires: libXtst-devel +BuildRequires: libjpeg-devel +BuildRequires: libpng-devel +BuildRequires: wget +BuildRequires: libxslt +BuildRequires: xorg-x11-proto-devel +BuildRequires: mercurial +BuildRequires: ant +BuildRequires: libXinerama-devel +BuildRequires: rhino +BuildRequires: redhat-lsb +BuildRequires: zip +BuildRequires: fontconfig +BuildRequires: xorg-x11-fonts-Type1 +BuildRequires: zlib > 1.2.3-6 +BuildRequires: java-1.7.0-openjdk-devel +BuildRequires: fontconfig +BuildRequires: at-spi-devel +BuildRequires: gawk +BuildRequires: pkgconfig >= 0.9.0 +BuildRequires: xorg-x11-utils +# PulseAudio build requirements. +%if %{with_pulseaudio} +BuildRequires: pulseaudio-libs-devel >= 0.9.11 +BuildRequires: pulseaudio >= 0.9.11 +%endif +# Zero-assembler build requirement. +%ifnarch %{jit_arches} +BuildRequires: libffi-devel >= 3.0.10 +%endif + +# cacerts build requirement. +BuildRequires: openssl +# execstack build requirement. +# no prelink on ARM yet +%ifnarch %{arm} %{aarch64} +BuildRequires: prelink +%endif +%ifarch %{jit_arches} +#systemtap build requirement. +BuildRequires: systemtap-sdt-devel +%endif + +# nss provider requirements +%if %{enable_nss} +BuildRequires: nss-devel +%endif + +Requires: fontconfig +Requires: xorg-x11-fonts-Type1 +#requires rest of java +Requires: %{name}-headless = %{epoch}:%{version}-%{release} + + +# Standard JPackage base provides. +Provides: jre-%{javaver}-%{origin} = %{epoch}:%{version}-%{release} +Provides: jre-%{origin} = %{epoch}:%{version}-%{release} +Provides: jre-%{javaver} = %{epoch}:%{version}-%{release} +Provides: java-%{javaver} = %{epoch}:%{version}-%{release} +Provides: jre = %{javaver} +Provides: java-%{origin} = %{epoch}:%{version}-%{release} +Provides: java = %{epoch}:%{javaver} +# Standard JPackage extensions provides. +Provides: java-fonts = %{epoch}:%{version} + +# Obsolete older 1.6 packages as it cannot use the new bytecode +# Obsoletes: java-1.6.0-openjdk +# Obsoletes: java-1.6.0-openjdk-demo +# Obsoletes: java-1.6.0-openjdk-devel +# Obsoletes: java-1.6.0-openjdk-javadoc +# Obsoletes: java-1.6.0-openjdk-src + +%description +The OpenJDK runtime environment. + +%package headless +Summary: The OpenJDK runtime environment without audio and video support +Group: Development/Languages + +Requires: rhino +Requires: lcms2 >= 2.5 +Requires: libjpeg = 6b +# Require /etc/pki/java/cacerts. +Requires: ca-certificates +# Require jpackage-utils for ant. +Requires: jpackage-utils >= 1.7.3-1jpp.2 +# Require zoneinfo data provided by tzdata-java subpackage. +Requires: tzdata-java +# nss provider requirements +%if %{enable_nss} +Requires: nss%{?_isa} +%endif +# Post requires alternatives to install tool alternatives. +Requires(post): %{_sbindir}/alternatives +# Postun requires alternatives to uninstall tool alternatives. +Requires(postun): %{_sbindir}/alternatives + +Provides: jre-%{javaver}-%{origin}-headless = %{epoch}:%{version}-%{release} +Provides: jre-%{origin}-headless = %{epoch}:%{version}-%{release} +Provides: jre-%{javaver}-headless = %{epoch}:%{version}-%{release} +Provides: java-%{javaver}-headless = %{epoch}:%{version}-%{release} +Provides: jre-headless = %{javaver} +Provides: java-%{origin}-headless = %{epoch}:%{version}-%{release} +Provides: java-headless = %{epoch}:%{javaver} +# Standard JPackage extensions provides. +Provides: jndi = %{epoch}:%{version} +Provides: jndi-ldap = %{epoch}:%{version} +Provides: jndi-cos = %{epoch}:%{version} +Provides: jndi-rmi = %{epoch}:%{version} +Provides: jndi-dns = %{epoch}:%{version} +Provides: jaas = %{epoch}:%{version} +Provides: jsse = %{epoch}:%{version} +Provides: jce = %{epoch}:%{version} +Provides: jdbc-stdext = 4.1 +Provides: java-sasl = %{epoch}:%{version} + +%description headless +The OpenJDK runtime environment without audio and video + +%package devel +Summary: OpenJDK Development Environment +Group: Development/Tools + +# Require base package. +Requires: %{name} = %{epoch}:%{version}-%{release} +# Post requires alternatives to install tool alternatives. +Requires(post): %{_sbindir}/alternatives +# Postun requires alternatives to uninstall tool alternatives. +Requires(postun): %{_sbindir}/alternatives + +# Standard JPackage devel provides. +Provides: java-sdk-%{javaver}-%{origin} = %{epoch}:%{version} +Provides: java-sdk-%{javaver} = %{epoch}:%{version} +Provides: java-sdk-%{origin} = %{epoch}:%{version} +Provides: java-sdk = %{epoch}:%{javaver} +Provides: java-%{javaver}-devel = %{epoch}:%{version} +Provides: java-devel-%{origin} = %{epoch}:%{version} +Provides: java-devel = %{epoch}:%{javaver} + + +%description devel +The OpenJDK development tools. + +%package demo +Summary: OpenJDK Demos +Group: Development/Languages + +Requires: %{name} = %{epoch}:%{version}-%{release} + +%description demo +The OpenJDK demos. + +%package src +Summary: OpenJDK Source Bundle +Group: Development/Languages + +Requires: %{name} = %{epoch}:%{version}-%{release} + +%description src +The OpenJDK source bundle. + +%package javadoc +Summary: OpenJDK API Documentation +Group: Documentation +Requires: jpackage-utils +BuildArch: noarch + +# Post requires alternatives to install javadoc alternative. +Requires(post): %{_sbindir}/alternatives +# Postun requires alternatives to uninstall javadoc alternative. +Requires(postun): %{_sbindir}/alternatives + +# Standard JPackage javadoc provides. +Provides: java-javadoc = %{epoch}:%{version}-%{release} +Provides: java-%{javaver}-javadoc = %{epoch}:%{version}-%{release} + +%description javadoc +The OpenJDK API documentation. + +%package accessibility +Summary: OpenJDK accessibility connector +Requires: java-atk-wrapper +Requires: %{name} = %{epoch}:%{version}-%{release} + +%description accessibility +Enables accessibility support in OpenJDK by using java-at-wrapper. This allows compatible at-spi2 based accessibility programs to work for AWT and Swing-based programs. +Please note, the java-atk-wrapper is still in beta, and also OpenJDK itself is still in phase of tuning to be working with accessibility features. +Although working pretty fine, there are known issues with accessibility on, so do not rather install this package unless you really need. + +%prep +%setup -q -c -n %{uniquesuffix} -T -a 0 +cp %{SOURCE2} . + +# OpenJDK patches +%patch100 + +# pulseaudio support +%if %{with_pulseaudio} +%patch300 +%endif + +# Add systemtap patches if enabled +%if %{with_systemtap} +%endif + +# Remove libraries that are linked +sh %{SOURCE10} + +# Copy jaxp, jaf and jaxws drops +mkdir drops/ + +# Extract the rewriter (to rewrite rhino classes) +tar xzf %{SOURCE5} + +# Extract systemtap tapsets +%if %{with_systemtap} + +tar xzf %{SOURCE6} + +for file in tapset/*.in; do + + OUTPUT_FILE=`echo $file | sed -e s:%{javaver}\.stp\.in$:%{version}-%{release}.stp:g` + sed -e s:@ABS_SERVER_LIBJVM_SO@:%{_jvmdir}/%{sdkdir}/jre/lib/%{archinstall}/server/libjvm.so:g $file > $file.1 +# FIXME this should really be %if %{has_client_jvm} +%ifarch %{ix86} + sed -e s:@ABS_CLIENT_LIBJVM_SO@:%{_jvmdir}/%{sdkdir}/jre/lib/%{archinstall}/client/libjvm.so:g $file.1 > $OUTPUT_FILE +%else + sed -e '/@ABS_CLIENT_LIBJVM_SO@/d' $file.1 > $OUTPUT_FILE +%endif + sed -i -e s:@ABS_JAVA_HOME_DIR@:%{_jvmdir}/%{sdkdir}:g $OUTPUT_FILE + sed -i -e s:@INSTALL_ARCH_DIR@:%{archinstall}:g $OUTPUT_FILE + +done + +%endif + +# Pulseaudio +%if %{with_pulseaudio} +tar xzf %{SOURCE9} +%endif + + +%patch3 +%patch4 + +%if %{debug} +%patch5 +%patch6 +%endif + + +%patch120 +%patch200 + +%ifarch ppc %{power64} +# PPC fixes +%patch106 +%patch107 +%patch121 +%endif + +# NSS patches 1 +%if %{enable_nss} +%patch108 +%patch113 +%patch114 +%patch115 +%patch109 +%patch116 +%endif + +%ifarch %{jit_arches} +%patch402 +%patch403 +%endif + +%build +# How many cpu's do we have? +%ifarch aarch64 +# temporary until real hardware lands +export NUM_PROC=1 +%else +export NUM_PROC=`/usr/bin/getconf _NPROCESSORS_ONLN 2> /dev/null || :` +export NUM_PROC=${NUM_PROC:-1} +%endif + +# Build IcedTea and OpenJDK. +%ifarch s390x sparc64 alpha %{power64} %{aarch64} +export ARCH_DATA_MODEL=64 +%endif +%ifarch alpha +export CFLAGS="$CFLAGS -mieee" +%endif + +# Build the re-written rhino jar +mkdir -p rhino/{old,new} + +# Compile the rewriter +(cd rewriter + javac com/redhat/rewriter/ClassRewriter.java +) + +# Extract rhino.jar contents and rewrite +(cd rhino/old + jar xf /usr/share/java/rhino.jar +) + +java -cp rewriter com.redhat.rewriter.ClassRewriter \ + $PWD/rhino/old \ + $PWD/rhino/new \ + org.mozilla \ + sun.org.mozilla + +(cd rhino/old + for file in `find -type f -not -name '*.class'` ; do + new_file=../new/`echo $file | sed -e 's#org#sun/org#'` + mkdir -pv `dirname $new_file` + cp -v $file $new_file + sed -ie 's#org\.mozilla#sun.org.mozilla#g' $new_file + done +) + +(cd rhino/new + jar cfm ../rhino.jar META-INF/MANIFEST.MF sun +) + +export JDK_TO_BUILD_WITH=/usr/lib/jvm/java-openjdk + + + +pushd openjdk >& /dev/null + +export ALT_DROPS_DIR=$PWD/../drops +export ALT_BOOTDIR="$JDK_TO_BUILD_WITH" + +# Save old umask as jdk_generic_profile overwrites it +oldumask=`umask` + +# Set generic profile +%ifnarch %{jit_arches} +export ZERO_BUILD=true +%endif +source jdk/make/jdk_generic_profile.sh + +# Restore old umask +umask $oldumask + +make \ + DISABLE_INTREE_EC=true \ + UNLIMITED_CRYPTO=true \ + ANT="/usr/bin/ant" \ + DISTRO_NAME="Red Hat Enterprise Linux 7" \ + DISTRO_PACKAGE_VERSION="rhel-%{release}-%{_arch} u%{updatever}-b%{buildver}" \ + JDK_UPDATE_VERSION=`printf "%02d" %{updatever}` \ + JDK_BUILD_NUMBER=b`printf "%02d" %{buildver}` \ + MILESTONE="fcs" \ + HOTSPOT_BUILD_JOBS="$NUM_PROC" \ + STATIC_CXX="false" \ + RHINO_JAR="$PWD/../rhino/rhino.jar" \ + GENSRCDIR="$PWD/generated.build" \ + FT2_CFLAGS="-I/usr/include/freetype2 " \ + FT2_LIBS="-lfreetype " \ + DEBUG_CLASSFILES="true" \ + DEBUG_BINARIES="true" \ + STRIP_POLICY="no_strip" \ +%ifnarch %{jit_arches} + LIBFFI_CFLAGS="`pkg-config --cflags libffi` " \ + LIBFFI_LIBS="-lffi " \ + ZERO_BUILD="true" \ + ZERO_LIBARCH="%{archbuild}" \ + ZERO_ARCHDEF="%{archdef}" \ +%ifarch ppc %{power64} s390 s390x + ZERO_ENDIANNESS="big" \ +%else + ZERO_ENDIANNESS="little" \ + ZERO_ARCHFLAG="-D_LITTLE_ENDIAN" \ +%endif +%endif + %{debugbuild} + +popd >& /dev/null + +%ifarch %{jit_arches} +chmod 644 $(pwd)/%{buildoutputdir}/j2sdk-image/lib/sa-jdi.jar +%endif + +export JAVA_HOME=$(pwd)/%{buildoutputdir}/j2sdk-image + +# Install java-abrt-luncher +mkdir $JAVA_HOME/jre-abrt +mkdir $JAVA_HOME/jre-abrt/bin +mv $JAVA_HOME/jre/bin/java $JAVA_HOME/jre-abrt/bin/java +ln -s %{_jvmdir}/%{sdkdir}/jre/lib $JAVA_HOME/jre-abrt/lib +cat %{SOURCE13} | sed -e s:@JAVA_PATH@:%{_jvmdir}/%{sdkdir}/jre-abrt/bin/java:g -e s:@LIB_DIR@:%{LIBDIR}/libabrt-java-connector.so:g > $JAVA_HOME/jre/bin/java +chmod 755 $JAVA_HOME/jre/bin/java + +# Install nss.cfg right away as we will be using the JRE above +cp -a %{SOURCE8} $JAVA_HOME/jre/lib/security/ +sed -i -e s:@NSS_LIBDIR@:%{NSS_LIBDIR}:g $JAVA_HOME/jre/lib/security/nss.cfg + +# NSS patches 2 - default enabling in runtime +%if %{enable_nss} +pushd $JAVA_HOME/jre/lib/security/ +patch -l -p0 < %{PATCH111} +popd +%endif + +# Build pulseaudio and install it to JDK build location +%if %{with_pulseaudio} +pushd pulseaudio +make JAVA_HOME=$JAVA_HOME -f Makefile.pulseaudio +cp -pPRf build/native/libpulse-java.so $JAVA_HOME/jre/lib/%{archinstall}/ +cp -pPRf build/pulse-java.jar $JAVA_HOME/jre/lib/ext/ +popd +%endif + +# Copy tz.properties +echo "sun.zoneinfo.dir=/usr/share/javazi" >> $JAVA_HOME/jre/lib/tz.properties + +#remove all fontconfig files. This change should be usptreamed soon +rm -f %{buildoutputdir}/j2re-image/lib/fontconfig*.properties.src +rm -f %{buildoutputdir}/j2re-image/lib/fontconfig*.bfc +rm -f %{buildoutputdir}/j2sdk-image/jre/lib/fontconfig*.properties.src +rm -f %{buildoutputdir}/j2sdk-image/jre/lib/fontconfig*.bfc +rm -f %{buildoutputdir}/lib/fontconfig*.properties.src +rm -f %{buildoutputdir}/lib/fontconfig*.bfc + +# Check unlimited policy has been used +$JAVA_HOME/bin/javac -d . %{SOURCE12} +$JAVA_HOME/bin/java TestCryptoLevel + +sh %{SOURCE11} ${JAVA_HOME} + +%install +rm -rf $RPM_BUILD_ROOT +STRIP_KEEP_SYMTAB=libjvm* + +# Install symlink to default soundfont +install -d -m 755 $RPM_BUILD_ROOT%{_jvmdir}/%{jredir}/lib/audio +pushd $RPM_BUILD_ROOT%{_jvmdir}/%{jredir}/lib/audio +ln -s %{_datadir}/soundfonts/default.sf2 +popd + +pushd %{buildoutputdir}/j2sdk-image + +#install jsa directories so we can owe them +mkdir -p $RPM_BUILD_ROOT%{_jvmdir}/%{jredir}/lib/%{archinstall}/server/ +mkdir -p $RPM_BUILD_ROOT%{_jvmdir}/%{jredir}/lib/%{archinstall}/client/ + + # Install main files. + install -d -m 755 $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir} + cp -a jre-abrt bin include lib src.zip $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir} + install -d -m 755 $RPM_BUILD_ROOT%{_jvmdir}/%{jredir} + cp -a jre/bin jre/lib $RPM_BUILD_ROOT%{_jvmdir}/%{jredir} + cp -a ASSEMBLY_EXCEPTION LICENSE THIRD_PARTY_README $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir} + +%ifarch %{jit_arches} + # Install systemtap support files. + install -dm 755 $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir}/tapset + cp -a $RPM_BUILD_DIR/%{uniquesuffix}/tapset/*.stp $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir}/tapset/ + install -d -m 755 $RPM_BUILD_ROOT%{tapsetdir} + pushd $RPM_BUILD_ROOT%{tapsetdir} + RELATIVE=$(%{abs2rel} %{_jvmdir}/%{sdkdir}/tapset %{tapsetdir}) + ln -sf $RELATIVE/*.stp . + popd +%endif + + # Install cacerts symlink. + rm -f $RPM_BUILD_ROOT%{_jvmdir}/%{jredir}/lib/security/cacerts + pushd $RPM_BUILD_ROOT%{_jvmdir}/%{jredir}/lib/security + RELATIVE=$(%{abs2rel} %{_sysconfdir}/pki/java \ + %{_jvmdir}/%{jredir}/lib/security) + ln -sf $RELATIVE/cacerts . + popd + + # Install extension symlinks. + install -d -m 755 $RPM_BUILD_ROOT%{jvmjardir} + pushd $RPM_BUILD_ROOT%{jvmjardir} + RELATIVE=$(%{abs2rel} %{_jvmdir}/%{jredir}/lib %{jvmjardir}) + ln -sf $RELATIVE/jsse.jar jsse-%{version}.jar + ln -sf $RELATIVE/jce.jar jce-%{version}.jar + ln -sf $RELATIVE/rt.jar jndi-%{version}.jar + ln -sf $RELATIVE/rt.jar jndi-ldap-%{version}.jar + ln -sf $RELATIVE/rt.jar jndi-cos-%{version}.jar + ln -sf $RELATIVE/rt.jar jndi-rmi-%{version}.jar + ln -sf $RELATIVE/rt.jar jaas-%{version}.jar + ln -sf $RELATIVE/rt.jar jdbc-stdext-%{version}.jar + ln -sf jdbc-stdext-%{version}.jar jdbc-stdext-3.0.jar + ln -sf $RELATIVE/rt.jar sasl-%{version}.jar + for jar in *-%{version}.jar + do + if [ x%{version} != x%{javaver} ] + then + ln -sf $jar $(echo $jar | sed "s|-%{version}.jar|-%{javaver}.jar|g") + fi + ln -sf $jar $(echo $jar | sed "s|-%{version}.jar|.jar|g") + done + popd + + # Install JCE policy symlinks. + install -d -m 755 $RPM_BUILD_ROOT%{_jvmprivdir}/%{uniquesuffix}/jce/vanilla + + # Install versioned symlinks. + pushd $RPM_BUILD_ROOT%{_jvmdir} + ln -sf %{jredir} %{jrelnk} + popd + + pushd $RPM_BUILD_ROOT%{_jvmjardir} + ln -sf %{sdkdir} %{jrelnk} + popd + + # Remove javaws man page + rm -f man/man1/javaws* + + # Install man pages. + install -d -m 755 $RPM_BUILD_ROOT%{_mandir}/man1 + for manpage in man/man1/* + do + # Convert man pages to UTF8 encoding. + iconv -f ISO_8859-1 -t UTF8 $manpage -o $manpage.tmp + mv -f $manpage.tmp $manpage + install -m 644 -p $manpage $RPM_BUILD_ROOT%{_mandir}/man1/$(basename \ + $manpage .1)-%{uniquesuffix}.1 + done + + # Install demos and samples. + cp -a demo $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir} + mkdir -p sample/rmi + mv bin/java-rmi.cgi sample/rmi + cp -a sample $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir} + +popd + + +# Install Javadoc documentation. +install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir} +cp -a %{buildoutputdir}/docs $RPM_BUILD_ROOT%{_javadocdir}/%{uniquejavadocdir} + +# Install icons and menu entries. +for s in 16 24 32 48 ; do + install -D -p -m 644 \ + openjdk/jdk/src/solaris/classes/sun/awt/X11/java-icon${s}.png \ + $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/${s}x${s}/apps/java-%{javaver}.png +done + +# Install desktop files. +install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/{applications,pixmaps} +for e in %{SOURCE7} %{SOURCE77} ; do + sed -i "s/#ARCH#/%{_arch}-%{release}/g" $e + sed -i "s|/usr/bin|%{sdkbindir}/|g" $e + desktop-file-install --vendor=%{uniquesuffix} --mode=644 \ + --dir=$RPM_BUILD_ROOT%{_datadir}/applications $e +done + +# Install /etc/.java/.systemPrefs/ directory +# See https://bugzilla.redhat.com/show_bug.cgi?id=741821 +mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/.java/.systemPrefs + +# Find JRE directories. +find $RPM_BUILD_ROOT%{_jvmdir}/%{jredir} -type d \ + | grep -v jre/lib/security \ + | sed 's|'$RPM_BUILD_ROOT'|%dir |' \ + > %{name}.files-headless +# Find JRE files. +find $RPM_BUILD_ROOT%{_jvmdir}/%{jredir} -type f -o -type l \ + | grep -v jre/lib/security \ + | sed 's|'$RPM_BUILD_ROOT'||' \ + > %{name}.files.all +#split %{name}.files to %{name}.files-headless and %{name}.files +#see https://bugzilla.redhat.com/show_bug.cgi?id=875408 +NOT_HEADLESS=\ +"%{_jvmdir}/%{uniquesuffix}/jre/lib/%{archinstall}/libjsoundalsa.so +%{_jvmdir}/%{uniquesuffix}/jre/lib/%{archinstall}/libpulse-java.so +%{_jvmdir}/%{uniquesuffix}/jre/lib/%{archinstall}/libsplashscreen.so +%{_jvmdir}/%{uniquesuffix}/jre/lib/%{archinstall}/xawt/libmawt.so +%{_jvmdir}/%{uniquesuffix}/jre-abrt/lib/%{archinstall}/libjsoundalsa.so +%{_jvmdir}/%{uniquesuffix}/jre-abrt/lib/%{archinstall}/libpulse-java.so +%{_jvmdir}/%{uniquesuffix}/jre-abrt/lib/%{archinstall}/libsplashscreen.so +%{_jvmdir}/%{uniquesuffix}/jre-abrt/lib/%{archinstall}/xawt/libmawt.so" +#filter %{name}.files from %{name}.files.all to %{name}.files-headless +ALL=`cat %{name}.files.all` +for file in $ALL ; do + INLCUDE="NO" ; + for blacklist in $NOT_HEADLESS ; do +#we can not match normally, because rpmbuild will evaluate !0 result as script failure + q=`expr match "$file" "$blacklist"` || : + l=`expr length "$blacklist"` || : + if [ $q -eq $l ]; then + INLCUDE="YES" ; + fi; + done + if [ "x$INLCUDE" = "xNO" ]; then + echo "$file" >> %{name}.files-headless + else + echo "$file" >> %{name}.files + fi +done +# Find demo directories. +find $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir}/demo \ + $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir}/sample -type d \ + | sed 's|'$RPM_BUILD_ROOT'|%dir |' \ + > %{name}-demo.files + +# FIXME: remove SONAME entries from demo DSOs. See +# https://bugzilla.redhat.com/show_bug.cgi?id=436497 + +# Find non-documentation demo files. +find $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir}/demo \ + $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir}/sample \ + -type f -o -type l | sort \ + | grep -v README \ + | sed 's|'$RPM_BUILD_ROOT'||' \ + >> %{name}-demo.files +# Find documentation demo files. +find $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir}/demo \ + $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir}/sample \ + -type f -o -type l | sort \ + | grep README \ + | sed 's|'$RPM_BUILD_ROOT'||' \ + | sed 's|^|%doc |' \ + >> %{name}-demo.files + +# intentionally after the files generation, as it goes to separate package +# Create links which leads to separately installed java-atk-bridge and allow configuration +# links points to java-atk-wrapper - an dependence + pushd $RPM_BUILD_ROOT/%{_jvmdir}/%{jredir}/lib/%{archinstall} + ln -s %{syslibdir}/java-atk-wrapper/libatk-wrapper.so.0 libatk-wrapper.so + popd + pushd $RPM_BUILD_ROOT/%{_jvmdir}/%{jredir}/lib/ext + ln -s %{syslibdir}/java-atk-wrapper/java-atk-wrapper.jar java-atk-wrapper.jar + popd + pushd $RPM_BUILD_ROOT/%{_jvmdir}/%{jredir}/lib/ + echo "#Config file to enable java-atk-wrapper" > accessibility.properties + echo "" >> accessibility.properties + echo "assistive_technologies=org.GNOME.Accessibility.AtkWrapper" >> accessibility.properties + echo "" >> accessibility.properties + popd + +%post +update-desktop-database %{_datadir}/applications &> /dev/null || : +/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : +exit 0 + + +# FIXME: identical binaries are copied, not linked. This needs to be +# fixed upstream. +%post headless +%ifarch %{jit_arches} +#see https://bugzilla.redhat.com/show_bug.cgi?id=513605 +%{jrebindir}/java -Xshare:dump >/dev/null 2>/dev/null +%endif + +ext=.gz +alternatives \ + --install %{_bindir}/java java %{jrebindir}/java %{priority} \ + --slave %{_jvmdir}/jre jre %{_jvmdir}/%{jredir} \ + --slave %{_jvmjardir}/jre jre_exports %{jvmjardir} \ + --slave %{_bindir}/keytool keytool %{jrebindir}/keytool \ + --slave %{_bindir}/orbd orbd %{jrebindir}/orbd \ + --slave %{_bindir}/pack200 pack200 %{jrebindir}/pack200 \ + --slave %{_bindir}/rmid rmid %{jrebindir}/rmid \ + --slave %{_bindir}/rmiregistry rmiregistry %{jrebindir}/rmiregistry \ + --slave %{_bindir}/servertool servertool %{jrebindir}/servertool \ + --slave %{_bindir}/tnameserv tnameserv %{jrebindir}/tnameserv \ + --slave %{_bindir}/unpack200 unpack200 %{jrebindir}/unpack200 \ + --slave %{_mandir}/man1/java.1$ext java.1$ext \ + %{_mandir}/man1/java-%{uniquesuffix}.1$ext \ + --slave %{_mandir}/man1/keytool.1$ext keytool.1$ext \ + %{_mandir}/man1/keytool-%{uniquesuffix}.1$ext \ + --slave %{_mandir}/man1/orbd.1$ext orbd.1$ext \ + %{_mandir}/man1/orbd-%{uniquesuffix}.1$ext \ + --slave %{_mandir}/man1/pack200.1$ext pack200.1$ext \ + %{_mandir}/man1/pack200-%{uniquesuffix}.1$ext \ + --slave %{_mandir}/man1/rmid.1$ext rmid.1$ext \ + %{_mandir}/man1/rmid-%{uniquesuffix}.1$ext \ + --slave %{_mandir}/man1/rmiregistry.1$ext rmiregistry.1$ext \ + %{_mandir}/man1/rmiregistry-%{uniquesuffix}.1$ext \ + --slave %{_mandir}/man1/servertool.1$ext servertool.1$ext \ + %{_mandir}/man1/servertool-%{uniquesuffix}.1$ext \ + --slave %{_mandir}/man1/tnameserv.1$ext tnameserv.1$ext \ + %{_mandir}/man1/tnameserv-%{uniquesuffix}.1$ext \ + --slave %{_mandir}/man1/unpack200.1$ext unpack200.1$ext \ + %{_mandir}/man1/unpack200-%{uniquesuffix}.1$ext + +for X in %{origin} %{javaver} ; do + alternatives \ + --install %{_jvmdir}/jre-"$X" \ + jre_"$X" %{_jvmdir}/%{jredir} %{priority} \ + --slave %{_jvmjardir}/jre-"$X" \ + jre_"$X"_exports %{jvmjardir} +done + +update-alternatives --install %{_jvmdir}/jre-%{javaver}-%{origin} jre_%{javaver}_%{origin} %{_jvmdir}/%{jrelnk} %{priority} \ +--slave %{_jvmjardir}/jre-%{javaver} jre_%{javaver}_%{origin}_exports %{jvmjardir} + +exit 0 + +%postun +update-desktop-database %{_datadir}/applications &> /dev/null || : + +if [ $1 -eq 0 ] ; then + /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null + /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : +fi + +exit 0 + + +%postun headless + alternatives --remove java %{jrebindir}/java + alternatives --remove jre_%{origin} %{_jvmdir}/%{jredir} + alternatives --remove jre_%{javaver} %{_jvmdir}/%{jredir} + alternatives --remove jre_%{javaver}_%{origin} %{_jvmdir}/%{jrelnk} + +exit 0 + +%posttrans +/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : + + + +%post devel +ext=.gz +alternatives \ + --install %{_bindir}/javac javac %{sdkbindir}/javac %{priority} \ + --slave %{_jvmdir}/java java_sdk %{_jvmdir}/%{sdkdir} \ + --slave %{_jvmjardir}/java java_sdk_exports %{_jvmjardir}/%{sdkdir} \ + --slave %{_bindir}/appletviewer appletviewer %{sdkbindir}/appletviewer \ + --slave %{_bindir}/apt apt %{sdkbindir}/apt \ + --slave %{_bindir}/extcheck extcheck %{sdkbindir}/extcheck \ + --slave %{_bindir}/idlj idlj %{sdkbindir}/idlj \ + --slave %{_bindir}/jar jar %{sdkbindir}/jar \ + --slave %{_bindir}/jarsigner jarsigner %{sdkbindir}/jarsigner \ + --slave %{_bindir}/javadoc javadoc %{sdkbindir}/javadoc \ + --slave %{_bindir}/javah javah %{sdkbindir}/javah \ + --slave %{_bindir}/javap javap %{sdkbindir}/javap \ + --slave %{_bindir}/jcmd jcmd %{sdkbindir}/jcmd \ + --slave %{_bindir}/jconsole jconsole %{sdkbindir}/jconsole \ + --slave %{_bindir}/jdb jdb %{sdkbindir}/jdb \ + --slave %{_bindir}/jhat jhat %{sdkbindir}/jhat \ + --slave %{_bindir}/jinfo jinfo %{sdkbindir}/jinfo \ + --slave %{_bindir}/jmap jmap %{sdkbindir}/jmap \ + --slave %{_bindir}/jps jps %{sdkbindir}/jps \ + --slave %{_bindir}/jrunscript jrunscript %{sdkbindir}/jrunscript \ + --slave %{_bindir}/jsadebugd jsadebugd %{sdkbindir}/jsadebugd \ + --slave %{_bindir}/jstack jstack %{sdkbindir}/jstack \ + --slave %{_bindir}/jstat jstat %{sdkbindir}/jstat \ + --slave %{_bindir}/jstatd jstatd %{sdkbindir}/jstatd \ + --slave %{_bindir}/native2ascii native2ascii %{sdkbindir}/native2ascii \ + --slave %{_bindir}/policytool policytool %{sdkbindir}/policytool \ + --slave %{_bindir}/rmic rmic %{sdkbindir}/rmic \ + --slave %{_bindir}/schemagen schemagen %{sdkbindir}/schemagen \ + --slave %{_bindir}/serialver serialver %{sdkbindir}/serialver \ + --slave %{_bindir}/wsgen wsgen %{sdkbindir}/wsgen \ + --slave %{_bindir}/wsimport wsimport %{sdkbindir}/wsimport \ + --slave %{_bindir}/xjc xjc %{sdkbindir}/xjc \ + --slave %{_mandir}/man1/appletviewer.1$ext appletviewer.1$ext \ + %{_mandir}/man1/appletviewer-%{uniquesuffix}.1$ext \ + --slave %{_mandir}/man1/apt.1$ext apt.1$ext \ + %{_mandir}/man1/apt-%{uniquesuffix}.1$ext \ + --slave %{_mandir}/man1/extcheck.1$ext extcheck.1$ext \ + %{_mandir}/man1/extcheck-%{uniquesuffix}.1$ext \ + --slave %{_mandir}/man1/jar.1$ext jar.1$ext \ + %{_mandir}/man1/jar-%{uniquesuffix}.1$ext \ + --slave %{_mandir}/man1/jarsigner.1$ext jarsigner.1$ext \ + %{_mandir}/man1/jarsigner-%{uniquesuffix}.1$ext \ + --slave %{_mandir}/man1/javac.1$ext javac.1$ext \ + %{_mandir}/man1/javac-%{uniquesuffix}.1$ext \ + --slave %{_mandir}/man1/javadoc.1$ext javadoc.1$ext \ + %{_mandir}/man1/javadoc-%{uniquesuffix}.1$ext \ + --slave %{_mandir}/man1/javah.1$ext javah.1$ext \ + %{_mandir}/man1/javah-%{uniquesuffix}.1$ext \ + --slave %{_mandir}/man1/javap.1$ext javap.1$ext \ + %{_mandir}/man1/javap-%{uniquesuffix}.1$ext \ + --slave %{_mandir}/man1/jconsole.1$ext jconsole.1$ext \ + %{_mandir}/man1/jconsole-%{uniquesuffix}.1$ext \ + --slave %{_mandir}/man1/jdb.1$ext jdb.1$ext \ + %{_mandir}/man1/jdb-%{uniquesuffix}.1$ext \ + --slave %{_mandir}/man1/jhat.1$ext jhat.1$ext \ + %{_mandir}/man1/jhat-%{uniquesuffix}.1$ext \ + --slave %{_mandir}/man1/jinfo.1$ext jinfo.1$ext \ + %{_mandir}/man1/jinfo-%{uniquesuffix}.1$ext \ + --slave %{_mandir}/man1/jmap.1$ext jmap.1$ext \ + %{_mandir}/man1/jmap-%{uniquesuffix}.1$ext \ + --slave %{_mandir}/man1/jps.1$ext jps.1$ext \ + %{_mandir}/man1/jps-%{uniquesuffix}.1$ext \ + --slave %{_mandir}/man1/jrunscript.1$ext jrunscript.1$ext \ + %{_mandir}/man1/jrunscript-%{uniquesuffix}.1$ext \ + --slave %{_mandir}/man1/jsadebugd.1$ext jsadebugd.1$ext \ + %{_mandir}/man1/jsadebugd-%{uniquesuffix}.1$ext \ + --slave %{_mandir}/man1/jstack.1$ext jstack.1$ext \ + %{_mandir}/man1/jstack-%{uniquesuffix}.1$ext \ + --slave %{_mandir}/man1/jstat.1$ext jstat.1$ext \ + %{_mandir}/man1/jstat-%{uniquesuffix}.1$ext \ + --slave %{_mandir}/man1/jstatd.1$ext jstatd.1$ext \ + %{_mandir}/man1/jstatd-%{uniquesuffix}.1$ext \ + --slave %{_mandir}/man1/native2ascii.1$ext native2ascii.1$ext \ + %{_mandir}/man1/native2ascii-%{uniquesuffix}.1$ext \ + --slave %{_mandir}/man1/policytool.1$ext policytool.1$ext \ + %{_mandir}/man1/policytool-%{uniquesuffix}.1$ext \ + --slave %{_mandir}/man1/rmic.1$ext rmic.1$ext \ + %{_mandir}/man1/rmic-%{uniquesuffix}.1$ext \ + --slave %{_mandir}/man1/schemagen.1$ext schemagen.1$ext \ + %{_mandir}/man1/schemagen-%{uniquesuffix}.1$ext \ + --slave %{_mandir}/man1/serialver.1$ext serialver.1$ext \ + %{_mandir}/man1/serialver-%{uniquesuffix}.1$ext \ + --slave %{_mandir}/man1/wsgen.1$ext wsgen.1$ext \ + %{_mandir}/man1/wsgen-%{uniquesuffix}.1$ext \ + --slave %{_mandir}/man1/wsimport.1$ext wsimport.1$ext \ + %{_mandir}/man1/wsimport-%{uniquesuffix}.1$ext \ + --slave %{_mandir}/man1/xjc.1$ext xjc.1$ext \ + %{_mandir}/man1/xjc-%{uniquesuffix}.1$ext + +for X in %{origin} %{javaver} ; do + alternatives \ + --install %{_jvmdir}/java-"$X" \ + java_sdk_"$X" %{_jvmdir}/%{sdkdir} %{priority} \ + --slave %{_jvmjardir}/java-"$X" \ + java_sdk_"$X"_exports %{_jvmjardir}/%{sdkdir} +done + +update-alternatives --install %{_jvmdir}/java-%{javaver}-%{origin} java_sdk_%{javaver}_%{origin} %{_jvmdir}/%{sdkdir} %{priority} \ +--slave %{_jvmjardir}/java-%{javaver}-%{origin} java_sdk_%{javaver}_%{origin}_exports %{_jvmjardir}/%{sdkdir} + +update-desktop-database %{_datadir}/applications &> /dev/null || : +/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : + +exit 0 + +%postun devel + alternatives --remove javac %{sdkbindir}/javac + alternatives --remove java_sdk_%{origin} %{_jvmdir}/%{sdkdir} + alternatives --remove java_sdk_%{javaver} %{_jvmdir}/%{sdkdir} + alternatives --remove java_sdk_%{javaver}_%{origin} %{_jvmdir}/%{sdkdir} + +update-desktop-database %{_datadir}/applications &> /dev/null || : + +if [ $1 -eq 0 ] ; then + /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null + /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : +fi + +exit 0 + +%posttrans devel +/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : + + +%post javadoc +alternatives \ + --install %{_javadocdir}/java javadocdir %{_javadocdir}/%{uniquejavadocdir}/api \ + %{priority} + +exit 0 + +%postun javadoc + alternatives --remove javadocdir %{_javadocdir}/%{uniquejavadocdir}/api + +exit 0 + + +%files -f %{name}.files +%{_datadir}/icons/hicolor/*x*/apps/java-%{javaver}.png + + +%files headless -f %{name}.files-headless +%defattr(-,root,root,-) +%doc %{_jvmdir}/%{sdkdir}/ASSEMBLY_EXCEPTION +%doc %{_jvmdir}/%{sdkdir}/LICENSE +%doc %{_jvmdir}/%{sdkdir}/THIRD_PARTY_README +%dir %{_jvmdir}/%{sdkdir} +%{_jvmdir}/%{jrelnk} +%{_jvmjardir}/%{jrelnk} +%{_jvmprivdir}/* +%{jvmjardir} +%dir %{_jvmdir}/%{jredir}/lib/security +%{_jvmdir}/%{jredir}/lib/security/cacerts +%config(noreplace) %{_jvmdir}/%{jredir}/lib/security/US_export_policy.jar +%config(noreplace) %{_jvmdir}/%{jredir}/lib/security/local_policy.jar +%config(noreplace) %{_jvmdir}/%{jredir}/lib/security/java.policy +%config(noreplace) %{_jvmdir}/%{jredir}/lib/security/java.security +%config(noreplace) %{_jvmdir}/%{jredir}/lib/logging.properties +%{_mandir}/man1/java-%{uniquesuffix}.1* +%{_mandir}/man1/keytool-%{uniquesuffix}.1* +%{_mandir}/man1/orbd-%{uniquesuffix}.1* +%{_mandir}/man1/pack200-%{uniquesuffix}.1* +%{_mandir}/man1/rmid-%{uniquesuffix}.1* +%{_mandir}/man1/rmiregistry-%{uniquesuffix}.1* +%{_mandir}/man1/servertool-%{uniquesuffix}.1* +%{_mandir}/man1/tnameserv-%{uniquesuffix}.1* +%{_mandir}/man1/unpack200-%{uniquesuffix}.1* +%config(noreplace) %{_jvmdir}/%{jredir}/lib/security/nss.cfg +%{_jvmdir}/%{jredir}/lib/audio/ +%ifarch %{jit_arches} +%attr(664, root, root) %ghost %{_jvmdir}/%{jredir}/lib/%{archinstall}/server/classes.jsa +%attr(664, root, root) %ghost %{_jvmdir}/%{jredir}/lib/%{archinstall}/client/classes.jsa +%endif +%{_jvmdir}/%{jredir}/lib/%{archinstall}/server/ +%{_jvmdir}/%{jredir}/lib/%{archinstall}/client/ +%{_sysconfdir}/.java/ +%{_sysconfdir}/.java/.systemPrefs +%{_jvmdir}/%{sdkdir}/jre-abrt + + +%files devel +%defattr(-,root,root,-) +%doc %{_jvmdir}/%{sdkdir}/ASSEMBLY_EXCEPTION +%doc %{_jvmdir}/%{sdkdir}/LICENSE +%doc %{_jvmdir}/%{sdkdir}/THIRD_PARTY_README +%dir %{_jvmdir}/%{sdkdir}/bin +%dir %{_jvmdir}/%{sdkdir}/include +%dir %{_jvmdir}/%{sdkdir}/lib +%ifarch %{jit_arches} +%dir %{_jvmdir}/%{sdkdir}/tapset +%endif +%{_jvmdir}/%{sdkdir}/bin/* +%{_jvmdir}/%{sdkdir}/include/* +%{_jvmdir}/%{sdkdir}/lib/* +%ifarch %{jit_arches} +%{_jvmdir}/%{sdkdir}/tapset/*.stp +%endif +%{_jvmjardir}/%{sdkdir} +%{_datadir}/applications/*jconsole.desktop +%{_datadir}/applications/*policytool.desktop +%{_mandir}/man1/appletviewer-%{uniquesuffix}.1* +%{_mandir}/man1/apt-%{uniquesuffix}.1* +%{_mandir}/man1/extcheck-%{uniquesuffix}.1* +%{_mandir}/man1/idlj-%{uniquesuffix}.1* +%{_mandir}/man1/jar-%{uniquesuffix}.1* +%{_mandir}/man1/jarsigner-%{uniquesuffix}.1* +%{_mandir}/man1/javac-%{uniquesuffix}.1* +%{_mandir}/man1/javadoc-%{uniquesuffix}.1* +%{_mandir}/man1/javah-%{uniquesuffix}.1* +%{_mandir}/man1/javap-%{uniquesuffix}.1* +%{_mandir}/man1/jconsole-%{uniquesuffix}.1* +%{_mandir}/man1/jcmd-%{uniquesuffix}.1* +%{_mandir}/man1/jdb-%{uniquesuffix}.1* +%{_mandir}/man1/jhat-%{uniquesuffix}.1* +%{_mandir}/man1/jinfo-%{uniquesuffix}.1* +%{_mandir}/man1/jmap-%{uniquesuffix}.1* +%{_mandir}/man1/jps-%{uniquesuffix}.1* +%{_mandir}/man1/jrunscript-%{uniquesuffix}.1* +%{_mandir}/man1/jsadebugd-%{uniquesuffix}.1* +%{_mandir}/man1/jstack-%{uniquesuffix}.1* +%{_mandir}/man1/jstat-%{uniquesuffix}.1* +%{_mandir}/man1/jstatd-%{uniquesuffix}.1* +%{_mandir}/man1/native2ascii-%{uniquesuffix}.1* +%{_mandir}/man1/policytool-%{uniquesuffix}.1* +%{_mandir}/man1/rmic-%{uniquesuffix}.1* +%{_mandir}/man1/schemagen-%{uniquesuffix}.1* +%{_mandir}/man1/serialver-%{uniquesuffix}.1* +%{_mandir}/man1/wsgen-%{uniquesuffix}.1* +%{_mandir}/man1/wsimport-%{uniquesuffix}.1* +%{_mandir}/man1/xjc-%{uniquesuffix}.1* +%ifarch %{jit_arches} +%{tapsetroot} +%endif + +%files demo -f %{name}-demo.files +%defattr(-,root,root,-) +%doc %{_jvmdir}/%{sdkdir}/LICENSE + +%files src +%defattr(-,root,root,-) +%doc README.src +%{_jvmdir}/%{sdkdir}/src.zip + +%files javadoc +%defattr(-,root,root,-) +%doc %{_javadocdir}/%{uniquejavadocdir} +%doc %{buildoutputdir}/j2sdk-image/jre/LICENSE + +%files accessibility +%{_jvmdir}/%{jredir}/lib/%{archinstall}/libatk-wrapper.so +%{_jvmdir}/%{jredir}/lib/ext/java-atk-wrapper.jar +%{_jvmdir}/%{jredir}/lib/accessibility.properties + +%changelog +* Thu Oct 31 2013 Jiri Vanek - 1.7.0.40-2.4.3.4.fel7 +- Removed obsoletes for java-1.6.0-openjdk* , until decided its presence in el7 +- Resolves:rhbz#1018680 + +* Thu Oct 31 2013 Jiri Vanek - 1.7.0.40-2.4.3.3.fel7 +- just bumped release, need to confirm, that patch121, FixPPC64StackOverflow.patch + really works +- Resolves:rhbz#1018680 + +* Wed Oct 16 2013 Jiri Vanek - 1.7.0.40-2.4.3.2.fel7 +- added and applied patch121, FixPPC64StackOverflow.patch +- all redundant ppc64 strings replaced by power64 macro +- Resolves:rhbz#1018680 + +* Wed Oct 16 2013 Jiri Vanek - 1.7.0.40-2.4.3.1.fel7 +- updated to new CPU sources 2.4.3 +- Resolves:rhbz#1018680 + +* Mon Oct 14 2013 Jiri Vanek - 1.7.0.40-2.4.3.0.fel7 +- updated to latest CPU sources 2.4.3 +- Resolves:rhbz#1018680 + +* Mon Oct 14 2013 Jiri Vanek - 1.7.0.40-2.4.2.12.fel7 +- jdk splitted to headless and rest +- Resolves:rhbz#875408 + +* Fri Oct 04 2013 Jiri Vanek - 1.7.0.40-2.4.2.11.fel7 +- another tapset fix +- Resolves:rhbz#875408 + +* Fri Oct 04 2013 Jiri Vanek - 1.7.0.40-2.4.2.10.fel7 +- abrt changed to soft dependece +- Resolves:rhbz#875408 + +* Thu Oct 03 2013 Jiri Vanek - 1.7.0.40-2.4.2.9.el7 +- renamed tapset source to be "versioned" +- improved agent placement +- Resolves:rhbz#875408 + +* Wed Oct 02 2013 Jiri Vanek - 1.7.0.40-2.4.2.8.el7 +- updated tapset to current head (825824) +- Resolves:rhbz#875408 + +* Tue Oct 01 2013 Jiri Vanek - 1.7.0.40-2.4.2.7.el7 +- fixed incorrect _jvmdir/jre-javaver_origin to _jvmdir/jre-javaver-origin link +- Resolves:rhbz#875408 + +* Tue Oct 01 2013 Jiri Vanek - 1.7.0.40-2.4.2.6.el7 +- syncing with f20 - abrt connector +- Resolves:rhbz#875408 + +* Tue Oct 01 2013 Jiri Vanek - 1.7.0.40-2.4.2.3.el7 +- syncing with f19/rhel-6.5 +- Resolves:rhbz#875408 + + +* Wed Aug 07 2013 Deepak Bhole - 1.7.0.25-2.3.12.3.el7 +- Removed obsoletes for java-1.6.0-openjdk* + +* Fri Jul 26 2013 Jiri Vanek - 1.7.0.25-2.3.12.2.el7 +- refreshed icedtea7-forest 2.3.12 +- fix broken jre_exports alternatives links (thanx to orion bug #979128) + +* Thu Jul 25 2013 Jiri Vanek - 1.7.0.25-2.3.11.0.el7 +- added new alternatives jre-1.7.0-openjdk and java-1.7.0-openjdk +- finally merged arm and main source tarballs +- updated to icedtea 2.3.11 + - http://blog.fuseyism.com/index.php/2013/07/25/icedtea-2-3-11-released/ +- added removal of new jre-1.7.0-openjdk and java-1.7.0-openjdk alternatives +- removed patch 400, rhino for 2.1 and other 2.1 conditional stuff +- removed patch 103 arm-fixes.patch +- removed "dir" from files which was duplicating jre in sdk + +* Fri Jul 19 2013 Jiri Vanek - 1.7.0.25-2.3.10.6.el7 +- jrelnk is now just lnk, everything is pointing through jredir + +* Thu Jul 18 2013 Jiri Vanek - 1.7.0.25-2.3.10.6.el7 +- minor cleaning +- sdklnk removed, and substitued by sdkdir + +* Wed Jul 03 2013 Jiri Vanek - 1.7.0.25-2.3.10.5.fel7 +- moved to xz compression of sources +- updated 2.1 tarball + +* Thu Jun 27 2013 Jiri Vanek - 1.7.0.25-2.3.10.4.el7 +- Sync with upstream IcedTea7-forest 2.3.10 tag +- Fixes regressions as introduced with 1.7.0.25-2.3.10.3.el6: + rhbz#978005, rhbz#977979, rhbz#976693, IcedTeaBZ#1487. +- all patch commands repalced by patch macro + - updated java-1.7.0-openjdk-ppc-zero-hotspot.patch to pass without loose patching + +* Wed Jun 19 2013 Jiri Vanek - 1.7.0.25-2.3.10.3.el7 +- update of IcedTea7-forest 2.3.10 tarball +- removed patch1000 MBeanFix.patch to fix regressions caused by security patches + + +* Thu Jun 13 2013 Jiri Vanek - 1.7.0.25-2.3.10.2.el7 +- added patch1000 MBeanFix.patch to fix regressions caused by security patches + +* Thu Jun 13 2013 Jiri Vanek - 1.7.0.25-2.3.10.1.el7 +- arm tarball updated to 2.1.9 +- build bumped to 25 + +* Wed Jun 12 2013 Jiri Vanek - 1.7.0.19-2.3.10.0.el7 +- fixed RH972717 by enabling patch110 java-1.7.0-openjdk-nss-icedtea-e9c857dcb964.patch +- temporarly swithced to intree lcms as it have security fixes (patch 500) + - added GENSRCDIR="$PWD/generated.build" to be able to + - removed (build)requires lcms2(-devel) +- Updated to latest IcedTea7-forest 2.3.10 + +* Wed Jun 05 2013 Jiri Vanek - 1.7.0.19-2.3.9.14.fc19 +- Added client/server directories so they can be owned +- Renamed patch 107 to 200 +- Added nss support from 6.5 +- Added fix for RH857717, owned /etc/.java/ and /etc/.java/.systemPrefs +- Removed ant-nodeps, should not be needed + +* Tue May 28 2013 Jiri Vanek - 1.7.0.19-2.3.9.13.el7 +- javadoc put into fully versioned directory, but without arch (to be kept noarch) + - uniquejavadocdir +- updated to latest 2.3.9 tarball - fixing the rhbz#967436 + +* Mon May 27 2013 Omair Majid - 1.7.0.19-2.3.9.12.el7 +- Allowed multiple OpenJDKs to be installed in parallel +- Removed archname +- Added arch to all, not only multilib arches +- uniquesuffix is now holding fully versioned name +- Intorduced source11 remove-buildids.sh + +* Fri May 17 2013 Omair Majid - 1.7.0.19-2.3.9.12.el7 +- Replace %{name} with %{uniquesuffix} where it's used as a unique suffix. + +* Thu May 16 2013 Jiri Vanek +- added variable arm_arches as restriction to some cases of not jit_arches + +* Tue May 14 2013 Jiri Vanek +- patch402 gstackbounds.patch applied only to jit arches +- patch403 PStack-808293.patch likewise + +* Mon May 13 2013 Jiri Vanek +- initial, not buildable, sync with f19