Skip to content

Commit e0d76da

Browse files
committed
Use virtual Java packages on Red Hat and set java_bin
This uses the virtual packages jre-VERSION-headless instead of explicitly openjdk. This allows other JREs to provide the same. It also uses an explicit path to the JRE specific java bin. At least on EL9 this allows the following upgrade path to work: dnf install https://yum.puppet.com/puppet7-release-el-9.noarch.rpm dnf install puppetserver dnf install https://yum.puppet.com/puppet8-release-el-9.noarch.rpm dnf upgrade puppetserver Prior to this patch it would break, because it used /usr/bin/java which will point to Java 8. By using /usr/lib/jvm/jre-17/bin/java we know for sure it is Java 17.
1 parent 82077ac commit e0d76da

File tree

1 file changed

+4
-2
lines changed
  • resources/puppetlabs/lein-ezbake/template/global/ext

1 file changed

+4
-2
lines changed

resources/puppetlabs/lein-ezbake/template/global/ext/fpm.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,9 +191,11 @@
191191
elsif options.operating_system == :el && options.os_version >= 7 # systemd el
192192
if ! options.is_pe
193193
if options.os_version == 7
194-
options.java = 'java-11-openjdk-headless'
194+
options.java = 'jre-11-headless'
195+
options.java_bin = '/usr/lib/jvm/jre-11/bin/java'
195196
else
196-
options.java = 'java-17-openjdk-headless'
197+
options.java = 'jre-17-headless'
198+
options.java_bin = '/usr/lib/jvm/jre-17/bin/java'
197199
end
198200
end
199201

0 commit comments

Comments
 (0)