aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNishant Limbachia <nishant@mnspace.net>2010-05-12 17:43:15 +0200
committerRobby Workman <rworkman@slackbuilds.org>2010-05-12 17:43:15 +0200
commit34e040656ad3513e5cf8c4143ae0a6ce83368c6b (patch)
treee9e3fcab3ac673758c09d534444f3d71ff09ca49
parent55d2cb1f1b2727fb8a9a060edbffadb1bdbfe067 (diff)
network/fail2ban: Updated for version 0.8.3
-rw-r--r--network/fail2ban/README6
-rw-r--r--network/fail2ban/README.SBo36
-rw-r--r--network/fail2ban/README.SLACKWARE41
-rw-r--r--network/fail2ban/doinst.sh6
-rw-r--r--network/fail2ban/fail2ban.SlackBuild60
-rw-r--r--network/fail2ban/fail2ban.info4
-rw-r--r--network/fail2ban/rc.fail2ban10
-rw-r--r--network/fail2ban/slack-desc8
8 files changed, 82 insertions, 89 deletions
diff --git a/network/fail2ban/README b/network/fail2ban/README
index d497303935d58..96b33a1a9c172 100644
--- a/network/fail2ban/README
+++ b/network/fail2ban/README
@@ -3,8 +3,4 @@ too many password failures. It updates firewall rules to reject the
IP address. These rules can be defined by the user. Fail2Ban can read
multiple log files such as sshd, Apache web server, postfix and others.
-fail2ban has following dependencies which are offical Slackware packages:
-1. Python >= 2.3 Required
-2. gamin >= 0.0.21 Optional
-
-Also see README.SBo for configuration and upgrade help. \ No newline at end of file
+See README.SLACKWARE for configuration and upgrade help.
diff --git a/network/fail2ban/README.SBo b/network/fail2ban/README.SBo
deleted file mode 100644
index b5e083cd8b114..0000000000000
--- a/network/fail2ban/README.SBo
+++ /dev/null
@@ -1,36 +0,0 @@
-Once you install the package, you can start using fail2ban by:
-1. mv /etc/rc.d/rc.fail2ban.new /etc/rc.d/rc.fail2ban
-2. chmod +x /etc/rc.d/rc.fail2ban
-3. /etc/rc.d/rc.fail2ban start
-
-Additionally, you can add the following to rc.local for automatic startup
-if [ -x /etc/rc.d/rc.fail2ban ]; then
- /etc/rc.d/rc.fail2ban start
-fi
-
-and add the following to rc.local_shutdown for to stop at shutdown
-if [ -x /etc/rc.d/rc.fail2ban ]; then
- /etc/rc.d/rc.fail2ban stop
-fi
-
-The package contains logrotate script copied from fail2ban manual,
-and modified to reflect Slackware packaging. You can find
-the original script at:
-
-http://www.fail2ban.org/wiki/index.php/MANUAL_0_8
-
-UPGRADING:
-
-Please make sure you have all your modifications to the default .conf files
-in .local files. Upgrade **WILL OVERWRITE** files in place.
-Making modifications to .local files is the recommended practice as per the
-software manual. Each .conf file can be overridden by equivalent .local file.
-Please refer Configuration section in fail2ban manual.
-
-Changelog:
-
-- Simplified rc script removing unnecessary startup options which have now
- become standard.
-- minor fix in slackbuild.
-- doinst.sh now makes /var/run/fail2ban to house pid and socket files.
-08/03/2008 upgraded to fail2ban version 0.8.3, added restart option to rc script
diff --git a/network/fail2ban/README.SLACKWARE b/network/fail2ban/README.SLACKWARE
new file mode 100644
index 0000000000000..6fb9307a16b61
--- /dev/null
+++ b/network/fail2ban/README.SLACKWARE
@@ -0,0 +1,41 @@
+README.SLACKWARE for fail2ban
+
+==============================================================================
+
+Once you install the package, you can start using fail2ban by:
+ /etc/rc.d/rc.fail2ban start
+
+Additionally, you can add the following to rc.local for automatic startup:
+if [ -x /etc/rc.d/rc.fail2ban ]; then
+ /etc/rc.d/rc.fail2ban start
+fi
+
+and add the following to rc.local_shutdown to stop fail2ban at shutdown:
+if [ -x /etc/rc.d/rc.fail2ban ]; then
+ /etc/rc.d/rc.fail2ban stop
+fi
+
+The package contains logrotate script copied from fail2ban manual and
+modified to reflect Slackware packaging. You can find the original script at:
+ http://www.fail2ban.org/wiki/index.php/MANUAL_0_8
+
+==============================================================================
+
+UPGRADING:
+
+Please make sure you have all your modifications done to .local files instead of
+.conf files. Upgrade **WILL OVERWRITE** files in place.
+
+Making modifications to .local files is the recommended practice as per the
+software manual. Each .conf file is overridden by equivalent .local file.
+Please refer Configuration section in fail2ban manual.
+
+==============================================================================
+
+Changelog:
+
+08/03/2008
+ upgraded to fail2ban version 0.8.3, added restart option to rc script
+
+12/28/2008
+ fixed a typo in rc.fail2ban that prevented showing usage info when run without options
diff --git a/network/fail2ban/doinst.sh b/network/fail2ban/doinst.sh
index 485e843f8ea33..f1a42cb78e222 100644
--- a/network/fail2ban/doinst.sh
+++ b/network/fail2ban/doinst.sh
@@ -18,10 +18,6 @@ if [ -e etc/rc.d/rc.fail2ban ]; then
mv etc/rc.d/rc.fail2ban.new.incoming etc/rc.d/rc.fail2ban.new
fi
-# make directory for socket and pid file
-if [ ! -d var/run/fail2ban ]; then
- mkdir -p var/run/fail2ban
-fi
-
config etc/rc.d/rc.fail2ban.new
config etc/logrotate.d/fail2ban.new
+
diff --git a/network/fail2ban/fail2ban.SlackBuild b/network/fail2ban/fail2ban.SlackBuild
index b65d44ef603a6..d95b11cd2a493 100644
--- a/network/fail2ban/fail2ban.SlackBuild
+++ b/network/fail2ban/fail2ban.SlackBuild
@@ -1,20 +1,17 @@
#!/bin/sh
-#################################################################################
-
# Slackware Package Build Script for fail2ban
-#
# Home Page http://www.fail2ban.org/wiki/index.php/Main_Page
-# Copyright (c) 2007, Nishant Limbachia (nishant@mnspace.net)
+# Copyright (c) 2008-2009, Nishant Limbachia (nishant@mnspace.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 script must retain the above copyright notice,
# this list of conditions and the following disclaimer.
-
+#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
@@ -26,13 +23,11 @@
# 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=fail2ban
VERSION=0.8.3
ARCH=${ARCH:-noarch}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
TMP=${TMP:-/tmp/SBo}
@@ -40,54 +35,47 @@ PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
CWD=$(pwd)
-# exit on most errors
set -e
-### clean up from previous builds
rm -fr $PKG $TMP/$PRGNAM-$VERSION
mkdir -p $PKG $TMP $OUTPUT
-
-### Extracting the source tarballs
cd $TMP
-tar xjvf $CWD/$PRGNAM-$VERSION.tar.bz2
+tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
cd $TMP/$PRGNAM-$VERSION
-
chown -R root.root .
find . \
-\( -perm 777 -o -perm 775 -o -perm 771 -o -perm 711 -o -perm 555 -o -perm 551 -o -perm 511 \) \
--exec chmod 755 {} \; -o \
-\( -perm 666 -o -perm 664 -o -perm 660 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
--exec chmod 644 {} \;
+ \( -perm 777 -o -perm 775 -o -perm 771 -o -perm 711 -o -perm 555 -o -perm 551 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 660 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
python setup.py install --root=$PKG
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a COPYING ChangeLog PKG-INFO README TODO $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a \
+ COPYING ChangeLog PKG-INFO README TODO \
+ $PKG/usr/doc/$PRGNAM-$VERSION
+install -m 0644 $CWD/README.SLACKWARE $CWD/$PRGNAM.SlackBuild \
+ $PKG/usr/doc/$PRGNAM-$VERSION
-### installing man pages
mkdir -p $PKG/usr/man/man1
+install -m 0644 man/*.1 $PKG/usr/man/man1
+
+install -D -m 0755 $CWD/rc.fail2ban $PKG/etc/rc.d/rc.fail2ban.new
+install -D -m 0644 $CWD/fail2ban.logrotate $PKG/etc/logrotate.d/fail2ban.new
-install -m 0644 man/fail2ban-client.1 man/fail2ban-regex.1 \
-man/fail2ban-server.1 $PKG/usr/man/man1
+# Make directory for socket and pid file
+mkdir -p $PKG/var/run/fail2ban
-# find and compress man pages
-if [ -d $PKG/usr/man ]; then
- ( cd $PKG/usr/man
+( cd $PKG/usr/man || exit 1
find . -type f -exec gzip -9 {} \;
for i in $(find . -type l) ; do ln -s $(readlink $i).gz $i.gz ; rm $i ; done
- )
-fi
+)
-# install startup script
-install -D -m 0644 $CWD/rc.fail2ban $PKG/etc/rc.d/rc.fail2ban.new
-
-# install logrotate script
-install -D -m 0644 $CWD/fail2ban.logrotate $PKG/etc/logrotate.d/fail2ban.new
-
-### building package
mkdir -p $PKG/install
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cat $CWD/slack-desc > $PKG/install/slack-desc
+
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz
diff --git a/network/fail2ban/fail2ban.info b/network/fail2ban/fail2ban.info
index 2ed2408fc470a..b8e8eaa12651e 100644
--- a/network/fail2ban/fail2ban.info
+++ b/network/fail2ban/fail2ban.info
@@ -1,8 +1,8 @@
PRGNAM="fail2ban"
VERSION="0.8.3"
HOMEPAGE="http://www.fail2ban.org/wiki/index.php/Main_Page"
-DOWNLOAD="http://internap.dl.sourceforge.net/sourceforge/fail2ban/fail2ban-0.8.3.tar.bz2"
+DOWNLOAD="http://downloads.sourceforge.net/fail2ban/fail2ban-0.8.3.tar.bz2"
MD5SUM="b438d7e2ce77a469fb0cca2a5cc0b81c"
MAINTAINER="Nishant Limbachia"
EMAIL="nishant@mnspace.net"
-APPROVED="David Somero" \ No newline at end of file
+APPROVED="rworkman"
diff --git a/network/fail2ban/rc.fail2ban b/network/fail2ban/rc.fail2ban
index 681e86bcadcf7..bc3021e56e3ce 100644
--- a/network/fail2ban/rc.fail2ban
+++ b/network/fail2ban/rc.fail2ban
@@ -2,13 +2,13 @@
#
# /etc/rc.d/rc.fail2ban
#
-# start/stop/reload/status/ping fail2ban server.
+# start/stop/reload/status/ping fail2ban server.
#
# To start fail2ban automatically at boot, make this
# file executable: chmod 755 /etc/rc.d/rc.fail2ban
-# you must also add this file to rc.local in the appropriate
-# order
-#
+# you must also add this file to rc.local in the
+# appropriate order.
+
SOCKET="/var/run/fail2ban/fail2ban.socket"
fail2ban_start() {
@@ -62,7 +62,7 @@ case "$1" in
'ping')
fail2ban_ping
;;
-'*')
+*)
echo "USAGE: $0 start|stop|restart|reload|status|ping"
exit 1
;;
diff --git a/network/fail2ban/slack-desc b/network/fail2ban/slack-desc
index 43e537dbf397a..872f9903e695f 100644
--- a/network/fail2ban/slack-desc
+++ b/network/fail2ban/slack-desc
@@ -1,3 +1,11 @@
+# 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----------------------------------------------------|
fail2ban: Fail2Ban (bans IP that makes too many password failures)
fail2ban:
fail2ban: Fail2Ban scans log files like /var/log/pwdfail and bans IP