diff options
author | Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi> | 2015-12-12 01:11:06 +0200 |
---|---|---|
committer | Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi> | 2015-12-12 18:11:33 +0200 |
commit | 01cf06a63787747446ea4b86c62289702c98e694 (patch) | |
tree | 97ef8ae1ccd33b9d9c2fbb91930acccff14616e8 /main/augeas | |
parent | 6ef1728084d139a7ad7e47b2543211e1ebe4d74d (diff) | |
download | aports-01cf06a63787747446ea4b86c62289702c98e694.tar.bz2 aports-01cf06a63787747446ea4b86c62289702c98e694.tar.xz |
main/augeas: align patch set with upstream
Diffstat (limited to 'main/augeas')
22 files changed, 657 insertions, 267 deletions
diff --git a/main/augeas/0001-Shellvars-accept-and-builtins.patch b/main/augeas/0001-Shellvars-accept-and-builtins.patch index 53f5ddbd55..282b41b123 100644 --- a/main/augeas/0001-Shellvars-accept-and-builtins.patch +++ b/main/augeas/0001-Shellvars-accept-and-builtins.patch @@ -1,7 +1,7 @@ -From 37a817680eb162a21fa6e2eac8feda5973dfb465 Mon Sep 17 00:00:00 2001 +From 239ee5f55eaae79362476cecaaf6c5064cb323b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Pinson?= <raphael.pinson@camptocamp.com> Date: Mon, 13 Jul 2015 10:03:21 +0200 -Subject: [PATCH 01/15] Shellvars: accept [] and [[]] builtins +Subject: [PATCH 01/19] Shellvars: accept [] and [[]] builtins Fix GH #188 --- @@ -60,5 +60,5 @@ index 7a89f11..778a8d2 100644 (* mode: caml *) (* End: *) -- -2.1.0 +2.5.0 diff --git a/main/augeas/0002-Shellvars-Add-test-for.patch b/main/augeas/0002-Shellvars-Add-test-for.patch index d55cfcc6dc..58ce215de3 100644 --- a/main/augeas/0002-Shellvars-Add-test-for.patch +++ b/main/augeas/0002-Shellvars-Add-test-for.patch @@ -1,7 +1,7 @@ -From e038a40dc8c7c4e2121ce40fc493c26f8cfcc46f Mon Sep 17 00:00:00 2001 +From 468fbf6dfe9ab48e4861a5dfa799a7170bea5c08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Pinson?= <raphael.pinson@camptocamp.com> Date: Mon, 13 Jul 2015 10:04:38 +0200 -Subject: [PATCH 02/15] Shellvars: Add test for [[]] +Subject: [PATCH 02/19] Shellvars: Add test for [[]] --- lenses/tests/test_shellvars.aug | 4 ++++ @@ -23,5 +23,5 @@ index 778a8d2..a2d4f28 100644 (* mode: caml *) (* End: *) -- -2.1.0 +2.5.0 diff --git a/main/augeas/0003-Shellvars-allow-partial-quoting-mixing-multiple-styl.patch b/main/augeas/0003-Shellvars-allow-partial-quoting-mixing-multiple-styl.patch index 483f1f6e27..287f4433d2 100644 --- a/main/augeas/0003-Shellvars-allow-partial-quoting-mixing-multiple-styl.patch +++ b/main/augeas/0003-Shellvars-allow-partial-quoting-mixing-multiple-styl.patch @@ -1,7 +1,7 @@ -From a70c92f52136398ffbe6e5fd70effd3984e84a5f Mon Sep 17 00:00:00 2001 +From ad5777d3bef4dcd74a2dcd09d4679b034ba16180 Mon Sep 17 00:00:00 2001 From: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi> Date: Thu, 4 Dec 2014 14:31:26 +0200 -Subject: [PATCH 03/15] Shellvars: allow partial quoting, mixing multiple +Subject: [PATCH 03/19] Shellvars: allow partial quoting, mixing multiple styles --- @@ -65,5 +65,5 @@ index a2d4f28..864cb6c 100644 test Shellvars.lns get "unset ${!LC_*}\n" = { "@unset" -- -2.1.0 +2.5.0 diff --git a/main/augeas/0004-Shellvars-allow-wrapping-loop-condition-to-multiple-.patch b/main/augeas/0004-Shellvars-allow-wrapping-loop-condition-to-multiple-.patch index 8583912080..582e1f14f1 100644 --- a/main/augeas/0004-Shellvars-allow-wrapping-loop-condition-to-multiple-.patch +++ b/main/augeas/0004-Shellvars-allow-wrapping-loop-condition-to-multiple-.patch @@ -1,7 +1,7 @@ -From 672e60257aeaf8471d7b3f0e77c48752aeeccec9 Mon Sep 17 00:00:00 2001 +From 1db574636b5bdaecfb3218a0853e3d7c34d724c6 Mon Sep 17 00:00:00 2001 From: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi> Date: Mon, 8 Dec 2014 13:16:14 +0200 -Subject: [PATCH 04/15] Shellvars: allow wrapping loop condition to multiple +Subject: [PATCH 04/19] Shellvars: allow wrapping loop condition to multiple lines --- @@ -38,5 +38,5 @@ index 864cb6c..065130a 100644 (* mode: caml *) (* End: *) -- -2.1.0 +2.5.0 diff --git a/main/augeas/0005-Shellvars-guard-against-comments.patch b/main/augeas/0005-Shellvars-guard-against-comments.patch index b2f4114386..7feb945da1 100644 --- a/main/augeas/0005-Shellvars-guard-against-comments.patch +++ b/main/augeas/0005-Shellvars-guard-against-comments.patch @@ -1,7 +1,7 @@ -From e86155aec47840e7cce29a6dbaac5bd21f8d9e3a Mon Sep 17 00:00:00 2001 +From 23e3316a5539b2a19efe6d497ffcd3906fed1aaf Mon Sep 17 00:00:00 2001 From: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi> Date: Mon, 8 Dec 2014 12:43:51 +0200 -Subject: [PATCH 05/15] Shellvars: guard against comments +Subject: [PATCH 05/19] Shellvars: guard against comments --- lenses/shellvars.aug | 2 +- @@ -21,5 +21,5 @@ index c767067..78b1d16 100644 let char = /[^"\\]|\\\\./ | Rx.cl in "\"" . char* . "\"" (* " Emacs, relax *) -- -2.1.0 +2.5.0 diff --git a/main/augeas/0006-Shellvars-allow-wrapping-builtin-arguments-to-multip.patch b/main/augeas/0006-Shellvars-allow-wrapping-builtin-arguments-to-multip.patch index 3934ff17ed..624fb7b8f0 100644 --- a/main/augeas/0006-Shellvars-allow-wrapping-builtin-arguments-to-multip.patch +++ b/main/augeas/0006-Shellvars-allow-wrapping-builtin-arguments-to-multip.patch @@ -1,7 +1,7 @@ -From 0ab8ce1daeadc690b9b1a195474b21e3c4e9c851 Mon Sep 17 00:00:00 2001 +From c39d0c16a8cf540816df94b28f428e3ef3ce2579 Mon Sep 17 00:00:00 2001 From: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi> Date: Thu, 4 Dec 2014 18:25:12 +0200 -Subject: [PATCH 06/15] Shellvars: allow wrapping builtin arguments to multiple +Subject: [PATCH 06/19] Shellvars: allow wrapping builtin arguments to multiple lines --- @@ -41,5 +41,5 @@ index 065130a..bf92735 100644 test lns get "VAR1=\"this;is;a;test\"\nVAR2=this;\n" = { "VAR1" = "\"this;is;a;test\"" } -- -2.1.0 +2.5.0 diff --git a/main/augeas/0007-Shellvars-allow-quotes-in-loop-conditions.patch b/main/augeas/0007-Shellvars-allow-quotes-in-loop-conditions.patch index e85f60fa24..9d669e843f 100644 --- a/main/augeas/0007-Shellvars-allow-quotes-in-loop-conditions.patch +++ b/main/augeas/0007-Shellvars-allow-quotes-in-loop-conditions.patch @@ -1,7 +1,7 @@ -From 25007fa071f37998016b4f197bf6509e43174517 Mon Sep 17 00:00:00 2001 +From 7d655518acb7a4c255a40a025621cd73053acce4 Mon Sep 17 00:00:00 2001 From: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi> Date: Mon, 8 Dec 2014 14:28:16 +0200 -Subject: [PATCH 07/15] Shellvars: allow quotes in loop conditions +Subject: [PATCH 07/19] Shellvars: allow quotes in loop conditions --- lenses/shellvars.aug | 8 +------- @@ -50,5 +50,5 @@ index bf92735..6b2210e 100644 (* mode: caml *) (* End: *) -- -2.1.0 +2.5.0 diff --git a/main/augeas/0008-Shellvars-case-support-quotes-and-spaces-in-pattern-.patch b/main/augeas/0008-Shellvars-case-support-quotes-and-spaces-in-pattern-.patch index 2988f43cc4..2100c10b3c 100644 --- a/main/augeas/0008-Shellvars-case-support-quotes-and-spaces-in-pattern-.patch +++ b/main/augeas/0008-Shellvars-case-support-quotes-and-spaces-in-pattern-.patch @@ -1,7 +1,7 @@ -From 2468b3af35eefd019b6cb75836a6fb274cfc20bc Mon Sep 17 00:00:00 2001 +From b293b7f30e46ca75127fab698a6ed86523746db3 Mon Sep 17 00:00:00 2001 From: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi> Date: Mon, 8 Dec 2014 15:17:46 +0200 -Subject: [PATCH 08/15] Shellvars: case: support quotes and spaces in pattern +Subject: [PATCH 08/19] Shellvars: case: support quotes and spaces in pattern lists --- @@ -52,5 +52,5 @@ index 6b2210e..9484754 100644 (* mode: caml *) (* End: *) -- -2.1.0 +2.5.0 diff --git a/main/augeas/0009-Shellvars-add-eval-builtin-support.patch b/main/augeas/0009-Shellvars-add-eval-builtin-support.patch new file mode 100644 index 0000000000..71f9b73946 --- /dev/null +++ b/main/augeas/0009-Shellvars-add-eval-builtin-support.patch @@ -0,0 +1,59 @@ +From c0ceda2cbc93add3392e87a488947691a886af78 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rapha=C3=ABl=20Pinson?= <raphael.pinson@camptocamp.com> +Date: Thu, 30 Jul 2015 09:16:12 +0200 +Subject: [PATCH 09/19] Shellvars: add eval builtin support + +--- + lenses/shellvars.aug | 6 ++++++ + lenses/tests/test_shellvars.aug | 4 ++++ + 2 files changed, 10 insertions(+) + +diff --git a/lenses/shellvars.aug b/lenses/shellvars.aug +index dc6d4f3..8735d77 100644 +--- a/lenses/shellvars.aug ++++ b/lenses/shellvars.aug +@@ -83,6 +83,10 @@ module Shellvars = + + let shell_builtin_cmds = "ulimit" | "shift" | "exit" + ++ let eval = ++ Util.indent . Util.del_str "eval" . Util.del_ws_spc ++ . label "@eval" . store anyquot ++ + let builtin = + Util.indent . label "@builtin" + . store shell_builtin_cmds +@@ -169,6 +173,7 @@ module Shellvars = + | entry_eol_item builtin + | entry_eol_item return + | entry_eol_item condition ++ | entry_eol_item eval + + let entry_noeol = + let entry_item (item:lens) = [ item ] in +@@ -179,6 +184,7 @@ module Shellvars = + | entry_item builtin + | entry_item return + | entry_item condition ++ | entry_item eval + + let rec rec_entry = + let entry = comment | entry_eol | rec_entry in +diff --git a/lenses/tests/test_shellvars.aug b/lenses/tests/test_shellvars.aug +index 9484754..9d301af 100644 +--- a/lenses/tests/test_shellvars.aug ++++ b/lenses/tests/test_shellvars.aug +@@ -580,6 +580,10 @@ esac\n" = + } + } + ++ (* eval *) ++ test lns get "eval `dircolors`\n" = ++ { "@eval" = "`dircolors`" } ++ + (* Local Variables: *) + (* mode: caml *) + (* End: *) +-- +2.5.0 + diff --git a/main/augeas/0010-Shellvars-add-alias-builtin-support.patch b/main/augeas/0010-Shellvars-add-alias-builtin-support.patch new file mode 100644 index 0000000000..3813970aef --- /dev/null +++ b/main/augeas/0010-Shellvars-add-alias-builtin-support.patch @@ -0,0 +1,60 @@ +From 2717b7ecb107f5c4bfd9b04eb8543a365500421d Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rapha=C3=ABl=20Pinson?= <raphael.pinson@camptocamp.com> +Date: Thu, 30 Jul 2015 09:22:22 +0200 +Subject: [PATCH 10/19] Shellvars: add alias builtin support + +--- + lenses/shellvars.aug | 7 +++++++ + lenses/tests/test_shellvars.aug | 4 ++++ + 2 files changed, 11 insertions(+) + +diff --git a/lenses/shellvars.aug b/lenses/shellvars.aug +index 8735d77..f681fcd 100644 +--- a/lenses/shellvars.aug ++++ b/lenses/shellvars.aug +@@ -87,6 +87,11 @@ module Shellvars = + Util.indent . Util.del_str "eval" . Util.del_ws_spc + . label "@eval" . store anyquot + ++ let alias = ++ Util.indent . Util.del_str "alias" . Util.del_ws_spc ++ . label "@alias" . store key_re . eq ++ . [ label "value" . store anyquot ] ++ + let builtin = + Util.indent . label "@builtin" + . store shell_builtin_cmds +@@ -174,6 +179,7 @@ module Shellvars = + | entry_eol_item return + | entry_eol_item condition + | entry_eol_item eval ++ | entry_eol_item alias + + let entry_noeol = + let entry_item (item:lens) = [ item ] in +@@ -185,6 +191,7 @@ module Shellvars = + | entry_item return + | entry_item condition + | entry_item eval ++ | entry_item alias + + let rec rec_entry = + let entry = comment | entry_eol | rec_entry in +diff --git a/lenses/tests/test_shellvars.aug b/lenses/tests/test_shellvars.aug +index 9d301af..26aec25 100644 +--- a/lenses/tests/test_shellvars.aug ++++ b/lenses/tests/test_shellvars.aug +@@ -584,6 +584,10 @@ esac\n" = + test lns get "eval `dircolors`\n" = + { "@eval" = "`dircolors`" } + ++ (* alias *) ++ test lns get "alias ls='ls $LS_OPTIONS'\n" = ++ { "@alias" = "ls" { "value" = "'ls $LS_OPTIONS'" } } ++ + (* Local Variables: *) + (* mode: caml *) + (* End: *) +-- +2.5.0 + diff --git a/main/augeas/0009-Shellvars-pattern-nodes-in-case-entries.patch b/main/augeas/0011-Shellvars-pattern-nodes-in-case-entries.patch index ce25c59ed2..dc11176d87 100644 --- a/main/augeas/0009-Shellvars-pattern-nodes-in-case-entries.patch +++ b/main/augeas/0011-Shellvars-pattern-nodes-in-case-entries.patch @@ -1,15 +1,16 @@ -From f967f4c6c86a9fff523363d228e8703cfcb2c70e Mon Sep 17 00:00:00 2001 +From 60a542a54819deee9a869815df40f99a4391a8fa Mon Sep 17 00:00:00 2001 From: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi> Date: Mon, 13 Jul 2015 14:43:09 +0300 -Subject: [PATCH 09/15] Shellvars: pattern nodes in case entries +Subject: [PATCH 11/19] Shellvars: pattern nodes in case entries +Breaking change: case entry values are now in a @pattern subnode. --- lenses/shellvars.aug | 10 +++++---- lenses/tests/test_shellvars.aug | 48 +++++++++++++++++++++++++++-------------- 2 files changed, 38 insertions(+), 20 deletions(-) diff --git a/lenses/shellvars.aug b/lenses/shellvars.aug -index dc6d4f3..aab9d50 100644 +index f681fcd..ed9cc9c 100644 --- a/lenses/shellvars.aug +++ b/lenses/shellvars.aug @@ -34,12 +34,12 @@ module Shellvars = @@ -27,7 +28,7 @@ index dc6d4f3..aab9d50 100644 (* dbquot don't take spaces or semi-colons *) let dbquot = /``[^` \t\n;]+``/ let dollar_assign = /\$\([^\(\)#\n]*\)/ -@@ -139,8 +139,10 @@ module Shellvars = +@@ -148,8 +148,10 @@ module Shellvars = generic_cond "select" "@select" "do" entry+ "done" let case (entry:lens) (entry_noeol:lens) = @@ -41,7 +42,7 @@ index dc6d4f3..aab9d50 100644 . entry* . entry_noeol? . Util.indent . Util.del_str ";;" . eol ] in diff --git a/lenses/tests/test_shellvars.aug b/lenses/tests/test_shellvars.aug -index 9484754..a397431 100644 +index 26aec25..d07918d 100644 --- a/lenses/tests/test_shellvars.aug +++ b/lenses/tests/test_shellvars.aug @@ -261,11 +261,14 @@ done\n" = @@ -168,5 +169,5 @@ index 9484754..a397431 100644 } } -- -2.1.0 +2.5.0 diff --git a/main/augeas/0010-Shellvars-use-sto_to_semicol-in-condition-lens.patch b/main/augeas/0012-Shellvars-use-sto_to_semicol-in-condition-lens.patch index 96cd8b53fe..6fe3632a33 100644 --- a/main/augeas/0010-Shellvars-use-sto_to_semicol-in-condition-lens.patch +++ b/main/augeas/0012-Shellvars-use-sto_to_semicol-in-condition-lens.patch @@ -1,17 +1,17 @@ -From 5a3d3528b63986a91baedaca028c646b796961d8 Mon Sep 17 00:00:00 2001 +From c6e1f01214b89bb17315704d08f285401abec0db Mon Sep 17 00:00:00 2001 From: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi> Date: Mon, 13 Jul 2015 14:48:18 +0300 -Subject: [PATCH 10/15] Shellvars: use sto_to_semicol in condition lens +Subject: [PATCH 12/19] Shellvars: use sto_to_semicol in condition lens --- lenses/shellvars.aug | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lenses/shellvars.aug b/lenses/shellvars.aug -index aab9d50..bb0e875 100644 +index ed9cc9c..0384a6f 100644 --- a/lenses/shellvars.aug +++ b/lenses/shellvars.aug -@@ -98,9 +98,8 @@ module Shellvars = +@@ -107,9 +107,8 @@ module Shellvars = . ( Util.del_ws_spc . store Rx.integer )? let condition = @@ -24,5 +24,5 @@ index aab9d50..bb0e875 100644 in Util.indent . label "@condition" . (cond "[" "]" | cond "[[" "]]") -- -2.1.0 +2.5.0 diff --git a/main/augeas/0011-Shellvars-allow-and-constructs-after-condition.patch b/main/augeas/0013-Shellvars-allow-and-constructs-after-condition.patch index cb067beea0..d1343ee110 100644 --- a/main/augeas/0011-Shellvars-allow-and-constructs-after-condition.patch +++ b/main/augeas/0013-Shellvars-allow-and-constructs-after-condition.patch @@ -1,7 +1,7 @@ -From 7bad1f085369de5544f8b06e7e0704d7030c3506 Mon Sep 17 00:00:00 2001 +From 3db2b565125c3e00914f6def30510aaa71b7d908 Mon Sep 17 00:00:00 2001 From: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi> Date: Mon, 13 Jul 2015 14:51:37 +0300 -Subject: [PATCH 11/15] Shellvars: allow && and || constructs after condition +Subject: [PATCH 13/19] Shellvars: allow && and || constructs after condition --- lenses/shellvars.aug | 8 ++++++-- @@ -9,7 +9,7 @@ Subject: [PATCH 11/15] Shellvars: allow && and || constructs after condition 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/lenses/shellvars.aug b/lenses/shellvars.aug -index bb0e875..3fce699 100644 +index 0384a6f..c47f566 100644 --- a/lenses/shellvars.aug +++ b/lenses/shellvars.aug @@ -34,7 +34,7 @@ module Shellvars = @@ -21,7 +21,7 @@ index bb0e875..3fce699 100644 let dquot = let char = /[^"\\]|\\\\./ | Rx.cl in "\"" . char* . "\"" (* " Emacs, relax *) -@@ -98,9 +98,13 @@ module Shellvars = +@@ -107,9 +107,13 @@ module Shellvars = . ( Util.del_ws_spc . store Rx.integer )? let condition = @@ -37,12 +37,12 @@ index bb0e875..3fce699 100644 diff --git a/lenses/tests/test_shellvars.aug b/lenses/tests/test_shellvars.aug -index a397431..ae432fa 100644 +index d07918d..0f27a73 100644 --- a/lenses/tests/test_shellvars.aug +++ b/lenses/tests/test_shellvars.aug -@@ -596,6 +596,14 @@ esac\n" = - } - } +@@ -604,6 +604,14 @@ esac\n" = + test lns get "alias ls='ls $LS_OPTIONS'\n" = + { "@alias" = "ls" { "value" = "'ls $LS_OPTIONS'" } } + (* Allow && and || constructs after condition *) + test Shellvars.lns get "[ -f $FILENAME ] && do this || or that\n" = @@ -56,5 +56,5 @@ index a397431..ae432fa 100644 (* mode: caml *) (* End: *) -- -2.1.0 +2.5.0 diff --git a/main/augeas/0012-Shellvars-Allow-almost-any-command.patch b/main/augeas/0014-Shellvars-Allow-almost-any-command.patch index 7338c27c84..03c7b1b64d 100644 --- a/main/augeas/0012-Shellvars-Allow-almost-any-command.patch +++ b/main/augeas/0014-Shellvars-Allow-almost-any-command.patch @@ -1,71 +1,58 @@ -From 9d896f124404865e996042de74347644a2dd2e3a Mon Sep 17 00:00:00 2001 +From ba95bf402b009f0a572807b62ea2a7addd29dc17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Pinson?= <raphink@gmail.com> Date: Thu, 24 Apr 2014 16:10:50 +0200 -Subject: [PATCH 12/15] Shellvars: Allow (almost) any command +Subject: [PATCH 14/19] Shellvars: Allow (almost) any command Note: this may have edge effects in recursive sublenses that augparse cannot check. - -Conflicts: - lenses/shellvars.aug --- - NEWS | 1 + lenses/shellvars.aug | 7 +++++++ - lenses/tests/test_shellvars.aug | 11 +++++++++++ - 3 files changed, 19 insertions(+) + lenses/tests/test_shellvars.aug | 12 +++++++++++- + 2 files changed, 18 insertions(+), 1 deletion(-) -diff --git a/NEWS b/NEWS -index a748343..3866a92 100644 ---- a/NEWS -+++ b/NEWS -@@ -134,6 +134,7 @@ - conditions (GH issue #118) - Support $(( .. )) arithmetic expansion in variable - assignment, RHBZ#1100550 -+ Allow (almost) any command - * Simplevars: Support flags and empty values - * Sshd: Allow all types of entries in Match groups (GH issue #75) - * Sssd: Allow ; for comments diff --git a/lenses/shellvars.aug b/lenses/shellvars.aug -index 3fce699..36a0141 100644 +index c47f566..f9e03ff 100644 --- a/lenses/shellvars.aug +++ b/lenses/shellvars.aug -@@ -107,6 +107,11 @@ module Shellvars = +@@ -116,6 +116,11 @@ module Shellvars = . ( action "&&" "@and" | action "||" "@or" )* in Util.indent . label "@condition" . (cond "[" "]" | cond "[[" "]]") + let command = -+ let reserved_key = /exit|shift|return|ulimit|unset|export|source|\.|if|for|select|while|until|then|else|fi|done|case/ ++ let reserved_key = /exit|shift|return|ulimit|unset|export|source|\.|if|for|select|while|until|then|else|fi|done|case|eval|alias/ + in let word = /[A-Za-z0-9_.-\/]+/ + in Util.indent . label "@command" . store (word - reserved_key) + . [ Sep.space . label "@arg" . sto_to_semicol]? (************************************************************************ * Group: CONDITIONALS AND LOOPS -@@ -174,6 +179,7 @@ module Shellvars = - | entry_eol_item builtin - | entry_eol_item return +@@ -185,6 +190,7 @@ module Shellvars = | entry_eol_item condition + | entry_eol_item eval + | entry_eol_item alias + | entry_eol_item command let entry_noeol = let entry_item (item:lens) = [ item ] in -@@ -184,6 +190,7 @@ module Shellvars = - | entry_item builtin - | entry_item return +@@ -197,6 +203,7 @@ module Shellvars = | entry_item condition + | entry_item eval + | entry_item alias + | entry_item command let rec rec_entry = let entry = comment | entry_eol | rec_entry in diff --git a/lenses/tests/test_shellvars.aug b/lenses/tests/test_shellvars.aug -index ae432fa..76f6f59 100644 +index 0f27a73..f065ce4 100644 --- a/lenses/tests/test_shellvars.aug +++ b/lenses/tests/test_shellvars.aug -@@ -604,6 +604,17 @@ esac\n" = - { "@or" = "or that" } - } - +@@ -609,7 +609,17 @@ esac\n" = + { "@condition" = "-f $FILENAME" + { "type" = "[" } + { "@and" = "do this" } +- { "@or" = "or that" } ++ { "@or" = "or that" } } ++ +(* Test: Shellvars.lns + Parse (almost) any command *) +test Shellvars.lns get "echo foobar 'and this is baz' @@ -75,11 +62,9 @@ index ae432fa..76f6f59 100644 + } + { "@command" = "/usr/local/bin/myscript.sh" + { "@arg" = "with args" } -+ } -+ + } + (* Local Variables: *) - (* mode: caml *) - (* End: *) -- -2.1.0 +2.5.0 diff --git a/main/augeas/0014-Shellvars-allow-command-specific-environment-variabl.patch b/main/augeas/0014-Shellvars-allow-command-specific-environment-variabl.patch deleted file mode 100644 index 66e6cb7460..0000000000 --- a/main/augeas/0014-Shellvars-allow-command-specific-environment-variabl.patch +++ /dev/null @@ -1,55 +0,0 @@ -From 9700827d26dbb59bb800c9e5ab39f0bc5c598fbd Mon Sep 17 00:00:00 2001 -From: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi> -Date: Fri, 26 Dec 2014 13:27:13 +0200 -Subject: [PATCH 14/15] Shellvars: allow command-specific environment variables - ---- - lenses/shellvars.aug | 4 +++- - lenses/tests/test_shellvars.aug | 9 ++++++++- - 2 files changed, 11 insertions(+), 2 deletions(-) - -diff --git a/lenses/shellvars.aug b/lenses/shellvars.aug -index 36a0141..00c6846 100644 ---- a/lenses/shellvars.aug -+++ b/lenses/shellvars.aug -@@ -110,7 +110,9 @@ module Shellvars = - let command = - let reserved_key = /exit|shift|return|ulimit|unset|export|source|\.|if|for|select|while|until|then|else|fi|done|case/ - in let word = /[A-Za-z0-9_.-\/]+/ -- in Util.indent . label "@command" . store (word - reserved_key) -+ in Util.indent . label "@command" -+ . [ key key_re . eq . store anyquot . Sep.space . del /(\\\\\n[ \t]*)?/ "" ]* -+ . store (word - reserved_key - /zzz/) - . [ Sep.space . label "@arg" . sto_to_semicol]? - - (************************************************************************ -diff --git a/lenses/tests/test_shellvars.aug b/lenses/tests/test_shellvars.aug -index e7fad5a..4f52205 100644 ---- a/lenses/tests/test_shellvars.aug -+++ b/lenses/tests/test_shellvars.aug -@@ -609,7 +609,9 @@ esac\n" = - test Shellvars.lns get "echo foobar 'and this is baz' - /usr/local/bin/myscript.sh with args - echo foo \ --bar\n" = -+bar -+abc=def \ -+ ghi=\"jkl mno\" command arg1 arg2\n" = - { "@command" = "echo" - { "@arg" = "foobar 'and this is baz'" } - } -@@ -620,6 +622,11 @@ bar\n" = - { "@arg" = "foo \ - bar" } - } -+ { "@command" = "command" -+ { "abc" = "def" } -+ { "ghi" = "\"jkl mno\"" } -+ { "@arg" = "arg1 arg2" } -+ } - - (* Local Variables: *) - (* mode: caml *) --- -2.1.0 - diff --git a/main/augeas/0015-Shellvars-allow-and-constructs-after-command.patch b/main/augeas/0015-Shellvars-allow-and-constructs-after-command.patch deleted file mode 100644 index dbb2c89838..0000000000 --- a/main/augeas/0015-Shellvars-allow-and-constructs-after-command.patch +++ /dev/null @@ -1,65 +0,0 @@ -From 70d9a1a8b26957ef5772f634346bccfa1dee8811 Mon Sep 17 00:00:00 2001 -From: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi> -Date: Mon, 13 Jul 2015 15:26:04 +0300 -Subject: [PATCH 15/15] Shellvars: allow && and || constructs after command - ---- - lenses/shellvars.aug | 10 +++++++--- - lenses/tests/test_shellvars.aug | 8 ++++++++ - 2 files changed, 15 insertions(+), 3 deletions(-) - -diff --git a/lenses/shellvars.aug b/lenses/shellvars.aug -index 00c6846..0f7c907 100644 ---- a/lenses/shellvars.aug -+++ b/lenses/shellvars.aug -@@ -97,14 +97,17 @@ module Shellvars = - . Util.del_str "return" - . ( Util.del_ws_spc . store Rx.integer )? - -- let condition = -+ let cond_actions= - let action (operator:string) (lbl:string) = - [ Sep.opt_space . Util.del_str operator . Sep.opt_space - . label lbl . sto_to_semicol ] -- in let cond (start:string) (end:string) = [ label "type" . store start ] -+ in ( action "&&" "@and" | action "||" "@or" )* -+ -+ let condition = -+ let cond (start:string) (end:string) = [ label "type" . store start ] - . Util.del_ws_spc . sto_to_semicol - . Util.del_ws_spc . Util.del_str end -- . ( action "&&" "@and" | action "||" "@or" )* -+ . cond_actions - in Util.indent . label "@condition" . (cond "[" "]" | cond "[[" "]]") - - let command = -@@ -114,6 +117,7 @@ module Shellvars = - . [ key key_re . eq . store anyquot . Sep.space . del /(\\\\\n[ \t]*)?/ "" ]* - . store (word - reserved_key - /zzz/) - . [ Sep.space . label "@arg" . sto_to_semicol]? -+ . cond_actions - - (************************************************************************ - * Group: CONDITIONALS AND LOOPS -diff --git a/lenses/tests/test_shellvars.aug b/lenses/tests/test_shellvars.aug -index 4f52205..00f3aad 100644 ---- a/lenses/tests/test_shellvars.aug -+++ b/lenses/tests/test_shellvars.aug -@@ -628,6 +628,14 @@ bar" } - { "@arg" = "arg1 arg2" } - } - -+ (* Allow && and || constructs after command *) -+ test Shellvars.lns get "foo bar && baz || quux\n" = -+ { "@command" = "foo" -+ { "@arg" = "bar" } -+ { "@and" = "baz" } -+ { "@or" = "quux" } -+ } -+ - (* Local Variables: *) - (* mode: caml *) - (* End: *) --- -2.1.0 - diff --git a/main/augeas/0015-Shellvars-support-pipes-in-commands.patch b/main/augeas/0015-Shellvars-support-pipes-in-commands.patch new file mode 100644 index 0000000000..c478264590 --- /dev/null +++ b/main/augeas/0015-Shellvars-support-pipes-in-commands.patch @@ -0,0 +1,73 @@ +From 9c054205bede2555ab96c7a03a21e8650a465308 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rapha=C3=ABl=20Pinson?= <raphael.pinson@camptocamp.com> +Date: Mon, 3 Aug 2015 14:47:13 +0200 +Subject: [PATCH 15/19] Shellvars: support pipes in commands + +--- + lenses/shellvars.aug | 12 ++++++++---- + lenses/tests/test_shellvars.aug | 8 ++++++++ + 2 files changed, 16 insertions(+), 4 deletions(-) + +diff --git a/lenses/shellvars.aug b/lenses/shellvars.aug +index f9e03ff..f68f5bb 100644 +--- a/lenses/shellvars.aug ++++ b/lenses/shellvars.aug +@@ -116,11 +116,18 @@ module Shellvars = + . ( action "&&" "@and" | action "||" "@or" )* + in Util.indent . label "@condition" . (cond "[" "]" | cond "[[" "]]") + +- let command = ++ (* Entry types *) ++ let entry_eol_item (item:lens) = [ item . comment_or_eol ] ++ let entry_item (item:lens) = [ item ] ++ ++ (* Command *) ++ let rec command = + let reserved_key = /exit|shift|return|ulimit|unset|export|source|\.|if|for|select|while|until|then|else|fi|done|case|eval|alias/ + in let word = /[A-Za-z0-9_.-\/]+/ ++ in let pipe = del /[ \t]*\|[ \t]*/ " | " + in Util.indent . label "@command" . store (word - reserved_key) + . [ Sep.space . label "@arg" . sto_to_semicol]? ++ . (pipe . (entry_eol_item command | entry_item command) )* + + (************************************************************************ + * Group: CONDITIONALS AND LOOPS +@@ -179,8 +186,6 @@ module Shellvars = + . Util.indent . Util.del_str "}" . eol ] + + let entry_eol = +- let entry_eol_item (item:lens) = +- [ item . comment_or_eol ] in + entry_eol_item source + | entry_eol_item kv + | entry_eol_item unset +@@ -193,7 +198,6 @@ module Shellvars = + | entry_eol_item command + + let entry_noeol = +- let entry_item (item:lens) = [ item ] in + entry_item source + | entry_item kv + | entry_item unset +diff --git a/lenses/tests/test_shellvars.aug b/lenses/tests/test_shellvars.aug +index f065ce4..e0bf7fb 100644 +--- a/lenses/tests/test_shellvars.aug ++++ b/lenses/tests/test_shellvars.aug +@@ -622,6 +622,14 @@ test Shellvars.lns get "echo foobar 'and this is baz' + { "@arg" = "with args" } + } + ++(* Test: Shellvars.lns ++ Support pipes in commands *) ++test Shellvars.lns get "echo \"$STRING\" | grep foo\n" = ++ { "@command" = "echo" ++ { "@arg" = "\"$STRING\"" } ++ { "@command" = "grep" ++ { "@arg" = "foo" } } } ++ + (* Local Variables: *) + (* mode: caml *) + (* End: *) +-- +2.5.0 + diff --git a/main/augeas/0016-Shellvars-allow-in-commands.patch b/main/augeas/0016-Shellvars-allow-in-commands.patch new file mode 100644 index 0000000000..e29c4710d3 --- /dev/null +++ b/main/augeas/0016-Shellvars-allow-in-commands.patch @@ -0,0 +1,177 @@ +From 7b01ce17d4caafdfa1f83a1d43b926c8ef2dd9c8 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rapha=C3=ABl=20Pinson?= <raphael.pinson@camptocamp.com> +Date: Tue, 25 Aug 2015 11:28:41 +0200 +Subject: [PATCH 16/19] Shellvars: allow &&/|| in commands + +--- + lenses/shellvars.aug | 80 ++++++++++++++++++++++++----------------- + lenses/tests/test_shellvars.aug | 42 ++++++++++++++++++++-- + 2 files changed, 87 insertions(+), 35 deletions(-) + +diff --git a/lenses/shellvars.aug b/lenses/shellvars.aug +index f68f5bb..f7f4c47 100644 +--- a/lenses/shellvars.aug ++++ b/lenses/shellvars.aug +@@ -106,28 +106,66 @@ module Shellvars = + . Util.del_str "return" + . ( Util.del_ws_spc . store Rx.integer )? + ++ let action (operator:string) (lbl:string) (sto:lens) = ++ [ del (Rx.opt_space . operator . Rx.opt_space) (" " . operator . " ") ++ . label ("@".lbl) . sto ] ++ ++ let action_pipe = action "|" "pipe" ++ let action_and = action "&&" "and" ++ let action_or = action "||" "or" ++ + let condition = +- let action (operator:string) (lbl:string) = +- [ Sep.opt_space . Util.del_str operator . Sep.opt_space +- . label lbl . sto_to_semicol ] +- in let cond (start:string) (end:string) = [ label "type" . store start ] +- . Util.del_ws_spc . sto_to_semicol +- . Util.del_ws_spc . Util.del_str end +- . ( action "&&" "@and" | action "||" "@or" )* ++ let cond (start:string) (end:string) = [ label "type" . store start ] ++ . Util.del_ws_spc . sto_to_semicol ++ . Util.del_ws_spc . Util.del_str end ++ . ( action_and sto_to_semicol | action_or sto_to_semicol )* + in Util.indent . label "@condition" . (cond "[" "]" | cond "[[" "]]") + + (* Entry types *) + let entry_eol_item (item:lens) = [ item . comment_or_eol ] + let entry_item (item:lens) = [ item ] + ++ let entry_eol_nocommand = ++ entry_eol_item source ++ | entry_eol_item kv ++ | entry_eol_item unset ++ | entry_eol_item bare_export ++ | entry_eol_item builtin ++ | entry_eol_item return ++ | entry_eol_item condition ++ | entry_eol_item eval ++ | entry_eol_item alias ++ ++ let entry_noeol_nocommand = ++ entry_item source ++ | entry_item kv ++ | entry_item unset ++ | entry_item bare_export ++ | entry_item builtin ++ | entry_item return ++ | entry_item condition ++ | entry_item eval ++ | entry_item alias ++ + (* Command *) + let rec command = + let reserved_key = /exit|shift|return|ulimit|unset|export|source|\.|if|for|select|while|until|then|else|fi|done|case|eval|alias/ + in let word = /[A-Za-z0-9_.-\/]+/ +- in let pipe = del /[ \t]*\|[ \t]*/ " | " ++ in let entry_eol = entry_eol_nocommand | entry_eol_item command ++ in let entry_noeol = entry_noeol_nocommand | entry_item command ++ in let entry = entry_eol | entry_noeol ++ in let pipe = action_pipe (entry_eol_item command | entry_item command) ++ in let and = action_and entry ++ in let or = action_or entry + in Util.indent . label "@command" . store (word - reserved_key) + . [ Sep.space . label "@arg" . sto_to_semicol]? +- . (pipe . (entry_eol_item command | entry_item command) )* ++ . ( pipe | and | or )? ++ ++ let entry_eol = entry_eol_nocommand ++ | entry_eol_item command ++ ++ let entry_noeol = entry_noeol_nocommand ++ | entry_item command + + (************************************************************************ + * Group: CONDITIONALS AND LOOPS +@@ -185,30 +223,6 @@ module Shellvars = + . entry+ + . Util.indent . Util.del_str "}" . eol ] + +- let entry_eol = +- entry_eol_item source +- | entry_eol_item kv +- | entry_eol_item unset +- | entry_eol_item bare_export +- | entry_eol_item builtin +- | entry_eol_item return +- | entry_eol_item condition +- | entry_eol_item eval +- | entry_eol_item alias +- | entry_eol_item command +- +- let entry_noeol = +- entry_item source +- | entry_item kv +- | entry_item unset +- | entry_item bare_export +- | entry_item builtin +- | entry_item return +- | entry_item condition +- | entry_item eval +- | entry_item alias +- | entry_item command +- + let rec rec_entry = + let entry = comment | entry_eol | rec_entry in + cond_if entry +diff --git a/lenses/tests/test_shellvars.aug b/lenses/tests/test_shellvars.aug +index e0bf7fb..2c810cb 100644 +--- a/lenses/tests/test_shellvars.aug ++++ b/lenses/tests/test_shellvars.aug +@@ -627,8 +627,46 @@ test Shellvars.lns get "echo foobar 'and this is baz' + test Shellvars.lns get "echo \"$STRING\" | grep foo\n" = + { "@command" = "echo" + { "@arg" = "\"$STRING\"" } +- { "@command" = "grep" +- { "@arg" = "foo" } } } ++ { "@pipe" ++ { "@command" = "grep" ++ { "@arg" = "foo" } } } } ++ ++(* Test: Shellvars.lns ++ Support && and || after command ++ GH #215 *) ++test Shellvars.lns get "grep -q \"Debian\" /etc/issue && echo moo\n" = ++ { "@command" = "grep" ++ { "@arg" = "-q \"Debian\" /etc/issue" } ++ { "@and" ++ { "@command" = "echo" ++ { "@arg" = "moo" } } } } ++ ++test Shellvars.lns get "grep -q \"Debian\" /etc/issue || echo baa\n" = ++ { "@command" = "grep" ++ { "@arg" = "-q \"Debian\" /etc/issue" } ++ { "@or" ++ { "@command" = "echo" ++ { "@arg" = "baa" } } } } ++ ++test Shellvars.lns get "grep -q \"Debian\" /etc/issue && DEBIAN=1\n" = ++ { "@command" = "grep" ++ { "@arg" = "-q \"Debian\" /etc/issue" } ++ { "@and" ++ { "DEBIAN" = "1" } } } ++ ++test Shellvars.lns get "cat /etc/issue | grep -q \"Debian\" && echo moo || echo baa\n" = ++ { "@command" = "cat" ++ { "@arg" = "/etc/issue" } ++ { "@pipe" ++ { "@command" = "grep" ++ { "@arg" = "-q \"Debian\"" } ++ { "@and" ++ { "@command" = "echo" ++ { "@arg" = "moo" } ++ { "@or" ++ { "@command" = "echo" ++ { "@arg" = "baa" } } } } } } } } ++ + + (* Local Variables: *) + (* mode: caml *) +-- +2.5.0 + diff --git a/main/augeas/0013-Shellvars-test-case-for-wrapping-command-arguments.patch b/main/augeas/0017-Shellvars-test-case-for-wrapping-command-arguments.patch index a16e6dfbca..e4bbf7b177 100644 --- a/main/augeas/0013-Shellvars-test-case-for-wrapping-command-arguments.patch +++ b/main/augeas/0017-Shellvars-test-case-for-wrapping-command-arguments.patch @@ -1,17 +1,17 @@ -From d68729a4719c8e00778e6fd06639bf8c32988277 Mon Sep 17 00:00:00 2001 +From 051b9da244531c2631a9dca2716ef85c52878089 Mon Sep 17 00:00:00 2001 From: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi> Date: Thu, 4 Dec 2014 18:29:58 +0200 -Subject: [PATCH 13/15] Shellvars: test case for wrapping command arguments +Subject: [PATCH 17/19] Shellvars: test case for wrapping command arguments --- - lenses/tests/test_shellvars.aug | 8 +++++++- - 1 file changed, 7 insertions(+), 1 deletion(-) + lenses/tests/test_shellvars.aug | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lenses/tests/test_shellvars.aug b/lenses/tests/test_shellvars.aug -index 76f6f59..e7fad5a 100644 +index 2c810cb..07c392e 100644 --- a/lenses/tests/test_shellvars.aug +++ b/lenses/tests/test_shellvars.aug -@@ -607,13 +607,19 @@ esac\n" = +@@ -614,13 +614,18 @@ esac\n" = (* Test: Shellvars.lns Parse (almost) any command *) test Shellvars.lns get "echo foobar 'and this is baz' @@ -26,12 +26,11 @@ index 76f6f59..e7fad5a 100644 { "@arg" = "with args" } } + { "@command" = "echo" -+ { "@arg" = "foo \ -+bar" } ++ { "@arg" = "foo \\\nbar" } + } - (* Local Variables: *) - (* mode: caml *) + (* Test: Shellvars.lns + Support pipes in commands *) -- -2.1.0 +2.5.0 diff --git a/main/augeas/0018-Shellvars-allow-command-specific-environment-variabl.patch b/main/augeas/0018-Shellvars-allow-command-specific-environment-variabl.patch new file mode 100644 index 0000000000..d4bb1cc646 --- /dev/null +++ b/main/augeas/0018-Shellvars-allow-command-specific-environment-variabl.patch @@ -0,0 +1,46 @@ +From 8ef26da233c2d6db1455f74b572de77944efefe0 Mon Sep 17 00:00:00 2001 +From: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi> +Date: Fri, 26 Dec 2014 13:27:13 +0200 +Subject: [PATCH 18/19] Shellvars: allow command-specific environment variables + +--- + lenses/shellvars.aug | 4 +++- + lenses/tests/test_shellvars.aug | 7 +++++++ + 2 files changed, 10 insertions(+), 1 deletion(-) + +diff --git a/lenses/shellvars.aug b/lenses/shellvars.aug +index f7f4c47..3d05da5 100644 +--- a/lenses/shellvars.aug ++++ b/lenses/shellvars.aug +@@ -157,7 +157,9 @@ module Shellvars = + in let pipe = action_pipe (entry_eol_item command | entry_item command) + in let and = action_and entry + in let or = action_or entry +- in Util.indent . label "@command" . store (word - reserved_key) ++ in Util.indent . label "@command" ++ . [ key key_re . eq . store anyquot . Sep.space . del /(\\\\\n[ \t]*)?/ "" ]* ++ . store (word - reserved_key) + . [ Sep.space . label "@arg" . sto_to_semicol]? + . ( pipe | and | or )? + +diff --git a/lenses/tests/test_shellvars.aug b/lenses/tests/test_shellvars.aug +index 07c392e..29f9e75 100644 +--- a/lenses/tests/test_shellvars.aug ++++ b/lenses/tests/test_shellvars.aug +@@ -672,6 +672,13 @@ test Shellvars.lns get "cat /etc/issue | grep -q \"Debian\" && echo moo || echo + { "@command" = "echo" + { "@arg" = "baa" } } } } } } } } + ++(* Command-specific environment variables *) ++test Shellvars.lns get "abc=def \\\n ghi=\"jkl mno\" command arg1 arg2\n" = ++ { "@command" = "command" ++ { "abc" = "def" } ++ { "ghi" = "\"jkl mno\"" } ++ { "@arg" = "arg1 arg2" } ++ } + + (* Local Variables: *) + (* mode: caml *) +-- +2.5.0 + diff --git a/main/augeas/0019-Shellvars-allow-wrapping-command-sequences.patch b/main/augeas/0019-Shellvars-allow-wrapping-command-sequences.patch new file mode 100644 index 0000000000..5571f1ba0d --- /dev/null +++ b/main/augeas/0019-Shellvars-allow-wrapping-command-sequences.patch @@ -0,0 +1,94 @@ +From f17fabf6aff94b632f733896effdb7856a46d948 Mon Sep 17 00:00:00 2001 +From: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi> +Date: Sat, 12 Dec 2015 17:49:51 +0200 +Subject: [PATCH 19/19] Shellvars: allow wrapping command sequences + +--- + lenses/shellvars.aug | 10 +++++----- + lenses/tests/test_shellvars.aug | 14 +++++++++++++- + 2 files changed, 18 insertions(+), 6 deletions(-) + +diff --git a/lenses/shellvars.aug b/lenses/shellvars.aug +index 3d05da5..d62bca0 100644 +--- a/lenses/shellvars.aug ++++ b/lenses/shellvars.aug +@@ -34,7 +34,7 @@ module Shellvars = + let xchgs = Build.xchgs + let semicol = del /;?/ "" + +- let char = /[^`;()'"&|\n\\# \t]#*|\\\\(.|\n)/ ++ let char = /[^`;()'"&|\n\\# \t]#*|\\\\./ + let dquot = + let char = /[^"\\]|\\\\./ | Rx.cl + in "\"" . char* . "\"" (* " Emacs, relax *) +@@ -46,7 +46,7 @@ module Shellvars = + let dollar_arithm = /\$\(\([^\)#\n]*\)\)/ + + let anyquot = (char|dquot|squot|dollar_assign|dollar_arithm)+ | bquot | dbquot +- let sto_to_semicol = store (anyquot . (Rx.space . anyquot)*) ++ let sto_to_semicol = store (anyquot . (Rx.cl_or_space . anyquot)*) + + (* Array values of the form '(val1 val2 val3)'. We do not handle empty *) + (* arrays here because of typechecking headaches. Instead, they are *) +@@ -95,7 +95,7 @@ module Shellvars = + let builtin = + Util.indent . label "@builtin" + . store shell_builtin_cmds +- . (Util.del_ws_spc ++ . (Sep.cl_or_space + . [ label "args" . sto_to_semicol ])? + + let keyword (kw:string) = Util.indent . Util.del_str kw +@@ -107,7 +107,7 @@ module Shellvars = + . ( Util.del_ws_spc . store Rx.integer )? + + let action (operator:string) (lbl:string) (sto:lens) = +- [ del (Rx.opt_space . operator . Rx.opt_space) (" " . operator . " ") ++ [ del (Rx.cl_or_opt_space . operator . Rx.cl_or_opt_space) (" " . operator . " ") + . label ("@".lbl) . sto ] + + let action_pipe = action "|" "pipe" +@@ -160,7 +160,7 @@ module Shellvars = + in Util.indent . label "@command" + . [ key key_re . eq . store anyquot . Sep.space . del /(\\\\\n[ \t]*)?/ "" ]* + . store (word - reserved_key) +- . [ Sep.space . label "@arg" . sto_to_semicol]? ++ . [ Sep.cl_or_space . label "@arg" . sto_to_semicol]? + . ( pipe | and | or )? + + let entry_eol = entry_eol_nocommand +diff --git a/lenses/tests/test_shellvars.aug b/lenses/tests/test_shellvars.aug +index 29f9e75..673fc0d 100644 +--- a/lenses/tests/test_shellvars.aug ++++ b/lenses/tests/test_shellvars.aug +@@ -168,7 +168,7 @@ unset ONBOOT # We do not want this var + (* Allow wrapping builtin arguments to multiple lines *) + test Shellvars.lns get "ulimit -c \\\nunlimited\nulimit \\\n -x 123\n" = + { "@builtin" = "ulimit" { "args" = "-c \\\nunlimited" } } +- { "@builtin" = "ulimit" { "args" = "\\\n -x 123" } } ++ { "@builtin" = "ulimit" { "args" = "-x 123" } } + + (* Test semicolons *) + test lns get "VAR1=\"this;is;a;test\"\nVAR2=this;\n" = +@@ -680,6 +680,18 @@ test Shellvars.lns get "abc=def \\\n ghi=\"jkl mno\" command arg1 arg2\n" = + { "@arg" = "arg1 arg2" } + } + ++(* Wrapped command sequences *) ++ ++test Shellvars.lns get "foo && \\\nbar baz \\\n|| qux \\\n quux\\\ncorge grault\n" = ++ { "@command" = "foo" ++ { "@and" ++ { "@command" = "bar" ++ { "@arg" = "baz" } ++ { "@or" { "@command" = "qux" { "@arg" = "quux\\\ncorge grault" } } } ++ } ++ } ++ } ++ + (* Local Variables: *) + (* mode: caml *) + (* End: *) +-- +2.5.0 + diff --git a/main/augeas/APKBUILD b/main/augeas/APKBUILD index db9e53a3ab..0f050a77ab 100644 --- a/main/augeas/APKBUILD +++ b/main/augeas/APKBUILD @@ -1,7 +1,7 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=augeas pkgver=1.4.0 -pkgrel=2 +pkgrel=3 pkgdesc="A configuration editing tool" url="http://augeas.net" arch="all" @@ -20,13 +20,17 @@ source="http://download.augeas.net/augeas-$pkgver.tar.gz 0006-Shellvars-allow-wrapping-builtin-arguments-to-multip.patch 0007-Shellvars-allow-quotes-in-loop-conditions.patch 0008-Shellvars-case-support-quotes-and-spaces-in-pattern-.patch - 0009-Shellvars-pattern-nodes-in-case-entries.patch - 0010-Shellvars-use-sto_to_semicol-in-condition-lens.patch - 0011-Shellvars-allow-and-constructs-after-condition.patch - 0012-Shellvars-Allow-almost-any-command.patch - 0013-Shellvars-test-case-for-wrapping-command-arguments.patch - 0014-Shellvars-allow-command-specific-environment-variabl.patch - 0015-Shellvars-allow-and-constructs-after-command.patch" + 0009-Shellvars-add-eval-builtin-support.patch + 0010-Shellvars-add-alias-builtin-support.patch + 0011-Shellvars-pattern-nodes-in-case-entries.patch + 0012-Shellvars-use-sto_to_semicol-in-condition-lens.patch + 0013-Shellvars-allow-and-constructs-after-condition.patch + 0014-Shellvars-Allow-almost-any-command.patch + 0015-Shellvars-support-pipes-in-commands.patch + 0016-Shellvars-allow-in-commands.patch + 0017-Shellvars-test-case-for-wrapping-command-arguments.patch + 0018-Shellvars-allow-command-specific-environment-variabl.patch + 0019-Shellvars-allow-wrapping-command-sequences.patch" _builddir="$srcdir"/$pkgname-$pkgver prepare() { @@ -76,50 +80,62 @@ libs() { } md5sums="a2536a9c3d744dc09d234228fe4b0c93 augeas-1.4.0.tar.gz -dd18a5a32b334ef3b7e6e82058c61eaa 0001-Shellvars-accept-and-builtins.patch -e6a07b02ee5181b5957d6f568c70739f 0002-Shellvars-Add-test-for.patch -33696bba63ac77dd3b9135565ececd0e 0003-Shellvars-allow-partial-quoting-mixing-multiple-styl.patch -9957857fbf7b6e9d9e072854e983cc3e 0004-Shellvars-allow-wrapping-loop-condition-to-multiple-.patch -99fb6ebd2d87e6d5d51bd8247b1bfee8 0005-Shellvars-guard-against-comments.patch -fa2f0d09ab6256b349af9155bbd4fa23 0006-Shellvars-allow-wrapping-builtin-arguments-to-multip.patch -6d3804e6243360eeebaf0e3187d42c9c 0007-Shellvars-allow-quotes-in-loop-conditions.patch -f1e6bc097099d5cbb7f57514bd20c1cc 0008-Shellvars-case-support-quotes-and-spaces-in-pattern-.patch -2c2d132a5d91540ea8c4bee299fced52 0009-Shellvars-pattern-nodes-in-case-entries.patch -d4db1ad5da2e2f6a469c2fe56717948d 0010-Shellvars-use-sto_to_semicol-in-condition-lens.patch -5d60247adedb864c8daef3f72e3b02cc 0011-Shellvars-allow-and-constructs-after-condition.patch -5456ee24abf568f93feadd8993cefb70 0012-Shellvars-Allow-almost-any-command.patch -577da7030c48a4dfd793d81a834070b7 0013-Shellvars-test-case-for-wrapping-command-arguments.patch -b7f6583e3fe1859060cf212038c633d4 0014-Shellvars-allow-command-specific-environment-variabl.patch -345e0227b918c6ba5406e0d577aba9b0 0015-Shellvars-allow-and-constructs-after-command.patch" +3392ae3abc40efe5d7c8ce4ce5738df8 0001-Shellvars-accept-and-builtins.patch +aa2f18bd6b439db9345d7492d260d5a7 0002-Shellvars-Add-test-for.patch +7ed3fd8d6541716cbb63c11db48de9e0 0003-Shellvars-allow-partial-quoting-mixing-multiple-styl.patch +1420d337f79a9960ed8c6e0d68587f48 0004-Shellvars-allow-wrapping-loop-condition-to-multiple-.patch +1a233f9d67f0e0c3063e253e3fd3f62b 0005-Shellvars-guard-against-comments.patch +0ddc164b5e0558b9a8c1e163c5806109 0006-Shellvars-allow-wrapping-builtin-arguments-to-multip.patch +afb986370fca48ca5d5c16c7b7ef6a3c 0007-Shellvars-allow-quotes-in-loop-conditions.patch +4fd047af91ebf6400fe34b7f2bae7667 0008-Shellvars-case-support-quotes-and-spaces-in-pattern-.patch +94c30b3ef837bbc16e4e8daf498ee0c6 0009-Shellvars-add-eval-builtin-support.patch +3e99adf29c5e4d228b5f7e1993e35ff4 0010-Shellvars-add-alias-builtin-support.patch +9d6302c8a13dc8d348768b2b00310197 0011-Shellvars-pattern-nodes-in-case-entries.patch +ba07705f460888555f7a7b7ff28d2136 0012-Shellvars-use-sto_to_semicol-in-condition-lens.patch +a1321510dec7d5ea3f76598b1e673a10 0013-Shellvars-allow-and-constructs-after-condition.patch +6481d28202a6ed3774f5275c9c23eb28 0014-Shellvars-Allow-almost-any-command.patch +6370c721ce09c29f2707f37e1cbe1ac5 0015-Shellvars-support-pipes-in-commands.patch +3ff071044714c89268935589a43d8315 0016-Shellvars-allow-in-commands.patch +685947f3c076d51fe268585442cee0d3 0017-Shellvars-test-case-for-wrapping-command-arguments.patch +c27de94c7097126f0ff0d3c72380563a 0018-Shellvars-allow-command-specific-environment-variabl.patch +a7709c66872d398a1a2688d0fa87e7ef 0019-Shellvars-allow-wrapping-command-sequences.patch" sha256sums="659fae7ac229029e60a869a3b88c616cfd51cf2fba286cdfe3af3a052cb35b30 augeas-1.4.0.tar.gz -4e2b4b6aa5efa3af3cc936ddea2877d28501e617967d8fac028fa7859315952b 0001-Shellvars-accept-and-builtins.patch -50009cc329c6cfeb7f6f3823fd29e2d7a7215bd0b479c7525d22d5cff0f11131 0002-Shellvars-Add-test-for.patch -d38a0b9608fd8c00cc432ceb244908e413e5c660e8efba8594fc8ad1f59f1209 0003-Shellvars-allow-partial-quoting-mixing-multiple-styl.patch -6518600c844a088c961d2bf03df15099dc5f507b0e442aa7581e1f05c281f10d 0004-Shellvars-allow-wrapping-loop-condition-to-multiple-.patch -286b9b6bcfa52a1772b114088d75842c543ef548729b903ee359182fa3bb1e0f 0005-Shellvars-guard-against-comments.patch -b15ad47b8c6e8c02081a2342a965353f4182bd840f3ef7bc18db73e58159c655 0006-Shellvars-allow-wrapping-builtin-arguments-to-multip.patch -11b3f3a0ba74e04e5ac6f340cbb4b4fbcee5bd142534d408d80501c80ca32240 0007-Shellvars-allow-quotes-in-loop-conditions.patch -55a5c2ab166cbe88287e872c52d3d5e57a73bb587e04b3d2fe8ce6460a132817 0008-Shellvars-case-support-quotes-and-spaces-in-pattern-.patch -c9bf0528f74a4866661a16f41c1d5e81eb803e593b812b66effa27c04791cd28 0009-Shellvars-pattern-nodes-in-case-entries.patch -6392c4219f178a241ae4dbf268dbbee7562a0301f1cce7eb43dd82cad6a7cbfa 0010-Shellvars-use-sto_to_semicol-in-condition-lens.patch -105d148f50e534cc1786b0379d9c69536e922519d7536a297c08bc73526f641d 0011-Shellvars-allow-and-constructs-after-condition.patch -e4a7a876969166477b5f1517b4c920ff996ced8bc5a41115709e511c7c1a352c 0012-Shellvars-Allow-almost-any-command.patch -80469ddc2bbbd3b0468d2e7cb703794021b1aeff9a2efd62236048702fcd0b28 0013-Shellvars-test-case-for-wrapping-command-arguments.patch -df7c1ee1cd823dce1cb6707a362f453bbda0e6d334c1f50e3b0780fe79513947 0014-Shellvars-allow-command-specific-environment-variabl.patch -a5c93542a462c1ede1f2bc6b92da9506f18622208541a2b353d77a1fc89f593f 0015-Shellvars-allow-and-constructs-after-command.patch" +646bfcdd6b30f253d50354ba96070018fb3a9f4f123d7a0cfe25b01ec729b176 0001-Shellvars-accept-and-builtins.patch +8c59fe6a3d3bf1a52a5d110adb1547634c550ce2d318728755fb5ba33ef8c091 0002-Shellvars-Add-test-for.patch +c6c774342a77f6766e4ceceafe18aeccd05f695da6cfc8b5438e4939d8b8047a 0003-Shellvars-allow-partial-quoting-mixing-multiple-styl.patch +b84c69a6bc2b9de448c2f7b09b68dbac52b9b55cf81b7fd25d210bee1ad37ae3 0004-Shellvars-allow-wrapping-loop-condition-to-multiple-.patch +f2d514899a46902534a9c7a87f1074fda2b07c45deaeb0bac270decc7c7364ed 0005-Shellvars-guard-against-comments.patch +e735f982619ef9a623badd68e316e820d5e98f53dc3fb031fbef1918487a7073 0006-Shellvars-allow-wrapping-builtin-arguments-to-multip.patch +b41b2fe13eb9155da6ef2e310961009f6bf978e02a628315b5c0347cc19b54f6 0007-Shellvars-allow-quotes-in-loop-conditions.patch +63da3848ae0202c258e9ea4a5f8392f2b1fd83a1104e08da120ab0f9e50213d6 0008-Shellvars-case-support-quotes-and-spaces-in-pattern-.patch +f54a4f8c1b64cf405261c9959b40ab598084ab85dc05e5ab18103f17786d120d 0009-Shellvars-add-eval-builtin-support.patch +fa64fe69036cacb2d4e94a1ac978e4feb2eea44ed520760814486d1890c06bca 0010-Shellvars-add-alias-builtin-support.patch +063734ec0dc6eefc8435550372e3fed30695c35e68ae9e7406b32e2b4077a0fb 0011-Shellvars-pattern-nodes-in-case-entries.patch +6df998175ce3063f0ff027ccb931132a8ff3baca25dba2d518dd93a762727375 0012-Shellvars-use-sto_to_semicol-in-condition-lens.patch +a53617eb365e0721f9a2d56863039354b9a90255f94923280c43642b47eed34a 0013-Shellvars-allow-and-constructs-after-condition.patch +d3e954b69e29a80f1a08968dafd462fa413bbef1cc3755d9676ba7e95cd343aa 0014-Shellvars-Allow-almost-any-command.patch +714b8a1291eb0619230bb3563a78391abb66d1cbe6918ef23f373388e6374d1c 0015-Shellvars-support-pipes-in-commands.patch +266543e2988dd630d858a45885160b938c55839119472dff4afe66f656978863 0016-Shellvars-allow-in-commands.patch +a23f777e4b525e7de038de2234dccc732fb6704eeb5a01d1b7d2c5ec979c50bd 0017-Shellvars-test-case-for-wrapping-command-arguments.patch +e0ab2fdbcb48e0109e59d57505206f63684143847309166f82c1dd5b7385eba2 0018-Shellvars-allow-command-specific-environment-variabl.patch +a56ed7f49b4e562a6374783f984273aa505ccf4a7ca05bcc721904f684ead2bd 0019-Shellvars-allow-wrapping-command-sequences.patch" sha512sums="182457698e51be89feadb16879bae2f2413a5761127efb63a9b7ef30806f4059bca614e8c9627b0c7a010b9ec9c03c85161e655bdb2902f7cf43e89b66e312db augeas-1.4.0.tar.gz -05680719679fed94a6b5032227b99d70706e704cfccfb1abffa80cabc7676d9578882558be146ca2fd182655dbaad76f64e392dc2eed0c22bc7340900258728b 0001-Shellvars-accept-and-builtins.patch -c3619e40b260e4bbb8ad12d545887b1e9f59d4e14fc909cfa63a4e61db8cfbeed34fade8c48f0a83bc8341b2f9a080953d4e46510d92fb33b72c7cc5e5a5fa5f 0002-Shellvars-Add-test-for.patch -e3602e45391149fc9dfd16d9bb9f24da200639d303275c0d5ff4a48bfc4d098d030eb8c695dab1ef467df27fb990567c951c21a0da6833d101edd9139a342000 0003-Shellvars-allow-partial-quoting-mixing-multiple-styl.patch -1200f683d0c26d8ef043bca958ce9b7d4e69f7a2321b569c6b436696a3fcf7f2325e2126e630e7699d25157bc95fe84db6e0dedf82f2bda08f6e1e8fd59d091e 0004-Shellvars-allow-wrapping-loop-condition-to-multiple-.patch -2be7ae4d668fed6f1ca33cd8aab772bb3aac897a2e455129dcd7e3d992aa405649a1f12a3ca0490e84d7c74ec2856fd3797e0ffa2381edf460ad0f01cb8bcd85 0005-Shellvars-guard-against-comments.patch -11304c8a1560bfaa532efc4d80fd6ef807089c299c3caf54d9156a107e7a520fc4a88d421166e5f4f270ca175cc8ab9c70b0ddad9c6afa8b28939d7e147930be 0006-Shellvars-allow-wrapping-builtin-arguments-to-multip.patch -9afe8fab05a89c5444ea19845aaeda996aecfe4937293b37c74c4ed58a11f480b16de8d196461e9b6d3a695f5748dd49b8d31668a734ddb03092cd66b26b685e 0007-Shellvars-allow-quotes-in-loop-conditions.patch -f01d11da984e4d8a3b736b70cbd4a06f0ae516bffe076de7c95557d685c939627ce8e801f08caad383b419b8494b0fa472b6adb36ae9ed96c6787f22f5726393 0008-Shellvars-case-support-quotes-and-spaces-in-pattern-.patch -787c8599bcbafabe2df45a70dfe8f85e1a1c91c78bd08b3c29e969c17f923ef988b435a071f8ce44fcd42769d16a5a49e51fc6aef06df82f40cbdf8b522577e8 0009-Shellvars-pattern-nodes-in-case-entries.patch -5b6e3167891809c91413d05159b51e1092f96dc3b25c4ab09c462ace21a840600f055b28ee6c17fd449f51788730540463815b934e9e7e0a0e2ccb4127868de5 0010-Shellvars-use-sto_to_semicol-in-condition-lens.patch -ce8078be725705068d12f0a7885543af2d5ba4915439d8a8c7caa25723faba3961d3cc3dd4f104adbac2ba15b79aa57bcf1e33e61e6f39e51ab9666c1196dbf7 0011-Shellvars-allow-and-constructs-after-condition.patch -534e72da2348d45ed737a2fe7d38c32facb15ecc47be29825ad30fbeac9e44387b463a708323b6a2d002c3ab5a589f70c7328b4e8e8a1d8e3e1bd54e2d11a820 0012-Shellvars-Allow-almost-any-command.patch -9c30da11cf0e278d0a68f6daad7d2ae546a91c45fdec637178ab78a2d61e6987e93d1ba7b2566c1974572458822d16befd69b11d0518191019e2ebdf60780013 0013-Shellvars-test-case-for-wrapping-command-arguments.patch -f668ec144e12ace83340a546331f12de21994c125f34dc3a62bbdc1aee502d28581e756ed04660b170a301925bfad756500ac6cb8d354fb678333909bdc1887a 0014-Shellvars-allow-command-specific-environment-variabl.patch -1793d37d31e8a9a98353f29f6150b2f0fd7e8bdf682511cda7f4dfc477b0f44713438fb35e40327099857c51288f54c18904264b9dc56b0bbe9912cc34acc487 0015-Shellvars-allow-and-constructs-after-command.patch" +b178c3b36a87d6eb07fed9016385fd8f179564984fb30f6fed7ba7a55ad50fbd100b27f704aa2fb7b95bd4f6d2f66509c8cb7fe57e45ba0a825a2b00992b4a6b 0001-Shellvars-accept-and-builtins.patch +0ef979edb7e4a7d7a889f8820c63a969bae7a589a2a5bea579ff7f6ed9804e91f542eada786c8c665f8f5a72b343e600dc79e63103d381e7a8e85126c564b871 0002-Shellvars-Add-test-for.patch +6fd8ccc3a3673f35864ad2187cd80524d02901ff76d8bdfc4e3dfa2fc9d1a56877c0e774945642a42c5fd1b9b756242e1261d1421521dde4f92ee26d1d00c6e9 0003-Shellvars-allow-partial-quoting-mixing-multiple-styl.patch +65eb4159e67ccfd2dc4afd9ed213061d4edfb286e7325aaf6f898c72b552cb6793c315c03ced32e5ffcba21ce2e40b810c04bdbce9f2fc21ecd184e3885a2e6f 0004-Shellvars-allow-wrapping-loop-condition-to-multiple-.patch +ae56a3d5eb9ba39b503abbbaf0d4d704afa22014b0f95c0fa1c2410706e975fd2a03c7790314a09667c9fbdba979bc47e0dbf1f8b62afb35666d0ce743dd73c7 0005-Shellvars-guard-against-comments.patch +c2b635fc45aaf6a585ecdd34408fa231428d812f9d79b2d5e3fe6366fa6a9d4a774731245c6f426f547c767594f4b825e393a669b79b2dffea44a3db6dbfc380 0006-Shellvars-allow-wrapping-builtin-arguments-to-multip.patch +150b79f481ead8e1c38ecc42af747dfa3906b283fc481f0e81ec08b2569aac2872800128ed1fbed3f9d1d98b7406620298c1f975f0cf29cac545020259f75f0a 0007-Shellvars-allow-quotes-in-loop-conditions.patch +1c8aceb221767c7f3de26d405764a1122058993ca6e6119508037720ef74a66a9c3637bb1b9e665cada26c782b59083f3f80219f06b0cc38177694b7798e7599 0008-Shellvars-case-support-quotes-and-spaces-in-pattern-.patch +06b7bd2c5d326dd816b49932af8d5a1ca0d1361188a958ec874b2130f195768a4fad43acc01c2768cfb803fef2199df12e2bc03c34f3263e4678416e41b234ab 0009-Shellvars-add-eval-builtin-support.patch +3bd5aeae956be4902046e51e4bf5200812c6c09b32e550cc186ed5fdeca4be13ffc515849383fb4d16d074459fce0b7a6accecd6bf86624d9b9f3d982b357197 0010-Shellvars-add-alias-builtin-support.patch +c3f8e2a42979125bea55b7759eccfd2173f57c9fe91fafe2cac6c6309b15fd6eaebc842550577f0b75665381b39ed10e644b995759ee4f9d8d261a48c1dc7b91 0011-Shellvars-pattern-nodes-in-case-entries.patch +52655bd119b9813e6b90c27975e30190ee8c1273ff929ae392e522ddc382830dd1e230f10bedaeb535fdf0d89aaafa2cb7d8fbbf8c31923105a19b76e1e8a095 0012-Shellvars-use-sto_to_semicol-in-condition-lens.patch +842d227eabe4ba9571f8d58ec5f936b7ffe6861bada9501f43458627dfe450691eb9589f1d483b83065ba20c5c5e1c571b9081f67f148c4a65474433f32439f8 0013-Shellvars-allow-and-constructs-after-condition.patch +ba80bbd54e08d0e2ba836334f1b2fddd5b375d4a5cdf2579dbc116297066187220c20d372fcfb4abe3c469c7720a20d877f226fb9215f079ce068c33c53526e5 0014-Shellvars-Allow-almost-any-command.patch +48aea6e755769969544c6627a0b1993db065dd98e3de07f9d30c8d6caec7aec9fff057c62403bab46dc0551f207879096e58fa4de68683d46685bcb4d96f25a7 0015-Shellvars-support-pipes-in-commands.patch +43d93a08719f616cb7b4656f9990384be29ca043a2b04cb7e8e6350d0a586402fe7a13d032b32c8e4ca7f04cd48ff15a95b58275ed276fad57e44bd5817dca8f 0016-Shellvars-allow-in-commands.patch +e46caf1b759e9a402cb27aa4bfa134896fd6816ba2614fa49f407ad8e9fe81b05e4e4fd1e128c8215cf0133aa3dbab000a7c5492c109e85dc23d76b686aa6413 0017-Shellvars-test-case-for-wrapping-command-arguments.patch +f852015ed1a4bbbca7241f291c6fa6f4bd6fb69ac1c3d62113c2f5bff7e07c4fbc82469ea69f8ac3d5cb905dd95e34e9ed05682d6568173eab1fe933737f5de5 0018-Shellvars-allow-command-specific-environment-variabl.patch +0b1ef0b3bbd22da7c35140ddb8b6855c33d93fb0f0004804a5acf2be55828434d5a719f6b94e256d4e6585bf0e4857b57f659a8ae557d5ad819fbc5d8b0e4264 0019-Shellvars-allow-wrapping-command-sequences.patch" |