From fc03fdedd2f782e7e7a5722c6192eb9b499403fe Mon Sep 17 00:00:00 2001 From: Valentin Savenko Date: Thu, 21 Feb 2019 14:00:52 +0100 Subject: [PATCH 1/3] Update default version & java 8 version from 8u192 to 8u201 It seems Oracle is no longer offering the old 192 version for download. Which makes this module fail with the default values! --- manifests/oracle.pp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/manifests/oracle.pp b/manifests/oracle.pp index c5d2f3f2..d5025ac2 100644 --- a/manifests/oracle.pp +++ b/manifests/oracle.pp @@ -172,16 +172,16 @@ $release_hash = undef } '8' : { - $release_major = '8u192' - $release_minor = 'b12' - $install_path = "${java_se}1.8.0_192" - $release_hash = '750e1c8617c5452694857ad95c3ee230' + $release_major = '8u201' + $release_minor = 'b09' + $install_path = "${java_se}1.8.0_201" + $release_hash = '42970487e3af4f5aa5bca3f542482c60' } default : { - $release_major = '8u192' - $release_minor = 'b12' - $install_path = "${java_se}1.8.0_192" - $release_hash = '750e1c8617c5452694857ad95c3ee230' + $release_major = '8u201' + $release_minor = 'b09' + $install_path = "${java_se}1.8.0_201" + $release_hash = '42970487e3af4f5aa5bca3f542482c60' } } } From 149ae1f801fd7b4f1376a7c104350ef86e668b54 Mon Sep 17 00:00:00 2001 From: Valentin Savenko Date: Thu, 21 Feb 2019 14:17:44 +0100 Subject: [PATCH 2/3] adjust tests for new versions and hash --- spec/defines/oracle_spec.rb | 80 ++++++++++++++++++------------------- 1 file changed, 40 insertions(+), 40 deletions(-) diff --git a/spec/defines/oracle_spec.rb b/spec/defines/oracle_spec.rb index e2d1e120..c9252d11 100644 --- a/spec/defines/oracle_spec.rb +++ b/spec/defines/oracle_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -oracle_url = 'http://download.oracle.com/otn-pub/java/jdk/8u192-b12/750e1c8617c5452694857ad95c3ee230/jdk-8u192-linux-x64.tar.gz' +oracle_url = 'http://download.oracle.com/otn-pub/java/jdk/8u201-b09/42970487e3af4f5aa5bca3f542482c60/jdk-8u201-linux-x64.tar.gz' describe 'java::oracle', type: :define do context 'with CentOS 64-bit' do @@ -28,9 +28,9 @@ let(:params) { { ensure: 'present', version: '8', java_se: 'jdk' } } let(:title) { 'jdk8' } - it { is_expected.to contain_archive('/tmp/jdk-8u192-linux-x64.rpm') } - it { is_expected.to contain_exec('Install Oracle java_se jdk 8 8u192 b12').with_command('rpm --force -iv /tmp/jdk-8u192-linux-x64.rpm') } - it { is_expected.to contain_exec('Install Oracle java_se jdk 8 8u192 b12').that_requires('Archive[/tmp/jdk-8u192-linux-x64.rpm]') } + it { is_expected.to contain_archive('/tmp/jdk-8u201-linux-x64.rpm') } + it { is_expected.to contain_exec('Install Oracle java_se jdk 8 8u201 b09').with_command('rpm --force -iv /tmp/jdk-8u201-linux-x64.rpm') } + it { is_expected.to contain_exec('Install Oracle java_se jdk 8 8u201 b09').that_requires('Archive[/tmp/jdk-8u201-linux-x64.rpm]') } end context 'when Oracle Java SE 6 JRE' do @@ -55,27 +55,27 @@ let(:params) { { ensure: 'present', version: '8', java_se: 'jre' } } let(:title) { 'jre8' } - it { is_expected.to contain_archive('/tmp/jre-8u192-linux-x64.rpm') } - it { is_expected.to contain_exec('Install Oracle java_se jre 8 8u192 b12').with_command('rpm --force -iv /tmp/jre-8u192-linux-x64.rpm') } - it { is_expected.to contain_exec('Install Oracle java_se jre 8 8u192 b12').that_requires('Archive[/tmp/jre-8u192-linux-x64.rpm]') } + it { is_expected.to contain_archive('/tmp/jre-8u201-linux-x64.rpm') } + it { is_expected.to contain_exec('Install Oracle java_se jre 8 8u201 b09').with_command('rpm --force -iv /tmp/jre-8u201-linux-x64.rpm') } + it { is_expected.to contain_exec('Install Oracle java_se jre 8 8u201 b09').that_requires('Archive[/tmp/jre-8u201-linux-x64.rpm]') } end context 'when passing URL to url parameter' do let(:params) do { ensure: 'present', - version_major: '8u192', - version_minor: 'b12', + version_major: '8u201', + version_minor: 'b09', java_se: 'jdk', - url: 'http://download.oracle.com/otn-pub/java/jdk/8u192-b12/750e1c8617c5452694857ad95c3ee230/jdk-8u192-linux-x64.rpm', + url: 'http://download.oracle.com/otn-pub/java/jdk/8u201-b09/42970487e3af4f5aa5bca3f542482c60/jdk-8u201-linux-x64.rpm', url_hash: 'ignored', } end let(:title) { 'jdk8' } it { - is_expected.to contain_archive('/tmp/jdk-8u192-linux-x64.rpm') - .with_source('http://download.oracle.com/otn-pub/java/jdk/8u192-b12/750e1c8617c5452694857ad95c3ee230/jdk-8u192-linux-x64.rpm') + is_expected.to contain_archive('/tmp/jdk-8u201-linux-x64.rpm') + .with_source('http://download.oracle.com/otn-pub/java/jdk/8u201-b09/42970487e3af4f5aa5bca3f542482c60/jdk-8u201-linux-x64.rpm') } end @@ -83,17 +83,17 @@ let(:params) do { ensure: 'present', - version_major: '8u192', - version_minor: 'b12', + version_major: '8u201', + version_minor: 'b09', java_se: 'jdk', - url_hash: '750e1c8617c5452694857ad95c3ee230', + url_hash: '42970487e3af4f5aa5bca3f542482c60', } end let(:title) { 'jdk8' } it { - is_expected.to contain_archive('/tmp/jdk-8u192-linux-x64.rpm') - .with_source('http://download.oracle.com/otn-pub/java/jdk//8u192-b12/750e1c8617c5452694857ad95c3ee230/jdk-8u192-linux-x64.rpm') + is_expected.to contain_archive('/tmp/jdk-8u201-linux-x64.rpm') + .with_source('http://download.oracle.com/otn-pub/java/jdk//8u201-b09/42970487e3af4f5aa5bca3f542482c60/jdk-8u201-linux-x64.rpm') } end @@ -101,10 +101,10 @@ let(:params) do { ensure: 'present', - version_major: '8u192', - version_minor: 'b12', + version_major: '8u201', + version_minor: 'b09', java_se: 'jdk', - url_hash: '750e1c8617c5452694857ad95c3ee230', + url_hash: '42970487e3af4f5aa5bca3f542482c60', } end let(:title) { 'jdk8' } @@ -202,9 +202,9 @@ let(:params) { { ensure: 'present', version: '8', java_se: 'jdk' } } let(:title) { 'jdk8' } - it { is_expected.to contain_archive('/tmp/jdk-8u192-linux-i586.rpm') } - it { is_expected.to contain_exec('Install Oracle java_se jdk 8 8u192 b12').with_command('rpm --force -iv /tmp/jdk-8u192-linux-i586.rpm') } - it { is_expected.to contain_exec('Install Oracle java_se jdk 8 8u192 b12').that_requires('Archive[/tmp/jdk-8u192-linux-i586.rpm]') } + it { is_expected.to contain_archive('/tmp/jdk-8u201-linux-i586.rpm') } + it { is_expected.to contain_exec('Install Oracle java_se jdk 8 8u201 b09').with_command('rpm --force -iv /tmp/jdk-8u201-linux-i586.rpm') } + it { is_expected.to contain_exec('Install Oracle java_se jdk 8 8u201 b09').that_requires('Archive[/tmp/jdk-8u201-linux-i586.rpm]') } end context 'when selecting Oracle Java SE 6 JRE on RedHat family, 32-bit' do @@ -229,19 +229,19 @@ let(:params) { { ensure: 'present', version: '8', java_se: 'jre' } } let(:title) { 'jdk8' } - it { is_expected.to contain_archive('/tmp/jre-8u192-linux-i586.rpm') } - it { is_expected.to contain_exec('Install Oracle java_se jre 8 8u192 b12').with_command('rpm --force -iv /tmp/jre-8u192-linux-i586.rpm') } - it { is_expected.to contain_exec('Install Oracle java_se jre 8 8u192 b12').that_requires('Archive[/tmp/jre-8u192-linux-i586.rpm]') } + it { is_expected.to contain_archive('/tmp/jre-8u201-linux-i586.rpm') } + it { is_expected.to contain_exec('Install Oracle java_se jre 8 8u201 b09').with_command('rpm --force -iv /tmp/jre-8u201-linux-i586.rpm') } + it { is_expected.to contain_exec('Install Oracle java_se jre 8 8u201 b09').that_requires('Archive[/tmp/jre-8u201-linux-i586.rpm]') } end context 'when installing multiple versions' do let(:params) do { ensure: 'present', - version_major: '8u192', - version_minor: 'b12', + version_major: '8u201', + version_minor: 'b09', java_se: 'jdk', - url_hash: '750e1c8617c5452694857ad95c3ee230', + url_hash: '42970487e3af4f5aa5bca3f542482c60', } end let(:title) { 'jdk8' } @@ -308,9 +308,9 @@ let(:params) { { ensure: 'present', version: '8', java_se: 'jdk' } } let(:title) { 'jdk8' } - it { is_expected.to contain_archive('/tmp/jdk-8u192-linux-x64.tar.gz') } - it { is_expected.to contain_exec('Install Oracle java_se jdk 8 8u192 b12').with_command('tar -zxf /tmp/jdk-8u192-linux-x64.tar.gz -C /usr/lib/jvm') } - it { is_expected.to contain_exec('Install Oracle java_se jdk 8 8u192 b12').that_requires('Archive[/tmp/jdk-8u192-linux-x64.tar.gz]') } + it { is_expected.to contain_archive('/tmp/jdk-8u201-linux-x64.tar.gz') } + it { is_expected.to contain_exec('Install Oracle java_se jdk 8 8u201 b09').with_command('tar -zxf /tmp/jdk-8u201-linux-x64.tar.gz -C /usr/lib/jvm') } + it { is_expected.to contain_exec('Install Oracle java_se jdk 8 8u201 b09').that_requires('Archive[/tmp/jdk-8u201-linux-x64.tar.gz]') } end context 'with Oracle Java SE 6 JRE' do @@ -335,26 +335,26 @@ let(:params) { { ensure: 'present', version: '8', java_se: 'jre' } } let(:title) { 'jre8' } - it { is_expected.to contain_archive('/tmp/jre-8u192-linux-x64.tar.gz') } - it { is_expected.to contain_exec('Install Oracle java_se jre 8 8u192 b12').with_command('tar -zxf /tmp/jre-8u192-linux-x64.tar.gz -C /usr/lib/jvm') } - it { is_expected.to contain_exec('Install Oracle java_se jre 8 8u192 b12').that_requires('Archive[/tmp/jre-8u192-linux-x64.tar.gz]') } + it { is_expected.to contain_archive('/tmp/jre-8u201-linux-x64.tar.gz') } + it { is_expected.to contain_exec('Install Oracle java_se jre 8 8u201 b09').with_command('tar -zxf /tmp/jre-8u201-linux-x64.tar.gz -C /usr/lib/jvm') } + it { is_expected.to contain_exec('Install Oracle java_se jre 8 8u201 b09').that_requires('Archive[/tmp/jre-8u201-linux-x64.tar.gz]') } end context 'when passing URL to url parameter' do - let(:params) { { ensure: 'present', version_major: '8u192', version_minor: 'b12', java_se: 'jdk', url: oracle_url.to_s } } + let(:params) { { ensure: 'present', version_major: '8u201', version_minor: 'b09', java_se: 'jdk', url: oracle_url.to_s } } let(:title) { 'jdk8' } - it { is_expected.to contain_archive('/tmp/jdk-8u192-linux-x64.tar.gz') } + it { is_expected.to contain_archive('/tmp/jdk-8u201-linux-x64.tar.gz') } end context 'when installing multiple versions' do let(:params) do { ensure: 'present', - version_major: '8u192', - version_minor: 'b12', + version_major: '8u201', + version_minor: 'b09', java_se: 'jdk', - url_hash: '750e1c8617c5452694857ad95c3ee230', + url_hash: '42970487e3af4f5aa5bca3f542482c60', } end let(:title) { 'jdk8' } From 66234518cc5856c87a80dabf7ee3bd4bb736c6da Mon Sep 17 00:00:00 2001 From: Valentin Savenko Date: Mon, 25 Feb 2019 11:58:02 +0100 Subject: [PATCH 3/3] update versions for install-acceptance tests --- spec/acceptance/install_spec.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spec/acceptance/install_spec.rb b/spec/acceptance/install_spec.rb index 527ee588..7bfa37b8 100644 --- a/spec/acceptance/install_spec.rb +++ b/spec/acceptance/install_spec.rb @@ -87,9 +87,9 @@ oracle_enabled = false oracle_version_major = '8' -oracle_version_minor = '192' -oracle_version_build = '12' -oracle_hash = '750e1c8617c5452694857ad95c3ee230' +oracle_version_minor = '201' +oracle_version_build = '09' +oracle_hash = '42970487e3af4f5aa5bca3f542482c60' install_oracle_jre = <