diff options
author | Heinz Wiesinger <pprkut@liwjatan.at> | 2012-12-19 20:27:10 +0100 |
---|---|---|
committer | Matteo Bernardini <ponce@slackbuilds.org> | 2012-12-19 20:27:23 +0100 |
commit | 46cd683713f8a29863540dd7103e598d320c5eda (patch) | |
tree | 1b324688894be670d57b573891759a3f529dc6f1 | |
parent | bbe65d41ec7edc10df742ad76b364f192105459b (diff) |
development/mysql-pinba: Added (PHP Statistics Server - DB part).
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
-rw-r--r-- | development/mysql-pinba/README | 14 | ||||
-rw-r--r-- | development/mysql-pinba/mysql-pinba.SlackBuild | 128 | ||||
-rw-r--r-- | development/mysql-pinba/mysql-pinba.info | 10 | ||||
-rw-r--r-- | development/mysql-pinba/slack-desc | 19 |
4 files changed, 171 insertions, 0 deletions
diff --git a/development/mysql-pinba/README b/development/mysql-pinba/README new file mode 100644 index 0000000000000..6a0b8b401fd2a --- /dev/null +++ b/development/mysql-pinba/README @@ -0,0 +1,14 @@ +Pinba (PHP Is Not A Bottleneck Anymore) is a statistics server +using MySQL as an interface. It accumulates and processes data +sent over UDP by multiple PHP processes and displays statistics +in a nice human-readable form of simple "reports", also providing +read-only interface to the raw data in order to make possible +generation of more sophisticated reports. + +Upstream recommends using a different memory allocator than the +default one to cut down on memory usage. You can specify which +one you want to use by passing either MALLOC="hoard" or +MALLOC="jemalloc" to the script. This depends on hoard or jemalloc +respectively. By default the default memory allocator is used. + +The pinba storage plugin works with both mysql and mariadb. diff --git a/development/mysql-pinba/mysql-pinba.SlackBuild b/development/mysql-pinba/mysql-pinba.SlackBuild new file mode 100644 index 0000000000000..a7e0d9153b139 --- /dev/null +++ b/development/mysql-pinba/mysql-pinba.SlackBuild @@ -0,0 +1,128 @@ +#!/bin/sh + +# Slackware build script for mysql-pinba + +# Copyright 2012 Heinz Wiesinger, Amsterdam, The Netherlands +# 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=mysql-pinba +SRCNAM=pinba_engine +VERSION=1.0.0 +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} + +MALLOC=${MALLOC:-"default"} + +if [ "$MALLOC" = "hoard" ]; then + malloc_lib="-lhoard" +elif [ "$MALLOC" = "jemalloc" ]; then + malloc_lib="-ljemalloc" +else + malloc_lib="" +fi + + +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 $SRCNAM-$VERSION +tar xvf $CWD/$SRCNAM-$VERSION.tar.gz +cd $SRCNAM-$VERSION +chown -R root:root . +find . \ + \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ + -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ + -exec chmod 644 {} \; + +autoreconf -vif + +# fix paths to private headers +sed -i "s|sql/mysql_priv.h|mysql_priv.h|" ./configure +sed -i "s|include/my|my|g" ./configure +sed -i "s|mysql/plugin.h|plugin.h|" ./configure +sed -i "s|-I\$with_mysql/include|-I\$with_mysql -I\$with_mysql/private|g" ./configure + +sed -i "s|include/mysql_version.h|mysql_version.h|" src/{data,ha_pinba}.cc +sed -i "s|sql/field.h|field.h|" src/ha_pinba.cc +sed -i "s|sql/structs.h|structs.h|" src/ha_pinba.cc +sed -i "s|sql/handler.h|handler.h|" src/ha_pinba.cc + +CFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS" \ +LIBS="$malloc_lib" \ +./configure \ + --prefix=/usr \ + --libdir=/usr/lib$LIBDIRSUFFIX/mysql/plugin/ \ + --sysconfdir=/etc \ + --enable-shared \ + --disable-static \ + --localstatedir=/var \ + --with-mysql=/usr/include/mysql \ + --build=$ARCH-slackware-linux + +sed -i "s|-L/usr/lib|-L/usr/lib$LIBDIRSUFFIX|g" ./src/Makefile +sed -i "s|rpath,/usr/lib|rpath,/usr/lib$LIBDIRSUFFIX|g" ./src/Makefile + +make +make install DESTDIR=$PKG + +find $PKG | xargs 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 +cp -a COPYING README TODO \ + $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/development/mysql-pinba/mysql-pinba.info b/development/mysql-pinba/mysql-pinba.info new file mode 100644 index 0000000000000..b0698b875e2c3 --- /dev/null +++ b/development/mysql-pinba/mysql-pinba.info @@ -0,0 +1,10 @@ +PRGNAM="mysql-pinba" +VERSION="1.0.0" +HOMEPAGE="http://pinba.org/wiki/Main_Page" +DOWNLOAD="http://pinba.org/files/pinba_engine-1.0.0.tar.gz" +MD5SUM="d0dc3dcf6adeb07bef1603d334770879" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="protobuf libevent judy" +MAINTAINER="Heinz Wiesinger" +EMAIL="pprkut@liwjatan.at" diff --git a/development/mysql-pinba/slack-desc b/development/mysql-pinba/slack-desc new file mode 100644 index 0000000000000..58e4ac9fe8743 --- /dev/null +++ b/development/mysql-pinba/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 ':'. + + |-----handy-ruler--------------------------------------------------| +mysql-pinba: mysql-pinba (PHP Statistics Server - DB part) +mysql-pinba: +mysql-pinba: Pinba (PHP Is Not A Bottleneck Anymore) is a statistics server +mysql-pinba: using MySQL as an interface. It accumulates and processes data +mysql-pinba: sent over UDP by multiple PHP processes and displays statistics +mysql-pinba: in a nice human-readable form of simple "reports", also providing +mysql-pinba: read-only interface to the raw data in order to make possible +mysql-pinba: generation of more sophisticated reports. +mysql-pinba: +mysql-pinba: Homepage: http://pinba.org/wiki/Main_Page +mysql-pinba: |