# Buildsheet autogenerated by ravenadm tool -- Do not edit. NAMEBASE= redis VERSION= 7.2.4 KEYWORDS= databases VARIANTS= standard SDESC[standard]= Persistent key-value database with net interface HOMEPAGE= https://redis.io/ CONTACT= nobody DOWNLOAD_GROUPS= main SITES[main]= http://download.redis.io/releases/ DISTFILE[1]= redis-7.2.4.tar.gz:main DF_INDEX= 1 SPKGS[standard]= single OPTIONS_AVAILABLE= none OPTIONS_STANDARD= none USERS= redis GROUPS= redis USERGROUP_SPKG= single USES= cpe gmake execinfo LICENSE= BSD3CLAUSE:single LICENSE_FILE= BSD3CLAUSE:{{WRKSRC}}/COPYING LICENSE_SCHEME= solo CPE_VENDOR= redislabs FPC_EQUIVALENT= databases/redis MAKE_ENV= V=yo RC_SUBR= redis:single sentinel:single SUB_FILES= pkg-message-single CFLAGS= -Wno-implicit-fallthrough LDFLAGS= -lm -lexecinfo VAR_OPSYS[linux]= LDFLAGS=-ldl do-install: (cd ${WRKSRC}/src && \ ${INSTALL_PROGRAM} redis-benchmark redis-check-aof redis-check-rdb \ redis-cli redis-sentinel redis-server ${STAGEDIR}${PREFIX}/bin/) ${INSTALL_DATA} ${WRKSRC}/redis.conf \ ${STAGEDIR}${PREFIX}/etc/redis.conf.sample ${INSTALL_DATA} ${WRKSRC}/sentinel.conf \ ${STAGEDIR}${PREFIX}/etc/sentinel.conf.sample ${MKDIR} ${STAGEDIR}/var/db/redis \ ${STAGEDIR}/var/run/redis \ ${STAGEDIR}/var/log/redis [FILE:807:descriptions/desc.single] Redis is an open source, advanced key-value store. It is often referred to as a data structure server since keys can contain strings, hashes, lists, sets and sorted sets. You can run atomic operations on these types, like appending to a string; incrementing the value in a hash; pushing to a list; computing set intersection, union and difference; or getting the member with highest ranking in a sorted set. In order to achieve its outstanding performance, Redis works with an in-memory dataset. Depending on your use case, you can persist it either by dumping the dataset to disk every once in a while, or by appending each command to a log. Redis also supports trivial-to-setup master-slave replication, with very fast non-blocking first synchronization, auto-reconnection on net split and so forth. [FILE:97:distinfo] 8d104c26a154b29fd67d6568b4f375212212ad41e0c2caa3d66480e78dbd3b59 3386861 redis-7.2.4.tar.gz [FILE:275:manifests/plist.single] @sample etc/redis.conf.sample bin/ redis-benchmark redis-check-aof redis-check-rdb redis-cli redis-sentinel redis-server @dir(redis,redis,) /var/db/redis @dir(redis,redis,) /var/log/redis @dir(redis,redis,) /var/run/redis @sample(redis,redis,) etc/sentinel.conf.sample [FILE:294:patches/patch-deps-linenoise-Makefile] --- deps/linenoise/Makefile.orig 2024-01-09 11:51:49 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) [FILE:1542:patches/patch-deps_hiredis_Makefile] --- deps/hiredis/Makefile.orig 2024-01-09 11:51:49 UTC +++ deps/hiredis/Makefile @@ -15,7 +15,7 @@ HIREDIS_PATCH=$(shell grep HIREDIS_PATCH 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,9 +38,7 @@ 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_LDFLAGS=$(LDFLAGS) @@ -134,6 +132,15 @@ ifeq ($(uname_S),SunOS) DYLIB_MAKE_CMD=$(CC) $(SUN_SHARED_FLAG) -o $(DYLIBNAME) -h $(DYLIB_MINOR_NAME) $(LDFLAGS) SSL_DYLIB_MAKE_CMD=$(CC) $(SUN_SHARED_FLAG) -o $(SSL_DYLIBNAME) -h $(SSL_DYLIB_MINOR_NAME) $(LDFLAGS) $(SSL_LDFLAGS) 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} +endif ifeq ($(uname_S),Darwin) DYLIBSUFFIX=dylib DYLIB_MINOR_NAME=$(LIBNAME).$(HIREDIS_SONAME).$(DYLIBSUFFIX) [FILE:1472:patches/patch-redis.conf] --- redis.conf.orig 2024-01-09 11:51:49 UTC +++ redis.conf @@ -306,7 +306,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: @@ -338,7 +338,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 /var/run/redis/redis.pid # Specify the server verbosity level. # This can be one of: @@ -352,7 +352,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 /var/log/redis/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. @@ -507,7 +507,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 /var/db/redis/ ################################# REPLICATION ################################# [FILE:275:patches/patch-src-lua_cjson.c] --- deps/lua/src/lua_cjson.c.orig 2024-01-09 11:51:49 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" [FILE:665:patches/patch-src_Makefile] --- src/Makefile.orig 2024-01-09 11:51:49 UTC +++ src/Makefile @@ -119,7 +119,6 @@ endif FINAL_CFLAGS=$(STD) $(WARN) $(OPT) $(DEBUG) $(CFLAGS) $(REDIS_CFLAGS) FINAL_LDFLAGS=$(LDFLAGS) $(REDIS_LDFLAGS) $(DEBUG) FINAL_LIBS=-lm -DEBUG=-g -ggdb # Linux ARM32 needs -latomic at linking time ifneq (,$(findstring armv,$(uname_M))) @@ -204,12 +203,16 @@ ifeq ($(uname_S),Haiku) FINAL_LDFLAGS+= -lbsd -lnetwork FINAL_LIBS+= -lpthread else +ifeq ($(uname_S),MidnightBSD) + FINAL_LIBS+= -lpthread -lexecinfo +else # All the other OSes (notably Linux) FINAL_LDFLAGS+= -rdynamic FINAL_LIBS+=-ldl -pthread -lrt endif endif endif +endif endif endif endif [FILE:483:patches/patch-src_mkreleasehdr.sh] --- src/mkreleasehdr.sh.orig 2024-01-09 11:51:49 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 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) [FILE:287:patches/patch-src_zmalloc.h] --- src/zmalloc.h.orig 2024-01-09 11:51:49 UTC +++ src/zmalloc.h @@ -78,7 +78,7 @@ defined(USE_MALLOC_USABLE_SIZE)) /* Includes for malloc_usable_size() */ -#ifdef __FreeBSD__ +#if defined __FreeBSD__ || defined __DragonFly__ #include #else #ifndef _GNU_SOURCE [FILE:209:files/pkg-message-single.in] ===> CONFIGURATION NOTE: To setup "redis" you need to edit the configuration file: %%PREFIX%%/etc/redis.conf To run redis from startup, add redis_enable="YES" in your /etc/rc.conf. [FILE:1528:files/redis.in] #!/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="/var/log/redis/$name.pid" # read configuration and set defaults load_rc_config "$name" : ${redis_enable="NO"} : ${redis_user="redis"} : ${redis_config="%%PREFIX%%/etc/$name.conf"} command_args="${redis_config}" required_files="${redis_config}" _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="/var/log/redis/${_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 run_rc_command "$1" [FILE:847:files/sentinel.in] #!/bin/sh # # PROVIDE: sentinel # REQUIRE: LOGIN # BEFORE: securelevel # KEYWORD: shutdown # Add the following line to /etc/rc.conf to enable `sentinel': # #sentinel_enable="YES" # . /etc/rc.subr name="sentinel" rcvar="${name}_enable" command="/usr/local/bin/redis-sentinel" pidfile="/var/run/redis/$name.pid" # read configuration and set defaults load_rc_config "$name" : ${sentinel_enable="NO"} : ${sentinel_user="redis"} : ${sentinel_config="%%PREFIX%%/etc/$name.conf"} command_args="${sentinel_config} --daemonize yes --pidfile ${pidfile}" required_files="${sentinel_config}" start_precmd="${name}_checks" restart_precmd="${name}_checks" sentinel_checks() { if [ x`id -u ${sentinel_user}` != x`stat -f %u ${sentinel_config}` ]; then err 1 "${sentinel_config} must be owned by user ${sentinel_user}" fi } run_rc_command "$1" [FILE:1026:sunos/patch-deps_hiredis_net.c] This definitely breaks the build. Keep until it is sorted --- deps/hiredis/net.c.orig 2021-07-21 18:06:49 UTC +++ deps/hiredis/net.c @@ -197,6 +197,27 @@ int redisKeepAlive(redisContext *c, int __redisSetError(c,REDIS_ERR_OTHER,strerror(errno)); return REDIS_ERR; } +#else +#if !defined(__sun) && defined(TCP_KEEPIDLE) && defined(TCP_KEEPINTVL) && \ + 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 = 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; + } #endif #endif