From 67ed763559af9bcbe3b8cf48ca52cc9f0df8c24b Mon Sep 17 00:00:00 2001 From: Jamie Lenehan Date: Mon, 30 Oct 2006 23:02:57 +0000 Subject: iproute2 2.6.16: Add the tc (used for QoS) command back to iproute. It was being left out due to errors compiling it when using recent versions of flex, such as the one included in OE. The fix is to patch the flex input so that there are no longer any conflicts with variables from the newer version of flex. --- .../iproute2/iproute2-2.6.16/new-flex-fix.patch | 83 ++++++++++++++++++++++ packages/iproute2/iproute2_2.6.16.bb | 8 ++- 2 files changed, 89 insertions(+), 2 deletions(-) create mode 100644 packages/iproute2/iproute2-2.6.16/new-flex-fix.patch (limited to 'packages/iproute2') diff --git a/packages/iproute2/iproute2-2.6.16/new-flex-fix.patch b/packages/iproute2/iproute2-2.6.16/new-flex-fix.patch new file mode 100644 index 0000000000..2c04087839 --- /dev/null +++ b/packages/iproute2/iproute2-2.6.16/new-flex-fix.patch @@ -0,0 +1,83 @@ +The tc command was failing to build due to flex errors. These errors are +caused by an incompatible change to flex in recent versions, including the +version shipped with OE. + +This fix is as per the one used by opensure: + + http://lists.opensuse.org/opensuse-commit/2006-04/msg00090.html + +and simple renames str to prevent it conflicting. + +--- iproute2-2.6.16-060323/tc/emp_ematch.l 2006/10/30 22:46:29 1.1 ++++ iproute2-2.6.16-060323/tc/emp_ematch.l 2006/10/30 22:47:26 +@@ -63,7 +63,7 @@ + + %} + +-%x str ++%x STR + + %option 8bit stack warn noyywrap prefix="ematch_" + %% +@@ -78,17 +78,17 @@ + } + strbuf_index = 0; + +- BEGIN(str); ++ BEGIN(STR); + } + +-\" { ++\" { + BEGIN(INITIAL); + yylval.b = bstr_new(strbuf, strbuf_index); + yylval.b->quoted = 1; + return ATTRIBUTE; + } + +-\\[0-7]{1,3} { /* octal escape sequence */ ++\\[0-7]{1,3} { /* octal escape sequence */ + int res; + + sscanf(yytext + 1, "%o", &res); +@@ -100,12 +100,12 @@ + strbuf_append_char((unsigned char) res); + } + +-\\[0-9]+ { /* catch wrong octal escape seq. */ ++\\[0-9]+ { /* catch wrong octal escape seq. */ + fprintf(stderr, "error: invalid octale escape sequence\n"); + return ERROR; + } + +-\\x[0-9a-fA-F]{1,2} { ++\\x[0-9a-fA-F]{1,2} { + int res; + + sscanf(yytext + 2, "%x", &res); +@@ -118,16 +118,16 @@ + strbuf_append_char((unsigned char) res); + } + +-\\n strbuf_append_char('\n'); +-\\r strbuf_append_char('\r'); +-\\t strbuf_append_char('\t'); +-\\v strbuf_append_char('\v'); +-\\b strbuf_append_char('\b'); +-\\f strbuf_append_char('\f'); +-\\a strbuf_append_char('\a'); ++\\n strbuf_append_char('\n'); ++\\r strbuf_append_char('\r'); ++\\t strbuf_append_char('\t'); ++\\v strbuf_append_char('\v'); ++\\b strbuf_append_char('\b'); ++\\f strbuf_append_char('\f'); ++\\a strbuf_append_char('\a'); + +-\\(.|\n) strbuf_append_char(yytext[1]); +-[^\\\n\"]+ strbuf_append_charp(yytext); ++\\(.|\n) strbuf_append_char(yytext[1]); ++[^\\\n\"]+ strbuf_append_charp(yytext); + + [aA][nN][dD] return AND; + [oO][rR] return OR; diff --git a/packages/iproute2/iproute2_2.6.16.bb b/packages/iproute2/iproute2_2.6.16.bb index 26805a779d..d71421d1e4 100644 --- a/packages/iproute2/iproute2_2.6.16.bb +++ b/packages/iproute2/iproute2_2.6.16.bb @@ -5,8 +5,9 @@ DEPENDS = "flex-native bison-native" DATE="060323" SRC_URI="http://developer.osdl.org/dev/iproute2/download/${P}-${DATE}.tar.gz \ - file://iproute2-2.6.15_no_strip.diff;patch=1;pnum=0" -PR="r0" + file://iproute2-2.6.15_no_strip.diff;patch=1;pnum=0 \ + file://new-flex-fix.patch;patch=1" +PR="r1" S="${WORKDIR}/${P}-${DATE}" EXTRA_OEMAKE = "CC='${CC}' KERNEL_INCLUDE=${STAGING_KERNEL_DIR}/include DOCDIR=${docdir}/iproute2 SUBDIRS='lib tc ip' SBINDIR=/sbin" @@ -14,3 +15,6 @@ EXTRA_OEMAKE = "CC='${CC}' KERNEL_INCLUDE=${STAGING_KERNEL_DIR}/include DOCDIR=$ do_install () { oe_runmake DESTDIR=${D} install } + +FILES_${PN} += "/usr/lib/tc/*" +FILES_${PN}-dbg += "/usr/lib/tc/.debug" -- cgit 1.2.3-korg