/hg/icedtea: Include Mercurial revisions and build distribution ...

andrew at icedtea.classpath.org andrew at icedtea.classpath.org
Fri Jan 8 15:55:56 PST 2010


changeset aaf3cf416fb4 in /hg/icedtea
details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=aaf3cf416fb4
author: Andrew John Hughes <ahughes at redhat.com>
date: Sat Jan 09 00:01:09 2010 +0000

	Include Mercurial revisions and build distribution in version
	output.

	2010-01-08 Andrew John Hughes <ahughes at redhat.com>

	 * Makefile.am: Bump JDK revision and sha256sum to
	pick up updated version patch applied upstream.
	Calculate JDK and HotSpot Mercurial revisions if available
	and pass to build. Also pass DIST_NAME to build.
		* acinclude.m4: (IT_GET_LSB_DATA): Moved from configure.ac
	and extended to also obtain the name of the distribution
	from either lsb_release -is or $build_os.
		* configure.ac: Invoke IT_GET_LSB_DATA macro.


diffstat:

5 files changed, 51 insertions(+), 86 deletions(-)
ChangeLog                     |   16 +++++++++
Makefile.am                   |   23 +++++++++----
acinclude.m4                  |   18 ++++++++++
configure.ac                  |   12 -------
patches/icedtea-version.patch |   68 -----------------------------------------

diffs (204 lines):

diff -r 7e9ed32b98d7 -r aaf3cf416fb4 ChangeLog
--- a/ChangeLog	Thu Jan 07 19:41:31 2010 +0000
+++ b/ChangeLog	Sat Jan 09 00:01:09 2010 +0000
@@ -1,3 +1,19 @@ 2010-01-07  Andrew John Hughes  <ahughes
+2010-01-08  Andrew John Hughes  <ahughes at redhat.com>
+
+	* Makefile.am:
+	Bump JDK revision and sha256sum to pick
+	up updated version patch applied upstream.
+	Calculate JDK and HotSpot Mercurial revisions
+	if available and pass to build.  Also pass
+	DIST_NAME to build.
+	* acinclude.m4:
+	(IT_GET_LSB_DATA): Moved from configure.ac
+	and extended to also obtain the name of
+	the distribution from either lsb_release -is
+	or $build_os.
+	* configure.ac:
+	Invoke IT_GET_LSB_DATA macro.
+
 2010-01-07  Andrew John Hughes  <ahughes at redhat.com>
 
 	Bump to b78.
diff -r 7e9ed32b98d7 -r aaf3cf416fb4 Makefile.am
--- a/Makefile.am	Thu Jan 07 19:41:31 2010 +0000
+++ b/Makefile.am	Sat Jan 09 00:01:09 2010 +0000
@@ -6,7 +6,7 @@ HOTSPOT_CHANGESET = 54dde9f9887d
 HOTSPOT_CHANGESET = 54dde9f9887d
 JAXP_CHANGESET  = f0f127b93c9e
 JAXWS_CHANGESET = 4ca731fe3154
-JDK_CHANGESET = 35224dd04ddb
+JDK_CHANGESET = cd86da3affff
 LANGTOOLS_CHANGESET = 21591a03bfbe
 OPENJDK_CHANGESET = f1cf9e78bbad
 
@@ -14,7 +14,7 @@ HOTSPOT_SHA256SUM = 1127102aa1230d26da6b
 HOTSPOT_SHA256SUM = 1127102aa1230d26da6b73118576aef872fb2e86d0d946797da737e64c91d6fc
 JAXP_SHA256SUM = 89f002ed4e6e4b6449e453284b31c4cbe466dedddeeb20249415c6edb10b52cb
 JAXWS_SHA256SUM = 62059bb48e5dad09060bcb79539562f596c77df48345bb35f0e26e815d1cfa6b
-JDK_SHA256SUM = b817bc7703acae21abc57d75eb16ac47d724da25253156aebc90f75c92a267a4
+JDK_SHA256SUM = 31efd51fc265334046e72b202bf507c1c282d181ce9037e7fcce6215d2fef156
 LANGTOOLS_SHA256SUM = 4bff3af10a14048419bd144a39af2daa82756ca8ec226950d05b91ff99b1d0cc
 OPENJDK_SHA256SUM = df47020bf65614156e363a2170ee96f2959e08e62f9eaedacd3591147f858c00
 
@@ -238,7 +238,6 @@ endif
 # Patch list
 
 ICEDTEA_PATCHES = \
-	patches/icedtea-version.patch \
 	patches/hotspot/$(HSBUILD)/icedtea-version.patch \
 	patches/icedtea-copy-plugs.patch \
 	patches/hotspot/$(HSBUILD)/icedtea-text-relocations.patch \
@@ -1498,8 +1497,16 @@ clean-patch:
 
 stamps/versioning.stamp: stamps/patch.stamp
 	cp openjdk/jdk/make/common/shared/Defs.gmk Defs.gmk.bak
-	if [ -e $(abs_top_srcdir)/.hg ] && which $(HG) >/dev/null; then \
-	  revision="-r`(cd $(abs_top_srcdir); $(HG) tip --template '{node|short}')`" ; \
+	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}" ; \
 	if ! test "x$(WITH_CACAO)" = "xno"; then \
@@ -1510,9 +1517,11 @@ stamps/versioning.stamp: stamps/patch.st
 	else \
 	  echo "JDK_DERIVATIVE_NAME=IcedTea7 $${icedtea_version}" \
 	    >>openjdk/jdk/make/common/shared/Defs.gmk ; \
-	fi
+	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 ; \
+	echo "DISTRO_NAME=$(DIST_NAME)" >>openjdk/jdk/make/common/shared/Defs.gmk ; \
 	if [ -n "$(PKGVERSION)" ]; then \
-	  icedtea_version="$${icedtea_version} ($(PKGVERSION))" ; \
 	  echo "DISTRO_PACKAGE_VERSION=$(PKGVERSION)" \
 	    >>openjdk/jdk/make/common/shared/Defs.gmk ; \
 	fi; \
diff -r 7e9ed32b98d7 -r aaf3cf416fb4 acinclude.m4
--- a/acinclude.m4	Thu Jan 07 19:41:31 2010 +0000
+++ b/acinclude.m4	Sat Jan 09 00:01:09 2010 +0000
@@ -1642,3 +1642,21 @@ AC_DEFUN([WITH_VISUALVM_ZIP],
   AM_CONDITIONAL(USE_ALT_VISUALVM_ZIP, test "x$ALT_VISUALVM_ZIP" != "xnot specified")
   AC_SUBST(ALT_VISUALVM_ZIP)
 ])
+
+AC_DEFUN([IT_GET_LSB_DATA],
+[
+if test -n "$LSB_RELEASE"; then
+  lsb_info="$($LSB_RELEASE -ds | sed 's/^"//;s/"$//')"
+  if test -n "$PKGVERSION"; then
+    DIST_ID="$lsb_info, package $PKGVERSION"
+  else
+    DIST_ID="Built on $lsb_info ($(date))"
+  fi
+  DIST_NAME="$($LSB_RELEASE -is | sed 's/^"//;s/"$//')"
+else
+  DIST_ID="Custom build ($(date))"
+  DIST_NAME="$build_os"
+fi
+AC_SUBST(DIST_ID)
+AC_SUBST(DIST_NAME)
+])
diff -r 7e9ed32b98d7 -r aaf3cf416fb4 configure.ac
--- a/configure.ac	Thu Jan 07 19:41:31 2010 +0000
+++ b/configure.ac	Sat Jan 09 00:01:09 2010 +0000
@@ -162,17 +162,7 @@ AC_ARG_WITH([pkgversion],
         [PKGVERSION=])
 AC_SUBST(PKGVERSION)
 
-if test -n "$LSB_RELEASE"; then
-  lsb_info="$($LSB_RELEASE -ds | sed 's/^"//;s/"$//')"
-  if test -n "$PKGVERSION"; then
-    DIST_ID="$lsb_info, package $PKGVERSION"
-  else
-    DIST_ID="Built on $lsb_info"
-  fi
-else
-  DIST_ID="Custom build ($(date))"
-fi
-AC_SUBST(DIST_ID)
+IT_GET_LSB_DATA
 
 SET_ARCH_DIRS
 SET_OS_DIRS
diff -r 7e9ed32b98d7 -r aaf3cf416fb4 patches/icedtea-version.patch
--- a/patches/icedtea-version.patch	Thu Jan 07 19:41:31 2010 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,68 +0,0 @@
-diff -Nru openjdk.orig/jdk/make/common/shared/Defs.gmk openjdk/jdk/make/common/shared/Defs.gmk
---- openjdk.orig/jdk/make/common/shared/Defs.gmk	2009-02-05 08:44:12.000000000 +0000
-+++ openjdk/jdk/make/common/shared/Defs.gmk	2009-02-10 23:04:00.000000000 +0000
-@@ -189,7 +189,7 @@
- 
- # Default names
- ifdef OPENJDK
--  LAUNCHER_NAME = openjdk
-+  LAUNCHER_NAME = java
-   PRODUCT_NAME = OpenJDK
-   PRODUCT_SUFFIX = Runtime Environment
-   JDK_RC_PLATFORM_NAME = Platform
---- openjdk/jdk/src/share/classes/sun/misc/Version.java.template~1~	2008-11-25 01:04:53.000000000 -0800
-+++ openjdk/jdk/src/share/classes/sun/misc/Version.java.template	2009-02-20 09:03:25.000000000 -0800
-@@ -41,6 +41,12 @@
-     private static final String java_runtime_version =
-         "@@java_runtime_version@@";
- 
-+    private static final String jdk_derivative_name =
-+        "@@jdk_derivative_name@@";
-+
-+    private static final String distro_package_version =
-+        "@@distro_package_version@@";
-+
-     static {
-         init();
-     }
-@@ -81,12 +87,26 @@
-         /* First line: platform version. */
-         ps.println(launcher_name + " version \"" + java_version + "\"");
- 
-+        String java_vm_name    = System.getProperty("java.vm.name");
-+
-         /* Second line: runtime version (ie, libraries). */
--        ps.println(java_runtime_name + " (build " +
--                           java_runtime_version + ")");
-+	StringBuilder sb = new StringBuilder();
-+	if (java_vm_name.toLowerCase().startsWith("cacao")) {
-+	    sb.append("IcedTea Runtime Environment");
-+	} else {
-+	    sb.append(java_runtime_name);
-+	}
-+	if (jdk_derivative_name.length() > 0) {
-+	    sb.append(" (").append(jdk_derivative_name).append(")");
-+	}
-+	if (distro_package_version.length() > 0) {
-+	    sb.append(" (").append(distro_package_version).append(")");
-+	} else {
-+	    sb.append(" (build ").append(java_runtime_version).append(")");
-+	}
-+	ps.println(sb.toString());
- 
-         /* Third line: JVM information. */
--        String java_vm_name    = System.getProperty("java.vm.name");
-         String java_vm_version = System.getProperty("java.vm.version");
-         String java_vm_info    = System.getProperty("java.vm.info");
-         ps.println(java_vm_name + " (build " + java_vm_version + ", " +
---- openjdk/jdk/make/java/version/Makefile.~1~	2008-11-25 01:01:15.000000000 -0800
-+++ openjdk/jdk/make/java/version/Makefile	2009-02-20 09:03:56.000000000 -0800
-@@ -39,6 +39,8 @@
- 	$(SED) -e 's/@@launcher_name@@/$(LAUNCHER_NAME)/g' \
- 	    -e 's/@@java_version@@/$(RELEASE)/g' \
- 	    -e 's/@@java_runtime_version@@/$(FULL_VERSION)/g' \
-+	    -e 's/@@jdk_derivative_name@@/$(JDK_DERIVATIVE_NAME)/g' \
-+	    -e 's/@@distro_package_version@@/$(DISTRO_PACKAGE_VERSION)/g' \
- 	    -e 's/@@java_runtime_name@@/$(RUNTIME_NAME)/g' \
- 	$< > $@.temp
- 	@$(MV) $@.temp $@



More information about the distro-pkg-dev mailing list