diff --git a/README.md b/README.md index 41211b384..24cbb7fa1 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,2 @@ # bw-zookeeper-build -BW internal Zookeeper build with logback support +BW internal Zookeeper build diff --git a/bin/zkEnv.sh b/bin/zkEnv.sh index 0728c2e70..044ff41f7 100755 --- a/bin/zkEnv.sh +++ b/bin/zkEnv.sh @@ -25,7 +25,7 @@ # Or you can specify the ZOOCFGDIR using the # '--config' option in the command line. -ZOOBINDIR="${ZOOBINDIR:-/usr/bin}" +ZOOBINDIR="${ZOOBINDIR:-/opt/zookeeper/bin}" ZOOKEEPER_PREFIX="${ZOOBINDIR}/.." #check to see if the conf dir is given as an optional argument @@ -89,8 +89,8 @@ done #make it work in the binary package #(use array for LIBPATH to account for spaces within wildcard expansion) -if ls "${ZOOKEEPER_PREFIX}"/share/zookeeper/zookeeper-*.jar > /dev/null 2>&1; then - LIBPATH=("${ZOOKEEPER_PREFIX}"/share/zookeeper/*.jar) +if ls "${ZOOKEEPER_PREFIX}"/share/zookeeper-*.jar > /dev/null 2>&1; then + LIBPATH=("${ZOOKEEPER_PREFIX}"/share/*.jar) else #release tarball format for i in "$ZOOBINDIR"/../zookeeper-*.jar diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 000000000..8c1134ecb --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +zookeeper (3.8.3-bw1-1) unstable; urgency=low + + * Initial update to ZooKeeper 3.8.3 + + -- Robert Cardell Fri, 17 Nov 2023 18:25:00 +0000 diff --git a/debian/control b/debian/control new file mode 100644 index 000000000..9b204b4da --- /dev/null +++ b/debian/control @@ -0,0 +1,21 @@ +Source: zookeeper +Section: java +Priority: optional +Maintainer: Robert Cardell +Build-Depends: + maven, + debhelper-compat (= 13) +Homepage: https://zookeeper.apache.org +Rules-Requires-Root: no + +Package: zookeeper +Architecture: all +Depends: + ${misc:Depends} +Description: High-performance coordination service for distributed applications + ZooKeeper is a centralized, reliable, service for maintaining configuration + information, naming, providing distributed synchronization, and group + services. All of these kinds of services are used in some form or another by + distributed applications. + . + This is Brandwatch's internal build of Zookeeper. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 000000000..8f8e61a96 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,193 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: Apache ZooKeeper +Source: https://zookeeper.apache.org/ + +Files: * +Copyright: 2009-2022 The Apache Software Foundation +License: Apache-2.0 + +Files: zookeeper-client/zookeeper-client-c/INSTALL + zookeeper-recipes/zookeeper-recipes-lock/src/main/c/INSTALL + zookeeper-recipes/zookeeper-recipes-queue/src/main/c/INSTALL +Copyright: 1994-2006 Free Software Foundation, Inc. +License: FSFUL + +Files: zookeeper-client/zookeeper-client-c/acinclude.m4 + zookeeper-client/zookeeper-client-c/aminclude.am + zookeeper-recipes/zookeeper-recipes-lock/src/main/c/acinclude.m4 + zookeeper-recipes/zookeeper-recipes-lock/src/main/c/aminclude.am + zookeeper-recipes/zookeeper-recipes-queue/src/main/c/acinclude.m4 + zookeeper-recipes/zookeeper-recipes-queue/src/main/c/aminclude.am +Copyright: 2004 Oren Ben-Kiki +License: GPL-3+ +Comment: the headers state the license is the same as the one of the Autoconf + macros, i.e. GPL-3+. + +Files: zookeeper-client/zookeeper-client-c/include/win_getopt.h +Copyright: 2000 The NetBSD Foundation, Inc. + 2002 Todd C. Miller + 2009-2022 The Apache Software Foundation +License: BSD-2-Clause and ISC and Apache-2.0 + +Files: zookeeper-client/zookeeper-client-c/src/hashtable/* +Copyright: 2002-2004 Christopher Clark +License: BSD-3-Clause + +Files: zookeeper-contrib/zookeeper-contrib-loggraph/src/main/resources/webapp/org/apache/zookeeper/graph/resources/date.format.js +Copyright: 2007-2009 Steven Levithan +License: Expat + +Files: zookeeper-contrib/zookeeper-contrib-loggraph/src/main/resources/webapp/org/apache/zookeeper/graph/resources/g.bar.js + zookeeper-contrib/zookeeper-contrib-loggraph/src/main/resources/webapp/org/apache/zookeeper/graph/resources/g.dot.js + zookeeper-contrib/zookeeper-contrib-loggraph/src/main/resources/webapp/org/apache/zookeeper/graph/resources/g.line.js + zookeeper-contrib/zookeeper-contrib-loggraph/src/main/resources/webapp/org/apache/zookeeper/graph/resources/g.pie.js + zookeeper-contrib/zookeeper-contrib-loggraph/src/main/resources/webapp/org/apache/zookeeper/graph/resources/g.raphael.js + zookeeper-contrib/zookeeper-contrib-loggraph/src/main/resources/webapp/org/apache/zookeeper/graph/resources/raphael.js +Copyright: 2009 Dmitry Baranovskiy (http://g.raphaeljs.com) +License: Expat + +Files: zookeeper-contrib/zookeeper-contrib-loggraph/src/main/resources/webapp/org/apache/zookeeper/graph/resources/yui-min.js +Copyright: 2010 Yahoo! Inc. +License: BSD-3-Clause + +Files: zookeeper-contrib/zookeeper-contrib-zkperl/* +Copyright: 2009 The Apache Software Foundation +License: Apache-2.0 + +Files: zookeeper-contrib/zookeeper-contrib-zooinspector/src/main/java/com/nitido/utils/toaster/Toaster.java +Copyright: Daniele Piras ("danielepiras80", no email known) +License: Apache-2.0 + +Files: zookeeper-docs/* +Copyright: 2002-2022 The Apache Software Foundation +License: Apache-2.0 + +Files: zookeeper-docs/src/main/resources/markdown/skin/prototype.js +Copyright: 2005-2010 Sam Stephenson +License: Expat + +Files: debian/* +Copyright: 2010 Thomas Koch , + 2011 Canonical Ltd (http://www.canonical.com) + 2015-2019 tony mancill + 2022 Pierre Gruet +License: Apache-2.0 + +Files: debian/patches/01-add-jtoaster-to-zooinspector.patch +Copyright: Daniele Piras ("danielepiras80", no email) +License: Apache-2.0 + +Files: debian/bin/zkPurgeTxnLog.sh +Copyright: 2004 Sam Hocevar +License: WTFPL-2 + +License: Apache-2.0 + On Debian systems the full text of the Apache-2.0 license can be found in + /usr/share/common-licenses/Apache-2.0. + +License: FSFUL + This configure script is free software; the Free Software Foundation gives + unlimited permission to copy, distribute and modify it. + +License: GPL-3+ + On Debian systems the full text of the GPL-3 can be found in + /usr/share/common-licenses/GPL-3 + +License: BSD-2-Clause + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + . + Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + . + Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + . + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + OF THE POSSIBILITY OF SUCH DAMAGE. + +License: ISC + Permission to use, copy, modify, and distribute this software for any + purpose with or without fee is hereby granted, provided that the above + copyright notice and this permission notice appear in all copies. + . + THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM + DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL + INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, + INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING + FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, + NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION + WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +License: BSD-3-Clause + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + . + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + . + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + . + * Neither the name of the original author; nor the names of any contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + . + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +License: Expat + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + . + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + . + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + IN THE SOFTWARE. + +License: WTFPL-2 + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + Version 2, December 2004 + . + Everyone is permitted to copy and distribute verbatim or modified + copies of this license document, and changing it is allowed as long + as the name is changed. + . + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + . + 0. You just DO WHAT THE FUCK YOU WANT TO. diff --git a/debian/rules b/debian/rules new file mode 100755 index 000000000..158e6cd94 --- /dev/null +++ b/debian/rules @@ -0,0 +1,31 @@ +#!/usr/bin/make -f + +export LC_ALL=C.UTF-8 +export JAVA_HOME=/usr/lib/jvm/default-java + +# Where Maven "assembles" the build output +ASSM_DIR = zookeeper-assembly/target/zookeeper-3.8.3/zookeeper-3.8.3 + +# Folder which gets packed up for Debian +PACK_DIR = debian/zookeeper/opt/zookeeper-3.8.3 + +%: + dh $@ + +clean: + mvn clean -Pfull-build + +binary: + +install: + mvn package -DskipTests + install -d $(PACK_DIR)/bin + install -d $(PACK_DIR)/conf + install -d $(PACK_DIR)/lib + install -d $(PACK_DIR)/libexec + install -d $(PACK_DIR)/sbin + install -m 755 $(ASSM_DIR)/bin/zkCli.sh $(PACK_DIR)/bin/ + install -m 755 $(ASSM_DIR)/bin/zkServer.sh $(PACK_DIR)/sbin/ + install -m 755 $(ASSM_DIR)/bin/zkEnv.sh $(PACK_DIR)/libexec/ + install -m 644 -t $(PACK_DIR)/conf $(ASSM_DIR)/conf/* + install -m 644 -t $(PACK_DIR)/lib $(ASSM_DIR)/lib/*.jar diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 000000000..163aaf8d8 --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/zookeeper-assembly/pom.xml b/zookeeper-assembly/pom.xml index cabf9f661..593193593 100755 --- a/zookeeper-assembly/pom.xml +++ b/zookeeper-assembly/pom.xml @@ -129,7 +129,7 @@ ${project.basedir}/src/main/assembly/bin-package.xml - apache-zookeeper-${project.version}-bin + zookeeper-${project.version} false posix diff --git a/zookeeper-assembly/src/main/assembly/bin-package.xml b/zookeeper-assembly/src/main/assembly/bin-package.xml index 1fa81d0bb..a3268d4c4 100644 --- a/zookeeper-assembly/src/main/assembly/bin-package.xml +++ b/zookeeper-assembly/src/main/assembly/bin-package.xml @@ -22,7 +22,7 @@ --> bin-package - tar.gz + dir true @@ -48,37 +48,4 @@ - - - - ${project.basedir}/../zookeeper-docs/target/html - docs - ${rw.file.permission} - ${rwx.file.permission} - - - - ${project.basedir}/../zookeeper-jute/target/apidocs - docs/apidocs/zookeeper-jute - ${rw.file.permission} - ${rwx.file.permission} - - - - ${project.basedir}/../zookeeper-server/target/apidocs - docs/apidocs/zookeeper-server - ${rw.file.permission} - ${rwx.file.permission} - - - - ${project.basedir}/../zookeeper-server/src/main/resources/lib - - *.txt - - lib - ${rw.file.permission} - - - diff --git a/zookeeper-assembly/src/main/assembly/components.xml b/zookeeper-assembly/src/main/assembly/components.xml index e0df12bec..c934673e4 100644 --- a/zookeeper-assembly/src/main/assembly/components.xml +++ b/zookeeper-assembly/src/main/assembly/components.xml @@ -22,17 +22,6 @@ - - ${project.basedir}/.. - . - - NOTICE.txt - LICENSE.txt - README.md - README_packaging.md - - ${rw.file.permission} - ${project.basedir}/../conf conf @@ -41,6 +30,10 @@ ${project.basedir}/../bin + + *.txt + *.cmd + bin ${rwx.file.permission} ${rwx.file.permission} diff --git a/zookeeper-server/src/main/java/org/apache/zookeeper/server/admin/AdminServerFactory.java b/zookeeper-server/src/main/java/org/apache/zookeeper/server/admin/AdminServerFactory.java index 555f5e427..ced3050ce 100644 --- a/zookeeper-server/src/main/java/org/apache/zookeeper/server/admin/AdminServerFactory.java +++ b/zookeeper-server/src/main/java/org/apache/zookeeper/server/admin/AdminServerFactory.java @@ -38,7 +38,7 @@ public class AdminServerFactory { * to pull in Jetty with ZooKeeper. */ public static AdminServer createAdminServer() { - if (!"false".equals(System.getProperty("zookeeper.admin.enableServer"))) { + if (!"false".equals(System.getProperty("zookeeper.admin.enableServer", "false"))) { try { Class jettyAdminServerC = Class.forName("org.apache.zookeeper.server.admin.JettyAdminServer"); Object adminServer = jettyAdminServerC.getConstructor().newInstance();