Skip to content
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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Commits on Jul 19, 2024

  1. (maint) update README with learnings about composite project behavior

    This updates the README with some information about behvior that
    wasn't necessarily obvious, and helpful for composite projects.
    jonathannewman authored and ekohl committed Jul 19, 2024
    Configuration menu
    Copy the full SHA
    5f53a34 View commit details
    Browse the repository at this point in the history
  2. Make JAVA_BIN a configuration option

    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.
    ekohl committed Jul 19, 2024
    Configuration menu
    Copy the full SHA
    1c1dd12 View commit details
    Browse the repository at this point in the history
  3. Move JAVA_BIN to systemd service files

    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.
    ekohl committed Jul 19, 2024
    Configuration menu
    Copy the full SHA
    d8ea21d View commit details
    Browse the repository at this point in the history
  4. Set options.java within the case statements

    This is a noop refactor, but makes the later diffs easier to read.
    ekohl committed Jul 19, 2024
    Configuration menu
    Copy the full SHA
    0685174 View commit details
    Browse the repository at this point in the history
  5. 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.
    ekohl committed Jul 19, 2024
    Configuration menu
    Copy the full SHA
    6e7ba9b View commit details
    Browse the repository at this point in the history