View | Details | Raw Unified | Return to bug 218654 | Differences between
and this patch

Collapse All | Expand All

(-)b/Makefile (-2 / +2 lines)
Lines 3-8 Link Here
3
3
4
PORTNAME=	apache-solr
4
PORTNAME=	apache-solr
5
PORTVERSION=	6.5.0
5
PORTVERSION=	6.5.0
6
PORTREVISION=	1
6
CATEGORIES=	textproc java
7
CATEGORIES=	textproc java
7
MASTER_SITES=	APACHE/lucene/solr/${PORTVERSION}
8
MASTER_SITES=	APACHE/lucene/solr/${PORTVERSION}
8
DISTNAME=	solr-${PORTVERSION}
9
DISTNAME=	solr-${PORTVERSION}
Lines 14-21 LICENSE= APACHE20 Link Here
14
15
15
CONFLICTS_INSTALL=	apache-solr3-* apache-solr-4* apache-solr-5*
16
CONFLICTS_INSTALL=	apache-solr3-* apache-solr-4* apache-solr-5*
16
17
17
RUN_DEPENDS=	bash:shells/bash \
18
RUN_DEPENDS=	bash:shells/bash
18
		lsof:sysutils/lsof
19
19
20
USES=		cpe tar:tgz
20
USES=		cpe tar:tgz
21
USE_JAVA=	yes
21
USE_JAVA=	yes
(-)b/files/patch-bin_solr (+31 lines)
Added Link Here
1
--- bin/solr.orig	2017-04-15 09:06:51 UTC
2
+++ bin/solr
3
@@ -1757,13 +1757,12 @@ function launch_solr() {
4
 	1>"$SOLR_LOGS_DIR/solr-$SOLR_PORT-console.log" 2>&1 & echo $! > "$SOLR_PID_DIR/solr-$SOLR_PORT.pid"
5
 
6
     # no lsof on cygwin though
7
-    if hash lsof 2>/dev/null ; then  # hash returns true if lsof is on the path
8
       echo -n "Waiting up to $SOLR_STOP_WAIT seconds to see Solr running on port $SOLR_PORT"
9
       # Launch in a subshell to show the spinner
10
       (loops=0
11
       while true
12
       do
13
-        running=`lsof -PniTCP:$SOLR_PORT -sTCP:LISTEN`
14
+        running=`sockstat -ls -P tcp -p $SOLR_PORT | grep LISTEN`
15
         if [ -z "$running" ]; then
16
 	  slept=$((loops * 2))
17
           if [ $slept -lt $SOLR_STOP_WAIT ]; then
18
@@ -1781,13 +1780,6 @@ function launch_solr() {
19
         fi
20
       done) &
21
       spinner $!
22
-    else
23
-      echo -e "NOTE: Please install lsof as this script needs it to determine if Solr is listening on port $SOLR_PORT."
24
-      sleep 10
25
-      SOLR_PID=`ps auxww | grep start\.jar | grep -w "\-Djetty\.port=$SOLR_PORT" | grep -v grep | awk '{print $2}' | sort -r`
26
-      echo -e "\nStarted Solr server on port $SOLR_PORT (pid=$SOLR_PID). Happy searching!\n"
27
-      return;
28
-    fi
29
   fi
30
 }
31
 
(-)b/files/solr.in (-2 / +2 lines)
Lines 54-61 solr_status () Link Here
54
	su -m solr -c "${command} status"
54
	su -m solr -c "${command} status"
55
}
55
}
56
56
57
# add %%LOCALBASE%%/[bin|sbin] to path
57
# add %%LOCALBASE%%/bin to path
58
export PATH=$PATH:%%LOCALBASE%%/bin:%%LOCALBASE%%/sbin
58
export PATH=$PATH:%%LOCALBASE%%/bin
59
# let the start script read some custom settings
59
# let the start script read some custom settings
60
export SOLR_INCLUDE=/usr/local/etc/solr.in.sh
60
export SOLR_INCLUDE=/usr/local/etc/solr.in.sh
61
61

Return to bug 218654