From 3522e4cc1580b0dfd762745f73d8396d8f29838f Mon Sep 17 00:00:00 2001 From: Jens Maus Date: Thu, 17 Aug 2023 23:51:15 +0200 Subject: [PATCH] updated java azul to latest 8.72.0.17-ca-jdk8.0.382 --- .../package/java-azul/java-azul.hash | 8 ++--- .../package/java-azul/java-azul.mk | 5 +-- scripts/update-java-azul.sh | 36 +++++++++++++++++-- 3 files changed, 38 insertions(+), 11 deletions(-) diff --git a/buildroot-external/package/java-azul/java-azul.hash b/buildroot-external/package/java-azul/java-azul.hash index cbf4e5c2ac..9f0cec14ae 100644 --- a/buildroot-external/package/java-azul/java-azul.hash +++ b/buildroot-external/package/java-azul/java-azul.hash @@ -1,6 +1,6 @@ # Locally computed sha256 4b9abebc4338048a7c2dc184e9f800deb349366bdf28eb23c2677a77b4c87726 LICENSE -sha256 612684905c546ecfa8b203bd0d739ce5b63762243b090deb00fe6b35577df6f4 zulu8.70.0.23-ca-jdk8.0.372-linux_aarch32hf.tar.gz -sha256 c76da27e2cd5c396d72633baf27edd17031d87e5cb6c8620255dcd0384e61afa zulu8.70.0.23-ca-jdk8.0.372-linux_aarch64.tar.gz -sha256 9ab5b252a8287a39f2cddac9c5d931e5179a4e2f298de5060d2ee2e76868c017 zulu8.70.0.23-ca-jdk8.0.372-linux_i686.tar.gz -sha256 afcda0f08cd05efd3bd60b021618931595ab03689f1c1fefcd46ef7761276d10 zulu8.70.0.23-ca-jdk8.0.372-linux_x64.tar.gz +sha256 7b15a56f2ae005beda0f875a269b3daad14ffa12969306cc745478385b25ba96 zulu8.72.0.17-ca-jdk8.0.382-linux_x64.tar.gz +sha256 13d44f00a96221a5f486c38a32d6f8a2e407d3d391993db1eea4c2eb9c7d2a66 zulu8.72.0.17-ca-jdk8.0.382-linux_i686.tar.gz +sha256 0732ba76e39efd72e605f2af30714df442f82dd63a1ba054d1b42ec8693f0e55 zulu8.72.0.17-ca-jdk8.0.382-linux_aarch32hf.tar.gz +sha256 bde61dd92b47baf9c9a15461c365765ae825b5e6e37602014c457b5be6f7b428 zulu8.72.0.17-ca-jdk8.0.382-linux_aarch64.tar.gz diff --git a/buildroot-external/package/java-azul/java-azul.mk b/buildroot-external/package/java-azul/java-azul.mk index e7238de064..b997561017 100644 --- a/buildroot-external/package/java-azul/java-azul.mk +++ b/buildroot-external/package/java-azul/java-azul.mk @@ -4,20 +4,17 @@ # ################################################################################ +JAVA_AZUL_VERSION = 8.72.0.17-ca-jdk8.0.382 ifeq ($(call qstrip,$(BR2_ARCH)),arm) -JAVA_AZUL_VERSION = 8.70.0.23-ca-jdk8.0.372 JAVA_AZUL_SOURCE = zulu$(JAVA_AZUL_VERSION)-linux_aarch32hf.tar.gz JAVA_AZUL_SITE = https://cdn.azul.com/zulu-embedded/bin else ifeq ($(call qstrip,$(BR2_ARCH)),aarch64) -JAVA_AZUL_VERSION = 8.70.0.23-ca-jdk8.0.372 JAVA_AZUL_SOURCE = zulu$(JAVA_AZUL_VERSION)-linux_aarch64.tar.gz JAVA_AZUL_SITE = https://cdn.azul.com/zulu-embedded/bin else ifeq ($(call qstrip,$(BR2_ARCH)),i686) -JAVA_AZUL_VERSION = 8.70.0.23-ca-jdk8.0.372 JAVA_AZUL_SOURCE = zulu$(JAVA_AZUL_VERSION)-linux_i686.tar.gz JAVA_AZUL_SITE = https://cdn.azul.com/zulu/bin else ifeq ($(call qstrip,$(BR2_ARCH)),x86_64) -JAVA_AZUL_VERSION = 8.70.0.23-ca-jdk8.0.372 JAVA_AZUL_SOURCE = zulu$(JAVA_AZUL_VERSION)-linux_x64.tar.gz JAVA_AZUL_SITE = https://cdn.azul.com/zulu/bin endif diff --git a/scripts/update-java-azul.sh b/scripts/update-java-azul.sh index afcc4c34a4..f465212cba 100755 --- a/scripts/update-java-azul.sh +++ b/scripts/update-java-azul.sh @@ -1,9 +1,39 @@ #!/bin/bash set -e -if [ -z "$1" ]; then - echo "Need a Java Azul version (see https://www.azul.com/downloads/zulu-community/)" +ID=${1} +PACKAGE_NAME="java-azul" +DOWNLOAD_URL="https://cdn.azul.com" + +if [[ -z "${ID}" ]]; then + echo "version id required (see ${URL})" exit 1 fi -sed -i "s/JAVA_AZUL_VERSION = .*/JAVA_AZUL_VERSION = $1/g" buildroot-external/package/java-azul/java-azul.mk +# function to download archive hash for certain CPU +function updateHash() { + local type=${1} + local cpu=${2} + + # define project+archive url + PROJECT_URL="${DOWNLOAD_URL}/${type}/bin" + ARCHIVE_URL="${PROJECT_URL}/zulu${ID}-linux_CPU.tar.gz" + + # download archive for hash update + ARCHIVE_HASH=$(wget --passive-ftp -nd -t 3 -O - "${ARCHIVE_URL/CPU/${cpu}}" | sha256sum | awk '{ print $1 }') + if [[ -n "${ARCHIVE_HASH}" ]]; then + sed -i "/_${cpu}\.tar.gz/d" "buildroot-external/package/${PACKAGE_NAME}/${PACKAGE_NAME}.hash" + echo "sha256 ${ARCHIVE_HASH} zulu${ID}-linux_${cpu}.tar.gz" >>"buildroot-external/package/${PACKAGE_NAME}/${PACKAGE_NAME}.hash" + fi +} + +# update package info +BR_PACKAGE_NAME=${PACKAGE_NAME^^} +BR_PACKAGE_NAME=${BR_PACKAGE_NAME//-/_} +sed -i "s/${BR_PACKAGE_NAME}_VERSION = .*/${BR_PACKAGE_NAME}_VERSION = ${ID}/g" "buildroot-external/package/${PACKAGE_NAME}/${PACKAGE_NAME}.mk" + +# update package hashes +updateHash zulu x64 +updateHash zulu i686 +updateHash zulu-embedded aarch32hf +updateHash zulu-embedded aarch64