summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWaldemar Brodkorb <mail@waldemar-brodkorb.de>2012-01-12 10:59:50 +0100
committerWaldemar Brodkorb <mail@waldemar-brodkorb.de>2012-01-12 10:59:50 +0100
commit086708293c881c2d33e16fa4e328b082e9d7bfc7 (patch)
treecf5c736d68fdcc4d8af921f168293bcf5812535b
parent3759be713eb1f3812412b7c9eff3767944786a7d (diff)
update iproute2 to 3.2.0, add needed unshare support from buildroot for uClibc
-rw-r--r--package/iproute2/Makefile11
-rw-r--r--package/iproute2/patches/patch-Makefile17
-rw-r--r--package/iproute2/patches/patch-configure39
-rw-r--r--package/iproute2/patches/patch-tc_m_xt_c28
-rw-r--r--toolchain/uClibc/patches/uClibc-0.9.32.1-unshare.patch82
5 files changed, 104 insertions, 73 deletions
diff --git a/package/iproute2/Makefile b/package/iproute2/Makefile
index cd5b54a3f..e5469326d 100644
--- a/package/iproute2/Makefile
+++ b/package/iproute2/Makefile
@@ -4,13 +4,16 @@
include ${TOPDIR}/rules.mk
PKG_NAME:= iproute2
-PKG_VERSION:= 2.6.38
+PKG_VERSION:= 3.2.0
PKG_RELEASE:= 1
-PKG_MD5SUM:= a243bfea837e71824b7ca26c3bb45fa8
+PKG_MD5SUM:= 6f814291cc3d7f4312cf8c2c052da5f1
PKG_DESCR:= iproute2 routing control utility
PKG_SECTION:= route
+PKG_BUILDDEP:= iptables libnl linux-atm
PKG_URL:= http://www.linuxfoundation.org/en/Net:Iproute2
-PKG_SITES:= http://distfiles.gentoo.org/distfiles/
+PKG_SITES:= http://www.kernel.org/pub/linux/utils/net/iproute2/
+
+DISTFILES:= $(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SUBPKGS:= IP TC TC_ATM TC_IPT IFSTAT LNSTAT ROUTEL RTMON SS
PKGSD_TC:= iproute2 traffic control utility
@@ -28,8 +31,6 @@ PKGSD_ROUTEL:= iproute2 route list and flush utilities
PKGSD_RTMON:= iproute2 RTnetlink monitor
PKGSD_SS:= iproute2 socket statistics utility
-DISTFILES:= $(PKG_NAME)-$(PKG_VERSION).tar.bz2
-
include ${TOPDIR}/mk/package.mk
$(eval $(call PKG_template,IP,ip,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
diff --git a/package/iproute2/patches/patch-Makefile b/package/iproute2/patches/patch-Makefile
index d84ffa57b..b9e8a23f1 100644
--- a/package/iproute2/patches/patch-Makefile
+++ b/package/iproute2/patches/patch-Makefile
@@ -1,10 +1,5 @@
- - allow variables to be overridden
- - allow passing TARGET_CFLAGS
- overriding CCOPTS instead wont work, as this variable is being
- used to compile host-utils in netem/
- - define LIBUTIL for misc/ss to compile correctly
---- iproute2-2.6.37.orig/Makefile 2011-01-07 18:54:30.000000000 +0100
-+++ iproute2-2.6.37/Makefile 2011-01-18 02:19:41.379921947 +0100
+--- iproute2-3.2.0.orig/Makefile 2012-01-05 17:34:31.000000000 +0100
++++ iproute2-3.2.0/Makefile 2012-01-12 10:13:14.000000000 +0100
@@ -27,10 +27,10 @@ ADDLIB+=dnet_ntop.o dnet_pton.o
#options for ipx
ADDLIB+=ipx_ntop.o ipx_pton.o
@@ -19,12 +14,4 @@
+CFLAGS = $(CCOPTS) -I../include $(DEFINES) ${TARGET_CFLAGS}
YACCFLAGS = -d -t -v
- LDLIBS += -L../lib -lnetlink -lutil
-@@ -38,6 +38,7 @@ LDLIBS += -L../lib -lnetlink -lutil
SUBDIRS=lib ip tc misc netem genl
-
- LIBNETLINK=../lib/libnetlink.a ../lib/libutil.a
-+LIBUTIL=../lib/libutil.a
-
- all: Config
- @set -e; \
diff --git a/package/iproute2/patches/patch-configure b/package/iproute2/patches/patch-configure
index 13b8fc905..f54ba447b 100644
--- a/package/iproute2/patches/patch-configure
+++ b/package/iproute2/patches/patch-configure
@@ -4,67 +4,56 @@
(for now) doesn't compile iptables with shared objects
- do not discard compiler output from tests, they're useful
for debugging
- - additionally output the full compiler command before running
- it
---- iproute2-2.6.37.orig/configure 2011-01-07 18:54:30.000000000 +0100
-+++ iproute2-2.6.37/configure 2011-02-25 21:01:53.000000000 +0100
-@@ -1,4 +1,5 @@
- #! /bin/bash
-+set -x
- # This is not an autconf generated configure
- #
- INCLUDE=${1:-"$PWD/include"}
-@@ -15,7 +16,8 @@ int main(int argc, char **argv) {
+
+--- iproute2-3.2.0.orig/configure 2012-01-05 17:34:31.000000000 +0100
++++ iproute2-3.2.0/configure 2012-01-12 10:30:11.000000000 +0100
+@@ -13,7 +13,7 @@ int main(int argc, char **argv) {
return 0;
}
EOF
-gcc -I$INCLUDE -o /tmp/atmtest /tmp/atmtest.c -latm >/dev/null 2>&1
-+echo "$CC -I$INCLUDE -o /tmp/atmtest /tmp/atmtest.c -latm"
+$CC -I$INCLUDE -o /tmp/atmtest /tmp/atmtest.c -latm
if [ $? -eq 0 ]
then
echo "TC_CONFIG_ATM:=y" >>Config
-@@ -49,7 +51,8 @@ int main(int argc, char **argv)
+@@ -47,7 +47,7 @@ int main(int argc, char **argv)
EOF
--if gcc -I$INCLUDE $IPTC -o /tmp/ipttest /tmp/ipttest.c $IPTL -ldl -lxtables >/dev/null 2>&1
-+echo "$CC -I$INCLUDE $IPTC -o /tmp/ipttest /tmp/ipttest.c $IPTL -ldl -lxtables"
-+if $CC -I$INCLUDE $IPTC -o /tmp/ipttest /tmp/ipttest.c $IPTL -ldl -lxtables
+-if gcc -I$INCLUDE $IPTC -o /tmp/ipttest /tmp/ipttest.c $IPTL $(pkg-config xtables --cflags --libs) -ldl >/dev/null 2>&1
++if $CC -I$INCLUDE $IPTC -o /tmp/ipttest /tmp/ipttest.c $IPTL $(pkg-config xtables --cflags --libs) -ldl
then
echo "TC_CONFIG_XT:=y" >>Config
echo "using xtables"
-@@ -86,7 +89,8 @@ int main(int argc, char **argv) {
+@@ -84,7 +84,7 @@ int main(int argc, char **argv) {
}
EOF
-gcc -I$INCLUDE $IPTC -o /tmp/ipttest /tmp/ipttest.c $IPTL -ldl >/dev/null 2>&1
-+echo "$CC -I$INCLUDE $IPTC -o /tmp/ipttest /tmp/ipttest.c $IPTL -ldl"
+$CC -I$INCLUDE $IPTC -o /tmp/ipttest /tmp/ipttest.c $IPTL -ldl
if [ $? -eq 0 ]
then
-@@ -126,7 +130,8 @@ int main(int argc, char **argv) {
+@@ -124,7 +124,7 @@ int main(int argc, char **argv) {
}
EOF
-gcc -I$INCLUDE $IPTC -o /tmp/ipttest /tmp/ipttest.c $IPTL -ldl >/dev/null 2>&1
-+echo "$CC -I$INCLUDE $IPTC -o /tmp/ipttest /tmp/ipttest.c $IPTL -ldl"
+$CC -I$INCLUDE $IPTC -o /tmp/ipttest /tmp/ipttest.c $IPTL -ldl
if [ $? -eq 0 ]
then
-@@ -149,18 +154,8 @@ check_ipt()
+@@ -144,18 +144,8 @@ check_ipt()
check_ipt_lib_dir()
{
- IPT_LIB_DIR=""
- for dir in /lib /usr/lib /usr/local/lib
- do
-- for file in $dir/$TABLES/lib*t_*so ; do
+- for file in $dir/{xtables,iptables}/lib*t_*so ; do
- if [ -f $file ]; then
-- echo $dir/$TABLES
-- echo "IPT_LIB_DIR:=$dir/$TABLES" >> Config
+- echo ${file%/*}
+- echo "IPT_LIB_DIR:=${file%/*}" >> Config
- return
- fi
- done
@@ -74,4 +63,4 @@
+ echo "IPT_LIB_DIR:=/usr/lib/$TABLES" >> Config
}
- echo "# Generated config based on" $INCLUDE >Config
+ check_setns()
diff --git a/package/iproute2/patches/patch-tc_m_xt_c b/package/iproute2/patches/patch-tc_m_xt_c
deleted file mode 100644
index 8399e779a..000000000
--- a/package/iproute2/patches/patch-tc_m_xt_c
+++ /dev/null
@@ -1,28 +0,0 @@
---- iproute2-2.6.38.orig/tc/m_xt.c 2011-03-17 18:05:47.000000000 +0100
-+++ iproute2-2.6.38/tc/m_xt.c 2011-11-09 16:15:44.527071563 +0100
-@@ -162,7 +162,11 @@ static int parse_ipt(struct action_util
- return -1;
- }
- tcipt_globals.opts =
-- xtables_merge_options(tcipt_globals.opts,
-+ xtables_merge_options(
-+#if XTABLES_VERSION_CODE > 5
-+ tcipt_globals.orig_opts,
-+#endif
-+ tcipt_globals.opts,
- m->extra_opts,
- &m->option_offset);
- } else {
-@@ -307,7 +311,11 @@ print_ipt(struct action_util *au,FILE *
- }
-
- tcipt_globals.opts =
-- xtables_merge_options(tcipt_globals.opts,
-+ xtables_merge_options(
-+#if XTABLES_VERSION_CODE > 5
-+ tcipt_globals.orig_opts,
-+#endif
-+ tcipt_globals.opts,
- m->extra_opts,
- &m->option_offset);
- } else {
diff --git a/toolchain/uClibc/patches/uClibc-0.9.32.1-unshare.patch b/toolchain/uClibc/patches/uClibc-0.9.32.1-unshare.patch
new file mode 100644
index 000000000..5820e15bb
--- /dev/null
+++ b/toolchain/uClibc/patches/uClibc-0.9.32.1-unshare.patch
@@ -0,0 +1,82 @@
+Backport of unshare() syscall.
+From uClibc git 19dd090a0f68765db87990ef8eda9bf77bb29581
+
+Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
+
+---
+diff -Nura uClibc-0.9.32.orig/libc/sysdeps/linux/common/bits/sched.h uClibc-0.9.32/libc/sysdeps/linux/common/bits/sched.h
+--- uClibc-0.9.32.orig/libc/sysdeps/linux/common/bits/sched.h 2011-12-02 23:54:30.571841170 -0300
++++ uClibc-0.9.32/libc/sysdeps/linux/common/bits/sched.h 2011-12-02 23:57:45.874205079 -0300
+@@ -58,7 +58,13 @@
+ force CLONE_PTRACE on this clone. */
+ # define CLONE_CHILD_SETTID 0x01000000 /* Store TID in userlevel buffer in
+ the child. */
+-# define CLONE_STOPPED 0x02000000 /* Start in stopped state. */
++# define CLONE_STOPPED 0x02000000 /* Start in stopped state. */
++# define CLONE_NEWUTS 0x04000000 /* New utsname group. */
++# define CLONE_NEWIPC 0x08000000 /* New ipcs. */
++# define CLONE_NEWUSER 0x10000000 /* New user namespace. */
++# define CLONE_NEWPID 0x20000000 /* New pid namespace. */
++# define CLONE_NEWNET 0x40000000 /* New network namespace. */
++# define CLONE_IO 0x80000000 /* Clone I/O context. */
+ #endif
+
+ /* The official definition. */
+@@ -74,11 +80,9 @@
+ extern int clone (int (*__fn) (void *__arg), void *__child_stack,
+ int __flags, void *__arg, ...) __THROW;
+
+-#if 0
+ /* Unshare the specified resources. */
+ extern int unshare (int __flags) __THROW;
+ #endif
+-#endif
+
+ __END_DECLS
+
+diff -Nura uClibc-0.9.32.orig/libc/sysdeps/linux/common/Makefile.in uClibc-0.9.32/libc/sysdeps/linux/common/Makefile.in
+--- uClibc-0.9.32.orig/libc/sysdeps/linux/common/Makefile.in 2011-12-02 23:54:30.577841215 -0300
++++ uClibc-0.9.32/libc/sysdeps/linux/common/Makefile.in 2011-12-02 23:56:08.801527166 -0300
+@@ -24,7 +24,8 @@
+ remap_file_pages.c sched_getaffinity.c sched_setaffinity.c \
+ sendfile64.c sendfile.c setfsgid.c setfsuid.c setresuid.c \
+ splice.c vmsplice.c tee.c signalfd.c swapoff.c swapon.c \
+- sync_file_range.c sysctl.c sysinfo.c timerfd.c uselib.c vhangup.c
++ sync_file_range.c sysctl.c sysinfo.c timerfd.c unshare.c uselib.c \
++ vhangup.c
+ # NPTL needs these internally: madvise.c
+ CSRC-$(findstring y,$(UCLIBC_LINUX_SPECIFIC)$(UCLIBC_HAS_THREADS_NATIVE)) += madvise.c
+ ifeq ($(UCLIBC_HAS_THREADS_NATIVE),y)
+diff -Nura uClibc-0.9.32.orig/libc/sysdeps/linux/common/stubs.c uClibc-0.9.32/libc/sysdeps/linux/common/stubs.c
+--- uClibc-0.9.32.orig/libc/sysdeps/linux/common/stubs.c 2011-12-02 23:54:30.577841215 -0300
++++ uClibc-0.9.32/libc/sysdeps/linux/common/stubs.c 2011-12-02 23:58:18.803435042 -0300
+@@ -278,6 +278,10 @@
+ make_stub(umount2)
+ #endif
+
++#if !defined __NR_unshare && defined __UCLIBC_LINUX_SPECIFIC__
++make_stub(unshare)
++#endif
++
+ #ifndef __NR_utimensat
+ make_stub(futimens)
+ make_stub(utimensat)
+diff -Nura uClibc-0.9.32.orig/libc/sysdeps/linux/common/unshare.c uClibc-0.9.32/libc/sysdeps/linux/common/unshare.c
+--- uClibc-0.9.32.orig/libc/sysdeps/linux/common/unshare.c 1969-12-31 21:00:00.000000000 -0300
++++ uClibc-0.9.32/libc/sysdeps/linux/common/unshare.c 2011-12-02 23:58:42.693601880 -0300
+@@ -0,0 +1,15 @@
++/* vi: set sw=4 ts=4: */
++/*
++ * unshare() for uClibc
++ *
++ * Copyright (C) 2011 Henning Heinold <heinold@inf.fu-berlin.de>
++ *
++ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
++ */
++
++#include <sys/syscall.h>
++#include <sched.h>
++
++#if defined __NR_unshare
++_syscall1(int, unshare, int, flags)
++#endif