[76680] trunk/dports/databases/redis
stromnov at macports.org
stromnov at macports.org
Sat Mar 5 01:09:34 PST 2011
Revision: 76680
http://trac.macports.org/changeset/76680
Author: stromnov at macports.org
Date: 2011-03-05 01:09:32 -0800 (Sat, 05 Mar 2011)
Log Message:
-----------
redis: update to version 2.2.2
Modified Paths:
--------------
trunk/dports/databases/redis/Portfile
trunk/dports/databases/redis/files/redis-daemon.conf.sample.in
trunk/dports/databases/redis/files/redis.conf.sample.in
Added Paths:
-----------
trunk/dports/databases/redis/files/patch-redis.c.diff
Removed Paths:
-------------
trunk/dports/databases/redis/files/redis.c.diff
Modified: trunk/dports/databases/redis/Portfile
===================================================================
--- trunk/dports/databases/redis/Portfile 2011-03-05 08:40:46 UTC (rev 76679)
+++ trunk/dports/databases/redis/Portfile 2011-03-05 09:09:32 UTC (rev 76680)
@@ -4,7 +4,7 @@
PortSystem 1.0
name redis
-version 2.0.4
+version 2.2.2
revision 0
categories databases
platforms darwin
@@ -17,11 +17,11 @@
homepage http://redis.io/
master_sites googlecode:redis
-checksums md5 60656113efb6759ab644d7495629d90b \
- sha1 fee2f1960eda22385503517a9a6dcae610df84d5 \
- rmd160 e8ae60e9c5cf79b2f81233bfa6516659fea3983f
+checksums md5 1c5b0d961da84a8f9b44a328b438549e \
+ sha1 75b953e4a3067570555c5f3f5e8f481c40489904 \
+ rmd160 a7a21ab6aa07f79e5cdeb991a26dd1d55446e38e
-patchfiles redis.c.diff
+patchfiles patch-redis.c.diff
use_configure no
@@ -39,8 +39,10 @@
destroot {
xinstall -d ${destroot}${prefix}/var/db/redis
- xinstall -m 0755 -W ${worksrcpath} \
+ xinstall -m 0755 -W ${worksrcpath}/src \
redis-benchmark \
+ redis-check-aof \
+ redis-check-dump \
redis-cli \
redis-server \
${destroot}${prefix}/bin
Added: trunk/dports/databases/redis/files/patch-redis.c.diff
===================================================================
--- trunk/dports/databases/redis/files/patch-redis.c.diff (rev 0)
+++ trunk/dports/databases/redis/files/patch-redis.c.diff 2011-03-05 09:09:32 UTC (rev 76680)
@@ -0,0 +1,14 @@
+--- src/redis.c.orig 2011-03-05 11:54:28.000000000 +0300
++++ src/redis.c 2011-03-05 11:56:31.000000000 +0300
+@@ -1585,8 +1585,10 @@
+ #elif defined(__APPLE__) && !defined(MAC_OS_X_VERSION_10_6)
+ #if __x86_64__
+ return (void*) uc->uc_mcontext->__ss.__rip;
+- #else
++ #elif __i386__
+ return (void*) uc->uc_mcontext->__ss.__eip;
++ #else
++ return (void*) uc->uc_mcontext->__ss.__srr0;
+ #endif
+ #elif defined(__APPLE__) && defined(MAC_OS_X_VERSION_10_6)
+ #if defined(_STRUCT_X86_THREAD_STATE64) && !defined(__i386__)
Modified: trunk/dports/databases/redis/files/redis-daemon.conf.sample.in
===================================================================
--- trunk/dports/databases/redis/files/redis-daemon.conf.sample.in 2011-03-05 08:40:46 UTC (rev 76679)
+++ trunk/dports/databases/redis/files/redis-daemon.conf.sample.in 2011-03-05 09:09:32 UTC (rev 76680)
@@ -20,7 +20,8 @@
# default. You can specify a custom pid file location here.
pidfile @PREFIX@/var/run/redis.pid
-# Accept connections on the specified port, default is 6379
+# Accept connections on the specified port, default is 6379.
+# If port 0 is specified Redis will not listen on a TCP socket.
port 6379
# If you want you can bind a single interface, if the bind option is not
@@ -28,6 +29,12 @@
#
# bind 127.0.0.1
+# Specify the path for the unix socket that will be used to listen for
+# incoming connections. There is no default, so Redis will not listen
+# on a unix socket when not specified.
+#
+# unixsocket /tmp/redis.sock
+
# Close the connection after a client is idle for N seconds (0 to disable)
timeout 300
@@ -44,6 +51,16 @@
# output for logging but daemonize, logs will be sent to /dev/null
logfile @PREFIX@/var/log/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.
+# syslog-enabled no
+
+# Specify the syslog identity.
+# syslog-ident redis
+
+# Specify the syslog facility. Must be USER or between LOCAL0-LOCAL7.
+# syslog-facility local0
+
# Set the number of databases. The default database is DB 0, you can select
# a different one on a per-connection basis using SELECT <dbid> where
# dbid is a number between 0 and 'databases'-1
@@ -104,6 +121,19 @@
#
# masterauth <master-password>
+# When a slave lost the connection with the master, or when the replication
+# is still in progress, the slave can act in two different ways:
+#
+# 1) if slave-serve-stale-data is set to 'yes' (the default) the slave will
+# still reply to client requests, possibly with out of data data, or the
+# data set may just be empty if this is the first synchronization.
+#
+# 2) if slave-serve-stale data is set to 'no' the slave will reply with
+# an error "SYNC with master in progress" to all the kind of commands
+# but to INFO and SLAVEOF.
+#
+slave-serve-stale-data yes
+
################################## SECURITY ###################################
# Require clients to issue AUTH <PASSWORD> before processing any other
@@ -119,6 +149,22 @@
#
# requirepass foobared
+# Command renaming.
+#
+# It is possilbe to change the name of dangerous commands in a shared
+# environment. For instance the CONFIG command may be renamed into something
+# of hard to guess so that it will be still available for internal-use
+# tools but not available for general clients.
+#
+# Example:
+#
+# rename-command CONFIG b840fc02d524045429941cc15f59e41cb7be6c52
+#
+# It is also possilbe to completely kill a command renaming it into
+# an empty string:
+#
+# rename-command CONFIG ""
+
################################### LIMITS ####################################
# Set the max number of connected clients at the same time. By default there
@@ -148,6 +194,37 @@
#
# maxmemory <bytes>
+# MAXMEMORY POLICY: how Redis will select what to remove when maxmemory
+# is reached? You can select among five behavior:
+#
+# volatile-lru -> remove the key with an expire set using an LRU algorithm
+# allkeys-lru -> remove any key accordingly to the LRU algorithm
+# volatile-random -> remove a random key with an expire set
+# allkeys->random -> remove a random key, any key
+# volatile-ttl -> remove the key with the nearest expire time (minor TTL)
+# noeviction -> don't expire at all, just return an error on write operations
+#
+# Note: with all the kind of policies, Redis will return an error on write
+# operations, when there are not suitable keys for eviction.
+#
+# At the date of writing this commands are: set setnx setex append
+# incr decr rpush lpush rpushx lpushx linsert lset rpoplpush sadd
+# sinter sinterstore sunion sunionstore sdiff sdiffstore zadd zincrby
+# zunionstore zinterstore hset hsetnx hmset hincrby incrby decrby
+# getset mset msetnx exec sort
+#
+# The default is:
+#
+# maxmemory-policy volatile-lru
+
+# LRU and minimal TTL algorithms are not precise algorithms but approximated
+# algorithms (in order to save memory), so you can select as well the sample
+# size to check. For instance for default Redis will check three keys and
+# pick the one that was used less recently, you can change the sample size
+# using the following configuration directive.
+#
+# maxmemory-samples 3
+
############################## APPEND ONLY MODE ###############################
# By default Redis asynchronously dumps the dataset on disk. If you can live
@@ -195,6 +272,26 @@
appendfsync everysec
# appendfsync no
+# When the AOF fsync policy is set to always or everysec, and a background
+# saving process (a background save or AOF log background rewriting) is
+# performing a lot of I/O against the disk, in some Linux configurations
+# Redis may block too long on the fsync() call. Note that there is no fix for
+# this currently, as even performing fsync in a different thread will block
+# our synchronous write(2) call.
+#
+# In order to mitigate this problem it's possible to use the following option
+# that will prevent fsync() from being called in the main process while a
+# BGSAVE or BGREWRITEAOF is in progress.
+#
+# This means that while another child is saving the durability of Redis is
+# the same as "appendfsync none", that in pratical terms means that it is
+# possible to lost up to 30 seconds of log in the worst scenario (with the
+# default Linux settings).
+#
+# If you have latency problems turn this to "yes". Otherwise leave it as
+# "no" that is the safest pick from the point of view of durability.
+no-appendfsync-on-rewrite no
+
################################ VIRTUAL MEMORY ###############################
# Virtual Memory allows Redis to work with datasets bigger than the actual
@@ -269,18 +366,26 @@
############################### ADVANCED CONFIG ###############################
-# Glue small output buffers together in order to send small replies in a
-# single TCP packet. Uses a bit more CPU but most of the times it is a win
-# in terms of number of queries per second. Use 'yes' if unsure.
-glueoutputbuf yes
-
# Hashes are encoded in a special way (much more memory efficient) when they
# have at max a given numer of elements, and the biggest element does not
# exceed a given threshold. You can configure this limits with the following
# configuration directives.
-hash-max-zipmap-entries 64
-hash-max-zipmap-value 512
+hash-max-zipmap-entries 512
+hash-max-zipmap-value 64
+# Similarly to hashes, small lists are also encoded in a special way in order
+# to save a lot of space. The special representation is only used when
+# you are under the following limits:
+list-max-ziplist-entries 512
+list-max-ziplist-value 64
+
+# Sets have a special encoding in just one case: when a set is composed
+# of just strings that happens to be integers in radix 10 in the range
+# of 64 bit signed integers.
+# The following configuration setting sets the limit in the size of the
+# set in order to use this special memory saving encoding.
+set-max-intset-entries 512
+
# Active rehashing uses 1 millisecond every 100 milliseconds of CPU time in
# order to help rehashing the main Redis hash table (the one mapping top-level
# keys to values). The hash table implementation redis uses (see dict.c)
Deleted: trunk/dports/databases/redis/files/redis.c.diff
===================================================================
--- trunk/dports/databases/redis/files/redis.c.diff 2011-03-05 08:40:46 UTC (rev 76679)
+++ trunk/dports/databases/redis/files/redis.c.diff 2011-03-05 09:09:32 UTC (rev 76680)
@@ -1,14 +0,0 @@
---- redis.c.orig 2010-11-06 20:09:28.000000000 +1100
-+++ redis.c 2010-11-12 15:54:47.000000000 +1100
-@@ -10904,8 +10904,10 @@ static void *getMcontextEip(ucontext_t *
- #elif defined(__APPLE__) && !defined(MAC_OS_X_VERSION_10_6)
- #if __x86_64__
- return (void*) uc->uc_mcontext->__ss.__rip;
-- #else
-+ #elif __i386__
- return (void*) uc->uc_mcontext->__ss.__eip;
-+ #else
-+ return (void*) uc->uc_mcontext->__ss.__srr0;
- #endif
- #elif defined(__APPLE__) && defined(MAC_OS_X_VERSION_10_6)
- #if defined(_STRUCT_X86_THREAD_STATE64) && !defined(__i386__)
Modified: trunk/dports/databases/redis/files/redis.conf.sample.in
===================================================================
--- trunk/dports/databases/redis/files/redis.conf.sample.in 2011-03-05 08:40:46 UTC (rev 76679)
+++ trunk/dports/databases/redis/files/redis.conf.sample.in 2011-03-05 09:09:32 UTC (rev 76680)
@@ -20,7 +20,8 @@
# default. You can specify a custom pid file location here.
pidfile @PREFIX@/var/run/redis.pid
-# Accept connections on the specified port, default is 6379
+# Accept connections on the specified port, default is 6379.
+# If port 0 is specified Redis will not listen on a TCP socket.
port 6379
# If you want you can bind a single interface, if the bind option is not
@@ -28,6 +29,12 @@
#
# bind 127.0.0.1
+# Specify the path for the unix socket that will be used to listen for
+# incoming connections. There is no default, so Redis will not listen
+# on a unix socket when not specified.
+#
+# unixsocket /tmp/redis.sock
+
# Close the connection after a client is idle for N seconds (0 to disable)
timeout 300
@@ -44,6 +51,16 @@
# output for logging but daemonize, logs will be sent to /dev/null
logfile stdout
+# To enable logging to the system logger, just set 'syslog-enabled' to yes,
+# and optionally update the other syslog parameters to suit your needs.
+# syslog-enabled no
+
+# Specify the syslog identity.
+# syslog-ident redis
+
+# Specify the syslog facility. Must be USER or between LOCAL0-LOCAL7.
+# syslog-facility local0
+
# Set the number of databases. The default database is DB 0, you can select
# a different one on a per-connection basis using SELECT <dbid> where
# dbid is a number between 0 and 'databases'-1
@@ -104,6 +121,19 @@
#
# masterauth <master-password>
+# When a slave lost the connection with the master, or when the replication
+# is still in progress, the slave can act in two different ways:
+#
+# 1) if slave-serve-stale-data is set to 'yes' (the default) the slave will
+# still reply to client requests, possibly with out of data data, or the
+# data set may just be empty if this is the first synchronization.
+#
+# 2) if slave-serve-stale data is set to 'no' the slave will reply with
+# an error "SYNC with master in progress" to all the kind of commands
+# but to INFO and SLAVEOF.
+#
+slave-serve-stale-data yes
+
################################## SECURITY ###################################
# Require clients to issue AUTH <PASSWORD> before processing any other
@@ -119,6 +149,22 @@
#
# requirepass foobared
+# Command renaming.
+#
+# It is possilbe to change the name of dangerous commands in a shared
+# environment. For instance the CONFIG command may be renamed into something
+# of hard to guess so that it will be still available for internal-use
+# tools but not available for general clients.
+#
+# Example:
+#
+# rename-command CONFIG b840fc02d524045429941cc15f59e41cb7be6c52
+#
+# It is also possilbe to completely kill a command renaming it into
+# an empty string:
+#
+# rename-command CONFIG ""
+
################################### LIMITS ####################################
# Set the max number of connected clients at the same time. By default there
@@ -148,6 +194,37 @@
#
# maxmemory <bytes>
+# MAXMEMORY POLICY: how Redis will select what to remove when maxmemory
+# is reached? You can select among five behavior:
+#
+# volatile-lru -> remove the key with an expire set using an LRU algorithm
+# allkeys-lru -> remove any key accordingly to the LRU algorithm
+# volatile-random -> remove a random key with an expire set
+# allkeys->random -> remove a random key, any key
+# volatile-ttl -> remove the key with the nearest expire time (minor TTL)
+# noeviction -> don't expire at all, just return an error on write operations
+#
+# Note: with all the kind of policies, Redis will return an error on write
+# operations, when there are not suitable keys for eviction.
+#
+# At the date of writing this commands are: set setnx setex append
+# incr decr rpush lpush rpushx lpushx linsert lset rpoplpush sadd
+# sinter sinterstore sunion sunionstore sdiff sdiffstore zadd zincrby
+# zunionstore zinterstore hset hsetnx hmset hincrby incrby decrby
+# getset mset msetnx exec sort
+#
+# The default is:
+#
+# maxmemory-policy volatile-lru
+
+# LRU and minimal TTL algorithms are not precise algorithms but approximated
+# algorithms (in order to save memory), so you can select as well the sample
+# size to check. For instance for default Redis will check three keys and
+# pick the one that was used less recently, you can change the sample size
+# using the following configuration directive.
+#
+# maxmemory-samples 3
+
############################## APPEND ONLY MODE ###############################
# By default Redis asynchronously dumps the dataset on disk. If you can live
@@ -195,6 +272,26 @@
appendfsync everysec
# appendfsync no
+# When the AOF fsync policy is set to always or everysec, and a background
+# saving process (a background save or AOF log background rewriting) is
+# performing a lot of I/O against the disk, in some Linux configurations
+# Redis may block too long on the fsync() call. Note that there is no fix for
+# this currently, as even performing fsync in a different thread will block
+# our synchronous write(2) call.
+#
+# In order to mitigate this problem it's possible to use the following option
+# that will prevent fsync() from being called in the main process while a
+# BGSAVE or BGREWRITEAOF is in progress.
+#
+# This means that while another child is saving the durability of Redis is
+# the same as "appendfsync none", that in pratical terms means that it is
+# possible to lost up to 30 seconds of log in the worst scenario (with the
+# default Linux settings).
+#
+# If you have latency problems turn this to "yes". Otherwise leave it as
+# "no" that is the safest pick from the point of view of durability.
+no-appendfsync-on-rewrite no
+
################################ VIRTUAL MEMORY ###############################
# Virtual Memory allows Redis to work with datasets bigger than the actual
@@ -269,18 +366,26 @@
############################### ADVANCED CONFIG ###############################
-# Glue small output buffers together in order to send small replies in a
-# single TCP packet. Uses a bit more CPU but most of the times it is a win
-# in terms of number of queries per second. Use 'yes' if unsure.
-glueoutputbuf yes
-
# Hashes are encoded in a special way (much more memory efficient) when they
# have at max a given numer of elements, and the biggest element does not
# exceed a given threshold. You can configure this limits with the following
# configuration directives.
-hash-max-zipmap-entries 64
-hash-max-zipmap-value 512
+hash-max-zipmap-entries 512
+hash-max-zipmap-value 64
+# Similarly to hashes, small lists are also encoded in a special way in order
+# to save a lot of space. The special representation is only used when
+# you are under the following limits:
+list-max-ziplist-entries 512
+list-max-ziplist-value 64
+
+# Sets have a special encoding in just one case: when a set is composed
+# of just strings that happens to be integers in radix 10 in the range
+# of 64 bit signed integers.
+# The following configuration setting sets the limit in the size of the
+# set in order to use this special memory saving encoding.
+set-max-intset-entries 512
+
# Active rehashing uses 1 millisecond every 100 milliseconds of CPU time in
# order to help rehashing the main Redis hash table (the one mapping top-level
# keys to values). The hash table implementation redis uses (see dict.c)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20110305/5962dd72/attachment-0001.html>
More information about the macports-changes
mailing list