/hg/release/icedtea6-1.11: 7 new changesets

liu chao jun amiko212 at 126.com
Tue Oct 16 17:57:49 PDT 2012


Hi alll ,
      During the following email contents ,I found there is some patches relation with security, And i also have some issues about it for icedtea6-1.11.1 and others about  LLVM-3.0.
 
1 .Is  icedtea6-1.11.1 is include the security feature ?
2 . If it include security feature is there any patches for it ?
3 . Is any body run icedtea6-1.11.1 with -Xcomp Parameter (Only compile mode) according to  LLVM-30 ? Or LLVM-30 support it or not ?

Thank you very much and looking forward to your reply

BR//Amiko









At 2012-10-17 04:35:51,andrew at icedtea.classpath.org wrote:
>changeset d9564350faa6 in /hg/release/icedtea6-1.11
>details: http://icedtea.classpath.org/hg/release/icedtea6-1.11?cmd=changeset;node=d9564350faa6
>author: Andrew John Hughes <ahughes at redhat.com>
>date: Thu Oct 11 21:32:13 2012 +0100
>
>	Add 2012/10/16 security patches.
>
>	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/security/20121016/6631398.patch,
>		* patches/security/20121016/7093490.patch,
>		* patches/security/20121016/7143535.patch,
>		* patches/security/20121016/7158800.patch,
>		* patches/security/20121016/7158801.patch,
>		* patches/security/20121016/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:
>		New patches.
>
>
>changeset f975a9b1d5b5 in /hg/release/icedtea6-1.11
>details: http://icedtea.classpath.org/hg/release/icedtea6-1.11?cmd=changeset;node=f975a9b1d5b5
>author: Andrew John Hughes <ahughes at redhat.com>
>date: Thu Oct 11 21:48:44 2012 +0100
>
>	Update NEWS with security fixes.
>
>	2012-10-11  Andrew John Hughes  <gnu.andrew at redhat.com>
>
>		* NEWS: Update with security fixes.
>
>
>changeset 904945674c52 in /hg/release/icedtea6-1.11
>details: http://icedtea.classpath.org/hg/release/icedtea6-1.11?cmd=changeset;node=904945674c52
>author: Andrew John Hughes <ahughes at redhat.com>
>date: Fri Oct 12 03:10:34 2012 +0100
>
>	Merge
>
>
>changeset 12172d5875a5 in /hg/release/icedtea6-1.11
>details: http://icedtea.classpath.org/hg/release/icedtea6-1.11?cmd=changeset;node=12172d5875a5
>author: Andrew John Hughes <ahughes at redhat.com>
>date: Fri Oct 12 20:41:03 2012 +0100
>
>	Prepare for 1.11.5
>
>	2012-10-12  Andrew John Hughes  <gnu.andrew at redhat.com>
>
>		* NEWS: Set release date for 1.11.5.
>		* configure.ac: Bump to 1.11.5.
>
>
>changeset 527b1ef07071 in /hg/release/icedtea6-1.11
>details: http://icedtea.classpath.org/hg/release/icedtea6-1.11?cmd=changeset;node=527b1ef07071
>author: Andrew John Hughes <ahughes at redhat.com>
>date: Mon Oct 15 18:59:53 2012 +0100
>
>	S7175845: "jar uf" changes file permissions unexpectedly
>	S7177216: native2ascii changes file permissions of input file
>
>	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.
>
>
>changeset f63ce4390499 in /hg/release/icedtea6-1.11
>details: http://icedtea.classpath.org/hg/release/icedtea6-1.11?cmd=changeset;node=f63ce4390499
>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 2e4b16eaaf3f in /hg/release/icedtea6-1.11
>details: http://icedtea.classpath.org/hg/release/icedtea6-1.11?cmd=changeset;node=2e4b16eaaf3f
>author: Andrew John Hughes <ahughes at redhat.com>
>date: Tue Oct 16 21:23:51 2012 +0100
>
>	Added tag icedtea6-1.11.5 for changeset f63ce4390499
>
>
>diffstat:
>
> .hgtags                                                             |     1 +
> ChangeLog                                                           |    68 +
> Makefile.am                                                         |    28 +-
> NEWS                                                                |    30 +-
> 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/20121016/6631398.patch                             |    20 +
> patches/security/20121016/7093490.patch                             |    28 +
> patches/security/20121016/7143535.patch                             |    31 +
> patches/security/20121016/7158800.patch                             |  1413 ++++++++++
> patches/security/20121016/7158801.patch                             |    30 +
> patches/security/20121016/7158804.patch                             |    28 +
> 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 +
> 31 files changed, 3828 insertions(+), 6 deletions(-)
>
>diffs (truncated from 3996 to 500 lines):
>
>diff -r 7f603a40c817 -r 2e4b16eaaf3f .hgtags
>--- a/.hgtags	Wed Sep 05 11:43:29 2012 +0200
>+++ b/.hgtags	Tue Oct 16 21:23:51 2012 +0100
>@@ -27,3 +27,4 @@
> ca61b2ffa966cac5c5d9ea217b7aec4a0da83ab8 icedtea6-1.11.2
> a9b49bd3d0b5c54eb368b5f9f9b96b8d1aef843d icedtea6-1.11.3
> a773e4481576804dfdf51501727bd5461f88b801 icedtea6-1.11.4
>+f63ce43904998e7e9ac04558ada787bb73044ef6 icedtea6-1.11.5
>diff -r 7f603a40c817 -r 2e4b16eaaf3f ChangeLog
>--- a/ChangeLog	Wed Sep 05 11:43:29 2012 +0200
>+++ b/ChangeLog	Tue Oct 16 21:23:51 2012 +0100
>@@ -1,3 +1,71 @@
>+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.11.5.
>+	* configure.ac: Bump to 1.11.5.
>+
>+2012-10-11  Andrew John Hughes  <gnu.andrew at redhat.com>
>+
>+	* NEWS: Update with 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/security/20121016/6631398.patch,
>+	* patches/security/20121016/7093490.patch,
>+	* patches/security/20121016/7143535.patch,
>+	* patches/security/20121016/7158800.patch,
>+	* patches/security/20121016/7158801.patch,
>+	* patches/security/20121016/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:
>+	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 7f603a40c817 -r 2e4b16eaaf3f Makefile.am
>--- a/Makefile.am	Wed Sep 05 11:43:29 2012 +0200
>+++ b/Makefile.am	Tue Oct 16 21:23:51 2012 +0100
>@@ -224,7 +224,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/7158800.patch \
>+	patches/security/20121016/7158801.patch \
>+	patches/security/20121016/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
> 
>@@ -435,7 +456,10 @@
> 	patches/openjdk/6792400-Avoid_loading_Normalizer_resources.patch \
> 	patches/coverage-table.patch \
> 	patches/openjdk/7185678-xmenuitem_peer_npe.patch \
>-	patches/merge_fix.patch
>+	patches/merge_fix.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_RHINO
> ICEDTEA_PATCHES += \
>diff -r 7f603a40c817 -r 2e4b16eaaf3f NEWS
>--- a/NEWS	Wed Sep 05 11:43:29 2012 +0200
>+++ b/NEWS	Tue Oct 16 21:23:51 2012 +0100
>@@ -10,7 +10,35 @@
> 
> CVE-XXXX-YYYY: http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=XXXX-YYYY
> 
>-New in release 1.11.5 (2012-XX-XX):
>+New in release 1.11.5 (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
>+* 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.11.4 (2012-08-31):
> 
>diff -r 7f603a40c817 -r 2e4b16eaaf3f acinclude.m4
>--- a/acinclude.m4	Wed Sep 05 11:43:29 2012 +0200
>+++ b/acinclude.m4	Tue Oct 16 21:23:51 2012 +0100
>@@ -1147,9 +1147,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 7f603a40c817 -r 2e4b16eaaf3f configure.ac
>--- a/configure.ac	Wed Sep 05 11:43:29 2012 +0200
>+++ b/configure.ac	Tue Oct 16 21:23:51 2012 +0100
>@@ -1,4 +1,4 @@
>-AC_INIT([icedtea6],[1.11.5pre],[distro-pkg-dev at openjdk.java.net])
>+AC_INIT([icedtea6],[1.11.5],[distro-pkg-dev at openjdk.java.net])
> AM_INIT_AUTOMAKE([1.9 tar-pax foreign])
> AC_CONFIG_FILES([Makefile])
> 
>diff -r 7f603a40c817 -r 2e4b16eaaf3f 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:23:51 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 7f603a40c817 -r 2e4b16eaaf3f 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:23:51 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 7f603a40c817 -r 2e4b16eaaf3f 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:23:51 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 7f603a40c817 -r 2e4b16eaaf3f 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:23:51 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.
>+  */
>+ 
>+-/**
>++/*
>+  * @test
>+- * @bug 7177216
>++ * @bug 7177216 7199153
>+  * @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)); 
>++            File f = new File(fname);
>++            if (f.exists())
>++                f.delete();
>+         }
>+     }
>+ 
>++    private static String permission(String fname) throws Throwable {
>++        Process p = Runtime.getRuntime().exec("ls -l " + fname);
>++        InputStream is = null;
>++        String ret = null;
>++        if (p != null && (is = p.getInputStream()) != null) {
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121017/9da7dabb/attachment.html 


More information about the distro-pkg-dev mailing list