diff options
author | fhajny <fhajny@pkgsrc.org> | 2015-10-09 13:59:56 +0000 |
---|---|---|
committer | fhajny <fhajny@pkgsrc.org> | 2015-10-09 13:59:56 +0000 |
commit | bcce4f910aec806ea971d4df720a67fb71d16973 (patch) | |
tree | 6bd627421e44873d5c04fb71594738de3a098ee4 | |
parent | aa4271ac95a6cc06bc33bd14a019f294a2d743b7 (diff) | |
download | pkgsrc-bcce4f910aec806ea971d4df720a67fb71d16973.tar.gz |
Import Apache ZooKeeper as devel/zookeeper (server) and devel/libzookeper
(C lib).
ZooKeeper is a centralized service for maintaining configuration information,
naming, providing distributed synchronization, and providing group services.
-rw-r--r-- | devel/libzookeeper/DESCR | 4 | ||||
-rw-r--r-- | devel/libzookeeper/Makefile | 25 | ||||
-rw-r--r-- | devel/libzookeeper/PLIST | 12 | ||||
-rw-r--r-- | devel/libzookeeper/buildlink3.mk | 13 | ||||
-rw-r--r-- | devel/zookeeper/DESCR | 2 | ||||
-rw-r--r-- | devel/zookeeper/Makefile | 76 | ||||
-rw-r--r-- | devel/zookeeper/Makefile.common | 15 | ||||
-rw-r--r-- | devel/zookeeper/PLIST | 69 | ||||
-rw-r--r-- | devel/zookeeper/distinfo | 13 | ||||
-rw-r--r-- | devel/zookeeper/files/smf/manifest.xml | 31 | ||||
-rw-r--r-- | devel/zookeeper/patches/patch-bin_zkEnv.sh | 21 | ||||
-rw-r--r-- | devel/zookeeper/patches/patch-bin_zkServer.sh | 38 | ||||
-rw-r--r-- | devel/zookeeper/patches/patch-conf_zoo__sample.cfg | 14 | ||||
-rw-r--r-- | devel/zookeeper/patches/patch-include_recordio.h | 16 | ||||
-rw-r--r-- | devel/zookeeper/patches/patch-src_c_src_zookeeper.c | 14 | ||||
-rw-r--r-- | devel/zookeeper/patches/patch-src_packages_templates_conf_zookeeper-env.sh | 13 | ||||
-rw-r--r-- | devel/zookeeper/patches/patch-src_recordio.c | 21 | ||||
-rw-r--r-- | devel/zookeeper/patches/patch-src_zk__log.c | 14 |
18 files changed, 411 insertions, 0 deletions
diff --git a/devel/libzookeeper/DESCR b/devel/libzookeeper/DESCR new file mode 100644 index 00000000000..44e53bc9bbc --- /dev/null +++ b/devel/libzookeeper/DESCR @@ -0,0 +1,4 @@ +ZooKeeper is a centralized service for maintaining configuration information, +naming, providing distributed synchronization, and providing group services. + +This package contains the C library and include files. diff --git a/devel/libzookeeper/Makefile b/devel/libzookeeper/Makefile new file mode 100644 index 00000000000..f8e321659c7 --- /dev/null +++ b/devel/libzookeeper/Makefile @@ -0,0 +1,25 @@ +# $NetBSD: Makefile,v 1.1 2015/10/09 13:59:57 fhajny Exp $ +# + +.include "../../devel/zookeeper/Makefile.common" + +PKGNAME= lib${DISTNAME} +COMMENT= Highly reliable distributed coordination C lib + +GNU_CONFIGURE= yes +USE_LANGUAGES= c c99 +USE_LIBTOOL= yes + +CONFIGURE_DIRS= src/c + +CFLAGS.SunOS+= -D_POSIX_PTHREAD_SEMANTICS +LIBS.SunOS+= -lnsl -lsocket + +# Tests require c++ and cppunit +#USE_LANGUAGES+= c++ +#TEST_TARGET= run-check + +BUILDLINK_DEPMETHOD.cppunit= build +.include "../../devel/cppunit/buildlink3.mk" +.include "../../mk/pthread.buildlink3.mk" +.include "../../mk/bsd.pkg.mk" diff --git a/devel/libzookeeper/PLIST b/devel/libzookeeper/PLIST new file mode 100644 index 00000000000..9037c930e64 --- /dev/null +++ b/devel/libzookeeper/PLIST @@ -0,0 +1,12 @@ +@comment $NetBSD: PLIST,v 1.1 2015/10/09 13:59:57 fhajny Exp $ +bin/cli_mt +bin/cli_st +bin/load_gen +include/zookeeper/proto.h +include/zookeeper/recordio.h +include/zookeeper/zookeeper.h +include/zookeeper/zookeeper.jute.h +include/zookeeper/zookeeper_log.h +include/zookeeper/zookeeper_version.h +lib/libzookeeper_mt.la +lib/libzookeeper_st.la diff --git a/devel/libzookeeper/buildlink3.mk b/devel/libzookeeper/buildlink3.mk new file mode 100644 index 00000000000..e7788a76e51 --- /dev/null +++ b/devel/libzookeeper/buildlink3.mk @@ -0,0 +1,13 @@ +# $NetBSD: buildlink3.mk,v 1.1 2015/10/09 13:59:57 fhajny Exp $ + +BUILDLINK_TREE+= libzookeeper + +.if !defined(LIBZOOKEEPER_BUILDLINK3_MK) +LIBZOOKEEPER_BUILDLINK3_MK:= + +BUILDLINK_API_DEPENDS.libzookeeper+= libzookeeper>=3.4.0 +BUILDLINK_PKGSRCDIR.libzookeeper?= ../../devel/libzookeeper + +.endif # LIBZOOKEEPER_BUILDLINK3_MK + +BUILDLINK_TREE+= -libzookeeper diff --git a/devel/zookeeper/DESCR b/devel/zookeeper/DESCR new file mode 100644 index 00000000000..38b4da718a3 --- /dev/null +++ b/devel/zookeeper/DESCR @@ -0,0 +1,2 @@ +ZooKeeper is a centralized service for maintaining configuration information, +naming, providing distributed synchronization, and providing group services. diff --git a/devel/zookeeper/Makefile b/devel/zookeeper/Makefile new file mode 100644 index 00000000000..e8d3e2fe742 --- /dev/null +++ b/devel/zookeeper/Makefile @@ -0,0 +1,76 @@ +# $NetBSD: Makefile,v 1.1 2015/10/09 13:59:56 fhajny Exp $ +# + +.include "Makefile.common" + +COMMENT= Highly reliable distributed coordination server + +BUILD_DEPENDS+= apache-ant-[0-9]*:../../devel/apache-ant + +USE_JAVA= yes +USE_JAVA2= yes +USE_TOOLS+= bash:run pax + +PKG_SYSCONFSUBDIR= zookeeper + +.include "../../mk/bsd.prefs.mk" + +ZK_DB?= ${VARBASE}/db/zookeeper +ZK_LOG?= ${VARBASE}/log/zookeeper +ZK_RUN?= ${VARBASE}/run/zookeeper +ZK_USER?= zookeeper +ZK_GROUP?= zookeeper + +BUILD_DEFS+= VARBASE ZK_DB ZK_LOG ZK_RUN ZK_USER ZK_GROUP + +PKG_GROUPS+= ${ZK_GROUP} +PKG_USERS+= ${ZK_USER}:${ZK_GROUP} + +PKG_GECOS.${ZK_USER}= ZooKeeper Daemon User +PKG_HOME.${ZK_USER}= ${PREFIX}/share/zookeeper +PKG_SHELL.${ZK_USER}= ${BASH} + +OWN_DIRS_PERMS+= ${ZK_DB} ${ZK_USER} ${ZK_GROUP} 755 +OWN_DIRS_PERMS+= ${ZK_DB}/data ${ZK_USER} ${ZK_GROUP} 755 +OWN_DIRS_PERMS+= ${ZK_LOG} ${ZK_USER} ${ZK_GROUP} 755 +OWN_DIRS_PERMS+= ${ZK_RUN} ${ZK_USER} ${ZK_GROUP} 755 + +BUILDDIR= ${WRKSRC}/build/${DISTNAME} +EGDIR= share/examples/zookeeper + +SUBST_CLASSES+= paths +SUBST_STAGE.paths= post-patch +SUBST_MESSAGE.paths= Fixing ZooKeeper default paths +SUBST_FILES.paths= conf/zoo_sample.cfg +SUBST_FILES.paths+= src/packages/templates/conf/zookeeper-env.sh +SUBST_VARS.paths+= PKG_JAVA_HOME ZK_DB ZK_LOG ZK_RUN + +REPLACE_BASH= bin/zkCli.sh bin/zkEnv.sh bin/zkServer.sh + +INSTALLATION_DIRS+= bin libexec sbin share/zookeeper ${EGDIR} + +CONF_FILES+= ${EGDIR}/configuration.xsl ${PKG_SYSCONFDIR}/configuration.xsl +CONF_FILES+= ${EGDIR}/log4j.properties ${PKG_SYSCONFDIR}/log4j.properties +CONF_FILES+= ${EGDIR}/zoo.cfg ${PKG_SYSCONFDIR}/zoo.cfg +CONF_FILES_PERMS+= ${EGDIR}/zookeeper-env.sh ${PKG_SYSCONFDIR}/zookeeper-env.sh \ + ${ROOT_USER} ${ROOT_GROUP} 0755 + +FILES_SUBST+= ZK_USER=${ZK_USER} ZK_GROUP=${ZK_GROUP} + +do-build: + cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ant bin-package + +do-install: + ${INSTALL_SCRIPT} ${BUILDDIR}/bin/zkCli.sh ${DESTDIR}${PREFIX}/bin + ${INSTALL_SCRIPT} ${BUILDDIR}/libexec/zkEnv.sh ${DESTDIR}${PREFIX}/libexec + ${INSTALL_SCRIPT} ${BUILDDIR}/sbin/zkServer.sh ${DESTDIR}${PREFIX}/sbin + ${INSTALL_DATA} ${BUILDDIR}/conf/configuration.xsl ${DESTDIR}${PREFIX}/${EGDIR} + ${INSTALL_DATA} ${BUILDDIR}/conf/log4j.properties ${DESTDIR}${PREFIX}/${EGDIR} + ${INSTALL_DATA} ${BUILDDIR}/conf/zoo_sample.cfg ${DESTDIR}${PREFIX}/${EGDIR}/zoo.cfg + ${INSTALL_DATA} ${BUILDDIR}/share/zookeeper/templates/conf/zookeeper-env.sh \ + ${DESTDIR}${PREFIX}/${EGDIR}/zookeeper-env.sh + cd ${BUILDDIR}/share/zookeeper && ${PAX} -rw -pp * ${DESTDIR}${PREFIX}/share/zookeeper/ + ${RM} -f ${DESTDIR}${PREFIX}/share/zookeeper/templates/conf/zookeeper-env.sh.orig + +.include "../../mk/java-vm.mk" +.include "../../mk/bsd.pkg.mk" diff --git a/devel/zookeeper/Makefile.common b/devel/zookeeper/Makefile.common new file mode 100644 index 00000000000..5dc7a79de5a --- /dev/null +++ b/devel/zookeeper/Makefile.common @@ -0,0 +1,15 @@ +# $NetBSD: Makefile.common,v 1.1 2015/10/09 13:59:56 fhajny Exp $ +# +# used by devel/libzookeeper/Makefile +# used by devel/zookeeper/Makefile + +DISTNAME= zookeeper-3.4.6 +CATEGORIES= devel +MASTER_SITES= ${MASTER_SITE_APACHE:=zookeeper/${DISTNAME}/} + +MAINTAINER= filip@joyent.com +HOMEPAGE= http://zookeeper.apache.org/ +LICENSE= apache-2.0 + +PATCHDIR= ${.CURDIR}/../../devel/zookeeper/patches +DISTINFO_FILE= ${.CURDIR}/../../devel/zookeeper/distinfo diff --git a/devel/zookeeper/PLIST b/devel/zookeeper/PLIST new file mode 100644 index 00000000000..e7dadd78d1c --- /dev/null +++ b/devel/zookeeper/PLIST @@ -0,0 +1,69 @@ +@comment $NetBSD: PLIST,v 1.1 2015/10/09 13:59:56 fhajny Exp $ +bin/zkCli.sh +libexec/zkEnv.sh +sbin/zkServer.sh +share/examples/zookeeper/configuration.xsl +share/examples/zookeeper/log4j.properties +share/examples/zookeeper/zoo.cfg +share/examples/zookeeper/zookeeper-env.sh +share/zookeeper/cobertura/README.txt +share/zookeeper/contrib/ZooInspector/zookeeper-${PKGVERSION}-ZooInspector.jar +share/zookeeper/contrib/fatjar/zookeeper-${PKGVERSION}-fatjar.jar +share/zookeeper/contrib/loggraph/zookeeper-${PKGVERSION}-loggraph.jar +share/zookeeper/contrib/rest/zookeeper-${PKGVERSION}-rest.jar +share/zookeeper/jdiff/zookeeper_3.1.1.xml +share/zookeeper/jdiff/zookeeper_${PKGVERSION}-SNAPSHOT.xml +share/zookeeper/jdiff/zookeeper_${PKGVERSION}.xml +share/zookeeper/jline-0.9.94.LICENSE.txt +share/zookeeper/jline-0.9.94.jar +share/zookeeper/log4j-1.2.16.LICENSE.txt +share/zookeeper/log4j-1.2.16.jar +share/zookeeper/netty-3.7.0.Final.jar +share/zookeeper/recipes/lock/build.xml +share/zookeeper/recipes/lock/src/c/INSTALL +share/zookeeper/recipes/lock/src/c/LICENSE +share/zookeeper/recipes/lock/src/c/Makefile.am +share/zookeeper/recipes/lock/src/c/README.txt +share/zookeeper/recipes/lock/src/c/acinclude.m4 +share/zookeeper/recipes/lock/src/c/aminclude.am +share/zookeeper/recipes/lock/src/c/c-doc.Doxyfile +share/zookeeper/recipes/lock/src/c/configure.ac +share/zookeeper/recipes/lock/src/c/include/zoo_lock.h +share/zookeeper/recipes/lock/src/c/src/zoo_lock.c +share/zookeeper/recipes/lock/src/c/tests/TestClient.cc +share/zookeeper/recipes/lock/src/c/tests/TestDriver.cc +share/zookeeper/recipes/lock/src/c/tests/Util.cc +share/zookeeper/recipes/lock/src/c/tests/Util.h +share/zookeeper/recipes/lock/src/c/tests/zkServer.sh +share/zookeeper/recipes/lock/src/java/org/apache/zookeeper/recipes/lock/LockListener.java +share/zookeeper/recipes/lock/src/java/org/apache/zookeeper/recipes/lock/ProtocolSupport.java +share/zookeeper/recipes/lock/src/java/org/apache/zookeeper/recipes/lock/WriteLock.java +share/zookeeper/recipes/lock/src/java/org/apache/zookeeper/recipes/lock/ZNodeName.java +share/zookeeper/recipes/lock/src/java/org/apache/zookeeper/recipes/lock/ZooKeeperOperation.java +share/zookeeper/recipes/lock/test/org/apache/zookeeper/recipes/lock/WriteLockTest.java +share/zookeeper/recipes/lock/test/org/apache/zookeeper/recipes/lock/ZNodeNameTest.java +share/zookeeper/recipes/queue/build.xml +share/zookeeper/recipes/queue/src/c/INSTALL +share/zookeeper/recipes/queue/src/c/LICENSE +share/zookeeper/recipes/queue/src/c/Makefile.am +share/zookeeper/recipes/queue/src/c/README.txt +share/zookeeper/recipes/queue/src/c/acinclude.m4 +share/zookeeper/recipes/queue/src/c/aminclude.am +share/zookeeper/recipes/queue/src/c/c-doc.Doxyfile +share/zookeeper/recipes/queue/src/c/configure.ac +share/zookeeper/recipes/queue/src/c/include/zoo_queue.h +share/zookeeper/recipes/queue/src/c/src/zoo_queue.c +share/zookeeper/recipes/queue/src/c/tests/TestClient.cc +share/zookeeper/recipes/queue/src/c/tests/TestDriver.cc +share/zookeeper/recipes/queue/src/c/tests/Util.cc +share/zookeeper/recipes/queue/src/c/tests/Util.h +share/zookeeper/recipes/queue/src/c/tests/zkServer.sh +share/zookeeper/recipes/queue/src/java/org/apache/zookeeper/recipes/queue/DistributedQueue.java +share/zookeeper/recipes/queue/test/org/apache/zookeeper/recipes/queue/DistributedQueueTest.java +share/zookeeper/slf4j-api-1.6.1.jar +share/zookeeper/slf4j-log4j12-1.6.1.jar +share/zookeeper/templates/conf/zoo.cfg +share/zookeeper/templates/conf/zookeeper-env.sh +share/zookeeper/zookeeper-${PKGVERSION}.jar +share/zookeeper/zookeeper-${PKGVERSION}.jar.md5 +share/zookeeper/zookeeper-${PKGVERSION}.jar.sha1 diff --git a/devel/zookeeper/distinfo b/devel/zookeeper/distinfo new file mode 100644 index 00000000000..48c4c6476ee --- /dev/null +++ b/devel/zookeeper/distinfo @@ -0,0 +1,13 @@ +$NetBSD: distinfo,v 1.1 2015/10/09 13:59:56 fhajny Exp $ + +SHA1 (zookeeper-3.4.6.tar.gz) = 2a9e53f5990dfe0965834a525fbcad226bf93474 +RMD160 (zookeeper-3.4.6.tar.gz) = d9fadf07a40a85b8fd5a7e04e7200c74fd7393ce +Size (zookeeper-3.4.6.tar.gz) = 17699306 bytes +SHA1 (patch-bin_zkEnv.sh) = 210b94572a221cc46898750da0a822c90708ef9f +SHA1 (patch-bin_zkServer.sh) = 5f024b604ecd27c16d6ce5be92b87f5523494ada +SHA1 (patch-conf_zoo__sample.cfg) = 74885bea53e5b9b723fb1564db362a08d7b47705 +SHA1 (patch-include_recordio.h) = ab07325a556eee1f6b595de241e9f7c7084c8065 +SHA1 (patch-src_c_src_zookeeper.c) = 0cc9710914d2a329eb8f7d18683778f460180b72 +SHA1 (patch-src_packages_templates_conf_zookeeper-env.sh) = 5abb72f885a5ac884dfcfa480438ce82d544d489 +SHA1 (patch-src_recordio.c) = 6c3082fba3d48d891276636aea400ad631fc5997 +SHA1 (patch-src_zk__log.c) = 9dc6e801f53a96bf8b3ec1bac429f83a0ff2cae4 diff --git a/devel/zookeeper/files/smf/manifest.xml b/devel/zookeeper/files/smf/manifest.xml new file mode 100644 index 00000000000..6b3bf0f3fcc --- /dev/null +++ b/devel/zookeeper/files/smf/manifest.xml @@ -0,0 +1,31 @@ +<?xml version="1.0"?> +<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1"> +<service_bundle type="manifest" name="zookeeper"> + <service name="@SMF_PREFIX@/zookeeper" type="service" version="1"> + <create_default_instance enabled="false" /> + <single_instance /> + <dependency name="network" grouping="require_all" restart_on="error" type="service"> + <service_fmri value="svc:/milestone/network:default" /> + </dependency> + <dependency name="filesystem" grouping="require_all" restart_on="error" type="service"> + <service_fmri value="svc:/system/filesystem/local" /> + </dependency> + <method_context> + <method_credential user="@ZK_USER@" group="@ZK_GROUP@" /> + </method_context> + <exec_method type="method" name="start" exec="@PREFIX@/sbin/zkServer.sh start" timeout_seconds="60" /> + <exec_method type="method" name="stop" exec="@PREFIX@/sbin/zkServer.sh stop" timeout_seconds="60" /> + <property_group name="startd" type="framework"> + <propval name="duration" type="astring" value="contract" /> + <propval name="ignore_error" type="astring" value="core,signal" /> + </property_group> + <property_group name="application" type="application"></property_group> + <stability value="Evolving" /> + <template> + <common_name> + <loctext xml:lang="C">ZooKeeper daemon service</loctext> + </common_name> + </template> + </service> +</service_bundle> + diff --git a/devel/zookeeper/patches/patch-bin_zkEnv.sh b/devel/zookeeper/patches/patch-bin_zkEnv.sh new file mode 100644 index 00000000000..a77dbb67506 --- /dev/null +++ b/devel/zookeeper/patches/patch-bin_zkEnv.sh @@ -0,0 +1,21 @@ +$NetBSD: patch-bin_zkEnv.sh,v 1.1 2015/10/09 13:59:56 fhajny Exp $ + +Use a sane default prefix. +--- bin/zkEnv.sh.orig 2014-02-20 10:14:08.000000000 +0000 ++++ bin/zkEnv.sh +@@ -23,7 +23,7 @@ + # or the conf directory that is + # a sibling of this script's directory + +-ZOOBINDIR="${ZOOBINDIR:-/usr/bin}" ++ZOOBINDIR="${ZOOBINDIR:-@PREFIX@}" + ZOOKEEPER_PREFIX="${ZOOBINDIR}/.." + + if [ "x$ZOOCFGDIR" = "x" ] +@@ -112,4 +112,4 @@ then + CLASSPATH=`cygpath -wp "$CLASSPATH"` + fi + +-#echo "CLASSPATH=$CLASSPATH" +\ No newline at end of file ++#echo "CLASSPATH=$CLASSPATH" diff --git a/devel/zookeeper/patches/patch-bin_zkServer.sh b/devel/zookeeper/patches/patch-bin_zkServer.sh new file mode 100644 index 00000000000..a9b7ab74692 --- /dev/null +++ b/devel/zookeeper/patches/patch-bin_zkServer.sh @@ -0,0 +1,38 @@ +$NetBSD: patch-bin_zkServer.sh,v 1.1 2015/10/09 13:59:56 fhajny Exp $ + +Use awk instead of grep/sed, and Bash echo for better portability. +--- bin/zkServer.sh.orig 2014-02-20 10:14:08.000000000 +0000 ++++ bin/zkServer.sh +@@ -81,7 +81,7 @@ fi + echo "Using config: $ZOOCFG" >&2 + + if [ -z "$ZOOPIDFILE" ]; then +- ZOO_DATADIR="$(grep "^[[:space:]]*dataDir" "$ZOOCFG" | sed -e 's/.*=//')" ++ ZOO_DATADIR="$(awk -F= '{ if ($1=="dataDir") print $2}' "$ZOOCFG")" + if [ ! -d "$ZOO_DATADIR" ]; then + mkdir -p "$ZOO_DATADIR" + fi +@@ -110,7 +110,7 @@ start) + -cp "$CLASSPATH" $JVMFLAGS $ZOOMAIN "$ZOOCFG" > "$_ZOO_DAEMON_OUT" 2>&1 < /dev/null & + if [ $? -eq 0 ] + then +- if /bin/echo -n $! > "$ZOOPIDFILE" ++ if echo -n $! > "$ZOOPIDFILE" + then + sleep 1 + echo STARTED +@@ -161,12 +161,12 @@ restart) + ;; + status) + # -q is necessary on some versions of linux where nc returns too quickly, and no stat result is output +- clientPortAddress=`grep "^[[:space:]]*clientPortAddress[^[:alpha:]]" "$ZOOCFG" | sed -e 's/.*=//'` ++ clientPortAddress=`awk -F= '{if ($1=="clientPortAddress") print $2}' "$ZOOCFG"` + if ! [ $clientPortAddress ] + then + clientPortAddress="localhost" + fi +- clientPort=`grep "^[[:space:]]*clientPort[^[:alpha:]]" "$ZOOCFG" | sed -e 's/.*=//'` ++ clientPort=`awk -F= '{if ($1=="clientPort") print $2}' "$ZOOCFG"` + STAT=`"$JAVA" "-Dzookeeper.log.dir=${ZOO_LOG_DIR}" "-Dzookeeper.root.logger=${ZOO_LOG4J_PROP}" \ + -cp "$CLASSPATH" $JVMFLAGS org.apache.zookeeper.client.FourLetterWordMain \ + $clientPortAddress $clientPort srvr 2> /dev/null \ diff --git a/devel/zookeeper/patches/patch-conf_zoo__sample.cfg b/devel/zookeeper/patches/patch-conf_zoo__sample.cfg new file mode 100644 index 00000000000..e6e9b5d6ab8 --- /dev/null +++ b/devel/zookeeper/patches/patch-conf_zoo__sample.cfg @@ -0,0 +1,14 @@ +$NetBSD: patch-conf_zoo__sample.cfg,v 1.1 2015/10/09 13:59:56 fhajny Exp $ + +Default paths. +--- conf/zoo_sample.cfg.orig 2014-02-20 10:14:08.000000000 +0000 ++++ conf/zoo_sample.cfg +@@ -9,7 +9,7 @@ syncLimit=5 + # the directory where the snapshot is stored. + # do not use /tmp for storage, /tmp here is just + # example sakes. +-dataDir=/tmp/zookeeper ++dataDir=@ZK_DB@ + # the port at which the clients will connect + clientPort=2181 + # the maximum number of client connections. diff --git a/devel/zookeeper/patches/patch-include_recordio.h b/devel/zookeeper/patches/patch-include_recordio.h new file mode 100644 index 00000000000..d0685e4afe1 --- /dev/null +++ b/devel/zookeeper/patches/patch-include_recordio.h @@ -0,0 +1,16 @@ +$NetBSD: patch-include_recordio.h,v 1.1 2015/10/09 13:59:56 fhajny Exp $ + +SunOS has htonll since OpenSolaris. +--- src/c/include/recordio.h.orig 2014-02-20 10:14:08.000000000 +0000 ++++ src/c/include/recordio.h +@@ -73,7 +73,10 @@ void close_buffer_iarchive(struct iarchi + char *get_buffer(struct oarchive *); + int get_buffer_len(struct oarchive *); + ++#ifndef __sun ++/* Solaris already implements htonll */ + int64_t htonll(int64_t v); ++#endif + + #ifdef __cplusplus + } diff --git a/devel/zookeeper/patches/patch-src_c_src_zookeeper.c b/devel/zookeeper/patches/patch-src_c_src_zookeeper.c new file mode 100644 index 00000000000..c62bd0a065f --- /dev/null +++ b/devel/zookeeper/patches/patch-src_c_src_zookeeper.c @@ -0,0 +1,14 @@ +$NetBSD: patch-src_c_src_zookeeper.c,v 1.1 2015/10/09 13:59:56 fhajny Exp $ + +Fix array reference. +--- src/c/src/zookeeper.c.orig 2014-02-20 10:14:09.000000000 +0000 ++++ src/c/src/zookeeper.c +@@ -570,7 +570,7 @@ int getaddrs(zhandle_t *zh) + hints.ai_socktype = SOCK_STREAM; + hints.ai_protocol = IPPROTO_TCP; + +- while(isspace(*host) && host != strtok_last) ++ while(isspace((unsigned char) *host) && host != strtok_last) + host++; + + if ((rc = getaddrinfo(host, port_spec, &hints, &res0)) != 0) { diff --git a/devel/zookeeper/patches/patch-src_packages_templates_conf_zookeeper-env.sh b/devel/zookeeper/patches/patch-src_packages_templates_conf_zookeeper-env.sh new file mode 100644 index 00000000000..e696683dd5e --- /dev/null +++ b/devel/zookeeper/patches/patch-src_packages_templates_conf_zookeeper-env.sh @@ -0,0 +1,13 @@ +$NetBSD: patch-src_packages_templates_conf_zookeeper-env.sh,v 1.1 2015/10/09 13:59:56 fhajny Exp $ + +Default paths. +--- src/packages/templates/conf/zookeeper-env.sh.orig 2014-02-20 10:14:10.000000000 +0000 ++++ src/packages/templates/conf/zookeeper-env.sh +@@ -12,5 +12,5 @@ + # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + # See the License for the specific language governing permissions and + # limitations under the License. +-export JAVA_HOME=${JAVA_HOME} +-export ZOO_LOG_DIR=${LOG_DIR} ++export JAVA_HOME=@PKG_JAVA_HOME@ ++export ZOO_LOG_DIR=@ZK_LOG@ diff --git a/devel/zookeeper/patches/patch-src_recordio.c b/devel/zookeeper/patches/patch-src_recordio.c new file mode 100644 index 00000000000..9b48d37bdc8 --- /dev/null +++ b/devel/zookeeper/patches/patch-src_recordio.c @@ -0,0 +1,21 @@ +$NetBSD: patch-src_recordio.c,v 1.1 2015/10/09 13:59:56 fhajny Exp $ + +SunOS has had htonll since OpenSolaris. +--- src/c/src/recordio.c.orig 2014-02-20 10:14:08.000000000 +0000 ++++ src/c/src/recordio.c +@@ -80,6 +80,7 @@ int oa_serialize_int(struct oarchive *oa + priv->off+=sizeof(i); + return 0; + } ++#ifndef __sun + int64_t htonll(int64_t v) + { + int i = 0; +@@ -95,6 +96,7 @@ int64_t htonll(int64_t v) + + return v; + } ++#endif + + int oa_serialize_long(struct oarchive *oa, const char *tag, const int64_t *d) + { diff --git a/devel/zookeeper/patches/patch-src_zk__log.c b/devel/zookeeper/patches/patch-src_zk__log.c new file mode 100644 index 00000000000..ecd8459258c --- /dev/null +++ b/devel/zookeeper/patches/patch-src_zk__log.c @@ -0,0 +1,14 @@ +$NetBSD: patch-src_zk__log.c,v 1.1 2015/10/09 13:59:56 fhajny Exp $ + +Needs to be cast as int. +--- src/c/src/zk_log.c.orig 2014-02-20 10:14:09.000000000 +0000 ++++ src/c/src/zk_log.c +@@ -133,7 +133,7 @@ void log_message(ZooLogLevel curLevel,in + #endif + if(pid==0)pid=getpid(); + #ifndef THREADED +- fprintf(LOGSTREAM, "%s:%d:%s@%s@%d: %s\n", time_now(get_time_buffer()),pid, ++ fprintf(LOGSTREAM, "%s:%d:%s@%s@%d: %s\n", time_now(get_time_buffer()),(int)pid, + dbgLevelStr[curLevel],funcName,line,message); + #else + #ifdef WIN32 |