aboutsummaryrefslogtreecommitdiff
path: root/network
diff options
context:
space:
mode:
authorNiels Horn <niels.horn@gmail.com>2010-07-07 04:41:45 -0500
committerRobby Workman <rworkman@slackbuilds.org>2010-07-08 00:13:26 -0500
commit231bf8b50663319262ff9ef8dc5e6dfe368f448f (patch)
treea19dc5c15923d5c19a80ebc8a1b647e0f3a173ce /network
parent486f2f4987f53853bde3e22014bb1812e2aa7da3 (diff)
network/cacti: Updated for version 0.8.7e_p6.
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
Diffstat (limited to 'network')
-rw-r--r--network/cacti/README8
-rw-r--r--network/cacti/cacti.SlackBuild55
-rw-r--r--network/cacti/cacti.info20
-rw-r--r--network/cacti/slack-desc8
4 files changed, 64 insertions, 27 deletions
diff --git a/network/cacti/README b/network/cacti/README
index 344146e40b200..032673afcd656 100644
--- a/network/cacti/README
+++ b/network/cacti/README
@@ -18,8 +18,8 @@ Change these at build time if preferred:
PHPUSER=youruser PHPGROUP=yourgroup \
./cacti.SlackBuild
-Requires:
-- rrdtool (available on SlackBuilds.org)
-- httpd, php & mysql (as included in Slackware) configured & running
+This requires rrdtool.
-Check the included documentation to setup your MySQL database and users.
+httpd, php, and mysql (as included in Slackware) must also be configured
+properly and running. Check the included documentation to setup your
+MySQL database and users.
diff --git a/network/cacti/cacti.SlackBuild b/network/cacti/cacti.SlackBuild
index 60d13fdf80c7f..2af8d0a0b5266 100644
--- a/network/cacti/cacti.SlackBuild
+++ b/network/cacti/cacti.SlackBuild
@@ -3,19 +3,36 @@
# Slackware build script for cacti:
# a network graphing solution using rrdtool
-# Written by Niels Horn - niels.horn@gmail.com
-# revision date 2009/10/17
+# Written by Niels Horn <niels.horn@gmail.com>
+# revision date 2010/07/05
PRGNAM=cacti
-VERSION=0.8.7e
+VERSION=${VERSION:-0.8.7e_p6}
ARCH=noarch
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+SRCVERSION=$(echo $VERSION | cut -f1 -d_)
+
DOCROOT=${DOCROOT:-/var/www/htdocs}
PHPUSER=${PHPUSER:-root}
PHPGROUP=${PHPGROUP:-apache}
+# To create valid symlinks, we need a relative path from DOCROOT
+RELPATH=""
+for i in $(echo $DOCROOT | tr "/" " "); do
+ RELPATH="${RELPATH}../"
+done
+
+PATCHES="\
+cli_add_graph.patch \
+snmp_invalid_response.patch \
+template_duplication.patch \
+fix_icmp_on_windows_iis_servers.patch \
+cross_site_fix.patch \
+sql_injection_template_export.patch \
+"
+
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
@@ -23,14 +40,19 @@ OUTPUT=${OUTPUT:-/tmp}
set -e
-rm -rf $TMP/$PRGNAM-$VERSION $PKG
+rm -rf $TMP/$PRGNAM-$SRCVERSION $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
-cd $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$SRCVERSION.tar.gz
+cd $PRGNAM-$SRCVERSION
chown -R root:root .
chmod -R u+w,go+r-w,a-s .
+# Apply patches from upstream
+for patch in $PATCHES; do
+ patch -p1 < $CWD/$patch
+done
+
# "Install" to $DOCROOT/cacti
mkdir -p $PKG/$DOCROOT/$PRGNAM
cp -a \
@@ -41,12 +63,14 @@ chown -R $PHPUSER:$PHPGROUP $PKG/$DOCROOT/$PRGNAM
# Move configuration & create symbolic link
mkdir -p $PKG/etc/$PRGNAM
-mv $PKG/$DOCROOT/$PRGNAM/include/config.php $PKG/etc/$PRGNAM/config.php
-( cd $PKG/$DOCROOT/$PRGNAM/include/
- ln -s $PKG/etc/$PRGNAM/config.php config.php
- mv $PKG/etc/$PRGNAM/config.php $PKG/etc/$PRGNAM/config.php.new
- chmod 600 $PKG/etc/$PRGNAM/config.php.new
-)
+cd $PKG/$DOCROOT/$PRGNAM/include/
+ mv config.php $PKG/etc/$PRGNAM/config.php
+ ln -sf ../../$RELPATH/etc/$PRGNAM/config.php config.php
+cd -
+
+# Rename config file and set permissions to hide passwords
+mv $PKG/etc/$PRGNAM/config.php $PKG/etc/$PRGNAM/config.php.new
+chmod 600 $PKG/etc/$PRGNAM/config.php.new
# Copy docs & create symbolic link
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
@@ -55,9 +79,9 @@ cp -a \
$PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/$DOCROOT/$PRGNAM/docs
-( cd $PKG/$DOCROOT/$PRGNAM/docs
- ln -s $PKG/usr/doc/$PRGNAM-$VERSION/html html
-)
+cd $PKG/$DOCROOT/$PRGNAM/docs
+ ln -sf ../../$RELPATH/usr/doc/$PRGNAM-$VERSION/html html
+cd -
# Copy post-installation scripts to /usr/share/cacti
mkdir -p $PKG/usr/share/$PRGNAM
@@ -69,3 +93,4 @@ cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+
diff --git a/network/cacti/cacti.info b/network/cacti/cacti.info
index d2c3e23b9a3c0..7ea1963a1b13e 100644
--- a/network/cacti/cacti.info
+++ b/network/cacti/cacti.info
@@ -1,10 +1,22 @@
PRGNAM="cacti"
-VERSION="0.8.7e"
+VERSION="0.8.7e_p6"
HOMEPAGE="http://www.cacti.net/"
-DOWNLOAD="http://www.cacti.net/downloads/cacti-0.8.7e.tar.gz"
-MD5SUM="7563a58a57d2c6cc0da28cc341a30969"
+DOWNLOAD="http://www.cacti.net/downloads/cacti-0.8.7e.tar.gz \
+ http://www.cacti.net/downloads/patches/0.8.7e/cli_add_graph.patch \
+ http://www.cacti.net/downloads/patches/0.8.7e/snmp_invalid_response.patch \
+ http://www.cacti.net/downloads/patches/0.8.7e/template_duplication.patch \
+ http://www.cacti.net/downloads/patches/0.8.7e/fix_icmp_on_windows_iis_servers.patch \
+ http://www.cacti.net/downloads/patches/0.8.7e/cross_site_fix.patch \
+ http://www.cacti.net/downloads/patches/0.8.7e/sql_injection_template_export.patch"
+MD5SUM="7563a58a57d2c6cc0da28cc341a30969 \
+ 8599b4c9433cb1751086ef394bba66ee \
+ 85c71f16fcbf79a11f24609b973199d8 \
+ b1bd81dc89aa3e30365d0c9d45956255 \
+ 7fe579f0d2fb999c5866e8218436a65d \
+ 4323da80d4dc0238fc4902dcd27f47f0 \
+ 7e82d147a279f5726dc1ad6bf838f6b0"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
MAINTAINER="Niels Horn"
EMAIL="niels.horn@gmail.com"
-APPROVED="dsomero"
+APPROVED="rworkman"
diff --git a/network/cacti/slack-desc b/network/cacti/slack-desc
index 63adbae28eaa1..8b56f40191223 100644
--- a/network/cacti/slack-desc
+++ b/network/cacti/slack-desc
@@ -6,14 +6,14 @@
# leave one space after the ':'.
|-----handy-ruler------------------------------------------------------|
-cacti: Cacti (complete network graphing solution)
-cacti:
-cacti: Cacti is a complete network graphing solution designed to harness
+cacti: cacti (complete network graphing solution)
+cacti:
+cacti: Cacti is a complete network graphing solution designed to harness
cacti: the power of RRDTool's data storage and graphing funcionality.
cacti: Cacti provides a fast poller, advanced graph templating, multiple
cacti: data acquisition methods, and user-management features out of the box.
cacti: All of this is wrapped in an intuitive, easy to use interface that
cacti: makes sense for LAN-sized installations up to complex networks with
cacti: hundreds of devices.
-cacti:
+cacti:
cacti: Homepage: http://www.cacti.net/