From a3e59e36517fcadd14669b829d2a6840941c1d80 Mon Sep 17 00:00:00 2001 From: Vincent Rivellino Date: Tue, 29 May 2018 10:26:13 -0400 Subject: [PATCH 1/4] Update Java 8 to Patch 172 --- CHANGELOG.md | 4 ++++ attributes/bind.rb | 18 +++++++++--------- metadata.rb | 2 +- spec/spec_helper.rb | 4 ++-- .../alt_home/serverspec/spec_helper.rb | 2 +- .../default/serverspec/spec_helper.rb | 2 +- 6 files changed, 18 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 23d1cfb..1fe6ee8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 8.172 2018-05-29 + +- Update 8u172 + ## 8.171 2018-04-18 - Update 8u171 diff --git a/attributes/bind.rb b/attributes/bind.rb index feb8976..f7d7e26 100644 --- a/attributes/bind.rb +++ b/attributes/bind.rb @@ -1,13 +1,13 @@ # get details from download_url -# http://download.oracle.com/otn-pub/java/jdk/8u171-b11/512cd62ec5174c3487ac17c61aaa89e8/jdk-8u171-linux-x64.tar.gz +# http://download.oracle.com/otn-pub/java/jdk/8u172-b11/a58eab1ec242421181065cdc37240b08/jdk-8u172-linux-x64.tar.gz default['java_se']['release'] = '8' -default['java_se']['update'] = '171' +default['java_se']['update'] = '172' default['java_se']['build'] = '11' -default['java_se']['hash'] = '512cd62ec5174c3487ac17c61aaa89e8' +default['java_se']['hash'] = 'a58eab1ec242421181065cdc37240b08' -# https://www.oracle.com/webfolder/s/digest/8u171checksum.html -default['java_se']['sha256']['tar']['i586'] = '37896425b90ea323d841cb57784cec21822c38754e94e415b7f102b205c80536' -default['java_se']['sha256']['tar']['x64'] = 'b6dd2837efaaec4109b36cfbb94a774db100029f98b0d78be68c27bec0275982' -default['java_se']['sha256']['dmg']['x64'] = '00ccc048009e64e7e341d55d35c8519ab63ef5f86f0d73d4e823281d0b358d40' -default['java_se']['sha256']['exe']['i586'] = 'fa5de8068571d40f01d6ce8040761b63b5e805aca584e8904cfd026c3fd09138' -default['java_se']['sha256']['exe']['x64'] = '841b20e904b7f46fe7c8ce88bd35148e9663c750c8336286d0eb05a0a5b203f4' +# https://www.oracle.com/webfolder/s/digest/8u172checksum.html +default['java_se']['sha256']['tar']['i586'] = '0a4310d31246924d5c3cd161b9da7f446acef373e6484452c80de8d8519f5a33' +default['java_se']['sha256']['tar']['x64'] = '28a00b9400b6913563553e09e8024c286b506d8523334c93ddec6c9ec7e9d346' +default['java_se']['sha256']['dmg']['x64'] = '256acd1a6157e8c8d5413ff67eab138b959234c8ce4f25f1bb19aa9ea428e685' +default['java_se']['sha256']['exe']['i586'] = '434d7cbe88e2a28ee37c7345b5d93810c98112908f7dd5a273a0611482898928' +default['java_se']['sha256']['exe']['x64'] = '580bd9a6da5640661c4dc6ebdb3eac451dbc49f23635728116d90a4d164d3a0f' diff --git a/metadata.rb b/metadata.rb index f0a4eef..9c15869 100644 --- a/metadata.rb +++ b/metadata.rb @@ -7,7 +7,7 @@ source_url 'https://github.com/vrivellino/chef-java_se' if respond_to?(:source_url) issues_url 'https://github.com/vrivellino/chef-java_se/issues' if respond_to?(:issues_url) chef_version '>= 11.0' if respond_to?(:chef_version) -version '8.171.0' +version '8.172.0' supports 'centos' supports 'debian' diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 25bde02..cbdd915 100755 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -3,8 +3,8 @@ BUILD = '11'.freeze VERSION_MAJOR = '8'.freeze -VERSION_UPDATE = '171'.freeze -HASH = '512cd62ec5174c3487ac17c61aaa89e8'.freeze +VERSION_UPDATE = '172'.freeze +HASH = 'a58eab1ec242421181065cdc37240b08'.freeze CACHE = Chef::Config[:file_cache_path] diff --git a/test/integration/alt_home/serverspec/spec_helper.rb b/test/integration/alt_home/serverspec/spec_helper.rb index 0644d50..2c729b8 100644 --- a/test/integration/alt_home/serverspec/spec_helper.rb +++ b/test/integration/alt_home/serverspec/spec_helper.rb @@ -1,6 +1,6 @@ require 'serverspec' -VERSION = '1.8.0_171'.freeze +VERSION = '1.8.0_172'.freeze if (/cygwin|mswin|mingw|bccwin|wince|emx/ =~ RUBY_PLATFORM).nil? set :backend, :exec diff --git a/test/integration/default/serverspec/spec_helper.rb b/test/integration/default/serverspec/spec_helper.rb index 0644d50..2c729b8 100644 --- a/test/integration/default/serverspec/spec_helper.rb +++ b/test/integration/default/serverspec/spec_helper.rb @@ -1,6 +1,6 @@ require 'serverspec' -VERSION = '1.8.0_171'.freeze +VERSION = '1.8.0_172'.freeze if (/cygwin|mswin|mingw|bccwin|wince|emx/ =~ RUBY_PLATFORM).nil? set :backend, :exec From d21996befcf07ba9f9e296670ad844ec9977ba31 Mon Sep 17 00:00:00 2001 From: Vincent Rivellino Date: Sat, 19 May 2018 14:41:23 -0400 Subject: [PATCH 2/4] Fixes for rubocop --- libraries/default.rb | 1 - libraries/downloader.rb | 1 - recipes/_linux_install.rb | 8 ++------ 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/libraries/default.rb b/libraries/default.rb index 5b98dad..43d4874 100644 --- a/libraries/default.rb +++ b/libraries/default.rb @@ -73,4 +73,3 @@ def fetch_java_installer file_cache_path end -# rubocop:enable Metrics/AbcSize, Metrics/CyclomaticComplexity, Metrics/MethodLength, Metrics/PerceivedComplexity diff --git a/libraries/downloader.rb b/libraries/downloader.rb index 79ab1f5..cd929a0 100644 --- a/libraries/downloader.rb +++ b/libraries/downloader.rb @@ -116,7 +116,6 @@ def fetch(url, file, checksum, limit = 5) fetch(url, file, checksum, limit - 1) end end - # rubocop:enable Metrics/MethodLength def valid?(file, checksum) sha256 = Digest::SHA256.file file diff --git a/recipes/_linux_install.rb b/recipes/_linux_install.rb index ea1df79..2e8a968 100644 --- a/recipes/_linux_install.rb +++ b/recipes/_linux_install.rb @@ -136,9 +136,7 @@ # install the alternative if needed unless alternative_exists Chef::Log.info "adding alternative for #{cmd}" - if node['java_se']['reset_alternatives'] - Mixlib::ShellOut.new("rm /var/lib/alternatives/#{cmd}").run_command - end + Mixlib::ShellOut.new("rm /var/lib/alternatives/#{cmd}").run_command if node['java_se']['reset_alternatives'] install_alt = Mixlib::ShellOut.new("#{alternatives_cmd} --install #{bin_path} #{cmd} #{alt_path} #{priority}") install_alt.run_command unless install_alt.exitstatus == 0 @@ -156,9 +154,7 @@ Chef::Log.info "setting alternative for #{cmd}" set_alt = Mixlib::ShellOut.new("#{alternatives_cmd} --set #{cmd} #{alt_path}") set_alt.run_command - unless set_alt.exitstatus == 0 - raise("set alternative failed: #{alternatives_cmd} --set #{cmd} #{alt_path}") - end + raise("set alternative failed: #{alternatives_cmd} --set #{cmd} #{alt_path}") unless set_alt.exitstatus == 0 end end end From fcbb850378c4240c6b13e723fd0b64fcac389b57 Mon Sep 17 00:00:00 2001 From: Vincent Rivellino Date: Tue, 29 May 2018 13:08:59 -0400 Subject: [PATCH 3/4] Ruby 2.4 in Appveyor config --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 64af44c..ea3eaeb 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -12,7 +12,7 @@ environment: SSL_CERT_FILE: c:\projects\kitchen-machine\certs.pem matrix: - - ruby_version: "23" + - ruby_version: "24" clone_folder: c:\projects\kitchen-machine clone_depth: 1 From 18fcf1e360555acaa6170f7ca01246ba05ce410a Mon Sep 17 00:00:00 2001 From: Vincent Rivellino Date: Tue, 29 May 2018 15:06:11 -0400 Subject: [PATCH 4/4] Fix bad shasums --- attributes/bind.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/attributes/bind.rb b/attributes/bind.rb index f7d7e26..cbeb257 100644 --- a/attributes/bind.rb +++ b/attributes/bind.rb @@ -8,6 +8,6 @@ # https://www.oracle.com/webfolder/s/digest/8u172checksum.html default['java_se']['sha256']['tar']['i586'] = '0a4310d31246924d5c3cd161b9da7f446acef373e6484452c80de8d8519f5a33' default['java_se']['sha256']['tar']['x64'] = '28a00b9400b6913563553e09e8024c286b506d8523334c93ddec6c9ec7e9d346' -default['java_se']['sha256']['dmg']['x64'] = '256acd1a6157e8c8d5413ff67eab138b959234c8ce4f25f1bb19aa9ea428e685' -default['java_se']['sha256']['exe']['i586'] = '434d7cbe88e2a28ee37c7345b5d93810c98112908f7dd5a273a0611482898928' -default['java_se']['sha256']['exe']['x64'] = '580bd9a6da5640661c4dc6ebdb3eac451dbc49f23635728116d90a4d164d3a0f' +default['java_se']['sha256']['dmg']['x64'] = 'b0de04d3ec7fbf2e54e33e29c78ababa0a4df398ba490d4abb125b31ea8d663e' +default['java_se']['sha256']['exe']['i586'] = '63c66282303df19060b476b583f8bc21a88afcf63f669d56c4e966751ec9181c' +default['java_se']['sha256']['exe']['x64'] = '0b330b00576420a38f5c76cd07899b46551c075fa9e4df6028b14828e538e30d'