/usr/share/augeas/lenses/dist/yum.aug is in augeas-lenses 0.10.0-0ubuntu4.
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 | (* Parsing yum's config files *)
module Yum =
autoload xfm
let eol = Util.del_str "\n"
let key_re = /[^#;:= \t\n[\/]+/ - /baseurl|gpgkey/
let eq = del /[ \t]*[:=][ \t]*/ "="
let secname = /[^]\/]+/
let value = /[^ \t\n][^\n]*/
(* We really need to allow comments starting with REM and rem but that *)
(* leads to ambiguities with keys 'rem=' and 'REM=' The regular expression *)
(* to do that cleanly is somewhat annoying to craft by hand; we'd need to *)
(* define KEY_RE as /[A-Za-z0-9]+/ - "REM" - "rem" *)
let comment = [ del /([;#].*)?[ \t]*\n/ "\n" ]
let list_sep = del /([ \t]*(,[ \t]*|\n[ \t]+))|[ \t]+/ "\n\t"
let list_value = store /[^ \t\n,]+/
let kv_list(s:string) =
[ key s . eq . list_value ] .
[ list_sep . label s . list_value ]* . eol
let kv = [ key key_re . eq . store value . eol ]
let sechead = Util.del_str "[" . key secname . Util.del_str "]"
. del /[ \t]*[;#]?.*/ ""
. eol
let entry = comment | kv
(* A section is a section head, followed by any number of key value *)
(* entries, with comments and blank lines freely interspersed. The *)
(* continuation lines allowed for baseurl entries make this a little *)
(* more interesting: there can be at most one baseurl entry in each *)
(* section (more precisely, yum will only obey one of them, but we act *)
(* as if yum would actually barf) *)
let section =
let list_baseurl = kv_list "baseurl" in
let list_gpgkey = kv_list "gpgkey" in
[ sechead . ( entry*
| entry* . list_baseurl . entry*
| entry* . list_gpgkey . entry*
| entry* . list_baseurl . entry* . list_gpgkey . entry*
| entry* . list_gpgkey . entry* . list_baseurl . entry*)]
let lns = (comment) * . (section) *
let filter = (incl "/etc/yum.conf")
. (incl "/etc/yum.repos.d/*")
. (incl "/etc/yum/pluginconf.d/*")
. (excl "/etc/yum/pluginconf.d/versionlock.list")
. Util.stdexcl
let xfm = transform lns filter
(* Local Variables: *)
(* mode: caml *)
(* End: *)
|