From nobody Thu Aug 17 03:36:51 2023 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RR9fW5DqRz4q6d0; Thu, 17 Aug 2023 03:36:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RR9fW4vlcz3Gwd; Thu, 17 Aug 2023 03:36:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1692243411; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GKrxY0sMXTF9uvdWvLfDnQqiIqCsdsimK38wX9cM/d8=; b=SsiIfgPnockn9rR3BOEUnSZ8jEngzXMouIhcu3DTWL+2VYa+3EfD/P+Vd9NAGMHdUcD1LR VC+GXawHnr8W9OztHzycie2kK1j2l7G6ip44MMOj4Q4RLKvy+A893MqW0dYP3ProrV0px2 IrEkHtQiEuPQUa7axtmSnBIKuUZcW+3NdA9vnBy/DiyQBLtFCOo6ulRHvEmEoLHG0F2HQO LC/juJRrbVhwya9XMnPz3ZLmeK77W/D7uab+rNtEUAfXPew0gwfg/evcDiY1g8xxiljVUj YQDeeyAeEohHhvky+PrntOhM5YTACmHP4xmVuNvpxUzyB0JVe/5LvnCguM9cpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1692243411; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GKrxY0sMXTF9uvdWvLfDnQqiIqCsdsimK38wX9cM/d8=; b=x09qfzKekZpv4OcGJ5iiJQbeYGLsqc4cdZ0oftIRXXCz4NZ2pGP5DUKM4NYiBB0DP7ZN+J xsTZLgiyvw0dEKhOF6cTcZJp0bY86JQIrtmAYiffgvB+Kkouh1W+ur+78RgsTAtPbkJkje rm4GHzJjLG7jUOK5SLKLhyr7Vly9dGC4Hg9ggAL47RRTLERejUW3Km1rS1gwH7vKTcpdJ8 xLv18iiys8ExKNWyvj4Qqon94sMqZiiJcnuNLxXBhekLT716+RPD9UPW6Jj7Lu4NaYt1uv eEpahFjQY64Dpnz8ccNxrVJpS2rBA4AgyLAjJahM7bR9BuGpubJnuMQUI6LsYQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1692243411; a=rsa-sha256; cv=none; b=H9OfWjCUEo9WPWDtEdxxTTzJ//MCzyMJsYNZs1g9nvRKQZ2HJt1uTeBbpc5JQQPVGrvJ+G mG0QSSodt35Pc+BgvEzBwyW1JLl6F9nEzls/uHjz2/3EmmB8ZyDwRHTi9xo5CJJcc3kKjA nihhDNEVJyVdaBrOZybwNcU6w9AqnXbMZP/iAjSNTBNubjVV5JgA5KAQWEmngsUZNH24JD p6ryBso31DuUW5HEj03WTo4zicj+VaY9FqNWuytqpM3hRc6NPqtDOo0YPIjnR9i+aMYKkd QPuMXPL23zwo73TGe66tEd5SGdhEJ9TfyiTNWQQgnVk4dXflwt3xEjoWaAb6/w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RR9fW3xt3z3hd; Thu, 17 Aug 2023 03:36:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 37H3apWS045602; Thu, 17 Aug 2023 03:36:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 37H3apFV045599; Thu, 17 Aug 2023 03:36:51 GMT (envelope-from git) Date: Thu, 17 Aug 2023 03:36:51 GMT Message-Id: <202308170336.37H3apFV045599@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Yasuhiro Kimura Subject: git: cc255110778d - main - databases/redis70: Copy from databases/redis List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: yasu X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cc255110778d9e5dacb9a878f62022a43c1689a9 Auto-Submitted: auto-generated The branch main has been updated by yasu: URL: https://cgit.FreeBSD.org/ports/commit/?id=cc255110778d9e5dacb9a878f62022a43c1689a9 commit cc255110778d9e5dacb9a878f62022a43c1689a9 Author: Yasuhiro Kimura AuthorDate: 2023-03-23 07:59:09 +0000 Commit: Yasuhiro Kimura CommitDate: 2023-08-17 03:29:02 +0000 databases/redis70: Copy from databases/redis Copy databases/redis to databases/redis70 as preparation for updating the former to 7.2. --- databases/Makefile | 1 + databases/redis70/Makefile | 129 +++++++++++++++++++++ databases/redis70/distinfo | 3 + .../files/extra-patch-deps_lua_src_lua__cjson.c | 11 ++ .../redis70/files/extra-patch-src-Makefile.lua | 58 +++++++++ .../redis70/files/extra-patch-src-Makefile.luajit | 58 +++++++++ .../files/extra-patch-src-Makefile.luajit-or | 58 +++++++++ .../redis70/files/extra-patch-src-function_lua.c | 13 +++ databases/redis70/files/patch-deps-Makefile | 30 +++++ .../redis70/files/patch-deps-hiredis-Makefile | 41 +++++++ databases/redis70/files/patch-deps-hiredis-net.c | 39 +++++++ .../redis70/files/patch-deps-linenoise-Makefile | 15 +++ .../redis70/files/patch-deps_lua_src_lua__cjson.c | 12 ++ databases/redis70/files/patch-redis.conf | 38 ++++++ databases/redis70/files/patch-src-Makefile | 39 +++++++ databases/redis70/files/patch-src-mkreleasehdr.sh | 11 ++ databases/redis70/files/pkg-message.in | 11 ++ databases/redis70/files/redis.in | 67 +++++++++++ databases/redis70/files/sentinel.in | 39 +++++++ databases/redis70/pkg-descr | 17 +++ databases/redis70/pkg-plist | 12 ++ 21 files changed, 702 insertions(+) diff --git a/databases/Makefile b/databases/Makefile index 177b7a4298df..e3a82f4c95f6 100644 --- a/databases/Makefile +++ b/databases/Makefile @@ -863,6 +863,7 @@ SUBDIR += redis-devel SUBDIR += redis6 SUBDIR += redis62 + SUBDIR += redis70 SUBDIR += redis_exporter SUBDIR += redisdesktopmanager SUBDIR += redisjson diff --git a/databases/redis70/Makefile b/databases/redis70/Makefile new file mode 100644 index 000000000000..9434679082e3 --- /dev/null +++ b/databases/redis70/Makefile @@ -0,0 +1,129 @@ +PORTNAME= redis +DISTVERSION= 7.0.12 +CATEGORIES= databases +MASTER_SITES= https://download.redis.io/releases/ +PKGNAMESUFFIX= 70 + +MAINTAINER= yasu@FreeBSD.org +COMMENT= Persistent key-value database with built-in net interface +WWW= https://redis.io/ + +LICENSE= BSD3CLAUSE +LICENSE_FILE= ${WRKSRC}/COPYING + +USES+= compiler:c11 cpe gmake +CPE_VENDOR= redislabs + +MAKE_ENV= OPTIMIZATION= \ + V=yo + +CONFLICTS_INSTALL= redis redis-devel redis6 redis62 # etc/rc.d/redis + +PORTSCOUT= limit:^7\.0 + +OPTIONS_DEFINE= JEMALLOC TESTS TLS TRIB +OPTIONS_DEFAULT= TLS +OPTIONS_RADIO= EXTLUA +OPTIONS_RADIO_EXTLUA= LUA LUAJIT +OPTIONS_SUB= yes + +JEMALLOC_DESC= Use jemalloc +LUAJIT_DESC= Use luajit instead of builtin lua +LUA_DESC= Use lang/lua instead of builtin lua +TESTS_DESC= Install lang/tcl for redis unit tests +TLS_DESC= Use TLS (openssl req.) +TRIB_DESC= Install redis-trib.rb (lang/ruby req.) + +JEMALLOC_MAKE_ENV= USE_JEMALLOC=yes +LUAJIT_BROKEN= Fails to link +LUAJIT_USES= luajit +LUAJIT_VARS= _ADDFLAGS=true +LUA_BROKEN= Fails to link +LUA_USES= lua:51 +LUA_EXTRA_PATCHES= ${PATCHDIR}/extra-patch-src-Makefile.lua +LUA_VARS= _ADDFLAGS=true +TESTS_USES= tcl:build +TLS_USES= ssl +TLS_MAKE_ENV= BUILD_TLS=yes +TRIB_CATEGORIES= ruby +TRIB_RUN_DEPENDS= rubygem-redis>=2.2:databases/rubygem-redis +TRIB_USES= ruby + +.include + +.if ${ARCH} == i386 && !${CFLAGS:M-march=*} +# Needed for __atomic_fetch_add_8 +USE_GCC= yes +CFLAGS+= -march=i586 +.endif + +.if defined(_ADDFLAGS) +CFLAGS+= -fPIC +LDFLAGS+= -Wl,-E +.endif + +.if ${PORT_OPTIONS:MLUAJIT} +. if ${LUAJIT_VER} == luajit +EXTRA_PATCHES= ${PATCHDIR}/extra-patch-src-Makefile.luajit +. else +EXTRA_PATCHES= ${PATCHDIR}/extra-patch-src-Makefile.luajit-or \ + ${PATCHDIR}/extra-patch-src-function_lua.c \ + ${PATCHDIR}/extra-patch-deps_lua_src_lua__cjson.c +. endif +.endif + +LDFLAGS+= -lpthread -lm -lexecinfo + +CONFLICTS?= redis-devel-* redis6-* redis62-* + +USE_RC_SUBR= redis sentinel +BIN_FILES= redis-benchmark redis-check-aof redis-check-rdb redis-cli \ + redis-sentinel redis-server + +USERS= redis +GROUPS= redis + +REDIS_DBDIR?= /var/db/redis +REDIS_RUNDIR?= /var/run/redis +REDIS_LOGDIR?= /var/log/redis + +SUB_FILES= pkg-message +SUB_LIST+= PORTNAME=${PORTNAME} \ + REDIS_DBDIR=${REDIS_DBDIR} \ + REDIS_LOGDIR=${REDIS_LOGDIR} \ + REDIS_RUNDIR=${REDIS_RUNDIR} \ + REDIS_USER=${USERS} + +PLIST_SUB+= REDIS_DBDIR=${REDIS_DBDIR} \ + REDIS_GROUP=${GROUPS} \ + REDIS_LOGDIR=${REDIS_LOGDIR} \ + REDIS_RUNDIR=${REDIS_RUNDIR} \ + REDIS_USER=${USERS} + +post-patch-JEMALLOC-on: + @${REINPLACE_CMD} '35s!Linux!FreeBSD!g' ${WRKSRC}/src/Makefile + +post-patch-LUA-on: + @cd ${WRKSRC}/deps/lua/src && ${CP} fpconv.* lua_* strbuf.* ${WRKSRC}/src/ +post-patch-LUAJIT-on: post-patch-LUA-on +post-patch-LUAJITOR-on: post-patch-LUA-on + +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-install-TRIB-on: + ${INSTALL_SCRIPT} ${WRKSRC}/src/redis-trib.rb ${STAGEDIR}${PREFIX}/bin/ + +do-test: + @cd ${WRKSRC} && ${TCLSH} tests/test_helper.tcl + +.include diff --git a/databases/redis70/distinfo b/databases/redis70/distinfo new file mode 100644 index 000000000000..853aa457b04f --- /dev/null +++ b/databases/redis70/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1689004450 +SHA256 (redis-7.0.12.tar.gz) = 9dd83d5b278bb2bf0e39bfeb75c3e8170024edbaf11ba13b7037b2945cf48ab7 +SIZE (redis-7.0.12.tar.gz) = 2992216 diff --git a/databases/redis70/files/extra-patch-deps_lua_src_lua__cjson.c b/databases/redis70/files/extra-patch-deps_lua_src_lua__cjson.c new file mode 100644 index 000000000000..32e322d0d490 --- /dev/null +++ b/databases/redis70/files/extra-patch-deps_lua_src_lua__cjson.c @@ -0,0 +1,11 @@ +--- deps/lua/src/lua_cjson.c.orig 2019-12-08 12:56:31 UTC ++++ deps/lua/src/lua_cjson.c +@@ -1299,7 +1299,7 @@ + * + * luaL_setfuncs() is used to create a module table where the functions have + * json_config_t as their first upvalue. Code borrowed from Lua 5.2 source. */ +-static void luaL_setfuncs (lua_State *l, const luaL_Reg *reg, int nup) ++void luaL_setfuncs (lua_State *l, const luaL_Reg *reg, int nup) + { + int i; + diff --git a/databases/redis70/files/extra-patch-src-Makefile.lua b/databases/redis70/files/extra-patch-src-Makefile.lua new file mode 100644 index 000000000000..080bb4f8830b --- /dev/null +++ b/databases/redis70/files/extra-patch-src-Makefile.lua @@ -0,0 +1,58 @@ +--- src/Makefile.orig 2022-06-08 09:56:24 UTC ++++ src/Makefile +@@ -16,7 +16,7 @@ + uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not') + uname_M := $(shell sh -c 'uname -m 2>/dev/null || echo not') + OPTIMIZATION?=-O2 +-DEPENDENCY_TARGETS=hiredis linenoise lua hdr_histogram ++DEPENDENCY_TARGETS=hiredis linenoise hdr_histogram + NODEPS:=clean distclean + + # Default settings +@@ -115,8 +115,8 @@ + # Override default settings if possible + -include .make-settings + +-FINAL_CFLAGS=$(STD) $(WARN) $(OPT) $(DEBUG) $(CFLAGS) $(REDIS_CFLAGS) +-FINAL_LDFLAGS=$(LDFLAGS) $(REDIS_LDFLAGS) $(DEBUG) ++FINAL_CFLAGS=$(STD) $(WARN) $(OPT) $(DEBUG) $(CFLAGS) ++FINAL_LDFLAGS=$(LDFLAGS) $(DEBUG) + FINAL_LIBS=-lm + DEBUG=-g -ggdb + +@@ -222,7 +222,7 @@ + endif + + # Include paths to dependencies +-FINAL_CFLAGS+= -I../deps/hiredis -I../deps/linenoise -I../deps/lua/src -I../deps/hdr_histogram ++FINAL_CFLAGS+= -I../deps/hiredis -I../deps/linenoise -I../deps/hdr_histogram + + # Determine systemd support and/or build preference (defaulting to auto-detection) + BUILD_WITH_SYSTEMD=no +@@ -296,6 +296,9 @@ + endef + endif + ++FINAL_CFLAGS+=-I${PREFIX}/include/lua51 ++FINAL_LIBS+= -L${PREFIX}/lib -llua-5.1 ++ + REDIS_CC=$(QUIET_CC)$(CC) $(FINAL_CFLAGS) + REDIS_LD=$(QUIET_LINK)$(CC) $(FINAL_LDFLAGS) + REDIS_INSTALL=$(QUIET_INSTALL)$(INSTALL) +@@ -317,6 +320,7 @@ + REDIS_SERVER_NAME=redis-server$(PROG_SUFFIX) + REDIS_SENTINEL_NAME=redis-sentinel$(PROG_SUFFIX) + REDIS_SERVER_OBJ=adlist.o quicklist.o ae.o anet.o dict.o server.o sds.o zmalloc.o lzf_c.o lzf_d.o pqsort.o zipmap.o sha1.o ziplist.o release.o networking.o util.o object.o db.o replication.o rdb.o t_string.o t_list.o t_set.o t_zset.o t_hash.o config.o aof.o pubsub.o multi.o debug.o sort.o intset.o syncio.o cluster.o crc16.o endianconv.o slowlog.o eval.o bio.o rio.o rand.o memtest.o syscheck.o crcspeed.o crc64.o bitops.o sentinel.o notify.o setproctitle.o blocked.o hyperloglog.o latency.o sparkline.o redis-check-rdb.o redis-check-aof.o geo.o lazyfree.o module.o evict.o expire.o geohash.o geohash_helper.o childinfo.o defrag.o siphash.o rax.o t_stream.o listpack.o localtime.o lolwut.o lolwut5.o lolwut6.o acl.o tracking.o connection.o tls.o sha256.o timeout.o setcpuaffinity.o monotonic.o mt19937-64.o resp_parser.o call_reply.o script_lua.o script.o functions.o function_lua.o commands.o ++REDIS_SERVER_OBJ+=fpconv.o lua_bit.o lua_cjson.o lua_cmsgpack.o lua_struct.o strbuf.o + REDIS_CLI_NAME=redis-cli$(PROG_SUFFIX) + REDIS_CLI_OBJ=anet.o adlist.o dict.o redis-cli.o zmalloc.o release.o ae.o redisassert.o crcspeed.o crc64.o siphash.o crc16.o monotonic.o cli_common.o mt19937-64.o + REDIS_BENCHMARK_NAME=redis-benchmark$(PROG_SUFFIX) +@@ -371,7 +375,7 @@ + + # redis-server + $(REDIS_SERVER_NAME): $(REDIS_SERVER_OBJ) +- $(REDIS_LD) -o $@ $^ ../deps/hiredis/libhiredis.a ../deps/lua/src/liblua.a ../deps/hdr_histogram/libhdrhistogram.a $(FINAL_LIBS) ++ $(REDIS_LD) -o $@ $^ ../deps/hiredis/libhiredis.a ../deps/hdr_histogram/libhdrhistogram.a $(FINAL_LIBS) + + # redis-sentinel + $(REDIS_SENTINEL_NAME): $(REDIS_SERVER_NAME) diff --git a/databases/redis70/files/extra-patch-src-Makefile.luajit b/databases/redis70/files/extra-patch-src-Makefile.luajit new file mode 100644 index 000000000000..590a6c35eaf6 --- /dev/null +++ b/databases/redis70/files/extra-patch-src-Makefile.luajit @@ -0,0 +1,58 @@ +--- src/Makefile.orig 2022-06-08 09:56:24 UTC ++++ src/Makefile +@@ -16,7 +16,7 @@ + uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not') + uname_M := $(shell sh -c 'uname -m 2>/dev/null || echo not') + OPTIMIZATION?=-O2 +-DEPENDENCY_TARGETS=hiredis linenoise lua hdr_histogram ++DEPENDENCY_TARGETS=hiredis linenoise hdr_histogram + NODEPS:=clean distclean + + # Default settings +@@ -115,8 +115,8 @@ + # Override default settings if possible + -include .make-settings + +-FINAL_CFLAGS=$(STD) $(WARN) $(OPT) $(DEBUG) $(CFLAGS) $(REDIS_CFLAGS) +-FINAL_LDFLAGS=$(LDFLAGS) $(REDIS_LDFLAGS) $(DEBUG) ++FINAL_CFLAGS=$(STD) $(WARN) $(OPT) $(DEBUG) $(CFLAGS) ++FINAL_LDFLAGS=$(LDFLAGS) $(DEBUG) + FINAL_LIBS=-lm + DEBUG=-g -ggdb + +@@ -222,7 +222,7 @@ + endif + + # Include paths to dependencies +-FINAL_CFLAGS+= -I../deps/hiredis -I../deps/linenoise -I../deps/lua/src -I../deps/hdr_histogram ++FINAL_CFLAGS+= -I../deps/hiredis -I../deps/linenoise -I../deps/hdr_histogram + + # Determine systemd support and/or build preference (defaulting to auto-detection) + BUILD_WITH_SYSTEMD=no +@@ -296,6 +296,9 @@ + endef + endif + ++FINAL_CFLAGS+=-I${PREFIX}/include/luajit-2.0 ++FINAL_LIBS+= -L${PREFIX}/lib -lluajit-5.1 ++ + REDIS_CC=$(QUIET_CC)$(CC) $(FINAL_CFLAGS) + REDIS_LD=$(QUIET_LINK)$(CC) $(FINAL_LDFLAGS) + REDIS_INSTALL=$(QUIET_INSTALL)$(INSTALL) +@@ -317,6 +320,7 @@ + REDIS_SERVER_NAME=redis-server$(PROG_SUFFIX) + REDIS_SENTINEL_NAME=redis-sentinel$(PROG_SUFFIX) + REDIS_SERVER_OBJ=adlist.o quicklist.o ae.o anet.o dict.o server.o sds.o zmalloc.o lzf_c.o lzf_d.o pqsort.o zipmap.o sha1.o ziplist.o release.o networking.o util.o object.o db.o replication.o rdb.o t_string.o t_list.o t_set.o t_zset.o t_hash.o config.o aof.o pubsub.o multi.o debug.o sort.o intset.o syncio.o cluster.o crc16.o endianconv.o slowlog.o eval.o bio.o rio.o rand.o memtest.o syscheck.o crcspeed.o crc64.o bitops.o sentinel.o notify.o setproctitle.o blocked.o hyperloglog.o latency.o sparkline.o redis-check-rdb.o redis-check-aof.o geo.o lazyfree.o module.o evict.o expire.o geohash.o geohash_helper.o childinfo.o defrag.o siphash.o rax.o t_stream.o listpack.o localtime.o lolwut.o lolwut5.o lolwut6.o acl.o tracking.o connection.o tls.o sha256.o timeout.o setcpuaffinity.o monotonic.o mt19937-64.o resp_parser.o call_reply.o script_lua.o script.o functions.o function_lua.o commands.o ++REDIS_SERVER_OBJ+=fpconv.o lua_bit.o lua_cjson.o lua_cmsgpack.o lua_struct.o strbuf.o + REDIS_CLI_NAME=redis-cli$(PROG_SUFFIX) + REDIS_CLI_OBJ=anet.o adlist.o dict.o redis-cli.o zmalloc.o release.o ae.o redisassert.o crcspeed.o crc64.o siphash.o crc16.o monotonic.o cli_common.o mt19937-64.o + REDIS_BENCHMARK_NAME=redis-benchmark$(PROG_SUFFIX) +@@ -371,7 +375,7 @@ + + # redis-server + $(REDIS_SERVER_NAME): $(REDIS_SERVER_OBJ) +- $(REDIS_LD) -o $@ $^ ../deps/hiredis/libhiredis.a ../deps/lua/src/liblua.a ../deps/hdr_histogram/libhdrhistogram.a $(FINAL_LIBS) ++ $(REDIS_LD) -o $@ $^ ../deps/hiredis/libhiredis.a ../deps/hdr_histogram/libhdrhistogram.a $(FINAL_LIBS) + + # redis-sentinel + $(REDIS_SENTINEL_NAME): $(REDIS_SERVER_NAME) diff --git a/databases/redis70/files/extra-patch-src-Makefile.luajit-or b/databases/redis70/files/extra-patch-src-Makefile.luajit-or new file mode 100644 index 000000000000..d1e161f1cb5a --- /dev/null +++ b/databases/redis70/files/extra-patch-src-Makefile.luajit-or @@ -0,0 +1,58 @@ +--- src/Makefile.orig 2022-06-08 09:56:24 UTC ++++ src/Makefile +@@ -16,7 +16,7 @@ + uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not') + uname_M := $(shell sh -c 'uname -m 2>/dev/null || echo not') + OPTIMIZATION?=-O2 +-DEPENDENCY_TARGETS=hiredis linenoise lua hdr_histogram ++DEPENDENCY_TARGETS=hiredis linenoise hdr_histogram + NODEPS:=clean distclean + + # Default settings +@@ -115,8 +115,8 @@ + # Override default settings if possible + -include .make-settings + +-FINAL_CFLAGS=$(STD) $(WARN) $(OPT) $(DEBUG) $(CFLAGS) $(REDIS_CFLAGS) +-FINAL_LDFLAGS=$(LDFLAGS) $(REDIS_LDFLAGS) $(DEBUG) ++FINAL_CFLAGS=$(STD) $(WARN) $(OPT) $(DEBUG) $(CFLAGS) ++FINAL_LDFLAGS=$(LDFLAGS) $(DEBUG) + FINAL_LIBS=-lm + DEBUG=-g -ggdb + +@@ -222,7 +222,7 @@ + endif + + # Include paths to dependencies +-FINAL_CFLAGS+= -I../deps/hiredis -I../deps/linenoise -I../deps/lua/src -I../deps/hdr_histogram ++FINAL_CFLAGS+= -I../deps/hiredis -I../deps/linenoise -I../deps/hdr_histogram + + # Determine systemd support and/or build preference (defaulting to auto-detection) + BUILD_WITH_SYSTEMD=no +@@ -296,6 +296,9 @@ + endef + endif + ++FINAL_CFLAGS+=-I${PREFIX}/include/luajit-2.1 ++FINAL_LIBS+= -L${PREFIX}/lib -lluajit-5.1 ++ + REDIS_CC=$(QUIET_CC)$(CC) $(FINAL_CFLAGS) + REDIS_LD=$(QUIET_LINK)$(CC) $(FINAL_LDFLAGS) + REDIS_INSTALL=$(QUIET_INSTALL)$(INSTALL) +@@ -317,6 +320,7 @@ + REDIS_SERVER_NAME=redis-server$(PROG_SUFFIX) + REDIS_SENTINEL_NAME=redis-sentinel$(PROG_SUFFIX) + REDIS_SERVER_OBJ=adlist.o quicklist.o ae.o anet.o dict.o server.o sds.o zmalloc.o lzf_c.o lzf_d.o pqsort.o zipmap.o sha1.o ziplist.o release.o networking.o util.o object.o db.o replication.o rdb.o t_string.o t_list.o t_set.o t_zset.o t_hash.o config.o aof.o pubsub.o multi.o debug.o sort.o intset.o syncio.o cluster.o crc16.o endianconv.o slowlog.o eval.o bio.o rio.o rand.o memtest.o syscheck.o crcspeed.o crc64.o bitops.o sentinel.o notify.o setproctitle.o blocked.o hyperloglog.o latency.o sparkline.o redis-check-rdb.o redis-check-aof.o geo.o lazyfree.o module.o evict.o expire.o geohash.o geohash_helper.o childinfo.o defrag.o siphash.o rax.o t_stream.o listpack.o localtime.o lolwut.o lolwut5.o lolwut6.o acl.o tracking.o connection.o tls.o sha256.o timeout.o setcpuaffinity.o monotonic.o mt19937-64.o resp_parser.o call_reply.o script_lua.o script.o functions.o function_lua.o commands.o ++REDIS_SERVER_OBJ+=fpconv.o lua_bit.o lua_cjson.o lua_cmsgpack.o lua_struct.o strbuf.o + REDIS_CLI_NAME=redis-cli$(PROG_SUFFIX) + REDIS_CLI_OBJ=anet.o adlist.o dict.o redis-cli.o zmalloc.o release.o ae.o redisassert.o crcspeed.o crc64.o siphash.o crc16.o monotonic.o cli_common.o mt19937-64.o + REDIS_BENCHMARK_NAME=redis-benchmark$(PROG_SUFFIX) +@@ -371,7 +375,7 @@ + + # redis-server + $(REDIS_SERVER_NAME): $(REDIS_SERVER_OBJ) +- $(REDIS_LD) -o $@ $^ ../deps/hiredis/libhiredis.a ../deps/lua/src/liblua.a ../deps/hdr_histogram/libhdrhistogram.a $(FINAL_LIBS) ++ $(REDIS_LD) -o $@ $^ ../deps/hiredis/libhiredis.a ../deps/hdr_histogram/libhdrhistogram.a $(FINAL_LIBS) + + # redis-sentinel + $(REDIS_SENTINEL_NAME): $(REDIS_SERVER_NAME) diff --git a/databases/redis70/files/extra-patch-src-function_lua.c b/databases/redis70/files/extra-patch-src-function_lua.c new file mode 100644 index 000000000000..29be5e28e8f5 --- /dev/null +++ b/databases/redis70/files/extra-patch-src-function_lua.c @@ -0,0 +1,13 @@ +--- src/function_lua.c.orig 2022-01-31 10:49:57 UTC ++++ src/function_lua.c +@@ -52,6 +52,10 @@ + #define LIBRARY_API_NAME "__LIBRARY_API__" + #define LOAD_TIMEOUT_MS 500 + ++#ifndef lua_unref ++#define lua_unref(L,ref) luaL_unref(L, LUA_REGISTRYINDEX, (ref)) ++#endif ++ + /* Lua engine ctx */ + typedef struct luaEngineCtx { + lua_State *lua; diff --git a/databases/redis70/files/patch-deps-Makefile b/databases/redis70/files/patch-deps-Makefile new file mode 100644 index 000000000000..21331efe7d8a --- /dev/null +++ b/databases/redis70/files/patch-deps-Makefile @@ -0,0 +1,30 @@ +--- deps/Makefile.orig 2021-12-01 15:06:05 UTC ++++ deps/Makefile +@@ -76,7 +76,7 @@ + ifeq ($(LUA_DEBUG),yes) + LUA_CFLAGS+= -O0 -g -DLUA_USE_APICHECK + else +- LUA_CFLAGS+= -O2 ++ LUA_CFLAGS+= + endif + # lua's Makefile defines AR="ar rcu", which is unusual, and makes it more + # challenging to cross-compile lua (and redis). These defines make it easier +@@ -90,7 +90,7 @@ + + .PHONY: lua + +-JEMALLOC_CFLAGS= -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops $(CFLAGS) ++JEMALLOC_CFLAGS= -std=gnu99 -Wall -pipe -funroll-loops $(CFLAGS) + JEMALLOC_LDFLAGS= $(LDFLAGS) + + ifneq ($(DEB_HOST_GNU_TYPE),) +@@ -99,7 +99,7 @@ + + jemalloc: .make-prerequisites + @printf '%b %b\n' $(MAKECOLOR)MAKE$(ENDCOLOR) $(BINCOLOR)$@$(ENDCOLOR) +- cd jemalloc && ./configure --with-version=5.2.1-0-g0 --with-lg-quantum=3 --with-jemalloc-prefix=je_ CFLAGS="$(JEMALLOC_CFLAGS)" LDFLAGS="$(JEMALLOC_LDFLAGS)" $(JEMALLOC_CONFIGURE_OPTS) +- cd jemalloc && $(MAKE) CFLAGS="$(JEMALLOC_CFLAGS)" LDFLAGS="$(JEMALLOC_LDFLAGS)" lib/libjemalloc.a ++ cd jemalloc && ./configure --with-version=5.2.1-0-g0 --with-lg-quantum=3 --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/redis70/files/patch-deps-hiredis-Makefile b/databases/redis70/files/patch-deps-hiredis-Makefile new file mode 100644 index 000000000000..aec6b29a7b2e --- /dev/null +++ b/databases/redis70/files/patch-deps-hiredis-Makefile @@ -0,0 +1,41 @@ +--- deps/hiredis/Makefile.orig 2021-01-12 14:21:03 UTC ++++ deps/hiredis/Makefile +@@ -21,7 +21,7 @@ + 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 +@@ -44,10 +44,8 @@ + # 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 -W -Wstrict-prototypes -Wwrite-strings -Wno-missing-field-initializers +-DEBUG_FLAGS?= -g -ggdb +-REAL_CFLAGS=$(OPTIMIZATION) -fPIC $(CPPFLAGS) $(CFLAGS) $(WARNINGS) $(DEBUG_FLAGS) ++REAL_CFLAGS=$(OPTIMIZATION) -fPIC $(CFLAGS) $(WARNINGS) $(DEBUG_FLAGS) + REAL_LDFLAGS=$(LDFLAGS) + + DYLIBSUFFIX=so +@@ -83,7 +81,16 @@ + CFLAGS+=-I$(OPENSSL_PREFIX)/include + SSL_LDFLAGS+=-L$(OPENSSL_PREFIX)/lib -lssl -lcrypto + 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} ++ SSL_LDFLAGS+=${OPENSSL_LDFLAGS} ++endif + ifeq ($(uname_S),SunOS) + IS_SUN_CC=$(shell sh -c '$(CC) -V 2>&1 |egrep -i -c "sun|studio"') + ifeq ($(IS_SUN_CC),1) diff --git a/databases/redis70/files/patch-deps-hiredis-net.c b/databases/redis70/files/patch-deps-hiredis-net.c new file mode 100644 index 000000000000..0dfde3135238 --- /dev/null +++ b/databases/redis70/files/patch-deps-hiredis-net.c @@ -0,0 +1,39 @@ +--- deps/hiredis/net.c.orig 2019-11-28 19:32:05 UTC ++++ deps/hiredis/net.c +@@ -178,14 +178,34 @@ + __redisSetError(c,REDIS_ERR_OTHER,strerror(errno)); + return REDIS_ERR; + } +-#else +-#if defined(__GLIBC__) && !defined(__FreeBSD_kernel__) ++#elif defined(__GLIBC__) + 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; ++ } ++#else ++#if !defined(__sun) && defined(TCP_KEEPIDLE) && defined(TCP_KEEPINTL) && \ ++ 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 = internal/3; + if (val == 0) val = 1; + if (setsockopt(fd, IPPROTO_TCP, TCP_KEEPINTVL, &val, sizeof(val)) < 0) { + __redisSetError(c,REDIS_ERR_OTHER,strerror(errno)); diff --git a/databases/redis70/files/patch-deps-linenoise-Makefile b/databases/redis70/files/patch-deps-linenoise-Makefile new file mode 100644 index 000000000000..aef0f10966af --- /dev/null +++ b/databases/redis70/files/patch-deps-linenoise-Makefile @@ -0,0 +1,15 @@ +--- deps/linenoise/Makefile.orig 2019-09-25 10:40:18 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) diff --git a/databases/redis70/files/patch-deps_lua_src_lua__cjson.c b/databases/redis70/files/patch-deps_lua_src_lua__cjson.c new file mode 100644 index 000000000000..0bb150504c67 --- /dev/null +++ b/databases/redis70/files/patch-deps_lua_src_lua__cjson.c @@ -0,0 +1,12 @@ +--- deps/lua/src/lua_cjson.c.orig 2019-09-25 10:40:18 UTC ++++ deps/lua/src/lua_cjson.c +@@ -46,7 +46,9 @@ + #include "strbuf.h" + #include "fpconv.h" + ++#if defined(__sun) + #include "../../../src/solarisfixes.h" ++#endif + + #ifndef CJSON_MODNAME + #define CJSON_MODNAME "cjson" diff --git a/databases/redis70/files/patch-redis.conf b/databases/redis70/files/patch-redis.conf new file mode 100644 index 000000000000..b653f89a3211 --- /dev/null +++ b/databases/redis70/files/patch-redis.conf @@ -0,0 +1,38 @@ +--- redis.conf.orig 2021-01-12 14:21:03 UTC ++++ redis.conf +@@ -244,7 +244,7 @@ + # 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: +@@ -276,7 +276,7 @@ + # + # 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: +@@ -289,7 +289,7 @@ + # 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. +@@ -420,7 +420,7 @@ + # 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/redis70/files/patch-src-Makefile b/databases/redis70/files/patch-src-Makefile new file mode 100644 index 000000000000..6b3ed47b68be --- /dev/null +++ b/databases/redis70/files/patch-src-Makefile @@ -0,0 +1,39 @@ +--- src/Makefile.orig 2019-11-29 16:35:59 UTC ++++ src/Makefile +@@ -29,7 +29,7 @@ endif + WARN=-Wall -W -Wno-missing-field-initializers + OPT=$(OPTIMIZATION) + +-PREFIX?=/usr/local ++PREFIX:=$(PREFIX) + INSTALL_BIN=$(PREFIX)/bin + INSTALL=install + +@@ -75,7 +75,6 @@ endif + FINAL_CFLAGS=$(STD) $(WARN) $(OPT) $(DEBUG) $(CFLAGS) $(REDIS_CFLAGS) + FINAL_LDFLAGS=$(LDFLAGS) $(REDIS_LDFLAGS) $(DEBUG) + FINAL_LIBS=-lm +-DEBUG=-g -ggdb + + # Linux ARM needs -latomic at linking time + ifneq (,$(filter aarch64 armv,$(uname_M))) +@@ -105,6 +104,11 @@ ifeq ($(uname_S),Darwin) + OPENSSL_CFLAGS=-I/usr/local/opt/openssl/include + OPENSSL_LDFLAGS=-L/usr/local/opt/openssl/lib + 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 +@@ -131,6 +135,7 @@ else + # All the other OSes (notably Linux) + FINAL_LDFLAGS+= -rdynamic + FINAL_LIBS+=-ldl -pthread -lrt ++endif + endif + endif + endif diff --git a/databases/redis70/files/patch-src-mkreleasehdr.sh b/databases/redis70/files/patch-src-mkreleasehdr.sh new file mode 100644 index 000000000000..e48b3174d315 --- /dev/null +++ b/databases/redis70/files/patch-src-mkreleasehdr.sh @@ -0,0 +1,11 @@ +--- src/mkreleasehdr.sh.orig 2019-11-22 16:54:22 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) diff --git a/databases/redis70/files/pkg-message.in b/databases/redis70/files/pkg-message.in new file mode 100644 index 000000000000..85a89529262a --- /dev/null +++ b/databases/redis70/files/pkg-message.in @@ -0,0 +1,11 @@ +[ +{ type: install + message: <