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

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