> On 2017-10-27 12:21, David Holmes wrote:
>> Adding build-dev.
>> On 27/10/2017 9:13 AM, Matthias Klose wrote:
>>> On 27.10.2017 00:56, Matthias Klose wrote:
>>>> I recently learned that I should configure an openjdk build with an empty
>>>> -with-version-pre string, and with any package information stuffed into the
>>>> --with-version-opt argument.
>>>> --with-version-pre='' --with-version-opt='Debian-9.0.1+11-1'
>>>> 9.0.1+11 is what I call the upstream version, directly derived from the tag in
>>>> the mercurial repository. The part after the dash is the packaging release and
>>>> gets incremented when more than upload to the distribution is based on the same
>>>> upstream version.
>>>> However using that I get
>>>> configure: WARNING: --with-version-opt value has been sanitized from
>>>> 'Debian-9.0.1+11-1' to 'Debian-9.0.111-1'
>>>> which makes the version string somehow cryptic. Why is there a reason that the
>>>> version string is mangled? Is there a recommendation how to form the version
>>>> for a source release?
>>> $ java -version
>>> openjdk version "9.0.1"
>>> OpenJDK Runtime Environment (build 9.0.1+0-Debian-9.0.111-1)
>>> OpenJDK 64-Bit Server VM (build 9.0.1+0-Debian-9.0.111-1, mixed mode)
>>> Omar suggested on irc to use
>>> --with-version-pre='' --with-version-build=11 --with-version-opt='Debian.1
>>> however that will lead to 9.0.1+11-Debian.1, which doesn't match the package
>>> version either. It looks like this whole versioning schema is only fit for
>>> upstream builds, and doesn't address any versioning in the downstream builds.
>>> Maybe I'm missing something, but how can I include the string Debian-9.0.1+11-1
>>> into that build information?
> Unfortunately, you can't. JEP 223 specifices what a valid Java version string
> looks like: http://openjdk.java.net/jeps/223 >
> I believe your intention is correct to add the distribution versioning to the
> "opt" part, but that is limited to containing ([-a-zA-Z0-9\.]+) according to JEP
> 223, so it cannot contain a "+". (This is due to the fact that "+" has a special
> meaning as the build prefix, and without this restriction, version strings could
> become ambigious to parse.
> If you want the full version number repeated in the opt string, I recommend
> replacing the "+" with a "-".
This is error prone on the Debian side, because the additional "-" is getting
interpreted as the Debian release number, if you don't include it explicitly, so
something like 9.0.1-11 is interpreted as upstream 9.0.1.
> Otherwise I'd recommend Omar's suggestion. I believe that was the intention of
> the JEP 223 design. It will contain the version number of the JDK, the build
> number, and the additional (opt) part saying that this is a Debian build, with a
> Debian-specific version numbering of 1.
so while discussing the new date based versioning schema, can we amend that with
a downstream versioning schema?
Note that other projects provide the ability to include downstream versioning
without any mangling: