diff options
Diffstat (limited to 'system/forkstat')
-rw-r--r-- | system/forkstat/README | 14 | ||||
-rw-r--r-- | system/forkstat/forkstat.SlackBuild | 45 | ||||
-rw-r--r-- | system/forkstat/forkstat.info | 12 | ||||
-rw-r--r-- | system/forkstat/slack-desc | 10 |
4 files changed, 41 insertions, 40 deletions
diff --git a/system/forkstat/README b/system/forkstat/README index d57c858412..44d19a686e 100644 --- a/system/forkstat/README +++ b/system/forkstat/README @@ -1,10 +1,6 @@ -forkstat (process fork/exec/exit monitoring tool). +forkstat - tracer of process creation/termination in the system -Forkstat monitors process fork(), exec() and exit() activity. -It is useful for monitoring system behaviour and to track down r ogue -processes that are spawning off processes and potentially abusing the -system. - -Note that forkstat uses the Linux netlink connector to gather process -activity and this may miss events if the system is overly busy. -Netlink connector also requires root privilege. +Forkstat is a program that logs process fork(), exec() and exit() +activity. It is useful for monitoring system behaviour and to track down +rogue processes that are spawning off processes and potentially abusing +the system. diff --git a/system/forkstat/forkstat.SlackBuild b/system/forkstat/forkstat.SlackBuild index 08f91cf6d0..ad5ef9930c 100644 --- a/system/forkstat/forkstat.SlackBuild +++ b/system/forkstat/forkstat.SlackBuild @@ -1,8 +1,8 @@ -#!/bin/sh -# -# Slackware build script for forkstat. -# -# Copyright 2015-2019 Edinaldo P. Silva, Rio de Janeiro, Brazil. +#!/bin/bash + +# Slackware build script for forkstat + +# Copyright 2022 xaizek <xaizek@posteo.net> # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -22,10 +22,13 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +cd $(dirname $0) ; CWD=$(pwd) + PRGNAM=forkstat -VERSION=${VERSION:-0.02.12} +VERSION=${VERSION:-0.03.02} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} if [ -z "$ARCH" ]; then case "$( uname -m )" in @@ -35,23 +38,26 @@ if [ -z "$ARCH" ]; then esac fi -CWD=$(pwd) +# If the variable PRINT_PACKAGE_NAME is set, then this script will report what +# the name of the created package would be, and then exit. This information +# could be useful to other scripts. +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" + exit 0 +fi + TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} if [ "$ARCH" = "i586" ]; then SLKCFLAGS="-O2 -march=i586 -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 @@ -60,7 +66,7 @@ rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP rm -rf $PRGNAM-$VERSION -tar xvf $CWD/$PRGNAM-$VERSION.tar.xz +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz cd $PRGNAM-$VERSION chown -R root:root . find -L . \ @@ -69,26 +75,25 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; -make prefix=/usr DESTDIR=$PKG +CFLAGS="$SLKCFLAGS" 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/bin -install -Dm755 forkstat $PKG/usr/bin/forkstat - -mkdir -p $PKG/usr/man/man8 -install -D -m644 forkstat.8 $PKG/usr/man/man8/forkstat.8 +mv $PKG/usr/share/man $PKG/usr/man find $PKG/usr/man -type f -exec gzip -9 {} \; for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp COPYING $PKG/usr/doc/$PRGNAM-$VERSION/LICENSE +cp -a \ + COPYING README.md \ + $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} +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE diff --git a/system/forkstat/forkstat.info b/system/forkstat/forkstat.info index 82bdbba91b..263bf4f873 100644 --- a/system/forkstat/forkstat.info +++ b/system/forkstat/forkstat.info @@ -1,10 +1,10 @@ PRGNAM="forkstat" -VERSION="0.02.12" -HOMEPAGE="https://kernel.ubuntu.com/~cking/forkstat/" -DOWNLOAD="https://kernel.ubuntu.com/~cking/tarballs/forkstat/forkstat-0.02.12.tar.xz" -MD5SUM="cc4809b66dc2276a76370e2c9c325307" +VERSION="0.03.02" +HOMEPAGE="https://github.com/ColinIanKing/forkstat" +DOWNLOAD="https://github.com/ColinIanKing/forkstat/archive/V0.03.02/forkstat-0.03.02.tar.gz" +MD5SUM="5fe2303c077b263fdb085f1fa71c6b82" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="" -MAINTAINER="Edinaldo P. Silva" -EMAIL="edps.mundognu@gmail.com" +MAINTAINER="xaizek" +EMAIL="xaizek@posteo.net" diff --git a/system/forkstat/slack-desc b/system/forkstat/slack-desc index 6bffb3ba2b..03811dfae7 100644 --- a/system/forkstat/slack-desc +++ b/system/forkstat/slack-desc @@ -6,12 +6,12 @@ # customary to leave one space after the ':' except on otherwise blank lines. |-----handy-ruler------------------------------------------------------| -forkstat: forkstat (process fork/exec/exit monitoring tool) -forkstat: -forkstat: Forkstat monitors process fork(), exec() and exit() activity. -forkstat: -forkstat: Home page: https://kernel.ubuntu.com/~cking/forkstat/ +forkstat: forkstat (tracer of process creation/termination in the system) forkstat: +forkstat: Forkstat is a program that logs process fork(), exec() and exit() +forkstat: activity. It is useful for monitoring system behaviour and to track +forkstat: down rogue processes that are spawning off processes and potentially +forkstat: abusing the system. forkstat: forkstat: forkstat: |