diff options
author | Jeremy Olexa <darkside@gentoo.org> | 2009-01-25 01:11:35 +0000 |
---|---|---|
committer | Jeremy Olexa <darkside@gentoo.org> | 2009-01-25 01:11:35 +0000 |
commit | cecd4b3cb5bc8c3847035eded0e2cad246f6feda (patch) | |
tree | 63215bd45f8eb468c1fa8f9ef26b5523436e2c14 /net-firewall | |
parent | Stable sys-kernel/hardened-sources-2.6.26-r9 on amd64/x86 (diff) | |
download | historical-cecd4b3cb5bc8c3847035eded0e2cad246f6feda.tar.gz historical-cecd4b3cb5bc8c3847035eded0e2cad246f6feda.tar.bz2 historical-cecd4b3cb5bc8c3847035eded0e2cad246f6feda.zip |
(non maintainer commit) [QA] Move big file to mirrors, bug 248994. Also remove old versions
Package-Manager: portage-2.2_rc23/cvs/Linux x86_64
Diffstat (limited to 'net-firewall')
-rw-r--r-- | net-firewall/firehol/ChangeLog | 10 | ||||
-rw-r--r-- | net-firewall/firehol/Manifest | 9 | ||||
-rw-r--r-- | net-firewall/firehol/files/firehol-1.226-to-250.patch | 695 | ||||
-rw-r--r-- | net-firewall/firehol/firehol-1.250-r1.ebuild | 78 | ||||
-rw-r--r-- | net-firewall/firehol/firehol-1.250-r2.ebuild | 9 | ||||
-rw-r--r-- | net-firewall/firehol/firehol-1.250.ebuild | 77 | ||||
-rw-r--r-- | net-firewall/firehol/firehol-1.256.ebuild | 75 |
7 files changed, 16 insertions, 937 deletions
diff --git a/net-firewall/firehol/ChangeLog b/net-firewall/firehol/ChangeLog index ed838268b6e0..24673f88f652 100644 --- a/net-firewall/firehol/ChangeLog +++ b/net-firewall/firehol/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for net-firewall/firehol -# Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-firewall/firehol/ChangeLog,v 1.38 2008/10/13 00:54:38 gengor Exp $ +# Copyright 2002-2009 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/net-firewall/firehol/ChangeLog,v 1.39 2009/01/25 01:11:35 darkside Exp $ + + 25 Jan 2009; Jeremy Olexa <darkside@gentoo.org> + -files/firehol-1.226-to-250.patch, -firehol-1.250.ebuild, + -firehol-1.250-r1.ebuild, firehol-1.250-r2.ebuild, -firehol-1.256.ebuild: + (non maintainer commit) [QA] Move big file to mirrors, bug 248994. Also + remove old versions *firehol-1.273 (13 Oct 2008) diff --git a/net-firewall/firehol/Manifest b/net-firewall/firehol/Manifest index 471e3e56bfde..d4db5606b43b 100644 --- a/net-firewall/firehol/Manifest +++ b/net-firewall/firehol/Manifest @@ -1,18 +1,15 @@ AUX firehol-1.226-to-228.patch 2311 RMD160 9adefc751d465dd193134b3243e6d34300216f7c SHA1 5f900b6e2a6f475596aa1bff4eafad37109fb5c9 SHA256 8a682147e82665124b256d9fadf16d989bf310f2480168e888d4b048e60b910c -AUX firehol-1.226-to-250.patch 23787 RMD160 7bce13d4a5b723b3a2cc84d9e9a98b27b5e6b7b7 SHA1 ce91fe0588a9972be0914554726fbdbc8ff5063f SHA256 9f6f7062f46e64b1a49f4e1a3d226af6c493aa433ec20552f1a67cec33671296 AUX firehol-1.250-groupwith.patch 1005 RMD160 ca56cbd4abad50a0203c520ae62b255266aa104e SHA1 061ffcc50dcb605faf882a7cbfb5c59205356e8d SHA256 6d56366f16b53209e9944fffcac65de6300264d6ba35575643af3bcd45522029 AUX firehol-1.250-printf.patch 1496 RMD160 df025b1bf110ba50b2d8060a145aa79af39a8b26 SHA1 a3450b2b3c94c94be4f64aebdbdbf6a0fc5e3b19 SHA256 35ab81db53612f938ca37f592d85e68260573084c34b598a7c4254b3d3fab071 AUX firehol-1.256-printf.patch 1496 RMD160 df025b1bf110ba50b2d8060a145aa79af39a8b26 SHA1 a3450b2b3c94c94be4f64aebdbdbf6a0fc5e3b19 SHA256 35ab81db53612f938ca37f592d85e68260573084c34b598a7c4254b3d3fab071 AUX firehol.conf.d 70 RMD160 a87dc5fb7ba67d3f87d9672de62ba5081925ddcb SHA1 5a31d6751f0ea13550218132ff210e3286694152 SHA256 0e6bae0a5329d6b527cf0ae7183acf04f0f08f5a931bf5e82a789053faed4e3c AUX firehol.initrd 1245 RMD160 65730686994af4ae61a8ecc3d5b747850ea01aa4 SHA1 a5892f1c762b0c061f6957583dd58bf7b5bc4ab9 SHA256 8e5d71c35ccb9e03ff8b2a984d7082d69a51cd1384a6cc709931f3f7a5531d4c +DIST firehol-1.226-to-250.patch.bz2 6679 RMD160 ce71661271ee7d94bddcac5ae072c933fdfa67c6 SHA1 e8a2716cb5dd5be7dd3850c7d81ed91f87601bca SHA256 574953d443cfe61a3f92adfc68a9ff53cc3679ad2598074dc671288846b1d632 DIST firehol-1.226.tar.bz2 118113 RMD160 bff910e8a3a67ce91f0634177b5ee361edc90e96 SHA1 c54496bc0cadb6d9728738e826464cf35cf7b96e SHA256 b434e8142eb4093516794c6f2213d03efa3c08161758ff836dbd266f0a9438cf DIST firehol-1.256.tar.bz2 125333 RMD160 42ef66f441529d0c216545a313f71d37800f8f7b SHA1 1fc4adb067d0d0ad4d79149710b9db003ffbbf31 SHA256 2c6e709073a7cdb9c73863b3f5bdc77d7cf526162cb4ffd1a1e89e56a7b4fb49 DIST firehol-1.273.tar.bz2 128128 RMD160 858fda3300e2de10fc82be6582d7042de6cbfc23 SHA1 09433f7fbb3cbb7e33e9c601008191bfe3b388a8 SHA256 e8d3b4ac3e54097c0e0f14bfab773a75d43b522fa123a42088b7f23f13495ea2 -EBUILD firehol-1.250-r1.ebuild 2212 RMD160 ce379d84507804cbbed042958e6ca4b42130219d SHA1 3cc079b30ba7dddbfb17f364da1cff1aafd117a6 SHA256 32b472391dc3c0d0bf483bb5417b9a5273bb9fcea942a34e2873e0ba6fffdb88 -EBUILD firehol-1.250-r2.ebuild 2236 RMD160 3284c00091d03a3ed74cb2e3e635d6e0accd1285 SHA1 2c33a66f7f3291bca9c451bf8b4de4e3c98e9fa0 SHA256 e5ade2de78487954e62554bbc664ed99e4b19395fd081c3b042058a79202e861 -EBUILD firehol-1.250.ebuild 2159 RMD160 af56cb6aedf98f1897cbbdd8fc6f34503436777f SHA1 44eb2a44f1dbc37916c28d4894e15975f03b563b SHA256 fb3796072dad00c454b89c6ea8f95aee02d6bf4b721d25706d9048a132773960 +EBUILD firehol-1.250-r2.ebuild 2283 RMD160 a023131928449d85bce7c42a595a5f8e0fe592cd SHA1 f38ed4b754bd951562eb3b97d1a5e3225c1a917d SHA256 7b455b4ff2f520358572471d76f2b15b2be7be6ccdda48ab9b4aaa3c0837e04d EBUILD firehol-1.256-r1.ebuild 2397 RMD160 1c515003b76d014e5538c285072845f8fdfb7605 SHA1 02ddcb50554a54f467bce1efcc9028d62888c01d SHA256 c23ac25229c4b75bfd05627faa07497c1cec7b8bbb19279b4a73f2e4653c2f4a -EBUILD firehol-1.256.ebuild 2042 RMD160 764e76a27a902de98047a8f599a32ecbcebd7990 SHA1 af1797e4fafbdc47f3fdfb921bc8baa663f88967 SHA256 c3a5dc6076e38c6eeffbc22da2edf592bf6679625e420961c3beaeb31fffe59a EBUILD firehol-1.273.ebuild 2089 RMD160 a55e5e43c3a3b9d7f1157f8c1845ffa3c7f96a67 SHA1 49982a1bc0118f2c57c36f59e2f91ac0cee9ad84 SHA256 0cee12716b735d1d1369caba4809d443f6d6addbc0fcd110237c32d6f77267d4 -MISC ChangeLog 7212 RMD160 83daf3892e66edf67f843e3fc2ed86b8e48d9e84 SHA1 e57ec3f1ce8d3ea583a36d8cc1143efe4d250a52 SHA256 6ac8717b093bbe9adca16edad2bd9fdbaf24337ff8aefdb3f1ce060a5c60284a +MISC ChangeLog 7497 RMD160 33028cfd3dc40558637054da8bb604b91f54918c SHA1 a428c6893b80c8630733ccbfcc1bd31d31ea8b4f SHA256 0f786e523bfeeae0184d57469510bdc673319bdb0e48f64df99c556fc12f39a4 MISC metadata.xml 290 RMD160 b9b86283c09349c8827faef7d3ef5f724a248e77 SHA1 ae1c8e62d75c94ff50b8a5391afb6008460963aa SHA256 380e26e9262298b9cb31e863a9ab641f6fbdc8c50bda2cf2e47fd399f9cb5e85 diff --git a/net-firewall/firehol/files/firehol-1.226-to-250.patch b/net-firewall/firehol/files/firehol-1.226-to-250.patch deleted file mode 100644 index e8d42846bd20..000000000000 --- a/net-firewall/firehol/files/firehol-1.226-to-250.patch +++ /dev/null @@ -1,695 +0,0 @@ -diff -Nur firehol-1.226/firehol.sh firehol-1.226.new/firehol.sh ---- firehol-1.226/firehol.sh 2006-12-29 23:48:19.000000000 +0100 -+++ firehol-1.226.new/firehol.sh 2006-12-29 23:49:40.000000000 +0100 -@@ -74,13 +74,16 @@ - return 0 - } - --# Check for a command during runtime. --# Currently the following commands are required only when needed: --# --# wget or curl (either is fine) --# gzcat --# -+# command on demand support. - require_cmd() { -+ local block=1 -+ if [ "a$1" = "a-n" ] -+ then -+ local block=0 -+ shift -+ fi -+ -+ # if one is found, return success - for x in $1 - do - eval var=`echo ${x} | tr 'a-z' 'A-Z'`_CMD -@@ -92,21 +95,56 @@ - fi - done - -+ if [ $block -eq 1 ] -+ then -+ echo >&2 -+ echo >&2 "ERROR: THE REQUESTED FEATURE REQUIRES THESE PROGRAMS:" -+ echo >&2 -+ echo >&2 " $*" -+ echo >&2 -+ echo >&2 " You have requested the use of an optional FireHOL" -+ echo >&2 " feature that requires certain external programs" -+ echo >&2 " to be installed in the running system." -+ echo >&2 -+ echo >&2 " Please consult your Linux distribution manual to" -+ echo >&2 " install the package(s) that provide these external" -+ echo >&2 " programs and retry." -+ echo >&2 -+ echo >&2 " Note that you need an operational 'which' command" -+ echo >&2 " for FireHOL to find all the external programs it" -+ echo >&2 " needs. Check it yourself. Run:" -+ echo >&2 -+ for x in $1 -+ do -+ echo >&2 " which $x" -+ done -+ -+ exit 1 -+ fi -+ - return 1 - } - -+# Currently the following commands are required only when needed. -+# (i.e. Command on Demand) -+# -+# wget or curl (either is fine) -+# gzcat -+# ip -+# netstat -+# egrep -+# date -+# hostname -+ -+# Commands that are mandatory for FireHOL operation: - which_cmd CAT_CMD cat - which_cmd CUT_CMD cut - which_cmd CHOWN_CMD chown - which_cmd CHMOD_CMD chmod --which_cmd DATE_CMD date --which_cmd EGREP_CMD egrep - which_cmd EXPR_CMD expr - which_cmd GAWK_CMD gawk - which_cmd GREP_CMD grep - which_cmd HEAD_CMD head --which_cmd HOSTNAME_CMD hostname --which_cmd IP_CMD ip - which_cmd IPTABLES_CMD iptables - which_cmd IPTABLES_SAVE_CMD iptables-save - which_cmd LESS_CMD less -@@ -114,7 +152,6 @@ - which_cmd MKDIR_CMD mkdir - which_cmd MV_CMD mv - which_cmd MODPROBE_CMD modprobe --which_cmd NETSTAT_CMD netstat - which_cmd RENICE_CMD renice - which_cmd RM_CMD rm - which_cmd SED_CMD sed -@@ -170,6 +207,9 @@ - FIREHOL_SAVED="${FIREHOL_DIR}/firehol-save.sh" - FIREHOL_TMP="${FIREHOL_DIR}/firehol-tmp.sh" - -+FIREHOL_LOCK_DIR="/var/lock/subsys" -+test ! -d "${FIREHOL_LOCK_DIR}" && FIREHOL_LOCK_DIR="/var/lock" -+ - FIREHOL_SPOOL_DIR="/var/spool/firehol" - - # The default configuration file -@@ -209,6 +249,7 @@ - - # Run our exit even if we don't call exit. - trap firehol_exit EXIT -+trap firehol_exit SIGHUP - - - # ------------------------------------------------------------------------------ -@@ -267,8 +308,8 @@ - if [ ! -d "${FIREHOL_SPOOL_DIR}" ] - then - "${MKDIR_CMD}" "${FIREHOL_SPOOL_DIR}" || exit 1 -- "${CHOWN_CMD}" root:root "${FIREHOL_CONFIG_DIR}" || exit 1 -- "${CHMOD_CMD}" 700 "${FIREHOL_CONFIG_DIR}" || exit 1 -+ "${CHOWN_CMD}" root:root "${FIREHOL_SPOOL_DIR}" || exit 1 -+ "${CHMOD_CMD}" 700 "${FIREHOL_SPOOL_DIR}" || exit 1 - fi - - -@@ -280,7 +321,7 @@ - # Optimized (CIDR) by Marc 'HE' Brockschmidt <marc@marcbrockschmidt.de> - # Further optimized and reduced by http://www.vergenet.net/linux/aggregate/ - # The supplied get-iana.sh uses 'aggregate-flim' if it finds it in the path. --RESERVED_IPS="0.0.0.0/7 2.0.0.0/8 5.0.0.0/8 7.0.0.0/8 23.0.0.0/8 27.0.0.0/8 31.0.0.0/8 36.0.0.0/7 39.0.0.0/8 41.0.0.0/8 42.0.0.0/8 73.0.0.0/8 74.0.0.0/7 76.0.0.0/6 89.0.0.0/8 90.0.0.0/7 92.0.0.0/6 96.0.0.0/3 173.0.0.0/8 174.0.0.0/7 176.0.0.0/5 184.0.0.0/6 189.0.0.0/8 190.0.0.0/8 197.0.0.0/8 223.0.0.0/8 240.0.0.0/4" -+RESERVED_IPS="0.0.0.0/7 2.0.0.0/8 5.0.0.0/8 7.0.0.0/8 23.0.0.0/8 27.0.0.0/8 31.0.0.0/8 36.0.0.0/7 39.0.0.0/8 42.0.0.0/8 92.0.0.0/6 100.0.0.0/6 104.0.0.0/5 112.0.0.0/5 120.0.0.0/8 127.0.0.0/8 173.0.0.0/8 174.0.0.0/7 176.0.0.0/5 184.0.0.0/6 197.0.0.0/8 223.0.0.0/8 240.0.0.0/4 " - - # Private IPv4 address space - # Suggested by Fco.Felix Belmonte <ffelix@gescosoft.com> -@@ -306,6 +347,11 @@ - # policy interface subscommand. - DEFAULT_INTERFACE_POLICY="DROP" - -+# The default policy for the router commands of the firewall. -+# This can be controlled on a per interface basis using the -+# policy interface subscommand. -+DEFAULT_ROUTER_POLICY="RETURN" -+ - # Which is the filter table chains policy during firewall activation? - FIREHOL_INPUT_ACTIVATION_POLICY="ACCEPT" - FIREHOL_OUTPUT_ACTIVATION_POLICY="ACCEPT" -@@ -329,6 +375,10 @@ - FIREHOL_LOG_MODE="LOG" - FIREHOL_LOG_FREQUENCY="1/second" - FIREHOL_LOG_BURST="5" -+FIREHOL_LOG_PREFIX="" -+ -+# If enabled, FireHOL will silently drop orphan TCP packets with ACK,FIN set. -+FIREHOL_DROP_ORPHAN_TCP_ACK_FIN=0 - - # The client ports to be used for "default" client ports when the - # client specified is a foreign host. -@@ -427,7 +477,7 @@ - work_name= - work_inface= - work_outface= --work_policy="${DEFAULT_INTERFACE_POLICY}" -+work_policy= - work_error=0 - work_function="Initializing" - -@@ -618,6 +668,9 @@ - server_microsoft_ds_ports="tcp/445" - client_microsoft_ds_ports="default" - -+server_ms_ds_ports="tcp/445" -+client_ms_ds_ports="default" -+ - server_mms_ports="tcp/1755 udp/1755" - client_mms_ports="default" - require_mms_modules="ip_conntrack_mms" -@@ -666,6 +719,9 @@ - server_oracle_ports="tcp/1521" - client_oracle_ports="default" - -+server_OSPF_ports="89/any" -+client_OSPF_ports="any" -+ - server_pop3_ports="tcp/110" - client_pop3_ports="default" - -@@ -708,7 +764,7 @@ - client_rtp_ports="any" - - server_sip_ports="udp/5060" --client_sip_ports="default" -+client_sip_ports="5060 default" - - server_socks_ports="tcp/1080 udp/1080" - client_socks_ports="default" -@@ -769,7 +825,7 @@ - server_vmwareauth_ports="tcp/903" - client_vmwareauth_ports="default" - --server_vmwareweb_ports="tcp/8222" -+server_vmwareweb_ports="tcp/8222 tcp/8333" - client_vmwareweb_ports="default" - - server_vnc_ports="tcp/5900:5903" -@@ -1090,10 +1146,12 @@ - local server_rquotad_ports="`${CAT_CMD} "${tmp}" | ${GREP_CMD} " rquotad$" | ( while read a b proto port s; do echo "$proto/$port"; done ) | ${SORT_CMD} | ${UNIQ_CMD}`" - local server_mountd_ports="`${CAT_CMD} "${tmp}" | ${GREP_CMD} " mountd$" | ( while read a b proto port s; do echo "$proto/$port"; done ) | ${SORT_CMD} | ${UNIQ_CMD}`" - local server_lockd_ports="`${CAT_CMD} "${tmp}" | ${GREP_CMD} " nlockmgr$" | ( while read a b proto port s; do echo "$proto/$port"; done ) | ${SORT_CMD} | ${UNIQ_CMD}`" -+ local server_statd_ports="`${CAT_CMD} "${tmp}" | ${GREP_CMD} " status$" | ( while read a b proto port s; do echo "$proto/$port"; done ) | ${SORT_CMD} | ${UNIQ_CMD}`" - local server_nfsd_ports="`${CAT_CMD} "${tmp}" | ${GREP_CMD} " nfs$" | ( while read a b proto port s; do echo "$proto/$port"; done ) | ${SORT_CMD} | ${UNIQ_CMD}`" - - test -z "${server_mountd_ports}" && error "Cannot find mountd ports for nfs server '${x}'" && return 1 - test -z "${server_lockd_ports}" && error "Cannot find lockd ports for nfs server '${x}'" && return 1 -+ test -z "${server_statd_ports}" && error "Cannot find statd ports for nfs server '${x}'" && return 1 - test -z "${server_nfsd_ports}" && error "Cannot find nfsd ports for nfs server '${x}'" && return 1 - - local dst= -@@ -1113,6 +1171,9 @@ - - set_work_function "Processing lockd rules for server '${x}'" - rules_custom "${mychain}" "${type}" nfs-lockd "${server_lockd_ports}" "500:65535" "${action}" $dst "$@" -+ -+ set_work_function "Processing statd rules for server '${x}'" -+ rules_custom "${mychain}" "${type}" nfs-statd "${server_statd_ports}" "500:65535" "${action}" $dst "$@" - - set_work_function "Processing nfsd rules for server '${x}'" - rules_custom "${mychain}" "${type}" nfs-nfsd "${server_nfsd_ports}" "500:65535" "${action}" $dst "$@" -@@ -1798,7 +1859,7 @@ - firehol_wget() { - local url="${1}" - -- require_cmd wget curl || error "Cannot find 'wget' or 'curl' in the path." -+ require_cmd wget curl - - if [ ! -z "${WGET_CMD}" ] - then -@@ -2407,9 +2468,9 @@ - policy() { - work_realcmd_secondary ${FUNCNAME} "$@" - -- require_work set interface || return 1 -+ require_work set any || return 1 - -- set_work_function "Setting interface '${work_inface}' (${work_name}) policy to ${1}" -+ set_work_function "Setting policy of ${work_name} to ${1}" - work_policy="$*" - - return 0 -@@ -2482,6 +2543,11 @@ - return 0 - ;; - -+ bad-packets|BAD-PACKETS) -+ protection ${reverse} "invalid fragments new-tcp-w/o-syn malformed-xmas malformed-null malformed-bad" "${rate}" "${burst}" -+ return $? -+ ;; -+ - strong|STRONG|full|FULL|all|ALL) - protection ${reverse} "invalid fragments new-tcp-w/o-syn icmp-floods syn-floods malformed-xmas malformed-null malformed-bad" "${rate}" "${burst}" - return $? -@@ -2529,6 +2595,16 @@ - rule in chain "${mychain}" loglimit "SYN FLOOD" action drop || return 1 - ;; - -+ all-floods|ALL-FLOODS) -+ local mychain="${pre}_${work_name}_allflood" -+ create_chain filter "${mychain}" "${in}_${work_name}" in state NEW || return 1 -+ -+ set_work_function "Generating rules to be protected from ALL floods on '${prface}' for ${work_cmd} '${work_name}'" -+ -+ rule in chain "${mychain}" limit "${rate}" "${burst}" action return || return 1 -+ rule in chain "${mychain}" loglimit "ALL FLOOD" action drop || return 1 -+ ;; -+ - malformed-xmas|MALFORMED-XMAS) - local mychain="${pre}_${work_name}_malxmas" - create_chain filter "${mychain}" "${in}_${work_name}" in proto tcp custom "--tcp-flags ALL ALL" || return 1 -@@ -2589,7 +2665,7 @@ - # kernel modules. - - # optionaly require command gzcat --require_cmd gzcat -+require_cmd -n gzcat - - KERNEL_CONFIG= - if [ -f "/proc/config" ] -@@ -2632,6 +2708,7 @@ - echo >&2 " all kernel modules for the services used, without" - echo >&2 " being able to detect failures." - echo >&2 " " -+ sleep 2 - fi - - # activation-phase command to check for the existance of -@@ -2824,11 +2901,12 @@ - work_name= - work_inface= - work_outface= -- work_policy="${DEFAULT_INTERFACE_POLICY}" -+ work_policy= - - return 0 - } - -+ - # ------------------------------------------------------------------------------ - # close_interface - # WHY: -@@ -2841,6 +2919,12 @@ - - set_work_function "Finilizing interface '${work_name}'" - -+ # Accept all related traffic to the established connections -+ rule chain "in_${work_name}" state RELATED action ACCEPT || return 1 -+ rule chain "out_${work_name}" state RELATED action ACCEPT || return 1 -+ -+ # make sure we have a policy -+ test -z "${work_policy}" && work_policy="${DEFAULT_INTERFACE_POLICY}" - case "${work_policy}" in - return|RETURN) - return 0 -@@ -2849,15 +2933,18 @@ - accept|ACCEPT) - ;; - -- *) -+ *) - local -a inlog=(loglimit "'IN-${work_name}'") - local -a outlog=(loglimit "'OUT-${work_name}'") - ;; - esac - -- # Accept all related traffic to the established connections -- rule chain "in_${work_name}" state RELATED action ACCEPT || return 1 -- rule chain "out_${work_name}" state RELATED action ACCEPT || return 1 -+ if [ "${FIREHOL_DROP_ORPHAN_TCP_ACK_FIN}" = "1" ] -+ then -+ # Silently drop orphan TCP/ACK FIN packets -+ rule chain "in_${work_name}" state NEW proto tcp custom "--tcp-flags ALL ACK,FIN" action DROP || return 1 -+ rule reverse chain "out_${work_name}" state NEW proto tcp custom "--tcp-flags ALL ACK,FIN" action DROP || return 1 -+ fi - - rule chain "in_${work_name}" "${inlog[@]}" action ${work_policy} || return 1 - rule reverse chain "out_${work_name}" "${outlog[@]}" action ${work_policy} || return 1 -@@ -2882,6 +2969,32 @@ - rule chain "in_${work_name}" state RELATED action ACCEPT || return 1 - rule chain "out_${work_name}" state RELATED action ACCEPT || return 1 - -+ # make sure we have a policy -+ test -z "${work_policy}" && work_policy="${DEFAULT_ROUTER_POLICY}" -+ case "${work_policy}" in -+ return|RETURN) -+ return 0 -+ ;; -+ -+ accept|ACCEPT) -+ ;; -+ -+ *) -+ local -a inlog=(loglimit "'PASS-${work_name}'") -+ local -a outlog=(loglimit "'PASS-${work_name}'") -+ ;; -+ esac -+ -+ if [ "${FIREHOL_DROP_ORPHAN_TCP_ACK_FIN}" = "1" ] -+ then -+ # Silently drop orphan TCP/ACK FIN packets -+ rule chain "in_${work_name}" state NEW proto tcp custom "--tcp-flags ALL ACK,FIN" action DROP || return 1 -+ rule reverse chain "out_${work_name}" state NEW proto tcp custom "--tcp-flags ALL ACK,FIN" action DROP || return 1 -+ fi -+ -+ rule chain "in_${work_name}" "${inlog[@]}" action ${work_policy} || return 1 -+ rule reverse chain "out_${work_name}" "${outlog[@]}" action ${work_policy} || return 1 -+ - return 0 - } - -@@ -2900,6 +3013,14 @@ - rule chain OUTPUT state RELATED action ACCEPT || return 1 - rule chain FORWARD state RELATED action ACCEPT || return 1 - -+ if [ "${FIREHOL_DROP_ORPHAN_TCP_ACK_FIN}" = "1" ] -+ then -+ # Silently drop orphan TCP/ACK FIN packets -+ rule chain INPUT state NEW proto tcp custom "--tcp-flags ALL ACK,FIN" action DROP || return 1 -+ rule chain OUTPUT state NEW proto tcp custom "--tcp-flags ALL ACK,FIN" action DROP || return 1 -+ rule chain FORWARD state NEW proto tcp custom "--tcp-flags ALL ACK,FIN" action DROP || return 1 -+ fi -+ - rule chain INPUT loglimit "IN-unknown" action ${UNMATCHED_INPUT_POLICY} || return 1 - rule chain OUTPUT loglimit "OUT-unknown" action ${UNMATCHED_OUTPUT_POLICY} || return 1 - rule chain FORWARD loglimit "PASS-unknown" action ${UNMATCHED_ROUTER_POLICY} || return 1 -@@ -3055,7 +3176,7 @@ - # to pass. - if [ "${do_accept_limit}" = "1" ] - then -- local accept_limit_chain="`echo "ACCEPT ${freq} ${burst} ${overflow}" | tr " /." "___"`" -+ local accept_limit_chain="`echo "ACCEPT LIMIT ${freq} ${burst} ${overflow}" | tr " /." "___"`" - - # does the chain we need already exist? - if [ ! -f "${FIREHOL_CHAINS_DIR}/${accept_limit_chain}" ] -@@ -3075,9 +3196,9 @@ - local -a logopts_arg=() - if [ "${FIREHOL_LOG_MODE}" = "ULOG" ] - then -- local -a logopts_arg=("--ulog-prefix='OVERFLOW:'") -+ local -a logopts_arg=("--ulog-prefix='${FIREHOL_LOG_PREFIX}LIMIT_OVERFLOW:'") - else -- local -a logopts_arg=("--log-level" "${FIREHOL_LOG_LEVEL}" "--log-prefix='OVERFLOW:'") -+ local -a logopts_arg=("--log-level" "${FIREHOL_LOG_LEVEL}" "--log-prefix='${FIREHOL_LOG_PREFIX}LIMIT_OVERFLOW:'") - fi - iptables ${table} -A "${accept_limit_chain}" -m limit --limit "${FIREHOL_LOG_FREQUENCY}" --limit-burst "${FIREHOL_LOG_BURST}" -j ${FIREHOL_LOG_MODE} ${FIREHOL_LOG_OPTIONS} "${logopts_arg[@]}" - -@@ -3096,6 +3217,62 @@ - fi - ;; - -+ "recent") -+ # limit NEW connections to the specified rate -+ local name="${action_param[1]}" -+ local seconds="${action_param[2]}" -+ local hits="${action_param[3]}" -+ -+ # unset the action_param, so that if this rule does not include NEW connections, -+ # we will not append anything to the generated iptables statements. -+ local -a action_param=() -+ -+ # find is this rule matches NEW connections -+ local has_new=`echo "${state}" | grep -i NEW` -+ local do_accept_recent=0 -+ if [ -z "${statenot}" ] -+ then -+ test ! -z "${has_new}" && local do_accept_recent=1 -+ else -+ test -z "${has_new}" && local do_accept_recent=1 -+ fi -+ -+ # we have a match for NEW connections. -+ # redirect the traffic to a new chain, which will control -+ # the NEW connections while allowing all the other traffic -+ # to pass. -+ if [ "${do_accept_recent}" = "1" ] -+ then -+ local accept_recent_chain="`echo "ACCEPT RECENT $name $seconds $hits" | tr " /." "___"`" -+ -+ # does the chain we need already exist? -+ if [ ! -f "${FIREHOL_CHAINS_DIR}/${accept_recent_chain}" ] -+ then -+ # the chain does not exist. create it. -+ iptables ${table} -N "${accept_recent_chain}" -+ touch "${FIREHOL_CHAINS_DIR}/${accept_recent_chain}" -+ -+ # first, if the traffic is not a NEW connection, allow it. -+ # doing this first will speed up normal traffic. -+ iptables ${table} -A "${accept_recent_chain}" -m state ! --state NEW -j ACCEPT -+ -+ # accept NEW connections within the given limits. -+ iptables ${table} -A "${accept_recent_chain}" -m recent --set --name "${name}" -+ -+ local t1= -+ test ! -z $seconds && local t1="--seconds ${seconds}" -+ local t2= -+ test ! -z $hits && local t2="--hitcount ${hits}" -+ -+ iptables ${table} -A "${accept_recent_chain}" -m recent --update ${t1} ${t2} --name "${name}" -j RETURN -+ iptables ${table} -A "${accept_recent_chain}" -j ACCEPT -+ fi -+ -+ # send the rule to be generated to this chain -+ local action=${accept_recent_chain} -+ fi -+ ;; -+ - 'knock') - # the name of the knock - local name="knock_${action_param[1]}" -@@ -3175,6 +3352,12 @@ - local dst=any - local dstnot= - -+ local srctype= -+ local srctypenot= -+ -+ local dsttype= -+ local dsttypenot= -+ - local sport=any - local sportnot= - -@@ -3397,7 +3580,7 @@ - if [ "${1}" = "not" -o "${1}" = "NOT" ] - then - shift -- macnot="!" -+ test ${nomac} -eq 0 && macnot="!" - fi - test ${softwarnings} -eq 1 -a ! "${mac}" = "any" && softwarning "Overwritting param: mac '${mac}' becomes '${1}'" - test ${nomac} -eq 0 && mac="${1}" -@@ -3454,6 +3637,56 @@ - shift - ;; - -+ srctype|SRCTYPE|sourcetype|SOURCETYPE) -+ shift -+ if [ ${reverse} -eq 0 ] -+ then -+ srctypenot= -+ if [ "${1}" = "not" -o "${1}" = "NOT" ] -+ then -+ shift -+ srctypenot="!" -+ fi -+ test ${softwarnings} -eq 1 -a ! "${srctype}" = "" && softwarning "Overwritting param: srctype '${srctype}' becomes '${1}'" -+ srctype="`echo ${1} | sed "s|^ \+||" | sed "s| \+\$||" | sed "s| \+|,|g" | tr a-z A-Z`" -+ else -+ dsttypenot= -+ if [ "${1}" = "not" -o "${1}" = "NOT" ] -+ then -+ shift -+ dsttypenot="!" -+ fi -+ test ${softwarnings} -eq 1 -a ! "${dsttype}" = "" && softwarning "Overwritting param: dsttype '${dsttype}' becomes '${1}'" -+ dsttype="`echo ${1} | sed "s|^ \+||" | sed "s| \+\$||" | sed "s| \+|,|g" | tr a-z A-Z`" -+ fi -+ shift -+ ;; -+ -+ dsttype|DSTTYPE|destinationtype|DESTINATIONTYPE) -+ shift -+ if [ ${reverse} -eq 0 ] -+ then -+ dsttypenot= -+ if [ "${1}" = "not" -o "${1}" = "NOT" ] -+ then -+ shift -+ dsttypenot="!" -+ fi -+ test ${softwarnings} -eq 1 -a ! "${dsttype}" = "" && softwarning "Overwritting param: dsttype '${dsttype}' becomes '${1}'" -+ dsttype="`echo ${1} | sed "s|^ \+||" | sed "s| \+\$||" | sed "s| \+|,|g" | tr a-z A-Z`" -+ else -+ srctypenot= -+ if [ "${1}" = "not" -o "${1}" = "NOT" ] -+ then -+ shift -+ srctypenot="!" -+ fi -+ test ${softwarnings} -eq 1 -a ! "${srctype}" = "" && softwarning "Overwritting param: srctype '${srctype}' becomes '${1}'" -+ srctype="`echo ${1} | sed "s|^ \+||" | sed "s| \+\$||" | sed "s| \+|,|g" | tr a-z A-Z`" -+ fi -+ shift -+ ;; -+ - sport|SPORT|sourceport|SOURCEPORT) - shift - if [ ${reverse} -eq 0 ] -@@ -3591,6 +3824,11 @@ - fi - ;; - -+ recent|RECENT) -+ local -a action_param=("recent" "${2}" "${3}" "${4}") -+ shift 4 -+ ;; -+ - knock|KNOCK) - local -a action_param=("knock" "${2}") - shift 2 -@@ -3750,6 +3988,10 @@ - fi - ;; - -+ tarpit|TARPIT) -+ action="TARPIT" -+ ;; -+ - *) - chain_exists "${action}" - local action_is_chain=$? -@@ -3991,7 +4233,7 @@ - # this temporary chain. - - -- # ignore 'statenot' since it is negated in the positive rules -+ # ignore 'statenot', 'srctypenot', 'dsttypenot' since it is negated in the positive rules - if [ ! -z "${infacenot}${outfacenot}${physinnot}${physoutnot}${macnot}${srcnot}${dstnot}${sportnot}${dportnot}${protonot}${uidnot}${gidnot}${pidnot}${sidnot}${cmdnot}${marknot}${tosnot}${dscpnot}" ] - then - if [ ${action_is_chain} -eq 1 ] -@@ -4540,6 +4782,25 @@ - ;; - esac - -+ # addrtype (srctype, dsttype) -+ local -a addrtype_arg=() -+ local -a stp_arg=() -+ local -a dtp_arg=() -+ if [ ! -z "${srctype}${dsttype}" ] -+ then -+ local -a addrtype_arg=("-m" "addrtype") -+ -+ if [ ! -z "${srctype}" ] -+ then -+ local -a stp_arg=("${srctypenot}" "--src-type" "${srctype}") -+ fi -+ -+ if [ ! -z "${dsttype}" ] -+ then -+ local -a dtp_arg=("${dsttypenot}" "--dst-type" "${dsttype}") -+ fi -+ fi -+ - # state - local -a state_arg=() - if [ ! -z "${state}" ] -@@ -4562,15 +4823,15 @@ - fi - - # build the command -- declare -a basecmd=("${inf_arg[@]}" "${outf_arg[@]}" "${physdev_arg[@]}" "${inph_arg[@]}" "${outph_arg[@]}" "${limit_arg[@]}" "${iplimit_arg[@]}" "${proto_arg[@]}" "${s_arg[@]}" "${sp_arg[@]}" "${d_arg[@]}" "${dp_arg[@]}" "${owner_arg[@]}" "${uid_arg[@]}" "${gid_arg[@]}" "${pid_arg[@]}" "${sid_arg[@]}" "${cmd_arg[@]}" "${state_arg[@]}" "${mc_arg[@]}" "${mark_arg[@]}" "${tos_arg[@]}" "${dscp_arg[@]}") -+ declare -a basecmd=("${inf_arg[@]}" "${outf_arg[@]}" "${physdev_arg[@]}" "${inph_arg[@]}" "${outph_arg[@]}" "${limit_arg[@]}" "${iplimit_arg[@]}" "${proto_arg[@]}" "${s_arg[@]}" "${sp_arg[@]}" "${d_arg[@]}" "${dp_arg[@]}" "${owner_arg[@]}" "${uid_arg[@]}" "${gid_arg[@]}" "${pid_arg[@]}" "${sid_arg[@]}" "${cmd_arg[@]}" "${addrtype_arg[@]}" "${stp_arg[@]}" "${dtp_arg[@]}" "${state_arg[@]}" "${mc_arg[@]}" "${mark_arg[@]}" "${tos_arg[@]}" "${dscp_arg[@]}") - - # log mode selection - local -a logopts_arg=() - if [ "${FIREHOL_LOG_MODE}" = "ULOG" ] - then -- local -a logopts_arg=("--ulog-prefix='${logtxt}:'") -+ local -a logopts_arg=("--ulog-prefix='${FIREHOL_LOG_PREFIX}${logtxt}:'") - else -- local -a logopts_arg=("--log-level" "${loglevel}" "--log-prefix='${logtxt}:'") -+ local -a logopts_arg=("--log-level" "${loglevel}" "--log-prefix='${FIREHOL_LOG_PREFIX}${logtxt}:'") - fi - - # log / loglimit -@@ -5005,8 +5266,8 @@ - stop) - test ! -z "${1}" && softwarning "Arguments after parameter '${arg}' are ignored." - -- test -f /var/lock/subsys/firehol && ${RM_CMD} -f /var/lock/subsys/firehol -- test -f /var/lock/subsys/iptables && ${RM_CMD} -f /var/lock/subsys/iptables -+ test -f "${FIREHOL_LOCK_DIR}/firehol" && ${RM_CMD} -f "${FIREHOL_LOCK_DIR}/firehol" -+ test -f "${FIREHOL_LOCK_DIR}/iptables" && ${RM_CMD} -f "${FIREHOL_LOCK_DIR}/iptables" - - echo -n $"FireHOL: Clearing Firewall:" - load_kernel_module ip_tables -@@ -5038,7 +5299,7 @@ - condrestart) - test ! -z "${1}" && softwarning "Arguments after parameter '${arg}' are ignored." - FIREHOL_TRY=0 -- if [ -f /var/lock/subsys/firehol ] -+ if [ -f "${FIREHOL_LOCK_DIR}/firehol" ] - then - exit 0 - fi -@@ -5459,6 +5720,13 @@ - - if [ ${FIREHOL_WIZARD} -eq 1 ] - then -+ # require commands for wizard mode -+ require_cmd ip -+ require_cmd netstat -+ require_cmd egrep -+ require_cmd date -+ require_cmd hostname -+ - wizard_ask() { - local prompt="${1}"; shift - local def="${1}"; shift -@@ -5603,7 +5871,12 @@ - local i4=${4} - local i5=${5:-32} - -- echo ${i1}.${i2}.${i3}.${i4}/${i5} -+ if [ "${i5}" = "32" ] -+ then -+ echo ${i1}.${i2}.${i3}.${i4} -+ else -+ echo ${i1}.${i2}.${i3}.${i4}/${i5} -+ fi - } - - ips2net() { -@@ -6354,11 +6627,11 @@ - # Remove the saved firewall, so that the trap will not restore it. - ${RM_CMD} -f "${FIREHOL_SAVED}" - --# RedHat startup service locking. --if [ -d /var/lock/subsys ] -+# Startup service locking. -+if [ -d "${FIREHOL_LOCK_DIR}" ] - then -- ${TOUCH_CMD} /var/lock/subsys/iptables -- ${TOUCH_CMD} /var/lock/subsys/firehol -+ ${TOUCH_CMD} "${FIREHOL_LOCK_DIR}/iptables" -+ ${TOUCH_CMD} "${FIREHOL_LOCK_DIR}/firehol" - fi - - diff --git a/net-firewall/firehol/firehol-1.250-r1.ebuild b/net-firewall/firehol/firehol-1.250-r1.ebuild deleted file mode 100644 index 30b460dee5e2..000000000000 --- a/net-firewall/firehol/firehol-1.250-r1.ebuild +++ /dev/null @@ -1,78 +0,0 @@ -# Copyright 1999-2007 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-firewall/firehol/firehol-1.250-r1.ebuild,v 1.5 2007/11/06 10:22:03 centic Exp $ - -inherit eutils - -DESCRIPTION="iptables firewall generator" -HOMEPAGE="http://firehol.sourceforge.net/" -SRC_URI="mirror://sourceforge/${PN}/${PN}-1.226.tar.bz2" - -LICENSE="GPL-2" -SLOT="0" -IUSE="" -KEYWORDS="~amd64 ~ppc ~sparc x86" - -DEPEND="sys-apps/iproute2" -RDEPEND="net-firewall/iptables - sys-apps/iproute2 - virtual/modutils - || ( - net-misc/wget - net-misc/curl - )" - -S="${WORKDIR}/${PN}-1.226" - -pkg_setup() { - # Bug 81600 fail if iproute2 is built with minimal - if built_with_use sys-apps/iproute2 minimal; then - eerror "Firehol requires iproute2 to be emerged without" - eerror "the USE-Flag \"minimal\"." - eerror "Re-emerge iproute2 with" - eerror "USE=\"-minimal\" emerge sys-apps/iproute2" - die "sys-apps/iproute2 without USE=\"minimal\" needed" - fi -} - -# patch for embedded Gentoo - GNAP -# backport from firehol-CVS. -src_unpack() { - unpack ${A} - cd "${S}" || die - epatch "${FILESDIR}/firehol-1.226-to-228.patch" || die - epatch "${FILESDIR}/firehol-1.226-to-250.patch" || die - epatch "${FILESDIR}/${P}-groupwith.patch" || die - epatch "${FILESDIR}/${P}-printf.patch" || die -} - -src_install() { - newsbin firehol.sh firehol - - dodir /etc/firehol /etc/firehol/examples /etc/firehol/services - insinto /etc/firehol/examples - doins examples/* || die - - newconfd "${FILESDIR}/firehol.conf.d" firehol || die - - dodoc ChangeLog README TODO WhatIsNew || die - dohtml doc/*.html doc/*.css || die - - docinto scripts - dodoc get-iana.sh adblock.sh || die - - doman man/*.1 man/*.5 || die - - newinitd "${FILESDIR}/firehol.initrd" firehol || die -} - -pkg_postinst() { - elog "The default path to firehol's configuration file is /etc/firehol/firehol.conf" - elog "See /etc/firehol/examples for configuration examples." - # - # Install a default configuration if none is available yet - if [[ ! -e "${ROOT}/etc/firehol/firehol.conf" ]]; then - einfo "Installing a sample configuration as ${ROOT}/etc/firehol/firehol.conf" - cp "${ROOT}/etc/firehol/examples/client-all.conf" "${ROOT}/etc/firehol/firehol.conf" - fi -} diff --git a/net-firewall/firehol/firehol-1.250-r2.ebuild b/net-firewall/firehol/firehol-1.250-r2.ebuild index 132815f6b77f..eea126cf1040 100644 --- a/net-firewall/firehol/firehol-1.250-r2.ebuild +++ b/net-firewall/firehol/firehol-1.250-r2.ebuild @@ -1,12 +1,13 @@ -# Copyright 1999-2007 Gentoo Foundation +# Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-firewall/firehol/firehol-1.250-r2.ebuild,v 1.5 2007/11/06 10:22:03 centic Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-firewall/firehol/firehol-1.250-r2.ebuild,v 1.6 2009/01/25 01:11:35 darkside Exp $ inherit eutils DESCRIPTION="iptables firewall generator" HOMEPAGE="http://firehol.sourceforge.net/" -SRC_URI="mirror://sourceforge/${PN}/${PN}-1.226.tar.bz2" +SRC_URI="mirror://sourceforge/${PN}/${PN}-1.226.tar.bz2 + mirror://gentoo/${PN}-1.226-to-250.patch.bz2" LICENSE="GPL-2" SLOT="0" @@ -41,7 +42,7 @@ src_unpack() { unpack ${A} cd "${S}" || die epatch "${FILESDIR}/firehol-1.226-to-228.patch" || die - epatch "${FILESDIR}/firehol-1.226-to-250.patch" || die + epatch "${WORKDIR}/firehol-1.226-to-250.patch" || die # invalid, see Bug 176862 epatch ${FILESDIR}/${P}-groupwith.patch || die epatch "${FILESDIR}/${P}-printf.patch" || die } diff --git a/net-firewall/firehol/firehol-1.250.ebuild b/net-firewall/firehol/firehol-1.250.ebuild deleted file mode 100644 index 0535bbfc28d6..000000000000 --- a/net-firewall/firehol/firehol-1.250.ebuild +++ /dev/null @@ -1,77 +0,0 @@ -# Copyright 1999-2007 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-firewall/firehol/firehol-1.250.ebuild,v 1.7 2007/11/06 10:22:03 centic Exp $ - -inherit eutils - -DESCRIPTION="iptables firewall generator" -HOMEPAGE="http://firehol.sourceforge.net/" -SRC_URI="mirror://sourceforge/${PN}/${PN}-1.226.tar.bz2" - -LICENSE="GPL-2" -SLOT="0" -IUSE="" -KEYWORDS="~amd64 ~ppc ~sparc x86" - -DEPEND="sys-apps/iproute2" -RDEPEND="net-firewall/iptables - sys-apps/iproute2 - virtual/modutils - || ( - net-misc/wget - net-misc/curl - )" - -S="${WORKDIR}/${PN}-1.226" - -pkg_setup() { - # Bug 81600 fail if iproute2 is built with minimal - if built_with_use sys-apps/iproute2 minimal; then - eerror "Firehol requires iproute2 to be emerged without" - eerror "the USE-Flag \"minimal\"." - eerror "Re-emerge iproute2 with" - eerror "USE=\"-minimal\" emerge sys-apps/iproute2" - die "sys-apps/iproute2 without USE=\"minimal\" needed" - fi -} - -# patch for embedded Gentoo - GNAP -# backport from firehol-CVS. -src_unpack() { - unpack ${A} - cd "${S}" || die - epatch "${FILESDIR}/firehol-1.226-to-228.patch" || die - epatch "${FILESDIR}/firehol-1.226-to-250.patch" || die - epatch "${FILESDIR}/${P}-printf.patch" || die -} - -src_install() { - newsbin firehol.sh firehol - - dodir /etc/firehol /etc/firehol/examples /etc/firehol/services - insinto /etc/firehol/examples - doins examples/* || die - - newconfd "${FILESDIR}/firehol.conf.d" firehol || die - - dodoc ChangeLog README TODO WhatIsNew || die - dohtml doc/*.html doc/*.css || die - - docinto scripts - dodoc get-iana.sh adblock.sh || die - - doman man/*.1 man/*.5 || die - - newinitd "${FILESDIR}/firehol.initrd" firehol || die -} - -pkg_postinst() { - elog "The default path to firehol's configuration file is /etc/firehol/firehol.conf" - elog "See /etc/firehol/examples for configuration examples." - # - # Install a default configuration if none is available yet - if [[ ! -e "${ROOT}/etc/firehol/firehol.conf" ]]; then - einfo "Installing a sample configuration as ${ROOT}/etc/firehol/firehol.conf" - cp "${ROOT}/etc/firehol/examples/client-all.conf" "${ROOT}/etc/firehol/firehol.conf" - fi -} diff --git a/net-firewall/firehol/firehol-1.256.ebuild b/net-firewall/firehol/firehol-1.256.ebuild deleted file mode 100644 index cb36fca66f06..000000000000 --- a/net-firewall/firehol/firehol-1.256.ebuild +++ /dev/null @@ -1,75 +0,0 @@ -# Copyright 1999-2007 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-firewall/firehol/firehol-1.256.ebuild,v 1.4 2007/11/06 10:22:03 centic Exp $ - -inherit eutils - -DESCRIPTION="iptables firewall generator" -HOMEPAGE="http://firehol.sourceforge.net/" -SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2" - -LICENSE="GPL-2" -SLOT="0" -IUSE="" -KEYWORDS="~amd64 ~ppc ~sparc ~x86" - -DEPEND="sys-apps/iproute2" -RDEPEND="net-firewall/iptables - sys-apps/iproute2 - virtual/modutils - || ( - net-misc/wget - net-misc/curl - )" - -#S="${WORKDIR}/${PN}-1.226" - -pkg_setup() { - # Bug 81600 fail if iproute2 is built with minimal - if built_with_use sys-apps/iproute2 minimal; then - eerror "Firehol requires iproute2 to be emerged without" - eerror "the USE-Flag \"minimal\"." - eerror "Re-emerge iproute2 with" - eerror "USE=\"-minimal\" emerge sys-apps/iproute2" - die "sys-apps/iproute2 without USE=\"minimal\" needed" - fi -} - -# patch for embedded Gentoo - GNAP -# backport from firehol-CVS. -src_unpack() { - unpack ${A} - cd "${S}" || die - epatch "${FILESDIR}/${P}-printf.patch" || die -} - -src_install() { - newsbin firehol.sh firehol - - dodir /etc/firehol /etc/firehol/examples /etc/firehol/services - insinto /etc/firehol/examples - doins examples/* || die - - newconfd "${FILESDIR}/firehol.conf.d" firehol || die - - dodoc ChangeLog README TODO WhatIsNew || die - dohtml doc/*.html doc/*.css || die - - docinto scripts - dodoc get-iana.sh adblock.sh || die - - doman man/*.1 man/*.5 || die - - newinitd "${FILESDIR}/firehol.initrd" firehol || die -} - -pkg_postinst() { - elog "The default path to firehol's configuration file is /etc/firehol/firehol.conf" - elog "See /etc/firehol/examples for configuration examples." - # - # Install a default configuration if none is available yet - if [[ ! -e "${ROOT}/etc/firehol/firehol.conf" ]]; then - einfo "Installing a sample configuration as ${ROOT}/etc/firehol/firehol.conf" - cp "${ROOT}/etc/firehol/examples/client-all.conf" "${ROOT}/etc/firehol/firehol.conf" - fi -} |