diff options
author | William Hubbs <williamh@gentoo.org> | 2012-05-21 21:24:16 +0000 |
---|---|---|
committer | William Hubbs <williamh@gentoo.org> | 2012-05-21 21:24:16 +0000 |
commit | db149d6f24125fe6383d65637b204e73aa0b63e0 (patch) | |
tree | aa4b5e899b6a860b8317af0685643df4a4fdbace /net-firewall | |
parent | marked x86 per bug 415501 (diff) | |
download | historical-db149d6f24125fe6383d65637b204e73aa0b63e0.tar.gz historical-db149d6f24125fe6383d65637b204e73aa0b63e0.tar.bz2 historical-db149d6f24125fe6383d65637b204e73aa0b63e0.zip |
/tmp/msg
Package-Manager: portage-2.2.0_alpha107/cvs/Linux i686
Diffstat (limited to 'net-firewall')
-rw-r--r-- | net-firewall/iptables/ChangeLog | 9 | ||||
-rw-r--r-- | net-firewall/iptables/Manifest | 12 | ||||
-rw-r--r-- | net-firewall/iptables/files/ip6tables-1.4.13.confd | 19 | ||||
-rw-r--r-- | net-firewall/iptables/files/iptables-1.4.13.confd | 19 | ||||
-rw-r--r-- | net-firewall/iptables/files/iptables-1.4.13.init | 116 | ||||
-rw-r--r-- | net-firewall/iptables/iptables-1.4.13-r1.ebuild | 82 |
6 files changed, 252 insertions, 5 deletions
diff --git a/net-firewall/iptables/ChangeLog b/net-firewall/iptables/ChangeLog index 393e9bc3beb9..5c63d489f490 100644 --- a/net-firewall/iptables/ChangeLog +++ b/net-firewall/iptables/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for net-firewall/iptables # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-firewall/iptables/ChangeLog,v 1.268 2012/05/15 18:58:12 jer Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-firewall/iptables/ChangeLog,v 1.269 2012/05/21 21:24:16 williamh Exp $ + +*iptables-1.4.13-r1 (21 May 2012) + + 21 May 2012; William Hubbs <williamh@gentoo.org> + +files/ip6tables-1.4.13.confd, +files/iptables-1.4.13.confd, + +files/iptables-1.4.13.init, +iptables-1.4.13-r1.ebuild: + /tmp/msg 15 May 2012; Jeroen Roovers <jer@gentoo.org> iptables-1.4.13.ebuild: Stable for HPPA (bug #414329). diff --git a/net-firewall/iptables/Manifest b/net-firewall/iptables/Manifest index 2f1953bf04fa..a57bca564a54 100644 --- a/net-firewall/iptables/Manifest +++ b/net-firewall/iptables/Manifest @@ -2,12 +2,15 @@ Hash: SHA1 AUX ip6tables-1.3.2.confd 293 RMD160 2e5399355a930ab3c804c9cc46fe37763555a97e SHA1 0e82dbe8538f9168bb97939a03b73dd291e82760 SHA256 c93827ac2b8fdd83e2c36788053ee7567ceb13b3cbc5fcf40d186500e05c8104 +AUX ip6tables-1.4.13.confd 690 RMD160 964799b0f99430e6fb84bd614f3be63e3db8de9e SHA1 6203852a51e032cf3835d3ae8da15ec2fbd40ddb SHA256 2938fe4206514d9868047bd8f888a699fa2097ca69edab176453436d4259abaa AUX iptables-1.3.2.confd 290 RMD160 cb180068f86a608b16d850635ae909ea7b9cc059 SHA1 cb56dba4799eb3998b28e492c61265574c37d522 SHA256 351e123ba9e0ec7db2bcff42849aa627d29a3b2e77a47b82386f5e3a7e21bd30 AUX iptables-1.3.2.init 2607 RMD160 85f1511756d6b375f0c8caabebb8f24cbd70a9f8 SHA1 cadf8a08735dd2f19576533fe6697a26eec2def9 SHA256 f3bc81413d287166346e606f96d8e2a0e05d656265ff3ccea4dd811a8f008186 AUX iptables-1.4.11.1-man-fixes.patch 1165 RMD160 49b29d61a291af0cc7f682c7ddb2d5ac764640e7 SHA1 5e4941364a26c5d75fc43766888d54c84bf21fb3 SHA256 2b89e9ba68334bc45ac7b96ad53565a1cf41805a3659f65888ad495e84f9822e AUX iptables-1.4.11.init 2644 RMD160 be00df604e6f64672084a2527af794bafebee7ac SHA1 d16d338a07cfca7eec49a48fb94dec0085999f07 SHA256 9725b50a7b019e8d4cc97e8953d10389de4fec3849dddf16b8b5da77d19138f8 AUX iptables-1.4.12.1-conntrack-v2-ranges.patch 2293 RMD160 4623cce896ee51bfe011cc00fc2284059ca6718b SHA1 8c2c4b39dc5f2d8016dccc9a2c4a629f61f60a15 SHA256 713e62adae8651e94296619297afe603ef3f7da68c4ff10e5a64be24c5cfe537 AUX iptables-1.4.12.1-lm.patch 2107 RMD160 8dcb6438a4bb5848af546265ec393325674bd573 SHA1 2a5304c800d7cdc1850dbe2f0ae5c03339964422 SHA256 dfc429b71c6a3d77a6447e4d7c0c13f62cf086187f491968b3361568f9aa09ef +AUX iptables-1.4.13.confd 687 RMD160 8a55c6de742617c76b0d5b51b0e6aa11bdade272 SHA1 7a672ebb12a75928463176ab5c0343120c36bb50 SHA256 7e2341211ca14997b7a8a1f930f94db855291af597c568f680f80031c20d45b6 +AUX iptables-1.4.13.init 2632 RMD160 1cd124f3f635b7bee6f6ad86527eba9842a29962 SHA1 b9e1df3366f0291bf0911311afbd551e5aabec60 SHA256 3c955bbc787e57d6c0d6d5e97ec34e350fbcbf4f0b453bd2ed624e68ac83155f DIST iptables-1.4.10.tar.bz2 478007 RMD160 f06298fa982ffe5cb5c1885395d375d909512bf6 SHA1 8190b8c9714a3eec825317e8ac1deeb3d11c6d29 SHA256 7544e437d2222078b15e6cd063b521c6f1ec4dac49e6af9ba3bfece2a6a93445 DIST iptables-1.4.11.1.tar.bz2 486926 RMD160 43d5e267bf630d663785ee4435a89de0bfc6c5d0 SHA1 2aa0d215485133f2817973b0914a132f628d9f3a SHA256 170c294698ca573477b1b2a3815e1563bf9929d182efef6cf0331a6e955c9ade DIST iptables-1.4.12.1.tar.bz2 473418 RMD160 286d27b6fc7d47fb1a47f4434d7accdef39f1f1a SHA1 86022c3b5129ad7105f5087ec1349e99cc5a9728 SHA256 77e6581f21f15946a814fa311236e5f3f7c6593180f9d695cea06aa95e464aba @@ -20,14 +23,15 @@ EBUILD iptables-1.4.11.1-r2.ebuild 2226 RMD160 1164d66cde2b975c35e5f84532a41947b EBUILD iptables-1.4.12.1-r1.ebuild 2345 RMD160 97cc2bc48760c334b7dc510a795083d017324c19 SHA1 9a993385f528d019ace2eb1599a9f792e012789f SHA256 a08b5e4e9721771bc6e0b4bd6351d54b0f9a444dece3a07caec91c4768cbbd8a EBUILD iptables-1.4.12.1.ebuild 2236 RMD160 6071e077a7c9191de8f24cc7f38cb25c42218717 SHA1 6c01e4fc3913b9016b2171def62b16f23fcc4cc9 SHA256 361587d09c71eb469f7011f8ba96a1c64ad70aef3a3a949287268c9745cd747b EBUILD iptables-1.4.12.ebuild 2181 RMD160 ac5dca50c3fc903d0a9466503f0dea3f65af7635 SHA1 8e7aa3bc786b5c805ac32015d2cd59ecb59feaf1 SHA256 28ddb17b1b0cfaddd290ee8f850075368082df0029f3a6949b5b87505779316b +EBUILD iptables-1.4.13-r1.ebuild 2224 RMD160 4e735cbe26986382fb8842cb5e75c81b946346b2 SHA1 7b33acd020a5d05bf2bbae2e2f16f36532119b1f SHA256 dfd906d97b64e97da0edccf79116fb9254ebac86b2bde0d10f762ebc4c5ea39f EBUILD iptables-1.4.13.ebuild 2208 RMD160 9092e96300aa8c42de665290a23a54b2d7849901 SHA1 8beb61b663139205a227ac0a6ce94d80a4f02408 SHA256 cc96fce88e44b9b7511d20bbf39d78008dc9564a18894becbb4c3fdcf6dead9f EBUILD iptables-1.4.6.ebuild 1433 RMD160 9dbfa44e5cd29a505a7095f122154061cef1d969 SHA1 788fc9f2ad8aa814821b43aa89933a8e281401c3 SHA256 c3808c683e4f286e40989133c80ad898aaa8e00eac635ec115652acb974e302f -MISC ChangeLog 46414 RMD160 2221f940a43e3a8df62809b1303c0ba6afb3292c SHA1 994b30396fd536a53f24d6af28669ff48ce1d5df SHA256 29db0a59a77b0b8eb1cb3e4fe67d37c10ffb86d148d33543fd0cb0a590602bd0 +MISC ChangeLog 46639 RMD160 ec71a745443e26d4a4414daae40a896d41011c20 SHA1 120c082d52ba7bfdd9fffe098f0f5de9dcad768b SHA256 bb26f19f08e72fe193d83f69ada21661102881751ce13f4ec4785a16b1947a37 MISC metadata.xml 1033 RMD160 e99b7b4ea8b981347a7fcadb549d122e23af4fd7 SHA1 4feab39d5a63d9ead6d389eae639bcbfd7fff197 SHA256 6972ae7bad5c0025564a15429579f046ab4c365929aa175b1e84c1586872bdc9 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (GNU/Linux) -iEYEARECAAYFAk+yp0kACgkQVWmRsqeSphMtHgCdHrUKnNcUCB4BAxKQvxTr3BZi -UgEAni0zMsPgFGMTMOdCbN03Ke6+QMOx -=MhNa +iEYEARECAAYFAk+6sp8ACgkQblQW9DDEZTiFMgCgo9fNtN+erLJRFVfrbPs/pJtF +UlEAn3gTLs5nGLM+no6nL+eGbn5MExeZ +=gBJb -----END PGP SIGNATURE----- diff --git a/net-firewall/iptables/files/ip6tables-1.4.13.confd b/net-firewall/iptables/files/ip6tables-1.4.13.confd new file mode 100644 index 000000000000..3bb36989d37e --- /dev/null +++ b/net-firewall/iptables/files/ip6tables-1.4.13.confd @@ -0,0 +1,19 @@ +# /etc/conf.d/ip6tables + +# Location in which iptables initscript will save set rules on +# service shutdown +IP6TABLES_SAVE="/var/lib/ip6tables/rules-save" + +# Options to pass to iptables-save and iptables-restore +SAVE_RESTORE_OPTIONS="-c" + +# Save state on stopping iptables +SAVE_ON_STOP="yes" + +# If you need to log iptables messages as soon as iptables starts, +# AND your logger does NOT depend on the network, then you may wish +# to uncomment the next line. +# If your logger depends on the network, and you uncomment this line +# you will create an unresolvable circular dependency during startup. +# After commenting or uncommenting this line, you must run 'rc-update -u'. +#rc_use="logger" diff --git a/net-firewall/iptables/files/iptables-1.4.13.confd b/net-firewall/iptables/files/iptables-1.4.13.confd new file mode 100644 index 000000000000..7225374c3a8a --- /dev/null +++ b/net-firewall/iptables/files/iptables-1.4.13.confd @@ -0,0 +1,19 @@ +# /etc/conf.d/iptables + +# Location in which iptables initscript will save set rules on +# service shutdown +IPTABLES_SAVE="/var/lib/iptables/rules-save" + +# Options to pass to iptables-save and iptables-restore +SAVE_RESTORE_OPTIONS="-c" + +# Save state on stopping iptables +SAVE_ON_STOP="yes" + +# If you need to log iptables messages as soon as iptables starts, +# AND your logger does NOT depend on the network, then you may wish +# to uncomment the next line. +# If your logger depends on the network, and you uncomment this line +# you will create an unresolvable circular dependency during startup. +# After commenting or uncommenting this line, you must run 'rc-update -u'. +#rc_use="logger" diff --git a/net-firewall/iptables/files/iptables-1.4.13.init b/net-firewall/iptables/files/iptables-1.4.13.init new file mode 100644 index 000000000000..b698140de319 --- /dev/null +++ b/net-firewall/iptables/files/iptables-1.4.13.init @@ -0,0 +1,116 @@ +#!/sbin/runscript +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-firewall/iptables/files/iptables-1.4.13.init,v 1.1 2012/05/21 21:24:16 williamh Exp $ + +extra_commands="save panic" +extra_started_commands="reload" + +iptables_name=${SVCNAME} +if [ "${iptables_name}" != "iptables" -a "${iptables_name}" != "ip6tables" ] ; then + iptables_name="iptables" +fi + +iptables_bin="/sbin/${iptables_name}" +case ${iptables_name} in + iptables) iptables_proc="/proc/net/ip_tables_names" + iptables_save=${IPTABLES_SAVE};; + ip6tables) iptables_proc="/proc/net/ip6_tables_names" + iptables_save=${IP6TABLES_SAVE};; +esac + +depend() { + before net +} + +set_table_policy() { + local chains table=$1 policy=$2 + case ${table} in + nat) chains="PREROUTING POSTROUTING OUTPUT";; + mangle) chains="PREROUTING INPUT FORWARD OUTPUT POSTROUTING";; + filter) chains="INPUT FORWARD OUTPUT";; + *) chains="";; + esac + local chain + for chain in ${chains} ; do + ${iptables_bin} -t ${table} -P ${chain} ${policy} + done +} + +checkkernel() { + if [ ! -e ${iptables_proc} ] ; then + eerror "Your kernel lacks ${iptables_name} support, please load" + eerror "appropriate modules and try again." + return 1 + fi + return 0 +} +checkconfig() { + if [ ! -f ${iptables_save} ] ; then + eerror "Not starting ${iptables_name}. First create some rules then run:" + eerror "/etc/init.d/${iptables_name} save" + return 1 + fi + return 0 +} + +start() { + checkconfig || return 1 + ebegin "Loading ${iptables_name} state and starting firewall" + ${iptables_bin}-restore ${SAVE_RESTORE_OPTIONS} < "${iptables_save}" + eend $? +} + +stop() { + if [ "${SAVE_ON_STOP}" = "yes" ] ; then + save || return 1 + fi + checkkernel || return 1 + ebegin "Stopping firewall" + local a + for a in $(cat ${iptables_proc}) ; do + set_table_policy $a ACCEPT + + ${iptables_bin} -F -t $a + ${iptables_bin} -X -t $a + done + eend $? +} + +reload() { + checkkernel || return 1 + ebegin "Flushing firewall" + local a + for a in $(cat ${iptables_proc}) ; do + ${iptables_bin} -F -t $a + ${iptables_bin} -X -t $a + done + eend $? + + start +} + +save() { + ebegin "Saving ${iptables_name} state" + touch "${iptables_save}" + chmod 0600 "${iptables_save}" + ${iptables_bin}-save ${SAVE_RESTORE_OPTIONS} > "${iptables_save}" + eend $? +} + +panic() { + checkkernel || return 1 + if service_started ${iptables_name}; then + rc-service ${iptables_name} stop + fi + + local a + ebegin "Dropping all packets" + for a in $(cat ${iptables_proc}) ; do + ${iptables_bin} -F -t $a + ${iptables_bin} -X -t $a + + set_table_policy $a DROP + done + eend $? +} diff --git a/net-firewall/iptables/iptables-1.4.13-r1.ebuild b/net-firewall/iptables/iptables-1.4.13-r1.ebuild new file mode 100644 index 000000000000..96a2a651eded --- /dev/null +++ b/net-firewall/iptables/iptables-1.4.13-r1.ebuild @@ -0,0 +1,82 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-firewall/iptables/iptables-1.4.13-r1.ebuild,v 1.1 2012/05/21 21:24:16 williamh Exp $ + +EAPI="4" + +# Force users doing their own patches to install their own tools +AUTOTOOLS_AUTO_DEPEND=no + +inherit eutils toolchain-funcs autotools + +DESCRIPTION="Linux kernel (2.4+) firewall, NAT and packet mangling tools" +HOMEPAGE="http://www.iptables.org/" +SRC_URI="http://iptables.org/projects/iptables/files/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" +IUSE="ipv6 netlink static-libs" + +RDEPEND=" + netlink? ( net-libs/libnfnetlink ) +" +DEPEND="${RDEPEND} + virtual/os-headers +" + +src_prepare() { + # use the saner headers from the kernel + rm -f include/linux/{kernel,types}.h + + # Only run autotools if user patched something + epatch_user && eautoreconf || elibtoolize +} + +src_configure() { + sed -i \ + -e "/nfnetlink=[01]/s:=[01]:=$(usex netlink 1 0):" \ + configure || die + econf \ + --sbindir="${EPREFIX}/sbin" \ + --libexecdir="${EPREFIX}/$(get_libdir)" \ + --enable-devel \ + --enable-libipq \ + --enable-shared \ + $(use_enable static-libs static) \ + $(use_enable ipv6) +} + +src_compile() { + emake V=1 +} + +src_install() { + default + dodoc INCOMPATIBILITIES iptables/iptables.xslt + + # all the iptables binaries are in /sbin, so might as well + # put these small files in with them + into / + dosbin iptables/iptables-apply + dosym iptables-apply /sbin/ip6tables-apply + doman iptables/iptables-apply.8 + + insinto /usr/include + doins include/iptables.h $(use ipv6 && echo include/ip6tables.h) + insinto /usr/include/iptables + doins include/iptables/internal.h + + keepdir /var/lib/iptables + newinitd "${FILESDIR}"/${PN}-1.4.13.init iptables + newconfd "${FILESDIR}"/${PN}-1.4.13.confd iptables + if use ipv6 ; then + keepdir /var/lib/ip6tables + newinitd "${FILESDIR}"/iptables-1.4.13.init ip6tables + newconfd "${FILESDIR}"/ip6tables-1.4.13.confd ip6tables + fi + + # Move important libs to /lib + gen_usr_ldscript -a ip{4,6}tc ipq iptc xtables + find "${ED}" -type f -name '*.la' -exec rm -rf '{}' '+' || die "la removal failed" +} |