Blame SOURCES/0005-Revert-Dnsmasq-add-structure-to-address-and-server-o.patch

c55e75
From 94b0373abfcb4a6474ee9bb7866fe28f9bbe876d Mon Sep 17 00:00:00 2001
c2e930
From: Dominic Cleal <dcleal@redhat.com>
c2e930
Date: Fri, 12 Jun 2015 10:48:58 +0100
c2e930
Subject: [PATCH] Revert "Dnsmasq: add structure to 'address' and 'server'
c2e930
 options"
c2e930
c2e930
This reverts commit 3e20740056bd548f714cd50e4adc6b76a249ddfc for tree
c2e930
compatibility with Augeas 1.1.0.  address and server options will be
c2e930
unstructured.
c2e930
c2e930
Conflicts:
c2e930
	NEWS
c2e930
---
c2e930
 lenses/dnsmasq.aug            | 34 +++++++++----------------------
c2e930
 lenses/tests/test_dnsmasq.aug | 47 -------------------------------------------
c2e930
 2 files changed, 9 insertions(+), 72 deletions(-)
c2e930
c2e930
diff --git a/lenses/dnsmasq.aug b/lenses/dnsmasq.aug
c55e75
index f7ef9070..e19aab83 100644
c2e930
--- a/lenses/dnsmasq.aug
c2e930
+++ b/lenses/dnsmasq.aug
c2e930
@@ -17,42 +17,26 @@ module Dnsmasq =
c2e930
  *                           USEFUL PRIMITIVES
c2e930
  *************************************************************************)
c2e930
 
c2e930
-let eol          = Util.eol
c2e930
-let spc          = Util.del_ws_spc
c2e930
-let comment      = Util.comment
c2e930
-let empty        = Util.empty
c2e930
+let eol        = Util.eol
c2e930
+let spc        = Util.del_ws_spc
c2e930
+let comment    = Util.comment
c2e930
+let empty      = Util.empty
c2e930
 
c2e930
-let sep_eq       = Sep.equal
c2e930
-let sto_to_eol   = store /([^ \t\n].*[^ \t\n]|[^ \t\n])/
c2e930
-
c2e930
-let slash        = Util.del_str "/"
c2e930
-let sto_no_slash = store /([^\/ \t\n]+)/
c2e930
-let domains      = slash . [ label "domain" . sto_no_slash . slash ]+
c2e930
+let sep_eq     = del /=/ "="
c2e930
+let sto_to_eol = store /([^ \t\n].*[^ \t\n]|[^ \t\n])/
c2e930
 
c2e930
 (************************************************************************
c2e930
- *                            SIMPLE ENTRIES
c2e930
+ *                               ENTRIES
c2e930
  *************************************************************************)
c2e930
 
c2e930
-let entry_re   = Rx.word - /(address|server)/
c2e930
+let entry_re   = /[A-Za-z0-9._-]+/
c2e930
 let entry      = [ key entry_re . (sep_eq . sto_to_eol)? . eol ]
c2e930
 
c2e930
 (************************************************************************
c2e930
- *                          STRUCTURED ENTRIES
c2e930
- *************************************************************************)
c2e930
-
c2e930
-let address       = [ key "address" . sep_eq . domains . sto_no_slash . eol ]
c2e930
-
c2e930
-let server        =
c2e930
-     let port     = [ Build.xchgs "#" "port" . store Rx.integer ]
c2e930
-  in let source   = [ Build.xchgs "@" "source" . store /[^#\/ \t\n]+/ . port? ]
c2e930
-  in let srv_spec = store /(#|([^#@\/ \t\n]+))/ . port? . source?
c2e930
-  in [ key "server" . sep_eq . domains? . srv_spec? . eol ]
c2e930
-
c2e930
-(************************************************************************
c2e930
  *                                LENS
c2e930
  *************************************************************************)
c2e930
 
c2e930
-let lns = (comment|empty|address|server|entry) *
c2e930
+let lns = (comment|empty|entry) *
c2e930
 
c2e930
 let filter            = incl "/etc/dnsmasq.conf"
c2e930
                       . incl "/etc/dnsmasq.d/*"
c2e930
diff --git a/lenses/tests/test_dnsmasq.aug b/lenses/tests/test_dnsmasq.aug
c55e75
index c6a63d96..0abfa6bd 100644
c2e930
--- a/lenses/tests/test_dnsmasq.aug
c2e930
+++ b/lenses/tests/test_dnsmasq.aug
c2e930
@@ -6,16 +6,6 @@ let conf = "# Configuration file for dnsmasq.
c2e930
 
c2e930
 conf-dir=/etc/dnsmasq.d
c2e930
 selfmx
c2e930
-
c2e930
-address=/foo.com/bar.net/10.1.2.3
c2e930
-
c2e930
-server=10.4.5.6#1234
c2e930
-server=/bar.com/foo.net/10.7.8.9
c2e930
-server=/foo.org/bar.org/10.3.2.1@eth0#5678
c2e930
-server=/baz.org/#
c2e930
-server=/baz.net/#@eth1
c2e930
-server=10.6.5.4#1234@eth0#5678
c2e930
-server=/qux.com/qux.net/
c2e930
 "
c2e930
 
c2e930
 test Dnsmasq.lns get conf =
c2e930
@@ -25,40 +15,3 @@ test Dnsmasq.lns get conf =
c2e930
   {}
c2e930
   { "conf-dir" = "/etc/dnsmasq.d" }
c2e930
   { "selfmx" }
c2e930
-  {}
c2e930
-  { "address" = "10.1.2.3"
c2e930
-    { "domain" = "foo.com" }
c2e930
-    { "domain" = "bar.net" }
c2e930
-  }
c2e930
-  {}
c2e930
-  { "server" = "10.4.5.6"
c2e930
-    { "port" = "1234" }
c2e930
-  }
c2e930
-  { "server" = "10.7.8.9"
c2e930
-    { "domain" = "bar.com" }
c2e930
-    { "domain" = "foo.net" }
c2e930
-  }
c2e930
-  { "server" = "10.3.2.1"
c2e930
-    { "domain" = "foo.org" }
c2e930
-    { "domain" = "bar.org" }
c2e930
-    { "source" = "eth0"
c2e930
-      { "port" = "5678" }
c2e930
-    }
c2e930
-  }
c2e930
-  { "server" = "#"
c2e930
-    { "domain" = "baz.org" }
c2e930
-  }
c2e930
-  { "server" = "#"
c2e930
-    { "domain" = "baz.net" }
c2e930
-    { "source" = "eth1" }
c2e930
-  }
c2e930
-  { "server" = "10.6.5.4"
c2e930
-    { "port" = "1234" }
c2e930
-    { "source" = "eth0"
c2e930
-      { "port" = "5678" }
c2e930
-    }
c2e930
-  }
c2e930
-  { "server"
c2e930
-    { "domain" = "qux.com" }
c2e930
-    { "domain" = "qux.net" }
c2e930
-  }
c55e75
-- 
c55e75
2.13.5
c55e75