From 176a1efc94ef9ad4d92b4e836fa1f4d45891c30e Mon Sep 17 00:00:00 2001 From: Robert Cardell Date: Mon, 20 Nov 2023 16:57:06 +0000 Subject: [PATCH] Zookeeper 3.8.3-bw1 Squashed commit of the following: commit f75afa378348bc651c26ddd724f997a592b54cc4 Author: Robert Cardell Date: Mon Nov 20 16:54:06 2023 +0000 Change "bwbuild" to "bw" in the version number - it's a patch level, not a build number commit fa02b717e4b28ed37bc0e03f210da263064a8e72 Author: Robert Cardell Date: Fri Nov 17 18:34:37 2023 +0000 This is ready to be called an initial build now commit 3343c16358e72981c3fd84e5d994b2e557237153 Author: Robert Cardell Date: Fri Nov 17 18:34:20 2023 +0000 Brace expansion doesn't work in Makefiles... commit c674d93cc090e41bd5e450d35edf4164008a2dae Author: Robert Cardell Date: Fri Nov 17 15:12:28 2023 +0000 Second try at turning off the HTTP admin server by default commit f702baf97aa8d9d7c4b27892ab7021fe427c8da8 Author: Robert Cardell Date: Fri Nov 17 15:11:07 2023 +0000 Revert "Turn off the HTTP admin server by default, as it will likely conflict" This reverts commit 45c56898bd206069c9b5f4fd079fe1664dabbc7f. commit dfea84d25cf48f83ffda6ef78ff1fc7edccea863 Author: Robert Cardell Date: Fri Nov 17 14:53:29 2023 +0000 Reflect previous practice for shell script locations. Use variables in the rules file for readability commit fd58ebf1b38439204a790c2ed16553fdde82d184 Author: Robert Cardell Date: Fri Nov 17 13:33:56 2023 +0000 Add Debian changelog file commit 2fe7c1c8b5e18ca56981a8c0b5defb9f7e238a74 Author: Robert Cardell Date: Fri Nov 17 13:33:17 2023 +0000 Organise the files during the build commit 8cc618227e9bf7a7f97a85dc0e11cbbbdd44cd67 Author: Robert Cardell Date: Fri Nov 17 13:32:41 2023 +0000 Fix Debian build control file commit 7aa2dda4da99130ca75a53bdd7b7177308785261 Author: Robert Cardell Date: Wed Nov 15 14:15:22 2023 +0000 Add more Debian build metadata commit 45c56898bd206069c9b5f4fd079fe1664dabbc7f Author: Robert Cardell Date: Mon Nov 13 19:18:06 2023 +0000 Turn off the HTTP admin server by default, as it will likely conflict with our Solr setup. commit 47e78010e1e031aa627d90eac4693330c954d274 Author: Robert Cardell Date: Fri Nov 10 16:44:18 2023 +0000 Reflect the /opt installation prefix commit fb12b1964667dba47a273ca1771e2632ec03d594 Author: Robert Cardell Date: Fri Nov 10 16:25:45 2023 +0000 Exclude README.txt and Windows Command scripts from the bin folder commit 2af54e04b02990e983f89ea3a67ce8a68651b240 Author: Robert Cardell Date: Fri Nov 10 16:20:30 2023 +0000 Shorten the output directory name commit 732c79599bdc0747bb90673631252255f200d5d1 Author: Robert Cardell Date: Fri Nov 10 16:11:19 2023 +0000 Don't package up the miscellaneous text files commit 3428c951e7917d52525bc7982bbee6efc83bc0f3 Author: Robert Cardell Date: Fri Nov 10 16:07:14 2023 +0000 Assemble into a directory instead of a tar.gz archive commit 613b9eaf32616bdd4b22540f91377cfe81ca729c Author: Robert Cardell Date: Fri Nov 10 16:06:35 2023 +0000 Don't package up the licence files for the dependencies commit cc9b3ee4fd839f25caca7465e8d8dedd0a14ab94 Author: Robert Cardell Date: Fri Nov 10 16:01:31 2023 +0000 Remove some components from the list of things to be packaged up commit 2f80321386fe14b5f323c205ed2c2974efd06a9d Author: Robert Cardell Date: Fri Nov 10 14:35:05 2023 +0000 Add copyright file from upstream Debian commit 3439a181486540ab85b036f221411ffc5796f0b2 Author: Robert Cardell Date: Fri Nov 10 14:34:04 2023 +0000 Copy rules file from Debian upstream commit 6de1d4c953c5ab2efa907b697a30fdca1f88d796 Author: Robert Cardell Date: Fri Nov 10 14:13:40 2023 +0000 Logback support is now upstream --- README.md | 2 +- bin/zkEnv.sh | 6 +- debian/changelog | 5 + debian/control | 21 ++ debian/copyright | 193 ++++++++++++++++++ debian/rules | 31 +++ debian/source/format | 1 + zookeeper-assembly/pom.xml | 2 +- .../src/main/assembly/bin-package.xml | 35 +--- .../src/main/assembly/components.xml | 15 +- .../server/admin/AdminServerFactory.java | 2 +- 11 files changed, 262 insertions(+), 51 deletions(-) create mode 100644 debian/changelog create mode 100644 debian/control create mode 100644 debian/copyright create mode 100755 debian/rules create mode 100644 debian/source/format 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();