From nobody Sun Oct 16 07:13:09 2022 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Mqrtt22J2z4fZ4n; Sun, 16 Oct 2022 07:13:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Mqrtt1RLsz41b2; Sun, 16 Oct 2022 07:13:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1665904390; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wsnxprEETRIQmLL0a9X4GpBbAf6COjRJgDRPAp/ow3I=; b=XYcAD+/T1/RRZOf4G5MIfHlgss1FO32oPFFcA8cbbN5Dgs//6YW0+i08LJqjUENdFovPz0 0ZUf/JLjfAXcI/5EYz+y6acXQ37mBcKxgMKH3y3M27TPnb/pn6mJq/uSS7OO26aFf9IARr fEH2hb/0YiAyQyFWzvfCTA87EZXy6TIs2OCVVqw1qdtHdPW7L385RncMEB2dvYU/YvC0CU gpeuYCOZQnc97eSmaXj6pCi/nc0SOnBBWn1/p8ZAk3k5KRE3GhkYlr0K1/6DMw+NzvFdZX F+GuGy09rE7rh2mwGXmLgp8/KpYz+L0pjvR4/2unz8rUSP4zT16jegexJZQwCg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Mqrtt0SkkzNbH; Sun, 16 Oct 2022 07:13:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 29G7D9iX081383; Sun, 16 Oct 2022 07:13:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 29G7D9a2081382; Sun, 16 Oct 2022 07:13:09 GMT (envelope-from git) Date: Sun, 16 Oct 2022 07:13:09 GMT Message-Id: <202210160713.29G7D9a2081382@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Matthias Fechner Subject: git: 2b1e7456fbf4 - main - textproc/apache-solr9: make version 9 as extra port available List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mfechner X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2b1e7456fbf43223047cecdd2d95c5cf55926de5 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1665904390; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wsnxprEETRIQmLL0a9X4GpBbAf6COjRJgDRPAp/ow3I=; b=c+JXzsZORpb0rntTown4Y8e8pkbR1ZEVwB5xz2oJgw7yT7JMWJgPsh6aVkbT2QQdwzFMfv 8Ka+237pxPZY3U9BkrZ84EbxKSKVjEMJj5ofL34K3OSLU+wtSeeqI9j/zmuN51VF0uhVLz e8pldIboo81rPbaCo51B7yPPz/CQLUNFHwYzftOhBUsDhjuUsclVyIR2/8IaHTHSgdTeXj b6njLO1RDcctuMsNfhvfPMIhR2u+oRBwbQiOeBLZBI238wara2Qa+WCQ3DEVYCnh6r+T5b hwcgqBbY++pPG6huZI8VMjhODPmJ4R/mQofEH3ovVqDEJmhwUlIZgCw8E7h9EQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1665904390; a=rsa-sha256; cv=none; b=BTKnFFnFW3ZJ4fw0KoIeTS8n+lgzBqYorF2Wcr4PGaQanR40Y5CXCpvzZFEnCo8JolXm/O 1CuOuY756E/cNCG9zZOGxKkWwzgR6XmNkT3fkt5l8yERbgt/sV4+JznPduB/zYUw5Idgxv XOcSudD9NErGLYJPDoN+yHguHJZs4E36zTZpIuWwx1Mb4dmq4pTL0DNIngf94Mzm8uYs/4 Q/WZsP5uMKJuoghOoDumpsgy+cEJNNBVWedbkq5YcDabOJ0B9VPpQg8akui+lnSnwKElp9 7CosUS1dHj/0sz9HGl5Q2u4zF+VW0Oym31r5VY4L5wOVHQ1ZmsSqkN+v2ypm0A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mfechner: URL: https://cgit.FreeBSD.org/ports/commit/?id=2b1e7456fbf43223047cecdd2d95c5cf55926de5 commit 2b1e7456fbf43223047cecdd2d95c5cf55926de5 Author: Matthias Fechner AuthorDate: 2022-10-16 06:58:29 +0000 Commit: Matthias Fechner CommitDate: 2022-10-16 07:12:42 +0000 textproc/apache-solr9: make version 9 as extra port available Version 9 has breaking changes which makes it impossible to do a simple upgrade. Using an extra ports makes sure to not break installation with solr version 8. Copied from b224cb40ad545da1f09dcf0d8bafb8baf0e1b110. --- textproc/Makefile | 1 + textproc/apache-solr9/Makefile | 71 ++++++++++++++++++++++++++++++ textproc/apache-solr9/distinfo | 3 ++ textproc/apache-solr9/files/patch-bin_solr | 31 +++++++++++++ textproc/apache-solr9/files/pkg-message.in | 45 +++++++++++++++++++ textproc/apache-solr9/files/solr.in | 67 ++++++++++++++++++++++++++++ textproc/apache-solr9/pkg-descr | 5 +++ 7 files changed, 223 insertions(+) diff --git a/textproc/Makefile b/textproc/Makefile index 8f8304f24f79..b30b03c27b63 100644 --- a/textproc/Makefile +++ b/textproc/Makefile @@ -52,6 +52,7 @@ SUBDIR += apache-commons-digester SUBDIR += apache-poi SUBDIR += apache-solr + SUBDIR += apache-solr9 SUBDIR += apache-xmlbeans SUBDIR += apertium SUBDIR += apertium-eng diff --git a/textproc/apache-solr9/Makefile b/textproc/apache-solr9/Makefile new file mode 100644 index 000000000000..e2d00e49c750 --- /dev/null +++ b/textproc/apache-solr9/Makefile @@ -0,0 +1,71 @@ +PORTNAME= apache-solr +PORTVERSION= 9.0.0 +PORTREVISION= 0 +CATEGORIES= textproc java +MASTER_SITES= https://archive.apache.org/dist/solr/solr/${PORTVERSION}/ +DISTNAME= solr-${PORTVERSION} +PKGNAMESUFFIX= 9 + +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 +USE_RC_SUBR= solr + +NO_ARCH= yes +NO_BUILD= yes + +SUB_FILES= pkg-message + +USERS= solr +GROUPS= ${USERS} + +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-solr9/distinfo b/textproc/apache-solr9/distinfo new file mode 100644 index 000000000000..76634295a4da --- /dev/null +++ b/textproc/apache-solr9/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1665150331 +SHA256 (solr-9.0.0.tgz) = fd1ddf07e2a25fffee2f398926de7889275bdd2520e97b50402c12125d39581e +SIZE (solr-9.0.0.tgz) = 223857836 diff --git a/textproc/apache-solr9/files/patch-bin_solr b/textproc/apache-solr9/files/patch-bin_solr new file mode 100644 index 000000000000..1c15691df53e --- /dev/null +++ b/textproc/apache-solr9/files/patch-bin_solr @@ -0,0 +1,31 @@ +--- bin/solr.orig 2022-04-25 20:37:26 UTC ++++ bin/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=$(sockstat -ls -P tcp -p $SOLR_PORT | grep LISTEN) + if [ -z "${running:-}" ]; then + slept=$((loops * 2)) + if [ $slept -lt $SOLR_START_WAIT ]; then +@@ -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 | 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-solr9/files/pkg-message.in b/textproc/apache-solr9/files/pkg-message.in new file mode 100644 index 000000000000..4ff8a03f0ec2 --- /dev/null +++ b/textproc/apache-solr9/files/pkg-message.in @@ -0,0 +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 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: <