Skip to content
This repository was archived by the owner on Dec 19, 2024. It is now read-only.

Commit 2002c8d

Browse files
committed
v1.1.4
* Fix bug in package name for Java 8u20 * Renamed exec resources to something less generic (avoid conflicts)
1 parent f6e3c26 commit 2002c8d

File tree

3 files changed

+20
-9
lines changed

3 files changed

+20
-9
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
###1.1.4
2+
3+
* Fix bug in package name for Java 8u20
4+
* Renamed exec resources to something less generic (avoid conflicts)
5+
16
###1.1.3
27

38
* Add support for Java '8u20'

manifests/init.pp

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,12 @@
151151
}
152152
$downloadurl = "http://download.oracle.com/otn-pub/java/jdk/${version_final}${build}/${filename}"
153153

154+
# define package name
155+
$packagename = $version_real ? {
156+
'8u20' => "${type}1.${maj_version}.0_${min_version}",
157+
default => $type
158+
}
159+
154160
# make sure install/download directory exists
155161
file { '/usr/java':
156162
ensure => directory,
@@ -159,22 +165,22 @@
159165
group => 'root'
160166
} ->
161167
# download RPM
162-
exec { 'downloadRPM':
168+
exec { 'download java RPM':
163169
path => '/usr/bin',
164170
cwd => '/usr/java',
165171
creates => "/usr/java/${filename}",
166172
command => "wget --no-cookies --no-check-certificate --header \"Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie\" \"${downloadurl}\"",
167173
timeout => 0,
168174
require => Package['wget']
169175
}
170-
176+
171177
# install package
172178
if $maj_version >= 7 {
173-
package { $type:
179+
package { $packagename:
174180
ensure => latest,
175181
source => "/usr/java/${filename}",
176182
provider => rpm,
177-
require => Exec['downloadRPM']
183+
require => Exec['download java RPM']
178184
}
179185
}
180186
# the procedure is a bit more complicated for older versions...
@@ -189,21 +195,21 @@
189195
# the extracted file includes the 'new' arch string
190196
$filename_extract = "${type}-${version_final}-linux-${arch_final}.rpm"
191197

192-
exec { 'unpackRPM':
198+
exec { 'unpack java RPM':
193199
path => '/bin',
194200
cwd => '/usr/java',
195201
creates => "/usr/java/${filename_extract}",
196202
command => "sed -ni '/exit 0/,\${//!p}' ${filename}; chmod +x ${filename}; ./${filename}",
197-
require => [Package['sed'], Exec['downloadRPM']]
203+
require => [Package['sed'], Exec['download java RPM']]
198204
} ~>
199205
# remove undesired extra RPMs
200-
exec { 'cleanupRPM':
206+
exec { 'cleanup java RPM':
201207
path => '/bin',
202208
cwd => '/usr/java',
203209
refreshonly => true,
204210
command => 'rm -f sun-javadb-*.rpm'
205211
} ->
206-
package { $type:
212+
package { $packagename:
207213
ensure => latest,
208214
source => "/usr/java/${filename_extract}",
209215
provider => rpm

metadata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"project_page": "https://github.com/tOnI0/aco-oracle_java",
66
"source": "git://github.com/tOnI0/aco-oracle_java.git",
77
"summary": "Puppet module to install Oracle Java on RPM-based Linux systems",
8-
"version": "1.1.3",
8+
"version": "1.1.4",
99
"tags": ["rpm","jre","jdk","oracle","java"],
1010
"dependencies": [
1111
{

0 commit comments

Comments
 (0)