changeset 2146:b7642104d392

Include derivative name and version (e.g IcedTea6 1.7) in crash dump. Obtain Mercurial revisions at configure time. 2010-01-20 Andrew John Hughes <ahughes@redhat.com> * Makefile.am: Pass DERIVATIVE_ID and HOTSPOT_BUILD_VERSION to build (later only when the HotSpot Mercurial revision is available). Update HotSpot and JDK revisions for related updates there. (patch.stamp): Move revision derivation to configure. * acinclude.m4: (IT_GET_LSB_DATA): Report results. (IT_CHECK_FOR_MERCURIAL): Macro wrapper around check for hg. (IT_OBTAIN_HG_REVISIONS): Obtain Mercurial revisions for IcedTea, JDK and HotSpot if available. * configure.ac: Call new macros. * patches/hotspot/default/icedtea-version.patch: Removed; applied to upstream forest.
author Andrew John Hughes <ahughes@redhat.com>
date Fri, 14 May 2010 14:34:46 +0100
parents 3cd0c267604f
children 1aa2dc59b11f
files ChangeLog Makefile.am acinclude.m4 configure.ac patches/hotspot/default/icedtea-version.patch
diffstat 5 files changed, 82 insertions(+), 69 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Fri May 14 11:47:47 2010 +0100
+++ b/ChangeLog	Fri May 14 14:34:46 2010 +0100
@@ -1,3 +1,21 @@
+2010-01-20  Andrew John Hughes  <ahughes@redhat.com>
+
+	* Makefile.am:
+	Pass DERIVATIVE_ID and HOTSPOT_BUILD_VERSION
+	to build (later only when the HotSpot Mercurial
+	revision is available).  Update HotSpot and JDK
+	revisions for related updates there.
+	(patch.stamp): Move revision derivation to configure.
+	* acinclude.m4:
+	(IT_GET_LSB_DATA): Report results.
+	(IT_CHECK_FOR_MERCURIAL): Macro wrapper around check for hg.
+	(IT_OBTAIN_HG_REVISIONS): Obtain Mercurial revisions for
+	IcedTea, JDK and HotSpot if available.
+	* configure.ac:
+	Call new macros.
+	* patches/hotspot/default/icedtea-version.patch:
+	Removed; applied to upstream forest.
+
 2010-01-20  Xerxes RĂ„nby  <xerxes@zafena.se>
 
 	PR icedtea/431:
--- a/Makefile.am	Fri May 14 11:47:47 2010 +0100
+++ b/Makefile.am	Fri May 14 14:34:46 2010 +0100
@@ -3,18 +3,18 @@
 OPENJDK_VERSION = b89
 
 CORBA_CHANGESET = e805b4155d76
-HOTSPOT_CHANGESET = e431f9da7dc9
+HOTSPOT_CHANGESET = 468593ef6b33
 JAXP_CHANGESET  = 826bafcb6c4a
 JAXWS_CHANGESET = 1661166c82dc
-JDK_CHANGESET = c1cee45daf4d
+JDK_CHANGESET = 5d5ee1c92a1b
 LANGTOOLS_CHANGESET = a0499f48ec96
 OPENJDK_CHANGESET = 195fcceefddc
 
 CORBA_SHA256SUM = 870e2eac993a4eef48197ed7309cab176b56a994add1de215a026599052627cb
-HOTSPOT_SHA256SUM = 4783b1b85239ac60b16eac7d184e51a9350670fec6f54a2e986761b7ded92994
+HOTSPOT_SHA256SUM = fc3a387938c2e479ff71989d227baa655b8a68079a144f717081b40e15696cdb
 JAXP_SHA256SUM = 42d004e51a1f01d146ad230ce48996ddf8da3719fe571a41653f431d6b2e8a7b
 JAXWS_SHA256SUM = 4523909cd46fd61b5c6670bf932099d5899236a37a4058e7b2bcb855e503a0e4
-JDK_SHA256SUM = b6d70bc41bbc7d02977ca4b0455bef765a3e8670dfa2f413a5b8bd91e77ee32a
+JDK_SHA256SUM = 5f6035185d862b36e0cb7ca4f5d5f7160914681dfcb33900fac45db1c439668e
 LANGTOOLS_SHA256SUM = 96f6be5d89195353f55ef775e0dec9bd9a5da7f869aba6ed428e4a2cac806991
 OPENJDK_SHA256SUM = 93c536e6bc4e962050a00321e88e694fc4e0000e2ad887b8de22830bfda2649f
 
@@ -456,6 +456,10 @@
 JDK_UPDATE_VERSION = $(shell echo $(OPENJDK_VERSION) | sed -e "s/^b//")
 COMBINED_VERSION = $(JDK_UPDATE_VERSION)-$(OPENJDK_VERSION)
 
+if HAS_ICEDTEA_REVISION
+ICEDTEA_REV="+${ICEDTEA_REVISION}"
+endif
+
 ICEDTEA_ENV = \
 	ALT_JDK_IMPORT_PATH="$(ICEDTEA_BOOT_DIR)" \
 	ANT="$(ANT)" \
@@ -495,6 +499,7 @@
 	ANT_RESPECT_JAVA_HOME="TRUE" \
 	RHINO_JAR="$(RHINO_JAR)" \
 	DISTRIBUTION_ID="$(DIST_ID)" \
+	DERIVATIVE_ID="IcedTea6 $(PACKAGE_VERSION)$(ICEDTEA_REV)" \
 	ALT_JIBX_LIBS_PATH="$(JIBX_DEPS_DIR)" \
 	ALT_NETX_DIST="$(NETX_CLASSES)" \
 	ALT_LIVECONNECT_DIST="$(LIVECONNECT_CLASSES)" \
@@ -524,6 +529,11 @@
 	ALT_JAR_CMD="$(ALT_JAR_CMD)"
 endif
 
+if HAS_HOTSPOT_REVISION
+ICEDTEA_ENV += \
+	HOTSPOT_BUILD_VERSION="$(HOTSPOT_REVISION)"
+endif
+
 # OpenJDK boot build environment.
 ICEDTEA_ENV_BOOT = $(ICEDTEA_ENV) \
 	BOOTCLASSPATH_CLS_RT="-bootclasspath $(ICEDTEA_CLS_DIR_BOOT):$(ICEDTEA_RT)" \
@@ -1528,18 +1538,7 @@
 
 stamps/versioning.stamp: stamps/patch.stamp
 	cp openjdk/jdk/make/common/shared/Defs.gmk Defs.gmk.bak
-	if which $(HG) >/dev/null; then \
-	  if [ -e $(abs_top_srcdir)/.hg ] ; then \
-	    revision="+r`(cd $(abs_top_srcdir); $(HG) tip --template '{node|short}')`" ; \
-	  fi ; \
-	  if [ -e openjdk/jdk/.hg ] ; then \
-	    jdk_rev="r`(cd openjdk/jdk; $(HG) tip --template '{node|short}')`" ; \
-	  fi ; \
-	  if [ -e openjdk/hotspot/.hg ] ; then \
-	    hotspot_rev="r`(cd openjdk/hotspot; $(HG) tip --template '{node|short}')`" ; \
-	  fi ; \
-	fi ; \
-	icedtea_version="$(PACKAGE_VERSION)$${revision}" ; \
+	icedtea_version="$(PACKAGE_VERSION)$(ICEDTEA_REV)" ; \
 	if ! test "x$(WITH_CACAO)" = "xno"; then \
 	  echo "JDK_DERIVATIVE_NAME=$${icedtea_version}" \
 	    >>openjdk/jdk/make/common/shared/Defs.gmk ; \
@@ -1548,9 +1547,12 @@
 	else \
 	  echo "JDK_DERIVATIVE_NAME=IcedTea7 $${icedtea_version}" \
 	    >>openjdk/jdk/make/common/shared/Defs.gmk ; \
-	fi ; \
-	echo "JDK_REVID=$${jdk_rev}" >>openjdk/jdk/make/common/shared/Defs.gmk ; \
-	echo "HOTSPOT_REVID=$${hotspot_rev}" >>openjdk/jdk/make/common/shared/Defs.gmk ; \
+	fi ; 
+
+if HAS_JDK_REVISION
+	echo "JDK_REVID=$(JDK_REVISION)" >>openjdk/jdk/make/common/shared/Defs.gmk ;
+endif
+
 	echo "DISTRO_NAME=$(DIST_NAME)" >>openjdk/jdk/make/common/shared/Defs.gmk ; \
 	if [ -n "$(PKGVERSION)" ]; then \
 	  echo "DISTRO_PACKAGE_VERSION=$(PKGVERSION)" \
--- a/acinclude.m4	Fri May 14 11:47:47 2010 +0100
+++ b/acinclude.m4	Fri May 14 14:34:46 2010 +0100
@@ -1668,6 +1668,7 @@
 
 AC_DEFUN([IT_GET_LSB_DATA],
 [
+AC_MSG_CHECKING([build identification])
 if test -n "$LSB_RELEASE"; then
   lsb_info="$($LSB_RELEASE -ds | sed 's/^"//;s/"$//')"
   if test -n "$PKGVERSION"; then
@@ -1680,10 +1681,50 @@
   DIST_ID="Custom build ($(date))"
   DIST_NAME="$build_os"
 fi
+AC_MSG_RESULT([${DIST_ID}])
 AC_SUBST(DIST_ID)
 AC_SUBST(DIST_NAME)
 ])
 
+
+AC_DEFUN_ONCE([IT_CHECK_FOR_MERCURIAL],
+[
+  AC_PATH_TOOL([HG],[hg])
+  AC_SUBST([HG])
+])
+
+AC_DEFUN_ONCE([IT_OBTAIN_HG_REVISIONS],
+[
+  AC_REQUIRE([IT_CHECK_FOR_MERCURIAL])
+  AC_REQUIRE([WITH_OPENJDK_SRC_DIR])
+  ICEDTEA_REVISION="none";
+  JDK_REVISION="none";
+  HOTSPOT_REVISION="none";
+  if which ${HG} >/dev/null; then
+    AC_MSG_CHECKING([for IcedTea Mercurial revision ID])
+    if test -e ${abs_top_srcdir}/.hg ; then 
+      ICEDTEA_REVISION="r`(cd ${abs_top_srcdir}; ${HG} tip --template '{node|short}')`" ; 
+    fi ;
+    AC_MSG_RESULT([${ICEDTEA_REVISION}])
+    AC_SUBST([ICEDTEA_REVISION])
+    AC_MSG_CHECKING([for JDK Mercurial revision ID])
+    if test -e ${OPENJDK_SRC_DIR}/jdk/.hg ; then
+      JDK_REVISION="r`(cd ${OPENJDK_SRC_DIR}/jdk; ${HG} tip --template '{node|short}')`" ;
+    fi ;
+    AC_MSG_RESULT([${JDK_REVISION}])
+    AC_SUBST([JDK_REVISION])
+    AC_MSG_CHECKING([for HotSpot Mercurial revision ID])
+    if test -e ${OPENJDK_SRC_DIR}/hotspot/.hg ; then \
+      HOTSPOT_REVISION="r`(cd ${OPENJDK_SRC_DIR}/hotspot; ${HG} tip --template '{node|short}')`" ;
+    fi ; 
+    AC_MSG_RESULT([${HOTSPOT_REVISION}])
+    AC_SUBST([HOTSPOT_REVISION])
+  fi;
+  AM_CONDITIONAL([HAS_ICEDTEA_REVISION], test "x${ICEDTEA_REVISION}" != xnone)
+  AM_CONDITIONAL([HAS_JDK_REVISION], test "x${JDK_REVISION}" != xnone)
+  AM_CONDITIONAL([HAS_HOTSPOT_REVISION], test "x${HOTSPOT_REVISION}" != xnone)
+])
+
 AC_DEFUN_ONCE([IT_CHECK_OLD_PLUGIN],
 [
 AC_MSG_CHECKING([whether to build the browser plugin])
--- a/configure.ac	Fri May 14 11:47:47 2010 +0100
+++ b/configure.ac	Fri May 14 14:34:46 2010 +0100
@@ -39,8 +39,8 @@
 dnl OpenJDK's README-builds.html lists gawk as a build dependency so we
 dnl check for it explicitly rather than using AC_PROG_AWK.
 FIND_TOOL([GAWK], [gawk])
-AC_PATH_TOOL([HG],[hg])
-AC_SUBST([HG])
+IT_CHECK_FOR_MERCURIAL
+IT_OBTAIN_HG_REVISIONS
 AC_PATH_TOOL([LSB_RELEASE],[lsb_release])
 AC_CHECK_WITH_GCJ
 AC_CHECK_WITH_HOTSPOT_BUILD
--- a/patches/hotspot/default/icedtea-version.patch	Fri May 14 11:47:47 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-diff -Nru openjdk.orig/hotspot/make/linux/makefiles/vm.make openjdk/hotspot/make/linux/makefiles/vm.make
---- openjdk.orig/hotspot/make/linux/makefiles/vm.make	2008-11-06 08:40:50.000000000 +0000
-+++ openjdk/hotspot/make/linux/makefiles/vm.make	2008-11-19 12:15:54.000000000 +0000
-@@ -86,6 +86,10 @@
-   ${JRE_VERSION}     \
-   ${VM_DISTRO}
- 
-+ifdef DISTRIBUTION_ID
-+CPPFLAGS += -DDISTRIBUTION_ID="\"$(DISTRIBUTION_ID)\""
-+endif
-+
- # CFLAGS_WARN holds compiler options to suppress/enable warnings.
- CFLAGS += $(CFLAGS_WARN/BYFILE)
- 
-diff -Nru openjdk.orig/hotspot/src/share/vm/utilities/vmError.cpp openjdk/hotspot/src/share/vm/utilities/vmError.cpp
---- openjdk.orig/hotspot/src/share/vm/utilities/vmError.cpp	2008-11-06 08:40:58.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/utilities/vmError.cpp	2008-11-19 12:15:54.000000000 +0000
-@@ -165,7 +165,8 @@
- 
- static void print_bug_submit_message(outputStream *out, Thread *thread) {
-   if (out == NULL) return;
--  out->print_raw_cr("# If you would like to submit a bug report, please visit:");
-+  out->print_raw_cr("# If you would like to submit a bug report, please include");
-+  out->print_raw_cr("# instructions how to reproduce the bug and visit:");
-   out->print_raw   ("#   ");
-   out->print_raw_cr(Arguments::java_vendor_url_bug());
-   // If the crash is in native code, encourage user to submit a bug to the
-@@ -339,6 +340,9 @@
-                    Abstract_VM_Version::vm_platform_string(),
-                    UseCompressedOops ? "compressed oops" : ""
-                  );
-+#ifdef DISTRIBUTION_ID
-+     st->print_cr("# Distribution: %s", DISTRIBUTION_ID);
-+#endif
- 
-   STEP(60, "(printing problematic frame)")
- 
---- arguments.cpp       2008-12-15 12:25:14.000000000 -0500
-+++ openjdk/hotspot/src/share/vm/runtime/arguments.cpp  2008-12-15 12:25:32.000000000 -0500
-@@ -25,7 +25,7 @@
- #include "incls/_precompiled.incl"
- #include "incls/_arguments.cpp.incl"
-
--#define DEFAULT_VENDOR_URL_BUG "http://java.sun.com/webapps/bugreport/crash.jsp"
-+#define DEFAULT_VENDOR_URL_BUG "http://icedtea.classpath.org/bugzilla"
- #define DEFAULT_JAVA_LAUNCHER  "generic"
-
- char**  Arguments::_jvm_flags_array             = NULL;