ports/173669: textproc/augeas: shellvars can't parse loader.conf
Garrett Wollman
wollman at csail.mit.edu
Fri Nov 16 23:10:01 UTC 2012
>Number: 173669
>Category: ports
>Synopsis: textproc/augeas: shellvars can't parse loader.conf
>Confidential: no
>Severity: serious
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Fri Nov 16 23:10:00 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator: Garrett Wollman
>Release: FreeBSD 9.1-RC3 amd64
>Organization:
MIT Computer Science & Artificial Intelligence Lab
>Environment:
System: FreeBSD xyz.csail.mit.edu 9.1-RC3 FreeBSD 9.1-RC3 #14 r242372M: Thu Nov 1 01:12:44 EDT 2012 wollman at xyz.csail.mit.edu:/usr/obj/usr/src/sys/CSAIL amd64
>Description:
textproc/augeas includes a patch to shellvars.aug that make it claim
to support /boot/loader.conf. However, loader.conf allows setting
kernel environment variables, which often have dots in them, and the
regular expression in shellvars.aug won't match on these lines,
causing the parse to fail and augeas to be unable to edit the file.
>How-To-Repeat:
Define any kernel environment variable, like kern.hwpmc.nsamples, in
/boot/loader.conf. In augtool, run "print /augeas/files/boot/loader.conf"
and get back:
/augeas/files/boot/loader.conf
/augeas/files/boot/loader.conf/path = "/files/boot/loader.conf"
/augeas/files/boot/loader.conf/mtime = "1351131615"
/augeas/files/boot/loader.conf/lens = "@Shellvars"
/augeas/files/boot/loader.conf/lens/info = "/usr/local/share/augeas/lenses/dist/shellvars.aug:138.12-.89:"
/augeas/files/boot/loader.conf/error = "parse_failed"
/augeas/files/boot/loader.conf/error/pos = "90"
/augeas/files/boot/loader.conf/error/line = "5"
/augeas/files/boot/loader.conf/error/char = "0"
/augeas/files/boot/loader.conf/error/lens = "/usr/local/share/augeas/lenses/dist/shellvars.aug:138.12-.89:"
/augeas/files/boot/loader.conf/error/message = "Syntax error"
>Fix:
Fork a new lens that's like shellvars but includes "." in the
character class for key names, and let it take over /boot/loader.conf.
(You could also remove support for "export" and "unset" keywords.)
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list