Created attachment 233411 [details] Fix As reported to me by jrm, JDK versions matched by JAVA_VERSION=17+ is broken. At the moment: ========================================================================================== ❯ make -C net-im/signal-cli PORTSDIR=$(pwd) JAVA_VERSION=17+ java-debug # User specified parameters: JAVA_VERSION= 17+ (17 8 11 12 13 14 15 16 17 18) JAVA_OS= (native linux) JAVA_VENDOR= (openjdk oracle) JAVA_BUILD= JAVA_RUN= jre JAVA_EXTRACT= JAVA_DEFAULT= 8 # JDK port dependency selection process: _JAVA_PORTS_POSSIBLE= JAVA_PORT_NATIVE_OPENJDK_JDK_8 JAVA_PORT_NATIVE_OPENJDK_JDK_8 JAVA_PORT_NATIVE_OPENJDK_JDK_11 JAVA_PORT_NATIVE_OPENJDK_JDK_17 JAVA_PORT_NATIVE_OPENJDK_JDK_12 JAVA_PORT_NATIVE_OPENJDK_JDK_13 JAVA_PORT_NATIVE_OPENJDK_JDK_14 JAVA_PORT_NATIVE_OPENJDK_JDK_15 JAVA_PORT_NATIVE_OPENJDK_JDK_16 JAVA_PORT_NATIVE_OPENJDK_JDK_18 JAVA_PORT_LINUX_ORACLE_JDK_8 _JAVA_PORTS_INSTALLED= JAVA_PORT_NATIVE_OPENJDK_JDK_8 JAVA_PORT_NATIVE_OPENJDK_JDK_8 JAVA_PORT_NATIVE_OPENJDK_JDK_11 JAVA_PORT_NATIVE_OPENJDK_JDK_16 _JAVA_PORTS_INSTALLED_POSSIBLE= JAVA_PORT_NATIVE_OPENJDK_JDK_8 JAVA_PORT_NATIVE_OPENJDK_JDK_8 JAVA_PORT_NATIVE_OPENJDK_JDK_8 JAVA_PORT_NATIVE_OPENJDK_JDK_8 JAVA_PORT_NATIVE_OPENJDK_JDK_11 JAVA_PORT_NATIVE_OPENJDK_JDK_16 _JAVA_PORT= JAVA_PORT_NATIVE_OPENJDK_JDK_8 _JAVA_PORT_INFO= PORT=java/openjdk8 HOME=/usr/local/openjdk8 VERSION=8 OS=native VENDOR=openjdk # Selected JDK port: JAVA_PORT= java/openjdk8 JAVA_HOME= /usr/local/openjdk8 JAVA_PORT_VERSION= 8 JAVA_PORT_OS= native (Native) JAVA_PORT_VENDOR= openjdk (OpenJDK BSD Porting Team) # Additional variables: JAVAC= JAVA_CLASSES= /usr/local/openjdk8/jre/lib/rt.jar ========================================================================================== Applying the fix: ========================================================================================== ❯ patch -p1 </tmp/java.diff Hmm... Looks like a unified diff to me... The text leading up to this was: -------------------------- |diff --git a/Mk/bsd.java.mk b/Mk/bsd.java.mk |index f7eb3fe6192b..34f6522b295a 100644 |--- a/Mk/bsd.java.mk |+++ b/Mk/bsd.java.mk -------------------------- Patching file Mk/bsd.java.mk using Plan A... Hunk #1 succeeded at 285. done ========================================================================================== After applying the patch: ========================================================================================== ❯ make -C net-im/signal-cli PORTSDIR=$(pwd) JAVA_VERSION=17+ java-debug # User specified parameters: JAVA_VERSION= 17+ (17 18) JAVA_OS= (native linux) JAVA_VENDOR= (openjdk oracle) JAVA_BUILD= JAVA_RUN= jre JAVA_EXTRACT= JAVA_DEFAULT= 8 # JDK port dependency selection process: _JAVA_PORTS_POSSIBLE= JAVA_PORT_NATIVE_OPENJDK_JDK_17 JAVA_PORT_NATIVE_OPENJDK_JDK_18 _JAVA_PORTS_INSTALLED= JAVA_PORT_NATIVE_OPENJDK_JDK_8 JAVA_PORT_NATIVE_OPENJDK_JDK_8 JAVA_PORT_NATIVE_OPENJDK_JDK_11 JAVA_PORT_NATIVE_OPENJDK_JDK_16 _JAVA_PORTS_INSTALLED_POSSIBLE= _JAVA_PORT= JAVA_PORT_NATIVE_OPENJDK_JDK_17 _JAVA_PORT_INFO= PORT=java/openjdk17 HOME=/usr/local/openjdk17 VERSION=17 OS=native VENDOR=openjdk # Selected JDK port: JAVA_PORT= java/openjdk17 JAVA_HOME= /usr/local/openjdk17 JAVA_PORT_VERSION= 17 JAVA_PORT_OS= native (Native) JAVA_PORT_VENDOR= openjdk (OpenJDK BSD Porting Team) # Additional variables: JAVAC= JAVA_CLASSES= /usr/local/openjdk17/jre/lib/rt.jar ========================================================================================== The attached patch anchors the matching at the beginning of word. Thanks!
I can confirmed that this fixes the problem that I was struggling with. Thank you abbe@.
Err darn it.. ashish@.
Ugh, this was probably me. Sorry. Please go ahead and commit it.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=90de298b222ab8b74c707c26af21d59547898ab5 commit 90de298b222ab8b74c707c26af21d59547898ab5 Author: Ashish SHUKLA <ashish@FreeBSD.org> AuthorDate: 2022-05-01 06:53:06 +0000 Commit: Ashish SHUKLA <ashish@FreeBSD.org> CommitDate: 2022-05-01 06:55:55 +0000 Mk/bsd.java.mk: Fix JAVA_VERSION matching Anchor the matched patterns to be at the beginning of each word to prevent unexpected surprises e.g. with JAVA_VERSION= 17+ it results in _JAVA_VERSION set to unexpected "17 8 11 12 13 14 15 16 17 18", instead of "17 18" PR: 263483 Reported by: jrm Reviewed by: glewis Approved by: glewis Mk/bsd.java.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
(In reply to Greg Lewis from comment #3) Thanks for the approval, Greg. Although I think this patch should also go to 2022Q2, but apparently it's not directly applicable without pulling in openjdk18 stuff. Do you have any ideas, what to do there ? If you think it's not needed, or not worth the hassle, then please feel free to close this PR. Thanks!
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=65526ee02dfb09c2bc1ea97622211fd231821af5 commit 65526ee02dfb09c2bc1ea97622211fd231821af5 Author: Ashish SHUKLA <ashish@FreeBSD.org> AuthorDate: 2022-05-01 11:15:55 +0000 Commit: Ashish SHUKLA <ashish@FreeBSD.org> CommitDate: 2022-05-01 11:34:08 +0000 Mk/bsd.java.mk: Extend JAVA_VERSION matching Add explicit matching for 1.11+ which is used by x11-fm/mucommander, and was resulting in broken INDEX for it PR: 263483 Reported by: Tomoaki AOKI Mk/bsd.java.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Is this complete? If yes, please close!
Since problem is resolved, closing it.