Skip to content

Use virtual Java packages on Red Hat and set java_bin#2

Merged
bastelfreak merged 4 commits intoOpenVoxProject:mainfrom
ekohl:better-java
Jul 19, 2025
Merged

Use virtual Java packages on Red Hat and set java_bin#2
bastelfreak merged 4 commits intoOpenVoxProject:mainfrom
ekohl:better-java

Conversation

@ekohl
Copy link
Copy Markdown
Contributor

@ekohl ekohl commented Feb 20, 2025

This is puppetlabs/ezbake#627 opened against OpenVoxProject. I have only done an initial rebase without resolving all the issues.

I'll add inline notes with where we need to have further discussion.

Copy link
Copy Markdown
Contributor Author

@ekohl ekohl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed in chat: @nmburgan will take his specific changes from #3, we'll merge that and I'll rebase this.

@ekohl ekohl mentioned this pull request Feb 20, 2025
@nmburgan
Copy link
Copy Markdown
Member

@ekohl Ready for rebase

@bastelfreak
Copy link
Copy Markdown
Contributor

@ekohl could you please rebase this PR?

Copy link
Copy Markdown
Contributor

@bastelfreak bastelfreak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me, but I haven't tested it

ekohl added 4 commits July 19, 2025 23:08
Making it a config option allows for differentation. The comment for
version 8 was outdated, since puppetserver 8 refuses to start up with
Java 8.
The EnvironmentFile paths are config locations so if a user ever
modified them, they're not replaced. By defining this in the service
file, the packaging will update the location. The result is that even
if a java location changes that a simple yum/apt upgrade will respect
the new value in most situations.
This is a noop refactor, but makes the later diffs easier to read.
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.
@bastelfreak bastelfreak merged commit c63042d into OpenVoxProject:main Jul 19, 2025
4 checks passed
@bastelfreak bastelfreak added the enhancement New feature or request label Jul 19, 2025
@ekohl ekohl deleted the better-java branch July 21, 2025 08:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants