-
-
Notifications
You must be signed in to change notification settings - Fork 249
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update Signature URL in BootJDK download, so Location field longer case sensitive. #3979
Conversation
@@ -49,7 +49,7 @@ function downloadLinuxBootJDK() { | |||
# the fallback mechanism, as downloading of the GA binary might fail. | |||
set +e | |||
curl -L -o bootjdk.tar.gz "${apiURL}" | |||
apiSigURL=$(curl -v "${apiURL}" 2>&1 | tr -d \\r | awk '/^< Location:/{print $3 ".sig"}') | |||
apiSigURL=$(curl -v "${apiURL}" 2>&1 | tr -d \\r | awk '/^< [Ll]ocation:/{print $3 ".sig"}') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A case insensitive search would work too, but I'm ok with this.
apiSigURL=$(curl -v "${apiURL}" 2>&1 | tr -d \\r | awk '/^< [Ll]ocation:/{print $3 ".sig"}') | |
apiSigURL=$(curl -v "${apiURL}" 2>&1 | tr -d \\r | awk '/^< Location:/i{print $3 ".sig"}') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/i doesnt work on my fedora installation.. so I went with the regex fix.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Little bit of script I wrote to test..
apiURL=https://api.adoptium.net/v3/binary/latest/22/ga/linux/riscv64/jdk/hotspot/normal/eclipse
##apiSigURL=$(curl -v "${apiURL}" 2>&1 | tr -d \\r | awk '/^< [Ll]ocation:/{print $3 ".sig"}')
apiSigURL=$(curl -v "${apiURL}" 2>&1 | tr -d \\r | awk '/^< Location:/i{print $3 ".sig"}')
echo 1 = $apiURL
echo 2 = $apiSigURL
curl -L -o bootjdk.tar.gz.sig "${apiSigURL}"
Fixes #3978
Amends the curl command used to validate the signature URL to check either Location or location.
Test build running here: https://ci.adoptium.net/job/build-scripts/job/jobs/job/jdk23u/job/jdk23u-linux-riscv64-temurin/16/console