Closed smokris closed 2 years ago
Yeh I need to take a look at this at some point.
I've been tinkering with it over the past few days, and I was able to get it to build with this patch: elasticsearch-7.12.0-sunos.txt
$ pkgin in openjdk15-15.0.0rc24
$ curl -OL https://github.com/elastic/elasticsearch/archive/refs/tags/v7.12.0.tar.gz
$ tar zxf v7.12.0.tar.gz
$ cd elasticsearch-7.12.0
$ patch -p1 < ../elasticsearch-7.12.0-sunos.txt
$ JAVA_HOME=/opt/local/java/openjdk15 RUNTIME_JAVA_HOME=/opt/local ./gradlew localDistro
$ ln -s /opt/local build/distribution/local/elasticsearch-7.12.0-SNAPSHOT/jdk
$ build/distribution/local/elasticsearch-7.12.0-SNAPSHOT/bin/elasticsearch --version
warning: no-jdk distributions that do not bundle a JDK are deprecated and will be removed in a future release
Version: 7.12.0-SNAPSHOT, Build: default/tar/unknown/2021-04-15T23:00:38.667690Z, JVM: 15-internal
(I haven't figured out the pkgsrc package build system though.)
When I launch it in server mode, it complains about not finding JNA (libjnidispatch.so
)… but the server finishes launching, and I can create an index and add documents to it, so it seems to basically work at least.
Edit: The JNA issue can be fixed by following the steps here: https://github.com/joyent/pkgsrc/issues/93#issue-310525391
Correction: in order to talk to other Elasticsearch nodes, it needs to be built from inside the Git source tree. Updated steps:
$ pkgin in git openjdk15-15.0.0rc24
$ curl -OL https://github.com/joyent/pkgsrc/files/6328379/elasticsearch-7.12.0-sunos.txt
$ git clone https://github.com/elastic/elasticsearch
$ cd elasticsearch
$ git checkout 78722783c38caa25a70982b5b042074cde5d3b3a # tagged v7.12.0
$ patch -p1 < ../elasticsearch-7.12.0-sunos.txt
$ JAVA_HOME=/opt/local/java/openjdk15 RUNTIME_JAVA_HOME=/opt/local ./gradlew localDistro
$ ln -s /opt/local build/distribution/local/elasticsearch-7.12.0-SNAPSHOT/jdk
$ build/distribution/local/elasticsearch-7.12.0-SNAPSHOT/bin/elasticsearch --version
warning: no-jdk distributions that do not bundle a JDK are deprecated and will be removed in a future release
Version: 7.12.0-SNAPSHOT, Build: default/tar/78722783c38caa25a70982b5b042074cde5d3b3a/2021-04-18T01:50:41.726304Z, JVM: 15-internal
(Now the version string includes the Git commit hash instead of "unknown", enabling this Elasticsearch build to confirm compatibility with other 7.12.0 nodes.)
Withdrawing this request; see https://github.com/joyent/pkgsrc/pull/308#issuecomment-986041113.
Hi @jperkin. The current Elasticsearch version is 7.12.0, but the SmartOS base64 package is version 6.8.8. Would it be practical to update that package?