diff options
author | simotrone <simotrone@gmail.com> | 2014-09-09 07:07:43 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2014-09-09 07:07:43 +0700 |
commit | e8a5c27adaabfc53a544142b981b37b8b5cebb36 (patch) | |
tree | 84084ebe1c7d5f2a36ed4b38f160809456bf9679 /network/skylable-sx | |
parent | 8e49294172639ef211d383791380fa9aae3ac13d (diff) |
network/skylable-sx: Added (distributed data storage cluster).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'network/skylable-sx')
-rw-r--r-- | network/skylable-sx/README | 18 | ||||
-rw-r--r-- | network/skylable-sx/rc.sxserver | 114 | ||||
-rw-r--r-- | network/skylable-sx/skylable-sx.SlackBuild | 100 | ||||
-rw-r--r-- | network/skylable-sx/skylable-sx.info | 10 | ||||
-rw-r--r-- | network/skylable-sx/slack-desc | 19 |
5 files changed, 261 insertions, 0 deletions
diff --git a/network/skylable-sx/README b/network/skylable-sx/README new file mode 100644 index 000000000000..6a0f9de8cff4 --- /dev/null +++ b/network/skylable-sx/README @@ -0,0 +1,18 @@ +Sx is a reliable, fully distributed cluster solution for your data storage +needs. With Sx you can aggregate the disk space available on multiple servers +and merge it into a single storage system. The cluster makes sure that your data +is always replicated over multiple nodes (the exact number of copies is defined +by the sysadmin) and synchronized. + +Additionally Sx has built-in support for deduplication, client-side encryption, +on-the-fly compression and much more. + +To start immediately, read the quickguide! + +NOTE 1: Everything needed by sx and not in the system will be built statically. + If you prefer (like me) system libs get yajl and fcgi from SBo. + Also sqlite3 3.8.4.3 can be linked dinamically but you must compile it + by source (target the lib64 if x86_64 is your system arch). + +NOTE 2: To build only a client, uncomment the ONLY_CLIENT parameter in + skylable-sx.SlackBuild. diff --git a/network/skylable-sx/rc.sxserver b/network/skylable-sx/rc.sxserver new file mode 100644 index 000000000000..a69e620f4027 --- /dev/null +++ b/network/skylable-sx/rc.sxserver @@ -0,0 +1,114 @@ +#!/bin/sh +# +# sxserver - this init script starts and stops the SX server +# +# chkconfig: 2345 80 20 +# description: Scalable public and private cloud storage + +### BEGIN INIT INFO +# Provides: sxserver +# Required-Start: $local_fs $network $remote_fs $time +# Required-Stop: $local_fs $network $remote_fs $time +# Default-Stop: 0 1 6 +# Short-Description: start and stop sxhttpd/sx.fcgi +# Description: Scalable public and private cloud storage +### END INIT INFO + +# Source function library. +. /etc/rc.d/init.d/functions + +exec="/usr/sbin/sx.fcgi" +exec_httpd="/usr/sbin/sxhttpd" +config="/etc/sxserver/sxfcgi.conf" + +[ -e /etc/sysconfig/sxserver ] && . /etc/sysconfig/sxserver + +lockfile=/var/lock/subsys/sxserver + +start() { + [ -x $exec ] || exit 5 + [ -x $exec_httpd ] || exit 5 + [ -f $config ] || exit 6 + mkdir -p /var/run/sxserver + OWNER=`grep run-as $config |cut -f2 -d\"` + chown "$OWNER" /var/run/sxserver + action $"Starting sxserver: " daemon --pidfile /var/run/sxserver/sxfcgi.pid $exec + retval=$? + if test $retval -eq 0; then + action $"Starting sxhttpd: " daemon --pidfile /var/run/sxserver/sxhttpd.pid $exec_httpd -c /etc/sxserver/sxhttpd.conf + retval=$? + fi + [ $retval -eq 0 ] && touch $lockfile + return $retval +} + +stop() { + action $"Stopping sxhttpd: " killproc -p /var/run/sxserver/sxhttpd.pid "sxhttpd" + retval_httpd=$? + + action $"Stopping sxserver: " killproc -p /var/run/sxserver/sxfcgi.pid "sxserver" + retval=$? + + [ $retval -eq 0 ] && retval=$retval_httpd + [ $retval -eq 0 ] && rm -f $lockfile + return $retval +} + +restart() { + stop + start +} + +reload() { + restart +} + +force_reload() { + restart +} + +rh_status() { + status -p /var/run/sxserver/sxhttpd.pid sxhttpd + retval_httpd=$? + status -p /var/run/sxserver/sxfcgi.pid sxserver + retval=$? + [ $retval -eq 0 ] && retval=$retval_httpd + return $retval +} + +rh_status_q() { + rh_status >/dev/null 2>&1 +} + + +case "$1" in + start) + rh_status_q && exit 0 + $1 + ;; + stop) + rh_status_q || exit 0 + $1 + ;; + restart) + $1 + ;; + reload) + rh_status_q || exit 7 + $1 + ;; + force-reload) + force_reload + ;; + status) + rh_status + ;; + condrestart|try-restart) + rh_status_q || exit 0 + restart + ;; + *) + echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}" + exit 2 +esac +exit $? diff --git a/network/skylable-sx/skylable-sx.SlackBuild b/network/skylable-sx/skylable-sx.SlackBuild new file mode 100644 index 000000000000..93472bb92e82 --- /dev/null +++ b/network/skylable-sx/skylable-sx.SlackBuild @@ -0,0 +1,100 @@ +#!/bin/sh + +# Slackware build script for skylable-sx + +# Copyright 2014 simotrone <simotrone@gmail.com>, Italy +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +PRGNAM=skylable-sx +VERSION=${VERSION:-0.4} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i486 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/sx-$VERSION.tar.gz +cd sx-$VERSION +chown -R root:root . +find -L . \ + \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ + -o -perm 511 \) -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; + +# ONLY_CLIENT="--disable-server" + +CFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS" \ +./configure \ + --prefix=/usr \ + --libdir=/usr/lib${LIBDIRSUFFIX} \ + $ONLY_CLIENT \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --mandir=/usr/man \ + --docdir=/usr/doc/$PRGNAM-$VERSION + +make +make install DESTDIR=$PKG + +find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/rc.sxserver > $PKG/usr/doc/$PRGNAM-$VERSION/rc.sxserver +cp -ar COPYING NEWS README doc/quickstart $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/network/skylable-sx/skylable-sx.info b/network/skylable-sx/skylable-sx.info new file mode 100644 index 000000000000..64c3b65266f8 --- /dev/null +++ b/network/skylable-sx/skylable-sx.info @@ -0,0 +1,10 @@ +PRGNAM="skylable-sx" +VERSION="0.4" +HOMEPAGE="http://www.skylable.com" +DOWNLOAD="http://cdn.skylable.com/source/sx-0.4.tar.gz" +MD5SUM="7d600263a189b6b50474c07c0d36d471" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="" +MAINTAINER="simotrone" +EMAIL="simotrone@gmail.com" diff --git a/network/skylable-sx/slack-desc b/network/skylable-sx/slack-desc new file mode 100644 index 000000000000..4d6645d6fef8 --- /dev/null +++ b/network/skylable-sx/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. +# Line up the first '|' above the ':' following the base package name, and +# the '|' on the right side marks the last column you can put a character in. +# You must make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':' except on otherwise blank lines. + + |-----handy-ruler------------------------------------------------------| +skylable-sx: skylable-sx (private distributed data storage cluster) +skylable-sx: +skylable-sx: Sx is a reliable, fully distributed cluster solution for your data +skylable-sx: storage needs. With Sx you can aggregate the disk space available +skylable-sx: on multiple servers and merge it into a single storage system. The +skylable-sx: cluster makes sure that your data is always replicated over multiple +skylable-sx: nodes (the exact number of copies is defined by the sysadmin) and +skylable-sx: synchronized. Additionally Sx has built-in support for deduplication, +skylable-sx: client-side encryption, on-the-fly compression and much more. +skylable-sx: +skylable-sx: Home: http://www.skylable.com/ |