diff --git a/databases/valkey/Makefile b/databases/valkey/Makefile index 860a061d7c6d..e498f13a9237 100644 --- a/databases/valkey/Makefile +++ b/databases/valkey/Makefile @@ -1,75 +1,69 @@ PORTNAME= valkey -DISTVERSION= g20240402 +DISTVERSION= 7.2.5 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 +USES= gmake pkgconfig 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 + ${WRKSRC}/valkey.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/ +post-install: ${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 index b3c31618a17a..ff9c571ed2c6 100644 --- a/databases/valkey/distinfo +++ b/databases/valkey/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1712041530 -SHA256 (valkey-io-valkey-g20240402-0ba2f1b14_GH0.tar.gz) = 134eb1521ab2b1dfd9d8f30208b6c4261621e5d05218825881d2cc53cf1bfefb -SIZE (valkey-io-valkey-g20240402-0ba2f1b14_GH0.tar.gz) = 3474270 +TIMESTAMP = 1713663446 +SHA256 (valkey-io-valkey-7.2.5_GH0.tar.gz) = c7c7a758edabe7693b3692db58fe5328130036b06224df64ab1f0c12fe265a76 +SIZE (valkey-io-valkey-7.2.5_GH0.tar.gz) = 3420515 diff --git a/databases/valkey/files/patch-sentinel.conf b/databases/valkey/files/patch-sentinel.conf index d02120641775..8f26502b8146 100644 --- a/databases/valkey/files/patch-sentinel.conf +++ b/databases/valkey/files/patch-sentinel.conf @@ -1,26 +1,26 @@ ---- sentinel.conf.orig 2024-04-01 02:56:24 UTC +--- sentinel.conf.orig 2024-04-16 04:18:47 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 + # By default Valkey Sentinel does not run as a daemon. Use 'yes' if you need it. + # Note that Valkey will write a pid file in /var/run/valkey-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 + # When running daemonized, Valkey Sentinel writes a pid file in + # /var/run/valkey-sentinel.pid by default. You can specify a custom pid file # location here. --pidfile /var/run/redis-sentinel.pid +-pidfile /var/run/valkey-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 index 20997e2d3b04..37d215714f74 100644 --- a/databases/valkey/files/patch-src-Makefile +++ b/databases/valkey/files/patch-src-Makefile @@ -1,39 +1,54 @@ ---- src/Makefile.orig 2024-04-01 02:56:24 UTC +--- src/Makefile.orig 2024-04-16 04:18:47 UTC +++ src/Makefile -@@ -61,7 +61,7 @@ endif +@@ -55,8 +55,8 @@ endif STD+=-std=c99 endif -PREFIX?=/usr/local +-INSTALL_BIN=$(PREFIX)/bin +PREFIX:=$(PREFIX) - INSTALL_BIN=$(PREFIX)/bin ++INSTALL_BIN=$(DESTDIR)$(PREFIX)/bin INSTALL=install PKG_CONFIG?=pkg-config -@@ -133,7 +133,6 @@ FINAL_LIBS=-lm + +@@ -127,7 +127,6 @@ FINAL_LIBS=-lm FINAL_CFLAGS=$(STD) $(WARN) $(OPT) $(DEBUG) $(CFLAGS) $(SERVER_CFLAGS) - FINAL_LDFLAGS=$(LDFLAGS) $(OPT) $(SERVER_LDFLAGS) $(DEBUG) + FINAL_LDFLAGS=$(LDFLAGS) $(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 +@@ -166,6 +165,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 +@@ -225,6 +229,7 @@ endif endif endif endif ++endif + + ifdef OPENSSL_PREFIX + OPENSSL_CFLAGS=-I$(OPENSSL_PREFIX)/include +@@ -541,12 +546,6 @@ install: all + @ln -sf $(REDIS_SERVER_NAME) $(INSTALL_BIN)/$(REDIS_CHECK_RDB_NAME) + @ln -sf $(REDIS_SERVER_NAME) $(INSTALL_BIN)/$(REDIS_CHECK_AOF_NAME) + @ln -sf $(REDIS_SERVER_NAME) $(INSTALL_BIN)/$(REDIS_SENTINEL_NAME) +- $(call MAYBE_INSTALL_REDIS_SYMLINK,$(REDIS_SERVER_NAME),$(INSTALL_BIN)) +- $(call MAYBE_INSTALL_REDIS_SYMLINK,$(REDIS_CLI_NAME),$(INSTALL_BIN)) +- $(call MAYBE_INSTALL_REDIS_SYMLINK,$(REDIS_BENCHMARK_NAME),$(INSTALL_BIN)) +- $(call MAYBE_INSTALL_REDIS_SYMLINK,$(REDIS_CHECK_RDB_NAME),$(INSTALL_BIN)) +- $(call MAYBE_INSTALL_REDIS_SYMLINK,$(REDIS_CHECK_AOF_NAME),$(INSTALL_BIN)) +- $(call MAYBE_INSTALL_REDIS_SYMLINK,$(REDIS_SENTINEL_NAME),$(INSTALL_BIN)) + + uninstall: + rm -f $(INSTALL_BIN)/{$(REDIS_SERVER_NAME),$(REDIS_BENCHMARK_NAME),$(REDIS_CLI_NAME),$(REDIS_CHECK_RDB_NAME),$(REDIS_CHECK_AOF_NAME),$(REDIS_SENTINEL_NAME)} diff --git a/databases/valkey/files/patch-src-mkreleasehdr.sh b/databases/valkey/files/patch-src-mkreleasehdr.sh index 65920da3a3ff..90c25249469d 100644 --- a/databases/valkey/files/patch-src-mkreleasehdr.sh +++ b/databases/valkey/files/patch-src-mkreleasehdr.sh @@ -1,11 +1,11 @@ ---- src/mkreleasehdr.sh.orig 2024-01-27 09:11:53 UTC +--- src/mkreleasehdr.sh.orig 2024-04-16 04:18:47 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_DIRTY=`git diff --no-ext-diff 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/patch-redis.conf b/databases/valkey/files/patch-valkey.conf similarity index 52% rename from databases/valkey/files/patch-redis.conf rename to databases/valkey/files/patch-valkey.conf index 4dcc57584424..87d03a4935ac 100644 --- a/databases/valkey/files/patch-redis.conf +++ b/databases/valkey/files/patch-valkey.conf @@ -1,38 +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. +--- valkey.conf.orig 2024-04-16 04:18:47 UTC ++++ valkey.conf +@@ -303,7 +303,7 @@ tcp-keepalive 300 + # By default the server does not run as a daemon. Use 'yes' if you need it. + # Note that the server will write a pid file in /var/run/valkey.pid when daemonized. + # When the server 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 + # If you run the server from upstart or systemd, the server can interact with your # supervision tree. Options: -@@ -339,7 +339,7 @@ daemonize no +@@ -335,7 +335,7 @@ daemonize no # - # Note that on modern Linux systems "/run/redis.pid" is more conforming + # Note that on modern Linux systems "/run/valkey.pid" is more conforming # and should be used instead. --pidfile /var/run/redis_6379.pid +-pidfile /var/run/valkey_6379.pid +pidfile %%VALKEY_RUNDIR%%/valkey.pid # Specify the server verbosity level. # This can be one of: -@@ -353,7 +353,7 @@ loglevel notice +@@ -349,7 +349,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 + # the server 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 +@@ -504,7 +504,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 #################################