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

AdoptOpenJDK changed artifacts naming template and resource adoptopenjdk_install fails #539

Closed Nklya closed 4 years ago

Nklya commented 5 years ago

Cookbook version

3.2.1 ? (actually it's 3.2.0 in GitHub master)

Chef-client version

14

Platform Details

Ubuntu 18.04

Scenario:

AdoptOpenJDK changed artifacts naming template and resource adoptopenjdk_install fails. Current version in default attributes is: default['java']['adoptopenjdk']['8']['x86_64']['openj9']['url'] = 'https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u192-b12/OpenJDK8U-jdk_x64_linux_openj9_8u192b12.tar.gz' I want to use newer version and set: default['java']['adoptopenjdk']['8']['x86_64']['openj9']['url'] = 'https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u202-b08_openj9-0.12.1/OpenJDK8U-jdk_x64_linux_openj9_8u202b08_openj9-0.12.1.tar.gz'

As you see, there is a new part _openj9-0.12.1 in the filename. And this schema is used in all builds newer than jdk8u192-b12 You can check at https://adoptopenjdk.net/archive.html?variant=openjdk8&jvmVariant=openj9

Steps to Reproduce:

Expected Result:

Actual Result:

Recipe: java::adoptopenjdk
         * adoptopenjdk_install[adoptopenjdk] action install
           * directory[/usr/lib/jvm] action create (up to date)
           * remote_file[/tmp/kitchen/cache/OpenJDK8U-jdk_x64_linux_openj9_8u202b08_openj9-0.12.1.tar.gz] action create_if_missing
             - create new file /tmp/kitchen/cache/OpenJDK8U-jdk_x64_linux_openj9_8u202b08_openj9-0.12.1.tar.gz
             - update content in file /tmp/kitchen/cache/OpenJDK8U-jdk_x64_linux_openj9_8u202b08_openj9-0.12.1.tar.gz from none to cdfa82
             (file sizes exceed 10000000 bytes, diff output suppressed)
             - change mode from '' to '0644'
           * apt_package[tar] action install (up to date)
       [2019-04-17T15:07:20+00:00] FATAL:  Command ' mv "/tmp/kitchen/cache/jdk-0.12+1" "/usr/lib/jvm/jdk-0.12+1-openj9" ' failed
Nklya commented 5 years ago

Looks like they recently fixed naming template https://github.com/AdoptOpenJDK/openjdk-build/issues/173

damacus commented 4 years ago

Closing due to inactivity.

If this is still an issue please reopen or open another issue. Alternatively drop by the #sous-chefs channel on the Chef Community Slack and we'll be happy to help!

Thanks, Sous-Chefs