Page MenuHomeFreeBSD

Add all-in-one port for `net-mgmt/unifi5` based on `java/openjdk11` or `java/openjdk12`
Needs ReviewPublic

Authored by lev on May 27 2019, 3:21 PM.



Now net-mgmt/unifi5 port depends on java/openjdk8 which is huge and it could not be packaged with openjdk8-jre without manual editing manifests (baaaad!).
New JDKs (9, 10, 11, 12) doesn't have JREs, but they have ability to anayze application (jdeps utility) and prepare JRE with modules which are required (jlink utility).

This port allows to make self-contained unifi5 controller, packed with such custom JRE. It doesn't include databases/mongodb36, buit it needs only mongodb36 as runtime dependency and nothing more.

Embedded JRE adds about 47MiB (unpacked) and openjdk8 (default installation) is 190MiB, it is 147MiB improvement. openjdk8-jre is 95MiB, so it is 54MiB improvement, and installation with openjdk8-jre requires mending with packages and/or installation with -f flag to skip required dependency.

It could be useful for embedded-like platforms.

I like to make this port to be option to net-mgmt/unifi5 but it is very hard to do, as it could not use USE_JAVA infrastructure. This port copy content of built (!) archivers/snappy-java package inside itself, so it requires both openjdk8 (for snappy-java) and openkdk11 (or 12) for build time and conflicts with snappy-java on installation.

If @feld have some ideas how to merge this port with net-mgmt/unifi5, I'm happy to listen and don't make separate port!

Diff Detail

rP FreeBSD ports repository
Lint Skipped
Unit Tests Skipped

Event Timeline

lev created this revision.May 27 2019, 3:21 PM
mat added inline comments.Jun 8 2019, 6:21 PM

Options should happen later in the Makefile. See Chapter 15. Order of Variables in Port Makefiles.


Why +=?


Should happen later in the Makefile.


This case can never happen. OPTIONS_SINGLE means that one option MUST be selected.


No need for a second target here, put it in do-install.