summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Lauer <patrick@gentoo.org>2009-10-09 23:45:18 +0000
committerPatrick Lauer <patrick@gentoo.org>2009-10-09 23:45:18 +0000
commite49f502d46ab29bcb5dde83d41b9907cd5c2f4c0 (patch)
treec3e615ca51ecf18c9d2010b455808d48349e96fc /net-misc/tokyotyrant/files
parentInitial import of tokyocabinet. Thanks to Petteri Raety, Mark Lewandowski and... (diff)
downloadhistorical-e49f502d46ab29bcb5dde83d41b9907cd5c2f4c0.tar.gz
historical-e49f502d46ab29bcb5dde83d41b9907cd5c2f4c0.tar.bz2
historical-e49f502d46ab29bcb5dde83d41b9907cd5c2f4c0.zip
Initial import of tokyotyrant. Thanks to Johan Bergstroem for the ebuild. Closes #288265
Package-Manager: portage-2.2_rc44/cvs/Linux x86_64
Diffstat (limited to 'net-misc/tokyotyrant/files')
-rw-r--r--net-misc/tokyotyrant/files/fix_makefiles.patch72
-rw-r--r--net-misc/tokyotyrant/files/fix_testsuite.patch104
-rw-r--r--net-misc/tokyotyrant/files/tokyotyrant.confd15
-rw-r--r--net-misc/tokyotyrant/files/tokyotyrant.initd38
4 files changed, 229 insertions, 0 deletions
diff --git a/net-misc/tokyotyrant/files/fix_makefiles.patch b/net-misc/tokyotyrant/files/fix_makefiles.patch
new file mode 100644
index 000000000000..594964cb4203
--- /dev/null
+++ b/net-misc/tokyotyrant/files/fix_makefiles.patch
@@ -0,0 +1,72 @@
+diff -ur Makefile.in Makefile.in.new
+--- Makefile.in 2009-08-04 09:42:37.000000000 +0200
++++ Makefile.in 2009-10-08 20:53:16.000000000 +0200
+@@ -58,8 +58,8 @@
+ LDFLAGS = @MYLDFLAGS@
+ CMDLDFLAGS = @MYCMDLDFLAGS@
+ LIBS = @LIBS@
+-LDENV = LD_RUN_PATH=/lib:/usr/lib:$(LIBDIR):$(HOME)/lib:/usr/local/lib:@MYRUNPATH@:.
+-RUNENV = @MYLDLIBPATHENV@=.:/lib:/usr/lib:$(LIBDIR):$(HOME)/lib:/usr/local/lib:@MYRUNPATH@
++LDENV =
++RUNENV = @MYLDLIBPATHENV@=.:$(LIBDIR)
+ POSTCMD = @MYPOSTCMD@
+
+
+@@ -120,8 +120,6 @@
+ cp -Rf $(LIBRARYFILES) $(DESTDIR)$(LIBDIR)
+ mkdir -p $(DESTDIR)$(BINDIR)
+ cp -Rf $(COMMANDFILES) $(DESTDIR)$(BINDIR)
+- mkdir -p $(DESTDIR)$(SBINDIR)
+- cp -Rf $(INITFILES) $(DESTDIR)$(SBINDIR)
+ mkdir -p $(DESTDIR)$(DATADIR)
+ cp -Rf $(SCREXTFILES) $(DOCUMENTFILES) $(DESTDIR)$(DATADIR)
+ mkdir -p $(DESTDIR)$(MAN1DIR)
+diff -ur configure.in configure.in.new
+--- configure.in 2009-09-17 17:26:04.000000000 +0200
++++ configure.in 2009-10-08 20:53:57.000000000 +0200
+@@ -28,33 +28,15 @@
+ MYPCFILES="tokyotyrant.pc"
+
+ # Building flags
+-MYCFLAGS="-std=c99 -Wall -fPIC -fsigned-char -O2"
++MYCFLAGS="-std=c99 -Wall -fPIC -fsigned-char"
+ MYCPPFLAGS="-I. -I\$(INCLUDEDIR) -I$HOME/include -I/usr/local/include"
+ MYCPPFLAGS="$MYCPPFLAGS -DNDEBUG -D_GNU_SOURCE=1 -D_REENTRANT -D__EXTENSIONS__"
+-MYLDFLAGS="-L. -L\$(LIBDIR) -L$HOME/lib -L/usr/local/lib"
++MYLDFLAGS="-L. -L\$(LIBDIR)"
+ MYCMDLDFLAGS=""
+ MYRUNPATH="\$(LIBDIR)"
+ MYLDLIBPATHENV="LD_LIBRARY_PATH"
+ MYPOSTCMD="true"
+
+-# Building paths
+-PATH="$PATH:$HOME/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin"
+-PATH="$PATH:/opt/SUNWspro/bin:/usr/ccs/bin:/usr/xpg4/bin:/usr/xpg6/bin:/usr/ucb"
+-CPATH="$HOME/include:/usr/local/include:$CPATH"
+-LIBRARY_PATH="$HOME/lib:/usr/local/lib:$LIBRARY_PATH"
+-LD_LIBRARY_PATH="$HOME/lib:/usr/local/lib:$LD_LIBRARY_PATH"
+-PKG_CONFIG_PATH="$HOME/lib/pkgconfig:/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH"
+-export PATH CPATH LIBRARY_PATH LD_LIBRARY_PATH PKG_CONFIG_PATH
+-if type pkg-config > /dev/null 2>&1
+-then
+- PATH="$PATH:`pkg-config --variable=bindir tokyocabinet`"
+- CPATH="$CPATH:`pkg-config --variable=includedir tokyocabinet`"
+- LIBRARY_PATH="$LIBRARY_PATH:`pkg-config --variable=libdir tokyocabinet`"
+- LD_LIBRARY_PATH="$LD_LIBRARY_PATH:`pkg-config --variable=libdir tokyocabinet`"
+-fi
+-
+-
+-
+ #================================================================
+ # Options
+ #================================================================
+diff -ur tokyotyrant.pc.in tokyotyrant.pc.in.new
+--- tokyotyrant.pc.in 2008-02-18 08:29:28.000000000 +0100
++++ tokyotyrant.pc.in.new 2009-10-08 20:54:12.000000000 +0200
+@@ -10,5 +10,5 @@
+ Name: Tokyo Tyrant
+ Description: network interface of Tokyo Cabinet
+ Version: @PACKAGE_VERSION@
+-Libs: -L${libdir} -ltokyotyrant @LIBS@
++Libs: -L${libdir} -ltokyotyrant
+ Cflags: -I${includedir}
diff --git a/net-misc/tokyotyrant/files/fix_testsuite.patch b/net-misc/tokyotyrant/files/fix_testsuite.patch
new file mode 100644
index 000000000000..9ece96f71296
--- /dev/null
+++ b/net-misc/tokyotyrant/files/fix_testsuite.patch
@@ -0,0 +1,104 @@
+--- Makefile.in 2009-10-08 20:53:16.000000000 +0200
++++ Makefile.in.new 2009-10-08 21:32:19.000000000 +0200
+@@ -168,49 +168,50 @@
+
+
+ check :
++ $(RUNENV) $(RUNCMD) ./ttserver -dmn -host 127.0.0.1 -port 19781 -pid /tmp/tttest.pid /tmp/tttest.tch
+ rm -rf casket* ulog
+ $(RUNENV) $(RUNCMD) ./tcrmgr version
+- $(RUNENV) $(RUNCMD) ./tcrtest write -cnum 5 -tout 5 -rnd 127.0.0.1 50000
+- $(RUNENV) $(RUNCMD) ./tcrtest write -cnum 5 -tout 5 -nr -rnd 127.0.0.1 50000
+- $(RUNENV) $(RUNCMD) ./tcrtest write -cnum 5 -tout 5 127.0.0.1 50000
+- $(RUNENV) $(RUNCMD) ./tcrtest read -cnum 5 -tout 5 127.0.0.1
+- $(RUNENV) $(RUNCMD) ./tcrtest read -cnum 5 -tout 5 -mul 5 127.0.0.1
+- $(RUNENV) $(RUNCMD) ./tcrtest remove -cnum 5 -tout 5 127.0.0.1
+- $(RUNENV) $(RUNCMD) ./tcrtest rcat -cnum 5 -tout 5 127.0.0.1 50000
+- $(RUNENV) $(RUNCMD) ./tcrtest rcat -cnum 5 -tout 5 -shl 50 127.0.0.1 50000
+- $(RUNENV) $(RUNCMD) ./tcrmgr vanish 127.0.0.1
+- $(RUNENV) $(RUNCMD) ./tcrtest rcat -cnum 5 -tout 5 -dad 127.0.0.1 50000
+- $(RUNENV) $(RUNCMD) ./tcrtest rcat -cnum 5 -tout 5 -ext putcat -xlr 127.0.0.1 50000
+- $(RUNENV) $(RUNCMD) ./tcrtest misc -cnum 5 -tout 5 127.0.0.1 5000
+- $(RUNENV) $(RUNCMD) ./tcrtest wicked -cnum 5 -tout 5 127.0.0.1 5000
+- $(RUNENV) $(RUNCMD) ./tcrmgr inform 127.0.0.1
+- $(RUNENV) $(RUNCMD) ./tcrmgr vanish 127.0.0.1
+- $(RUNENV) $(RUNCMD) ./tcrmttest write -tnum 5 127.0.0.1 5000
+- $(RUNENV) $(RUNCMD) ./tcrmttest read -tnum 5 127.0.0.1
+- $(RUNENV) $(RUNCMD) ./tcrmttest remove -tnum 5 127.0.0.1
+- $(RUNENV) $(RUNCMD) ./tcrmttest write -tnum 5 -ext putcat -rnd 127.0.0.1 5000
+- $(RUNENV) $(RUNCMD) ./tcrmttest typical -tnum 5 127.0.0.1 5000
+- $(RUNENV) $(RUNCMD) ./tcrmgr vanish 127.0.0.1
+- $(RUNENV) $(RUNCMD) ./tcrmgr put 127.0.0.1 one first
+- $(RUNENV) $(RUNCMD) ./tcrmgr put 127.0.0.1 two second
+- $(RUNENV) $(RUNCMD) ./tcrmgr put -dk 127.0.0.1 three third
+- $(RUNENV) $(RUNCMD) ./tcrmgr put -dc 127.0.0.1 three third
+- $(RUNENV) $(RUNCMD) ./tcrmgr put -dc 127.0.0.1 three third
+- $(RUNENV) $(RUNCMD) ./tcrmgr put -dc 127.0.0.1 three third
+- $(RUNENV) $(RUNCMD) ./tcrmgr put 127.0.0.1 four fourth
+- $(RUNENV) $(RUNCMD) ./tcrmgr put -dk 127.0.0.1 five fifth
+- $(RUNENV) $(RUNCMD) ./tcrmgr out 127.0.0.1 one
+- $(RUNENV) $(RUNCMD) ./tcrmgr out 127.0.0.1 two
+- $(RUNENV) $(RUNCMD) ./tcrmgr get 127.0.0.1 three > check.out
+- $(RUNENV) $(RUNCMD) ./tcrmgr get 127.0.0.1 four > check.out
+- $(RUNENV) $(RUNCMD) ./tcrmgr get 127.0.0.1 five > check.out
+- $(RUNENV) $(RUNCMD) ./tcrmgr mget 127.0.0.1 one two three four five > check.out
+- $(RUNENV) $(RUNCMD) ./tcrmgr misc 127.0.0.1 putlist six sixth seven seventh
+- $(RUNENV) $(RUNCMD) ./tcrmgr misc 127.0.0.1 outlist six
+- $(RUNENV) $(RUNCMD) ./tcrmgr misc 127.0.0.1 getlist three four five six > check.out
+- $(RUNENV) $(RUNCMD) ./tcrmgr list -pv 127.0.0.1 > check.out
+- $(RUNENV) $(RUNCMD) ./tcrmgr list -pv -fm f 127.0.0.1 > check.out
+- $(RUNENV) $(RUNCMD) ./tcrmgr http -ih http://127.0.0.1:1978/five > check.out
++ $(RUNENV) $(RUNCMD) ./tcrtest write -port 19781 -cnum 5 -tout 5 -rnd 127.0.0.1 50000
++ $(RUNENV) $(RUNCMD) ./tcrtest write -port 19781 -cnum 5 -tout 5 -nr -rnd 127.0.0.1 50000
++ $(RUNENV) $(RUNCMD) ./tcrtest write -port 19781 -cnum 5 -tout 5 127.0.0.1 50000
++ $(RUNENV) $(RUNCMD) ./tcrtest read -port 19781 -cnum 5 -tout 5 127.0.0.1
++ $(RUNENV) $(RUNCMD) ./tcrtest read -port 19781 -cnum 5 -tout 5 -mul 5 127.0.0.1
++ $(RUNENV) $(RUNCMD) ./tcrtest remove -port 19781 -cnum 5 -tout 5 127.0.0.1
++ $(RUNENV) $(RUNCMD) ./tcrtest rcat -port 19781 -cnum 5 -tout 5 127.0.0.1 50000
++ $(RUNENV) $(RUNCMD) ./tcrtest rcat -port 19781 -cnum 5 -tout 5 -shl 50 127.0.0.1 50000
++ $(RUNENV) $(RUNCMD) ./tcrmgr vanish -port 19781 127.0.0.1
++ $(RUNENV) $(RUNCMD) ./tcrtest rcat -port 19781 -cnum 5 -tout 5 -dad 127.0.0.1 50000
++ $(RUNENV) $(RUNCMD) ./tcrtest rcat -port 19781 -cnum 5 -tout 5 -ext putcat -xlr 127.0.0.1 50000
++ $(RUNENV) $(RUNCMD) ./tcrtest misc -port 19781 -cnum 5 -tout 5 127.0.0.1 5000
++ $(RUNENV) $(RUNCMD) ./tcrtest wicked -port 19781 -cnum 5 -tout 5 127.0.0.1 5000
++ $(RUNENV) $(RUNCMD) ./tcrmgr inform -port 19781 127.0.0.1
++ $(RUNENV) $(RUNCMD) ./tcrmgr vanish -port 19781 127.0.0.1
++ $(RUNENV) $(RUNCMD) ./tcrmttest write -port 19781 -tnum 5 127.0.0.1 5000
++ $(RUNENV) $(RUNCMD) ./tcrmttest read -port 19781 -tnum 5 127.0.0.1
++ $(RUNENV) $(RUNCMD) ./tcrmttest remove -port 19781 -tnum 5 127.0.0.1
++ $(RUNENV) $(RUNCMD) ./tcrmttest write -port 19781 -tnum 5 -ext putcat -rnd 127.0.0.1 5000
++ $(RUNENV) $(RUNCMD) ./tcrmttest typical -port 19781 -tnum 5 127.0.0.1 5000
++ $(RUNENV) $(RUNCMD) ./tcrmgr vanish -port 19781 127.0.0.1
++ $(RUNENV) $(RUNCMD) ./tcrmgr put -port 19781 127.0.0.1 one first
++ $(RUNENV) $(RUNCMD) ./tcrmgr put -port 19781 127.0.0.1 two second
++ $(RUNENV) $(RUNCMD) ./tcrmgr put -port 19781 -dk 127.0.0.1 three third
++ $(RUNENV) $(RUNCMD) ./tcrmgr put -port 19781 -dc 127.0.0.1 three third
++ $(RUNENV) $(RUNCMD) ./tcrmgr put -port 19781 -dc 127.0.0.1 three third
++ $(RUNENV) $(RUNCMD) ./tcrmgr put -port 19781 -dc 127.0.0.1 three third
++ $(RUNENV) $(RUNCMD) ./tcrmgr put -port 19781 127.0.0.1 four fourth
++ $(RUNENV) $(RUNCMD) ./tcrmgr put -port 19781 -dk 127.0.0.1 five fifth
++ $(RUNENV) $(RUNCMD) ./tcrmgr out -port 19781 127.0.0.1 one
++ $(RUNENV) $(RUNCMD) ./tcrmgr out -port 19781 127.0.0.1 two
++ $(RUNENV) $(RUNCMD) ./tcrmgr get -port 19781 127.0.0.1 three > check.out
++ $(RUNENV) $(RUNCMD) ./tcrmgr get -port 19781 127.0.0.1 four > check.out
++ $(RUNENV) $(RUNCMD) ./tcrmgr get -port 19781 127.0.0.1 five > check.out
++ $(RUNENV) $(RUNCMD) ./tcrmgr mget -port 19781 127.0.0.1 one two three four five > check.out
++ $(RUNENV) $(RUNCMD) ./tcrmgr misc -port 19781 127.0.0.1 putlist six sixth seven seventh
++ $(RUNENV) $(RUNCMD) ./tcrmgr misc -port 19781 127.0.0.1 outlist six
++ $(RUNENV) $(RUNCMD) ./tcrmgr misc -port 19781 127.0.0.1 getlist three four five six > check.out
++ $(RUNENV) $(RUNCMD) ./tcrmgr list -port 19781 -pv 127.0.0.1 > check.out
++ $(RUNENV) $(RUNCMD) ./tcrmgr list -port 19781 -pv -fm f 127.0.0.1 > check.out
++ $(RUNENV) $(RUNCMD) ./tcrmgr http -ih http://127.0.0.1:19781/five > check.out
+ rm -rf ulog ; mkdir -p ulog
+ $(RUNENV) $(RUNCMD) ./ttultest write -lim 10000 ulog 5000
+ $(RUNENV) $(RUNCMD) ./ttultest write -lim 10000 -as ulog 5000
+@@ -219,6 +220,9 @@
+ $(RUNENV) $(RUNCMD) ./ttultest thread -lim 10000 ulog 5 5000
+ $(RUNENV) $(RUNCMD) ./ttultest thread -lim 10000 -as ulog 5 5000
+ rm -rf casket* ulog
++
++ kill `cat /tmp/tttest.pid`
++ rm /tmp/tttest.tch
+ @printf '\n'
+ @printf '#================================================================\n'
+ @printf '# Checking completed.\n'
diff --git a/net-misc/tokyotyrant/files/tokyotyrant.confd b/net-misc/tokyotyrant/files/tokyotyrant.confd
new file mode 100644
index 000000000000..b6417134f47c
--- /dev/null
+++ b/net-misc/tokyotyrant/files/tokyotyrant.confd
@@ -0,0 +1,15 @@
+# Tokyo tyrant config
+
+# Listening options
+TT_HOST=127.0.0.1
+TT_PORT=1978
+
+# Database file - please refer to man ttserver for alternatives
+TT_DB="/var/lib/tokyotyrant/casket.tch#bnum=1000000#opts=ld"
+
+# ttserver accepts a wide range of options, put them here
+TT_OPTS=""
+
+# don't change these
+TT_PID=/var/run/tokyotyrant/db.pid
+TT_LOG=/var/log/tokyotyrant/db.log \ No newline at end of file
diff --git a/net-misc/tokyotyrant/files/tokyotyrant.initd b/net-misc/tokyotyrant/files/tokyotyrant.initd
new file mode 100644
index 000000000000..132b71098d0a
--- /dev/null
+++ b/net-misc/tokyotyrant/files/tokyotyrant.initd
@@ -0,0 +1,38 @@
+#!/sbin/runscript
+
+opts="${opts} configtest reload"
+
+depend() {
+ need net
+}
+
+start() {
+ configtest || return 1
+ ebegin "Starting tokyo tyrant"
+ start-stop-daemon --start --exec /usr/bin/ttserver -- \
+ -pid ${TT_PID} -dmn -host ${TT_HOST} -log ${TT_LOG} \
+ -port ${TT_PORT} ${TT_OPTS} ${TT_DB}
+ eend $? "Failed to start tokyo tyrant"
+}
+
+stop() {
+ configtest || return 1
+ ebegin "Stopping tokyo tyrant"
+ start-stop-daemon --stop --pidfile ${TT_PID}
+ eend $? "Failed to stop tokyo tyrant"
+ rm -f ${TT_PID}
+}
+
+reload() {
+ configtest || return 1
+ ebegin "Gracefully restarting tokyo tyrant"
+ kill -HUP `cat ${TT_PID}` &>/dev/null
+ eend $? "Failed to reload tokyo tyrant"
+}
+
+configtest() {
+ if [ -z "${TT_DB}" ] || [ -z "${TT_PORT}" ] ; then
+ eerror "Please check your configuration"
+ eend $?
+ fi
+} \ No newline at end of file