From 75ee2a6ace65ff9af2236b7f0ce23eb4b67a3407b8c0067c970a801fa93ae70d Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Thu, 28 Feb 2013 13:39:26 +0000 Subject: [PATCH] . OBS-URL: https://build.opensuse.org/package/show/shells/ksh?expand=0&rev=149 --- ksh.changes | 6 ++++++ ksh.spec | 3 +++ ksh93-heredoclex.dif | 19 +++++++++++++++++++ 3 files changed, 28 insertions(+) create mode 100644 ksh93-heredoclex.dif diff --git a/ksh.changes b/ksh.changes index f1464ba..7dcb6de 100644 --- a/ksh.changes +++ b/ksh.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Feb 28 13:10:09 UTC 2013 - werner@suse.de + +- Add patch ksh93-heredoclex.dif: substitution in here-document + results in syntax error (bnc#804998) + ------------------------------------------------------------------- Fri Feb 15 14:40:41 UTC 2013 - werner@suse.de diff --git a/ksh.spec b/ksh.spec index d06aa79..03f98eb 100644 --- a/ksh.spec +++ b/ksh.spec @@ -122,6 +122,8 @@ Patch29: ksh93-zerofill.dif Patch30: ksh93-pathtemp.dif # PATCH-FIX-UPSTREAM ksh93-dttree-crash.dif [bnc#795324] Patch31: ksh93-dttree-crash.dif +# PATCH-FIX-UPSTREAM ksh93-heredoclex.dif [bnc#804998] +Patch32: ksh93-heredoclex.dif Patch42: ksh-locale.patch %description @@ -207,6 +209,7 @@ fi %patch29 %patch30 %patch31 +%patch32 %build # diff --git a/ksh93-heredoclex.dif b/ksh93-heredoclex.dif new file mode 100644 index 0000000..aac8be7 --- /dev/null +++ b/ksh93-heredoclex.dif @@ -0,0 +1,19 @@ +--- src/cmd/ksh93/sh/lex.c ++++ src/cmd/ksh93/sh/lex.c 2013-02-26 12:21:11.618820739 +0100 +@@ -1559,6 +1559,7 @@ static int comsub(register Lex_t *lp, in + register int line=lp->sh->inlineno; + char *first,*cp=fcseek(0),word[5]; + int off, messages=0, assignok=lp->assignok, csub; ++ struct ionod *inheredoc = lp->heredoc; + struct lexstate save; + save = lp->lex; + csub = lp->comsub; +@@ -1683,7 +1684,7 @@ done: + lp->lexd.dolparen--; + lp->lex = save; + lp->assignok = (endchar(lp)==RBRACT?assignok:0); +- if(lp->heredoc) ++ if(lp->heredoc && !inheredoc) + errormsg(SH_DICT,ERROR_exit(SYNBAD),e_lexsyntax5,lp->sh->inlineno,lp->heredoc->ioname); + return(messages); + }