Merge branch 'keydbpro' into PRO_RELEASE_6
Former-commit-id: 9d8d3a54fdb9eaad0a7cfc3d938fa35d2819fa93
This commit is contained in:
commit
10908dc384
18
.gitignore
vendored
18
.gitignore
vendored
@ -4,8 +4,24 @@ core
|
||||
*.xo
|
||||
*.so
|
||||
*.d
|
||||
!**/bash_completion.d
|
||||
!**/logrotate.d
|
||||
!**/keydb.service.d
|
||||
!**/keydb-sentinel.service.d
|
||||
*.log
|
||||
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
|
||||
@ -15,9 +31,7 @@ keydb-check-rdb
|
||||
redis-check-dump
|
||||
keydb-check-dump
|
||||
redis-cli
|
||||
keydb-cli
|
||||
redis-sentinel
|
||||
keydb-sentinel
|
||||
redis-server
|
||||
keydb-pro-server
|
||||
doc-tools
|
||||
|
10
Dockerfile
10
Dockerfile
@ -1,10 +0,0 @@
|
||||
FROM ubuntu:18.04
|
||||
|
||||
|
||||
|
||||
RUN apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -qqy \
|
||||
build-essential nasm autotools-dev autoconf libcurl4-openssl-dev libjemalloc-dev tcl tcl-dev uuid-dev libcurl4-openssl-dev \
|
||||
&& apt-get clean
|
||||
|
||||
CMD make
|
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.
|
21
pkg/deb/README.md
Normal file
21
pkg/deb/README.md
Normal file
@ -0,0 +1,21 @@
|
||||
### KeyDB DEB Package Source Builds
|
||||
|
||||
This directory contains scripts and components needed to generate debian packages on different distributions/architectures from source
|
||||
|
||||
The 'debian' directory contains debian source code for bionic, buster and later distributions as it uses functions only available with debhelper11+. 'debian_dh9' is used for xenial, stretch and earlier distributions using debhelper9.
|
||||
|
||||
You will need to install pbuilder `sudo apt install pbuilder` along with other distribution specific dependancies
|
||||
|
||||
Generate deb packages with the following script command run from this directory:
|
||||
|
||||
```
|
||||
$ ./deb-buildsource.sh
|
||||
```
|
||||
|
||||
This generates a directory structure, .dsc file, original.tar.gz, and new changelog for the distribution and architecture installed.
|
||||
|
||||
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/stretch/buster
|
1576
pkg/deb/conf/keydb.conf
Normal file
1576
pkg/deb/conf/keydb.conf
Normal file
File diff suppressed because it is too large
Load Diff
244
pkg/deb/conf/sentinel.conf
Normal file
244
pkg/deb/conf/sentinel.conf
Normal file
@ -0,0 +1,244 @@
|
||||
# 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
|
63
pkg/deb/deb-buildsource.sh
Executable file
63
pkg/deb/deb-buildsource.sh
Executable file
@ -0,0 +1,63 @@
|
||||
#! /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-$majorv:$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
|
||||
if [[ "$codename" == "xenial" ]] || [[ "$codename" == "stretch" ]]; then
|
||||
cp -r debian_dh9 $pkg_name/tmp/debian
|
||||
else
|
||||
cp -r debian $pkg_name/tmp
|
||||
fi
|
||||
cp master_changelog $pkg_name/tmp/debian/changelog
|
||||
mv ../../../keydb_$version.orig.tar.gz ./$pkg_name
|
||||
cd $pkg_name/tmp
|
||||
changelog_str="keydb ($majorv:$version-$build$distname) $codename; urgency=medium\n\n * $version $changelog_comments \n\n -- Ben Schermel <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
|
||||
if [ "$codename" == "xenial" ]; then
|
||||
sudo pbuilder create --distribution $codename --othermirror "deb http://archive.ubuntu.com/ubuntu $codename universe multiverse"
|
||||
else
|
||||
sudo pbuilder create --distribution $codename
|
||||
fi
|
||||
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 clean
|
||||
cd ../
|
||||
rm -rf $pkg_name
|
0
pkg/deb/deb_files_generated/.gitkeep
Normal file
0
pkg/deb/deb_files_generated/.gitkeep
Normal file
30
pkg/deb/debian/bash_completion.d/keydb-cli
Normal file
30
pkg/deb/debian/bash_completion.d/keydb-cli
Normal file
@ -0,0 +1,30 @@
|
||||
# -*- sh -*-
|
||||
#
|
||||
# Bash completion function for the 'keydb-cli' command.
|
||||
#
|
||||
# Steve
|
||||
# --
|
||||
# http://www.steve.org.uk
|
||||
#
|
||||
|
||||
_keydb-cli()
|
||||
{
|
||||
COMPREPLY=()
|
||||
cur=${COMP_WORDS[COMP_CWORD]}
|
||||
prev=${COMP_WORDS[COMP_CWORD-1]}
|
||||
|
||||
#
|
||||
# All known commands accepted. Sorted.
|
||||
#
|
||||
opts='bgrewriteaof bgsave dbsize debug decr decrby del echo exists expire expireat flushall flushdb get getset incr incrby info keys lastsave lindex llen lpop lpush lrange lrem lset ltrim mget move mset msetnx ping randomkey rename renamenx rewriteaof rpop rpoplpush rpush sadd save scard sdiff sdiffstore select set setnx shutdown sinter sinterstore sismember slaveof smembers smove sort spop srandmember srem sunion sunionstore ttl type zadd zcard zincrby zrange zrangebyscore zrem zremrangebyscore zrevrange zscore'
|
||||
|
||||
#
|
||||
# Only complete on the first term.
|
||||
#
|
||||
if [ $COMP_CWORD -eq 1 ]; then
|
||||
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||||
return 0
|
||||
fi
|
||||
|
||||
}
|
||||
complete -F _keydb-cli keydb-cli
|
129
pkg/deb/debian/bin/generate-systemd-service-files
Executable file
129
pkg/deb/debian/bin/generate-systemd-service-files
Executable file
@ -0,0 +1,129 @@
|
||||
#!/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
|
||||
EOF
|
||||
fi
|
||||
|
||||
cat >> ${TARGET} <<EOF
|
||||
[Unit]
|
||||
Description=${DESCRIPTION}
|
||||
After=network.target
|
||||
Documentation=https://docs.keydb.dev, 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
|
32
pkg/deb/debian/changelog
Normal file
32
pkg/deb/debian/changelog
Normal file
@ -0,0 +1,32 @@
|
||||
keydb (5:5.3.3-1~bionic1) bionic; urgency=medium
|
||||
|
||||
* 5.3.3 Updating deb source package and naming convention.
|
||||
|
||||
-- Ben Schermel <ben@eqalpha.com> Fri, 25 Oct 2019 8:00:37 +0000
|
||||
|
||||
keydb (5:5.1.12-1chl1~bionic1) bionic; urgency=medium
|
||||
|
||||
* 5.1.1 update. This update fixes several rare deadlock scenarios. Deadlock detection is also added.
|
||||
|
||||
-- Ben Schermel <ben@eqalpha.com> Fri, 25 Oct 2019 8:00:37 +0000
|
||||
|
||||
|
||||
keydb (5:5.1.11-1chl1~bionic1) bionic; urgency=medium
|
||||
|
||||
* 5.1 release. This release includes subkey expires (EXPIREMEMBER/EXPIREMEMBERAT), with updates to PTTL/TTL accordingly. New OBJECT LASTMODIFIED, BITIOP LSHIFT & BITOP RSHIFT commands. See https://docs.keydb.dev/blog/2019/10/20/blog-post/ for detailed review of release.
|
||||
|
||||
-- Ben Schermel <ben@eqalpha.com> Mon, 21 Oct 2019 8:00:37 +0000
|
||||
|
||||
|
||||
keydb (5:5.0.1-1chl1~bionic1) bionic; urgency=medium
|
||||
|
||||
* Arm build now included for bionic package
|
||||
|
||||
-- Ben Schermel <ben@eqalpha.com> Wed, 21 Aug 2019 22:58:37 +0000
|
||||
|
||||
|
||||
keydb (5:5.0.0-1chl1~bionic1) bionic; urgency=medium
|
||||
|
||||
* Initial release of KeyDB PPA. This PPA was originally derived from https://launchpad.net/~chris-lea/+archive/ubuntu/redis-server
|
||||
|
||||
-- Ben Schermel <ben@eqalpha.com> Wed, 21 Aug 2019 2:58:37 +0000
|
1
pkg/deb/debian/compat
Normal file
1
pkg/deb/debian/compat
Normal file
@ -0,0 +1 @@
|
||||
9
|
77
pkg/deb/debian/control
Normal file
77
pkg/deb/debian/control
Normal file
@ -0,0 +1,77 @@
|
||||
Source: keydb
|
||||
Section: database
|
||||
Priority: optional
|
||||
Maintainer: Ben Schermel <ben@eqalpha.com>
|
||||
Build-Depends:
|
||||
debhelper (>= 9~),
|
||||
dpkg-dev (>= 1.17.5),
|
||||
systemd,
|
||||
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>,
|
||||
libssl-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.
|
61
pkg/deb/debian/copyright
Normal file
61
pkg/deb/debian/copyright
Normal file
@ -0,0 +1,61 @@
|
||||
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||
Upstream-Contact: John Sully <john@eqalpha.com>
|
||||
Upstream-Name: keydb-pro
|
||||
Source: https://github.com/JohnSully/KeyDB-Pro
|
||||
|
||||
Files: *
|
||||
Copyright: © 2006-2014 Salvatore Sanfilippo <antirez@gmail.com>
|
||||
Copyright © 2019, John Sully
|
||||
License: Proprietary
|
||||
|
||||
|
||||
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.
|
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 \- Benchmark 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>
|
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/
|
||||
pkg/deb/conf/sentinel.conf /etc/keydb
|
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
|
||||
}
|
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
|
26
pkg/deb/debian/keydb-sentinel.postinst
Normal file
26
pkg/deb/debian/keydb-sentinel.postinst
Normal file
@ -0,0 +1,26 @@
|
||||
#!/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
|
||||
|
||||
systemctl daemon-reload
|
||||
|
||||
exit 0
|
16
pkg/deb/debian/keydb-sentinel.postrm
Normal file
16
pkg/deb/debian/keydb-sentinel.postrm
Normal file
@ -0,0 +1,16 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -eu
|
||||
|
||||
CONFFILE="/etc/keydb/sentinel.conf"
|
||||
|
||||
if [ "$1" = "purge" ]
|
||||
then
|
||||
dpkg-statoverride --remove ${CONFFILE} || test $? -eq 2
|
||||
fi
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
systemctl daemon-reload
|
||||
|
||||
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>
|
1
pkg/deb/debian/keydb-server.docs
Normal file
1
pkg/deb/debian/keydb-server.docs
Normal file
@ -0,0 +1 @@
|
||||
README.md
|
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/conf/keydb.conf /etc/keydb
|
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
|
||||
}
|
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
|
26
pkg/deb/debian/keydb-server.postinst
Normal file
26
pkg/deb/debian/keydb-server.postinst
Normal file
@ -0,0 +1,26 @@
|
||||
#!/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
|
||||
|
||||
systemctl daemon-reload
|
||||
|
||||
exit 0
|
16
pkg/deb/debian/keydb-server.postrm
Normal file
16
pkg/deb/debian/keydb-server.postrm
Normal file
@ -0,0 +1,16 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -eu
|
||||
|
||||
CONFFILE="/etc/keydb/keydb.conf"
|
||||
|
||||
if [ "${1}" = "purge" ]
|
||||
then
|
||||
dpkg-statoverride --remove ${CONFFILE} || test $? -eq 2
|
||||
fi
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
systemctl daemon-reload
|
||||
|
||||
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
|
7
pkg/deb/debian/keydb-tools.install
Normal file
7
pkg/deb/debian/keydb-tools.install
Normal file
@ -0,0 +1,7 @@
|
||||
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
|
||||
src/keydb-server /usr/bin
|
||||
src/keydb-sentinel /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
|
47
pkg/deb/debian/keydb-tools.postinst
Normal file
47
pkg/deb/debian/keydb-tools.postinst
Normal file
@ -0,0 +1,47 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -eu
|
||||
|
||||
USER="keydb"
|
||||
|
||||
Setup_dir () {
|
||||
DIR="${1}"
|
||||
MODE="${2}"
|
||||
GROUP="${3}"
|
||||
|
||||
mkdir -p ${DIR}
|
||||
|
||||
case "${DIR}" in
|
||||
/var/log/keydb)
|
||||
MODE="02750"
|
||||
GROUP="adm"
|
||||
;;
|
||||
*)
|
||||
MODE="750"
|
||||
GROUP="${USER}"
|
||||
;;
|
||||
esac
|
||||
|
||||
if ! dpkg-statoverride --list ${DIR} >/dev/null 2>&1
|
||||
then
|
||||
chown ${USER}:${GROUP} ${DIR}
|
||||
chmod ${MODE} ${DIR}
|
||||
fi
|
||||
}
|
||||
|
||||
if [ "$1" = "configure" ]
|
||||
then
|
||||
adduser \
|
||||
--system \
|
||||
--home /var/lib/keydb \
|
||||
--quiet \
|
||||
--group \
|
||||
${USER} || true
|
||||
|
||||
Setup_dir /var/log/keydb ${USER}:adm 2750
|
||||
Setup_dir /var/lib/keydb ${USER}:${USER} 750
|
||||
fi
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
exit 0
|
13
pkg/deb/debian/keydb-tools.postrm
Normal file
13
pkg/deb/debian/keydb-tools.postrm
Normal file
@ -0,0 +1,13 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -eu
|
||||
|
||||
if [ "${1}" = "purge" ]
|
||||
then
|
||||
userdel keydb || true
|
||||
rm -rf /var/lib/keydb /var/log/keydb
|
||||
fi
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
exit 0
|
39
pkg/deb/debian/rules
Executable file
39
pkg/deb/debian/rules
Executable file
@ -0,0 +1,39 @@
|
||||
#!/usr/bin/make -f
|
||||
|
||||
include /usr/share/dpkg/buildflags.mk
|
||||
|
||||
export BUILD_TLS=yes
|
||||
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
|
||||
dh_installsystemd --restart-after-upgrade
|
||||
|
||||
override_dh_auto_test:
|
||||
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
|
||||
# Avoid race conditions in upstream testsuite.
|
||||
./runtest || 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/lintian-overrides
Normal file
2
pkg/deb/debian/source/lintian-overrides
Normal file
@ -0,0 +1,2 @@
|
||||
# Upstream do not provide signed tarballs.
|
||||
keydb-pro source: debian-watch-does-not-check-gpg-signature
|
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
|
7
pkg/deb/debian/tests/0002-benchmark
Executable file
7
pkg/deb/debian/tests/0002-benchmark
Executable file
@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Run the benchmarking
|
||||
|
||||
set -eu
|
||||
|
||||
keydb-benchmark -P 10
|
5
pkg/deb/debian/tests/0003-keydb-check-aof
Executable file
5
pkg/deb/debian/tests/0003-keydb-check-aof
Executable file
@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Smoke test keydb-check-aof
|
||||
|
||||
keydb-check-aof 2>&1 | grep -qsi usage:
|
10
pkg/deb/debian/tests/0004-keydb-check-rdb
Executable file
10
pkg/deb/debian/tests/0004-keydb-check-rdb
Executable file
@ -0,0 +1,10 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Test keydb-check-rdb
|
||||
|
||||
set -eu
|
||||
|
||||
# Perform a synchronous save to ensure .rdb file eixsts
|
||||
keydb-cli SAVE
|
||||
|
||||
keydb-check-rdb /var/lib/keydb/dump.rdb
|
8
pkg/deb/debian/tests/control
Normal file
8
pkg/deb/debian/tests/control
Normal file
@ -0,0 +1,8 @@
|
||||
Tests: 0001-keydb-cli
|
||||
|
||||
Tests: 0002-benchmark
|
||||
|
||||
Tests: 0003-keydb-check-aof
|
||||
|
||||
Tests: 0004-keydb-check-rdb
|
||||
Restrictions: needs-root
|
3
pkg/deb/debian/watch
Normal file
3
pkg/deb/debian/watch
Normal file
@ -0,0 +1,3 @@
|
||||
version=6
|
||||
opts=uversionmangle=s/-?(alpha|beta|rc)/~$1/ \
|
||||
https://github.com/JohnSully/KeyDB-Pro/releases .*/archive/(.*).tar.gz
|
8
pkg/deb/debian_dh9/NEWS
Normal file
8
pkg/deb/debian_dh9/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
|
30
pkg/deb/debian_dh9/bash_completion.d/keydb-cli
Normal file
30
pkg/deb/debian_dh9/bash_completion.d/keydb-cli
Normal file
@ -0,0 +1,30 @@
|
||||
# -*- sh -*-
|
||||
#
|
||||
# Bash completion function for the 'keydb-cli' command.
|
||||
#
|
||||
# Steve
|
||||
# --
|
||||
# http://www.steve.org.uk
|
||||
#
|
||||
|
||||
_keydb-cli()
|
||||
{
|
||||
COMPREPLY=()
|
||||
cur=${COMP_WORDS[COMP_CWORD]}
|
||||
prev=${COMP_WORDS[COMP_CWORD-1]}
|
||||
|
||||
#
|
||||
# All known commands accepted. Sorted.
|
||||
#
|
||||
opts='bgrewriteaof bgsave dbsize debug decr decrby del echo exists expire expireat flushall flushdb get getset incr incrby info keys lastsave lindex llen lpop lpush lrange lrem lset ltrim mget move mset msetnx ping randomkey rename renamenx rewriteaof rpop rpoplpush rpush sadd save scard sdiff sdiffstore select set setnx shutdown sinter sinterstore sismember slaveof smembers smove sort spop srandmember srem sunion sunionstore ttl type zadd zcard zincrby zrange zrangebyscore zrem zremrangebyscore zrevrange zscore'
|
||||
|
||||
#
|
||||
# Only complete on the first term.
|
||||
#
|
||||
if [ $COMP_CWORD -eq 1 ]; then
|
||||
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||||
return 0
|
||||
fi
|
||||
|
||||
}
|
||||
complete -F _keydb-cli keydb-cli
|
131
pkg/deb/debian_dh9/bin/generate-systemd-service-files
Executable file
131
pkg/deb/debian_dh9/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=https://docs.keydb.dev, 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
|
32
pkg/deb/debian_dh9/changelog
Normal file
32
pkg/deb/debian_dh9/changelog
Normal file
@ -0,0 +1,32 @@
|
||||
keydb (5:5.3.3-1~bionic1) bionic; urgency=medium
|
||||
|
||||
* 5.3.3 Updating deb source package and naming convention.
|
||||
|
||||
-- Ben Schermel <ben@eqalpha.com> Fri, 25 Oct 2019 8:00:37 +0000
|
||||
|
||||
keydb (5:5.1.12-1chl1~bionic1) bionic; urgency=medium
|
||||
|
||||
* 5.1.1 update. This update fixes several rare deadlock scenarios. Deadlock detection is also added.
|
||||
|
||||
-- Ben Schermel <ben@eqalpha.com> Fri, 25 Oct 2019 8:00:37 +0000
|
||||
|
||||
|
||||
keydb (5:5.1.11-1chl1~bionic1) bionic; urgency=medium
|
||||
|
||||
* 5.1 release. This release includes subkey expires (EXPIREMEMBER/EXPIREMEMBERAT), with updates to PTTL/TTL accordingly. New OBJECT LASTMODIFIED, BITIOP LSHIFT & BITOP RSHIFT commands. See https://docs.keydb.dev/blog/2019/10/20/blog-post/ for detailed review of release.
|
||||
|
||||
-- Ben Schermel <ben@eqalpha.com> Mon, 21 Oct 2019 8:00:37 +0000
|
||||
|
||||
|
||||
keydb (5:5.0.1-1chl1~bionic1) bionic; urgency=medium
|
||||
|
||||
* Arm build now included for bionic package
|
||||
|
||||
-- Ben Schermel <ben@eqalpha.com> Wed, 21 Aug 2019 22:58:37 +0000
|
||||
|
||||
|
||||
keydb (5:5.0.0-1chl1~bionic1) bionic; urgency=medium
|
||||
|
||||
* Initial release of KeyDB PPA. This PPA was originally derived from https://launchpad.net/~chris-lea/+archive/ubuntu/redis-server
|
||||
|
||||
-- Ben Schermel <ben@eqalpha.com> Wed, 21 Aug 2019 2:58:37 +0000
|
1
pkg/deb/debian_dh9/compat
Normal file
1
pkg/deb/debian_dh9/compat
Normal file
@ -0,0 +1 @@
|
||||
9
|
77
pkg/deb/debian_dh9/control
Normal file
77
pkg/deb/debian_dh9/control
Normal file
@ -0,0 +1,77 @@
|
||||
Source: keydb
|
||||
Section: database
|
||||
Priority: optional
|
||||
Maintainer: Ben Schermel <ben@eqalpha.com>
|
||||
Build-Depends:
|
||||
debhelper (>= 9~),
|
||||
dpkg-dev (>= 1.17.5),
|
||||
systemd,
|
||||
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>,
|
||||
libssl-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.
|
134
pkg/deb/debian_dh9/copyright
Normal file
134
pkg/deb/debian_dh9/copyright
Normal file
@ -0,0 +1,134 @@
|
||||
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
pkg/deb/debian_dh9/files
Normal file
1
pkg/deb/debian_dh9/files
Normal file
@ -0,0 +1 @@
|
||||
keydb_5.3.3-1~bionic1_source.buildinfo database optional
|
3
pkg/deb/debian_dh9/gbp.conf
Normal file
3
pkg/deb/debian_dh9/gbp.conf
Normal file
@ -0,0 +1,3 @@
|
||||
[DEFAULT]
|
||||
debian-branch=debian/sid
|
||||
upstream-branch=upstream/sid
|
68
pkg/deb/debian_dh9/keydb-benchmark.1
Normal file
68
pkg/deb/debian_dh9/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_dh9/keydb-check-aof.1
Normal file
17
pkg/deb/debian_dh9/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_dh9/keydb-check-rdb.1
Normal file
17
pkg/deb/debian_dh9/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_dh9/keydb-cli.1
Normal file
19
pkg/deb/debian_dh9/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_dh9/keydb-sentinel.1
Normal file
23
pkg/deb/debian_dh9/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_dh9/keydb-sentinel.default
Executable file
8
pkg/deb/debian_dh9/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_dh9/keydb-sentinel.init
Executable file
89
pkg/deb/debian_dh9/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_dh9/keydb-sentinel.install
Normal file
2
pkg/deb/debian_dh9/keydb-sentinel.install
Normal file
@ -0,0 +1,2 @@
|
||||
debian/keydb-sentinel.service /lib/systemd/system
|
||||
pkg/deb/conf/sentinel.conf /etc/keydb
|
7
pkg/deb/debian_dh9/keydb-sentinel.logrotate
Normal file
7
pkg/deb/debian_dh9/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_dh9/keydb-sentinel.maintscript
Normal file
4
pkg/deb/debian_dh9/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_dh9/keydb-sentinel.manpages
Normal file
1
pkg/deb/debian_dh9/keydb-sentinel.manpages
Normal file
@ -0,0 +1 @@
|
||||
debian/keydb-sentinel.1
|
24
pkg/deb/debian_dh9/keydb-sentinel.postinst
Normal file
24
pkg/deb/debian_dh9/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_dh9/keydb-sentinel.postrm
Normal file
14
pkg/deb/debian_dh9/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_dh9/keydb-server.1
Normal file
23
pkg/deb/debian_dh9/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_dh9/keydb-server.default
Executable file
7
pkg/deb/debian_dh9/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_dh9/keydb-server.docs
Normal file
1
pkg/deb/debian_dh9/keydb-server.docs
Normal file
@ -0,0 +1 @@
|
||||
README.md
|
89
pkg/deb/debian_dh9/keydb-server.init
Executable file
89
pkg/deb/debian_dh9/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_dh9/keydb-server.install
Normal file
2
pkg/deb/debian_dh9/keydb-server.install
Normal file
@ -0,0 +1,2 @@
|
||||
debian/keydb-server.service /lib/systemd/system
|
||||
pkg/deb/conf/keydb.conf /etc/keydb
|
7
pkg/deb/debian_dh9/keydb-server.logrotate
Normal file
7
pkg/deb/debian_dh9/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_dh9/keydb-server.maintscript
Normal file
4
pkg/deb/debian_dh9/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_dh9/keydb-server.manpages
Normal file
1
pkg/deb/debian_dh9/keydb-server.manpages
Normal file
@ -0,0 +1 @@
|
||||
debian/keydb-server.1
|
24
pkg/deb/debian_dh9/keydb-server.postinst
Normal file
24
pkg/deb/debian_dh9/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_dh9/keydb-server.postrm
Normal file
14
pkg/deb/debian_dh9/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_dh9/keydb-tools.examples
Normal file
2
pkg/deb/debian_dh9/keydb-tools.examples
Normal file
@ -0,0 +1,2 @@
|
||||
src/redis-trib.rb
|
||||
utils/lru
|
7
pkg/deb/debian_dh9/keydb-tools.install
Normal file
7
pkg/deb/debian_dh9/keydb-tools.install
Normal file
@ -0,0 +1,7 @@
|
||||
debian/bash_completion.d/* /usr/share/bash-completion/completions
|
||||
src/keydb-server /usr/bin
|
||||
src/keydb-benchmark /usr/bin
|
||||
src/keydb-check-aof /usr/bin
|
||||
src/keydb-check-rdb /usr/bin
|
||||
src/keydb-cli /usr/bin
|
||||
src/keydb-sentinel /usr/bin
|
4
pkg/deb/debian_dh9/keydb-tools.manpages
Normal file
4
pkg/deb/debian_dh9/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
|
47
pkg/deb/debian_dh9/keydb-tools.postinst
Normal file
47
pkg/deb/debian_dh9/keydb-tools.postinst
Normal file
@ -0,0 +1,47 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -eu
|
||||
|
||||
USER="keydb"
|
||||
|
||||
Setup_dir () {
|
||||
DIR="${1}"
|
||||
MODE="${2}"
|
||||
GROUP="${3}"
|
||||
|
||||
mkdir -p ${DIR}
|
||||
|
||||
case "${DIR}" in
|
||||
/var/log/keydb)
|
||||
MODE="02750"
|
||||
GROUP="adm"
|
||||
;;
|
||||
*)
|
||||
MODE="750"
|
||||
GROUP="${USER}"
|
||||
;;
|
||||
esac
|
||||
|
||||
if ! dpkg-statoverride --list ${DIR} >/dev/null 2>&1
|
||||
then
|
||||
chown ${USER}:${GROUP} ${DIR}
|
||||
chmod ${MODE} ${DIR}
|
||||
fi
|
||||
}
|
||||
|
||||
if [ "$1" = "configure" ]
|
||||
then
|
||||
adduser \
|
||||
--system \
|
||||
--home /var/lib/keydb \
|
||||
--quiet \
|
||||
--group \
|
||||
${USER} || true
|
||||
|
||||
Setup_dir /var/log/keydb ${USER}:adm 2750
|
||||
Setup_dir /var/lib/keydb ${USER}:${USER} 750
|
||||
fi
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
exit 0
|
13
pkg/deb/debian_dh9/keydb-tools.postrm
Normal file
13
pkg/deb/debian_dh9/keydb-tools.postrm
Normal file
@ -0,0 +1,13 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -eu
|
||||
|
||||
if [ "${1}" = "purge" ]
|
||||
then
|
||||
userdel keydb || true
|
||||
rm -rf /var/lib/keydb /var/log/keydb
|
||||
fi
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
exit 0
|
21
pkg/deb/debian_dh9/patches/0001-fix-ftbfs-on-kfreebsd.patch
Normal file
21
pkg/deb/debian_dh9/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_dh9/patches/series
Normal file
8
pkg/deb/debian_dh9/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_dh9/patches/test
Normal file
83
pkg/deb/debian_dh9/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-----
|
||||
+
|
48
pkg/deb/debian_dh9/rules
Executable file
48
pkg/deb/debian_dh9/rules
Executable file
@ -0,0 +1,48 @@
|
||||
#!/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 BUILD_TLS=yes
|
||||
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_dh9/source/format
Normal file
1
pkg/deb/debian_dh9/source/format
Normal file
@ -0,0 +1 @@
|
||||
3.0 (quilt)
|
2
pkg/deb/debian_dh9/source/include-binaries
Normal file
2
pkg/deb/debian_dh9/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_dh9/source/lintian-overrides
Normal file
2
pkg/deb/debian_dh9/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_dh9/source/options
Normal file
1
pkg/deb/debian_dh9/source/options
Normal file
@ -0,0 +1 @@
|
||||
extend-diff-ignore = "^\.travis\.yml$"
|
8
pkg/deb/debian_dh9/tests/0001-keydb-cli
Executable file
8
pkg/deb/debian_dh9/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
|
7
pkg/deb/debian_dh9/tests/0002-benchmark
Executable file
7
pkg/deb/debian_dh9/tests/0002-benchmark
Executable file
@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Run the benchmarking
|
||||
|
||||
set -eu
|
||||
|
||||
keydb-benchmark -P 10
|
5
pkg/deb/debian_dh9/tests/0003-keydb-check-aof
Executable file
5
pkg/deb/debian_dh9/tests/0003-keydb-check-aof
Executable file
@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Smoke test keydb-check-aof
|
||||
|
||||
keydb-check-aof 2>&1 | grep -qsi usage:
|
10
pkg/deb/debian_dh9/tests/0004-keydb-check-rdb
Executable file
10
pkg/deb/debian_dh9/tests/0004-keydb-check-rdb
Executable file
@ -0,0 +1,10 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Test keydb-check-rdb
|
||||
|
||||
set -eu
|
||||
|
||||
# Perform a synchronous save to ensure .rdb file eixsts
|
||||
keydb-cli SAVE
|
||||
|
||||
keydb-check-rdb /var/lib/keydb/dump.rdb
|
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