From b5338c0b1eb805378112f46cee3a91699f618b5b Mon Sep 17 00:00:00 2001 From: Stephan Raue Date: Tue, 15 Jan 2013 22:59:45 +0100 Subject: [PATCH] iptables: update to iptables-1.4.17, dont use kernel include dir directly Signed-off-by: Stephan Raue --- packages/network/iptables/build | 7 +- packages/network/iptables/meta | 2 +- .../patches/iptables-1.4.17-link.patch | 84 +++++++++++++++++++ 3 files changed, 87 insertions(+), 6 deletions(-) create mode 100644 packages/network/iptables/patches/iptables-1.4.17-link.patch diff --git a/packages/network/iptables/build b/packages/network/iptables/build index 189aa263a0..d9a7117f47 100755 --- a/packages/network/iptables/build +++ b/packages/network/iptables/build @@ -24,9 +24,6 @@ cd $PKG_BUILD -# remove for building with linux-3.2 - rm -f include/linux/types.h - ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ --prefix=/usr \ @@ -34,8 +31,8 @@ cd $PKG_BUILD --localstatedir=/var \ --disable-static \ --enable-shared \ - --with-kernel="$(kernel_path)" \ + --with-kernel="$SYSROOT_PREFIX/usr" \ -make +make V=1 $MAKEINSTALL diff --git a/packages/network/iptables/meta b/packages/network/iptables/meta index 29ef4b728d..960cdd6e66 100644 --- a/packages/network/iptables/meta +++ b/packages/network/iptables/meta @@ -19,7 +19,7 @@ ################################################################################ PKG_NAME="iptables" -PKG_VERSION="1.4.16.3" +PKG_VERSION="1.4.17" PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="GPL" diff --git a/packages/network/iptables/patches/iptables-1.4.17-link.patch b/packages/network/iptables/patches/iptables-1.4.17-link.patch new file mode 100644 index 0000000000..9c68fc3ed1 --- /dev/null +++ b/packages/network/iptables/patches/iptables-1.4.17-link.patch @@ -0,0 +1,84 @@ +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. + +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 +