Skip to content

Commit

Permalink
updated java azul to latest 8.72.0.17-ca-jdk8.0.382
Browse files Browse the repository at this point in the history
  • Loading branch information
jens-maus committed Aug 17, 2023
1 parent f872a0b commit 3522e4c
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 11 deletions.
8 changes: 4 additions & 4 deletions buildroot-external/package/java-azul/java-azul.hash
Original file line number Diff line number Diff line change
@@ -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
5 changes: 1 addition & 4 deletions buildroot-external/package/java-azul/java-azul.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
36 changes: 33 additions & 3 deletions scripts/update-java-azul.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 3522e4c

Please sign in to comment.