[oe-commits] Chris Larson : iptables: unbork the 1.3.8 build, merge iptables-utils into iptables.

git version control git at git.openembedded.org
Sun Jan 24 07:39:02 UTC 2010


Module: openembedded.git
Branch: shr/unstable
Commit: c6088e990601e67708bba32a45a92aecb7e43d5c
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=c6088e990601e67708bba32a45a92aecb7e43d5c

Author: Chris Larson <clarson at mvista.com>
Date:   Wed Jan  6 16:32:40 2010 -0700

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 <clarson at mvista.com>

---

 recipes/iptables/files/compile.patch               |   17 -----------------
 .../{files => iptables-1.3.8}/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(-)

diff --git a/recipes/iptables/files/compile.patch b/recipes/iptables/files/compile.patch
deleted file mode 100644
index 76662d9..0000000
--- 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 698c259..c8f70d4 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 47c5564..968f7d9 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 433114e..bf7bc05 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 += "\





More information about the Openembedded-commits mailing list