diff --git a/databases/redis/Makefile b/databases/redis/Makefile index 31481250a931..3172ef7636aa 100644 --- a/databases/redis/Makefile +++ b/databases/redis/Makefile @@ -1,91 +1,91 @@ PORTNAME= redis -DISTVERSION= 8.6.3 +DISTVERSION= 8.8.0 CATEGORIES= databases MASTER_SITES= https://download.redis.io/releases/ MAINTAINER= bofh@freebsd.org COMMENT= Persistent key-value database with built-in net interface WWW= https://redis.io/ LICENSE= AGPLv3 RSALv2 SSPLv1 LICENSE_COMB= dual LICENSE_NAME_RSALv2= Redis Source Available License v2 LICENSE_NAME_SSPLv1= Server Side Public License v1 LICENSE_FILE= ${WRKSRC}/LICENSE.txt LICENSE_PERMS_RSALv2= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept LICENSE_PERMS_SSPLv1= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept USES= compiler:c11 cpe gmake localbase:ldflags pkgconfig tcl:test CPE_VENDOR= redislabs USE_RC_SUBR= redis sentinel MAKE_ENV= OPTIMIZATION= \ V=yo -BINARY_ALIAS= gmd5sum=md5sum #PIE_UNSAFE= ld: error: relocation R_X86_64_32 cannot be used against local \ # symbol; recompile with -fPIC CONFLICTS_INSTALL= redis-devel redis[0-9]* +BINARY_ALIAS= gmd5sum=md5sum PORTSCOUT= limit:^[0-9\.]*$$ SUB_FILES= pkg-message SUB_LIST= PORTNAME=${PORTNAME} \ REDIS_DBDIR=${REDIS_DBDIR} \ + REDIS_GROUP=${GROUPS} \ REDIS_LOGDIR=${REDIS_LOGDIR} \ REDIS_RUNDIR=${REDIS_RUNDIR} \ REDIS_USER=${USERS} USERS= redis GROUPS= redis PLIST_SUB= REDIS_DBDIR=${REDIS_DBDIR} \ REDIS_GROUP=${GROUPS} \ REDIS_LOGDIR=${REDIS_LOGDIR} \ REDIS_RUNDIR=${REDIS_RUNDIR} \ REDIS_USER=${USERS} OPTIONS_DEFINE= JEMALLOC TLS OPTIONS_DEFAULT= TLS OPTIONS_GROUP= MODULES +OPTIONS_GROUP_MODULES= REDISBLOOM REDISJSON OPTIONS_SUB= yes -OPTIONS_GROUP_MODULES= REDISJSON - -REDISJSON_DESC= RedisJSON module - -REDISJSON_RUN_DEPENDS= redisjson>=0:databases/redisjson - JEMALLOC_DESC= Use jemalloc +REDISBLOOM_DESC= RedisBLOOM module +REDISJSON_DESC= RedisJSON module TLS_DESC= Use TLS (openssl req.) JEMALLOC_MAKE_ENV= USE_JEMALLOC=yes +REDISBLOOM_LIB_DEPENDS= redisbloom.so>=0:databases/redisbloom +REDISJSON_LIB_DEPENDS= librejson.so>=0:databases/redisjson TLS_USES= ssl TLS_MAKE_ENV= BUILD_TLS=yes BIN_FILES= redis-benchmark redis-check-aof redis-check-rdb redis-cli \ redis-sentinel redis-server REDIS_DBDIR?= /var/db/redis REDIS_RUNDIR?= /var/run/redis REDIS_LOGDIR?= /var/log/redis post-patch-JEMALLOC-on: @${REINPLACE_CMD} '78s!Linux!FreeBSD!g' ${WRKSRC}/src/Makefile post-build: ${SED} ${SUB_LIST:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \ ${WRKSRC}/redis.conf > ${WRKDIR}/redis.conf do-install: ${INSTALL_PROGRAM} ${BIN_FILES:C!^!${WRKSRC}/src/!} ${STAGEDIR}${PREFIX}/bin/ ${INSTALL_DATA} ${WRKDIR}/redis.conf ${STAGEDIR}${PREFIX}/etc/redis.conf.sample ${INSTALL_DATA} ${WRKSRC}/sentinel.conf ${STAGEDIR}${PREFIX}/etc/sentinel.conf.sample ${MKDIR} ${STAGEDIR}${REDIS_LOGDIR} \ ${STAGEDIR}${REDIS_DBDIR} \ ${STAGEDIR}${REDIS_RUNDIR} do-test: @cd ${WRKSRC} && ${TCLSH} tests/test_helper.tcl .include diff --git a/databases/redis/distinfo b/databases/redis/distinfo index 1862242ed973..f9fdcdb63dd2 100644 --- a/databases/redis/distinfo +++ b/databases/redis/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1778692324 -SHA256 (redis-8.6.3.tar.gz) = 9f54d4458c52be5472cdd1347d737f1d488b520fc3d0911cba47302de8d836e2 -SIZE (redis-8.6.3.tar.gz) = 4252312 +TIMESTAMP = 1780063968 +SHA256 (redis-8.8.0.tar.gz) = 88422181efb0c9c0abba332e3e391d409e1e13714b838931669235e5796f704b +SIZE (redis-8.8.0.tar.gz) = 4480031 diff --git a/databases/redis/files/patch-deps_Makefile b/databases/redis/files/patch-deps_Makefile index ff2007910cb6..5fc5b59e0000 100644 --- a/databases/redis/files/patch-deps_Makefile +++ b/databases/redis/files/patch-deps_Makefile @@ -1,21 +1,21 @@ ---- deps/Makefile.orig 2025-11-18 14:58:24 UTC +--- deps/Makefile.orig 2026-05-25 09:26:50 UTC +++ deps/Makefile -@@ -117,7 +117,7 @@ else +@@ -118,7 +118,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 -@@ -145,7 +145,7 @@ jemalloc: .make-prerequisites +@@ -146,7 +146,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/redis/files/patch-deps_xxhash_Makefile b/databases/redis/files/patch-deps_xxhash_Makefile index f7dc31588e8f..d26eb22d9ffd 100644 --- a/databases/redis/files/patch-deps_xxhash_Makefile +++ b/databases/redis/files/patch-deps_xxhash_Makefile @@ -1,16 +1,16 @@ ---- deps/xxhash/Makefile.orig 2025-12-02 07:19:06 UTC +--- deps/xxhash/Makefile.orig 2026-05-25 09:26:50 UTC +++ deps/xxhash/Makefile @@ -186,11 +186,12 @@ clean: - $(RM) xxhsum.wasm xxhsum.js xxhsum.html - $(RM) xxh32sum$(EXT) xxh64sum$(EXT) xxh128sum$(EXT) xxh3sum$(EXT) - $(RM) fuzzer + $(RM) xxhsum.wasm xxhsum.js xxhsum.html + $(RM) xxh32sum$(EXT) xxh64sum$(EXT) xxh128sum$(EXT) xxh3sum$(EXT) + $(RM) fuzzer +ifneq ($(wildcard tests/*),) - $(MAKE) -C tests clean - $(MAKE) -C tests/bench clean - $(MAKE) -C tests/collisions clean - @echo cleaning completed + $(MAKE) -C tests clean + $(MAKE) -C tests/bench clean + $(MAKE) -C tests/collisions clean + @echo cleaning completed - +endif - + # ================================================= # tests diff --git a/databases/redis/files/patch-redis.conf b/databases/redis/files/patch-redis.conf index 201091ce2885..1bbed67a1b5d 100644 --- a/databases/redis/files/patch-redis.conf +++ b/databases/redis/files/patch-redis.conf @@ -1,38 +1,38 @@ ---- redis.conf.orig 2025-08-04 11:05:03 UTC +--- redis.conf.orig 2026-05-25 09:26:50 UTC +++ redis.conf -@@ -307,7 +307,7 @@ tcp-keepalive 300 +@@ -324,7 +324,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 +@@ -356,7 +356,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 %%REDIS_RUNDIR%%/redis.pid # Specify the server verbosity level. # This can be one of: -@@ -353,7 +353,7 @@ loglevel notice +@@ -370,7 +370,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 %%REDIS_LOGDIR%%/redis.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. -@@ -513,7 +513,7 @@ rdb-del-sync-files no +@@ -530,7 +530,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 %%REDIS_DBDIR%%/ ################################# REPLICATION ################################# diff --git a/databases/redis/files/patch-src_Makefile b/databases/redis/files/patch-src_Makefile index 396ffc148099..1691eabbbabd 100644 --- a/databases/redis/files/patch-src_Makefile +++ b/databases/redis/files/patch-src_Makefile @@ -1,19 +1,19 @@ ---- src/Makefile.orig 2025-11-28 10:22:14 UTC +--- src/Makefile.orig 2026-05-25 09:26:50 UTC +++ src/Makefile -@@ -67,7 +67,7 @@ endif +@@ -69,7 +69,7 @@ endif STD+=-std=c99 endif -PREFIX?=/usr/local +PREFIX:=$(PREFIX) INSTALL_BIN=$(PREFIX)/bin INSTALL=install PKG_CONFIG?=pkg-config -@@ -150,7 +150,6 @@ FINAL_LIBS=-lm -lstdc++ +@@ -152,7 +152,6 @@ FINAL_LIBS=-lm FINAL_CFLAGS=$(STD) $(WARN) $(OPT) $(DEBUG) $(CFLAGS) $(REDIS_CFLAGS) FINAL_LDFLAGS=$(LDFLAGS) $(OPT) $(REDIS_LDFLAGS) $(DEBUG) - FINAL_LIBS=-lm -lstdc++ + FINAL_LIBS=-lm -DEBUG=-g -ggdb # Linux ARM32 needs -latomic at linking time ifneq (,$(findstring armv,$(uname_M))) diff --git a/databases/redis/files/redis.in b/databases/redis/files/redis.in index d18063c3a504..b35817164250 100644 --- a/databases/redis/files/redis.in +++ b/databases/redis/files/redis.in @@ -1,67 +1,73 @@ #!/bin/sh # PROVIDE: redis # REQUIRE: LOGIN # BEFORE: securelevel # KEYWORD: shutdown # Add the following line to /etc/rc.conf to enable `redis': # #redis_enable="YES" # # Define profiles here to run separate redis instances: # #redis_profiles="foo bar" # Script uses %%PREFIX%%/etc/redis-NAME.conf respectively. # For correct script working please update pidfile entries in # redis-NAME.conf files. . /etc/rc.subr name="redis" rcvar="${name}_enable" extra_commands="reload" command="%%PREFIX%%/bin/redis-server" pidfile="%%REDIS_RUNDIR%%/$name.pid" # read configuration and set defaults load_rc_config "$name" : ${redis_enable="NO"} : ${redis_user="%%REDIS_USER%%"} +: ${redis_group="%%REDIS_GROUP%%"} : ${redis_config="%%PREFIX%%/etc/$name.conf"} command_args="${redis_config}" required_files="${redis_config}" +start_precmd="${name}_prestart" _profile_exists() { for _p in ${redis_profiles}; do [ "${_p}" = "$1" ] && return 1; done return 0 } if [ $# -eq 2 ]; then _profile=$2 _profile_exists $_profile _exists=$? [ ${_exists} -ne 1 ] && { echo "`basename %%PREFIX%%/etc/rc.d/redis`: no '$2' in 'redis_profiles'" exit 1 }; echo "-- Profile: ${_profile} --" config_file="%%PREFIX%%/etc/${name}-${_profile}.conf" command_args="${config_file}" pidfile="%%REDIS_RUNDIR%%/${_profile}.pid" required_files="${config_file}" elif [ -n "${redis_profiles}" ]; then _swap=$*; shift; _profiles=$* _profiles=${_profiles:-${redis_profiles}} set -- ${_swap} for _profile in ${_profiles}; do %%PREFIX%%/etc/rc.d/redis $1 ${_profile} done exit 0 fi +redis_prestart() { + install -d -m 755 -o "${redis_user}" -g "${redis_group}" "${pidfile%/*}" +} + run_rc_command "$1"