diff --git a/textproc/apache-solr/Makefile b/textproc/apache-solr/Makefile index 546bee228e89..027cc18dabd4 100644 --- a/textproc/apache-solr/Makefile +++ b/textproc/apache-solr/Makefile @@ -1,67 +1,70 @@ PORTNAME= apache-solr -PORTVERSION= 8.11.2 +PORTVERSION= 9.0.0 PORTREVISION= 0 CATEGORIES= textproc java -MASTER_SITES= https://archive.apache.org/dist/lucene/solr/${PORTVERSION}/ +MASTER_SITES= https://archive.apache.org/dist/solr/solr/${PORTVERSION}/ DISTNAME= solr-${PORTVERSION} MAINTAINER= mfechner@FreeBSD.org COMMENT= High performance search server built using Lucene Java WWW= https://lucene.apache.org/solr/ LICENSE= APACHE20 RUN_DEPENDS= bash:shells/bash USES= cpe tar:tgz +CPE_VENDOR= apache +CPE_PRODUCT= solr USE_JAVA= yes JAVA_VERSION= 11+ JAVA_RUN= yes -NO_BUILD= yes +USE_RC_SUBR= solr + NO_ARCH= yes -PLIST_SUB+= PORTVERSION="${PORTVERSION}" +NO_BUILD= yes + SUB_FILES= pkg-message -USE_RC_SUBR= solr + USERS= solr GROUPS= ${USERS} -CPE_PRODUCT= solr -CPE_VENDOR= apache +PLIST_SUB+= PORTVERSION="${PORTVERSION}" OPTIONS_DEFINE= JTS OPTIONS_SUB= yes JTS_DESC= Enable support for JTS Topology Suite JTS_RUN_DEPENDS= jts>0:math/jts do-install: ${FIND} ${WRKSRC} -name '*.orig' -delete cd ${WRKSRC} && ${COPYTREE_SHARE} . ${STAGEDIR}${PREFIX}/${CPE_PRODUCT} ${INSTALL_SCRIPT} ${WRKSRC}/bin/oom_solr.sh ${STAGEDIR}${PREFIX}/${CPE_PRODUCT}/bin ${INSTALL_SCRIPT} ${WRKSRC}/bin/post ${STAGEDIR}${PREFIX}/${CPE_PRODUCT}/bin ${INSTALL_SCRIPT} ${WRKSRC}/bin/postlogs ${STAGEDIR}${PREFIX}/${CPE_PRODUCT}/bin ${INSTALL_SCRIPT} ${WRKSRC}/bin/solr ${STAGEDIR}${PREFIX}/${CPE_PRODUCT}/bin ${INSTALL_DATA} ${WRKSRC}/bin/solr.in.sh ${STAGEDIR}${PREFIX}/etc/solr.in.sh.sample ${ECHO} 'SOLR_HOME="/var/db/solr"' >> ${STAGEDIR}${PREFIX}/etc/solr.in.sh.sample ${ECHO} '# LOG4J_PROPS="/var/db/solr/log4j2.xml"' >> ${STAGEDIR}${PREFIX}/etc/solr.in.sh.sample ${ECHO} 'SOLR_LOGS_DIR="/var/log/solr"' >> ${STAGEDIR}${PREFIX}/etc/solr.in.sh.sample ${ECHO} 'SOLR_PORT="8983"' >> ${STAGEDIR}${PREFIX}/etc/solr.in.sh.sample ${ECHO} 'SOLR_PID_DIR="/var/db/solr"' >> ${STAGEDIR}${PREFIX}/etc/solr.in.sh.sample ${ECHO} 'SOLR_OPTS="$$SOLR_OPTS -Djetty.host=localhost -Dlog4j2.formatMsgNoLookups=true"' >> ${STAGEDIR}${PREFIX}/etc/solr.in.sh.sample ${MKDIR} ${STAGEDIR}/var/db/solr ${MKDIR} ${STAGEDIR}/var/log/solr ${INSTALL_DATA} ${WRKSRC}/server/solr/solr.xml ${STAGEDIR}/var/db/solr/solr.xml.sample do-install-JTS-on: ${LN} -sf ${JAVALIBDIR}/jts-core.jar ${STAGEDIR}${PREFIX}/${CPE_PRODUCT}/server/solr-webapp/webapp/WEB-INF/lib/ post-install: ${FIND} -s ${STAGEDIR}${PREFIX}/${CPE_PRODUCT} -not -type d | ${SORT} | \ ${SED} -e 's#^${STAGEDIR}${PREFIX}/##' >> ${TMPPLIST} @${ECHO_CMD} "@dir(solr,solr) /var/db/solr" >> ${TMPPLIST} @${ECHO_CMD} "@dir(solr,solr) /var/log/solr" >> ${TMPPLIST} @${ECHO_CMD} "@sample etc/solr.in.sh.sample" >> ${TMPPLIST} @${ECHO_CMD} "@sample(solr,solr) /var/db/solr/solr.xml.sample" >> ${TMPPLIST} .include diff --git a/textproc/apache-solr/distinfo b/textproc/apache-solr/distinfo index e72f763a3c70..76634295a4da 100644 --- a/textproc/apache-solr/distinfo +++ b/textproc/apache-solr/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1655708783 -SHA256 (solr-8.11.2.tgz) = 54d6ebd392942f0798a60d50a910e26794b2c344ee97c2d9b50e678a7066d3a6 -SIZE (solr-8.11.2.tgz) = 218171227 +TIMESTAMP = 1665150331 +SHA256 (solr-9.0.0.tgz) = fd1ddf07e2a25fffee2f398926de7889275bdd2520e97b50402c12125d39581e +SIZE (solr-9.0.0.tgz) = 223857836 diff --git a/textproc/apache-solr/files/patch-bin_solr b/textproc/apache-solr/files/patch-bin_solr index 0ea5bdcbddd3..1c15691df53e 100644 --- a/textproc/apache-solr/files/patch-bin_solr +++ b/textproc/apache-solr/files/patch-bin_solr @@ -1,31 +1,31 @@ ---- bin/solr.orig 2020-10-28 09:40:06 UTC +--- bin/solr.orig 2022-04-25 20:37:26 UTC +++ bin/solr -@@ -2255,13 +2255,12 @@ function start_solr() { +@@ -2269,13 +2269,12 @@ function start_solr() { echo "" fi # no lsof on cygwin though - if lsof -v 2>&1 | grep -q revision; then echo -n "Waiting up to $SOLR_START_WAIT seconds to see Solr running on port $SOLR_PORT" # Launch in a subshell to show the spinner (loops=0 while true do -- running=$(lsof -t -PniTCP:$SOLR_PORT -sTCP:LISTEN) +- running=$(lsof -t -PniTCP:$SOLR_PORT -sTCP:LISTEN || :) + running=$(sockstat -ls -P tcp -p $SOLR_PORT | grep LISTEN) - if [ -z "$running" ]; then - slept=$((loops * 2)) + if [ -z "${running:-}" ]; then + slept=$((loops * 2)) if [ $slept -lt $SOLR_START_WAIT ]; then -@@ -2279,13 +2278,6 @@ function start_solr() { +@@ -2293,13 +2292,6 @@ function start_solr() { fi done) & spinner $! - else - echo -e "NOTE: Please install lsof as this script needs it to determine if Solr is listening on port $SOLR_PORT." - sleep 10 -- SOLR_PID=`ps auxww | grep start\.jar | grep -w "\-Djetty\.port=$SOLR_PORT" | grep -v grep | awk '{print $2}' | sort -r` +- SOLR_PID=`ps auxww | grep start\.jar | awk "/\-Djetty\.port=$SOLR_PORT/"' {print $2}' | sort -r` - echo -e "\nStarted Solr server on port $SOLR_PORT (pid=$SOLR_PID). Happy searching!\n" - return; - fi fi } diff --git a/textproc/apache-solr/files/pkg-message.in b/textproc/apache-solr/files/pkg-message.in index 9a5826983431..4ff8a03f0ec2 100644 --- a/textproc/apache-solr/files/pkg-message.in +++ b/textproc/apache-solr/files/pkg-message.in @@ -1,45 +1,45 @@ [ { type: install message: < For more information how to configure solr check the manual: http://lucene.apache.org/solr/resources.html#documentation The port is configured to listen only on localhost, port 8983. -To have a working initial config, use: - -cp -R %%LOCALBASE%%/solr/example/example-DIH/solr/solr /var/db/solr/ -chown -R solr /var/db/solr/solr - To rotate solr log files include /var/log/solr/ to your log rotation configuration. To enable the port execute: sysrc solr_enable="YES" And start it with: service solr start EOM } { type: upgrade message: <