From 4624c2779f9b4af36bd41a2ad4644fdff7500807 Mon Sep 17 00:00:00 2001 From: Jan Ehrhardt Date: Tue, 8 Apr 2014 16:13:40 +0200 Subject: [PATCH 1/6] Update to Java 8 The first release of Java 8 has no update version. This breaks the existing pattern for update versions. Since the update_version parameter has been removed, this commit will break existing usage, when the parameter is explicitly set by the user. --- manifests/init.pp | 11 +++++------ spec/classes/java_spec.rb | 9 ++++----- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/manifests/init.pp b/manifests/init.pp index e85d2d1..300306d 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -4,24 +4,23 @@ # # include java class java ( - $update_version = '51', $base_download_url = 'https://s3.amazonaws.com/boxen-downloads/java' ) { include boxen::config - $jre_url = "${base_download_url}/jre-7u${update_version}-macosx-x64.dmg" - $jdk_url = "${base_download_url}/jdk-7u${update_version}-macosx-x64.dmg" + $jre_url = "${base_download_url}/jre-8-macosx-x64.dmg" + $jdk_url = "${base_download_url}/jdk-8-macosx-x64.dmg" $wrapper = "${boxen::config::bindir}/java" - $jdk_dir = "/Library/Java/JavaVirtualMachines/jdk1.7.0_${update_version}.jdk" + $jdk_dir = "/Library/Java/JavaVirtualMachines/jdk1.8.0.jdk" $sec_dir = "${jdk_dir}/Contents/Home/jre/lib/security" package { - "jre-7u${update_version}.dmg": + "jre-8.dmg": ensure => present, alias => 'java-jre', provider => pkgdmg, source => $jre_url ; - "jdk-7u${update_version}.dmg": + "jdk-8.dmg": ensure => present, alias => 'java', provider => pkgdmg, diff --git a/spec/classes/java_spec.rb b/spec/classes/java_spec.rb index 454cb91..76efa90 100644 --- a/spec/classes/java_spec.rb +++ b/spec/classes/java_spec.rb @@ -4,7 +4,6 @@ let(:facts) { default_test_facts } let(:params) { { - :update_version => '42', :base_download_url => 'https://downloads.test/java' } } @@ -12,18 +11,18 @@ it do should include_class('boxen::config') - should contain_package('jre-7u42.dmg').with({ + should contain_package('jre-8.dmg').with({ :ensure => 'present', :alias => 'java-jre', :provider => 'pkgdmg', - :source => 'https://downloads.test/java/jre-7u42-macosx-x64.dmg' + :source => 'https://downloads.test/java/jre-8-macosx-x64.dmg' }) - should contain_package('jdk-7u42.dmg').with({ + should contain_package('jdk-8.dmg').with({ :ensure => 'present', :alias => 'java', :provider => 'pkgdmg', - :source => 'https://downloads.test/java/jdk-7u42-macosx-x64.dmg' + :source => 'https://downloads.test/java/jdk-8-macosx-x64.dmg' }) should contain_file('/test/boxen/bin/java').with({ From 9be4acaa1ada60f782dde6193c55ee7f4f5e7f93 Mon Sep 17 00:00:00 2001 From: Jan Ehrhardt Date: Tue, 8 Apr 2014 16:16:52 +0200 Subject: [PATCH 2/6] Upgrade JCE JARs Java 8 requires a new version of JCE. --- files/US_export_policy.jar | Bin 2487 -> 3023 bytes files/local_policy.jar | Bin 2500 -> 3035 bytes 2 files changed, 0 insertions(+), 0 deletions(-) diff --git a/files/US_export_policy.jar b/files/US_export_policy.jar index 717321301e92b00fef35cf920e7a15f9ff5dce0c..251b102c57c076504ba818330e4fceb4509753d8 100644 GIT binary patch delta 2372 zcmZ8jc{mhW8=nzoY}MB&`@Te$7_yXYtTAMw7}?8&>|44RbA{ZR!K1-2mPrfEG?aBB z`x<7NC|i^zOGUCYL%3Y}zT5J>=Q+>wp7*?eyyy3Op5O1#AWWhC2>3ouK>!#G1~fZm znq@4BVC-OLtSv1Z&#Bv4q8KpyL=ADSrBgiPMOKD_VeS91Hkc@G9m{dBm`fI1*CLi5 z8Lh}d$K(nfc;~U=5g%fq{|M%vpK#803E+OJEQm4v(m&y5b~CMx2f=i$@fD>+fFk+V zpl+X5`3CQ-j*vDgDv3F5oRu zGrvJn8tD`%_N2}GROipH@9Ecf^g0(df|m$VT(J|AZ>3ydcAHLfU*thr9#={rYAPu^ z@e;;))zPEvZL-R(kB(0DrRppCh!!Y*oO(vYWOYz_{bb&H?tl<*5SV$87BT|>03g7F z0KoraB9Dn;+J{`%0Q?t-E;YXW=MJ7WkZxDrZ{BP?+Hp<^sg_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&y6%~NG=I=K#8ZiE6dwYDMUf_FmBy}}8N z64;;QKq=Pp=K#cusvf{_pvqwaR9pAQM1-A~i&9}e06|qBt4ccbSF!SHy9>ZiXc?0m zFAm1NU3UT?FHRIQlDpjBis{JxTYTtyD?TJ-5WLuPjn*u zFD|N_{06Go8WBcUAIJL%w)TMQ4=9}zqaAG{qs256RTMqbq$`No;_-OoEMa4dx58kr zqfR=%ci!EEw@hCj_7%s^9Wd|u5DWVsua8O5DG+Ec4~y~-@FQa0N48+YO17|YM5JrJ zu7lYu{(v_57JiLeWquqjpL&NFd1-k?+2QHD&PTltml_LIG$J!~u^%)QS{bemivQ)6 zki$v%PG8G;x(Y~@WKgZJkwhlyYm#c^^?_O)1i6c{{y9`^>Pt#d13_uGHb9{(vP;J} z`f6O^EkdW-EGDMj5a+syUwuh`mIseF&ONuk+cjLBHYo9wSdnlJYc==D>M5`-N7>yu z?Mg?jq0#x+XRLdcW%D+#S(xmYCd8lkv8d}yE>-uIq_25+3@rc3-LPyWNBlpH`?2Zm z@$4q{ilUs3u7(`-_Z%bIL^J1X+sfelaHax;$e~=8K6*)kSgsVGS($Xxj(uRxls62llb!A!f2mLi}qa#i<)Pa*%05&=pBUkcA;(~QG0~4WzGk&u*jL5$SDmF05B)~ zEu36JTP<)hB1XdeIfJ^%&pkvcWd#JK0AEMXSEA$G!Dm$e9!TG^PU;KWKA*Dy91*Pi zrS99d(*LO25x^~hRSp|}79lAr|6L$on={PQO2^*CR&T%OQ0P}JpXE7-$_o|?Aa+{+?|x4!_Wm|t`N diff --git a/files/local_policy.jar b/files/local_policy.jar index c34d0362d33e269e3869806fbdec2b20084a95d5..1c58939bf396afd6ff44a56f4578aed3d2ddf80a 100644 GIT binary patch delta 2382 zcmZ8jc{CL28yr z^CSUz61ER+8)+)SHT5Si8hUCGjwmZs{KQ18~{{E=f ziE8XgRq>A+e$F4Hists1tEs9SHg~_BZy8zGqau@;Jfp@>9T6B6dH+{U09vU;PW4tq_ewl7guo&D`dV88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QWchkIGqr={M0Gm5Il%=Z#%?*}*W+PYbcu8t8#*?_SMhMHmA6F5e4${Nut z*!sj>9bNl~kwq*Z_P5cb>Fab)@%%a7Sh!nd$zayU2`OqDRExsR!T9=nRpJ+7NI6mE zpK{PXF^)yrb{A&zc>|OGLSNgfzIYs~kP=oIb9H4EV)u9+wxiR9tTj`?`edXm4Fabk zUq`C};~%zw>}1iL_oVYwWuOXCzeaH@sjgC2omj7+3()8)kiRVFn@i3~X>2QfQ=qh8 z@2}Vs(*rZQ;~iHLQqZkBi;rzGAUJO4uQyVk6r$se@(jQ1_t0xnhb10YRwWqbSk8U6 zd<^Kwg*!?c5AC{+IhK!*bAu9%bN5bRDJy`iqecQ z2rCK4kq`^TVpfyB>=$5%Y6wHC_x4VB=xqE-YU0j!bhG&8=R4zQSH_4|=-`=YBl?%z zVp=S&!)pE-YtRhYz08~vWNC2zc$(LGvfEixiN&T6_TS09S;Upb-uG1HLs(eEJK%2K zDWHJBobb1FLPqiv=9tJiVSd_RZt#1ANVlAzkd(mJ0QyREfph$?6o@~5s{$N0sB-1G?v5AX}ojtCFI2HZi}13`ydfc&!Nqc~XP@bw@5 Date: Tue, 8 Apr 2014 16:19:33 +0200 Subject: [PATCH 3/6] Update README for removed parameter --- README.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/README.md b/README.md index fd3692f..8482f93 100644 --- a/README.md +++ b/README.md @@ -14,9 +14,8 @@ include java ## Parameters -You can customise this module by configuring some optional class parameters. Usually you'd do this via Hiera, but you could also explicitly pass those parameters in puppet code like `class { 'java': $update_version => '42', }`. +You can customise this module by configuring some optional class parameters. Usually you'd do this via Hiera, but you could also explicitly pass those parameters in puppet code like `class { 'java': $base_download_url => 'https://myorg.example/dist/java', }`. -* `update_version`: The 'update' part of the JRE/JDK version to install. For example, if you specify `51`, the module would install java 7u51 * `base_download_url`: A base path from which the JRE and JDK packages should be downloaded. For example, if you specify `https://myorg.example/dist/java`, this module would download the jre from `https://myorg.example/dist/java/jre-7u51-macosx-x64.dmg`. All of these parameters have sensible defaults, and are provided if you need more control. @@ -24,7 +23,6 @@ All of these parameters have sensible defaults, and are provided if you need mor Example hiera data in YAML: ```yaml -java::update_version: '51' java::base_download_url: 'https://myorg.example/dist/java' ``` From 753a144577dede649a8958b7281e97e07db12bca Mon Sep 17 00:00:00 2001 From: Jan Ehrhardt Date: Wed, 9 Apr 2014 06:28:43 +0200 Subject: [PATCH 4/6] Fix puppet-lint error After removing the parameter `update_version`, the usage of double quotes is no longer necessary. --- manifests/init.pp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/manifests/init.pp b/manifests/init.pp index 300306d..a90091c 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -11,16 +11,16 @@ $jre_url = "${base_download_url}/jre-8-macosx-x64.dmg" $jdk_url = "${base_download_url}/jdk-8-macosx-x64.dmg" $wrapper = "${boxen::config::bindir}/java" - $jdk_dir = "/Library/Java/JavaVirtualMachines/jdk1.8.0.jdk" + $jdk_dir = '/Library/Java/JavaVirtualMachines/jdk1.8.0.jdk' $sec_dir = "${jdk_dir}/Contents/Home/jre/lib/security" package { - "jre-8.dmg": + 'jre-8.dmg': ensure => present, alias => 'java-jre', provider => pkgdmg, source => $jre_url ; - "jdk-8.dmg": + 'jdk-8.dmg': ensure => present, alias => 'java', provider => pkgdmg, From 4d5f6e5cec759a637a2dcc1a62a6c8be7e8531bd Mon Sep 17 00:00:00 2001 From: "jan.ehrhardt" Date: Mon, 29 Dec 2014 22:08:54 +0100 Subject: [PATCH 5/6] Fix tests The update version was not considered in the test. After the indroduction of Java 8 the minimal update version for Mac OS X 10.10 has also ben changed. --- spec/classes/java_spec.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/spec/classes/java_spec.rb b/spec/classes/java_spec.rb index 0e579fd..d57ee6f 100644 --- a/spec/classes/java_spec.rb +++ b/spec/classes/java_spec.rb @@ -15,14 +15,14 @@ :ensure => 'present', :alias => 'java-jre', :provider => 'pkgdmg', - :source => 'https://downloads.test/java/jre-8-macosx-x64.dmg' + :source => 'https://downloads.test/java/jre-8u25-macosx-x64.dmg' }) should contain_package('jdk-8.dmg').with({ :ensure => 'present', :alias => 'java', :provider => 'pkgdmg', - :source => 'https://downloads.test/java/jdk-8-macosx-x64.dmg' + :source => 'https://downloads.test/java/jdk-8u25-macosx-x64.dmg' }) should contain_file('/test/boxen/bin/java').with({ @@ -36,13 +36,13 @@ let(:facts) { default_test_facts.merge({ :macosx_productversion_major => '10.10' }) } let(:params) { { - :update_version => '51', + :update_version => '5', } } it do expect { should contain_class('java') - }.to raise_error(/Yosemite Requires Java 7 with a patch level >= 71 \(Bug JDK\-8027686\)/) + }.to raise_error(/Yosemite Requires Java 8 with a patch level >= 20 \(Bug JDK\-8027686\)/) end end end From dde29e6c4289244c1641cb2150d273350110a7d9 Mon Sep 17 00:00:00 2001 From: "jan.ehrhardt" Date: Mon, 29 Dec 2014 22:14:46 +0100 Subject: [PATCH 6/6] Fix quotes --- manifests/init.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifests/init.pp b/manifests/init.pp index 16046cc..580f60d 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -12,7 +12,7 @@ $jre_url = "${base_download_url}/jre-8u${update_version}-macosx-x64.dmg" $jdk_url = "${base_download_url}/jdk-8u${update_version}-macosx-x64.dmg" $wrapper = "${boxen::config::bindir}/java" - $jdk_dir = '/Library/Java/JavaVirtualMachines/jdk1.8.0_${update_version}.jdk' + $jdk_dir = "/Library/Java/JavaVirtualMachines/jdk1.8.0_${update_version}.jdk" $sec_dir = "${jdk_dir}/Contents/Home/jre/lib/security" if ((versioncmp($::macosx_productversion_major, '10.10') >= 0) and