From c6088e990601e67708bba32a45a92aecb7e43d5c Mon Sep 17 00:00:00 2001 From: Chris Larson Date: Wed, 6 Jan 2010 16:32:40 -0700 Subject: [PATCH] iptables: unbork the 1.3.8 build, merge iptables-utils into iptables. In recent iptables versions, the -save and -restore files are just symlinks pointing to the main, merged binary, so the separate package is a bit unnecessary. Signed-off-by: Chris Larson --- recipes/iptables/files/compile.patch | 17 ----------------- .../cross-iptables.diff | 0 .../getsockopt-failed.patch | 0 .../iptables-use-s6_addr32.patch | 0 recipes/iptables/iptables.inc | 19 +++---------------- recipes/iptables/iptables_1.3.8.bb | 14 ++++++++++++++ recipes/iptables/iptables_1.4.6.bb | 4 ++++ 7 files changed, 21 insertions(+), 33 deletions(-) delete mode 100644 recipes/iptables/files/compile.patch rename recipes/iptables/{files => iptables-1.3.8}/cross-iptables.diff (100%) rename recipes/iptables/{files => iptables-1.3.8}/getsockopt-failed.patch (100%) rename recipes/iptables/{files => iptables-1.3.8}/iptables-use-s6_addr32.patch (100%) diff --git a/recipes/iptables/files/compile.patch b/recipes/iptables/files/compile.patch deleted file mode 100644 index 76662d9748..0000000000 --- a/recipes/iptables/files/compile.patch +++ /dev/null @@ -1,17 +0,0 @@ -Index: iptables-1.3.3/extensions/Makefile -=================================================================== ---- iptables-1.3.3.orig/extensions/Makefile -+++ iptables-1.3.3/extensions/Makefile -@@ -67,10 +67,10 @@ endif - - ifdef NO_SHARED_LIBS - extensions/libext.a: $(EXT_OBJS) -- rm -f $@; ar crv $@ $(EXT_OBJS) -+ rm -f $@; $(AR) crv $@ $(EXT_OBJS) - - extensions/libext6.a: $(EXT6_OBJS) -- rm -f $@; ar crv $@ $(EXT6_OBJS) -+ rm -f $@; $(AR) crv $@ $(EXT6_OBJS) - - extensions/initext.o: extensions/initext.c - extensions/initext6.o: extensions/initext6.c diff --git a/recipes/iptables/files/cross-iptables.diff b/recipes/iptables/iptables-1.3.8/cross-iptables.diff similarity index 100% rename from recipes/iptables/files/cross-iptables.diff rename to recipes/iptables/iptables-1.3.8/cross-iptables.diff diff --git a/recipes/iptables/files/getsockopt-failed.patch b/recipes/iptables/iptables-1.3.8/getsockopt-failed.patch similarity index 100% rename from recipes/iptables/files/getsockopt-failed.patch rename to recipes/iptables/iptables-1.3.8/getsockopt-failed.patch diff --git a/recipes/iptables/files/iptables-use-s6_addr32.patch b/recipes/iptables/iptables-1.3.8/iptables-use-s6_addr32.patch similarity index 100% rename from recipes/iptables/files/iptables-use-s6_addr32.patch rename to recipes/iptables/iptables-1.3.8/iptables-use-s6_addr32.patch diff --git a/recipes/iptables/iptables.inc b/recipes/iptables/iptables.inc index 698c25975c..c8f70d49d3 100644 --- a/recipes/iptables/iptables.inc +++ b/recipes/iptables/iptables.inc @@ -10,23 +10,10 @@ INC_PR = "r6" PARALLEL_MAKE = "" -export COPT_FLAGS = "${CFLAGS}" -export KERNEL_DIR = "${STAGING_INCDIR}" - -inherit autotools - -#do_compile () { -# oe_runmake DESTDIR=${D} NO_SHARED_LIBS=1 -#} - -#do_install () { -# oe_runmake DESTDIR=${D} install NO_SHARED_LIBS=1 -#} - -PACKAGES =+ "${PN}-utils" -FILES_${PN}-utils = "${sbindir}/iptables-save ${sbindir}/iptables-restore" +CFLAGS += "-Du32=__u32" +RPROVIDES_${PN} += "iptables-utils" +FILES_${PN}-dbg += "${libexecdir}/xtables/.debug" FILES_${PN}-doc += "${mandir}" -FILES_${PN}-dbg += "${libexecdir}/xtables/.debug/*" RRECOMMENDS = "\ kernel-module-ip-tables \ diff --git a/recipes/iptables/iptables_1.3.8.bb b/recipes/iptables/iptables_1.3.8.bb index 47c5564997..968f7d99af 100644 --- a/recipes/iptables/iptables_1.3.8.bb +++ b/recipes/iptables/iptables_1.3.8.bb @@ -1,5 +1,16 @@ require iptables.inc PR = "${INC_PR}.0" +EXTRA_OEMAKE = "'COPT_FLAGS=${CFLAGS}' \ + 'KERNEL_DIR=${STAGING_INCDIR}' \ + 'LDFLAGS=${LDFLAGS}' \ + ${@base_contains('DISTRO_FEATURES', 'ipv6', 'DO_IPV6=1', 'DO_IPV6=0', d)} \ + \ + 'PREFIX=${prefix}' \ + 'LIBDIR=${libdir}' \ + 'BINDIR=${sbindir}' \ + 'MANDIR=${mandir}' \ + 'INCDIR=${includedir}'" +CFLAGS[unexport] = "1" SRC_URI += "\ file://getsockopt-failed.patch;patch=1 \ @@ -7,3 +18,6 @@ SRC_URI += "\ file://cross-iptables.diff;patch=1 \ " +do_install () { + oe_runmake 'DESTDIR=${D}' install +} diff --git a/recipes/iptables/iptables_1.4.6.bb b/recipes/iptables/iptables_1.4.6.bb index 433114ef87..bf7bc05b4a 100644 --- a/recipes/iptables/iptables_1.4.6.bb +++ b/recipes/iptables/iptables_1.4.6.bb @@ -1,4 +1,8 @@ require iptables.inc +inherit autotools +EXTRA_OECONF = "--with-kernel=${STAGING_INCDIR} \ + ${@base_contains('DISTRO_FEATURES', 'ipv6', '', '--disable-ipv6', d)}" + PR = "${INC_PR}.0" SRC_URI += "\ -- 2.39.5