Summary: | net-mgmt/unifi5: Allow newer versions of Java | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | Ports & Packages | Reporter: | Greg Lewis <glewis> | ||||||
Component: | Individual Port(s) | Assignee: | Mark Felder <feld> | ||||||
Status: | Closed FIXED | ||||||||
Severity: | Affects Only Me | Flags: | bugzilla:
maintainer-feedback?
(feld) |
||||||
Priority: | --- | ||||||||
Version: | Latest | ||||||||
Hardware: | Any | ||||||||
OS: | Any | ||||||||
Attachments: |
|
Description
Greg Lewis
2019-08-21 16:17:23 UTC
Created attachment 207594 [details]
Udpated patch
I've updated the patch based on the update of the port to 5.11.39
Mark, any comments on this? (In reply to Greg Lewis from comment #2) Haven't had time to test it myself, but if it works I'll take it. :-) Thanks for being persistent. The only change I see worth making is to avoid using that echo and shell expansion trick. I don't want us to run into shell expansion limits (or bugs) in the future, so we can just hack it with find, and replace sed with tr which is faster basically: find /usr/local/share/java/unifi/lib/ -maxdepth 1 -type f -name '*.jar' | tr '\n' ':' (In reply to Mark Felder from comment #4) ok that didn't work so well because of trailing : character with this method. My research shows your approach isn't uncommon. My main concern is now the process list output is blown up by this HUGE monster classpath definition. I've worked around it by setting the env CLASSPATH instead. I'm not entirely sure why we're moving from the java -jar ace.jar method to this classpath definition and telling java to run "com.ubnt.ace.Launcher start" instead, but I trust you know far more about Java than I do. A commit references this bug: Author: feld Date: Wed Sep 18 17:38:00 UTC 2019 New revision: 512281 URL: https://svnweb.freebsd.org/changeset/ports/512281 Log: net-mgmt/unifi5: Update to 5.11.46 Also pull in port improvements from glewis@ to enable customizing which Java that Unifi runs with PR: 240016 Changes: head/net-mgmt/unifi5/Makefile head/net-mgmt/unifi5/distinfo head/net-mgmt/unifi5/files/unifi.in Thanks Mark! There is an explanation of why it switches from a direct java -jar invocation to using the class path and naming the main class at https://community.ui.com/questions/Running-Unifi-Controller-on-Java-9-10-and-11/f1ac1330-40b8-4af6-83b6-8d55e48e4a32 The tl;dr version is that JDK9+ needs activation.jar on the class path and this is the simplest way to get it there. Note that I assume unifi will eventually support Java 11 out of the box, so we can likely revert to a straight java -jar invocation at that point. Thanks, and please let me know if you encounter any issues with the changes I've committed. |