diff --git a/.gitignore b/.gitignore index 386bb8e4d..65c770dcf 100644 --- a/.gitignore +++ b/.gitignore @@ -10,12 +10,11 @@ core !**/keydb-sentinel.service.d *.log dump.rdb -src/keydb-server -**/bin/keydb-server -**/app/keydb-server +src/keydb-pro-server +**/bin/keydb-pro-server +**/app/keydb-pro-server *.deb *.rpm -keydb-pro-server src/keydb-cli **/bin/keydb-cli **/app/keydb-cli @@ -33,7 +32,6 @@ keydb-check-dump redis-cli redis-sentinel redis-server -keydb-pro-server doc-tools release misc/* diff --git a/pkg/deb/README.md b/pkg/deb/README.md index 32f39762f..bbd41ca54 100644 --- a/pkg/deb/README.md +++ b/pkg/deb/README.md @@ -1,18 +1,14 @@ ### KeyDB DEB Package Source Builds -This directory contains scripts and components needed to generate debian packages on different distributions/architectures from source +This directory contains scripts and components needed to generate debian packages on different distributions/architectures using source -The 'debian' directory contains debian source code for bionic, buster and later distributions as it uses functions only available with debhelper11+. 'debian_dh9' is used for xenial, stretch and earlier distributions using debhelper9. - -You will need to install pbuilder `sudo apt install pbuilder` along with other distribution specific dependancies +You will need to install pbuilder `sudo apt install pbuilder` Generate deb packages with the following script command run from this directory: - ``` $ ./deb-buildsource.sh ``` - -This generates a directory structure, .dsc file, original.tar.gz, and new changelog for the distribution and architecture installed. +This generates a directory structure, .dsc file, original.tar.gz, .changes files and new changelog for the distribution and architecture installed. When complete the produced debian packages will be located in deb_files_generated directory. diff --git a/pkg/deb/deb-buildsource.sh b/pkg/deb/deb-buildsource.sh index c2884ad43..d51c179fb 100755 --- a/pkg/deb/deb-buildsource.sh +++ b/pkg/deb/deb-buildsource.sh @@ -19,12 +19,12 @@ elif [ "$distributor" == "Ubuntu" ]; then fi codename=$(lsb_release --codename --short) date=$(date +%a," "%d" "%b" "%Y" "%T) -pkg_name=keydb-$majorv:$version$distname +pkg_name=keydb-pro-$majorv:$version$distname # create build tree cd ../../../ -tar -czvf keydb_$version.orig.tar.gz --force-local KeyDB -cd KeyDB/pkg/deb/ +tar -czvf keydb-pro_$version.orig.tar.gz --force-local KeyDB-Pro +cd KeyDB-Pro/pkg/deb/ mkdir -p $pkg_name/tmp if [[ "$codename" == "xenial" ]] || [[ "$codename" == "stretch" ]]; then cp -r debian_dh9 $pkg_name/tmp/debian @@ -32,9 +32,9 @@ else cp -r debian $pkg_name/tmp fi cp master_changelog $pkg_name/tmp/debian/changelog -mv ../../../keydb_$version.orig.tar.gz ./$pkg_name +mv ../../../keydb-pro_$version.orig.tar.gz ./$pkg_name cd $pkg_name/tmp -changelog_str="keydb ($majorv:$version-$build$distname) $codename; urgency=medium\n\n * $version $changelog_comments \n\n -- Ben Schermel $date +0000\n\n" +changelog_str="keydb-pro ($majorv:$version-$build$distname) $codename; urgency=medium\n\n * $version $changelog_comments \n\n -- Ben Schermel $date +0000\n\n" if [ $# -eq 0 ]; then sed -i "1s/^/$changelog_str\n/" debian/changelog elif [ $# -eq 1 ] && [ "$1" != "None" ]; then @@ -53,8 +53,9 @@ if [ "$codename" == "xenial" ]; then else sudo pbuilder create --distribution $codename fi + sudo pbuilder --update -sudo pbuilder --build *.dsc +sudo pbuilder --build *.dsc --logfile /mnt/pbuilderlog.log # move new packages to deb_files_generated and clean up cp /var/cache/pbuilder/result/*$version*.deb ../deb_files_generated diff --git a/pkg/deb/debian/bin/generate-systemd-service-files b/pkg/deb/debian/bin/generate-systemd-service-files index 14e23d50a..9ee38792e 100755 --- a/pkg/deb/debian/bin/generate-systemd-service-files +++ b/pkg/deb/debian/bin/generate-systemd-service-files @@ -9,7 +9,6 @@ else SYSTEMD_EXTRA=$(cat < @@ -16,17 +16,22 @@ Build-Depends: autotools-dev , autoconf , libjemalloc-dev , - libssl-dev + libssl-dev , + libsnappy-dev , + zlib1g-dev , + libbz2-dev , + liblz4-dev , + libzstd-dev Standards-Version: 4.2.1 Homepage: https://docs.keydb.dev/ -Vcs-Git: https://github.com/JohnSully/KeyDB.git -Vcs-Browser: https://github.com/JohnSully/KeyDB +Vcs-Git: https://github.com/JohnSully/KeyDB-Pro.git +Vcs-Browser: https://github.com/JohnSully/KeyDB-Pro -Package: keydb +Package: keydb-pro Architecture: all Depends: - keydb-server (<< ${binary:Version}.1~), - keydb-server (>= ${binary:Version}), + keydb-pro-server (<< ${binary:Version}.1~), + keydb-pro-server (>= ${binary:Version}), ${misc:Depends}, Description: Persistent key-value database with network interface (metapackage) keydb is a key-value database in a similar vein to memcache but the dataset @@ -37,11 +42,11 @@ Description: Persistent key-value database with network interface (metapackage) . This package depends on the keydb-server package. -Package: keydb-sentinel +Package: keydb-pro-sentinel Architecture: any Depends: lsb-base (>= 3.2-14), - keydb-tools (= ${binary:Version}), + keydb-pro-tools (= ${binary:Version}), ${misc:Depends}, Description: Persistent key-value database with network interface (monitoring) keydb is a key-value database in a similar vein to memcache but the dataset @@ -50,11 +55,11 @@ Description: Persistent key-value database with network interface (monitoring) . This package contains the keydb Sentinel monitoring software. -Package: keydb-server +Package: keydb-pro-server Architecture: any Depends: lsb-base (>= 3.2-14), - keydb-tools (= ${binary:Version}), + keydb-pro-tools (= ${binary:Version}), ${misc:Depends}, Description: Persistent key-value database with network interface keydb is a key-value database in a similar vein to memcache but the dataset @@ -63,7 +68,7 @@ Description: Persistent key-value database with network interface . The dataset is stored entirely in memory and periodically flushed to disk. -Package: keydb-tools +Package: keydb-pro-tools Architecture: any Depends: adduser, diff --git a/pkg/deb/debian/keydb-sentinel.1 b/pkg/deb/debian/keydb-pro-sentinel.1 similarity index 100% rename from pkg/deb/debian/keydb-sentinel.1 rename to pkg/deb/debian/keydb-pro-sentinel.1 diff --git a/pkg/deb/debian/keydb-pro-sentinel.install b/pkg/deb/debian/keydb-pro-sentinel.install new file mode 100644 index 000000000..997fa888e --- /dev/null +++ b/pkg/deb/debian/keydb-pro-sentinel.install @@ -0,0 +1 @@ +pkg/deb/conf/sentinel.conf /etc/keydb diff --git a/pkg/deb/debian/keydb-sentinel.logrotate b/pkg/deb/debian/keydb-pro-sentinel.logrotate similarity index 100% rename from pkg/deb/debian/keydb-sentinel.logrotate rename to pkg/deb/debian/keydb-pro-sentinel.logrotate diff --git a/pkg/deb/debian/keydb-pro-sentinel.manpages b/pkg/deb/debian/keydb-pro-sentinel.manpages new file mode 100644 index 000000000..08ce51ff5 --- /dev/null +++ b/pkg/deb/debian/keydb-pro-sentinel.manpages @@ -0,0 +1 @@ +debian/keydb-pro-sentinel.1 diff --git a/pkg/deb/debian/keydb-sentinel.postinst b/pkg/deb/debian/keydb-pro-sentinel.postinst similarity index 100% rename from pkg/deb/debian/keydb-sentinel.postinst rename to pkg/deb/debian/keydb-pro-sentinel.postinst diff --git a/pkg/deb/debian/keydb-sentinel.postrm b/pkg/deb/debian/keydb-pro-sentinel.postrm similarity index 100% rename from pkg/deb/debian/keydb-sentinel.postrm rename to pkg/deb/debian/keydb-pro-sentinel.postrm diff --git a/pkg/deb/debian/keydb-server.1 b/pkg/deb/debian/keydb-pro-server.1 similarity index 100% rename from pkg/deb/debian/keydb-server.1 rename to pkg/deb/debian/keydb-pro-server.1 diff --git a/pkg/deb/debian/keydb-server.docs b/pkg/deb/debian/keydb-pro-server.docs similarity index 100% rename from pkg/deb/debian/keydb-server.docs rename to pkg/deb/debian/keydb-pro-server.docs diff --git a/pkg/deb/debian/keydb-pro-server.install b/pkg/deb/debian/keydb-pro-server.install new file mode 100644 index 000000000..73e7d1240 --- /dev/null +++ b/pkg/deb/debian/keydb-pro-server.install @@ -0,0 +1 @@ +pkg/deb/conf/keydb.conf /etc/keydb diff --git a/pkg/deb/debian/keydb-server.logrotate b/pkg/deb/debian/keydb-pro-server.logrotate similarity index 100% rename from pkg/deb/debian/keydb-server.logrotate rename to pkg/deb/debian/keydb-pro-server.logrotate diff --git a/pkg/deb/debian/keydb-pro-server.manpages b/pkg/deb/debian/keydb-pro-server.manpages new file mode 100644 index 000000000..06ff67ee3 --- /dev/null +++ b/pkg/deb/debian/keydb-pro-server.manpages @@ -0,0 +1 @@ +debian/keydb-pro-server.1 diff --git a/pkg/deb/debian/keydb-server.postinst b/pkg/deb/debian/keydb-pro-server.postinst similarity index 100% rename from pkg/deb/debian/keydb-server.postinst rename to pkg/deb/debian/keydb-pro-server.postinst diff --git a/pkg/deb/debian/keydb-server.postrm b/pkg/deb/debian/keydb-pro-server.postrm similarity index 100% rename from pkg/deb/debian/keydb-server.postrm rename to pkg/deb/debian/keydb-pro-server.postrm diff --git a/pkg/deb/debian/keydb-tools.examples b/pkg/deb/debian/keydb-pro-tools.examples similarity index 100% rename from pkg/deb/debian/keydb-tools.examples rename to pkg/deb/debian/keydb-pro-tools.examples diff --git a/pkg/deb/debian_dh9/keydb-tools.install b/pkg/deb/debian/keydb-pro-tools.install similarity index 87% rename from pkg/deb/debian_dh9/keydb-tools.install rename to pkg/deb/debian/keydb-pro-tools.install index 80ffefe07..346ad4597 100644 --- a/pkg/deb/debian_dh9/keydb-tools.install +++ b/pkg/deb/debian/keydb-pro-tools.install @@ -1,7 +1,7 @@ debian/bash_completion.d/* /usr/share/bash-completion/completions -src/keydb-server /usr/bin src/keydb-benchmark /usr/bin src/keydb-check-aof /usr/bin src/keydb-check-rdb /usr/bin src/keydb-cli /usr/bin +src/keydb-pro-server /usr/bin src/keydb-sentinel /usr/bin diff --git a/pkg/deb/debian/keydb-tools.manpages b/pkg/deb/debian/keydb-pro-tools.manpages similarity index 100% rename from pkg/deb/debian/keydb-tools.manpages rename to pkg/deb/debian/keydb-pro-tools.manpages diff --git a/pkg/deb/debian/keydb-tools.postinst b/pkg/deb/debian/keydb-pro-tools.postinst similarity index 100% rename from pkg/deb/debian/keydb-tools.postinst rename to pkg/deb/debian/keydb-pro-tools.postinst diff --git a/pkg/deb/debian/keydb-tools.postrm b/pkg/deb/debian/keydb-pro-tools.postrm similarity index 100% rename from pkg/deb/debian/keydb-tools.postrm rename to pkg/deb/debian/keydb-pro-tools.postrm diff --git a/pkg/deb/debian/keydb-sentinel.manpages b/pkg/deb/debian/keydb-sentinel.manpages deleted file mode 100644 index 1b3d9d4a1..000000000 --- a/pkg/deb/debian/keydb-sentinel.manpages +++ /dev/null @@ -1 +0,0 @@ -debian/keydb-sentinel.1 diff --git a/pkg/deb/debian/keydb-server.manpages b/pkg/deb/debian/keydb-server.manpages deleted file mode 100644 index 3935e22fd..000000000 --- a/pkg/deb/debian/keydb-server.manpages +++ /dev/null @@ -1 +0,0 @@ -debian/keydb-server.1 diff --git a/pkg/deb/debian/rules b/pkg/deb/debian/rules index a039b220f..8fff6268c 100755 --- a/pkg/deb/debian/rules +++ b/pkg/deb/debian/rules @@ -18,7 +18,8 @@ endif override_dh_auto_install: debian/bin/generate-systemd-service-files - dh_installsystemd --restart-after-upgrade + dh_installsystemd --name keydb-server --restart-after-upgrade + dh_installsystemd --name keydb-sentinel --restart-after-upgrade override_dh_auto_test: ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) diff --git a/pkg/deb/debian_dh9/bin/generate-systemd-service-files b/pkg/deb/debian_dh9/bin/generate-systemd-service-files index 59031d99f..738e2f542 100755 --- a/pkg/deb/debian_dh9/bin/generate-systemd-service-files +++ b/pkg/deb/debian_dh9/bin/generate-systemd-service-files @@ -9,7 +9,6 @@ else SYSTEMD_EXTRA=$(cat < Mon, 09 Oct 2017 22:17:24 +0100 EOF fi @@ -91,7 +92,7 @@ Documentation=https://docs.keydb.dev, man:${BINARY}(1) [Service] Type=forking -ExecStart=/usr/bin/${BINARY} /etc/keydb/${NAMESPACED}.conf +ExecStart=/usr/bin/${BINARY_NAME} /etc/keydb/${NAMESPACED}.conf ExecStop=/bin/kill -s TERM \$MAINPID PIDFile=/var/run/${NAMESPACED}/${BINARY}.pid TimeoutStopSec=0 diff --git a/pkg/deb/debian_dh9/control b/pkg/deb/debian_dh9/control index 077d493bc..f847ad345 100644 --- a/pkg/deb/debian_dh9/control +++ b/pkg/deb/debian_dh9/control @@ -1,4 +1,4 @@ -Source: keydb +Source: keydb-pro Section: database Priority: optional Maintainer: Ben Schermel @@ -6,6 +6,11 @@ Build-Depends: debhelper (>= 9~), dpkg-dev (>= 1.17.5), systemd, +# libhiredis-dev (>= 0.14.0), +# libjemalloc-dev [linux-any], +# liblua5.1-dev, +# lua-bitop-dev, +# lua-cjson-dev, procps , build-essential , tcl , @@ -16,17 +21,22 @@ Build-Depends: autotools-dev , autoconf , libjemalloc-dev , - libssl-dev + libssl-dev , + libsnappy-dev , + zlib1g-dev , + libbz2-dev , + liblz4-dev , + libzstd-dev Standards-Version: 4.2.1 Homepage: https://docs.keydb.dev/ -Vcs-Git: https://github.com/JohnSully/KeyDB.git -Vcs-Browser: https://github.com/JohnSully/KeyDB +Vcs-Git: https://github.com/JohnSully/KeyDB-Pro.git +Vcs-Browser: https://github.com/JohnSully/KeyDB-Pro -Package: keydb +Package: keydb-pro Architecture: all Depends: - keydb-server (<< ${binary:Version}.1~), - keydb-server (>= ${binary:Version}), + keydb-pro-server (<< ${binary:Version}.1~), + keydb-pro-server (>= ${binary:Version}), ${misc:Depends}, Description: Persistent key-value database with network interface (metapackage) keydb is a key-value database in a similar vein to memcache but the dataset @@ -37,11 +47,11 @@ Description: Persistent key-value database with network interface (metapackage) . This package depends on the keydb-server package. -Package: keydb-sentinel +Package: keydb-pro-sentinel Architecture: any Depends: lsb-base (>= 3.2-14), - keydb-tools (= ${binary:Version}), + keydb-pro-tools (= ${binary:Version}), ${misc:Depends}, Description: Persistent key-value database with network interface (monitoring) keydb is a key-value database in a similar vein to memcache but the dataset @@ -50,11 +60,11 @@ Description: Persistent key-value database with network interface (monitoring) . This package contains the keydb Sentinel monitoring software. -Package: keydb-server +Package: keydb-pro-server Architecture: any Depends: lsb-base (>= 3.2-14), - keydb-tools (= ${binary:Version}), + keydb-pro-tools (= ${binary:Version}), ${misc:Depends}, Description: Persistent key-value database with network interface keydb is a key-value database in a similar vein to memcache but the dataset @@ -63,7 +73,7 @@ Description: Persistent key-value database with network interface . The dataset is stored entirely in memory and periodically flushed to disk. -Package: keydb-tools +Package: keydb-pro-tools Architecture: any Depends: adduser, diff --git a/pkg/deb/debian_dh9/copyright b/pkg/deb/debian_dh9/copyright index 59975672f..c7e2428e7 100644 --- a/pkg/deb/debian_dh9/copyright +++ b/pkg/deb/debian_dh9/copyright @@ -1,86 +1,13 @@ Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Contact: John Sully -Upstream-Name: keydb -Source: https://github.com/JohnSully/KeyDB +Upstream-Name: keydb-pro +Source: https://github.com/JohnSully/KeyDB-Pro Files: * Copyright: © 2006-2014 Salvatore Sanfilippo Copyright © 2019, John Sully -License: BSD-3-clause +License: Proprietary -Files: - src/rio.* - src/t_zset.c - src/ziplist.h - src/intset.* - src/redis-check-aof.c - deps/hiredis/* - deps/linenoise/* -Copyright: - © 2009-2012 Pieter Noordhuis - © 2009-2012 Salvatore Sanfilippo -License: BSD-3-clause - -Files: - src/lzf.h - src/lzfP.h - src/lzf_d.c - src/lzf_c.c -Copyright: - © 2000-2007 Marc Alexander Lehmann - © 2009-2012 Salvatore Sanfilippo -License: BSD-2-clause - -Files: src/setproctitle.c -Copyright: - © 2010 William Ahern - © 2013 Salvatore Sanfilippo - © 2013 Stam He -License: BSD-3-clause - -Files: src/ae_evport.c -Copyright: © 2012 Joyent, Inc. -License: BSD-3-clause - -Files: src/ae_kqueue.c -Copyright: © 2009 Harish Mallipeddi -License: BSD-3-clause - -Files: utils/install_server.sh -Copyright: © 2011 Dvir Volk -License: BSD-3-clause - -Files: deps/jemalloc/* -Copyright: - © 2002-2012 Jason Evans - © 2007-2012 Mozilla Foundation - © 2009-2012 Facebook, Inc. -License: BSD-3-clause - -Files: src/pqsort.* -Copyright: © 1992-1993 The Regents of the University of California -License: BSD-3-clause - -Files: deps/lua/* -Copyright: © 1994-2012 Lua.org, PUC-Ri -License: MIT - 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. Files: debian/* Copyright: © 2009 Chris Lamb diff --git a/pkg/deb/debian_dh9/files b/pkg/deb/debian_dh9/files index 0c2ad5610..4fa490963 100644 --- a/pkg/deb/debian_dh9/files +++ b/pkg/deb/debian_dh9/files @@ -1 +1 @@ -keydb_5.3.3-1~bionic1_source.buildinfo database optional +keydb-pro_5.3.3-1~bionic1_source.buildinfo database optional diff --git a/pkg/deb/debian_dh9/keydb-benchmark.1 b/pkg/deb/debian_dh9/keydb-benchmark.1 index ce9f119b4..07a659177 100644 --- a/pkg/deb/debian_dh9/keydb-benchmark.1 +++ b/pkg/deb/debian_dh9/keydb-benchmark.1 @@ -1,6 +1,6 @@ .TH KEYDB-BENCHMARK 1 "August 17, 2019" .SH NAME -keydb-benchmark \- Benechmark a KeyDB instance +keydb-benchmark \- Benchmark a KeyDB instance .SH SYNOPSIS .B redis-benchmark [\-h ] [\-p ] [\-c ] [\-n [\-k ] diff --git a/pkg/deb/debian_dh9/keydb-sentinel.1 b/pkg/deb/debian_dh9/keydb-pro-sentinel.1 similarity index 100% rename from pkg/deb/debian_dh9/keydb-sentinel.1 rename to pkg/deb/debian_dh9/keydb-pro-sentinel.1 diff --git a/pkg/deb/debian/keydb-sentinel.install b/pkg/deb/debian_dh9/keydb-pro-sentinel.install similarity index 100% rename from pkg/deb/debian/keydb-sentinel.install rename to pkg/deb/debian_dh9/keydb-pro-sentinel.install diff --git a/pkg/deb/debian_dh9/keydb-sentinel.logrotate b/pkg/deb/debian_dh9/keydb-pro-sentinel.logrotate similarity index 100% rename from pkg/deb/debian_dh9/keydb-sentinel.logrotate rename to pkg/deb/debian_dh9/keydb-pro-sentinel.logrotate diff --git a/pkg/deb/debian_dh9/keydb-sentinel.maintscript b/pkg/deb/debian_dh9/keydb-pro-sentinel.maintscript similarity index 100% rename from pkg/deb/debian_dh9/keydb-sentinel.maintscript rename to pkg/deb/debian_dh9/keydb-pro-sentinel.maintscript diff --git a/pkg/deb/debian_dh9/keydb-pro-sentinel.manpages b/pkg/deb/debian_dh9/keydb-pro-sentinel.manpages new file mode 100644 index 000000000..08ce51ff5 --- /dev/null +++ b/pkg/deb/debian_dh9/keydb-pro-sentinel.manpages @@ -0,0 +1 @@ +debian/keydb-pro-sentinel.1 diff --git a/pkg/deb/debian_dh9/keydb-sentinel.postinst b/pkg/deb/debian_dh9/keydb-pro-sentinel.postinst similarity index 93% rename from pkg/deb/debian_dh9/keydb-sentinel.postinst rename to pkg/deb/debian_dh9/keydb-pro-sentinel.postinst index 0c856c5c5..787464165 100644 --- a/pkg/deb/debian_dh9/keydb-sentinel.postinst +++ b/pkg/deb/debian_dh9/keydb-pro-sentinel.postinst @@ -21,4 +21,6 @@ then find /etc/keydb -maxdepth 1 -type d -name 'keydb-sentinel.*.d' -empty -delete fi +systemctl daemon-reload + exit 0 diff --git a/pkg/deb/debian_dh9/keydb-sentinel.postrm b/pkg/deb/debian_dh9/keydb-pro-sentinel.postrm similarity index 86% rename from pkg/deb/debian_dh9/keydb-sentinel.postrm rename to pkg/deb/debian_dh9/keydb-pro-sentinel.postrm index 2e9f62888..2ce8771df 100644 --- a/pkg/deb/debian_dh9/keydb-sentinel.postrm +++ b/pkg/deb/debian_dh9/keydb-pro-sentinel.postrm @@ -11,4 +11,6 @@ fi #DEBHELPER# +systemctl daemon-reload + exit 0 diff --git a/pkg/deb/debian_dh9/keydb-pro-sentinel.prerm b/pkg/deb/debian_dh9/keydb-pro-sentinel.prerm new file mode 100644 index 000000000..cbe143203 --- /dev/null +++ b/pkg/deb/debian_dh9/keydb-pro-sentinel.prerm @@ -0,0 +1,12 @@ +#!/bin/sh +set -e +# Automatically added by dh_installinit/11.1.6ubuntu1 +if [ -x "/etc/init.d/keydb-sentinel" ]; then + invoke-rc.d keydb-sentinel stop || exit 1 +fi +# End automatically added section +# Automatically added by dh_installsystemd/11.1.6ubuntu1 +if [ -d /run/systemd/system ] && [ "$1" = remove ]; then + deb-systemd-invoke stop 'keydb-sentinel.service' >/dev/null || true +fi +# End automatically added section diff --git a/pkg/deb/debian_dh9/keydb-server.1 b/pkg/deb/debian_dh9/keydb-pro-server.1 similarity index 100% rename from pkg/deb/debian_dh9/keydb-server.1 rename to pkg/deb/debian_dh9/keydb-pro-server.1 diff --git a/pkg/deb/debian_dh9/keydb-server.docs b/pkg/deb/debian_dh9/keydb-pro-server.docs similarity index 100% rename from pkg/deb/debian_dh9/keydb-server.docs rename to pkg/deb/debian_dh9/keydb-pro-server.docs diff --git a/pkg/deb/debian/keydb-server.install b/pkg/deb/debian_dh9/keydb-pro-server.install similarity index 100% rename from pkg/deb/debian/keydb-server.install rename to pkg/deb/debian_dh9/keydb-pro-server.install diff --git a/pkg/deb/debian_dh9/keydb-server.logrotate b/pkg/deb/debian_dh9/keydb-pro-server.logrotate similarity index 100% rename from pkg/deb/debian_dh9/keydb-server.logrotate rename to pkg/deb/debian_dh9/keydb-pro-server.logrotate diff --git a/pkg/deb/debian_dh9/keydb-server.maintscript b/pkg/deb/debian_dh9/keydb-pro-server.maintscript similarity index 100% rename from pkg/deb/debian_dh9/keydb-server.maintscript rename to pkg/deb/debian_dh9/keydb-pro-server.maintscript diff --git a/pkg/deb/debian_dh9/keydb-pro-server.manpages b/pkg/deb/debian_dh9/keydb-pro-server.manpages new file mode 100644 index 000000000..06ff67ee3 --- /dev/null +++ b/pkg/deb/debian_dh9/keydb-pro-server.manpages @@ -0,0 +1 @@ +debian/keydb-pro-server.1 diff --git a/pkg/deb/debian_dh9/keydb-server.postinst b/pkg/deb/debian_dh9/keydb-pro-server.postinst similarity index 93% rename from pkg/deb/debian_dh9/keydb-server.postinst rename to pkg/deb/debian_dh9/keydb-pro-server.postinst index b53ce4142..9d48ee638 100644 --- a/pkg/deb/debian_dh9/keydb-server.postinst +++ b/pkg/deb/debian_dh9/keydb-pro-server.postinst @@ -21,4 +21,6 @@ then find /etc/keydb -maxdepth 1 -type d -name 'keydb-server.*.d' -empty -delete fi +systemctl daemon-reload + exit 0 diff --git a/pkg/deb/debian_dh9/keydb-server.postrm b/pkg/deb/debian_dh9/keydb-pro-server.postrm similarity index 86% rename from pkg/deb/debian_dh9/keydb-server.postrm rename to pkg/deb/debian_dh9/keydb-pro-server.postrm index 16ef23bd7..cf57953c3 100644 --- a/pkg/deb/debian_dh9/keydb-server.postrm +++ b/pkg/deb/debian_dh9/keydb-pro-server.postrm @@ -11,4 +11,6 @@ fi #DEBHELPER# +systemctl daemon-reload + exit 0 diff --git a/pkg/deb/debian_dh9/keydb-pro-server.prerm b/pkg/deb/debian_dh9/keydb-pro-server.prerm new file mode 100644 index 000000000..3517c7ccb --- /dev/null +++ b/pkg/deb/debian_dh9/keydb-pro-server.prerm @@ -0,0 +1,12 @@ +#!/bin/sh +set -e +# Automatically added by dh_installinit/11.1.6ubuntu1 +if [ -x "/etc/init.d/keydb-server" ]; then + invoke-rc.d keydb-server stop || exit 1 +fi +# End automatically added section +# Automatically added by dh_installsystemd/11.1.6ubuntu1 +if [ -d /run/systemd/system ] && [ "$1" = remove ]; then + deb-systemd-invoke stop 'keydb-server.service' >/dev/null || true +fi +# End automatically added section diff --git a/pkg/deb/debian_dh9/keydb-tools.examples b/pkg/deb/debian_dh9/keydb-pro-tools.examples similarity index 100% rename from pkg/deb/debian_dh9/keydb-tools.examples rename to pkg/deb/debian_dh9/keydb-pro-tools.examples diff --git a/pkg/deb/debian/keydb-tools.install b/pkg/deb/debian_dh9/keydb-pro-tools.install similarity index 87% rename from pkg/deb/debian/keydb-tools.install rename to pkg/deb/debian_dh9/keydb-pro-tools.install index 166faeafd..346ad4597 100644 --- a/pkg/deb/debian/keydb-tools.install +++ b/pkg/deb/debian_dh9/keydb-pro-tools.install @@ -3,5 +3,5 @@ src/keydb-benchmark /usr/bin src/keydb-check-aof /usr/bin src/keydb-check-rdb /usr/bin src/keydb-cli /usr/bin -src/keydb-server /usr/bin +src/keydb-pro-server /usr/bin src/keydb-sentinel /usr/bin diff --git a/pkg/deb/debian_dh9/keydb-tools.manpages b/pkg/deb/debian_dh9/keydb-pro-tools.manpages similarity index 100% rename from pkg/deb/debian_dh9/keydb-tools.manpages rename to pkg/deb/debian_dh9/keydb-pro-tools.manpages diff --git a/pkg/deb/debian_dh9/keydb-tools.postinst b/pkg/deb/debian_dh9/keydb-pro-tools.postinst similarity index 100% rename from pkg/deb/debian_dh9/keydb-tools.postinst rename to pkg/deb/debian_dh9/keydb-pro-tools.postinst diff --git a/pkg/deb/debian_dh9/keydb-tools.postrm b/pkg/deb/debian_dh9/keydb-pro-tools.postrm similarity index 100% rename from pkg/deb/debian_dh9/keydb-tools.postrm rename to pkg/deb/debian_dh9/keydb-pro-tools.postrm diff --git a/pkg/deb/debian_dh9/keydb-sentinel.default b/pkg/deb/debian_dh9/keydb-sentinel.default deleted file mode 100755 index 05a3b73b0..000000000 --- a/pkg/deb/debian_dh9/keydb-sentinel.default +++ /dev/null @@ -1,8 +0,0 @@ -# keydb-sentinel configure options - -# ULIMIT: Call ulimit -n with this argument prior to invoking KeyDB Sentinel -# itself. This may be required for high-concurrency environments. KeyDB -# Sentinel itself cannot alter its limits as it is not being run as root. -# (default: 65536) -# -ULIMIT=65536 diff --git a/pkg/deb/debian_dh9/keydb-sentinel.init b/pkg/deb/debian_dh9/keydb-sentinel.init deleted file mode 100755 index 1ec8b9a95..000000000 --- a/pkg/deb/debian_dh9/keydb-sentinel.init +++ /dev/null @@ -1,89 +0,0 @@ -#! /bin/sh -### BEGIN INIT INFO -# Provides: keydb-sentinel -# Required-Start: $syslog $remote_fs -# Required-Stop: $syslog $remote_fs -# Should-Start: $local_fs -# Should-Stop: $local_fs -# Default-Start: 2 3 4 5 -# Default-Stop: 0 1 6 -# Short-Description: keydb-sentinel - Persistent key-value db monitor -# Description: keydb-sentinel - Persistent key-value db monitor -### END INIT INFO - - -PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin -DAEMON=/usr/bin/keydb-sentinel -DAEMON_ARGS=/etc/keydb/sentinel.conf -NAME=keydb-sentinel -DESC=keydb-sentinel - -RUNDIR=/var/run/sentinel -PIDFILE=$RUNDIR/keydb-sentinel.pid - -test -x $DAEMON || exit 0 - -if [ -r /etc/default/$NAME ] -then - . /etc/default/$NAME -fi - -. /lib/lsb/init-functions - -set -e - -if [ "$(id -u)" != "0" ] -then - log_failure_msg "Must be run as root." - exit 1 -fi - -case "$1" in - start) - echo -n "Starting $DESC: " - mkdir -p $RUNDIR - touch $PIDFILE - chown keydb:keydb $RUNDIR $PIDFILE - chmod 755 $RUNDIR - - if [ -n "$ULIMIT" ] - then - ulimit -n $ULIMIT || true - fi - - if start-stop-daemon --start --quiet --oknodo --umask 007 --pidfile $PIDFILE --chuid keydb:keydb --exec $DAEMON -- $DAEMON_ARGS - then - echo "$NAME." - else - echo "failed" - fi - ;; - stop) - echo -n "Stopping $DESC: " - - if start-stop-daemon --stop --retry forever/TERM/1 --quiet --oknodo --pidfile $PIDFILE --exec $DAEMON - then - echo "$NAME." - else - echo "failed" - fi - rm -f $PIDFILE - sleep 1 - ;; - - restart|force-reload) - ${0} stop - ${0} start - ;; - - status) - status_of_proc -p ${PIDFILE} ${DAEMON} ${NAME} - ;; - - *) - echo "Usage: /etc/init.d/$NAME {start|stop|restart|force-reload|status}" >&2 - exit 1 - ;; -esac - -exit 0 diff --git a/pkg/deb/debian_dh9/keydb-sentinel.install b/pkg/deb/debian_dh9/keydb-sentinel.install deleted file mode 100644 index 600ef543c..000000000 --- a/pkg/deb/debian_dh9/keydb-sentinel.install +++ /dev/null @@ -1,2 +0,0 @@ -debian/keydb-sentinel.service /lib/systemd/system -pkg/deb/conf/sentinel.conf /etc/keydb diff --git a/pkg/deb/debian_dh9/keydb-sentinel.manpages b/pkg/deb/debian_dh9/keydb-sentinel.manpages deleted file mode 100644 index 1b3d9d4a1..000000000 --- a/pkg/deb/debian_dh9/keydb-sentinel.manpages +++ /dev/null @@ -1 +0,0 @@ -debian/keydb-sentinel.1 diff --git a/pkg/deb/debian_dh9/keydb-server.default b/pkg/deb/debian_dh9/keydb-server.default deleted file mode 100755 index 9288682fa..000000000 --- a/pkg/deb/debian_dh9/keydb-server.default +++ /dev/null @@ -1,7 +0,0 @@ -# keydb-server configure options - -# ULIMIT: Call ulimit -n with this argument prior to invoking Redis itself. -# This may be required for high-concurrency environments. KeyDB itself cannot -# alter its limits as it is not being run as root. (default: 65536) -# -ULIMIT=65536 diff --git a/pkg/deb/debian_dh9/keydb-server.init b/pkg/deb/debian_dh9/keydb-server.init deleted file mode 100755 index 4d0de9149..000000000 --- a/pkg/deb/debian_dh9/keydb-server.init +++ /dev/null @@ -1,89 +0,0 @@ -#! /bin/sh -### BEGIN INIT INFO -# Provides: keydb-server -# Required-Start: $syslog $remote_fs -# Required-Stop: $syslog $remote_fs -# Should-Start: $local_fs -# Should-Stop: $local_fs -# Default-Start: 2 3 4 5 -# Default-Stop: 0 1 6 -# Short-Description: keydb-server - Persistent key-value db -# Description: keydb-server - Persistent key-value db -### END INIT INFO - - -PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin -DAEMON=/usr/bin/keydb-server -DAEMON_ARGS=/etc/keydb/keydb.conf -NAME=keydb-server -DESC=keydb-server - -RUNDIR=/var/run/keydb -PIDFILE=$RUNDIR/keydb-server.pid - -test -x $DAEMON || exit 0 - -if [ -r /etc/default/$NAME ] -then - . /etc/default/$NAME -fi - -. /lib/lsb/init-functions - -set -e - -if [ "$(id -u)" != "0" ] -then - log_failure_msg "Must be run as root." - exit 1 -fi - -case "$1" in - start) - echo -n "Starting $DESC: " - mkdir -p $RUNDIR - touch $PIDFILE - chown keydb:keydb $RUNDIR $PIDFILE - chmod 755 $RUNDIR - - if [ -n "$ULIMIT" ] - then - ulimit -n $ULIMIT || true - fi - - if start-stop-daemon --start --quiet --oknodo --umask 007 --pidfile $PIDFILE --chuid keydb:keydb --exec $DAEMON -- $DAEMON_ARGS - then - echo "$NAME." - else - echo "failed" - fi - ;; - stop) - echo -n "Stopping $DESC: " - - if start-stop-daemon --stop --retry forever/TERM/1 --quiet --oknodo --pidfile $PIDFILE --exec $DAEMON - then - echo "$NAME." - else - echo "failed" - fi - rm -f $PIDFILE - sleep 1 - ;; - - restart|force-reload) - ${0} stop - ${0} start - ;; - - status) - status_of_proc -p ${PIDFILE} ${DAEMON} ${NAME} - ;; - - *) - echo "Usage: /etc/init.d/$NAME {start|stop|restart|force-reload|status}" >&2 - exit 1 - ;; -esac - -exit 0 diff --git a/pkg/deb/debian_dh9/keydb-server.install b/pkg/deb/debian_dh9/keydb-server.install deleted file mode 100644 index 1b86989b1..000000000 --- a/pkg/deb/debian_dh9/keydb-server.install +++ /dev/null @@ -1,2 +0,0 @@ -debian/keydb-server.service /lib/systemd/system -pkg/deb/conf/keydb.conf /etc/keydb diff --git a/pkg/deb/debian_dh9/keydb-server.manpages b/pkg/deb/debian_dh9/keydb-server.manpages deleted file mode 100644 index 3935e22fd..000000000 --- a/pkg/deb/debian_dh9/keydb-server.manpages +++ /dev/null @@ -1 +0,0 @@ -debian/keydb-server.1 diff --git a/pkg/deb/debian_dh9/rules b/pkg/deb/debian_dh9/rules index 0a8f0f1c6..e6b364993 100755 --- a/pkg/deb/debian_dh9/rules +++ b/pkg/deb/debian_dh9/rules @@ -32,9 +32,9 @@ override_dh_auto_install: override_dh_auto_test: ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) # Avoid race conditions in upstream testsuite. -# ./runtest --clients 1 || true -# ./runtest-cluster || true -# ./runtest-sentinel || true + ./runtest --clients 1 || true + ./runtest-cluster || true + ./runtest-sentinel || true endif override_dh_auto_clean: diff --git a/pkg/deb/debian_dh9/source/include-binaries b/pkg/deb/debian_dh9/source/include-binaries index ddd5cd4c9..55422f4bb 100644 --- a/pkg/deb/debian_dh9/source/include-binaries +++ b/pkg/deb/debian_dh9/source/include-binaries @@ -1,2 +1,3 @@ -keydb_5.0.6.orig.tar.gz -keydb_5.0.6-1chl1~bionic1.debian.tar.xz +keydb-pro_5.0.6.orig.tar.gz +keydb-pro_5.0.6-1~bionic1.debian.tar.xz + diff --git a/pkg/deb/debian_dh9/source/lintian-overrides b/pkg/deb/debian_dh9/source/lintian-overrides index ca7456a67..44dec9b63 100644 --- a/pkg/deb/debian_dh9/source/lintian-overrides +++ b/pkg/deb/debian_dh9/source/lintian-overrides @@ -1,2 +1,2 @@ # Upstream do not provide signed tarballs. -keydb source: debian-watch-does-not-check-gpg-signature +keydb-pro source: debian-watch-does-not-check-gpg-signature diff --git a/pkg/deb/debian_dh9/source/options b/pkg/deb/debian_dh9/source/options index aa96de89f..3e1f0633c 100644 --- a/pkg/deb/debian_dh9/source/options +++ b/pkg/deb/debian_dh9/source/options @@ -1 +1,2 @@ extend-diff-ignore = "^\.travis\.yml$" + diff --git a/pkg/deb/debian_dh9/watch b/pkg/deb/debian_dh9/watch index bc7d05321..acca0f199 100644 --- a/pkg/deb/debian_dh9/watch +++ b/pkg/deb/debian_dh9/watch @@ -1,3 +1,3 @@ -version=4 +version=6 opts=uversionmangle=s/-?(alpha|beta|rc)/~$1/ \ - https://github.com/JohnSully/KeyDB/releases .*/archive/(.*).tar.gz + https://github.com/JohnSully/KeyDB-Pro/releases .*/archive/(.*).tar.gz diff --git a/pkg/deb/master_changelog b/pkg/deb/master_changelog index f7046ffe1..a0f3c6cd4 100644 --- a/pkg/deb/master_changelog +++ b/pkg/deb/master_changelog @@ -1,49 +1,45 @@ -keydb (6:6.0.9-1distribution_placeholder) codename_placeholder; urgency=medium +keydb-pro (6:6.0.9-1distribution_placeholder) codename_placeholder; urgency=medium - * 6.0.9 Addressing issues 187 - cpu lockup with subkey expire, 190 - missing sentinel binary in keydb-tools. + * 6.0.9 Addressing issues 187 - cpu lockup with subkey expire, 190 - missing sentinel binary in keydb-tools. + * FLASH performance updates, including updating client handling to mitigate SSD overload behavior on heavy writes. + * flash_memory parameter has been added to INFO memory -- Ben Schermel Sun, 07 Jun 2020 18:00:37 +0000 -keydb (6:6.0.8-1distribution_placeholder) codename_placeholder; urgency=medium +keydb-pro (6:6.0.8-1distribution_placeholder) codename_placeholder; urgency=medium * This is our first release to fully support all Redis 6.0.4 features, including but not limited to: TLS Support (fully supports multithreading!), Client side caching, RESP 3 Support - * KeyDB Has also added the following new features: Improved memory efficiency for short strings, Fastlock autotuning, KeyDB.HRENAME (rename a member of a hash)In addition we've spent a lot of time focussing on stability. - * The following bug fixes are resolved: 150 - Deadlock in ReplicationFeedMonitors, 170 - KeyDB dying via SIGABORT, 180 - crash after setting maxclients via cmd line, 169 - Write performance of a master dropped sharply when a slave is added - * In addition untracked issues were resolved: Potential deadlock when entering futex sleep, Pub/Sub Async messages may not be sent in a timely manner when load is low, Excessive logging during failed RREPLAY, KeyDB unresponsive handling clients on different threads during RDB load + * KeyDB Has also added the following new features: Improved memory efficiency for short strings, Fastlock autotuning, KeyDB.HRENAME (rename a member of a hash)In addition we've spent a lot of time focussing on stability. + * The following bug fixes are resolved: #150 - Deadlock in ReplicationFeedMonitors, #170 - KeyDB dying via SIGABORT, #180 - crash after setting maxclients via cmd line, #169 - Write performance of a master dropped sharply when a slave is added + * In addition untracked issues were resolved: Potential deadlock when entering futex sleep, Pub/Sub Async messages may not be sent in a timely manner when load is low, Excessive logging during failed RREPLAY, KeyDB unresponsive handling clients on different threads during RDB load * Updated deb package builds to build from source and phasing out init.d. dh_installsystemd from deb helper 11 used where applicable * Naming conventions are now updated [ keydbpackage_version-build~distribution_architecture] and master changelog included and maintained * keydb-pro-server binary is no longer inluded in the open source package -- Ben Schermel Mon, 1 Jun 2020 8:00:37 +0000 -keydb (5:5.3.3-1distribution_placeholder) codename_placeholder; urgency=medium - - * 5.3.3 Updating deb source package, naming conventions, and build scripts. - - -- Ben Schermel Wed, 06 May 2020 8:00:37 +0000 - -keydb (5:5.1.12-1chl1distribution_placeholder) codename_placeholder; urgency=medium +keydb-pro (5:5.1.12-1chl1distribution_placeholder) codename_placeholder; urgency=medium * 5.1.1 update. This update fixes several rare deadlock scenarios. Deadlock detection is also added. -- Ben Schermel Fri, 25 Oct 2019 8:00:37 +0000 -keydb (5:5.1.11-1chl1distribution_placeholder) codename_placeholder; urgency=medium +keydb-pro (5:5.1.11-1chl1distribution_placeholder) codename_placeholder; urgency=medium * 5.1 release. This release includes subkey expires (EXPIREMEMBER/EXPIREMEMBERAT), with updates to PTTL/TTL accordingly. New OBJECT LASTMODIFIED, BITIOP LSHIFT & BITOP RSHIFT commands. See https://docs.keydb.dev/blog/2019/10/20/blog-post/ for detailed review of release. -- Ben Schermel Mon, 21 Oct 2019 8:00:37 +0000 -keydb (5:5.0.1-1chl1distribution_placeholder) codename_placeholder; urgency=medium +keydb-pro (5:5.0.1-1chl1distribution_placeholder) codename_placeholder; urgency=medium * Arm build now included for bionic package -- Ben Schermel Wed, 21 Aug 2019 22:58:37 +0000 -keydb (5:5.0.0-1chl1distribution_placeholder) codename_placeholder; urgency=medium +keydb-pro (5:5.0.0-1chl1distribution_placeholder) codename_placeholder; urgency=medium * Initial release of KeyDB PPA. This PPA was originally derived from https://launchpad.net/~chris-lea/+archive/ubuntu/redis-server diff --git a/pkg/docker/Dockerfile b/pkg/docker/Dockerfile index dce45ef53..c71353b00 100644 --- a/pkg/docker/Dockerfile +++ b/pkg/docker/Dockerfile @@ -7,35 +7,35 @@ RUN groupadd -r keydb && useradd -r -g keydb keydb ENV GOSU_VERSION 1.11 RUN set -eux; \ # save list of currently installed packages for later so we can clean up - savedAptMark="$(apt-mark showmanual)"; \ - apt-get update; \ - apt-get install -y --no-install-recommends \ - ca-certificates \ - dirmngr \ - gnupg \ - wget \ - ; \ - \ - dpkgArch="$(dpkg --print-architecture | awk -F- '{ print $NF }')"; \ - wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch"; \ - wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch.asc"; \ - \ + savedAptMark="$(apt-mark showmanual)"; \ + apt-get update; \ + apt-get install -y --no-install-recommends \ + ca-certificates \ + dirmngr \ + gnupg \ + wget \ + ; \ + \ + dpkgArch="$(dpkg --print-architecture | awk -F- '{ print $NF }')"; \ + wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch"; \ + wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch.asc"; \ + \ # verify the signature - export GNUPGHOME="$(mktemp -d)"; \ - gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4; \ - gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu; \ - gpgconf --kill all; \ - rm -rf "$GNUPGHOME" /usr/local/bin/gosu.asc; \ - \ + export GNUPGHOME="$(mktemp -d)"; \ + gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4; \ + gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu; \ + gpgconf --kill all; \ + rm -rf "$GNUPGHOME" /usr/local/bin/gosu.asc; \ + \ # clean up fetch dependencies - apt-mark auto '.*' > /dev/null; \ - [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark > /dev/null; \ - apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ - \ - chmod +x /usr/local/bin/gosu; \ + apt-mark auto '.*' > /dev/null; \ + [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark > /dev/null; \ + apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ + \ + chmod +x /usr/local/bin/gosu; \ # verify that the binary works - gosu --version; \ - gosu nobody true + gosu --version; \ + gosu nobody true # Load pre-generated equivalent binaries to image (reduces deployment build times) RUN \ @@ -57,22 +57,22 @@ RUN \ # Ensure deps installed for binaries RUN set -eux; \ - \ - savedAptMark="$(apt-mark showmanual)"; \ - apt-get install -y --no-install-recommends \ - libcurl4 \ - libc6 \ - libssl1.1 \ - libuuid1 \ - libstdc++6 \ - libgcc1 \ - zlib1g \ - libbz2-1.0 \ - liblz4-1 \ - libsnappy1v5 \ - libzstd1 \ - ; \ - rm -rf /var/lib/apt/lists/* + \ + savedAptMark="$(apt-mark showmanual)"; \ + apt-get install -y --no-install-recommends \ + libcurl4 \ + libc6 \ + libssl1.1 \ + libuuid1 \ + libstdc++6 \ + libgcc1 \ + zlib1g \ + libbz2-1.0 \ + liblz4-1 \ + libsnappy1v5 \ + libzstd1 \ + ; \ + rm -rf /var/lib/apt/lists/* # create working directories RUN \ @@ -88,4 +88,4 @@ ENTRYPOINT ["docker-entrypoint.sh"] # Expose container port and start KeyDB by default on running container EXPOSE 6379 -CMD ["keydb-server", "/etc/keydb/keydb.conf"] +CMD ["keydb-pro-server", "/etc/keydb/keydb.conf"] diff --git a/pkg/rpm/README.md b/pkg/rpm/README.md index df50883e4..daa245359 100644 --- a/pkg/rpm/README.md +++ b/pkg/rpm/README.md @@ -1,6 +1,6 @@ ### Generate RPM files for the generated binaries -After running make to produce keydb binaries you can run the following script to create rpm package +After making the binaries you can run the following script Usage: ``` diff --git a/pkg/rpm/generate_rpms.sh b/pkg/rpm/generate_rpms.sh index ab5eefefb..2f5959c89 100755 --- a/pkg/rpm/generate_rpms.sh +++ b/pkg/rpm/generate_rpms.sh @@ -30,8 +30,9 @@ sed -i -E "1a\Version : $version" $DIR/keydb_build/keydb.spec sed -i '3d' $DIR/keydb_build/keydb.spec sed -i -E "2a\Release : $release%{?dist}" $DIR/keydb_build/keydb.spec -mkdir -p /root/rpmbuild/BUILDROOT/keydb-$version-$release.$dist.$arch -cp -r $DIR/keydb_build/keydb_rpm/* /root/rpmbuild/BUILDROOT/keydb-$version-$release.$dist.$arch/ +# yum install -y scl-utils centos-release-scl rpm-build +mkdir -p /root/rpmbuild/BUILDROOT/keydb-pro-$version-$release.$dist.$arch +cp -r $DIR/keydb_build/keydb_rpm/* /root/rpmbuild/BUILDROOT/keydb-pro-$version-$release.$dist.$arch/ rpmbuild -bb $DIR/keydb_build/keydb.spec mv /root/rpmbuild/RPMS/$arch/* $DIR/rpm_files_generated diff --git a/pkg/rpm/keydb_build/keydb.spec b/pkg/rpm/keydb_build/keydb.spec index 459a286b1..8c47c178c 100755 --- a/pkg/rpm/keydb_build/keydb.spec +++ b/pkg/rpm/keydb_build/keydb.spec @@ -1,5 +1,5 @@ -Name : keydb -Version : 5.3.3 +Name : keydb-pro +Version : 6.0.5 Release : 1%{?dist} Group : Unspecified License : BSD @@ -8,7 +8,6 @@ Packager : EQ Alpha Technology URL : https://keydb.dev Summary : A persistent key-value database - Requires: /bin/awk Requires: logrotate Requires(pre): shadow-utils @@ -28,7 +27,7 @@ getent group keydb &> /dev/null || \ groupadd -r keydb &> /dev/null getent passwd keydb &> /dev/null || \ useradd -r -g keydb -d /var/lib/keydb -s /sbin/nologin \ --c 'KeyDB Database Server' keydb &> /dev/null +-c 'KeyDB Professional Database Server' keydb &> /dev/null exit 0 #postinstall scriptlet (using /bin/sh): diff --git a/pkg/rpm/keydb_build/keydb_rpm/usr/lib/systemd/system/keydb-sentinel.service b/pkg/rpm/keydb_build/keydb_rpm/usr/lib/systemd/system/keydb-sentinel.service index 12e853025..3ea61fa9a 100755 --- a/pkg/rpm/keydb_build/keydb_rpm/usr/lib/systemd/system/keydb-sentinel.service +++ b/pkg/rpm/keydb_build/keydb_rpm/usr/lib/systemd/system/keydb-sentinel.service @@ -1,7 +1,7 @@ [Unit] Description=Advanced key-value store After=network.target -Documentation=https://docs.keydb.dev, man:keydb-sentinel(1) +Documentation=http://keydb.io/documentation, man:keydb-sentinel(1) [Service] Type=forking diff --git a/pkg/rpm/keydb_build/keydb_rpm/usr/lib/systemd/system/keydb.service b/pkg/rpm/keydb_build/keydb_rpm/usr/lib/systemd/system/keydb.service index e36f5f2cf..861c7a384 100755 --- a/pkg/rpm/keydb_build/keydb_rpm/usr/lib/systemd/system/keydb.service +++ b/pkg/rpm/keydb_build/keydb_rpm/usr/lib/systemd/system/keydb.service @@ -5,7 +5,7 @@ Documentation=https://docs.keydb.dev, man:keydb-server(1) [Service] Type=forking -ExecStart=/usr/bin/keydb-server /etc/keydb/keydb.conf +ExecStart=/usr/bin/keydb-pro-server /etc/keydb/keydb.conf ExecStop=/bin/kill -s TERM $MAINPID PIDFile=/var/run/keydb/keydb-server.pid TimeoutStopSec=0 diff --git a/src/semiorderedset.h b/src/semiorderedset.h index 35d27bedb..1b79e725b 100644 --- a/src/semiorderedset.h +++ b/src/semiorderedset.h @@ -92,15 +92,16 @@ public: for (int hashset = 0; hashset < 2; ++hashset) // rehashing may only be 1 resize behind, so we check up to two slots { - if (m_data[itr.idxPrimary] == nullptr) - continue; - const auto &vecBucket = *m_data[itr.idxPrimary]; - - auto itrFind = std::find(vecBucket.begin(), vecBucket.end(), key); - if (itrFind != vecBucket.end()) + if (m_data[itr.idxPrimary] != nullptr) { - itr.idxSecondary = itrFind - vecBucket.begin(); - return itr; + const auto &vecBucket = *m_data[itr.idxPrimary]; + + auto itrFind = std::find(vecBucket.begin(), vecBucket.end(), key); + if (itrFind != vecBucket.end()) + { + itr.idxSecondary = itrFind - vecBucket.begin(); + return itr; + } } // See if we have to check the older slot @@ -333,7 +334,8 @@ private: { if (m_data[idxRehash] == nullptr) continue; - CowPtr spvecT = std::make_shared(); + + CowPtr spvecT; std::swap(m_data[idxRehash], spvecT); for (const auto &v : *spvecT)