Bug 272413 - graphics/geoserver: Incorrect java version for latest release
Summary: graphics/geoserver: Incorrect java version for latest release
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Muhammad Moinur Rahman
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-07-07 14:21 UTC by Joel Bodenmann
Modified: 2023-09-18 23:26 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (bofh)


Attachments
patch (683 bytes, patch)
2023-07-07 14:21 UTC, Joel Bodenmann
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joel Bodenmann freebsd_committer freebsd_triage 2023-07-07 14:21:45 UTC
Created attachment 243304 [details]
patch

Upstream documentation [1] states that Geoserver version 2.22.x and above require Java 17. However, the port does currently not enforce that and in case of the official binary repos defaults to Java 8 instead.

This patch sets JAVA_VERSION in the Makefile accordingly.

[1] https://docs.geoserver.org/latest/en/user/production/java.html
Comment 1 commit-hook freebsd_committer freebsd_triage 2023-07-16 11:25:54 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=a04a2db0119d9058a489350b09881a3c11b7b3fb

commit a04a2db0119d9058a489350b09881a3c11b7b3fb
Author:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
AuthorDate: 2023-07-15 22:25:35 +0000
Commit:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
CommitDate: 2023-07-16 11:24:42 +0000

    graphics/geoserver: Fix JAVA version

    Upstream documentation [1] states that Geoserver version 2.22.x and
    above require Java 17.

    [1] https://docs.geoserver.org/latest/en/user/production/java.html

    PR:             272413
    Reported by:    jbo@insane.engineer

 graphics/geoserver/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Comment 2 smars 2023-09-18 09:26:56 UTC
not fixed in geoserver-2.23.1: openjdk8 is still installed instead of openjdk17

temporary fix: 

pkg install openjdk17
+patch: /usr/local/geoserver/bin/startup.sh

91c91
< exec /usr/local/openjdk8/bin/java -DGEOSERVER_DATA_DIR=$GEOSERVER_DATA_DIR -Djava.awt.headless=true -DSTOP.PORT=8079 -DSTOP.KEY=geoserver -jar start.jar
---
> exec /usr/local/openjdk17/bin/java -DGEOSERVER_DATA_DIR=$GEOSERVER_DATA_DIR -Djava.awt.headless=true -DSTOP.PORT=8079 -DSTOP.KEY=geoserver -jar start.jar
Comment 3 Joel Bodenmann freebsd_committer freebsd_triage 2023-09-18 23:26:55 UTC
(In reply to smars from comment #2)
It's not fixed in geoserver-2.23.1 because it got fixed in geoserver-2.23.1_1.
geoserver-2.23.2 seems to work fine too, see bug #267849.