sous-chefs / java

Development repository for the java cookbook
https://supermarket.chef.io/cookbooks/java
Apache License 2.0
386 stars 637 forks source link

Corretto checksums have changed #607

Closed damacus closed 3 years ago

damacus commented 4 years ago

:speaking_head: Foreword

Thank for taking the time to fill this bug report fully. Without it we may not be able to fix the bug, and the issue may be closed without resolution.

:ghost: Brief Description

Amazon have updated the Corretto packages thus changing the checksums

:pancakes: Cookbook version

8.0.0

:woman_cook: Chef-Infra Version

Version of chef-client in your environment.

:tophat: Platform details

n/a

Steps To Reproduce

RUn

kitchen test corretto-11-amazon

:police_car: Expected behavior

Corretto downloads and installs correctly

:heavy_plus_sign: Additional context

It I would be nice if we could grab these checksums from the website, but they only provide MD5 hashes right now

duncaan commented 4 years ago

Unless chef provides a md5 sum property or AWS provides a sha256 sum, we can't automate this.

jakauppila commented 4 years ago

AWS provides an MD5 checksum. So for example, the package

hosts an MD5 checksum at

Source: https://docs.aws.amazon.com/corretto/latest/corretto-11-ug/downloads-list.html

jakauppila commented 4 years ago

Similarly with the checksum values changing, so has the full_version value that is defaulted within corretto_sub_dir.

So as-is, if you were to utilize the resource as

corretto_install '11' do
  action :install
end

It'll extract it at /usr/lib/jvm/java-11-corretto/amazon-corretto-11.0.7.10.1-linux-x64, but sets node.default['java']['java_home'] to /usr/lib/jvm/java-11-corretto/amazon-corretto-11.0.6.10.1-linux-x64

duncaan commented 4 years ago

Opened https://github.com/corretto/corretto-11/issues/125 to formally request checksums that chef can use.

damacus commented 3 years ago

Resolved by #656