aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorskreuzer <skreuzer@FreeBSD.org>2014-07-22 23:25:13 +0800
committerskreuzer <skreuzer@FreeBSD.org>2014-07-22 23:25:13 +0800
commit6903463f32073f1eb9fa7908246e750e53c96614 (patch)
tree399889533a5afdf19ac1ba0ee5d73fd36563f7ca
parent3ab782968dc7c7e8c8564a60aa7f63b26929bb21 (diff)
downloadfreebsd-ports-gnome-6903463f32073f1eb9fa7908246e750e53c96614.tar.gz
freebsd-ports-gnome-6903463f32073f1eb9fa7908246e750e53c96614.tar.zst
freebsd-ports-gnome-6903463f32073f1eb9fa7908246e750e53c96614.zip
Fix issue preventing zookeeper from starting when using service(8)
Add ability to disable JMX in zookeeper by setting zookeeper_jmx=NO Link to command line client zkCli.sh added to ${PREFIX}/bin PR: 191536 Submitted by: Radim Kolar <hsn@sendmail.cz>
-rw-r--r--devel/zookeeper/Makefile28
-rw-r--r--devel/zookeeper/files/zookeeper.in5
-rw-r--r--devel/zookeeper/pkg-plist1
3 files changed, 29 insertions, 5 deletions
diff --git a/devel/zookeeper/Makefile b/devel/zookeeper/Makefile
index d211696599e9..b55a2d779596 100644
--- a/devel/zookeeper/Makefile
+++ b/devel/zookeeper/Makefile
@@ -3,6 +3,7 @@
PORTNAME= zookeeper
PORTVERSION= 3.4.6
+PORTREVISION= 1
CATEGORIES= devel java
MASTER_SITES= ${MASTER_SITE_APACHE}
MASTER_SITE_SUBDIR= zookeeper/zookeeper-${PORTVERSION}
@@ -22,8 +23,6 @@ JAVA_RUN= yes
USE_RC_SUBR= zookeeper
-OPTIONS_DEFINE= DOCS
-
NO_BUILD= yes
SCRIPTS= zkCleanup.sh \
@@ -34,7 +33,18 @@ PORTDOCS= *
PLIST_SUB= PORTNAME=${PORTNAME} \
PORTVERSION=${PORTVERSION} \
- RESETPREFIX=${PREFIX}
+ RESETPREFIX=${PREFIX} \
+ JAVA_HOME=${JAVA_HOME}
+
+ZOOKEEPER_LOGDIR?= /var/log/${PORTNAME}
+ZOOKEEPER_RUNDIR?= /var/run/${PORTNAME}
+
+SUB_LIST+= ZOOKEEPER_LOGDIR=${ZOOKEEPER_LOGDIR} \
+ ZOOKEEPER_RUNDIR=${ZOOKEEPER_RUNDIR}
+post-patch:
+.for f in ${SCRIPTS}
+ ${REINPLACE_CMD} -e "s|bash|${LOCALBASE}/bin/bash|" ${WRKSRC}/bin/${f}
+.endfor
do-install:
${MKDIR} ${STAGEDIR}${PREFIX}/${PORTNAME}
@@ -45,11 +55,19 @@ do-install:
cd ${WRKSRC} && ${COPYTREE_SHARE} conf ${STAGEDIR}${PREFIX}/${PORTNAME}/
cd ${WRKSRC} && ${COPYTREE_SHARE} lib ${STAGEDIR}${PREFIX}/${PORTNAME}/
${INSTALL_DATA} ${WRKSRC}/*.jar ${STAGEDIR}${PREFIX}/${PORTNAME}
+ ${LN} -s ${PREFIX}/${PORTNAME}/bin/zkCli.sh ${STAGEDIR}${PREFIX}/bin/zkCli.sh
+
+.include <bsd.port.options.mk>
post-install:
+ @${MKDIR} ${STAGEDIR}${ZOOKEEPER_LOGDIR}
+ @${MKDIR} ${STAGEDIR}${ZOOKEEPER_RUNDIR}
+.if ${PORT_OPTIONS:MDOCS}
${MKDIR} ${STAGEDIR}${DOCSDIR}
cd ${WRKSRC}/docs && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR}
- @${MKDIR} ${STAGEDIR}/var/log/${PORTNAME}
- @${MKDIR} ${STAGEDIR}/var/run/${PORTNAME}
+ ${RM} -r ${STAGEDIR}${DOCSDIR}/skin/translations
+ ${RM} -r ${STAGEDIR}${DOCSDIR}/skin/scripts
+ ${RM} -r ${STAGEDIR}${DOCSDIR}/skin/css
+.endif
.include <bsd.port.mk>
diff --git a/devel/zookeeper/files/zookeeper.in b/devel/zookeeper/files/zookeeper.in
index cc21aaa86646..81f8f03148c2 100644
--- a/devel/zookeeper/files/zookeeper.in
+++ b/devel/zookeeper/files/zookeeper.in
@@ -21,6 +21,7 @@ load_rc_config $name
: ${zookeeper_enable:="NO"}
: ${zookeeper_logdir="%%ZOOKEEPER_LOGDIR%%"}
: ${zookeeper_rundir="%%ZOOKEEPER_RUNDIR%%"}
+: ${zookeeper_jmx:="YES"}
command="%%PREFIX%%/zookeeper/bin/zkServer.sh"
@@ -34,6 +35,10 @@ export ZOOPIDFILE=${zookeeper_rundir}/zookeeper.pid
zookeeper_command()
{
+ export JAVA_HOME=%%JAVA_HOME%%
+ if ! checkyesno zookeeper_jmx; then
+ export JMXDISABLE=yes
+ fi
${command} ${rc_arg}
}
diff --git a/devel/zookeeper/pkg-plist b/devel/zookeeper/pkg-plist
index b3f7527af050..2cd1cc7c5656 100644
--- a/devel/zookeeper/pkg-plist
+++ b/devel/zookeeper/pkg-plist
@@ -1,3 +1,4 @@
+bin/zkCli.sh
%%PORTNAME%%/bin/zkCleanup.sh
%%PORTNAME%%/bin/zkCli.sh
%%PORTNAME%%/bin/zkEnv.sh