From nobody Wed Apr 03 04:36:21 2024 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 4V8X513MRFz5GR2n; Wed, 3 Apr 2024 04:36:21 +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 4V8X512kLjz4Xmt; Wed, 3 Apr 2024 04:36:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1712118981; 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=oZynxhWPXaxS3lzo86J3Dw4XoLbBHwzWKNYaxJAQes8=; b=sWJsCNeFxmkHTsajJI8oxTOB13Ja9ejVAsU6RwJLyZSVRIqLAMaOxkLEl7VKOm+x6BEXey wKwolT1q2A4UnnStUBkV07uwwaHurOD/ju0mrb2Gm1xgb86hmHD1MCRJ9QN1d7vkoPQC3P o1T2eUdNaJIvh6aIvNzNQTu6hqm1c6KZTQu3dO8JTDVQH4nmsaRx/Hnhs6RymwwRK+NoTU IVL5Atf2eHwF46ktV0K7lCpFEb+YQ5nGgJC0I/bY74elKdpbV5sgOXFyXdlqhJS9jn23kk YlvKQY/a6FVFWMcAaagbVS/S7a3hyaOfLyBC1dFBKL3n1+vdJQshFDXmC/8dXA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1712118981; a=rsa-sha256; cv=none; b=lZMxoy7Ks5bJnRguVyuJPoH9/q9V/9D3X0SxHokhxF3H4WTtFIcb1Q76F9wI0bh9PICQvz A2joOnnnW2f83PEscw4pmKuHbSmiMdyMareuU/x2GIFGl0J8TnR7TQcdxWSZ7x57u8uK17 ScYCbKQe3kNbXoal0PL3G59lXyZIt34ed3HkRLoj/01Vj7OfSS8p8CST1W3zILVqLx+K+B 7nfhzK+8VItjkEqtQoiXTK0nc31JhzERxISmytISWSrpY1IeDXxHri4HLJy1HcggTR9kaM OYH+khDTLWmqa6qiZS48pbjmnnFwDLg2TRNAW+xpb0emUimfd3Kq3YqF9OjK5w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1712118981; 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=oZynxhWPXaxS3lzo86J3Dw4XoLbBHwzWKNYaxJAQes8=; b=X22kGTwVu9Vvw7R9KKzGomNH+lHz0l8zOSEmxBHZPT+WDj5A4gr1JmvX+S37OQmb2AwP7r NySyRHFy+mG/UuxeLX+qzVKNrNqaj5lAWq/+Lrw/H+AL8GjWY7QijfdRBEsj8lOUwhMLhD vjqxML9lFXhp5r11kFV7eus/CmOTrwjIBy+yDjRUkjvoijIYel8h/NckWEQsdH6vld1Az5 PpwjzMq4rFOx8L3qe0WTPCj8Quj2zbtTMnleBpk7dGb+0byJ3jyNUX1ZTAqSN91pckp2hj 60SSzs1AwSFH9FCZlpNaBJeD9xTv5jxyftn8FIqZT0eegLW3ON/23uhbaINsug== 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 4V8X512JvMzJZW; Wed, 3 Apr 2024 04:36:21 +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 4334aLil011135; Wed, 3 Apr 2024 04:36:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4334aLaq011132; Wed, 3 Apr 2024 04:36:21 GMT (envelope-from git) Date: Wed, 3 Apr 2024 04:36:21 GMT Message-Id: <202404030436.4334aLaq011132@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: 81b6dcb645ee - main - databases/redis*: Refine ports 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: 81b6dcb645eeb87f8313fd015f09f08ef6611138 Auto-Submitted: auto-generated The branch main has been updated by yasu: URL: https://cgit.FreeBSD.org/ports/commit/?id=81b6dcb645eeb87f8313fd015f09f08ef6611138 commit 81b6dcb645eeb87f8313fd015f09f08ef6611138 Author: Yasuhiro Kimura AuthorDate: 2024-04-03 04:33:57 +0000 Commit: Yasuhiro Kimura CommitDate: 2024-04-03 04:35:57 +0000 databases/redis*: Refine ports * Alway build with base system compiler. In 2018 Makefile was changed so GCC is used with i386. It seems to be workaround of build error, But now build succeeds without GCC on i386 and all supported FreeBSD versions. * Remove options for external lua library and related patches. On April 2022 upstream made incompatible change of bundled lua library to fix vulnerability. As a result build got failed when external lua library is enabled. Upstream said in commit message of their repository that they took codes from lua repository. So I kept the options with marking as broken hoping breakage will be solved in the future. But it is still broken after two years and doesn't seem to change. * Remove TRIB option. When it is enabled ruby script named redis-trib.rb is installed. But it just prints warning message that it is no longer available and redis-cli should be used instead, and exit. So it isn't usefull anymore. * Fix post-patch-JEMALLOC-on target so proper line is replaced. * Pet portclippy. --- databases/redis-devel/Makefile | 93 +++++----------------- .../files/extra-patch-deps_lua_src_lua__cjson.c | 11 --- .../redis-devel/files/extra-patch-src-Makefile.lua | 58 -------------- .../files/extra-patch-src-Makefile.luajit | 58 -------------- .../files/extra-patch-src-Makefile.luajit-or | 58 -------------- .../files/extra-patch-src-function_lua.c | 13 --- databases/redis-devel/pkg-plist | 1 - databases/redis/Makefile | 53 +----------- .../files/extra-patch-deps_lua_src_lua__cjson.c | 11 --- databases/redis/files/extra-patch-src-Makefile.lua | 58 -------------- .../redis/files/extra-patch-src-Makefile.luajit | 58 -------------- .../redis/files/extra-patch-src-Makefile.luajit-or | 58 -------------- .../redis/files/extra-patch-src-function_lua.c | 13 --- databases/redis/pkg-plist | 1 - databases/redis62/Makefile | 89 +++++---------------- .../files/extra-patch-deps_lua_src_lua__cjson.c | 11 --- .../redis62/files/extra-patch-src-Makefile.lua | 58 -------------- .../redis62/files/extra-patch-src-Makefile.luajit | 58 -------------- .../files/extra-patch-src-Makefile.luajit-or | 58 -------------- databases/redis62/pkg-plist | 1 - databases/redis70/Makefile | 53 +----------- .../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/pkg-plist | 1 - 27 files changed, 52 insertions(+), 1019 deletions(-) diff --git a/databases/redis-devel/Makefile b/databases/redis-devel/Makefile index f6314d350aef..32d6b39656e8 100644 --- a/databases/redis-devel/Makefile +++ b/databases/redis-devel/Makefile @@ -1,5 +1,6 @@ PORTNAME= redis DISTVERSION= 7.2.4.20240229 +PORTREVISION= 1 CATEGORIES= databases PKGNAMESUFFIX= -devel @@ -14,99 +15,52 @@ USES+= compiler:c11 cpe gmake tcl:test CPE_VENDOR= redislabs USE_GITHUB= yes GH_TAGNAME= f17381a38 +USE_RC_SUBR= redis sentinel MAKE_ENV= OPTIMIZATION= \ V=yo +LDFLAGS+= -lpthread -lm -lexecinfo + CONFLICTS_INSTALL= redis redis6 redis62 redis70 # etc/rc.d/redis PORTSCOUT= ignore:1 +SUB_FILES= pkg-message +SUB_LIST+= PORTNAME=${PORTNAME} \ + REDIS_DBDIR=${REDIS_DBDIR} \ + 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 TRIB +OPTIONS_DEFINE= JEMALLOC TLS 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 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 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 -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: - ${REINPLACE_CMD} '77s!malloc.h!stdlib.h!' ${WRKSRC}/src/zmalloc.h - 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 + @${REINPLACE_CMD} '72s!Linux!FreeBSD!g' ${WRKSRC}/src/Makefile post-build: ${SED} ${SUB_LIST:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \ @@ -120,10 +74,7 @@ do-install: ${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 +.include diff --git a/databases/redis-devel/files/extra-patch-deps_lua_src_lua__cjson.c b/databases/redis-devel/files/extra-patch-deps_lua_src_lua__cjson.c deleted file mode 100644 index 32e322d0d490..000000000000 --- a/databases/redis-devel/files/extra-patch-deps_lua_src_lua__cjson.c +++ /dev/null @@ -1,11 +0,0 @@ ---- 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/redis-devel/files/extra-patch-src-Makefile.lua b/databases/redis-devel/files/extra-patch-src-Makefile.lua deleted file mode 100644 index cf9884ab6c95..000000000000 --- a/databases/redis-devel/files/extra-patch-src-Makefile.lua +++ /dev/null @@ -1,58 +0,0 @@ ---- src/Makefile.orig 2024-02-29 22:26:29 UTC -+++ src/Makefile -@@ -28,7 +28,7 @@ - ifneq ($(OPTIMIZATION),-O0) - REDIS_CFLAGS+=-fno-omit-frame-pointer - endif --DEPENDENCY_TARGETS=hiredis linenoise lua hdr_histogram fpconv -+DEPENDENCY_TARGETS=hiredis linenoise hdr_histogram fpconv - NODEPS:=clean distclean - - # Default settings -@@ -119,8 +119,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 - - # Linux ARM32 needs -latomic at linking time -@@ -234,7 +234,7 @@ - endif - - # Include paths to dependencies --FINAL_CFLAGS+= -I../deps/hiredis -I../deps/linenoise -I../deps/lua/src -I../deps/hdr_histogram -I../deps/fpconv -+FINAL_CFLAGS+= -I../deps/hiredis -I../deps/linenoise -I../deps/hdr_histogram -I../deps/fpconv - - # Determine systemd support and/or build preference (defaulting to auto-detection) - BUILD_WITH_SYSTEMD=no -@@ -325,6 +325,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) -@@ -354,6 +357,7 @@ - REDIS_SERVER_NAME=redis-server$(PROG_SUFFIX) - REDIS_SENTINEL_NAME=redis-sentinel$(PROG_SUFFIX) - REDIS_SERVER_OBJ=threads_mngr.o adlist.o quicklist.o ae.o anet.o dict.o kvstore.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 cluster_legacy.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 socket.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 strl.o connection.o unix.o logreqres.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 strl.o cli_commands.o - REDIS_BENCHMARK_NAME=redis-benchmark$(PROG_SUFFIX) -@@ -408,7 +412,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 ../deps/fpconv/libfpconv.a $(FINAL_LIBS) -+ $(REDIS_LD) -o $@ $^ ../deps/hiredis/libhiredis.a ../deps/hdr_histogram/libhdrhistogram.a ../deps/fpconv/libfpconv.a $(FINAL_LIBS) - - # redis-sentinel - $(REDIS_SENTINEL_NAME): $(REDIS_SERVER_NAME) diff --git a/databases/redis-devel/files/extra-patch-src-Makefile.luajit b/databases/redis-devel/files/extra-patch-src-Makefile.luajit deleted file mode 100644 index 53fe09379f35..000000000000 --- a/databases/redis-devel/files/extra-patch-src-Makefile.luajit +++ /dev/null @@ -1,58 +0,0 @@ ---- src/Makefile.orig 2024-02-29 22:30:22 UTC -+++ src/Makefile -@@ -28,7 +28,7 @@ - ifneq ($(OPTIMIZATION),-O0) - REDIS_CFLAGS+=-fno-omit-frame-pointer - endif --DEPENDENCY_TARGETS=hiredis linenoise lua hdr_histogram fpconv -+DEPENDENCY_TARGETS=hiredis linenoise hdr_histogram fpconv - NODEPS:=clean distclean - - # Default settings -@@ -119,8 +119,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 - - # Linux ARM32 needs -latomic at linking time -@@ -234,7 +234,7 @@ - endif - - # Include paths to dependencies --FINAL_CFLAGS+= -I../deps/hiredis -I../deps/linenoise -I../deps/lua/src -I../deps/hdr_histogram -I../deps/fpconv -+FINAL_CFLAGS+= -I../deps/hiredis -I../deps/linenoise -I../deps/hdr_histogram -I../deps/fpconv - - # Determine systemd support and/or build preference (defaulting to auto-detection) - BUILD_WITH_SYSTEMD=no -@@ -325,6 +325,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) -@@ -354,6 +357,7 @@ - REDIS_SERVER_NAME=redis-server$(PROG_SUFFIX) - REDIS_SENTINEL_NAME=redis-sentinel$(PROG_SUFFIX) - REDIS_SERVER_OBJ=threads_mngr.o adlist.o quicklist.o ae.o anet.o dict.o kvstore.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 cluster_legacy.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 socket.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 strl.o connection.o unix.o logreqres.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 strl.o cli_commands.o - REDIS_BENCHMARK_NAME=redis-benchmark$(PROG_SUFFIX) -@@ -408,7 +412,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 ../deps/fpconv/libfpconv.a $(FINAL_LIBS) -+ $(REDIS_LD) -o $@ $^ ../deps/hiredis/libhiredis.a ../deps/hdr_histogram/libhdrhistogram.a ../deps/fpconv/libfpconv.a $(FINAL_LIBS) - - # redis-sentinel - $(REDIS_SENTINEL_NAME): $(REDIS_SERVER_NAME) diff --git a/databases/redis-devel/files/extra-patch-src-Makefile.luajit-or b/databases/redis-devel/files/extra-patch-src-Makefile.luajit-or deleted file mode 100644 index 0c27e912d531..000000000000 --- a/databases/redis-devel/files/extra-patch-src-Makefile.luajit-or +++ /dev/null @@ -1,58 +0,0 @@ ---- src/Makefile.orig 2024-02-29 22:32:43 UTC -+++ src/Makefile -@@ -28,7 +28,7 @@ - ifneq ($(OPTIMIZATION),-O0) - REDIS_CFLAGS+=-fno-omit-frame-pointer - endif --DEPENDENCY_TARGETS=hiredis linenoise lua hdr_histogram fpconv -+DEPENDENCY_TARGETS=hiredis linenoise hdr_histogram fpconv - NODEPS:=clean distclean - - # Default settings -@@ -119,8 +119,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 - - # Linux ARM32 needs -latomic at linking time -@@ -234,7 +234,7 @@ - endif - - # Include paths to dependencies --FINAL_CFLAGS+= -I../deps/hiredis -I../deps/linenoise -I../deps/lua/src -I../deps/hdr_histogram -I../deps/fpconv -+FINAL_CFLAGS+= -I../deps/hiredis -I../deps/linenoise -I../deps/hdr_histogram -I../deps/fpconv - - # Determine systemd support and/or build preference (defaulting to auto-detection) - BUILD_WITH_SYSTEMD=no -@@ -325,6 +325,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) -@@ -354,6 +357,7 @@ - REDIS_SERVER_NAME=redis-server$(PROG_SUFFIX) - REDIS_SENTINEL_NAME=redis-sentinel$(PROG_SUFFIX) - REDIS_SERVER_OBJ=threads_mngr.o adlist.o quicklist.o ae.o anet.o dict.o kvstore.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 cluster_legacy.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 socket.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 strl.o connection.o unix.o logreqres.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 strl.o cli_commands.o - REDIS_BENCHMARK_NAME=redis-benchmark$(PROG_SUFFIX) -@@ -408,7 +412,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 ../deps/fpconv/libfpconv.a $(FINAL_LIBS) -+ $(REDIS_LD) -o $@ $^ ../deps/hiredis/libhiredis.a ../deps/hdr_histogram/libhdrhistogram.a ../deps/fpconv/libfpconv.a $(FINAL_LIBS) - - # redis-sentinel - $(REDIS_SENTINEL_NAME): $(REDIS_SERVER_NAME) diff --git a/databases/redis-devel/files/extra-patch-src-function_lua.c b/databases/redis-devel/files/extra-patch-src-function_lua.c deleted file mode 100644 index 29be5e28e8f5..000000000000 --- a/databases/redis-devel/files/extra-patch-src-function_lua.c +++ /dev/null @@ -1,13 +0,0 @@ ---- 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/redis-devel/pkg-plist b/databases/redis-devel/pkg-plist index 7bc055909fdd..fafc472df89b 100644 --- a/databases/redis-devel/pkg-plist +++ b/databases/redis-devel/pkg-plist @@ -4,7 +4,6 @@ bin/redis-check-rdb bin/redis-cli bin/redis-sentinel bin/redis-server -%%TRIB%%bin/redis-trib.rb @sample etc/redis.conf.sample @sample(%%REDIS_USER%%,%%REDIS_GROUP%%,) etc/sentinel.conf.sample @dir(%%REDIS_USER%%,%%REDIS_GROUP%%,) %%REDIS_DBDIR%% diff --git a/databases/redis/Makefile b/databases/redis/Makefile index 7d7fbd27bbb9..1ed90d8b2fde 100644 --- a/databases/redis/Makefile +++ b/databases/redis/Makefile @@ -1,5 +1,6 @@ PORTNAME= redis DISTVERSION= 7.2.4 +PORTREVISION= 1 CATEGORIES= databases MASTER_SITES= https://download.redis.io/releases/ @@ -37,31 +38,16 @@ PLIST_SUB= REDIS_DBDIR=${REDIS_DBDIR} \ REDIS_RUNDIR=${REDIS_RUNDIR} \ REDIS_USER=${USERS} -OPTIONS_DEFINE= JEMALLOC TLS TRIB +OPTIONS_DEFINE= JEMALLOC TLS 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 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 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 BIN_FILES= redis-benchmark redis-check-aof redis-check-rdb redis-cli \ redis-sentinel redis-server @@ -70,36 +56,8 @@ REDIS_DBDIR?= /var/db/redis REDIS_RUNDIR?= /var/run/redis REDIS_LOGDIR?= /var/log/redis -.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 - 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 + @${REINPLACE_CMD} '69s!Linux!FreeBSD!g' ${WRKSRC}/src/Makefile post-build: ${SED} ${SUB_LIST:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \ @@ -113,10 +71,7 @@ do-install: ${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 +.include diff --git a/databases/redis/files/extra-patch-deps_lua_src_lua__cjson.c b/databases/redis/files/extra-patch-deps_lua_src_lua__cjson.c deleted file mode 100644 index 32e322d0d490..000000000000 --- a/databases/redis/files/extra-patch-deps_lua_src_lua__cjson.c +++ /dev/null @@ -1,11 +0,0 @@ ---- 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/redis/files/extra-patch-src-Makefile.lua b/databases/redis/files/extra-patch-src-Makefile.lua deleted file mode 100644 index 483ed9b67636..000000000000 --- a/databases/redis/files/extra-patch-src-Makefile.lua +++ /dev/null @@ -1,58 +0,0 @@ ---- src/Makefile.orig 2023-05-16 08:24:10 UTC -+++ src/Makefile -@@ -25,7 +25,7 @@ - endif - REDIS_LDFLAGS+=-flto - endif --DEPENDENCY_TARGETS=hiredis linenoise lua hdr_histogram fpconv -+DEPENDENCY_TARGETS=hiredis linenoise hdr_histogram fpconv - NODEPS:=clean distclean - - # Default settings -@@ -116,8 +116,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 - - # Linux ARM32 needs -latomic at linking time -@@ -231,7 +231,7 @@ - endif - - # Include paths to dependencies --FINAL_CFLAGS+= -I../deps/hiredis -I../deps/linenoise -I../deps/lua/src -I../deps/hdr_histogram -I../deps/fpconv -+FINAL_CFLAGS+= -I../deps/hiredis -I../deps/linenoise -I../deps/hdr_histogram -I../deps/fpconv - - # Determine systemd support and/or build preference (defaulting to auto-detection) - BUILD_WITH_SYSTEMD=no -@@ -322,6 +322,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) -@@ -351,6 +354,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 socket.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 strl.o connection.o unix.o logreqres.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 strl.o cli_commands.o - REDIS_BENCHMARK_NAME=redis-benchmark$(PROG_SUFFIX) -@@ -405,7 +409,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 ../deps/fpconv/libfpconv.a $(FINAL_LIBS) -+ $(REDIS_LD) -o $@ $^ ../deps/hiredis/libhiredis.a ../deps/hdr_histogram/libhdrhistogram.a ../deps/fpconv/libfpconv.a $(FINAL_LIBS) - - # redis-sentinel - $(REDIS_SENTINEL_NAME): $(REDIS_SERVER_NAME) diff --git a/databases/redis/files/extra-patch-src-Makefile.luajit b/databases/redis/files/extra-patch-src-Makefile.luajit deleted file mode 100644 index b283855fa2d9..000000000000 --- a/databases/redis/files/extra-patch-src-Makefile.luajit +++ /dev/null @@ -1,58 +0,0 @@ ---- src/Makefile.orig 2023-05-16 08:28:42 UTC -+++ src/Makefile -@@ -25,7 +25,7 @@ - endif - REDIS_LDFLAGS+=-flto - endif --DEPENDENCY_TARGETS=hiredis linenoise lua hdr_histogram fpconv -+DEPENDENCY_TARGETS=hiredis linenoise hdr_histogram fpconv - NODEPS:=clean distclean - - # Default settings -@@ -116,8 +116,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 - - # Linux ARM32 needs -latomic at linking time -@@ -231,7 +231,7 @@ - endif - - # Include paths to dependencies --FINAL_CFLAGS+= -I../deps/hiredis -I../deps/linenoise -I../deps/lua/src -I../deps/hdr_histogram -I../deps/fpconv -+FINAL_CFLAGS+= -I../deps/hiredis -I../deps/linenoise -I../deps/hdr_histogram -I../deps/fpconv - - # Determine systemd support and/or build preference (defaulting to auto-detection) - BUILD_WITH_SYSTEMD=no -@@ -322,6 +322,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) -@@ -351,6 +354,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 socket.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 strl.o connection.o unix.o logreqres.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 strl.o cli_commands.o - REDIS_BENCHMARK_NAME=redis-benchmark$(PROG_SUFFIX) -@@ -405,7 +409,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 ../deps/fpconv/libfpconv.a $(FINAL_LIBS) -+ $(REDIS_LD) -o $@ $^ ../deps/hiredis/libhiredis.a ../deps/hdr_histogram/libhdrhistogram.a ../deps/fpconv/libfpconv.a $(FINAL_LIBS) - - # redis-sentinel - $(REDIS_SENTINEL_NAME): $(REDIS_SERVER_NAME) diff --git a/databases/redis/files/extra-patch-src-Makefile.luajit-or b/databases/redis/files/extra-patch-src-Makefile.luajit-or deleted file mode 100644 index 1e53e89709e4..000000000000 --- a/databases/redis/files/extra-patch-src-Makefile.luajit-or +++ /dev/null @@ -1,58 +0,0 @@ ---- src/Makefile.orig 2023-05-16 08:30:32 UTC -+++ src/Makefile -@@ -25,7 +25,7 @@ - endif - REDIS_LDFLAGS+=-flto - endif --DEPENDENCY_TARGETS=hiredis linenoise lua hdr_histogram fpconv -+DEPENDENCY_TARGETS=hiredis linenoise hdr_histogram fpconv - NODEPS:=clean distclean - - # Default settings -@@ -116,8 +116,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 - - # Linux ARM32 needs -latomic at linking time -@@ -231,7 +231,7 @@ - endif - - # Include paths to dependencies --FINAL_CFLAGS+= -I../deps/hiredis -I../deps/linenoise -I../deps/lua/src -I../deps/hdr_histogram -I../deps/fpconv -+FINAL_CFLAGS+= -I../deps/hiredis -I../deps/linenoise -I../deps/hdr_histogram -I../deps/fpconv - - # Determine systemd support and/or build preference (defaulting to auto-detection) - BUILD_WITH_SYSTEMD=no -@@ -322,6 +322,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) -@@ -351,6 +354,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 socket.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 strl.o connection.o unix.o logreqres.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 strl.o cli_commands.o - REDIS_BENCHMARK_NAME=redis-benchmark$(PROG_SUFFIX) -@@ -405,7 +409,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 ../deps/fpconv/libfpconv.a $(FINAL_LIBS) -+ $(REDIS_LD) -o $@ $^ ../deps/hiredis/libhiredis.a ../deps/hdr_histogram/libhdrhistogram.a ../deps/fpconv/libfpconv.a $(FINAL_LIBS) - - # redis-sentinel - $(REDIS_SENTINEL_NAME): $(REDIS_SERVER_NAME) diff --git a/databases/redis/files/extra-patch-src-function_lua.c b/databases/redis/files/extra-patch-src-function_lua.c deleted file mode 100644 index 29be5e28e8f5..000000000000 --- a/databases/redis/files/extra-patch-src-function_lua.c +++ /dev/null @@ -1,13 +0,0 @@ ---- 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/redis/pkg-plist b/databases/redis/pkg-plist index 7bc055909fdd..fafc472df89b 100644 --- a/databases/redis/pkg-plist +++ b/databases/redis/pkg-plist @@ -4,7 +4,6 @@ bin/redis-check-rdb bin/redis-cli bin/redis-sentinel bin/redis-server -%%TRIB%%bin/redis-trib.rb @sample etc/redis.conf.sample @sample(%%REDIS_USER%%,%%REDIS_GROUP%%,) etc/sentinel.conf.sample @dir(%%REDIS_USER%%,%%REDIS_GROUP%%,) %%REDIS_DBDIR%% diff --git a/databases/redis62/Makefile b/databases/redis62/Makefile index b9fe47b713e7..cb25c52f4506 100644 --- a/databases/redis62/Makefile +++ b/databases/redis62/Makefile @@ -1,5 +1,6 @@ PORTNAME= redis DISTVERSION= 6.2.14 +PORTREVISION= 1 CATEGORIES= databases MASTER_SITES= https://download.redis.io/releases/ PKGNAMESUFFIX= 62 @@ -14,95 +15,52 @@ LICENSE_FILE= ${WRKSRC}/COPYING USES+= compiler:c11 cpe gmake tcl:test CPE_VENDOR= redislabs CPE_PRODUCT= redis +USE_RC_SUBR= redis sentinel MAKE_ENV= OPTIMIZATION= \ V=yo +LDFLAGS+= -lpthread -lm -lexecinfo + CONFLICTS_INSTALL= redis redis-devel redis6 redis70 # etc/rc.d/redis PORTSCOUT= limit:^6\.2 +SUB_FILES= pkg-message +SUB_LIST+= PORTNAME=${PORTNAME} \ + REDIS_DBDIR=${REDIS_DBDIR} \ + 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 TRIB +OPTIONS_DEFINE= JEMALLOC TLS 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 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 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-deps_lua_src_lua__cjson.c -. endif -.endif - -LDFLAGS+= -lpthread -lm -lexecinfo -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 + @${REINPLACE_CMD} '58s!Linux!FreeBSD!g' ${WRKSRC}/src/Makefile post-build: ${SED} ${SUB_LIST:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \ @@ -116,10 +74,7 @@ do-install: ${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 +.include diff --git a/databases/redis62/files/extra-patch-deps_lua_src_lua__cjson.c b/databases/redis62/files/extra-patch-deps_lua_src_lua__cjson.c deleted file mode 100644 index 32e322d0d490..000000000000 --- a/databases/redis62/files/extra-patch-deps_lua_src_lua__cjson.c +++ /dev/null @@ -1,11 +0,0 @@ ---- 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/redis62/files/extra-patch-src-Makefile.lua b/databases/redis62/files/extra-patch-src-Makefile.lua deleted file mode 100644 index 398d415bd6e4..000000000000 --- a/databases/redis62/files/extra-patch-src-Makefile.lua +++ /dev/null @@ -1,58 +0,0 @@ ---- src/Makefile.orig 2021-01-12 14:21:03 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 -@@ -83,8 +83,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 - -@@ -188,7 +188,7 @@ - endif - 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 -@@ -251,6 +251,9 @@ - FINAL_LIBS += ../deps/hiredis/libhiredis_ssl.a $(LIBSSL_LIBS) $(LIBCRYPTO_LIBS) - 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) -@@ -271,6 +274,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 scripting.o bio.o rio.o rand.o memtest.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 gopher.o tracking.o connection.o tls.o sha256.o timeout.o setcpuaffinity.o monotonic.o mt19937-64.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 crcspeed.o crc64.o siphash.o crc16.o monotonic.o cli_common.o mt19937-64.o *** 483 LINES SKIPPED ***