Merge lp:~xnox/apparmor/bison-3.0 into lp:apparmor/2.12

Proposed by Dimitri John Ledkov
Status: Rejected
Rejected by: Steve Beattie
Proposed branch: lp:~xnox/apparmor/bison-3.0
Merge into: lp:apparmor/2.12
Diff against target: 39 lines (+7/-5)
1 file modified
parser/libapparmor_re/parse.y (+7/-5)
To merge this branch: bzr merge lp:~xnox/apparmor/bison-3.0
Reviewer Review Type Date Requested Status
Dimitri John Ledkov (community) Disapprove
AppArmor Developers Pending
Review via email: mp+200242@code.launchpad.net

Description of the change

This is my attempt at fixing FTBFS with bison 3.x which is now in Trusty Tahr.
YYLEX_PARAM has been deprecated for a long time, but has been finally removed.

The semantics are different, as one no-longer can pass arbitrary expressions as parameter.

I've attempted to fix this, but in the process lost const qualifier, which I think is bad. Maybe someone who speaks better bison can come up with a better patch.

Also fixed %name-prefix call.

To post a comment you must log in.
Revision history for this message
Tyler Hicks (tyhicks) wrote :

Thanks Dimitri - I've got a pending apparmor upload which cherry-picks the bison 3 FTBFS fix from upstream:

https://launchpadlibrarian.net/160162431/apparmor_2.8.0-0ubuntu36.debdiff

The upload is going to be sponsored by jdstrand and it was in the process of receiving landing approval just before the holidays hit. I'm sure it'll go in early next week once everyone returns from vacation.

As a side note, I'm not familiar enough with bison to say whether or not your fix is better than what we have upstream. Maybe one of the other upstream apparmor devs can comment.

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

On 2 January 2014 18:52, Tyler Hicks <email address hidden> wrote:
> Thanks Dimitri - I've got a pending apparmor upload which cherry-picks the bison 3 FTBFS fix from upstream:
>
> https://launchpadlibrarian.net/160162431/apparmor_2.8.0-0ubuntu36.debdiff
>
> The upload is going to be sponsored by jdstrand and it was in the process of receiving landing approval just before the holidays hit. I'm sure it'll go in early next week once everyone returns from vacation.
>
> As a side note, I'm not familiar enough with bison to say whether or not your fix is better than what we have upstream. Maybe one of the other upstream apparmor devs can comment.

Yes, the upstream cherrypick is far supperior and cunning way around
the "blessed" ways of doing this sort of access. It's da-best.

--
Regards,

Dimitri.

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

obsolete, superseeded by upstream fix.

review: Disapprove

Unmerged revisions

2294. By Dimitri John Ledkov

Fix FTBFS with Bison 3.0+

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'parser/libapparmor_re/parse.y'
2--- parser/libapparmor_re/parse.y 2013-11-05 22:30:01 +0000
3+++ parser/libapparmor_re/parse.y 2014-01-01 03:50:20 +0000
4@@ -35,8 +35,7 @@
5 %{
6
7 void regex_error(Node **, const char *, const char *);
8-#define YYLEX_PARAM &text
9-int regex_lex(YYSTYPE *, const char **);
10+int regex_lex(YYSTYPE *, char *);
11
12 static inline Chars *insert_char(Chars* cset, uchar a)
13 {
14@@ -59,8 +58,9 @@
15 /* %error-verbose */
16 %lex-param {YYLEX_PARAM}
17 %parse-param {Node **root}
18-%parse-param {const char *text}
19-%name-prefix = "regex_"
20+%parse-param {char *text}
21+%lex-param {char *text}
22+%name-prefix "regex_"
23
24 %token <c> CHAR
25 %type <c> regex_char cset_char1 cset_char cset_charN
26@@ -175,10 +175,12 @@
27 return -1;
28 }
29
30-int regex_lex(YYSTYPE *val, const char **pos)
31+int regex_lex(YYSTYPE *val, char *pos_p)
32 {
33 int c;
34
35+ char **pos;
36+ pos = &(pos_p);
37 val->c = **pos;
38 switch(*(*pos)++) {
39 case '\0':

Subscribers

People subscribed via source and target branches