summaryrefslogtreecommitdiff
path: root/core/iptables
diff options
context:
space:
mode:
authorMichał Masłowski <mtjm@mtjm.eu>2012-06-25 14:01:11 +0200
committerMichał Masłowski <mtjm@mtjm.eu>2012-06-25 14:01:11 +0200
commitc94bf77ede06fa67fd3222ffa3fcad8898e1fd59 (patch)
tree3e4cc7f273a07c12fd69c589da434717e523664f /core/iptables
parent0f89996e6f908cc405cd44478860b864dcb189f1 (diff)
parent3b99c42eb8ca744e86e4e17197b1bf10642c6785 (diff)
Merge branch 'master' of ssh://parabolagnulinux.org:1863/home/parabola/abslibre-pre-mips64el
Conflicts: community-testing/nginx/PKGBUILD community-testing/nginx/nginx.install community/chrony/PKGBUILD community/lxdm/PKGBUILD community/oidentd/PKGBUILD community/oss/PKGBUILD community/pdnsd/PKGBUILD community/ruby-cairo/PKGBUILD community/subtle/PKGBUILD core/kmod/PKGBUILD core/lvm2/PKGBUILD core/openldap/PKGBUILD core/systemd/PKGBUILD extra/smartmontools/PKGBUILD multilib/wine/PKGBUILD
Diffstat (limited to 'core/iptables')
-rw-r--r--core/iptables/0503-extension_cppflags.patch13
-rw-r--r--core/iptables/PKGBUILD36
-rw-r--r--core/iptables/ip6tables.service11
-rwxr-xr-xcore/iptables/iptables-flush18
-rw-r--r--core/iptables/iptables.service11
5 files changed, 76 insertions, 13 deletions
diff --git a/core/iptables/0503-extension_cppflags.patch b/core/iptables/0503-extension_cppflags.patch
new file mode 100644
index 000000000..0eb645731
--- /dev/null
+++ b/core/iptables/0503-extension_cppflags.patch
@@ -0,0 +1,13 @@
+Index: b/extensions/GNUmakefile.in
+===================================================================
+--- a/extensions/GNUmakefile.in 2012-03-27 12:14:05.000000000 -0400
++++ b/extensions/GNUmakefile.in 2012-03-27 16:03:48.378790221 -0400
+@@ -21,7 +21,7 @@
+ kinclude_CPPFLAGS = @kinclude_CPPFLAGS@
+
+ AM_CFLAGS = ${regular_CFLAGS}
+-AM_CPPFLAGS = ${regular_CPPFLAGS} -I${top_builddir}/include -I${top_builddir} -I${top_srcdir}/include ${kinclude_CPPFLAGS}
++AM_CPPFLAGS = ${CPPFLAGS} ${regular_CPPFLAGS} -I${top_builddir}/include -I${top_builddir} -I${top_srcdir}/include ${kinclude_CPPFLAGS}
+ AM_DEPFLAGS = -Wp,-MMD,$(@D)/.$(@F).d,-MT,$@
+ AM_LDFLAGS = @noundef_LDFLAGS@
+
diff --git a/core/iptables/PKGBUILD b/core/iptables/PKGBUILD
index bc9f41093..06814a4ed 100644
--- a/core/iptables/PKGBUILD
+++ b/core/iptables/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 156635 2012-04-21 23:34:43Z allan $
+# $Id: PKGBUILD 162152 2012-06-22 12:55:41Z dreisner $
# Maintainer: Ronald van Haren <ronald.archlinux.org>
# Contributor: Thomas Baechler <thomas@archlinux.org>
pkgname=iptables
-pkgver=1.4.13
-pkgrel=1
+pkgver=1.4.14
+pkgrel=2
pkgdesc='Linux kernel packet control tool'
arch=('i686' 'x86_64' 'mips64el')
license=('GPL2')
@@ -22,9 +22,13 @@ source=("http://www.iptables.org/projects/iptables/files/${pkgname}-${pkgver}.ta
empty-mangle.rules
empty-nat.rules
empty-raw.rules
- empty-security.rules)
+ empty-security.rules
+ 0503-extension_cppflags.patch
+ iptables.service
+ ip6tables.service
+ iptables-flush)
backup=(etc/conf.d/iptables)
-sha1sums=('bf1f1896e052d1813a7c96fa70f88be8dab3ff86'
+sha1sums=('daf2972b81e52f562a644798013e946c88319ea3'
'5bb6fa526665cdd728c26f0f282f5a51f220cf88'
'2db68906b603e5268736f48c8e251f3a49da1d75'
'83b3363878e3660ce23b2ad325b53cbd6c796ecf'
@@ -34,25 +38,25 @@ sha1sums=('bf1f1896e052d1813a7c96fa70f88be8dab3ff86'
'c45b738b5ec4cfb11611b984c21a83b91a2d58f3'
'1694d79b3e6e9d9d543f6a6e75fed06066c9a6c6'
'7db53bb882f62f6c677cc8559cff83d8bae2ef73'
- 'ebbd1424a1564fd45f455a81c61ce348f0a14c2e')
+ 'ebbd1424a1564fd45f455a81c61ce348f0a14c2e'
+ '44626980a52e49f345a0b1e1ca03060f3a35763c'
+ '5c4eb4ea88c302e8ff98f435a11dd59b00f4d8b9'
+ 'f1f16f44c6a5547b6f251d13007fe6585761e8b0'
+ 'e7abda09c61142121b6695928d3b71ccd8fdf73a')
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
- # http://bugs.archlinux.org/task/17046
- sed -i '87 i libxt_RATEEST.so: libxt_RATEEST.oo' extensions/GNUmakefile.in
- sed -i '88 i \\t${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -lm -shared ${LDFLAGS} -o $@ $<;\n' extensions/GNUmakefile.in
-
# use system one
rm include/linux/types.h
+ patch -Np1 -i ${srcdir}/0503-extension_cppflags.patch
+
./configure --prefix=/usr \
--libexecdir=/usr/lib/iptables --sysconfdir=/etc \
--with-xtlibdir=/usr/lib/iptables \
--enable-devel --enable-libipq \
- --enable-shared --enable-static
-# build fails when not enabling static, see if we can remove it on next build
-# 1.4.13 still fails
+ --enable-shared
make
}
@@ -71,4 +75,10 @@ package() {
mkdir -p "${pkgdir}"/var/lib/iptables
install -m644 empty-{filter,mangle,nat,raw,security}.rules "${pkgdir}"/var/lib/iptables
+
+ # install systemd files
+ install -Dm644 ${srcdir}/iptables.service ${pkgdir}/usr/lib/systemd/system/iptables.service
+ install -Dm644 ${srcdir}/ip6tables.service ${pkgdir}/usr/lib/systemd/system/ip6tables.service
+ install -Dm755 ${srcdir}/iptables-flush ${pkgdir}/usr/lib/systemd/scripts/iptables-flush
}
+
diff --git a/core/iptables/ip6tables.service b/core/iptables/ip6tables.service
new file mode 100644
index 000000000..9a695f31e
--- /dev/null
+++ b/core/iptables/ip6tables.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=IPv6 Packet Filtering Framework
+
+[Service]
+Type=oneshot
+ExecStart=/usr/sbin/ip6tables-restore /etc/iptables/ip6tables.rules
+ExecStop=/usr/lib/systemd/scripts/iptables-flush 6
+RemainAfterExit=yes
+
+[Install]
+WantedBy=multi-user.target
diff --git a/core/iptables/iptables-flush b/core/iptables/iptables-flush
new file mode 100755
index 000000000..e6fafe950
--- /dev/null
+++ b/core/iptables/iptables-flush
@@ -0,0 +1,18 @@
+#!/bin/bash
+#
+# Usage: iptables-flush [6]
+#
+
+iptables=ip$1tables
+if ! type -p "$iptables"; then
+ echo "error: invalid argument"
+ exit 1
+fi
+
+while read -r table; do
+ tables+=("/var/lib/$iptables/empty-$table.rules")
+done <"/proc/net/ip$1_tables_names"
+
+if (( ${#tables[*]} )); then
+ cat "${tables[@]}" | "$iptables-restore"
+fi
diff --git a/core/iptables/iptables.service b/core/iptables/iptables.service
new file mode 100644
index 000000000..3084f53b7
--- /dev/null
+++ b/core/iptables/iptables.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Packet Filtering Framework
+
+[Service]
+Type=oneshot
+ExecStart=/usr/sbin/iptables-restore /etc/iptables/iptables.rules
+ExecStop=/usr/lib/systemd/scripts/iptables-flush
+RemainAfterExit=yes
+
+[Install]
+WantedBy=multi-user.target