aboutsummaryrefslogtreecommitdiffstats
path: root/main/augeas
diff options
context:
space:
mode:
authorKaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>2015-07-13 15:43:34 +0300
committerKaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>2015-07-13 15:50:18 +0300
commitea3025c253dbfaf405eecd8f2388eda9be556e22 (patch)
treec4d369c46a8b0dcd991ab148ba14399fbb910f55 /main/augeas
parent2da6699882bdacca2069bef0aa1cc4dd4da7f5b8 (diff)
downloadaports-ea3025c253dbfaf405eecd8f2388eda9be556e22.tar.bz2
aports-ea3025c253dbfaf405eecd8f2388eda9be556e22.tar.xz
main/augeas: align patch set with upstream
01-08: committed to upstream 09-11: GH #265 12: GH #119 13-14: dependency to 12 15: dependency to 09-12
Diffstat (limited to 'main/augeas')
-rw-r--r--main/augeas/0001-Shellvars-accept-and-builtins.patch64
-rw-r--r--main/augeas/0002-Shellvars-Add-test-for.patch27
-rw-r--r--main/augeas/0003-Shellvars-allow-partial-quoting-mixing-multiple-styl.patch (renamed from main/augeas/0001-Shellvars-allow-partial-quoting-mixing-multiple-styl.patch)18
-rw-r--r--main/augeas/0004-Shellvars-allow-wrapping-loop-condition-to-multiple-.patch (renamed from main/augeas/0002-Shellvars-allow-wrapping-loop-condition-to-multiple-.patch)18
-rw-r--r--main/augeas/0005-Shellvars-guard-against-comments.patch (renamed from main/augeas/0003-Shellvars-guard-against-comments.patch)10
-rw-r--r--main/augeas/0006-Shellvars-allow-wrapping-builtin-arguments-to-multip.patch (renamed from main/augeas/0004-Shellvars-allow-wrapping-builtin-arguments-to-multip.patch)12
-rw-r--r--main/augeas/0007-Shellvars-allow-quotes-in-loop-conditions.patch (renamed from main/augeas/0005-Shellvars-allow-quotes-in-loop-conditions.patch)16
-rw-r--r--main/augeas/0008-Shellvars-case-support-quotes-and-spaces-in-pattern-.patch (renamed from main/augeas/0006-Shellvars-case-support-quotes-and-spaces-in-pattern-.patch)16
-rw-r--r--main/augeas/0009-Shellvars-pattern-nodes-in-case-entries.patch172
-rw-r--r--main/augeas/0010-Shellvars-allow-the-builtin.patch41
-rw-r--r--main/augeas/0010-Shellvars-use-sto_to_semicol-in-condition-lens.patch28
-rw-r--r--main/augeas/0011-Shellvars-allow-and-constructs-after-condition.patch60
-rw-r--r--main/augeas/0012-Shellvars-Allow-almost-any-command.patch (renamed from main/augeas/0007-Shellvars-Allow-almost-any-command.patch)37
-rw-r--r--main/augeas/0013-Shellvars-test-case-for-wrapping-command-arguments.patch (renamed from main/augeas/0008-Shellvars-test-case-for-wrapping-command-arguments.patch)10
-rw-r--r--main/augeas/0014-Shellvars-allow-command-specific-environment-variabl.patch (renamed from main/augeas/0011-Shellvars-allow-command-specific-environment-variabl.patch)16
-rw-r--r--main/augeas/0015-Shellvars-allow-and-constructs-after-command.patch65
-rw-r--r--main/augeas/APKBUILD102
17 files changed, 555 insertions, 157 deletions
diff --git a/main/augeas/0001-Shellvars-accept-and-builtins.patch b/main/augeas/0001-Shellvars-accept-and-builtins.patch
new file mode 100644
index 0000000000..53f5ddbd55
--- /dev/null
+++ b/main/augeas/0001-Shellvars-accept-and-builtins.patch
@@ -0,0 +1,64 @@
+From 37a817680eb162a21fa6e2eac8feda5973dfb465 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
+
+Fix GH #188
+---
+ lenses/shellvars.aug | 9 +++++++++
+ lenses/tests/test_shellvars.aug | 5 +++++
+ 2 files changed, 14 insertions(+)
+
+diff --git a/lenses/shellvars.aug b/lenses/shellvars.aug
+index 25bb82b..b988972 100644
+--- a/lenses/shellvars.aug
++++ b/lenses/shellvars.aug
+@@ -105,6 +105,13 @@ module Shellvars =
+ . Util.del_str "return"
+ . ( Util.del_ws_spc . store Rx.integer )?
+
++ let condition =
++ let sto_cond = store /[^[#; \t\n][^#;\n]+[^]#; \t\n]|[^[]#; \t\n]+/
++ in let cond (start:string) (end:string) = [ label "type" . store start ]
++ . Util.del_ws_spc . sto_cond
++ . Util.del_ws_spc . Util.del_str end
++ in Util.indent . label "@condition" . (cond "[" "]" | cond "[[" "]]")
++
+
+ (************************************************************************
+ * Group: CONDITIONALS AND LOOPS
+@@ -169,6 +176,7 @@ module Shellvars =
+ | entry_eol_item bare_export
+ | entry_eol_item builtin
+ | entry_eol_item return
++ | entry_eol_item condition
+
+ let entry_noeol =
+ let entry_item (item:lens) = [ item ] in
+@@ -178,6 +186,7 @@ module Shellvars =
+ | entry_item bare_export
+ | entry_item builtin
+ | entry_item return
++ | entry_item condition
+
+ 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 7a89f11..778a8d2 100644
+--- a/lenses/tests/test_shellvars.aug
++++ b/lenses/tests/test_shellvars.aug
+@@ -536,6 +536,11 @@ fi\n" =
+ test lns get "var[alpha_beta,gamma]=something\n" =
+ { "var[alpha_beta,gamma]" = "something" }
+
++ (* GH #188: support more conditions *)
++ test Shellvars.lns get "[ -f $FILENAME ]\n" =
++ { "@condition" = "-f $FILENAME"
++ { "type" = "[" } }
++
+ (* Local Variables: *)
+ (* mode: caml *)
+ (* End: *)
+--
+2.1.0
+
diff --git a/main/augeas/0002-Shellvars-Add-test-for.patch b/main/augeas/0002-Shellvars-Add-test-for.patch
new file mode 100644
index 0000000000..d55cfcc6dc
--- /dev/null
+++ b/main/augeas/0002-Shellvars-Add-test-for.patch
@@ -0,0 +1,27 @@
+From e038a40dc8c7c4e2121ce40fc493c26f8cfcc46f 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 [[]]
+
+---
+ lenses/tests/test_shellvars.aug | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/lenses/tests/test_shellvars.aug b/lenses/tests/test_shellvars.aug
+index 778a8d2..a2d4f28 100644
+--- a/lenses/tests/test_shellvars.aug
++++ b/lenses/tests/test_shellvars.aug
+@@ -541,6 +541,10 @@ fi\n" =
+ { "@condition" = "-f $FILENAME"
+ { "type" = "[" } }
+
++ test Shellvars.lns get "[[ -f $FILENAME ]]\n" =
++ { "@condition" = "-f $FILENAME"
++ { "type" = "[[" } }
++
+ (* Local Variables: *)
+ (* mode: caml *)
+ (* End: *)
+--
+2.1.0
+
diff --git a/main/augeas/0001-Shellvars-allow-partial-quoting-mixing-multiple-styl.patch b/main/augeas/0003-Shellvars-allow-partial-quoting-mixing-multiple-styl.patch
index 264f86584c..483f1f6e27 100644
--- a/main/augeas/0001-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 3c55c13c294b031d2210331c3d6c3b12b3640618 Mon Sep 17 00:00:00 2001
+From a70c92f52136398ffbe6e5fd70effd3984e84a5f 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 01/10] Shellvars: allow partial quoting, mixing multiple
+Subject: [PATCH 03/15] Shellvars: allow partial quoting, mixing multiple
styles
---
@@ -10,10 +10,10 @@ Subject: [PATCH 01/10] Shellvars: allow partial quoting, mixing multiple
2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/lenses/shellvars.aug b/lenses/shellvars.aug
-index 073f69b..60091a9 100644
+index b988972..d25e8ca 100644
--- a/lenses/shellvars.aug
+++ b/lenses/shellvars.aug
-@@ -31,7 +31,7 @@ module Shellvars =
+@@ -34,7 +34,7 @@ module Shellvars =
let xchgs = Build.xchgs
let semicol = del /;?/ ""
@@ -22,7 +22,7 @@ index 073f69b..60091a9 100644
let dquot =
let char = /[^"\\]|\\\\./ | Rx.cl
in "\"" . char* . "\"" (* " Emacs, relax *)
-@@ -42,7 +42,7 @@ module Shellvars =
+@@ -45,7 +45,7 @@ module Shellvars =
let dollar_assign = /\$\([^\(\)#\n]*\)/
let dollar_arithm = /\$\(\([^\)#\n]*\)\)/
@@ -31,7 +31,7 @@ index 073f69b..60091a9 100644
let to_semicol_re = /[^#; \t\n][^#;\n]+[^#; \t\n]|[^#; \t\n]+/
let sto_to_semicol = store to_semicol_re
-@@ -57,7 +57,7 @@ module Shellvars =
+@@ -60,7 +60,7 @@ module Shellvars =
(* arrays here because of typechecking headaches. Instead, they are *)
(* treated as a simple value *)
let array =
@@ -40,7 +40,7 @@ index 073f69b..60091a9 100644
del /\([ \t]*/ "(" . counter "values" .
[ seq "values" . array_value ] .
[ del /[ \t\n]+/ " " . seq "values" . array_value ] *
-@@ -67,7 +67,7 @@ module Shellvars =
+@@ -70,7 +70,7 @@ module Shellvars =
(* but fairly close. *)
let simple_value =
let empty_array = /\([ \t]*\)/ in
@@ -50,7 +50,7 @@ index 073f69b..60091a9 100644
let export = [ key "export" . Util.del_ws_spc ]
let kv = Util.indent . export? . key key_re
diff --git a/lenses/tests/test_shellvars.aug b/lenses/tests/test_shellvars.aug
-index 42fc2bd..e4fd79f 100644
+index a2d4f28..864cb6c 100644
--- a/lenses/tests/test_shellvars.aug
+++ b/lenses/tests/test_shellvars.aug
@@ -399,6 +399,10 @@ esac\n" =
@@ -65,5 +65,5 @@ index 42fc2bd..e4fd79f 100644
test Shellvars.lns get "unset ${!LC_*}\n" =
{ "@unset"
--
-1.8.3.1
+2.1.0
diff --git a/main/augeas/0002-Shellvars-allow-wrapping-loop-condition-to-multiple-.patch b/main/augeas/0004-Shellvars-allow-wrapping-loop-condition-to-multiple-.patch
index 29f73e6ae7..8583912080 100644
--- a/main/augeas/0002-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 742ca2f1ca69e55e2534cab92f7aad437ec987fa Mon Sep 17 00:00:00 2001
+From 672e60257aeaf8471d7b3f0e77c48752aeeccec9 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 02/10] Shellvars: allow wrapping loop condition to multiple
+Subject: [PATCH 04/15] Shellvars: allow wrapping loop condition to multiple
lines
---
@@ -10,10 +10,10 @@ Subject: [PATCH 02/10] Shellvars: allow wrapping loop condition to multiple
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/lenses/shellvars.aug b/lenses/shellvars.aug
-index 60091a9..40a527f 100644
+index d25e8ca..c767067 100644
--- a/lenses/shellvars.aug
+++ b/lenses/shellvars.aug
-@@ -31,7 +31,7 @@ module Shellvars =
+@@ -34,7 +34,7 @@ module Shellvars =
let xchgs = Build.xchgs
let semicol = del /;?/ ""
@@ -23,12 +23,12 @@ index 60091a9..40a527f 100644
let char = /[^"\\]|\\\\./ | Rx.cl
in "\"" . char* . "\"" (* " Emacs, relax *)
diff --git a/lenses/tests/test_shellvars.aug b/lenses/tests/test_shellvars.aug
-index e4fd79f..a61bb29 100644
+index 864cb6c..065130a 100644
--- a/lenses/tests/test_shellvars.aug
+++ b/lenses/tests/test_shellvars.aug
-@@ -493,6 +493,10 @@ fi\n" =
- { "MALLOC_PERTURB_" = "$(($RANDOM % 255 + 1))"
- { "export" } }
+@@ -549,6 +549,10 @@ fi\n" =
+ { "@condition" = "-f $FILENAME"
+ { "type" = "[[" } }
+ (* Allow wrapping loop condition to multiple lines *)
+ test Shellvars.lns get "for x in foo \\\nbar\\\nbaz; do y=$x; done\n" =
@@ -38,5 +38,5 @@ index e4fd79f..a61bb29 100644
(* mode: caml *)
(* End: *)
--
-1.8.3.1
+2.1.0
diff --git a/main/augeas/0003-Shellvars-guard-against-comments.patch b/main/augeas/0005-Shellvars-guard-against-comments.patch
index 720ac5bd10..b2f4114386 100644
--- a/main/augeas/0003-Shellvars-guard-against-comments.patch
+++ b/main/augeas/0005-Shellvars-guard-against-comments.patch
@@ -1,17 +1,17 @@
-From f12488a278364a5a743faf2369766fee54db123c Mon Sep 17 00:00:00 2001
+From e86155aec47840e7cce29a6dbaac5bd21f8d9e3a 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 03/10] Shellvars: guard against comments
+Subject: [PATCH 05/15] Shellvars: guard against comments
---
lenses/shellvars.aug | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lenses/shellvars.aug b/lenses/shellvars.aug
-index 40a527f..ae2ec90 100644
+index c767067..78b1d16 100644
--- a/lenses/shellvars.aug
+++ b/lenses/shellvars.aug
-@@ -31,7 +31,7 @@ module Shellvars =
+@@ -34,7 +34,7 @@ module Shellvars =
let xchgs = Build.xchgs
let semicol = del /;?/ ""
@@ -21,5 +21,5 @@ index 40a527f..ae2ec90 100644
let char = /[^"\\]|\\\\./ | Rx.cl
in "\"" . char* . "\"" (* " Emacs, relax *)
--
-1.8.3.1
+2.1.0
diff --git a/main/augeas/0004-Shellvars-allow-wrapping-builtin-arguments-to-multip.patch b/main/augeas/0006-Shellvars-allow-wrapping-builtin-arguments-to-multip.patch
index ce5eff162f..3934ff17ed 100644
--- a/main/augeas/0004-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 a2c84aed6a77bc93020ff38b97b8c436e9a5e903 Mon Sep 17 00:00:00 2001
+From 0ab8ce1daeadc690b9b1a195474b21e3c4e9c851 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 04/10] Shellvars: allow wrapping builtin arguments to multiple
+Subject: [PATCH 06/15] Shellvars: allow wrapping builtin arguments to multiple
lines
---
@@ -10,10 +10,10 @@ Subject: [PATCH 04/10] Shellvars: allow wrapping builtin arguments to multiple
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/lenses/shellvars.aug b/lenses/shellvars.aug
-index ae2ec90..e318328 100644
+index 78b1d16..227e2a3 100644
--- a/lenses/shellvars.aug
+++ b/lenses/shellvars.aug
-@@ -43,9 +43,7 @@ module Shellvars =
+@@ -46,9 +46,7 @@ module Shellvars =
let dollar_arithm = /\$\(\([^\)#\n]*\)\)/
let anyquot = (char|dquot|squot|dollar_assign|dollar_arithm)+ | bquot | dbquot
@@ -25,7 +25,7 @@ index ae2ec90..e318328 100644
let sto_to_semicol_quot =
let no_semicol_re = /[^"'#;\n]/
diff --git a/lenses/tests/test_shellvars.aug b/lenses/tests/test_shellvars.aug
-index a61bb29..90e529b 100644
+index 065130a..bf92735 100644
--- a/lenses/tests/test_shellvars.aug
+++ b/lenses/tests/test_shellvars.aug
@@ -165,6 +165,11 @@ unset ONBOOT # We do not want this var
@@ -41,5 +41,5 @@ index a61bb29..90e529b 100644
test lns get "VAR1=\"this;is;a;test\"\nVAR2=this;\n" =
{ "VAR1" = "\"this;is;a;test\"" }
--
-1.8.3.1
+2.1.0
diff --git a/main/augeas/0005-Shellvars-allow-quotes-in-loop-conditions.patch b/main/augeas/0007-Shellvars-allow-quotes-in-loop-conditions.patch
index d4dcdb9a51..e85f60fa24 100644
--- a/main/augeas/0005-Shellvars-allow-quotes-in-loop-conditions.patch
+++ b/main/augeas/0007-Shellvars-allow-quotes-in-loop-conditions.patch
@@ -1,7 +1,7 @@
-From 1e842317de344335cf6f0b947156b401df1daae4 Mon Sep 17 00:00:00 2001
+From 25007fa071f37998016b4f197bf6509e43174517 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 05/10] Shellvars: allow quotes in loop conditions
+Subject: [PATCH 07/15] Shellvars: allow quotes in loop conditions
---
lenses/shellvars.aug | 8 +-------
@@ -9,10 +9,10 @@ Subject: [PATCH 05/10] Shellvars: allow quotes in loop conditions
2 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/lenses/shellvars.aug b/lenses/shellvars.aug
-index e318328..3671186 100644
+index 227e2a3..4dca315 100644
--- a/lenses/shellvars.aug
+++ b/lenses/shellvars.aug
-@@ -45,12 +45,6 @@ module Shellvars =
+@@ -48,12 +48,6 @@ module Shellvars =
let anyquot = (char|dquot|squot|dollar_assign|dollar_arithm)+ | bquot | dbquot
let sto_to_semicol = store (anyquot . (Rx.space . anyquot)*)
@@ -25,7 +25,7 @@ index e318328..3671186 100644
(* Array values of the form '(val1 val2 val3)'. We do not handle empty *)
(* arrays here because of typechecking headaches. Instead, they are *)
(* treated as a simple value *)
-@@ -108,7 +102,7 @@ module Shellvars =
+@@ -118,7 +112,7 @@ module Shellvars =
let generic_cond_start (start_kw:string) (lbl:string)
(then_kw:string) (contents:lens) =
keyword_label start_kw lbl . Sep.space
@@ -35,10 +35,10 @@ index e318328..3671186 100644
. contents
diff --git a/lenses/tests/test_shellvars.aug b/lenses/tests/test_shellvars.aug
-index 90e529b..8d8f34d 100644
+index bf92735..6b2210e 100644
--- a/lenses/tests/test_shellvars.aug
+++ b/lenses/tests/test_shellvars.aug
-@@ -502,6 +502,10 @@ fi\n" =
+@@ -558,6 +558,10 @@ fi\n" =
test Shellvars.lns get "for x in foo \\\nbar\\\nbaz; do y=$x; done\n" =
{ "@for" = "x in foo \\\nbar\\\nbaz" { "y" = "$x" } }
@@ -50,5 +50,5 @@ index 90e529b..8d8f34d 100644
(* mode: caml *)
(* End: *)
--
-1.8.3.1
+2.1.0
diff --git a/main/augeas/0006-Shellvars-case-support-quotes-and-spaces-in-pattern-.patch b/main/augeas/0008-Shellvars-case-support-quotes-and-spaces-in-pattern-.patch
index c02c1bc8b4..2988f43cc4 100644
--- a/main/augeas/0006-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 d66b7bcff272868ae367bcd66e78e07263c1748d Mon Sep 17 00:00:00 2001
+From 2468b3af35eefd019b6cb75836a6fb274cfc20bc 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 06/10] Shellvars: case: support quotes and spaces in pattern
+Subject: [PATCH 08/15] Shellvars: case: support quotes and spaces in pattern
lists
---
@@ -10,23 +10,23 @@ Subject: [PATCH 06/10] Shellvars: case: support quotes and spaces in pattern
2 files changed, 19 insertions(+), 1 deletion(-)
diff --git a/lenses/shellvars.aug b/lenses/shellvars.aug
-index 3671186..0c25ff9 100644
+index 4dca315..dc6d4f3 100644
--- a/lenses/shellvars.aug
+++ b/lenses/shellvars.aug
-@@ -130,7 +130,7 @@ module Shellvars =
+@@ -140,7 +140,7 @@ module Shellvars =
let case (entry:lens) (entry_noeol:lens) =
let case_entry = [ label "@case_entry"
- . Util.indent . store /[^ \t\n\)]+/
+ . Util.indent . sto_to_semicol
. Util.del_str ")" . eol
- . ( entry+ | entry_noeol )?
+ . 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 8d8f34d..ee23698 100644
+index 6b2210e..9484754 100644
--- a/lenses/tests/test_shellvars.aug
+++ b/lenses/tests/test_shellvars.aug
-@@ -506,6 +506,24 @@ fi\n" =
+@@ -562,6 +562,24 @@ fi\n" =
test Shellvars.lns get "for x in \"$@\"; do y=$x; done\n" =
{ "@for" = "x in \"$@\"" { "y" = "$x" } }
@@ -52,5 +52,5 @@ index 8d8f34d..ee23698 100644
(* mode: caml *)
(* End: *)
--
-1.8.3.1
+2.1.0
diff --git a/main/augeas/0009-Shellvars-pattern-nodes-in-case-entries.patch b/main/augeas/0009-Shellvars-pattern-nodes-in-case-entries.patch
new file mode 100644
index 0000000000..ce25c59ed2
--- /dev/null
+++ b/main/augeas/0009-Shellvars-pattern-nodes-in-case-entries.patch
@@ -0,0 +1,172 @@
+From f967f4c6c86a9fff523363d228e8703cfcb2c70e 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
+
+---
+ 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
+--- a/lenses/shellvars.aug
++++ b/lenses/shellvars.aug
+@@ -34,12 +34,12 @@ module Shellvars =
+ let xchgs = Build.xchgs
+ let semicol = del /;?/ ""
+
+- let char = /[^`;()'"\n\\# \t]#*|\\\\(.|\n)/
++ let char = /[^`;()'"|\n\\# \t]#*|\\\\(.|\n)/
+ let dquot =
+ let char = /[^"\\]|\\\\./ | Rx.cl
+ in "\"" . char* . "\"" (* " Emacs, relax *)
+ let squot = /'[^']*'/
+- let bquot = /`[^`\n]*`/
++ let bquot = /`[^`\n]+`/
+ (* dbquot don't take spaces or semi-colons *)
+ let dbquot = /``[^` \t\n;]+``/
+ let dollar_assign = /\$\([^\(\)#\n]*\)/
+@@ -139,8 +139,10 @@ module Shellvars =
+ generic_cond "select" "@select" "do" entry+ "done"
+
+ let case (entry:lens) (entry_noeol:lens) =
+- let case_entry = [ label "@case_entry"
+- . Util.indent . sto_to_semicol
++ let pattern = [ label "@pattern" . sto_to_semicol . Sep.opt_space ]
++ in let case_entry = [ label "@case_entry"
++ . Util.indent . pattern
++ . (Util.del_str "|" . Sep.opt_space . pattern)*
+ . Util.del_str ")" . eol
+ . 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
+--- a/lenses/tests/test_shellvars.aug
++++ b/lenses/tests/test_shellvars.aug
+@@ -261,11 +261,14 @@ done\n" =
+ ;;
+ esac\n" =
+ { "@case" = "$f"
+- { "@case_entry" = "/tmp/file1"
++ { "@case_entry"
++ { "@pattern" = "/tmp/file1" }
+ { ".source" = "/tmp/file1" } }
+- { "@case_entry" = "/tmp/file2"
++ { "@case_entry"
++ { "@pattern" = "/tmp/file2" }
+ { ".source" = "/tmp/file2" } }
+- { "@case_entry" = "*"
++ { "@case_entry"
++ { "@pattern" = "*" }
+ { "@unset"
+ { "1" = "f" } } } }
+
+@@ -308,7 +311,8 @@ esac\n" =
+
+ esac\n" =
+ { "@case" = "$f"
+- { "@case_entry" = "a"
++ { "@case_entry"
++ { "@pattern" = "a" }
+ { "B" = "C" } }
+ }
+
+@@ -325,9 +329,11 @@ esac\n" =
+ ;;
+ esac\n" =
+ { "@case" = "$f"
+- { "@case_entry" = "a"
++ { "@case_entry"
++ { "@pattern" = "a" }
+ { "B" = "C" } }
+- { "@case_entry" = "b"
++ { "@case_entry"
++ { "@pattern" = "b" }
+ { "A" = "D" } } }
+
+
+@@ -348,11 +354,13 @@ unset f
+ esac\n" =
+ { "@case" = "${INTERFACE}"
+ { "#comment" = "comment before" }
+- { "@case_entry" = "eth0"
++ { "@case_entry"
++ { "@pattern" = "eth0" }
+ { "#comment" = "comment in" }
+ { "OPTIONS" = "()" } }
+ { "#comment" = "comment before 2" }
+- { "@case_entry" = "*"
++ { "@case_entry"
++ { "@pattern" = "*" }
+ { "#comment" = "comment in 2" }
+ { "@unset"
+ { "1" = "f" } } }
+@@ -364,7 +372,7 @@ esac\n" =
+ ;;
+ esac\n" =
+ { "@case" = "$a"
+- { "@case_entry" = "*" } }
++ { "@case_entry" { "@pattern" = "*" } } }
+
+ (* case variables can be surrounded by double quotes *)
+ test Shellvars.lns get "case \"${options}\" in
+@@ -373,7 +381,8 @@ esac\n" =
+ ;;
+ esac\n" =
+ { "@case" = "\"${options}\""
+- { "@case_entry" = "*debug*"
++ { "@case_entry"
++ { "@pattern" = "*debug*" }
+ { "@builtin" = "shift" } } }
+
+ (* Double quoted values can have newlines *)
+@@ -473,9 +482,11 @@ test2\"\n" =
+ 1) TestVar=\"test1\" ;;
+ esac\n" =
+ { "@case" = "$ARG"
+- { "@case_entry" = "0"
++ { "@case_entry"
++ { "@pattern" = "0" }
+ { "TestVar" = "\"test0\"" } }
+- { "@case_entry" = "1"
++ { "@case_entry"
++ { "@pattern" = "1" }
+ { "TestVar" = "\"test1\"" } } }
+
+ (* case: support ;; on the same line with multiple commands *)
+@@ -486,11 +497,13 @@ esac\n" =
+ Bar=3; Baz=4;;
+ esac\n" =
+ { "@case" = "$ARG"
+- { "@case_entry" = "0"
++ { "@case_entry"
++ { "@pattern" = "0" }
+ { "Foo" = "0" }
+ { "Bar" = "1" }
+ }
+- { "@case_entry" = "1"
++ { "@case_entry"
++ { "@pattern" = "1" }
+ { "Foo" = "2" }
+ { "Bar" = "3" }
+ { "Baz" = "4" }
+@@ -572,10 +585,13 @@ fi\n" =
+ ;;
+ esac\n" =
+ { "@case" = "$ARG"
+- { "@case_entry" = "\"foo bar\""
++ { "@case_entry"
++ { "@pattern" = "\"foo bar\"" }
+ { "Foo" = "0" }
+ }
+- { "@case_entry" = "baz | quux"
++ { "@case_entry"
++ { "@pattern" = "baz" }
++ { "@pattern" = "quux" }
+ { "Foo" = "1" }
+ }
+ }
+--
+2.1.0
+
diff --git a/main/augeas/0010-Shellvars-allow-the-builtin.patch b/main/augeas/0010-Shellvars-allow-the-builtin.patch
deleted file mode 100644
index f6a0e7050a..0000000000
--- a/main/augeas/0010-Shellvars-allow-the-builtin.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From 5f8f638b4da32a9b7ccd797b32e956a4887b5e79 Mon Sep 17 00:00:00 2001
-From: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>
-Date: Mon, 8 Dec 2014 15:10:28 +0200
-Subject: [PATCH 10/10] Shellvars: allow the [ builtin
-
----
- lenses/shellvars.aug | 2 +-
- lenses/tests/test_shellvars.aug | 4 ++++
- 2 files changed, 5 insertions(+), 1 deletion(-)
-
-diff --git a/lenses/shellvars.aug b/lenses/shellvars.aug
-index 9cef3fd..07c7a52 100644
---- a/lenses/shellvars.aug
-+++ b/lenses/shellvars.aug
-@@ -78,7 +78,7 @@ module Shellvars =
- . del /\.|source/ "." . label ".source"
- . Util.del_ws_spc . store /[^;=# \t\n]+/
-
-- let shell_builtin_cmds = "ulimit" | "shift" | "exit"
-+ let shell_builtin_cmds = "ulimit" | "shift" | "exit" | "["
-
- let builtin =
- Util.indent . label "@builtin"
-diff --git a/lenses/tests/test_shellvars.aug b/lenses/tests/test_shellvars.aug
-index f38fd30..68a77ad 100644
---- a/lenses/tests/test_shellvars.aug
-+++ b/lenses/tests/test_shellvars.aug
-@@ -165,6 +165,10 @@ unset ONBOOT # We do not want this var
- { "@builtin" = "exit" }
- { "@builtin" = "exit" { "args" = "2" } }
-
-+ (* Allow the [ builtin *)
-+ test Shellvars.lns get "[ -f $FILENAME ]\n" =
-+ { "@builtin" = "[" { "args" = "-f $FILENAME ]" } }
-+
- (* Allow wrapping builtin arguments to multiple lines *)
- test Shellvars.lns get "ulimit -c \\\nunlimited\nulimit \\\n -x 123\n" =
- { "@builtin" = "ulimit" { "args" = "-c \\\nunlimited" } }
---
-1.8.3.1
-
diff --git a/main/augeas/0010-Shellvars-use-sto_to_semicol-in-condition-lens.patch b/main/augeas/0010-Shellvars-use-sto_to_semicol-in-condition-lens.patch
new file mode 100644
index 0000000000..96cd8b53fe
--- /dev/null
+++ b/main/augeas/0010-Shellvars-use-sto_to_semicol-in-condition-lens.patch
@@ -0,0 +1,28 @@
+From 5a3d3528b63986a91baedaca028c646b796961d8 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
+
+---
+ 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
+--- a/lenses/shellvars.aug
++++ b/lenses/shellvars.aug
+@@ -98,9 +98,8 @@ module Shellvars =
+ . ( Util.del_ws_spc . store Rx.integer )?
+
+ let condition =
+- let sto_cond = store /[^[#; \t\n][^#;\n]+[^]#; \t\n]|[^[]#; \t\n]+/
+- in let cond (start:string) (end:string) = [ label "type" . store start ]
+- . Util.del_ws_spc . sto_cond
++ 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
+ in Util.indent . label "@condition" . (cond "[" "]" | cond "[[" "]]")
+
+--
+2.1.0
+
diff --git a/main/augeas/0011-Shellvars-allow-and-constructs-after-condition.patch b/main/augeas/0011-Shellvars-allow-and-constructs-after-condition.patch
new file mode 100644
index 0000000000..cb067beea0
--- /dev/null
+++ b/main/augeas/0011-Shellvars-allow-and-constructs-after-condition.patch
@@ -0,0 +1,60 @@
+From 7bad1f085369de5544f8b06e7e0704d7030c3506 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
+
+---
+ lenses/shellvars.aug | 8 ++++++--
+ lenses/tests/test_shellvars.aug | 8 ++++++++
+ 2 files changed, 14 insertions(+), 2 deletions(-)
+
+diff --git a/lenses/shellvars.aug b/lenses/shellvars.aug
+index bb0e875..3fce699 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]#*|\\\\(.|\n)/
+ let dquot =
+ let char = /[^"\\]|\\\\./ | Rx.cl
+ in "\"" . char* . "\"" (* " Emacs, relax *)
+@@ -98,9 +98,13 @@ module Shellvars =
+ . ( Util.del_ws_spc . store Rx.integer )?
+
+ let condition =
+- let cond (start:string) (end:string) = [ label "type" . store start ]
++ 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" )*
+ in Util.indent . label "@condition" . (cond "[" "]" | cond "[[" "]]")
+
+
+diff --git a/lenses/tests/test_shellvars.aug b/lenses/tests/test_shellvars.aug
+index a397431..ae432fa 100644
+--- a/lenses/tests/test_shellvars.aug
++++ b/lenses/tests/test_shellvars.aug
+@@ -596,6 +596,14 @@ esac\n" =
+ }
+ }
+
++ (* Allow && and || constructs after condition *)
++ test Shellvars.lns get "[ -f $FILENAME ] && do this || or that\n" =
++ { "@condition" = "-f $FILENAME"
++ { "type" = "[" }
++ { "@and" = "do this" }
++ { "@or" = "or that" }
++ }
++
+ (* Local Variables: *)
+ (* mode: caml *)
+ (* End: *)
+--
+2.1.0
+
diff --git a/main/augeas/0007-Shellvars-Allow-almost-any-command.patch b/main/augeas/0012-Shellvars-Allow-almost-any-command.patch
index 3775fc5927..7338c27c84 100644
--- a/main/augeas/0007-Shellvars-Allow-almost-any-command.patch
+++ b/main/augeas/0012-Shellvars-Allow-almost-any-command.patch
@@ -1,10 +1,13 @@
-From 1fbc9768290383ee6de28416ab033ec07831ae95 Mon Sep 17 00:00:00 2001
+From 9d896f124404865e996042de74347644a2dd2e3a 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 07/10] Shellvars: Allow (almost) any command
+Subject: [PATCH 12/15] 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 +++++++
@@ -12,10 +15,10 @@ Subject: [PATCH 07/10] Shellvars: Allow (almost) any command
3 files changed, 19 insertions(+)
diff --git a/NEWS b/NEWS
-index 73b5332..4501226 100644
+index a748343..3866a92 100644
--- a/NEWS
+++ b/NEWS
-@@ -57,6 +57,7 @@
+@@ -134,6 +134,7 @@
conditions (GH issue #118)
Support $(( .. )) arithmetic expansion in variable
assignment, RHBZ#1100550
@@ -24,12 +27,12 @@ index 73b5332..4501226 100644
* 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 0c25ff9..3b98c23 100644
+index 3fce699..36a0141 100644
--- a/lenses/shellvars.aug
+++ b/lenses/shellvars.aug
-@@ -94,6 +94,11 @@ module Shellvars =
- . Util.del_str "return"
- . ( Util.del_ws_spc . store Rx.integer )?
+@@ -107,6 +107,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/
@@ -39,29 +42,29 @@ index 0c25ff9..3b98c23 100644
(************************************************************************
* Group: CONDITIONALS AND LOOPS
-@@ -158,6 +163,7 @@ module Shellvars =
- | entry_eol_item bare_export
+@@ -174,6 +179,7 @@ module Shellvars =
| entry_eol_item builtin
| entry_eol_item return
+ | entry_eol_item condition
+ | entry_eol_item command
let entry_noeol =
let entry_item (item:lens) = [ item ] in
-@@ -167,6 +173,7 @@ module Shellvars =
- | entry_item bare_export
+@@ -184,6 +190,7 @@ module Shellvars =
| entry_item builtin
| entry_item return
+ | entry_item condition
+ | 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 ee23698..f955b3e 100644
+index ae432fa..76f6f59 100644
--- a/lenses/tests/test_shellvars.aug
+++ b/lenses/tests/test_shellvars.aug
-@@ -524,6 +524,17 @@ esac\n" =
- }
- }
+@@ -604,6 +604,17 @@ esac\n" =
+ { "@or" = "or that" }
+ }
+(* Test: Shellvars.lns
+ Parse (almost) any command *)
@@ -78,5 +81,5 @@ index ee23698..f955b3e 100644
(* mode: caml *)
(* End: *)
--
-1.8.3.1
+2.1.0
diff --git a/main/augeas/0008-Shellvars-test-case-for-wrapping-command-arguments.patch b/main/augeas/0013-Shellvars-test-case-for-wrapping-command-arguments.patch
index 9b76775fae..a16e6dfbca 100644
--- a/main/augeas/0008-Shellvars-test-case-for-wrapping-command-arguments.patch
+++ b/main/augeas/0013-Shellvars-test-case-for-wrapping-command-arguments.patch
@@ -1,17 +1,17 @@
-From 3531dcef9587c17577a8bae63525a9f63d72162c Mon Sep 17 00:00:00 2001
+From d68729a4719c8e00778e6fd06639bf8c32988277 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 08/10] Shellvars: test case for wrapping command arguments
+Subject: [PATCH 13/15] Shellvars: test case for wrapping command arguments
---
lenses/tests/test_shellvars.aug | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/lenses/tests/test_shellvars.aug b/lenses/tests/test_shellvars.aug
-index f955b3e..c1892cd 100644
+index 76f6f59..e7fad5a 100644
--- a/lenses/tests/test_shellvars.aug
+++ b/lenses/tests/test_shellvars.aug
-@@ -527,13 +527,19 @@ esac\n" =
+@@ -607,13 +607,19 @@ esac\n" =
(* Test: Shellvars.lns
Parse (almost) any command *)
test Shellvars.lns get "echo foobar 'and this is baz'
@@ -33,5 +33,5 @@ index f955b3e..c1892cd 100644
(* Local Variables: *)
(* mode: caml *)
--
-1.8.3.1
+2.1.0
diff --git a/main/augeas/0011-Shellvars-allow-command-specific-environment-variabl.patch b/main/augeas/0014-Shellvars-allow-command-specific-environment-variabl.patch
index 938c847de0..66e6cb7460 100644
--- a/main/augeas/0011-Shellvars-allow-command-specific-environment-variabl.patch
+++ b/main/augeas/0014-Shellvars-allow-command-specific-environment-variabl.patch
@@ -1,7 +1,7 @@
-From e6ca8eadfebbddf87b2ea356db7cbd285ae0f07f Mon Sep 17 00:00:00 2001
+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 11/11] Shellvars: allow command-specific environment variables
+Subject: [PATCH 14/15] Shellvars: allow command-specific environment variables
---
lenses/shellvars.aug | 4 +++-
@@ -9,10 +9,10 @@ Subject: [PATCH 11/11] Shellvars: allow command-specific environment variables
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/lenses/shellvars.aug b/lenses/shellvars.aug
-index 07c7a52..9ee0d05 100644
+index 36a0141..00c6846 100644
--- a/lenses/shellvars.aug
+++ b/lenses/shellvars.aug
-@@ -97,7 +97,9 @@ module Shellvars =
+@@ -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_.-\/]+/
@@ -24,10 +24,10 @@ index 07c7a52..9ee0d05 100644
(************************************************************************
diff --git a/lenses/tests/test_shellvars.aug b/lenses/tests/test_shellvars.aug
-index 68a77ad..dd4132e 100644
+index e7fad5a..4f52205 100644
--- a/lenses/tests/test_shellvars.aug
+++ b/lenses/tests/test_shellvars.aug
-@@ -552,7 +552,9 @@ esac\n" =
+@@ -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 \
@@ -38,7 +38,7 @@ index 68a77ad..dd4132e 100644
{ "@command" = "echo"
{ "@arg" = "foobar 'and this is baz'" }
}
-@@ -563,6 +565,11 @@ bar\n" =
+@@ -620,6 +622,11 @@ bar\n" =
{ "@arg" = "foo \
bar" }
}
@@ -51,5 +51,5 @@ index 68a77ad..dd4132e 100644
(* Local Variables: *)
(* mode: caml *)
--
-1.9.3
+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
new file mode 100644
index 0000000000..dbb2c89838
--- /dev/null
+++ b/main/augeas/0015-Shellvars-allow-and-constructs-after-command.patch
@@ -0,0 +1,65 @@
+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/APKBUILD b/main/augeas/APKBUILD
index 607b531fc2..6b80769d56 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=0
+pkgrel=1
pkgdesc="A configuration editing tool"
url="http://augeas.net"
arch="all"
@@ -12,16 +12,21 @@ makedepends="$depends_dev readline-dev"
install=""
subpackages="$pkgname-dev $pkgname-doc $pkgname-tests $pkgname-libs"
source="http://download.augeas.net/augeas-$pkgver.tar.gz
- 0001-Shellvars-allow-partial-quoting-mixing-multiple-styl.patch
- 0002-Shellvars-allow-wrapping-loop-condition-to-multiple-.patch
- 0003-Shellvars-guard-against-comments.patch
- 0004-Shellvars-allow-wrapping-builtin-arguments-to-multip.patch
- 0005-Shellvars-allow-quotes-in-loop-conditions.patch
- 0006-Shellvars-case-support-quotes-and-spaces-in-pattern-.patch
- 0007-Shellvars-Allow-almost-any-command.patch
- 0008-Shellvars-test-case-for-wrapping-command-arguments.patch
- 0010-Shellvars-allow-the-builtin.patch
- 0011-Shellvars-allow-command-specific-environment-variabl.patch"
+ 0001-Shellvars-accept-and-builtins.patch
+ 0002-Shellvars-Add-test-for.patch
+ 0003-Shellvars-allow-partial-quoting-mixing-multiple-styl.patch
+ 0004-Shellvars-allow-wrapping-loop-condition-to-multiple-.patch
+ 0005-Shellvars-guard-against-comments.patch
+ 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"
_builddir="$srcdir"/$pkgname-$pkgver
prepare() {
@@ -73,35 +78,50 @@ libs() {
}
md5sums="a2536a9c3d744dc09d234228fe4b0c93 augeas-1.4.0.tar.gz
-0b7d8ef1d472a1cd3b5742afcbc40c7b 0001-Shellvars-allow-partial-quoting-mixing-multiple-styl.patch
-51c15f48a3086aedcb9b50c379396e9a 0002-Shellvars-allow-wrapping-loop-condition-to-multiple-.patch
-3983d4f2c87fdc3a7462648bf28ac1f7 0003-Shellvars-guard-against-comments.patch
-99230241ab44da842ae551ee1fd21acd 0004-Shellvars-allow-wrapping-builtin-arguments-to-multip.patch
-1618007011bc4cb767d8a2b2e419d223 0005-Shellvars-allow-quotes-in-loop-conditions.patch
-6ea468c64e0fa8c70eb3439a8650900f 0006-Shellvars-case-support-quotes-and-spaces-in-pattern-.patch
-559ce327e30c663ac13a9d654d95ab36 0007-Shellvars-Allow-almost-any-command.patch
-f65d801a398dd8124b59f9db8b65ffdb 0008-Shellvars-test-case-for-wrapping-command-arguments.patch
-07fcbed83f7f507beeac919aa96eb7c4 0010-Shellvars-allow-the-builtin.patch
-4bfc55219b2a1284b84c739951221f63 0011-Shellvars-allow-command-specific-environment-variabl.patch"
+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"
sha256sums="659fae7ac229029e60a869a3b88c616cfd51cf2fba286cdfe3af3a052cb35b30 augeas-1.4.0.tar.gz
-3824c87fca915f2ace1acbcbaed075d8e77268d239d5159aa8603907558f638f 0001-Shellvars-allow-partial-quoting-mixing-multiple-styl.patch
-e05119d39bba5dd49bf6fa887f38ba3825e308efd9e8dc491694414f740b9737 0002-Shellvars-allow-wrapping-loop-condition-to-multiple-.patch
-65968c3e23dd711757aa991f7f5c27b9d72754d73310f585c43896e8e086d7b8 0003-Shellvars-guard-against-comments.patch
-f266d39442cdbc4a173cbe79acf37831e822da49989ab7336b5cf23d1cfebf0c 0004-Shellvars-allow-wrapping-builtin-arguments-to-multip.patch
-8d81847ca3c3a3d9d4a22cf3022ad03b4dc09e02acddd2a7dbe694c9fa2ae547 0005-Shellvars-allow-quotes-in-loop-conditions.patch
-82ac0494819f6b97587c1028a468b7d29d1abcd92ba81ea991c4c830b4cdb813 0006-Shellvars-case-support-quotes-and-spaces-in-pattern-.patch
-182e6e511e21de8379cee76f14bc16ce999a5dd1a8cecbef6ea67ee7d7a471f1 0007-Shellvars-Allow-almost-any-command.patch
-ef71befc9759945fc953b28c7e81db63057a58297c8dd9642d52ec12e77f105e 0008-Shellvars-test-case-for-wrapping-command-arguments.patch
-13017bf58ec6d7d72d2dd5954d2636f47147207543ccd9537bb08e16ae032406 0010-Shellvars-allow-the-builtin.patch
-61bffc11faf4442f23c22b3a06c329284cfa75ca9db5d27b60ac528dbedc3ba3 0011-Shellvars-allow-command-specific-environment-variabl.patch"
+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"
sha512sums="182457698e51be89feadb16879bae2f2413a5761127efb63a9b7ef30806f4059bca614e8c9627b0c7a010b9ec9c03c85161e655bdb2902f7cf43e89b66e312db augeas-1.4.0.tar.gz
-2a231a4f5db8c86b2710e83d4c74062a67980812df367276fc4876ccb01799881da98d95f0385972a7c229e83c18a758c67e7d5a9bef03fe8e3bd549136dcfc9 0001-Shellvars-allow-partial-quoting-mixing-multiple-styl.patch
-af2c9021f4f1286e449b0bcb3e9bee781aa7b9be2835fd48cc3fe4e2ac50d4979af06edc6272fd4fc08eaa93a7e7cc77472ca6f9b093090443657630a6512b5a 0002-Shellvars-allow-wrapping-loop-condition-to-multiple-.patch
-2297640506106bca6f1624474a87fcfc35297570e8bcb877b9ef3f955949346a6a0b542a3642af27bcc399d1e9f439ddcf097ccd59719f38810f9c2df0879943 0003-Shellvars-guard-against-comments.patch
-198aa60cd13dc18a07b3d9468e61616201632a100c008fecfbb25a5bd6d08fc37fc376522f0dff5998a78ac050902113d78f5f6342683049ed4710641cebc6b0 0004-Shellvars-allow-wrapping-builtin-arguments-to-multip.patch
-4f03a4a3c196d7639bf2e68aff4d587f157e2a5e6ecdc9eb62f08eb983e0ac130380b581c6fec9bdc0539c1ce5356af389a7744c8df6f6e7a76faeef160ab1b2 0005-Shellvars-allow-quotes-in-loop-conditions.patch
-b19af8a4bb0ab542b449f50ace8ce9ebb83619bb5587b38f012e98bdf5de6ce9673f12f3af26ac147ccf95d036fa60c437e5f0dbf504016b0831ffcb97ab3962 0006-Shellvars-case-support-quotes-and-spaces-in-pattern-.patch
-c7a7ddc3635371a74ac6b943e5b1adeab8960dc0a2d38625d2c1801ab88a60670eb8ff30b1f0938a461519b1b3199273b91e734c3b368c1d500653d5b6b82a0a 0007-Shellvars-Allow-almost-any-command.patch
-798201a25b3f42e4cfcc071e7066a4a20492f58574cd7baeea14a60569663d2b2775d6afb361900057f5add61be8e6e2a7e5b2ca395711fd13c30fce2590d5cf 0008-Shellvars-test-case-for-wrapping-command-arguments.patch
-9204f19e3234fc3be5bc59a374f9ac943494c1ee37a3c9c88186e2b6c1780e8376517108fe4a2567c6315bdb475ba5f492f9cb61ff569f79054ed17902368149 0010-Shellvars-allow-the-builtin.patch
-37c1cf7c3e247e8acb73c956a2605ffb6ceadf2f3d3170a9d0c64059a9532830da2f11d105994fcee001138cc91e2432a2fb6f5ee012d98efc99b4b439bde459 0011-Shellvars-allow-command-specific-environment-variabl.patch"
+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"