add deb/rpm/docker support
Former-commit-id: b0e7be7ce2c502127a55af4a331601dbac4bafb7
This commit is contained in:
parent
1f331f05ef
commit
d279e38f8c
6
.gitignore
vendored
6
.gitignore
vendored
@ -8,13 +8,16 @@ core
|
||||
dump.rdb
|
||||
src/keydb-server
|
||||
bin/keydb-server
|
||||
app/keydb-server
|
||||
*.deb
|
||||
*.rpm
|
||||
keydb-pro-server
|
||||
src/keydb-cli
|
||||
bin/keydb-cli
|
||||
app/keydb-cli
|
||||
src/keydb-sentinel
|
||||
bin/keydb-sentinel
|
||||
app/keydb-sentinel
|
||||
redis-benchmark
|
||||
keydb-benchmark
|
||||
redis-check-aof
|
||||
@ -24,11 +27,8 @@ keydb-check-rdb
|
||||
redis-check-dump
|
||||
keydb-check-dump
|
||||
redis-cli
|
||||
keydb-cli
|
||||
redis-sentinel
|
||||
keydb-sentinel
|
||||
redis-server
|
||||
keydb-server
|
||||
doc-tools
|
||||
release
|
||||
misc/*
|
||||
|
3
pkg/README.md
Normal file
3
pkg/README.md
Normal file
@ -0,0 +1,3 @@
|
||||
### KeyDB Packaging
|
||||
|
||||
The following directories contain packaging code used to create rpm and deb packages as well as docker images.
|
@ -1,16 +1,18 @@
|
||||
## Deb Packaging
|
||||
### KeyDB DEB Package Source Builds
|
||||
|
||||
The deb packages for open source KeyDB contain the KeyDB-Pro binary as well. As such we are generating deb packages using prebuilt binaries.
|
||||
Scripts update the appropriate files for the build and `dkpg-deb -b` is used to create the package. Dependencies for Pro are also included. This script modifies the same package rather than having many duplicates to ensure modifications made are pushed accross builds.
|
||||
This directpry contains all information to build a deb package for any distribution.
|
||||
|
||||
If you want to generate your own deb packages following running `make` and generating new binaries you can generate deb packages with the following command:
|
||||
You will need to install pbuilder `sudo apt install pbuilder`
|
||||
|
||||
You can now run the command:
|
||||
```
|
||||
$ cd KeyDB/pkg/deb
|
||||
$ deb-builder.sh <version-tag>
|
||||
$ ./deb-buildsource.sh
|
||||
```
|
||||
|
||||
The generated deb packages will be output to the directory "deb_files_generated". Update the changelog prior to generating the deb package if you would like a record.
|
||||
You will now generate a directory structure, .dsc file, original.tar.gz, .changes files and new changelog for the distribution and architecture installed.
|
||||
|
||||
Github CI will generate packages on each build versioned 0.0.0.0 and will contain open source binaries only. On tagged releases, deb packages with the appropriate version as well as the pro binary will be generated.
|
||||
|
||||
When complete the produced debian packages will be located in deb_files_generated directory.
|
||||
|
||||
Arguments for the deb-buildsource.sh script that can be passed are either 'None' or '"your custom comments"'. 'None' assumes a permanent changelog entry has been made listing the correct build for the version. If you quote and enter your own comment string, it will be appended to the changelog for that deb package. If no argument is passed a default comment is generated saying that this deb package was generated by this script.
|
||||
|
||||
This script has been tested on xenial/bionic/disco/stretch/buster
|
||||
|
@ -1,185 +0,0 @@
|
||||
#! /bin/bash
|
||||
|
||||
#### grab build and architecture
|
||||
build=$(lsb_release -c | awk '{ printf $2 }')
|
||||
arch=$(dpkg --print-architecture)
|
||||
|
||||
|
||||
# Ensure this script covers build
|
||||
if [ "$arch" != "arm64" ] && [ "$arch" != "amd64" ]; then
|
||||
echo "deb packages are currently only available for arm64 and amd64. You are attempting to build using a: $arch architecture"
|
||||
exit 2
|
||||
fi
|
||||
if [ "$build" != "bionic" ] && [ "$build" != "xenial" ]; then
|
||||
echo "deb packages are currently only available for xenial and bionic builds. You are attempting to build using a: $build distribution"
|
||||
exit 2
|
||||
fi
|
||||
if [ $# -eq 0 ]; then
|
||||
version=0.0.0
|
||||
fi
|
||||
if [ $# -gt 0 ]; then
|
||||
version=$1
|
||||
fi
|
||||
#### create the empty directories github would have removed
|
||||
mkdir $PWD/deb_source/sentinel/usr/bin
|
||||
mkdir $PWD/deb_source/tools/usr/bin
|
||||
|
||||
####### move updated keydb files to their respective locations for build
|
||||
cp ../../src/keydb* ./deb_source/tools/usr/bin/
|
||||
# wget keydb-pro-server -O ./deb_source/tools/usr/bin/
|
||||
cp ./conf/keydb.conf ./deb_source/server/etc/keydb/
|
||||
cp ./conf/sentinel.conf ./deb_source/sentinel/etc/keydb/
|
||||
|
||||
# Updated changelog will be implemented with build type updated if needed
|
||||
if [ "$build" == "xenial" ]; then
|
||||
sed -i 's/bionic/xenial/g' ./changelog.Debian
|
||||
fi
|
||||
if [ "$build" == "bionic" ]; then
|
||||
sed -i 's/xenial/bionic/g' ./changelog.Debian
|
||||
fi
|
||||
gzip ./changelog.Debian
|
||||
cp ./changelog.Debian.gz $PWD/deb_source/tools/usr/share/doc/keydb-tools/
|
||||
cp ./changelog.Debian.gz $PWD/deb_source/server/usr/share/doc/keydb-server/
|
||||
cp ./changelog.Debian.gz $PWD/deb_source/sentinel/usr/share/doc/keydb-sentinel/
|
||||
cp ./changelog.Debian.gz $PWD/deb_source/all/usr/share/doc/keydb
|
||||
gzip -d ./changelog.Debian.gz
|
||||
|
||||
# remove any old deb packages
|
||||
rm $PWD/deb_files_generated/*
|
||||
|
||||
# update the systemd service file parameters depending on build type. Some options ar not available for xenial
|
||||
if [ "$build" == "xenial" ]; then
|
||||
# if not already commented out, for xenial comment out the following unavailable systemd options
|
||||
sed -e '/ProtectKernelModules/ s/^#*/#/' -i $PWD/deb_source/server/lib/systemd/system/keydb-server.service
|
||||
sed -e '/ProtectKernelTunables/ s/^#*/#/' -i $PWD/deb_source/server/lib/systemd/system/keydb-server.service
|
||||
sed -e '/ProtectControlGroups/ s/^#*/#/' -i $PWD/deb_source/server/lib/systemd/system/keydb-server.service
|
||||
sed -e '/RestrictRealtime/ s/^#*/#/' -i $PWD/deb_source/server/lib/systemd/system/keydb-server.service
|
||||
sed -e '/RestrictNamespaces/ s/^#*/#/' -i $PWD/deb_source/server/lib/systemd/system/keydb-server.service
|
||||
sed -e '/ProtectKernelModules/ s/^#*/#/' -i $PWD/deb_source/sentinel/lib/systemd/system/keydb-sentinel.service
|
||||
sed -e '/ProtectKernelTunables/ s/^#*/#/' -i $PWD/deb_source/sentinel/lib/systemd/system/keydb-sentinel.service
|
||||
sed -e '/ProtectControlGroups/ s/^#*/#/' -i $PWD/deb_source/sentinel/lib/systemd/system/keydb-sentinel.service
|
||||
sed -e '/RestrictRealtime/ s/^#*/#/' -i $PWD/deb_source/sentinel/lib/systemd/system/keydb-sentinel.service
|
||||
sed -e '/RestrictNamespaces/ s/^#*/#/' -i $PWD/deb_source/sentinel/lib/systemd/system/keydb-sentinel.service
|
||||
fi
|
||||
if [ "$build" == "bionic" ]; then
|
||||
# if bionic, ensure the optios are available incase commented out from xenial
|
||||
sed -i '/ProtectKernelModules/s/^#//g' $PWD/deb_source/server/lib/systemd/system/keydb-server.service
|
||||
sed -i '/ProtectKernelTunables/s/^#//g' $PWD/deb_source/server/lib/systemd/system/keydb-server.service
|
||||
sed -i '/ProtectControlGroups/s/^#//g' $PWD/deb_source/server/lib/systemd/system/keydb-server.service
|
||||
sed -i '/RestrictRealtime/s/^#//g' $PWD/deb_source/server/lib/systemd/system/keydb-server.service
|
||||
sed -i '/RestrictNamespaces/s/^#//g' $PWD/deb_source/server/lib/systemd/system/keydb-server.service
|
||||
sed -i '/ProtectKernelModules/s/^#//g' $PWD/deb_source/sentinel/lib/systemd/system/keydb-sentinel.service
|
||||
sed -i '/ProtectKernelTunables/s/^#//g' $PWD/deb_source/sentinel/lib/systemd/system/keydb-sentinel.service
|
||||
sed -i '/ProtectControlGroups/s/^#//g' $PWD/deb_source/sentinel/lib/systemd/system/keydb-sentinel.service
|
||||
sed -i '/RestrictRealtime/s/^#//g' $PWD/deb_source/sentinel/lib/systemd/system/keydb-sentinel.service
|
||||
sed -i '/RestrictNamespaces/s/^#//g' $PWD/deb_source/sentinel/lib/systemd/system/keydb-sentinel.service
|
||||
fi
|
||||
################################################### create keydb common (all) deb package ################################################################
|
||||
|
||||
######## create an updated md5sum file ############
|
||||
rm $PWD/deb_source/all/DEBIAN/md5sums
|
||||
echo $(echo $(md5sum $PWD/deb_source/all/usr/share/doc/keydb/NEWS.Debian.gz | cut -d' ' -f1))' usr/share/doc/keydb/NEWS.Debian.gz' >> $PWD/deb_source/all/DEBIAN/md5sums
|
||||
echo $(echo $(md5sum $PWD/deb_source/all/usr/share/doc/keydb/changelog.Debian.gz | cut -d' ' -f1))' usr/share/doc/keydb/changelog.Debian.gz' >> $PWD/deb_source/all/DEBIAN/md5sums
|
||||
echo $(echo $(md5sum $PWD/deb_source/all/usr/share/doc/keydb/changelog.gz | cut -d' ' -f1))' usr/share/doc/keydb/changelog.gz' >> $PWD/deb_source/all/DEBIAN/md5sums
|
||||
echo $(echo $(md5sum $PWD/deb_source/all/usr/share/doc/keydb/copyright | cut -d' ' -f1))' usr/share/doc/keydb/copyright' >> $PWD/deb_source/all/DEBIAN/md5sums
|
||||
|
||||
######## update control file ###########
|
||||
# Remove version line and add a new one with updated version
|
||||
sed -i '2d' $PWD/deb_source/all/DEBIAN/control
|
||||
sed -i -E "1a\Version: 5:$version-1chl1~"$build"1" $PWD/deb_source/all/DEBIAN/control
|
||||
|
||||
sed -i '6d' $PWD/deb_source/all/DEBIAN/control
|
||||
sed -i -E "5a\Depends: keydb-server (<< 5:$version-1chl1~"$build"1.1~), keydb-server (>= 5:$version-1chl1~"$build"1)" $PWD/deb_source/all/DEBIAN/control
|
||||
|
||||
######## create new deb package ###########
|
||||
dpkg-deb -b ./deb_source/all ./deb_files_generated/keydb_$version-1chl1~"$build"1_all.deb
|
||||
|
||||
|
||||
################################################### create keydb-tools deb package ################################################################
|
||||
|
||||
######## create an updated md5sum file ############
|
||||
rm $PWD/deb_source/tools/DEBIAN/md5sums
|
||||
echo $(echo $(md5sum $PWD/deb_source/tools/usr/bin/keydb-benchmark | cut -d' ' -f1))' usr/bin/keydb-benchmark' >> $PWD/deb_source/tools/DEBIAN/md5sums
|
||||
echo $(echo $(md5sum $PWD/deb_source/tools/usr/bin/keydb-check-aof | cut -d' ' -f1))' usr/bin/keydb-check-aof' >> $PWD/deb_source/tools/DEBIAN/md5sums
|
||||
echo $(echo $(md5sum $PWD/deb_source/tools/usr/bin/keydb-check-rdb | cut -d' ' -f1))' usr/bin/keydb-check-rdb' >> $PWD/deb_source/tools/DEBIAN/md5sums
|
||||
echo $(echo $(md5sum $PWD/deb_source/tools/usr/bin/keydb-server | cut -d' ' -f1))' usr/bin/keydb-server' >> $PWD/deb_source/tools/DEBIAN/md5sums
|
||||
if test -f "$PWD/deb_source/tools/usr/bin/keydb-pro-server"; then
|
||||
echo $(echo $(md5sum $PWD/deb_source/tools/usr/bin/keydb-pro-server | cut -d' ' -f1))' usr/bin/keydb-pro-server' >> $PWD/deb_source/tools/DEBIAN/md5sums
|
||||
fi
|
||||
echo $(echo $(md5sum $PWD/deb_source/tools/usr/bin/keydb-cli | cut -d' ' -f1))' usr/bin/keydb-cli' >> $PWD/deb_source/tools/DEBIAN/md5sums
|
||||
echo $(echo $(md5sum $PWD/deb_source/tools/usr/share/bash-completion/completions/keydb-cli | cut -d' ' -f1))' usr/share/bash-completion/completions/keydb-cli' >> $PWD/deb_source/tools/DEBIAN/md5sums
|
||||
echo $(echo $(md5sum $PWD/deb_source/tools/usr/share/doc/keydb-tools/NEWS.Debian.gz | cut -d' ' -f1))' usr/share/doc/keydb-tools/NEWS.Debian.gz' >> $PWD/deb_source/tools/DEBIAN/md5sums
|
||||
echo $(echo $(md5sum $PWD/deb_source/tools/usr/share/doc/keydb-tools/changelog.Debian.gz | cut -d' ' -f1))' usr/share/doc/keydb-tools/changelog.Debian.gz' >> $PWD/deb_source/tools/DEBIAN/md5sums
|
||||
echo $(echo $(md5sum $PWD/deb_source/tools/usr/share/doc/keydb-tools/changelog.gz | cut -d' ' -f1))' usr/share/doc/keydb-tools/changelog.gz' >> $PWD/deb_source/tools/DEBIAN/md5sums
|
||||
echo $(echo $(md5sum $PWD/deb_source/tools/usr/share/doc/keydb-tools/copyright | cut -d' ' -f1))' usr/share/doc/keydb-tools/copyright' >> $PWD/deb_source/tools/DEBIAN/md5sums
|
||||
echo $(echo $(md5sum $PWD/deb_source/tools/usr/share/doc/keydb-tools/examples/lru/README | cut -d' ' -f1))' usr/share/doc/keydb-tools/examples/lru/README' >> $PWD/deb_source/tools/DEBIAN/md5sums
|
||||
echo $(echo $(md5sum $PWD/deb_source/tools/usr/share/doc/keydb-tools/examples/lru/lfu-simulation.c.gz | cut -d' ' -f1))' usr/share/doc/keydb-tools/examples/lru/lfu-simulation.c.gz' >> $PWD/deb_source/tools/DEBIAN/md5sums
|
||||
echo $(echo $(md5sum $PWD/deb_source/tools/usr/share/doc/keydb-tools/examples/lru/test-lru.rb.gz | cut -d' ' -f1))' usr/share/doc/keydb-tools/examples/lru/test-lru.rb.gz' >> $PWD/deb_source/tools/DEBIAN/md5sums
|
||||
echo $(echo $(md5sum $PWD/deb_source/tools/usr/share/doc/keydb-tools/examples/redis-trib.rb | cut -d' ' -f1))' usr/share/doc/keydb-tools/examples/redis-trib.rb' >> $PWD/deb_source/tools/DEBIAN/md5sums
|
||||
echo $(echo $(md5sum $PWD/deb_source/tools/usr/share/man/man1/keydb-benchmark.1.gz | cut -d' ' -f1))' usr/share/man/man1/keydb-benchmark.1.gz' >> $PWD/deb_source/tools/DEBIAN/md5sums
|
||||
echo $(echo $(md5sum $PWD/deb_source/tools/usr/share/man/man1/keydb-check-aof.1.gz | cut -d' ' -f1))' usr/share/man/man1/keydb-check-aof.1.gz' >> $PWD/deb_source/tools/DEBIAN/md5sums
|
||||
echo $(echo $(md5sum $PWD/deb_source/tools/usr/share/man/man1/keydb-check-rdb.1.gz | cut -d' ' -f1))' usr/share/man/man1/keydb-check-rdb.1.gz' >> $PWD/deb_source/tools/DEBIAN/md5sums
|
||||
echo $(echo $(md5sum $PWD/deb_source/tools/usr/share/man/man1/keydb-cli.1.gz | cut -d' ' -f1))' usr/share/man/man1/keydb-cli.1.gz' >> $PWD/deb_source/tools/DEBIAN/md5sums
|
||||
|
||||
######## update control file ###########
|
||||
# Remove version line and add a new one with updated version
|
||||
sed -i '3d' $PWD/deb_source/tools/DEBIAN/control
|
||||
sed -i -E "2a\Version: 5:$version-1chl1~"$build"1" $PWD/deb_source/tools/DEBIAN/control
|
||||
sed -i '4d' $PWD/deb_source/tools/DEBIAN/control
|
||||
sed -i -E "3a\Architecture: $arch" $PWD/deb_source/tools/DEBIAN/control
|
||||
if [ "$build" == "bionic" ]; then
|
||||
sed -i '7d' $PWD/deb_source/tools/DEBIAN/control
|
||||
sed -i -E "6a\Depends: adduser, libc6 (>= 2.17), libcurl4 (>= 7.16.2), libgcc1 (>= 1:3.0), libstdc++6 (>= 4.8.1), libuuid1 (>= 2.16), libssl1.1 (>= 1.1.1), zlib1g (>=1.2.11)" $PWD/deb_source/tools/DEBIAN/control
|
||||
fi
|
||||
if [ "$build" == "xenial" ]; then
|
||||
sed -i '7d' $PWD/deb_source/tools/DEBIAN/control
|
||||
sed -i -E "6a\Depends: adduser, libc6 (>= 2.23), libcurl3 (>= 7.47.0), libgcc1 (>= 6.0.1), libstdc++6 (>= 5.4.0), libuuid1 (>= 2.27.1), libssl1.0.0 (>= 1.0.2), zlib1g (>=1.2.8)" $PWD/deb_source/tools/DEBIAN/control
|
||||
fi
|
||||
######## create new deb package ###########
|
||||
dpkg-deb -b ./deb_source/tools ./deb_files_generated/keydb-tools_$version-1chl1~"$build"1_$arch.deb
|
||||
|
||||
################################################### create keydb-server deb package ################################################################
|
||||
|
||||
######## create an updated md5sum file ############
|
||||
rm $PWD/deb_source/server/DEBIAN/md5sums
|
||||
echo $(echo $(md5sum $PWD/deb_source/server/lib/systemd/system/keydb-server.service | cut -d' ' -f1))' lib/systemd/system/keydb-server.service' >> $PWD/deb_source/server/DEBIAN/md5sums
|
||||
echo $(echo $(md5sum $PWD/deb_source/server/usr/share/doc/keydb-server/NEWS.Debian.gz | cut -d' ' -f1))' usr/share/doc/keydb-server/NEWS.Debian.gz' >> $PWD/deb_source/server/DEBIAN/md5sums
|
||||
echo $(echo $(md5sum $PWD/deb_source/server/usr/share/doc/keydb-server/README.md.gz | cut -d' ' -f1))' usr/share/doc/keydb-server/README.md.gz' >> $PWD/deb_source/server/DEBIAN/md5sums
|
||||
echo $(echo $(md5sum $PWD/deb_source/server/usr/share/doc/keydb-server/changelog.Debian.gz | cut -d' ' -f1))' usr/share/doc/keydb-server/changelog.Debian.gz' >> $PWD/deb_source/server/DEBIAN/md5sums
|
||||
echo $(echo $(md5sum $PWD/deb_source/server/usr/share/doc/keydb-server/changelog.gz | cut -d' ' -f1))' usr/share/doc/keydb-server/changelog.gz' >> $PWD/deb_source/server/DEBIAN/md5sums
|
||||
echo $(echo $(md5sum $PWD/deb_source/server/usr/share/doc/keydb-server/copyright | cut -d' ' -f1))' usr/share/doc/keydb-server/copyright' >> $PWD/deb_source/server/DEBIAN/md5sums
|
||||
echo $(echo $(md5sum $PWD/deb_source/server/usr/share/man/man1/keydb-server.1.gz | cut -d' ' -f1))' usr/share/man/man1/keydb-server.1.gz' >> $PWD/deb_source/server/DEBIAN/md5sums
|
||||
|
||||
######## update control file ###########
|
||||
# Remove version line and add a new one with updated version
|
||||
sed -i '3d' $PWD/deb_source/server/DEBIAN/control
|
||||
sed -i -E "2a\Version: 5:$version-1chl1~"$build"1" $PWD/deb_source/server/DEBIAN/control
|
||||
sed -i '7d' $PWD/deb_source/server/DEBIAN/control
|
||||
sed -i -E "6a\Depends: lsb-base (>= 3.2-14), keydb-tools (= 5:$version-1chl1~"$build"1)" $PWD/deb_source/server/DEBIAN/control
|
||||
sed -i '4d' $PWD/deb_source/server/DEBIAN/control
|
||||
sed -i -E "3a\Architecture: $arch" $PWD/deb_source/server/DEBIAN/control
|
||||
######## create new deb package ###########
|
||||
dpkg-deb -b ./deb_source/server ./deb_files_generated/keydb-server_$version-1chl1~"$build"1_$arch.deb
|
||||
|
||||
|
||||
################################################### create keydb-sentinel deb package ################################################################
|
||||
|
||||
######## create an updated md5sum file ############
|
||||
rm $PWD/deb_source/sentinel/DEBIAN/md5sums
|
||||
echo $(echo $(md5sum $PWD/deb_source/sentinel/lib/systemd/system/keydb-sentinel.service | cut -d' ' -f1))' lib/systemd/system/keydb-sentinel.service' >> $PWD/deb_source/sentinel/DEBIAN/md5sums
|
||||
echo $(echo $(md5sum $PWD/deb_source/sentinel/usr/share/doc/keydb-sentinel/NEWS.Debian.gz | cut -d' ' -f1))' usr/share/doc/keydb-sentinel/NEWS.Debian.gz' >> $PWD/deb_source/sentinel/DEBIAN/md5sums
|
||||
echo $(echo $(md5sum $PWD/deb_source/sentinel/usr/share/doc/keydb-sentinel/changelog.Debian.gz | cut -d' ' -f1))' usr/share/doc/keydb-sentinel/changelog.Debian.gz' >> $PWD/deb_source/sentinel/DEBIAN/md5sums
|
||||
echo $(echo $(md5sum $PWD/deb_source/sentinel/usr/share/doc/keydb-sentinel/changelog.gz | cut -d' ' -f1))' usr/share/doc/keydb-sentinel/changelog.gz' >> $PWD/deb_source/sentinel/DEBIAN/md5sums
|
||||
echo $(echo $(md5sum $PWD/deb_source/sentinel/usr/share/doc/keydb-sentinel/copyright | cut -d' ' -f1))' usr/share/doc/keydb-sentinel/copyright' >> $PWD/deb_source/sentinel/DEBIAN/md5sums
|
||||
echo $(echo $(md5sum $PWD/deb_source/sentinel/usr/share/man/man1/keydb-sentinel.1.gz | cut -d' ' -f1))' usr/share/man/man1/keydb-sentinel.1.gz' >> $PWD/deb_source/sentinel/DEBIAN/md5sums
|
||||
|
||||
######## update control file ###########
|
||||
# Remove version line and add a new one with updated version
|
||||
sed -i '3d' $PWD/deb_source/sentinel/DEBIAN/control
|
||||
sed -i -E "2a\Version: 5:$version-1chl1~"$build"1" $PWD/deb_source/sentinel/DEBIAN/control
|
||||
sed -i '7d' $PWD/deb_source/sentinel/DEBIAN/control
|
||||
sed -i -E "6a\Depends: lsb-base (>= 3.2-14), keydb-tools (= 5:$version-1chl1~"$build"1)" $PWD/deb_source/sentinel/DEBIAN/control
|
||||
sed -i '4d' $PWD/deb_source/sentinel/DEBIAN/control
|
||||
sed -i -E "3a\Architecture: $arch" $PWD/deb_source/sentinel/DEBIAN/control
|
||||
######## create new deb package ###########
|
||||
dpkg-deb -b ./deb_source/sentinel ./deb_files_generated/keydb-sentinel_$version-1chl1~"$build"1_$arch.deb
|
55
pkg/deb/deb-buildsource.sh
Executable file
55
pkg/deb/deb-buildsource.sh
Executable file
@ -0,0 +1,55 @@
|
||||
#! /bin/bash
|
||||
|
||||
# define parameters used in this deb package build
|
||||
# enter comments as an argument string quoted. If you do not want comments to be added (ie. you have updated in git repo) type None
|
||||
if [ $# -eq 0 ]; then
|
||||
changelog_comments="This is a new source build generated from the deb_build_source.sh script"
|
||||
else
|
||||
changelog_comments=$1
|
||||
fi
|
||||
echo $changelog_comments
|
||||
build=1 #change if updated build number required. Default is 1 as convention for keydb is to update minor version
|
||||
version=$(grep KEYDB_REAL_VERSION ../../../src/version.h | awk '{ printf $3 }' | tr -d \")
|
||||
majorv="${version:0:1}"
|
||||
distributor=$(lsb_release --id --short)
|
||||
if [ "$distributor" == "Debian" ]; then
|
||||
distname=+deb$(lsb_release --release --short | cut -d. -f1)u1
|
||||
elif [ "$distributor" == "Ubuntu" ]; then
|
||||
distname=~$(lsb_release --codename --short)1
|
||||
fi
|
||||
codename=$(lsb_release --codename --short)
|
||||
date=$(date +%a," "%d" "%b" "%Y" "%T)
|
||||
pkg_name=keydb-$version$distname
|
||||
|
||||
# create build tree
|
||||
cd ../../../
|
||||
tar -czvf keydb_$version.orig.tar.gz --force-local KeyDB
|
||||
cd KeyDB/pkg/deb/
|
||||
mkdir -p $pkg_name/tmp
|
||||
cp -r debian $pkg_name/tmp
|
||||
cp master_changelog $pkg_name/tmp/debian/changelog
|
||||
mv ../../../keydb_$version.orig.tar.gz ./$pkg_name
|
||||
cd $pkg_name/tmp
|
||||
changelog_str="keydb ($version-$build$distname) $codename; urgency=medium\n\n * $version $changelog_comments \n\n -- Ben Schermel <ben@eqalpha.com> $date +0000\n\n"
|
||||
if [ $# -eq 0 ]; then
|
||||
sed -i "1s/^/$changelog_str\n/" debian/changelog
|
||||
elif [ $# -eq 1 ] && [ "$1" != "None" ]; then
|
||||
sed -i "1s/^/$changelog_str\n/" debian/changelog
|
||||
fi
|
||||
sed -i "s/distribution_placeholder/$distname/g" debian/changelog
|
||||
sed -i "s/codename_placeholder/$codename/g" debian/changelog
|
||||
|
||||
# generate required files and structure for pbuilder including .dsc file
|
||||
debuild -S -sa
|
||||
cd ../
|
||||
|
||||
# create pbuilder chrooted environment and build the deb package
|
||||
sudo pbuilder create --distribution $codename
|
||||
sudo pbuilder --update
|
||||
sudo pbuilder --build *.dsc
|
||||
|
||||
# move new packages to deb_files_generated and clean up
|
||||
cp /var/cache/pbuilder/result/*$version*.deb ../deb_files_generated
|
||||
sudo pbuilder --autocleanaptcache
|
||||
cd ../
|
||||
rm -rf $pkg_name
|
1
pkg/deb/deb_files_generated/.gitkeep
Executable file → Normal file
1
pkg/deb/deb_files_generated/.gitkeep
Executable file → Normal file
@ -1 +0,0 @@
|
||||
# keep this directory in git tree
|
@ -1,17 +0,0 @@
|
||||
Package: keydb
|
||||
Version: 5:0.0.0-1chl1~bionic1
|
||||
Architecture: all
|
||||
Maintainer: Ben Schermel <ben@eqalpha.com>
|
||||
Installed-Size: 16
|
||||
Depends: keydb-server (<< 5:0.0.0-1chl1~bionic1.1~), keydb-server (>= 5:0.0.0-1chl1~bionic1)
|
||||
Section: database
|
||||
Priority: optional
|
||||
Homepage: https://docs.keydb.dev/
|
||||
Description: Persistent key-value database with network interface (metapackage)
|
||||
keydb is a key-value database in a similar vein to memcache but the dataset
|
||||
is non-volatile. keydb additionally provides native support for atomically
|
||||
manipulating and querying data structures such as lists and sets.
|
||||
.
|
||||
The dataset is stored entirely in memory and periodically flushed to disk.
|
||||
.
|
||||
This package depends on the keydb-server package.
|
@ -1,4 +0,0 @@
|
||||
291ecb74aaa46f085bb6a01edce4d57f usr/share/doc/keydb/NEWS.Debian.gz
|
||||
bb9dabe59e3c2df7a85fc0154c2ab0e1 usr/share/doc/keydb/changelog.Debian.gz
|
||||
391f4b40dd5886c06bf59dc1264deb0f usr/share/doc/keydb/changelog.gz
|
||||
3b77eb20476366888f0802563ac78f3c usr/share/doc/keydb/copyright
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,4 +0,0 @@
|
||||
/etc/default/keydb-sentinel
|
||||
/etc/init.d/keydb-sentinel
|
||||
/etc/keydb/sentinel.conf
|
||||
/etc/logrotate.d/keydb-sentinel
|
@ -1,16 +0,0 @@
|
||||
Package: keydb-sentinel
|
||||
Source: keydb
|
||||
Version: 5:0.0.0-1chl1~bionic1
|
||||
Architecture: amd64
|
||||
Maintainer: Ben Schermel <ben@eqalpha.com>
|
||||
Installed-Size: 52
|
||||
Depends: lsb-base (>= 3.2-14), keydb-tools (= 5:0.0.0-1chl1~bionic1)
|
||||
Section: database
|
||||
Priority: optional
|
||||
Homepage: https://docs.keydb.dev/
|
||||
Description: Persistent key-value database with network interface (monitoring)
|
||||
keydb is a key-value database in a similar vein to memcache but the dataset
|
||||
is non-volatile. keydb additionally provides native support for atomically
|
||||
manipulating and querying data structures such as lists and sets.
|
||||
.
|
||||
This package contains the keydb Sentinel monitoring software.
|
@ -1,6 +0,0 @@
|
||||
b1c642338ca200652c9df544c040fc4f lib/systemd/system/keydb-sentinel.service
|
||||
291ecb74aaa46f085bb6a01edce4d57f usr/share/doc/keydb-sentinel/NEWS.Debian.gz
|
||||
bb9dabe59e3c2df7a85fc0154c2ab0e1 usr/share/doc/keydb-sentinel/changelog.Debian.gz
|
||||
391f4b40dd5886c06bf59dc1264deb0f usr/share/doc/keydb-sentinel/changelog.gz
|
||||
3b77eb20476366888f0802563ac78f3c usr/share/doc/keydb-sentinel/copyright
|
||||
cd608d980321ef2b774a4a70a41619a6 usr/share/man/man1/keydb-sentinel.1.gz
|
@ -1,44 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -eu
|
||||
|
||||
USER="keydb"
|
||||
GROUP="$USER"
|
||||
CONFFILE="/etc/keydb/sentinel.conf"
|
||||
|
||||
if [ "$1" = "configure" ]
|
||||
then
|
||||
if ! dpkg-statoverride --list ${CONFFILE} >/dev/null 2>&1
|
||||
then
|
||||
dpkg-statoverride --update --add ${USER} ${GROUP} 640 ${CONFFILE}
|
||||
fi
|
||||
fi
|
||||
|
||||
# Automatically added by dh_installdeb/11.1.6ubuntu2
|
||||
dpkg-maintscript-helper rm_conffile /etc/keydb/keydb-sentinel.post-down.d/00_example 4:4.0.2-3~ -- "$@"
|
||||
# End automatically added section
|
||||
# Automatically added by dh_installdeb/11.1.6ubuntu2
|
||||
dpkg-maintscript-helper rm_conffile /etc/keydb/keydb-sentinel.post-up.d/00_example 4:4.0.2-3~ -- "$@"
|
||||
# End automatically added section
|
||||
# Automatically added by dh_installdeb/11.1.6ubuntu2
|
||||
dpkg-maintscript-helper rm_conffile /etc/keydb/keydb-sentinel.pre-down.d/00_example 4:4.0.2-3~ -- "$@"
|
||||
# End automatically added section
|
||||
# Automatically added by dh_installdeb/11.1.6ubuntu2
|
||||
dpkg-maintscript-helper rm_conffile /etc/keydb/keydb-sentinel.pre-up.d/00_example 4:4.0.2-3~ -- "$@"
|
||||
# End automatically added section
|
||||
# Automatically added by dh_installinit/11.1.6ubuntu2
|
||||
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then
|
||||
if [ -x "/etc/init.d/keydb-sentinel" ]; then
|
||||
update-rc.d keydb-sentinel defaults >/dev/null
|
||||
invoke-rc.d keydb-sentinel start || exit 1
|
||||
fi
|
||||
fi
|
||||
# End automatically added section
|
||||
|
||||
|
||||
if [ "$1" = "configure" ]
|
||||
then
|
||||
find /etc/keydb -maxdepth 1 -type d -name 'keydb-sentinel.*.d' -empty -delete
|
||||
fi
|
||||
|
||||
exit 0
|
@ -1,38 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -eu
|
||||
|
||||
CONFFILE="/etc/keydb/sentinel.conf"
|
||||
|
||||
if [ "$1" = "purge" ]
|
||||
then
|
||||
dpkg-statoverride --remove ${CONFFILE} || test $? -eq 2
|
||||
fi
|
||||
|
||||
# Automatically added by dh_installinit/11.1.6ubuntu2
|
||||
if [ "$1" = "purge" ] ; then
|
||||
update-rc.d keydb-sentinel remove >/dev/null
|
||||
fi
|
||||
|
||||
|
||||
# In case this system is running systemd, we make systemd reload the unit files
|
||||
# to pick up changes.
|
||||
if [ -d /run/systemd/system ] ; then
|
||||
systemctl --system daemon-reload >/dev/null || true
|
||||
fi
|
||||
# End automatically added section
|
||||
# Automatically added by dh_installdeb/11.1.6ubuntu2
|
||||
dpkg-maintscript-helper rm_conffile /etc/keydb/keydb-sentinel.pre-up.d/00_example 4:4.0.2-3~ -- "$@"
|
||||
# End automatically added section
|
||||
# Automatically added by dh_installdeb/11.1.6ubuntu2
|
||||
dpkg-maintscript-helper rm_conffile /etc/keydb/keydb-sentinel.pre-down.d/00_example 4:4.0.2-3~ -- "$@"
|
||||
# End automatically added section
|
||||
# Automatically added by dh_installdeb/11.1.6ubuntu2
|
||||
dpkg-maintscript-helper rm_conffile /etc/keydb/keydb-sentinel.post-up.d/00_example 4:4.0.2-3~ -- "$@"
|
||||
# End automatically added section
|
||||
# Automatically added by dh_installdeb/11.1.6ubuntu2
|
||||
dpkg-maintscript-helper rm_conffile /etc/keydb/keydb-sentinel.post-down.d/00_example 4:4.0.2-3~ -- "$@"
|
||||
# End automatically added section
|
||||
|
||||
|
||||
exit 0
|
@ -1,14 +0,0 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
# Automatically added by dh_installdeb/11.1.6ubuntu2
|
||||
dpkg-maintscript-helper rm_conffile /etc/keydb/keydb-sentinel.post-down.d/00_example 4:4.0.2-3~ -- "$@"
|
||||
# End automatically added section
|
||||
# Automatically added by dh_installdeb/11.1.6ubuntu2
|
||||
dpkg-maintscript-helper rm_conffile /etc/keydb/keydb-sentinel.post-up.d/00_example 4:4.0.2-3~ -- "$@"
|
||||
# End automatically added section
|
||||
# Automatically added by dh_installdeb/11.1.6ubuntu2
|
||||
dpkg-maintscript-helper rm_conffile /etc/keydb/keydb-sentinel.pre-down.d/00_example 4:4.0.2-3~ -- "$@"
|
||||
# End automatically added section
|
||||
# Automatically added by dh_installdeb/11.1.6ubuntu2
|
||||
dpkg-maintscript-helper rm_conffile /etc/keydb/keydb-sentinel.pre-up.d/00_example 4:4.0.2-3~ -- "$@"
|
||||
# End automatically added section
|
@ -1,19 +0,0 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
# Automatically added by dh_installinit/11.1.6ubuntu2
|
||||
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_installdeb/11.1.6ubuntu2
|
||||
dpkg-maintscript-helper rm_conffile /etc/keydb/keydb-sentinel.pre-up.d/00_example 4:4.0.2-3~ -- "$@"
|
||||
# End automatically added section
|
||||
# Automatically added by dh_installdeb/11.1.6ubuntu2
|
||||
dpkg-maintscript-helper rm_conffile /etc/keydb/keydb-sentinel.pre-down.d/00_example 4:4.0.2-3~ -- "$@"
|
||||
# End automatically added section
|
||||
# Automatically added by dh_installdeb/11.1.6ubuntu2
|
||||
dpkg-maintscript-helper rm_conffile /etc/keydb/keydb-sentinel.post-up.d/00_example 4:4.0.2-3~ -- "$@"
|
||||
# End automatically added section
|
||||
# Automatically added by dh_installdeb/11.1.6ubuntu2
|
||||
dpkg-maintscript-helper rm_conffile /etc/keydb/keydb-sentinel.post-down.d/00_example 4:4.0.2-3~ -- "$@"
|
||||
# End automatically added section
|
@ -1,244 +0,0 @@
|
||||
# Example sentinel.conf
|
||||
|
||||
# *** IMPORTANT ***
|
||||
#
|
||||
# By default Sentinel will not be reachable from interfaces different than
|
||||
# localhost, either use the 'bind' directive to bind to a list of network
|
||||
# interfaces, or disable protected mode with "protected-mode no" by
|
||||
# adding it to this configuration file.
|
||||
#
|
||||
# Before doing that MAKE SURE the instance is protected from the outside
|
||||
# world via firewalling or other means.
|
||||
#
|
||||
# For example you may use one of the following:
|
||||
#
|
||||
# bind 127.0.0.1 192.168.1.1
|
||||
#
|
||||
# protected-mode no
|
||||
|
||||
# port <sentinel-port>
|
||||
# The port that this sentinel instance will run on
|
||||
port 26379
|
||||
|
||||
# By default Redis Sentinel does not run as a daemon. Use 'yes' if you need it.
|
||||
# Note that Redis will write a pid file in /var/run/keydb-sentinel.pid when
|
||||
# daemonized.
|
||||
daemonize yes
|
||||
|
||||
# When running daemonized, Redis Sentinel writes a pid file in
|
||||
# /var/run/keydb-sentinel.pid by default. You can specify a custom pid file
|
||||
# location here.
|
||||
pidfile /var/run/sentinel/keydb-sentinel.pid
|
||||
|
||||
# Specify the log file name. Also the empty string can be used to force
|
||||
# Sentinel to log on the standard output. Note that if you use standard
|
||||
# output for logging but daemonize, logs will be sent to /dev/null
|
||||
logfile /var/log/keydb/keydb-sentinel.log
|
||||
|
||||
# sentinel announce-ip <ip>
|
||||
# sentinel announce-port <port>
|
||||
#
|
||||
# The above two configuration directives are useful in environments where,
|
||||
# because of NAT, Sentinel is reachable from outside via a non-local address.
|
||||
#
|
||||
# When announce-ip is provided, the Sentinel will claim the specified IP address
|
||||
# in HELLO messages used to gossip its presence, instead of auto-detecting the
|
||||
# local address as it usually does.
|
||||
#
|
||||
# Similarly when announce-port is provided and is valid and non-zero, Sentinel
|
||||
# will announce the specified TCP port.
|
||||
#
|
||||
# The two options don't need to be used together, if only announce-ip is
|
||||
# provided, the Sentinel will announce the specified IP and the server port
|
||||
# as specified by the "port" option. If only announce-port is provided, the
|
||||
# Sentinel will announce the auto-detected local IP and the specified port.
|
||||
#
|
||||
# Example:
|
||||
#
|
||||
# sentinel announce-ip 1.2.3.4
|
||||
|
||||
# dir <working-directory>
|
||||
# Every long running process should have a well-defined working directory.
|
||||
# For Redis Sentinel to chdir to /tmp at startup is the simplest thing
|
||||
# for the process to don't interfere with administrative tasks such as
|
||||
# unmounting filesystems.
|
||||
dir /var/lib/keydb
|
||||
|
||||
# sentinel monitor <master-name> <ip> <keydb-port> <quorum>
|
||||
#
|
||||
# Tells Sentinel to monitor this master, and to consider it in O_DOWN
|
||||
# (Objectively Down) state only if at least <quorum> sentinels agree.
|
||||
#
|
||||
# Note that whatever is the ODOWN quorum, a Sentinel will require to
|
||||
# be elected by the majority of the known Sentinels in order to
|
||||
# start a failover, so no failover can be performed in minority.
|
||||
#
|
||||
# Replicas are auto-discovered, so you don't need to specify replicas in
|
||||
# any way. Sentinel itself will rewrite this configuration file adding
|
||||
# the replicas using additional configuration options.
|
||||
# Also note that the configuration file is rewritten when a
|
||||
# replica is promoted to master.
|
||||
#
|
||||
# Note: master name should not include special characters or spaces.
|
||||
# The valid charset is A-z 0-9 and the three characters ".-_".
|
||||
sentinel monitor mymaster 127.0.0.1 6379 2
|
||||
|
||||
# sentinel auth-pass <master-name> <password>
|
||||
#
|
||||
# Set the password to use to authenticate with the master and replicas.
|
||||
# Useful if there is a password set in the Redis instances to monitor.
|
||||
#
|
||||
# Note that the master password is also used for replicas, so it is not
|
||||
# possible to set a different password in masters and replicas instances
|
||||
# if you want to be able to monitor these instances with Sentinel.
|
||||
#
|
||||
# However you can have Redis instances without the authentication enabled
|
||||
# mixed with Redis instances requiring the authentication (as long as the
|
||||
# password set is the same for all the instances requiring the password) as
|
||||
# the AUTH command will have no effect in Redis instances with authentication
|
||||
# switched off.
|
||||
#
|
||||
# Example:
|
||||
#
|
||||
# sentinel auth-pass mymaster MySUPER--secret-0123passw0rd
|
||||
|
||||
# sentinel down-after-milliseconds <master-name> <milliseconds>
|
||||
#
|
||||
# Number of milliseconds the master (or any attached replica or sentinel) should
|
||||
# be unreachable (as in, not acceptable reply to PING, continuously, for the
|
||||
# specified period) in order to consider it in S_DOWN state (Subjectively
|
||||
# Down).
|
||||
#
|
||||
# Default is 30 seconds.
|
||||
sentinel down-after-milliseconds mymaster 30000
|
||||
|
||||
# sentinel parallel-syncs <master-name> <numreplicas>
|
||||
#
|
||||
# How many replicas we can reconfigure to point to the new replica simultaneously
|
||||
# during the failover. Use a low number if you use the replicas to serve query
|
||||
# to avoid that all the replicas will be unreachable at about the same
|
||||
# time while performing the synchronization with the master.
|
||||
sentinel parallel-syncs mymaster 1
|
||||
|
||||
# sentinel failover-timeout <master-name> <milliseconds>
|
||||
#
|
||||
# Specifies the failover timeout in milliseconds. It is used in many ways:
|
||||
#
|
||||
# - The time needed to re-start a failover after a previous failover was
|
||||
# already tried against the same master by a given Sentinel, is two
|
||||
# times the failover timeout.
|
||||
#
|
||||
# - The time needed for a replica replicating to a wrong master according
|
||||
# to a Sentinel current configuration, to be forced to replicate
|
||||
# with the right master, is exactly the failover timeout (counting since
|
||||
# the moment a Sentinel detected the misconfiguration).
|
||||
#
|
||||
# - The time needed to cancel a failover that is already in progress but
|
||||
# did not produced any configuration change (SLAVEOF NO ONE yet not
|
||||
# acknowledged by the promoted replica).
|
||||
#
|
||||
# - The maximum time a failover in progress waits for all the replicas to be
|
||||
# reconfigured as replicas of the new master. However even after this time
|
||||
# the replicas will be reconfigured by the Sentinels anyway, but not with
|
||||
# the exact parallel-syncs progression as specified.
|
||||
#
|
||||
# Default is 3 minutes.
|
||||
sentinel failover-timeout mymaster 180000
|
||||
|
||||
# SCRIPTS EXECUTION
|
||||
#
|
||||
# sentinel notification-script and sentinel reconfig-script are used in order
|
||||
# to configure scripts that are called to notify the system administrator
|
||||
# or to reconfigure clients after a failover. The scripts are executed
|
||||
# with the following rules for error handling:
|
||||
#
|
||||
# If script exits with "1" the execution is retried later (up to a maximum
|
||||
# number of times currently set to 10).
|
||||
#
|
||||
# If script exits with "2" (or an higher value) the script execution is
|
||||
# not retried.
|
||||
#
|
||||
# If script terminates because it receives a signal the behavior is the same
|
||||
# as exit code 1.
|
||||
#
|
||||
# A script has a maximum running time of 60 seconds. After this limit is
|
||||
# reached the script is terminated with a SIGKILL and the execution retried.
|
||||
|
||||
# NOTIFICATION SCRIPT
|
||||
#
|
||||
# sentinel notification-script <master-name> <script-path>
|
||||
#
|
||||
# Call the specified notification script for any sentinel event that is
|
||||
# generated in the WARNING level (for instance -sdown, -odown, and so forth).
|
||||
# This script should notify the system administrator via email, SMS, or any
|
||||
# other messaging system, that there is something wrong with the monitored
|
||||
# Redis systems.
|
||||
#
|
||||
# The script is called with just two arguments: the first is the event type
|
||||
# and the second the event description.
|
||||
#
|
||||
# The script must exist and be executable in order for sentinel to start if
|
||||
# this option is provided.
|
||||
#
|
||||
# Example:
|
||||
#
|
||||
# sentinel notification-script mymaster /var/redis/notify.sh
|
||||
|
||||
# CLIENTS RECONFIGURATION SCRIPT
|
||||
#
|
||||
# sentinel client-reconfig-script <master-name> <script-path>
|
||||
#
|
||||
# When the master changed because of a failover a script can be called in
|
||||
# order to perform application-specific tasks to notify the clients that the
|
||||
# configuration has changed and the master is at a different address.
|
||||
#
|
||||
# The following arguments are passed to the script:
|
||||
#
|
||||
# <master-name> <role> <state> <from-ip> <from-port> <to-ip> <to-port>
|
||||
#
|
||||
# <state> is currently always "failover"
|
||||
# <role> is either "leader" or "observer"
|
||||
#
|
||||
# The arguments from-ip, from-port, to-ip, to-port are used to communicate
|
||||
# the old address of the master and the new address of the elected replica
|
||||
# (now a master).
|
||||
#
|
||||
# This script should be resistant to multiple invocations.
|
||||
#
|
||||
# Example:
|
||||
#
|
||||
# sentinel client-reconfig-script mymaster /var/redis/reconfig.sh
|
||||
|
||||
# SECURITY
|
||||
#
|
||||
# By default SENTINEL SET will not be able to change the notification-script
|
||||
# and client-reconfig-script at runtime. This avoids a trivial security issue
|
||||
# where clients can set the script to anything and trigger a failover in order
|
||||
# to get the program executed.
|
||||
|
||||
sentinel deny-scripts-reconfig yes
|
||||
|
||||
# REDIS COMMANDS RENAMING
|
||||
#
|
||||
# Sometimes the Redis server has certain commands, that are needed for Sentinel
|
||||
# to work correctly, renamed to unguessable strings. This is often the case
|
||||
# of CONFIG and SLAVEOF in the context of providers that provide Redis as
|
||||
# a service, and don't want the customers to reconfigure the instances outside
|
||||
# of the administration console.
|
||||
#
|
||||
# In such case it is possible to tell Sentinel to use different command names
|
||||
# instead of the normal ones. For example if the master "mymaster", and the
|
||||
# associated replicas, have "CONFIG" all renamed to "GUESSME", I could use:
|
||||
#
|
||||
# SENTINEL rename-command mymaster CONFIG GUESSME
|
||||
#
|
||||
# After such configuration is set, every time Sentinel would use CONFIG it will
|
||||
# use GUESSME instead. Note that there is no actual need to respect the command
|
||||
# case, so writing "config guessme" is the same in the example above.
|
||||
#
|
||||
# SENTINEL SET can also be used in order to perform this configuration at runtime.
|
||||
#
|
||||
# In order to set a command back to its original name (undo the renaming), it
|
||||
# is possible to just rename a command to itsef:
|
||||
#
|
||||
# SENTINEL rename-command mymaster CONFIG CONFIG
|
@ -1,40 +0,0 @@
|
||||
[Unit]
|
||||
Description=Advanced key-value store
|
||||
After=network.target
|
||||
Documentation=https://docs.keydb.dev, man:keydb-sentinel(1)
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
ExecStart=/usr/bin/keydb-sentinel /etc/keydb/sentinel.conf
|
||||
ExecStop=/bin/kill -s TERM $MAINPID
|
||||
PIDFile=/var/run/sentinel/keydb-sentinel.pid
|
||||
TimeoutStopSec=0
|
||||
Restart=always
|
||||
User=keydb
|
||||
Group=keydb
|
||||
RuntimeDirectory=sentinel
|
||||
RuntimeDirectoryMode=2755
|
||||
|
||||
UMask=007
|
||||
PrivateTmp=yes
|
||||
LimitNOFILE=65535
|
||||
PrivateDevices=yes
|
||||
ProtectHome=yes
|
||||
ReadOnlyDirectories=/
|
||||
ReadWriteDirectories=-/var/lib/keydb
|
||||
ReadWriteDirectories=-/var/log/keydb
|
||||
ReadWriteDirectories=-/var/run/sentinel
|
||||
|
||||
NoNewPrivileges=true
|
||||
CapabilityBoundingSet=CAP_SETGID CAP_SETUID CAP_SYS_RESOURCE
|
||||
RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX
|
||||
|
||||
# keydb-sentinel can write to its own config file when in cluster mode so we
|
||||
# permit writing there by default. If you are not using this feature, it is
|
||||
# recommended that you replace the following lines with "ProtectSystem=full".
|
||||
ProtectSystem=true
|
||||
ReadWriteDirectories=-/etc/keydb
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Alias=sentinel.service
|
Binary file not shown.
@ -1,4 +0,0 @@
|
||||
/etc/default/keydb-server
|
||||
/etc/init.d/keydb-server
|
||||
/etc/keydb/keydb.conf
|
||||
/etc/logrotate.d/keydb-server
|
@ -1,16 +0,0 @@
|
||||
Package: keydb-server
|
||||
Source: keydb
|
||||
Version: 5:0.0.0-1chl1~bionic1
|
||||
Architecture: amd64
|
||||
Maintainer: Ben Schermel <ben@eqalpha.com>
|
||||
Installed-Size: 119
|
||||
Depends: lsb-base (>= 3.2-14), keydb-tools (= 5:0.0.0-1chl1~bionic1)
|
||||
Section: database
|
||||
Priority: optional
|
||||
Homepage: https://docs.keydb.dev/
|
||||
Description: Persistent key-value database with network interface
|
||||
keydb is a key-value database in a similar vein to memcache but the dataset
|
||||
is non-volatile. keydb additionally provides native support for atomically
|
||||
manipulating and querying data structures such as lists and sets.
|
||||
.
|
||||
The dataset is stored entirely in memory and periodically flushed to disk.
|
@ -1,7 +0,0 @@
|
||||
86743ab47224209eb79be4bbeb9d7945 lib/systemd/system/keydb-server.service
|
||||
291ecb74aaa46f085bb6a01edce4d57f usr/share/doc/keydb-server/NEWS.Debian.gz
|
||||
787d0d6c891480f37b27ac6fd90ad3f6 usr/share/doc/keydb-server/README.md.gz
|
||||
bb9dabe59e3c2df7a85fc0154c2ab0e1 usr/share/doc/keydb-server/changelog.Debian.gz
|
||||
1b5e9b283240a163084822adad00f64f usr/share/doc/keydb-server/changelog.gz
|
||||
3b77eb20476366888f0802563ac78f3c usr/share/doc/keydb-server/copyright
|
||||
c0ebbc5085f48753c08becccb5d1eadf usr/share/man/man1/keydb-server.1.gz
|
@ -1,44 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -eu
|
||||
|
||||
USER="keydb"
|
||||
GROUP="$USER"
|
||||
CONFFILE="/etc/keydb/keydb.conf"
|
||||
|
||||
if [ "$1" = "configure" ]
|
||||
then
|
||||
if ! dpkg-statoverride --list ${CONFFILE} >/dev/null 2>&1
|
||||
then
|
||||
dpkg-statoverride --update --add ${USER} ${GROUP} 640 ${CONFFILE}
|
||||
fi
|
||||
fi
|
||||
|
||||
# Automatically added by dh_installdeb/11.1.6ubuntu2
|
||||
dpkg-maintscript-helper rm_conffile /etc/keydb/keydb-server.post-down.d/00_example 4:4.0.2-3~ -- "$@"
|
||||
# End automatically added section
|
||||
# Automatically added by dh_installdeb/11.1.6ubuntu2
|
||||
dpkg-maintscript-helper rm_conffile /etc/keydb/keydb-server.post-up.d/00_example 4:4.0.2-3~ -- "$@"
|
||||
# End automatically added section
|
||||
# Automatically added by dh_installdeb/11.1.6ubuntu2
|
||||
dpkg-maintscript-helper rm_conffile /etc/keydb/keydb-server.pre-down.d/00_example 4:4.0.2-3~ -- "$@"
|
||||
# End automatically added section
|
||||
# Automatically added by dh_installdeb/11.1.6ubuntu2
|
||||
dpkg-maintscript-helper rm_conffile /etc/keydb/keydb-server.pre-up.d/00_example 4:4.0.2-3~ -- "$@"
|
||||
# End automatically added section
|
||||
# Automatically added by dh_installinit/11.1.6ubuntu2
|
||||
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then
|
||||
if [ -x "/etc/init.d/keydb-server" ]; then
|
||||
update-rc.d keydb-server defaults >/dev/null
|
||||
invoke-rc.d keydb-server start || exit 1
|
||||
fi
|
||||
fi
|
||||
# End automatically added section
|
||||
|
||||
|
||||
if [ "$1" = "configure" ]
|
||||
then
|
||||
find /etc/keydb -maxdepth 1 -type d -name 'keydb-server.*.d' -empty -delete
|
||||
fi
|
||||
|
||||
exit 0
|
@ -1,38 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -eu
|
||||
|
||||
CONFFILE="/etc/keydb/keydb.conf"
|
||||
|
||||
if [ "${1}" = "purge" ]
|
||||
then
|
||||
dpkg-statoverride --remove ${CONFFILE} || test $? -eq 2
|
||||
fi
|
||||
|
||||
# Automatically added by dh_installinit/11.1.6ubuntu2
|
||||
if [ "$1" = "purge" ] ; then
|
||||
update-rc.d keydb-server remove >/dev/null
|
||||
fi
|
||||
|
||||
|
||||
# In case this system is running systemd, we make systemd reload the unit files
|
||||
# to pick up changes.
|
||||
if [ -d /run/systemd/system ] ; then
|
||||
systemctl --system daemon-reload >/dev/null || true
|
||||
fi
|
||||
# End automatically added section
|
||||
# Automatically added by dh_installdeb/11.1.6ubuntu2
|
||||
dpkg-maintscript-helper rm_conffile /etc/keydb/keydb-server.pre-up.d/00_example 4:4.0.2-3~ -- "$@"
|
||||
# End automatically added section
|
||||
# Automatically added by dh_installdeb/11.1.6ubuntu2
|
||||
dpkg-maintscript-helper rm_conffile /etc/keydb/keydb-server.pre-down.d/00_example 4:4.0.2-3~ -- "$@"
|
||||
# End automatically added section
|
||||
# Automatically added by dh_installdeb/11.1.6ubuntu2
|
||||
dpkg-maintscript-helper rm_conffile /etc/keydb/keydb-server.post-up.d/00_example 4:4.0.2-3~ -- "$@"
|
||||
# End automatically added section
|
||||
# Automatically added by dh_installdeb/11.1.6ubuntu2
|
||||
dpkg-maintscript-helper rm_conffile /etc/keydb/keydb-server.post-down.d/00_example 4:4.0.2-3~ -- "$@"
|
||||
# End automatically added section
|
||||
|
||||
|
||||
exit 0
|
@ -1,14 +0,0 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
# Automatically added by dh_installdeb/11.1.6ubuntu2
|
||||
dpkg-maintscript-helper rm_conffile /etc/keydb/keydb-server.post-down.d/00_example 4:4.0.2-3~ -- "$@"
|
||||
# End automatically added section
|
||||
# Automatically added by dh_installdeb/11.1.6ubuntu2
|
||||
dpkg-maintscript-helper rm_conffile /etc/keydb/keydb-server.post-up.d/00_example 4:4.0.2-3~ -- "$@"
|
||||
# End automatically added section
|
||||
# Automatically added by dh_installdeb/11.1.6ubuntu2
|
||||
dpkg-maintscript-helper rm_conffile /etc/keydb/keydb-server.pre-down.d/00_example 4:4.0.2-3~ -- "$@"
|
||||
# End automatically added section
|
||||
# Automatically added by dh_installdeb/11.1.6ubuntu2
|
||||
dpkg-maintscript-helper rm_conffile /etc/keydb/keydb-server.pre-up.d/00_example 4:4.0.2-3~ -- "$@"
|
||||
# End automatically added section
|
@ -1,19 +0,0 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
# Automatically added by dh_installinit/11.1.6ubuntu2
|
||||
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_installdeb/11.1.6ubuntu2
|
||||
dpkg-maintscript-helper rm_conffile /etc/keydb/keydb-server.pre-up.d/00_example 4:4.0.2-3~ -- "$@"
|
||||
# End automatically added section
|
||||
# Automatically added by dh_installdeb/11.1.6ubuntu2
|
||||
dpkg-maintscript-helper rm_conffile /etc/keydb/keydb-server.pre-down.d/00_example 4:4.0.2-3~ -- "$@"
|
||||
# End automatically added section
|
||||
# Automatically added by dh_installdeb/11.1.6ubuntu2
|
||||
dpkg-maintscript-helper rm_conffile /etc/keydb/keydb-server.post-up.d/00_example 4:4.0.2-3~ -- "$@"
|
||||
# End automatically added section
|
||||
# Automatically added by dh_installdeb/11.1.6ubuntu2
|
||||
dpkg-maintscript-helper rm_conffile /etc/keydb/keydb-server.post-down.d/00_example 4:4.0.2-3~ -- "$@"
|
||||
# End automatically added section
|
File diff suppressed because it is too large
Load Diff
@ -1,40 +0,0 @@
|
||||
[Unit]
|
||||
Description=Advanced key-value store
|
||||
After=network.target
|
||||
Documentation=https://docs.keydb.dev, man:keydb-server(1)
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
ExecStart=/usr/bin/keydb-server /etc/keydb/keydb.conf
|
||||
ExecStop=/bin/kill -s TERM $MAINPID
|
||||
PIDFile=/var/run/keydb/keydb-server.pid
|
||||
TimeoutStopSec=0
|
||||
Restart=always
|
||||
User=keydb
|
||||
Group=keydb
|
||||
RuntimeDirectory=keydb
|
||||
RuntimeDirectoryMode=2755
|
||||
|
||||
UMask=007
|
||||
PrivateTmp=yes
|
||||
LimitNOFILE=65535
|
||||
PrivateDevices=yes
|
||||
ProtectHome=yes
|
||||
ReadOnlyDirectories=/
|
||||
ReadWriteDirectories=-/var/lib/keydb
|
||||
ReadWriteDirectories=-/var/log/keydb
|
||||
ReadWriteDirectories=-/var/run/keydb
|
||||
|
||||
NoNewPrivileges=true
|
||||
CapabilityBoundingSet=CAP_SETGID CAP_SETUID CAP_SYS_RESOURCE
|
||||
RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX
|
||||
|
||||
# keydb-server can write to its own config file when in cluster mode so we
|
||||
# permit writing there by default. If you are not using this feature, it is
|
||||
# recommended that you replace the following lines with "ProtectSystem=full".
|
||||
ProtectSystem=true
|
||||
ReadWriteDirectories=-/etc/keydb
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Alias=keydb.service
|
Binary file not shown.
@ -1,18 +0,0 @@
|
||||
Package: keydb-tools
|
||||
Source: keydb
|
||||
Version: 5:0.0.0-1chl1~bionic1
|
||||
Architecture: amd64
|
||||
Maintainer: Ben Schermel <ben@eqalpha.com>
|
||||
Installed-Size: 5908
|
||||
Depends: adduser, libc6 (>= 2.17), libcurl4 (>= 7.16.2), libgcc1 (>= 1:3.0), libstdc++6 (>= 4.8.1), libuuid1 (>= 2.16), libssl1.1 (>= 1.1.1), zlib1g (>=1.2.11)
|
||||
Breaks: keydb-server (<< 2:2.6.16-1)
|
||||
Replaces: keydb-server (<< 2:2.6.16-1)
|
||||
Section: database
|
||||
Priority: optional
|
||||
Homepage: https://docs.keydb.dev/
|
||||
Description: Persistent key-value database with network interface (client)
|
||||
keydb is a key-value database in a similar vein to memcache but the dataset
|
||||
is non-volatile. keydb additionally provides native support for atomically
|
||||
manipulating and querying data structures such as lists and sets.
|
||||
.
|
||||
This package contains the command line client and other tools.
|
@ -1,18 +0,0 @@
|
||||
91bc7c4369127a7ce50dc9b2209c9022 usr/bin/keydb-benchmark
|
||||
e44a754f3c156b2bed90d3a46b514e08 usr/bin/keydb-check-aof
|
||||
e44a754f3c156b2bed90d3a46b514e08 usr/bin/keydb-check-rdb
|
||||
e44a754f3c156b2bed90d3a46b514e08 usr/bin/keydb-server
|
||||
d92a545d57586321c7da748652b862d0 usr/bin/keydb-cli
|
||||
98cc3dc32bc1ecaecd80819e887f07d4 usr/share/bash-completion/completions/keydb-cli
|
||||
291ecb74aaa46f085bb6a01edce4d57f usr/share/doc/keydb-tools/NEWS.Debian.gz
|
||||
bb9dabe59e3c2df7a85fc0154c2ab0e1 usr/share/doc/keydb-tools/changelog.Debian.gz
|
||||
391f4b40dd5886c06bf59dc1264deb0f usr/share/doc/keydb-tools/changelog.gz
|
||||
3b77eb20476366888f0802563ac78f3c usr/share/doc/keydb-tools/copyright
|
||||
7568ef814e33ce3f8238008f1a0070e6 usr/share/doc/keydb-tools/examples/lru/README
|
||||
6d01f83477f506b7055b069b3d440af4 usr/share/doc/keydb-tools/examples/lru/lfu-simulation.c.gz
|
||||
c7cbcc8bee26a9762e6e60aefce3afaf usr/share/doc/keydb-tools/examples/lru/test-lru.rb.gz
|
||||
2c206081a037bcdb97568eea0528d4c4 usr/share/doc/keydb-tools/examples/redis-trib.rb
|
||||
6abba649b53f80be470fc038ed320364 usr/share/man/man1/keydb-benchmark.1.gz
|
||||
dfefa283a8fa238adb29f2b8bd465ba8 usr/share/man/man1/keydb-check-aof.1.gz
|
||||
944913489614321c601c965650124328 usr/share/man/man1/keydb-check-rdb.1.gz
|
||||
7cb1a59118e251026ec176fcd1a3de16 usr/share/man/man1/keydb-cli.1.gz
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,134 +0,0 @@
|
||||
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||
Upstream-Contact: John Sully <john@eqalpha.com>
|
||||
Upstream-Name: keydb
|
||||
Source: https://github.com/JohnSully/KeyDB
|
||||
|
||||
Files: *
|
||||
Copyright: © 2006-2014 Salvatore Sanfilippo <antirez@gmail.com>
|
||||
Copyright © 2019, John Sully
|
||||
License: BSD-3-clause
|
||||
|
||||
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 <pcnoordhuis@gmail.com>
|
||||
© 2009-2012 Salvatore Sanfilippo <antirez@gmail.com>
|
||||
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 <schmorp@schmorp.de>
|
||||
© 2009-2012 Salvatore Sanfilippo <antirez@gmail.com>
|
||||
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 <harish.mallipeddi@gmail.com>
|
||||
License: BSD-3-clause
|
||||
|
||||
Files: utils/install_server.sh
|
||||
Copyright: © 2011 Dvir Volk <dvirsk@gmail.com>
|
||||
License: BSD-3-clause
|
||||
|
||||
Files: deps/jemalloc/*
|
||||
Copyright:
|
||||
© 2002-2012 Jason Evans <jasone@canonware.com>
|
||||
© 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 <lamby@debian.org>
|
||||
License: BSD-3-clause
|
||||
|
||||
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:
|
||||
.
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
.
|
||||
2. 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 HOLDER 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: 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 Redis nor the names of its 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.
|
@ -1,19 +0,0 @@
|
||||
The test-lru.rb program can be used in order to check the behavior of the
|
||||
Redis approximated LRU algorithm against the theoretical output of true
|
||||
LRU algorithm.
|
||||
|
||||
In order to use the program you need to recompile Redis setting the define
|
||||
REDIS_LRU_CLOCK_RESOLUTION to 1, by editing the file server.h.
|
||||
This allows to execute the program in a fast way since the 1 ms resolution
|
||||
is enough for all the objects to have a different enough time stamp during
|
||||
the test.
|
||||
|
||||
The program is executed like this:
|
||||
|
||||
ruby test-lru.rb /tmp/lru.html
|
||||
|
||||
You can optionally specify a number of times to run, so that the program
|
||||
will output averages of different runs, by adding an additional argument.
|
||||
For instance in order to run the test 10 times use:
|
||||
|
||||
ruby test-lru.rb /tmp/lru.html 10
|
Binary file not shown.
Binary file not shown.
@ -1,129 +0,0 @@
|
||||
#!/usr/bin/env ruby
|
||||
|
||||
def colorized(str, color)
|
||||
return str if !(ENV['TERM'] || '')["xterm"]
|
||||
color_code = {
|
||||
white: 29,
|
||||
bold: '29;1',
|
||||
black: 30,
|
||||
red: 31,
|
||||
green: 32,
|
||||
yellow: 33,
|
||||
blue: 34,
|
||||
magenta: 35,
|
||||
cyan: 36,
|
||||
gray: 37
|
||||
}[color]
|
||||
return str if !color_code
|
||||
"\033[#{color_code}m#{str}\033[0m"
|
||||
end
|
||||
|
||||
class String
|
||||
|
||||
%w(white bold black red green yellow blue magenta cyan gray).each{|color|
|
||||
color = :"#{color}"
|
||||
define_method(color){
|
||||
colorized(self, color)
|
||||
}
|
||||
}
|
||||
|
||||
end
|
||||
|
||||
COMMANDS = %w(create check info fix reshard rebalance add-node
|
||||
del-node set-timeout call import help)
|
||||
|
||||
ALLOWED_OPTIONS={
|
||||
"create" => {"replicas" => true},
|
||||
"add-node" => {"slave" => false, "master-id" => true},
|
||||
"import" => {"from" => :required, "copy" => false, "replace" => false},
|
||||
"reshard" => {"from" => true, "to" => true, "slots" => true, "yes" => false, "timeout" => true, "pipeline" => true},
|
||||
"rebalance" => {"weight" => [], "auto-weights" => false, "use-empty-masters" => false, "timeout" => true, "simulate" => false, "pipeline" => true, "threshold" => true},
|
||||
"fix" => {"timeout" => 0},
|
||||
}
|
||||
|
||||
def parse_options(cmd)
|
||||
cmd = cmd.downcase
|
||||
idx = 0
|
||||
options = {}
|
||||
args = []
|
||||
while (arg = ARGV.shift)
|
||||
if arg[0..1] == "--"
|
||||
option = arg[2..-1]
|
||||
|
||||
# --verbose is a global option
|
||||
if option == "--verbose"
|
||||
options['verbose'] = true
|
||||
next
|
||||
end
|
||||
if ALLOWED_OPTIONS[cmd] == nil ||
|
||||
ALLOWED_OPTIONS[cmd][option] == nil
|
||||
next
|
||||
end
|
||||
if ALLOWED_OPTIONS[cmd][option] != false
|
||||
value = ARGV.shift
|
||||
next if !value
|
||||
else
|
||||
value = true
|
||||
end
|
||||
|
||||
# If the option is set to [], it's a multiple arguments
|
||||
# option. We just queue every new value into an array.
|
||||
if ALLOWED_OPTIONS[cmd][option] == []
|
||||
options[option] = [] if !options[option]
|
||||
options[option] << value
|
||||
else
|
||||
options[option] = value
|
||||
end
|
||||
else
|
||||
next if arg[0,1] == '-'
|
||||
args << arg
|
||||
end
|
||||
end
|
||||
|
||||
return options,args
|
||||
end
|
||||
|
||||
def command_example(cmd, args, opts)
|
||||
cmd = "keydb-cli --cluster #{cmd}"
|
||||
args.each{|a|
|
||||
a = a.to_s
|
||||
a = a.inspect if a[' ']
|
||||
cmd << " #{a}"
|
||||
}
|
||||
opts.each{|opt, val|
|
||||
opt = " --cluster-#{opt.downcase}"
|
||||
if val != true
|
||||
val = val.join(' ') if val.is_a? Array
|
||||
opt << " #{val}"
|
||||
end
|
||||
cmd << opt
|
||||
}
|
||||
cmd
|
||||
end
|
||||
|
||||
$command = ARGV.shift
|
||||
$opts, $args = parse_options($command) if $command
|
||||
|
||||
puts "WARNING: keydb-trib.rb is not longer available!".yellow
|
||||
puts "You should use #{'keydb-cli'.bold} instead."
|
||||
puts ''
|
||||
puts "All commands and features belonging to keydb-trib.rb "+
|
||||
"have been moved\nto keydb-cli."
|
||||
puts "In order to use them you should call keydb-cli with the #{'--cluster'.bold}"
|
||||
puts "option followed by the subcommand name, arguments and options."
|
||||
puts ''
|
||||
puts "Use the following syntax:"
|
||||
puts "keydb-cli --cluster SUBCOMMAND [ARGUMENTS] [OPTIONS]".bold
|
||||
puts ''
|
||||
puts "Example:"
|
||||
if $command
|
||||
example = command_example $command, $args, $opts
|
||||
else
|
||||
example = "keydb-cli --cluster info 127.0.0.1:7000"
|
||||
end
|
||||
puts example.bold
|
||||
puts ''
|
||||
puts "To get help about all subcommands, type:"
|
||||
puts "keydb-cli --cluster help".bold
|
||||
puts ''
|
||||
exit 1
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
8
pkg/deb/debian/NEWS
Normal file
8
pkg/deb/debian/NEWS
Normal file
@ -0,0 +1,8 @@
|
||||
keydb (4:4.0.2-3) unstable; urgency=medium
|
||||
|
||||
This version drops the Debian-specific support for the
|
||||
/etc/keydb/keydb-{server,sentinel}.{pre,post}-{up,down}.d directories in
|
||||
favour of using systemd's ExecStartPre, ExecStartPost, ExecStopPre,
|
||||
ExecStopPost commands.
|
||||
|
||||
-- Chris Lamb <lamby@debian.org> Wed, 11 Oct 2017 22:55:00 -0400
|
131
pkg/deb/debian/bin/generate-systemd-service-files
Executable file
131
pkg/deb/debian/bin/generate-systemd-service-files
Executable file
@ -0,0 +1,131 @@
|
||||
#!/bin/sh
|
||||
|
||||
SYSTEMD_VER=$(systemctl --version | head -1 | cut -d' ' -f2)
|
||||
|
||||
if [ ${SYSTEMD_VER} -lt 237 ]
|
||||
then
|
||||
SYSTEMD_EXTRA=""
|
||||
else
|
||||
SYSTEMD_EXTRA=$(cat <<EOF
|
||||
|
||||
RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX
|
||||
#MemoryDenyWriteExecute=true
|
||||
ProtectKernelModules=true
|
||||
ProtectKernelTunables=true
|
||||
ProtectControlGroups=true
|
||||
RestrictRealtime=true
|
||||
RestrictNamespaces=true
|
||||
EOF
|
||||
)
|
||||
fi
|
||||
|
||||
for BINARY in keydb-server keydb-sentinel
|
||||
do
|
||||
for MODE in default templated
|
||||
do
|
||||
case "${BINARY}" in
|
||||
keydb-server)
|
||||
NAME="keydb"
|
||||
;;
|
||||
keydb-sentinel)
|
||||
NAME="sentinel"
|
||||
;;
|
||||
esac
|
||||
|
||||
case "${MODE}" in
|
||||
default)
|
||||
EXTRA="Alias=${NAME}.service"
|
||||
TARGET="debian/${BINARY}.service"
|
||||
NAMESPACED="${NAME}"
|
||||
DESCRIPTION="Advanced key-value store"
|
||||
;;
|
||||
templated)
|
||||
EXTRA=""
|
||||
TARGET="debian/${BINARY}@.service"
|
||||
NAMESPACED="${NAME}-%i"
|
||||
DESCRIPTION="Advanced key-value store (%I)"
|
||||
;;
|
||||
esac
|
||||
|
||||
: >${TARGET}
|
||||
|
||||
if [ "${MODE}" = "templated" ]
|
||||
then
|
||||
cat >> ${TARGET} <<EOF
|
||||
# Templated service file for ${BINARY}(1)
|
||||
#
|
||||
# Each instance of ${BINARY} requires its own configuration file:
|
||||
#
|
||||
# $ cp /etc/keydb/${NAME}.conf /etc/keydb/${NAME}-myname.conf
|
||||
# $ chown keydb:keydb /etc/keydb/${NAME}-myname.conf
|
||||
#
|
||||
# Ensure each instance is using their own database:
|
||||
#
|
||||
# $ sed -i -e 's@^dbfilename .*@dbfilename dump-myname.rdb@' /etc/keydb/${NAME}-myname.conf
|
||||
#
|
||||
# We then listen exlusively on UNIX sockets to avoid TCP port collisions:
|
||||
#
|
||||
# $ sed -i -e 's@^port .*@port 0@' /etc/keydb/${NAME}-myname.conf
|
||||
# $ sed -i -e 's@^\\(# \\)\\{0,1\\}unixsocket .*@unixsocket /var/run/${NAME}-myname/${BINARY}.sock@' /etc/keydb/${NAME}-myname.conf
|
||||
#
|
||||
# ... and ensure we are logging, etc. in a unique location:
|
||||
#
|
||||
# $ sed -i -e 's@^logfile .*@logfile /var/log/keydb/${BINARY}-myname.log@' /etc/keydb/${NAME}-myname.conf
|
||||
# $ sed -i -e 's@^pidfile .*@pidfile /var/run/keydb-myname/${BINARY}.pid@' /etc/keydb/${NAME}-myname.conf
|
||||
#
|
||||
# We can then start the service as follows, validating we are using our own
|
||||
# configuration:
|
||||
#
|
||||
# $ systemctl start ${BINARY}@myname.service
|
||||
# $ keydb-cli -s /var/run/${NAME}-myname/${BINARY}.sock info | grep config_file
|
||||
#
|
||||
# -- Chris Lamb <lamby@debian.org> Mon, 09 Oct 2017 22:17:24 +0100
|
||||
EOF
|
||||
fi
|
||||
|
||||
cat >> ${TARGET} <<EOF
|
||||
[Unit]
|
||||
Description=${DESCRIPTION}
|
||||
After=network.target
|
||||
Documentation=http://keydb.io/documentation, man:${BINARY}(1)
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
ExecStart=/usr/bin/${BINARY} /etc/keydb/${NAMESPACED}.conf
|
||||
ExecStop=/bin/kill -s TERM \$MAINPID
|
||||
PIDFile=/var/run/${NAMESPACED}/${BINARY}.pid
|
||||
TimeoutStopSec=0
|
||||
Restart=always
|
||||
User=keydb
|
||||
Group=keydb
|
||||
RuntimeDirectory=${NAMESPACED}
|
||||
RuntimeDirectoryMode=2755
|
||||
|
||||
UMask=007
|
||||
PrivateTmp=yes
|
||||
LimitNOFILE=65535
|
||||
PrivateDevices=yes
|
||||
ProtectHome=yes
|
||||
ReadOnlyDirectories=/
|
||||
ReadWriteDirectories=-/var/lib/keydb
|
||||
ReadWriteDirectories=-/var/log/keydb
|
||||
ReadWriteDirectories=-/var/run/${NAMESPACED}
|
||||
|
||||
NoNewPrivileges=true
|
||||
CapabilityBoundingSet=CAP_SETGID CAP_SETUID CAP_SYS_RESOURCE${SYSTEMD_EXTRA}
|
||||
|
||||
# ${BINARY} can write to its own config file when in cluster mode so we
|
||||
# permit writing there by default. If you are not using this feature, it is
|
||||
# recommended that you replace the following lines with "ProtectSystem=full".
|
||||
ProtectSystem=true
|
||||
ReadWriteDirectories=-/etc/keydb
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
if [ "${EXTRA}" != "" ]
|
||||
then
|
||||
echo "${EXTRA}" >> "${TARGET}"
|
||||
fi
|
||||
done
|
||||
done
|
@ -1,14 +1,8 @@
|
||||
keydb (5:5.3.2-1chl1~bionic1) bionic; urgency=medium
|
||||
keydb (5:5.3.3-1~bionic1) bionic; urgency=medium
|
||||
|
||||
* 5.3.2 Adding CRON and additional multi master support
|
||||
* 5.3.3 Updating deb source package and naming convention.
|
||||
|
||||
-- Ben Schermel <ben@eqalpha.com> Sun, 1 Mar 2020 22:00:37 +0000
|
||||
|
||||
keydb (5:5.3.0-1chl1~bionic1) bionic; urgency=medium
|
||||
|
||||
* 5.3.0 Now hosting our own PPA in order to include Pro binaries
|
||||
|
||||
-- Ben Schermel <ben@eqalpha.com> Sun, 19 Jan 2020 8:00:37 +0000
|
||||
-- Ben Schermel <ben@eqalpha.com> Fri, 25 Oct 2019 8:00:37 +0000
|
||||
|
||||
keydb (5:5.1.12-1chl1~bionic1) bionic; urgency=medium
|
||||
|
1
pkg/deb/debian/compat
Normal file
1
pkg/deb/debian/compat
Normal file
@ -0,0 +1 @@
|
||||
9
|
81
pkg/deb/debian/control
Normal file
81
pkg/deb/debian/control
Normal file
@ -0,0 +1,81 @@
|
||||
Source: keydb
|
||||
Section: database
|
||||
Priority: optional
|
||||
Maintainer: Ben Schermel <ben@eqalpha.com>
|
||||
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 <!nocheck>,
|
||||
build-essential <!nocheck>,
|
||||
tcl <!nocheck>,
|
||||
tcl-dev <!nocheck>,
|
||||
uuid-dev <!nocheck>,
|
||||
libcurl4-openssl-dev <!nocheck>,
|
||||
nasm <!nocheck>,
|
||||
autotools-dev <!nocheck>,
|
||||
autoconf <!nocheck>,
|
||||
libjemalloc-dev <!nocheck>
|
||||
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
|
||||
|
||||
Package: keydb
|
||||
Architecture: all
|
||||
Depends:
|
||||
keydb-server (<< ${binary:Version}.1~),
|
||||
keydb-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
|
||||
is non-volatile. keydb additionally provides native support for atomically
|
||||
manipulating and querying data structures such as lists and sets.
|
||||
.
|
||||
The dataset is stored entirely in memory and periodically flushed to disk.
|
||||
.
|
||||
This package depends on the keydb-server package.
|
||||
|
||||
Package: keydb-sentinel
|
||||
Architecture: any
|
||||
Depends:
|
||||
lsb-base (>= 3.2-14),
|
||||
keydb-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
|
||||
is non-volatile. keydb additionally provides native support for atomically
|
||||
manipulating and querying data structures such as lists and sets.
|
||||
.
|
||||
This package contains the keydb Sentinel monitoring software.
|
||||
|
||||
Package: keydb-server
|
||||
Architecture: any
|
||||
Depends:
|
||||
lsb-base (>= 3.2-14),
|
||||
keydb-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
|
||||
is non-volatile. keydb additionally provides native support for atomically
|
||||
manipulating and querying data structures such as lists and sets.
|
||||
.
|
||||
The dataset is stored entirely in memory and periodically flushed to disk.
|
||||
|
||||
Package: keydb-tools
|
||||
Architecture: any
|
||||
Depends:
|
||||
adduser,
|
||||
${misc:Depends},
|
||||
${shlibs:Depends},
|
||||
Description: Persistent key-value database with network interface (client)
|
||||
keydb is a key-value database in a similar vein to memcache but the dataset
|
||||
is non-volatile. keydb additionally provides native support for atomically
|
||||
manipulating and querying data structures such as lists and sets.
|
||||
.
|
||||
This package contains the command line client and other tools.
|
0
pkg/deb/deb_source/all/usr/share/doc/keydb/copyright → pkg/deb/debian/copyright
Executable file → Normal file
0
pkg/deb/deb_source/all/usr/share/doc/keydb/copyright → pkg/deb/debian/copyright
Executable file → Normal file
1
pkg/deb/debian/files
Normal file
1
pkg/deb/debian/files
Normal file
@ -0,0 +1 @@
|
||||
keydb_5.3.3-1~bionic1_source.buildinfo database optional
|
3
pkg/deb/debian/gbp.conf
Normal file
3
pkg/deb/debian/gbp.conf
Normal file
@ -0,0 +1,3 @@
|
||||
[DEFAULT]
|
||||
debian-branch=debian/sid
|
||||
upstream-branch=upstream/sid
|
68
pkg/deb/debian/keydb-benchmark.1
Normal file
68
pkg/deb/debian/keydb-benchmark.1
Normal file
@ -0,0 +1,68 @@
|
||||
.TH KEYDB-BENCHMARK 1 "August 17, 2019"
|
||||
.SH NAME
|
||||
keydb-benchmark \- Benechmark a KeyDB instance
|
||||
.SH SYNOPSIS
|
||||
.B redis-benchmark
|
||||
[\-h <host>] [\-p <port>] [\-c <clients>] [\-n <requests]> [\-k <boolean>]
|
||||
.SH DESCRIPTION
|
||||
KeyDB is a key-value database. It is similar to memcached but the dataset is
|
||||
not volatile and other datatypes (such as lists and sets) are natively
|
||||
supported.
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
\-h hostname
|
||||
Server hostname (default 127.0.0.1)
|
||||
.TP
|
||||
\-p port
|
||||
Server port (default 6379)
|
||||
.TP
|
||||
\-s socket
|
||||
Server socket (overrides host and port)
|
||||
.TP
|
||||
\-a password
|
||||
Password for KeyDB Auth
|
||||
.TP
|
||||
\-c clients
|
||||
Number of parallel connections (default 50)
|
||||
.TP
|
||||
\-n requests
|
||||
Total number of requests (default 100000)
|
||||
.TP
|
||||
\-d size
|
||||
Data size of SET/GET value in bytes (default 2)
|
||||
.TP
|
||||
\-dbnum db
|
||||
SELECT the specified db number (default 0)
|
||||
.TP
|
||||
\-k boolean
|
||||
1=keep alive 0=reconnect (default 1)
|
||||
.TP
|
||||
\-r keyspacelen
|
||||
Use random keys for SET/GET/INCR, random values for SADD Using this option the
|
||||
benchmark will get/set keys in the form mykey_rand000000012456 instead of
|
||||
constant keys, the <keyspacelen> argument determines the max number of values
|
||||
for the random number. For instance if set to 10 only rand000000000000 -
|
||||
rand000000000009 range will be allowed.
|
||||
.TP
|
||||
\-P numreq
|
||||
Pipeline <numreq> requests. Default 1 (no pipeline).
|
||||
.TP
|
||||
\-q
|
||||
Quiet. Just show query/sec values
|
||||
.TP
|
||||
\-\-csv
|
||||
Ourput in CSV format
|
||||
.TP
|
||||
\-l
|
||||
Loop. Run the tests forever
|
||||
.TP
|
||||
\-I
|
||||
Idle mode. Just open N idle connections and wait.
|
||||
.TP
|
||||
\-D
|
||||
Debug mode. more verbose.
|
||||
.SH AUTHOR
|
||||
\fBkeydb-benchmark\fP was written by John Sully, originating as a fork of Redis. Redis was written by Salvatore Sanfilippo.
|
||||
.PP
|
||||
This manual page was written by Chris Lamb <lamby@debian.org> for the Debian
|
||||
project (but may be used by others). Modified by Ben Schermel <ben@eqalpha.com>
|
17
pkg/deb/debian/keydb-check-aof.1
Normal file
17
pkg/deb/debian/keydb-check-aof.1
Normal file
@ -0,0 +1,17 @@
|
||||
.TH KEYDB-CHECK-AOF 1 "August 17, 2019"
|
||||
.SH NAME
|
||||
keydb-check-aof \- Check integrity of a KeyDB .AOF file
|
||||
.SH SYNOPSIS
|
||||
.B keydb-check-aof
|
||||
filename
|
||||
.SH DESCRIPTION
|
||||
KeyDB is a key-value database. It is similar to memcached but the dataset is
|
||||
not volatile and other datatypes (such as lists and sets) are natively
|
||||
supported.
|
||||
.PP
|
||||
This utility checks the integrity of a dumped .AOF file.
|
||||
.SH AUTHOR
|
||||
\fBkeydb-check-aof\fP was written by John Sully, originating as a fork of Redis. Redis was written by Salvatore Sanfilippo.
|
||||
.PP
|
||||
This manual page was written by Chris Lamb <lamby@debian.org> for the Debian
|
||||
project (but may be used by others). Modified by Ben Schermel <ben@eqalpha.com>
|
17
pkg/deb/debian/keydb-check-rdb.1
Normal file
17
pkg/deb/debian/keydb-check-rdb.1
Normal file
@ -0,0 +1,17 @@
|
||||
.TH KEYDB-CHECK-RDB 1 "August 17, 2019"
|
||||
.SH NAME
|
||||
keydb-check-rdb \- Check integrity of KeyDB dumped database file
|
||||
.SH SYNOPSIS
|
||||
.B keydb-check-rdb
|
||||
filename
|
||||
.SH DESCRIPTION
|
||||
KeyDB is a key-value database. It is similar to memcached but the dataset is
|
||||
not volatile and other datatypes (such as lists and sets) are natively
|
||||
supported.
|
||||
.PP
|
||||
This utility checks the integrity of a dumped database file.
|
||||
.SH AUTHOR
|
||||
\fBredis-check-rdb\fP was written by John Sully, originating as a fork of Redis. Redis was written by Salvatore Sanfilippo.
|
||||
.PP
|
||||
This manual page was written by Chris Lamb <lamby@debian.org> for the Debian
|
||||
project (but may be used by others). Modified by Ben Schermel <ben@eqalpha.com>
|
19
pkg/deb/debian/keydb-cli.1
Normal file
19
pkg/deb/debian/keydb-cli.1
Normal file
@ -0,0 +1,19 @@
|
||||
.TH KEYDB-CLI 1 "August 17, 2019"
|
||||
.SH NAME
|
||||
keydb-cli \- Command-line client to keydb-server
|
||||
.SH SYNOPSIS
|
||||
.B keydb-cli
|
||||
.RI [options]
|
||||
.SH DESCRIPTION
|
||||
KeyDB is a key-value database. It is similar to memcached but the dataset is
|
||||
not volatile and other datatypes (such as lists and sets) are natively
|
||||
supported.
|
||||
.PP
|
||||
\fBkeydb-cli\fP provides a simple command-line interface to a KeyDB server.
|
||||
.SH OPTIONS
|
||||
See \fBkeydb-doc\fP for more information on the commands KeyDB accepts.
|
||||
.SH AUTHOR
|
||||
\fBkeydb-cli\fP was written by John Sully, originating as a fork of Redis. Redis was written by Salvatore Sanfilippo.
|
||||
.PP
|
||||
This manual page was written by Chris Lamb <lamby@debian.org> for the Debian
|
||||
project (but may be used by others). Modified by Ben Schermel <ben@eqalpha.com>
|
23
pkg/deb/debian/keydb-sentinel.1
Normal file
23
pkg/deb/debian/keydb-sentinel.1
Normal file
@ -0,0 +1,23 @@
|
||||
.TH KEYDB-SENTINEL 1 "August 17, 2019"
|
||||
.SH NAME
|
||||
keydb-sentinel \- Persistent key-value database (cluster mode)
|
||||
.SH SYNOPSIS
|
||||
.B keydb-sentinel
|
||||
.RI configfile
|
||||
.SH DESCRIPTION
|
||||
KeyDB is a key-value database. It is similar to memcached but the dataset is
|
||||
not volatile and other datatypes (such as lists and sets) are natively
|
||||
supported.
|
||||
.PP
|
||||
.SH OPTIONS
|
||||
.IP "configfile"
|
||||
Read options from specified configuration file.
|
||||
.SH NOTES
|
||||
On Debian GNU/Linux systems, \fBkeydb-sentinel\fP is typically started via the
|
||||
\fB/etc/init.d/keydb-sentinel\fP initscript, not manually. This defaults to using
|
||||
\fB/etc/keydb/sentinel.conf\fP as a configuration file.
|
||||
.SH AUTHOR
|
||||
\fBkeydb-sentinel\fP was written by John Sully, originating as a fork of Redis. Redis was written by Salvatore Sanfilippo.
|
||||
.PP
|
||||
This manual page was written by Chris Lamb <lamby@debian.org> for the Debian
|
||||
project (but may be used by others). Modified by Ben Schermel <ben@eqalpha.com>
|
8
pkg/deb/debian/keydb-sentinel.default
Executable file
8
pkg/deb/debian/keydb-sentinel.default
Executable file
@ -0,0 +1,8 @@
|
||||
# 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
|
89
pkg/deb/debian/keydb-sentinel.init
Executable file
89
pkg/deb/debian/keydb-sentinel.init
Executable file
@ -0,0 +1,89 @@
|
||||
#! /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
|
2
pkg/deb/debian/keydb-sentinel.install
Normal file
2
pkg/deb/debian/keydb-sentinel.install
Normal file
@ -0,0 +1,2 @@
|
||||
debian/keydb-sentinel.service /lib/systemd/system
|
||||
sentinel.conf /etc/keydb
|
1
pkg/deb/debian/keydb-sentinel.links
Normal file
1
pkg/deb/debian/keydb-sentinel.links
Normal file
@ -0,0 +1 @@
|
||||
usr/bin/keydb-check-rdb usr/bin/keydb-sentinel
|
7
pkg/deb/debian/keydb-sentinel.logrotate
Normal file
7
pkg/deb/debian/keydb-sentinel.logrotate
Normal file
@ -0,0 +1,7 @@
|
||||
/var/log/keydb/keydb-sentinel*.log {
|
||||
weekly
|
||||
missingok
|
||||
rotate 12
|
||||
compress
|
||||
notifempty
|
||||
}
|
4
pkg/deb/debian/keydb-sentinel.maintscript
Normal file
4
pkg/deb/debian/keydb-sentinel.maintscript
Normal file
@ -0,0 +1,4 @@
|
||||
rm_conffile /etc/keydb/keydb-sentinel.post-down.d/00_example 4:4.0.2-3~
|
||||
rm_conffile /etc/keydb/keydb-sentinel.post-up.d/00_example 4:4.0.2-3~
|
||||
rm_conffile /etc/keydb/keydb-sentinel.pre-down.d/00_example 4:4.0.2-3~
|
||||
rm_conffile /etc/keydb/keydb-sentinel.pre-up.d/00_example 4:4.0.2-3~
|
1
pkg/deb/debian/keydb-sentinel.manpages
Normal file
1
pkg/deb/debian/keydb-sentinel.manpages
Normal file
@ -0,0 +1 @@
|
||||
debian/keydb-sentinel.1
|
24
pkg/deb/debian/keydb-sentinel.postinst
Normal file
24
pkg/deb/debian/keydb-sentinel.postinst
Normal file
@ -0,0 +1,24 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -eu
|
||||
|
||||
USER="keydb"
|
||||
GROUP="$USER"
|
||||
CONFFILE="/etc/keydb/sentinel.conf"
|
||||
|
||||
if [ "$1" = "configure" ]
|
||||
then
|
||||
if ! dpkg-statoverride --list ${CONFFILE} >/dev/null 2>&1
|
||||
then
|
||||
dpkg-statoverride --update --add ${USER} ${GROUP} 640 ${CONFFILE}
|
||||
fi
|
||||
fi
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
if [ "$1" = "configure" ]
|
||||
then
|
||||
find /etc/keydb -maxdepth 1 -type d -name 'keydb-sentinel.*.d' -empty -delete
|
||||
fi
|
||||
|
||||
exit 0
|
14
pkg/deb/debian/keydb-sentinel.postrm
Normal file
14
pkg/deb/debian/keydb-sentinel.postrm
Normal file
@ -0,0 +1,14 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -eu
|
||||
|
||||
CONFFILE="/etc/keydb/sentinel.conf"
|
||||
|
||||
if [ "$1" = "purge" ]
|
||||
then
|
||||
dpkg-statoverride --remove ${CONFFILE} || test $? -eq 2
|
||||
fi
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
exit 0
|
23
pkg/deb/debian/keydb-server.1
Normal file
23
pkg/deb/debian/keydb-server.1
Normal file
@ -0,0 +1,23 @@
|
||||
.TH KEYDB-SERVER 1 "August 17, 2019"
|
||||
.SH NAME
|
||||
keydb-server \- Persistent key-value database
|
||||
.SH SYNOPSIS
|
||||
.B keydb-server
|
||||
.RI configfile
|
||||
.SH DESCRIPTION
|
||||
KeyDB is a key-value database. It is similar to memcached but the dataset is
|
||||
not volatile and other datatypes (such as lists and sets) are natively
|
||||
supported.
|
||||
.PP
|
||||
.SH OPTIONS
|
||||
.IP "configfile"
|
||||
Read options from specified configuration file.
|
||||
.SH NOTES
|
||||
On Debian GNU/Linux systems, \fBkeydb-server\fP is typically started via the
|
||||
\fB/etc/init.d/keydb-server\fP initscript, not manually. This defaults to using
|
||||
\fB/etc/keydb/keydb.conf\fP as a configuration file.
|
||||
.SH AUTHOR
|
||||
\fBkeydb-server\fP was written by John Sully, originating as a fork of Redis. Redis was written by Salvatore Sanfilippo.
|
||||
.PP
|
||||
This manual page was written by Chris Lamb <lamby@debian.org> for the Debian
|
||||
project (but may be used by others). Modified by Ben Schermel <ben@eqalpha.com>
|
7
pkg/deb/debian/keydb-server.default
Executable file
7
pkg/deb/debian/keydb-server.default
Executable file
@ -0,0 +1,7 @@
|
||||
# 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
|
1
pkg/deb/debian/keydb-server.docs
Normal file
1
pkg/deb/debian/keydb-server.docs
Normal file
@ -0,0 +1 @@
|
||||
README.md
|
89
pkg/deb/debian/keydb-server.init
Executable file
89
pkg/deb/debian/keydb-server.init
Executable file
@ -0,0 +1,89 @@
|
||||
#! /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
|
2
pkg/deb/debian/keydb-server.install
Normal file
2
pkg/deb/debian/keydb-server.install
Normal file
@ -0,0 +1,2 @@
|
||||
debian/keydb-server.service /lib/systemd/system
|
||||
pkg/deb/source_build/conf/keydb.conf /etc/keydb
|
1
pkg/deb/debian/keydb-server.links
Normal file
1
pkg/deb/debian/keydb-server.links
Normal file
@ -0,0 +1 @@
|
||||
usr/bin/keydb-check-rdb usr/bin/keydb-server
|
7
pkg/deb/debian/keydb-server.logrotate
Normal file
7
pkg/deb/debian/keydb-server.logrotate
Normal file
@ -0,0 +1,7 @@
|
||||
/var/log/keydb/keydb-server*.log {
|
||||
weekly
|
||||
missingok
|
||||
rotate 12
|
||||
compress
|
||||
notifempty
|
||||
}
|
4
pkg/deb/debian/keydb-server.maintscript
Normal file
4
pkg/deb/debian/keydb-server.maintscript
Normal file
@ -0,0 +1,4 @@
|
||||
rm_conffile /etc/keydb/keydb-server.post-down.d/00_example 4:4.0.2-3~
|
||||
rm_conffile /etc/keydb/keydb-server.post-up.d/00_example 4:4.0.2-3~
|
||||
rm_conffile /etc/keydb/keydb-server.pre-down.d/00_example 4:4.0.2-3~
|
||||
rm_conffile /etc/keydb/keydb-server.pre-up.d/00_example 4:4.0.2-3~
|
1
pkg/deb/debian/keydb-server.manpages
Normal file
1
pkg/deb/debian/keydb-server.manpages
Normal file
@ -0,0 +1 @@
|
||||
debian/keydb-server.1
|
24
pkg/deb/debian/keydb-server.postinst
Normal file
24
pkg/deb/debian/keydb-server.postinst
Normal file
@ -0,0 +1,24 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -eu
|
||||
|
||||
USER="keydb"
|
||||
GROUP="$USER"
|
||||
CONFFILE="/etc/keydb/keydb.conf"
|
||||
|
||||
if [ "$1" = "configure" ]
|
||||
then
|
||||
if ! dpkg-statoverride --list ${CONFFILE} >/dev/null 2>&1
|
||||
then
|
||||
dpkg-statoverride --update --add ${USER} ${GROUP} 640 ${CONFFILE}
|
||||
fi
|
||||
fi
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
if [ "$1" = "configure" ]
|
||||
then
|
||||
find /etc/keydb -maxdepth 1 -type d -name 'keydb-server.*.d' -empty -delete
|
||||
fi
|
||||
|
||||
exit 0
|
14
pkg/deb/debian/keydb-server.postrm
Normal file
14
pkg/deb/debian/keydb-server.postrm
Normal file
@ -0,0 +1,14 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -eu
|
||||
|
||||
CONFFILE="/etc/keydb/keydb.conf"
|
||||
|
||||
if [ "${1}" = "purge" ]
|
||||
then
|
||||
dpkg-statoverride --remove ${CONFFILE} || test $? -eq 2
|
||||
fi
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
exit 0
|
2
pkg/deb/debian/keydb-tools.examples
Normal file
2
pkg/deb/debian/keydb-tools.examples
Normal file
@ -0,0 +1,2 @@
|
||||
src/redis-trib.rb
|
||||
utils/lru
|
5
pkg/deb/debian/keydb-tools.install
Normal file
5
pkg/deb/debian/keydb-tools.install
Normal file
@ -0,0 +1,5 @@
|
||||
debian/bash_completion.d/* /usr/share/bash-completion/completions
|
||||
src/keydb-benchmark /usr/bin
|
||||
src/keydb-check-aof /usr/bin
|
||||
src/keydb-check-rdb /usr/bin
|
||||
src/keydb-cli /usr/bin
|
4
pkg/deb/debian/keydb-tools.manpages
Normal file
4
pkg/deb/debian/keydb-tools.manpages
Normal file
@ -0,0 +1,4 @@
|
||||
debian/keydb-benchmark.1
|
||||
debian/keydb-check-aof.1
|
||||
debian/keydb-check-rdb.1
|
||||
debian/keydb-cli.1
|
2
pkg/deb/deb_source/tools/DEBIAN/postinst → pkg/deb/debian/keydb-tools.postinst
Executable file → Normal file
2
pkg/deb/deb_source/tools/DEBIAN/postinst → pkg/deb/debian/keydb-tools.postinst
Executable file → Normal file
@ -42,6 +42,6 @@ then
|
||||
Setup_dir /var/lib/keydb ${USER}:${USER} 750
|
||||
fi
|
||||
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
exit 0
|
2
pkg/deb/deb_source/tools/DEBIAN/postrm → pkg/deb/debian/keydb-tools.postrm
Executable file → Normal file
2
pkg/deb/deb_source/tools/DEBIAN/postrm → pkg/deb/debian/keydb-tools.postrm
Executable file → Normal file
@ -8,6 +8,6 @@ then
|
||||
rm -rf /var/lib/keydb /var/log/keydb
|
||||
fi
|
||||
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
exit 0
|
21
pkg/deb/debian/patches/0001-fix-ftbfs-on-kfreebsd.patch
Normal file
21
pkg/deb/debian/patches/0001-fix-ftbfs-on-kfreebsd.patch
Normal file
@ -0,0 +1,21 @@
|
||||
From: Chris Lamb <lamby@debian.org>
|
||||
Date: Fri, 30 Oct 2015 10:53:42 +0000
|
||||
Subject: fix-ftbfs-on-kfreebsd
|
||||
|
||||
---
|
||||
src/fmacros.h | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/fmacros.h b/src/fmacros.h
|
||||
index 6e56c75..d490aec 100644
|
||||
--- a/src/fmacros.h
|
||||
+++ b/src/fmacros.h
|
||||
@@ -41,7 +41,7 @@
|
||||
#define _ALL_SOURCE
|
||||
#endif
|
||||
|
||||
-#if defined(__linux__) || defined(__OpenBSD__)
|
||||
+#if defined(__linux__) || defined(__OpenBSD__) || defined(__GLIBC__)
|
||||
#define _XOPEN_SOURCE 700
|
||||
/*
|
||||
* On NetBSD, _XOPEN_SOURCE undefines _NETBSD_SOURCE and
|
@ -0,0 +1,84 @@
|
||||
From: Chris Lamb <lamby@debian.org>
|
||||
Date: Wed, 3 Oct 2018 19:24:16 +0100
|
||||
Subject: Add support for a USE_SYSTEM_HIREDIS flag.
|
||||
|
||||
---
|
||||
deps/Makefile | 2 ++
|
||||
src/Makefile | 19 ++++++++++++++-----
|
||||
2 files changed, 16 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/deps/Makefile b/deps/Makefile
|
||||
index 2ed7736..d6b8e3e 100644
|
||||
--- a/deps/Makefile
|
||||
+++ b/deps/Makefile
|
||||
@@ -33,7 +33,9 @@ ifneq ($(shell sh -c '[ -f .make-ldflags ] && cat .make-ldflags || echo none'),
|
||||
endif
|
||||
|
||||
distclean:
|
||||
+ifneq ($(USE_SYSTEM_HIREDIS),yes)
|
||||
-(cd hiredis && $(MAKE) clean) > /dev/null || true
|
||||
+endif
|
||||
-(cd linenoise && $(MAKE) clean) > /dev/null || true
|
||||
ifneq ($(USE_SYSTEM_LUA),yes)
|
||||
-(cd lua && $(MAKE) clean) > /dev/null || true
|
||||
diff --git a/src/Makefile b/src/Makefile
|
||||
index 49085f2..9e7e6f1 100644
|
||||
--- a/src/Makefile
|
||||
+++ b/src/Makefile
|
||||
@@ -16,7 +16,7 @@ release_hdr := $(shell sh -c './mkreleasehdr.sh')
|
||||
uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not')
|
||||
uname_M := $(shell sh -c 'uname -m 2>/dev/null || echo not')
|
||||
OPTIMIZATION?=-O2
|
||||
-DEPENDENCY_TARGETS=hiredis linenoise
|
||||
+DEPENDENCY_TARGETS=linenoise
|
||||
NODEPS:=clean distclean
|
||||
|
||||
# Default settings
|
||||
@@ -107,7 +107,7 @@ endif
|
||||
endif
|
||||
endif
|
||||
# Include paths to dependencies
|
||||
-FINAL_CFLAGS+= -I../deps/hiredis -I../deps/linenoise
|
||||
+FINAL_CFLAGS+= -I../deps/linenoise
|
||||
|
||||
ifeq ($(MALLOC),tcmalloc)
|
||||
FINAL_CFLAGS+= -DUSE_TCMALLOC
|
||||
@@ -139,6 +139,15 @@ else
|
||||
FINAL_LIBS := ../deps/lua/src/liblua.a $(FINAL_LIBS)
|
||||
endif
|
||||
|
||||
+ifeq ($(USE_SYSTEM_HIREDIS),yes)
|
||||
+ FINAL_LIBS+= -lhiredis
|
||||
+ FINAL_CFLAGS+= -I/usr/include/hiredis
|
||||
+else
|
||||
+ DEPENDENCY_TARGETS += hiredis
|
||||
+ FINAL_LIBS+= ../deps/hiredis/libhiredis.a
|
||||
+ FINAL_CFLAGS+= -I../deps/hiredis
|
||||
+endif
|
||||
+
|
||||
REDIS_CC=$(QUIET_CC)$(CC) $(FINAL_CFLAGS) $(CPPFLAGS)
|
||||
REDIS_LD=$(QUIET_LINK)$(CC) $(FINAL_LDFLAGS)
|
||||
REDIS_INSTALL=$(QUIET_INSTALL)$(INSTALL)
|
||||
@@ -210,7 +219,7 @@ endif
|
||||
|
||||
# redis-server
|
||||
$(REDIS_SERVER_NAME): $(REDIS_SERVER_OBJ)
|
||||
- $(REDIS_LD) -o $@ $^ ../deps/hiredis/libhiredis.a $(FINAL_LIBS)
|
||||
+ $(REDIS_LD) -o $@ $^ $(FINAL_LIBS)
|
||||
|
||||
# redis-sentinel
|
||||
$(REDIS_SENTINEL_NAME): $(REDIS_SERVER_NAME)
|
||||
@@ -226,11 +235,11 @@ $(REDIS_CHECK_AOF_NAME): $(REDIS_SERVER_NAME)
|
||||
|
||||
# redis-cli
|
||||
$(REDIS_CLI_NAME): $(REDIS_CLI_OBJ)
|
||||
- $(REDIS_LD) -o $@ $^ ../deps/hiredis/libhiredis.a ../deps/linenoise/linenoise.o $(FINAL_LIBS)
|
||||
+ $(REDIS_LD) -o $@ $^ ../deps/linenoise/linenoise.o $(FINAL_LIBS)
|
||||
|
||||
# redis-benchmark
|
||||
$(REDIS_BENCHMARK_NAME): $(REDIS_BENCHMARK_OBJ)
|
||||
- $(REDIS_LD) -o $@ $^ ../deps/hiredis/libhiredis.a $(FINAL_LIBS)
|
||||
+ $(REDIS_LD) -o $@ $^ $(FINAL_LIBS)
|
||||
|
||||
dict-benchmark: dict.c zmalloc.c sds.c siphash.c
|
||||
$(REDIS_CC) $(FINAL_CFLAGS) $^ -D DICT_BENCHMARK_MAIN -o $@ $(FINAL_LIBS)
|
@ -0,0 +1,107 @@
|
||||
From: Chris Lamb <lamby@debian.org>
|
||||
Date: Sat, 25 Aug 2018 17:52:13 +0200
|
||||
Subject: Add support for USE_SYSTEM_JEMALLOC flag.
|
||||
|
||||
https://github.com/antirez/redis/pull/5279
|
||||
---
|
||||
deps/Makefile | 2 ++
|
||||
src/Makefile | 5 +++++
|
||||
src/object.c | 5 +++++
|
||||
src/zmalloc.c | 10 ++++++++++
|
||||
src/zmalloc.h | 4 ++++
|
||||
5 files changed, 26 insertions(+)
|
||||
|
||||
diff --git a/deps/Makefile b/deps/Makefile
|
||||
index eb35c1e..1342fac 100644
|
||||
--- a/deps/Makefile
|
||||
+++ b/deps/Makefile
|
||||
@@ -36,7 +36,9 @@ distclean:
|
||||
-(cd hiredis && $(MAKE) clean) > /dev/null || true
|
||||
-(cd linenoise && $(MAKE) clean) > /dev/null || true
|
||||
-(cd lua && $(MAKE) clean) > /dev/null || true
|
||||
+ifneq ($(USE_SYSTEM_JEMALLOC),yes)
|
||||
-(cd jemalloc && [ -f Makefile ] && $(MAKE) distclean) > /dev/null || true
|
||||
+endif
|
||||
-(rm -f .make-*)
|
||||
|
||||
.PHONY: distclean
|
||||
diff --git a/src/Makefile b/src/Makefile
|
||||
index 0ff6e8b..51363fe 100644
|
||||
--- a/src/Makefile
|
||||
+++ b/src/Makefile
|
||||
@@ -120,10 +120,15 @@ ifeq ($(MALLOC),tcmalloc_minimal)
|
||||
endif
|
||||
|
||||
ifeq ($(MALLOC),jemalloc)
|
||||
+ifeq ($(USE_SYSTEM_JEMALLOC),yes)
|
||||
+ FINAL_CFLAGS+= -DUSE_JEMALLOC -I/usr/include/jemalloc/include
|
||||
+ FINAL_LIBS := -ljemalloc $(FINAL_LIBS)
|
||||
+else
|
||||
DEPENDENCY_TARGETS+= jemalloc
|
||||
FINAL_CFLAGS+= -DUSE_JEMALLOC -I../deps/jemalloc/include
|
||||
FINAL_LIBS := ../deps/jemalloc/lib/libjemalloc.a $(FINAL_LIBS)
|
||||
endif
|
||||
+endif
|
||||
|
||||
REDIS_CC=$(QUIET_CC)$(CC) $(FINAL_CFLAGS) $(CPPFLAGS)
|
||||
REDIS_LD=$(QUIET_LINK)$(CC) $(FINAL_LDFLAGS)
|
||||
diff --git a/src/object.c b/src/object.c
|
||||
index 6987e1e..e49c2c2 100644
|
||||
--- a/src/object.c
|
||||
+++ b/src/object.c
|
||||
@@ -36,6 +36,11 @@
|
||||
#define strtold(a,b) ((long double)strtod((a),(b)))
|
||||
#endif
|
||||
|
||||
+#if defined(USE_JEMALLOC) && (USE_SYSTEM_JEMALLOC == yes)
|
||||
+#define je_mallctl mallctl
|
||||
+#define je_malloc_stats_print malloc_stats_print
|
||||
+#endif
|
||||
+
|
||||
/* ===================== Creation and parsing of objects ==================== */
|
||||
|
||||
robj *createObject(int type, void *ptr) {
|
||||
diff --git a/src/zmalloc.c b/src/zmalloc.c
|
||||
index 2482f51..80e6571 100644
|
||||
--- a/src/zmalloc.c
|
||||
+++ b/src/zmalloc.c
|
||||
@@ -63,6 +63,15 @@ void zlibc_free(void *ptr) {
|
||||
#define realloc(ptr,size) tc_realloc(ptr,size)
|
||||
#define free(ptr) tc_free(ptr)
|
||||
#elif defined(USE_JEMALLOC)
|
||||
+#if USE_SYSTEM_JEMALLOC == yes
|
||||
+#define malloc(size) malloc(size)
|
||||
+#define calloc(count,size) calloc(count,size)
|
||||
+#define realloc(ptr,size) realloc(ptr,size)
|
||||
+#define free(ptr) free(ptr)
|
||||
+#define mallocx(size,flags) mallocx(size,flags)
|
||||
+#define dallocx(ptr,flags) dallocx(ptr,flags)
|
||||
+#define je_mallctl mallctl
|
||||
+#else
|
||||
#define malloc(size) je_malloc(size)
|
||||
#define calloc(count,size) je_calloc(count,size)
|
||||
#define realloc(ptr,size) je_realloc(ptr,size)
|
||||
@@ -70,6 +79,7 @@ void zlibc_free(void *ptr) {
|
||||
#define mallocx(size,flags) je_mallocx(size,flags)
|
||||
#define dallocx(ptr,flags) je_dallocx(ptr,flags)
|
||||
#endif
|
||||
+#endif
|
||||
|
||||
#define update_zmalloc_stat_alloc(__n) do { \
|
||||
size_t _n = (__n); \
|
||||
diff --git a/src/zmalloc.h b/src/zmalloc.h
|
||||
index 6fb19b0..62ccf29 100644
|
||||
--- a/src/zmalloc.h
|
||||
+++ b/src/zmalloc.h
|
||||
@@ -50,7 +50,11 @@
|
||||
#include <jemalloc/jemalloc.h>
|
||||
#if (JEMALLOC_VERSION_MAJOR == 2 && JEMALLOC_VERSION_MINOR >= 1) || (JEMALLOC_VERSION_MAJOR > 2)
|
||||
#define HAVE_MALLOC_SIZE 1
|
||||
+#if USE_SYSTEM_JEMALLOC == yes
|
||||
+#define zmalloc_size(p) malloc_usable_size(p)
|
||||
+#else
|
||||
#define zmalloc_size(p) je_malloc_usable_size(p)
|
||||
+#endif
|
||||
#else
|
||||
#error "Newer version of jemalloc required"
|
||||
#endif
|
@ -0,0 +1,75 @@
|
||||
From: Chris Lamb <lamby@debian.org>
|
||||
Date: Wed, 24 Jan 2018 22:06:35 +1100
|
||||
Subject: Use get_current_dir_name over PATHMAX, etc.
|
||||
|
||||
---
|
||||
src/aof.c | 3 ++-
|
||||
src/rdb.c | 7 ++++---
|
||||
2 files changed, 6 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/aof.c b/src/aof.c
|
||||
index 9723fc3..cc89847 100644
|
||||
--- a/src/aof.c
|
||||
+++ b/src/aof.c
|
||||
@@ -246,7 +246,7 @@ int startAppendOnly(void) {
|
||||
newfd = open(server.aof_filename,O_WRONLY|O_APPEND|O_CREAT,0644);
|
||||
serverAssert(server.aof_state == AOF_OFF);
|
||||
if (newfd == -1) {
|
||||
- char *cwdp = getcwd(cwd,MAXPATHLEN);
|
||||
+ char *cwdp = get_current_dir_name();
|
||||
|
||||
serverLog(LL_WARNING,
|
||||
"Redis needs to enable the AOF but can't open the "
|
||||
@@ -254,6 +254,7 @@ int startAppendOnly(void) {
|
||||
server.aof_filename,
|
||||
cwdp ? cwdp : "unknown",
|
||||
strerror(errno));
|
||||
+ zfree(cwdp);
|
||||
return C_ERR;
|
||||
}
|
||||
if (server.rdb_child_pid != -1) {
|
||||
diff --git a/src/rdb.c b/src/rdb.c
|
||||
index 3e43cb4..6058160 100644
|
||||
--- a/src/rdb.c
|
||||
+++ b/src/rdb.c
|
||||
@@ -1218,7 +1218,6 @@ werr: /* Write error. */
|
||||
/* Save the DB on disk. Return C_ERR on error, C_OK on success. */
|
||||
int rdbSave(char *filename, rdbSaveInfo *rsi) {
|
||||
char tmpfile[256];
|
||||
- char cwd[MAXPATHLEN]; /* Current working dir path for error messages. */
|
||||
FILE *fp;
|
||||
rio rdb;
|
||||
int error = 0;
|
||||
@@ -1226,13 +1225,14 @@ int rdbSave(char *filename, rdbSaveInfo *rsi) {
|
||||
snprintf(tmpfile,256,"temp-%d.rdb", (int) getpid());
|
||||
fp = fopen(tmpfile,"w");
|
||||
if (!fp) {
|
||||
- char *cwdp = getcwd(cwd,MAXPATHLEN);
|
||||
+ char *cwdp = get_current_dir_name();
|
||||
serverLog(LL_WARNING,
|
||||
"Failed opening the RDB file %s (in server root dir %s) "
|
||||
"for saving: %s",
|
||||
filename,
|
||||
cwdp ? cwdp : "unknown",
|
||||
strerror(errno));
|
||||
+ zfree(cwdp);
|
||||
return C_ERR;
|
||||
}
|
||||
|
||||
@@ -1254,7 +1254,7 @@ int rdbSave(char *filename, rdbSaveInfo *rsi) {
|
||||
/* Use RENAME to make sure the DB file is changed atomically only
|
||||
* if the generate DB file is ok. */
|
||||
if (rename(tmpfile,filename) == -1) {
|
||||
- char *cwdp = getcwd(cwd,MAXPATHLEN);
|
||||
+ char *cwdp = get_current_dir_name();
|
||||
serverLog(LL_WARNING,
|
||||
"Error moving temp DB file %s on the final "
|
||||
"destination %s (in server root dir %s): %s",
|
||||
@@ -1262,6 +1262,7 @@ int rdbSave(char *filename, rdbSaveInfo *rsi) {
|
||||
filename,
|
||||
cwdp ? cwdp : "unknown",
|
||||
strerror(errno));
|
||||
+ zfree(cwdp);
|
||||
unlink(tmpfile);
|
||||
return C_ERR;
|
||||
}
|
@ -0,0 +1,71 @@
|
||||
From: Chris Lamb <lamby@debian.org>
|
||||
Date: Sun, 26 Aug 2018 12:57:32 +0200
|
||||
Subject: Add support for a USE_SYSTEM_LUA flag.
|
||||
|
||||
https://github.com/antirez/redis/pull/5280
|
||||
---
|
||||
deps/Makefile | 2 ++
|
||||
src/Makefile | 15 ++++++++++++---
|
||||
2 files changed, 14 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/deps/Makefile b/deps/Makefile
|
||||
index 1342fac..2ed7736 100644
|
||||
--- a/deps/Makefile
|
||||
+++ b/deps/Makefile
|
||||
@@ -35,7 +35,9 @@ endif
|
||||
distclean:
|
||||
-(cd hiredis && $(MAKE) clean) > /dev/null || true
|
||||
-(cd linenoise && $(MAKE) clean) > /dev/null || true
|
||||
+ifneq ($(USE_SYSTEM_LUA),yes)
|
||||
-(cd lua && $(MAKE) clean) > /dev/null || true
|
||||
+endif
|
||||
ifneq ($(USE_SYSTEM_JEMALLOC),yes)
|
||||
-(cd jemalloc && [ -f Makefile ] && $(MAKE) distclean) > /dev/null || true
|
||||
endif
|
||||
diff --git a/src/Makefile b/src/Makefile
|
||||
index 51363fe..49085f2 100644
|
||||
--- a/src/Makefile
|
||||
+++ b/src/Makefile
|
||||
@@ -16,7 +16,7 @@ release_hdr := $(shell sh -c './mkreleasehdr.sh')
|
||||
uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not')
|
||||
uname_M := $(shell sh -c 'uname -m 2>/dev/null || echo not')
|
||||
OPTIMIZATION?=-O2
|
||||
-DEPENDENCY_TARGETS=hiredis linenoise lua
|
||||
+DEPENDENCY_TARGETS=hiredis linenoise
|
||||
NODEPS:=clean distclean
|
||||
|
||||
# Default settings
|
||||
@@ -107,7 +107,7 @@ endif
|
||||
endif
|
||||
endif
|
||||
# Include paths to dependencies
|
||||
-FINAL_CFLAGS+= -I../deps/hiredis -I../deps/linenoise -I../deps/lua/src
|
||||
+FINAL_CFLAGS+= -I../deps/hiredis -I../deps/linenoise
|
||||
|
||||
ifeq ($(MALLOC),tcmalloc)
|
||||
FINAL_CFLAGS+= -DUSE_TCMALLOC
|
||||
@@ -130,6 +130,15 @@ else
|
||||
endif
|
||||
endif
|
||||
|
||||
+ifeq ($(USE_SYSTEM_LUA),yes)
|
||||
+ FINAL_CFLAGS+= -I/usr/include/lua5.1
|
||||
+ FINAL_LIBS := -llua5.1 $(FINAL_LIBS)
|
||||
+else
|
||||
+ FINAL_CFLAGS+= -I../deps/lua/src
|
||||
+ DEPENDENCY_TARGETS+= lua
|
||||
+ FINAL_LIBS := ../deps/lua/src/liblua.a $(FINAL_LIBS)
|
||||
+endif
|
||||
+
|
||||
REDIS_CC=$(QUIET_CC)$(CC) $(FINAL_CFLAGS) $(CPPFLAGS)
|
||||
REDIS_LD=$(QUIET_LINK)$(CC) $(FINAL_LDFLAGS)
|
||||
REDIS_INSTALL=$(QUIET_INSTALL)$(INSTALL)
|
||||
@@ -201,7 +210,7 @@ endif
|
||||
|
||||
# redis-server
|
||||
$(REDIS_SERVER_NAME): $(REDIS_SERVER_OBJ)
|
||||
- $(REDIS_LD) -o $@ $^ ../deps/hiredis/libhiredis.a ../deps/lua/src/liblua.a $(FINAL_LIBS)
|
||||
+ $(REDIS_LD) -o $@ $^ ../deps/hiredis/libhiredis.a $(FINAL_LIBS)
|
||||
|
||||
# redis-sentinel
|
||||
$(REDIS_SENTINEL_NAME): $(REDIS_SERVER_NAME)
|
@ -0,0 +1,49 @@
|
||||
From: Chris Lamb <lamby@debian.org>
|
||||
Date: Fri, 30 Oct 2015 10:53:42 +0000
|
||||
Subject: Add CPPFLAGS in upstream makefiles
|
||||
|
||||
---
|
||||
deps/hiredis/Makefile | 2 +-
|
||||
deps/linenoise/Makefile | 2 +-
|
||||
src/Makefile | 2 +-
|
||||
3 files changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/deps/hiredis/Makefile b/deps/hiredis/Makefile
|
||||
index 9a4de83..4c8a8e4 100644
|
||||
--- a/deps/hiredis/Makefile
|
||||
+++ b/deps/hiredis/Makefile
|
||||
@@ -41,7 +41,7 @@ CXX:=$(shell sh -c 'type $(CXX) >/dev/null 2>/dev/null && echo $(CXX) || echo g+
|
||||
OPTIMIZATION?=-O3
|
||||
WARNINGS=-Wall -W -Wstrict-prototypes -Wwrite-strings
|
||||
DEBUG_FLAGS?= -g -ggdb
|
||||
-REAL_CFLAGS=$(OPTIMIZATION) -fPIC $(CFLAGS) $(WARNINGS) $(DEBUG_FLAGS) $(ARCH)
|
||||
+REAL_CFLAGS=$(OPTIMIZATION) -fPIC $(CFLAGS) $(WARNINGS) $(DEBUG_FLAGS) $(ARCH) $(CPPFLAGS)
|
||||
REAL_LDFLAGS=$(LDFLAGS) $(ARCH)
|
||||
|
||||
DYLIBSUFFIX=so
|
||||
diff --git a/deps/linenoise/Makefile b/deps/linenoise/Makefile
|
||||
index 1dd894b..12ada21 100644
|
||||
--- a/deps/linenoise/Makefile
|
||||
+++ b/deps/linenoise/Makefile
|
||||
@@ -6,7 +6,7 @@ R_CFLAGS= $(STD) $(WARN) $(OPT) $(DEBUG) $(CFLAGS)
|
||||
R_LDFLAGS= $(LDFLAGS)
|
||||
DEBUG= -g
|
||||
|
||||
-R_CC=$(CC) $(R_CFLAGS)
|
||||
+R_CC=$(CC) $(R_CFLAGS) $(CPPFLAGS)
|
||||
R_LD=$(CC) $(R_LDFLAGS)
|
||||
|
||||
linenoise.o: linenoise.h linenoise.c
|
||||
diff --git a/src/Makefile b/src/Makefile
|
||||
index 773d3b2..0ff6e8b 100644
|
||||
--- a/src/Makefile
|
||||
+++ b/src/Makefile
|
||||
@@ -125,7 +125,7 @@ ifeq ($(MALLOC),jemalloc)
|
||||
FINAL_LIBS := ../deps/jemalloc/lib/libjemalloc.a $(FINAL_LIBS)
|
||||
endif
|
||||
|
||||
-REDIS_CC=$(QUIET_CC)$(CC) $(FINAL_CFLAGS)
|
||||
+REDIS_CC=$(QUIET_CC)$(CC) $(FINAL_CFLAGS) $(CPPFLAGS)
|
||||
REDIS_LD=$(QUIET_LINK)$(CC) $(FINAL_LDFLAGS)
|
||||
REDIS_INSTALL=$(QUIET_INSTALL)$(INSTALL)
|
||||
|
@ -0,0 +1,109 @@
|
||||
From: Chris Lamb <lamby@debian.org>
|
||||
Date: Tue, 10 Oct 2017 09:56:42 +0100
|
||||
Subject: Set Debian configuration defaults.
|
||||
|
||||
---
|
||||
keydb.conf | 12 ++++++------
|
||||
sentinel.conf | 9 +++++----
|
||||
2 files changed, 11 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/keydb.conf b/keydb.conf
|
||||
index 93ab9a4..24e6c79 100644
|
||||
--- a/keydb.conf
|
||||
+++ b/keydb.conf
|
||||
@@ -66,7 +66,7 @@
|
||||
# IF YOU ARE SURE YOU WANT YOUR INSTANCE TO LISTEN TO ALL THE INTERFACES
|
||||
# JUST COMMENT THE FOLLOWING LINE.
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
-bind 127.0.0.1
|
||||
+bind 127.0.0.1 ::1
|
||||
|
||||
# Protected mode is a layer of security protection, in order to avoid that
|
||||
# keydb instances left open on the internet are accessed and exploited.
|
||||
@@ -106,7 +106,7 @@ tcp-backlog 511
|
||||
# incoming connections. There is no default, so keydb will not listen
|
||||
# on a unix socket when not specified.
|
||||
#
|
||||
-# unixsocket /tmp/keydb.sock
|
||||
+# unixsocket /var/run/keydb/keydb-server.sock
|
||||
# unixsocketperm 700
|
||||
|
||||
# Close the connection after a client is idle for N seconds (0 to disable)
|
||||
@@ -133,7 +133,7 @@ tcp-keepalive 300
|
||||
|
||||
# By default keydb does not run as a daemon. Use 'yes' if you need it.
|
||||
# Note that keydb will write a pid file in /var/run/keydb.pid when daemonized.
|
||||
-daemonize no
|
||||
+daemonize yes
|
||||
|
||||
# If you run keydb from upstart or systemd, keydb can interact with your
|
||||
# supervision tree. Options:
|
||||
@@ -155,7 +155,7 @@ supervised no
|
||||
#
|
||||
# Creating a pid file is best effort: if keydb is not able to create it
|
||||
# nothing bad happens, the server will start and run normally.
|
||||
-pidfile /var/run/keydb_6379.pid
|
||||
+pidfile /var/run/keydb/keydb-server.pid
|
||||
|
||||
# Specify the server verbosity level.
|
||||
# This can be one of:
|
||||
@@ -168,7 +168,7 @@ loglevel notice
|
||||
# Specify the log file name. Also the empty string can be used to force
|
||||
# keydb to log on the standard output. Note that if you use standard
|
||||
# output for logging but daemonize, logs will be sent to /dev/null
|
||||
-logfile ""
|
||||
+logfile /var/log/keydb/keydb-server.log
|
||||
|
||||
# To enable logging to the system logger, just set 'syslog-enabled' to yes,
|
||||
# and optionally update the other syslog parameters to suit your needs.
|
||||
@@ -260,7 +260,7 @@ dbfilename dump.rdb
|
||||
# The Append Only File will also be created inside this directory.
|
||||
#
|
||||
# Note that you must specify a directory here, not a file name.
|
||||
-dir ./
|
||||
+dir /var/lib/keydb
|
||||
|
||||
################################# REPLICATION #################################
|
||||
|
||||
diff --git a/sentinel.conf b/sentinel.conf
|
||||
index bc9a705..58a4c84 100644
|
||||
--- a/sentinel.conf
|
||||
+++ b/sentinel.conf
|
||||
@@ -13,6 +13,7 @@
|
||||
# For example you may use one of the following:
|
||||
#
|
||||
# bind 127.0.0.1 192.168.1.1
|
||||
+bind 127.0.0.1 ::1
|
||||
#
|
||||
# protected-mode no
|
||||
|
||||
@@ -23,17 +24,17 @@ port 26379
|
||||
# By default keydb Sentinel does not run as a daemon. Use 'yes' if you need it.
|
||||
# Note that keydb will write a pid file in /var/run/keydb-sentinel.pid when
|
||||
# daemonized.
|
||||
-daemonize no
|
||||
+daemonize yes
|
||||
|
||||
# When running daemonized, keydb Sentinel writes a pid file in
|
||||
# /var/run/keydb-sentinel.pid by default. You can specify a custom pid file
|
||||
# location here.
|
||||
-pidfile /var/run/keydb-sentinel.pid
|
||||
+pidfile /var/run/sentinel/keydb-sentinel.pid
|
||||
|
||||
# Specify the log file name. Also the empty string can be used to force
|
||||
# Sentinel to log on the standard output. Note that if you use standard
|
||||
# output for logging but daemonize, logs will be sent to /dev/null
|
||||
-logfile ""
|
||||
+logfile /var/log/keydb/keydb-sentinel.log
|
||||
|
||||
# sentinel announce-ip <ip>
|
||||
# sentinel announce-port <port>
|
||||
@@ -62,7 +63,7 @@ logfile ""
|
||||
# For keydb Sentinel to chdir to /tmp at startup is the simplest thing
|
||||
# for the process to don't interfere with administrative tasks such as
|
||||
# unmounting filesystems.
|
||||
-dir /tmp
|
||||
+dir /var/lib/keydb
|
||||
|
||||
# sentinel monitor <master-name> <ip> <keydb-port> <quorum>
|
||||
#
|
8
pkg/deb/debian/patches/series
Normal file
8
pkg/deb/debian/patches/series
Normal file
@ -0,0 +1,8 @@
|
||||
0001-fix-ftbfs-on-kfreebsd.patch
|
||||
#debian-packaging/0003-dpkg-buildflags.patch
|
||||
#debian-packaging/0007-Set-Debian-configuration-defaults.patch
|
||||
#0010-Use-get_current_dir_name-over-PATHMAX-etc.patch
|
||||
#0010-Add-support-for-USE_SYSTEM_JEMALLOC-flag.patch
|
||||
#0011-Add-support-for-a-USE_SYSTEM_LUA-flag.patch
|
||||
#0007-Add-support-for-a-USE_SYSTEM_HIREDIS-flag.patch
|
||||
#test
|
83
pkg/deb/debian/patches/test
Normal file
83
pkg/deb/debian/patches/test
Normal file
@ -0,0 +1,83 @@
|
||||
Description: <short summary of the patch>
|
||||
TODO: Put a short summary on the line above and replace this paragraph
|
||||
with a longer explanation of this change. Complete the meta-information
|
||||
with other relevant fields (see below for details). To make it easier, the
|
||||
information below has been extracted from the changelog. Adjust it or drop
|
||||
it.
|
||||
.
|
||||
redis (5:5.0.5-1chl1~bionic1) bionic; urgency=medium
|
||||
.
|
||||
* Redis 5.0.5 fixes an important issue with AOF and adds multiple very useful
|
||||
modules APIs. Moreover smaller bugs in other parts of Redis are fixed in
|
||||
this release.
|
||||
* Streams: a bug in the iterator could prevent certain items to be returned in
|
||||
range queries under specific conditions.
|
||||
* Memleak in bitfieldCommand fixed.
|
||||
* Modules API: Preserve client*>id for blocked clients.
|
||||
* Fix memory leak when rewriting config file in case of write errors.
|
||||
* New modules API: RedisModule_GetKeyNameFromIO().
|
||||
* Fix non critical bugs in diskless replication.
|
||||
* New mdouels API: command filtering. See RedisModule_RegisterCommandFilter();
|
||||
* Tests improved to be more deterministic.
|
||||
* Fix a Redis Cluster bug, manual failover may abort because of the master
|
||||
sending PINGs to the replicas.
|
||||
Author: Chris Lea <chris.lea@gmail.com>
|
||||
|
||||
---
|
||||
The information above should follow the Patch Tagging Guidelines, please
|
||||
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
|
||||
are templates for supplementary fields that you might want to add:
|
||||
|
||||
Origin: <vendor|upstream|other>, <url of original patch>
|
||||
Bug: <url in upstream bugtracker>
|
||||
Bug-Debian: https://bugs.debian.org/<bugnumber>
|
||||
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
|
||||
Forwarded: <no|not-needed|url proving that it has been forwarded>
|
||||
Reviewed-By: <name and email of someone who approved the patch>
|
||||
Last-Update: 2019-08-14
|
||||
|
||||
--- /dev/null
|
||||
+++ redis-5.0.5/redis_5.0.5-1chl1~bionic1.dsc
|
||||
@@ -0,0 +1,42 @@
|
||||
+-----BEGIN PGP SIGNED MESSAGE-----
|
||||
+Hash: SHA512
|
||||
+
|
||||
+Format: 3.0 (quilt)
|
||||
+Source: redis
|
||||
+Binary: redis, redis-sentinel, redis-server, redis-tools
|
||||
+Architecture: any all
|
||||
+Version: 5:5.0.5-1chl1~bionic1
|
||||
+Maintainer: Chris Lamb <lamby@debian.org>
|
||||
+Homepage: https://redis.io/
|
||||
+Standards-Version: 4.2.1
|
||||
+Vcs-Browser: https://salsa.debian.org/lamby/pkg-redis
|
||||
+Vcs-Git: https://salsa.debian.org/lamby/pkg-redis.git
|
||||
+Testsuite: autopkgtest
|
||||
+Build-Depends: debhelper (>= 9~), dpkg-dev (>= 1.17.5), systemd, procps <!nocheck>, tcl <!nocheck>
|
||||
+Package-List:
|
||||
+ redis deb database optional arch=all
|
||||
+ redis-sentinel deb database optional arch=any
|
||||
+ redis-server deb database optional arch=any
|
||||
+ redis-tools deb database optional arch=any
|
||||
+Checksums-Sha1:
|
||||
+ 71e38ae09ac70012b5bc326522b976bcb8e269d6 1975750 redis_5.0.5.orig.tar.gz
|
||||
+ 4698bbe4c190f31601d3864d9bcd5ed8380c8723 25956 redis_5.0.5-1chl1~bionic1.debian.tar.xz
|
||||
+Checksums-Sha256:
|
||||
+ 2139009799d21d8ff94fc40b7f36ac46699b9e1254086299f8d3b223ca54a375 1975750 redis_5.0.5.orig.tar.gz
|
||||
+ 639fdb1be66542dc6b84e8c0bc30357e661bde809118cd1754e4cbbb83773a62 25956 redis_5.0.5-1chl1~bionic1.debian.tar.xz
|
||||
+Files:
|
||||
+ 2d2c8142baf72e6543174fc7beccaaa1 1975750 redis_5.0.5.orig.tar.gz
|
||||
+ 1dd668600931bcca0e25f86c5c2cc0aa 25956 redis_5.0.5-1chl1~bionic1.debian.tar.xz
|
||||
+
|
||||
+-----BEGIN PGP SIGNATURE-----
|
||||
+
|
||||
+iQEzBAEBCgAdFiEEtTSUDPRzjdEehKuC2ZMjAYFA0IoFAl1Tk1QACgkQ2ZMjAYFA
|
||||
+0Iqqzgf5AbOFgzqszqv4YxXg9hf+Iq5CCuw4J5U2Aid5fijLQVFPZaI0AgE3Br7C
|
||||
+0nxqvxYEIjKF+e2nX6zNjVk3JXYz3/Am/quyrSBI4KW2lIbpfCnhC8zCLOVcDtlX
|
||||
+jhdlg2rziqCDVaS1jGKR76vdz2FGSv/nAcGrjjOn0Lux7VhoaJgBoMgGCNigL8gB
|
||||
+Wo36UBhZQ6h3zXJjiJUee40ne55xYENhBoWpMvChOlA6/7cW4Xwf6PKBiqwKaRry
|
||||
+TYMTeLYgZ2S51ThK5zitfOPpBiP2xVuisL9NxgPiRTL1BnclJnOQzupX3xntNPtn
|
||||
+Ym34YnxbLTGwew232JvgK3ywMmwBeA==
|
||||
+=CJU0
|
||||
+-----END PGP SIGNATURE-----
|
||||
+
|
47
pkg/deb/debian/rules
Executable file
47
pkg/deb/debian/rules
Executable file
@ -0,0 +1,47 @@
|
||||
#!/usr/bin/make -f
|
||||
|
||||
include /usr/share/dpkg/buildflags.mk
|
||||
|
||||
#LUA_LIBS_DEBIAN = cjson bitop
|
||||
#LUA_LIBS_BUNDLED = struct cmsgpack
|
||||
#
|
||||
#LUA_OBJECTS = $(addprefix lua_,$(addsuffix .o,$(LUA_LIBS_BUNDLED)))
|
||||
#LUA_LDFLAGS = $(addprefix -llua5.1-,$(LUA_LIBS_DEBIAN)) $(addprefix ../deps/lua/src/,$(LUA_OBJECTS))
|
||||
|
||||
export CFLAGS CPPFLAGS LDFLAGS
|
||||
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
|
||||
export DEB_LDFLAGS_MAINT_APPEND = -ldl -latomic $(LUA_LDFLAGS)
|
||||
|
||||
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
|
||||
NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
|
||||
MAKEFLAGS += -j$(NUMJOBS)
|
||||
export MAKEFLAGS
|
||||
endif
|
||||
|
||||
%:
|
||||
dh $@
|
||||
|
||||
override_dh_auto_install:
|
||||
debian/bin/generate-systemd-service-files
|
||||
|
||||
#override_dh_auto_build:
|
||||
# make -C deps/lua/src $(LUA_OBJECTS)
|
||||
# dh_auto_build --parallel -- V=1 USE_SYSTEM_JEMALLOC=yes USE_SYSTEM_LUA=yes USE_SYSTEM_HIREDIS=yes
|
||||
|
||||
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
|
||||
endif
|
||||
|
||||
override_dh_auto_clean:
|
||||
dh_auto_clean
|
||||
rm -f src/release.h debian/*.service
|
||||
|
||||
override_dh_compress:
|
||||
dh_compress -Xredis-trib.rb
|
||||
|
||||
override_dh_installchangelogs:
|
||||
dh_installchangelogs --keep 00-RELEASENOTES
|
1
pkg/deb/debian/source/format
Normal file
1
pkg/deb/debian/source/format
Normal file
@ -0,0 +1 @@
|
||||
3.0 (quilt)
|
2
pkg/deb/debian/source/include-binaries
Normal file
2
pkg/deb/debian/source/include-binaries
Normal file
@ -0,0 +1,2 @@
|
||||
keydb_5.0.6.orig.tar.gz
|
||||
keydb_5.0.6-1chl1~bionic1.debian.tar.xz
|
2
pkg/deb/debian/source/lintian-overrides
Normal file
2
pkg/deb/debian/source/lintian-overrides
Normal file
@ -0,0 +1,2 @@
|
||||
# Upstream do not provide signed tarballs.
|
||||
keydb source: debian-watch-does-not-check-gpg-signature
|
1
pkg/deb/debian/source/options
Normal file
1
pkg/deb/debian/source/options
Normal file
@ -0,0 +1 @@
|
||||
extend-diff-ignore = "^\.travis\.yml$"
|
8
pkg/deb/debian/tests/0001-keydb-cli
Executable file
8
pkg/deb/debian/tests/0001-keydb-cli
Executable file
@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Show the INFO from "keydb-cli"
|
||||
|
||||
set -eu
|
||||
|
||||
keydb-cli INFO
|
||||
keydb-cli LOLWUT
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user