Update to 7.0.2

This commit is contained in:
Henrik Triem 2022-06-29 23:01:31 +02:00 committed by Eric Lippmann
parent 73b9b4798e
commit 9ac3a4937d
9 changed files with 611 additions and 199 deletions

12
.gitignore vendored
View File

@ -91,3 +91,15 @@ clog
/redis-doc-6fca484.tar.gz
/redis-6.2.4.tar.gz
/redis-doc-9fe1f36.tar.gz
/redis-6.2.5.tar.gz
/redis-doc-6a9c631.tar.gz
/redis-6.0.16.tar.gz
/redis-6.2.6.tar.gz
/redis-doc-3fdb6df.tar.gz
/redis-6.2.7.tar.gz
/redis-7.0.0.tar.gz
/redis-doc-a14b449.tar.gz
/redis-7.0.1.tar.gz
/redis-doc-775eccb.tar.gz
/redis-7.0.2.tar.gz
/redis-doc-af2e6f8.tar.gz

180
icinga-conf.patch Normal file
View File

@ -0,0 +1,180 @@
Author: Henrik Triem <henrik.triem@icinga.com>
Date: Mon Jun 27 18:00:00 2022 +0100
Re-arrange patches
diff --git a/redis.conf b/redis.conf
--- a/redis.conf
+++ b/redis.conf
@@ -135,7 +135,7 @@
# Accept connections on the specified port, default is 6379 (IANA #815344).
# If port 0 is specified Redis will not listen on a TCP socket.
-port 6379
+port 6380
# TCP listen() backlog.
#
@@ -152,7 +152,7 @@
# incoming connections. There is no default, so Redis will not listen
# on a unix socket when not specified.
#
-# unixsocket /run/redis.sock
+# unixsocket /run/icingadb-redis/icingadb-redis-server.sock
# unixsocketperm 700
# Close the connection after a client is idle for N seconds (0 to disable)
@@ -192,7 +192,7 @@
# default port, use:
#
# port 0
-# tls-port 6379
+# tls-port 6380
# Configure a X.509 certificate and private key to use for authenticating the
# server to connected clients, masters or cluster peers. These files should be
@@ -306,7 +306,7 @@
# By default Redis does not run as a daemon. Use 'yes' if you need it.
# Note that Redis will write a pid file in /var/run/redis.pid when daemonized.
# When Redis is supervised by upstart or systemd, this parameter has no impact.
-daemonize no
+daemonize yes
# If you run Redis from upstart or systemd, Redis can interact with your
# supervision tree. Options:
@@ -338,7 +338,7 @@
#
# Note that on modern Linux systems "/run/redis.pid" is more conforming
# and should be used instead.
-pidfile /var/run/redis_6379.pid
+pidfile /run/icingadb-redis/icingadb-redis-server.pid
# Specify the server verbosity level.
# This can be one of:
@@ -351,7 +351,7 @@
# Specify the log file name. Also the empty string can be used to force
# Redis to log on the standard output. Note that if you use standard
# output for logging but daemonize, logs will be sent to /dev/null
-logfile ""
+logfile /var/log/icingadb-redis/icingadb-redis-server.log
# To enable logging to the system logger, just set 'syslog-enabled' to yes,
# and optionally update the other syslog parameters to suit your needs.
@@ -501,7 +501,7 @@
# The Append Only File will also be created inside this directory.
#
# Note that you must specify a directory here, not a file name.
-dir ./
+dir /var/lib/icingadb-redis
################################# REPLICATION #################################
@@ -1022,7 +1022,7 @@
# The format of the external ACL user file is exactly the same as the
# format that is used inside redis.conf to describe users.
#
-# aclfile /etc/redis/users.acl
+# aclfile /etc/icingadb-redis/users.acl
# IMPORTANT NOTE: starting with Redis 6 "requirepass" is just a compatibility
# layer on top of the new ACL system. The option effect will be just setting
@@ -1581,7 +1581,7 @@
# Make sure that instances running in the same system do not have
# overlapping cluster configuration file names.
#
-# cluster-config-file nodes-6379.conf
+# cluster-config-file nodes-6380.conf
# Cluster node timeout is the amount of milliseconds a node must be unreachable
# for it to be considered in failure state.
@@ -1790,9 +1790,9 @@
# Example:
#
# cluster-announce-ip 10.1.1.5
-# cluster-announce-tls-port 6379
+# cluster-announce-tls-port 6380
# cluster-announce-port 0
-# cluster-announce-bus-port 6380
+# cluster-announce-bus-port 6381
################################## SLOW LOG ###################################
diff --git a/sentinel.conf b/sentinel.conf
--- a/sentinel.conf
+++ b/sentinel.conf
@@ -7,22 +7,22 @@
# port <sentinel-port>
# The port that this sentinel instance will run on
-port 26379
+port 26380
# 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
+# Note that Redis will write a pid file in /var/run/icingadb-redis-sentinel.pid
+# when daemonized.
+daemonize yes
# 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
+# /var/run/icingadb-redis-sentinel.pid by default. You can specify a custom
+# pid file location here.
+pidfile /run/icingadb-sentinel/icingadb-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 ""
+logfile /var/log/icingadb-redis/icingadb-redis-sentinel.log
# sentinel announce-ip <ip>
# sentinel announce-port <port>
@@ -51,7 +51,7 @@
# 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
+dir /var/lib/icingadb-redis
# sentinel monitor <master-name> <ip> <redis-port> <quorum>
#
@@ -70,7 +70,7 @@
#
# 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 monitor mymaster 127.0.0.1 6380 2
# sentinel auth-pass <master-name> <password>
#
@@ -147,7 +147,7 @@
# The format of the external ACL user file is exactly the same as the
# format that is used inside redis.conf to describe users.
#
-# aclfile /etc/redis/sentinel-users.acl
+# aclfile /etc/icingadb-redis/icingadb-sentinel-users.acl
# requirepass <password>
#
@@ -250,7 +250,7 @@
#
# Example:
#
-# sentinel notification-script mymaster /var/redis/notify.sh
+# sentinel notification-script mymaster /var/icingadb-redis/notify.sh
# CLIENTS RECONFIGURATION SCRIPT
#
@@ -275,7 +275,7 @@
#
# Example:
#
-# sentinel client-reconfig-script mymaster /var/redis/reconfig.sh
+# sentinel client-reconfig-script mymaster /var/icingadb-redis/reconfig.sh
# SECURITY
#

196
icinga-deps.patch Normal file
View File

@ -0,0 +1,196 @@
Author: Henrik Triem <henrik.triem@icinga.com>
Date: Mon Jun 27 18:00:00 2022 +0100
Re-arrange patches
diff --git a/deps/hiredis/Makefile b/deps/hiredis/Makefile
--- a/deps/hiredis/Makefile
+++ b/deps/hiredis/Makefile
@@ -24,7 +24,7 @@ INSTALL_LIBRARY_PATH= $(DESTDIR)$(PREFIX
INSTALL_PKGCONF_PATH= $(INSTALL_LIBRARY_PATH)/$(PKGCONF_PATH)
# redis-server configuration used for testing
-REDIS_PORT=56379
+REDIS_PORT=56380
REDIS_SERVER=redis-server
define REDIS_TEST_CONFIG
daemonize yes
diff --git a/deps/hiredis/test.c b/deps/hiredis/test.c
--- a/deps/hiredis/test.c
+++ b/deps/hiredis/test.c
@@ -799,7 +799,7 @@ static void test_allocator_injection(voi
hiredisSetAllocators(&ha);
test("redisContext uses injected allocators: ");
- redisContext *c = redisConnect("localhost", 6379);
+ redisContext *c = redisConnect("localhost", 6380);
test_cond(c == NULL);
test("redisReader uses injected allocators: ");
@@ -823,12 +823,12 @@ static void test_blocking_connection_err
struct addrinfo hints = {.ai_family = AF_INET};
struct addrinfo *ai_tmp = NULL;
- int rv = getaddrinfo(HIREDIS_BAD_DOMAIN, "6379", &hints, &ai_tmp);
+ int rv = getaddrinfo(HIREDIS_BAD_DOMAIN, "6380", &hints, &ai_tmp);
if (rv != 0) {
// Address does *not* exist
test("Returns error when host cannot be resolved: ");
// First see if this domain name *actually* resolves to NXDOMAIN
- c = redisConnect(HIREDIS_BAD_DOMAIN, 6379);
+ c = redisConnect(HIREDIS_BAD_DOMAIN, 6380);
test_cond(
c->err == REDIS_ERR_OTHER &&
(strcmp(c->errstr, "Name or service not known") == 0 ||
@@ -1885,7 +1885,7 @@ int main(int argc, char **argv) {
struct config cfg = {
.tcp = {
.host = "127.0.0.1",
- .port = 6379
+ .port = 6380
},
.unix_sock = {
.path = "/tmp/redis.sock"
diff --git a/deps/hiredis/test.sh b/deps/hiredis/test.sh
--- a/deps/hiredis/test.sh
+++ b/deps/hiredis/test.sh
@@ -1,7 +1,7 @@
#!/bin/sh -ue
REDIS_SERVER=${REDIS_SERVER:-redis-server}
-REDIS_PORT=${REDIS_PORT:-56379}
+REDIS_PORT=${REDIS_PORT:-56380}
REDIS_SSL_PORT=${REDIS_SSL_PORT:-56443}
TEST_SSL=${TEST_SSL:-0}
SKIPS_AS_FAILS=${SKIPS_AS_FAILS-:0}
diff --git a/deps/hiredis/examples/example-ae.c b/deps/hiredis/examples/example-ae.c
--- a/deps/hiredis/examples/example-ae.c
+++ b/deps/hiredis/examples/example-ae.c
@@ -43,7 +43,7 @@ void disconnectCallback(const redisAsync
int main (int argc, char **argv) {
signal(SIGPIPE, SIG_IGN);
- redisAsyncContext *c = redisAsyncConnect("127.0.0.1", 6379);
+ redisAsyncContext *c = redisAsyncConnect("127.0.0.1", 6380);
if (c->err) {
/* Let *c leak for now... */
printf("Error: %s\n", c->errstr);
diff --git a/deps/hiredis/examples/example-glib.c b/deps/hiredis/examples/example-glib.c
--- a/deps/hiredis/examples/example-glib.c
+++ b/deps/hiredis/examples/example-glib.c
@@ -52,7 +52,7 @@ main (gint argc G_GNUC_UNUSED,
GMainContext *context = NULL;
GSource *source;
- ac = redisAsyncConnect("127.0.0.1", 6379);
+ ac = redisAsyncConnect("127.0.0.1", 6380);
if (ac->err) {
g_printerr("%s\n", ac->errstr);
exit(EXIT_FAILURE);
diff --git a/deps/hiredis/examples/example-ivykis.c b/deps/hiredis/examples/example-ivykis.c
--- a/deps/hiredis/examples/example-ivykis.c
+++ b/deps/hiredis/examples/example-ivykis.c
@@ -39,7 +39,7 @@ int main (int argc, char **argv) {
iv_init();
- redisAsyncContext *c = redisAsyncConnect("127.0.0.1", 6379);
+ redisAsyncContext *c = redisAsyncConnect("127.0.0.1", 6380);
if (c->err) {
/* Let *c leak for now... */
printf("Error: %s\n", c->errstr);
diff --git a/deps/hiredis/examples/example-libev.c b/deps/hiredis/examples/example-libev.c
--- a/deps/hiredis/examples/example-libev.c
+++ b/deps/hiredis/examples/example-libev.c
@@ -37,7 +37,7 @@ int main (int argc, char **argv) {
signal(SIGPIPE, SIG_IGN);
#endif
- redisAsyncContext *c = redisAsyncConnect("127.0.0.1", 6379);
+ redisAsyncContext *c = redisAsyncConnect("127.0.0.1", 6380);
if (c->err) {
/* Let *c leak for now... */
printf("Error: %s\n", c->errstr);
diff --git a/deps/hiredis/examples/example-libevent.c b/deps/hiredis/examples/example-libevent.c
--- a/deps/hiredis/examples/example-libevent.c
+++ b/deps/hiredis/examples/example-libevent.c
@@ -44,7 +44,7 @@ int main (int argc, char **argv) {
struct event_base *base = event_base_new();
redisOptions options = {0};
- REDIS_OPTIONS_SET_TCP(&options, "127.0.0.1", 6379);
+ REDIS_OPTIONS_SET_TCP(&options, "127.0.0.1", 6380);
struct timeval tv = {0};
tv.tv_sec = 1;
options.connect_timeout = &tv;
diff --git a/deps/hiredis/examples/example-libuv.c b/deps/hiredis/examples/example-libuv.c
--- a/deps/hiredis/examples/example-libuv.c
+++ b/deps/hiredis/examples/example-libuv.c
@@ -54,7 +54,7 @@ int main (int argc, char **argv) {
uv_loop_t* loop = uv_default_loop();
- redisAsyncContext *c = redisAsyncConnect("127.0.0.1", 6379);
+ redisAsyncContext *c = redisAsyncConnect("127.0.0.1", 6380);
if (c->err) {
/* Let *c leak for now... */
printf("Error: %s\n", c->errstr);
diff --git a/deps/hiredis/examples/example-macosx.c b/deps/hiredis/examples/example-macosx.c
--- a/deps/hiredis/examples/example-macosx.c
+++ b/deps/hiredis/examples/example-macosx.c
@@ -44,7 +44,7 @@ int main (int argc, char **argv) {
return 1;
}
- redisAsyncContext *c = redisAsyncConnect("127.0.0.1", 6379);
+ redisAsyncContext *c = redisAsyncConnect("127.0.0.1", 6380);
if (c->err) {
/* Let *c leak for now... */
printf("Error: %s\n", c->errstr);
diff --git a/deps/hiredis/examples/example-push.c b/deps/hiredis/examples/example-push.c
--- a/deps/hiredis/examples/example-push.c
+++ b/deps/hiredis/examples/example-push.c
@@ -109,7 +109,7 @@ int main(int argc, char **argv) {
redisReply *reply;
const char *hostname = (argc > 1) ? argv[1] : "127.0.0.1";
- int port = (argc > 2) ? atoi(argv[2]) : 6379;
+ int port = (argc > 2) ? atoi(argv[2]) : 6380;
redisOptions o = {0};
REDIS_OPTIONS_SET_TCP(&o, hostname, port);
diff --git a/deps/hiredis/examples/example-qt.cpp b/deps/hiredis/examples/example-qt.cpp
--- a/deps/hiredis/examples/example-qt.cpp
+++ b/deps/hiredis/examples/example-qt.cpp
@@ -19,7 +19,7 @@ void getCallback(redisAsyncContext *, vo
void ExampleQt::run() {
- m_ctx = redisAsyncConnect("localhost", 6379);
+ m_ctx = redisAsyncConnect("localhost", 6380);
if (m_ctx->err) {
cerr << "Error: " << m_ctx->errstr << endl;
diff --git a/deps/hiredis/examples/example.c b/deps/hiredis/examples/example.c
--- a/deps/hiredis/examples/example.c
+++ b/deps/hiredis/examples/example.c
@@ -21,7 +21,7 @@ int main(int argc, char **argv) {
}
}
- int port = (argc > 2) ? atoi(argv[2]) : 6379;
+ int port = (argc > 2) ? atoi(argv[2]) : 6380;
struct timeval timeout = { 1, 500000 }; // 1.5 seconds
if (isunix) {

View File

@ -1,177 +0,0 @@
Author: Henrik Triem <henrik.triem@icinga.com>
Date: Tue Jun 01 13:20:51 2021 +0100
Change default server port for icinga-redis
diff --git a/redis.conf b/redis.conf
index ab0a30cbd..d8e51f8ba 100644
--- a/redis.conf
+++ b/redis.conf
@@ -95,7 +95,7 @@
# Accept connections on the specified port, default is 6379 (IANA #815344).
# If port 0 is specified Redis will not listen on a TCP socket.
-port 6379
+port 6380
# TCP listen() backlog.
#
@@ -142,7 +142,7 @@
# default port, use:
#
# port 0
-# tls-port 6379
+# tls-port 6380
# Configure a X.509 certificate and private key to use for authenticating the
# server to connected clients, masters or cluster peers. These files should be
@@ -286,7 +286,7 @@
#
# Note that on modern Linux systems "/run/redis.pid" is more conforming
# and should be used instead.
-pidfile /var/run/redis_6379.pid
+pidfile /var/run/redis_6380.pid
# Specify the server verbosity level.
# This can be one of:
diff --git a/sentinel.conf b/sentinel.conf
index b6ff05f25..2d86376fd 100644
--- a/sentinel.conf
+++ b/sentinel.conf
@@ -18,7 +18,7 @@
# port <sentinel-port>
# The port that this sentinel instance will run on
-port 26379
+port 26380
# 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
@@ -81,7 +81,7 @@
#
# 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 monitor mymaster 127.0.0.1 6380 2
# sentinel auth-pass <master-name> <password>
#
diff --git a/src/config.c b/src/config.c
index 4a956d698..bd3100db6 100644
--- a/src/config.c
+++ b/src/config.c
@@ -2475,7 +2475,7 @@
/* Integer configs */
createIntConfig("databases", NULL, IMMUTABLE_CONFIG, 1, INT_MAX, server.dbnum, 16, INTEGER_CONFIG, NULL, NULL),
- createIntConfig("port", NULL, MODIFIABLE_CONFIG, 0, 65535, server.port, 6379, INTEGER_CONFIG, NULL, updatePort), /* TCP port. */
+ createIntConfig("port", NULL, MODIFIABLE_CONFIG, 0, 65535, server.port, 6380, INTEGER_CONFIG, NULL, updatePort), /* TCP port. */
createIntConfig("io-threads", NULL, IMMUTABLE_CONFIG, 1, 128, server.io_threads_num, 1, INTEGER_CONFIG, NULL, NULL), /* Single threaded by default */
createIntConfig("auto-aof-rewrite-percentage", NULL, MODIFIABLE_CONFIG, 0, INT_MAX, server.aof_rewrite_perc, 100, INTEGER_CONFIG, NULL, NULL),
createIntConfig("cluster-replica-validity-factor", "cluster-slave-validity-factor", MODIFIABLE_CONFIG, 0, INT_MAX, server.cluster_slave_validity_factor, 10, INTEGER_CONFIG, NULL, NULL), /* Slave max data age factor. */
diff --git a/src/redis-benchmark.c b/src/redis-benchmark.c
index 9d9c15e00..ff72dc92b 100644
--- a/src/redis-benchmark.c
+++ b/src/redis-benchmark.c
@@ -1555,7 +1555,7 @@
printf(
"Usage: redis-benchmark [-h <host>] [-p <port>] [-c <clients>] [-n <requests>] [-k <boolean>]\n\n"
" -h <hostname> Server hostname (default 127.0.0.1)\n"
-" -p <port> Server port (default 6379)\n"
+" -p <port> Server port (default 6380)\n"
" -s <socket> Server socket (overrides host and port)\n"
" -a <password> Password for Redis Auth\n"
" --user <username> Used to send ACL style 'AUTH username pass'. Needs -a.\n"
@@ -1605,13 +1605,13 @@
" --help Output this help and exit.\n"
" --version Output version and exit.\n\n"
"Examples:\n\n"
-" Run the benchmark with the default configuration against 127.0.0.1:6379:\n"
+" Run the benchmark with the default configuration against 127.0.0.1:6380:\n"
" $ redis-benchmark\n\n"
" Use 20 parallel clients, for a total of 100k requests, against 192.168.1.1:\n"
-" $ redis-benchmark -h 192.168.1.1 -p 6379 -n 100000 -c 20\n\n"
-" Fill 127.0.0.1:6379 with about 1 million keys only using the SET test:\n"
+" $ redis-benchmark -h 192.168.1.1 -p 6380 -n 100000 -c 20\n\n"
+" Fill 127.0.0.1:6380 with about 1 million keys only using the SET test:\n"
" $ redis-benchmark -t set -n 1000000 -r 100000000\n\n"
-" Benchmark 127.0.0.1:6379 for a few commands producing CSV output:\n"
+" Benchmark 127.0.0.1:6380 for a few commands producing CSV output:\n"
" $ redis-benchmark -t ping,set,get -n 100000 --csv\n\n"
" Benchmark a specific command line:\n"
" $ redis-benchmark -r 10000 -n 10000 eval 'return redis.call(\"ping\")' 0\n\n"
@@ -1707,7 +1707,7 @@
config.idlemode = 0;
config.clients = listCreate();
config.hostip = "127.0.0.1";
- config.hostport = 6379;
+ config.hostport = 6380;
config.hostsocket = NULL;
config.tests = NULL;
config.dbnum = 0;
diff --git a/src/redis-cli.c b/src/redis-cli.c
index 45a1228e6..3259b0d37 100644
--- a/src/redis-cli.c
+++ b/src/redis-cli.c
@@ -1828,7 +1828,7 @@
"\n"
"Usage: redis-cli [OPTIONS] [cmd [arg [arg ...]]]\n"
" -h <hostname> Server hostname (default: 127.0.0.1).\n"
-" -p <port> Server port (default: 6379).\n"
+" -p <port> Server port (default: 6380).\n"
" -s <socket> Server socket (overrides hostname and port).\n"
" -a <password> Password to use when connecting to the server.\n"
" You can also use the " REDIS_CLI_AUTH_ENV " environment\n"
@@ -8200,7 +8200,7 @@
memset(&config.sslconfig, 0, sizeof(config.sslconfig));
config.hostip = sdsnew("127.0.0.1");
- config.hostport = 6379;
+ config.hostport = 6380;
config.hostsocket = NULL;
config.repeat = 1;
config.interval = 0;
diff --git a/src/sentinel.c b/src/sentinel.c
index 1bd82453f..d85ee6049 100644
--- a/src/sentinel.c
+++ b/src/sentinel.c
@@ -49,7 +49,7 @@
extern SSL_CTX *redis_tls_client_ctx;
#endif
-#define REDIS_SENTINEL_PORT 26379
+#define REDIS_SENTINEL_PORT 26380
/* ======================== Sentinel global state =========================== */
diff --git a/src/server.c b/src/server.c
index 831349a76..34b9eea3f 100644
--- a/src/server.c
+++ b/src/server.c
@@ -1479,7 +1479,7 @@
NULL /* allow to expand */
};
-/* Cluster nodes hash table, mapping nodes addresses 1.2.3.4:6379 to
+/* Cluster nodes hash table, mapping nodes addresses 1.2.3.4:6380 to
* clusterNode structures. */
dictType clusterNodesDictType = {
dictSdsHash, /* hash function */
@@ -2687,7 +2687,7 @@
/* Replication related */
server.masterauth = NULL;
server.masterhost = NULL;
- server.masterport = 6379;
+ server.masterport = 6380;
server.master = NULL;
server.cached_master = NULL;
server.master_initial_offset = -1;
@@ -5590,7 +5590,7 @@
fprintf(stderr," ./redis-server --test-memory <megabytes>\n\n");
fprintf(stderr,"Examples:\n");
fprintf(stderr," ./redis-server (run the server with default conf)\n");
- fprintf(stderr," ./redis-server /etc/redis/6379.conf\n");
+ fprintf(stderr," ./redis-server /etc/redis/6380.conf\n");
fprintf(stderr," ./redis-server --port 7777\n");
fprintf(stderr," ./redis-server --port 7777 --replicaof 127.0.0.1 8888\n");
fprintf(stderr," ./redis-server /etc/myredis.conf --loglevel verbose -\n");

104
icinga-src.patch Normal file
View File

@ -0,0 +1,104 @@
Author: Henrik Triem <henrik.triem@icinga.com>
Date: Mon Jun 27 18:00:00 2022 +0100
Re-arrange patches
diff --git a/src/config.c b/src/config.c
--- a/src/config.c
+++ b/src/config.c
@@ -3016,7 +3016,7 @@ standardConfig static_configs[] = {
/* Integer configs */
createIntConfig("databases", NULL, IMMUTABLE_CONFIG, 1, INT_MAX, server.dbnum, 16, INTEGER_CONFIG, NULL, NULL),
- createIntConfig("port", NULL, MODIFIABLE_CONFIG, 0, 65535, server.port, 6379, INTEGER_CONFIG, NULL, updatePort), /* TCP port. */
+ createIntConfig("port", NULL, MODIFIABLE_CONFIG, 0, 65535, server.port, 6380, INTEGER_CONFIG, NULL, updatePort), /* TCP port. */
createIntConfig("io-threads", NULL, DEBUG_CONFIG | IMMUTABLE_CONFIG, 1, 128, server.io_threads_num, 1, INTEGER_CONFIG, NULL, NULL), /* Single threaded by default */
createIntConfig("auto-aof-rewrite-percentage", NULL, MODIFIABLE_CONFIG, 0, INT_MAX, server.aof_rewrite_perc, 100, INTEGER_CONFIG, NULL, NULL),
createIntConfig("cluster-replica-validity-factor", "cluster-slave-validity-factor", MODIFIABLE_CONFIG, 0, INT_MAX, server.cluster_slave_validity_factor, 10, INTEGER_CONFIG, NULL, NULL), /* Slave max data age factor. */
diff --git a/src/redis-benchmark.c b/src/redis-benchmark.c
--- a/src/redis-benchmark.c
+++ b/src/redis-benchmark.c
@@ -1741,7 +1741,7 @@ int main(int argc, char **argv) {
config.idlemode = 0;
config.clients = listCreate();
config.conn_info.hostip = sdsnew("127.0.0.1");
- config.conn_info.hostport = 6379;
+ config.conn_info.hostport = 6380;
config.hostsocket = NULL;
config.tests = NULL;
config.conn_info.input_dbnum = 0;
diff --git a/src/redis-cli.c b/src/redis-cli.c
--- a/src/redis-cli.c
+++ b/src/redis-cli.c
@@ -8858,7 +8858,7 @@ int main(int argc, char **argv) {
memset(&config.sslconfig, 0, sizeof(config.sslconfig));
config.conn_info.hostip = sdsnew("127.0.0.1");
- config.conn_info.hostport = 6379;
+ config.conn_info.hostport = 6380;
config.hostsocket = NULL;
config.repeat = 1;
config.interval = 0;
diff --git a/src/sentinel.c b/src/sentinel.c
--- a/src/sentinel.c
+++ b/src/sentinel.c
@@ -49,7 +49,7 @@ extern SSL_CTX *redis_tls_ctx;
extern SSL_CTX *redis_tls_client_ctx;
#endif
-#define REDIS_SENTINEL_PORT 26379
+#define REDIS_SENTINEL_PORT 26380
/* ======================== Sentinel global state =========================== */
diff --git a/src/server.c b/src/server.c
--- a/src/server.c
+++ b/src/server.c
@@ -1915,7 +1915,7 @@ void initServerConfig(void) {
/* Replication related */
server.masterhost = NULL;
- server.masterport = 6379;
+ server.masterport = 6380;
server.master = NULL;
server.cached_master = NULL;
server.master_initial_offset = -1;
@@ -6097,7 +6097,7 @@ void usage(void) {
fprintf(stderr," ./redis-server --test-memory <megabytes>\n\n");
fprintf(stderr,"Examples:\n");
fprintf(stderr," ./redis-server (run the server with default conf)\n");
- fprintf(stderr," ./redis-server /etc/redis/6379.conf\n");
+ fprintf(stderr," ./redis-server /etc/redis/6380.conf\n");
fprintf(stderr," ./redis-server --port 7777\n");
fprintf(stderr," ./redis-server --port 7777 --replicaof 127.0.0.1 8888\n");
fprintf(stderr," ./redis-server /etc/myredis.conf --loglevel verbose -\n");
diff --git a/src/Makefile b/src/Makefile
--- a/src/Makefile
+++ b/src/Makefile
@@ -319,15 +319,15 @@ QUIET_LINK = @printf ' %b %b\n' $(LIN
QUIET_INSTALL = @printf ' %b %b\n' $(LINKCOLOR)INSTALL$(ENDCOLOR) $(BINCOLOR)$@$(ENDCOLOR) 1>&2;
endif
-REDIS_SERVER_NAME=redis-server$(PROG_SUFFIX)
-REDIS_SENTINEL_NAME=redis-sentinel$(PROG_SUFFIX)
+REDIS_SERVER_NAME=icingadb-redis-server$(PROG_SUFFIX)
+REDIS_SENTINEL_NAME=icingadb-redis-sentinel$(PROG_SUFFIX)
REDIS_SERVER_OBJ=adlist.o quicklist.o ae.o anet.o dict.o server.o sds.o zmalloc.o lzf_c.o lzf_d.o pqsort.o zipmap.o sha1.o ziplist.o release.o networking.o util.o object.o db.o replication.o rdb.o t_string.o t_list.o t_set.o t_zset.o t_hash.o config.o aof.o pubsub.o multi.o debug.o sort.o intset.o syncio.o cluster.o crc16.o endianconv.o slowlog.o eval.o bio.o rio.o rand.o memtest.o syscheck.o crcspeed.o crc64.o bitops.o sentinel.o notify.o setproctitle.o blocked.o hyperloglog.o latency.o sparkline.o redis-check-rdb.o redis-check-aof.o geo.o lazyfree.o module.o evict.o expire.o geohash.o geohash_helper.o childinfo.o defrag.o siphash.o rax.o t_stream.o listpack.o localtime.o lolwut.o lolwut5.o lolwut6.o acl.o tracking.o connection.o tls.o sha256.o timeout.o setcpuaffinity.o monotonic.o mt19937-64.o resp_parser.o call_reply.o script_lua.o script.o functions.o function_lua.o commands.o
-REDIS_CLI_NAME=redis-cli$(PROG_SUFFIX)
+REDIS_CLI_NAME=icingadb-redis-cli$(PROG_SUFFIX)
REDIS_CLI_OBJ=anet.o adlist.o dict.o redis-cli.o zmalloc.o release.o ae.o redisassert.o crcspeed.o crc64.o siphash.o crc16.o monotonic.o cli_common.o mt19937-64.o
-REDIS_BENCHMARK_NAME=redis-benchmark$(PROG_SUFFIX)
+REDIS_BENCHMARK_NAME=icingadb-redis-benchmark$(PROG_SUFFIX)
REDIS_BENCHMARK_OBJ=ae.o anet.o redis-benchmark.o adlist.o dict.o zmalloc.o redisassert.o release.o crcspeed.o crc64.o siphash.o crc16.o monotonic.o cli_common.o mt19937-64.o
-REDIS_CHECK_RDB_NAME=redis-check-rdb$(PROG_SUFFIX)
-REDIS_CHECK_AOF_NAME=redis-check-aof$(PROG_SUFFIX)
+REDIS_CHECK_RDB_NAME=icingadb-redis-check-rdb$(PROG_SUFFIX)
+REDIS_CHECK_AOF_NAME=icingadb-redis-check-aof$(PROG_SUFFIX)
ALL_SOURCES=$(sort $(patsubst %.o,%.c,$(REDIS_SERVER_OBJ) $(REDIS_CLI_OBJ) $(REDIS_BENCHMARK_OBJ)))
all: $(REDIS_SERVER_NAME) $(REDIS_SENTINEL_NAME) $(REDIS_CLI_NAME) $(REDIS_BENCHMARK_NAME) $(REDIS_CHECK_RDB_NAME) $(REDIS_CHECK_AOF_NAME)

73
icinga-utils.patch Normal file
View File

@ -0,0 +1,73 @@
diff --git a/utils/generate-commands-json.py b/utils/generate-commands-json.py
--- a/utils/generate-commands-json.py
+++ b/utils/generate-commands-json.py
@@ -103,11 +103,11 @@ srcdir = os.path.abspath(os.path.dirname
if __name__ == '__main__':
opts = {
'description': 'Transform the output from `redis-cli --json` using COMMAND and COMMAND DOCS to a single commands.json format.',
- 'epilog': f'Usage example: {argv[0]} --cli src/redis-cli --port 6379 > commands.json'
+ 'epilog': f'Usage example: {argv[0]} --cli src/redis-cli --port 6380 > commands.json'
}
parser = argparse.ArgumentParser(**opts)
parser.add_argument('--host', type=str, default='localhost')
- parser.add_argument('--port', type=int, default=6379)
+ parser.add_argument('--port', type=int, default=6380)
parser.add_argument('--cli', type=str, default='%s/redis-cli' % srcdir)
args = parser.parse_args()
diff --git a/utils/install_server.sh b/utils/install_server.sh
--- a/utils/install_server.sh
+++ b/utils/install_server.sh
@@ -60,7 +60,7 @@ SCRIPT=$(readlink -f $0)
SCRIPTPATH=$(dirname $SCRIPT)
#Initial defaults
-_REDIS_PORT=6379
+_REDIS_PORT=6380
_MANUAL_EXECUTION=false
echo "Welcome to the redis service installer"
@@ -212,7 +212,7 @@ REDIS_CHKCONFIG_INFO=\
# chkconfig: - 58 74\n
# description: redis_${REDIS_PORT} is the redis daemon.\n
### BEGIN INIT INFO\n
-# Provides: redis_6379\n
+# Provides: redis_6380\n
# Required-Start: \$network \$local_fs \$remote_fs\n
# Required-Stop: \$network \$local_fs \$remote_fs\n
# Default-Start: 2 3 4 5\n
diff --git a/utils/redis-sha1.rb b/utils/redis-sha1.rb
--- a/utils/redis-sha1.rb
+++ b/utils/redis-sha1.rb
@@ -46,7 +46,7 @@ def redisSha1(opts={})
end
host = ARGV[0] || "127.0.0.1"
-port = ARGV[1] || "6379"
+port = ARGV[1] || "6380"
db = ARGV[2] || "0"
puts "Performing SHA1 of Redis server #{host} #{port} DB: #{db}"
p "Dataset SHA1: #{redisSha1(:host => host, :port => port.to_i, :db => db)}"
diff --git a/utils/redis_init_script b/utils/redis_init_script
--- a/utils/redis_init_script
+++ b/utils/redis_init_script
@@ -4,14 +4,14 @@
# as it does use of the /proc filesystem.
### BEGIN INIT INFO
-# Provides: redis_6379
+# Provides: redis_6380
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Redis data structure server
# Description: Redis data structure server. See https://redis.io
### END INIT INFO
-REDISPORT=6379
+REDISPORT=6380
EXEC=/usr/local/bin/redis-server
CLIEXEC=/usr/local/bin/redis-cli

View File

@ -5,8 +5,8 @@ After=network-online.target
Wants=network-online.target
[Service]
ExecStart=/usr/bin/icingadb-redis-sentinel /etc/icingadb-redis/sentinel.conf --daemonize no --supervised systemd
ExecStop=/usr/libexec/icingadb-redis-shutdown sentinel
ExecStart=/usr/bin/icingadb-redis-sentinel /etc/icingadb-redis/icingadb-sentinel.conf --daemonize no --supervised systemd
ExecStop=/usr/libexec/icingadb-redis-shutdown icingadb-sentinel
Type=notify
User=icingadb-redis
Group=icingadb-redis

View File

@ -7,12 +7,15 @@
# Please preserve changelog entries
#
# temp workaround to https://bugzilla.redhat.com/2059488
%undefine _package_note_file
# Tests fail in mock, not in local build.
%bcond_with tests
# Commit IDs for the (unversioned) redis-doc repository
# https://fedoraproject.org/wiki/Packaging:SourceURL "Commit Revision"
%global doc_commit 3fdb6df44ecd5c4d99ea52a0133177f5ebc24805
%global doc_commit af2e6f814be4cadd9b619001b0acf0754f8dd057
%global short_doc_commit %(c=%{doc_commit}; echo ${c:0:7})
# %%{rpmmacrodir} not usable on EL-6
@ -23,8 +26,8 @@
%global redis_port 6380
Name: %{?pkg_prefix}redis
Version: 6.2.6
Release: 3%{?dist}
Version: 7.0.2
Release: 1%{?dist}
Summary: A persistent key-value database
# redis, jemalloc, linenoise, lzf, hiredis are BSD
# lua is MIT
@ -48,9 +51,12 @@ Source10: https://github.com/%{src_name}/%{src_name}-doc/archive/%{doc_
# https://github.com/redis/redis/pull/3491 - man pages
Patch0001: 0001-1st-man-pageis-for-redis-cli-redis-benchmark-redis-c.patch
# Update default port from 6370 to 6380
Patch0901: icinga-server-port.patch
Patch0901: icinga-conf.patch
Patch0902: icinga-deps.patch
Patch0903: icinga-src.patch
Patch0904: icinga-utils.patch
BuildRequires: make
BuildRequires: make
BuildRequires: gcc
%if %{with tests}
BuildRequires: procps-ng
@ -75,12 +81,14 @@ Requires(postun): systemd
# from deps/hiredis/hiredis.h
Provides: bundled(hiredis) = 0.14.0
# from deps/jemalloc/VERSION
Provides: bundled(jemalloc) = 5.1.0
Provides: bundled(jemalloc) = 5.2.1
# from deps/lua/src/lua.h
Provides: bundled(lua-libs) = 5.1.5
# from deps/linenoise/linenoise.h
Provides: bundled(linenoise) = 1.0
Provides: bundled(lzf)
# from deps/hdr_histogram/README.md
Provides: bundled(hdr_histogram) = 0.11.0
%global redis_modules_abi 1
%global redis_modules_dir %{_libdir}/%{name}/modules
@ -141,10 +149,16 @@ administration and development.
mv ../%{src_name}-doc-%{doc_commit} doc
%patch0001 -p1
%patch0901 -p1
%patch0902 -p1
%patch0903 -p1
%patch0904 -p1
mv deps/lua/COPYRIGHT COPYRIGHT-lua
mv deps/jemalloc/COPYING COPYING-jemalloc
mv deps/hiredis/COPYING COPYING-hiredis
mv deps/hdr_histogram/LICENSE.txt LICENSE-hdrhistogram
mv deps/hdr_histogram/COPYING.txt COPYING-hdrhistogram
# Configuration file changes
sed -i -e 's|^logfile .*$|logfile /var/log/%{name}/redis.log|g' redis.conf
@ -188,7 +202,7 @@ install -pDm644 %{S:1} %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
#newicingaline1
install -pd %{buildroot}%{_sysconfdir}/%{name}
install -pDm640 %{src_name}.conf %{buildroot}%{_sysconfdir}/%{name}/%{name}.conf
install -pDm640 sentinel.conf %{buildroot}%{_sysconfdir}/%{name}/sentinel.conf
install -pDm640 sentinel.conf %{buildroot}%{_sysconfdir}/%{name}/%{?pkg_prefix}sentinel.conf
# Install systemd unit files.
mkdir -p %{buildroot}%{_unitdir}
@ -272,13 +286,13 @@ if [ -f %{_sysconfdir}/%{name}.conf -a ! -L %{_sysconfdir}/%{name}.conf ]; then
echo -e "\nWarning: %{name} configuration is now in %{_sysconfdir}/%{name} directory\n"
fi
if [ -f %{_sysconfdir}/%{name}-sentinel.conf -a ! -L %{_sysconfdir}/%{name}-sentinel.conf ]; then
if [ -f %{_sysconfdir}/%{name}/sentinel.conf.rpmnew ]; then
rm %{_sysconfdir}/%{name}/sentinel.conf.rpmnew
if [ -f %{_sysconfdir}/%{name}/%{?pkg_prefix}sentinel.conf.rpmnew ]; then
rm %{_sysconfdir}/%{name}/%{?pkg_prefix}sentinel.conf.rpmnew
fi
if [ -f %{_sysconfdir}/%{name}/sentinel.conf ]; then
mv %{_sysconfdir}/%{name}/sentinel.conf %{_sysconfdir}/%{name}/sentinel.conf.rpmnew
if [ -f %{_sysconfdir}/%{name}/%{?pkg_prefix}sentinel.conf ]; then
mv %{_sysconfdir}/%{name}/%{?pkg_prefix}sentinel.conf %{_sysconfdir}/%{name}/%{?pkg_prefix}sentinel.conf.rpmnew
fi
mv %{_sysconfdir}/%{name}-sentinel.conf %{_sysconfdir}/%{name}/sentinel.conf
mv %{_sysconfdir}/%{name}-sentinel.conf %{_sysconfdir}/%{name}/%{?pkg_prefix}sentinel.conf
fi
%systemd_post %{name}.service
%systemd_post %{name}-sentinel.service
@ -297,10 +311,12 @@ fi
%license COPYRIGHT-lua
%license COPYING-jemalloc
%license COPYING-hiredis
%license LICENSE-hdrhistogram
%license COPYING-hdrhistogram
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
%attr(0750, %{name}, root) %dir %{_sysconfdir}/%{name}
%attr(0640, %{name}, root) %config(noreplace) %{_sysconfdir}/%{name}/%{name}.conf
%attr(0640, %{name}, root) %config(noreplace) %{_sysconfdir}/%{name}/sentinel.conf
%attr(0640, %{name}, root) %config(noreplace) %{_sysconfdir}/%{name}/%{?pkg_prefix}sentinel.conf
%dir %attr(0750, %{name}, %{name}) %{_libdir}/%{name}
%dir %attr(0750, %{name}, %{name}) %{redis_modules_dir}
%dir %attr(0750, %{name}, %{name}) %{_sharedstatedir}/%{name}
@ -321,19 +337,28 @@ fi
%dir %attr(0755, %{name}, %{name}) %ghost %{_localstatedir}/run/%{name}
%files devel
# specific for documentation (CC-BY-SA)
%license doc/LICENSE
# main package is not required
%license COPYING
%{_includedir}/%{name}module.h
%{macrosdir}/*
%files doc
# main package is not required
%license COPYING
# specific for documentation (CC-BY-SA)
%license doc/LICENSE
%docdir %{_docdir}/%{name}
%{_docdir}/%{name}
%changelog
* Mon Jun 20 2022 Henrik Triem <henrik.triem@icinga.com> - 7.0.2-1
- Update to 7.0.2-1
* Mon May 23 2022 Henrik Triem <henrik.triem@icinga.com> - 7.0.0-1
- Update to 7.0.0-1
* Fri May 20 2022 Henrik Triem <henrik.triem@icinga.com> - 6.2.7-1
- Update to 6.2.7-1
* Fri Nov 12 2021 Henrik Triem <henrik.triem@icinga.com> - 6.2.6-3
- Redis-shutdown: Look for icingadb-redis

View File

@ -1,3 +1,2 @@
SHA512 (redis-6.0.16.tar.gz) = 83bb72448f9943e3d015cb4d961eb2eae21602ef1f90ca52ca8ab7c6918b0ab979db9f61f3981df27b2286894f4864f4588c3a52fa988e30e9419b0967998845
SHA512 (redis-6.2.6.tar.gz) = 9b947d26fd9e208627ed22d318ab3d0775ab0be46d98db1c1d158feac671b984e75ce33e647d196face9643f80768af47e678be1b4e1ddd3eb56dff467c46022
SHA512 (redis-doc-3fdb6df.tar.gz) = 9444a3dc45075febeb2823b415997c2d5e512558aba12aca1b63db941c81d79050595b7feb553a45349cbdb34ff097a67b925fd542a582d8ca5ba9f0a8e9a638
SHA512 (redis-7.0.2.tar.gz) = bc8d679ecaad0220318b87be70476653f42b76815af61ff6f4e8885f5a5d17d41cea754fbf448f9e18e9a9f90227c5ac198fa9bc523370752f590ba01418a1b0
SHA512 (redis-doc-af2e6f8.tar.gz) = 63b723013919e903ad02f2b7288edf48d33901d12fd86316dfbb00d72aaf1599c3441d0b6733ede733d84caedfae6cd93cc5f7fc1530f324753e036961b3eae6