hercules-team / augeas Goto Github PK
View Code? Open in Web Editor NEWA configuration editing tool and API
Home Page: http://augeas.net/
License: GNU Lesser General Public License v2.1
A configuration editing tool and API
Home Page: http://augeas.net/
License: GNU Lesser General Public License v2.1
Opened a bug on launchpad about it thinking that was the bug tracker, opening here and linking from there too:
https://bugs.launchpad.net/ubuntu/+source/augeas/+bug/814569
Hello,
We are using augeas-1.0.0-5.el6_5.1 on a RedHat 6.5 system. Our syslog-ng logrotate config file looks like:
/var/log/syslog /var/log/secure{
compress
sharedscripts
postrotate
/bin/kill -HUP `cat /var/run/syslog-ng.pid 2> /dev/null` 2> /dev/null || true
endscript
}
Augeas is not able to parse this file:
augtool> print //files/etc/logrotate.d/syslog-ng
/augeas/files/etc/logrotate.d/syslog-ng
/augeas/files/etc/logrotate.d/syslog-ng/path = "/files/etc/logrotate.d/syslog-ng"
/augeas/files/etc/logrotate.d/syslog-ng/mtime = "1399378192"
/augeas/files/etc/logrotate.d/syslog-ng/lens = "@Logrotate"
/augeas/files/etc/logrotate.d/syslog-ng/lens/info = "/usr/share/augeas/lenses/dist/logrotate.aug:117.13-.56:"
/augeas/files/etc/logrotate.d/syslog-ng/error = "parse_failed"
/augeas/files/etc/logrotate.d/syslog-ng/error/pos = "0"
/augeas/files/etc/logrotate.d/syslog-ng/error/line = "1"
/augeas/files/etc/logrotate.d/syslog-ng/error/char = "0"
/augeas/files/etc/logrotate.d/syslog-ng/error/lens = "/usr/share/augeas/lenses/dist/logrotate.aug:117.13-.56:"
/augeas/files/etc/logrotate.d/syslog-ng/error/message = "Iterated lens matched less than it should"
This issue seems to be caused by the lack of white-space between file list and "{". It would be nice if logrotate lens can handle this kind of use case.
Regards,
Xavier
If you try to parse the following properties file.
tomcat.util.scan.DefaultJarScanner.jarsToSkip= \
bootstrap.jar,commons-daemon.jar,tomcat-juli.jar,\
annotations-api.jar,el-api.jar,jsp-api.jar,servlet-api.jar,\
catalina.jar,catalina-ant.jar,catalina-ha.jar,catalina-tribes.jar
it fails with the following error
augtool> set /augeas/load/Properties/lens Properties.lns
augtool> set /augeas/load/Properties/incl[last()+1] /tmp/test.properties
augtool> load
augtool> print /augeas//error
/augeas/files/tmp/test.properties/error = "parse_failed"
/augeas/files/tmp/test.properties/error/pos = "0"
/augeas/files/tmp/test.properties/error/line = "1"
/augeas/files/tmp/test.properties/error/char = "0"
/augeas/files/tmp/test.properties/error/lens = "/usr/share/augeas/lenses/dist/properties.aug:47.25-.100:"
/augeas/files/tmp/test.properties/error/message = "Iterated lens matched less than it should"
Changing the file to
tomcat.util.scan.DefaultJarScanner.jarsToSkip= bootstrap.jar,commons-daemon.jar,tomcat-juli.jar,\
annotations-api.jar,el-api.jar,jsp-api.jar,servlet-api.jar,\
catalina.jar,catalina-ant.jar,catalina-ha.jar,catalina-tribes.jar
Works as expected
augtool> set /augeas/load/Properties/lens Properties.lns
augtool> set /augeas/load/Properties/incl[last()+1] /tmp/test.properties
augtool> load
augtool> print /files/tmp/test.properties/
/files/tmp/test.properties
/files/tmp/test.properties/tomcat.util.scan.DefaultJarScanner.jarsToSkip = " < multi > "
To find them, you need to know to look on the Wiki; to make matters worse, there are quite a few places where a broken link goes to a nonexistent page (e.g., in http://augeas.net/docs/tree.html)
I've got a syntax error on Ubuntu 12.04 when tried to parse Tomcat 7 server.xml file. It uses single quotes in XML prolog
<?xml version='1.0' encoding='utf-8'?>
XML spec allows both single and double quotes in XML prolog
http://www.w3.org/TR/REC-xml/#NT-VersionInfo
I will be glad to come with a pull request, but i haven't any experience with lenses grammar.
The man pages need to be updated to include the cp command
lens_ktype
and lens_vtype
always returns /()/
:
module Bar =
let t = [ key "a" ]
let _ = print_regexp(lens_ktype t)
let _ = print_endline ""
let u = [ label "a" . store "b" ]
let _ = print_regexp(lens_ktype u)
let _ = print_endline ""
$ augparse bar.aug
/()/
/()/
The lens doesn't work anymore as soon as there is a multiline property - as in a line ends with '' and gets continued in the next line.
An example would be:
tomcat.util.scan.DefaultJarScanner.jarsToSkip=
bootstrap.jar,commons-daemon.jar,tomcat-juli.jar
which is perfectly valid, as in is the same as
tomcat.util.scan.DefaultJarScanner.jarsToSkip=bootstrap.jar,commons-daemon.jar,tomcat-juli.jar
which works as expected.
The used Augeas version is 1.0 on CentOS 6.4.
When trying to add a "file" to /etc/logrotate.d/rsyslog I get a, "Failed to match" error when saving. This happens with augeas version 0.10.0 (shipping with Ubuntu precise) and version 1.2.0. Here's an example with augeas version 1.2.0 on Ubuntu 12.04 LTS.
jlewis@ops02:~/tmp/augeas-1.2.0/src$ ./augtool --version
augtool 1.2.0 <http://augeas.net/>
Copyright (C) 2007-2011 David Lutterkort
License LGPLv2+: GNU LGPL version 2.1 or later
<http://www.gnu.org/licenses/lgpl-2.1.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by David Lutterkort
jlewis@ops02:~/tmp/augeas-1.2.0/src$ sudo ./augtool -I ../lenses
augtool> print /files/etc/logrotate.d/rsyslog/*[rotate = '4']
/files/etc/logrotate.d/rsyslog/rule[2]
/files/etc/logrotate.d/rsyslog/rule[2]/file[1] = "/var/log/mail.info"
/files/etc/logrotate.d/rsyslog/rule[2]/file[2] = "/var/log/mail.warn"
/files/etc/logrotate.d/rsyslog/rule[2]/file[3] = "/var/log/mail.err"
/files/etc/logrotate.d/rsyslog/rule[2]/file[4] = "/var/log/mail.log"
/files/etc/logrotate.d/rsyslog/rule[2]/file[5] = "/var/log/daemon.log"
/files/etc/logrotate.d/rsyslog/rule[2]/file[6] = "/var/log/kern.log"
/files/etc/logrotate.d/rsyslog/rule[2]/file[7] = "/var/log/auth.log"
/files/etc/logrotate.d/rsyslog/rule[2]/file[8] = "/var/log/user.log"
/files/etc/logrotate.d/rsyslog/rule[2]/file[9] = "/var/log/lpr.log"
/files/etc/logrotate.d/rsyslog/rule[2]/file[10] = "/var/log/cron.log"
/files/etc/logrotate.d/rsyslog/rule[2]/file[11] = "/var/log/debug"
/files/etc/logrotate.d/rsyslog/rule[2]/file[12] = "/var/log/messages"
/files/etc/logrotate.d/rsyslog/rule[2]/rotate = "4"
/files/etc/logrotate.d/rsyslog/rule[2]/schedule = "weekly"
/files/etc/logrotate.d/rsyslog/rule[2]/missingok = "missingok"
/files/etc/logrotate.d/rsyslog/rule[2]/ifempty = "notifempty"
/files/etc/logrotate.d/rsyslog/rule[2]/compress = "compress"
/files/etc/logrotate.d/rsyslog/rule[2]/delaycompress = "delaycompress"
/files/etc/logrotate.d/rsyslog/rule[2]/sharedscripts = "sharedscripts"
/files/etc/logrotate.d/rsyslog/rule[2]/postrotate = "\t\treload rsyslog >/dev/null 2>&1 || true"
augtool> set /files/etc/logrotate.d/rsyslog/*[rotate = '4']/file[. = '/var/log/jlewis2.log'] /var/log/jlewis2.log
augtool> print /files/etc/logrotate.d/rsyslog/*[rotate = '4']
/files/etc/logrotate.d/rsyslog/rule[2]
/files/etc/logrotate.d/rsyslog/rule[2]/file[1] = "/var/log/mail.info"
/files/etc/logrotate.d/rsyslog/rule[2]/file[2] = "/var/log/mail.warn"
/files/etc/logrotate.d/rsyslog/rule[2]/file[3] = "/var/log/mail.err"
/files/etc/logrotate.d/rsyslog/rule[2]/file[4] = "/var/log/mail.log"
/files/etc/logrotate.d/rsyslog/rule[2]/file[5] = "/var/log/daemon.log"
/files/etc/logrotate.d/rsyslog/rule[2]/file[6] = "/var/log/kern.log"
/files/etc/logrotate.d/rsyslog/rule[2]/file[7] = "/var/log/auth.log"
/files/etc/logrotate.d/rsyslog/rule[2]/file[8] = "/var/log/user.log"
/files/etc/logrotate.d/rsyslog/rule[2]/file[9] = "/var/log/lpr.log"
/files/etc/logrotate.d/rsyslog/rule[2]/file[10] = "/var/log/cron.log"
/files/etc/logrotate.d/rsyslog/rule[2]/file[11] = "/var/log/debug"
/files/etc/logrotate.d/rsyslog/rule[2]/file[12] = "/var/log/messages"
/files/etc/logrotate.d/rsyslog/rule[2]/rotate = "4"
/files/etc/logrotate.d/rsyslog/rule[2]/schedule = "weekly"
/files/etc/logrotate.d/rsyslog/rule[2]/missingok = "missingok"
/files/etc/logrotate.d/rsyslog/rule[2]/ifempty = "notifempty"
/files/etc/logrotate.d/rsyslog/rule[2]/compress = "compress"
/files/etc/logrotate.d/rsyslog/rule[2]/delaycompress = "delaycompress"
/files/etc/logrotate.d/rsyslog/rule[2]/sharedscripts = "sharedscripts"
/files/etc/logrotate.d/rsyslog/rule[2]/postrotate = "\t\treload rsyslog >/dev/null 2>&1 || true"
/files/etc/logrotate.d/rsyslog/rule[2]/file[13] = "/var/log/jlewis2.log"
augtool> save
error: Failed to execute command
saving failed (run 'print /augeas//error' for details)
augtool>
augtool> print /augeas/files/etc/logrotate.d/rsyslog/error
/augeas/files/etc/logrotate.d/rsyslog/error = "put_failed"
/augeas/files/etc/logrotate.d/rsyslog/error/path = "/files/etc/logrotate.d/rsyslog/rule"
/augeas/files/etc/logrotate.d/rsyslog/error/lens = "../lenses/logrotate.aug:115.7-.58:"
/augeas/files/etc/logrotate.d/rsyslog/error/message = "Failed to match \n { /file/ = /\\/[^\\001-\\004\\t\\n #,={}]+/ }({ /file/ = /\\/[^\\001-\\004\\t\\n #,={}]+/ })*(({ /schedule/ = /daily|weekly|monthly|yearly/ } | { /rotate/ = /[+-]?[0-9]+/ } | { /create/ } | { /nocreate/ } | { /su/ } | { /include/ = /[^\\001-\\004\\t\\n #,={}]+/ } | { /missingok/ = /(no)?missingok/ } | { /compress/ = /(no)?compress/ } | { /delaycompress/ = /(no)?delaycompress/ } | { /ifempty/ = /(not)?ifempty/ } | { /sharedscripts/ = /(no)?sharedscripts/ } | { /size/ = /[+-]?[0-9]+[GMk]?/ } | { /tabooext/ = /((\\\\+))?/ } | { /olddir/ = /[^\\001-\\004\\t\\n #,={}]+/ } | { /noolddir/ } | { /mail/ = /[^\\001-\\004\\t\\n #,={}]+/ } | { /mailfirst/ } | { /maillast/ } | { /nomail/ } | { /errors/ = /[^\\001-\\004\\t\\n #,={}]+/ } | { /extension/ = /[^\\001-\\004\\t\\n #,={}]+/ } | { /dateext/ = /(no)?dateext/ } | { /compresscmd/ = /[^\\001-\\004\\t\\n #,={}]+/ } | { /uncompresscmd/ = /[^\\001-\\004\\t\\n #,={}]+/ } | { /compressext/ = /[^\\001-\\004\\t\\n #,={}]+/ } | { /compressoptions/ } | { /copy/ = /(no)?copy/ } | { /copytruncate/ = /(no)?copytruncate/ } | { /maxage/ = /[+-]?[0-9]+/ } | { /minsize/ = /[+-]?[0-9]+[GMk]?/ } | { /shred/ = /(no)?shred/ } | { /shredcycles/ = /[+-]?[0-9]+/ } | { /start/ = /[+-]?[0-9]+/ } | { /(pre|post)rotate|(first|last)action/ = /((((([\\t ][\\t ]*e|e)ndscript[\\t ][\\t ]*[^\\001-\\004\\t\\n ][^\\001-\\004\\n]*|([\\t ][\\t ]*e|e)ndscript[^\\001-\\004\\t\\n ][^\\001-\\004\\n]*|([\\t ][\\t ]*e|e)ndscrip([^\\001-\\004\\nt][^\\001-\\004\\n]*|)|([\\t ][\\t ]*e|e)ndscri([^\\001-\\004\\np][^\\001-\\004\\n]*|)|([\\t ][\\t ]*e|e)ndscr([^\\001-\\004\\ni][^\\001-\\004\\n]*|)|([\\t ][\\t ]*e|e)ndsc([^\\001-\\004\\nr][^\\001-\\004\\n]*|)|([\\t ][\\t ]*e|e)nds([^\\001-\\004\\nc][^\\001-\\004\\n]*|)|([\\t ][\\t ]*e|e)nd([^\\001-\\004\\ns][^\\001-\\004\\n]*|)|([\\t ][\\t ]*e|e)n([^\\001-\\004\\nd][^\\001-\\004\\n]*|)|([\\t ][\\t ]*e|e)([^\\001-\\004\\nn][^\\001-\\004\\n]*|)|[\\t ][\\t ]*([^\\001-\\004\\t\\n e][^\\001-\\004\\n]*|)|[^\\001-\\004\\t\\n e][^\\001-\\004\\n]*|)(\\n(([\\t ][\\t ]*e|e)ndscript[\\t ][\\t ]*[^\\001-\\004\\t\\n ][^\\001-\\004\\n]*|([\\t ][\\t ]*e|e)ndscript[^\\001-\\004\\t\\n ][^\\001-\\004\\n]*|([\\t ][\\t ]*e|e)ndscrip([^\\001-\\004\\nt][^\\001-\\004\\n]*|)|([\\t ][\\t ]*e|e)ndscri([^\\001-\\004\\np][^\\001-\\004\\n]*|)|([\\t ][\\t ]*e|e)ndscr([^\\001-\\004\\ni][^\\001-\\004\\n]*|)|([\\t ][\\t ]*e|e)ndsc([^\\001-\\004\\nr][^\\001-\\004\\n]*|)|([\\t ][\\t ]*e|e)nds([^\\001-\\004\\nc][^\\001-\\004\\n]*|)|([\\t ][\\t ]*e|e)nd([^\\001-\\004\\ns][^\\001-\\004\\n]*|)|([\\t ][\\t ]*e|e)n([^\\001-\\004\\nd][^\\001-\\004\\n]*|)|([\\t ][\\t ]*e|e)([^\\001-\\004\\nn][^\\001-\\004\\n]*|)|[\\t ][\\t ]*([^\\001-\\004\\t\\n e][^\\001-\\004\\n]*|)|[^\\001-\\004\\t\\n e][^\\001-\\004\\n]*|))*)?))?/ } | { /#comment/ = /[^\\001-\\004\\t\\n\\r ][^\\001-\\004\\n]*[^\\001-\\004\\t\\n\\r ]|[^\\001-\\004\\t\\n\\r ]/ })({ } | { /schedule/ = /daily|weekly|monthly|yearly/ } | { /rotate/ = /[+-]?[0-9]+/ } | { /create/ } | { /nocreate/ } | { /su/ } | { /include/ = /[^\\001-\\004\\t\\n #,={}]+/ } | { /missingok/ = /(no)?missingok/ } | { /compress/ = /(no)?compress/ } | { /delaycompress/ = /(no)?delaycompress/ } | { /ifempty/ = /(not)?ifempty/ } | { /sharedscripts/ = /(no)?sharedscripts/ } | { /size/ = /[+-]?[0-9]+[GMk]?/ } | { /tabooext/ = /((\\\\+))?/ } | { /olddir/ = /[^\\001-\\004\\t\\n #,={}]+/ } | { /noolddir/ } | { /mail/ = /[^\\001-\\004\\t\\n #,={}]+/ } | { /mailfirst/ } | { /maillast/ } | { /nomail/ } | { /errors/ = /[^\\001-\\004\\t\\n #,={}]+/ } | { /extension/ = /[^\\001-\\004\\t\\n #,={}]+/ } | { /dateext/ = /(no)?dateext/ } | { /compresscmd/ = /[^\\001-\\004\\t\\n #,={}]+/ } | { /uncompresscmd/ = /[^\\001-\\004\\t\\n #,={}]+/ } | { /compressext/ = /[^\\001-\\004\\t\\n #,={}]+/ } | { /compressoptions/ } | { /copy/ = /(no)?copy/ } | { /copytruncate/ = /(no)?copytruncate/ } | { /maxage/ = /[+-]?[0-9]+/ } | { /minsize/ = /[+-]?[0-9]+[GMk]?/ } | { /shred/ = /(no)?shred/ } | { /shredcycles/ = /[+-]?[0-9]+/ } | { /start/ = /[+-]?[0-9]+/ } | { /(pre|post)rotate|(first|last)action/ = /((((([\\t ][\\t ]*e|e)ndscript[\\t ][\\t ]*[^\\001-\\004\\t\\n ][^\\001-\\004\\n]*|([\\t ][\\t ]*e|e)ndscript[^\\001-\\004\\t\\n ][^\\001-\\004\\n]*|([\\t ][\\t ]*e|e)ndscrip([^\\001-\\004\\nt][^\\001-\\004\\n]*|)|([\\t ][\\t ]*e|e)ndscri([^\\001-\\004\\np][^\\001-\\004\\n]*|)|([\\t ][\\t ]*e|e)ndscr([^\\001-\\004\\ni][^\\001-\\004\\n]*|)|([\\t ][\\t ]*e|e)ndsc([^\\001-\\004\\nr][^\\001-\\004\\n]*|)|([\\t ][\\t ]*e|e)nds([^\\001-\\004\\nc][^\\001-\\004\\n]*|)|([\\t ][\\t ]*e|e)nd([^\\001-\\004\\ns][^\\001-\\004\\n]*|)|([\\t ][\\t ]*e|e)n([^\\001-\\004\\nd][^\\001-\\004\\n]*|)|([\\t ][\\t ]*e|e)([^\\001-\\004\\nn][^\\001-\\004\\n]*|)|[\\t ][\\t ]*([^\\001-\\004\\t\\n e][^\\001-\\004\\n]*|)|[^\\001-\\004\\t\\n e][^\\001-\\004\\n]*|)(\\n(([\\t ][\\t ]*e|e)ndscript[\\t ][\\t ]*[^\\001-\\004\\t\\n ][^\\001-\\004\\n]*|([\\t ][\\t ]*e|e)ndscript[^\\001-\\004\\t\\n ][^\\001-\\004\\n]*|([\\t ][\\t ]*e|e)ndscrip([^\\001-\\004\\nt][^\\001-\\004\\n]*|)|([\\t ][\\t ]*e|e)ndscri([^\\001-\\004\\np][^\\001-\\004\\n]*|)|([\\t ][\\t ]*e|e)ndscr([^\\001-\\004\\ni][^\\001-\\004\\n]*|)|([\\t ][\\t ]*e|e)ndsc([^\\001-\\004\\nr][^\\001-\\004\\n]*|)|([\\t ][\\t ]*e|e)nds([^\\001-\\004\\nc][^\\001-\\004\\n]*|)|([\\t ][\\t ]*e|e)nd([^\\001-\\004\\ns][^\\001-\\004\\n]*|)|([\\t ][\\t ]*e|e)n([^\\001-\\004\\nd][^\\001-\\004\\n]*|)|([\\t ][\\t ]*e|e)([^\\001-\\004\\nn][^\\001-\\004\\n]*|)|[\\t ][\\t ]*([^\\001-\\004\\t\\n e][^\\001-\\004\\n]*|)|[^\\001-\\004\\t\\n e][^\\001-\\004\\n]*|))*)?))?/ } | { /#comment/ = /[^\\001-\\004\\t\\n\\r ][^\\001-\\004\\n]*[^\\001-\\004\\t\\n\\r ]|[^\\001-\\004\\t\\n\\r ]/ })*)?\n with tree\n { \"file\" = \"/var/log/mail.info\" } { \"file\" = \"/var/log/mail.warn\" } { \"file\" = \"/var/log/mail.err\" } { \"file\" = \"/var/log/mail.log\" } { \"file\" = \"/var/log/daemon.log\" } { \"file\" = \"/var/log/kern.log\" } { \"file\" = \"/var/log/auth.log\" } { \"file\" = \"/var/log/user.log\" } { \"file\" = \"/var/log/lpr.log\" } { \"file\" = \"/var/log/cron.log\" } { \"file\" = \"/var/log/debug\" } { \"file\" = \"/var/log/messages\" } { \"rotate\" = \"4\" } { \"schedule\" = \"weekly\" } { \"missingok\" = \"missingok\" } { \"ifempty\" = \"notifempty\" } { \"compress\" = \"compress\" } { \"delaycompress\" = \"delaycompress\" } { \"sharedscripts\" = \"sharedscripts\" } { \"postrotate\" = \"\t\treload rsyslog >/dev/null 2>&1 || true\" } { \"file\" = \"/var/log/jlewis2.log\" }"
augtool version: 0.10.0
Using the following configuration for dhcpd.conf including a condition:
if exists dhcp-parameter-request-list { }
It is not possible for augeas(/augtool) to parse this text to a tree because it includes a condition.
Unit test for testing against dhcpd.aug:
module Test_dhcpd =
let lns = Dhcpd.lns
let conf = "if exists dhcp-parameter-request-list {
}
"
test lns get conf = ?
Test result:
augparse /usr/share/augeas/lenses/dist/dhcpd.aug && augparse -I. test_dhcpd.aug test_dhcpd.aug:9.0-.21:exception thrown in test test_dhcpd.aug:9.5-.17:exception: Syntax error Lens: /usr/share/augeas/lenses/dist/dhcpd.aug:396.10-.24: Error encountered at 1:0 (0 characters into string) <|=|if exists dhcp-parameter-req> Tree generated so far: Syntax error in lens definition Failed to load test_dhcpd.aug
The parse error prevents any use of augeas on the configuration file.
Structures like this are sometimes very important for correct operation so direct support for them should be implemented in augeas.
on centos the /etc/yum.repos.d/rpmforge.repo that comes with installing the rpmforge rpm has spaces on both sides of the equals sign in assignments like this:
[rpmforge]
name = RHEL $releasever - RPMforge.net - dag
baseurl = http://apt.sw.be/redhat/el6/en/$basearch/rpmforge
this fix allows augeas to work with the file: sed -i 's/ = /=/g' /etc/yum.repos.d/rpmforge.repo
Is it true that we could add a separator to lenses/yum.aug:10 such as let sep = IniFile.sep "=" "=" " = "
to handle this situation?
The Shellvars_list does not handle backticks. For example the lens will fail on the following:
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
If you have a backtick do you store it as a single value or as a list?
Greedy or Leftmost versions, as suggested by Greedy disambiguation and in solution to Inexpressible Language:
| --> ||
. --> ..
* --> **
? --> ??
Solution, change setting:
let setting = /[A-Za-z0-9_.-]+([][@A-Za-z0-9_.-]+)?/
in desktop.aug.
Forgive me if this is not the right place to report this.
The Properties link on the Stock Lenses page is broken.
Hi
in a php-fpm pool configuration, a valid key => value
pair can look like this:
php_admin_flag[log_errors] = on
This is not a normal "ini" format, but yet still supported by by php-fpm
As per Ubuntu's bug: https://bugs.launchpad.net/ubuntu/+source/augeas/+bug/1193176?comments=all
i'm using augeas via puppet on a few different versions of RHEL (6.4 and 6.5 relevant here) and seeing errors out of the box:
Opening augeas with root /, lens path , flags 32
Augeas version 1.0.0 is installed
Loading failed for one or more files, output from /augeas//error:
/augeas/files/etc/ld.so.conf.d/kernel-2.6.32-431.el6.x86_64.conf/error = parse_failed
/augeas/files/etc/ld.so.conf.d/kernel-2.6.32-431.el6.x86_64.conf/error/pos = 307
/augeas/files/etc/ld.so.conf.d/kernel-2.6.32-431.el6.x86_64.conf/error/line = 6
/augeas/files/etc/ld.so.conf.d/kernel-2.6.32-431.el6.x86_64.conf/error/char = 0
/augeas/files/etc/ld.so.conf.d/kernel-2.6.32-431.el6.x86_64.conf/error/lens = /usr/share/augeas/lenses/dist/ldso.aug:31.10-.55:
/augeas/files/etc/ld.so.conf.d/ /augeas/files/etc/ld.so.conf.d/kernel-2.6.32-431.el6.x86_64.conf/error/message = Iterated lens matched less than it should
the contents of this file is the same on both my 6.4 and 6.5 hosts:
# This directive teaches ldconfig to search in nosegneg subdirectories
# and cache the DSOs there with extra bit 1 set in their hwcap match
# fields. In Xen guest kernels, the vDSO tells the dynamic linker to
# search in nosegneg subdirectories and to match this extra hwcap bit
# in the ld.so.cache file.
hwcap 1 nosegneg
so it doesn't like the 'hwcap 1 nosegneg' specification - but according to some quick googling, that is a valid setting
There appears to be a problem with square brackets being used in string literals for matching. I found this example trying to match on /etc/inputrc, for this:
Notice this entry:
augtool> match /files/etc/inputrc/@if/entry[position() = 3]
/files/etc/inputrc/@if/entry[3] = \e[5~
It does not get matched by this expression:
augtool> match /files/etc/inputrc/@if/entry[. = '\\e\[5~']
(no matches)
But it can be matched using an equivalent regular expression:
augtool> match /files/etc/inputrc/@if/entry[. =~ regexp("^\\\\e\[5~$")]
/files/etc/inputrc/@if/entry[3] = \e[5~
If there is no square bracket to escape, then matching works:
augtool> match /files/etc/inputrc/@if/entry[. = '\\eOc']
/files/etc/inputrc/@if/entry[12] = \eOc
You must escape the square bracket inside the string or else you get an "unmatched [" error. Using \[
does not match either (not that I would expect it to).
I'm trying to modify a magento local.xml. the character that's pointed out by error msg is the exclamation mark in .
This is the first cdata-section in this file and not the one i'm trying to change.
https://gist.github.com/dragane/8978339
augtool command clear
is unable to clear several matching elements at once.
For example: Tying to remove all hosts
entries except of localhost
:
ยดยดยด
augtool> clear /files/etc/hosts/*[./ipaddr != '127.0.0.1']
error: Too many matches for path expression
ยดยดยด
My nrpe.cfg has some entries like
command[check_/]=/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /
This kills augeas with a parse_error:
/augeas/files/usr/local/nagios/etc/nrpe.cfg/error/message = "Iterated lens matched less than it should"
I tracked the problem down to the definition of a command in the lens
let command =
let obrkt = del /\[/ "[" in
let cbrkt = del /\]/ "]" in
[ key "command" .
[ obrkt . key /[^]\/\n]+/ . cbrkt . eq
. store /[^\n]+/ . del /\n/ "\n" ]
]
The key line excludes slashes, so I tried making a custom lens and changing the line so slashes were valid (by removing the / from the regex)
[ obrkt . key /[^]\n]+/ . cbrkt . eq
But now augtool dies with an even worse error than a parse_error!
/usr/share/augeas/lenses/localnrpe.aug:28.0-34.5:Failed to compile command
/usr/share/augeas/lenses/localnrpe.aug:32.14-.27:exception: The key regexp /[^]
]+/ matches a '/'
It looks like I'm not allowed to have a slash inside the key? I'm guessing that's because augeas uses slash as a separator. But what about cases where I want to use as slash as part of my string? It would be nice if I had the option of escaping the forwardslash but from my testing that doesn't work.
RHEL7 seems to prefer chrony to ntpd, but there isn't an augeas lense for /etc/chrony.conf.
Version-Release number of selected component (if applicable):
augeas-1.1.0-12.el7
How to reproduce
/augeas/files/lib/systemd/system/fence_virtd.service/error = "parse_failed"
/augeas/files/lib/systemd/system/fence_virtd.service/error/pos = "250"
/augeas/files/lib/systemd/system/fence_virtd.service/error/line = "13"
/augeas/files/lib/systemd/system/fence_virtd.service/error/char = "0"
/augeas/files/lib/systemd/system/fence_virtd.service/error/lens = "/usr/share/augeas/lenses/dist/inifile.aug:497.25-.43:"
/augeas/files/lib/systemd/system/fence_virtd.service/error/message = "Get did not match entire input"
Actual results:
Parse failed
Expected results:
No errors like: /augeas/files/lib/systemd/system/fence_virtd.service
Additional info:
#cat /lib/systemd/system/fence_virtd.service [Unit] Description=Fence-Virt system host daemon After=network.target libvirt-qmf.service libvirtd.service corosync.service Requires=network.target [Install] WantedBy=multi-user.target [Service] Type=forking Restart=on-failure SysVStartPriority=99 Environment="FENCE_VIRTD_ARGS=-w" \# Autogenerated below here EnvironmentFile=-/etc/sysconfig/fence_virtd ExecStart=/usr/sbin/fence_virtd $FENCE_VIRTD_ARGS
It appears that /etc/tuned/tuned-main.conf is a basic key = value file with shell comments.
Can this file be added to shellvars.aug?
When saving files under the /proc directory, creating a temporary file (which is part of the save process) is not allowed by the operating system.
For reference, here's the error:
/augeas/files/proc/sys/net/ipv4/ip_forward/error = "mk_augtemp"
/augeas/files/proc/sys/net/ipv4/ip_forward/error/message = "No such file or directory"
mktemp could be a possible solution
Using commit 361adbf
Attempting to compile gives the following error
make[3]: Entering directory `/tmp/augeas/gnulib/lib'
make[4]: Entering directory `/tmp/augeas/gnulib/lib'
CC localcharset.lo
CC malloca.lo
CC safe-alloc.lo
CC strnlen1.lo
CC tempname.lo
CC asnprintf.lo
CC fnmatch.lo
CC getfilecon.lo
CC getopt.lo
CC getopt1.lo
CC printf-args.lo
CC printf-parse.lo
CC strstr.lo
CC vasnprintf.lo
CCLD libgnu.la
GEN charset.alias
GEN ref-add.sed
GEN ref-del.sed
make[4]: Leaving directory `/tmp/augeas/gnulib/lib'
make[3]: Leaving directory `/tmp/augeas/gnulib/lib'
make[2]: Leaving directory `/tmp/augeas/gnulib/lib'
Making all in src
make[2]: Entering directory `/tmp/augeas/src'
echo '#define DATADIR "/usr/local/share"' > datadir.h1
../build/aux/move-if-change datadir.h1 datadir.h
make all-am
make[3]: Entering directory `/tmp/augeas/src'
CC fa.lo
CC hash.lo
CC memory.lo
CC ref.lo
CCLD libfa.la
CC augeas.lo
CC augrun.lo
CC pathx.lo
CC internal.lo
CC syntax.lo
YACC parser.c
byacc: e - line 46 of "/tmp/augeas/src/parser.y", syntax error
%code provides {
^
make[3]: *** [parser.c] Error 1
make[3]: Leaving directory `/tmp/augeas/src'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/tmp/augeas/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/augeas'
make: *** [all] Error 2
Attempting to compile on CentOS 6.4
Integrate the Lua interpreter in the C library with an aug_lua
call.
[root@server dist]# puppet agent -t
Info: Retrieving plugin
Info: Loading facts in /var/lib/puppet/lib/facter/root_home.rb
Info: Loading facts in /var/lib/puppet/lib/facter/pe_version.rb
Info: Loading facts in /var/lib/puppet/lib/facter/facter_dot_d.rb
Info: Loading facts in /var/lib/puppet/lib/facter/puppet_vardir.rb
Info: Caching catalog for server
Info: Applying configuration version '1397520532'
Warning: Augeasredis_remove_bind_localhost: Loading failed for one or more files, see debug for /augeas//error output
Error: /Stage[main]/Redis/Augeas[redis_remove_bind_localhost]: Could not evaluate: Save failed with return code false, see debug
Notice: Finished catalog run in 0.24 seconds
[root@server dist]# augtool print /augeas//error
/augeas/files/etc/iproute2/rt_protos/error = "parse_failed"
/augeas/files/etc/iproute2/rt_protos/error/pos = "176"
/augeas/files/etc/iproute2/rt_protos/error/line = "22"
/augeas/files/etc/iproute2/rt_protos/error/char = "0"
/augeas/files/etc/iproute2/rt_protos/error/lens = "/usr/share/augeas/lenses/dist/iproute2.aug:7.12-.47:"
/augeas/files/etc/iproute2/rt_protos/error/message = "Iterated lens matched less than it should"
/augeas/files/etc/iproute2/rt_dsfield/error = "parse_failed"
/augeas/files/etc/iproute2/rt_dsfield/error/pos = "0"
/augeas/files/etc/iproute2/rt_dsfield/error/line = "1"
/augeas/files/etc/iproute2/rt_dsfield/error/char = "0"
/augeas/files/etc/iproute2/rt_dsfield/error/lens = "/usr/share/augeas/lenses/dist/iproute2.aug:7.12-.47:"
/augeas/files/etc/iproute2/rt_dsfield/error/message = "Iterated lens matched less than it should"
/augeas/files/etc/redis/redis.conf/error = "parse_failed"
/augeas/files/etc/redis/redis.conf/error/pos = "24258"
/augeas/files/etc/redis/redis.conf/error/line = "578"
/augeas/files/etc/redis/redis.conf/error/char = "0"
/augeas/files/etc/redis/redis.conf/error/lens = "/usr/share/augeas/lenses/dist/redis.aug:112.10-.37:"
/augeas/files/etc/redis/redis.conf/error/message = "Iterated lens matched less than it should"
Line 578: notify-keyspace-events ""
After commenting this line augeas works fine.
When using seq
in a recursive lens, the nodes are numbered from the deepest levels to the highest ones. Example:
module Inverted =
let rec inverted = [ seq "inverted" . store "a" . inverted? ]
test inverted get "aaa" = ?
$ augparse inverted.aug
Test result: inverted.aug:5.0-.27:
{ "3" = "a"
{ "2" = "a"
{ "1" = "a" }
}
}
To avoid this, it should be possible to link the counter to a given level and avoid it spreading through sublevels of recursion.
Version-Release number of selected component (if applicable):
augeas-1.1.0-12.el7
How to reproduce
/augeas/files/etc/default/rmt/error = "parse_failed"
/augeas/files/etc/default/rmt/error/pos = "1554"
/augeas/files/etc/default/rmt/error/line = "52"
/augeas/files/etc/default/rmt/error/char = "6"
/augeas/files/etc/default/rmt/error/lens = "/usr/share/augeas/lenses/dist/shellvars.aug:180.12-.56:"
/augeas/files/etc/default/rmt/error/message = "Syntax error"
Actual results:
Parse failed
Expected results:
No errors like: /augeas/files/etc/default/rmt
Additional info:
$ cat /etc/default/rmt #ident @(#)rmt.dfl 1.2 05/08/09 Copyr 2000 J. Schilling # # This file is /etc/default/rmt # # NOTE: If this file is not present, rmt will reject to work for root. # # If no USER= entry is present, nobody is allowed to run rmt. # If no ACCESS= entry is present, no device may to be used by remote users. # # The file where debug info should go to. # If you don't like debugging (e.g. for speed) comment out # the this line. # #DEBUG=/tmp/RMT # # Each USER= entry adds the listed user to the users who may run rmt # # A typical passwd entry looks like this: # rtape:x:1999:1000:Remote TAPE:/export/home/rtape:/opt/schily/sbin/rmt # # Add entries for all valid remote users to /export/home/rtape/.rhosts # #USER=rtape #USER=joerg # Default to old SunOS behavior. If you like to be more restrictive, comment # out the entry below and enable the explicit USER= entries above. USER=* # # Each ACCESS= entry adds a target or group of targets to the list of visible # targets for all users that do remote tape/file access from a specific host. # # Username is the name of the user that runs rmt. If you create # different users, you may assign different permissions to different # users from the same host. # # Hostname must be in the same notation as needed for .rhosts (e.g. in # the way you will be listed by 'who' if you log in from this host). # # local remote # user host file # name name # #ACCESS=rtape sparky /dev/rmt/* #ACCESS=* * /dev/rmt/* #ACCESS=* * /dev/null #ACCESS=* * /dev/zero # Historically, Red Hat rmt was not so ^^ restrictive. ACCESS=* * *
During the creation of the OpenShift Config Augeas lens there is a missing config file (node.conf).
Hello,
This kind of line isn't handled by this lens :
tmppid=`grep 'lock_file=' $CFG | grep -v '#' | tail -n 1 | awk -F '=' '{print $2}'`
I got :
/augeas/files/etc/default/toto/error/lens = "/usr/share/augeas/lenses/dist/shellvars.aug:138.12-.89:"
/augeas/files/etc/default/toto/error/message = "Syntax error"
Regards
Olivier
I've updated test_sshd
to be like this https://gist.github.com/jasperla/8557047
However it fails as such:
FAIL: lens-sshd.sh
Syntax error in lens definition
Failed to load /usr/obj/ports/augeas-1.1.0/augeas-1.1.0/lenses/tests/test_sshd.aug
/usr/obj/ports/augeas-1.1.0/augeas-1.1.0/lenses/tests/test_sshd.aug:67.2-97.54:exception thrown in test
/usr/obj/ports/augeas-1.1.0/augeas-1.1.0/lenses/tests/test_sshd.aug:67.7-.32:exception: Get did not match entire input
Lens: /usr/obj/ports/augeas-1.1.0/augeas-1.1.0/lenses/sshd.aug:125.12-127.36:
Error encountered at 16:0 (325 characters into string)
<0.0.0/24\n X11Forwarding no\n|=| AllowGroups users\n ForceC>
Tree generated so far:
/X11Forwarding = "yes"
/Match[1]
/Match[1]/Condition
/Match[1]/Condition/User = "sarko"
/Match[1]/Condition/Group = "pres.*"
/Match[1]/Settings
/Match[1]/Settings/Banner = "/etc/bienvenue.txt"
/Match[1]/Settings/X11Forwarding = "no"
/Match[2]
/Match[2]/Condition
/Match[2]/Condition/Address = "10.0.0.1"
/Match[2]/Settings
/Match[2]/Settings/X11Forwarding = "no"
/Match[2]/Settings/PermitTTY = "no"
/Match[3]
/Match[3]/Condition
/Match[3]/Condition/Address = "*"
/Match[3]/Settings
/Match[3]/Settings/X11Forwarding = "no"
/Match[4]
/Match[4]/Condition
/Match[4]/Condition/Address = "10.0.0.0/24"
/Match[4]/Settings
/Match[4]/Settings/X11Forwarding = "no"
/Match[5]
/Match[5]/Condition
/Match[5]/Condition/Address = "*,!10.0.0.2"
/Match[5]/Settings
/Match[5]/Settings/X11Forwarding = "no"
/Match[6]
/Match[6]/Condition
/Match[6]/Condition/Address = "*,!10.0.0.0/24"
/Match[6]/Settings
/Match[6]/Settings/X11Forwarding = "no"
It seems that for some reason it fails to recognize the second entry for Settings
. A block such as
Match Address *,!10.0.0.0/24
X11Forwarding no
AllowGroups users
ForceCommand internal-sftp
ChrootDirectory /chroot
is perfectly valid and accepted by OpenSSH.
It would be very nice to be able to Augeas into zip files (e.g. JAR/WAR/EAR files in Java-land).
Obviously a Zip lens per se wouldn't work, because the zip file itself is much more like a filesystem than a file format.
The php-pecl-apc RPM has the line "apc.filters" in its default ini file, which is apparently supported. IniFile.entry_generic_nocomment can't parse a line without a separator. I'm a bit stumped trying to fix this, and I think the solution will mean a minor compatibility break.
Test case:
test PHP.lns get "apc.filters\n = ?
We all know, order matters in the /etc/pam.d/*
files.
Currently, Augeas will read a file like this:
/files/etc/pam.d/sshd/6/module = "pam_env.so"
As far as I understand, it is not possible to insert a record
before the record
where /module = "pam_env.so"
using the ins
command.
As a fix, I would suggest changing seq
to label
in line 58 of pam.aug
, i.e.
let record_svc = [ label "record" . indent . record ]
In 0.9.0, my my.cnf parses fine. With 1.0.0 or newer, it does not. If I take out the !include /sub/path.d/ directive, it works, but obviously I need that in there. I saw in the changelog that something changed regarding !include directives, but it appears to have broken this functionality and is locking me into 0.9.0.
EPEL is official repository for RHEL-based distributes. It's mentioned here.
But version of Augeas
is outdated there ( Current release is 1.1.0, latest RPM is 0.9.0).
Version-Release number of selected component (if applicable):
augeas-1.1.0-12.el7
How to reproduce
/augeas/files/etc/httpd/conf.d/mod_security.conf/error = "parse_failed"
/augeas/files/etc/httpd/conf.d/mod_security.conf/error/pos = "770"
/augeas/files/etc/httpd/conf.d/mod_security.conf/error/line = "18"
/augeas/files/etc/httpd/conf.d/mod_security.conf/error/char = "4"
/augeas/files/etc/httpd/conf.d/mod_security.conf/error/lens = "/usr/share/augeas/lenses/dist/httpd.aug:88.10-.44:"
/augeas/files/etc/httpd/conf.d/mod_security.conf/error/message = "Syntax error"
Actual results:
Parse failed
Expected results:
No errors like: /augeas/files/etc/httpd/conf.d/mod_security.conf
Additional info:
#cat /etc/httpd/conf.d/mod_security.conf <IfModule mod_security2.c> # ModSecurity Core Rules Set configuration IncludeOptional modsecurity.d/*.conf IncludeOptional modsecurity.d/activated_rules/*.conf # Default recommended configuration SecRuleEngine On SecRequestBodyAccess On SecRule REQUEST_HEADERS:Content-Type "text/xml" \ "id:'200000',phase:1,t:none,t:lowercase,pass,nolog,ctl:requestBodyProcessor=XML" SecRequestBodyLimit 13107200 SecRequestBodyNoFilesLimit 131072 SecRequestBodyInMemoryLimit 131072 SecRequestBodyLimitAction Reject SecRule REQBODY_ERROR "!@eq 0" \ "id:'200001', phase:2,t:none,log,deny,status:400,msg:'Failed to parse request body.',logdata:'%{reqbody_error_msg}',severity:2" SecRule MULTIPART_STRICT_ERROR "!@eq 0" \ "id:'200002',phase:2,t:none,log,deny,status:44,msg:'Multipart request body \ failed strict validation: \ PE %{REQBODY_PROCESSOR_ERROR}, \ BQ %{MULTIPART_BOUNDARY_QUOTED}, \ BW %{MULTIPART_BOUNDARY_WHITESPACE}, \ DB %{MULTIPART_DATA_BEFORE}, \ DA %{MULTIPART_DATA_AFTER}, \ HF %{MULTIPART_HEADER_FOLDING}, \ LF %{MULTIPART_LF_LINE}, \ SM %{MULTIPART_MISSING_SEMICOLON}, \ IQ %{MULTIPART_INVALID_QUOTING}, \ IP %{MULTIPART_INVALID_PART}, \ IH %{MULTIPART_INVALID_HEADER_FOLDING}, \ FL %{MULTIPART_FILE_LIMIT_EXCEEDED}'" SecRule MULTIPART_UNMATCHED_BOUNDARY "!@eq 0" \ "id:'200003',phase:2,t:none,log,deny,status:44,msg:'Multipart parser detected a possible unmatched boundary.'" SecPcreMatchLimit 1000 SecPcreMatchLimitRecursion 1000 SecRule TX:/^MSC_/ "!@streq 0" \ "id:'200004',phase:2,t:none,deny,msg:'ModSecurity internal error flagged: %{MATCHED_VAR_NAME}'" SecResponseBodyAccess Off SecDebugLog /var/log/httpd/modsec_debug.log SecDebugLogLevel 0 SecAuditEngine RelevantOnly SecAuditLogRelevantStatus "^(?:5|4(?!04))" SecAuditLogParts ABIJDEFHZ SecAuditLogType Serial SecAuditLog /var/log/httpd/modsec_audit.log SecArgumentSeparator & SecCookieFormat 0 SecTmpDir /var/lib/mod_security SecDataDir /var/lib/mod_security </IfModule>
I am using augeas with puppet. If this should be moved to the puppet issues page please let me know.
Below is the debug log from puppet and the iptables configuration file it doesn't like. Please let me know if I can provide any additional information.
Debug: Augeas[network peerdns setup eth0](provider=augeas): Opening augeas with root /, lens path , flags 32
Debug: Augeas[network peerdns setup eth0](provider=augeas): Augeas version 1.0.0 is installed
Feb 17 23:14:42 base-image-v20140118 puppet-agent[30172]: (Augeas[network peerdns setup eth0](provider=augeas)) Loading failed for one or more files, see debug for /augeas//error output
Warning: Augeas[network peerdns setup eth0](provider=augeas): Loading failed for one or more files, see debug for /augeas//error output
Debug: Augeas[network peerdns setup eth0](provider=augeas): /augeas/files/etc/sysconfig/iptables.save/error = parse_failed
Debug: Augeas[network peerdns setup eth0](provider=augeas): /augeas/files/etc/sysconfig/iptables.save/error/pos = 64
Debug: Augeas[network peerdns setup eth0](provider=augeas): /augeas/files/etc/sysconfig/iptables.save/error/line = 2
Debug: Augeas[network peerdns setup eth0](provider=augeas): /augeas/files/etc/sysconfig/iptables.save/error/char = 0
Debug: Augeas[network peerdns setup eth0](provider=augeas): /augeas/files/etc/sysconfig/iptables.save/error/lens = /usr/share/augeas/lenses/dist/shellvars.aug:163.12-.99:
Debug: Augeas[network peerdns setup eth0](provider=augeas): /augeas/files/etc/sysconfig/iptables.save/error/message = Syntax error
Debug: Augeas[network peerdns setup eth0](provider=augeas): Will attempt to save and only run if files changed
Debug: Augeas[network peerdns setup eth0](provider=augeas): sending command 'set' with params ["/files/etc/sysconfig/network-scripts/ifcfg-eth0/PEERDNS", "no"]
Debug: Augeas[network peerdns setup eth0](provider=augeas): Skipping because no files were changed
Debug: Augeas[network peerdns setup eth0](provider=augeas): Closed the augeas connection
# Generated by iptables-save v1.4.7 on Mon Feb 17 22:15:20 2014
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [1:260]
-A INPUT -p icmp -m comment --comment "000 accept all icmp" -j ACCEPT
-A INPUT -i lo -m comment --comment "001 accept all to lo interface" -j ACCEPT
-A INPUT -m comment --comment "002 accept related and established" -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
-A INPUT -p tcp -m multiport --ports 22 -m comment --comment "003 accept ssh from everywhere" -m state --state NEW -j ACCEPT
COMMIT
# Completed on Mon Feb 17 22:15:20 2014
Parsing an Apache config, I get:
pos = 720
line = 22
char = 21
lens = /usr/share/augeas/lenses/dist/httpd.aug:88.10-.44:
message = Syntax error
Which lines up with the a tilde used for a regex in a directive.
<Directory ~ "/.svn >
Is the line where char = 21 is ~.
This is valid according to http://httpd.apache.org/docs/2.4/mod/core.html#directory
Using augtool installed via yum on Red Hat Enterprise Linux Server release 5.6. augtool version 1.0.0.
Please let me know if I can provide any other information.
Version-Release number of selected component (if applicable):
augeas-1.1.0-12.el7
How to reproduce
Actual results:
Parse failed
Expected results:
No errors like: /augeas/files/etc/libreport/plugins/bugzilla*
Additional info:
Augeas can not parse the following files:
/etc/libreport/plugins/bugzilla_format_java.conf
/etc/libreport/plugins/bugzilla_formatdup_java.conf
/etc/libreport/plugins/bugzilla_format.conf
/etc/libreport/plugins/bugzilla_format_kernel.conf
/etc/libreport/plugins/bugzilla_format_libreport.conf
/etc/libreport/plugins/bugzilla_formatdup.conf
/etc/libreport/plugins/bugzilla_format_anaconda.conf
/etc/libreport/plugins/bugzilla_formatdup_anaconda.conf
FreeBSD 10.0 will ship with a syslog.conf that has:
...
cron.* /var/log/cron
!-devd
*.=debug /var/log/debug.log
...
# Uncomment this if you wish to see messages produced by devd
# !devd
# *.>=info /var/log/devd.log
...
The line "# !devd" makes the parser fail because "#!" is special, and, well "# !" is not.
Hi,
I tried to change values in /etc/cups/cups-pdf.conf (configuration file of the PDF printer of the cups printing system) with augtool. I want to change lines like
or
Label 0
into
Label 1
which augtool fails to do. A major reason seems to be that augtool does not list that as
/files/etc/cups/cups-pdf.conf/Label
but as
or
directive[2]/ = Label
which does not allow to use a simple command like
set /files/etc/cups/cups-pdf.conf/Label 1
or
set /files/etc/cups/cups-pdf.conf/directive[.=Label] 1
regards
Hadmut
Debug: Augeas[autofs::mount::update-direct-alexstore01_000](provider=augeas): /augeas/files/etc/auto.direct/error/message = Failed to match
({ /host/ = /[^\001-\004\t\n #,:\\-]+/ }({ /host/ = /[^\001-\004\t\n #,:\\-]+/ })*)?{ /path/ = /[^\001-\004\t\n #+:-][^\001-\004\t\n #:]*/ }
with tree
{ "host" = "alexstore01-000.example.com" } { "path" = "/exports/alexroots_default/alexdefaultstore1_000" }
as discussed in (4) in http://www.redhat.com/archives/augeas-devel/2010-January/msg00100.html:
Using augtool from scripts really requires a significant wrapper to handle the frequent use case of idempotently adding a line:
.. to really support idempotent changes, augtool will need to support an if statement; in general, you will make multiple changes if something in the tree isn't what you expect (e.g., if there's no entry in /etc/hosts for 192.168.0.1, you'll want to add several nodes)
I am thinking of a syntax like
if PATHEXPR then
.. statements (one per line) ..
else
.. statements ..
end
As a result, this syntax should allow changes like:
I would be willing to offer some $ on bountysource - someone interested to join?
Statements like
verbose = 0
in grub.conf cause augeas to fail parsing. Suggested patch:
--- grub.aug.org 2014-01-14 14:51:15.609272570 +0000
+++ grub.aug 2014-01-14 15:14:00.088250268 +0000
@@ -78,6 +78,7 @@
| kw_menu_arg "splashimage"
| kw_menu_arg "gfxmenu"
| kw_menu_arg "background"
| kw_menu_arg "verbose"
| serial
| terminal
| password_arg
Hi!
build augeas failed for me
Ubuntu 12.04 64bit, gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5), bison (GNU Bison) 3.0.2 from sources.
Error:
CCLD liblexer.la
CCLD libaugeas.la
CC augtool.o
CCLD augtool
./.libs/libaugeas.so: undefined reference to `YYID'
collect2: ld returned 1 exit status
make[3]: *** [augtool] Error 1
make[3]: Leaving directory `/tmp/augeas/src'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/tmp/augeas/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/augeas'
make: *** [all] Error 2
Hi,
lets say i want to configure the following within my sshd_config
Ciphers [email protected],[email protected],aes256-ctr,aes128-ctr
KexAlgorithms diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha1
MACs [email protected],hmac-sha2-512,mac-sha2-256,hmac-ripemd160
You see, very identical types of data using key and a comma separated list of values. In the sshd lense you can configure Cipers and KexAlgortihms making one single value containing the comma separated list as a string. But not MACs. The point is why?!
this follows as the result... looks pretty inconsistent, right?
augeas { "sshd_config":
context => "/files/etc/ssh/sshd_config",
changes => [
"set PermitRootLogin no",
"set DenyUsers/1 ubuntu",
"set Ciphers [email protected],[email protected],aes256-ctr,aes128-ctr",
"set KexAlgorithms diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha1",
"set MACs/1 [email protected]",
"set MACs/2 hmac-sha2-512",
"set MACs/3 mac-sha2-256",
"set MACs/4 hmac-ripemd160",
],
}
Did some investigation in git log / blame and found this commit @d9122b074f28674118499f0bcf0b5055ef696194 from 2008 ... just wanted to be sure there isnt a non-trivial reason for this behavior.
I can also make a pull request if you tell me the way you like to have it. Speaking converting MAC to single-string or Ciphers and Kex to separated items.
Greetings,
Florian
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.