diff options
author | ArTourter <artourter@gmail.com> | 2010-05-12 23:32:45 +0200 |
---|---|---|
committer | Robby Workman <rworkman@slackbuilds.org> | 2010-05-12 23:32:45 +0200 |
commit | 7193c26929abe72cad3609559d123341ec74626e (patch) | |
tree | 02c2e10ca5d10fe633014d0d526c297295ee42c0 /network | |
parent | b1e2028da36b1d946290b93d321bdd4d3db54bc5 (diff) | |
download | slackbuilds-7193c26929abe72cad3609559d123341ec74626e.tar.gz |
network/shorewall-common: Added to 12.2 repository
Diffstat (limited to 'network')
-rw-r--r-- | network/shorewall-common/README | 10 | ||||
-rw-r--r-- | network/shorewall-common/doinst.sh | 64 | ||||
-rw-r--r-- | network/shorewall-common/shorewall-common.SlackBuild | 97 | ||||
-rw-r--r-- | network/shorewall-common/shorewall-common.info | 8 | ||||
-rw-r--r-- | network/shorewall-common/slack-desc | 19 |
5 files changed, 198 insertions, 0 deletions
diff --git a/network/shorewall-common/README b/network/shorewall-common/README new file mode 100644 index 0000000000..79c44b348d --- /dev/null +++ b/network/shorewall-common/README @@ -0,0 +1,10 @@ +Shorewall (Iptables Made Easy) + +The Shoreline Firewall, more commonly known as "Shorewall", is a +Netfilter (iptables) based firewall that can be used on a dedicated +firewall system, a multi-function gateway/router/server or on a +standalone GNU/Linux system. + +Common files for the shorewall firewall compilers +You will need at least one of the compiler packages (shorewall-perl +or shorewall-shell) to use shorewall. diff --git a/network/shorewall-common/doinst.sh b/network/shorewall-common/doinst.sh new file mode 100644 index 0000000000..8ce6a72e49 --- /dev/null +++ b/network/shorewall-common/doinst.sh @@ -0,0 +1,64 @@ +config() { + NEW="$1" + OLD="${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... +} + +# Keep same perms on rc.firewall.new: +if [ -e etc/rc.d/rc.firewall ]; then + cp -a etc/rc.d/rc.firewall etc/rc.d/rc.firewall.new.incoming + cat etc/rc.d/rc.firewall.new > etc/rc.d/rc.firewall.new.incoming + mv etc/rc.d/rc.firewall.new.incoming etc/rc.d/rc.firewall.new +fi +# Keep same perms on rc.shorewall.new: +if [ -e etc/rc.d/rc.shorewall ]; then + cp -a etc/rc.d/rc.shorewall etc/rc.d/rc.shorewall.new.incoming + cat etc/rc.d/rc.shorewall.new > etc/rc.d/rc.shorewall.new.incoming + mv etc/rc.d/rc.shorewall.new.incoming etc/rc.d/rc.shorewall.new +fi + +config etc/rc.d/rc.firewall.new +config etc/rc.d/rc.shorewall.new + +config etc/shorewall/accounting.new +config etc/shorewall/actions.new +config etc/shorewall/blacklist.new +config etc/shorewall/continue.new +config etc/shorewall/ecn.new +config etc/shorewall/hosts.new +config etc/shorewall/init.new +config etc/shorewall/initdone.new +config etc/shorewall/interfaces.new +config etc/shorewall/ipsec.new +config etc/shorewall/maclist.new +config etc/shorewall/masq.new +config etc/shorewall/nat.new +config etc/shorewall/netmap.new +config etc/shorewall/notrack.new +config etc/shorewall/params.new +config etc/shorewall/policy.new +config etc/shorewall/providers.new +config etc/shorewall/proxyarp.new +config etc/shorewall/restored.new +config etc/shorewall/route_rules.new +config etc/shorewall/routestopped.new +config etc/shorewall/rules.new +config etc/shorewall/shorewall.conf.new +config etc/shorewall/start.new +config etc/shorewall/started.new +config etc/shorewall/stop.new +config etc/shorewall/stopped.new +config etc/shorewall/tcclasses.new +config etc/shorewall/tcdevices.new +config etc/shorewall/tcfilters.new +config etc/shorewall/tcrules.new +config etc/shorewall/tos.new +config etc/shorewall/tunnels.new +config etc/shorewall/zones.new + diff --git a/network/shorewall-common/shorewall-common.SlackBuild b/network/shorewall-common/shorewall-common.SlackBuild new file mode 100644 index 0000000000..fd967fb6b0 --- /dev/null +++ b/network/shorewall-common/shorewall-common.SlackBuild @@ -0,0 +1,97 @@ +#!/bin/sh + +# Slackware build script for shorewall-common + +# Copyright (c) 2008-2009 Gregory J.L. Tourte (artourter@gmail.com) +# 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=shorewall-common +VERSION=${VERSION:-4.2.10} +ARCH=noarch +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +BASEVERS=4.2.10 + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +set -e # Exit on most errors + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$BASEVERS +tar xvf $CWD/$PRGNAM-$BASEVERS.tar.bz2 +cd $TMP/$PRGNAM-$BASEVERS +chown -R root:root . + +# Patch the base against all the patchlevel patches in order if present +if [ $(ls $CWD/patches 2>/dev/null | wc -l) -gt 0 ]; then + for PATCH in $CWD/patches/* ; do + patch -p1 < $PATCH + done +fi + +PREFIX=$PKG \ + OWNER='root' \ + GROUP='root' \ + DEST=/etc/rc.d \ + MANDIR=/usr/man \ + SLACKWARE=yes \ + ./install.sh + +# Don't clobber config files +( cd $PKG/etc/shorewall + for i in $(ls|grep -v Makefile) ; do + mv $i $i.new; + done +) +( cd $PKG/etc/rc.d/ + mv rc.firewall rc.firewall.new + mv rc.shorewall rc.shorewall.new +) + +mkdir -p $PKG/var/lock/subsys +chmod 0755 $PKG/{etc,usr/share,var/lib}/shorewall $PKG/var/lock/subsys +chmod 0644 $PKG/etc/shorewall/* $PKG/etc/rc.d/* + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a \ + COPYING INSTALL changelog.txt releasenotes.txt tunnel ipsecvpn Samples \ + $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.tgz + +# Clean up the extra stuff: +if [ "$1" = "--cleanup" ]; then + rm -rf $TMP/$PRGNAM-$BASEVERS + rm -rf $PKG +fi + +# vim: et ts=2 diff --git a/network/shorewall-common/shorewall-common.info b/network/shorewall-common/shorewall-common.info new file mode 100644 index 0000000000..ee8e4582ec --- /dev/null +++ b/network/shorewall-common/shorewall-common.info @@ -0,0 +1,8 @@ +PRGNAM="shorewall-common" +VERSION="4.2.10" +HOMEPAGE="http://www.shorewall.net" +DOWNLOAD="http://www.shorewall.net/pub/shorewall/4.2/shorewall-4.2.10/base/shorewall-common-4.2.10.tar.bz2" +MD5SUM="49bdbbae8dec65154c4e5538ed3c9865" +MAINTAINER="ArTourter" +EMAIL="artourter@gmail.com" +APPROVED="rworkman" diff --git a/network/shorewall-common/slack-desc b/network/shorewall-common/slack-desc new file mode 100644 index 0000000000..bc92007bd2 --- /dev/null +++ b/network/shorewall-common/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 ':'. + + |-----handy-ruler---------------------------------------------| +shorewall-common: Shorewall (Iptables Made Easy) +shorewall-common: +shorewall-common: The Shoreline Firewall, more commonly known as "Shorewall", +shorewall-common: is a Netfilter (iptables) based firewall that can be used on +shorewall-common: a dedicated firewall system, a multi-function gateway / +shorewall-common: router / server, or on a standalone GNU/Linux system. +shorewall-common: This package contains common files required by both the +shorewall-common: shorewall-perl and shorewall-shell compilers for Shoreline. +shorewall-common: +shorewall-common: http://www.shorewall.net/ +shorewall-common: |