1 # Buildsheet autogenerated by ravenadm tool -- Do not edit.
7 SDESC[standard]= Persistent key-value database with net interface
8 HOMEPAGE= https://redis.io/
12 SITES[main]= http://download.redis.io/releases/
13 DISTFILE[1]= redis-7.2.2.tar.gz:main
15 SPKGS[standard]= single
17 OPTIONS_AVAILABLE= none
18 OPTIONS_STANDARD= none
22 USERGROUP_SPKG= single
24 USES= cpe gmake execinfo
26 LICENSE= BSD3CLAUSE:single
27 LICENSE_FILE= BSD3CLAUSE:{{WRKSRC}}/COPYING
31 FPC_EQUIVALENT= databases/redis
37 SUB_FILES= pkg-message-single
39 CFLAGS= -Wno-implicit-fallthrough
42 VAR_OPSYS[linux]= LDFLAGS=-ldl
45 (cd ${WRKSRC}/src && \
46 ${INSTALL_PROGRAM} redis-benchmark redis-check-aof redis-check-rdb \
47 redis-cli redis-sentinel redis-server ${STAGEDIR}${PREFIX}/bin/)
48 ${INSTALL_DATA} ${WRKSRC}/redis.conf \
49 ${STAGEDIR}${PREFIX}/etc/redis.conf.sample
50 ${INSTALL_DATA} ${WRKSRC}/sentinel.conf \
51 ${STAGEDIR}${PREFIX}/etc/sentinel.conf.sample
52 ${MKDIR} ${STAGEDIR}/var/db/redis \
53 ${STAGEDIR}/var/run/redis \
54 ${STAGEDIR}/var/log/redis
56 [FILE:807:descriptions/desc.single]
57 Redis is an open source, advanced key-value store. It is often referred
58 to as a data structure server since keys can contain strings, hashes,
59 lists, sets and sorted sets.
61 You can run atomic operations on these types, like appending to a string;
62 incrementing the value in a hash; pushing to a list; computing set
63 intersection, union and difference; or getting the member with highest
64 ranking in a sorted set.
66 In order to achieve its outstanding performance, Redis works with an
67 in-memory dataset. Depending on your use case, you can persist it either
68 by dumping the dataset to disk every once in a while, or by appending each
71 Redis also supports trivial-to-setup master-slave replication, with very
72 fast non-blocking first synchronization, auto-reconnection on net split
77 ca999be08800edc6d265379c4c7aafad92f0ee400692e4e2d69829ab4b4c3d08 3384618 redis-7.2.2.tar.gz
80 [FILE:275:manifests/plist.single]
81 @sample etc/redis.conf.sample
89 @dir(redis,redis,) /var/db/redis
90 @dir(redis,redis,) /var/log/redis
91 @dir(redis,redis,) /var/run/redis
92 @sample(redis,redis,) etc/sentinel.conf.sample
95 [FILE:294:patches/patch-deps-linenoise-Makefile]
96 --- deps/linenoise/Makefile.orig 2023-10-18 07:44:10 UTC
97 +++ deps/linenoise/Makefile
104 R_CFLAGS= $(STD) $(WARN) $(OPT) $(DEBUG) $(CFLAGS)
105 R_LDFLAGS= $(LDFLAGS)
109 R_CC=$(CC) $(R_CFLAGS)
110 R_LD=$(CC) $(R_LDFLAGS)
113 [FILE:1542:patches/patch-deps_hiredis_Makefile]
114 --- deps/hiredis/Makefile.orig 2023-10-18 07:44:10 UTC
115 +++ deps/hiredis/Makefile
116 @@ -15,7 +15,7 @@ HIREDIS_PATCH=$(shell grep HIREDIS_PATCH
117 HIREDIS_SONAME=$(shell grep HIREDIS_SONAME hiredis.h | awk '{print $$3}')
119 # Installation related variables and target
122 INCLUDE_PATH?=include/hiredis
124 PKGCONF_PATH?=pkgconfig
125 @@ -38,9 +38,7 @@ export REDIS_TEST_CONFIG
126 # Fallback to gcc when $CC is not in $PATH.
127 CC:=$(shell sh -c 'type $${CC%% *} >/dev/null 2>/dev/null && echo $(CC) || echo gcc')
128 CXX:=$(shell sh -c 'type $${CXX%% *} >/dev/null 2>/dev/null && echo $(CXX) || echo g++')
130 WARNINGS=-Wall -Wextra -Werror -Wstrict-prototypes -Wwrite-strings -Wno-missing-field-initializers
131 -DEBUG_FLAGS?= -g -ggdb
132 REAL_CFLAGS=$(OPTIMIZATION) -fPIC $(CPPFLAGS) $(CFLAGS) $(WARNINGS) $(DEBUG_FLAGS) $(PLATFORM_FLAGS)
133 REAL_LDFLAGS=$(LDFLAGS)
135 @@ -134,6 +132,15 @@ ifeq ($(uname_S),SunOS)
136 DYLIB_MAKE_CMD=$(CC) $(SUN_SHARED_FLAG) -o $(DYLIBNAME) -h $(DYLIB_MINOR_NAME) $(LDFLAGS)
137 SSL_DYLIB_MAKE_CMD=$(CC) $(SUN_SHARED_FLAG) -o $(SSL_DYLIBNAME) -h $(SSL_DYLIB_MINOR_NAME) $(LDFLAGS) $(SSL_LDFLAGS)
139 +ifeq ($(uname_S),FreeBSD)
142 + LDFLAGS?=-L. -Wl,-rpath,.
143 + DYLIBNAME?=libhiredis.so
144 + DYLIB_MAKE_CMD?=$(CC) -o ${DYLIBNAME} ${OBJ}
145 + STLIBNAME?=libhiredis.a
146 + STLIB_MAKE_CMD?=ar rcs ${STLIBNAME} ${OBJ}
148 ifeq ($(uname_S),Darwin)
150 DYLIB_MINOR_NAME=$(LIBNAME).$(HIREDIS_SONAME).$(DYLIBSUFFIX)
153 [FILE:1472:patches/patch-redis.conf]
154 --- redis.conf.orig 2023-10-18 07:44:10 UTC
156 @@ -306,7 +306,7 @@ tcp-keepalive 300
157 # By default Redis does not run as a daemon. Use 'yes' if you need it.
158 # Note that Redis will write a pid file in /var/run/redis.pid when daemonized.
159 # When Redis is supervised by upstart or systemd, this parameter has no impact.
163 # If you run Redis from upstart or systemd, Redis can interact with your
164 # supervision tree. Options:
165 @@ -338,7 +338,7 @@ daemonize no
167 # Note that on modern Linux systems "/run/redis.pid" is more conforming
168 # and should be used instead.
169 -pidfile /var/run/redis_6379.pid
170 +pidfile /var/run/redis/redis.pid
172 # Specify the server verbosity level.
173 # This can be one of:
174 @@ -352,7 +352,7 @@ loglevel notice
175 # Specify the log file name. Also the empty string can be used to force
176 # Redis to log on the standard output. Note that if you use standard
177 # output for logging but daemonize, logs will be sent to /dev/null
179 +logfile /var/log/redis/redis.log
181 # To enable logging to the system logger, just set 'syslog-enabled' to yes,
182 # and optionally update the other syslog parameters to suit your needs.
183 @@ -507,7 +507,7 @@ rdb-del-sync-files no
184 # The Append Only File will also be created inside this directory.
186 # Note that you must specify a directory here, not a file name.
190 ################################# REPLICATION #################################
194 [FILE:275:patches/patch-src-lua_cjson.c]
195 --- deps/lua/src/lua_cjson.c.orig 2023-10-18 07:44:10 UTC
196 +++ deps/lua/src/lua_cjson.c
202 #include "../../../src/solarisfixes.h"
205 #ifndef CJSON_MODNAME
206 #define CJSON_MODNAME "cjson"
209 [FILE:665:patches/patch-src_Makefile]
210 --- src/Makefile.orig 2023-10-18 07:44:10 UTC
212 @@ -119,7 +119,6 @@ endif
213 FINAL_CFLAGS=$(STD) $(WARN) $(OPT) $(DEBUG) $(CFLAGS) $(REDIS_CFLAGS)
214 FINAL_LDFLAGS=$(LDFLAGS) $(REDIS_LDFLAGS) $(DEBUG)
218 # Linux ARM32 needs -latomic at linking time
219 ifneq (,$(findstring armv,$(uname_M)))
220 @@ -204,12 +203,16 @@ ifeq ($(uname_S),Haiku)
221 FINAL_LDFLAGS+= -lbsd -lnetwork
222 FINAL_LIBS+= -lpthread
224 +ifeq ($(uname_S),MidnightBSD)
225 + FINAL_LIBS+= -lpthread -lexecinfo
227 # All the other OSes (notably Linux)
228 FINAL_LDFLAGS+= -rdynamic
229 FINAL_LIBS+=-ldl -pthread -lrt
239 [FILE:483:patches/patch-src_mkreleasehdr.sh]
240 --- src/mkreleasehdr.sh.orig 2023-10-18 07:44:10 UTC
241 +++ src/mkreleasehdr.sh
244 -GIT_SHA1=`(git show-ref --head --hash=8 2> /dev/null || echo 00000000) | head -n1`
245 -GIT_DIRTY=`git diff --no-ext-diff 2> /dev/null | wc -l`
248 BUILD_ID=`uname -n`"-"`date +%s`
249 if [ -n "$SOURCE_DATE_EPOCH" ]; then
250 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)
253 [FILE:287:patches/patch-src_zmalloc.h]
254 --- src/zmalloc.h.orig 2023-10-18 07:44:10 UTC
257 defined(USE_MALLOC_USABLE_SIZE))
259 /* Includes for malloc_usable_size() */
261 +#if defined __FreeBSD__ || defined __DragonFly__
262 #include <malloc_np.h>
267 [FILE:209:files/pkg-message-single.in]
269 ===> CONFIGURATION NOTE:
271 To setup "redis" you need to edit the configuration file:
272 %%PREFIX%%/etc/redis.conf
274 To run redis from startup, add redis_enable="YES"
275 in your /etc/rc.conf.
278 [FILE:1528:files/redis.in]
284 # BEFORE: securelevel
287 # Add the following line to /etc/rc.conf to enable `redis':
291 # Define profiles here to run separate redis instances:
293 #redis_profiles="foo bar" # Script uses %%PREFIX%%/etc/redis-NAME.conf respectively.
294 # For correct script working please update pidfile entries in
295 # redis-NAME.conf files.
300 rcvar="${name}_enable"
302 extra_commands="reload"
304 command="%%PREFIX%%/bin/redis-server"
305 pidfile="/var/log/redis/$name.pid"
307 # read configuration and set defaults
308 load_rc_config "$name"
309 : ${redis_enable="NO"}
310 : ${redis_user="redis"}
311 : ${redis_config="%%PREFIX%%/etc/$name.conf"}
313 command_args="${redis_config}"
314 required_files="${redis_config}"
317 for _p in ${redis_profiles}; do
318 [ "${_p}" = "$1" ] && return 1;
323 if [ $# -eq 2 ]; then
325 _profile_exists $_profile
327 [ ${_exists} -ne 1 ] && {
328 echo "`basename %%PREFIX%%/etc/rc.d/redis`: no '$2' in 'redis_profiles'"
331 echo "-- Profile: ${_profile} --"
332 config_file="%%PREFIX%%/etc/${name}-${_profile}.conf"
333 command_args="${config_file}"
334 pidfile="/var/log/redis/${_profile}.pid"
335 required_files="${config_file}"
336 elif [ -n "${redis_profiles}" ]; then
337 _swap=$*; shift; _profiles=$*
338 _profiles=${_profiles:-${redis_profiles}}
340 for _profile in ${_profiles}; do
341 %%PREFIX%%/etc/rc.d/redis $1 ${_profile}
349 [FILE:847:files/sentinel.in]
355 # BEFORE: securelevel
358 # Add the following line to /etc/rc.conf to enable `sentinel':
360 #sentinel_enable="YES"
366 rcvar="${name}_enable"
368 command="/usr/local/bin/redis-sentinel"
369 pidfile="/var/run/redis/$name.pid"
371 # read configuration and set defaults
372 load_rc_config "$name"
373 : ${sentinel_enable="NO"}
374 : ${sentinel_user="redis"}
375 : ${sentinel_config="%%PREFIX%%/etc/$name.conf"}
377 command_args="${sentinel_config} --daemonize yes --pidfile ${pidfile}"
378 required_files="${sentinel_config}"
379 start_precmd="${name}_checks"
380 restart_precmd="${name}_checks"
384 if [ x`id -u ${sentinel_user}` != x`stat -f %u ${sentinel_config}` ]; then
385 err 1 "${sentinel_config} must be owned by user ${sentinel_user}"
392 [FILE:1026:sunos/patch-deps_hiredis_net.c]
393 This definitely breaks the build. Keep until it is sorted
395 --- deps/hiredis/net.c.orig 2021-07-21 18:06:49 UTC
396 +++ deps/hiredis/net.c
397 @@ -197,6 +197,27 @@ int redisKeepAlive(redisContext *c, int
398 __redisSetError(c,REDIS_ERR_OTHER,strerror(errno));
402 +#if !defined(__sun) && defined(TCP_KEEPIDLE) && defined(TCP_KEEPINTVL) && \
403 + defined(TCP_KEEPCNT)
405 + if (setsockopt(fd, IPPROTO_TCP, TCP_KEEPIDLE, &val, sizeof(val)) < 0) {
406 + __redisSetError(c,REDIS_ERR_OTHER,strerror(errno));
411 + if (val == 0) val = 1;
412 + if (setsockopt(fd, IPPROTO_TCP, TCP_KEEPINTVL, &val, sizeof(val)) < 0) {
413 + __redisSetError(c,REDIS_ERR_OTHER,strerror(errno));
418 + if (setsockopt(fd, IPPROTO_TCP, TCP_KEEPCNT, &val, sizeof(val)) < 0) {
419 + __redisSetError(c,REDIS_ERR_OTHER,strerror(errno));