[java-1.7.0-openjdk/f18] added patch107 abrt_friendly_hs_log_jdk7.patch removed patch2 java-1.7.0-openjdk-java-access-bridge

jiri vanek jvanek at fedoraproject.org
Thu Apr 4 11:57:13 UTC 2013


commit 67aaec8675ecb852a37baeb2a99014f72551e790
Author: Jiri Vanek <jvanek at jvanek.redhat>
Date:   Thu Apr 4 13:57:18 2013 +0200

    added patch107 abrt_friendly_hs_log_jdk7.patch
     removed patch2 java-1.7.0-openjdk-java-access-bridge-idlj.patch
     removed redundant rm of classes.jsa, ghost is handling it correctly

 abrt_friendly_hs_log_jdk7.patch                  |   35 +++++++++++
 java-1.7.0-openjdk-java-access-bridge-idlj.patch |   71 ----------------------
 java-1.7.0-openjdk.spec                          |   27 +++-----
 3 files changed, 45 insertions(+), 88 deletions(-)
---
diff --git a/abrt_friendly_hs_log_jdk7.patch b/abrt_friendly_hs_log_jdk7.patch
new file mode 100644
index 0000000..6e0afa6
--- /dev/null
+++ b/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/java-1.7.0-openjdk.spec b/java-1.7.0-openjdk.spec
index 58906fb..83292db 100644
--- a/java-1.7.0-openjdk.spec
+++ b/java-1.7.0-openjdk.spec
@@ -149,7 +149,7 @@
 
 Name:    java-%{javaver}-%{origin}
 Version: %{javaver}.%{buildver}
-Release: %{icedtea_version}.3%{?dist}
+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
@@ -235,9 +235,6 @@ Source100:  openjdk-icedtea-2.1.6.tar.gz
 # Allow TCK to pass with access bridge wired in
 Patch1:   java-1.7.0-openjdk-java-access-bridge-tck.patch
 
-# Adjust idlj compilation switches to match what system idlj supports
-Patch2:   java-1.7.0-openjdk-java-access-bridge-idlj.patch
-
 # Disable access to access-bridge packages by untrusted apps
 Patch3:   java-1.7.0-openjdk-java-access-bridge-security.patch
 
@@ -270,6 +267,9 @@ Patch105: %{name}-ppc-zero-hotspot.patch
 
 Patch106: %{name}-freetype-check-fix.patch
 
+# allow to create hs_pid.log in tmp (in 700 permissions) if working directory is unwritable
+Patch107: abrt_friendly_hs_log_jdk7.patch
+
 #
 # Bootstrap patches (code with this is never shipped)
 #
@@ -723,6 +723,7 @@ patch -l -p0 < %{PATCH103}
 %endif
 
 patch -l -p0 < %{PATCH106}
+patch -l -p0 < %{PATCH107}
 
 %ifarch ppc ppc64
 # PPC fixes
@@ -1169,18 +1170,6 @@ fi
 exit 0
 
 %postun
-%ifarch %{jit_arches}
-  if [ $1 -eq 0 ]
-  then
-    #see https://bugzilla.redhat.com/show_bug.cgi?id=918172
-    f="%{_jvmdir}/%{jrelnk}/lib/%{archinstall}/server/classes.jsa"
-    if [ -f "$f" ]
-    then
-      rm -rf "$f"
-    fi
-  fi
-%endif
-
 if [ $1 -eq 0 ]
 then
   alternatives --remove java %{jrebindir}/java
@@ -1334,7 +1323,6 @@ exit 0
 %doc %{buildoutputdir}/j2sdk-image/jre/ASSEMBLY_EXCEPTION
 %doc %{buildoutputdir}/j2sdk-image/jre/LICENSE
 %doc %{buildoutputdir}/j2sdk-image/jre/THIRD_PARTY_README
-
 %dir %{_jvmdir}/%{sdkdir}
 %{_jvmdir}/%{jrelnk}
 %{_jvmjardir}/%{jrelnk}
@@ -1434,6 +1422,11 @@ exit 0
 %doc %{buildoutputdir}/j2sdk-image/jre/LICENSE
 
 %changelog
+* Wed Apr 04 2013 Jiri Vanek <jvanek at redhat.com> - 1.7.0.9-2.3.8.4.fc18
+- added patch107 abrt_friendly_hs_log_jdk7.patch
+- removed patch2 java-1.7.0-openjdk-java-access-bridge-idlj.patch
+- removed redundant rm of classes.jsa, ghost is handling it correctly
+
 * Tue Mar 26 2013 Jiri Vanek <jvanek at redhat.com> - 1.7.0.9-2.3.8.3.fc18
 - added manual deletion of classes.jsa
 - ghost classes.jsa restricted to jitarches and to full path


More information about the scm-commits mailing list