[SM-Commit] GIT changes to master grimoire by Vlad Glagolev (e105b02ca8122a74339daa59442e102834f5c1f2)

Vlad Glagolev scm at sourcemage.org
Wed Oct 26 14:48:25 EDT 2011


GIT changes to master grimoire by Vlad Glagolev <stealth at sourcemage.org>:

 ChangeLog                   |    5 +++++
 accounts                    |    1 +
 database/redis/BUILD        |    3 +++
 database/redis/DEPENDS      |    3 +++
 database/redis/DETAILS      |   31 +++++++++++++++++++++++++++++++
 database/redis/HISTORY      |    2 ++
 database/redis/INSTALL      |    8 ++++++++
 database/redis/PRE_BUILD    |   11 +++++++++++
 database/redis/init.d/redis |   16 ++++++++++++++++
 groups                      |    1 +
 php-pear/phpredis/DEPENDS   |    1 +
 php-pear/phpredis/DETAILS   |   16 ++++++++++++++++
 php-pear/phpredis/FINAL     |    5 +++++
 php-pear/phpredis/HISTORY   |    2 ++
 php-pear/phpredis/PRE_BUILD |    4 ++++
 php-pear/phpredis/TRIGGERS  |    1 +
 16 files changed, 110 insertions(+)

New commits:
commit e105b02ca8122a74339daa59442e102834f5c1f2
Author: Vlad Glagolev <stealth at sourcemage.org>
Commit: Vlad Glagolev <stealth at sourcemage.org>

    phpredis: new spell, PHP extension for Redis

commit 41a931d6fef5b3fe63a5a9d43eb9d71400acdcc7
Author: Vlad Glagolev <stealth at sourcemage.org>
Commit: Vlad Glagolev <stealth at sourcemage.org>

    redis: new spell, open source, advanced key-value store

commit efdef39b8777524e972424ea769ef989e23d75af
Author: Vlad Glagolev <stealth at sourcemage.org>
Commit: Vlad Glagolev <stealth at sourcemage.org>

    accounts, groups: added account data for redis

diff --git a/ChangeLog b/ChangeLog
index 4114226..37cdb34 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2011-10-26 Vlad Glagolev <stealth at sourcemage.org>
+	* accounts, groups: added account data for redis
+	* database/redis: new spell, open source, advanced key-value store
+	* php-pear/phpredis: new spell, PHP extension for Redis
+
 2011-10-26 Florian Franzmann <siflfran at hawo.stw.uni-erlangen.de>
 	* python-pypi/boto: new spell, access to Amazon's S3 cloud
 	* python-pypi/duplicity: new spell, a tool for creating encrypted
diff --git a/accounts b/accounts
index 2fe6cab..493f9ab 100755
--- a/accounts
+++ b/accounts
@@ -94,4 +94,5 @@ unbound:185:186
 postgrey:186:187
 dspam:187:188
 nslcd:188:189
+redis:189:190
 nobody:65534:65534
diff --git a/database/redis/BUILD b/database/redis/BUILD
new file mode 100755
index 0000000..5e52595
--- /dev/null
+++ b/database/redis/BUILD
@@ -0,0 +1,3 @@
+create_account redis &&
+
+make V=1 OPTIMIZATION="$CFLAGS"
diff --git a/database/redis/DEPENDS b/database/redis/DEPENDS
new file mode 100755
index 0000000..69567fd
--- /dev/null
+++ b/database/redis/DEPENDS
@@ -0,0 +1,3 @@
+depends pkgconfig &&
+
+suggest_depends SYSTEM-LOGGER "" "" "for syslog support"
diff --git a/database/redis/DETAILS b/database/redis/DETAILS
new file mode 100755
index 0000000..c01c4bc
--- /dev/null
+++ b/database/redis/DETAILS
@@ -0,0 +1,31 @@
+           SPELL=redis
+         VERSION=2.4.1
+          SOURCE=$SPELL-$VERSION.tar.gz
+   SOURCE_URL[0]=http://redis.googlecode.com/files/$SOURCE
+     SOURCE_HASH=sha512:352851b8c536d47624cdef5b9cf5bda39b1d8f81af2c0d4ac257fb35337a39e5c230e94feab0d0832c19fdc848430d17f0d54c910d469fb66cf00c29191a6799
+SOURCE_DIRECTORY="$BUILD_DIRECTORY/$SPELL-$VERSION"
+      LICENSE[0]=BSD
+        WEB_SITE=http://redis.io/
+         ENTERED=20111026
+        KEYWORDS="nosql database"
+           SHORT="open source, advanced key-value store"
+cat << EOF
+Redis is an open source, advanced key-value store. It is often referred to as a
+data structure server since keys can contain strings, hashes, lists, sets and
+sorted sets.
+
+You can run atomic operations on these types, like appending to a string;
+incrementing the value in a hash; pushing to a list; computing set intersection,
+union and difference; or getting the member with highest ranking in a sorted
+set.
+
+In order to achieve its outstanding performance, Redis works with an in-memory
+dataset. Depending on your use case, you can persist it either by dumping the
+dataset to disk every once in a while, or by appending each command to a log.
+
+Redis also supports trivial-to-setup master-slave replication, with very fast
+non-blocking first synchronization, auto-reconnection on net split and so forth.
+
+Other features include a simple check-and-set mechanism, pub/sub and
+configuration settings to make Redis behave like a cache.
+EOF
diff --git a/database/redis/HISTORY b/database/redis/HISTORY
new file mode 100644
index 0000000..a6700f3
--- /dev/null
+++ b/database/redis/HISTORY
@@ -0,0 +1,2 @@
+2011-10-26 Vlad Glagolev <stealth at sourcemage.org>
+	* {PRE_,}BUILD, DEPENDS, DETAILS, INSTALL, init.d/redis
diff --git a/database/redis/INSTALL b/database/redis/INSTALL
new file mode 100755
index 0000000..4a01b12
--- /dev/null
+++ b/database/redis/INSTALL
@@ -0,0 +1,8 @@
+make INSTALL_BIN="$INSTALL_ROOT/usr/bin" PREFIX="$INSTALL_ROOT/usr" install &&
+
+install -d -o redis -g redis -vm 750 "$INSTALL_ROOT/var/lib/redis" &&
+install_config_file redis.conf "$INSTALL_ROOT/etc/redis.conf" &&
+
+if [[ $INIT_INSTALLED ]]; then
+  install -d -o redis -g redis -vm 755 "$INSTALL_ROOT/var/run/redis"
+fi
diff --git a/database/redis/PRE_BUILD b/database/redis/PRE_BUILD
new file mode 100755
index 0000000..64efed5
--- /dev/null
+++ b/database/redis/PRE_BUILD
@@ -0,0 +1,11 @@
+default_pre_build &&
+cd "$SOURCE_DIRECTORY" &&
+
+sedit "s:dir ./:dir /var/lib/redis:" redis.conf &&
+
+if [[ $INIT_INSTALLED ]]; then
+  sedit "s:daemonize no:daemonize yes:" redis.conf &&
+  sedit "s:redis.pid:redis/redis.pid:" redis.conf &&
+  sedit "s:logfile stdout:# logfile stdout:" redis.conf &&
+  sedit "s:# syslog-enabled no:syslog-enabled yes:" redis.conf
+fi
diff --git a/database/redis/init.d/redis b/database/redis/init.d/redis
new file mode 100755
index 0000000..8584f0c
--- /dev/null
+++ b/database/redis/init.d/redis
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+PROGRAM=/usr/bin/redis-server
+PIDFILE=/var/run/redis/redis.pid
+ARGS="/etc/redis.conf"
+RUNLEVEL=3
+NEEDS="+network"
+
+start() {
+  echo "Starting $NAME..."
+
+  su redis -s /bin/sh -c "$PROGRAM $ARGS"
+  evaluate_retval
+}
+
+. /etc/init.d/smgl_init
diff --git a/groups b/groups
index 4c37b66..3ceaa0b 100755
--- a/groups
+++ b/groups
@@ -114,5 +114,6 @@ unbound:186:
 postgrey:187:
 dspam:188:
 nslcd:189:
+redis:190:
 users:1000:
 nogroup:65534:
diff --git a/php-pear/phpredis/DEPENDS b/php-pear/phpredis/DEPENDS
new file mode 100755
index 0000000..0bbf486
--- /dev/null
+++ b/php-pear/phpredis/DEPENDS
@@ -0,0 +1 @@
+depends PHP
diff --git a/php-pear/phpredis/DETAILS b/php-pear/phpredis/DETAILS
new file mode 100755
index 0000000..daf2379
--- /dev/null
+++ b/php-pear/phpredis/DETAILS
@@ -0,0 +1,16 @@
+           SPELL=phpredis
+         VERSION=2.1.3
+     VERSION_REV=43bc590
+          SOURCE=nicolasff-$SPELL-$VERSION-0-$VERSION_REV.tar.gz
+   SOURCE_URL[0]=https://github.com/nicolasff/$SPELL/tarball/$VERSION
+    SOURCE_HINTS=no-check-certificate
+     SOURCE_HASH=sha512:8a6fe9008eb8092c4fc0ad66ae510aea81ec3a79d5c2f812266cbf48a6710f1d3acb57c13087b1389e7e8506acfd073c04f317e3bbfdb21a050a3f3560920c4a
+SOURCE_DIRECTORY="$BUILD_DIRECTORY/nicolasff-$SPELL-$VERSION_REV"
+        WEB_SITE=http://github.com/nicolasff/phpredis/
+         ENTERED=20111026
+      LICENSE[0]=PHP
+           SHORT="PHP extension for Redis"
+cat << EOF
+The phpredis extension provides an API for communicating with the Redis
+key-value store.
+EOF
diff --git a/php-pear/phpredis/FINAL b/php-pear/phpredis/FINAL
new file mode 100755
index 0000000..0ddd683
--- /dev/null
+++ b/php-pear/phpredis/FINAL
@@ -0,0 +1,5 @@
+local PHP_EXT=$(php-config --extension-dir) &&
+
+message "${MESSAGE_COLOR}\n" \
+        "Don't forget to add the following line to your php.ini:\n" \
+        "extension = \"$PHP_EXT/redis.so\"${DEFAULT_COLOR}"
diff --git a/php-pear/phpredis/HISTORY b/php-pear/phpredis/HISTORY
new file mode 100644
index 0000000..67e0fac
--- /dev/null
+++ b/php-pear/phpredis/HISTORY
@@ -0,0 +1,2 @@
+2011-10-26 Vlad Glagolev <stealth at sourcemage.org>
+	* DETAILS, DEPENDS, PRE_BUILD, FINAL, TRIGGERS: spell created
diff --git a/php-pear/phpredis/PRE_BUILD b/php-pear/phpredis/PRE_BUILD
new file mode 100755
index 0000000..7f85d2f
--- /dev/null
+++ b/php-pear/phpredis/PRE_BUILD
@@ -0,0 +1,4 @@
+default_pre_build &&
+cd "$SOURCE_DIRECTORY" &&
+
+phpize
diff --git a/php-pear/phpredis/TRIGGERS b/php-pear/phpredis/TRIGGERS
new file mode 100755
index 0000000..fa2f0ec
--- /dev/null
+++ b/php-pear/phpredis/TRIGGERS
@@ -0,0 +1 @@
+on_cast php cast_self


More information about the SM-Commit mailing list