This file is indexed.

/usr/share/augeas/lenses/dist/reprepro_uploaders.aug is in augeas-lenses 1.2.0-0ubuntu1.3.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
(*
Module: Reprepro_Uploaders
  Parses reprepro's uploaders files

Author: Raphael Pinson <raphink@gmail.com>

About: Reference
  This lens tries to keep as close as possible to `man 1 reprepro` where possible.

About: License
   This file is licenced under the LGPL v2+, like the rest of Augeas.

About: Lens Usage
   See <lns>.

About: Configuration files
   This lens applies to reprepro's uploaders files.

About: Examples
   The <Test_Reprepro_Uploaders> file contains various examples and tests.
*)

module Reprepro_Uploaders =

(* View: logic_construct_condition
   A logical construction for <condition> and <condition_list> *)
let logic_construct_condition (kw:string) (lns:lens) =
    [ label kw . lns ]
  . [ Sep.space . key kw . Sep.space . lns ]*

(* View: logic_construct_field
   A generic definition for <condition_field> *)
let logic_construct_field (kw:string) (sep:string) (lns:lens) =
    [ label kw . lns ]
  . [ Build.xchgs sep kw . lns ]*

(* View: condition_re
   A condition can be of several types:

   - source
   - byhand
   - sections
   - sections contain
   - binaries
   - binaries contain
   - architectures
   - architectures contain

   While the lens technically also accepts "source contain"
   and "byhand contain", these are not understood by reprepro.

   The "contain" types are built by adding a "contain" subnode.
   See the <condition_field> definition.

 *)
let condition_re =
    "source"
  | "byhand"
  | "sections"
  | "binaries"
  | "architectures"

(* View: condition_field
   A single condition field is an 'or' node.
   It may contain several values, listed in 'or' subnodes:

   > $reprepro/allow[1]/and/or = "architectures"
   > $reprepro/allow[1]/and/or/or[1] = "i386"
   > $reprepro/allow[1]/and/or/or[2] = "amd64"
   > $reprepro/allow[1]/and/or/or[3] = "all"

 *)
let condition_field =
  let sto_condition = Util.del_str "'" . store /[^'\n]+/ . Util.del_str "'" in
    [ key "not" . Sep.space ]? .
    store condition_re
  . [ Sep.space . key "contain" ]?
  . Sep.space
  . logic_construct_field "or" "|" sto_condition

(* View: condition
   A condition is an 'and' node,
   representing a union of <condition_fields>,
   listed under 'or' subnodes:

   > $reprepro/allow[1]/and
   > $reprepro/allow[1]/and/or = "architectures"
   > $reprepro/allow[1]/and/or/or[1] = "i386"
   > $reprepro/allow[1]/and/or/or[2] = "amd64"
   > $reprepro/allow[1]/and/or/or[3] = "all"

 *)
let condition =
    logic_construct_condition "or" condition_field

(* View: condition_list
   A list of <conditions>, inspired by Debctrl.dependency_list
   An upload condition list is either the wildcard '*', stored verbatim,
   or an intersection of conditions listed under 'and' subnodes:

   > $reprepro/allow[1]/and[1]
   > $reprepro/allow[1]/and[1]/or = "architectures"
   > $reprepro/allow[1]/and[1]/or/or[1] = "i386"
   > $reprepro/allow[1]/and[1]/or/or[2] = "amd64"
   > $reprepro/allow[1]/and[1]/or/or[3] = "all"
   > $reprepro/allow[1]/and[2]
   > $reprepro/allow[1]/and[2]/or = "sections"
   > $reprepro/allow[1]/and[2]/or/contain
   > $reprepro/allow[1]/and[2]/or/or = "main"

 *)
let condition_list =
    store "*"
  | logic_construct_condition "and" condition

(* View: by_key
   When a key is used to authenticate packages,
   the value can either be a key ID or "any":

   > $reprepro/allow[1]/by/key = "ABCD1234"
   > $reprepro/allow[2]/by/key = "any"

 *)
let by_key =
  let any_key   = [ store "any" . Sep.space
                  . key "key" ] in
  let named_key = [ key "key" . Sep.space
                  . store (Rx.word - "any") ] in
    value "key" . (any_key | named_key)

(* View: by
   <by> statements define who is allowed to upload.
   It can be simple keywords, like "anybody" or "unsigned",
   or a key ID, in which case a "key" subnode is added:

   > $reprepro/allow[1]/by/key = "ABCD1234"
   > $reprepro/allow[2]/by/key = "any"
   > $reprepro/allow[3]/by = "anybody"
   > $reprepro/allow[4]/by = "unsigned"

 *)
let by =
    [ key "by" . Sep.space
         . ( store ("anybody"|"unsigned")
           | by_key ) ]

(* View: entry
   An entry is an allow statement, e.g.:

   > $reprepro/allow[1]
   > $reprepro/allow[1]/and[1]
   > $reprepro/allow[1]/and[1]/or = "architectures"
   > $reprepro/allow[1]/and[1]/or/or[1] = "i386"
   > $reprepro/allow[1]/and[1]/or/or[2] = "amd64"
   > $reprepro/allow[1]/and[1]/or/or[3] = "all"
   > $reprepro/allow[1]/and[2]
   > $reprepro/allow[1]/and[2]/or = "sections"
   > $reprepro/allow[1]/and[2]/or/contain
   > $reprepro/allow[1]/and[2]/or/or = "main"
   > $reprepro/allow[1]/by = "key"
   > $reprepro/allow[1]/by/key = "ABCD1234"

 *)
let entry =
    [ key "allow" . Sep.space
  . condition_list . Sep.space
  . by . Util.eol ]

(* View: lns
   The lens is made of <Util.empty>, <Util.comment> and <entry> lines *)
let lns = (Util.empty|Util.comment|entry)*