aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMenno E. Duursma <druiloor@zonnet.nl>2010-05-11 20:01:53 +0200
committerRobby Workman <rworkman@slackbuilds.org>2010-05-11 20:01:53 +0200
commitefd5c4148c23b71a6e8c5ce8ba6b16ae48d15ae3 (patch)
tree51d55b6c96708e71ed96a073f28a67db274f6199
parentb0d02a1f054fc4dbc9a57daa91db213e3abe2180 (diff)
system/atop: Added to 12.0 repository
-rw-r--r--system/atop/README16
-rw-r--r--system/atop/atop.SlackBuild71
-rw-r--r--system/atop/atop.info8
-rw-r--r--system/atop/atop.init.diff34
-rw-r--r--system/atop/doinst.sh28
-rw-r--r--system/atop/psacct.logrotate14
-rw-r--r--system/atop/slack-desc19
7 files changed, 190 insertions, 0 deletions
diff --git a/system/atop/README b/system/atop/README
new file mode 100644
index 000000000000..0011997cdebd
--- /dev/null
+++ b/system/atop/README
@@ -0,0 +1,16 @@
+ATOP is an advanced interactive monitor for Linux-systems
+to view the load on system-level and process-level.
+
+Some features depend on the 'acct' (BSD accounting) package from
+Slackware being installed. To enable it, execute the following:
+ touch /var/log/pacct
+ chgrp utmp /var/log/pacct
+ chmod 640 /var/log/pacct
+ accton
+
+You may want to have atop start at boot; to do so, added the
+following lines to /etc/rc.d/rc.local:
+ # Start the accounting top service
+ if [ -x /etc/rc.d/rc.atop ]; then
+ /etc/rc.d/rc.atop
+ fi
diff --git a/system/atop/atop.SlackBuild b/system/atop/atop.SlackBuild
new file mode 100644
index 000000000000..378fde2196c4
--- /dev/null
+++ b/system/atop/atop.SlackBuild
@@ -0,0 +1,71 @@
+#!/bin/sh
+
+# Slackware build script for atop
+
+# Written by Menno E. Duursma <druiloor@zonnet.nl>
+# Modified by Robby Workman <rworkman@slackbuilds.org>
+
+PRGNAM=atop
+VERSION=1.20
+ARCH=${ARCH:-i486}
+BUILD=${BUILD:-3}
+TAG=${TAG:-_SBo}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+fi
+
+set -e # Exit on most errors
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
+cd $PRGNAM-$VERSION
+chown -R root:root .
+chmod -R u+w,go+r-w,a-s .
+
+make CFLAGS="$SLKCFLAGS"
+
+# Install the binary sgid utmp in order to allow accounting
+install -D -o root -g utmp -m 2751 atop $PKG/usr/bin/atop
+
+# Add the init script and fix the paths in it
+patch -p1 < $CWD/atop.init.diff
+install -D -m 0755 atop.init $PKG/etc/rc.d/rc.atop.new
+
+mkdir -p $PKG/etc/{logrotate.d,cron.daily}
+install -m 0644 psaccs_atop $PKG/etc/logrotate.d/psaccs_atop.new
+install -m 0644 psaccu_atop $PKG/etc/logrotate.d/psaccu_atop.new
+install -m 0644 $CWD/psacct.logrotate $PKG/etc/logrotate.d/psacct.new
+install -m 0755 atop.daily $PKG/etc/cron.daily/atop.new
+
+mkdir -p $PKG/var/log/atop
+touch $PKG/var/log/atop/dummy_{before,after}
+# We'll create daily.log in doinst.sh so it doesn't get wiped on uninstall
+
+( cd $PKG
+ find . -type f | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+)
+
+mkdir -p $PKG/usr/man/man1
+gzip -9c man/atop.1 > $PKG/usr/man/man1/atop.1.gz
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a [A-Z][A-Z]* ChangeLog $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
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz
diff --git a/system/atop/atop.info b/system/atop/atop.info
new file mode 100644
index 000000000000..25e72209d30b
--- /dev/null
+++ b/system/atop/atop.info
@@ -0,0 +1,8 @@
+PRGNAM="atop"
+VERSION="1.20"
+HOMEPAGE="http://www.atcomputing.nl/Tools/atop"
+DOWNLOAD="http://oldwww.atconsultancy.nl/atop/packages/atop-1.20.tar.gz"
+MD5SUM="ca4c8f47532b25aa0afd7d1061a1ad11"
+MAINTAINER="Menno E. Duursma"
+EMAIL="druiloor@zonnet.nl"
+APPROVED="rworkman"
diff --git a/system/atop/atop.init.diff b/system/atop/atop.init.diff
new file mode 100644
index 000000000000..4372d2a627b5
--- /dev/null
+++ b/system/atop/atop.init.diff
@@ -0,0 +1,34 @@
+--- atop-1.20/atop.init.orig 2008-01-08 20:44:34.327288088 -0600
++++ atop-1.20/atop.init 2008-01-08 20:45:25.786220566 -0600
+@@ -7,7 +7,7 @@
+ #
+
+ # Check existance of binaries
+-[ -f /usr/bin/atop ] || exit 0
++[ -f /usr/bin/atop ] || exit 1
+
+ PIDFILE=/var/run/atop.pid
+ RETVAL=0
+@@ -22,7 +22,7 @@
+ :
+ else
+ # Start atop
+- /etc/atop/atop.daily
++ /etc/cron.daily/atop.daily
+ fi
+ ;;
+
+@@ -43,11 +43,11 @@
+ ;;
+
+ reload)
+- /etc/atop/atop.daily
++ /etc/cron.daily/atop.daily
+ ;;
+
+ restart)
+- /etc/atop/atop.daily
++ /etc/cron.daily/atop.daily
+ ;;
+
+ *)
diff --git a/system/atop/doinst.sh b/system/atop/doinst.sh
new file mode 100644
index 000000000000..134b712414d7
--- /dev/null
+++ b/system/atop/doinst.sh
@@ -0,0 +1,28 @@
+config() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
+ # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+# Keep same perms on rc.atop.new:
+if [ -e etc/rc.d/rc.atop ]; then
+ cp -a etc/rc.d/rc.atop etc/rc.d/rc.atop.new.incoming
+ cat etc/rc.d/rc.atop.new > etc/rc.d/rc.atop.new.incoming
+ mv etc/rc.d/rc.atop.new.incoming etc/rc.d/rc.atop.new
+fi
+
+config etc/rc.d/rc.atop.new
+config etc/cron.daily/atop.new
+config etc/logrotate.d/psacct.new
+config etc/logrotate.d/psaccs_atop.new
+config etc/logrotate.d/psaccu_atop.new
+
+touch var/log/atop/daily.log
+
diff --git a/system/atop/psacct.logrotate b/system/atop/psacct.logrotate
new file mode 100644
index 000000000000..15ae2c1ed0ba
--- /dev/null
+++ b/system/atop/psacct.logrotate
@@ -0,0 +1,14 @@
+/var/log/pacct {
+ create 640 root utmp
+ daily
+ # Keep 4 weeks of backlog
+ rotate 28
+ compress
+ missingok
+ prerotate
+ /sbin/accton
+ endscript
+ postrotate
+ /sbin/accton /var/log/pacct
+ endscript
+}
diff --git a/system/atop/slack-desc b/system/atop/slack-desc
new file mode 100644
index 000000000000..8d528d032ae0
--- /dev/null
+++ b/system/atop/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------------------------------------------------------|
+atop: Acounting Top (advanced interactive monitor)
+atop:
+atop: ATOP is an advanced interactive monitor for Linux-systems
+atop: to view the load on system-level and process-level.
+atop:
+atop: atop was wtitten and is maintained by Gerlof Langeveld of
+atop: AT Consultancy bv, Nijmegen, The Netherlands
+atop:
+atop:
+atop:
+atop: