Remove all patches.
They are no longer used.
This commit is contained in:
parent
0e7f21c358
commit
facf243f98
@ -1,24 +0,0 @@
|
||||
From b41deef293841da50a236023bad486ea3f57e4dc Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Sat, 3 Dec 2011 14:21:50 +0000
|
||||
Subject: [PATCH] pkg-config: Augeas requires libxml2.
|
||||
|
||||
---
|
||||
augeas.pc.in | 2 +-
|
||||
1 files changed, 1 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/augeas.pc.in b/augeas.pc.in
|
||||
index c97847d..9e166db 100644
|
||||
--- a/augeas.pc.in
|
||||
+++ b/augeas.pc.in
|
||||
@@ -6,6 +6,6 @@ includedir=@includedir@
|
||||
Name: augeas
|
||||
Version: @VERSION@
|
||||
Description: Augeas configuration editing library
|
||||
-Requires:
|
||||
+Requires.private: libxml-2.0
|
||||
Libs: -L${libdir} -laugeas @LIBS@
|
||||
Cflags: -I${includedir}
|
||||
--
|
||||
1.7.6
|
||||
|
@ -1,56 +0,0 @@
|
||||
From 075f8d35497fb36d9193e5364c055049c66fa5eb Mon Sep 17 00:00:00 2001
|
||||
From: Lubomir Rintel <lubo.rintel@gooddata.com>
|
||||
Date: Mon, 9 Jan 2012 18:52:11 +0100
|
||||
Subject: [PATCH 1/2] Allow JSON number literals to be followed by whitespace
|
||||
|
||||
Add a test case.
|
||||
|
||||
Fixes https://fedorahosted.org/augeas/ticket/247
|
||||
---
|
||||
AUTHORS | 1 +
|
||||
lenses/json.aug | 2 +-
|
||||
lenses/tests/test_json.aug | 3 +++
|
||||
3 files changed, 5 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/AUTHORS b/AUTHORS
|
||||
index df63f95..e7870f2 100644
|
||||
--- a/AUTHORS
|
||||
+++ b/AUTHORS
|
||||
@@ -44,6 +44,7 @@ Contributions by:
|
||||
Bill Pemberton <wfp5p@virginia.edu>
|
||||
Alan Pevec <apevec@redhat.com>
|
||||
Robin Lee Powell <rlpowell@digitalkingdom.org>
|
||||
+ Lubomir Rintel <lubo.rintel@gooddata.com>
|
||||
Roman Rakus <rrakus@redhat.com>
|
||||
Satoru SATOH <satoru.satoh@gmail.com>
|
||||
Nicolas Valcárcel Scerpella <nvalcarcel@ubuntu.com>
|
||||
diff --git a/lenses/json.aug b/lenses/json.aug
|
||||
index c22ad90..6ceab09 100644
|
||||
--- a/lenses/json.aug
|
||||
+++ b/lenses/json.aug
|
||||
@@ -29,7 +29,7 @@ let str_store =
|
||||
let q = del "\"" "\"" in
|
||||
q . store /[^"]*/ . q . ws (* " Emacs, relax *)
|
||||
|
||||
-let number = [ label "number" . store /-?[0-9]+(\.[0-9]+)?([eE][+-]?[0-9]+)?/ ]
|
||||
+let number = [ label "number" . store /-?[0-9]+(\.[0-9]+)?([eE][+-]?[0-9]+)?/ . ws ]
|
||||
let str = [ label "string" . str_store ]
|
||||
|
||||
let const (r:regexp) = [ label "const" . store r . ws ]
|
||||
diff --git a/lenses/tests/test_json.aug b/lenses/tests/test_json.aug
|
||||
index 0bcd25d..d8b7fa8 100644
|
||||
--- a/lenses/tests/test_json.aug
|
||||
+++ b/lenses/tests/test_json.aug
|
||||
@@ -8,6 +8,9 @@ test lns get "true" = { "const" = "true" }
|
||||
|
||||
test lns get "3.141" = { "number" = "3.141" }
|
||||
|
||||
+test lns get "{ \"key\" : 666 }" =
|
||||
+ { "dict" { "entry" = "key" { "number" = "666" } } }
|
||||
+
|
||||
test lns get "[true, 0, \"yo\"]" =
|
||||
{ "array" { "const" = "true" } { "number" = "0" } { "string" = "yo" } }
|
||||
|
||||
--
|
||||
1.7.7.5
|
||||
|
@ -1,49 +0,0 @@
|
||||
From 100a7b38222a63c6435a72b4974b55f39a28989e Mon Sep 17 00:00:00 2001
|
||||
From: Lubomir Rintel <lubo.rintel@gooddata.com>
|
||||
Date: Mon, 9 Jan 2012 19:24:41 +0100
|
||||
Subject: [PATCH 2/2] Correctly parse empty object and arrays in JSON
|
||||
|
||||
Add a test case.
|
||||
Fix from David Lutterkort <lutter@redhat.com>.
|
||||
|
||||
https://fedorahosted.org/augeas/ticket/248
|
||||
---
|
||||
lenses/json.aug | 4 ++--
|
||||
lenses/tests/test_json.aug | 5 +++++
|
||||
2 files changed, 7 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/lenses/json.aug b/lenses/json.aug
|
||||
index 6ceab09..2645806 100644
|
||||
--- a/lenses/json.aug
|
||||
+++ b/lenses/json.aug
|
||||
@@ -37,9 +37,9 @@ let const (r:regexp) = [ label "const" . store r . ws ]
|
||||
let value0 = str | number | const /true|false|null/
|
||||
|
||||
let fix_value (value:lens) =
|
||||
- let array = [ label "array" . lbrack . Build.opt_list value comma . rbrack ] in
|
||||
+ let array = [ label "array" . lbrack . (Build.opt_list value comma)? . rbrack ] in
|
||||
let pair = [ label "entry" . str_store . colon . value ] in
|
||||
- let obj = [ label "dict" . lbrace . Build.opt_list pair comma . rbrace ] in
|
||||
+ let obj = [ label "dict" . lbrace . (Build.opt_list pair comma)? . rbrace ] in
|
||||
(str | number | obj | array | const /true|false|null/)
|
||||
|
||||
(* Typecheck finitely deep nesting *)
|
||||
diff --git a/lenses/tests/test_json.aug b/lenses/tests/test_json.aug
|
||||
index d8b7fa8..aec7d4c 100644
|
||||
--- a/lenses/tests/test_json.aug
|
||||
+++ b/lenses/tests/test_json.aug
|
||||
@@ -30,6 +30,11 @@ test lns get "{ \"0\": true, \"1\":false }" =
|
||||
test lns get "{\"menu\": \"entry one\"}" =
|
||||
{ "dict" { "entry" = "menu" { "string" = "entry one" } } }
|
||||
|
||||
+test lns get "[ ]" =
|
||||
+ { "array" }
|
||||
+
|
||||
+test lns get "{}" =
|
||||
+ { "dict" }
|
||||
|
||||
let s = "{\"menu\": {
|
||||
\"id\": \"file\",
|
||||
--
|
||||
1.7.7.5
|
||||
|
@ -1,147 +0,0 @@
|
||||
commit ea010d85e796dc979cdfacc91bc1d06a8c6dac7c
|
||||
Author: David Lutterkort <lutter@redhat.com>
|
||||
Date: Fri Apr 29 14:32:13 2011 -0700
|
||||
|
||||
path expressions: allow whitespace inside names
|
||||
|
||||
This makes the path expression '/files/etc/foo bar/baz' legal, i.e. it is
|
||||
no longer necessary to escape whitespace in path expressions.
|
||||
|
||||
Fixes BZ 700608
|
||||
|
||||
diff --git a/doc/xpath.txt b/doc/xpath.txt
|
||||
index cd12ebe..a609003 100644
|
||||
--- a/doc/xpath.txt
|
||||
+++ b/doc/xpath.txt
|
||||
@@ -133,7 +133,10 @@ UnionExpr ::= PathExpr ("|" PathExpr)*
|
||||
|
||||
Literal ::= '"' /[^"]* / '"' | "'" /[^']* / "'"
|
||||
Number ::= /[0-9]+/
|
||||
-Name ::= /([^][/\= \t\n]|\\.)+/
|
||||
+/* Names can contain whitespace in the interior */
|
||||
+NameNoWS ::= [^][|/\= \t\n] | \\.
|
||||
+NameWS ::= [^][|/\=] | \\.
|
||||
+Name ::= NameNoWS NameWS* NameNoWS | NameNoWS
|
||||
|
||||
VariableReference ::= '$' /[a-zA-Z_][a-zA-Z0-9_]*/
|
||||
|
||||
diff --git a/src/pathx.c b/src/pathx.c
|
||||
index a4cdf48..acd4eb0 100644
|
||||
--- a/src/pathx.c
|
||||
+++ b/src/pathx.c
|
||||
@@ -1374,17 +1374,16 @@ static void push_new_binary_op(enum binary_op op, struct state *state) {
|
||||
}
|
||||
|
||||
/*
|
||||
- * Name ::= /[^][/=) \t\n]+/
|
||||
+ * NameNoWS ::= [^][|/\= \t\n] | \\.
|
||||
+ * NameWS ::= [^][|/\=] | \\.
|
||||
+ * Name ::= NameNoWS NameWS* NameNoWS | NameNoWS
|
||||
*/
|
||||
static char *parse_name(struct state *state) {
|
||||
+ static const char const follow[] = "][|/=()";
|
||||
const char *s = state->pos;
|
||||
char *result;
|
||||
|
||||
- while (*state->pos != '\0' &&
|
||||
- *state->pos != L_BRACK && *state->pos != SEP &&
|
||||
- *state->pos != R_BRACK && *state->pos != '=' &&
|
||||
- *state->pos != ')' &&
|
||||
- !isspace(*state->pos)) {
|
||||
+ while (*state->pos != '\0' && strchr(follow, *state->pos) == NULL) {
|
||||
if (*state->pos == '\\') {
|
||||
state->pos += 1;
|
||||
if (*state->pos == '\0') {
|
||||
@@ -1395,6 +1394,14 @@ static char *parse_name(struct state *state) {
|
||||
state->pos += 1;
|
||||
}
|
||||
|
||||
+ /* Strip trailing white space */
|
||||
+ if (state->pos > s) {
|
||||
+ state->pos -= 1;
|
||||
+ while (isspace(*state->pos) && state->pos >= s)
|
||||
+ state->pos -= 1;
|
||||
+ state->pos += 1;
|
||||
+ }
|
||||
+
|
||||
if (state->pos == s) {
|
||||
STATE_ERROR(state, PATHX_ENAME);
|
||||
return NULL;
|
||||
diff --git a/tests/test-xpath.c b/tests/test-xpath.c
|
||||
index 3a3d241..c990364 100644
|
||||
--- a/tests/test-xpath.c
|
||||
+++ b/tests/test-xpath.c
|
||||
@@ -78,6 +78,19 @@ static char *token_to_eol(char *s, char **tok) {
|
||||
return s;
|
||||
}
|
||||
|
||||
+static char *findpath(char *s, char **p) {
|
||||
+ char *t = skipws(s);
|
||||
+
|
||||
+ while (*s && *s != '=') s++;
|
||||
+ if (s > t) {
|
||||
+ s -= 1;
|
||||
+ while (*s && isspace(*s)) s -= 1;
|
||||
+ s += 1;
|
||||
+ }
|
||||
+ *p = strndup(t, s - t);
|
||||
+ return s;
|
||||
+}
|
||||
+
|
||||
static struct test *read_tests(void) {
|
||||
char *fname;
|
||||
FILE *fp;
|
||||
@@ -107,7 +120,7 @@ static struct test *read_tests(void) {
|
||||
if (ALLOC(e) < 0)
|
||||
die("out of memory");
|
||||
list_append(t->entries, e);
|
||||
- s = token(s, &(e->path));
|
||||
+ s = findpath(s, &(e->path));
|
||||
s = skipws(s);
|
||||
if (*s) {
|
||||
if (*s != '=') {
|
||||
@@ -318,6 +331,9 @@ static int run_tests(struct test *tests) {
|
||||
r = aug_defvar(aug, "localhost", "'127.0.0.1'");
|
||||
if (r != 0)
|
||||
die("aug_defvar $localhost");
|
||||
+ r = aug_defvar(aug, "php", "/files/etc/php.ini");
|
||||
+ if (r != 1)
|
||||
+ die("aug_defvar $php");
|
||||
|
||||
list_for_each(t, tests) {
|
||||
if (run_one_test(aug, t) < 0)
|
||||
diff --git a/tests/xpath.tests b/tests/xpath.tests
|
||||
index b16792a..cd1909c 100644
|
||||
--- a/tests/xpath.tests
|
||||
+++ b/tests/xpath.tests
|
||||
@@ -16,7 +16,9 @@
|
||||
# results listed in the test
|
||||
#
|
||||
# The test framework sets up variables:
|
||||
-# hosts /files/etc/hosts/*
|
||||
+# hosts /files/etc/hosts/*
|
||||
+# localhost '127.0.0.1'
|
||||
+# php /files/etc/php.ini
|
||||
|
||||
# Very simple to warm up
|
||||
test wildcard /files/etc/hosts/*/ipaddr
|
||||
@@ -235,3 +237,19 @@ test union (/files/etc/yum.conf | /files/etc/yum.repos.d/*)/*/gpgcheck
|
||||
/files/etc/yum.repos.d/fedora.repo/fedora-source/gpgcheck = 1
|
||||
/files/etc/yum.repos.d/remi.repo/remi/gpgcheck = 1
|
||||
/files/etc/yum.repos.d/remi.repo/remi-test/gpgcheck = 1
|
||||
+
|
||||
+# Paths with whitespace in them
|
||||
+test php1 $php/mail function
|
||||
+ /files/etc/php.ini/mail function
|
||||
+
|
||||
+test php2 $php[mail function]
|
||||
+ /files/etc/php.ini
|
||||
+
|
||||
+test php3 $php[count(mail function) = 1]
|
||||
+ /files/etc/php.ini
|
||||
+
|
||||
+test php4 $php/mail function/SMTP
|
||||
+ /files/etc/php.ini/mail function/SMTP = localhost
|
||||
+
|
||||
+test php5 $php/mail\ function
|
||||
+ /files/etc/php.ini/mail function
|
Loading…
Reference in New Issue
Block a user