Bug 279204 - games/minecraft-server: Update to 1.20.6
Summary: games/minecraft-server: Update to 1.20.6
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Only Me
Assignee: Vladimir Druzenko
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-05-21 20:04 UTC by Alexandre Labarre
Modified: 2024-06-10 20:41 UTC (History)
4 users (show)

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


Attachments
Update from 1.20.4 to 1.20.6 (6.20 KB, patch)
2024-05-21 20:04 UTC, Alexandre Labarre
no flags Details | Diff
Update from 1.20.4 to 1.20.6 (updated) (6.67 KB, patch)
2024-06-08 19:58 UTC, Alexandre Labarre
no flags Details | Diff
add description for JAVA_VERSION (8.94 KB, patch)
2024-06-09 09:46 UTC, Vladimir Druzenko
vvd: maintainer-approval?
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexandre Labarre 2024-05-21 20:04:14 UTC
Created attachment 250860 [details]
Update from 1.20.4 to 1.20.6

This patch updates games/minecraft-server to 1.20.6

Full changelog available on official website https://www.minecraft.net/en-us/article/minecraft-java-edition-1-20-6

I also updated Java required version because Minecraft Server refused to launch with OpenJDK17.

I found explaination on https://minecraft.wiki/w/Tutorials/Setting_up_a_server
For servers running Minecraft 1.16 or older, JRE Version 8 or higher is required, 1.17 requires Version 16 or higher, and Minecraft 1.18 or newer requires Version 18 or higher. While servers can run on an older version of Java, newer releases may offer bug fixes, more stability, security, and performance. 

It works fine on 14.0-RELEASE amd64 with OpenJDK18 and OpenJDK21.
Comment 1 Ed Maste freebsd_committer freebsd_triage 2024-06-07 21:14:43 UTC
Is anything holding this up?
Comment 2 Vladimir Druzenko freebsd_committer freebsd_triage 2024-06-07 21:46:59 UTC
I'm here.
Just updated my host for minecraft server - planned to test and commit it this weekend.

(In reply to Alexandre Labarre from comment #0)
Don't think this in games/minecraft-server/files/minecraft-server.in can work:
"export JAVA_VERSION=18+"
Also you forgot in games/minecraft-server/files/minecraft.in:
"export JAVA_VERSION=17"

IMHO, better just set 21.
Comment 3 Alexandre Labarre 2024-06-07 22:12:49 UTC
(In reply to Vladimir Druzenko from comment #2)
Thank you for your comment. 
I thought that EXPORT JAVA_VERSION=18+ was fine as described in man page https://man.freebsd.org/cgi/man.cgi?query=javavm&apropos=0&sektion=0&manpath=FreeBSD+14.1-RELEASE+and+Ports&arch=default&format=html

About the parameter I forgot, I will verify the line which I forgot wrong value in the file. 

I am agree with your proposal of Java version 21: it’s the best choice.

Thank you for your review and all apologies for my mistakes.
Comment 4 Vladimir Druzenko freebsd_committer freebsd_triage 2024-06-07 22:50:50 UTC
(In reply to Alexandre Labarre from comment #3)
Also we can create rc.conf option minecraft_java_version for games/minecraft-server/files/minecraft.in:
export JAVA_VERSION=${minecraft_java_version:-"21"}

And for games/minecraft-server/files/minecraft-server.in:
if [ -z "${JAVA_VERSION}" ]; then
        JAVA_VERSION=21
fi
export JAVA_VERSION
Comment 5 Alexandre Labarre 2024-06-08 19:58:10 UTC
Created attachment 251301 [details]
Update from 1.20.4 to 1.20.6 (updated)

I applied all corrections discussed previously with vvd@.

Version 1.20.5 changelog: 
https://www.minecraft.net/en-us/article/minecraft-java-edition-1-20-5

Version 1.20.6 changelog:
https://www.minecraft.net/en-us/article/minecraft-java-edition-1-20-6
Comment 6 Vladimir Druzenko freebsd_committer freebsd_triage 2024-06-09 09:46:13 UTC
Created attachment 251312 [details]
add description for JAVA_VERSION

Also added /var/log/minecraft-server/debug

Check please my english in description.
Comment 7 Vladimir Druzenko freebsd_committer freebsd_triage 2024-06-09 16:46:20 UTC
BTW, tested run on 14.1 amd64.
Comment 8 Alexandre Labarre 2024-06-10 07:49:23 UTC
(In reply to Vladimir Druzenko from comment #7)
Tested on 14.0-RELEASE and 14.1-RELEASE amd64: both versions work.
Comment 9 commit-hook freebsd_committer freebsd_triage 2024-06-10 20:39:45 UTC
A commit in branch main references this bug:

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

commit 9b6b0e1f4312735dd31cb8220e8da3d50b37db12
Author:     Alexandre Labarre <freebsd.tug890@passmail.net>
AuthorDate: 2024-06-10 20:31:44 +0000
Commit:     Vladimir Druzenko <vvd@FreeBSD.org>
CommitDate: 2024-06-10 20:31:44 +0000

    games/minecraft-server: update to 1.20.6

    Changes:
    https://www.minecraft.net/en-us/article/minecraft-java-edition-1-20-5
    https://www.minecraft.net/en-us/article/minecraft-java-edition-1-20-6

    This version require at least Java 18 - bump to 21 (next LTS version).
    Add possibility to run with different Java versions using environment
    variable JAVA_VERSION for standalone server and minecraft_java_version
    variable in rc.conf for daemon.
    Also several small fixes.

    PR:             279204
    Tested by:      vvd
    Approved by:    freebsd@jonathanprice.org (maintainer, timeout 20 days)

 games/minecraft-server/Makefile                  | 11 +++++-----
 games/minecraft-server/distinfo                  |  6 ++---
 games/minecraft-server/files/minecraft-server.in |  5 ++++-
 games/minecraft-server/files/minecraft.in        |  2 +-
 games/minecraft-server/files/pkg-deinstall.in    |  2 +-
 games/minecraft-server/files/pkg-message.in      |  7 ++++++
 games/minecraft-server/pkg-plist                 | 28 +++++++++++++-----------
 7 files changed, 37 insertions(+), 24 deletions(-)
Comment 10 Vladimir Druzenko freebsd_committer freebsd_triage 2024-06-10 20:41:33 UTC
Thanks!