From 48e38f6dca354835a71ab8a3adb31d61eb3475f5 Mon Sep 17 00:00:00 2001 From: Dan Lutker Date: Mon, 10 Jul 2023 23:35:06 +0000 Subject: [PATCH] Setup AL bootstrapping with Corretto 20. This should not get upstreamed or merged to develop. --- .../spec/java-amazon-corretto.spec.template | 20 ++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/installers/linux/al2/spec/java-amazon-corretto.spec.template b/installers/linux/al2/spec/java-amazon-corretto.spec.template index d332d3369c1..5a1965d7a16 100644 --- a/installers/linux/al2/spec/java-amazon-corretto.spec.template +++ b/installers/linux/al2/spec/java-amazon-corretto.spec.template @@ -142,9 +142,9 @@ BuildRequires: libXtst-devel BuildRequires: pkgconfig BuildRequires: xorg-x11-proto-devel -%if %{with bootjdk} -BuildRequires: java-${boot_jdk_major_version}-devel -%endif +#%if %{with bootjdk} +#BuildRequires: java-${boot_jdk_major_version}-devel +#%endif Requires: libX11 Requires: libXi @@ -247,6 +247,19 @@ Amazon Corretto's packaging of the OpenJDK ${java_spec_version} jmods. %build +# Bootstrap with Corretto 20 +%ifarch aarch64 +curl -L -o corretto.tar.gz https://corretto.aws/downloads/latest/amazon-corretto-20-aarch64-linux-jdk.tar.gz +echo "505409e4f7e7c6c9aeae61af6a7df075298ceed70b1b562dc6d5f65588e12b1e corretto.tar.gz" > corretto.tar.gz.sha256 +%else +curl -L -o corretto.tar.gz https://corretto.aws/downloads/latest/amazon-corretto-20-x64-linux-jdk.tar.gz +echo "32a6ce43ec641b0bd55d21bc4aa17995407581fb1c5142703805960aea95d2db corretto.tar.gz" > corretto.tar.gz.sha256 +%endif +sha256sum -c corretto.tar.gz.sha256 +mkdir -p corretto-bootstrap-jdk +tar -xf corretto.tar.gz --strip-component=1 -C corretto-bootstrap-jdk + + %if "%{dist}" == ".amzn2" || "%{dist}" == ".amzn2int" # AmazonLinux ships with GifLib 4.x which does not define GIFLIB_MAJOR. This must be defined # because -Werror=undef is enabled. @@ -254,6 +267,7 @@ Amazon Corretto's packaging of the OpenJDK ${java_spec_version} jmods. %endif bash ./configure \\ + --with-boot-jdk=\${PWD}/corretto-bootstrap-jdk \\ %ifarch aarch64 --with-extra-cflags="-moutline-atomics%{?GIFLIB_DEFINE: %{GIFLIB_DEFINE}}" \\ --with-extra-cxxflags="-moutline-atomics" \\