Create Ravenports release 20231027.1
[ravenports.git] / bucket_B8 / redis
1 # Buildsheet autogenerated by ravenadm tool -- Do not edit.
2
3 NAMEBASE=               redis
4 VERSION=                7.2.2
5 KEYWORDS=               databases
6 VARIANTS=               standard
7 SDESC[standard]=        Persistent key-value database with net interface
8 HOMEPAGE=               https://redis.io/
9 CONTACT=                nobody
10
11 DOWNLOAD_GROUPS=        main
12 SITES[main]=            http://download.redis.io/releases/
13 DISTFILE[1]=            redis-7.2.2.tar.gz:main
14 DF_INDEX=               1
15 SPKGS[standard]=        single
16
17 OPTIONS_AVAILABLE=      none
18 OPTIONS_STANDARD=       none
19
20 USERS=                  redis
21 GROUPS=                 redis
22 USERGROUP_SPKG=         single
23
24 USES=                   cpe gmake execinfo
25
26 LICENSE=                BSD3CLAUSE:single
27 LICENSE_FILE=           BSD3CLAUSE:{{WRKSRC}}/COPYING
28 LICENSE_SCHEME=         solo
29
30 CPE_VENDOR=             redislabs
31 FPC_EQUIVALENT=         databases/redis
32
33 MAKE_ENV=               V=yo
34
35 RC_SUBR=                redis:single
36                         sentinel:single
37 SUB_FILES=              pkg-message-single
38
39 CFLAGS=                 -Wno-implicit-fallthrough
40 LDFLAGS=                -lm
41                         -lexecinfo
42 VAR_OPSYS[linux]=       LDFLAGS=-ldl
43
44 do-install:
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
55
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.
60
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.
65
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
69 command to a log.
70
71 Redis also supports trivial-to-setup master-slave replication, with very
72 fast non-blocking first synchronization, auto-reconnection on net split
73 and so forth.
74
75
76 [FILE:97:distinfo]
77 ca999be08800edc6d265379c4c7aafad92f0ee400692e4e2d69829ab4b4c3d08      3384618 redis-7.2.2.tar.gz
78
79
80 [FILE:275:manifests/plist.single]
81 @sample etc/redis.conf.sample
82 bin/
83  redis-benchmark
84  redis-check-aof
85  redis-check-rdb
86  redis-cli
87  redis-sentinel
88  redis-server
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
93
94
95 [FILE:294:patches/patch-deps-linenoise-Makefile]
96 --- deps/linenoise/Makefile.orig        2023-10-18 07:44:10 UTC
97 +++ deps/linenoise/Makefile
98 @@ -1,10 +1,10 @@
99  STD=
100  WARN= -Wall
101 -OPT= -Os
102 +#OPT= -Os
103  
104  R_CFLAGS= $(STD) $(WARN) $(OPT) $(DEBUG) $(CFLAGS)
105  R_LDFLAGS= $(LDFLAGS)
106 -DEBUG= -g
107 +#DEBUG= -g
108  
109  R_CC=$(CC) $(R_CFLAGS)
110  R_LD=$(CC) $(R_LDFLAGS)
111
112
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}')
118  
119  # Installation related variables and target
120 -PREFIX?=/usr/local
121 +PREFIX?=${PREFIX}
122  INCLUDE_PATH?=include/hiredis
123  LIBRARY_PATH?=lib
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++')
129 -OPTIMIZATION?=-O3
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)
134  
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)
138  endif
139 +ifeq ($(uname_S),FreeBSD)
140 +  CFLAGS?=$(CFLAGS)
141 +  CCLINK?=-pthread
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}
147 +endif
148  ifeq ($(uname_S),Darwin)
149    DYLIBSUFFIX=dylib
150    DYLIB_MINOR_NAME=$(LIBNAME).$(HIREDIS_SONAME).$(DYLIBSUFFIX)
151
152
153 [FILE:1472:patches/patch-redis.conf]
154 --- redis.conf.orig     2023-10-18 07:44:10 UTC
155 +++ redis.conf
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.
160 -daemonize no
161 +daemonize yes
162  
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
166  #
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
171  
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
178 -logfile ""
179 +logfile /var/log/redis/redis.log
180  
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.
185  #
186  # Note that you must specify a directory here, not a file name.
187 -dir ./
188 +dir /var/db/redis/
189  
190  ################################# REPLICATION #################################
191  
192
193
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
197 @@ -47,7 +47,9 @@
198  #include "strbuf.h"
199  #include "fpconv.h"
200  
201 +#if defined(__sun)
202  #include "../../../src/solarisfixes.h"
203 +#endif
204  
205  #ifndef CJSON_MODNAME
206  #define CJSON_MODNAME   "cjson"
207
208
209 [FILE:665:patches/patch-src_Makefile]
210 --- src/Makefile.orig   2023-10-18 07:44:10 UTC
211 +++ src/Makefile
212 @@ -119,7 +119,6 @@ endif
213  FINAL_CFLAGS=$(STD) $(WARN) $(OPT) $(DEBUG) $(CFLAGS) $(REDIS_CFLAGS)
214  FINAL_LDFLAGS=$(LDFLAGS) $(REDIS_LDFLAGS) $(DEBUG)
215  FINAL_LIBS=-lm
216 -DEBUG=-g -ggdb
217  
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
223  else
224 +ifeq ($(uname_S),MidnightBSD)
225 +       FINAL_LIBS+= -lpthread -lexecinfo
226 +else
227         # All the other OSes (notably Linux)
228         FINAL_LDFLAGS+= -rdynamic
229         FINAL_LIBS+=-ldl -pthread -lrt
230  endif
231  endif
232  endif
233 +endif
234  endif
235  endif
236  endif
237
238
239 [FILE:483:patches/patch-src_mkreleasehdr.sh]
240 --- src/mkreleasehdr.sh.orig    2023-10-18 07:44:10 UTC
241 +++ src/mkreleasehdr.sh
242 @@ -1,6 +1,6 @@
243  #!/bin/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`
246 +GIT_SHA1="00000000"
247 +GIT_DIRTY="0"
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)
251
252
253 [FILE:287:patches/patch-src_zmalloc.h]
254 --- src/zmalloc.h.orig  2023-10-18 07:44:10 UTC
255 +++ src/zmalloc.h
256 @@ -78,7 +78,7 @@
257       defined(USE_MALLOC_USABLE_SIZE))
258  
259  /* Includes for malloc_usable_size() */
260 -#ifdef __FreeBSD__
261 +#if defined __FreeBSD__ || defined __DragonFly__
262  #include <malloc_np.h>
263  #else
264  #ifndef _GNU_SOURCE
265
266
267 [FILE:209:files/pkg-message-single.in]
268
269 ===>  CONFIGURATION NOTE:
270
271       To setup "redis" you need to edit the configuration file:
272       %%PREFIX%%/etc/redis.conf
273
274       To run redis from startup, add redis_enable="YES"
275       in your /etc/rc.conf.
276
277
278 [FILE:1528:files/redis.in]
279 #!/bin/sh
280 #
281
282 # PROVIDE: redis
283 # REQUIRE: LOGIN
284 # BEFORE:  securelevel
285 # KEYWORD: shutdown
286
287 # Add the following line to /etc/rc.conf to enable `redis':
288 #
289 #redis_enable="YES"
290 #
291 # Define profiles here to run separate redis instances:
292 #
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.
296
297 . /etc/rc.subr
298
299 name="redis"
300 rcvar="${name}_enable"
301
302 extra_commands="reload"
303
304 command="%%PREFIX%%/bin/redis-server"
305 pidfile="/var/log/redis/$name.pid"
306
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"}
312
313 command_args="${redis_config}"
314 required_files="${redis_config}"
315
316 _profile_exists() {
317         for _p in ${redis_profiles}; do
318                 [ "${_p}" = "$1" ] && return 1;
319         done
320         return 0
321 }
322
323 if [ $# -eq 2 ]; then
324         _profile=$2
325         _profile_exists $_profile
326         _exists=$?
327         [ ${_exists} -ne 1 ] && {
328                 echo "`basename %%PREFIX%%/etc/rc.d/redis`: no '$2' in 'redis_profiles'"
329                 exit 1
330         };
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}}
339         set -- ${_swap}
340         for _profile in ${_profiles}; do
341                 %%PREFIX%%/etc/rc.d/redis $1 ${_profile}
342         done
343         exit 0
344 fi
345
346 run_rc_command "$1"
347
348
349 [FILE:847:files/sentinel.in]
350 #!/bin/sh
351 #
352
353 # PROVIDE: sentinel
354 # REQUIRE: LOGIN
355 # BEFORE:  securelevel
356 # KEYWORD: shutdown
357
358 # Add the following line to /etc/rc.conf to enable `sentinel':
359 #
360 #sentinel_enable="YES"
361 #
362
363 . /etc/rc.subr
364
365 name="sentinel"
366 rcvar="${name}_enable"
367
368 command="/usr/local/bin/redis-sentinel"
369 pidfile="/var/run/redis/$name.pid"
370
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"}
376
377 command_args="${sentinel_config} --daemonize yes --pidfile ${pidfile}"
378 required_files="${sentinel_config}"
379 start_precmd="${name}_checks"
380 restart_precmd="${name}_checks"
381
382 sentinel_checks()
383 {
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}"
386     fi
387 }
388
389 run_rc_command "$1"
390
391
392 [FILE:1026:sunos/patch-deps_hiredis_net.c]
393 This definitely breaks the build.  Keep until it is sorted
394
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));
399          return REDIS_ERR;
400      }
401 +#else
402 +#if !defined(__sun) && defined(TCP_KEEPIDLE) && defined(TCP_KEEPINTVL) && \
403 +    defined(TCP_KEEPCNT)
404 +    val = interval;
405 +    if (setsockopt(fd, IPPROTO_TCP, TCP_KEEPIDLE, &val, sizeof(val)) < 0) {
406 +        __redisSetError(c,REDIS_ERR_OTHER,strerror(errno));
407 +        return REDIS_ERR;
408 +    }
409
410 +    val = interval/3;
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));
414 +        return REDIS_ERR;
415 +    }
416 +
417 +    val = 3;
418 +    if (setsockopt(fd, IPPROTO_TCP, TCP_KEEPCNT, &val, sizeof(val)) < 0) {
419 +        __redisSetError(c,REDIS_ERR_OTHER,strerror(errno));
420 +        return REDIS_ERR;
421 +    }
422  #endif
423  #endif
424  
425