Reported Java version

Henri Gomez henri.gomez at gmail.com
Thu Sep 22 23:12:34 PDT 2011


I'll use current tag (ie: b147) for MILESTONE  and build date for
BUILD_NUMBER, providing this information back to user :
openjdk version "1.7.0-b147"
OpenJDK Runtime Environment (build 1.7.0-b147-20110923)
OpenJDK 64-Bit Server VM (build 21.0-b17, mixed mode)


2011/9/23 Henri Gomez <henri.gomez at gmail.com>:
> Hi David.
>
> I take a look to Defs.gmk yesterday and allready updated build to add date in reported version.
>
> The question was more on version number relative to OpenJDK level.
>
> Could we consider the OSX version to be in phase with the common one (ie: b147), is it still beta or should we keep the '-internal' flag inside ?
>
> Le 23 sept. 2011 à 04:49, David Schlosnagle <schlosna at gmail.com> a écrit :
>
>> On Thu, Sep 22, 2011 at 3:56 AM, Henri Gomez <henri.gomez at gmail.com> wrote:
>>> I'm thinking replacing -b00 by -b20110922 so users could get the build
>>> date (and provide better error reporting)
>>>
>>> openjdk version "1.7.0-internal"
>>> OpenJDK Runtime Environment (build 1.7.0-internal-b20110922)
>>> OpenJDK 64-Bit Server VM (build 21.0-b17, mixed mode)
>>>
>>> I was wondering about -internal and how it could be changed to something else.
>>>
>>
>> Henri,
>>
>> First off, thanks for producing the Mac OS X builds!
>>
>> You might want to keep the BUILD_NUMBER in sync with the tags in
>> mercurial (or use the mercurial changeset ID), and adjust the
>> USER_RELEASE_SUFFIX to just strip the CLEAN_USERNAME so you end up
>> with something like this:
>>
>>    OpenJDK Runtime Environment (build 1.7.0-internal-2011_09_22_22_36-b147)
>>
>> The actual values reported by `java -version` come from the
>> jdk/src/classes/sun/misc/Version.java.template that is populated by
>> jdk/make/java/version/Makefile using the FULL_VERSION variable. The
>> FULL_VERSION is constructed in jdk/make/common/shared/Defs.gmk as:
>>
>>    FULL_VERSION = $(RELEASE)-$(USER_RELEASE_SUFFIX)-$(BUILD_NUMBER)
>>
>> Assuming the following is the version reported by `java -version`,
>> then the FULL_VERSION was "1.7.0-internal-david_2011_08_09_02_14-b00":
>>    OpenJDK Runtime Environment (build
>> 1.7.0-internal-david_2011_08_09_02_14-b00)
>>
>> Which breaks down to:
>>    RELEASE="1.7.0-internal"
>>        JDK_VERSION="1.7.0"
>>        MILESTONE="internal"
>>        BUILD_VARIANT_RELEASE=""
>>    USER_RELEASE_SUFFIX="david_2011_08_09_02_14"
>>        CLEAN_USERNAME="david"
>>        BUILD_DATE="2011_08_09_02_14"
>>    BUILD_NUMBER="b00"
>>
>> Relevant snippets from
>> http://hg.openjdk.java.net/macosx-port/macosx-port/jdk/file/tip/make/common/shared/Defs.gmk:
>>    ifndef MILESTONE
>>      MILESTONE = internal
>>    endif
>>
>> ... snip ...
>>
>>    # RELEASE is JDK_VERSION and -MILESTONE if MILESTONE is set
>>    ifneq ($(MILESTONE),fcs)
>>      RELEASE      = $(JDK_VERSION)-$(MILESTONE)$(BUILD_VARIANT_RELEASE)
>>    else
>>      RELEASE      = $(JDK_VERSION)$(BUILD_VARIANT_RELEASE)
>>    endif
>>
>>    # FULL_VERSION is RELEASE and -BUILD_NUMBER if BUILD_NUMBER is set
>>    ifdef BUILD_NUMBER
>>      FULL_VERSION = $(RELEASE)-$(BUILD_NUMBER)
>>    else
>>      BUILD_NUMBER = b00
>>      ifndef USER_RELEASE_SUFFIX
>>        BUILD_DATE := $(shell $(DATE) '+%Y_%m_%d_%H_%M')
>>        CLEAN_USERNAME := $(shell $(ECHO) "$(USER)" | $(TR) -d -c '[:alnum:]')
>>        USER_RELEASE_SUFFIX := $(shell $(ECHO)
>> "$(CLEAN_USERNAME)_$(BUILD_DATE)" | $(TR) '[:upper:]' '[:lower:]' )
>>      endif
>>      export USER_RELEASE_SUFFIX
>>      FULL_VERSION = $(RELEASE)-$(USER_RELEASE_SUFFIX)-$(BUILD_NUMBER)
>>    endif
>>
>> - Dave
>


More information about the macosx-port-dev mailing list