package/openjdk: fully switch to Github, commonalise version scheme

Commit 057e27029c (package/openjdk{, -bin}: bump latest to version
16.0.1+9) partially switched over to using the Github repository (which
is the new official publication channel for OpenJDK).

However, only the JDK16 was switched, because of concerns about a change
in the hash of Github-generated archives for the JDK11, due to a missing
Hg-related file on Github.

But as Arnout put it:
    There's a trivial workaround: drop OPENJDK_SOURCE = .... That way,
    the tarball name becomes openjdk-... instead of jdk-... and it's a
    different file.

There is indeed no good reason to force a non-default filename for the
archive, so we do drop it.

As a consequence, we can fully switch over to Github for openjdk, using
the new version scheme. Of course the hash changes, but it is a new
file, so that's OK.

The filename for the JDK16 changes, but the content does not change, so
the hash does not change.

For consistency, the version scheme is also applied to openjdk-bin. Even
though it was already using Github, using that new version scheme also
allows to commonalise the variables too. The archives are the exact
same: no change in filename or content, so no hash to fixup.

Reported-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
cc: Adam Duskett <aduskett@gmail.com>
Tested-by: Adam Duskett <Aduskett@gmail.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
This commit is contained in:
Yann E. MORIN 2021-05-06 21:48:25 +02:00
parent 84441433ec
commit 750fb4ec3e
3 changed files with 11 additions and 21 deletions

View File

@ -7,18 +7,14 @@
ifeq ($(BR2_OPENJDK_VERSION_LATEST),y)
HOST_OPENJDK_BIN_VERSION_MAJOR = 16
HOST_OPENJDK_BIN_VERSION_MINOR = 0.1_9
else
HOST_OPENJDK_BIN_VERSION_MAJOR = 11
HOST_OPENJDK_BIN_VERSION_MINOR = 0.11_9
endif
HOST_OPENJDK_BIN_VERSION = $(HOST_OPENJDK_BIN_VERSION_MAJOR).$(HOST_OPENJDK_BIN_VERSION_MINOR)
HOST_OPENJDK_BIN_SOURCE = OpenJDK$(HOST_OPENJDK_BIN_VERSION_MAJOR)U-jdk_x64_linux_hotspot_$(HOST_OPENJDK_BIN_VERSION).tar.gz
HOST_OPENJDK_BIN_SITE = https://github.com/AdoptOpenJDK/openjdk$(HOST_OPENJDK_BIN_VERSION_MAJOR)-binaries/releases/download/jdk-$(subst _,%2B,$(HOST_OPENJDK_BIN_VERSION))
else
# NOTE! When bumping the 11 version, be sure to switch to github,
# *and* commonalise the _VERSION, _SOURCE, and _SITE variables, above
HOST_OPENJDK_BIN_VERSION_MAJOR = 11.0.11
HOST_OPENJDK_BIN_VERSION_MINOR = 9
HOST_OPENJDK_BIN_VERSION = $(HOST_OPENJDK_BIN_VERSION_MAJOR)_$(HOST_OPENJDK_BIN_VERSION_MINOR)
HOST_OPENJDK_BIN_SOURCE = OpenJDK11U-jdk_x64_linux_hotspot_$(HOST_OPENJDK_BIN_VERSION).tar.gz
HOST_OPENJDK_BIN_SITE = https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-$(HOST_OPENJDK_BIN_VERSION_MAJOR)%2B$(HOST_OPENJDK_BIN_VERSION_MINOR)
endif
HOST_OPENJDK_BIN_LICENSE = GPL-2.0+ with exception
HOST_OPENJDK_BIN_LICENSE_FILES = legal/java.prefs/LICENSE legal/java.prefs/ASSEMBLY_EXCEPTION

View File

@ -1,4 +1,4 @@
# Locally computed
sha256 3b3aca61fe2834322e51636d99bcd09c4abba7d8a2cde231dbcbcbdedf829baf jdk-16.0.1+9.tar.gz
sha256 c8b9d92028f6e46d94bde65ebce3b593fdcc0d1ca1fa00482f38815ed37c92a1 jdk-11.0.11+9.tar.gz
sha256 3b3aca61fe2834322e51636d99bcd09c4abba7d8a2cde231dbcbcbdedf829baf openjdk-16.0.1+9.tar.gz
sha256 55841c01dbe6606e0d5f88045fb2da02632ce3a2d9d9b25d030a06eadeee0f62 openjdk-11.0.11+9.tar.gz
sha256 4b9abebc4338048a7c2dc184e9f800deb349366bdf28eb23c2677a77b4c87726 LICENSE

View File

@ -7,18 +7,12 @@
ifeq ($(BR2_OPENJDK_VERSION_LATEST),y)
OPENJDK_VERSION_MAJOR = 16
OPENJDK_VERSION_MINOR = 0.1+9
OPENJDK_VERSION = $(OPENJDK_VERSION_MAJOR).$(OPENJDK_VERSION_MINOR)
OPENJDK_SOURCE = jdk-$(OPENJDK_VERSION).tar.gz
OPENJDK_SITE = $(call github,openjdk,jdk$(OPENJDK_VERSION_MAJOR)u,jdk-$(OPENJDK_VERSION))
else
# NOTE! When bumping the 11 version, be sure to switch to github,
# *and* commonalise the _VERSION, _SOURCE, and _SITE variables, above
OPENJDK_VERSION_MAJOR = 11.0.11
OPENJDK_VERSION_MINOR = 9
OPENJDK_VERSION = $(OPENJDK_VERSION_MAJOR)+$(OPENJDK_VERSION_MINOR)
OPENJDK_SOURCE = jdk-$(OPENJDK_VERSION).tar.gz
OPENJDK_SITE = https://hg.openjdk.java.net/jdk-updates/jdk11u/archive
OPENJDK_VERSION_MAJOR = 11
OPENJDK_VERSION_MINOR = 0.11+9
endif
OPENJDK_VERSION = $(OPENJDK_VERSION_MAJOR).$(OPENJDK_VERSION_MINOR)
OPENJDK_SITE = $(call github,openjdk,jdk$(OPENJDK_VERSION_MAJOR)u,jdk-$(OPENJDK_VERSION))
OPENJDK_LICENSE = GPL-2.0+ with exception
OPENJDK_LICENSE_FILES = LICENSE