aboutsummaryrefslogtreecommitdiffstats
path: root/main/augeas
diff options
context:
space:
mode:
authorKaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>2014-12-05 13:32:47 +0200
committerKaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>2014-12-05 13:32:47 +0200
commita99d67cdf234dab8c937d613c2b81a7f06b04869 (patch)
treeedd1654e0117b8a9b1d9197b8ea571a0076deb46 /main/augeas
parent82fa7ab6f5bbc2012c92d0ada2785c13519f5525 (diff)
downloadaports-a99d67cdf234dab8c937d613c2b81a7f06b04869.tar.bz2
aports-a99d67cdf234dab8c937d613c2b81a7f06b04869.tar.xz
main/augeas: update to 1.3.0
also fix the Shellvars lense to allow parsing of APKBUILD files
Diffstat (limited to 'main/augeas')
-rw-r--r--main/augeas/0001-Shellvars-allow-partial-quoting-mixing-multiple-styl.patch68
-rw-r--r--main/augeas/0002-Shellvars-allow-wrapping-builtin-arguments-to-multip.patch42
-rw-r--r--main/augeas/0003-Shellvars-Allow-almost-any-command.patch82
-rw-r--r--main/augeas/0004-Shellvars-test-case-for-wrapping-command-arguments.patch37
-rw-r--r--main/augeas/0005-Shellvars-case-support-on-same-line-with-multiple-co.patch57
-rw-r--r--main/augeas/APKBUILD38
6 files changed, 315 insertions, 9 deletions
diff --git a/main/augeas/0001-Shellvars-allow-partial-quoting-mixing-multiple-styl.patch b/main/augeas/0001-Shellvars-allow-partial-quoting-mixing-multiple-styl.patch
new file mode 100644
index 0000000000..b3d7012ae1
--- /dev/null
+++ b/main/augeas/0001-Shellvars-allow-partial-quoting-mixing-multiple-styl.patch
@@ -0,0 +1,68 @@
+From 937653cbb1f9681a575e0fa5e8f2d0e59fd9ab5c 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 1/5] Shellvars: allow partial quoting, mixing multiple styles
+
+---
+ lenses/shellvars.aug | 8 ++++----
+ lenses/tests/test_shellvars.aug | 4 ++++
+ 2 files changed, 8 insertions(+), 4 deletions(-)
+
+diff --git a/lenses/shellvars.aug b/lenses/shellvars.aug
+index 073f69b..60091a9 100644
+--- a/lenses/shellvars.aug
++++ b/lenses/shellvars.aug
+@@ -31,7 +31,7 @@ module Shellvars =
+ let xchgs = Build.xchgs
+ let semicol = del /;?/ ""
+
+- let char = /[^`;() '"\t\n]|\\\\"/
++ let char = /[^`;() '"\t\n\\]|\\\\./
+ let dquot =
+ let char = /[^"\\]|\\\\./ | Rx.cl
+ in "\"" . char* . "\"" (* " Emacs, relax *)
+@@ -42,7 +42,7 @@ module Shellvars =
+ let dollar_assign = /\$\([^\(\)#\n]*\)/
+ let dollar_arithm = /\$\(\([^\)#\n]*\)\)/
+
+- let anyquot = (dquot|squot)+ | bquot | dbquot | dollar_assign | dollar_arithm
++ let anyquot = (char|dquot|squot|dollar_assign|dollar_arithm)+ | bquot | dbquot
+
+ 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 =
+ (* arrays here because of typechecking headaches. Instead, they are *)
+ (* treated as a simple value *)
+ let array =
+- let array_value = store (char+ | anyquot) in
++ let array_value = store anyquot in
+ del /\([ \t]*/ "(" . counter "values" .
+ [ seq "values" . array_value ] .
+ [ del /[ \t\n]+/ " " . seq "values" . array_value ] *
+@@ -67,7 +67,7 @@ module Shellvars =
+ (* but fairly close. *)
+ let simple_value =
+ let empty_array = /\([ \t]*\)/ in
+- store (char* | anyquot | empty_array)
++ store (anyquot | empty_array)?
+
+ 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
+--- a/lenses/tests/test_shellvars.aug
++++ b/lenses/tests/test_shellvars.aug
+@@ -399,6 +399,10 @@ esac\n" =
+ test Shellvars.lns get "FOO=``bar``\n" =
+ { "FOO" = "``bar``" }
+
++ (* Partial quoting is allowed *)
++ test Shellvars.lns get "FOO=\"$bar\"/'baz'/$(quux)$((1 + 2))\n" =
++ { "FOO" = "\"$bar\"/'baz'/$(quux)$((1 + 2))" }
++
+ (* unset can be used on wildcard variables *)
+ test Shellvars.lns get "unset ${!LC_*}\n" =
+ { "@unset"
+--
+1.8.3.1
+
diff --git a/main/augeas/0002-Shellvars-allow-wrapping-builtin-arguments-to-multip.patch b/main/augeas/0002-Shellvars-allow-wrapping-builtin-arguments-to-multip.patch
new file mode 100644
index 0000000000..5dea08e26c
--- /dev/null
+++ b/main/augeas/0002-Shellvars-allow-wrapping-builtin-arguments-to-multip.patch
@@ -0,0 +1,42 @@
+From 0563e64fdd8c8ce3b97d58909697ff7f61c29adb 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 2/5] Shellvars: allow wrapping builtin arguments to multiple
+ lines
+
+---
+ 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 60091a9..645d6ed 100644
+--- a/lenses/shellvars.aug
++++ b/lenses/shellvars.aug
+@@ -44,7 +44,7 @@ module Shellvars =
+
+ let anyquot = (char|dquot|squot|dollar_assign|dollar_arithm)+ | bquot | dbquot
+
+- let to_semicol_re = /[^#; \t\n][^#;\n]+[^#; \t\n]|[^#; \t\n]+/
++ let to_semicol_re = /([^#; \t\n\\]|\\\\.)(([^#;\n\\]|\\\\(.|\n))*([^#; \t\n\\]|\\\\.))?/
+ let sto_to_semicol = store to_semicol_re
+
+ let sto_to_semicol_quot =
+diff --git a/lenses/tests/test_shellvars.aug b/lenses/tests/test_shellvars.aug
+index e4fd79f..65c2927 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 wrapping builtin arguments to multiple lines *)
++ test Shellvars.lns get "ulimit -c \\\nunlimited\n" =
++ { "@builtin" = "ulimit" { "args" = "-c \\\nunlimited" } }
++
+ (* Test semicolons *)
+ test lns get "VAR1=\"this;is;a;test\"\nVAR2=this;\n" =
+ { "VAR1" = "\"this;is;a;test\"" }
+--
+1.8.3.1
+
diff --git a/main/augeas/0003-Shellvars-Allow-almost-any-command.patch b/main/augeas/0003-Shellvars-Allow-almost-any-command.patch
new file mode 100644
index 0000000000..34bb5982ee
--- /dev/null
+++ b/main/augeas/0003-Shellvars-Allow-almost-any-command.patch
@@ -0,0 +1,82 @@
+From 23498cfa489397a60cc0667352fd144d3cdd905d 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 3/5] Shellvars: Allow (almost) any command
+
+ Note: this may have edge effects in recursive sublenses
+ that augparse cannot check.
+---
+ NEWS | 1 +
+ lenses/shellvars.aug | 7 +++++++
+ lenses/tests/test_shellvars.aug | 11 +++++++++++
+ 3 files changed, 19 insertions(+)
+
+diff --git a/NEWS b/NEWS
+index 73b5332..4501226 100644
+--- a/NEWS
++++ b/NEWS
+@@ -57,6 +57,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 645d6ed..a50c0f6 100644
+--- a/lenses/shellvars.aug
++++ b/lenses/shellvars.aug
+@@ -102,6 +102,11 @@ module Shellvars =
+ . Util.del_str "return"
+ . ( Util.del_ws_spc . store Rx.integer )?
+
++ 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)
++ . [ Sep.space . label "@arg" . sto_to_semicol]?
+
+ (************************************************************************
+ * Group: CONDITIONALS AND LOOPS
+@@ -166,6 +171,7 @@ module Shellvars =
+ | entry_eol_item bare_export
+ | entry_eol_item builtin
+ | entry_eol_item return
++ | entry_eol_item command
+
+ let entry_noeol =
+ let entry_item (item:lens) = [ item ] in
+@@ -175,6 +181,7 @@ module Shellvars =
+ | entry_item bare_export
+ | entry_item builtin
+ | entry_item return
++ | 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 65c2927..fd9e299 100644
+--- a/lenses/tests/test_shellvars.aug
++++ b/lenses/tests/test_shellvars.aug
+@@ -497,6 +497,17 @@ fi\n" =
+ { "MALLOC_PERTURB_" = "$(($RANDOM % 255 + 1))"
+ { "export" } }
+
++(* Test: Shellvars.lns
++ Parse (almost) any command *)
++test Shellvars.lns get "echo foobar 'and this is baz'
++/usr/local/bin/myscript.sh with args\n" =
++ { "@command" = "echo"
++ { "@arg" = "foobar 'and this is baz'" }
++ }
++ { "@command" = "/usr/local/bin/myscript.sh"
++ { "@arg" = "with args" }
++ }
++
+ (* Local Variables: *)
+ (* mode: caml *)
+ (* End: *)
+--
+1.8.3.1
+
diff --git a/main/augeas/0004-Shellvars-test-case-for-wrapping-command-arguments.patch b/main/augeas/0004-Shellvars-test-case-for-wrapping-command-arguments.patch
new file mode 100644
index 0000000000..87c244c0bd
--- /dev/null
+++ b/main/augeas/0004-Shellvars-test-case-for-wrapping-command-arguments.patch
@@ -0,0 +1,37 @@
+From 6b6b88a3725159771ac9c822d04d406a8b0c56e8 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 4/5] 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 fd9e299..5b9fdba 100644
+--- a/lenses/tests/test_shellvars.aug
++++ b/lenses/tests/test_shellvars.aug
+@@ -500,13 +500,19 @@ fi\n" =
+ (* Test: Shellvars.lns
+ Parse (almost) any command *)
+ test Shellvars.lns get "echo foobar 'and this is baz'
+-/usr/local/bin/myscript.sh with args\n" =
++/usr/local/bin/myscript.sh with args
++echo foo \
++bar\n" =
+ { "@command" = "echo"
+ { "@arg" = "foobar 'and this is baz'" }
+ }
+ { "@command" = "/usr/local/bin/myscript.sh"
+ { "@arg" = "with args" }
+ }
++ { "@command" = "echo"
++ { "@arg" = "foo \
++bar" }
++ }
+
+ (* Local Variables: *)
+ (* mode: caml *)
+--
+1.8.3.1
+
diff --git a/main/augeas/0005-Shellvars-case-support-on-same-line-with-multiple-co.patch b/main/augeas/0005-Shellvars-case-support-on-same-line-with-multiple-co.patch
new file mode 100644
index 0000000000..420d29fa2f
--- /dev/null
+++ b/main/augeas/0005-Shellvars-case-support-on-same-line-with-multiple-co.patch
@@ -0,0 +1,57 @@
+From 9764767e2c633bcedf91d3d7a9ec2542e4658ff0 Mon Sep 17 00:00:00 2001
+From: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>
+Date: Thu, 4 Dec 2014 21:51:03 +0200
+Subject: [PATCH 5/5] Shellvars: case: support ;; on same line with multiple
+ commands
+
+---
+ lenses/shellvars.aug | 2 +-
+ lenses/tests/test_shellvars.aug | 19 +++++++++++++++++++
+ 2 files changed, 20 insertions(+), 1 deletion(-)
+
+diff --git a/lenses/shellvars.aug b/lenses/shellvars.aug
+index a50c0f6..b683cc0 100644
+--- a/lenses/shellvars.aug
++++ b/lenses/shellvars.aug
+@@ -145,7 +145,7 @@ module Shellvars =
+ let case_entry = [ label "@case_entry"
+ . Util.indent . store /[^ \t\n\)]+/
+ . Util.del_str ")" . eol
+- . ( entry+ | entry_noeol )?
++ . entry* . entry_noeol?
+ . Util.indent . Util.del_str ";;" . eol ] in
+ [ keyword_label "case" "@case" . Sep.space
+ . store (char+ | ("\"" . char+ . "\""))
+diff --git a/lenses/tests/test_shellvars.aug b/lenses/tests/test_shellvars.aug
+index 5b9fdba..0ff1b1a 100644
+--- a/lenses/tests/test_shellvars.aug
++++ b/lenses/tests/test_shellvars.aug
+@@ -478,6 +478,25 @@ esac\n" =
+ { "@case_entry" = "1"
+ { "TestVar" = "\"test1\"" } } }
+
++ (* case: support ;; on the same line with multiple commands *)
++ test lns get "case $ARG in
++ 0) Foo=0; Bar=1;;
++ 1)
++ Foo=2
++ Bar=3; Baz=4;;
++esac\n" =
++ { "@case" = "$ARG"
++ { "@case_entry" = "0"
++ { "Foo" = "0" }
++ { "Bar" = "1" }
++ }
++ { "@case_entry" = "1"
++ { "Foo" = "2" }
++ { "Bar" = "3" }
++ { "Baz" = "4" }
++ }
++ }
++
+ (* Test: Shellvars.lns
+ Support `##` bashism in conditions (GH issue #118) *)
+ test Shellvars.lns get "if [ \"${APACHE_CONFDIR##/etc/apache2-}\" != \"${APACHE_CONFDIR}\" ] ; then
+--
+1.8.3.1
+
diff --git a/main/augeas/APKBUILD b/main/augeas/APKBUILD
index c416c81b7a..9066016250 100644
--- a/main/augeas/APKBUILD
+++ b/main/augeas/APKBUILD
@@ -1,7 +1,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=augeas
-pkgver=1.2.0
-pkgrel=2
+pkgver=1.3.0
+pkgrel=0
pkgdesc="A configuration editing tool"
url="http://augeas.net"
arch="all"
@@ -12,7 +12,12 @@ 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-Dnsmasq-add-structure-to-address-and-server-options.patch"
+ 0001-Dnsmasq-add-structure-to-address-and-server-options.patch
+ 0001-Shellvars-allow-partial-quoting-mixing-multiple-styl.patch
+ 0002-Shellvars-allow-wrapping-builtin-arguments-to-multip.patch
+ 0003-Shellvars-Allow-almost-any-command.patch
+ 0004-Shellvars-test-case-for-wrapping-command-arguments.patch
+ 0005-Shellvars-case-support-on-same-line-with-multiple-co.patch"
_builddir="$srcdir"/$pkgname-$pkgver
prepare() {
@@ -63,9 +68,24 @@ libs() {
"$subpkgdir"/usr/share/augeas/ || return 1
}
-md5sums="dce2f52cbd20f72c7da48e014ad48076 augeas-1.2.0.tar.gz
-b140791828aec2037c411164102ef8cd 0001-Dnsmasq-add-structure-to-address-and-server-options.patch"
-sha256sums="f4aeb28ebe0b0921920fe1c9b4c016739c25261a15de04cb97db02d669f481e0 augeas-1.2.0.tar.gz
-0cb29dfdef3f293c5a4db06704072a6672ce728c82d4b2a7260da341522efc37 0001-Dnsmasq-add-structure-to-address-and-server-options.patch"
-sha512sums="fa3cf6bf5143bc4afbf3b360834565a295d7ef815894a019f1e8017a0199f778adc6d6c44ee220b24b37355211264535af7efc56134c81b167df296134095aa8 augeas-1.2.0.tar.gz
-f2cdf6fcd84de4f86bc54d89292d3c4c19070b1c6d5149af6a8d7c49678e2a7527b6549ad114e5ccec53d4d9582814153732f69a4c0228243aac96c48a0e1d1d 0001-Dnsmasq-add-structure-to-address-and-server-options.patch"
+md5sums="c8890b11a04795ecfe5526eeae946b2d augeas-1.3.0.tar.gz
+b140791828aec2037c411164102ef8cd 0001-Dnsmasq-add-structure-to-address-and-server-options.patch
+b4cb2352d2291f59cf337a85581155d5 0001-Shellvars-allow-partial-quoting-mixing-multiple-styl.patch
+c46a285bbb12463a8464d94e1aa83477 0002-Shellvars-allow-wrapping-builtin-arguments-to-multip.patch
+e53532cb842babf3b785369d23437005 0003-Shellvars-Allow-almost-any-command.patch
+c14dfc123474916f8329a9cf94eb9209 0004-Shellvars-test-case-for-wrapping-command-arguments.patch
+73c032499a48ed2d5847a9a627131eb5 0005-Shellvars-case-support-on-same-line-with-multiple-co.patch"
+sha256sums="80763031af76515a8ea66013ddc3c466742a15d2e907c7c8e2e3b7410262e2af augeas-1.3.0.tar.gz
+0cb29dfdef3f293c5a4db06704072a6672ce728c82d4b2a7260da341522efc37 0001-Dnsmasq-add-structure-to-address-and-server-options.patch
+23a952a8f77e86656d009ad417f109e6e31b1635beb49ff6fcc232bbea6236f4 0001-Shellvars-allow-partial-quoting-mixing-multiple-styl.patch
+914ccac060da5a164c7a37e2cfdb05ea20b583a9bb84631b5bafb9ae37f18214 0002-Shellvars-allow-wrapping-builtin-arguments-to-multip.patch
+95775c884e42e89136511afcc96802f1ac60872ef4933800b88c92b01413dad9 0003-Shellvars-Allow-almost-any-command.patch
+d53ab29203e2d443317e6ac848b0ba421d774bb08c80719863841897e8695c02 0004-Shellvars-test-case-for-wrapping-command-arguments.patch
+3ced5d61df3c509c68c135bbe78f855adf92b5bf1cfa25aa6c4ffeb25a930cff 0005-Shellvars-case-support-on-same-line-with-multiple-co.patch"
+sha512sums="92cc2cf83faa42e83621fe0f73fe9f7247d802f17da781e51d068056d20b1645de1f0ea0d5070c0d5729a3f6554d64a95e31111bf3e44b959386559619843e79 augeas-1.3.0.tar.gz
+f2cdf6fcd84de4f86bc54d89292d3c4c19070b1c6d5149af6a8d7c49678e2a7527b6549ad114e5ccec53d4d9582814153732f69a4c0228243aac96c48a0e1d1d 0001-Dnsmasq-add-structure-to-address-and-server-options.patch
+e89edad7188eff4bffa8710af0f4cb79f4f1c1d37019ebd82b545465abfd276289b79d6980a3a065159d01574ab77bffb8bb0e54daeb05d7e5476f7da73552a7 0001-Shellvars-allow-partial-quoting-mixing-multiple-styl.patch
+76552267238f097431b61f2aa381846a850b0cec22072e471fbcbc1bb455dc887a4119b7d5ac592e10c509fda43159ea958f7ab6267c05f7963306aff0502a7c 0002-Shellvars-allow-wrapping-builtin-arguments-to-multip.patch
+6286efd526f8d4ad75198a0fc02732cf560285cf0a51731faf60cf3c0c75a364852fff399dcc99e1102585c39563c2b2518ee2a4e113bafeadf5e4400a0bff59 0003-Shellvars-Allow-almost-any-command.patch
+6d7284139a1ab59fb8d189a1e851592095b511fb88cf1603213d299e0b0ca3b3afcad9ba22da0225cdb3b53a8cb1837047cec04d9a859bfc2fc73f9b78877967 0004-Shellvars-test-case-for-wrapping-command-arguments.patch
+4c1b64373dec24eee0eb11d163468852afcf24336795e116e7501804b7c1273a2bfdc78fe1bce1f327f3b4fa80c560854a71bb56ab44ac1a492f6b0905aeb18a 0005-Shellvars-case-support-on-same-line-with-multiple-co.patch"