Import databases/redis.

Redis is an advanced key-value store. It is similar to memcached
but the dataset is not volatile, and values can be strings, exactly
like in memcached, but also lists, sets, and ordered sets. All this
data types can be manipulated with atomic operations to push/pop
elements, add/remove elements, perform server side union, intersection,
difference between sets, and so forth.
In order to be very fast but at the same time persistent the whole
dataset is taken in memory, and from time to time saved on disc
asynchronously (semi persistent mode) or alternatively every change
is written into an append only file (fully persistent mode).

OK sthen@, landry@
This commit is contained in:
dcoppa 2010-10-10 15:50:06 +00:00
parent ff8f05c340
commit 2eb7d2b8a1
6 changed files with 242 additions and 0 deletions

42
databases/redis/Makefile Normal file
View File

@ -0,0 +1,42 @@
# $OpenBSD $
COMMENT = persistent key-value database
DISTNAME = redis-2.0.2
CATEGORIES = databases
HOMEPAGE = http://redis.googlecode.com/
MAINTAINER = David Coppa <dcoppa@openbsd.org>
# BSD
PERMIT_PACKAGE_CDROM = Yes
PERMIT_PACKAGE_FTP = Yes
PERMIT_DISTFILES_CDROM =Yes
PERMIT_DISTFILES_FTP = Yes
MASTER_SITES = ${HOMEPAGE}files/
MODULES = lang/tcl
USE_GMAKE = Yes
FAKE_FLAGS = INSTALL_TOP=${WRKINST}${PREFIX}
# Replace cp by install
MAKE_FLAGS = INSTALL="${INSTALL_PROGRAM}"
WANTLIB += c m pthread
# Warning: executing the test suite can take a long time and will
# consume a lot of cpu cycles
REGRESS_DEPENDS = ${MODTCL_BUILD_DEPENDS}
REGRESS_FLAGS = TCL_BIN="${MODTCL_BIN}"
REGRESS_TARGET = test
post-install:
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/redis
${INSTALL_DATA} ${WRKSRC}/redis.conf \
${PREFIX}/share/examples/redis/
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/redis
${INSTALL_DATA} ${WRKBUILD}/doc/* ${PREFIX}/share/doc/redis/
.include <bsd.port.mk>

5
databases/redis/distinfo Normal file
View File

@ -0,0 +1,5 @@
MD5 (redis-2.0.2.tar.gz) = FlirJRYe/MDQ6YtNHjiphQ==
RMD160 (redis-2.0.2.tar.gz) = P2eASiS2rnf1r1ww16lXw2KhGtE=
SHA1 (redis-2.0.2.tar.gz) = HJWKxzanDmQsqJFa6KwxGaICrk4=
SHA256 (redis-2.0.2.tar.gz) = ClLaLo5T2e+P/IAFVMMlINYRhNh9/uvOOt5htofconU=
SIZE (redis-2.0.2.tar.gz) = 347802

View File

@ -0,0 +1,16 @@
$OpenBSD: patch-Makefile,v 1.1.1.1 2010/10/10 15:50:06 dcoppa Exp $
--- Makefile.orig Fri Oct 8 14:23:50 2010
+++ Makefile Fri Oct 8 14:24:24 2010
@@ -89,10 +89,10 @@ dep:
$(CC) -MM *.c
staticsymbols:
- tclsh utils/build-static-symbols.tcl > staticsymbols.h
+ ${TCL_BIN} utils/build-static-symbols.tcl > staticsymbols.h
test:
- tclsh8.5 tests/test_helper.tcl --tags "${TAGS}"
+ ${TCL_BIN} tests/test_helper.tcl --tags "${TAGS}"
bench:
./redis-benchmark

View File

@ -0,0 +1,16 @@
$OpenBSD: patch-redis_c,v 1.1.1.1 2010/10/10 15:50:06 dcoppa Exp $
Fix an alignment problem that was causing a SIGBUS on strict alignment
archs like SPARC
--- redis.c.orig Fri Oct 8 12:31:46 2010
+++ redis.c Fri Oct 8 12:33:10 2010
@@ -7442,7 +7442,7 @@ static int deleteIfVolatile(redisDb *db, robj *key) {
static void expireGenericCommand(redisClient *c, robj *key, robj *param, long offset) {
dictEntry *de;
- time_t seconds;
+ long seconds;
if (getLongFromObjectOrReply(c, param, &seconds, NULL) != REDIS_OK) return;

View File

@ -0,0 +1,9 @@
Redis is an advanced key-value store. It is similar to memcached, but
the dataset is not volatile, and values can be strings (exactly like in
memcached), but also lists, sets, and ordered sets. All this data types
can be manipulated with atomic operations to push/pop elements, add/remove
elements, perform server side unions, intersections, and so forth.
In order to be very fast but at the same time persistent, the whole
dataset is taken in memory and from time to time and/or when a
number of changes to the dataset are performed, it is written
asynchronously to the disk.

154
databases/redis/pkg/PLIST Normal file
View File

@ -0,0 +1,154 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2010/10/10 15:50:06 dcoppa Exp $
@bin bin/redis-benchmark
@bin bin/redis-check-aof
@bin bin/redis-check-dump
@bin bin/redis-cli
@bin bin/redis-server
share/doc/redis/
share/doc/redis/AppendCommand.html
share/doc/redis/AppendOnlyFileHowto.html
share/doc/redis/AuthCommand.html
share/doc/redis/Benchmarks.html
share/doc/redis/BgrewriteaofCommand.html
share/doc/redis/BgsaveCommand.html
share/doc/redis/BlpopCommand.html
share/doc/redis/CommandReference.html
share/doc/redis/Comparisons.html
share/doc/redis/ConfigCommand.html
share/doc/redis/Configuration.html
share/doc/redis/ConnectionHandlingSidebar.html
share/doc/redis/ControlCommandsSidebar.html
share/doc/redis/Credits.html
share/doc/redis/DbsizeCommand.html
share/doc/redis/DelCommand.html
share/doc/redis/DesignPatterns.html
share/doc/redis/EventLibray.html
share/doc/redis/ExistsCommand.html
share/doc/redis/ExpireCommand.html
share/doc/redis/FAQ.html
share/doc/redis/Features.html
share/doc/redis/FlushallCommand.html
share/doc/redis/FlushdbCommand.html
share/doc/redis/FromSqlToDataStructures.html
share/doc/redis/GenericCommandsSidebar.html
share/doc/redis/GetCommand.html
share/doc/redis/GetsetCommand.html
share/doc/redis/HackingStrings.html
share/doc/redis/HashCommandsSidebar.html
share/doc/redis/Hashes.html
share/doc/redis/HdelCommand.html
share/doc/redis/HexistsCommand.html
share/doc/redis/HgetCommand.html
share/doc/redis/HgetallCommand.html
share/doc/redis/HincrbyCommand.html
share/doc/redis/HlenCommand.html
share/doc/redis/HmgetCommand.html
share/doc/redis/HmsetCommand.html
share/doc/redis/HsetCommand.html
share/doc/redis/HsetnxCommand.html
share/doc/redis/IncrCommand.html
share/doc/redis/InfoCommand.html
share/doc/redis/IntroductionToRedisDataTypes.html
share/doc/redis/KeysCommand.html
share/doc/redis/LastsaveCommand.html
share/doc/redis/LindexCommand.html
share/doc/redis/ListCommandsSidebar.html
share/doc/redis/Lists.html
share/doc/redis/LlenCommand.html
share/doc/redis/LpopCommand.html
share/doc/redis/LrangeCommand.html
share/doc/redis/LremCommand.html
share/doc/redis/LsetCommand.html
share/doc/redis/LtrimCommand.html
share/doc/redis/MgetCommand.html
share/doc/redis/MonitorCommand.html
share/doc/redis/MoveCommand.html
share/doc/redis/MsetCommand.html
share/doc/redis/MultiExecCommand.html
share/doc/redis/NonexistentCommands.html
share/doc/redis/ObjectHashMappers.html
share/doc/redis/Pipelining.html
share/doc/redis/ProgrammingExamples.html
share/doc/redis/ProtocolSpecification.html
share/doc/redis/PublishSubscribe.html
share/doc/redis/QuickStart.html
share/doc/redis/QuitCommand.html
share/doc/redis/README.html
share/doc/redis/RandomkeyCommand.html
share/doc/redis/Redis0100ChangeLog.html
share/doc/redis/Redis0900ChangeLog.html
share/doc/redis/RedisBigData.html
share/doc/redis/RedisCLI.html
share/doc/redis/RedisEventLibrary.html
share/doc/redis/RedisGuides.html
share/doc/redis/RedisInternals.html
share/doc/redis/Redis_1_2_0_Changelog.html
share/doc/redis/Redis_2_0_0_Changelog.html
share/doc/redis/RenameCommand.html
share/doc/redis/RenamenxCommand.html
share/doc/redis/ReplicationHowto.html
share/doc/redis/ReplyTypes.html
share/doc/redis/RoadMap.html
share/doc/redis/RpoplpushCommand.html
share/doc/redis/RpushCommand.html
share/doc/redis/SaddCommand.html
share/doc/redis/SaveCommand.html
share/doc/redis/ScardCommand.html
share/doc/redis/SdiffCommand.html
share/doc/redis/SdiffstoreCommand.html
share/doc/redis/SelectCommand.html
share/doc/redis/SetCommand.html
share/doc/redis/SetCommandsSidebar.html
share/doc/redis/SetexCommand.html
share/doc/redis/SetnxCommand.html
share/doc/redis/Sets.html
share/doc/redis/ShutdownCommand.html
share/doc/redis/SideBar.html
share/doc/redis/SinterCommand.html
share/doc/redis/SinterstoreCommand.html
share/doc/redis/SismemberCommand.html
share/doc/redis/SlaveofCommand.html
share/doc/redis/SmembersCommand.html
share/doc/redis/SmoveCommand.html
share/doc/redis/SortCommand.html
share/doc/redis/SortedSetCommandsSidebar.html
share/doc/redis/SortedSets.html
share/doc/redis/Speed.html
share/doc/redis/SponsorshipHistory.html
share/doc/redis/SpopCommand.html
share/doc/redis/SrandmemberCommand.html
share/doc/redis/SremCommand.html
share/doc/redis/StringCommandsSidebar.html
share/doc/redis/Strings.html
share/doc/redis/SubstrCommand.html
share/doc/redis/SunionCommand.html
share/doc/redis/SunionstoreCommand.html
share/doc/redis/SupportedLanguages.html
share/doc/redis/SupportedPlatforms.html
share/doc/redis/TemplateCommand.html
share/doc/redis/TtlCommand.html
share/doc/redis/TwitterAlikeExample.html
share/doc/redis/TypeCommand.html
share/doc/redis/UDP.html
share/doc/redis/UnstableSource.html
share/doc/redis/VirtualMemorySpecification.html
share/doc/redis/VirtualMemoryUserGuide.html
share/doc/redis/ZaddCommand.html
share/doc/redis/ZcardCommand.html
share/doc/redis/ZincrbyCommand.html
share/doc/redis/ZrangeCommand.html
share/doc/redis/ZrangebyscoreCommand.html
share/doc/redis/ZrankCommand.html
share/doc/redis/ZremCommand.html
share/doc/redis/ZremrangebyrankCommand.html
share/doc/redis/ZremrangebyscoreCommand.html
share/doc/redis/ZscoreCommand.html
share/doc/redis/ZunionCommand.html
share/doc/redis/ZunionstoreCommand.html
share/doc/redis/index.html
share/doc/redis/redis.png
share/doc/redis/style.css
share/examples/redis/
@sample ${SYSCONFDIR}/redis/
share/examples/redis/redis.conf
@sample ${SYSCONFDIR}/redis/redis.conf