From 5e4671b30d48b183ebe71234a3b9dedf6d25d2b8 Mon Sep 17 00:00:00 2001 From: Cristian Iorga Date: Wed, 16 Jan 2013 22:03:12 +0200 Subject: iptables: upgrade to 1.4.17 patch added to fix cross-compilation issues (From OE-Core rev: f6c7d5e0590e3e70fb435e747ffdb9fe586e7bfc) Signed-off-by: Cristian Iorga Signed-off-by: Saul Wold Signed-off-by: Richard Purdie --- .../fix-iptables-extensions-build-error.patch | 44 +++++++++++ .../iptables/fix-link-failure-ip6t-NETMAP.patch | 86 ++++++++++++++++++++++ .../recipes-extended/iptables/iptables_1.4.16.3.bb | 39 ---------- meta/recipes-extended/iptables/iptables_1.4.17.bb | 40 ++++++++++ 4 files changed, 170 insertions(+), 39 deletions(-) create mode 100644 meta/recipes-extended/iptables/iptables/fix-iptables-extensions-build-error.patch create mode 100644 meta/recipes-extended/iptables/iptables/fix-link-failure-ip6t-NETMAP.patch delete mode 100644 meta/recipes-extended/iptables/iptables_1.4.16.3.bb create mode 100644 meta/recipes-extended/iptables/iptables_1.4.17.bb (limited to 'meta/recipes-extended') diff --git a/meta/recipes-extended/iptables/iptables/fix-iptables-extensions-build-error.patch b/meta/recipes-extended/iptables/iptables/fix-iptables-extensions-build-error.patch new file mode 100644 index 0000000000..4cd919de19 --- /dev/null +++ b/meta/recipes-extended/iptables/iptables/fix-iptables-extensions-build-error.patch @@ -0,0 +1,44 @@ +From 0a43f156e23edf616859ac5a8c90e41ccc5cb1cd Mon Sep 17 00:00:00 2001 +From: Cristian Iorga +Date: Wed, 16 Jan 2013 20:14:43 +0200 +Subject: [PATCH] extensions: fix iptables extensions build error + in cross-compilation environments + +libtool is properly declared and used for cross-platform +build environments + +Upstream-Status: Pending + +Signed-off-by: Cristian Iorga +--- + extensions/GNUmakefile.in | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/extensions/GNUmakefile.in b/extensions/GNUmakefile.in +index adad4d6..befb1fb 100644 +--- a/extensions/GNUmakefile.in ++++ b/extensions/GNUmakefile.in +@@ -13,6 +13,7 @@ xtlibdir = @xtlibdir@ + + CC = @CC@ + CCLD = ${CC} ++LIBTOOL = @LIBTOOL@ + CFLAGS = @CFLAGS@ + CPPFLAGS = @CPPFLAGS@ + LDFLAGS = @LDFLAGS@ +@@ -94,10 +95,10 @@ lib%.so: lib%.la + ${AM_VERBOSE_NULL} ln -fs .libs/$@ $@ + + lib%.la: lib%.lo +- ${AM_VERBOSE_CCLD} ../libtool ${AM_LIBTOOL_SILENT} --tag=CC --mode=link ${CCLD} ${AM_LDFLAGS} -module ${LDFLAGS} -o $@ $< ../libxtables/libxtables.la ${$*_LIBADD} -rpath ${xtlibdir} ++ ${AM_VERBOSE_CCLD} ${LIBTOOL} ${AM_LIBTOOL_SILENT} --tag=CC --mode=link ${CCLD} ${AM_LDFLAGS} -module ${LDFLAGS} -o $@ $< ../libxtables/libxtables.la ${$*_LIBADD} -rpath ${xtlibdir} + + lib%.lo: ${srcdir}/lib%.c +- ${AM_VERBOSE_CC} ../libtool ${AM_LIBTOOL_SILENT} --tag=CC --mode=compile ${CC} ${AM_CPPFLAGS} ${AM_DEPFLAGS} ${AM_CFLAGS} -D_INIT=lib$*_init ${CFLAGS} -o $@ -c $< ++ ${AM_VERBOSE_CC} ${LIBTOOL} ${AM_LIBTOOL_SILENT} --tag=CC --mode=compile ${CC} ${AM_CPPFLAGS} ${AM_DEPFLAGS} ${AM_CFLAGS} -D_INIT=lib$*_init ${CFLAGS} -o $@ -c $< + + libxt_NOTRACK.so: libxt_CT.so + ${AM_VERBOSE_GEN} ln -fs $< $@ +-- +1.7.10.4 + diff --git a/meta/recipes-extended/iptables/iptables/fix-link-failure-ip6t-NETMAP.patch b/meta/recipes-extended/iptables/iptables/fix-link-failure-ip6t-NETMAP.patch new file mode 100644 index 0000000000..aa8efd6384 --- /dev/null +++ b/meta/recipes-extended/iptables/iptables/fix-link-failure-ip6t-NETMAP.patch @@ -0,0 +1,86 @@ +From 68e77a26111ee6b8f10c735a76891a7de6d57ee6 Mon Sep 17 00:00:00 2001 +From: Jan Engelhardt +Date: Tue, 1 Jan 2013 22:47:51 +0000 +Subject: [PATCH] build: resolve link failure for ip6t_NETMAP + +Link stage of libip6t_NETMAP failed since recently. + + CCLD libip6t_NETMAP.so +/usr/lib64/gcc/x86_64-suse-linux/4.7/../../../../x86_64-suse-linux/bin/ld: +cannot find -lip6tc + +libip6t_NETMAP.c uses the "ipv6_prefix_length" function from +libip6tc.so; "-lip6tc" is used in the Makefile, but, the directory to +it is not specified. + +Why does the link succeed for some people? Because +/usr/lib(64)/libip6tc.so satisfies -lip6tc, but not all environments, +especially those without iptables development files, have that file, +hence this link error can happen. + +By suggestion of Mike Frysinger, this patch uses libtool to produce +and link the plugins. + +Upstream-Status: Backport + +Signed-off-by: Jan Engelhardt +Acked-by: Mike Frysinger +Signed-off-by: Pablo Neira Ayuso +--- + extensions/GNUmakefile.in | 20 ++++++++++++-------- + 1 files changed, 12 insertions(+), 8 deletions(-) + +diff --git a/extensions/GNUmakefile.in b/extensions/GNUmakefile.in +index e71e3ff..adad4d6 100644 +--- a/extensions/GNUmakefile.in ++++ b/extensions/GNUmakefile.in +@@ -33,6 +33,7 @@ AM_VERBOSE_CXX = @echo " CXX " $@; + AM_VERBOSE_CXXLD = @echo " CXXLD " $@; + AM_VERBOSE_AR = @echo " AR " $@; + AM_VERBOSE_GEN = @echo " GEN " $@; ++AM_VERBOSE_NULL = @ + endif + + # +@@ -75,7 +76,7 @@ install: ${targets_install} + if test -n "${targets_install}"; then install -pm0755 $^ "${DESTDIR}${xtlibdir}/"; fi; + + clean: +- rm -f *.o *.oo *.so *.a {matches,targets}.man initext.c initext4.c initext6.c; ++ rm -f *.la *.o *.lo *.so *.a {matches,targets}.man initext.c initext4.c initext6.c; + rm -f .*.d .*.dd; + + distclean: clean +@@ -89,19 +90,22 @@ init%.o: init%.c + # + # Shared libraries + # +-lib%.so: lib%.oo +- ${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o $@ $< -L../libxtables/.libs -lxtables ${$*_LIBADD}; ++lib%.so: lib%.la ++ ${AM_VERBOSE_NULL} ln -fs .libs/$@ $@ + +-lib%.oo: ${srcdir}/lib%.c +- ${AM_VERBOSE_CC} ${CC} ${AM_CPPFLAGS} ${AM_DEPFLAGS} ${AM_CFLAGS} -D_INIT=lib$*_init -DPIC -fPIC ${CFLAGS} -o $@ -c $<; ++lib%.la: lib%.lo ++ ${AM_VERBOSE_CCLD} ../libtool ${AM_LIBTOOL_SILENT} --tag=CC --mode=link ${CCLD} ${AM_LDFLAGS} -module ${LDFLAGS} -o $@ $< ../libxtables/libxtables.la ${$*_LIBADD} -rpath ${xtlibdir} ++ ++lib%.lo: ${srcdir}/lib%.c ++ ${AM_VERBOSE_CC} ../libtool ${AM_LIBTOOL_SILENT} --tag=CC --mode=compile ${CC} ${AM_CPPFLAGS} ${AM_DEPFLAGS} ${AM_CFLAGS} -D_INIT=lib$*_init ${CFLAGS} -o $@ -c $< + + libxt_NOTRACK.so: libxt_CT.so +- ln -fs $< $@ ++ ${AM_VERBOSE_GEN} ln -fs $< $@ + libxt_state.so: libxt_conntrack.so +- ln -fs $< $@ ++ ${AM_VERBOSE_GEN} ln -fs $< $@ + + # Need the LIBADDs in iptables/Makefile.am too for libxtables_la_LIBADD +-ip6t_NETMAP_LIBADD = -lip6tc ++ip6t_NETMAP_LIBADD = ../libiptc/libip6tc.la + xt_RATEEST_LIBADD = -lm + xt_statistic_LIBADD = -lm + +-- +1.7.2.5 + diff --git a/meta/recipes-extended/iptables/iptables_1.4.16.3.bb b/meta/recipes-extended/iptables/iptables_1.4.16.3.bb deleted file mode 100644 index 448748b5b2..0000000000 --- a/meta/recipes-extended/iptables/iptables_1.4.16.3.bb +++ /dev/null @@ -1,39 +0,0 @@ -SUMMARY = "Tools for managing kernel packet filtering capabilities" -DESCRIPTION = "iptables is the userspace command line program used to configure and control network packet \ -filtering code in Linux." -HOMEPAGE = "http://www.netfilter.org/" -BUGTRACKER = "http://bugzilla.netfilter.org/" -LICENSE = "GPLv2+" -LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263\ - file://iptables/iptables.c;beginline=13;endline=25;md5=c5cffd09974558cf27d0f763df2a12dc" - -PR = "r0" - -RRECOMMENDS_${PN} = "kernel-module-x-tables \ - kernel-module-ip-tables \ - kernel-module-iptable-filter \ - kernel-module-iptable-nat \ - kernel-module-nf-defrag-ipv4 \ - kernel-module-nf-conntrack \ - kernel-module-nf-conntrack-ipv4 \ - kernel-module-nf-nat \ - kernel-module-ipt-masquerade" -FILES_${PN} =+ "${libdir}/xtables/ ${datadir}/xtables" -FILES_${PN}-dbg =+ "${libdir}/xtables/.debug" - -SRC_URI = "http://netfilter.org/projects/iptables/files/iptables-${PV}.tar.bz2 \ - file://types.h-add-defines-that-are-required-for-if_packet.patch" - -SRC_URI[md5sum] = "6dd40c12fb8f4c4312a0f8434369fbcd" -SRC_URI[sha256sum] = "643ccf34099d53d5b839e1d889c05627745a51ec122648e76a9fcec3a8a9ec79" - -inherit autotools - -EXTRA_OECONF = "--with-kernel=${STAGING_INCDIR} \ - ${@base_contains('DISTRO_FEATURES', 'ipv6', '', '--disable-ipv6', d)}" - -do_configure_prepend() { - # Remove some libtool m4 files - # Keep ax_check_linker_flags.m4 which belongs to autoconf-archive. - rm -f libtool.m4 lt~obsolete.m4 ltoptions.m4 ltsugar.m4 ltversion.m4 -} diff --git a/meta/recipes-extended/iptables/iptables_1.4.17.bb b/meta/recipes-extended/iptables/iptables_1.4.17.bb new file mode 100644 index 0000000000..f8ef7b6552 --- /dev/null +++ b/meta/recipes-extended/iptables/iptables_1.4.17.bb @@ -0,0 +1,40 @@ +SUMMARY = "Tools for managing kernel packet filtering capabilities" +DESCRIPTION = "iptables is the userspace command line program used to configure and control network packet \ +filtering code in Linux." +HOMEPAGE = "http://www.netfilter.org/" +BUGTRACKER = "http://bugzilla.netfilter.org/" +LICENSE = "GPLv2+" +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263\ + file://iptables/iptables.c;beginline=13;endline=25;md5=c5cffd09974558cf27d0f763df2a12dc" + +PR = "r0" + +RRECOMMENDS_${PN} = "kernel-module-x-tables \ + kernel-module-ip-tables \ + kernel-module-iptable-filter \ + kernel-module-iptable-nat \ + kernel-module-nf-defrag-ipv4 \ + kernel-module-nf-conntrack \ + kernel-module-nf-conntrack-ipv4 \ + kernel-module-nf-nat \ + kernel-module-ipt-masquerade" +FILES_${PN} =+ "${libdir}/xtables/ ${datadir}/xtables" +FILES_${PN}-dbg =+ "${libdir}/xtables/.debug" + +SRC_URI = "http://netfilter.org/projects/iptables/files/iptables-${PV}.tar.bz2 \ + file://types.h-add-defines-that-are-required-for-if_packet.patch \ + file://fix-link-failure-ip6t-NETMAP.patch \ + file://fix-iptables-extensions-build-error.patch" +SRC_URI[md5sum] = "c3fb2ffd5b39d0d54b06ccc4c8660116" +SRC_URI[sha256sum] = "51e7a769469383b6ad308a6a19cdd2bd813cf4593e21a156a543a1cd70554925" + +inherit autotools + +EXTRA_OECONF = "--with-kernel=${STAGING_INCDIR} \ + ${@base_contains('DISTRO_FEATURES', 'ipv6', '', '--disable-ipv6', d)}" + +do_configure_prepend() { + # Remove some libtool m4 files + # Keep ax_check_linker_flags.m4 which belongs to autoconf-archive. + rm -f libtool.m4 lt~obsolete.m4 ltoptions.m4 ltsugar.m4 ltversion.m4 +} -- cgit v1.2.3-54-g00ecf