From nobody Tue Apr 2 07:14:21 2024 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4V7zdn5kbgz5GJxQ; Tue, 2 Apr 2024 07:14:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4V7zdn5Qwxz4FHV; Tue, 2 Apr 2024 07:14:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1712042061; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mjlS5gD9oGMEPhK3n65bwGhGxNyk2v09i/v0N5x35lo=; b=tHGv67nqSo93SqAHhvweSHK0jPtwRN3FQL3od79lmiP6MOkbPRQz3gi+qjakXTGdsT8Cq8 p+J+PBTidS+0mPZ9rvF0vTkgZ8LJ6b3/nxDYnu8ZSP2aTGsbZ8E088FY6m97ZbJ5VdWF1t +df/IKptvIKQqOVCs2EmUF77PnkM6FFjJPvHVnvrE0Z5yBEFc8AoTCr65V9ccEvDRa/JA1 Ef2EW6ysSwWxONCEEnwBhkYl2QhMfQWC+4QHl0FjyJpCUCTcS/sBWIriB3L8Bset+69pLB mbAJKMzggnaFMCZ3b8ilVAKRs0yeAsm5qLTJ5i9rTQq93uxrYMN0xKvOOEpU4w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1712042061; a=rsa-sha256; cv=none; b=LlbPrD2WGzLHT2bBnVFuHCFwQWZivV6H2WcHglen07+W43dNIwQCO2tBq/zVKFnocgn7wb rYygynEnORs+pbI0ANVenAQZDZR35puAM72aVwNR530aIW4te7MVm5DUOChJ1xczJaoHKJ GKTQpNSTprd7jofjIWgzm4USSKtxTmYA8ry2yRddezUaZY3FzD/IGbk+ph/igjDes8Agse n1LXLuMc4fw//rKFz+lIThmC/iRlAAtkO6p+lzT6Cfl35KyfNag9gUaSZH8l4zZtS4FhHV m9vaGzd1+2GDiLSG5aNm4aRau2BJspN89MmcefM/w0G4KLhEv2UOBErSB176aQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1712042061; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mjlS5gD9oGMEPhK3n65bwGhGxNyk2v09i/v0N5x35lo=; b=EWsChgzmmnZX2jABcZStKuZNUQZK3aIFDK/1hTydc0foBu1cAdrsMLiFxiPHe+aBQOyIui MHIgW54EiiEwVyz29gNS67oIlJuyCpr0c/y2/RC7ZAT9yaKcQNYpet1bYSH5dAYySVyUo2 PHnX6Bh3n22hT/8P9hYZNtWdF/akR9Pm/99WgCD/WPaJf8UHAzjuiyxI7Cbp3lyrlS8izh viIIj+ebt96ea2RCxnHLpCLSbE55Fx+PCuUOOmenzDKjNZ/rXgULLxHfUA9vmrE2UmIYpX ZdTFdP01CsAyMV0Jr91M6yBk4VWf0ZH0YIagritZjrW+WPN0GCZ0+w5Ch2L99g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4V7zdn52R3zgSS; Tue, 2 Apr 2024 07:14:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 4327ELEa044349; Tue, 2 Apr 2024 07:14:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4327ELiU044346; Tue, 2 Apr 2024 07:14:21 GMT (envelope-from git) Date: Tue, 2 Apr 2024 07:14:21 GMT Message-Id: <202404020714.4327ELiU044346@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Yasuhiro Kimura Subject: git: a08336423d72 - main - databases/valkey: Add new port List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: yasu X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a08336423d727103442208c74633a2f01aacdb74 Auto-Submitted: auto-generated The branch main has been updated by yasu: URL: https://cgit.FreeBSD.org/ports/commit/?id=a08336423d727103442208c74633a2f01aacdb74 commit a08336423d727103442208c74633a2f01aacdb74 Author: Yasuhiro Kimura AuthorDate: 2024-04-02 07:07:00 +0000 Commit: Yasuhiro Kimura CommitDate: 2024-04-02 07:13:36 +0000 databases/valkey: Add new port Add databases/valkey, High-performance data structure server that primarily serves key/value workloads. --- GIDs | 2 +- UIDs | 2 +- databases/Makefile | 1 + databases/valkey/Makefile | 75 ++++++++++++++++++++++ databases/valkey/distinfo | 3 + databases/valkey/files/patch-deps-Makefile | 21 ++++++ databases/valkey/files/patch-deps-hiredis-Makefile | 41 ++++++++++++ databases/valkey/files/patch-deps-hiredis-net.c | 39 +++++++++++ .../valkey/files/patch-deps-linenoise-Makefile | 15 +++++ .../valkey/files/patch-deps_lua_src_lua__cjson.c | 12 ++++ databases/valkey/files/patch-redis.conf | 38 +++++++++++ databases/valkey/files/patch-sentinel.conf | 26 ++++++++ databases/valkey/files/patch-src-Makefile | 39 +++++++++++ databases/valkey/files/patch-src-mkreleasehdr.sh | 11 ++++ databases/valkey/files/pkg-message.in | 11 ++++ databases/valkey/files/valkey.in | 67 +++++++++++++++++++ databases/valkey/files/valkeysentinel.in | 39 +++++++++++ databases/valkey/pkg-descr | 4 ++ databases/valkey/pkg-plist | 11 ++++ 19 files changed, 455 insertions(+), 2 deletions(-) diff --git a/GIDs b/GIDs index 9484f962f0ff..80c1e80341da 100644 --- a/GIDs +++ b/GIDs @@ -477,7 +477,7 @@ dkimproxy:*:525: pgbouncer:*:534: redis:*:535: keydb:*:536: -# free: 537 +valkey:*:537: # free: 538 # free: 539 # free: 540 diff --git a/UIDs b/UIDs index 09f572b79759..3315630967c2 100644 --- a/UIDs +++ b/UIDs @@ -482,7 +482,7 @@ dkimproxy:*:525:525::0:0:DKIM Proxy Owner:/nonexistent:/usr/sbin/nologin pgbouncer:*:534:534::0:0:Pgbouncer Daemon:/nonexistent:/usr/sbin/nologin redis:*:535:535::0:0:Redis Daemon:/nonexistent:/usr/sbin/nologin keydb:*:536:536::0:0:KeyDB Daemon:/nonexistent:/usr/sbin/nologin -# free: 537 +valkey:*:537:537::0:0:Valkey Daemon:/nonexistent:/usr/sbin/nologin # free: 538 # free: 539 # free: 540 diff --git a/databases/Makefile b/databases/Makefile index aa4cf2575b76..f65e1cf2175b 100644 --- a/databases/Makefile +++ b/databases/Makefile @@ -1061,6 +1061,7 @@ SUBDIR += twemproxy SUBDIR += unixODBC SUBDIR += usql + SUBDIR += valkey SUBDIR += vfront SUBDIR += virtualpg SUBDIR += vsqlite diff --git a/databases/valkey/Makefile b/databases/valkey/Makefile new file mode 100644 index 000000000000..860a061d7c6d --- /dev/null +++ b/databases/valkey/Makefile @@ -0,0 +1,75 @@ +PORTNAME= valkey +DISTVERSION= g20240402 +CATEGORIES= databases + +MAINTAINER= yasu@FreeBSD.org +COMMENT= High-performance data structure server that primarily serves key/value workloads +WWW= https://valkey.io/ + +LICENSE= BSD3CLAUSE +LICENSE_FILE= ${WRKSRC}/COPYING + +USES+= gmake tcl:test +USE_GITHUB= yes +GH_ACCOUNT= valkey-io +GH_TAGNAME= 0ba2f1b14 +USE_RC_SUBR= valkey valkeysentinel + +MAKE_ENV= OPTIMIZATION= \ + V=1 + +LDFLAGS+= -lpthread -lm -lexecinfo + +PORTSCOUT= ignore:1 +SUB_FILES= pkg-message +SUB_LIST+= PORTNAME=${PORTNAME} \ + VALKEY_DBDIR=${VALKEY_DBDIR} \ + VALKEY_LOGDIR=${VALKEY_LOGDIR} \ + VALKEY_RUNDIR=${VALKEY_RUNDIR} \ + VALKEY_USER=${USERS} + +USERS= valkey +GROUPS= valkey + +PLIST_SUB+= VALKEY_DBDIR=${VALKEY_DBDIR} \ + VALKEY_GROUP=${GROUPS} \ + VALKEY_LOGDIR=${VALKEY_LOGDIR} \ + VALKEY_RUNDIR=${VALKEY_RUNDIR} \ + VALKEY_USER=${USERS} + +OPTIONS_DEFINE= JEMALLOC TLS +OPTIONS_DEFAULT= TLS +OPTIONS_SUB= yes + +JEMALLOC_DESC= Use jemalloc +TLS_DESC= Use TLS + +JEMALLOC_MAKE_ENV= MALLOC=jemalloc +TLS_USES= ssl +TLS_MAKE_ENV= BUILD_TLS=yes + +BIN_FILES= valkey-benchmark valkey-check-aof valkey-check-rdb valkey-cli \ + valkey-sentinel valkey-server + +VALKEY_DBDIR?= /var/db/valkey +VALKEY_RUNDIR?= /var/run/valkey +VALKEY_LOGDIR?= /var/log/valkey + +post-build: + ${SED} ${SUB_LIST:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \ + ${WRKSRC}/redis.conf > ${WRKDIR}/valkey.conf + ${SED} ${SUB_LIST:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \ + ${WRKSRC}/sentinel.conf > ${WRKDIR}/valkey-sentinel.conf + +do-install: + ${INSTALL_PROGRAM} ${BIN_FILES:C!^!${WRKSRC}/src/!} ${STAGEDIR}${PREFIX}/bin/ + ${INSTALL_DATA} ${WRKDIR}/valkey.conf ${STAGEDIR}${PREFIX}/etc/valkey.conf.sample + ${INSTALL_DATA} ${WRKDIR}/valkey-sentinel.conf ${STAGEDIR}${PREFIX}/etc/valkey-sentinel.conf.sample + ${MKDIR} ${STAGEDIR}${VALKEY_LOGDIR} \ + ${STAGEDIR}${VALKEY_DBDIR} \ + ${STAGEDIR}${VALKEY_RUNDIR} + +do-test: + @cd ${WRKSRC} && ${TCLSH} tests/test_helper.tcl + +.include diff --git a/databases/valkey/distinfo b/databases/valkey/distinfo new file mode 100644 index 000000000000..b3c31618a17a --- /dev/null +++ b/databases/valkey/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1712041530 +SHA256 (valkey-io-valkey-g20240402-0ba2f1b14_GH0.tar.gz) = 134eb1521ab2b1dfd9d8f30208b6c4261621e5d05218825881d2cc53cf1bfefb +SIZE (valkey-io-valkey-g20240402-0ba2f1b14_GH0.tar.gz) = 3474270 diff --git a/databases/valkey/files/patch-deps-Makefile b/databases/valkey/files/patch-deps-Makefile new file mode 100644 index 000000000000..003ae439c2c5 --- /dev/null +++ b/databases/valkey/files/patch-deps-Makefile @@ -0,0 +1,21 @@ +--- deps/Makefile.orig 2024-04-01 02:56:24 UTC ++++ deps/Makefile +@@ -84,7 +84,7 @@ else + ifeq ($(LUA_DEBUG),yes) + LUA_CFLAGS+= -O0 -g -DLUA_USE_APICHECK + else +- LUA_CFLAGS+= -O2 ++ LUA_CFLAGS+= + endif + ifeq ($(LUA_COVERAGE),yes) + LUA_CFLAGS += -fprofile-arcs -ftest-coverage +@@ -112,7 +112,7 @@ jemalloc: .make-prerequisites + + jemalloc: .make-prerequisites + @printf '%b %b\n' $(MAKECOLOR)MAKE$(ENDCOLOR) $(BINCOLOR)$@$(ENDCOLOR) +- cd jemalloc && ./configure --disable-cxx --with-version=5.3.0-0-g0 --with-lg-quantum=3 --disable-cache-oblivious --with-jemalloc-prefix=je_ CFLAGS="$(JEMALLOC_CFLAGS)" LDFLAGS="$(JEMALLOC_LDFLAGS)" $(JEMALLOC_CONFIGURE_OPTS) +- cd jemalloc && $(MAKE) lib/libjemalloc.a ++ cd jemalloc && ./configure --disable-cxx --with-version=5.3.0-0-g0 --with-lg-quantum=3 --disable-cache-oblivious --with-jemalloc-prefix=je_ CFLAGS="$(JEMALLOC_CFLAGS)" CXXFLAGS="$(JEMALLOC_CFLAGS)" LDFLAGS="$(JEMALLOC_LDFLAGS)" $(JEMALLOC_CONFIGURE_OPTS) ++ cd jemalloc && $(MAKE) CFLAGS="$(JEMALLOC_CFLAGS)" CXXFLAGS="$(JEMALLOC_CFLAGS)" LDFLAGS="$(JEMALLOC_LDFLAGS)" lib/libjemalloc.a + + .PHONY: jemalloc diff --git a/databases/valkey/files/patch-deps-hiredis-Makefile b/databases/valkey/files/patch-deps-hiredis-Makefile new file mode 100644 index 000000000000..a2789076673c --- /dev/null +++ b/databases/valkey/files/patch-deps-hiredis-Makefile @@ -0,0 +1,41 @@ +--- deps/hiredis/Makefile.orig 2023-07-30 05:48:29 UTC ++++ deps/hiredis/Makefile +@@ -15,7 +15,7 @@ HIREDIS_PATCH=$(shell grep HIREDIS_PATCH hiredis.h | a + HIREDIS_SONAME=$(shell grep HIREDIS_SONAME hiredis.h | awk '{print $$3}') + + # Installation related variables and target +-PREFIX?=/usr/local ++PREFIX?=${PREFIX} + INCLUDE_PATH?=include/hiredis + LIBRARY_PATH?=lib + PKGCONF_PATH?=pkgconfig +@@ -38,10 +38,8 @@ export REDIS_TEST_CONFIG + # Fallback to gcc when $CC is not in $PATH. + CC:=$(shell sh -c 'type $${CC%% *} >/dev/null 2>/dev/null && echo $(CC) || echo gcc') + CXX:=$(shell sh -c 'type $${CXX%% *} >/dev/null 2>/dev/null && echo $(CXX) || echo g++') +-OPTIMIZATION?=-O3 + WARNINGS=-Wall -Wextra -Werror -Wstrict-prototypes -Wwrite-strings -Wno-missing-field-initializers +-DEBUG_FLAGS?= -g -ggdb +-REAL_CFLAGS=$(OPTIMIZATION) -fPIC $(CPPFLAGS) $(CFLAGS) $(WARNINGS) $(DEBUG_FLAGS) $(PLATFORM_FLAGS) ++REAL_CFLAGS=$(OPTIMIZATION) -fPIC $(CFLAGS) $(WARNINGS) $(DEBUG_FLAGS) $(PLATFORM_FLAGS) + REAL_LDFLAGS=$(LDFLAGS) + + DYLIBSUFFIX=so +@@ -122,7 +120,16 @@ ifeq ($(uname_S),FreeBSD) + else + REAL_CFLAGS+=-pedantic + endif +- ++ifeq ($(uname_S),FreeBSD) ++ CFLAGS?=$(CFLAGS) ++ CCLINK?=pthread ++ LDFLAGS?=-L. -Wl,-rpath,. ++ DYLIBNAME?=libhiredis.so ++ DYLIB_MAKE_CMD?=$(CC) -o ${DYLIBNAME} ${OBJ} ++ STLIBNAME?=libhiredis.a ++ STLIB_MAKE_CMD?=ar rcs ${STLIBNAME} ${OBJ} ++ SSL_LDFLAGS+=${OPENSSL_LDFLAGS} ++endif + ifeq ($(uname_S),SunOS) + IS_SUN_CC=$(shell sh -c '$(CC) -V 2>&1 |egrep -i -c "sun|studio"') + ifeq ($(IS_SUN_CC),1) diff --git a/databases/valkey/files/patch-deps-hiredis-net.c b/databases/valkey/files/patch-deps-hiredis-net.c new file mode 100644 index 000000000000..434ebf0e81a4 --- /dev/null +++ b/databases/valkey/files/patch-deps-hiredis-net.c @@ -0,0 +1,39 @@ +--- deps/hiredis/net.c.orig 2024-04-01 02:56:24 UTC ++++ deps/hiredis/net.c +@@ -185,14 +185,34 @@ int redisKeepAlive(redisContext *c, int interval) { + __redisSetError(c,REDIS_ERR_OTHER,strerror(errno)); + return REDIS_ERR; + } +-#else +-#if defined(__GLIBC__) && !defined(__FreeBSD_kernel__) ++#elif defined(__GLIBC__) + if (setsockopt(fd, IPPROTO_TCP, TCP_KEEPIDLE, &val, sizeof(val)) < 0) { + __redisSetError(c,REDIS_ERR_OTHER,strerror(errno)); + return REDIS_ERR; + } + + val = interval/3; ++ if (val == 0) val = 1; ++ if (setsockopt(fd, IPPROTO_TCP, TCP_KEEPINTVL, &val, sizeof(val)) < 0) { ++ __redisSetError(c,REDIS_ERR_OTHER,strerror(errno)); ++ return REDIS_ERR; ++ } ++ ++ val = 3; ++ if (setsockopt(fd, IPPROTO_TCP, TCP_KEEPCNT, &val, sizeof(val)) < 0) { ++ __redisSetError(c,REDIS_ERR_OTHER,strerror(errno)); ++ return REDIS_ERR; ++ } ++#else ++#if !defined(__sun) && defined(TCP_KEEPIDLE) && defined(TCP_KEEPINTL) && \ ++ defined(TCP_KEEPCNT) ++ val = interval; ++ if (setsockopt(fd, IPPROTO_TCP, TCP_KEEPIDLE, &val, sizeof(val)) < 0) { ++ __redisSetError(c,REDIS_ERR_OTHER,strerror(errno)); ++ return REDIS_ERR; ++ } ++ ++ val = internal/3; + if (val == 0) val = 1; + if (setsockopt(fd, IPPROTO_TCP, TCP_KEEPINTVL, &val, sizeof(val)) < 0) { + __redisSetError(c,REDIS_ERR_OTHER,strerror(errno)); diff --git a/databases/valkey/files/patch-deps-linenoise-Makefile b/databases/valkey/files/patch-deps-linenoise-Makefile new file mode 100644 index 000000000000..aef0f10966af --- /dev/null +++ b/databases/valkey/files/patch-deps-linenoise-Makefile @@ -0,0 +1,15 @@ +--- deps/linenoise/Makefile.orig 2019-09-25 10:40:18 UTC ++++ deps/linenoise/Makefile +@@ -1,10 +1,10 @@ + STD= + WARN= -Wall +-OPT= -Os ++#OPT= -Os + + R_CFLAGS= $(STD) $(WARN) $(OPT) $(DEBUG) $(CFLAGS) + R_LDFLAGS= $(LDFLAGS) +-DEBUG= -g ++#DEBUG= -g + + R_CC=$(CC) $(R_CFLAGS) + R_LD=$(CC) $(R_LDFLAGS) diff --git a/databases/valkey/files/patch-deps_lua_src_lua__cjson.c b/databases/valkey/files/patch-deps_lua_src_lua__cjson.c new file mode 100644 index 000000000000..55f700aee7f3 --- /dev/null +++ b/databases/valkey/files/patch-deps_lua_src_lua__cjson.c @@ -0,0 +1,12 @@ +--- deps/lua/src/lua_cjson.c.orig 2024-04-01 02:56:24 UTC ++++ deps/lua/src/lua_cjson.c +@@ -47,7 +47,9 @@ + #include "strbuf.h" + #include "fpconv.h" + ++#if defined(__sun) + #include "../../../src/solarisfixes.h" ++#endif + + #ifndef CJSON_MODNAME + #define CJSON_MODNAME "cjson" diff --git a/databases/valkey/files/patch-redis.conf b/databases/valkey/files/patch-redis.conf new file mode 100644 index 000000000000..4dcc57584424 --- /dev/null +++ b/databases/valkey/files/patch-redis.conf @@ -0,0 +1,38 @@ +--- redis.conf.orig 2024-04-01 02:56:24 UTC ++++ redis.conf +@@ -307,7 +307,7 @@ tcp-keepalive 300 + # 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: +@@ -339,7 +339,7 @@ daemonize no + # + # Note that on modern Linux systems "/run/redis.pid" is more conforming + # and should be used instead. +-pidfile /var/run/redis_6379.pid ++pidfile %%VALKEY_RUNDIR%%/valkey.pid + + # Specify the server verbosity level. + # This can be one of: +@@ -353,7 +353,7 @@ 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 +-logfile "" ++logfile %%VALKEY_LOGDIR%%/valkey.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. +@@ -508,7 +508,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. +-dir ./ ++dir %%VALKEY_DBDIR%%/ + + ################################# REPLICATION ################################# + diff --git a/databases/valkey/files/patch-sentinel.conf b/databases/valkey/files/patch-sentinel.conf new file mode 100644 index 000000000000..d02120641775 --- /dev/null +++ b/databases/valkey/files/patch-sentinel.conf @@ -0,0 +1,26 @@ +--- sentinel.conf.orig 2024-04-01 02:56:24 UTC ++++ sentinel.conf +@@ -12,12 +12,12 @@ 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 ++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 ++pidfile %%VALKEY_RUNDIR%%/valkey-sentinel.pid + + # Specify the server verbosity level. + # This can be one of: +@@ -31,7 +31,7 @@ loglevel notice + # 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 %%VALKEY_LOGDIR%%/valkey-sentinel.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. diff --git a/databases/valkey/files/patch-src-Makefile b/databases/valkey/files/patch-src-Makefile new file mode 100644 index 000000000000..20997e2d3b04 --- /dev/null +++ b/databases/valkey/files/patch-src-Makefile @@ -0,0 +1,39 @@ +--- src/Makefile.orig 2024-04-01 02:56:24 UTC ++++ src/Makefile +@@ -61,7 +61,7 @@ endif + STD+=-std=c99 + endif + +-PREFIX?=/usr/local ++PREFIX:=$(PREFIX) + INSTALL_BIN=$(PREFIX)/bin + INSTALL=install + PKG_CONFIG?=pkg-config +@@ -133,7 +133,6 @@ FINAL_LIBS=-lm + FINAL_CFLAGS=$(STD) $(WARN) $(OPT) $(DEBUG) $(CFLAGS) $(SERVER_CFLAGS) + FINAL_LDFLAGS=$(LDFLAGS) $(OPT) $(SERVER_LDFLAGS) $(DEBUG) + FINAL_LIBS=-lm +-DEBUG=-g -ggdb + + # Linux ARM32 needs -latomic at linking time + ifneq (,$(findstring armv,$(uname_M))) +@@ -172,6 +171,11 @@ else + OPENSSL_PREFIX?=/usr/local/opt/openssl + endif + else ++ifeq ($(uname_S),FreeBSD) ++ # FreeBSD ++ FINAL_CFLAGS?= $(CFLAGS) $(REDIS_CFLAGS) -I${PREFIX}/include ++ FINAL_LDFLAGS= $(LDFLAGS) -pthread ++else + ifeq ($(uname_S),AIX) + # AIX + FINAL_LDFLAGS+= -Wl,-bexpall +@@ -221,6 +225,7 @@ else + # All the other OSes (notably Linux) + FINAL_LDFLAGS+= -rdynamic + FINAL_LIBS+=-ldl -pthread -lrt ++endif + endif + endif + endif diff --git a/databases/valkey/files/patch-src-mkreleasehdr.sh b/databases/valkey/files/patch-src-mkreleasehdr.sh new file mode 100644 index 000000000000..65920da3a3ff --- /dev/null +++ b/databases/valkey/files/patch-src-mkreleasehdr.sh @@ -0,0 +1,11 @@ +--- src/mkreleasehdr.sh.orig 2024-01-27 09:11:53 UTC ++++ src/mkreleasehdr.sh +@@ -1,6 +1,6 @@ + #!/bin/sh +-GIT_SHA1=`(git show-ref --head --hash=8 2> /dev/null || echo 00000000) | head -n1` +-GIT_DIRTY=`git diff --no-ext-diff -- ../src ../deps 2> /dev/null | wc -l` ++GIT_SHA1="00000000" ++GIT_DIRTY="0" + BUILD_ID=`uname -n`"-"`date +%s` + if [ -n "$SOURCE_DATE_EPOCH" ]; then + BUILD_ID=$(date -u -d "@$SOURCE_DATE_EPOCH" +%s 2>/dev/null || date -u -r "$SOURCE_DATE_EPOCH" +%s 2>/dev/null || date -u +%s) diff --git a/databases/valkey/files/pkg-message.in b/databases/valkey/files/pkg-message.in new file mode 100644 index 000000000000..e32864db05c1 --- /dev/null +++ b/databases/valkey/files/pkg-message.in @@ -0,0 +1,11 @@ +[ +{ type: install + message: <