[Erp5-report] r28733 - in /spec/mandriva: flare/ tokyocabinet/

nobody at svn.erp5.org nobody at svn.erp5.org
Tue Sep 1 20:28:10 CEST 2009


Author: kazuhiko
Date: Tue Sep  1 20:28:09 2009
New Revision: 28733

URL: http://svn.erp5.org?rev=28733&view=rev
Log:
initial import of two packages.
* tokyocabinet-1.4.32 based on mandriva cooker package.
* flare-1.0.8.

Added:
    spec/mandriva/flare/
    spec/mandriva/flare/flare-1.0.8-close-archive.patch
    spec/mandriva/flare/flare-1.0.8-daemonize-timing.patch
    spec/mandriva/flare/flare-1.0.8-no-umask.patch
    spec/mandriva/flare/flare.init
    spec/mandriva/flare/flare.spec
    spec/mandriva/flare/flared.conf
    spec/mandriva/flare/flarei.conf
    spec/mandriva/tokyocabinet/
    spec/mandriva/tokyocabinet/tokyocabinet-1.4.9-lzmalib_linkage_fix.diff
    spec/mandriva/tokyocabinet/tokyocabinet-mdv_conf.diff
    spec/mandriva/tokyocabinet/tokyocabinet.spec

Added: spec/mandriva/flare/flare-1.0.8-close-archive.patch
URL: http://svn.erp5.org/spec/mandriva/flare/flare-1.0.8-close-archive.patch?rev=28733&view=auto
==============================================================================
--- spec/mandriva/flare/flare-1.0.8-close-archive.patch (added)
+++ spec/mandriva/flare/flare-1.0.8-close-archive.patch [utf8] Tue Sep  1 20:28:09 2009
@@ -1,0 +1,17 @@
+--- flare-1.0.8/src/lib/cluster.cc.orig	2009-02-03 11:09:06.000000000 +0100
++++ flare-1.0.8/src/lib/cluster.cc	2009-06-05 15:56:38.000000000 +0200
+@@ -1198,9 +1198,11 @@
+ 		return -1;
+ 	}
+ 
+-	archive::xml_oarchive oa(ofs);
+-	oa << serialization::make_nvp("node_map", (const node_map&)this->_node_map);
+-	oa << serialization::make_nvp("thread_type", (const int&)this->_thread_type);
++	{
++		archive::xml_oarchive oa(ofs);
++		oa << serialization::make_nvp("node_map", (const node_map&)this->_node_map);
++		oa << serialization::make_nvp("thread_type", (const int&)this->_thread_type);
++	}
+ 
+ 	ofs.close();
+ 

Added: spec/mandriva/flare/flare-1.0.8-daemonize-timing.patch
URL: http://svn.erp5.org/spec/mandriva/flare/flare-1.0.8-daemonize-timing.patch?rev=28733&view=auto
==============================================================================
--- spec/mandriva/flare/flare-1.0.8-daemonize-timing.patch (added)
+++ spec/mandriva/flare/flare-1.0.8-daemonize-timing.patch [utf8] Tue Sep  1 20:28:09 2009
@@ -1,0 +1,28 @@
+--- flare-1.0.8/src/flared/flared.cc.orig	2009-02-03 11:09:06.000000000 +0100
++++ flare-1.0.8/src/flared/flared.cc	2009-06-05 16:49:21.000000000 +0200
+@@ -145,12 +145,6 @@
+ 		return -1;
+ 	}
+ 
+-	if (ini_option_object().is_daemonize()) {
+-		if (this->_daemonize() < 0) {
+-			return -1;
+-		}
+-	}
+-
+ 	if (this->_set_signal_handler() < 0) {
+ 		return -1;
+ 	}
+@@ -203,6 +197,12 @@
+ 	}
+ #endif
+ 
++	if (ini_option_object().is_daemonize()) {
++		if (this->_daemonize() < 0) {
++			return -1;
++		}
++	}
++
+ 	if (this->_set_pid() < 0) {
+ 		return -1;
+ 	}

Added: spec/mandriva/flare/flare-1.0.8-no-umask.patch
URL: http://svn.erp5.org/spec/mandriva/flare/flare-1.0.8-no-umask.patch?rev=28733&view=auto
==============================================================================
--- spec/mandriva/flare/flare-1.0.8-no-umask.patch (added)
+++ spec/mandriva/flare/flare-1.0.8-no-umask.patch [utf8] Tue Sep  1 20:28:09 2009
@@ -1,0 +1,11 @@
+--- flare-1.0.8/src/lib/app.cc	2009-06-04 21:26:01.000000000 +0200
++++ flare-1.0.8/src/lib/app.cc	2009-02-03 11:09:06.000000000 +0100
+@@ -107,8 +107,6 @@
+ 	dup2(0, 1);
+ 	dup2(0, 2);
+ 
+-	umask(0);
+-
+ 	return 0;
+ }
+ 

Added: spec/mandriva/flare/flare.init
URL: http://svn.erp5.org/spec/mandriva/flare/flare.init?rev=28733&view=auto
==============================================================================
--- spec/mandriva/flare/flare.init (added)
+++ spec/mandriva/flare/flare.init [utf8] Tue Sep  1 20:28:09 2009
@@ -1,0 +1,209 @@
+#! /bin/sh
+#
+# chkconfig: 345 55 45
+# description: memcached compatible key value db.
+# processname: memcached
+# config: /etc/flared
+# pidfile: /var/lib/flare/flare.pid
+### BEGIN INIT INFO
+# Provides: memcached
+# Required-Start: $network
+# Required-Stop: $network
+# Default-Start: 3 4 5
+# Short-Description: memcached compatible key value db.
+# Description: memcached compatible key value db.
+### END INIT INFO
+
+# Source function library.
+. /etc/rc.d/init.d/functions
+
+RUN_INDEX=yes
+RUN_NODE=yes
+DAEMON_INDEX=/usr/bin/flarei
+DAEMON_NODE=/usr/bin/flared
+DAEMON_USER=flare
+DESC=flare
+DESC_INDEX=`basename $DAEMON_INDEX`
+DESC_NODE=`basename $DAEMON_NODE`
+NAME=flare
+NAME_INDEX=$DESC_INDEX
+NAME_NODE=$DESC_NODE
+CONF_INDEX=/etc/flare/flarei.conf
+CONF_NODE=/etc/flare/flared.conf
+DATA_INDEX=/var/lib/flare
+DATA_NODE=/var/lib/flare
+LOCK_FILE=/var/lock/subsys/flare
+
+test -x $DAEMON_INDEX || exit 0
+test -x $DAEMON_NODE || exit 0
+
+if [ -f /etc/sysconfig/flare ] ; then
+  . /etc/sysconfig/flare
+fi
+
+start(){
+  echo "Starting $DESC: "
+  start_index
+  sleep 1
+  start_node
+  echo ""
+}
+
+start_index() {
+  if [ $RUN_INDEX = "yes" ]; then
+    echo -n "Starting $DESC_INDEX: "
+    daemon --user $DAEMON_USER --pidfile $DATA_INDEX/$NAME_INDEX.pid $DAEMON_INDEX -f $CONF_INDEX --daemonize
+    RETVAL=$?
+    echo
+    [ $RETVAL -eq 0 ] && touch $LOCK_FILE-index
+  else
+    echo "$DESC_INDEX disabled (skip starting)."
+  fi
+}
+
+start_node() {
+  if [ $RUN_NODE = "yes" ]; then
+    echo -n "Starting $DESC_NODE: "
+    daemon --user $DAEMON_USER --pidfile $DATA_NODE/$NAME_NODE.pid $DAEMON_NODE -f $CONF_NODE --daemonize
+    RETVAL=$?
+    echo
+    [ $RETVAL -eq 0 ] && touch $LOCK_FILE-node
+  else
+    echo "$DESC_NODE disabled (skip starting)."
+  fi
+}
+
+stop() {
+  echo "Stopping $DESC: "
+  stop_node
+  stop_index
+}
+
+stop_index() {
+  if [ $RUN_INDEX = "yes" ]; then
+    echo -n "Stopping $DESC_INDEX: "
+    killproc -p $DATA_INDEX/$NAME_INDEX.pid $DAEMON_INDEX
+    RETVAL=$?
+    echo
+    if [ $RETVAL -eq 0 ] ; then
+      rm -f $DATA_INDEX/$NAME_INDEX.pid
+      rm -f $LOCK_FILE-index
+    fi
+  else
+    echo "$DESC_INDEX disabled (skip stopping)."
+  fi
+}
+
+stop_node() {
+  if [ $RUN_NODE = "yes" ]; then
+    echo -n "Stopping $DESC_NODE: "
+    killproc -p $DATA_NODE/$NAME_NODE.pid $DAEMON_NODE
+    RETVAL=$?
+    echo
+    if [ $RETVAL -eq 0 ] ; then
+      rm -f $DATA_NODE/$NAME_NODE.pid
+      rm -f $LOCK_FILE-node
+    fi
+    gprintf "waiting 10 seconds so that flarei can detect the flared state...\n"
+    sleep 10
+  else
+    echo "$DESC_NODE disabled (skip stopping)."
+  fi
+}
+
+reload() {
+  echo "Reloading $DESC: "
+  reload_index
+  reload_node
+}
+
+reload_index() {
+  if [ $RUN_INDEX = "yes" ]; then
+    echo -n "Reloading $DESC_INDEX: "
+    killproc -p $DATA_INDEX/$NAME_INDEX.pid $DAEMON_INDEX -HUP
+    RETVAL=$?
+    echo
+  else
+    echo "$DESC_INDEX disabled (skip reloading)."
+  fi
+}
+
+reload_node() {
+  if [ $RUN_NODE = "yes" ]; then
+    echo -n "Reloading  $DESC_NODE: "
+    killproc -p $DATA_NODE/$NAME_NODE.pid $DAEMON_NODE -HUP
+    RETVAL=$?
+    echo
+  else
+    echo "$DESC_NODE disabled (skip reloading)."
+  fi
+}
+
+restart() {
+  stop
+  start
+}
+
+restart_index() {
+  if [ $RUN_INDEX = "yes" ]; then
+    stop_index
+    start_index
+  else
+    echo "$DESC_INDEX disabled (skip restarting)."
+  fi
+}
+
+restart_node() {
+  if [ $RUN_NODE = "yes" ]; then
+    stop_node
+    start_node
+  else
+    echo "$DESC_NODE disabled (skip restarting)."
+  fi
+}
+
+case "$1" in
+  start)
+    start
+  ;;
+  start-index)
+    start_index
+  ;;
+  start-node)
+    start_node
+  ;;
+  stop)
+    stop
+  ;;
+  stop-index)
+    stop_index
+  ;;
+  stop-node)
+    stop_node
+  ;;
+  reload)
+    reload
+  ;;
+  reload-index)
+    reload-index
+  ;;
+  reload-node)
+    reload-node
+  ;;
+  restart)
+    restart
+  ;;
+  restart-index)
+    restart_index
+  ;;
+  restart-node)
+    restart_node
+  ;;
+  *)
+  N=/etc/init.d/$NAME
+  echo "Usage: $N {start|start-index|start-node|stop|stop-index|stop-node|restart|restart-index|restart-node|reload|reload-index|reload-node}" >&2
+  exit 1
+  ;;
+esac
+
+exit 0

Added: spec/mandriva/flare/flare.spec
URL: http://svn.erp5.org/spec/mandriva/flare/flare.spec?rev=28733&view=auto
==============================================================================
--- spec/mandriva/flare/flare.spec (added)
+++ spec/mandriva/flare/flare.spec [utf8] Tue Sep  1 20:28:09 2009
@@ -1,0 +1,87 @@
+Name:           flare
+Version:        1.0.8
+Release:        %mkrel 1
+Summary:        flare - distributed, and persistent key-value storage
+Group:          System/Servers
+License:        GPL
+URL:            http://labs.gree.jp/Top/OpenSource/Flare-en.html
+Source0:        http://labs.gree.jp/data/source/flare-%{version}.tgz
+Source1:        %{name}.init
+Source2:        flarei.conf
+Source3:        flared.conf
+Patch0:         flare-1.0.8-no-umask.patch
+Patch1:         flare-1.0.8-close-archive.patch
+
+BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+BuildRequires:  tokyocabinet-devel, gcc-c++, boost-devel
+
+%define flareuser flare
+%define flaredir /var/lib/flare
+
+%description
+Flare is distributed, and persistent key-value storage compatible with
+memcached, and has more features (as follows):
+
+    * persistent storage (you can use flare as persistent memcached)
+    * pluggable storage (currently only Tokyo Cabinet is available,
+      though:)
+    * data replication (synchronous or asynchronous)
+    * data partitioning (automatically partitioned according to # of
+      master servers (clients do not have to care about it))
+    * dynamic reconstruction, and partitioning (you can dynamically (I
+      mean, without any service interruption) add slave servers and
+      partition master servers)
+    * node monitoring and failover (if any server is down, the server is
+      automatically isolated from active servers and another slave
+      server is promoted to master server)
+    * request proxy (you can always get same result regardless of
+      servers you connect to. so you can think flare servers as one big
+      key-value storage)
+    * over 256 bytes keys, and over 1M bytes values are available.
+
+%prep
+%setup -q
+%patch0 -p1 -b .no-umask
+%patch1 -p1 -b .close-archive
+
+%build
+# '-Werror=format-security' causes compile failure.
+export CXXFLAGS="`echo $RPM_OPT_FLAGS|sed s,\ -Werror=format-security,,`"
+%configure
+make
+
+%install
+rm -rf %{buildroot}
+make install DESTDIR=%{buildroot}
+%{__install} -p -D -m 0755 %{SOURCE1} %{buildroot}%{_initrddir}/%{name}
+%{__install} -p -D -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/flare/flarei.conf
+%{__install} -p -D -m 0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/flare/flared.conf
+mkdir -p %{buildroot}%{flaredir}
+
+%clean
+rm -rf %{buildroot}
+
+%pre
+%_pre_useradd %{flareuser} %{flaredir} /bin/false
+
+%post
+%_post_service %{name}
+
+%preun
+%_preun_service %{name}
+
+%postun
+%_postun_userdel %{flareuser}
+
+%files
+%defattr(-,root,root,-)
+%doc AUTHORS ChangeLog COPYING INSTALL NEWS README
+%{_bindir}/flare*
+%dir %{_sysconfdir}/flare
+%config(noreplace) %{_sysconfdir}/flare/*.conf
+%{_initrddir}/%{name}
+%attr(-,%{flareuser},%{flareuser}) %dir %{flaredir}
+
+%changelog
+* Thu Jun  4 2009 Kazuhiko Shiozaki <kazuhiko at nexedi.com> 1.0.8-1nxd2009.1
+- release 1.0.8

Added: spec/mandriva/flare/flared.conf
URL: http://svn.erp5.org/spec/mandriva/flare/flared.conf?rev=28733&view=auto
==============================================================================
--- spec/mandriva/flare/flared.conf (added)
+++ spec/mandriva/flare/flared.conf [utf8] Tue Sep  1 20:28:09 2009
@@ -1,0 +1,11 @@
+data-dir = /var/lib/flare
+index-server-name = localhost
+index-server-port = 12120
+log-facility = local1
+max-connection = 256
+mutex-slot = 32
+proxy-concurrency = 2
+server-name = localhost
+server-port = 12121
+storage-type = tch
+thread-pool-size = 16

Added: spec/mandriva/flare/flarei.conf
URL: http://svn.erp5.org/spec/mandriva/flare/flarei.conf?rev=28733&view=auto
==============================================================================
--- spec/mandriva/flare/flarei.conf (added)
+++ spec/mandriva/flare/flarei.conf [utf8] Tue Sep  1 20:28:09 2009
@@ -1,0 +1,8 @@
+data-dir = /var/lib/flare
+log-facility = local0
+max-connection = 256
+monitor-threshold = 3
+monitor-interval = 1
+server-name = localhost
+server-port = 12120
+thread-pool-size = 8

Added: spec/mandriva/tokyocabinet/tokyocabinet-1.4.9-lzmalib_linkage_fix.diff
URL: http://svn.erp5.org/spec/mandriva/tokyocabinet/tokyocabinet-1.4.9-lzmalib_linkage_fix.diff?rev=28733&view=auto
==============================================================================
--- spec/mandriva/tokyocabinet/tokyocabinet-1.4.9-lzmalib_linkage_fix.diff (added)
+++ spec/mandriva/tokyocabinet/tokyocabinet-1.4.9-lzmalib_linkage_fix.diff [utf8] Tue Sep  1 20:28:09 2009
@@ -1,0 +1,11 @@
+--- configure.in	2009-05-21 18:13:34.000000000 +0200
++++ configure.in.oden	2009-05-21 18:13:48.000000000 +0200
+@@ -237,7 +237,7 @@
+ fi
+ if test "$enable_exlzma" = "yes"
+ then
+-  AC_CHECK_LIB(lzma, main)
++  AC_CHECK_LIB(lzmalib, main)
+ fi
+ if test "$enable_exlzo" = "yes"
+ then

Added: spec/mandriva/tokyocabinet/tokyocabinet-mdv_conf.diff
URL: http://svn.erp5.org/spec/mandriva/tokyocabinet/tokyocabinet-mdv_conf.diff?rev=28733&view=auto
==============================================================================
--- spec/mandriva/tokyocabinet/tokyocabinet-mdv_conf.diff (added)
+++ spec/mandriva/tokyocabinet/tokyocabinet-mdv_conf.diff [utf8] Tue Sep  1 20:28:09 2009
@@ -1,0 +1,81 @@
+diff -Naur tokyocabinet-1.4.21/configure.in tokyocabinet-1.4.21.oden/configure.in
+--- tokyocabinet-1.4.21/configure.in	2009-05-09 14:08:26.000000000 +0200
++++ tokyocabinet-1.4.21.oden/configure.in	2009-05-21 18:12:16.000000000 +0200
+@@ -32,25 +32,13 @@
+ 
+ # Building flags
+ MYCFLAGS="-std=c99 -Wall -fPIC -fsigned-char -O2"
+-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"
++MYCPPFLAGS="-I. -I\$(INCLUDEDIR) -DNDEBUG -D_GNU_SOURCE=1 -D_REENTRANT -D__EXTENSIONS__"
++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
+-
+-
+-
+ #================================================================
+ # Options
+ #================================================================
+@@ -104,7 +92,7 @@
+ if test "$enable_fastest" = "yes"
+ then
+   MYLIBOBJFILES="tokyocabinet_all.o"
+-  MYCFLAGS="-std=c99 -Wall -fPIC -pedantic -fsigned-char -O3"
++  MYCFLAGS="-std=c99 -Wall -fPIC -pedantic -fsigned-char $CFLAGS"
+   MYCFLAGS="$MYCFLAGS -fomit-frame-pointer -fforce-addr -minline-all-stringops"
+   MYCPPFLAGS="$MYCPPFLAGS -D_MYFASTEST"
+   enables="$enables (fastest)"
+@@ -228,16 +216,6 @@
+ # C compiler
+ AC_PROG_CC
+ 
+-# Reset variables
+-if test "$GCC" != "yes"
+-then
+-  AC_MSG_WARN([another compiler except for GCC was detected])
+-  MYCFLAGS=""
+-fi
+-test -n "$CFLAGS" && MYCFLAGS="$CFLAGS $MYCFLAGS"
+-test -n "$CPPFLAGS" && MYCPPFLAGS="$CPPFLAGS $MYCPPFLAGS"
+-test -n "$LDFLAGS" && MYLDFLAGS="$LDFLAGS $MYLDFLAGS"
+-
+ # Byte order
+ AC_C_BIGENDIAN(MYCPPFLAGS="$MYCPPFLAGS -D_MYBIGEND")
+ 
+diff -Naur tokyocabinet-1.4.21/Makefile.in tokyocabinet-1.4.21.oden/Makefile.in
+--- tokyocabinet-1.4.21/Makefile.in	2009-05-15 12:38:57.000000000 +0200
++++ tokyocabinet-1.4.21.oden/Makefile.in	2009-05-21 17:58:39.000000000 +0200
+@@ -54,8 +54,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@
+ 
+ 
+diff -Naur tokyocabinet-1.4.21/tokyocabinet.pc.in tokyocabinet-1.4.21.oden/tokyocabinet.pc.in
+--- tokyocabinet-1.4.21/tokyocabinet.pc.in	2008-02-18 08:25:18.000000000 +0100
++++ tokyocabinet-1.4.21.oden/tokyocabinet.pc.in	2009-05-21 17:58:39.000000000 +0200
+@@ -10,5 +10,5 @@
+ Name: Tokyo Cabinet
+ Description: a modern implementation of DBM
+ Version: @PACKAGE_VERSION@
+-Libs: -L${libdir} -ltokyocabinet @LIBS@
++Libs: -L${libdir} -ltokyocabinet
+ Cflags: -I${includedir}

Added: spec/mandriva/tokyocabinet/tokyocabinet.spec
URL: http://svn.erp5.org/spec/mandriva/tokyocabinet/tokyocabinet.spec?rev=28733&view=auto
==============================================================================
--- spec/mandriva/tokyocabinet/tokyocabinet.spec (added)
+++ spec/mandriva/tokyocabinet/tokyocabinet.spec [utf8] Tue Sep  1 20:28:09 2009
@@ -1,0 +1,231 @@
+%define	major 8
+%define libname	%mklibname %{name} %{major}
+%define develname %mklibname -d %{name}
+
+Summary:	Tokyo Cabinet: a modern implementation of DBM
+Name:		tokyocabinet
+Version:	1.4.32
+Release:	%mkrel 1
+Group:		System/Libraries
+License:	LGPL
+URL:		http://tokyocabinet.sourceforge.net/
+Source0:	http://tokyocabinet.sourceforge.net/%{name}-%{version}.tar.gz
+Patch0:		tokyocabinet-mdv_conf.diff
+Patch1:		tokyocabinet-1.4.9-lzmalib_linkage_fix.diff
+BuildRequires:	autoconf
+BuildRequires:	bzip2-devel
+BuildRequires:	liblzo-devel
+%if %mdkversion > 200900
+BuildRequires:	lzmalib-devel
+%endif
+BuildRequires:	zlib-devel
+BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-buildroot
+
+%description
+Tokyo Cabinet is a library of routines for managing a database. The database is
+a simple data file containing records, each is a pair of a key and a value.
+Every key and value is serial bytes with variable length. Both binary data and
+character string can be used as a key and a value. There is neither concept of
+data tables nor data types. Records are organized in hash table or B+ tree.
+
+As for database of hash table, each key must be unique within a database, so it
+is impossible to store two or more records with a key overlaps. The following
+access methods are provided to the database: storing a record with a key and a
+value, deleting a record by a key, retrieving a record by a key. Moreover,
+traversal access to every key are provided, although the order is arbitrary.
+These access methods are similar to ones of DBM (or its followers: NDBM and
+GDBM) library defined in the UNIX standard. Tokyo Cabinet is an alternative for
+DBM because of its higher performance.
+
+As for database of B+ tree, records whose keys are duplicated can be stored.
+Access methods of storing, deleting, and retrieving are provided as with the
+database of hash table. Records are stored in order by a comparison function
+assigned by a user. It is possible to access each record with the cursor in
+ascending or descending order. According to this mechanism, forward matching
+search for strings and range search for integers are realized. Moreover,
+transaction is available in database of B+ tree.
+
+Tokyo Cabinet is written in the C language, and provided as API of C, Perl,
+Ruby, and Java. Tokyo Cabinet is available on platforms which have API
+conforming to C99 and POSIX. Tokyo Cabinet is a free software licensed under
+the GNU Lesser General Public License.
+
+%package -n	%{libname}
+Summary:	Tokyo Cabinet: a modern implementation of DBM
+Group:          System/Libraries
+
+%description -n	%{libname}
+Tokyo Cabinet is a library of routines for managing a database. The database is
+a simple data file containing records, each is a pair of a key and a value.
+Every key and value is serial bytes with variable length. Both binary data and
+character string can be used as a key and a value. There is neither concept of
+data tables nor data types. Records are organized in hash table or B+ tree.
+
+As for database of hash table, each key must be unique within a database, so it
+is impossible to store two or more records with a key overlaps. The following
+access methods are provided to the database: storing a record with a key and a
+value, deleting a record by a key, retrieving a record by a key. Moreover,
+traversal access to every key are provided, although the order is arbitrary.
+These access methods are similar to ones of DBM (or its followers: NDBM and
+GDBM) library defined in the UNIX standard. Tokyo Cabinet is an alternative for
+DBM because of its higher performance.
+
+As for database of B+ tree, records whose keys are duplicated can be stored.
+Access methods of storing, deleting, and retrieving are provided as with the
+database of hash table. Records are stored in order by a comparison function
+assigned by a user. It is possible to access each record with the cursor in
+ascending or descending order. According to this mechanism, forward matching
+search for strings and range search for integers are realized. Moreover,
+transaction is available in database of B+ tree.
+
+Tokyo Cabinet is written in the C language, and provided as API of C, Perl,
+Ruby, and Java. Tokyo Cabinet is available on platforms which have API
+conforming to C99 and POSIX. Tokyo Cabinet is a free software licensed under
+the GNU Lesser General Public License.
+
+%package -n	%{develname}
+Summary:	Static library and header files for the tokyocabinet library
+Group:		Development/C
+Provides:	%{name}-devel = %{version}
+Requires:	%{libname} = %{version}
+Obsoletes:	%{mklibname -d %{name} 1}
+
+%description -n	%{develname}
+Tokyo Cabinet is a library of routines for managing a database. The database is
+a simple data file containing records, each is a pair of a key and a value.
+Every key and value is serial bytes with variable length. Both binary data and
+character string can be used as a key and a value. There is neither concept of
+data tables nor data types. Records are organized in hash table or B+ tree.
+
+As for database of hash table, each key must be unique within a database, so it
+is impossible to store two or more records with a key overlaps. The following
+access methods are provided to the database: storing a record with a key and a
+value, deleting a record by a key, retrieving a record by a key. Moreover,
+traversal access to every key are provided, although the order is arbitrary.
+These access methods are similar to ones of DBM (or its followers: NDBM and
+GDBM) library defined in the UNIX standard. Tokyo Cabinet is an alternative for
+DBM because of its higher performance.
+
+As for database of B+ tree, records whose keys are duplicated can be stored.
+Access methods of storing, deleting, and retrieving are provided as with the
+database of hash table. Records are stored in order by a comparison function
+assigned by a user. It is possible to access each record with the cursor in
+ascending or descending order. According to this mechanism, forward matching
+search for strings and range search for integers are realized. Moreover,
+transaction is available in database of B+ tree.
+
+Tokyo Cabinet is written in the C language, and provided as API of C, Perl,
+Ruby, and Java. Tokyo Cabinet is available on platforms which have API
+conforming to C99 and POSIX. Tokyo Cabinet is a free software licensed under
+the GNU Lesser General Public License.
+
+This package contains the static library and its header files.
+
+
+%package	tcawmgr
+Summary:	The CGI utility of the abstract database API (tokyocabinet)
+Group:		System/Servers
+Requires:	%{libname} = %{version}
+Requires(pre):	apache
+Requires:	apache
+
+%description	tcawmgr
+The CGI utility of the abstract database API (tokyocabinet).
+
+%prep
+
+%setup -q -n %{name}-%{version}
+%patch0 -p1
+%patch1 -p0
+
+%build
+rm -f configure
+autoconf
+
+%configure2_5x \
+    --enable-zlib \
+    --enable-bzip \
+    --enable-pthread \
+%if %mdkversion > 200900
+    --enable-exlzma \
+%endif
+    --enable-exlzo
+
+%if %mdkversion < 200900
+%make
+%else
+%make LDFLAGS="%{ldflags} -L. -L%{_libdir}"
+%endif
+
+%check
+make check
+
+%install
+rm -rf %{buildroot}
+
+%makeinstall_std
+
+install -d %{buildroot}/var/www/cgi-bin
+mv %{buildroot}%{_libdir}/tcawmgr.cgi %{buildroot}/var/www/cgi-bin/
+
+install -d %{buildroot}%{_sysconfdir}/httpd/conf/webapps.d
+cat > %{buildroot}%{_sysconfdir}/httpd/conf/webapps.d/tcawmgr.conf << EOF
+<Location /cgi-bin/tcawmgr.cgi>
+    Order Deny,Allow
+    Deny from All
+    Allow from 127.0.0.1
+    ErrorDocument 403 "Access denied per %{_sysconfdir}/httpd/conf/webapps.d/tcawmgr.conf"
+</Location>
+EOF
+
+# cleanup
+rm -rf %{buildroot}%{_datadir}/%{name}
+rm -f doc/*~
+
+%if %mdkversion < 200900
+%post -n %{libname} -p /sbin/ldconfig
+%endif
+
+%if %mdkversion < 200900
+%postun -n %{libname} -p /sbin/ldconfig
+%endif
+
+%post tcawmgr
+%_post_webapp
+
+%postun tcawmgr
+%_postun_webapp
+
+%clean
+rm -rf %{buildroot}
+
+%files
+%defattr(-,root,root)
+%{_bindir}/*
+%{_mandir}/man1/*
+
+%files -n %{libname}
+%defattr(-,root,root)
+%doc COPYING ChangeLog README THANKS doc/* lab/magic
+%{_libdir}/*.so.%{major}*
+
+%files -n %{develname}
+%defattr(-,root,root)
+%{_includedir}/*
+%{_libdir}/*.so
+%{_libdir}/*.a
+%{_libdir}/pkgconfig/tokyocabinet.pc
+%{_mandir}/man3/*
+
+%files tcawmgr
+%defattr(-,root,root)
+%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/conf/webapps.d/tcawmgr.conf
+%attr(0755,root,root) /var/www/cgi-bin/tcawmgr.cgi
+
+%changelog
+* Tue Sep  1 2009 Kazuhiko Shiozaki <kazuhiko at nexedi.com> 1.4.32-1nxd2009.1
+- version 1.4.32
+
+* Thu Jun  4 2009 Kazuhiko Shiozaki <kazuhiko at nexedi.com> 1.4.23-1nxd2009.1
+- version 1.4.23
+- disable lzma for Mandriva 2009.0 or before




More information about the Erp5-report mailing list