-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use virtual Java packages on Red Hat and set java_bin #627
base: main
Are you sure you want to change the base?
Changes from all commits
5f53a34
1c1dd12
d8ea21d
0685174
6e7ba9b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,7 @@ | |
options.old_sles = 0 | ||
options.sles = 0 | ||
options.java = 'java-1.8.0-openjdk-headless' | ||
options.java_bin = '/usr/bin/java' | ||
options.release = 1 | ||
options.platform_version = 0 | ||
options.is_pe = false | ||
|
@@ -181,25 +182,28 @@ | |
options.systemd_el = 1 | ||
elsif options.operating_system == :el && options.os_version >= 7 # systemd el | ||
if ! options.is_pe | ||
# https://bugzilla.redhat.com/show_bug.cgi?id=2224427 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This bug is resolved, so it could be dropped. But this at least provides a reference of why it's there. |
||
fpm_opts << "--depends tzdata-java" | ||
options.java = | ||
case options.platform_version | ||
when 8 | ||
# rpm on Redhat 7 may not support OR dependencies | ||
if options.os_version == 7 | ||
'java-11-openjdk-headless' | ||
elsif options.os_version == 8 | ||
'(java-17-openjdk-headless or java-11-openjdk-headless)' | ||
elsif options.os_version == 9 | ||
'java-17-openjdk-headless' | ||
else | ||
fail "Unrecognized el os version #{options.os_version}" | ||
end | ||
when 6..7 | ||
'java-1.8.0-openjdk-headless' | ||
case options.platform_version | ||
when 8 | ||
# rpm on Redhat 7 may not support OR dependencies | ||
if options.os_version == 7 | ||
options.java = 'jre-11-headless' | ||
options.java_bin = '/usr/lib/jvm/jre-11/bin/java' | ||
elsif options.os_version == 8 | ||
options.java = '(jre-17-headless or jre-11-headless)' | ||
# TODO: which bin to use? /usr/bin/java may be anything | ||
elsif options.os_version == 9 | ||
options.java = 'jre-17-headless' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You can question why EL 9 always uses Java 17 while EL 8 uses 17 or 11. Both EL 8 and EL 9 provide both versions. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You can blame me for that one. At the time I did this because I wanted to require 17 where possible because it lined up with what we are using in PE and most heavily testing, but from what I could tell the initial releases of EL 8 were before Java 17 was released and would have only had 11. |
||
options.java_bin = '/usr/lib/jvm/jre-17/bin/java' | ||
else | ||
fail "Unknown Puppet Platform Version #{options.platform_version}" | ||
fail "Unrecognized el os version #{options.os_version}" | ||
end | ||
when 6..7 | ||
options.java = 'java-1.8.0-openjdk-headless' | ||
else | ||
fail "Unknown Puppet Platform Version #{options.platform_version}" | ||
end | ||
end | ||
|
||
options.systemd = 1 | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found out that the
puppetserver
bin (which I can't find the source of now) also reads the defaults file. If that needsJAVA_BIN
then this change is breaking.