1

I need to generate the sha for the next URL:

https://download.oracle.com/otn-pub/java/jdk/8u301-b09/d3c52aa6bfa54d3ca74e617f18309292/server-jre-8u301-linux-x64.tar.gz

Because I need the oracle_jre_sha param to run some jobs. I'm not pretty sure about this concept, it this topic related to the chef-nexus-repository-manager https://github.com/sonatype/chef-nexus-repository-manager/blob/master/Jenkinsfile.

I found this topic: https://github.com/sous-chefs/java/issues/316, but not pretty sure how can I generate this sha from this JRE version.

Thanks!

Simone Lungarella
  • 301
  • 1
  • 4
  • 15
rasilvap
  • 1,771
  • 3
  • 31
  • 70

1 Answers1

0

That is a 32 hex characters. 32 x 4 is 128 bits. The hashes that Oracle publishes (e.g. here https://www.oracle.com/webfolder/s/digest/8u301checksum.html) are SHA256 and MD5 ... and none of them match that what is in that URL.

My guess is that Oracle are deliberately using UIDs in the URLs to make it hard for users to download a JRE or JDK without using an Oracle account and signifying that they have read and agree to the license terms. It would be self-defeating for them to make it easy for users to work out what the UIDs are going to be. With SHA512, they can make it effectively impossible, and I don't see why they wouldn't do that.

If this is problematic for you, my advice would be to download the installers that you need by hand and save a copy in your own private infrastructure. Then set up your Chef cookbook to deploy Java from your private copy. Note that this is the recommendation here:

and this cookbook specifically supports this way of handling the problem.

Alternatively, use an alternative to Oracle Java that doesn't make scripted Java installation difficult.

Stephen C
  • 698,415
  • 94
  • 811
  • 1,216
  • Do you know how can I define the chef recipe for this version? I'm not pretty sure how to achieve this. thanks! – rasilvap Sep 09 '21 at 14:11
  • I have added a link. Please read it ... and follow it's recommendations. That's all the advice I can give. – Stephen C Sep 09 '21 at 23:05