[java-1.7.0-openjdk/f17] 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:09 UTC 2013


commit aa53024b6c35eaf159e1e42827fa96f18c6c649f
Author: Jiri Vanek <jvanek at jvanek.redhat>
Date:   Thu Apr 4 13:57:33 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                          |   29 ++++-----
 3 files changed, 47 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 927fd4a..6d29954 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
 
@@ -268,6 +265,10 @@ Patch103: %{name}-arm-fixes.patch
 Patch104: %{name}-ppc-zero-jdk.patch
 Patch105: %{name}-ppc-zero-hotspot.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)
 #
@@ -720,6 +721,8 @@ patch -l -p0 < %{PATCH102}
 patch -l -p0 < %{PATCH103}
 %endif
 
+patch -l -p0 < %{PATCH107}
+
 %ifarch ppc ppc64
 # PPC fixes
 patch -l -p0 < %{PATCH104}
@@ -1165,18 +1168,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
@@ -1330,7 +1321,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}
@@ -1430,6 +1420,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.fc17
+- 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.fc17
 - added manual deletion of classes.jsa
 - ghost classes.jsa restricted to jitarches and to full path


More information about the scm-commits mailing list