FreeBSD Bugzilla – Attachment 181808 Details for
Bug 218654
textproc/apache-solr do not use lsof in startup script
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Use sockstat instead of lsof for apache-solr 6.5.0
apache_solr_use_sockstat_instead_of_lsof.patch (text/plain), 2.33 KB, created by
Matthias Fechner
on 2017-04-15 10:45:54 UTC
(
hide
)
Description:
Use sockstat instead of lsof for apache-solr 6.5.0
Filename:
MIME Type:
Creator:
Matthias Fechner
Created:
2017-04-15 10:45:54 UTC
Size:
2.33 KB
patch
obsolete
>diff --git a/Makefile b/Makefile >index b778e99..54df975 100644 >--- a/Makefile >+++ b/Makefile >@@ -3,6 +3,7 @@ > > PORTNAME= apache-solr > PORTVERSION= 6.5.0 >+PORTREVISION= 1 > CATEGORIES= textproc java > MASTER_SITES= APACHE/lucene/solr/${PORTVERSION} > DISTNAME= solr-${PORTVERSION} >@@ -14,8 +15,7 @@ LICENSE= APACHE20 > > CONFLICTS_INSTALL= apache-solr3-* apache-solr-4* apache-solr-5* > >-RUN_DEPENDS= bash:shells/bash \ >- lsof:sysutils/lsof >+RUN_DEPENDS= bash:shells/bash > > USES= cpe tar:tgz > USE_JAVA= yes >diff --git a/files/patch-bin_solr b/files/patch-bin_solr >new file mode 100644 >index 0000000..30d7c09 >--- /dev/null >+++ b/files/patch-bin_solr >@@ -0,0 +1,31 @@ >+--- bin/solr.orig 2017-04-15 09:06:51 UTC >++++ bin/solr >+@@ -1757,13 +1757,12 @@ function launch_solr() { >+ 1>"$SOLR_LOGS_DIR/solr-$SOLR_PORT-console.log" 2>&1 & echo $! > "$SOLR_PID_DIR/solr-$SOLR_PORT.pid" >+ >+ # no lsof on cygwin though >+- if hash lsof 2>/dev/null ; then # hash returns true if lsof is on the path >+ echo -n "Waiting up to $SOLR_STOP_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 -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_STOP_WAIT ]; then >+@@ -1781,13 +1780,6 @@ function launch_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` >+- echo -e "\nStarted Solr server on port $SOLR_PORT (pid=$SOLR_PID). Happy searching!\n" >+- return; >+- fi >+ fi >+ } >+ >diff --git a/files/solr.in b/files/solr.in >index ccca85c..30465a9 100644 >--- a/files/solr.in >+++ b/files/solr.in >@@ -54,8 +54,8 @@ solr_status () > su -m solr -c "${command} status" > } > >-# add %%LOCALBASE%%/[bin|sbin] to path >-export PATH=$PATH:%%LOCALBASE%%/bin:%%LOCALBASE%%/sbin >+# add %%LOCALBASE%%/bin to path >+export PATH=$PATH:%%LOCALBASE%%/bin > # let the start script read some custom settings > export SOLR_INCLUDE=/usr/local/etc/solr.in.sh >
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
Flags:
mfechner
:
maintainer-approval+
Actions:
View
|
Diff
Attachments on
bug 218654
:
181781
|
181806
| 181808