diff options
author | Kevin Tian <kevin.tian@intel.com> | 2010-06-25 17:48:52 +0800 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2010-06-29 17:13:38 +0100 |
commit | b180d7f488f44d3dfb3f9a19604e9592c29b426e (patch) | |
tree | dc198fec816ec648c27298f9c7869b592727a221 | |
parent | 7510eb1061d0795b515bd20eba1cbd39a9b644a2 (diff) | |
download | poky-b180d7f488f44d3dfb3f9a19604e9592c29b426e.tar.gz |
iproute: upgrade to 2.6.34
(borrow from OE 2.6.34 recipe)
[Patches-poky]
REMOVE _iproute2-2.6.15_no_strip.diff_: not required now
REMOVE _new-flex-fix.patch_: not required now
[Patches-OE]
TAKE _configure-cross.patch_: don't invoke gcc directly
[Recipes]
- Add metadata
- fix SRC_URI for new version
- no {S} now
- use alternative to enable 'ip' instead of using busybox
- move shared documents to right destination
- not take from OE:
* no need for specific do_configure
Signed-off-by Kevin Tian <kevin.tian@intel.com>
6 files changed, 82 insertions, 122 deletions
diff --git a/meta/packages/iproute2/iproute2-2.6.18/iproute2-2.6.15_no_strip.diff b/meta/packages/iproute2/iproute2-2.6.18/iproute2-2.6.15_no_strip.diff deleted file mode 100644 index 496506960e..0000000000 --- a/meta/packages/iproute2/iproute2-2.6.18/iproute2-2.6.15_no_strip.diff +++ /dev/null | |||
@@ -1,25 +0,0 @@ | |||
1 | --- ip/Makefile 2006/02/23 21:22:18 1.1 | ||
2 | +++ ip/Makefile 2006/02/23 21:22:27 | ||
3 | @@ -16,7 +16,7 @@ | ||
4 | rtmon: $(RTMONOBJ) $(LIBNETLINK) | ||
5 | |||
6 | install: all | ||
7 | - install -m 0755 -s $(TARGETS) $(DESTDIR)$(SBINDIR) | ||
8 | + install -m 0755 $(TARGETS) $(DESTDIR)$(SBINDIR) | ||
9 | install -m 0755 $(SCRIPTS) $(DESTDIR)$(SBINDIR) | ||
10 | |||
11 | clean: | ||
12 | --- tc/Makefile 2006/02/23 21:23:52 1.1 | ||
13 | +++ tc/Makefile 2006/02/23 21:23:57 | ||
14 | @@ -70,9 +70,9 @@ | ||
15 | |||
16 | install: all | ||
17 | mkdir -p $(DESTDIR)/usr/lib/tc | ||
18 | - install -m 0755 -s tc $(DESTDIR)$(SBINDIR) | ||
19 | + install -m 0755 tc $(DESTDIR)$(SBINDIR) | ||
20 | for i in $(TCSO); \ | ||
21 | - do install -m 755 -s $$i $(DESTDIR)/usr/lib/tc; \ | ||
22 | + do install -m 755 $$i $(DESTDIR)/usr/lib/tc; \ | ||
23 | done | ||
24 | |||
25 | clean: | ||
diff --git a/meta/packages/iproute2/iproute2-2.6.18/new-flex-fix.patch b/meta/packages/iproute2/iproute2-2.6.18/new-flex-fix.patch deleted file mode 100644 index 2c04087839..0000000000 --- a/meta/packages/iproute2/iproute2-2.6.18/new-flex-fix.patch +++ /dev/null | |||
@@ -1,83 +0,0 @@ | |||
1 | The tc command was failing to build due to flex errors. These errors are | ||
2 | caused by an incompatible change to flex in recent versions, including the | ||
3 | version shipped with OE. | ||
4 | |||
5 | This fix is as per the one used by opensure: | ||
6 | |||
7 | http://lists.opensuse.org/opensuse-commit/2006-04/msg00090.html | ||
8 | |||
9 | and simple renames str to prevent it conflicting. | ||
10 | |||
11 | --- iproute2-2.6.16-060323/tc/emp_ematch.l 2006/10/30 22:46:29 1.1 | ||
12 | +++ iproute2-2.6.16-060323/tc/emp_ematch.l 2006/10/30 22:47:26 | ||
13 | @@ -63,7 +63,7 @@ | ||
14 | |||
15 | %} | ||
16 | |||
17 | -%x str | ||
18 | +%x STR | ||
19 | |||
20 | %option 8bit stack warn noyywrap prefix="ematch_" | ||
21 | %% | ||
22 | @@ -78,17 +78,17 @@ | ||
23 | } | ||
24 | strbuf_index = 0; | ||
25 | |||
26 | - BEGIN(str); | ||
27 | + BEGIN(STR); | ||
28 | } | ||
29 | |||
30 | -<str>\" { | ||
31 | +<STR>\" { | ||
32 | BEGIN(INITIAL); | ||
33 | yylval.b = bstr_new(strbuf, strbuf_index); | ||
34 | yylval.b->quoted = 1; | ||
35 | return ATTRIBUTE; | ||
36 | } | ||
37 | |||
38 | -<str>\\[0-7]{1,3} { /* octal escape sequence */ | ||
39 | +<STR>\\[0-7]{1,3} { /* octal escape sequence */ | ||
40 | int res; | ||
41 | |||
42 | sscanf(yytext + 1, "%o", &res); | ||
43 | @@ -100,12 +100,12 @@ | ||
44 | strbuf_append_char((unsigned char) res); | ||
45 | } | ||
46 | |||
47 | -<str>\\[0-9]+ { /* catch wrong octal escape seq. */ | ||
48 | +<STR>\\[0-9]+ { /* catch wrong octal escape seq. */ | ||
49 | fprintf(stderr, "error: invalid octale escape sequence\n"); | ||
50 | return ERROR; | ||
51 | } | ||
52 | |||
53 | -<str>\\x[0-9a-fA-F]{1,2} { | ||
54 | +<STR>\\x[0-9a-fA-F]{1,2} { | ||
55 | int res; | ||
56 | |||
57 | sscanf(yytext + 2, "%x", &res); | ||
58 | @@ -118,16 +118,16 @@ | ||
59 | strbuf_append_char((unsigned char) res); | ||
60 | } | ||
61 | |||
62 | -<str>\\n strbuf_append_char('\n'); | ||
63 | -<str>\\r strbuf_append_char('\r'); | ||
64 | -<str>\\t strbuf_append_char('\t'); | ||
65 | -<str>\\v strbuf_append_char('\v'); | ||
66 | -<str>\\b strbuf_append_char('\b'); | ||
67 | -<str>\\f strbuf_append_char('\f'); | ||
68 | -<str>\\a strbuf_append_char('\a'); | ||
69 | +<STR>\\n strbuf_append_char('\n'); | ||
70 | +<STR>\\r strbuf_append_char('\r'); | ||
71 | +<STR>\\t strbuf_append_char('\t'); | ||
72 | +<STR>\\v strbuf_append_char('\v'); | ||
73 | +<STR>\\b strbuf_append_char('\b'); | ||
74 | +<STR>\\f strbuf_append_char('\f'); | ||
75 | +<STR>\\a strbuf_append_char('\a'); | ||
76 | |||
77 | -<str>\\(.|\n) strbuf_append_char(yytext[1]); | ||
78 | -<str>[^\\\n\"]+ strbuf_append_charp(yytext); | ||
79 | +<STR>\\(.|\n) strbuf_append_char(yytext[1]); | ||
80 | +<STR>[^\\\n\"]+ strbuf_append_charp(yytext); | ||
81 | |||
82 | [aA][nN][dD] return AND; | ||
83 | [oO][rR] return OR; | ||
diff --git a/meta/packages/iproute2/iproute2-2.6.34/configure-cross.patch b/meta/packages/iproute2/iproute2-2.6.34/configure-cross.patch new file mode 100644 index 0000000000..67dc6f5a30 --- /dev/null +++ b/meta/packages/iproute2/iproute2-2.6.34/configure-cross.patch | |||
@@ -0,0 +1,61 @@ | |||
1 | # borrow from OE, to handle cross compile mess | ||
2 | # | ||
3 | # ktian1, 06/28/2010 | ||
4 | Index: iproute2-2.6.34/configure | ||
5 | =================================================================== | ||
6 | --- iproute2-2.6.34.orig/configure | ||
7 | +++ iproute2-2.6.34/configure | ||
8 | @@ -4,7 +4,7 @@ | ||
9 | INCLUDE=${1:-"$PWD/include"} | ||
10 | |||
11 | TABLES= | ||
12 | - | ||
13 | +SYSROOT=$1 | ||
14 | check_atm() | ||
15 | { | ||
16 | cat >/tmp/atmtest.c <<EOF | ||
17 | @@ -15,7 +15,7 @@ int main(int argc, char **argv) { | ||
18 | return 0; | ||
19 | } | ||
20 | EOF | ||
21 | -gcc -I$INCLUDE -o /tmp/atmtest /tmp/atmtest.c -latm >/dev/null 2>&1 | ||
22 | +$CC -I$INCLUDE -o /tmp/atmtest /tmp/atmtest.c -latm >/dev/null 2>&1 | ||
23 | if [ $? -eq 0 ] | ||
24 | then | ||
25 | echo "TC_CONFIG_ATM:=y" >>Config | ||
26 | @@ -49,7 +49,7 @@ int main(int argc, char **argv) | ||
27 | |||
28 | EOF | ||
29 | |||
30 | -if gcc -I$INCLUDE $IPTC -o /tmp/ipttest /tmp/ipttest.c $IPTL -ldl -lxtables >/dev/null 2>&1 | ||
31 | +if $CC -I$INCLUDE $IPTC -o /tmp/ipttest /tmp/ipttest.c $IPTL -ldl -lxtables >/dev/null 2>&1 | ||
32 | then | ||
33 | echo "TC_CONFIG_XT:=y" >>Config | ||
34 | echo "using xtables" | ||
35 | @@ -86,7 +86,7 @@ int main(int argc, char **argv) { | ||
36 | } | ||
37 | |||
38 | EOF | ||
39 | -gcc -I$INCLUDE $IPTC -o /tmp/ipttest /tmp/ipttest.c $IPTL -ldl >/dev/null 2>&1 | ||
40 | +$CC -I$INCLUDE $IPTC -o /tmp/ipttest /tmp/ipttest.c $IPTL -ldl >/dev/null 2>&1 | ||
41 | |||
42 | if [ $? -eq 0 ] | ||
43 | then | ||
44 | @@ -126,7 +126,7 @@ int main(int argc, char **argv) { | ||
45 | } | ||
46 | |||
47 | EOF | ||
48 | -gcc -I$INCLUDE $IPTC -o /tmp/ipttest /tmp/ipttest.c $IPTL -ldl >/dev/null 2>&1 | ||
49 | +$CC -I$INCLUDE $IPTC -o /tmp/ipttest /tmp/ipttest.c $IPTL -ldl >/dev/null 2>&1 | ||
50 | |||
51 | if [ $? -eq 0 ] | ||
52 | then | ||
53 | @@ -150,7 +150,7 @@ check_ipt() | ||
54 | check_ipt_lib_dir() | ||
55 | { | ||
56 | IPT_LIB_DIR="" | ||
57 | - for dir in /lib /usr/lib /usr/local/lib | ||
58 | + for dir in $SYSROOT/lib $SYSROOT/usr/lib $SYSROOT/usr/local/lib | ||
59 | do | ||
60 | for file in $dir/$TABLES/lib*t_*so ; do | ||
61 | if [ -f $file ]; then | ||
diff --git a/meta/packages/iproute2/iproute2.inc b/meta/packages/iproute2/iproute2.inc index 0d7b11028a..7246b87e9b 100644 --- a/meta/packages/iproute2/iproute2.inc +++ b/meta/packages/iproute2/iproute2.inc | |||
@@ -1,18 +1,27 @@ | |||
1 | DESCRIPTION = "kernel routing and traffic control utilities" | 1 | DESCRIPTION = "kernel routing and traffic control utilities" |
2 | HOMEPAGE = "http://www.linuxfoundation.org/collaborate/workgroups/networking/iproute2" | ||
2 | SECTION = "base" | 3 | SECTION = "base" |
3 | LICENSE = "GPL" | 4 | LICENSE = "GPLv2+" |
5 | LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a \ | ||
6 | file://ip/ip.c;md5=186731afa4b42e30b9b37efa4ec90b93" | ||
4 | DEPENDS = "flex-native bison-native" | 7 | DEPENDS = "flex-native bison-native" |
5 | 8 | ||
6 | # Set SRCDATE in the .bb file | 9 | inherit update-alternatives |
7 | SRC_URI = "http://developer.osdl.org/dev/iproute2/download/${P}-${SRCDATE}.tar.gz" | ||
8 | |||
9 | S = "${WORKDIR}/${P}-${SRCDATE}" | ||
10 | 10 | ||
11 | EXTRA_OEMAKE = "CC='${CC}' KERNEL_INCLUDE=${STAGING_KERNEL_DIR}/include DOCDIR=${docdir}/iproute2 SUBDIRS='lib tc ip' SBINDIR=/sbin" | 11 | EXTRA_OEMAKE = "CC='${CC}' KERNEL_INCLUDE=${STAGING_KERNEL_DIR}/include DOCDIR=${docdir}/iproute2 SUBDIRS='lib tc ip' SBINDIR=/sbin" |
12 | 12 | ||
13 | do_install () { | 13 | do_install () { |
14 | oe_runmake DESTDIR=${D} install | 14 | oe_runmake DESTDIR=${D} install |
15 | mv ${D}${base_sbindir}/ip ${D}${base_sbindir}/ip.iproute2 | ||
16 | install -d ${D}${datadir} | ||
17 | mv ${D}/share/* ${D}${datadir}/ || true | ||
18 | rm ${D}/share -rf || true | ||
15 | } | 19 | } |
16 | 20 | ||
17 | FILES_${PN} += "/usr/lib/tc/*" | 21 | FILES_${PN} += "/usr/lib/tc/*" |
18 | FILES_${PN}-dbg += "/usr/lib/tc/.debug" | 22 | FILES_${PN}-dbg += "/usr/lib/tc/.debug" |
23 | |||
24 | ALTERNATIVE_NAME = "ip" | ||
25 | ALTERNATIVE_PATH = "${base_sbindir}/ip.iproute2" | ||
26 | ALTERNATIVE_LINK = "${base_bindir}/ip" | ||
27 | ALTERNATIVE_PRIORITY = "100" | ||
diff --git a/meta/packages/iproute2/iproute2_2.6.18.bb b/meta/packages/iproute2/iproute2_2.6.18.bb deleted file mode 100644 index 0fc0b8f98c..0000000000 --- a/meta/packages/iproute2/iproute2_2.6.18.bb +++ /dev/null | |||
@@ -1,8 +0,0 @@ | |||
1 | PR = "r1" | ||
2 | |||
3 | require iproute2.inc | ||
4 | |||
5 | SRC_URI += "file://iproute2-2.6.15_no_strip.diff;patch=1;pnum=0 \ | ||
6 | file://new-flex-fix.patch;patch=1" | ||
7 | |||
8 | SRCDATE = "061002" | ||
diff --git a/meta/packages/iproute2/iproute2_2.6.34.bb b/meta/packages/iproute2/iproute2_2.6.34.bb new file mode 100644 index 0000000000..c5e0ef6e56 --- /dev/null +++ b/meta/packages/iproute2/iproute2_2.6.34.bb | |||
@@ -0,0 +1,6 @@ | |||
1 | require iproute2.inc | ||
2 | |||
3 | PR = "r0" | ||
4 | |||
5 | SRC_URI = "http://developer.osdl.org/dev/iproute2/download/${P}.tar.bz2 \ | ||
6 | file://configure-cross.patch" | ||