freebsd-ports/databases/redis-devel/Makefile

128 lines
3.4 KiB
Makefile
Raw Normal View History

# Created by: Sergey Skvortsov <skv@protey.ru>
PORTNAME= redis
PORTVERSION= 6.2.4
CATEGORIES= databases
MASTER_SITES= https://download.redis.io/releases/
PKGNAMESUFFIX= -devel
MAINTAINER= osa@FreeBSD.org
COMMENT= Persistent key-value database with built-in net interface
Upgrade from 3.0.0-beta2 to 3.0.0-beta5. Fix lua/luajit-specific extra patches. Stagefy. <ChangeLog> --[ Redis 3.0.0 Beta 5 (version 2.9.54) ] Release date: 26 may 2014 This is the 5th beta of Redis 3.0.0. It does not include any real worthwhile change (just three days passed since the previous beta), but fixes two stupid bugs preventing cluster tests to pass. --[ Redis 3.0.0 Beta 4 (version 2.9.53) ] Release date: 23 may 2014 This is the fourth beta of Redis 3.0.0. >> General changes * [NEW] Scripting engine performances improvements. * [NEW] Log format slightly changed to report current node role. * [FIX] Correct the HyperLogLog stale cache flag to prevent unnecessary computation. >> Cluster changes * [NEW] redis-trib: ability to import data from standalone Redis instances. * [NEW] redis-trib: "fix" subcommand much better at fixing errors. * [NEW] CLUSTER FAILOVER FORCE implemented. * [NEW] CLUSTER RESET implemented, it is now possible to completely reset nodes and create a new cluster without restarting anything. * [NEW] Slave validity factor (max estimated data age to still failover) is now under the control of the user, and can be configured via redis.conf or CONFIG SET. Option name cluster-slave-validity-factor. * [NEW] Cluster test: failure detection and failover initial tests. * [NEW] CLUSTER MEET: better error messages when address is invalid. * [NEW] Bulk-accept new Cluster nodes in the Cluster bus instead of performing just a single accept() per event fired. * [FIX] Bypass data_age check for manual failovers. * [FIX] Fixed data_age computation / check integer overflow. * [FIX] Various fixes to Tcl client.tcl Redis Cluster client used in tests. * [FIX] Better handling of stolen slots. * [FIX] Don't accept cluster bus connections during startup. >> Sentinel changes * [NEW] Generate +config-update-from event when a new config is received. * [NEW] Log when a failover will be re-attempted again. * [FIX] Sentinel: Add "dir /tmp" directive in example sentinel.conf. --[ Redis 3.0.0 Beta 3 (version 2.9.52) ] Release date: 5 may 2014 This is the third beta of Redis 3.0.0. >> General changes * [NEW] New data structure: the HyperLogLog (see 2.8 release notes). * [NEW] Lexicograhical range queries in sorted sets (see 2.8 release notes). * [NEW] LRU algorithm precision greatly improved. * [FIX] Redis is now much more responsive to reply with LOADING / BUSY errors. >> Cluster changes * [NEW] Cluster testing framework and initial tests. * [NEW] Cluster epochs collision resolution (make Redis Cluster more resilient to admin and programming errors). * [NEW] Persist / fsync some global state to ensure correct crash-recovery semantics. * [NEW] New command introduced: CLUSTER SET-CONFIG-EPOCH, still not used by redis-trib. Will be used to speedup the assignment of unique epochs to different nodes at cluster creation time. For now this is handled as a side effect of the cluster epochs collision resolution. * [FIX] Different fixes to redis-trib cluster creation. * [FIX] Fix an error in the CLUSTER NODES output for nodes slots. >> Sentinel changes * [NEW] Sentinels are now able to send update messages in a peer-to-peer fashion even if no Redis instances are available. Now the Sentinel liveness property that the most updated configuration in a given partition is propagated to all the Sentinels is extended to partitions without reachable instances. * [NEW] Sentinel safety properties are now ensured in a crash-recovery system model since some state is persisted on disk before replying to other nodes, and reloaded at startup. * [NEW] Sentinel now uses CLIENT SETNAME so that it is easy to identify Sentinels using CLIENT LIST among other clients. * [NEW] Sentinel failure detection and reconnection code improved. </ChangeLog>
2014-06-02 03:42:11 +02:00
LICENSE= BSD3CLAUSE
LICENSE_FILE= ${WRKSRC}/COPYING
2012-08-03 06:21:19 +02:00
USES+= compiler:c11 gmake
OPTIONS_DEFINE= JEMALLOC TESTS TLS TRIB
OPTIONS_RADIO= EXTLUA
OPTIONS_RADIO_EXTLUA= LUA LUAJIT LUAJITOR
OPTIONS_SUB= yes
JEMALLOC_DESC= Use jemalloc
LUA_DESC= Use lang/lua instead of builtin lua
LUAJIT_DESC= Use lang/luajit instead of builtin lua
LUAJITOR_DESC= Use lang/luajit-openresty instead of builtin lua
TLS_DESC= Use TLS (openssl req.)
TESTS_DESC= Install lang/tcl for redis unit tests
TRIB_DESC= Install redis-trib.rb (lang/ruby req.)
MAKE_ENV= V=yo OPTIMIZATION=
JEMALLOC_MAKE_ENV= USE_JEMALLOC=yes
LUA_USES= lua:51
LUA_EXTRA_PATCHES= ${PATCHDIR}/extra-patch-src-Makefile.lua
LUA_VARS= _addflags=true
LUAJIT_LIB_DEPENDS= libluajit-5.1.so:lang/luajit
LUAJIT_BUILD_DEPENDS= ${LOCALBASE}/include/luajit-2.0/lua.h:lang/luajit
LUAJIT_EXTRA_PATCHES= ${PATCHDIR}/extra-patch-src-Makefile.luajit
LUAJIT_VARS= _addflags=true
LUAJITOR_LIB_DEPENDS= libluajit-5.1.so:lang/luajit-openresty
LUAJITOR_BUILD_DEPENDS= ${LOCALBASE}/include/luajit-2.1/lua.h:lang/luajit-openresty
LUAJITOR_EXTRA_PATCHES= ${PATCHDIR}/extra-patch-src-Makefile.luajit-or \
${PATCHDIR}/extra-patch-deps_lua_src_lua__cjson.c
LUAJITOR_VARS= _addflags=true
TESTS_USES= tcl:build
TLS_USES= ssl
TLS_MAKE_ENV= BUILD_TLS=yes
Upgrade from 3.0.0-beta6 to 3.0.0-beta8. <ChangeLog> --[ Redis 3.0.0 Beta 8 (version 2.9.57) ] Release date: 29 jul 2014 This is the 8th beta of Redis 3.0.0. >> General changes * [FIX] Solaris compilation issues. (Matt Stancliff, Salvatore Sanfilippo) * [FIX] Allow shared integer objects if maxmemory policy is not LRU based. (Salvatore Sanfilippo) * [FIX] PFSELFTEST: less false positives. (Salvatore Sanfilippo) * [FIX] Fail SYNC if background save child aborted due to a signal. (Yossi Gottlieb) * [NEW] Latency framework backported from unstable branch. (Salvatore Sanfilippo) * [NEW] AOF rewrite improved for latency. (Salvatore Sanfilippo) * [NEW] Pub/Sub PING. (Salvatore Sanfilippo) * [NEW] Much faster ZUNIONSTORE. (Kyle Hubert, Salvatore Sanfilippo) * [NEW] Faster ll2string() implementation. (Salvatore Sanfilippo) >> Cluster changes * [FIX] CLUSTER RESET: Flush slave dataset on reset. (Salvatore Sanfilippo) * [FIX] Replica migration: don't migrate to masters that never had slaves in the past, but only to masters that remained orphaned after failure events. (Salvatore Sanfilippo) * [NEW] redis-trib: allow to reshard in non-interactive way. (Salvatore Sanfilippo) * [NEW] Cluster test: unit 04, check consistency during resharding. (Salvatore Sanfilippo) * [NEW] Cluster test: unit 05, slave selection. (Salvatore Sanfilippo) * [NEW] Cluster test: unit 06, slaves with stale data can't failover. (Salvatore Sanfilippo) * [NEW] Cluster test: unit 07, replicas migration. (Salvatore Sanfilippo) >> Sentinel changes * No Sentinel changes in this release. --[ Redis 3.0.0 Beta 7 (version 2.9.56) ] Release date: 30 jun 2014 This is the 7th beta of Redis 3.0.0. >> General changes * [FIX] Scripting fixes backported from unstable, see Redis 2.8.12 changelog for more info. (Salvatore Sanfilippo) * [FIX] Cancel SHUTDOWN if initial AOF is being written. (Matt Stancliff) * [NEW] New command: COMMAND, for commands introspection (Matt Stancliff & Salvatore Sanfilippo) * [NEW] hiredis: Update to latest version. (Matt Stancliff) * [NEW] Jemalloc updated to 3.6.0. (Salvatore Sanfilippo) >> Cluster changes * [FIX] Cluster: clear NOADDR flag when updating node address. (Salvatore Sanfilippo) * [NEW] New CLUSTER SLOTS command to simplify Cluster clients operations. (Matt Stancliff) * [NEW] More Cluster tests. (Salvatore Sanfilippo) * [NEW] Log when failover authorization are granted / denied. (Salvatore Sanfilippo) >> Sentinel changes * [FIX] A few Sentinel bugs fixed and improvements, see Redis 2.8.12 changelog for more info. (Salvatore Sanfilippo & Matt Stancliff) * [NEW] New Sentinel-Client handshake protocol, ROLE command, CLIENT KILL, all backported to 3.0 branch. (Salvatore Sanfilippo) </ChangeLog>
2014-09-10 00:38:00 +02:00
TRIB_CATEGORIES= ruby
TRIB_USE= ruby=yes
TRIB_RUN_DEPENDS= rubygem-redis>=2.2:databases/rubygem-redis
.include <bsd.port.pre.mk>
.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
LDFLAGS+= -lpthread -lm -lexecinfo
CONFLICTS?= redis5-5.* redis-6.*
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_USER=${USERS} \
REDIS_DBDIR=${REDIS_DBDIR} \
REDIS_LOGDIR=${REDIS_LOGDIR} \
REDIS_RUNDIR=${REDIS_RUNDIR}
PLIST_SUB+= REDIS_USER=${USERS} \
REDIS_GROUP=${GROUPS} \
REDIS_LOGDIR=${REDIS_LOGDIR} \
REDIS_DBDIR=${REDIS_DBDIR} \
REDIS_RUNDIR=${REDIS_RUNDIR}
2021-03-06 19:00:29 +01:00
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
post-build:
${SED} ${SUB_LIST:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
${WRKSRC}/redis.conf > ${WRKDIR}/redis.conf
do-install:
Upgrade from 3.0.0-beta2 to 3.0.0-beta5. Fix lua/luajit-specific extra patches. Stagefy. <ChangeLog> --[ Redis 3.0.0 Beta 5 (version 2.9.54) ] Release date: 26 may 2014 This is the 5th beta of Redis 3.0.0. It does not include any real worthwhile change (just three days passed since the previous beta), but fixes two stupid bugs preventing cluster tests to pass. --[ Redis 3.0.0 Beta 4 (version 2.9.53) ] Release date: 23 may 2014 This is the fourth beta of Redis 3.0.0. >> General changes * [NEW] Scripting engine performances improvements. * [NEW] Log format slightly changed to report current node role. * [FIX] Correct the HyperLogLog stale cache flag to prevent unnecessary computation. >> Cluster changes * [NEW] redis-trib: ability to import data from standalone Redis instances. * [NEW] redis-trib: "fix" subcommand much better at fixing errors. * [NEW] CLUSTER FAILOVER FORCE implemented. * [NEW] CLUSTER RESET implemented, it is now possible to completely reset nodes and create a new cluster without restarting anything. * [NEW] Slave validity factor (max estimated data age to still failover) is now under the control of the user, and can be configured via redis.conf or CONFIG SET. Option name cluster-slave-validity-factor. * [NEW] Cluster test: failure detection and failover initial tests. * [NEW] CLUSTER MEET: better error messages when address is invalid. * [NEW] Bulk-accept new Cluster nodes in the Cluster bus instead of performing just a single accept() per event fired. * [FIX] Bypass data_age check for manual failovers. * [FIX] Fixed data_age computation / check integer overflow. * [FIX] Various fixes to Tcl client.tcl Redis Cluster client used in tests. * [FIX] Better handling of stolen slots. * [FIX] Don't accept cluster bus connections during startup. >> Sentinel changes * [NEW] Generate +config-update-from event when a new config is received. * [NEW] Log when a failover will be re-attempted again. * [FIX] Sentinel: Add "dir /tmp" directive in example sentinel.conf. --[ Redis 3.0.0 Beta 3 (version 2.9.52) ] Release date: 5 may 2014 This is the third beta of Redis 3.0.0. >> General changes * [NEW] New data structure: the HyperLogLog (see 2.8 release notes). * [NEW] Lexicograhical range queries in sorted sets (see 2.8 release notes). * [NEW] LRU algorithm precision greatly improved. * [FIX] Redis is now much more responsive to reply with LOADING / BUSY errors. >> Cluster changes * [NEW] Cluster testing framework and initial tests. * [NEW] Cluster epochs collision resolution (make Redis Cluster more resilient to admin and programming errors). * [NEW] Persist / fsync some global state to ensure correct crash-recovery semantics. * [NEW] New command introduced: CLUSTER SET-CONFIG-EPOCH, still not used by redis-trib. Will be used to speedup the assignment of unique epochs to different nodes at cluster creation time. For now this is handled as a side effect of the cluster epochs collision resolution. * [FIX] Different fixes to redis-trib cluster creation. * [FIX] Fix an error in the CLUSTER NODES output for nodes slots. >> Sentinel changes * [NEW] Sentinels are now able to send update messages in a peer-to-peer fashion even if no Redis instances are available. Now the Sentinel liveness property that the most updated configuration in a given partition is propagated to all the Sentinels is extended to partitions without reachable instances. * [NEW] Sentinel safety properties are now ensured in a crash-recovery system model since some state is persisted on disk before replying to other nodes, and reloaded at startup. * [NEW] Sentinel now uses CLIENT SETNAME so that it is easy to identify Sentinels using CLIENT LIST among other clients. * [NEW] Sentinel failure detection and reconnection code improved. </ChangeLog>
2014-06-02 03:42:11 +02:00
${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
2014-10-20 12:41:12 +02:00
${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 <bsd.port.post.mk>