aboutsummaryrefslogtreecommitdiff
path: root/network/fail2ban
diff options
context:
space:
mode:
authorNishant Limbachia <nishant@mnspace.net>2011-12-25 10:33:11 -0200
committerRobby Workman <rworkman@slackbuilds.org>2011-12-27 10:15:06 -0600
commit32cb46a3aa7012c2fca392ec3dd12769be3efb10 (patch)
treecfa4460961e0b75636a3a45581146c27e68a2e59 /network/fail2ban
parent18dd0cddaa6b89ec26fd7e4126b3d1fc108c70b8 (diff)
network/fail2ban: Updated for version 0.8.6.
Signed-off-by: Niels Horn <niels.horn@slackbuilds.org>
Diffstat (limited to 'network/fail2ban')
-rw-r--r--network/fail2ban/README.SBo2
-rw-r--r--network/fail2ban/doinst.sh18
-rw-r--r--network/fail2ban/fail2ban.SlackBuild30
-rw-r--r--network/fail2ban/fail2ban.info10
-rw-r--r--network/fail2ban/rc.fail2ban8
-rw-r--r--network/fail2ban/slack-desc2
6 files changed, 33 insertions, 37 deletions
diff --git a/network/fail2ban/README.SBo b/network/fail2ban/README.SBo
index 398ab8543100f..458d5d7137880 100644
--- a/network/fail2ban/README.SBo
+++ b/network/fail2ban/README.SBo
@@ -39,3 +39,5 @@ to account for users who keeps their config options in .conf files. Now the scr
moves the .conf files to .new which will prevent the overwrite of existing .conf files.
10/29/2010
Simplified rc.fail2ban start. Removed check for executable bit on rc.fail2ban during startup.
+12/24/2011
+Upgraded to new version 0.8.6
diff --git a/network/fail2ban/doinst.sh b/network/fail2ban/doinst.sh
index 5a77f216e650d..f6a20b4af0755 100644
--- a/network/fail2ban/doinst.sh
+++ b/network/fail2ban/doinst.sh
@@ -11,14 +11,18 @@ config() {
# Otherwise, we leave the .new copy for the admin to consider...
}
-# Keep same perms on rc.fail2ban.new:
-if [ -e etc/rc.d/rc.fail2ban ]; then
- cp -a etc/rc.d/rc.fail2ban etc/rc.d/rc.fail2ban.new.incoming
- cat etc/rc.d/rc.fail2ban.new > etc/rc.d/rc.fail2ban.new.incoming
- mv etc/rc.d/rc.fail2ban.new.incoming etc/rc.d/rc.fail2ban.new
-fi
+preserve_perms() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ if [ -e $OLD ]; then
+ cp -a $OLD ${NEW}.incoming
+ cat $NEW > ${NEW}.incoming
+ mv ${NEW}.incoming $NEW
+ fi
+ config $NEW
+}
-config etc/rc.d/rc.fail2ban.new
+preserve_perms etc/rc.d/rc.fail2ban.new
config etc/logrotate.d/fail2ban.new
config etc/fail2ban/fail2ban.conf.new
config etc/fail2ban/jail.conf.new
diff --git a/network/fail2ban/fail2ban.SlackBuild b/network/fail2ban/fail2ban.SlackBuild
index 1495210f9ae18..7c87c97644e7a 100644
--- a/network/fail2ban/fail2ban.SlackBuild
+++ b/network/fail2ban/fail2ban.SlackBuild
@@ -2,8 +2,9 @@
# Slackware Package Build Script for fail2ban
# Home Page http://www.fail2ban.org/wiki/index.php/Main_Page
+# Git Hub: https://github.com/fail2ban/fail2ban/
-# Copyright (c) 2008-2010, Nishant Limbachia, Hoffman Estates, IL, USA
+# Copyright (c) 2008-2011, Nishant Limbachia, Hoffman Estates, IL, USA
# <nishant _AT_ mnspace _DOT_ net>
# All rights reserved.
@@ -25,20 +26,12 @@
# 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=${VERSION:-0.8.4}
+PRGNAM="fail2ban"
+VERSION=${VERSION:-0.8.6}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
-# Automatically determine the architecture we're building on:
-if [ -z "$ARCH" ]; then
- case "$( uname -m )" in
- i?86) ARCH=i486 ;;
- arm*) ARCH=arm ;;
- # Unless $ARCH is already set, use uname -m for all other archs:
- *) ARCH=$( uname -m ) ;;
- esac
-fi
+ARCH="noarch"
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
@@ -47,7 +40,6 @@ OUTPUT=${OUTPUT:-/tmp}
set -e
-# clean up from previous builds
rm -fr $PKG $TMP/$PRGNAM-$VERSION
mkdir -p $PKG $TMP $OUTPUT
cd $TMP
@@ -65,7 +57,7 @@ python setup.py install --root=$PKG
# installing man pages
mkdir -p $PKG/usr/man/man1
install -m 0644 man/fail2ban-client.1 man/fail2ban-regex.1 \
-man/fail2ban-server.1 $PKG/usr/man/man1
+ man/fail2ban-server.1 $PKG/usr/man/man1
# move config files to .new
( cd $PKG/etc/fail2ban
@@ -73,11 +65,9 @@ man/fail2ban-server.1 $PKG/usr/man/man1
mv $file "$file.new"
done
)
-# compress man pages
-( cd $PKG/usr/man
- find . -type f -exec gzip -9 {} \;
- for i in $(find . -type l) ; do ln -s $(readlink $i).gz $i.gz ; rm $i ; done
-)
+
+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
# install startup script
install -D -m 0644 $CWD/rc.fail2ban $PKG/etc/rc.d/rc.fail2ban.new
@@ -89,7 +79,7 @@ install -D -m 0644 $CWD/fail2ban.logrotate $PKG/etc/logrotate.d/fail2ban.new
mkdir -p $PKG/var/run/fail2ban
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a COPYING ChangeLog PKG-INFO README TODO $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a COPYING ChangeLog README THANKS TODO $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
# building package
diff --git a/network/fail2ban/fail2ban.info b/network/fail2ban/fail2ban.info
index e8fc035549e59..4b1c03ccaf85c 100644
--- a/network/fail2ban/fail2ban.info
+++ b/network/fail2ban/fail2ban.info
@@ -1,10 +1,10 @@
PRGNAM="fail2ban"
-VERSION="0.8.4"
-HOMEPAGE="http://www.fail2ban.org/wiki/index.php/Main_Page"
-DOWNLOAD="http://downloads.sourceforge.net/fail2ban/fail2ban-0.8.4.tar.bz2"
-MD5SUM="df94335a5d12b4750869e5fe350073fa"
+VERSION="0.8.6"
+HOMEPAGE="https://github.com/fail2ban/fail2ban/"
+DOWNLOAD="http://www.mnspace.net/files/slackbuilds/slack1337/fail2ban/fail2ban-0.8.6.tar.xz"
+MD5SUM="b61b1037a0b6039c16262a44c6add18d"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
MAINTAINER="Nishant Limbachia"
EMAIL="nishant@mnspace.net"
-APPROVED="Erik Hanson"
+APPROVED="Niels Horn"
diff --git a/network/fail2ban/rc.fail2ban b/network/fail2ban/rc.fail2ban
index b439ae51eaf3b..66937fc9e7c78 100644
--- a/network/fail2ban/rc.fail2ban
+++ b/network/fail2ban/rc.fail2ban
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# Copyright (c) 2008-2010, Nishant Limbachia, Hoffman Estates, IL, USA
+# Copyright (c) 2008-2011, Nishant Limbachia, Hoffman Estates, IL, USA
# <nishant _AT_ mnspace _DOT_ net>
# /etc/rc.d/rc.fail2ban
#
@@ -8,10 +8,10 @@
#
# 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 for fail2ban to start during boot.
+# you must also add this to rc.local for fail2ban to start during boot.
-### default socket file is /var/run/fail2ban/fail2ban.sock which can be
-### changed via the config file: /etc/fail2ban/fail2ban.conf
+# default socket file is /var/run/fail2ban/fail2ban.sock which can be
+# changed via the config file: /etc/fail2ban/fail2ban.conf
fail2ban_start() {
if [ -x /etc/rc.d/rc.fail2ban ]; then
diff --git a/network/fail2ban/slack-desc b/network/fail2ban/slack-desc
index 7f4b38938631b..f9405a2931931 100644
--- a/network/fail2ban/slack-desc
+++ b/network/fail2ban/slack-desc
@@ -5,7 +5,7 @@
# make exactly 11 lines for the formatting to be correct. It's also
# customary to leave one space after the ':'.
- |-----handy-ruler--------------------------------------------------|
+ |-----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