# This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # elasticsearch7 # elasticsearch7/pkg-descr # elasticsearch7/distinfo # elasticsearch7/Makefile # elasticsearch7/files # elasticsearch7/files/pkg-message.in # elasticsearch7/files/patch-config_jvm.options # elasticsearch7/files/patch-config_elasticsearch.yml # elasticsearch7/files/elasticsearch.in # echo c - elasticsearch7 mkdir -p elasticsearch7 > /dev/null 2>&1 echo x - elasticsearch7/pkg-descr sed 's/^X//' >elasticsearch7/pkg-descr << '9ec61b6d1d04f956b52761dda02f5ab5' XElasticsearch aims to be a Distributed, RESTful, Search Engine built on top of XApache Lucene. X XWWW: https://www.elastic.co/ 9ec61b6d1d04f956b52761dda02f5ab5 echo x - elasticsearch7/distinfo sed 's/^X//' >elasticsearch7/distinfo << '5a5eb2af5ba361a5f15c9dfb3ebeeb18' XTIMESTAMP = 1574253710 XSHA256 (elasticsearch-7.4.2-no-jdk-linux-x86_64.tar.gz) = 239bc55ccc07ecc6fde54fffb77e787d9ec5daabde99287114110e86dfb53cfa XSIZE (elasticsearch-7.4.2-no-jdk-linux-x86_64.tar.gz) = 140407171 5a5eb2af5ba361a5f15c9dfb3ebeeb18 echo x - elasticsearch7/Makefile sed 's/^X//' >elasticsearch7/Makefile << '8b6e37b044ca2e02fd1ce0d3788b7c17' X# Created by: Tom Judge X# $FreeBSD$ X XPORTNAME= elasticsearch XPORTVERSION= 7.4.2 XCATEGORIES= textproc java devel XMASTER_SITES= https://artifacts.elastic.co/downloads/${PORTNAME}/ XPKGNAMESUFFIX= 7 XDISTFILES= ${PORTNAME}-${PORTVERSION}-no-jdk-linux-x86_64.tar.gz X XMAINTAINER= 000.fbsd@quip.cz XCOMMENT= Full-text search engine for Java X XLICENSE= APACHE20 X XBUILD_DEPENDS= jna>0:devel/jna XRUN_DEPENDS= bash>0:shells/bash \ X jna>0:devel/jna X XCONFLICTS= elasticsearch5-[0-9]* elasticsearch6-[0-9]* X XUSES= cpe shebangfix XNO_ARCH= yes XUSE_JAVA= yes XNO_BUILD= yes XJAVA_VERSION= 8+ XUSE_RC_SUBR= ${PORTNAME} XSHEBANG_FILES= bin/elasticsearch \ X bin/elasticsearch-certgen \ X bin/elasticsearch-certutil \ X bin/elasticsearch-cli \ X bin/elasticsearch-croneval \ X bin/elasticsearch-env \ X bin/elasticsearch-keystore \ X bin/elasticsearch-migrate \ X bin/elasticsearch-node \ X bin/elasticsearch-plugin \ X bin/elasticsearch-saml-metadata \ X bin/elasticsearch-setup-passwords \ X bin/elasticsearch-shard \ X bin/elasticsearch-sql-cli \ X bin/elasticsearch-syskeygen \ X bin/elasticsearch-users \ X bin/x-pack-env \ X bin/x-pack-security-env \ X bin/x-pack-watcher-env X XOPTIONS_DEFINE= DOCS X X.include X XCONFIG_FILES= elasticsearch.yml \ X log4j2.properties \ X jvm.options \ X role_mapping.yml \ X roles.yml XBINS= elasticsearch \ X elasticsearch-certgen \ X elasticsearch-certutil \ X elasticsearch-cli \ X elasticsearch-croneval \ X elasticsearch-env \ X elasticsearch-keystore \ X elasticsearch-migrate \ X elasticsearch-node \ X elasticsearch-plugin \ X elasticsearch-saml-metadata \ X elasticsearch-setup-passwords \ X elasticsearch-shard \ X elasticsearch-sql-cli \ X elasticsearch-sql-cli-${PORTVERSION}.jar \ X elasticsearch-syskeygen \ X elasticsearch-users \ X x-pack-env \ X x-pack-security-env \ X x-pack-watcher-env X XPORTDOCS= LICENSE.txt \ X NOTICE.txt \ X README.textile X XSIGAR_ARCH= ${ARCH:S|i386|x86|} XSEARCHUSER?= elasticsearch XSEARCHGROUP?= ${SEARCHUSER} XUSERS= ${SEARCHUSER} XGROUPS= ${SEARCHGROUP} X XSUB_LIST= ETCDIR=${ETCDIR} JAVA_HOME=${JAVA_HOME} XSUB_FILES= pkg-message X Xpost-patch: X ${REINPLACE_CMD} -e "s|%%PREFIX%%|${PREFIX}|g" ${WRKSRC}/config/elasticsearch.yml X ${REINPLACE_CMD} -e "s|%%PREFIX%%|${PREFIX}|g" ${WRKSRC}/bin/elasticsearch X ${RM} ${WRKSRC}/lib/jna-*.jar X # ML plugin not supported on FreeBSD X ${RM} -rf ${WRKSRC}/modules/x-pack/x-pack-ml X Xdo-install: X ${MKDIR} ${STAGEDIR}${PREFIX}/etc/elasticsearch X.for f in ${CONFIG_FILES} X ${INSTALL} ${WRKSRC}/config/${f} ${STAGEDIR}${ETCDIR}/${f}.sample X.endfor X ${MKDIR} ${STAGEDIR}${PREFIX}/lib/elasticsearch/bin X.for f in ${BINS} X ${INSTALL_SCRIPT} ${WRKSRC}/bin/${f} ${STAGEDIR}${PREFIX}/lib/elasticsearch/bin X.endfor X ${MKDIR} ${STAGEDIR}${PREFIX}/lib/elasticsearch/lib X (cd ${WRKSRC}/lib && ${COPYTREE_SHARE} . ${STAGEDIR}${PREFIX}/lib/elasticsearch/lib/ "-name *\.jar") X X ${MKDIR} ${STAGEDIR}${PREFIX}/lib/elasticsearch/modules X (cd ${WRKSRC}/modules && ${COPYTREE_SHARE} . ${STAGEDIR}${PREFIX}/lib/elasticsearch/modules/) X ${MKDIR} ${STAGEDIR}${PREFIX}/lib/elasticsearch/plugins X ${MKDIR} ${STAGEDIR}${PREFIX}/libexec/elasticsearch X ${INSTALL} -lrs ${STAGEDIR}${ETCDIR} ${STAGEDIR}${PREFIX}/lib/elasticsearch/config X ${LN} -s ${JAVASHAREDIR}/classes/jna.jar ${STAGEDIR}${PREFIX}/lib/elasticsearch/lib/jna.jar X Xdo-install-DOCS-on: X ${MKDIR} ${STAGEDIR}${DOCSDIR} X.for f in ${PORTDOCS} X ${INSTALL_DATA} ${WRKSRC}/${f} ${STAGEDIR}${DOCSDIR} X.endfor X Xpost-install: X ${ECHO} "@sample ${ETCDIR}/elasticsearch.yml.sample" >> ${TMPPLIST} X ${ECHO} "@sample ${ETCDIR}/log4j2.properties.sample" >> ${TMPPLIST} X ${ECHO} "@sample ${ETCDIR}/jvm.options.sample" >> ${TMPPLIST} X ${ECHO} "@sample ${ETCDIR}/role_mapping.yml.sample" >> ${TMPPLIST} X ${ECHO} "@sample ${ETCDIR}/roles.yml.sample" >> ${TMPPLIST} X ${FIND} -s ${STAGEDIR}${PREFIX}/lib/elasticsearch -not -type d | ${SORT} | \ X ${SED} -e 's#^${STAGEDIR}${PREFIX}/##' >> ${TMPPLIST} X ${ECHO} "@dir lib/elasticsearch/plugins" >> ${TMPPLIST} X ${ECHO} "@dir libexec/elasticsearch" >> ${TMPPLIST} X ${ECHO} "@dir(elasticsearch,elasticsearch,0755) ${ETCDIR}" >> ${TMPPLIST} X X.include 8b6e37b044ca2e02fd1ce0d3788b7c17 echo c - elasticsearch7/files mkdir -p elasticsearch7/files > /dev/null 2>&1 echo x - elasticsearch7/files/pkg-message.in sed 's/^X//' >elasticsearch7/files/pkg-message.in << 'c9eed98646e414fcac93e01cb7ca1c42' X[ X{ type: install X message: <elasticsearch7/files/patch-config_jvm.options << 'aafbc6e1df94e4a572b0241a824c25df' X--- config/jvm.options.orig 2019-07-24 08:21:42.000000000 -0700 X+++ config/jvm.options 2019-08-16 13:41:33.818798000 -0700 X@@ -107,13 +107,13 @@ X 8:-XX:+PrintGCDateStamps X 8:-XX:+PrintTenuringDistribution X 8:-XX:+PrintGCApplicationStoppedTime X-8:-Xloggc:logs/gc.log X+8:-Xloggc:${ES_TMPDIR}/gc.log X 8:-XX:+UseGCLogFileRotation X 8:-XX:NumberOfGCLogFiles=32 X 8:-XX:GCLogFileSize=64m X X # JDK 9+ GC logging X-9-:-Xlog:gc*,gc+age=trace,safepoint:file=logs/gc.log:utctime,pid,tags:filecount=32,filesize=64m X+9-:-Xlog:gc*,gc+age=trace,safepoint:file=${ES_TMPDIR}/gc.log:utctime,pid,tags:filecount=32,filesize=64m X # due to internationalization enhancements in JDK 9 Elasticsearch need to set the provider to COMPAT otherwise X # time/date parsing will break in an incompatible way for some date patterns and locals X 9-:-Djava.locale.providers=COMPAT aafbc6e1df94e4a572b0241a824c25df echo x - elasticsearch7/files/patch-config_elasticsearch.yml sed 's/^X//' >elasticsearch7/files/patch-config_elasticsearch.yml << '0dbf50cb38ac8a60b069476654325abb' X--- config/elasticsearch.yml.orig 2018-09-26 13:30:23 UTC X+++ config/elasticsearch.yml X@@ -31,10 +31,12 @@ X # Path to directory where to store the data (separate multiple locations by comma): X # X #path.data: /path/to/data X+path.data: /var/db/elasticsearch X # X # Path to log files: X # X #path.logs: /path/to/logs X+path.logs: /var/log/elasticsearch X # X # ----------------------------------- Memory ----------------------------------- X # X@@ -86,3 +88,6 @@ X # Require explicit names when deleting indices: X # X #action.destructive_requires_name: true X+ X+# ml is not supported on FreeBSD X+xpack.ml.enabled: false 0dbf50cb38ac8a60b069476654325abb echo x - elasticsearch7/files/elasticsearch.in sed 's/^X//' >elasticsearch7/files/elasticsearch.in << '527f22dde9e883f7c5574e30d3c8ea5d' X#!/bin/sh X# X# $FreeBSD: head/textproc/elasticsearch6/files/elasticsearch.in 513796 2019-10-05 00:09:16Z glewis $ X# X# PROVIDE: elasticsearch X# REQUIRE: NETWORKING SERVERS X# BEFORE: DAEMON X# KEYWORD: shutdown X# X# Add the following line to /etc/rc.conf to enable elasticsearch: X# X# elasticsearch_enable="YES" X# X# elasticsearch_user (username): Set to elasticsearch by default. X# Set it to required username. X# elasticsearch_group (group): Set to elasticsearch by default. X# Set it to required group. X# elasticsearch_config (path): Set to %%PREFIX%%/etc/elasticsearch/elasticsearch.yml by default. X# Set it to the config file location. X# elasticsearch_java_home (path): Set to %%JAVA_HOME%% by default. X# Set it to the root of the JDK to use. X# X. /etc/rc.subr X Xname=elasticsearch Xrcvar=elasticsearch_enable X Xload_rc_config ${name} X X: ${elasticsearch_enable:=NO} X: ${elasticsearch_user=elasticsearch} X: ${elasticsearch_group=elasticsearch} X: ${elasticsearch_config=%%PREFIX%%/etc/elasticsearch} X: ${elasticsearch_login_class=root} X: ${elasticsearch_java_home="%%JAVA_HOME%%"} X Xrequired_files="${elasticsearch_config}/elasticsearch.yml" X_pidprefix=/var/run/elasticsearch/elasticsearch Xpidfile=${_pidprefix}.pid Xprocname=${elasticsearch_java_home}/bin/java X Xextra_commands="console status" Xconsole_cmd=elasticsearch_console Xstart_precmd=elasticsearch_precmd Xcommand=%%PREFIX%%/lib/elasticsearch/bin/elasticsearch Xcommand_args="-d --pidfile=${pidfile}" X Xexport ES_PATH_CONF=${elasticsearch_config} Xexport JAVA_HOME=${elasticsearch_java_home} X Xelasticsearch_precmd() X{ X /usr/bin/install -d -o ${elasticsearch_user} -g ${elasticsearch_group} -m 755 ${pidfile%/*} X /usr/bin/install -d -o ${elasticsearch_user} -g ${elasticsearch_group} -m 755 /var/db/elasticsearch X /usr/bin/install -d -o ${elasticsearch_user} -g ${elasticsearch_group} -m 755 /var/log/elasticsearch X} X Xelasticsearch_console() X{ X command_args="" X run_rc_command "start" X} X Xif [ -n "$2" ]; then X profile="$2" X if [ "x${elasticsearch_profiles}" != "x" ]; then X eval elasticsearch_config="\${elasticsearch_${profile}_config:-}" X if [ "x${elasticsearch_config}" = "x" ]; then X echo "You must define a configuration (elasticsearch_${profile}_config)" X exit 1 X fi X export ES_PATH_CONF=${elasticsearch_config} X required_files="${elasticsearch_config}/elasticsearch.yml" X required_files="${elasticsearch_config}/jvm.options" X eval elasticsearch_enable="\${elasticsearch_${profile}_enable:-${elasticsearch_enable}}" X pidfile="${_pidprefix}.${profile}.pid" X command_args="-d --pidfile=${pidfile}" X echo "===> elasticsearch profile: ${profile}" X else X echo "$0: extra argument ignored" X fi Xelse X if [ "x${elasticsearch_profiles}" != "x" -a "x$1" != "x" ]; then X for profile in ${elasticsearch_profiles}; do X eval _enable="\${elasticsearch_${profile}_enable}" X case "x${_enable:-${elasticsearch_enable}}" in X x|x[Nn][Oo]|x[Nn][Oo][Nn][Ee]) X continue X ;; X x[Yy][Ee][Ss]) X ;; X *) X if test -z "$_enable"; then X _var=elasticsearch_enable X else X _var=elasticsearch_"${profile}"_enable X fi X echo "Bad value" \ X "'${_enable:-${elasticsearch_enable}}'" \ X "for ${_var}. " \ X "Profile ${profile} skipped." X continue X ;; X esac X %%PREFIX%%/etc/rc.d/elasticsearch $1 ${profile} X retcode="$?" X if [ "0${retcode}" -ne 0 ]; then X failed="${profile} (${retcode}) ${failed:-}" X else X success="${profile} ${success:-}" X fi X done X exit 0 X fi Xfi X Xif [ "x${elasticsearch_mem_min}" != "x" ]; then X echo "The elasticsearch_mem_min variable is no longer supported please set this in %%PREFIX%%/etc/jvm.options" X exit 1; Xfi Xif [ "x${elasticsearch_mem_max}" != "x" ]; then X echo "The elasticsearch_mem_max variable is no longer supported please set this in %%PREFIX%%/etc/jvm.options" X exit 1; Xfi Xif [ "x${elasticsearch_props}" != "x" ]; then X echo "The elasticsearch_props variable is no longer supported please set this in %%PREFIX%%/etc/jvm.options" X exit 1; Xfi X Xrun_rc_command "$1" 527f22dde9e883f7c5574e30d3c8ea5d exit