mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH] iproute2: version bump to 3.6.0 and fix configure script
@ 2012-11-23 14:02 Marc Kleine-Budde
  2012-11-23 15:34 ` Michael Olbrich
  0 siblings, 1 reply; 2+ messages in thread
From: Marc Kleine-Budde @ 2012-11-23 14:02 UTC (permalink / raw)
  To: ptxdist; +Cc: mol, Marc Kleine-Budde

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
 .../0001-remove-duplicate-limits.h.patch           |   28 -----
 patches/iproute2-2.6.39/0002-remove_arpd.diff      |   48 --------
 patches/iproute2-2.6.39/series                     |    2 -
 .../iproute2-3.6.0/0001-build-system-fixes.patch   |  122 ++++++++++++++++++++
 .../0002-tc-add-canid-ematch-to-ematch_map.patch   |   31 +++++
 patches/iproute2-3.6.0/series                      |    5 +
 rules/iproute2.in                                  |    1 +
 rules/iproute2.make                                |   33 +++---
 8 files changed, 174 insertions(+), 96 deletions(-)
 delete mode 100644 patches/iproute2-2.6.39/0001-remove-duplicate-limits.h.patch
 delete mode 100644 patches/iproute2-2.6.39/0002-remove_arpd.diff
 delete mode 100644 patches/iproute2-2.6.39/series
 create mode 100644 patches/iproute2-3.6.0/0001-build-system-fixes.patch
 create mode 100644 patches/iproute2-3.6.0/0002-tc-add-canid-ematch-to-ematch_map.patch
 create mode 100644 patches/iproute2-3.6.0/series

diff --git a/patches/iproute2-2.6.39/0001-remove-duplicate-limits.h.patch b/patches/iproute2-2.6.39/0001-remove-duplicate-limits.h.patch
deleted file mode 100644
index f668ed2..0000000
--- a/patches/iproute2-2.6.39/0001-remove-duplicate-limits.h.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From: Robert Schwebel <r.schwebel@pengutronix.de>
-Subject: [iproute2] remove duplicate header file
-
-This patch is already in upstream:
-
-From 52d6a850505d70a699fc89604986c45b0cd0c54e Mon Sep 17 00:00:00 2001
-From: Stephen Hemminger <stephen.hemminger@vyatta.com>
-Date: Fri, 27 Mar 2009 11:07:46 -0700
-Subject: [PATCH 03/23] remove duplicate limits.h
-
-Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
-
----
- tc/m_xt.c |    1 -
- 1 file changed, 1 deletion(-)
-
-Index: iproute2-2.6.39/tc/m_xt.c
-===================================================================
---- iproute2-2.6.39.orig/tc/m_xt.c
-+++ iproute2-2.6.39/tc/m_xt.c
-@@ -15,7 +15,6 @@
- #include <netinet/in.h>
- #include <arpa/inet.h>
- #include <net/if.h>
--#include <limits.h>
- #include <linux/netfilter.h>
- #include <linux/netfilter_ipv4/ip_tables.h>
- #include <xtables.h>
diff --git a/patches/iproute2-2.6.39/0002-remove_arpd.diff b/patches/iproute2-2.6.39/0002-remove_arpd.diff
deleted file mode 100644
index 1c2847b..0000000
--- a/patches/iproute2-2.6.39/0002-remove_arpd.diff
+++ /dev/null
@@ -1,48 +0,0 @@
-Subject: [iproute2] build system fixes
-From: Juergen Beisert <juergen@kreuzholzen.de>
-
-Build arpd only if the user has requested it.
-Add a mechanism to feed in CPPFLAGS for cross builds.
-
-Signed-off-by: Juergen Beisert <juergen@kreuzholzen.de>
-Signed-off-by: Jon Ringle <jon@ringle.org>
----
- Makefile      |    2 +-
- misc/Makefile |    6 +++++-
- 2 files changed, 6 insertions(+), 2 deletions(-)
-
-Jon Ringle: refreshed for iproute2-2.6.31
-
-Index: iproute2-2.6.39/misc/Makefile
-===================================================================
---- iproute2-2.6.39.orig/misc/Makefile
-+++ iproute2-2.6.39/misc/Makefile
-@@ -1,10 +1,14 @@
- SSOBJ=ss.o ssfilter.o
- LNSTATOBJ=lnstat.o lnstat_util.o
- 
--TARGETS=ss nstat ifstat rtacct arpd lnstat
-+TARGETS=ss nstat ifstat rtacct lnstat
- 
- include ../Config
- 
-+ifdef BUILD_ARPD
-+TARGETS += arpd
-+endif
-+
- all: $(TARGETS)
- 
- ss: $(SSOBJ) $(LIBUTIL)
-Index: iproute2-2.6.39/Makefile
-===================================================================
---- iproute2-2.6.39.orig/Makefile
-+++ iproute2-2.6.39/Makefile
-@@ -30,7 +30,7 @@ ADDLIB+=ipx_ntop.o ipx_pton.o
- CC = gcc
- HOSTCC = gcc
- CCOPTS = -D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall
--CFLAGS = $(CCOPTS) -I../include $(DEFINES)
-+CFLAGS = $(CROSS_CPPFLAGS) $(CCOPTS) -I../include $(DEFINES)
- YACCFLAGS = -d -t -v
- 
- SUBDIRS=lib ip tc misc netem genl
diff --git a/patches/iproute2-2.6.39/series b/patches/iproute2-2.6.39/series
deleted file mode 100644
index 94ffa3a..0000000
--- a/patches/iproute2-2.6.39/series
+++ /dev/null
@@ -1,2 +0,0 @@
-0001-remove-duplicate-limits.h.patch
-0002-remove_arpd.diff
diff --git a/patches/iproute2-3.6.0/0001-build-system-fixes.patch b/patches/iproute2-3.6.0/0001-build-system-fixes.patch
new file mode 100644
index 0000000..b37afaf
--- /dev/null
+++ b/patches/iproute2-3.6.0/0001-build-system-fixes.patch
@@ -0,0 +1,122 @@
+From: Juergen Beisert <juergen@kreuzholzen.de>
+Date: Thu, 22 Nov 2012 19:15:46 +0100
+Subject: [PATCH] build system fixes
+
+Build arpd only if the user has requested it.  Add a mechanism to feed in
+CPPFLAGS for cross builds.
+
+Signed-off-by: Juergen Beisert <juergen@kreuzholzen.de>
+Signed-off-by: Jon Ringle <jon@ringle.org>
+Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
+---
+ Makefile      |    2 +-
+ configure     |   15 ++++++++-------
+ misc/Makefile |    6 +++++-
+ 3 files changed, 14 insertions(+), 9 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 917862b..c318eee 100644
+--- a/Makefile
++++ b/Makefile
+@@ -35,7 +35,7 @@ HOSTCC = gcc
+ DEFINES += -D_GNU_SOURCE
+ CCOPTS = -O2
+ WFLAGS = -Wall -Wstrict-prototypes
+-CFLAGS = $(WFLAGS) $(CCOPTS) -I../include $(DEFINES)
++CFLAGS += $(CPPFLAGS) $(WFLAGS) $(CCOPTS) -I../include $(DEFINES)
+ YACCFLAGS = -d -t -v
+ 
+ SUBDIRS=lib ip tc bridge misc netem genl man
+diff --git a/configure b/configure
+index 2c2d1c4..b7e47b1 100755
+--- a/configure
++++ b/configure
+@@ -2,6 +2,7 @@
+ # This is not an autconf generated configure
+ #
+ INCLUDE=${1:-"$PWD/include"}
++CC=${CC:-gcc}
+ 
+ # Make a temp directory in build tree.
+ TMPDIR=$(mktemp -d config.XXXXXX)
+@@ -17,7 +18,7 @@ int main(int argc, char **argv) {
+ 	return 0;
+ }
+ EOF
+-gcc -I$INCLUDE -o $TMPDIR/atmtest $TMPDIR/atmtest.c -latm >/dev/null 2>&1 
++$CC -I$INCLUDE -o $TMPDIR/atmtest $TMPDIR/atmtest.c -latm >/dev/null 2>&1
+ if [ $? -eq 0 ]
+ then
+     echo "TC_CONFIG_ATM:=y" >>Config
+@@ -51,7 +52,7 @@ int main(int argc, char **argv)
+ 
+ EOF
+ 
+-if gcc -I$INCLUDE $IPTC -o $TMPDIR/ipttest $TMPDIR/ipttest.c $IPTL $(pkg-config xtables --cflags --libs) -ldl >/dev/null 2>&1
++if $CC -I$INCLUDE $IPTC -o $TMPDIR/ipttest $TMPDIR/ipttest.c $IPTL $(pkg-config xtables --cflags --libs) -ldl >/dev/null 2>&1
+ then
+ 	echo "TC_CONFIG_XT:=y" >>Config
+ 	echo "using xtables"
+@@ -88,7 +89,7 @@ int main(int argc, char **argv) {
+ }
+ 
+ EOF
+-gcc -I$INCLUDE $IPTC -o $TMPDIR/ipttest $TMPDIR/ipttest.c $IPTL -ldl >/dev/null 2>&1
++$CC -I$INCLUDE $IPTC -o $TMPDIR/ipttest $TMPDIR/ipttest.c $IPTL -ldl >/dev/null 2>&1
+ 
+ if [ $? -eq 0 ]
+ then
+@@ -128,7 +129,7 @@ int main(int argc, char **argv) {
+ }
+ 
+ EOF
+-gcc -I$INCLUDE $IPTC -o $TMPDIR/ipttest $TMPDIR/ipttest.c $IPTL -ldl >/dev/null 2>&1
++$CC -I$INCLUDE $IPTC -o $TMPDIR/ipttest $TMPDIR/ipttest.c $IPTL -ldl >/dev/null 2>&1
+ 
+ if [ $? -eq 0 ]
+ then
+@@ -172,13 +173,13 @@ check_setns()
+ {
+ cat >$TMPDIR/setnstest.c <<EOF
+ #include <sched.h>
+-int main(int argc, char **argv) 
++int main(int argc, char **argv)
+ {
+ 	(void)setns(0,0);
+ 	return 0;
+ }
+ EOF
+-gcc -I$INCLUDE -o $TMPDIR/setnstest $TMPDIR/setnstest.c >/dev/null 2>&1
++$CC -I$INCLUDE -o $TMPDIR/setnstest $TMPDIR/setnstest.c >/dev/null 2>&1
+ if [ $? -eq 0 ]
+ then
+ 	echo "IP_CONFIG_SETNS:=y" >>Config
+@@ -210,7 +211,7 @@ int main(void)
+ #endif
+ EOF
+ 
+-if gcc -I$INCLUDE -o $TMPDIR/ipsettest $TMPDIR/ipsettest.c >/dev/null 2>&1
++if $CC -I$INCLUDE -o $TMPDIR/ipsettest $TMPDIR/ipsettest.c >/dev/null 2>&1
+ then
+ 	echo "TC_CONFIG_IPSET:=y" >>Config
+ 	echo "yes"
+diff --git a/misc/Makefile b/misc/Makefile
+index a59ff87..4e65239 100644
+--- a/misc/Makefile
++++ b/misc/Makefile
+@@ -1,10 +1,14 @@
+ SSOBJ=ss.o ssfilter.o
+ LNSTATOBJ=lnstat.o lnstat_util.o
+ 
+-TARGETS=ss nstat ifstat rtacct arpd lnstat
++TARGETS=ss nstat ifstat rtacct lnstat
+ 
+ include ../Config
+ 
++ifdef BUILD_ARPD
++TARGETS += arpd
++endif
++
+ all: $(TARGETS)
+ 
+ ss: $(SSOBJ)
diff --git a/patches/iproute2-3.6.0/0002-tc-add-canid-ematch-to-ematch_map.patch b/patches/iproute2-3.6.0/0002-tc-add-canid-ematch-to-ematch_map.patch
new file mode 100644
index 0000000..90a9ffd
--- /dev/null
+++ b/patches/iproute2-3.6.0/0002-tc-add-canid-ematch-to-ematch_map.patch
@@ -0,0 +1,31 @@
+From: Rostislav Lisovy <lisovy@gmail.com>
+Date: Mon, 20 Aug 2012 13:11:55 -0700
+Subject: [PATCH] tc: add canid ematch to ematch_map
+
+The canid ematch has been added in commit:
+
+7b5f30e Ematch used to classify CAN frames according to their identifiers
+
+But the corresponding entry in etc/iproute2/ematch_map was lost. This patch
+adds the missing entry in ematch_map, otherweise tc would complain:
+
+Error: Unable to find ematch "canid" in /etc/iproute2/ematch_map
+Please assign a unique ID to the ematch kind the suggested entry is:
+        7       canid
+
+Signed-off-by: Rostislav Lisovy <lisovy@gmail.com>
+Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
+---
+ etc/iproute2/ematch_map |    1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/etc/iproute2/ematch_map b/etc/iproute2/ematch_map
+index 69b007d..1823983 100644
+--- a/etc/iproute2/ematch_map
++++ b/etc/iproute2/ematch_map
+@@ -3,4 +3,5 @@
+ 2	nbyte
+ 3	u32
+ 4	meta
++7	canid
+ 8	ipset
diff --git a/patches/iproute2-3.6.0/series b/patches/iproute2-3.6.0/series
new file mode 100644
index 0000000..e267881
--- /dev/null
+++ b/patches/iproute2-3.6.0/series
@@ -0,0 +1,5 @@
+# generated by git-ptx-patches
+#tag:base --start-number 1
+0001-build-system-fixes.patch
+0002-tc-add-canid-ematch-to-ematch_map.patch
+# c2a294869d137e56818c6926b847bf3b  - git-ptx-patches magic
diff --git a/rules/iproute2.in b/rules/iproute2.in
index 08589ab..b7116c0 100644
--- a/rules/iproute2.in
+++ b/rules/iproute2.in
@@ -9,6 +9,7 @@ menuconfig IPROUTE2
 	select LIBC_RESOLV
 	select LIBC_PTHREAD if IPROUTE2_ARPD
 	select GCCLIBS_GCC_S if IPROUTE2_IP || IPROUTE2_TC
+	select IPTABLES if BUILDTIME
 	help
 	  Networking and traffic control tools
 
diff --git a/rules/iproute2.make b/rules/iproute2.make
index b9c0080..fa51613 100644
--- a/rules/iproute2.make
+++ b/rules/iproute2.make
@@ -2,6 +2,7 @@
 #
 # Copyright (C) 2006 by Erwin Rol
 # Copyright (C) 2009 by Robert Schwebel/Juergen Beisert
+# Copyright (C) 2012 by Marc Kleine-Budde <mkl@pengutronix.de>
 #
 # See CREDITS for details about who has contributed to this project.
 #
@@ -17,12 +18,13 @@ PACKAGES-$(PTXCONF_IPROUTE2) += iproute2
 #
 # Paths and names
 #
-IPROUTE2_VERSION	:= 2.6.39
-IPROUTE2_MD5		:= 8a3b6bc77c2ecf752284aa4a6fc630a6
+IPROUTE2_VERSION	:= 3.6.0
+IPROUTE2_MD5		:= a19e30c8e0099d3197414c96bea6d6f8
 IPROUTE2		:= iproute2-$(IPROUTE2_VERSION)
-IPROUTE2_SUFFIX		:= tar.gz
+IPROUTE2_SUFFIX		:= tar.xz
 IPROUTE2_URL		:= \
-	http://www.linuxgrill.com/anonymous/iproute2/NEW-OSDL/$(IPROUTE2).$(IPROUTE2_SUFFIX)
+	http://kernel.org/pub/linux/utils/net/iproute2/$(IPROUTE2).$(IPROUTE2_SUFFIX) \
+	http://devresources.linuxfoundation.org/dev/iproute2/download/$(IPROUTE2).$(IPROUTE2_SUFFIX)
 IPROUTE2_SOURCE		:= $(SRCDIR)/$(IPROUTE2).$(IPROUTE2_SUFFIX)
 IPROUTE2_DIR		:= $(BUILDDIR)/$(IPROUTE2)
 IPROUTE2_LICENSE	:= GPLv2
@@ -31,21 +33,16 @@ IPROUTE2_LICENSE	:= GPLv2
 # Prepare
 # ----------------------------------------------------------------------------
 
-IPROUTE2_PATH	:= PATH=$(CROSS_PATH)
-IPROUTE2_ENV 	:= $(CROSS_ENV)
-IPROUTE2_MAKEVARS := \
-	CC=$(PTXCONF_GNU_TARGET)-gcc \
-	CROSS_CPPFLAGS='$(CROSS_CPPFLAGS) -g' \
-	LDFLAGS='$(CROSS_LDFLAGS) -g -rdynamic' \
-	DBM_INCLUDE=$(SYSROOT)/usr/include
+IPROUTE2_MAKE_ENV := \
+	$(CROSS_ENV) \
+	ROOTDIR="$(PTXDIST_SYSROOT_TARGET)"
 
-$(STATEDIR)/iproute2.prepare:
-	@$(call targetinfo)
-	@touch $(IPROUTE2_DIR)/Config
-ifdef PTXCONF_IPROUTE2_ARPD
-	@echo BUILD_ARPD=y >> $(IPROUTE2_DIR)/Config
-endif
-	@$(call touch)
+IPROUTE2_MAKE_OPT := \
+	CC=$(PTXCONF_GNU_TARGET)-gcc
+
+# IPROUTE2_CONF_OPT is supposed to be empty
+IPROUTE2_CONF_OPT := ''
+IPROUTE2_CONF_TOOL := autoconf
 
 # ----------------------------------------------------------------------------
 # Target-Install
-- 
1.7.10.4


-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [ptxdist] [PATCH] iproute2: version bump to 3.6.0 and fix configure script
  2012-11-23 14:02 [ptxdist] [PATCH] iproute2: version bump to 3.6.0 and fix configure script Marc Kleine-Budde
@ 2012-11-23 15:34 ` Michael Olbrich
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Olbrich @ 2012-11-23 15:34 UTC (permalink / raw)
  To: ptxdist

On Fri, Nov 23, 2012 at 03:02:40PM +0100, Marc Kleine-Budde wrote:
> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
> ---
>  .../0001-remove-duplicate-limits.h.patch           |   28 -----
>  patches/iproute2-2.6.39/0002-remove_arpd.diff      |   48 --------
>  patches/iproute2-2.6.39/series                     |    2 -
>  .../iproute2-3.6.0/0001-build-system-fixes.patch   |  122 ++++++++++++++++++++
>  .../0002-tc-add-canid-ematch-to-ematch_map.patch   |   31 +++++
>  patches/iproute2-3.6.0/series                      |    5 +
>  rules/iproute2.in                                  |    1 +
>  rules/iproute2.make                                |   33 +++---
>  8 files changed, 174 insertions(+), 96 deletions(-)
>  delete mode 100644 patches/iproute2-2.6.39/0001-remove-duplicate-limits.h.patch
>  delete mode 100644 patches/iproute2-2.6.39/0002-remove_arpd.diff
>  delete mode 100644 patches/iproute2-2.6.39/series
>  create mode 100644 patches/iproute2-3.6.0/0001-build-system-fixes.patch
>  create mode 100644 patches/iproute2-3.6.0/0002-tc-add-canid-ematch-to-ematch_map.patch
>  create mode 100644 patches/iproute2-3.6.0/series
> 
> diff --git a/patches/iproute2-2.6.39/0001-remove-duplicate-limits.h.patch b/patches/iproute2-2.6.39/0001-remove-duplicate-limits.h.patch
> deleted file mode 100644
> index f668ed2..0000000
> --- a/patches/iproute2-2.6.39/0001-remove-duplicate-limits.h.patch
> +++ /dev/null
> @@ -1,28 +0,0 @@
> -From: Robert Schwebel <r.schwebel@pengutronix.de>
> -Subject: [iproute2] remove duplicate header file
> -
> -This patch is already in upstream:
> -
> -From 52d6a850505d70a699fc89604986c45b0cd0c54e Mon Sep 17 00:00:00 2001
> -From: Stephen Hemminger <stephen.hemminger@vyatta.com>
> -Date: Fri, 27 Mar 2009 11:07:46 -0700
> -Subject: [PATCH 03/23] remove duplicate limits.h
> -
> -Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
> -
> ----
> - tc/m_xt.c |    1 -
> - 1 file changed, 1 deletion(-)
> -
> -Index: iproute2-2.6.39/tc/m_xt.c
> -===================================================================
> ---- iproute2-2.6.39.orig/tc/m_xt.c
> -+++ iproute2-2.6.39/tc/m_xt.c
> -@@ -15,7 +15,6 @@
> - #include <netinet/in.h>
> - #include <arpa/inet.h>
> - #include <net/if.h>
> --#include <limits.h>
> - #include <linux/netfilter.h>
> - #include <linux/netfilter_ipv4/ip_tables.h>
> - #include <xtables.h>
> diff --git a/patches/iproute2-2.6.39/0002-remove_arpd.diff b/patches/iproute2-2.6.39/0002-remove_arpd.diff
> deleted file mode 100644
> index 1c2847b..0000000
> --- a/patches/iproute2-2.6.39/0002-remove_arpd.diff
> +++ /dev/null
> @@ -1,48 +0,0 @@
> -Subject: [iproute2] build system fixes
> -From: Juergen Beisert <juergen@kreuzholzen.de>
> -
> -Build arpd only if the user has requested it.
> -Add a mechanism to feed in CPPFLAGS for cross builds.
> -
> -Signed-off-by: Juergen Beisert <juergen@kreuzholzen.de>
> -Signed-off-by: Jon Ringle <jon@ringle.org>
> ----
> - Makefile      |    2 +-
> - misc/Makefile |    6 +++++-
> - 2 files changed, 6 insertions(+), 2 deletions(-)
> -
> -Jon Ringle: refreshed for iproute2-2.6.31
> -
> -Index: iproute2-2.6.39/misc/Makefile
> -===================================================================
> ---- iproute2-2.6.39.orig/misc/Makefile
> -+++ iproute2-2.6.39/misc/Makefile
> -@@ -1,10 +1,14 @@
> - SSOBJ=ss.o ssfilter.o
> - LNSTATOBJ=lnstat.o lnstat_util.o
> - 
> --TARGETS=ss nstat ifstat rtacct arpd lnstat
> -+TARGETS=ss nstat ifstat rtacct lnstat
> - 
> - include ../Config
> - 
> -+ifdef BUILD_ARPD
> -+TARGETS += arpd
> -+endif
> -+
> - all: $(TARGETS)
> - 
> - ss: $(SSOBJ) $(LIBUTIL)
> -Index: iproute2-2.6.39/Makefile
> -===================================================================
> ---- iproute2-2.6.39.orig/Makefile
> -+++ iproute2-2.6.39/Makefile
> -@@ -30,7 +30,7 @@ ADDLIB+=ipx_ntop.o ipx_pton.o
> - CC = gcc
> - HOSTCC = gcc
> - CCOPTS = -D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall
> --CFLAGS = $(CCOPTS) -I../include $(DEFINES)
> -+CFLAGS = $(CROSS_CPPFLAGS) $(CCOPTS) -I../include $(DEFINES)
> - YACCFLAGS = -d -t -v
> - 
> - SUBDIRS=lib ip tc misc netem genl
> diff --git a/patches/iproute2-2.6.39/series b/patches/iproute2-2.6.39/series
> deleted file mode 100644
> index 94ffa3a..0000000
> --- a/patches/iproute2-2.6.39/series
> +++ /dev/null
> @@ -1,2 +0,0 @@
> -0001-remove-duplicate-limits.h.patch
> -0002-remove_arpd.diff
> diff --git a/patches/iproute2-3.6.0/0001-build-system-fixes.patch b/patches/iproute2-3.6.0/0001-build-system-fixes.patch
> new file mode 100644
> index 0000000..b37afaf
> --- /dev/null
> +++ b/patches/iproute2-3.6.0/0001-build-system-fixes.patch
> @@ -0,0 +1,122 @@
> +From: Juergen Beisert <juergen@kreuzholzen.de>
> +Date: Thu, 22 Nov 2012 19:15:46 +0100
> +Subject: [PATCH] build system fixes
> +
> +Build arpd only if the user has requested it.  Add a mechanism to feed in
> +CPPFLAGS for cross builds.
> +
> +Signed-off-by: Juergen Beisert <juergen@kreuzholzen.de>
> +Signed-off-by: Jon Ringle <jon@ringle.org>
> +Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
> +---
> + Makefile      |    2 +-
> + configure     |   15 ++++++++-------
> + misc/Makefile |    6 +++++-
> + 3 files changed, 14 insertions(+), 9 deletions(-)
> +
> +diff --git a/Makefile b/Makefile
> +index 917862b..c318eee 100644
> +--- a/Makefile
> ++++ b/Makefile
> +@@ -35,7 +35,7 @@ HOSTCC = gcc
> + DEFINES += -D_GNU_SOURCE
> + CCOPTS = -O2
> + WFLAGS = -Wall -Wstrict-prototypes
> +-CFLAGS = $(WFLAGS) $(CCOPTS) -I../include $(DEFINES)
> ++CFLAGS += $(CPPFLAGS) $(WFLAGS) $(CCOPTS) -I../include $(DEFINES)
> + YACCFLAGS = -d -t -v
> + 
> + SUBDIRS=lib ip tc bridge misc netem genl man
> +diff --git a/configure b/configure
> +index 2c2d1c4..b7e47b1 100755
> +--- a/configure
> ++++ b/configure
> +@@ -2,6 +2,7 @@
> + # This is not an autconf generated configure
> + #
> + INCLUDE=${1:-"$PWD/include"}
> ++CC=${CC:-gcc}
> + 
> + # Make a temp directory in build tree.
> + TMPDIR=$(mktemp -d config.XXXXXX)
> +@@ -17,7 +18,7 @@ int main(int argc, char **argv) {
> + 	return 0;
> + }
> + EOF
> +-gcc -I$INCLUDE -o $TMPDIR/atmtest $TMPDIR/atmtest.c -latm >/dev/null 2>&1 
> ++$CC -I$INCLUDE -o $TMPDIR/atmtest $TMPDIR/atmtest.c -latm >/dev/null 2>&1
> + if [ $? -eq 0 ]
> + then
> +     echo "TC_CONFIG_ATM:=y" >>Config
> +@@ -51,7 +52,7 @@ int main(int argc, char **argv)
> + 
> + EOF
> + 
> +-if gcc -I$INCLUDE $IPTC -o $TMPDIR/ipttest $TMPDIR/ipttest.c $IPTL $(pkg-config xtables --cflags --libs) -ldl >/dev/null 2>&1
> ++if $CC -I$INCLUDE $IPTC -o $TMPDIR/ipttest $TMPDIR/ipttest.c $IPTL $(pkg-config xtables --cflags --libs) -ldl >/dev/null 2>&1
> + then
> + 	echo "TC_CONFIG_XT:=y" >>Config
> + 	echo "using xtables"
> +@@ -88,7 +89,7 @@ int main(int argc, char **argv) {
> + }
> + 
> + EOF
> +-gcc -I$INCLUDE $IPTC -o $TMPDIR/ipttest $TMPDIR/ipttest.c $IPTL -ldl >/dev/null 2>&1
> ++$CC -I$INCLUDE $IPTC -o $TMPDIR/ipttest $TMPDIR/ipttest.c $IPTL -ldl >/dev/null 2>&1
> + 
> + if [ $? -eq 0 ]
> + then
> +@@ -128,7 +129,7 @@ int main(int argc, char **argv) {
> + }
> + 
> + EOF
> +-gcc -I$INCLUDE $IPTC -o $TMPDIR/ipttest $TMPDIR/ipttest.c $IPTL -ldl >/dev/null 2>&1
> ++$CC -I$INCLUDE $IPTC -o $TMPDIR/ipttest $TMPDIR/ipttest.c $IPTL -ldl >/dev/null 2>&1
> + 
> + if [ $? -eq 0 ]
> + then
> +@@ -172,13 +173,13 @@ check_setns()
> + {
> + cat >$TMPDIR/setnstest.c <<EOF
> + #include <sched.h>
> +-int main(int argc, char **argv) 
> ++int main(int argc, char **argv)
> + {
> + 	(void)setns(0,0);
> + 	return 0;
> + }
> + EOF
> +-gcc -I$INCLUDE -o $TMPDIR/setnstest $TMPDIR/setnstest.c >/dev/null 2>&1
> ++$CC -I$INCLUDE -o $TMPDIR/setnstest $TMPDIR/setnstest.c >/dev/null 2>&1
> + if [ $? -eq 0 ]
> + then
> + 	echo "IP_CONFIG_SETNS:=y" >>Config
> +@@ -210,7 +211,7 @@ int main(void)
> + #endif
> + EOF
> + 
> +-if gcc -I$INCLUDE -o $TMPDIR/ipsettest $TMPDIR/ipsettest.c >/dev/null 2>&1
> ++if $CC -I$INCLUDE -o $TMPDIR/ipsettest $TMPDIR/ipsettest.c >/dev/null 2>&1
> + then
> + 	echo "TC_CONFIG_IPSET:=y" >>Config
> + 	echo "yes"
> +diff --git a/misc/Makefile b/misc/Makefile
> +index a59ff87..4e65239 100644
> +--- a/misc/Makefile
> ++++ b/misc/Makefile
> +@@ -1,10 +1,14 @@
> + SSOBJ=ss.o ssfilter.o
> + LNSTATOBJ=lnstat.o lnstat_util.o
> + 
> +-TARGETS=ss nstat ifstat rtacct arpd lnstat
> ++TARGETS=ss nstat ifstat rtacct lnstat
> + 
> + include ../Config
> + 
> ++ifdef BUILD_ARPD
> ++TARGETS += arpd
> ++endif

This is never set, resulting in:

No suitable file '/sbin/arpd' could be found in any of these locations:
[...]

> ++
> + all: $(TARGETS)
> + 
> + ss: $(SSOBJ)
> diff --git a/patches/iproute2-3.6.0/0002-tc-add-canid-ematch-to-ematch_map.patch b/patches/iproute2-3.6.0/0002-tc-add-canid-ematch-to-ematch_map.patch
> new file mode 100644
> index 0000000..90a9ffd
> --- /dev/null
> +++ b/patches/iproute2-3.6.0/0002-tc-add-canid-ematch-to-ematch_map.patch
> @@ -0,0 +1,31 @@
> +From: Rostislav Lisovy <lisovy@gmail.com>
> +Date: Mon, 20 Aug 2012 13:11:55 -0700
> +Subject: [PATCH] tc: add canid ematch to ematch_map
> +
> +The canid ematch has been added in commit:
> +
> +7b5f30e Ematch used to classify CAN frames according to their identifiers
> +
> +But the corresponding entry in etc/iproute2/ematch_map was lost. This patch
> +adds the missing entry in ematch_map, otherweise tc would complain:
> +
> +Error: Unable to find ematch "canid" in /etc/iproute2/ematch_map
> +Please assign a unique ID to the ematch kind the suggested entry is:
> +        7       canid
> +
> +Signed-off-by: Rostislav Lisovy <lisovy@gmail.com>
> +Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
> +---
> + etc/iproute2/ematch_map |    1 +
> + 1 file changed, 1 insertion(+)
> +
> +diff --git a/etc/iproute2/ematch_map b/etc/iproute2/ematch_map
> +index 69b007d..1823983 100644
> +--- a/etc/iproute2/ematch_map
> ++++ b/etc/iproute2/ematch_map
> +@@ -3,4 +3,5 @@
> + 2	nbyte
> + 3	u32
> + 4	meta
> ++7	canid
> + 8	ipset
> diff --git a/patches/iproute2-3.6.0/series b/patches/iproute2-3.6.0/series
> new file mode 100644
> index 0000000..e267881
> --- /dev/null
> +++ b/patches/iproute2-3.6.0/series
> @@ -0,0 +1,5 @@
> +# generated by git-ptx-patches
> +#tag:base --start-number 1
> +0001-build-system-fixes.patch
> +0002-tc-add-canid-ematch-to-ematch_map.patch
> +# c2a294869d137e56818c6926b847bf3b  - git-ptx-patches magic
> diff --git a/rules/iproute2.in b/rules/iproute2.in
> index 08589ab..b7116c0 100644
> --- a/rules/iproute2.in
> +++ b/rules/iproute2.in
> @@ -9,6 +9,7 @@ menuconfig IPROUTE2
>  	select LIBC_RESOLV
>  	select LIBC_PTHREAD if IPROUTE2_ARPD
>  	select GCCLIBS_GCC_S if IPROUTE2_IP || IPROUTE2_TC
> +	select IPTABLES if BUILDTIME

Why? Should /usr/lib/tc/m_xt.so not be installed?
Also, this should really be optional.

Michael

>  	help
>  	  Networking and traffic control tools
>  
> diff --git a/rules/iproute2.make b/rules/iproute2.make
> index b9c0080..fa51613 100644
> --- a/rules/iproute2.make
> +++ b/rules/iproute2.make
> @@ -2,6 +2,7 @@
>  #
>  # Copyright (C) 2006 by Erwin Rol
>  # Copyright (C) 2009 by Robert Schwebel/Juergen Beisert
> +# Copyright (C) 2012 by Marc Kleine-Budde <mkl@pengutronix.de>
>  #
>  # See CREDITS for details about who has contributed to this project.
>  #
> @@ -17,12 +18,13 @@ PACKAGES-$(PTXCONF_IPROUTE2) += iproute2
>  #
>  # Paths and names
>  #
> -IPROUTE2_VERSION	:= 2.6.39
> -IPROUTE2_MD5		:= 8a3b6bc77c2ecf752284aa4a6fc630a6
> +IPROUTE2_VERSION	:= 3.6.0
> +IPROUTE2_MD5		:= a19e30c8e0099d3197414c96bea6d6f8
>  IPROUTE2		:= iproute2-$(IPROUTE2_VERSION)
> -IPROUTE2_SUFFIX		:= tar.gz
> +IPROUTE2_SUFFIX		:= tar.xz
>  IPROUTE2_URL		:= \
> -	http://www.linuxgrill.com/anonymous/iproute2/NEW-OSDL/$(IPROUTE2).$(IPROUTE2_SUFFIX)
> +	http://kernel.org/pub/linux/utils/net/iproute2/$(IPROUTE2).$(IPROUTE2_SUFFIX) \
> +	http://devresources.linuxfoundation.org/dev/iproute2/download/$(IPROUTE2).$(IPROUTE2_SUFFIX)
>  IPROUTE2_SOURCE		:= $(SRCDIR)/$(IPROUTE2).$(IPROUTE2_SUFFIX)
>  IPROUTE2_DIR		:= $(BUILDDIR)/$(IPROUTE2)
>  IPROUTE2_LICENSE	:= GPLv2
> @@ -31,21 +33,16 @@ IPROUTE2_LICENSE	:= GPLv2
>  # Prepare
>  # ----------------------------------------------------------------------------
>  
> -IPROUTE2_PATH	:= PATH=$(CROSS_PATH)
> -IPROUTE2_ENV 	:= $(CROSS_ENV)
> -IPROUTE2_MAKEVARS := \
> -	CC=$(PTXCONF_GNU_TARGET)-gcc \
> -	CROSS_CPPFLAGS='$(CROSS_CPPFLAGS) -g' \
> -	LDFLAGS='$(CROSS_LDFLAGS) -g -rdynamic' \
> -	DBM_INCLUDE=$(SYSROOT)/usr/include
> +IPROUTE2_MAKE_ENV := \
> +	$(CROSS_ENV) \
> +	ROOTDIR="$(PTXDIST_SYSROOT_TARGET)"
>  
> -$(STATEDIR)/iproute2.prepare:
> -	@$(call targetinfo)
> -	@touch $(IPROUTE2_DIR)/Config
> -ifdef PTXCONF_IPROUTE2_ARPD
> -	@echo BUILD_ARPD=y >> $(IPROUTE2_DIR)/Config
> -endif
> -	@$(call touch)
> +IPROUTE2_MAKE_OPT := \
> +	CC=$(PTXCONF_GNU_TARGET)-gcc
> +
> +# IPROUTE2_CONF_OPT is supposed to be empty
> +IPROUTE2_CONF_OPT := ''
> +IPROUTE2_CONF_TOOL := autoconf
>  
>  # ----------------------------------------------------------------------------
>  # Target-Install
> -- 
> 1.7.10.4
> 
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-11-23 15:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-23 14:02 [ptxdist] [PATCH] iproute2: version bump to 3.6.0 and fix configure script Marc Kleine-Budde
2012-11-23 15:34 ` Michael Olbrich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox