diff options
author | David Woodfall <dave@dawoodfall.net> | 2017-10-01 17:36:14 +0100 |
---|---|---|
committer | David Spencer <idlemoor@slackbuilds.org> | 2017-10-01 17:36:14 +0100 |
commit | a53c8e614351981fa083c1db5d51bcf8ebe5ebf8 (patch) | |
tree | 233012c6223a1b2b5c15893d49ffed08993cc7db /network | |
parent | cc67dc7a20a0a35c0dd43c23a80e8c8f4e4158f4 (diff) |
network/oinkmaster: Added (update/manage snort & suricata rules).
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
Diffstat (limited to 'network')
-rw-r--r-- | network/oinkmaster/README | 10 | ||||
-rw-r--r-- | network/oinkmaster/doinst.sh | 14 | ||||
-rw-r--r-- | network/oinkmaster/oinkmaster.SlackBuild | 79 | ||||
-rw-r--r-- | network/oinkmaster/oinkmaster.info | 10 | ||||
-rw-r--r-- | network/oinkmaster/slack-desc | 19 |
5 files changed, 132 insertions, 0 deletions
diff --git a/network/oinkmaster/README b/network/oinkmaster/README new file mode 100644 index 000000000000..8f88655508a0 --- /dev/null +++ b/network/oinkmaster/README @@ -0,0 +1,10 @@ +Oinkmaster is a script that will help you update and manage your +Snort rules. It is released under the BSD license and will work on +most platforms that can run Perl scripts, e.g. Linux, *BSD, Windows, +Mac OS X, Solaris, etc. Oinkmaster can be used to update and manage +the VRT licensed rules, the community rules, the bleeding-snort rules +and other third party rules, including your own local rules. + +Instructions for setting up oinkmaster: + +http://suricata.readthedocs.io/en/latest/rule-management/oinkmaster.html diff --git a/network/oinkmaster/doinst.sh b/network/oinkmaster/doinst.sh new file mode 100644 index 000000000000..18907b2f144f --- /dev/null +++ b/network/oinkmaster/doinst.sh @@ -0,0 +1,14 @@ +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... +} + +config etc/oinkmaster.conf.new diff --git a/network/oinkmaster/oinkmaster.SlackBuild b/network/oinkmaster/oinkmaster.SlackBuild new file mode 100644 index 000000000000..c86dd695107e --- /dev/null +++ b/network/oinkmaster/oinkmaster.SlackBuild @@ -0,0 +1,79 @@ +#!/bin/sh + +# Slackware build script for oinkmaster +# Copyright 2017 David Woodfall <dave@dawoodfall.net> +# 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=oinkmaster +VERSION=${VERSION:-2.0} +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} + +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 {} \; + +mkdir -p $PKG/usr/sbin +mkdir -p $PKG/usr/man/man1 +mkdir -p $PKG/etc +cp oinkmaster.pl $PKG/usr/sbin +cp oinkmaster.1 $PKG/usr/man/man1 +cp oinkmaster.conf $PKG/etc/oinkmaster.conf.new + +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 -a \ + ChangeLog INSTALL LICENSE README.templates README README.win32 \ + README.gui contrib template-examples.conf \ + $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/network/oinkmaster/oinkmaster.info b/network/oinkmaster/oinkmaster.info new file mode 100644 index 000000000000..ba65512aeb6a --- /dev/null +++ b/network/oinkmaster/oinkmaster.info @@ -0,0 +1,10 @@ +PRGNAM="oinkmaster" +VERSION="2.0" +HOMEPAGE="http://oinkmaster.sourceforge.net" +DOWNLOAD="https://downloads.sourceforge.net/project/oinkmaster/oinkmaster/2.0/oinkmaster-2.0.tar.gz" +MD5SUM="d2a1b56f51cf40e919c63206ca4ec8f8" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="" +MAINTAINER="David Woodfall" +EMAIL="dave@dawoodfall.net" diff --git a/network/oinkmaster/slack-desc b/network/oinkmaster/slack-desc new file mode 100644 index 000000000000..111ef578e781 --- /dev/null +++ b/network/oinkmaster/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------------------------------------------------------| +oinkmaster: oinkmaster (update and manage snort and suricata rules) +oinkmaster: +oinkmaster: Oinkmaster is a script that will help you update and manage your +oinkmaster: Snort rules. It is released under the BSD license and will work on +oinkmaster: most platforms that can run Perl scripts, e.g. Linux, *BSD, Windows, +oinkmaster: Mac OS X, Solaris, etc. Oinkmaster can be used to update and manage +oinkmaster: the VRT licensed rules, the community rules, the bleeding-snort rules +oinkmaster: and other third party rules, including your own local rules. +oinkmaster: +oinkmaster: http://oinkmaster.sourceforge.net +oinkmaster: http://suricata.readthedocs.io/en/latest/rule-management |