add package utilities
Former-commit-id: b4b35cf904cd690cace4fe3cd1fe8accf118c9a4
This commit is contained in:
parent
ad4d76422c
commit
5ebad6291f
9
.gitignore
vendored
9
.gitignore
vendored
@ -6,6 +6,15 @@ core
|
|||||||
*.d
|
*.d
|
||||||
*.log
|
*.log
|
||||||
dump.rdb
|
dump.rdb
|
||||||
|
src/keydb-server
|
||||||
|
bin/keydb-server
|
||||||
|
*.deb
|
||||||
|
*.rpm
|
||||||
|
keydb-pro-server
|
||||||
|
src/keydb-cli
|
||||||
|
bin/keydb-cli
|
||||||
|
src/keydb-sentinel
|
||||||
|
bin/keydb-sentinel
|
||||||
redis-benchmark
|
redis-benchmark
|
||||||
keydb-benchmark
|
keydb-benchmark
|
||||||
redis-check-aof
|
redis-check-aof
|
||||||
|
16
pkg/deb/README.md
Normal file
16
pkg/deb/README.md
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
## Deb Packaging
|
||||||
|
|
||||||
|
The deb packages for open source KeyDB contain the KeyDB-Pro binary as well. As such we are generating deb packages using prebuilt binaries.
|
||||||
|
Scripts update the appropriate files for the build and `dkpg-deb -b` is used to create the package. Dependencies for Pro are also included. This script modifies the same package rather than having many duplicates to ensure modifications made are pushed accross builds.
|
||||||
|
|
||||||
|
If you want to generate your own deb packages following running `make` and generating new binaries you can generate deb packages with the following command:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ cd KeyDB/pkg/deb
|
||||||
|
$ deb-builder.sh <version-tag>
|
||||||
|
```
|
||||||
|
|
||||||
|
The generated deb packages will be output to the directory "deb_files_generated". Update the changelog prior to generating the deb package if you would like a record.
|
||||||
|
|
||||||
|
Github CI will generate packages on each build versioned 0.0.0.0 and will contain open source binaries only. On tagged releases, deb packages with the appropriate version as well as the pro binary will be generated.
|
||||||
|
|
38
pkg/deb/changelog.Debian
Normal file
38
pkg/deb/changelog.Debian
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
keydb (5:5.3.2-1chl1~bionic1) bionic; urgency=medium
|
||||||
|
|
||||||
|
* 5.3.2 Adding CRON and additional multi master support
|
||||||
|
|
||||||
|
-- Ben Schermel <ben@eqalpha.com> Sun, 1 Mar 2020 22:00:37 +0000
|
||||||
|
|
||||||
|
keydb (5:5.3.0-1chl1~bionic1) bionic; urgency=medium
|
||||||
|
|
||||||
|
* 5.3.0 Now hosting our own PPA in order to include Pro binaries
|
||||||
|
|
||||||
|
-- Ben Schermel <ben@eqalpha.com> Sun, 19 Jan 2020 8:00:37 +0000
|
||||||
|
|
||||||
|
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
|
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
|
183
pkg/deb/deb-builder.sh
Executable file
183
pkg/deb/deb-builder.sh
Executable file
@ -0,0 +1,183 @@
|
|||||||
|
#! /bin/bash
|
||||||
|
|
||||||
|
#### grab build and architecture
|
||||||
|
build=$(lsb_release -c | awk '{ printf $2 }')
|
||||||
|
arch=$(dpkg --print-architecture)
|
||||||
|
|
||||||
|
|
||||||
|
# Ensure this script covers build
|
||||||
|
if [ "$arch" != "arm64" ] && [ "$arch" != "amd64" ]; then
|
||||||
|
echo "deb packages are currently only available for arm64 and amd64. You are attempting to build using a: $arch architecture"
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
|
if [ "$build" != "bionic" ] && [ "$build" != "xenial" ]; then
|
||||||
|
echo "deb packages are currently only available for xenial and bionic builds. You are attempting to build using a: $build distribution"
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
|
if [ $# -eq 0 ]; then
|
||||||
|
version=0.0.0
|
||||||
|
fi
|
||||||
|
if [ $# -gt 0 ]; then
|
||||||
|
version=$1
|
||||||
|
fi
|
||||||
|
#### create the empty directories github would have removed
|
||||||
|
mkdir $PWD/deb_source/sentinel/usr/bin
|
||||||
|
mkdir $PWD/deb_source/tools/usr/bin
|
||||||
|
|
||||||
|
####### move updated keydb files to their respective locations for build
|
||||||
|
cp ../../src/keydb* ./deb_source/tools/usr/bin/
|
||||||
|
# wget keydb-pro-server -O ./deb_source/tools/usr/bin/
|
||||||
|
cp ./conf/keydb.conf ./deb_source/server/etc/keydb/
|
||||||
|
cp ./conf/sentinel.conf ./deb_source/sentinel/etc/keydb/
|
||||||
|
|
||||||
|
# Updated changelog will be implemented with build type updated if needed
|
||||||
|
if [ "$build" == "xenial" ]; then
|
||||||
|
sed -i 's/bionic/xenial/g' ./changelog.Debian
|
||||||
|
fi
|
||||||
|
if [ "$build" == "bionic" ]; then
|
||||||
|
sed -i 's/xenial/bionic/g' ./changelog.Debian
|
||||||
|
fi
|
||||||
|
gzip ./changelog.Debian
|
||||||
|
cp ./changelog.Debian.gz $PWD/deb_source/tools/usr/share/doc/keydb-tools/
|
||||||
|
cp ./changelog.Debian.gz $PWD/deb_source/server/usr/share/doc/keydb-server/
|
||||||
|
cp ./changelog.Debian.gz $PWD/deb_source/sentinel/usr/share/doc/keydb-sentinel/
|
||||||
|
cp ./changelog.Debian.gz $PWD/deb_source/all/usr/share/doc/keydb
|
||||||
|
gzip -d ./changelog.Debian.gz
|
||||||
|
|
||||||
|
# remove any old deb packages
|
||||||
|
rm $PWD/deb_files_generated/*
|
||||||
|
|
||||||
|
# update the systemd service file parameters depending on build type. Some options ar not available for xenial
|
||||||
|
if [ "$build" == "xenial" ]; then
|
||||||
|
# if not already commented out, for xenial comment out the following unavailable systemd options
|
||||||
|
sed -e '/ProtectKernelModules/ s/^#*/#/' -i $PWD/deb_source/server/lib/systemd/system/keydb-server.service
|
||||||
|
sed -e '/ProtectKernelTunables/ s/^#*/#/' -i $PWD/deb_source/server/lib/systemd/system/keydb-server.service
|
||||||
|
sed -e '/ProtectControlGroups/ s/^#*/#/' -i $PWD/deb_source/server/lib/systemd/system/keydb-server.service
|
||||||
|
sed -e '/RestrictRealtime/ s/^#*/#/' -i $PWD/deb_source/server/lib/systemd/system/keydb-server.service
|
||||||
|
sed -e '/RestrictNamespaces/ s/^#*/#/' -i $PWD/deb_source/server/lib/systemd/system/keydb-server.service
|
||||||
|
sed -e '/ProtectKernelModules/ s/^#*/#/' -i $PWD/deb_source/sentinel/lib/systemd/system/keydb-sentinel.service
|
||||||
|
sed -e '/ProtectKernelTunables/ s/^#*/#/' -i $PWD/deb_source/sentinel/lib/systemd/system/keydb-sentinel.service
|
||||||
|
sed -e '/ProtectControlGroups/ s/^#*/#/' -i $PWD/deb_source/sentinel/lib/systemd/system/keydb-sentinel.service
|
||||||
|
sed -e '/RestrictRealtime/ s/^#*/#/' -i $PWD/deb_source/sentinel/lib/systemd/system/keydb-sentinel.service
|
||||||
|
sed -e '/RestrictNamespaces/ s/^#*/#/' -i $PWD/deb_source/sentinel/lib/systemd/system/keydb-sentinel.service
|
||||||
|
fi
|
||||||
|
if [ "$build" == "bionic" ]; then
|
||||||
|
# if bionic, ensure the optios are available incase commented out from xenial
|
||||||
|
sed -i '/ProtectKernelModules/s/^#//g' $PWD/deb_source/server/lib/systemd/system/keydb-server.service
|
||||||
|
sed -i '/ProtectKernelTunables/s/^#//g' $PWD/deb_source/server/lib/systemd/system/keydb-server.service
|
||||||
|
sed -i '/ProtectControlGroups/s/^#//g' $PWD/deb_source/server/lib/systemd/system/keydb-server.service
|
||||||
|
sed -i '/RestrictRealtime/s/^#//g' $PWD/deb_source/server/lib/systemd/system/keydb-server.service
|
||||||
|
sed -i '/RestrictNamespaces/s/^#//g' $PWD/deb_source/server/lib/systemd/system/keydb-server.service
|
||||||
|
sed -i '/ProtectKernelModules/s/^#//g' $PWD/deb_source/sentinel/lib/systemd/system/keydb-sentinel.service
|
||||||
|
sed -i '/ProtectKernelTunables/s/^#//g' $PWD/deb_source/sentinel/lib/systemd/system/keydb-sentinel.service
|
||||||
|
sed -i '/ProtectControlGroups/s/^#//g' $PWD/deb_source/sentinel/lib/systemd/system/keydb-sentinel.service
|
||||||
|
sed -i '/RestrictRealtime/s/^#//g' $PWD/deb_source/sentinel/lib/systemd/system/keydb-sentinel.service
|
||||||
|
sed -i '/RestrictNamespaces/s/^#//g' $PWD/deb_source/sentinel/lib/systemd/system/keydb-sentinel.service
|
||||||
|
fi
|
||||||
|
################################################### create keydb common (all) deb package ################################################################
|
||||||
|
|
||||||
|
######## create an updated md5sum file ############
|
||||||
|
rm $PWD/deb_source/all/DEBIAN/md5sums
|
||||||
|
echo $(echo $(md5sum $PWD/deb_source/all/usr/share/doc/keydb/NEWS.Debian.gz | cut -d' ' -f1))' usr/share/doc/keydb/NEWS.Debian.gz' >> $PWD/deb_source/all/DEBIAN/md5sums
|
||||||
|
echo $(echo $(md5sum $PWD/deb_source/all/usr/share/doc/keydb/changelog.Debian.gz | cut -d' ' -f1))' usr/share/doc/keydb/changelog.Debian.gz' >> $PWD/deb_source/all/DEBIAN/md5sums
|
||||||
|
echo $(echo $(md5sum $PWD/deb_source/all/usr/share/doc/keydb/changelog.gz | cut -d' ' -f1))' usr/share/doc/keydb/changelog.gz' >> $PWD/deb_source/all/DEBIAN/md5sums
|
||||||
|
echo $(echo $(md5sum $PWD/deb_source/all/usr/share/doc/keydb/copyright | cut -d' ' -f1))' usr/share/doc/keydb/copyright' >> $PWD/deb_source/all/DEBIAN/md5sums
|
||||||
|
|
||||||
|
######## update control file ###########
|
||||||
|
# Remove version line and add a new one with updated version
|
||||||
|
sed -i '2d' $PWD/deb_source/all/DEBIAN/control
|
||||||
|
sed -i -E "1a\Version: 5:$version-1chl1~"$build"1" $PWD/deb_source/all/DEBIAN/control
|
||||||
|
|
||||||
|
sed -i '6d' $PWD/deb_source/all/DEBIAN/control
|
||||||
|
sed -i -E "5a\Depends: keydb-server (<< 5:$version-1chl1~"$build"1.1~), keydb-server (>= 5:$version-1chl1~"$build"1)" $PWD/deb_source/all/DEBIAN/control
|
||||||
|
|
||||||
|
######## create new deb package ###########
|
||||||
|
dpkg-deb -b ./deb_source/all ./deb_files_generated/keydb_$version-1chl1~"$build"1_all.deb
|
||||||
|
|
||||||
|
|
||||||
|
################################################### create keydb-tools deb package ################################################################
|
||||||
|
|
||||||
|
######## create an updated md5sum file ############
|
||||||
|
rm $PWD/deb_source/tools/DEBIAN/md5sums
|
||||||
|
echo $(echo $(md5sum $PWD/deb_source/tools/usr/bin/keydb-benchmark | cut -d' ' -f1))' usr/bin/keydb-benchmark' >> $PWD/deb_source/tools/DEBIAN/md5sums
|
||||||
|
echo $(echo $(md5sum $PWD/deb_source/tools/usr/bin/keydb-check-aof | cut -d' ' -f1))' usr/bin/keydb-check-aof' >> $PWD/deb_source/tools/DEBIAN/md5sums
|
||||||
|
echo $(echo $(md5sum $PWD/deb_source/tools/usr/bin/keydb-check-rdb | cut -d' ' -f1))' usr/bin/keydb-check-rdb' >> $PWD/deb_source/tools/DEBIAN/md5sums
|
||||||
|
echo $(echo $(md5sum $PWD/deb_source/tools/usr/bin/keydb-server | cut -d' ' -f1))' usr/bin/keydb-server' >> $PWD/deb_source/tools/DEBIAN/md5sums
|
||||||
|
echo $(echo $(md5sum $PWD/deb_source/tools/usr/bin/keydb-pro-server | cut -d' ' -f1))' usr/bin/keydb-pro-server' >> $PWD/deb_source/tools/DEBIAN/md5sums
|
||||||
|
echo $(echo $(md5sum $PWD/deb_source/tools/usr/bin/keydb-cli | cut -d' ' -f1))' usr/bin/keydb-cli' >> $PWD/deb_source/tools/DEBIAN/md5sums
|
||||||
|
echo $(echo $(md5sum $PWD/deb_source/tools/usr/share/bash-completion/completions/keydb-cli | cut -d' ' -f1))' usr/share/bash-completion/completions/keydb-cli' >> $PWD/deb_source/tools/DEBIAN/md5sums
|
||||||
|
echo $(echo $(md5sum $PWD/deb_source/tools/usr/share/doc/keydb-tools/NEWS.Debian.gz | cut -d' ' -f1))' usr/share/doc/keydb-tools/NEWS.Debian.gz' >> $PWD/deb_source/tools/DEBIAN/md5sums
|
||||||
|
echo $(echo $(md5sum $PWD/deb_source/tools/usr/share/doc/keydb-tools/changelog.Debian.gz | cut -d' ' -f1))' usr/share/doc/keydb-tools/changelog.Debian.gz' >> $PWD/deb_source/tools/DEBIAN/md5sums
|
||||||
|
echo $(echo $(md5sum $PWD/deb_source/tools/usr/share/doc/keydb-tools/changelog.gz | cut -d' ' -f1))' usr/share/doc/keydb-tools/changelog.gz' >> $PWD/deb_source/tools/DEBIAN/md5sums
|
||||||
|
echo $(echo $(md5sum $PWD/deb_source/tools/usr/share/doc/keydb-tools/copyright | cut -d' ' -f1))' usr/share/doc/keydb-tools/copyright' >> $PWD/deb_source/tools/DEBIAN/md5sums
|
||||||
|
echo $(echo $(md5sum $PWD/deb_source/tools/usr/share/doc/keydb-tools/examples/lru/README | cut -d' ' -f1))' usr/share/doc/keydb-tools/examples/lru/README' >> $PWD/deb_source/tools/DEBIAN/md5sums
|
||||||
|
echo $(echo $(md5sum $PWD/deb_source/tools/usr/share/doc/keydb-tools/examples/lru/lfu-simulation.c.gz | cut -d' ' -f1))' usr/share/doc/keydb-tools/examples/lru/lfu-simulation.c.gz' >> $PWD/deb_source/tools/DEBIAN/md5sums
|
||||||
|
echo $(echo $(md5sum $PWD/deb_source/tools/usr/share/doc/keydb-tools/examples/lru/test-lru.rb.gz | cut -d' ' -f1))' usr/share/doc/keydb-tools/examples/lru/test-lru.rb.gz' >> $PWD/deb_source/tools/DEBIAN/md5sums
|
||||||
|
echo $(echo $(md5sum $PWD/deb_source/tools/usr/share/doc/keydb-tools/examples/redis-trib.rb | cut -d' ' -f1))' usr/share/doc/keydb-tools/examples/redis-trib.rb' >> $PWD/deb_source/tools/DEBIAN/md5sums
|
||||||
|
echo $(echo $(md5sum $PWD/deb_source/tools/usr/share/man/man1/keydb-benchmark.1.gz | cut -d' ' -f1))' usr/share/man/man1/keydb-benchmark.1.gz' >> $PWD/deb_source/tools/DEBIAN/md5sums
|
||||||
|
echo $(echo $(md5sum $PWD/deb_source/tools/usr/share/man/man1/keydb-check-aof.1.gz | cut -d' ' -f1))' usr/share/man/man1/keydb-check-aof.1.gz' >> $PWD/deb_source/tools/DEBIAN/md5sums
|
||||||
|
echo $(echo $(md5sum $PWD/deb_source/tools/usr/share/man/man1/keydb-check-rdb.1.gz | cut -d' ' -f1))' usr/share/man/man1/keydb-check-rdb.1.gz' >> $PWD/deb_source/tools/DEBIAN/md5sums
|
||||||
|
echo $(echo $(md5sum $PWD/deb_source/tools/usr/share/man/man1/keydb-cli.1.gz | cut -d' ' -f1))' usr/share/man/man1/keydb-cli.1.gz' >> $PWD/deb_source/tools/DEBIAN/md5sums
|
||||||
|
|
||||||
|
######## update control file ###########
|
||||||
|
# Remove version line and add a new one with updated version
|
||||||
|
sed -i '3d' $PWD/deb_source/tools/DEBIAN/control
|
||||||
|
sed -i -E "2a\Version: 5:$version-1chl1~"$build"1" $PWD/deb_source/tools/DEBIAN/control
|
||||||
|
sed -i '4d' $PWD/deb_source/tools/DEBIAN/control
|
||||||
|
sed -i -E "3a\Architecture: $arch" $PWD/deb_source/tools/DEBIAN/control
|
||||||
|
if [ "$build" == "bionic" ]; then
|
||||||
|
sed -i '7d' $PWD/deb_source/tools/DEBIAN/control
|
||||||
|
sed -i -E "6a\Depends: adduser, libc6 (>= 2.17), libcurl4 (>= 7.16.2), libgcc1 (>= 1:3.0), libstdc++6 (>= 4.8.1), libuuid1 (>= 2.16), libssl1.1 (>= 1.1.1), zlib1g (>=1.2.11)" $PWD/deb_source/tools/DEBIAN/control
|
||||||
|
fi
|
||||||
|
if [ "$build" == "xenial" ]; then
|
||||||
|
sed -i '7d' $PWD/deb_source/tools/DEBIAN/control
|
||||||
|
sed -i -E "6a\Depends: adduser, libc6 (>= 2.23), libcurl3 (>= 7.47.0), libgcc1 (>= 6.0.1), libstdc++6 (>= 5.4.0), libuuid1 (>= 2.27.1), libssl1.0.0 (>= 1.0.2), zlib1g (>=1.2.8)" $PWD/deb_source/tools/DEBIAN/control
|
||||||
|
fi
|
||||||
|
######## create new deb package ###########
|
||||||
|
dpkg-deb -b ./deb_source/tools ./deb_files_generated/keydb-tools_$version-1chl1~"$build"1_$arch.deb
|
||||||
|
|
||||||
|
################################################### create keydb-server deb package ################################################################
|
||||||
|
|
||||||
|
######## create an updated md5sum file ############
|
||||||
|
rm $PWD/deb_source/server/DEBIAN/md5sums
|
||||||
|
echo $(echo $(md5sum $PWD/deb_source/server/lib/systemd/system/keydb-server.service | cut -d' ' -f1))' lib/systemd/system/keydb-server.service' >> $PWD/deb_source/server/DEBIAN/md5sums
|
||||||
|
echo $(echo $(md5sum $PWD/deb_source/server/usr/share/doc/keydb-server/NEWS.Debian.gz | cut -d' ' -f1))' usr/share/doc/keydb-server/NEWS.Debian.gz' >> $PWD/deb_source/server/DEBIAN/md5sums
|
||||||
|
echo $(echo $(md5sum $PWD/deb_source/server/usr/share/doc/keydb-server/README.md.gz | cut -d' ' -f1))' usr/share/doc/keydb-server/README.md.gz' >> $PWD/deb_source/server/DEBIAN/md5sums
|
||||||
|
echo $(echo $(md5sum $PWD/deb_source/server/usr/share/doc/keydb-server/changelog.Debian.gz | cut -d' ' -f1))' usr/share/doc/keydb-server/changelog.Debian.gz' >> $PWD/deb_source/server/DEBIAN/md5sums
|
||||||
|
echo $(echo $(md5sum $PWD/deb_source/server/usr/share/doc/keydb-server/changelog.gz | cut -d' ' -f1))' usr/share/doc/keydb-server/changelog.gz' >> $PWD/deb_source/server/DEBIAN/md5sums
|
||||||
|
echo $(echo $(md5sum $PWD/deb_source/server/usr/share/doc/keydb-server/copyright | cut -d' ' -f1))' usr/share/doc/keydb-server/copyright' >> $PWD/deb_source/server/DEBIAN/md5sums
|
||||||
|
echo $(echo $(md5sum $PWD/deb_source/server/usr/share/man/man1/keydb-server.1.gz | cut -d' ' -f1))' usr/share/man/man1/keydb-server.1.gz' >> $PWD/deb_source/server/DEBIAN/md5sums
|
||||||
|
|
||||||
|
######## update control file ###########
|
||||||
|
# Remove version line and add a new one with updated version
|
||||||
|
sed -i '3d' $PWD/deb_source/server/DEBIAN/control
|
||||||
|
sed -i -E "2a\Version: 5:$version-1chl1~"$build"1" $PWD/deb_source/server/DEBIAN/control
|
||||||
|
sed -i '7d' $PWD/deb_source/server/DEBIAN/control
|
||||||
|
sed -i -E "6a\Depends: lsb-base (>= 3.2-14), keydb-tools (= 5:$version-1chl1~"$build"1)" $PWD/deb_source/server/DEBIAN/control
|
||||||
|
sed -i '4d' $PWD/deb_source/server/DEBIAN/control
|
||||||
|
sed -i -E "3a\Architecture: $arch" $PWD/deb_source/server/DEBIAN/control
|
||||||
|
######## create new deb package ###########
|
||||||
|
dpkg-deb -b ./deb_source/server ./deb_files_generated/keydb-server_$version-1chl1~"$build"1_$arch.deb
|
||||||
|
|
||||||
|
|
||||||
|
################################################### create keydb-sentinel deb package ################################################################
|
||||||
|
|
||||||
|
######## create an updated md5sum file ############
|
||||||
|
rm $PWD/deb_source/sentinel/DEBIAN/md5sums
|
||||||
|
echo $(echo $(md5sum $PWD/deb_source/sentinel/lib/systemd/system/keydb-sentinel.service | cut -d' ' -f1))' lib/systemd/system/keydb-sentinel.service' >> $PWD/deb_source/sentinel/DEBIAN/md5sums
|
||||||
|
echo $(echo $(md5sum $PWD/deb_source/sentinel/usr/share/doc/keydb-sentinel/NEWS.Debian.gz | cut -d' ' -f1))' usr/share/doc/keydb-sentinel/NEWS.Debian.gz' >> $PWD/deb_source/sentinel/DEBIAN/md5sums
|
||||||
|
echo $(echo $(md5sum $PWD/deb_source/sentinel/usr/share/doc/keydb-sentinel/changelog.Debian.gz | cut -d' ' -f1))' usr/share/doc/keydb-sentinel/changelog.Debian.gz' >> $PWD/deb_source/sentinel/DEBIAN/md5sums
|
||||||
|
echo $(echo $(md5sum $PWD/deb_source/sentinel/usr/share/doc/keydb-sentinel/changelog.gz | cut -d' ' -f1))' usr/share/doc/keydb-sentinel/changelog.gz' >> $PWD/deb_source/sentinel/DEBIAN/md5sums
|
||||||
|
echo $(echo $(md5sum $PWD/deb_source/sentinel/usr/share/doc/keydb-sentinel/copyright | cut -d' ' -f1))' usr/share/doc/keydb-sentinel/copyright' >> $PWD/deb_source/sentinel/DEBIAN/md5sums
|
||||||
|
echo $(echo $(md5sum $PWD/deb_source/sentinel/usr/share/man/man1/keydb-sentinel.1.gz | cut -d' ' -f1))' usr/share/man/man1/keydb-sentinel.1.gz' >> $PWD/deb_source/sentinel/DEBIAN/md5sums
|
||||||
|
|
||||||
|
######## update control file ###########
|
||||||
|
# Remove version line and add a new one with updated version
|
||||||
|
sed -i '3d' $PWD/deb_source/sentinel/DEBIAN/control
|
||||||
|
sed -i -E "2a\Version: 5:$version-1chl1~"$build"1" $PWD/deb_source/sentinel/DEBIAN/control
|
||||||
|
sed -i '7d' $PWD/deb_source/sentinel/DEBIAN/control
|
||||||
|
sed -i -E "6a\Depends: lsb-base (>= 3.2-14), keydb-tools (= 5:$version-1chl1~"$build"1)" $PWD/deb_source/sentinel/DEBIAN/control
|
||||||
|
sed -i '4d' $PWD/deb_source/sentinel/DEBIAN/control
|
||||||
|
sed -i -E "3a\Architecture: $arch" $PWD/deb_source/sentinel/DEBIAN/control
|
||||||
|
######## create new deb package ###########
|
||||||
|
dpkg-deb -b ./deb_source/sentinel ./deb_files_generated/keydb-sentinel_$version-1chl1~"$build"1_$arch.deb
|
1
pkg/deb/deb_files_generated/.gitkeep
Executable file
1
pkg/deb/deb_files_generated/.gitkeep
Executable file
@ -0,0 +1 @@
|
|||||||
|
# keep this directory in git tree
|
17
pkg/deb/deb_source/all/DEBIAN/control
Executable file
17
pkg/deb/deb_source/all/DEBIAN/control
Executable file
@ -0,0 +1,17 @@
|
|||||||
|
Package: keydb
|
||||||
|
Version: 5:0.0.0-1chl1~bionic1
|
||||||
|
Architecture: all
|
||||||
|
Maintainer: Ben Schermel <ben@eqalpha.com>
|
||||||
|
Installed-Size: 16
|
||||||
|
Depends: keydb-server (<< 5:0.0.0-1chl1~bionic1.1~), keydb-server (>= 5:0.0.0-1chl1~bionic1)
|
||||||
|
Section: database
|
||||||
|
Priority: optional
|
||||||
|
Homepage: https://docs.keydb.dev/
|
||||||
|
Description: Persistent key-value database with network interface (metapackage)
|
||||||
|
keydb is a key-value database in a similar vein to memcache but the dataset
|
||||||
|
is non-volatile. keydb additionally provides native support for atomically
|
||||||
|
manipulating and querying data structures such as lists and sets.
|
||||||
|
.
|
||||||
|
The dataset is stored entirely in memory and periodically flushed to disk.
|
||||||
|
.
|
||||||
|
This package depends on the keydb-server package.
|
4
pkg/deb/deb_source/all/DEBIAN/md5sums
Normal file
4
pkg/deb/deb_source/all/DEBIAN/md5sums
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
291ecb74aaa46f085bb6a01edce4d57f usr/share/doc/keydb/NEWS.Debian.gz
|
||||||
|
ff20296c5421fd3c25e45470608b104a usr/share/doc/keydb/changelog.Debian.gz
|
||||||
|
391f4b40dd5886c06bf59dc1264deb0f usr/share/doc/keydb/changelog.gz
|
||||||
|
3b77eb20476366888f0802563ac78f3c usr/share/doc/keydb/copyright
|
BIN
pkg/deb/deb_source/all/usr/share/doc/keydb/00-RELEASENOTES.gz
Executable file
BIN
pkg/deb/deb_source/all/usr/share/doc/keydb/00-RELEASENOTES.gz
Executable file
Binary file not shown.
BIN
pkg/deb/deb_source/all/usr/share/doc/keydb/NEWS.Debian.gz
Executable file
BIN
pkg/deb/deb_source/all/usr/share/doc/keydb/NEWS.Debian.gz
Executable file
Binary file not shown.
BIN
pkg/deb/deb_source/all/usr/share/doc/keydb/changelog.Debian.gz
Executable file
BIN
pkg/deb/deb_source/all/usr/share/doc/keydb/changelog.Debian.gz
Executable file
Binary file not shown.
BIN
pkg/deb/deb_source/all/usr/share/doc/keydb/changelog.gz
Executable file
BIN
pkg/deb/deb_source/all/usr/share/doc/keydb/changelog.gz
Executable file
Binary file not shown.
134
pkg/deb/deb_source/all/usr/share/doc/keydb/copyright
Executable file
134
pkg/deb/deb_source/all/usr/share/doc/keydb/copyright
Executable 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.
|
4
pkg/deb/deb_source/sentinel/DEBIAN/conffiles
Executable file
4
pkg/deb/deb_source/sentinel/DEBIAN/conffiles
Executable file
@ -0,0 +1,4 @@
|
|||||||
|
/etc/default/keydb-sentinel
|
||||||
|
/etc/init.d/keydb-sentinel
|
||||||
|
/etc/keydb/sentinel.conf
|
||||||
|
/etc/logrotate.d/keydb-sentinel
|
16
pkg/deb/deb_source/sentinel/DEBIAN/control
Executable file
16
pkg/deb/deb_source/sentinel/DEBIAN/control
Executable file
@ -0,0 +1,16 @@
|
|||||||
|
Package: keydb-sentinel
|
||||||
|
Source: keydb
|
||||||
|
Version: 5:0.0.0-1chl1~bionic1
|
||||||
|
Architecture: amd64
|
||||||
|
Maintainer: Ben Schermel <ben@eqalpha.com>
|
||||||
|
Installed-Size: 52
|
||||||
|
Depends: lsb-base (>= 3.2-14), keydb-tools (= 5:0.0.0-1chl1~bionic1)
|
||||||
|
Section: database
|
||||||
|
Priority: optional
|
||||||
|
Homepage: https://docs.keydb.dev/
|
||||||
|
Description: Persistent key-value database with network interface (monitoring)
|
||||||
|
keydb is a key-value database in a similar vein to memcache but the dataset
|
||||||
|
is non-volatile. keydb additionally provides native support for atomically
|
||||||
|
manipulating and querying data structures such as lists and sets.
|
||||||
|
.
|
||||||
|
This package contains the keydb Sentinel monitoring software.
|
6
pkg/deb/deb_source/sentinel/DEBIAN/md5sums
Normal file
6
pkg/deb/deb_source/sentinel/DEBIAN/md5sums
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
b1c642338ca200652c9df544c040fc4f lib/systemd/system/keydb-sentinel.service
|
||||||
|
291ecb74aaa46f085bb6a01edce4d57f usr/share/doc/keydb-sentinel/NEWS.Debian.gz
|
||||||
|
ff20296c5421fd3c25e45470608b104a usr/share/doc/keydb-sentinel/changelog.Debian.gz
|
||||||
|
391f4b40dd5886c06bf59dc1264deb0f usr/share/doc/keydb-sentinel/changelog.gz
|
||||||
|
3b77eb20476366888f0802563ac78f3c usr/share/doc/keydb-sentinel/copyright
|
||||||
|
cd608d980321ef2b774a4a70a41619a6 usr/share/man/man1/keydb-sentinel.1.gz
|
44
pkg/deb/deb_source/sentinel/DEBIAN/postinst
Executable file
44
pkg/deb/deb_source/sentinel/DEBIAN/postinst
Executable file
@ -0,0 +1,44 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -eu
|
||||||
|
|
||||||
|
USER="keydb"
|
||||||
|
GROUP="$USER"
|
||||||
|
CONFFILE="/etc/keydb/sentinel.conf"
|
||||||
|
|
||||||
|
if [ "$1" = "configure" ]
|
||||||
|
then
|
||||||
|
if ! dpkg-statoverride --list ${CONFFILE} >/dev/null 2>&1
|
||||||
|
then
|
||||||
|
dpkg-statoverride --update --add ${USER} ${GROUP} 640 ${CONFFILE}
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Automatically added by dh_installdeb/11.1.6ubuntu2
|
||||||
|
dpkg-maintscript-helper rm_conffile /etc/keydb/keydb-sentinel.post-down.d/00_example 4:4.0.2-3~ -- "$@"
|
||||||
|
# End automatically added section
|
||||||
|
# Automatically added by dh_installdeb/11.1.6ubuntu2
|
||||||
|
dpkg-maintscript-helper rm_conffile /etc/keydb/keydb-sentinel.post-up.d/00_example 4:4.0.2-3~ -- "$@"
|
||||||
|
# End automatically added section
|
||||||
|
# Automatically added by dh_installdeb/11.1.6ubuntu2
|
||||||
|
dpkg-maintscript-helper rm_conffile /etc/keydb/keydb-sentinel.pre-down.d/00_example 4:4.0.2-3~ -- "$@"
|
||||||
|
# End automatically added section
|
||||||
|
# Automatically added by dh_installdeb/11.1.6ubuntu2
|
||||||
|
dpkg-maintscript-helper rm_conffile /etc/keydb/keydb-sentinel.pre-up.d/00_example 4:4.0.2-3~ -- "$@"
|
||||||
|
# End automatically added section
|
||||||
|
# Automatically added by dh_installinit/11.1.6ubuntu2
|
||||||
|
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then
|
||||||
|
if [ -x "/etc/init.d/keydb-sentinel" ]; then
|
||||||
|
update-rc.d keydb-sentinel defaults >/dev/null
|
||||||
|
invoke-rc.d keydb-sentinel start || exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
# End automatically added section
|
||||||
|
|
||||||
|
|
||||||
|
if [ "$1" = "configure" ]
|
||||||
|
then
|
||||||
|
find /etc/keydb -maxdepth 1 -type d -name 'keydb-sentinel.*.d' -empty -delete
|
||||||
|
fi
|
||||||
|
|
||||||
|
exit 0
|
38
pkg/deb/deb_source/sentinel/DEBIAN/postrm
Executable file
38
pkg/deb/deb_source/sentinel/DEBIAN/postrm
Executable file
@ -0,0 +1,38 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -eu
|
||||||
|
|
||||||
|
CONFFILE="/etc/keydb/sentinel.conf"
|
||||||
|
|
||||||
|
if [ "$1" = "purge" ]
|
||||||
|
then
|
||||||
|
dpkg-statoverride --remove ${CONFFILE} || test $? -eq 2
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Automatically added by dh_installinit/11.1.6ubuntu2
|
||||||
|
if [ "$1" = "purge" ] ; then
|
||||||
|
update-rc.d keydb-sentinel remove >/dev/null
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# In case this system is running systemd, we make systemd reload the unit files
|
||||||
|
# to pick up changes.
|
||||||
|
if [ -d /run/systemd/system ] ; then
|
||||||
|
systemctl --system daemon-reload >/dev/null || true
|
||||||
|
fi
|
||||||
|
# End automatically added section
|
||||||
|
# Automatically added by dh_installdeb/11.1.6ubuntu2
|
||||||
|
dpkg-maintscript-helper rm_conffile /etc/keydb/keydb-sentinel.pre-up.d/00_example 4:4.0.2-3~ -- "$@"
|
||||||
|
# End automatically added section
|
||||||
|
# Automatically added by dh_installdeb/11.1.6ubuntu2
|
||||||
|
dpkg-maintscript-helper rm_conffile /etc/keydb/keydb-sentinel.pre-down.d/00_example 4:4.0.2-3~ -- "$@"
|
||||||
|
# End automatically added section
|
||||||
|
# Automatically added by dh_installdeb/11.1.6ubuntu2
|
||||||
|
dpkg-maintscript-helper rm_conffile /etc/keydb/keydb-sentinel.post-up.d/00_example 4:4.0.2-3~ -- "$@"
|
||||||
|
# End automatically added section
|
||||||
|
# Automatically added by dh_installdeb/11.1.6ubuntu2
|
||||||
|
dpkg-maintscript-helper rm_conffile /etc/keydb/keydb-sentinel.post-down.d/00_example 4:4.0.2-3~ -- "$@"
|
||||||
|
# End automatically added section
|
||||||
|
|
||||||
|
|
||||||
|
exit 0
|
14
pkg/deb/deb_source/sentinel/DEBIAN/preinst
Executable file
14
pkg/deb/deb_source/sentinel/DEBIAN/preinst
Executable file
@ -0,0 +1,14 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
set -e
|
||||||
|
# Automatically added by dh_installdeb/11.1.6ubuntu2
|
||||||
|
dpkg-maintscript-helper rm_conffile /etc/keydb/keydb-sentinel.post-down.d/00_example 4:4.0.2-3~ -- "$@"
|
||||||
|
# End automatically added section
|
||||||
|
# Automatically added by dh_installdeb/11.1.6ubuntu2
|
||||||
|
dpkg-maintscript-helper rm_conffile /etc/keydb/keydb-sentinel.post-up.d/00_example 4:4.0.2-3~ -- "$@"
|
||||||
|
# End automatically added section
|
||||||
|
# Automatically added by dh_installdeb/11.1.6ubuntu2
|
||||||
|
dpkg-maintscript-helper rm_conffile /etc/keydb/keydb-sentinel.pre-down.d/00_example 4:4.0.2-3~ -- "$@"
|
||||||
|
# End automatically added section
|
||||||
|
# Automatically added by dh_installdeb/11.1.6ubuntu2
|
||||||
|
dpkg-maintscript-helper rm_conffile /etc/keydb/keydb-sentinel.pre-up.d/00_example 4:4.0.2-3~ -- "$@"
|
||||||
|
# End automatically added section
|
19
pkg/deb/deb_source/sentinel/DEBIAN/prerm
Executable file
19
pkg/deb/deb_source/sentinel/DEBIAN/prerm
Executable file
@ -0,0 +1,19 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
set -e
|
||||||
|
# Automatically added by dh_installinit/11.1.6ubuntu2
|
||||||
|
if [ -x "/etc/init.d/keydb-sentinel" ]; then
|
||||||
|
invoke-rc.d keydb-sentinel stop || exit 1
|
||||||
|
fi
|
||||||
|
# End automatically added section
|
||||||
|
# Automatically added by dh_installdeb/11.1.6ubuntu2
|
||||||
|
dpkg-maintscript-helper rm_conffile /etc/keydb/keydb-sentinel.pre-up.d/00_example 4:4.0.2-3~ -- "$@"
|
||||||
|
# End automatically added section
|
||||||
|
# Automatically added by dh_installdeb/11.1.6ubuntu2
|
||||||
|
dpkg-maintscript-helper rm_conffile /etc/keydb/keydb-sentinel.pre-down.d/00_example 4:4.0.2-3~ -- "$@"
|
||||||
|
# End automatically added section
|
||||||
|
# Automatically added by dh_installdeb/11.1.6ubuntu2
|
||||||
|
dpkg-maintscript-helper rm_conffile /etc/keydb/keydb-sentinel.post-up.d/00_example 4:4.0.2-3~ -- "$@"
|
||||||
|
# End automatically added section
|
||||||
|
# Automatically added by dh_installdeb/11.1.6ubuntu2
|
||||||
|
dpkg-maintscript-helper rm_conffile /etc/keydb/keydb-sentinel.post-down.d/00_example 4:4.0.2-3~ -- "$@"
|
||||||
|
# End automatically added section
|
244
pkg/deb/deb_source/sentinel/etc/keydb/sentinel.conf
Normal file
244
pkg/deb/deb_source/sentinel/etc/keydb/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
|
@ -0,0 +1,40 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Advanced key-value store
|
||||||
|
After=network.target
|
||||||
|
Documentation=https://docs.keydb.dev, man:keydb-sentinel(1)
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=forking
|
||||||
|
ExecStart=/usr/bin/keydb-sentinel /etc/keydb/sentinel.conf
|
||||||
|
ExecStop=/bin/kill -s TERM $MAINPID
|
||||||
|
PIDFile=/var/run/sentinel/keydb-sentinel.pid
|
||||||
|
TimeoutStopSec=0
|
||||||
|
Restart=always
|
||||||
|
User=keydb
|
||||||
|
Group=keydb
|
||||||
|
RuntimeDirectory=sentinel
|
||||||
|
RuntimeDirectoryMode=2755
|
||||||
|
|
||||||
|
UMask=007
|
||||||
|
PrivateTmp=yes
|
||||||
|
LimitNOFILE=65535
|
||||||
|
PrivateDevices=yes
|
||||||
|
ProtectHome=yes
|
||||||
|
ReadOnlyDirectories=/
|
||||||
|
ReadWriteDirectories=-/var/lib/keydb
|
||||||
|
ReadWriteDirectories=-/var/log/keydb
|
||||||
|
ReadWriteDirectories=-/var/run/sentinel
|
||||||
|
|
||||||
|
NoNewPrivileges=true
|
||||||
|
CapabilityBoundingSet=CAP_SETGID CAP_SETUID CAP_SYS_RESOURCE
|
||||||
|
RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX
|
||||||
|
|
||||||
|
# keydb-sentinel can write to its own config file when in cluster mode so we
|
||||||
|
# permit writing there by default. If you are not using this feature, it is
|
||||||
|
# recommended that you replace the following lines with "ProtectSystem=full".
|
||||||
|
ProtectSystem=true
|
||||||
|
ReadWriteDirectories=-/etc/keydb
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
Alias=sentinel.service
|
BIN
pkg/deb/deb_source/sentinel/usr/share/man/man1/keydb-sentinel.1.gz
Executable file
BIN
pkg/deb/deb_source/sentinel/usr/share/man/man1/keydb-sentinel.1.gz
Executable file
Binary file not shown.
4
pkg/deb/deb_source/server/DEBIAN/conffiles
Executable file
4
pkg/deb/deb_source/server/DEBIAN/conffiles
Executable file
@ -0,0 +1,4 @@
|
|||||||
|
/etc/default/keydb-server
|
||||||
|
/etc/init.d/keydb-server
|
||||||
|
/etc/keydb/keydb.conf
|
||||||
|
/etc/logrotate.d/keydb-server
|
16
pkg/deb/deb_source/server/DEBIAN/control
Executable file
16
pkg/deb/deb_source/server/DEBIAN/control
Executable file
@ -0,0 +1,16 @@
|
|||||||
|
Package: keydb-server
|
||||||
|
Source: keydb
|
||||||
|
Version: 5:0.0.0-1chl1~bionic1
|
||||||
|
Architecture: amd64
|
||||||
|
Maintainer: Ben Schermel <ben@eqalpha.com>
|
||||||
|
Installed-Size: 119
|
||||||
|
Depends: lsb-base (>= 3.2-14), keydb-tools (= 5:0.0.0-1chl1~bionic1)
|
||||||
|
Section: database
|
||||||
|
Priority: optional
|
||||||
|
Homepage: https://docs.keydb.dev/
|
||||||
|
Description: Persistent key-value database with network interface
|
||||||
|
keydb is a key-value database in a similar vein to memcache but the dataset
|
||||||
|
is non-volatile. keydb additionally provides native support for atomically
|
||||||
|
manipulating and querying data structures such as lists and sets.
|
||||||
|
.
|
||||||
|
The dataset is stored entirely in memory and periodically flushed to disk.
|
7
pkg/deb/deb_source/server/DEBIAN/md5sums
Normal file
7
pkg/deb/deb_source/server/DEBIAN/md5sums
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
86743ab47224209eb79be4bbeb9d7945 lib/systemd/system/keydb-server.service
|
||||||
|
291ecb74aaa46f085bb6a01edce4d57f usr/share/doc/keydb-server/NEWS.Debian.gz
|
||||||
|
787d0d6c891480f37b27ac6fd90ad3f6 usr/share/doc/keydb-server/README.md.gz
|
||||||
|
ff20296c5421fd3c25e45470608b104a usr/share/doc/keydb-server/changelog.Debian.gz
|
||||||
|
1b5e9b283240a163084822adad00f64f usr/share/doc/keydb-server/changelog.gz
|
||||||
|
3b77eb20476366888f0802563ac78f3c usr/share/doc/keydb-server/copyright
|
||||||
|
c0ebbc5085f48753c08becccb5d1eadf usr/share/man/man1/keydb-server.1.gz
|
44
pkg/deb/deb_source/server/DEBIAN/postinst
Executable file
44
pkg/deb/deb_source/server/DEBIAN/postinst
Executable file
@ -0,0 +1,44 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -eu
|
||||||
|
|
||||||
|
USER="keydb"
|
||||||
|
GROUP="$USER"
|
||||||
|
CONFFILE="/etc/keydb/keydb.conf"
|
||||||
|
|
||||||
|
if [ "$1" = "configure" ]
|
||||||
|
then
|
||||||
|
if ! dpkg-statoverride --list ${CONFFILE} >/dev/null 2>&1
|
||||||
|
then
|
||||||
|
dpkg-statoverride --update --add ${USER} ${GROUP} 640 ${CONFFILE}
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Automatically added by dh_installdeb/11.1.6ubuntu2
|
||||||
|
dpkg-maintscript-helper rm_conffile /etc/keydb/keydb-server.post-down.d/00_example 4:4.0.2-3~ -- "$@"
|
||||||
|
# End automatically added section
|
||||||
|
# Automatically added by dh_installdeb/11.1.6ubuntu2
|
||||||
|
dpkg-maintscript-helper rm_conffile /etc/keydb/keydb-server.post-up.d/00_example 4:4.0.2-3~ -- "$@"
|
||||||
|
# End automatically added section
|
||||||
|
# Automatically added by dh_installdeb/11.1.6ubuntu2
|
||||||
|
dpkg-maintscript-helper rm_conffile /etc/keydb/keydb-server.pre-down.d/00_example 4:4.0.2-3~ -- "$@"
|
||||||
|
# End automatically added section
|
||||||
|
# Automatically added by dh_installdeb/11.1.6ubuntu2
|
||||||
|
dpkg-maintscript-helper rm_conffile /etc/keydb/keydb-server.pre-up.d/00_example 4:4.0.2-3~ -- "$@"
|
||||||
|
# End automatically added section
|
||||||
|
# Automatically added by dh_installinit/11.1.6ubuntu2
|
||||||
|
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then
|
||||||
|
if [ -x "/etc/init.d/keydb-server" ]; then
|
||||||
|
update-rc.d keydb-server defaults >/dev/null
|
||||||
|
invoke-rc.d keydb-server start || exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
# End automatically added section
|
||||||
|
|
||||||
|
|
||||||
|
if [ "$1" = "configure" ]
|
||||||
|
then
|
||||||
|
find /etc/keydb -maxdepth 1 -type d -name 'keydb-server.*.d' -empty -delete
|
||||||
|
fi
|
||||||
|
|
||||||
|
exit 0
|
38
pkg/deb/deb_source/server/DEBIAN/postrm
Executable file
38
pkg/deb/deb_source/server/DEBIAN/postrm
Executable file
@ -0,0 +1,38 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -eu
|
||||||
|
|
||||||
|
CONFFILE="/etc/keydb/keydb.conf"
|
||||||
|
|
||||||
|
if [ "${1}" = "purge" ]
|
||||||
|
then
|
||||||
|
dpkg-statoverride --remove ${CONFFILE} || test $? -eq 2
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Automatically added by dh_installinit/11.1.6ubuntu2
|
||||||
|
if [ "$1" = "purge" ] ; then
|
||||||
|
update-rc.d keydb-server remove >/dev/null
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# In case this system is running systemd, we make systemd reload the unit files
|
||||||
|
# to pick up changes.
|
||||||
|
if [ -d /run/systemd/system ] ; then
|
||||||
|
systemctl --system daemon-reload >/dev/null || true
|
||||||
|
fi
|
||||||
|
# End automatically added section
|
||||||
|
# Automatically added by dh_installdeb/11.1.6ubuntu2
|
||||||
|
dpkg-maintscript-helper rm_conffile /etc/keydb/keydb-server.pre-up.d/00_example 4:4.0.2-3~ -- "$@"
|
||||||
|
# End automatically added section
|
||||||
|
# Automatically added by dh_installdeb/11.1.6ubuntu2
|
||||||
|
dpkg-maintscript-helper rm_conffile /etc/keydb/keydb-server.pre-down.d/00_example 4:4.0.2-3~ -- "$@"
|
||||||
|
# End automatically added section
|
||||||
|
# Automatically added by dh_installdeb/11.1.6ubuntu2
|
||||||
|
dpkg-maintscript-helper rm_conffile /etc/keydb/keydb-server.post-up.d/00_example 4:4.0.2-3~ -- "$@"
|
||||||
|
# End automatically added section
|
||||||
|
# Automatically added by dh_installdeb/11.1.6ubuntu2
|
||||||
|
dpkg-maintscript-helper rm_conffile /etc/keydb/keydb-server.post-down.d/00_example 4:4.0.2-3~ -- "$@"
|
||||||
|
# End automatically added section
|
||||||
|
|
||||||
|
|
||||||
|
exit 0
|
14
pkg/deb/deb_source/server/DEBIAN/preinst
Executable file
14
pkg/deb/deb_source/server/DEBIAN/preinst
Executable file
@ -0,0 +1,14 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
set -e
|
||||||
|
# Automatically added by dh_installdeb/11.1.6ubuntu2
|
||||||
|
dpkg-maintscript-helper rm_conffile /etc/keydb/keydb-server.post-down.d/00_example 4:4.0.2-3~ -- "$@"
|
||||||
|
# End automatically added section
|
||||||
|
# Automatically added by dh_installdeb/11.1.6ubuntu2
|
||||||
|
dpkg-maintscript-helper rm_conffile /etc/keydb/keydb-server.post-up.d/00_example 4:4.0.2-3~ -- "$@"
|
||||||
|
# End automatically added section
|
||||||
|
# Automatically added by dh_installdeb/11.1.6ubuntu2
|
||||||
|
dpkg-maintscript-helper rm_conffile /etc/keydb/keydb-server.pre-down.d/00_example 4:4.0.2-3~ -- "$@"
|
||||||
|
# End automatically added section
|
||||||
|
# Automatically added by dh_installdeb/11.1.6ubuntu2
|
||||||
|
dpkg-maintscript-helper rm_conffile /etc/keydb/keydb-server.pre-up.d/00_example 4:4.0.2-3~ -- "$@"
|
||||||
|
# End automatically added section
|
19
pkg/deb/deb_source/server/DEBIAN/prerm
Executable file
19
pkg/deb/deb_source/server/DEBIAN/prerm
Executable file
@ -0,0 +1,19 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
set -e
|
||||||
|
# Automatically added by dh_installinit/11.1.6ubuntu2
|
||||||
|
if [ -x "/etc/init.d/keydb-server" ]; then
|
||||||
|
invoke-rc.d keydb-server stop || exit 1
|
||||||
|
fi
|
||||||
|
# End automatically added section
|
||||||
|
# Automatically added by dh_installdeb/11.1.6ubuntu2
|
||||||
|
dpkg-maintscript-helper rm_conffile /etc/keydb/keydb-server.pre-up.d/00_example 4:4.0.2-3~ -- "$@"
|
||||||
|
# End automatically added section
|
||||||
|
# Automatically added by dh_installdeb/11.1.6ubuntu2
|
||||||
|
dpkg-maintscript-helper rm_conffile /etc/keydb/keydb-server.pre-down.d/00_example 4:4.0.2-3~ -- "$@"
|
||||||
|
# End automatically added section
|
||||||
|
# Automatically added by dh_installdeb/11.1.6ubuntu2
|
||||||
|
dpkg-maintscript-helper rm_conffile /etc/keydb/keydb-server.post-up.d/00_example 4:4.0.2-3~ -- "$@"
|
||||||
|
# End automatically added section
|
||||||
|
# Automatically added by dh_installdeb/11.1.6ubuntu2
|
||||||
|
dpkg-maintscript-helper rm_conffile /etc/keydb/keydb-server.post-down.d/00_example 4:4.0.2-3~ -- "$@"
|
||||||
|
# End automatically added section
|
1576
pkg/deb/deb_source/server/etc/keydb/keydb.conf
Normal file
1576
pkg/deb/deb_source/server/etc/keydb/keydb.conf
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,40 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Advanced key-value store
|
||||||
|
After=network.target
|
||||||
|
Documentation=https://docs.keydb.dev, man:keydb-server(1)
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=forking
|
||||||
|
ExecStart=/usr/bin/keydb-server /etc/keydb/keydb.conf
|
||||||
|
ExecStop=/bin/kill -s TERM $MAINPID
|
||||||
|
PIDFile=/var/run/keydb/keydb-server.pid
|
||||||
|
TimeoutStopSec=0
|
||||||
|
Restart=always
|
||||||
|
User=keydb
|
||||||
|
Group=keydb
|
||||||
|
RuntimeDirectory=keydb
|
||||||
|
RuntimeDirectoryMode=2755
|
||||||
|
|
||||||
|
UMask=007
|
||||||
|
PrivateTmp=yes
|
||||||
|
LimitNOFILE=65535
|
||||||
|
PrivateDevices=yes
|
||||||
|
ProtectHome=yes
|
||||||
|
ReadOnlyDirectories=/
|
||||||
|
ReadWriteDirectories=-/var/lib/keydb
|
||||||
|
ReadWriteDirectories=-/var/log/keydb
|
||||||
|
ReadWriteDirectories=-/var/run/keydb
|
||||||
|
|
||||||
|
NoNewPrivileges=true
|
||||||
|
CapabilityBoundingSet=CAP_SETGID CAP_SETUID CAP_SYS_RESOURCE
|
||||||
|
RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX
|
||||||
|
|
||||||
|
# keydb-server can write to its own config file when in cluster mode so we
|
||||||
|
# permit writing there by default. If you are not using this feature, it is
|
||||||
|
# recommended that you replace the following lines with "ProtectSystem=full".
|
||||||
|
ProtectSystem=true
|
||||||
|
ReadWriteDirectories=-/etc/keydb
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
Alias=keydb.service
|
BIN
pkg/deb/deb_source/server/usr/share/man/man1/keydb-server.1.gz
Executable file
BIN
pkg/deb/deb_source/server/usr/share/man/man1/keydb-server.1.gz
Executable file
Binary file not shown.
18
pkg/deb/deb_source/tools/DEBIAN/control
Executable file
18
pkg/deb/deb_source/tools/DEBIAN/control
Executable file
@ -0,0 +1,18 @@
|
|||||||
|
Package: keydb-tools
|
||||||
|
Source: keydb
|
||||||
|
Version: 5:0.0.0-1chl1~bionic1
|
||||||
|
Architecture: amd64
|
||||||
|
Maintainer: Ben Schermel <ben@eqalpha.com>
|
||||||
|
Installed-Size: 5908
|
||||||
|
Depends: adduser, libc6 (>= 2.17), libcurl4 (>= 7.16.2), libgcc1 (>= 1:3.0), libstdc++6 (>= 4.8.1), libuuid1 (>= 2.16), libssl1.1 (>= 1.1.1), zlib1g (>=1.2.11)
|
||||||
|
Breaks: keydb-server (<< 2:2.6.16-1)
|
||||||
|
Replaces: keydb-server (<< 2:2.6.16-1)
|
||||||
|
Section: database
|
||||||
|
Priority: optional
|
||||||
|
Homepage: https://docs.keydb.dev/
|
||||||
|
Description: Persistent key-value database with network interface (client)
|
||||||
|
keydb is a key-value database in a similar vein to memcache but the dataset
|
||||||
|
is non-volatile. keydb additionally provides native support for atomically
|
||||||
|
manipulating and querying data structures such as lists and sets.
|
||||||
|
.
|
||||||
|
This package contains the command line client and other tools.
|
19
pkg/deb/deb_source/tools/DEBIAN/md5sums
Normal file
19
pkg/deb/deb_source/tools/DEBIAN/md5sums
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
91bc7c4369127a7ce50dc9b2209c9022 usr/bin/keydb-benchmark
|
||||||
|
e44a754f3c156b2bed90d3a46b514e08 usr/bin/keydb-check-aof
|
||||||
|
e44a754f3c156b2bed90d3a46b514e08 usr/bin/keydb-check-rdb
|
||||||
|
e44a754f3c156b2bed90d3a46b514e08 usr/bin/keydb-server
|
||||||
|
usr/bin/keydb-pro-server
|
||||||
|
d92a545d57586321c7da748652b862d0 usr/bin/keydb-cli
|
||||||
|
98cc3dc32bc1ecaecd80819e887f07d4 usr/share/bash-completion/completions/keydb-cli
|
||||||
|
291ecb74aaa46f085bb6a01edce4d57f usr/share/doc/keydb-tools/NEWS.Debian.gz
|
||||||
|
ff20296c5421fd3c25e45470608b104a usr/share/doc/keydb-tools/changelog.Debian.gz
|
||||||
|
391f4b40dd5886c06bf59dc1264deb0f usr/share/doc/keydb-tools/changelog.gz
|
||||||
|
3b77eb20476366888f0802563ac78f3c usr/share/doc/keydb-tools/copyright
|
||||||
|
7568ef814e33ce3f8238008f1a0070e6 usr/share/doc/keydb-tools/examples/lru/README
|
||||||
|
6d01f83477f506b7055b069b3d440af4 usr/share/doc/keydb-tools/examples/lru/lfu-simulation.c.gz
|
||||||
|
c7cbcc8bee26a9762e6e60aefce3afaf usr/share/doc/keydb-tools/examples/lru/test-lru.rb.gz
|
||||||
|
2c206081a037bcdb97568eea0528d4c4 usr/share/doc/keydb-tools/examples/redis-trib.rb
|
||||||
|
6abba649b53f80be470fc038ed320364 usr/share/man/man1/keydb-benchmark.1.gz
|
||||||
|
dfefa283a8fa238adb29f2b8bd465ba8 usr/share/man/man1/keydb-check-aof.1.gz
|
||||||
|
944913489614321c601c965650124328 usr/share/man/man1/keydb-check-rdb.1.gz
|
||||||
|
7cb1a59118e251026ec176fcd1a3de16 usr/share/man/man1/keydb-cli.1.gz
|
47
pkg/deb/deb_source/tools/DEBIAN/postinst
Executable file
47
pkg/deb/deb_source/tools/DEBIAN/postinst
Executable 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
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
exit 0
|
13
pkg/deb/deb_source/tools/DEBIAN/postrm
Executable file
13
pkg/deb/deb_source/tools/DEBIAN/postrm
Executable 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
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
exit 0
|
BIN
pkg/deb/deb_source/tools/usr/share/doc/keydb-tools/00-RELEASENOTES.gz
Executable file
BIN
pkg/deb/deb_source/tools/usr/share/doc/keydb-tools/00-RELEASENOTES.gz
Executable file
Binary file not shown.
BIN
pkg/deb/deb_source/tools/usr/share/doc/keydb-tools/NEWS.Debian.gz
Executable file
BIN
pkg/deb/deb_source/tools/usr/share/doc/keydb-tools/NEWS.Debian.gz
Executable file
Binary file not shown.
BIN
pkg/deb/deb_source/tools/usr/share/doc/keydb-tools/changelog.Debian.gz
Executable file
BIN
pkg/deb/deb_source/tools/usr/share/doc/keydb-tools/changelog.Debian.gz
Executable file
Binary file not shown.
BIN
pkg/deb/deb_source/tools/usr/share/doc/keydb-tools/changelog.gz
Executable file
BIN
pkg/deb/deb_source/tools/usr/share/doc/keydb-tools/changelog.gz
Executable file
Binary file not shown.
134
pkg/deb/deb_source/tools/usr/share/doc/keydb-tools/copyright
Executable file
134
pkg/deb/deb_source/tools/usr/share/doc/keydb-tools/copyright
Executable 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.
|
19
pkg/deb/deb_source/tools/usr/share/doc/keydb-tools/examples/lru/README
Executable file
19
pkg/deb/deb_source/tools/usr/share/doc/keydb-tools/examples/lru/README
Executable file
@ -0,0 +1,19 @@
|
|||||||
|
The test-lru.rb program can be used in order to check the behavior of the
|
||||||
|
Redis approximated LRU algorithm against the theoretical output of true
|
||||||
|
LRU algorithm.
|
||||||
|
|
||||||
|
In order to use the program you need to recompile Redis setting the define
|
||||||
|
REDIS_LRU_CLOCK_RESOLUTION to 1, by editing the file server.h.
|
||||||
|
This allows to execute the program in a fast way since the 1 ms resolution
|
||||||
|
is enough for all the objects to have a different enough time stamp during
|
||||||
|
the test.
|
||||||
|
|
||||||
|
The program is executed like this:
|
||||||
|
|
||||||
|
ruby test-lru.rb /tmp/lru.html
|
||||||
|
|
||||||
|
You can optionally specify a number of times to run, so that the program
|
||||||
|
will output averages of different runs, by adding an additional argument.
|
||||||
|
For instance in order to run the test 10 times use:
|
||||||
|
|
||||||
|
ruby test-lru.rb /tmp/lru.html 10
|
Binary file not shown.
BIN
pkg/deb/deb_source/tools/usr/share/doc/keydb-tools/examples/lru/test-lru.rb.gz
Executable file
BIN
pkg/deb/deb_source/tools/usr/share/doc/keydb-tools/examples/lru/test-lru.rb.gz
Executable file
Binary file not shown.
129
pkg/deb/deb_source/tools/usr/share/doc/keydb-tools/examples/redis-trib.rb
Executable file
129
pkg/deb/deb_source/tools/usr/share/doc/keydb-tools/examples/redis-trib.rb
Executable file
@ -0,0 +1,129 @@
|
|||||||
|
#!/usr/bin/env ruby
|
||||||
|
|
||||||
|
def colorized(str, color)
|
||||||
|
return str if !(ENV['TERM'] || '')["xterm"]
|
||||||
|
color_code = {
|
||||||
|
white: 29,
|
||||||
|
bold: '29;1',
|
||||||
|
black: 30,
|
||||||
|
red: 31,
|
||||||
|
green: 32,
|
||||||
|
yellow: 33,
|
||||||
|
blue: 34,
|
||||||
|
magenta: 35,
|
||||||
|
cyan: 36,
|
||||||
|
gray: 37
|
||||||
|
}[color]
|
||||||
|
return str if !color_code
|
||||||
|
"\033[#{color_code}m#{str}\033[0m"
|
||||||
|
end
|
||||||
|
|
||||||
|
class String
|
||||||
|
|
||||||
|
%w(white bold black red green yellow blue magenta cyan gray).each{|color|
|
||||||
|
color = :"#{color}"
|
||||||
|
define_method(color){
|
||||||
|
colorized(self, color)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
COMMANDS = %w(create check info fix reshard rebalance add-node
|
||||||
|
del-node set-timeout call import help)
|
||||||
|
|
||||||
|
ALLOWED_OPTIONS={
|
||||||
|
"create" => {"replicas" => true},
|
||||||
|
"add-node" => {"slave" => false, "master-id" => true},
|
||||||
|
"import" => {"from" => :required, "copy" => false, "replace" => false},
|
||||||
|
"reshard" => {"from" => true, "to" => true, "slots" => true, "yes" => false, "timeout" => true, "pipeline" => true},
|
||||||
|
"rebalance" => {"weight" => [], "auto-weights" => false, "use-empty-masters" => false, "timeout" => true, "simulate" => false, "pipeline" => true, "threshold" => true},
|
||||||
|
"fix" => {"timeout" => 0},
|
||||||
|
}
|
||||||
|
|
||||||
|
def parse_options(cmd)
|
||||||
|
cmd = cmd.downcase
|
||||||
|
idx = 0
|
||||||
|
options = {}
|
||||||
|
args = []
|
||||||
|
while (arg = ARGV.shift)
|
||||||
|
if arg[0..1] == "--"
|
||||||
|
option = arg[2..-1]
|
||||||
|
|
||||||
|
# --verbose is a global option
|
||||||
|
if option == "--verbose"
|
||||||
|
options['verbose'] = true
|
||||||
|
next
|
||||||
|
end
|
||||||
|
if ALLOWED_OPTIONS[cmd] == nil ||
|
||||||
|
ALLOWED_OPTIONS[cmd][option] == nil
|
||||||
|
next
|
||||||
|
end
|
||||||
|
if ALLOWED_OPTIONS[cmd][option] != false
|
||||||
|
value = ARGV.shift
|
||||||
|
next if !value
|
||||||
|
else
|
||||||
|
value = true
|
||||||
|
end
|
||||||
|
|
||||||
|
# If the option is set to [], it's a multiple arguments
|
||||||
|
# option. We just queue every new value into an array.
|
||||||
|
if ALLOWED_OPTIONS[cmd][option] == []
|
||||||
|
options[option] = [] if !options[option]
|
||||||
|
options[option] << value
|
||||||
|
else
|
||||||
|
options[option] = value
|
||||||
|
end
|
||||||
|
else
|
||||||
|
next if arg[0,1] == '-'
|
||||||
|
args << arg
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return options,args
|
||||||
|
end
|
||||||
|
|
||||||
|
def command_example(cmd, args, opts)
|
||||||
|
cmd = "keydb-cli --cluster #{cmd}"
|
||||||
|
args.each{|a|
|
||||||
|
a = a.to_s
|
||||||
|
a = a.inspect if a[' ']
|
||||||
|
cmd << " #{a}"
|
||||||
|
}
|
||||||
|
opts.each{|opt, val|
|
||||||
|
opt = " --cluster-#{opt.downcase}"
|
||||||
|
if val != true
|
||||||
|
val = val.join(' ') if val.is_a? Array
|
||||||
|
opt << " #{val}"
|
||||||
|
end
|
||||||
|
cmd << opt
|
||||||
|
}
|
||||||
|
cmd
|
||||||
|
end
|
||||||
|
|
||||||
|
$command = ARGV.shift
|
||||||
|
$opts, $args = parse_options($command) if $command
|
||||||
|
|
||||||
|
puts "WARNING: keydb-trib.rb is not longer available!".yellow
|
||||||
|
puts "You should use #{'keydb-cli'.bold} instead."
|
||||||
|
puts ''
|
||||||
|
puts "All commands and features belonging to keydb-trib.rb "+
|
||||||
|
"have been moved\nto keydb-cli."
|
||||||
|
puts "In order to use them you should call keydb-cli with the #{'--cluster'.bold}"
|
||||||
|
puts "option followed by the subcommand name, arguments and options."
|
||||||
|
puts ''
|
||||||
|
puts "Use the following syntax:"
|
||||||
|
puts "keydb-cli --cluster SUBCOMMAND [ARGUMENTS] [OPTIONS]".bold
|
||||||
|
puts ''
|
||||||
|
puts "Example:"
|
||||||
|
if $command
|
||||||
|
example = command_example $command, $args, $opts
|
||||||
|
else
|
||||||
|
example = "keydb-cli --cluster info 127.0.0.1:7000"
|
||||||
|
end
|
||||||
|
puts example.bold
|
||||||
|
puts ''
|
||||||
|
puts "To get help about all subcommands, type:"
|
||||||
|
puts "keydb-cli --cluster help".bold
|
||||||
|
puts ''
|
||||||
|
exit 1
|
BIN
pkg/deb/deb_source/tools/usr/share/man/man1/keydb-benchmark.1.gz
Executable file
BIN
pkg/deb/deb_source/tools/usr/share/man/man1/keydb-benchmark.1.gz
Executable file
Binary file not shown.
BIN
pkg/deb/deb_source/tools/usr/share/man/man1/keydb-check-aof.1.gz
Executable file
BIN
pkg/deb/deb_source/tools/usr/share/man/man1/keydb-check-aof.1.gz
Executable file
Binary file not shown.
BIN
pkg/deb/deb_source/tools/usr/share/man/man1/keydb-check-rdb.1.gz
Executable file
BIN
pkg/deb/deb_source/tools/usr/share/man/man1/keydb-check-rdb.1.gz
Executable file
Binary file not shown.
BIN
pkg/deb/deb_source/tools/usr/share/man/man1/keydb-cli.1.gz
Executable file
BIN
pkg/deb/deb_source/tools/usr/share/man/man1/keydb-cli.1.gz
Executable file
Binary file not shown.
16
pkg/rpm/README.md
Normal file
16
pkg/rpm/README.md
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
### Generate RPM files for the generated binaries
|
||||||
|
|
||||||
|
KeyDB typically includes pro binaries with open source so does not build the binaries here but instead just packages the binaries
|
||||||
|
|
||||||
|
Usage:
|
||||||
|
```
|
||||||
|
$ cd KeyDB/pkg/rpm
|
||||||
|
$ sudo ./generate-rpms.sh <version> <release build #>
|
||||||
|
```
|
||||||
|
|
||||||
|
This rpm script is currently valid for centos 7 and centos 8 builds only
|
||||||
|
|
||||||
|
Dependencies:
|
||||||
|
```
|
||||||
|
yum install -y scl-utils centos-release-scl rpm-build
|
||||||
|
```
|
42
pkg/rpm/generate_rpms.sh
Executable file
42
pkg/rpm/generate_rpms.sh
Executable file
@ -0,0 +1,42 @@
|
|||||||
|
#! /bin/bash
|
||||||
|
|
||||||
|
### usage sudo ./generate_rpms [open source version] [build release #]
|
||||||
|
|
||||||
|
version=$1
|
||||||
|
release=$2
|
||||||
|
arch=$(uname -m)
|
||||||
|
dist=el$(rpm -q --queryformat '%{VERSION}' centos-release)
|
||||||
|
|
||||||
|
if [ "$arch" != "aarch64" ] || [ "$arch" != "x86_64" ]; then
|
||||||
|
echo "This script is only valid and tested for aarch64 and x86_64 architectures. You are trying to use: $arch"
|
||||||
|
fi
|
||||||
|
if [ "$dist" != "el7" ] || [ "$dist" != "el8" ]; then
|
||||||
|
echo "This script is only valid and tested for centos7 and centos8 builds. You are trying to use: $dist"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# remove any old rpm packages
|
||||||
|
rm $PWD/rpm_files_generated/keydb*
|
||||||
|
|
||||||
|
# generate empty directories that github would otherwise delete (avoids .gitkeep in directory)
|
||||||
|
mkdir $PWD/centos7_rpm_build/keydb_build/keydb_rpm/usr/bin
|
||||||
|
mkdir $PWD/centos7_rpm_build/keydb_build/keydb_rpm/usr/lib64/redis/modules
|
||||||
|
mkdir $PWD/centos7_rpm_build/keydb_build/keydb_rpm/var/lib/keydb
|
||||||
|
mkdir $PWD/centos7_rpm_build/keydb_build/keydb_rpm/var/log/keydb
|
||||||
|
|
||||||
|
# move binaries to bin
|
||||||
|
rm $PWD/keydb_build/keydb_rpm/usr/bin/*
|
||||||
|
cp $PWD/../../src/keydb-* $PWD/keydb_build/keydb_rpm/usr/bin/
|
||||||
|
|
||||||
|
# update spec file with build info
|
||||||
|
sed -i '2d' $PWD/keydb_build/keydb.spec
|
||||||
|
sed -i -E "1a\Version : $version" $PWD/keydb_build/keydb.spec
|
||||||
|
sed -i '3d' $PWD/keydb_build/keydb.spec
|
||||||
|
sed -i -E "2a\Release : $release%{?dist}" $PWD/keydb_build/keydb.spec
|
||||||
|
|
||||||
|
# yum install -y scl-utils centos-release-scl rpm-build
|
||||||
|
mkdir -p /root/rpmbuild/BUILDROOT/keydb-$version5-$release.$dist.$arch
|
||||||
|
cp -r ./keydb_build/keydb_rpm/* /root/rpmbuild/BUILDROOT/keydb-$version5-$release.$dist.$arch/
|
||||||
|
rpmbuild -bb /rpm_build/keydb.spec
|
||||||
|
mv /root/rpmbuild/RPMS/$arch/* .$PWD/rpm_files_generated
|
||||||
|
|
||||||
|
exit
|
120
pkg/rpm/keydb_build/keydb.spec
Executable file
120
pkg/rpm/keydb_build/keydb.spec
Executable file
@ -0,0 +1,120 @@
|
|||||||
|
Name : keydb
|
||||||
|
Version : 5.3.3
|
||||||
|
Release : 1%{?dist}
|
||||||
|
Group : Unspecified
|
||||||
|
License : BSD
|
||||||
|
Packager : EQ Alpha Technology
|
||||||
|
|
||||||
|
URL : https://keydb.dev
|
||||||
|
Summary : A persistent key-value database
|
||||||
|
|
||||||
|
|
||||||
|
Requires: /bin/awk
|
||||||
|
Requires: logrotate
|
||||||
|
Requires(pre): shadow-utils
|
||||||
|
Requires(post): systemd
|
||||||
|
Requires(preun): systemd
|
||||||
|
Requires(postun): systemd
|
||||||
|
Requires(post): chkconfig
|
||||||
|
Requires(preun): chkconfig
|
||||||
|
Requires(preun): initscripts
|
||||||
|
Requires(postun): initscripts
|
||||||
|
|
||||||
|
# scripts
|
||||||
|
|
||||||
|
#preinstall scriptlet (using /bin/sh):
|
||||||
|
%pre
|
||||||
|
getent group keydb &> /dev/null || \
|
||||||
|
groupadd -r keydb &> /dev/null
|
||||||
|
getent passwd keydb &> /dev/null || \
|
||||||
|
useradd -r -g keydb -d /var/lib/keydb -s /sbin/nologin \
|
||||||
|
-c 'KeyDB Database Server' keydb &> /dev/null
|
||||||
|
exit 0
|
||||||
|
|
||||||
|
#postinstall scriptlet (using /bin/sh):
|
||||||
|
%post
|
||||||
|
if [ $1 -eq 1 ] ; then
|
||||||
|
# Initial installation
|
||||||
|
systemctl preset keydb.service >/dev/null 2>&1 || :
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
if [ $1 -eq 1 ] ; then
|
||||||
|
# Initial installation
|
||||||
|
systemctl preset keydb-sentinel.service >/dev/null 2>&1 || :
|
||||||
|
fi
|
||||||
|
|
||||||
|
chown -R keydb:keydb /etc/keydb
|
||||||
|
chown -R keydb:keydb /var/log/keydb
|
||||||
|
chown -R keydb:keydb /var/lib/keydb
|
||||||
|
chown -R keydb:keydb /usr/libexec/keydb-shutdown
|
||||||
|
|
||||||
|
#preuninstall scriptlet (using /bin/sh):
|
||||||
|
%preun
|
||||||
|
if [ $1 -eq 0 ] ; then
|
||||||
|
# Package removal, not upgrade
|
||||||
|
systemctl --no-reload disable keydb.service > /dev/null 2>&1 || :
|
||||||
|
systemctl stop keydb.service > /dev/null 2>&1 || :
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
if [ $1 -eq 0 ] ; then
|
||||||
|
# Package removal, not upgrade
|
||||||
|
systemctl --no-reload disable keydb-sentinel.service > /dev/null 2>&1 || :
|
||||||
|
systemctl stop keydb-sentinel.service > /dev/null 2>&1 || :
|
||||||
|
fi
|
||||||
|
|
||||||
|
#postuninstall scriptlet (using /bin/sh):
|
||||||
|
%postun
|
||||||
|
systemctl daemon-reload >/dev/null 2>&1 || :
|
||||||
|
if [ $1 -ge 1 ] ; then
|
||||||
|
# Package upgrade, not uninstall
|
||||||
|
systemctl try-restart keydb.service >/dev/null 2>&1 || :
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
systemctl daemon-reload >/dev/null 2>&1 || :
|
||||||
|
if [ $1 -ge 1 ] ; then
|
||||||
|
# Package upgrade, not uninstall
|
||||||
|
systemctl try-restart keydb-sentinel.service >/dev/null 2>&1 || :
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
%Description
|
||||||
|
KeyDB is an advanced key-value store. It is often referred to as a data
|
||||||
|
structure server since keys can contain strings, hashes, lists, sets and
|
||||||
|
sorted sets.
|
||||||
|
|
||||||
|
You can run atomic operations on these types, like appending to a string;
|
||||||
|
incrementing the value in a hash; pushing to a list; computing set
|
||||||
|
intersection, union and difference; or getting the member with highest
|
||||||
|
ranking in a sorted set.
|
||||||
|
|
||||||
|
In order to achieve its outstanding performance, KeyDB works with an
|
||||||
|
in-memory dataset. Depending on your use case, you can persist it either
|
||||||
|
by dumping the dataset to disk every once in a while, or by appending
|
||||||
|
each command to a log.
|
||||||
|
|
||||||
|
KeyDB also supports typical master-replica setups, active replica setups
|
||||||
|
and multi master setups.
|
||||||
|
|
||||||
|
Other features include Transactions, Pub/Sub, Lua scripting, Keys with a
|
||||||
|
limited time-to-live, and configuration settings to make KeyDB behave like
|
||||||
|
a cache.
|
||||||
|
|
||||||
|
You can use KeyDB from most programming languages also.
|
||||||
|
|
||||||
|
%files
|
||||||
|
/etc/logrotate.d/keydb
|
||||||
|
/etc/systemd/system/keydb.service.d/limit.conf
|
||||||
|
/etc/systemd/system/keydb-sentinel.service.d/limit.conf
|
||||||
|
/usr/bin/*
|
||||||
|
/usr/lib/systemd/system/*
|
||||||
|
/usr/libexec/*
|
||||||
|
/usr/share/licenses/*
|
||||||
|
/usr/share/man/man1/*
|
||||||
|
/usr/share/man/man5/*
|
||||||
|
/var/lib/*
|
||||||
|
/var/log/*
|
||||||
|
/usr/lib64/redis/modules
|
||||||
|
%config(noreplace) /etc/keydb/*
|
244
pkg/rpm/keydb_build/keydb_rpm/etc/keydb/keydb-sentinel.conf
Executable file
244
pkg/rpm/keydb_build/keydb_rpm/etc/keydb/keydb-sentinel.conf
Executable 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/redis-sentinel.pid when
|
||||||
|
# daemonized.
|
||||||
|
daemonize no
|
||||||
|
|
||||||
|
# When running daemonized, Redis Sentinel writes a pid file in
|
||||||
|
# /var/run/redis-sentinel.pid by default. You can specify a custom pid file
|
||||||
|
# location here.
|
||||||
|
pidfile /var/run/redis-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/redis/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 /tmp
|
||||||
|
|
||||||
|
# sentinel monitor <master-name> <ip> <redis-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
|
1576
pkg/rpm/keydb_build/keydb_rpm/etc/keydb/keydb.conf
Executable file
1576
pkg/rpm/keydb_build/keydb_rpm/etc/keydb/keydb.conf
Executable file
File diff suppressed because it is too large
Load Diff
40
pkg/rpm/keydb_build/keydb_rpm/usr/lib/systemd/system/keydb-sentinel.service
Executable file
40
pkg/rpm/keydb_build/keydb_rpm/usr/lib/systemd/system/keydb-sentinel.service
Executable file
@ -0,0 +1,40 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Advanced key-value store
|
||||||
|
After=network.target
|
||||||
|
Documentation=https://docs.keydb.dev, man:keydb-sentinel(1)
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=forking
|
||||||
|
ExecStart=/usr/bin/keydb-sentinel /etc/keydb/sentinel.conf
|
||||||
|
ExecStop=/bin/kill -s TERM $MAINPID
|
||||||
|
PIDFile=/var/run/sentinel/keydb-sentinel.pid
|
||||||
|
TimeoutStopSec=0
|
||||||
|
Restart=always
|
||||||
|
User=keydb
|
||||||
|
Group=keydb
|
||||||
|
RuntimeDirectory=sentinel
|
||||||
|
RuntimeDirectoryMode=2755
|
||||||
|
|
||||||
|
UMask=007
|
||||||
|
PrivateTmp=yes
|
||||||
|
LimitNOFILE=65535
|
||||||
|
PrivateDevices=yes
|
||||||
|
ProtectHome=yes
|
||||||
|
ReadOnlyDirectories=/
|
||||||
|
ReadWriteDirectories=-/var/lib/keydb
|
||||||
|
ReadWriteDirectories=-/var/log/keydb
|
||||||
|
ReadWriteDirectories=-/var/run/sentinel
|
||||||
|
|
||||||
|
NoNewPrivileges=true
|
||||||
|
CapabilityBoundingSet=CAP_SETGID CAP_SETUID CAP_SYS_RESOURCE
|
||||||
|
RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX
|
||||||
|
|
||||||
|
# keydb-sentinel can write to its own config file when in cluster mode so we
|
||||||
|
# permit writing there by default. If you are not using this feature, it is
|
||||||
|
# recommended that you replace the following lines with "ProtectSystem=full".
|
||||||
|
ProtectSystem=true
|
||||||
|
ReadWriteDirectories=-/etc/keydb
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
Alias=sentinel.service
|
40
pkg/rpm/keydb_build/keydb_rpm/usr/lib/systemd/system/keydb.service
Executable file
40
pkg/rpm/keydb_build/keydb_rpm/usr/lib/systemd/system/keydb.service
Executable file
@ -0,0 +1,40 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Advanced key-value store
|
||||||
|
After=network.target
|
||||||
|
Documentation=https://docs.keydb.dev, man:keydb-server(1)
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=forking
|
||||||
|
ExecStart=/usr/bin/keydb-server /etc/keydb/keydb.conf
|
||||||
|
ExecStop=/bin/kill -s TERM $MAINPID
|
||||||
|
PIDFile=/var/run/keydb/keydb-server.pid
|
||||||
|
TimeoutStopSec=0
|
||||||
|
Restart=always
|
||||||
|
User=keydb
|
||||||
|
Group=keydb
|
||||||
|
RuntimeDirectory=keydb
|
||||||
|
RuntimeDirectoryMode=2755
|
||||||
|
|
||||||
|
UMask=007
|
||||||
|
PrivateTmp=yes
|
||||||
|
LimitNOFILE=65535
|
||||||
|
PrivateDevices=yes
|
||||||
|
ProtectHome=yes
|
||||||
|
ReadOnlyDirectories=/
|
||||||
|
ReadWriteDirectories=-/var/lib/keydb
|
||||||
|
ReadWriteDirectories=-/var/log/keydb
|
||||||
|
ReadWriteDirectories=-/var/run/keydb
|
||||||
|
|
||||||
|
NoNewPrivileges=true
|
||||||
|
CapabilityBoundingSet=CAP_SETGID CAP_SETUID CAP_SYS_RESOURCE
|
||||||
|
RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX
|
||||||
|
|
||||||
|
# keydb-server can write to its own config file when in cluster mode so we
|
||||||
|
# permit writing there by default. If you are not using this feature, it is
|
||||||
|
# recommended that you replace the following lines with "ProtectSystem=full".
|
||||||
|
ProtectSystem=true
|
||||||
|
ReadWriteDirectories=-/etc/keydb
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
Alias=keydb.service
|
40
pkg/rpm/keydb_build/keydb_rpm/usr/libexec/keydb-shutdown
Executable file
40
pkg/rpm/keydb_build/keydb_rpm/usr/libexec/keydb-shutdown
Executable file
@ -0,0 +1,40 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# Wrapper to close properly keydb and sentinel
|
||||||
|
test x"$KEYDB_DEBUG" != x && set -x
|
||||||
|
|
||||||
|
KEYDB_CLI=/usr/bin/keydb-cli
|
||||||
|
|
||||||
|
# Retrieve service name
|
||||||
|
SERVICE_NAME="$1"
|
||||||
|
if [ -z "$SERVICE_NAME" ]; then
|
||||||
|
SERVICE_NAME=keydb
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Get the proper config file based on service name
|
||||||
|
CONFIG_FILE="/etc/keydb/$SERVICE_NAME.conf"
|
||||||
|
|
||||||
|
# Use awk to retrieve host, port from config file
|
||||||
|
HOST=`awk '/^[[:blank:]]*bind/ { print $2 }' $CONFIG_FILE | tail -n1`
|
||||||
|
PORT=`awk '/^[[:blank:]]*port/ { print $2 }' $CONFIG_FILE | tail -n1`
|
||||||
|
PASS=`awk '/^[[:blank:]]*requirepass/ { print $2 }' $CONFIG_FILE | tail -n1`
|
||||||
|
SOCK=`awk '/^[[:blank:]]*unixsocket\s/ { print $2 }' $CONFIG_FILE | tail -n1`
|
||||||
|
|
||||||
|
# Just in case, use default host, port
|
||||||
|
HOST=${HOST:-127.0.0.1}
|
||||||
|
if [ "$SERVICE_NAME" = keydb ]; then
|
||||||
|
PORT=${PORT:-6379}
|
||||||
|
else
|
||||||
|
PORT=${PORT:-26739}
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Setup additional parameters
|
||||||
|
# e.g password-protected keydb instances
|
||||||
|
[ -z "$PASS" ] || ADDITIONAL_PARAMS="-a $PASS"
|
||||||
|
|
||||||
|
# shutdown the service properly
|
||||||
|
if [ -e "$SOCK" ] ; then
|
||||||
|
$KEYDB_CLI -s $SOCK $ADDITIONAL_PARAMS shutdown
|
||||||
|
else
|
||||||
|
$KEYDB_CLI -h $HOST -p $PORT $ADDITIONAL_PARAMS shutdown
|
||||||
|
fi
|
11
pkg/rpm/keydb_build/keydb_rpm/usr/share/licenses/keydb/COPYING
Executable file
11
pkg/rpm/keydb_build/keydb_rpm/usr/share/licenses/keydb/COPYING
Executable file
@ -0,0 +1,11 @@
|
|||||||
|
Copyright (c) 2006-2015, Salvatore Sanfilippo
|
||||||
|
Copyright (C) 2019, John Sully
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
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.
|
29
pkg/rpm/keydb_build/keydb_rpm/usr/share/licenses/keydb/COPYING-hiredis
Executable file
29
pkg/rpm/keydb_build/keydb_rpm/usr/share/licenses/keydb/COPYING-hiredis
Executable file
@ -0,0 +1,29 @@
|
|||||||
|
Copyright (c) 2009-2011, Salvatore Sanfilippo <antirez at gmail dot com>
|
||||||
|
Copyright (c) 2010-2011, Pieter Noordhuis <pcnoordhuis at gmail dot com>
|
||||||
|
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
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.
|
27
pkg/rpm/keydb_build/keydb_rpm/usr/share/licenses/keydb/COPYING-jemalloc
Executable file
27
pkg/rpm/keydb_build/keydb_rpm/usr/share/licenses/keydb/COPYING-jemalloc
Executable file
@ -0,0 +1,27 @@
|
|||||||
|
Unless otherwise specified, files in the jemalloc source distribution are
|
||||||
|
subject to the following license:
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
Copyright (C) 2002-2018 Jason Evans <jasone@canonware.com>.
|
||||||
|
All rights reserved.
|
||||||
|
Copyright (C) 2007-2012 Mozilla Foundation. All rights reserved.
|
||||||
|
Copyright (C) 2009-2018 Facebook, Inc. All rights reserved.
|
||||||
|
|
||||||
|
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(s),
|
||||||
|
this list of conditions and the following disclaimer.
|
||||||
|
2. Redistributions in binary form must reproduce the above copyright notice(s),
|
||||||
|
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 HOLDER(S) ``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(S) 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.
|
||||||
|
--------------------------------------------------------------------------------
|
34
pkg/rpm/keydb_build/keydb_rpm/usr/share/licenses/keydb/COPYRIGHT-lua
Executable file
34
pkg/rpm/keydb_build/keydb_rpm/usr/share/licenses/keydb/COPYRIGHT-lua
Executable file
@ -0,0 +1,34 @@
|
|||||||
|
Lua License
|
||||||
|
-----------
|
||||||
|
|
||||||
|
Lua is licensed under the terms of the MIT license reproduced below.
|
||||||
|
This means that Lua is free software and can be used for both academic
|
||||||
|
and commercial purposes at absolutely no cost.
|
||||||
|
|
||||||
|
For details and rationale, see http://www.lua.org/license.html .
|
||||||
|
|
||||||
|
===============================================================================
|
||||||
|
|
||||||
|
Copyright (C) 1994-2012 Lua.org, PUC-Rio.
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
===============================================================================
|
||||||
|
|
||||||
|
(end of COPYRIGHT)
|
BIN
pkg/rpm/keydb_build/keydb_rpm/usr/share/man/man1/keydb-benchmark.1.gz
Executable file
BIN
pkg/rpm/keydb_build/keydb_rpm/usr/share/man/man1/keydb-benchmark.1.gz
Executable file
Binary file not shown.
BIN
pkg/rpm/keydb_build/keydb_rpm/usr/share/man/man1/keydb-check-aof.1.gz
Executable file
BIN
pkg/rpm/keydb_build/keydb_rpm/usr/share/man/man1/keydb-check-aof.1.gz
Executable file
Binary file not shown.
BIN
pkg/rpm/keydb_build/keydb_rpm/usr/share/man/man1/keydb-check-rdb.1.gz
Executable file
BIN
pkg/rpm/keydb_build/keydb_rpm/usr/share/man/man1/keydb-check-rdb.1.gz
Executable file
Binary file not shown.
BIN
pkg/rpm/keydb_build/keydb_rpm/usr/share/man/man1/keydb-cli.1.gz
Executable file
BIN
pkg/rpm/keydb_build/keydb_rpm/usr/share/man/man1/keydb-cli.1.gz
Executable file
Binary file not shown.
BIN
pkg/rpm/keydb_build/keydb_rpm/usr/share/man/man1/keydb-sentinel.1.gz
Executable file
BIN
pkg/rpm/keydb_build/keydb_rpm/usr/share/man/man1/keydb-sentinel.1.gz
Executable file
Binary file not shown.
BIN
pkg/rpm/keydb_build/keydb_rpm/usr/share/man/man1/keydb-server.1.gz
Executable file
BIN
pkg/rpm/keydb_build/keydb_rpm/usr/share/man/man1/keydb-server.1.gz
Executable file
Binary file not shown.
BIN
pkg/rpm/keydb_build/keydb_rpm/usr/share/man/man5/keydb-sentinel.conf.5.gz
Executable file
BIN
pkg/rpm/keydb_build/keydb_rpm/usr/share/man/man5/keydb-sentinel.conf.5.gz
Executable file
Binary file not shown.
BIN
pkg/rpm/keydb_build/keydb_rpm/usr/share/man/man5/keydb.conf.5.gz
Executable file
BIN
pkg/rpm/keydb_build/keydb_rpm/usr/share/man/man5/keydb.conf.5.gz
Executable file
Binary file not shown.
1
pkg/rpm/rpm_files_generated/.gitkeep
Executable file
1
pkg/rpm/rpm_files_generated/.gitkeep
Executable file
@ -0,0 +1 @@
|
|||||||
|
# keep this directory
|
Loading…
x
Reference in New Issue
Block a user