/hg/release/icedtea6-1.10: 7 new changesets
andrew at icedtea.classpath.org
andrew at icedtea.classpath.org
Tue Oct 16 13:25:00 PDT 2012
changeset 6df81d93af9c in /hg/release/icedtea6-1.10
details: http://icedtea.classpath.org/hg/release/icedtea6-1.10?cmd=changeset;node=6df81d93af9c
author: Andrew John Hughes <ahughes at redhat.com>
date: Fri Oct 12 02:18:24 2012 +0100
Add 2012/10/16 security updates.
2012-10-11 Andrew John Hughes <gnu.andrew at redhat.com>
* Makefile.am:
(SECURITY_PATCHES): Add new patches.
* patches/ecj/override.patch:
Add new cases in P11Key and RMIConnectionImpl
introduced by security patches.
* patches/ssl.patch:
Removed old unneeded patch which breaks with
this update.
* patches/security/20111018/7092186.patch:
Backport of patch added to OpenJDK6 by Oracle
as part of the last security update but not
included in the bundle delivered ahead of time.
* patches/security/20121016/6631398.patch,
* patches/security/20121016/7093490.patch,
* patches/security/20121016/7143535.patch,
* patches/security/20121016/7158801.patch,
* patches/security/20121016/7167656.patch,
* patches/security/20121016/7169884.patch,
* patches/security/20121016/7169888.patch,
* patches/security/20121016/7172522.patch,
* patches/security/20121016/7176337.patch,
* patches/security/20121016/7186286.patch,
* patches/security/20121016/7189103.patch,
* patches/security/20121016/7189490.patch,
* patches/security/20121016/7189567.patch,
* patches/security/20121016/7192975.patch,
* patches/security/20121016/7195194.patch,
* patches/security/20121016/7195917.patch,
* patches/security/20121016/7195919.patch,
* patches/security/20121016/7198296.patch,
* patches/security/20121016/7198606.patch,
* patches/security/20121016/hs20/7158800.patch,
* patches/security/20121016/hs20/7158804.patch,
* patches/security/20121016/original/7158800.patch,
* patches/security/20121016/original/7158804.patch:
New patches.
changeset bab6ae8c1c86 in /hg/release/icedtea6-1.10
details: http://icedtea.classpath.org/hg/release/icedtea6-1.10?cmd=changeset;node=bab6ae8c1c86
author: Andrew John Hughes <ahughes at redhat.com>
date: Fri Oct 12 02:20:06 2012 +0100
Update with latest security fixes.
2012-10-11 Andrew John Hughes <gnu.andrew at redhat.com>
* NEWS:
Update with latest security fixes.
changeset 1fc1f8fb1d66 in /hg/release/icedtea6-1.10
details: http://icedtea.classpath.org/hg/release/icedtea6-1.10?cmd=changeset;node=1fc1f8fb1d66
author: Andrew John Hughes <ahughes at redhat.com>
date: Fri Oct 12 03:03:03 2012 +0100
Merge
changeset 1277ee79b37c in /hg/release/icedtea6-1.10
details: http://icedtea.classpath.org/hg/release/icedtea6-1.10?cmd=changeset;node=1277ee79b37c
author: Andrew John Hughes <ahughes at redhat.com>
date: Fri Oct 12 19:33:48 2012 +0100
Prepare for 1.10.10.
2012-10-12 Andrew John Hughes <gnu.andrew at redhat.com>
* NEWS: Set release date for 1.10.10.
* configure.ac: Bump to 1.10.10.
changeset f51056fa74b0 in /hg/release/icedtea6-1.10
details: http://icedtea.classpath.org/hg/release/icedtea6-1.10?cmd=changeset;node=f51056fa74b0
author: Andrew John Hughes <ahughes at redhat.com>
date: Mon Oct 15 19:45:41 2012 +0100
S7175845: "jar uf" changes file permissions unexpectedly
S7177216: native2ascii changes file permissions of input file
changeset fdde7e12b1e5 in /hg/release/icedtea6-1.10
details: http://icedtea.classpath.org/hg/release/icedtea6-1.10?cmd=changeset;node=fdde7e12b1e5
author: Andrew John Hughes <ahughes at redhat.com>
date: Tue Oct 16 16:13:14 2012 +0100
S7199153: TEST_BUG: try-with-resources syntax pushed to 6-open repo
2012-10-15 Andrew John Hughes <gnu.andrew at redhat.com>
* Makefile.am:
(ICEDTEA_PATCHES): Add new patch.
* NEWS: Mention S7199153.
* patches/openjdk/7199153-try_with_resources_pushed_to_6.patch:
Added to fix tests from previous commit.
changeset 9e76bb826728 in /hg/release/icedtea6-1.10
details: http://icedtea.classpath.org/hg/release/icedtea6-1.10?cmd=changeset;node=9e76bb826728
author: Andrew John Hughes <ahughes at redhat.com>
date: Tue Oct 16 21:24:35 2012 +0100
Added tag icedtea6-1.10.10 for changeset fdde7e12b1e5
diffstat:
.hgtags | 1 +
ChangeLog | 78 +
Makefile.am | 30 +-
NEWS | 32 +-
acinclude.m4 | 4 +-
configure.ac | 2 +-
patches/ecj/override.patch | 22 +
patches/openjdk/7175845-jar_uf_changes_file_permissions.patch | 113 +
patches/openjdk/7177216-native2ascii_changes_file_permissions.patch | 110 +
patches/openjdk/7199153-try_with_resources_pushed_to_6.patch | 194 +
patches/security/20111018/7092186.patch | 32 +
patches/security/20121016/6631398.patch | 20 +
patches/security/20121016/7093490.patch | 28 +
patches/security/20121016/7143535.patch | 31 +
patches/security/20121016/7158801.patch | 30 +
patches/security/20121016/7167656.patch | 75 +
patches/security/20121016/7169884.patch | 349 ++
patches/security/20121016/7169888.patch | 125 +
patches/security/20121016/7172522.patch | 36 +
patches/security/20121016/7176337.patch | 29 +
patches/security/20121016/7186286.patch | 552 +++
patches/security/20121016/7189103.patch | 39 +
patches/security/20121016/7189490.patch | 55 +
patches/security/20121016/7189567.patch | 95 +
patches/security/20121016/7192975.patch | 35 +
patches/security/20121016/7195194.patch | 29 +
patches/security/20121016/7195917.patch | 88 +
patches/security/20121016/7195919.patch | 63 +
patches/security/20121016/7198296.patch | 114 +
patches/security/20121016/7198606.patch | 28 +
patches/security/20121016/hs20/7158800.patch | 1413 ++++++++++
patches/security/20121016/hs20/7158804.patch | 28 +
patches/security/20121016/original/7158800.patch | 1389 +++++++++
patches/security/20121016/original/7158804.patch | 19 +
patches/ssl.patch | 43 -
35 files changed, 5281 insertions(+), 50 deletions(-)
diffs (truncated from 5523 to 500 lines):
diff -r d64dd8e0811e -r 9e76bb826728 .hgtags
--- a/.hgtags Wed Sep 05 11:43:29 2012 +0200
+++ b/.hgtags Tue Oct 16 21:24:35 2012 +0100
@@ -34,3 +34,4 @@
78c05cb3e3c770ebf53babfb4bc825cd059d3b57 icedtea6-1.10.7
b69d3219265a08e9eea4c47d7acfb32465be6070 icedtea6-1.10.8
27cee12e2bc9cd27d97d68ea53e1bb005416d4e9 icedtea6-1.10.9
+fdde7e12b1e503d84a6bab57d8a0c29cfb2b0f21 icedtea6-1.10.10
diff -r d64dd8e0811e -r 9e76bb826728 ChangeLog
--- a/ChangeLog Wed Sep 05 11:43:29 2012 +0200
+++ b/ChangeLog Tue Oct 16 21:24:35 2012 +0100
@@ -1,3 +1,81 @@
+2012-10-15 Andrew John Hughes <gnu.andrew at redhat.com>
+
+ * Makefile.am:
+ (ICEDTEA_PATCHES): Add new patch.
+ * NEWS: Mention S7199153.
+ * patches/openjdk/7199153-try_with_resources_pushed_to_6.patch:
+ Added to fix tests from previous commit.
+
+2012-10-15 Andrew John Hughes <gnu.andrew at redhat.com>
+
+ * Makefile.am:
+ (ICEDTEA_PATCHES): Add new patches.
+ * NEWS:
+ Mention S7175845 and S7177216.
+ * patches/openjdk/7175845-jar_uf_changes_file_permissions.patch,
+ * patches/openjdk/7177216-native2ascii_changes_file_permissions.patch:
+ New backports to fix regressions caused by
+ S7143606.
+
+2012-10-12 Andrew John Hughes <gnu.andrew at redhat.com>
+
+ * NEWS: Set release date for 1.10.10.
+ * configure.ac: Bump to 1.10.10.
+
+2012-10-11 Andrew John Hughes <gnu.andrew at redhat.com>
+
+ * NEWS:
+ Update with latest security fixes.
+
+2012-10-11 Andrew John Hughes <gnu.andrew at redhat.com>
+
+ * Makefile.am:
+ (SECURITY_PATCHES): Add new patches.
+ * patches/ecj/override.patch:
+ Add new cases in P11Key and RMIConnectionImpl
+ introduced by security patches.
+ * patches/ssl.patch:
+ Removed old unneeded patch which breaks with
+ this update.
+ * patches/security/20111018/7092186.patch:
+ Backport of patch added to OpenJDK6 by Oracle
+ as part of the last security update but not
+ included in the bundle delivered ahead of time.
+ * patches/security/20121016/6631398.patch,
+ * patches/security/20121016/7093490.patch,
+ * patches/security/20121016/7143535.patch,
+ * patches/security/20121016/7158801.patch,
+ * patches/security/20121016/7167656.patch,
+ * patches/security/20121016/7169884.patch,
+ * patches/security/20121016/7169888.patch,
+ * patches/security/20121016/7172522.patch,
+ * patches/security/20121016/7176337.patch,
+ * patches/security/20121016/7186286.patch,
+ * patches/security/20121016/7189103.patch,
+ * patches/security/20121016/7189490.patch,
+ * patches/security/20121016/7189567.patch,
+ * patches/security/20121016/7192975.patch,
+ * patches/security/20121016/7195194.patch,
+ * patches/security/20121016/7195917.patch,
+ * patches/security/20121016/7195919.patch,
+ * patches/security/20121016/7198296.patch,
+ * patches/security/20121016/7198606.patch,
+ * patches/security/20121016/hs20/7158800.patch,
+ * patches/security/20121016/hs20/7158804.patch,
+ * patches/security/20121016/original/7158800.patch,
+ * patches/security/20121016/original/7158804.patch:
+ New patches.
+
+2012-03-19 Andrew John Hughes <ahughes at redhat.com>
+
+ PR 1194:
+ * acinclude.m4:
+ (IT_CHECK_FOR_JDK): Update JDK home directory
+ check list, adding some missing 1.6 entries
+ and removing generic ones which may now pick
+ up an unwanted 1.7 installation.
+ * NEWS: Updated.
+
2012-09-05 Matthias Klose <doko at ubuntu.com>
* configure.ac: Remove the Xp header and library checks.
diff -r d64dd8e0811e -r 9e76bb826728 Makefile.am
--- a/Makefile.am Wed Sep 05 11:43:29 2012 +0200
+++ b/Makefile.am Tue Oct 16 21:24:35 2012 +0100
@@ -207,6 +207,7 @@
patches/security/20111018/7096936.patch \
patches/security/20111018/7046794.patch \
patches/security/20111018/7077466.patch \
+ patches/security/20111018/7092186.patch \
patches/security/20120214/7082299.patch \
patches/security/20120214/7088367.patch \
patches/security/20120214/7110683.patch \
@@ -229,7 +230,28 @@
patches/security/20120612/7160757.patch \
patches/security/20120830/7162476-xmldecoder_via_classfinder.patch \
patches/security/20120830/7163201-simplify_toolkit_internal_references.patch \
- patches/security/20120830/7182135-impossible_to_use_some_editors_directly.patch
+ patches/security/20120830/7182135-impossible_to_use_some_editors_directly.patch \
+ patches/security/20121016/6631398.patch \
+ patches/security/20121016/7093490.patch \
+ patches/security/20121016/7143535.patch \
+ patches/security/20121016/${HSBUILD}/7158800.patch \
+ patches/security/20121016/7158801.patch \
+ patches/security/20121016/${HSBUILD}/7158804.patch \
+ patches/security/20121016/7167656.patch \
+ patches/security/20121016/7169884.patch \
+ patches/security/20121016/7169888.patch \
+ patches/security/20121016/7172522.patch \
+ patches/security/20121016/7176337.patch \
+ patches/security/20121016/7186286.patch \
+ patches/security/20121016/7189103.patch \
+ patches/security/20121016/7189490.patch \
+ patches/security/20121016/7189567.patch \
+ patches/security/20121016/7192975.patch \
+ patches/security/20121016/7195194.patch \
+ patches/security/20121016/7195917.patch \
+ patches/security/20121016/7195919.patch \
+ patches/security/20121016/7198296.patch \
+ patches/security/20121016/7198606.patch
SPECIAL_SECURITY_PATCH = patches/security/20120214/7112642.patch
@@ -266,7 +288,6 @@
patches/version.patch \
patches/hotspot/$(HSBUILD)/version-hotspot.patch \
patches/hotspot/$(HSBUILD)/text-relocations.patch \
- patches/ssl.patch \
patches/rmi_amd64.patch \
patches/tools.patch \
patches/use-system-tzdata.patch \
@@ -403,7 +424,10 @@
patches/openjdk/7185678-xmenuitem_peer_npe.patch \
patches/openjdk/6815182-gssapi_spnego_does_not_work_with_server.patch \
patches/openjdk/6979329-ccacheinput_stream_fails_to_read_ticket_cache.patch \
- patches/openjdk/7110373-krb5_test_infrastructure.patch
+ patches/openjdk/7110373-krb5_test_infrastructure.patch \
+ patches/openjdk/7175845-jar_uf_changes_file_permissions.patch \
+ patches/openjdk/7177216-native2ascii_changes_file_permissions.patch \
+ patches/openjdk/7199153-try_with_resources_pushed_to_6.patch
if WITH_ALT_HSBUILD
ICEDTEA_PATCHES += \
diff -r d64dd8e0811e -r 9e76bb826728 NEWS
--- a/NEWS Wed Sep 05 11:43:29 2012 +0200
+++ b/NEWS Tue Oct 16 21:24:35 2012 +0100
@@ -9,7 +9,37 @@
CVE-XXXX-YYYY: http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=XXXX-YYYY
-New in release 1.10.10 (2012-XX-XX):
+New in release 1.10.10 (2012-10-16):
+
+* Security fixes
+ - S6631398, CVE-2012-3216: FilePermission improved path checking
+ - S7093490: adjust package access in rmiregistry
+ - S7143535, CVE-2012-5068: ScriptEngine corrected permissions
+ - S7167656, CVE-2012-5077: Multiple Seeders are being created
+ - S7169884, CVE-2012-5073: LogManager checks do not work correctly for sub-types
+ - S7169888, CVE-2012-5075: Narrowing resource definitions in JMX RMI connector
+ - S7172522, CVE-2012-5072: Improve DomainCombiner checking
+ - S7186286, CVE-2012-5081: TLS implementation to better adhere to RFC
+ - S7189103, CVE-2012-5069: Executors needs to maintain state
+ - S7189490: More improvements to DomainCombiner checking
+ - S7189567, CVE-2012-5085: java net obselete protocol
+ - S7192975, CVE-2012-5071: Conditional usage check is wrong
+ - S7195194, CVE-2012-5084: Better data validation for Swing
+ - S7195917, CVE-2012-5086: XMLDecoder parsing at close-time should be improved
+ - S7195919, CVE-2012-5979: (sl) ServiceLoader can throw CCE without needing to create instance
+ - S7198296, CVE-2012-5089: Refactor classloader usage
+ - S7158800: Improve storage of symbol tables
+ - S7158801: Improve VM CompileOnly option
+ - S7158804: Improve config file parsing
+ - S7176337: Additional changes needed for 7158801 fix
+ - S7198606, CVE-2012-4416: Improve VM optimization
+* Backports
+ - S7092186: adjust package access in rmiregistry
+* Bug fixes
+ - PR1194: IcedTea tries to build with /usr/lib/jvm/java-openjdk (now a 1.7 VM) by default
+ - S7175845: "jar uf" changes file permissions unexpectedly
+ - S7177216: native2ascii changes file permissions of input file
+ - S7199153: TEST_BUG: try-with-resources syntax pushed to 6-open repo
New in release 1.10.9 (2012-08-31):
diff -r d64dd8e0811e -r 9e76bb826728 acinclude.m4
--- a/acinclude.m4 Wed Sep 05 11:43:29 2012 +0200
+++ b/acinclude.m4 Tue Oct 16 21:24:35 2012 +0100
@@ -1140,9 +1140,9 @@
if test "x${enable_bootstrap}" = "xyes"; then
BOOTSTRAP_VMS="/usr/lib/jvm/java-gcj /usr/lib/jvm/gcj-jdk /usr/lib/jvm/cacao";
fi
- for dir in ${BOOTSTRAP_VMS} /usr/lib/jvm/java-openjdk \
+ for dir in ${BOOTSTRAP_VMS} /usr/lib/jvm/java-1.6.0 \
/usr/lib/jvm/icedtea6 /usr/lib/jvm/java-6-openjdk \
- /usr/lib/jvm/openjdk /usr/lib/jvm/java-icedtea ; do
+ /usr/lib/jvm/java-1.6.0-openjdk /usr/lib/jvm/icedtea-6 ; do
if test -d $dir; then
SYSTEM_JDK_DIR=$dir
break
diff -r d64dd8e0811e -r 9e76bb826728 configure.ac
--- a/configure.ac Wed Sep 05 11:43:29 2012 +0200
+++ b/configure.ac Tue Oct 16 21:24:35 2012 +0100
@@ -1,4 +1,4 @@
-AC_INIT([icedtea6],[1.10.10pre],[distro-pkg-dev at openjdk.java.net])
+AC_INIT([icedtea6],[1.10.10],[distro-pkg-dev at openjdk.java.net])
AM_INIT_AUTOMAKE([1.9 tar-pax foreign])
AC_CONFIG_FILES([Makefile])
diff -r d64dd8e0811e -r 9e76bb826728 patches/ecj/override.patch
--- a/patches/ecj/override.patch Wed Sep 05 11:43:29 2012 +0200
+++ b/patches/ecj/override.patch Tue Oct 16 21:24:35 2012 +0100
@@ -229,3 +229,25 @@
public int compareTo(X509IssuerSerial another) {
int cissuer = issuer.toString()
.compareTo(another.issuer.toString());
+diff -Nru openjdk-ecj.orig/jdk/src/share/classes/javax/management/remote/rmi/RMIConnectionImpl.java openjdk-ecj/jdk/src/share/classes/javax/management/remote/rmi/RMIConnectionImpl.java
+--- openjdk-ecj.orig/jdk/src/share/classes/javax/management/remote/rmi/RMIConnectionImpl.java 2012-10-11 19:58:37.130814619 +0100
++++ openjdk-ecj/jdk/src/share/classes/javax/management/remote/rmi/RMIConnectionImpl.java 2012-10-11 19:59:39.699829277 +0100
+@@ -168,7 +168,6 @@
+ this.defaultContextClassLoader =
+ AccessController.doPrivileged(
+ new PrivilegedAction<ClassLoader>() {
+- @Override
+ public ClassLoader run() {
+ return new CombinedClassLoader(Thread.currentThread().getContextClassLoader(),
+ dcl);
+diff -Nru openjdk-ecj.orig/jdk/src/share/classes/sun/security/pkcs11/P11Key.java openjdk-ecj/jdk/src/share/classes/sun/security/pkcs11/P11Key.java
+--- openjdk-ecj.orig/jdk/src/share/classes/sun/security/pkcs11/P11Key.java 2012-10-11 20:18:07.340676704 +0100
++++ openjdk-ecj/jdk/src/share/classes/sun/security/pkcs11/P11Key.java 2012-10-11 20:17:40.092039288 +0100
+@@ -216,7 +216,6 @@
+ /**
+ * Return bit length of the key.
+ */
+- @Override
+ public int length() {
+ return keyLength;
+ }
diff -r d64dd8e0811e -r 9e76bb826728 patches/openjdk/7175845-jar_uf_changes_file_permissions.patch
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/openjdk/7175845-jar_uf_changes_file_permissions.patch Tue Oct 16 21:24:35 2012 +0100
@@ -0,0 +1,113 @@
+# HG changeset patch
+# User mbankal
+# Date 1342460916 25200
+# Node ID 2366192c7fcb928a2adec2bdf08138688dac0423
+# Parent 0e34d43263864db83322f337262fbb2be3be5d17
+7175845: "jar uf" changes file permissions unexpectedly
+Reviewed-by: ohair
+Contributed-by: mala.bankal at oracle.com
+
+diff --git a/src/share/classes/sun/tools/jar/Main.java b/src/share/classes/sun/tools/jar/Main.java
+--- openjdk/jdk/src/share/classes/sun/tools/jar/Main.java
++++ openjdk/jdk/src/share/classes/sun/tools/jar/Main.java
+@@ -134,7 +134,7 @@
+ File dir = file.getParentFile();
+ if (dir == null)
+ dir = new File(".");
+- return sun.misc.IOUtils.createTempFile("jartmp", null, dir);
++ return File.createTempFile("jartmp", null, dir);
+ }
+
+ private boolean ok;
+diff --git a/test/tools/jar/UpdateJar.java b/test/tools/jar/UpdateJar.java
+new file mode 100644
+--- /dev/null
++++ openjdk/jdk/test/tools/jar/UpdateJar.java
+@@ -0,0 +1,87 @@
++/*
++ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
++ *
++ * This code is free software; you can redistribute it and/or modify it
++ * under the terms of the GNU General Public License version 2 only, as
++ * published by the Free Software Foundation.
++ *
++ * This code is distributed in the hope that it will be useful, but WITHOUT
++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
++ * version 2 for more details (a copy is included in the LICENSE file that
++ * accompanied this code).
++ *
++ * You should have received a copy of the GNU General Public License version
++ * 2 along with this work; if not, write to the Free Software Foundation,
++ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
++ *
++ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
++ * or visit www.oracle.com if you need additional information or have any
++ * questions.
++ */
++
++/**
++ * @test
++ * @bug 7175845
++ * @summary jar -uf should not change file permission
++ */
++
++import java.io.*;
++import java.nio.file.*;
++import java.nio.file.attribute.*;
++import java.util.Set;
++import sun.tools.jar.Main;
++
++public class UpdateJar {
++
++ private static void cleanup(String... fnames) throws Throwable {
++ for (String fname : fnames) {
++ Files.deleteIfExists(Paths.get(fname));
++ }
++ }
++
++ public static void realMain(String[] args) throws Throwable {
++ if (!System.getProperty("os.name").startsWith("Windows")) {
++ String jar = "testUpdateJar.jar";
++ String e0 = "testUpdateJar_entry0.txt";
++ String e1 = "testUpdateJar_entry1.txt";
++ cleanup(jar, e0, e1);
++ try {
++ try (FileOutputStream fos0 = new FileOutputStream(e0);
++ FileOutputStream fos1 = new FileOutputStream(e1)) {
++ fos0.write(0);
++ fos1.write(0);
++ }
++ String[] jarArgs = new String[] {"cfM0", jar, e0};
++ if (!new Main(System.out, System.err, "jar").run(jarArgs)) {
++ fail("Could not create jar file.");
++ }
++ Set<PosixFilePermission> pm = Files.getPosixFilePermissions(Paths.get(jar));
++ jarArgs = new String[] {"uf", jar, e1};
++ if (!new Main(System.out, System.err, "jar").run(jarArgs)) {
++ fail("Could not create jar file.");
++ }
++ equal(pm, Files.getPosixFilePermissions(Paths.get(jar)));
++ } finally {
++ cleanup(jar, e0, e1);
++ }
++ }
++ }
++
++ //--------------------- Infrastructure ---------------------------
++ static volatile int passed = 0, failed = 0;
++ static void pass() {passed++;}
++ static void fail() {failed++; Thread.dumpStack();}
++ static void fail(String msg) {System.out.println(msg); fail();}
++ static void unexpected(Throwable t) {failed++; t.printStackTrace();}
++ static void check(boolean cond) {if (cond) pass(); else fail();}
++ static void equal(Object x, Object y) {
++ if (x == null ? y == null : x.equals(y)) pass();
++ else fail(x + " not equal to " + y);}
++ public static void main(String[] args) throws Throwable {
++ try {realMain(args);} catch (Throwable t) {unexpected(t);}
++ System.out.println("\nPassed = " + passed + " failed = " + failed);
++ if (failed > 0) throw new AssertionError("Some tests failed");}
++}
++
diff -r d64dd8e0811e -r 9e76bb826728 patches/openjdk/7177216-native2ascii_changes_file_permissions.patch
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/openjdk/7177216-native2ascii_changes_file_permissions.patch Tue Oct 16 21:24:35 2012 +0100
@@ -0,0 +1,110 @@
+# HG changeset patch
+# User mbankal
+# Date 1342030130 25200
+# Node ID 0e34d43263864db83322f337262fbb2be3be5d17
+# Parent 99b43838c5d0a55a92bccbb62e6df5ee685978b6
+7177216: native2ascii changes file permissions of input file
+Reviewed-by: ohair
+
+diff --git a/src/share/classes/sun/tools/native2ascii/Main.java b/src/share/classes/sun/tools/native2ascii/Main.java
+--- openjdk/jdk/src/share/classes/sun/tools/native2ascii/Main.java
++++ openjdk/jdk/src/share/classes/sun/tools/native2ascii/Main.java
+@@ -237,7 +237,7 @@
+ if (tempDir == null)
+ tempDir = new File(System.getProperty("user.dir"));
+
+- tempFile = sun.misc.IOUtils.createTempFile("_N2A", ".TMP", tempDir);
++ tempFile = File.createTempFile("_N2A", ".TMP", tempDir);
+ tempFile.deleteOnExit();
+
+ try {
+diff --git a/test/sun/tools/native2ascii/Permission.java b/test/sun/tools/native2ascii/Permission.java
+new file mode 100644
+--- /dev/null
++++ openjdk/jdk/test/sun/tools/native2ascii/Permission.java
+@@ -0,0 +1,85 @@
++/*
++ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
++ *
++ * This code is free software; you can redistribute it and/or modify it
++ * under the terms of the GNU General Public License version 2 only, as
++ * published by the Free Software Foundation.
++ *
++ * This code is distributed in the hope that it will be useful, but WITHOUT
++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
++ * version 2 for more details (a copy is included in the LICENSE file that
++ * accompanied this code).
++ *
++ * You should have received a copy of the GNU General Public License version
++ * 2 along with this work; if not, write to the Free Software Foundation,
++ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
++ *
++ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
++ * or visit www.oracle.com if you need additional information or have any
++ * questions.
++ */
++
++/**
++ * @test
++ * @bug 7177216
++ * @summary resulting file of native2ascii should have normal permission
++ */
++
++import java.io.*;
++import java.nio.file.*;
++import java.nio.file.attribute.*;
++import sun.tools.native2ascii.Main;
++
++public class Permission {
++
++ private static void cleanup(String... fnames) throws Throwable {
++ for (String fname : fnames) {
++ Files.deleteIfExists(Paths.get(fname));
++ }
++ }
++
++ public static void realMain(String[] args) throws Throwable {
++ if (!System.getProperty("os.name").startsWith("Windows")) {
++ String src = "native2ascii_permtest_src";
++ String dst = "native2ascii_permtest_dst";
++
++ cleanup(src, dst);
++ try {
++ try (FileOutputStream fos = new FileOutputStream(src)) {
++ fos.write('a'); fos.write('b'); fos.write('c');
++ }
++ String[] n2aArgs = new String[] {"-encoding", "utf8", src, dst};
++ if (!new Main().convert(n2aArgs)) {
++ fail("n2a failed.");
++ }
++ equal(Files.getPosixFilePermissions(Paths.get(src)),
++ Files.getPosixFilePermissions(Paths.get(dst)));
++ String[] a2nArgs = new String[] {"-reverse", "-encoding", "utf8", dst, src};
++ if (!new Main().convert(a2nArgs)) {
++ fail("a2n failed.");
++ }
++ equal(Files.getPosixFilePermissions(Paths.get(src)),
++ Files.getPosixFilePermissions(Paths.get(dst)));
++ } finally {
++ cleanup(src, dst);
++ }
++ }
++ }
++
++ //--------------------- Infrastructure ---------------------------
++ static volatile int passed = 0, failed = 0;
++ static void pass() {passed++;}
++ static void fail() {failed++; Thread.dumpStack();}
++ static void fail(String msg) {System.out.println(msg); fail();}
++ static void unexpected(Throwable t) {failed++; t.printStackTrace();}
++ static void check(boolean cond) {if (cond) pass(); else fail();}
++ static void equal(Object x, Object y) {
++ if (x == null ? y == null : x.equals(y)) pass();
++ else fail(x + " not equal to " + y);}
++ public static void main(String[] args) throws Throwable {
++ try {realMain(args);} catch (Throwable t) {unexpected(t);}
++ System.out.println("\nPassed = " + passed + " failed = " + failed);
++ if (failed > 0) throw new AssertionError("Some tests failed");}
++}
diff -r d64dd8e0811e -r 9e76bb826728 patches/openjdk/7199153-try_with_resources_pushed_to_6.patch
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/openjdk/7199153-try_with_resources_pushed_to_6.patch Tue Oct 16 21:24:35 2012 +0100
@@ -0,0 +1,194 @@
+# HG changeset patch
+# User coffeys
+# Date 1348007758 -3600
+# Node ID 0abac47de6d12023982e35effe00ea028d613b5e
+# Parent 5998d43cb08ce2477ad9ba7970a26ef5be1f175c
+7199153: TEST_BUG: try-with-resources syntax pushed to 6-open repo
+Reviewed-by: ohair
+
+diff --git a/test/sun/tools/native2ascii/Permission.java b/test/sun/tools/native2ascii/Permission.java
+--- openjdk/jdk/test/sun/tools/native2ascii/Permission.java
++++ openjdk/jdk/test/sun/tools/native2ascii/Permission.java
+@@ -21,25 +21,43 @@
+ * questions.
+ */
+
+-/**
More information about the distro-pkg-dev
mailing list