Skip to content
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

Merged
merged 1 commit into from
Oct 7, 2024

Conversation

steelhead31
Copy link
Contributor

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

@@ -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"}')
Copy link
Member

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.

Suggested change
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"}')

Copy link
Contributor Author

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.

Copy link
Contributor Author

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}"

@steelhead31 steelhead31 merged commit c1b5aa5 into adoptium:master Oct 7, 2024
27 checks passed
@steelhead31 steelhead31 deleted the fix_issue_3978 branch October 7, 2024 14:58
@steelhead31 steelhead31 restored the fix_issue_3978 branch October 18, 2024 14:15
mahdipub pushed a commit to mahdipub/temurin-build that referenced this pull request Oct 24, 2024
mahdipub pushed a commit to mahdipub/temurin-build that referenced this pull request Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Linux JDK23u Build Failing For Riscv64
3 participants