openhab / openhab/openhab-linuxpkg
Too strict Java 21 check during preinst. Will also end up different from addons version, possibly failing fallback.
Nobody has claimed this yet.
- Dominant language
- Shell
- Stars
- 18
- Forks
- 35
- PR merge metrics
- No merged PRs in 30d
Description
Prior to 5.0.0 release, the preinst just issued a warning, but did not abort the script.
With the release version however, it does, and leaves the openhab installation on the previous version while happily installing the addons with the new version.
The Java version check should be done during openhab runtime, and not during install time.
When using sdkman for installing Java, sudo java -version and java -version does not necessary see the same version.
See https://community.openhab.org/t/5-0-0-m1-1-openhab-service-not-picking-up-java-21-installed-using-sdkman-but-17-instead/163640/4?u=omr for details, where the Java version in handled be systemd.
I suggest removing the exit 1 from the script, so that install behaviour is similar to the 5.0.0 Mx releases, or do the whole check during openhab runtime startup as not all Java environments are the same.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Java 21 check in the preinst script at the linked commit and compare it with the 5.0.0 Mx behavior. Review how Java is selected for the openHAB service through systemd, then verify that installation does not abort while the required Java version is handled at runtime.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- shell
- Domain
- devops
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100