aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2013-08-27 14:59:28 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2013-08-27 14:59:28 +0000
commite83a84a337d20424457580ef1bda5b0fec2bd836 (patch)
treee03f4f81cb558e5611d6b00ea6f239e74098b548
parentd20a40ae7cdc940cf5f1b7d53f1cd87e08f40842 (diff)
downloadaports-e83a84a337d20424457580ef1bda5b0fec2bd836.tar.bz2
aports-e83a84a337d20424457580ef1bda5b0fec2bd836.tar.xz
testing/shorewall-core: new aport
Core libraries for Shorewall http://www.shorewall.net/
-rw-r--r--testing/shorewall-core/APKBUILD40
-rw-r--r--testing/shorewall-core/shorewall-no-install-T.patch11
-rw-r--r--testing/shorewall-core/shorewall.initd81
3 files changed, 132 insertions, 0 deletions
diff --git a/testing/shorewall-core/APKBUILD b/testing/shorewall-core/APKBUILD
new file mode 100644
index 0000000000..c070b168f8
--- /dev/null
+++ b/testing/shorewall-core/APKBUILD
@@ -0,0 +1,40 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=shorewall-core
+pkgver=4.5.18
+pkgrel=0
+pkgdesc="Core libraries for Shorewall"
+url="http://www.shorewall.net/"
+arch="noarch"
+license="GPL-2"
+depends=""
+# coreutils for install -T
+makedepends="coreutils"
+replaces=""
+subpackages=""
+source="http://www1.shorewall.net/pub/shorewall/${pkgver%.*}/shorewall-$pkgver/shorewall-core-$pkgver.tar.bz2
+ "
+
+_builddir="$srcdir/$pkgname-$pkgver"
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure MANDIR=/usr/share/man SBINDIR=/usr/sbin || return 1
+}
+
+package() {
+ cd "$_builddir"
+ DESTDIR="$pkgdir" ./install.sh || return 1
+}
+
+md5sums="9bd700f66cb2da2f714a3d4ae4fbca53 shorewall-core-4.5.18.tar.bz2"
+sha256sums="41b1e9e2d09c6344d546f814531996eaf52b3a30ae6c8db7ff009a8a17bde3cd shorewall-core-4.5.18.tar.bz2"
+sha512sums="8b2dd691b84c5ca3beac705b4aecb7ac3c09e794c5e255915bf5a55cebef23ca4cd8fac2b3118d6e6cbbf7e432699cc447d5811de80e1d3bae0516ede27398d1 shorewall-core-4.5.18.tar.bz2"
diff --git a/testing/shorewall-core/shorewall-no-install-T.patch b/testing/shorewall-core/shorewall-no-install-T.patch
new file mode 100644
index 0000000000..09567a5123
--- /dev/null
+++ b/testing/shorewall-core/shorewall-no-install-T.patch
@@ -0,0 +1,11 @@
+--- a/shorewall-4.4.21/install.sh
++++ b/shorewall-4.4.21/install.sh
+@@ -96,7 +96,7 @@
+ # INIT is the name of the script in the $DEST directory
+ # ARGS is "yes" if we've already parsed an argument
+ #
+-T="-T"
++T=
+
+ if [ -z "$DEST" ] ; then
+ DEST="/etc/init.d"
diff --git a/testing/shorewall-core/shorewall.initd b/testing/shorewall-core/shorewall.initd
new file mode 100644
index 0000000000..1c5a5f6aee
--- /dev/null
+++ b/testing/shorewall-core/shorewall.initd
@@ -0,0 +1,81 @@
+#!/sbin/runscript
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-firewall/shorewall-common/files/shorewall.initd,v 1.2 2008/05/04 13:16:40 pva Exp $
+
+extra_started_commands="refresh"
+extra_commands="clear reset check"
+
+depend() {
+ need net
+ provide firewall
+ after ulogd
+}
+
+start() {
+ ebegin "Starting firewall"
+ /sbin/shorewall -f start 1>/dev/null
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping firewall"
+ /sbin/shorewall stop 1>/dev/null
+ eend $?
+}
+
+restart() {
+ # shorewall comes with its own control script that includes a
+ # restart function, so refrain from calling svc_stop/svc_start
+ # here. Note that this comment is required to fix bug 55576;
+ # runscript.sh greps this script... (09 Jul 2004 agriffis)
+ ebegin "Restarting firewall"
+ /sbin/shorewall status >/dev/null
+ if [ $? != 0 ] ; then
+ svc_start
+ else
+ if [ -f /var/lib/shorewall/restore ] ; then
+ /sbin/shorewall restore
+ else
+ /sbin/shorewall restart 1>/dev/null
+ fi
+ fi
+ eend $?
+}
+
+clear() {
+ # clear will remove all the rules and bring the system to an unfirewalled
+ # state. (21 Nov 2004 eldad)
+
+ ebegin "Clearing all firewall rules and setting policy to ACCEPT"
+ /sbin/shorewall clear
+ eend $?
+}
+
+reset() {
+ # reset the packet and byte counters in the firewall
+
+ ebegin "Resetting the packet and byte counters in the firewall"
+ /sbin/shorewall reset
+ eend $?
+}
+
+refresh() {
+ # refresh the rules involving the broadcast addresses of firewall
+ # interfaces, the black list, traffic control rules and
+ # ECN control rules
+
+ ebegin "Refreshing firewall rules"
+ /sbin/shorewall refresh
+ eend $?
+}
+
+check() {
+ # perform cursory validation of the zones, interfaces, hosts, rules
+ # and policy files. CAUTION: does not parse and validate the generated
+ # iptables commands.
+
+ ebegin "Checking configuration files"
+ /sbin/shorewall check
+ eend $?
+}