[arch-commits] Commit in iptables/trunk (5 files)

Ronald van Haren ronald at archlinux.org
Fri Jun 22 09:32:28 UTC 2012


    Date: Friday, June 22, 2012 @ 05:32:28
  Author: ronald
Revision: 162146

upgpkg: iptables 1.4.14-2

add systemd files; patch for shared build

Added:
  iptables/trunk/0503-extension_cppflags.patch
  iptables/trunk/ip6tables.service
  iptables/trunk/iptables-flush
  iptables/trunk/iptables.service
Modified:
  iptables/trunk/PKGBUILD

-------------------------------+
 0503-extension_cppflags.patch |   13 +++++++++++++
 PKGBUILD                      |   30 ++++++++++++++++++++----------
 ip6tables.service             |   11 +++++++++++
 iptables-flush                |   18 ++++++++++++++++++
 iptables.service              |   11 +++++++++++
 5 files changed, 73 insertions(+), 10 deletions(-)

Added: 0503-extension_cppflags.patch
===================================================================
--- 0503-extension_cppflags.patch	                        (rev 0)
+++ 0503-extension_cppflags.patch	2012-06-22 09:32:28 UTC (rev 162146)
@@ -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@
+ 

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2012-06-22 09:15:31 UTC (rev 162145)
+++ PKGBUILD	2012-06-22 09:32:28 UTC (rev 162146)
@@ -4,7 +4,7 @@
 
 pkgname=iptables
 pkgver=1.4.14
-pkgrel=1
+pkgrel=2
 pkgdesc='Linux kernel packet control tool'
 arch=('i686' 'x86_64')
 license=('GPL2')
@@ -22,7 +22,11 @@
         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=('daf2972b81e52f562a644798013e946c88319ea3'
           '5bb6fa526665cdd728c26f0f282f5a51f220cf88'
@@ -34,25 +38,25 @@
           '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 @@
 
   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  
 }
+

Added: ip6tables.service
===================================================================
--- ip6tables.service	                        (rev 0)
+++ ip6tables.service	2012-06-22 09:32:28 UTC (rev 162146)
@@ -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

Added: iptables-flush
===================================================================
--- iptables-flush	                        (rev 0)
+++ iptables-flush	2012-06-22 09:32:28 UTC (rev 162146)
@@ -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


Property changes on: iptables/trunk/iptables-flush
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: iptables.service
===================================================================
--- iptables.service	                        (rev 0)
+++ iptables.service	2012-06-22 09:32:28 UTC (rev 162146)
@@ -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




More information about the arch-commits mailing list