Bump to 1.14.1
[platform/upstream/augeas.git] / lenses / reprepro_uploaders.aug
index e905fb1..b8acef8 100644 (file)
@@ -9,7 +9,6 @@ About: Reference
 
 About: License
    This file is licenced under the LGPL v2+, like the rest of Augeas.
-
 About: Lens Usage
    See <lns>.
 
@@ -59,6 +58,7 @@ let condition_re =
   | "sections"
   | "binaries"
   | "architectures"
+  | "distribution"
 
 (* View: condition_field
    A single condition field is an 'or' node.
@@ -128,6 +128,16 @@ let by_key =
                   . store (Rx.word - "any") ] in
     value "key" . (any_key | named_key)
 
+(* View: by_group
+   Authenticate packages by a groupname.
+
+   > $reprepro/allow[1]/by/group = "groupname"
+
+ *)
+let by_group = value "group"
+             . [ key "group" . Sep.space
+             . store Rx.word ]
+
 (* View: by
    <by> statements define who is allowed to upload.
    It can be simple keywords, like "anybody" or "unsigned",
@@ -142,10 +152,10 @@ let by_key =
 let by =
     [ key "by" . Sep.space
          . ( store ("anybody"|"unsigned")
-           | by_key ) ]
+           | by_key | by_group ) ]
 
-(* View: entry
-   An entry is an allow statement, e.g.:
+(* View: allow
+   An allow entry, e.g.:
 
    > $reprepro/allow[1]
    > $reprepro/allow[1]/and[1]
@@ -161,11 +171,30 @@ let by =
    > $reprepro/allow[1]/by/key = "ABCD1234"
 
  *)
-let entry =
+let allow =
     [ key "allow" . Sep.space
   . condition_list . Sep.space
   . by . Util.eol ]
 
+(* View: group
+   A group declaration *)
+let group =
+     let add = [ key "add" . Sep.space
+             . store Rx.word ]
+  in let contains = [ key "contains" . Sep.space
+                    . store Rx.word ]
+  in let empty = [ key "empty" ]
+  in let unused = [ key "unused" ]
+  in [ key "group" . Sep.space
+     . store Rx.word . Sep.space
+     . (add | contains | empty | unused) . Util.eol ]
+
+(* View: entry
+   An entry is either an <allow> statement
+   or a <group> definition.
+ *)
+let entry = allow | group
+
 (* View: lns
    The lens is made of <Util.empty>, <Util.comment> and <entry> lines *)
 let lns = (Util.empty|Util.comment|entry)*