diff options
-rw-r--r-- | system/loggedfs/README | 16 | ||||
-rw-r--r-- | system/loggedfs/doinst.sh | 11 | ||||
-rw-r--r-- | system/loggedfs/loggedfs.SlackBuild | 75 | ||||
-rw-r--r-- | system/loggedfs/loggedfs.info | 10 | ||||
-rw-r--r-- | system/loggedfs/slack-desc | 19 |
5 files changed, 131 insertions, 0 deletions
diff --git a/system/loggedfs/README b/system/loggedfs/README new file mode 100644 index 000000000000..829d936be5dc --- /dev/null +++ b/system/loggedfs/README @@ -0,0 +1,16 @@ +loggedfs (filesystem monitoring with FUSE) + +LoggedFS is a fuse-based filesystem which can log every operation that +happens in it. LoggedFS only sends a message to syslog (or a file) when +called by fuse and then let the real filesystem do the rest of the job. + +Note: loggedfs doesn't cross filesystem boundaries. If you e.g. have +/usr/local mounted as a separate partition, monitoring /usr won't also +monitor /usr/local (though you can always run another instance of loggedfs +in that case). + +Slackware note: since Slackware's /etc/mtab is a regular file (not a +symlink to /proc/mounts), killing a loggedfs process causes its /etc/mtab +entry to stay. This makes it look like the filesystem is still mounted, +though it actually isn't. To avoid this, always use "fusermount -u" +to cleanly umount the fs, which will also make the loggedfs process exit. diff --git a/system/loggedfs/doinst.sh b/system/loggedfs/doinst.sh new file mode 100644 index 000000000000..d630c9b28a86 --- /dev/null +++ b/system/loggedfs/doinst.sh @@ -0,0 +1,11 @@ +config() { + NEW="$1" + OLD="$(dirname $NEW)/$(basename $NEW .new)" + if [ ! -r $OLD ]; then + mv $NEW $OLD + elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then + rm $NEW + fi +} + +config etc/loggedfs.xml.new diff --git a/system/loggedfs/loggedfs.SlackBuild b/system/loggedfs/loggedfs.SlackBuild new file mode 100644 index 000000000000..b16aa1bdd158 --- /dev/null +++ b/system/loggedfs/loggedfs.SlackBuild @@ -0,0 +1,75 @@ +#!/bin/sh + +# Slackware build script for loggedfs + +# Written by B. Watson (yalhcru@gmail.com) + +# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. + +PRGNAM=loggedfs +VERSION=${VERSION:-0.5} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i586 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +CWD=$(pwd) +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 + +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 . +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 {} \; + +sed -i "s,-Wall,& $SLKCFLAGS," Makefile + +make + +# Do not use 'make install', it's hard-coded to /usr. +mkdir -p $PKG/usr/bin $PKG/usr/man/man1 $PKG/etc +install -s -m0755 $PRGNAM $PKG/usr/bin +install -m0644 $PRGNAM.xml $PKG/etc/$PRGNAM.xml.new +gzip -9c < $PRGNAM.1 > $PKG/usr/man/man1/$PRGNAM.1.gz + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a LICENSE README* $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.${PKGTYPE:-tgz} diff --git a/system/loggedfs/loggedfs.info b/system/loggedfs/loggedfs.info new file mode 100644 index 000000000000..cba4ffb08459 --- /dev/null +++ b/system/loggedfs/loggedfs.info @@ -0,0 +1,10 @@ +PRGNAM="loggedfs" +VERSION="0.5" +HOMEPAGE="https://rflament.github.io/loggedfs/" +DOWNLOAD="https://github.com/rflament/loggedfs/archive/0.5/loggedfs-0.5.tar.gz" +MD5SUM="905393fccab55b6d57975fbe4cd29bd3" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="rlog" +MAINTAINER="B. Watson" +EMAIL="yalhcru@gmail.com" diff --git a/system/loggedfs/slack-desc b/system/loggedfs/slack-desc new file mode 100644 index 000000000000..7ef4c59139b6 --- /dev/null +++ b/system/loggedfs/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------------------------------------------------------| +loggedfs: loggedfs (filesystem monitoring with FUSE) +loggedfs: +loggedfs: LoggedFS is a fuse-based filesystem which can log every operation +loggedfs: that happens in it. Fuse does almost everything. LoggedFS only +loggedfs: sends a message to syslog when called by fuse and then let the real +loggedfs: filesystem do the rest of the job. +loggedfs: +loggedfs: +loggedfs: +loggedfs: +loggedfs: |