firehol.patch
author Tomas Zeman <tzeman@volny.cz>
Wed, 15 Feb 2012 15:39:27 +0100
changeset 126 df158d44c16f
parent 118 570f7bd42975
permissions -rw-r--r--
diet-bglibs.patch: folded w/ diet-bglibs-upgrade-1.0.patch
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
10
2e66fba376eb firehol: firehol-1.256-1
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
     1
firehol: iptables firewall builder
2e66fba376eb firehol: firehol-1.256-1
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
     2
118
570f7bd42975 firehol.patch: folded w/ upgrade-0.9-firehol.patch
Tomas Zeman <tzeman@volny.cz>
parents: 10
diff changeset
     3
diff -r d59fcda66b13 source/custom/firehol/FrugalBuild
570f7bd42975 firehol.patch: folded w/ upgrade-0.9-firehol.patch
Tomas Zeman <tzeman@volny.cz>
parents: 10
diff changeset
     4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
570f7bd42975 firehol.patch: folded w/ upgrade-0.9-firehol.patch
Tomas Zeman <tzeman@volny.cz>
parents: 10
diff changeset
     5
+++ b/source/custom/firehol/FrugalBuild	Wed Feb 15 15:29:26 2012 +0100
10
2e66fba376eb firehol: firehol-1.256-1
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
     6
@@ -0,0 +1,35 @@
2e66fba376eb firehol: firehol-1.256-1
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
     7
+# Maintainer: Tomas Zeman <tzeman@volny.cz>
2e66fba376eb firehol: firehol-1.256-1
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
     8
+# Ported from:
2e66fba376eb firehol: firehol-1.256-1
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
     9
+# 	http://aur.archlinux.org/packages/firehol/firehol/PKGBUILD
2e66fba376eb firehol: firehol-1.256-1
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    10
+# 	Contributor: Filip Dvorak <fila@pruda.com>
2e66fba376eb firehol: firehol-1.256-1
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    11
+pkgname=firehol
118
570f7bd42975 firehol.patch: folded w/ upgrade-0.9-firehol.patch
Tomas Zeman <tzeman@volny.cz>
parents: 10
diff changeset
    12
+pkgver=1.273
10
2e66fba376eb firehol: firehol-1.256-1
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    13
+pkgrel=1
2e66fba376eb firehol: firehol-1.256-1
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    14
+pkgdesc="The iptables stateful packet filtering firewall builder."
2e66fba376eb firehol: firehol-1.256-1
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    15
+_F_sourceforge_dirname="firehol"
2e66fba376eb firehol: firehol-1.256-1
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    16
+Finclude sourceforge
2e66fba376eb firehol: firehol-1.256-1
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    17
+url="http://firehol.sourceforge.net"
118
570f7bd42975 firehol.patch: folded w/ upgrade-0.9-firehol.patch
Tomas Zeman <tzeman@volny.cz>
parents: 10
diff changeset
    18
+purl="http://sourceforge.net/project/showfiles.php?group_id=58425&package_id=54268"
10
2e66fba376eb firehol: firehol-1.256-1
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    19
+archs=('i686' 'x86_64')
2e66fba376eb firehol: firehol-1.256-1
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    20
+license=('GPL')
2e66fba376eb firehol: firehol-1.256-1
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    21
+groups=('custom')
2e66fba376eb firehol: firehol-1.256-1
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    22
+depends=('iptables' 'gawk' 'iproute2')
2e66fba376eb firehol: firehol-1.256-1
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    23
+makedepends=()
2e66fba376eb firehol: firehol-1.256-1
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    24
+conflicts=()
2e66fba376eb firehol: firehol-1.256-1
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    25
+replaces=()
2e66fba376eb firehol: firehol-1.256-1
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    26
+backup=('etc/firehol/firehol.conf')
2e66fba376eb firehol: firehol-1.256-1
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    27
+install=('firehol.install')
2e66fba376eb firehol: firehol-1.256-1
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    28
+up2date="lynx -dump '$purl'|grep tar.bz2|grep -m1 '$pkgname-'|sed 's/.*-\(.*\).tar.bz2 .*/\1/'"
2e66fba376eb firehol: firehol-1.256-1
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    29
+source=(http://dl.sourceforge.net/sourceforge/firehol/$pkgname-$pkgver.tar.bz2)
118
570f7bd42975 firehol.patch: folded w/ upgrade-0.9-firehol.patch
Tomas Zeman <tzeman@volny.cz>
parents: 10
diff changeset
    30
+sha1sums=('09433f7fbb3cbb7e33e9c601008191bfe3b388a8')
10
2e66fba376eb firehol: firehol-1.256-1
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    31
+
2e66fba376eb firehol: firehol-1.256-1
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    32
+build() {
2e66fba376eb firehol: firehol-1.256-1
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    33
+  cd $startdir/src/$pkgname-$pkgver
2e66fba376eb firehol: firehol-1.256-1
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    34
+  install -D -m755 firehol.sh $startdir/pkg/etc/rc.d/rc.firehol
2e66fba376eb firehol: firehol-1.256-1
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    35
+  mkdir $startdir/pkg/etc/firehol/
2e66fba376eb firehol: firehol-1.256-1
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    36
+  
2e66fba376eb firehol: firehol-1.256-1
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    37
+  cp get-iana.sh $startdir/pkg/etc/firehol/
2e66fba376eb firehol: firehol-1.256-1
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    38
+  cp adblock.sh $startdir/pkg/etc/firehol/
2e66fba376eb firehol: firehol-1.256-1
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    39
+  cd examples
2e66fba376eb firehol: firehol-1.256-1
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    40
+  cp *.conf $startdir/pkg/etc/firehol/
2e66fba376eb firehol: firehol-1.256-1
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    41
+}
118
570f7bd42975 firehol.patch: folded w/ upgrade-0.9-firehol.patch
Tomas Zeman <tzeman@volny.cz>
parents: 10
diff changeset
    42
diff -r d59fcda66b13 source/custom/firehol/firehol.install
570f7bd42975 firehol.patch: folded w/ upgrade-0.9-firehol.patch
Tomas Zeman <tzeman@volny.cz>
parents: 10
diff changeset
    43
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
570f7bd42975 firehol.patch: folded w/ upgrade-0.9-firehol.patch
Tomas Zeman <tzeman@volny.cz>
parents: 10
diff changeset
    44
+++ b/source/custom/firehol/firehol.install	Wed Feb 15 15:29:26 2012 +0100
10
2e66fba376eb firehol: firehol-1.256-1
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    45
@@ -0,0 +1,26 @@
2e66fba376eb firehol: firehol-1.256-1
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    46
+#!/bin/bash
2e66fba376eb firehol: firehol-1.256-1
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    47
+
2e66fba376eb firehol: firehol-1.256-1
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    48
+# arg 1:  the new package version
2e66fba376eb firehol: firehol-1.256-1
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    49
+post_install() {
2e66fba376eb firehol: firehol-1.256-1
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    50
+    /etc/firehol/get-iana.sh
2e66fba376eb firehol: firehol-1.256-1
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    51
+    echo 'Autodetecting networks and creating initial firehol.conf file...'
2e66fba376eb firehol: firehol-1.256-1
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    52
+    /etc/rc.d/rc.firehol helpme >/etc/firehol/firehol.conf.default
2e66fba376eb firehol: firehol-1.256-1
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    53
+    echo '###########################'
2e66fba376eb firehol: firehol-1.256-1
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    54
+    echo ' '
2e66fba376eb firehol: firehol-1.256-1
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    55
+    echo 'Autodetection of network setup has been done, however'
2e66fba376eb firehol: firehol-1.256-1
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    56
+    echo 'you will need to configure firehol by checking out'
2e66fba376eb firehol: firehol-1.256-1
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    57
+    echo 'the tutorials on http://firehol.sourceforge.net/ and'
2e66fba376eb firehol: firehol-1.256-1
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    58
+    echo 'editing the /etc/firehol/firehol.conf file. Some'
2e66fba376eb firehol: firehol-1.256-1
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    59
+    echo 'example configurations have been placed in /etc/firehol.'
2e66fba376eb firehol: firehol-1.256-1
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    60
+    echo ' '
2e66fba376eb firehol: firehol-1.256-1
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    61
+    echo 'Firehol can be manipulated via:'
2e66fba376eb firehol: firehol-1.256-1
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    62
+    echo ' '
2e66fba376eb firehol: firehol-1.256-1
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    63
+    echo '/etc/rc.d/rc.firehol <command>'
2e66fba376eb firehol: firehol-1.256-1
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    64
+    echo ' '
2e66fba376eb firehol: firehol-1.256-1
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    65
+    echo '###########################'
2e66fba376eb firehol: firehol-1.256-1
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    66
+    echo ' '
2e66fba376eb firehol: firehol-1.256-1
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    67
+
2e66fba376eb firehol: firehol-1.256-1
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    68
+}
2e66fba376eb firehol: firehol-1.256-1
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    69
+op=$1
2e66fba376eb firehol: firehol-1.256-1
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    70
+shift
2e66fba376eb firehol: firehol-1.256-1
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    71
+$op $*