FreeBSD Bugzilla – Attachment 226874 Details for
Bug 257558
[NEW PORT] textproc/opensearch: AWS fork of elasticsearch7
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
new port diff
textproc_opensearch.diff (text/plain), 13.60 KB, created by
Sven Ruediger
on 2021-08-02 12:39:59 UTC
(
hide
)
Description:
new port diff
Filename:
MIME Type:
Creator:
Sven Ruediger
Created:
2021-08-02 12:39:59 UTC
Size:
13.60 KB
patch
obsolete
>diff --git a/GIDs b/GIDs >index 0f002106d485..858e36638ba4 100644 >--- a/GIDs >+++ b/GIDs >@@ -795,7 +795,7 @@ cassandra:*:851: > p0f:*:852: > _geodns:*:853: > ebusd:*:854: >-# free: 855 >+opensearch:*:855: > # free: 856 > # free: 857 > # free: 858 >@@ -906,7 +906,7 @@ fluentd:*:963: > git_daemon:*:964: > elasticsearch:*:965: > ossec:*:966: >-# free: 967 >+opensearch:*:967: > # free: 968 > kippo:*:969: > colord:*:970: >diff --git a/UIDs b/UIDs >index acfb094bada4..9587e8ec435d 100644 >--- a/UIDs >+++ b/UIDs >@@ -800,7 +800,7 @@ cassandra:*:851:851::0:0:Cassandra DB Daemon User:/var/db/cassandra:/usr/sbin/no > p0f:*:852:852::0:0:p0f unprivileged user:/var/empty:/usr/sbin/nologin > _geodns:*:853:853::0:0:GeoDNS User:/var/empty:/usr/sbin/nologin > ebusd:*:854:854::0:0:eBUS Daemon user:/nonexistent:/usr/sbin/nologin >-# free: 855 >+opensearch:*:855:855::0:0:opensearch user:/nonexistent:/usr/sbin/nologin > # free: 856 > # free: 857 > # free: 858 >diff --git a/textproc/Makefile b/textproc/Makefile >index 8e8a32dbf4f3..a661694b0e76 100644 >--- a/textproc/Makefile >+++ b/textproc/Makefile >@@ -481,6 +481,7 @@ > SUBDIR += odt2txt > SUBDIR += openfts > SUBDIR += openjade >+ SUBDIR += opensearch > SUBDIR += opensp > SUBDIR += openvanilla-framework > SUBDIR += or-aspell >diff --git a/textproc/opensearch/Makefile b/textproc/opensearch/Makefile >new file mode 100644 >index 000000000000..21efb6c04b08 >--- /dev/null >+++ b/textproc/opensearch/Makefile >@@ -0,0 +1,89 @@ >+# Created by: Sven R <freebsd@hackacad.net> >+ >+PORTNAME= opensearch >+PORTVERSION= 1.0.0 >+CATEGORIES= textproc java devel >+MASTER_SITES= https://artifacts.opensearch.org/releases/bundle/${PORTNAME}/${PORTVERSION}/ >+PKGNAMESUFFIX= 1 >+DISTNAME= ${PORTNAME}-${PORTVERSION}-linux-x64 >+ >+MAINTAINER= freebsd@hackacad.net >+COMMENT= Full-text search engine for Java >+ >+LICENSE= APACHE20 >+ >+BUILD_DEPENDS= jna>0:devel/jna >+RUN_DEPENDS= bash>0:shells/bash \ >+ jna>0:devel/jna >+ >+USES= cpe shebangfix >+USE_JAVA= yes >+JAVA_VERSION= 11+ >+USE_RC_SUBR= ${PORTNAME} >+ >+SHEBANG_FILES= bin/opensearch bin/opensearch-cli \ >+ bin/opensearch-env bin/opensearch-env-from-file \ >+ bin/opensearch-keystore bin/opensearch-node \ >+ bin/opensearch-plugin bin/opensearch-shard \ >+ bin/performance-analyzer-agent-cli >+ >+CONFLICTS= elasticsearch* >+ >+NO_ARCH= yes >+NO_BUILD= yes >+WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION} >+ >+OPTIONS_DEFINE= DOCS >+ >+.include <bsd.port.options.mk> >+ >+CONFIG_FILES= opensearch.yml jvm.options log4j2.properties >+ >+BINS= opensearch opensearch-cli opensearch-env \ >+ opensearch-env-from-file opensearch-keystore \ >+ opensearch-node opensearch-plugin \ >+ opensearch-shard performance-analyzer-agent-cli >+ >+SIGAR_ARCH= ${ARCH:S|i386|x86|} >+SEARCHUSER?= opensearch >+SEARCHGROUP?= ${SEARCHUSER} >+USERS= ${SEARCHUSER} >+GROUPS= ${SEARCHGROUP} >+ >+SUB_FILES= pkg-message >+SUB_LIST= ETCDIR=${ETCDIR} \ >+ JAVA_HOME=${JAVA_HOME} >+ >+post-patch: >+ ${RM} ${WRKSRC}/lib/jna-*.jar >+ >+do-install: >+ ${MKDIR} ${STAGEDIR}${PREFIX}/etc/opensearch >+.for f in ${CONFIG_FILES} >+ ${INSTALL} ${WRKSRC}/config/${f} ${STAGEDIR}${ETCDIR}/${f}.sample >+.endfor >+ ${MKDIR} ${STAGEDIR}${PREFIX}/lib/opensearch/bin >+.for f in ${BINS} >+ ${INSTALL_SCRIPT} ${WRKSRC}/bin/${f} ${STAGEDIR}${PREFIX}/lib/opensearch/bin >+.endfor >+ ${MKDIR} ${STAGEDIR}${PREFIX}/lib/opensearch/lib >+ (cd ${WRKSRC}/lib && ${COPYTREE_SHARE} . ${STAGEDIR}${PREFIX}/lib/opensearch/lib/ "-name *\.jar") >+ >+ ${MKDIR} ${STAGEDIR}${PREFIX}/lib/opensearch/modules >+ (cd ${WRKSRC}/modules && ${COPYTREE_SHARE} . ${STAGEDIR}${PREFIX}/lib/opensearch/modules/) >+ ${MKDIR} ${STAGEDIR}${PREFIX}/lib/opensearch/plugins >+ ${MKDIR} ${STAGEDIR}${PREFIX}/libexec/opensearch >+ ${INSTALL} -lrs ${STAGEDIR}${ETCDIR} ${STAGEDIR}${PREFIX}/lib/opensearch/config >+ ${LN} -s ${JAVASHAREDIR}/classes/jna.jar ${STAGEDIR}${PREFIX}/lib/opensearch/lib/jna.jar >+ >+post-install: >+ ${ECHO} "@sample ${ETCDIR}/opensearch.yml.sample" >> ${TMPPLIST} >+ ${ECHO} "@sample ${ETCDIR}/jvm.options.sample" >> ${TMPPLIST} >+ ${ECHO} "@sample ${ETCDIR}/log4j2.properties.sample" >> ${TMPPLIST} >+ ${FIND} -s ${STAGEDIR}${PREFIX}/lib/opensearch -not -type d | ${SORT} | \ >+ ${SED} -e 's#^${STAGEDIR}${PREFIX}/##' >> ${TMPPLIST} >+ ${ECHO} "@dir lib/opensearch/plugins" >> ${TMPPLIST} >+ ${ECHO} "@dir libexec/opensearch" >> ${TMPPLIST} >+ ${ECHO} "@dir(opensearch,opensearch,0755) ${ETCDIR}" >> ${TMPPLIST} >+ >+.include <bsd.port.mk> >diff --git a/textproc/opensearch/distinfo b/textproc/opensearch/distinfo >new file mode 100644 >index 000000000000..50f310e46d38 >--- /dev/null >+++ b/textproc/opensearch/distinfo >@@ -0,0 +1,3 @@ >+TIMESTAMP = 1627635430 >+SHA256 (opensearch-1.0.0-linux-x64.tar.gz) = 6e865341c8cab5ab9665f5e279ca381c2b9b7f929fc6cf528c43440e68000c41 >+SIZE (opensearch-1.0.0-linux-x64.tar.gz) = 431092974 >diff --git a/textproc/opensearch/files/opensearch.in b/textproc/opensearch/files/opensearch.in >new file mode 100644 >index 000000000000..b0c91b70624c >--- /dev/null >+++ b/textproc/opensearch/files/opensearch.in >@@ -0,0 +1,115 @@ >+#!/bin/sh >+ >+# PROVIDE: opensearch >+# REQUIRE: DAEMON >+# BEFORE: LOGIN >+# KEYWORD: shutdown >+# >+# Add the following line to /etc/rc.conf to enable opensearch: >+# >+# opensearch_enable="YES" >+# >+# opensearch_user (username): Set to opensearch by default. >+# Set it to required username. >+# opensearch_group (group): Set to opensearch by default. >+# Set it to required group. >+# opensearch_config (path): Set to %%PREFIX%%/etc/opensearch/opensearch.yml by default. >+# Set it to the config file location. >+# opensearch_java_home (path): Set to %%JAVA_HOME%% by default. >+# Set it to the root of the JDK to use. >+# >+. /etc/rc.subr >+ >+name=opensearch >+rcvar=opensearch_enable >+ >+load_rc_config ${name} >+ >+: ${opensearch_enable:=NO} >+: ${opensearch_user=opensearch} >+: ${opensearch_group=opensearch} >+: ${opensearch_config=%%PREFIX%%/etc/opensearch} >+: ${opensearch_login_class=root} >+: ${opensearch_java_home="%%JAVA_HOME%%"} >+ >+required_files="${opensearch_config}/opensearch.yml" >+_pidprefix=/var/run/opensearch/opensearch >+pidfile=${_pidprefix}.pid >+procname=${opensearch_java_home}/bin/java >+ >+extra_commands="console status" >+console_cmd=opensearch_console >+start_precmd=opensearch_precmd >+command=%%PREFIX%%/lib/opensearch/bin/opensearch >+command_args="-d --pidfile=${pidfile}" >+ >+export OPENSEARCH_PATH_CONF=${opensearch_config} >+export OPENSEARCH_JAVA_HOME=${opensearch_java_home} >+ >+opensearch_precmd() >+{ >+ /usr/bin/install -d -o ${opensearch_user} -g ${opensearch_group} -m 755 ${pidfile%/*} >+ /usr/bin/install -d -o ${opensearch_user} -g ${opensearch_group} -m 755 /var/db/opensearch >+ /usr/bin/install -d -o ${opensearch_user} -g ${opensearch_group} -m 755 /var/log/opensearch >+} >+ >+opensearch_console() >+{ >+ command_args="" >+ run_rc_command "start" >+} >+ >+if [ -n "$2" ]; then >+ profile="$2" >+ if [ "x${opensearch_profiles}" != "x" ]; then >+ eval opensearch_config="\${opensearch_${profile}_config:-}" >+ if [ "x${opensearch_config}" = "x" ]; then >+ echo "You must define a configuration (opensearch_${profile}_config)" >+ exit 1 >+ fi >+ export OPENSEARCH_PATH_CONF=${opensearch_config} >+ required_files="${opensearch_config}/opensearch.yml" >+ required_files="${opensearch_config}/jvm.options" >+ eval opensearch_enable="\${opensearch_${profile}_enable:-${opensearch_enable}}" >+ pidfile="${_pidprefix}.${profile}.pid" >+ command_args="-d --pidfile=${pidfile}" >+ echo "===> opensearch profile: ${profile}" >+ else >+ echo "$0: extra argument ignored" >+ fi >+else >+ if [ "x${opensearch_profiles}" != "x" -a "x$1" != "x" ]; then >+ for profile in ${opensearch_profiles}; do >+ eval _enable="\${opensearch_${profile}_enable}" >+ case "x${_enable:-${opensearch_enable}}" in >+ x|x[Nn][Oo]|x[Nn][Oo][Nn][Ee]) >+ continue >+ ;; >+ x[Yy][Ee][Ss]) >+ ;; >+ *) >+ if test -z "$_enable"; then >+ _var=opensearch_enable >+ else >+ _var=opensearch_"${profile}"_enable >+ fi >+ echo "Bad value" \ >+ "'${_enable:-${opensearch_enable}}'" \ >+ "for ${_var}. " \ >+ "Profile ${profile} skipped." >+ continue >+ ;; >+ esac >+ %%PREFIX%%/etc/rc.d/opensearch $1 ${profile} >+ retcode="$?" >+ if [ "0${retcode}" -ne 0 ]; then >+ failed="${profile} (${retcode}) ${failed:-}" >+ else >+ success="${profile} ${success:-}" >+ fi >+ done >+ exit 0 >+ fi >+fi >+ >+run_rc_command "$1" >diff --git a/textproc/opensearch/files/patch-bin_opensearch-env b/textproc/opensearch/files/patch-bin_opensearch-env >new file mode 100644 >index 000000000000..dfb091fdce48 >--- /dev/null >+++ b/textproc/opensearch/files/patch-bin_opensearch-env >@@ -0,0 +1,17 @@ >+--- bin/opensearch-env.orig 2021-07-30 13:39:40 UTC >++++ bin/opensearch-env >+@@ -40,13 +40,7 @@ if [ ! -z "$JAVA_HOME" ]; then >+ JAVA="$JAVA_HOME/bin/java" >+ JAVA_TYPE="JAVA_HOME" >+ else >+- if [ "$(uname -s)" = "Darwin" ]; then >+- # macOS has a different structure >+- JAVA="$OPENSEARCH_HOME/jdk.app/Contents/Home/bin/java" >+- else >+- JAVA="$OPENSEARCH_HOME/jdk/bin/java" >+- fi >+- JAVA_TYPE="bundled jdk" >++ JAVA="/usr/local/bin/java" >+ fi >+ >+ if [ ! -x "$JAVA" ]; then >diff --git a/textproc/opensearch/files/patch-config_jvm.options b/textproc/opensearch/files/patch-config_jvm.options >new file mode 100644 >index 000000000000..f6276944b6db >--- /dev/null >+++ b/textproc/opensearch/files/patch-config_jvm.options >@@ -0,0 +1,23 @@ >+--- config/jvm.options.orig 2021-07-30 14:01:34 UTC >++++ config/jvm.options >+@@ -61,17 +61,17 @@ >+ -XX:HeapDumpPath=data >+ >+ # specify an alternative path for JVM fatal error logs >+--XX:ErrorFile=logs/hs_err_pid%p.log >++-XX:ErrorFile=/hs_err_pid%p.log >+ >+ ## JDK 8 GC logging >+ 8:-XX:+PrintGCDetails >+ 8:-XX:+PrintGCDateStamps >+ 8:-XX:+PrintTenuringDistribution >+ 8:-XX:+PrintGCApplicationStoppedTime >+-8:-Xloggc:logs/gc.log >++8:-Xloggc:${OPENSEARCH_TMPDIR}/gc.log >+ 8:-XX:+UseGCLogFileRotation >+ 8:-XX:NumberOfGCLogFiles=32 >+ 8:-XX:GCLogFileSize=64m >+ >+ # JDK 9+ GC logging >+-9-:-Xlog:gc*,gc+age=trace,safepoint:file=logs/gc.log:utctime,pid,tags:filecount=32,filesize=64m >++9-:-Xlog:gc*,gc+age=trace,safepoint:file=${OPENSEARCH_TMPDIR}/gc.log:utctime,pid,tags:filecount=32,filesize=64m >diff --git a/textproc/opensearch/files/patch-config_opensearch.yml b/textproc/opensearch/files/patch-config_opensearch.yml >new file mode 100644 >index 000000000000..8673c11afad8 >--- /dev/null >+++ b/textproc/opensearch/files/patch-config_opensearch.yml >@@ -0,0 +1,39 @@ >+--- config/opensearch.yml.orig 2021-07-02 23:22:08 UTC >++++ config/opensearch.yml >+@@ -31,10 +31,12 @@ >+ # Path to directory where to store the data (separate multiple locations by comma): >+ # >+ #path.data: /path/to/data >++path.data: /var/db/opensearch >+ # >+ # Path to log files: >+ # >+ #path.logs: /path/to/logs >++path.logs: /var/log/opensearch >+ # >+ # ----------------------------------- Memory ----------------------------------- >+ # >+@@ -86,3 +88,23 @@ >+ # Require explicit names when deleting indices: >+ # >+ #action.destructive_requires_name: true >++## Sample configuration for TLS: >++##plugins.security.ssl.transport.pemcert_filepath: esnode.pem >++##plugins.security.ssl.transport.pemkey_filepath: esnode-key.pem >++##plugins.security.ssl.transport.pemtrustedcas_filepath: root-ca.pem >++##plugins.security.ssl.transport.enforce_hostname_verification: false >++##plugins.security.ssl.http.enabled: true >++##plugins.security.ssl.http.pemcert_filepath: esnode.pem >++##plugins.security.ssl.http.pemkey_filepath: esnode-key.pem >++##plugins.security.ssl.http.pemtrustedcas_filepath: root-ca.pem >++##plugins.security.allow_unsafe_democertificates: true >++##plugins.security.allow_default_init_securityindex: true >++##plugins.security.authcz.admin_dn: >++## - CN=kirk,OU=client,O=client,L=test, C=# >++##plugins.security.audit.type: internal_opensearch >++##plugins.security.enable_snapshot_restore_privilege: true >++##plugins.security.check_snapshot_restore_write_privileges: true >++##plugins.security.restapi.roles_enabled: ["all_access", "security_rest_api_access"] >++##plugins.security.system_indices.enabled: true >++##plugins.security.system_indices.indices: [".opendistro-alerting-config", ".opendistro-alerting-alert*", ".opendistro-anomaly-results*", ".opendistro-anomaly-detector*", ".opendistro-anomaly-checkpoints", ".opendistro-anomaly-detection-state", ".opendistro-reports-*", ".opendistro-notifications-*", ".opendistro-notebooks", ".opendistro-asynchronous-search-response*"] >++# >diff --git a/textproc/opensearch/files/pkg-message.in b/textproc/opensearch/files/pkg-message.in >new file mode 100644 >index 000000000000..b620fcb5f50d >--- /dev/null >+++ b/textproc/opensearch/files/pkg-message.in >@@ -0,0 +1,20 @@ >+[ >+{ type: install >+ message: <<EOM >+Please see %%ETCDIR%% for sample versions of >+opensearch.yml and logging.yml. >+ >+OpenSearch requires memory locking of large amounts of RAM. >+You may need to set: >+ >+sysctl security.bsd.unprivileged_mlock=1 >+ >+When running within a jail, it's highly advisable to set: >+ >+enforce_statfs = 1 >+ >+for the jail running opensearch instance. >+ >+EOM >+} >+] >diff --git a/textproc/opensearch/pkg-descr b/textproc/opensearch/pkg-descr >new file mode 100644 >index 000000000000..3ba6db4a3166 >--- /dev/null >+++ b/textproc/opensearch/pkg-descr >@@ -0,0 +1,4 @@ >+OpenSearch is a fork of Elasticsearch which aims to be a Distributed, >+RESTful, Search Engine built on top of Apache Lucene. >+ >+WWW: http://opensearch.org
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 257558
: 226874 |
226875