# 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/files # elasticsearch7/files/patch-config_jvm.options # elasticsearch7/files/elasticsearch.in # elasticsearch7/files/patch-config_elasticsearch.yml # elasticsearch7/files/pkg-message.in # elasticsearch7/Makefile # elasticsearch7/distinfo # 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 c - elasticsearch7/files mkdir -p elasticsearch7/files > /dev/null 2>&1 echo x - elasticsearch7/files/patch-config_jvm.options sed 's/^X//' >elasticsearch7/files/patch-config_jvm.options << 'aafbc6e1df94e4a572b0241a824c25df' X--- config/jvm.options.orig 2018-03-01 23:04:45 UTC X+++ config/jvm.options X@@ -87,7 +87,7 @@ 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 aafbc6e1df94e4a572b0241a824c25df echo x - elasticsearch7/files/elasticsearch.in sed 's/^X//' >elasticsearch7/files/elasticsearch.in << '527f22dde9e883f7c5574e30d3c8ea5d' X#!/bin/sh X# X# $FreeBSD: head/textproc/elasticsearch7/files/elasticsearch.in 465090 2018-03-20 16:19:08Z feld $ 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# 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 Xrequired_files="${elasticsearch_config}/elasticsearch.yml" X_pidprefix=/var/run/elasticsearch/elasticsearch Xpidfile=${_pidprefix}.pid Xprocname=%%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} 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 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/pkg-message.in sed 's/^X//' >elasticsearch7/files/pkg-message.in << 'c9eed98646e414fcac93e01cb7ca1c42' X====================================================================== X XPlease see %%ETCDIR%% for sample versions of Xelasticsearch.yml and logging.yml. X XElasticSearch requires memory locking of large amounts of RAM. XYou may need to set: X Xsysctl security.bsd.unprivileged_mlock=1 X X!!! PLUGINS NOTICE !!! X XElasticSearch plugins should only be installed via the elasticsearch-plugin Xincluded with this software. As we strive to provide a minimum semblance Xof security, the files installed by the package are owned by root:wheel. XThis is different than upstream hich expects all of the files to be Xowned by the user and for you to execute the elasticsearch-plugin script Xas said user. X XYou will encounter permissions errors with configuration files and Xdirectories created by plugins which you will have to manually correct. XThis is the price we have to pay to protect ourselves in the face of Xa poorly designed security model. X Xe.g., after installing X-Pack you will have to correct: X X%%ETCDIR%%/elasticsearch.keystore file to be owned by elasticsearch:elasticsearch X%%ETCDIR%%/x-pack directory/files to be owned by elasticsearch:elasticsearch X X!!! PLUGINS NOTICE !!! X X====================================================================== c9eed98646e414fcac93e01cb7ca1c42 echo x - elasticsearch7/Makefile sed 's/^X//' >elasticsearch7/Makefile << '8b6e37b044ca2e02fd1ce0d3788b7c17' X# Created by: Ryan Westlund X# $FreeBSD: head/textproc/elasticsearch7/Makefile 485491 2018-11-20 22:51:17Z feld $ X XPORTNAME= elasticsearch XPORTVERSION= 7.0.0 XPORTREVISION= 0 XCATEGORIES= textproc java devel XMASTER_SITES= https://artifacts.elastic.co/downloads/${PORTNAME}/ \ X http://mirrors.rit.edu/zi/ XDISTFILES= elasticsearch-7.0.0-linux-x86_64.tar.gz XPKGNAMESUFFIX= 7 X XMAINTAINER= feld@FreeBSD.org 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= elasticsearch-[0-9]* elasticsearch2-[0-9]* elasticsearch5-[0-9]* elasticsearch6-[0-9]* X XUSES= cpe shebangfix XNO_ARCH= yes XUSE_JAVA= yes XNO_BUILD= yes XJAVA_VERSION= 1.8+ XUSE_RC_SUBR= ${PORTNAME} XSHEBANG_FILES= bin/elasticsearch \ X bin/elasticsearch-cli \ X bin/elasticsearch-env \ X bin/elasticsearch-plugin X XOPTIONS_DEFINE= DOCS X X.include X XCONFIG_FILES= elasticsearch.yml log4j2.properties jvm.options XBINS= elasticsearch \ X elasticsearch-cli \ X elasticsearch-env \ X elasticsearch-plugin 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=${JAVA} 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 ${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 x - elasticsearch7/distinfo sed 's/^X//' >elasticsearch7/distinfo << '5a5eb2af5ba361a5f15c9dfb3ebeeb18' XTIMESTAMP = 1555552137 XSHA256 (elasticsearch-7.0.0-linux-x86_64.tar.gz) = 68deee5e9c961ad48cc83859970ac7a79029fe5f5e6de7e58ea0f7c7713f25ba XSIZE (elasticsearch-7.0.0-linux-x86_64.tar.gz) = 346760090 5a5eb2af5ba361a5f15c9dfb3ebeeb18 exit