diff options
author | SanskritFritz | 2015-06-14 00:41:09 +0200 |
---|---|---|
committer | SanskritFritz | 2015-06-14 00:41:09 +0200 |
commit | 265343b75f0be752d120c793ed7ccb60a37b842a (patch) | |
tree | d5a4b51aa7aab920006e5f53eb06cffeb073cb52 | |
download | aur-265343b75f0be752d120c793ed7ccb60a37b842a.tar.gz |
Initial import
-rw-r--r-- | .SRCINFO | 28 | ||||
-rw-r--r-- | PKGBUILD | 61 | ||||
-rw-r--r-- | disable-kernel-vercheck.patch | 21 | ||||
-rw-r--r-- | firehol.install | 12 | ||||
-rw-r--r-- | firehol.service | 11 | ||||
-rw-r--r-- | fireqos.service | 11 |
6 files changed, 144 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..66c3e3ffed3c --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,28 @@ +pkgbase = firehol-git + pkgdesc = The iptables stateful packet filtering firewall builder. + pkgver = 2013.10.23 + pkgrel = 1 + url = http://firehol.org/ + install = firehol.install + arch = any + license = GPL + makedepends = git + makedepends = dblatex + depends = iptables + depends = gawk + depends = iproute + provides = firehol + conflicts = firehol + backup = etc/firehol/firehol.conf + backup = etc/firehol/fireqos.conf + source = git://github.com/ktsaou/firehol.git + source = disable-kernel-vercheck.patch + source = firehol.service + source = fireqos.service + md5sums = SKIP + md5sums = 73a8ae701f82af98e56a4b2f436fb399 + md5sums = d87f844ac0ef319fd0ea0adcb0a66905 + md5sums = ea0b9238f494e4eeeac7a975346bcf3c + +pkgname = firehol-git + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..cce4abe06c05 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,61 @@ +# Contributor: Jakob Gruber <jakob.gruber@gmail.com> +# Contributor: Geoffroy Carrier <geoffroy.carrier@koon.fr> +# Contributor: Filip Dvorak <fila@pruda.com> +# Contributor: 3ED_0 (AUR) +# Maintainer: SanskritFritz (gmail) + +pkgname=firehol-git +_gitname=firehol +pkgver=2013.10.23 +pkgrel=1 +pkgdesc="The iptables stateful packet filtering firewall builder." +url="http://firehol.org/" +arch=('any') +license=('GPL') +depends=('iptables' 'gawk' 'iproute') +makedepends=('git' 'dblatex') +provides=('firehol') +conflicts=('firehol') +backup=('etc/firehol/firehol.conf' 'etc/firehol/fireqos.conf') +install='firehol.install' +source=('git://github.com/ktsaou/firehol.git' + 'disable-kernel-vercheck.patch' 'firehol.service' 'fireqos.service') + +pkgver() { + cd "$_gitname" + git log -1 --format="%cd" --date=short | sed 's|-|.|g' +} + +build() { + cd "$srcdir/$_gitname" + + # the sed command for minimum kernel version is broken, and since it + # only ensures we are using a kernel > 2.3, we can safely skip it entirely + # https://bugs.archlinux.org/task/25917 +# patch -p1 < "$srcdir/disable-kernel-vercheck.patch" + + ./autogen.sh + ./configure --enable-maintainer-mode --prefix="/usr" --sysconfdir="/etc" --sbindir="/usr/bin" + make +} + +package() { + cd "$srcdir/$_gitname" + + make prefix="$pkgdir/usr" sysconfdir="$pkgdir/etc" sbindir="$pkgdir/usr/bin" install + + install -D -m644 $srcdir/firehol.service "$pkgdir/usr/lib/systemd/system/firehol.service" + install -D -m644 $srcdir/fireqos.service "$pkgdir/usr/lib/systemd/system/fireqos.service" + + # backup does not work if the file is not contained in the package + # plus, creating it in post_install will set 777 permissions and we dont want that + touch "$pkgdir/etc/firehol/firehol.conf" + chmod 600 "$pkgdir/etc/firehol/firehol.conf" + touch "$pkgdir/etc/firehol/fireqos.conf" + chmod 600 "$pkgdir/etc/firehol/fireqos.conf" +} + +md5sums=('SKIP' + '73a8ae701f82af98e56a4b2f436fb399' + 'd87f844ac0ef319fd0ea0adcb0a66905' + 'ea0b9238f494e4eeeac7a975346bcf3c') diff --git a/disable-kernel-vercheck.patch b/disable-kernel-vercheck.patch new file mode 100644 index 000000000000..ff89e895219e --- /dev/null +++ b/disable-kernel-vercheck.patch @@ -0,0 +1,21 @@ +--- a/firehol.sh 2011-01-25 12:54:55.000000000 +0100 ++++ b/firehol.sh 2011-09-12 22:31:09.893272704 +0200 +@@ -5731,18 +5731,6 @@ + exit 0 + fi + +-KERNELMAJ=`${UNAME_CMD} -r | ${SED_CMD} -e 's,\..*,,'` +-KERNELMIN=`${UNAME_CMD} -r | ${SED_CMD} -e 's,[^\.]*\.,,' -e 's,\..*,,'` +- +-if [ "$KERNELMAJ" -lt 2 ] ; then +- echo >&2 "FireHOL requires a kernel version higher than 2.3." +- exit 0 +-fi +-if [ "$KERNELMAJ" -eq 2 -a "$KERNELMIN" -lt 3 ] ; then +- echo >&2 "FireHOL requires a kernel version higher than 2.3." +- exit 0 +-fi +- + if ${LSMOD_CMD} 2>/dev/null | ${GREP_CMD} -q ipchains ; then + # Don't do both + echo >&2 "ipchains is loaded in the kernel. Please remove ipchains to run iptables." diff --git a/firehol.install b/firehol.install new file mode 100644 index 000000000000..f2d830607d22 --- /dev/null +++ b/firehol.install @@ -0,0 +1,12 @@ +post_install() { + echo '###########################' + echo ' ' + echo 'You will need to configure firehol by checking out' + echo 'the tutorials on http://firehol.sourceforge.net/' + echo 'and editing the /etc/firehol/firehol.conf file.' + echo 'Some example configurations have been placed in' + echo '/etc/firehol/examples' + echo ' ' + echo '###########################' + echo ' ' +} diff --git a/firehol.service b/firehol.service new file mode 100644 index 000000000000..a8388553f7a4 --- /dev/null +++ b/firehol.service @@ -0,0 +1,11 @@ +[Unit] +Description=Firehol stateful packet filtering firewall builder + +[Service] +Type=oneshot +ExecStart=/usr/bin/firehol start +ExecStop=/usr/bin/firehol stop +RemainAfterExit=yes + +[Install] +WantedBy=multi-user.target diff --git a/fireqos.service b/fireqos.service new file mode 100644 index 000000000000..582c2e795352 --- /dev/null +++ b/fireqos.service @@ -0,0 +1,11 @@ +[Unit] +Description=FireQOS, a TC based bandwidth shaper + +[Service] +Type=oneshot +ExecStart=/usr/bin/fireqos start +ExecStop=/usr/bin/fireqos stop +RemainAfterExit=yes + +[Install] +WantedBy=multi-user.target |