This mail is my last contribution to the Redis port for the foreseeable future. The port compiles and passes tests on amd64. If anyone wants an up-to-date Redis, feel free to pick this up and push it over the line.
https://github.com/redis/redis/blob/6.2-rc1/00-RELEASENOTES Index: Makefile =================================================================== RCS file: /cvs/ports/databases/redis/Makefile,v retrieving revision 1.117 diff -u -p -r1.117 Makefile --- Makefile 29 Oct 2020 05:14:03 -0000 1.117 +++ Makefile 14 Dec 2020 21:36:10 -0000 @@ -1,7 +1,8 @@ # $OpenBSD: Makefile,v 1.117 2020/10/29 05:14:03 tb Exp $ COMMENT = persistent key-value database -DISTNAME = redis-6.0.9 +DISTNAME = redis-6.2-rc1 +PKGNAME = ${DISTNAME:S/-rc/rc/} CATEGORIES = databases HOMEPAGE = https://redis.io/ Index: distinfo =================================================================== RCS file: /cvs/ports/databases/redis/distinfo,v retrieving revision 1.91 diff -u -p -r1.91 distinfo --- distinfo 29 Oct 2020 05:14:03 -0000 1.91 +++ distinfo 14 Dec 2020 21:36:26 -0000 @@ -1,2 +1,2 @@ -SHA256 (redis-6.0.9.tar.gz) = 3Cvc+BxiDp8Jz9EuhdO8YxyJey23pVIY/Ypl6qN/ht0= -SIZE (redis-6.0.9.tar.gz) = 2261418 +SHA256 (redis-6.2-rc1.tar.gz) = kvwT9Xsxy2QlxZC5xrC/YRRQ9msY/pK51Yk7OpdgxDg= +SIZE (redis-6.2-rc1.tar.gz) = 2354115 Index: patches/patch-deps_Makefile =================================================================== RCS file: /cvs/ports/databases/redis/patches/patch-deps_Makefile,v retrieving revision 1.12 diff -u -p -r1.12 patch-deps_Makefile --- patches/patch-deps_Makefile 8 Jun 2020 07:32:47 -0000 1.12 +++ patches/patch-deps_Makefile 14 Dec 2020 21:45:42 -0000 @@ -1,4 +1,5 @@ $OpenBSD: patch-deps_Makefile,v 1.12 2020/06/08 07:32:47 tb Exp $ + Index: deps/Makefile --- deps/Makefile.orig +++ deps/Makefile @@ -8,10 +9,10 @@ Index: deps/Makefile -(cd linenoise && $(MAKE) clean) > /dev/null || true - -(cd lua && $(MAKE) clean) > /dev/null || true - -(cd jemalloc && [ -f Makefile ] && $(MAKE) distclean) > /dev/null || true + -(cd hdr_histogram && $(MAKE) clean) > /dev/null || true -(rm -f .make-*) - .PHONY: distclean -@@ -46,42 +44,11 @@ ifeq ($(BUILD_TLS),yes) +@@ -47,48 +45,16 @@ ifeq ($(BUILD_TLS),yes) endif hiredis: .make-prerequisites @@ -25,19 +26,25 @@ Index: deps/Makefile cd linenoise && $(MAKE) .PHONY: linenoise + + hdr_histogram: .make-prerequisites +- @printf '%b %b\n' $(MAKECOLOR)MAKE$(ENDCOLOR) $(BINCOLOR)$@$(ENDCOLOR) + cd hdr_histogram && $(MAKE) + + .PHONY: hdr_histogram - -ifeq ($(uname_S),SunOS) - # Make isinf() available - LUA_CFLAGS= -D__C99FEATURES__=1 -endif - --LUA_CFLAGS+= -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' $(CFLAGS) +-LUA_CFLAGS+= -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -DLUA_USE_MKSTEMP $(CFLAGS) -LUA_LDFLAGS+= $(LDFLAGS) -# lua's Makefile defines AR="ar rcu", which is unusual, and makes it more -# challenging to cross-compile lua (and redis). These defines make it easier -# to fit redis into cross-compilation environments, which typically set AR. -AR=ar --ARFLAGS=rcu +-ARFLAGS=rc - -lua: .make-prerequisites - @printf '%b %b\n' $(MAKECOLOR)MAKE$(ENDCOLOR) $(BINCOLOR)$@$(ENDCOLOR) @@ -50,7 +57,7 @@ Index: deps/Makefile - -jemalloc: .make-prerequisites - @printf '%b %b\n' $(MAKECOLOR)MAKE$(ENDCOLOR) $(BINCOLOR)$@$(ENDCOLOR) -- cd jemalloc && ./configure --with-version=5.1.0-0-g0 --with-lg-quantum=3 --with-jemalloc-prefix=je_ --enable-cc-silence CFLAGS="$(JEMALLOC_CFLAGS)" LDFLAGS="$(JEMALLOC_LDFLAGS)" +- cd jemalloc && ./configure --with-version=5.1.0-0-g0 --with-lg-quantum=3 --with-jemalloc-prefix=je_ CFLAGS="$(JEMALLOC_CFLAGS)" LDFLAGS="$(JEMALLOC_LDFLAGS)" - cd jemalloc && $(MAKE) CFLAGS="$(JEMALLOC_CFLAGS)" LDFLAGS="$(JEMALLOC_LDFLAGS)" lib/libjemalloc.a - -.PHONY: jemalloc Index: patches/patch-deps_hiredis_Makefile =================================================================== RCS file: /cvs/ports/databases/redis/patches/patch-deps_hiredis_Makefile,v retrieving revision 1.9 diff -u -p -r1.9 patch-deps_hiredis_Makefile --- patches/patch-deps_hiredis_Makefile 8 Jun 2020 07:32:47 -0000 1.9 +++ patches/patch-deps_hiredis_Makefile 14 Dec 2020 21:45:44 -0000 @@ -1,8 +1,9 @@ $OpenBSD: patch-deps_hiredis_Makefile,v 1.9 2020/06/08 07:32:47 tb Exp $ + Index: deps/hiredis/Makefile --- deps/hiredis/Makefile.orig +++ deps/hiredis/Makefile -@@ -71,7 +71,7 @@ ifeq ($(USE_SSL),1) +@@ -76,7 +76,7 @@ ifeq ($(USE_SSL),1) CFLAGS+=-DHIREDIS_TEST_SSL endif @@ -11,12 +12,12 @@ Index: deps/hiredis/Makefile SSL_LDFLAGS=-lssl -lcrypto else OPENSSL_PREFIX?=/usr/local/opt/openssl -@@ -236,7 +236,7 @@ $(SSL_PKGCONFNAME): hiredis.h +@@ -258,7 +258,7 @@ $(SSL_PKGCONFNAME): hiredis_ssl.h @echo Libs.private: -lssl -lcrypto >> $@ install: $(DYLIBNAME) $(STLIBNAME) $(PKGCONFNAME) - mkdir -p $(INSTALL_INCLUDE_PATH) $(INSTALL_INCLUDE_PATH)/adapters $(INSTALL_LIBRARY_PATH) + $(INSTALL_DIR) $(INSTALL_INCLUDE_PATH) $(INSTALL_INCLUDE_PATH)/adapters $(INSTALL_LIBRARY_PATH) - $(INSTALL) hiredis.h async.h read.h sds.h $(INSTALL_INCLUDE_PATH) + $(INSTALL) hiredis.h async.h read.h sds.h alloc.h $(INSTALL_INCLUDE_PATH) $(INSTALL) adapters/*.h $(INSTALL_INCLUDE_PATH)/adapters $(INSTALL) $(DYLIBNAME) $(INSTALL_LIBRARY_PATH)/$(DYLIB_MINOR_NAME) Index: patches/patch-redis_conf =================================================================== RCS file: /cvs/ports/databases/redis/patches/patch-redis_conf,v retrieving revision 1.24 diff -u -p -r1.24 patch-redis_conf --- patches/patch-redis_conf 29 Oct 2020 05:14:03 -0000 1.24 +++ patches/patch-redis_conf 14 Dec 2020 21:45:49 -0000 @@ -13,18 +13,18 @@ Main changes in this file: Index: redis.conf --- redis.conf.orig +++ redis.conf -@@ -105,8 +105,8 @@ tcp-backlog 511 +@@ -112,8 +112,8 @@ tcp-backlog 511 # incoming connections. There is no default, so Redis will not listen # on a unix socket when not specified. # --# unixsocket /tmp/redis.sock +-# unixsocket /run/redis.sock -# unixsocketperm 700 +# unixsocket /var/run/redis/redis.sock +# unixsocketperm 770 # Close the connection after a client is idle for N seconds (0 to disable) timeout 0 -@@ -153,6 +153,7 @@ tcp-keepalive 300 +@@ -172,6 +172,7 @@ tcp-keepalive 300 # of these, and will not implicitly use the system wide configuration. # # tls-ca-cert-file ca.crt @@ -32,7 +32,7 @@ Index: redis.conf # tls-ca-cert-dir /etc/ssl/certs # By default, clients (including replica servers) on a TLS port are required -@@ -183,14 +184,14 @@ tcp-keepalive 300 +@@ -202,14 +203,14 @@ tcp-keepalive 300 # # tls-protocols "TLSv1.2 TLSv1.3" @@ -49,19 +49,19 @@ Index: redis.conf # information about the syntax of this string, and specifically for TLSv1.3 # ciphersuites. # -@@ -220,8 +221,9 @@ tcp-keepalive 300 +@@ -239,9 +240,9 @@ tcp-keepalive 300 ################################# GENERAL ##################################### # 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. ++# Note that Redis will write a pid file in /var/run/redis/redis.pid when daemonized. + # When Redis is supervised by upstart or systemd, this parameter has no impact. -daemonize no -+# Note that Redis will write a pid file in /var/run/redis/redis.pid -+# when daemonized. +daemonize yes # If you run Redis from upstart or systemd, Redis can interact with your # supervision tree. Options: -@@ -240,11 +242,11 @@ supervised no +@@ -266,14 +267,14 @@ daemonize no # # When the server runs non daemonized, no pid file is created if none is # specified in the configuration. When the server is daemonized, the pid file @@ -70,12 +70,15 @@ Index: redis.conf # # Creating a pid file is best effort: if Redis is not able to create it # nothing bad happens, the server will start and run normally. + # + # 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/redis_6379.pid # Specify the server verbosity level. # This can be one of: -@@ -257,17 +259,18 @@ loglevel notice +@@ -286,17 +287,18 @@ loglevel notice # 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 @@ -97,9 +100,9 @@ Index: redis.conf +# LOCAL0-LOCAL7. +syslog-facility daemon - # Set the number of databases. The default database is DB 0, you can select - # a different one on a per-connection basis using SELECT <dbid> where -@@ -362,7 +365,7 @@ rdb-del-sync-files no + # To disable the built in crash log, which will possibly produce cleaner core + # dumps when they are needed, uncomment the following: +@@ -417,7 +419,7 @@ rdb-del-sync-files no # The Append Only File will also be created inside this directory. # # Note that you must specify a directory here, not a file name. @@ -108,16 +111,16 @@ Index: redis.conf ################################# REPLICATION ################################# -@@ -787,7 +790,7 @@ acllog-max-len 128 - # AUTH <password> as usually, or more explicitly with AUTH default <password> - # if they follow the new protocol: both will work. +@@ -852,7 +854,7 @@ acllog-max-len 128 + # The requirepass is not compatable with aclfile option and the ACL LOAD + # command, these will cause requirepass to be ignored. # -# requirepass foobared +# requirepass very-strong-password - # Command renaming (DEPRECATED). - # -@@ -831,6 +834,7 @@ acllog-max-len 128 + # New users are initialized with restrictive permissions by default, via the + # equivalent of this ACL rule 'off resetkeys -@all'. Starting with Redis 6.2, it +@@ -917,6 +919,7 @@ acllog-max-len 128 # limit accordingly in case of very large clusters. # # maxclients 10000 Index: patches/patch-sentinel_conf =================================================================== RCS file: /cvs/ports/databases/redis/patches/patch-sentinel_conf,v retrieving revision 1.8 diff -u -p -r1.8 patch-sentinel_conf --- patches/patch-sentinel_conf 8 Jun 2020 07:32:47 -0000 1.8 +++ patches/patch-sentinel_conf 14 Dec 2020 21:45:23 -0000 @@ -1,4 +1,5 @@ $OpenBSD: patch-sentinel_conf,v 1.8 2020/06/08 07:32:47 tb Exp $ + Index: sentinel.conf --- sentinel.conf.orig +++ sentinel.conf @@ -20,7 +21,7 @@ Index: sentinel.conf # 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 -@@ -202,7 +202,7 @@ sentinel failover-timeout mymaster 180000 +@@ -261,7 +261,7 @@ sentinel failover-timeout mymaster 180000 # # Example: # @@ -29,7 +30,7 @@ Index: sentinel.conf # CLIENTS RECONFIGURATION SCRIPT # -@@ -227,7 +227,7 @@ sentinel failover-timeout mymaster 180000 +@@ -286,7 +286,7 @@ sentinel failover-timeout mymaster 180000 # # Example: # Index: patches/patch-src_Makefile =================================================================== RCS file: /cvs/ports/databases/redis/patches/patch-src_Makefile,v retrieving revision 1.36 diff -u -p -r1.36 patch-src_Makefile --- patches/patch-src_Makefile 29 Oct 2020 05:14:03 -0000 1.36 +++ patches/patch-src_Makefile 14 Dec 2020 21:48:17 -0000 @@ -13,12 +13,12 @@ Index: src/Makefile uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not') uname_M := $(shell sh -c 'uname -m 2>/dev/null || echo not') OPTIMIZATION?=-O2 --DEPENDENCY_TARGETS=hiredis linenoise lua -+DEPENDENCY_TARGETS=hiredis linenoise +-DEPENDENCY_TARGETS=hiredis linenoise lua hdr_histogram ++DEPENDENCY_TARGETS=hiredis linenoise hdr_histogram NODEPS:=clean distclean # Default settings -@@ -31,6 +31,7 @@ OPT=$(OPTIMIZATION) +@@ -41,6 +41,7 @@ endif PREFIX?=/usr/local INSTALL_BIN=$(PREFIX)/bin @@ -26,7 +26,7 @@ Index: src/Makefile INSTALL=install PKG_CONFIG?=pkg-config -@@ -49,7 +50,7 @@ ifneq (,$(filter aarch64 armv,$(uname_M))) +@@ -59,7 +60,7 @@ ifneq (,$(filter aarch64 armv,$(uname_M))) CFLAGS+=-funwind-tables else ifneq (,$(findstring armv,$(uname_M))) @@ -35,7 +35,7 @@ Index: src/Makefile endif endif -@@ -83,7 +84,7 @@ ifneq (,$(filter aarch64 armv,$(uname_M))) +@@ -93,7 +94,7 @@ ifneq (,$(filter aarch64 armv,$(uname_M))) FINAL_LIBS+=-latomic else ifneq (,$(findstring armv,$(uname_M))) @@ -44,16 +44,16 @@ Index: src/Makefile endif endif -@@ -166,7 +167,7 @@ endif +@@ -178,7 +179,7 @@ endif endif endif # Include paths to dependencies --FINAL_CFLAGS+= -I../deps/hiredis -I../deps/linenoise -I../deps/lua/src -+FINAL_CFLAGS+= -I../deps/hiredis -I../deps/linenoise -I${MODLUA_INCL_DIR} +-FINAL_CFLAGS+= -I../deps/hiredis -I../deps/linenoise -I../deps/lua/src -I../deps/hdr_histogram ++FINAL_CFLAGS+= -I../deps/hiredis -I../deps/linenoise -I${MODLUA_INCL_DIR} -I../deps/hdr_histogram # Determine systemd support and/or build preference (defaulting to auto-detection) BUILD_WITH_SYSTEMD=no -@@ -253,6 +254,8 @@ REDIS_BENCHMARK_OBJ=ae.o anet.o redis-benchmark.o adli +@@ -268,6 +269,8 @@ REDIS_BENCHMARK_OBJ=ae.o anet.o redis-benchmark.o adli REDIS_CHECK_RDB_NAME=redis-check-rdb$(PROG_SUFFIX) REDIS_CHECK_AOF_NAME=redis-check-aof$(PROG_SUFFIX) @@ -62,7 +62,7 @@ Index: src/Makefile all: $(REDIS_SERVER_NAME) $(REDIS_SENTINEL_NAME) $(REDIS_CLI_NAME) $(REDIS_BENCHMARK_NAME) $(REDIS_CHECK_RDB_NAME) $(REDIS_CHECK_AOF_NAME) @echo "" @echo "Hint: It's a good idea to run 'make test' ;)" -@@ -299,7 +302,7 @@ endif +@@ -314,7 +317,7 @@ endif # redis-server $(REDIS_SERVER_NAME): $(REDIS_SERVER_OBJ) @@ -71,16 +71,16 @@ Index: src/Makefile # redis-sentinel $(REDIS_SENTINEL_NAME): $(REDIS_SERVER_NAME) -@@ -346,7 +349,7 @@ distclean: clean +@@ -361,7 +364,7 @@ distclean: clean .PHONY: distclean - test: $(REDIS_SERVER_NAME) $(REDIS_CHECK_AOF_NAME) + test: $(REDIS_SERVER_NAME) $(REDIS_CHECK_AOF_NAME) $(REDIS_CLI_NAME) $(REDIS_BENCHMARK_NAME) - @(cd ..; ./runtest) + @(cd ..; ulimit -Sd `ulimit -Hd`; ulimit -Sn `ulimit -Hn`; ulimit -Sp `ulimit -Hp`; ulimit -Ss `ulimit -Hs`; ${TCL_BIN} tests/test_helper.tcl) - test-sentinel: $(REDIS_SENTINEL_NAME) + test-sentinel: $(REDIS_SENTINEL_NAME) $(REDIS_CLI_NAME) @(cd ..; ./runtest-sentinel) -@@ -390,13 +393,14 @@ src/help.h: +@@ -401,13 +404,14 @@ src/help.h: @../utils/generate-command-help.rb > help.h install: all Index: patches/patch-src_debug_c =================================================================== RCS file: /cvs/ports/databases/redis/patches/patch-src_debug_c,v retrieving revision 1.3 diff -u -p -r1.3 patch-src_debug_c --- patches/patch-src_debug_c 29 Oct 2020 05:14:04 -0000 1.3 +++ patches/patch-src_debug_c 14 Dec 2020 21:45:32 -0000 @@ -5,7 +5,7 @@ time_t is long long on OpenBSD Index: src/debug.c --- src/debug.c.orig +++ src/debug.c -@@ -408,7 +408,7 @@ NULL +@@ -420,7 +420,7 @@ NULL } else if (!strcasecmp(c->argv[1]->ptr,"segfault")) { *((char*)-1) = 'x'; } else if (!strcasecmp(c->argv[1]->ptr,"panic")) { Index: patches/patch-src_networking_c =================================================================== RCS file: /cvs/ports/databases/redis/patches/patch-src_networking_c,v retrieving revision 1.5 diff -u -p -r1.5 patch-src_networking_c --- patches/patch-src_networking_c 29 Oct 2020 05:14:04 -0000 1.5 +++ patches/patch-src_networking_c 14 Dec 2020 21:45:35 -0000 @@ -5,7 +5,7 @@ time_t is long long, so use llabs to avo Index: src/networking.c --- src/networking.c.orig +++ src/networking.c -@@ -2651,7 +2651,7 @@ void securityWarningCommand(client *c) { +@@ -2833,7 +2833,7 @@ void securityWarningCommand(client *c) { static time_t logged_time; time_t now = time(NULL); Index: patches/patch-src_server_h =================================================================== RCS file: /cvs/ports/databases/redis/patches/patch-src_server_h,v retrieving revision 1.5 diff -u -p -r1.5 patch-src_server_h --- patches/patch-src_server_h 8 Jun 2020 07:32:47 -0000 1.5 +++ patches/patch-src_server_h 14 Dec 2020 21:45:37 -0000 @@ -1,8 +1,9 @@ $OpenBSD: patch-src_server_h,v 1.5 2020/06/08 07:32:47 tb Exp $ + Index: src/server.h --- src/server.h.orig +++ src/server.h -@@ -106,7 +106,7 @@ typedef long long ustime_t; /* microsecond time type. +@@ -107,7 +107,7 @@ typedef long long ustime_t; /* microsecond time type. #define RDB_EOF_MARK_SIZE 40 #define CONFIG_REPL_BACKLOG_MIN_SIZE (1024*16) /* 16k */ #define CONFIG_BGSAVE_RETRY_DELAY 5 /* Wait a few secs before trying again. */ Index: patches/patch-utils_gen-test-certs_sh =================================================================== RCS file: /cvs/ports/databases/redis/patches/patch-utils_gen-test-certs_sh,v retrieving revision 1.1 diff -u -p -r1.1 patch-utils_gen-test-certs_sh --- patches/patch-utils_gen-test-certs_sh 8 Jun 2020 07:32:47 -0000 1.1 +++ patches/patch-utils_gen-test-certs_sh 14 Dec 2020 21:45:40 -0000 @@ -6,6 +6,6 @@ Index: utils/gen-test-certs.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh - mkdir -p tests/tls - openssl genrsa -out tests/tls/ca.key 4096 - openssl req \ + + # Generate some test certificates which are used by the regression test suite: + #