1 2011-04-15 David Lutterkort <lutter@redhat.com>
3 Iptables: handle --tcp-flags
6 2011-04-14 David Lutterkort <lutter@redhat.com>
8 * src/augtool.c: respect autosave flag when executing a single command
11 2011-04-13 Erinn Looney-Triggs <erinn.looneytriggs@gmail.com>
13 Grub: support the 'device' directive for UEFI boot
16 2011-04-13 David Lutterkort <lutter@redhat.com>
18 Access: support the format @netgroup@@nisdomain
21 * lenses/tests/test_fstab.aug: test that we parse SELinux context correctly
23 2011-03-25 David Lutterkort <lutter@redhat.com>
25 Httpd: remove duplicate inclusion of /etc/httpd/conf/httpd.conf
27 2011-03-25 Bill Pemberton <wfp5p@virginia.edu>
29 Deal with continuation lines in httpd.aug
30 Apache allows config lines to be continued with a backslash, but the
31 lens couldn't deal with it. Change the value sep_spc to deal with
32 continuation lines as found in interfaces.aug
34 Enable the test for continuation lines in test_httpd.aug
36 Add /etc/httpd/conf/httpd.conf to the filter list for httpd.aug
38 Allow blank and comment lines throughout config file in iptables
40 Exclude /etc/yum/pluginconf.d/versionlock.list from yum.aug
41 The versionlock plugin puts a file in /etc/yum/pluginconf.d that is
42 not a yum config file so yum.aug shouldn't try to parse it.
44 2011-03-23 David Lutterkort <lutter@redhat.com>
46 Mysql: include /etc/my.cnf used on Fedora/RHEL
47 Fixes https://bugzilla.redhat.com/show_bug.cgi?id=688053
49 Httpd: include /etc/httpd/conf/httpd.conf used on Fedora/RHEL
50 Fixes https://bugzilla.redhat.com/show_bug.cgi?id=688149
52 2011-03-22 David Lutterkort <lutter@redhat.com>
54 * src/lexer.l: fix a few compilation warnings
56 Eliminate global variable 'comment_depth' in lexer
58 2011-03-19 Francis Giraldeau <francis.giraldeau@gmail.com>
60 Add support for configfile and background in grub
61 Test for the new configuration directives are also provided.
63 Thanks to Onur Küçük for the patch.
65 2011-03-18 Raphaël Pinson <raphink@gmail.com>
67 #include is also valid in sudoers.aug
69 Add support for #includedir in sudoers.aug and test (ticket #188)
71 2011-03-17 Francis Giraldeau <francis.giraldeau@gmail.com>
73 Support sudoers in nsswitch.aug
74 nsswitch.conf support a configuration item to specify database backend, this
75 commit adds the support for it.
79 Thanks to thefoxbox for the enhancement
81 Fix unmatch bracket causes segfault in augtool.c
82 When command is parsed in augtool, function nexttoken verify that path has
83 valid and matching brackets and return NULL if not. The function cleanpath that
84 follows was not handling the NULL case, leading to a segmentation fault. By
85 checking for NULL value, the error is thrown adequately.
89 Thanks to spamaps for the help to resolve this issue.
91 2011-03-16 David Lutterkort <lutter@redhat.com>
93 * src/lexer.l (augl_init_lexer): really close the input file on error
95 2011-03-16 Richard W.M. Jones <rjones@redhat.com>
97 Add FreeBSD /etc/rc.conf file to Shellvars lens.
99 2011-03-15 David Lutterkort <lutter@redhat.com>
101 Replace erroneous assert(0) with proper error report
102 * src/put.c (create_union): report an error to the user if none of the
104 * lenses/tests/test_shellvars.aug: add a test to trigger that code path
109 2011-03-10 David Lutterkort <lutter@redhat.com>
111 * src/augeas.c (aug_init): check return value of argz_* for ENOMEM
113 2011-03-10 Matthew Booth <mbooth@redhat.com>
115 Fix parsing of fstab entries containing fscontext SELinux option
116 Systems using SELinux can contain an fstab option like:
117 fscontext=system_u:object_r:removable_t
119 The fstab lens is currently too strict, and doesn't allow colons in the value.
120 This patch relaxes the parsing to make it as lax as possible within the
121 constraints of the syntax.
123 2011-03-08 David Lutterkort <lutter@redhat.com>
125 Be more defensive about closing input files for the lexer
127 2011-03-04 David Lutterkort <lutter@redhat.com>
129 Explain using ./src/try
130 * HACKING: document the various modes of using ./src/try
131 * src/try: read commands from build/augcmds.txt rather than /tmp; use a
132 more sensible default if augcmds.txt does not exist
134 2011-03-03 Matthew Booth <mbooth@redhat.com>
136 Use getopt-gnu from gnulib for AIX support
138 Update to gnulib commit c2090a8
139 Required for updated getopt-gnu license.
141 2011-03-03 Raphaël Pinson <raphink@gmail.com>
143 Remove trailing spaces in lenses/tests/test_nagiosobjects.aug
145 Add nagiosobjects.aug based on Sebastien Aperghis' work.
147 Remove trailing spaces in nagioscfg.aug
149 Improve nagioscfg.aug as per Sebastien Aperghis' work.
151 2011-03-02 Raphaël Pinson <raphink@gmail.com>
153 Fix single quotes support in httpd.aug.
155 Support single quotes in httpd.aug. Add unit test for it in test_httpd.aug.
157 2011-03-02 David Lutterkort <lutter@redhat.com>
159 * tests/fatest.c (testManualAmbig): don't use '$' in variable names
160 Breaks on, at least, AIX
162 2011-03-02 Raphaël Pinson <raphink@gmail.com>
164 Add Sep.equal, used in nrpe.aug
166 Changes in nrpe.aug Remove wrong ^ in comment regex Use Util.comment_generic Use generic modules Improve NaturalDocs documentation
168 2011-02-23 David Lutterkort <lutter@redhat.com>
172 Fix compile errors found by gcc 4.6.0
173 There were several places that caused the new 'variable assigned but not
176 The struct lens also contained the member jmt twice; it is now only
177 available for L_REC lenses.
179 * src/info.h: include stdlib so we can use uint
181 * tests/Makefile.am: distribute the test data in test-augtool/
183 2011-02-23 Dominic Cleal <dcleal@redhat.com>
185 Split Solaris multiboot argument for the kernel path into @path node (ticket #158)
187 2011-02-22 Francis Giraldeau <francis.giraldeau@gmail.com>
189 Add aug_span API function V2
190 aug_span API function provides information about the node of the specified
191 path. It sets the absolute path of the file name and spans of label, value
192 and span inside the node. The span includes all matching chars of the actual
193 lens and it's descendant. Hence, the top level node will span the entire file.
194 It returns 0 in case of success and -1 if the node is not associated to a file
195 or if the path is invalid. The main use case is to make possible to display
196 the related file with the node elements hightlighted in a UI.
198 The API option AUG_NO_NODE_SPAN provided to aug_init disable the allocation
199 structures to keep node spans. It saves about 5% of memory for a typical
202 * src/augeas.c : add aug_span implementation and option handling to aug_in
203 according to the option /augeas/span in the tree
204 * src/augeas.h : add declaration of aug_span and constants for option
205 * src/augeas_sym.version : make the new function visible in libaugeas
206 * src/augtool.c : add the "nodepos" command to augtool
207 * src/get.c : gather filename, label, value and span spans if any
208 * src/info.c : create and release functions for struct node_span
209 * src/info.h : add definition of struct node_info
210 * src/internal.h : add node_info to struct tree
211 * src/transform.c : duplicate filename string
212 * tests/test-load.c : 3 basic unit tests for general correct behavior
214 2011-02-22 Raphaël Pinson <raphink@gmail.com>
216 Add short options for --nostdinc, --noload and --noautoload Update manpage and pod accordingly
218 Distribute bcprules.sty and xpath.txt
220 2011-02-19 Raphaël Pinson <raphink@gmail.com>
222 Add indented_title_label in inifile.aug Use indented_title_label in mysql.aug Adjust test for mysql.aug accordingly
224 2011-02-18 Raphaël Pinson <raphink@gmail.com>
226 Allow indentation for "iface" entries in interfaces.aug (Fix ticket #182) Add unit test for "iface" indentation
228 2011-02-16 Francis Giraldeau <francis.giraldeau@gmail.com>
230 Minor code format cleanup
231 * Cut long lines to 80 chars
234 Fix memory leak with recursive square lens
236 2011-02-16 Raphaël Pinson <raphink@gmail.com>
238 Remove trailing whitespaces in util.aug
240 Add comment_c_style and comment_multiline Add empty_generic and make empty a call to it Add empty_c_style to complement comment_c_style
242 2011-02-15 Francis Giraldeau <francis.giraldeau@gmail.com>
244 Fix segfault in get.c with L_MAYBE lens (bug#180)
245 When a L_MAYBE lens was the last child of a L_CONCAT inside a L_SUBTREE, then
246 the match in visit_exit top_frame(rec_state)->lens == lens->child was true,
247 causing combine of a frame when it shouldn't. This test is true because there
248 is no other lens following in the concat in this special case, hence the top
249 frame matched the child of the L_MAYBE.
251 To avoid this special case, we propose to push L_MAYBE lens on the frames
252 stack. If L_MAYBE is encountered in visit_exit, we pop at least one frame and
253 two if the child match. This way, the stack is always valid.
255 Closes trac ticket #180.
257 2011-02-15 Raphaël Pinson <raphink@gmail.com>
259 Improve vim syntax file
261 2011-02-14 David Lutterkort <lutter@redhat.com>
263 man pages: update man page for augtool
265 2011-02-14 Raphaël Pinson <raphink@gmail.com>
267 augtool: add --interactive option
268 This option runs an interactive shell after evaluating STDIN or an explicit
271 2011-02-14 David Lutterkort <lutter@redhat.com>
273 Mysql: change default comment delimiter from ';' to '#'
274 Fixes bug #181 reported by devzero
276 2011-02-06 Francis Giraldeau <francis.giraldeau@usherbrooke.ca>
279 * Support unquoting for allow/deny statements
280 * Append new line to block statement braces by default
281 * Add missing string and integer statements according to man dhcpd.conf
282 * Remove trailing white space from the lens file
284 Replace seq by label in option list
286 The counter/seq doesn't garantee that node label "1" will get at the first
287 position. Positional arguments are ordered, hence the sequence may be
288 misleading. This is why a fixed label for sequence nodes are better.
290 2011-01-28 Raphaël Pinson <raphink@gmail.com>
292 Support directives without arg in httpd.aug
293 * Use sep.aug in httpd.aug Modify Sep.opt_space to make it fit the
294 definition in httpd.aug (it's only used here)
295 * Allow directives without arguments in httpd.aug
296 * Adjust test_httpd.aug to test argument-less directives
298 2011-01-25 Francis Giraldeau <francis.giraldeau@gmail.com>
300 Fix httpd.aug doc, filter and add to checks
301 * Added other contributors to authors
302 * Changed the licence to LGPLv2+
303 * Fix copy/paste error about config files
304 * Added filters for Fedora and RHEL
307 The Httpd lens parses Apache Web server configuration according to the manual.
309 * Generic sections with square lens
311 * Arguments of sections and directives are handled as list
313 The lens doesn't support automatic quoting of string values, because arguments
314 are separated by spaces and it raises ambiguity when using unquoting. The lens
315 doesn't support either long lines splitted by backslash.
317 2011-01-25 David Lutterkort <lutter@redhat.com>
319 * src/pathx.c (store_error): make sure pos_str is always NUL terminated
322 2011-01-19 Fred <frederic.lespez@free.fr>
324 PuppetFileserver: new lens for Puppet's fileserver.conf
326 2011-01-19 David Lutterkort <lutter@redhat.com>
328 * man/augtool.pod: fix typos
329 Fixes https://bugzilla.redhat.com/show_bug.cgi?id=628502
331 2011-01-14 David Lutterkort <lutter@redhat.com>
333 Allow compiling with NDEBUG defined
334 * src/errcode.h (ensure0): do not mention 'error' label when NDEBUG is
336 * src/pathx.c (coerce_to_bool, eval_pred): make sure we return something
337 when assert(0) is compiled away
339 2011-01-13 Francis Giraldeau <francis.giraldeau@gmail.com>
341 Fix a small bashism from test script
343 2011-01-13 David Lutterkort <lutter@redhat.com>
345 Xorg: "position" in "screen" section is optional; allow "Extensions" section
350 2011-01-11 David Lutterkort <lutter@redhat.com>
352 Replace augtest by test-augtool.sh
353 This removes the silly dependency on Ruby, since augtest was the only
354 Ruby script in the whole source tree.
356 The test files for test-augtool.sh live in tests/test-augtool, and are
357 functionally identical to the Ruby test files tests/*.rb. The only
358 exception is that test-root.rb has been removed - it tested something that
359 is better tested in test-xpath.c
361 The new test-augtool.sh test is also a little more efficient in that it
362 only copies the file needed by a test into the root, and only sets the lens
363 for that file up for loading. This reduces the runtime of the tests from ~
364 30s on my machine to under 2s.
366 Test that getting and setting the root node works
367 This tests the same thing that test-get.sh tests, but in a much more
370 * src/pathx.c (store_error): never append to an uninitialized string
372 * src/augtool.c: be a little more quiet
373 Some of the commands used to print unconditionally; we now only print if we
374 should be echoing (i.e., if --echo is given on the command line or if stdin
377 2011-01-11 Fred <frederic.lespez@free.fr>
379 Crypttab: new lens for /etc/crypttab
381 2011-01-11 Raphaël Pinson <raphink@gmail.com>
383 In autosave mode, print "save" when in echo or interactive mode. Remove comma at the end of enum list.
385 2011-01-10 Raphaël Pinson <raphink@gmail.com>
387 Refactor augtool.c to use only readline
389 augtool: add --autosave option
390 Additional changes to augtool:
391 * Define AUGTOOL_PROMPT as a constant
392 * Do not print (null) lines when using --echo
393 * Add test for --autosave in test-save-mode.sh
397 2011-01-07 David Lutterkort <lutter@redhat.com>
399 bootstrap: add sys_wait module
402 2011-01-07 Dominic Cleal <dcleal@redhat.com>
404 Add support for Solaris multiboot kernels with slashes in the first kernel argument (Fix ticket #158)
406 Allow kernel$ and module$ extensions to GRUB for Solaris (Fix ticket #158)
408 2011-01-07 David Lutterkort <lutter@redhat.com>
410 Shellvars: read various snmpd config files
415 2011-01-07 Dominic Cleal <dcleal@redhat.com>
417 Solaris_system: new lens for /etc/system (Solaris)
418 File is used to configure the kernel, module loading and parameters. The
419 system(4) man page gives a good overview of the commands and a sample file:
420 http://docs.sun.com/app/docs/doc/816-5174/system-4?l=en&n=1&a=view
422 It supports moddir, rootdev, rootfs, exclude, include, forceload and set.
423 The set tree is broken down quite a lot as the operator can vary (equals,
426 2011-01-07 David Lutterkort <lutter@redhat.com>
428 Resolv: allow comments starting with semicolon
433 2011-01-03 Raphaël Pinson <raphink@gmail.com>
435 Add automount, netmasks and sendmailvars keywords for databases in nsswitch.aug
437 Add bootparams as database keyword (Fix ticket #171) Update test file accordingly
439 2010-12-29 Raphaël Pinson <raphink@gmail.com>
441 Rename "host" nodes as "origin" (breaks compatibility) Implement "except" keyword as a subtree Make origin_re less strict to fix comment #6 in ticket #166 Implement multiple users and netgroups Improve test file
443 2010-12-28 Francis Giraldeau <francis.giraldeau@usherbrooke.ca>
446 The XML lens parse arbitrary XML documents. Most, but not all features of XML
447 standard are implemented, partially because the nature of augeas. Tests comes
448 from OASIS test suite.
451 * Document type declaration: elements, attlist, entity
454 * XML processing instructions
455 * Neested elements, including empty elements
457 * Mixed content, text and elements
461 * Single quotes attributes: double quotes is mandatory
462 * External entity reference, because augeas can't load a related file within a lens
463 * Document validation: augeas don't enforce DTD
465 This lens doesn't respect the PutGet law, becuse of an ambiguity in union.put
466 with text nodes. If a text node is created as a sibling of another text node, a
467 put and a get will merge those two nodes. In practice, no error occur and this
468 is a desirable behavior.
470 2010-12-22 Raphaël Pinson <raphink@gmail.com>
472 Fix ticket #169 and add unit tests by Sergio Ballestrero.
474 2010-12-20 David Lutterkort <lutter@redhat.com>
476 * src/pathx.c (func_regexp): do not SEGV on error; provide better error msg
479 * when the passed in regexp had a syntax error, we would leave the
480 interpreter variable at VIND uninitialised, but tagged as a regexp. As
481 a result, we'd SEGV when that slot in the variable table is
482 freed. Properly initialize slots in the variable table to NULL, and
483 store the regexp as soon as it has been built (before compilation)
484 there to address that.
485 * when a regexp had a syntax error, we would just drop the details of the
486 syntax error on the floor. We now include that in the error details so
487 that the user has some hint to how the regexp is foobared
489 # Please enter the commit message for your changes. Lines starting
490 # with '#' will be ignored, and an empty message aborts the commit.
492 # Changes to be committed:
493 # (use "git reset HEAD <file>..." to unstage)
495 # modified: src/pathx.c
498 # (use "git add <file>..." to include in what will be committed)
501 # doc/naturaldocs/conf/lenses/Menu_Backup.txt
502 # doc/naturaldocs/conf/lenses/Menu_Backup_2.txt
506 # tests/root/etc/network/
507 # tests/root/etc/samba/
508 # tests/root/etc/sysconfig/system-config-firewall
510 2010-12-10 Francis Giraldeau <francis.giraldeau@usherbrooke.ca>
512 Enable square lens in dump_lens
514 Add square lens to language
515 The new primitive square lens allows to handle XML like open and close tags.
516 It takes 2 arguments, a regexp for the tag and a lens for the content. The
517 square lens verify that open and close tags are matched in the get direction,
518 and put direction handles the close tag by copying the key.
520 * src/builtin.c: add "square" keyword to language
521 * src/lens.c: lns_make_square to compile the lens from actual simpler
523 * src/lens.h: append L_SQUARE to lens_tag enum to identify the square lens
525 * src/jmt.c: handle square lens in parser
526 * src/get.c: add char* square to state struct to hold the last L_DEL in
527 square to perform syntax check, and add all get handling functions for
529 * src/put.c: modify create_del to render current key when default string is
530 NULL and add all put handling functions
531 * tests/modules/pass_square.aug: unit tests to validate the square lens,
532 regular and recursives
534 2010-12-09 Francis Giraldeau <francis.giraldeau@usherbrooke.ca>
536 Add test for lens-access.sh in Makefile
538 2010-12-02 Raphaël Pinson <raphink@gmail.com>
540 Relicense pg_hba.aug as LGPLv2+ as the rest of Augeas.
542 2010-12-02 Lorenzo Dalrio <lorenzo.dalrio@gmail.com>
544 Add access.aug and associated test file
546 2010-12-02 Raphaël Pinson <raphink@gmail.com>
548 Fix GPL into LGPLv2+ for a series of lenses.
550 2010-11-24 Francis Giraldeau <francis.giraldeau@gmail.com>
552 Ignore eclipse project files
554 2010-11-22 Raphael Pinson <raphink@gmail.com>
556 Add support for "map" entries in grub.aug and adapt test accordingly (Fix ticket #148)
558 2010-11-19 David Lutterkort <lutter@redhat.com>
562 2010-11-19 Raphaël Pinson <raphink@gmail.com>
564 * lenses/util.aug: improve management of eol comments
565 - add comment_generic
566 - use comment_generic in comment
570 Use comment_eol and comment_or_eol in some lenses to fix default eol
571 comment entries. Adapt tests for shellvars and services to take this new
572 behaviour in consideration.
574 Add "indomU" Debian setting to grub.aug (Fix ticket #162)
576 Allow "\" style newlines in syslog.aug and add corresponding test (Fix ticket #161).
578 2010-11-18 Raphael Pinson <raphink@gmail.com>
580 Make filter a View in sudoers.aug to make it appear properly in doc
582 Improve doc on services.aug
584 Add some doc to pg_hba.aug
586 Add a bit of doc to pbuilder.aug
588 Add all missing lenses to Menu.txt
590 2010-11-18 Mathieu Arnold <mat@FreeBSD.org>
592 Add syslog.aug and associated test file
594 2010-11-18 Raphaël Pinson <raphink@gmail.com>
596 resolve refresh_pattern into fields Parse "extension_methods" into a list break entries upgrade_http0.9 and broken_vary_encoding down similar to what http_access does
599 2010-11-18 Mathieu Arnold <mat@FreeBSD.org>
601 On FreeBSD (at least) the sudoers file is in /usr/local/etc/.
603 2010-11-18 Francis Giraldeau <francis.giraldeau@gmail.com>
605 Parse ulimit builtin in shellvars.aug (fix ticket #73).
607 Accept double quotes in arguments in postfix_master.aug, fix bug# 69
609 2010-11-18 David Lutterkort <lutter@redhat.com>
611 * tests/Makefile.am (lens_tests): add tests for new lenses
613 Krb5 (realm_re, app_re): allow digits in realm names
614 Still makes the incorrect assumption that realm names start with an upper
615 case letter, and app names with a lower case one, but it's an improvement
616 over the current restrictions.
618 Fixes bug https://fedorahosted.org/augeas/ticket/139
620 2010-11-18 Matthew Booth <mbooth@redhat.com>
622 Fix crasher in ast.c:dict_pos on i686 with gcc 4.5 and -O2
623 This patch works around what appears to be an optimization bug in gcc 4.5. The
624 symptom of the bug is that dict_pos, called from dict_lookup, receives an
625 invalid value when accessing dict->used. The following ticket describes the bug,
626 and includes a simple test case:
628 https://fedorahosted.org/augeas/ticket/149
630 Adding a printf to dict_lookup immediately before the dict_pos call reveals that
631 dict->used has a value of 30 in the crashing case on my F14 system. A printf
632 added to the first line of dict_pos shows dict->used has an apparent value of
633 16777246. This causes an invalid array lookup shortly afterwards, which causes
634 the crash. 16777246, interestingly, is 2^24 + 30, where 24 is the size of the
635 dict->used bitfield. This should obviously not be possible, suggesting either a
636 compiler bug or undefined behaviour due in incorrect use of the language. Having
637 re-read the relevant section of K&R, I can't see anything about this use of
638 bitfields which might be a problem, except that: 'Fields may be declared only as
639 ints; for portability, specify signed or unsigned explicitly.' uint32_t resolves
640 to 'unsigned int' on i686, and in any case, replacing it with 'unsigned int'
641 does not solve the problem. As it stands, I believe this is a bug in the
644 The above ticket contains an alternate patch which copies dict in dict_pos,
645 which also prevents the crash. However, adding anything to dict_pos which
646 prevents the compiler from optimising dict away achieves the same result. For
651 This patch instead removes the bitfields in struct dict. While this is a
652 workaround, these bitfields save at most 1 word of memory per struct, but at the
653 cost of mis-aligned access. The patch does not increase the size of
654 dict_max_size to UINT32_MAX, as the lower maximum serves as a better guard
655 against runaway memory allocation.
657 2010-11-17 Raphael Pinson <raphink@gmail.com>
659 Allow underscore in chain_name for iptables.aug and adjust test accordingly.
661 2010-11-17 Erinn Looney-Triggs <erinn.looneytriggs@gmail.com>
663 Add login_defs.aug and associated test file.
665 2010-11-14 Marc Fournier <marc.fournier@camptocamp.com>
667 pg_hba: added debian systems path to filter - fixes #154.
669 util.aug: exclude unneeded files on debian systems (fix ticket #153)
671 2010-11-05 Raphael Pinson <raphink@gmail.com>
673 Map comments and use Util.comment and Util.empty in order to full fix ticket #151. Adapt test accordingly.
675 Allow indented lines in aptsources.aug (Fix ticket #151) and add associated test
677 Allow "=" as a separator for title in grub.aug (Fix ticket #150) and adapt test accordingly.
679 2010-11-04 Raphael Pinson <raphink@gmail.com>
683 2010-11-02 Raphael Pinson <raphink@gmail.com>
685 Add a few lenses to Menu.txt
687 Add shells.aug and associated test
689 2010-11-01 Raphael Pinson <raphink@gmail.com>
691 Add mke2fs.aug and associated test
693 2010-10-31 Raphael Pinson <raphink@gmail.com>
695 Add support for rpc services in inetd.aug, rework lens to allow it and add tests accordingly.
697 Parse option values in fstab.aug, adapt test file accordingly.
699 Map service names in node values instead of node names to prevent variable node names.
701 2010-10-29 Raphael Pinson <raphink@gmail.com>
703 Add /etc/mtab to known files
705 2010-10-28 Raphael Pinson <raphink@gmail.com>
707 Fix paramater into parameter in ND comment
709 2010-10-27 Raphael Pinson <raphink@gmail.com>
711 Use generic modules in bbhosts.aug
713 2010-10-26 Francis Giraldeau <francis.giraldeau@gmail.com>
715 Fixes bug #144: wrong behavior of iter concat
716 This patch fix the list_tail_cons macro to fastforward the tail list when
717 the first item is added to the list, otherwise if the first item added when
718 the list is NULL has two item, the tail points the the first item.
720 2010-10-26 Raphael Pinson <raphink@gmail.com>
722 Fix filter to use proper file
724 Remove trailing whitespace
726 Add nsswitch.aug and associated test
728 2010-10-26 Francis Giraldeau <francis.giraldeau@gmail.com>
730 Add debugging information about lens hierarchy
731 When compiled with --enable-debug, will compile a function to output the lens
732 hierarchy in dot files. Enable this specific debug info with
735 2010-10-26 David Lutterkort <lutter@redhat.com>
737 Sudoers: allow 'visiblepw' parameter flag
738 Fix provided by christj. Fixes bug #143
740 2010-10-26 Francis Giraldeau <francis.giraldeau@gmail.com>
742 Add clearm command to augtool
743 The clearm command is the same as setm, but sets the node value to
744 NULL in place of a string, suitable in some use case.
748 2010-10-26 Raphael Pinson <raphink@gmail.com>
750 /etc/sudoers.d is now supported (at least in Debian and Ubuntu)
752 Add resolv.aug and test
754 2010-10-14 Aurelien Bompard <aurelien@bompard.org>
756 Pg_hba: new lens and test
759 2010-09-30 Raphaël Pinson <raphink@gmail.com>
761 Add a few lenses to Menu.txt
763 Use Rx.ipv4 and Rx.integer in openvpn.aug
765 Use generic modules Rx, Sep and Build in keepalived.aug
767 Add email_addr to rx.aug
771 Improve documentation of build.aug
773 2010-09-29 Raphaël Pinson <raphink@gmail.com>
775 Move Build, Rx and Sep into Generic Modules, add Keepalived
777 2010-09-24 Raphaël Pinson <raphink@gmail.com>
779 Improve keepalived.aug
781 2010-09-23 Raphaël Pinson <raphink@gmail.com>
783 Add a lens for keepalived.conf and associated test
785 2010-09-23 David Lutterkort <lutter@redhat.com>
787 Preserve parse errors under /augeas//error
788 With the changes in commit 5ee81630, a subtree in /augeas/files that is
789 dirty after trying to load all files indicates a file that was loaded
790 before, but is not loaded anymore (e.g., because the set of lenses changed
791 since the last time we loaded) In that situation, both the subtree in
792 /augeas/files as well as the corresponding subtree in /files is deleted.
794 The code in store_error, which is called by load_file when a parse error
795 happens, would leave that subtree in /augeas/files dirty. This commit fixes
796 that by making sure we mark the error entries as clean. It also revamps
797 store_error to use the lighter-weight tree_xxx functions instead of the
802 2010-09-21 Raphaël Pinson <raphink@gmail.com>
804 * src/augtool.c: add -f|--file option to get commands from an input file
806 2010-09-21 Marc Fournier <marc.fournier@camptocamp.com>
808 Nrpe: new lens and tests.
810 Odbc: new lens and tests.
812 2010-09-15 David Lutterkort <lutter@redhat.com>
814 When setting a tree node to the value it already has, do not modify the tree
816 2010-09-09 David Lutterkort <lutter@redhat.com>
818 * src/try: add an optioj to strace augtool
820 Properly record the new mtime of a saved file in the tree
821 transform_save used to pass an incorrect file name to add_file_info (the
822 name was missing the root prefix), leading to an mitme of 0 for all saved
823 files. That in turn causes freshly saved files to be unnecessarily reloaded
824 on the next aug_load.
826 * src/transform.c (mtime_as_string): tolerate a NULL filename, and return
827 an mtime of 0; (transform_save): pass the full file name, including the
828 root to add_file_info
829 * tests/test-load.c (testReloadDeletedMeta): the test is now
830 time-sensitive; to work around that, set the mtime of the changed tree
831 to the original mtime of the file
832 * tests/test-save.c (testMtime): verify that we record the actual mtime
833 and not just 0 in the tree after a save.
835 Thanks to Laine Stump for spotting this
837 2010-08-27 Francis Giraldeau <francis.giraldeau@gmail.com>
840 * Modify separator for list values to accept simple spaces
841 * Add all alternatives for baseurl and gpgkey
842 * Add tests to verify the correct behavior
844 2010-08-27 David Lutterkort <lutter@redhat.com>
846 * bootstrap: add locale module from gnulib
849 2010-08-16 David Lutterkort <lutter@redhat.com>
851 Yum: accept continuation lines for gpgkey
854 2010-08-16 Francis Giraldeau <francis.giraldeau@gmail.com>
856 * src/get.c (visit_exit): fix segfault from empty stack for L_MAYBE
859 2010-08-06 David Lutterkort <lutter@redhat.com>
863 Fix behavior of aug_defnode
864 (1) Make sure that the definition of the variable is recorded under
866 (2) Do not report an error if the expression evaluates to a non-empty
869 * src/augeas.c (aug_defvar): split creating metadata under
870 /augeas/variables into record_var_meta; (aug_defnode): do not return an
871 error when expr evaluates to nonempty node set; record variable
873 * tests/test-api.c: add tests for defvar and defnode behavior
875 2010-08-05 David Lutterkort <lutter@redhat.com>
877 Use pathx_aug_parse rather than pathx_parse in various places
878 Since pathx_aug_parse makes sure the symbol table stays updated, use
879 pathx_aug_parse whereever that makes sense.
881 Rename parse_user_pathx to pathx_aug_parse
882 * internal.h (pathx_aug_parse): new protoype
883 * augeas.c (pathx_aug_parse): renamed, add optional arg for a different
886 Fix BZ 613967 - memory corruption on reloading externally modified file
887 The problem was that when we replaced the old tree for a file with the new
888 one we just read from the file, the replace operation did not update
889 nodesets in variables, since we did not pass the global symtab into
892 * src/internal.h (tree_replace): pass in struct augeas, so that we have
893 access to the global symtab
894 * src/augeas.c (tree_replace): make sure we create the pathx with the
896 * src/transform.c (load_file): adapt to new prototype for tree_replace
897 * tests/test-load.c (testReloadExternalMod): test that we do not segfault
898 when a file was modified externally
900 Test root: mimick the setup of grub config files on Fedora more closely
901 * root/etc/grub.conf: symlink to root/boot/grub/grub.conf
902 * root/boot/grub/grub.conf: new file with contents of /etc/grub.conf
903 * root/boot/grub/menu.lst: symlink to grub.conf
905 2010-08-03 Raphael Pinson <raphink@gmail.com>
907 Sudoers: allow escaped spaces in user/group names
910 2010-07-26 David Lutterkort <lutter@redhat.com>
912 Limits: also look for files in /etc/security/limits.d
913 Suggested by David Timms
915 2010-07-23 Tim Stoop <tim.stoop@gmail.com>
917 Mysql: lens for MySQL's *.cnf files
919 2010-07-23 David Lutterkort <lutter@redhat.com>
921 Sysconfig: new lens for a subdialect of shell
922 Using shell files with simple variable assignments is a very popular config
923 file format. The Shellvars lens doesn't serve those files perfectly well,
924 since it tries to preserve details important for general shell scripts that
925 are ignored by sysconfig files.
927 This lens is a variation on Shellvars that changes a few important aspects
930 * Strip quotes from values when reading a file, and restore quotes as
932 * Pretend there's no difference between single and double quotes (this
933 assumption makes it possible to add quotes as needed solely based on
935 * Do not support shell arrays or backticks; support for these could be
936 restored by somebody sufficiently motivated, though neither of them
937 should be used in a sysconfig file
939 The lens doesn't autoload any files yet, though we should consider moving
940 most of the files that Shellvars loads over to this lens.
942 * src/lens.c (lns_check_rec): allow 'let rec' with regular RHS
943 If the user writes 'let rec l = rhs' and the RHS does not mention l, just
944 mark the lens as regular and carry on.
946 2010-07-21 David Lutterkort <lutter@redhat.com>
948 * src/syntax.c (load_module_file): make sure we report an error
950 Fix segfault in glue routines; add test for the fix
951 The tree_*_glue functions did not set the error struct when parsing a path;
952 this caused a segfault when trying to insert before/after a non-existant
953 node, since tree_insert tried to report the error into a struct error that
958 * src/syntax.c (compile_test): reset errors at the end of the test
959 Otherwise, we can't have tests succeed after tests failed intentionally (by
960 making their result '= *')
962 * src/errcode.h (reset_error): new function
963 * src/augeas.c (api_entry): use reset_error
964 * src/errcode.c (reset_error): new function, with code from api_entry
965 * src/errcode.h (reset_error): add prototype
967 2010-07-20 Francis Giraldeau <francis.giraldeau@gmail.com>
969 * src/put.c (split_concat): fix memory leak when split doesn't match
971 2010-07-19 David Lutterkort <lutter@redhat.com>
973 Use gnulib from a submodule
974 This allows us to record the exact changeset from gnulib that everybody
977 2010-07-19 Frederik Wagner <fnerdwq@googlemail.com>
979 Added /etc/sysconfig/suseconfig to shellvars lens.
981 2010-07-08 Francis Giraldeau <francis.giraldeau@gmail.com>
983 Adding is_scan in the condition to accept an item
985 2010-06-30 Matthew Booth <mbooth@redhat.com>
987 Device_map: new lens for grub's device.map
989 2010-06-29 David Lutterkort <lutter@redhat.com>
991 Avoid unnecessary file parsing when reloading the tree
992 We used to reparse every file we knew about upon aug_load. Now, we only
993 reparse files if the file has changed on disk.
995 We test a few scenarios to make sure aug_load retains its behavior of
996 obliterating the tree and filling it with the latest from disk. This
997 includes throwing away unsaved changes or trees that have been deleted.
999 Add utility tree_store_value to avoid unnecessary strdup's
1000 * src/internal.h (tree_store_value): add prototype
1001 * src/augeas.c (tree_store_value): new function; (tree_set_value): use
1004 Make tree_clean available outside of augeas.c
1005 * src/augeas.c (tree_clean): remove 'static'
1006 * src/internal.h (tree_clean): add prototype
1008 Add xstrtoint64 to internal.[ch]
1009 The implementation is directly from libvirt
1011 * src/internal.h (xstrtoint64): add prototype
1012 * src/internal.c (xstrtoint64): add impl
1014 * src/test-load.c (testLoadSave): work off a writable /etc/hosts
1015 This addresses a FIXME that could lead to use not detecting incorrect behavior
1017 Move 'run' test utility to cutest.[ch]
1018 * tests/cutest.h (run): add prototype
1019 * tests/cutest.c (run): add impl
1020 * tests/test-save.c (run): remove
1022 Redefine all variables upon load
1023 This is a slight change in behavior: before, we used to just discard the
1024 contents of all variables upon load. Now, we redefine variables by
1025 evaluating the expression with which they were defined initially again.
1027 The change in behavior is backwards compatible, since at worst, users will
1028 redefine variables themselves after an aug_load
1030 * src/augeas.c (aug_init): create /augeas/variables on startup
1032 * src/augeas.c (aug_defvar): use constants to create /augeas/variables
1034 2010-06-22 David Lutterkort <lutter@redhat.com>
1038 * augeas.spec.in: fix ownership of /usr/share/augeas
1041 2010-06-17 David Lutterkort <lutter@redhat.com>
1043 Test behavior of aug_setm
1044 * src/augeas.c (aug_setm): return number of modified nodes
1045 * tests/test-api.c (testSetM): compliance tests for aug_setm
1047 * src/augeas.c (aug_setm): do not segfault when sub is NULL
1049 2010-06-17 Frederik Wagner <fnerdwq@gmail.com>
1051 Tests for new aug_setm function
1052 Test through augtool calls.
1054 Exposed aug_setm to augtool.
1056 2010-06-17 David Lutterkort <lutter@redhat.com>
1059 * src/augeas.h (aug_setm): new public API call
1060 * src/augeas.c (aug_setm): implement setting multiple nodes
1061 * src/augeas_sym.version: export symbol aug_setm
1063 2010-05-24 Frederik Wagner <fnerdwq@googlemail.com>
1065 Shellvars: added SuSE sysconfig puppet files
1066 For SuSE systems, added /etc/sysconfig/{puppet,puppetmaster} to lens.
1068 2010-05-18 Frederik Wagner <fnerdwq@googlemail.com>
1070 List handling shellvars_list lens added.
1071 Lens shellvars_list has been added to treat variables in specific files
1072 as lists of words, e.g. in /etc/sysconfig/ 'kernel' and 'bootloader'.
1074 * lenses/shellvars.aug: removed include for /etc/sysconfig/kernel
1075 * lenses/shellvars_array.aug: new lens
1076 * lenses/tests/test_shellvars_array.aug: test for new lens
1078 2010-05-13 David Lutterkort <lutter@redhat.com>
1080 Add modules_conf to naturaldocs Menu
1082 Add /etc/modules.conf from hell
1083 Actually, from http://www.janerob.com/rob/ts5100/modules.conf
1085 2010-05-13 Matthew Booth <mbooth@redhat.com>
1087 Modules_conf: new lens for modules.conf and conf.modules
1089 Modprobe: Refactor to make re-use easier
1091 2010-05-11 David Lutterkort <lutter@redhat.com>
1093 * src/augeas.c: record expression for defvar in /augeas/variables
1095 2010-05-07 David Lutterkort <lutter@redhat.com>
1097 * Grub: handle comments within a boot stanza
1100 Adjust copyright notices
1101 - copyright is from creation of file through 2010
1102 - adjust copyright owner according to Red Hat's policy
1104 2010-05-04 Raphael Pinson <raphink@gmail.com>
1106 Group: add test for disabled account ('!' in password field)
1108 2010-04-27 seph <seph@directionless.org>
1110 Shellvars: process /etc/environment
1112 2010-04-26 Nicolas Valcárcel Scerpella <nvalcarcel@ubuntu.com>
1114 Iptables: also look for /etc/iptables-save
1115 This is where Debian keeps iptables rules
1117 2010-04-26 Frederik Wagner <fnerdwq@googlemail.com>
1119 securetty: added handling of emtpy lines/comments
1120 * lenses/securetty.aug:
1121 added handling of comments and empty lines
1122 * lenses/tests/test_securetty.aug:
1123 added test for enhanced lens
1125 2010-04-21 David Lutterkort <lutter@redhat.com>
1129 2010-04-21 Simon Josi <josi@puzzle.ch>
1131 Securetty: new lens and test for /etc/securetty
1133 2010-04-21 David Lutterkort <lutter@redhat.com>
1135 Sudoers: use example file from Fedora 13
1136 This is causing trouble with release-0.7.0, but not this revision.
1138 File was reported in bug #122
1140 tests: make most tests work on Solaris
1141 The test scripts are full of bashisms; removed some of them, though for
1142 most, just changed the shell from /bin/sh to /bin/bash; removing bashisms
1143 will need to be addressed.
1145 Tests now mostly pass (82/85) on the OpenCSW Solaris 5.10 build machine
1147 * tests/test-save.c: use proper includes for WIFEXITED
1148 Without them, the build fails on FreeBSD
1150 2010-04-20 David Lutterkort <lutter@redhat.com>
1152 Debctrl (multi_line_entry): fix bad regexp
1153 The lens 'del /^ / " "' is not valid, since we do not allow '^' as a meta
1154 character. Changing that to 'del / / " "' exposed a typecheck problem in
1155 lns: both multi_line_entry and eol match blank lines. Fixed this by
1156 requiring that a multi_line_entry has to have at least one non-blank
1159 Debctrl: whitespace cleanup, no functional change
1161 * src/fa.c (re_iter_as_string): escape literal '|'
1162 When turning a FA back to a string, a literal '|' needs to be output as '\|'
1164 * tests/fatest.c (testExpandCharRanges): test escaping of literal '|'
1166 2010-04-19 David Lutterkort <lutter@redhat.com>
1168 * tests/fatest.c (print_regerror): do not use alloca
1170 * bootstrap: pull in isblank explicitly
1173 * src/lens.c (lns_check_rec): fix refcounting mistake on error path
1176 * src/augtool.c: report an error when 'get' fails
1178 aug_get: return -1 when multiple nodes match
1179 This fixes breakage in the API contract for aug_get, introduced in commit
1180 e80494a6. Also adds a test to ensure we do not break API for aug_get again.
1184 2010-04-16 David Lutterkort <lutter@redhat.com>
1186 jmt: distinguish between successful parse and syntax error at end of input
1187 If a syntax error happened after the last character of the input string
1188 (e.g., becuase the input was incomplete), rec_process would think the parse
1189 was successful, and then notice that there was no parse result. That would
1190 lead to an incorrect error message hinting at an internal error, when it
1191 was really a syntax error.
1193 By changing the return value for jmt_visit, it's now possible to
1194 distinguish between internal errors, syntax errors and successful parses
1197 * src/get.c (visit_exit): handle L_MAYBE
1198 Added test to tests/modules/pass_simple_recursion.aug, lens 'maybe'
1202 * src/jmt.c (build_tree): print debug output for build_nullable
1204 2010-03-12 David Lutterkort <lutter@redhat.com>
1206 * lenses/tests/test_logrotate.aug: add test for files separated by newlines
1207 This test the fix for bug #104, commit fe0453ce.
1209 2010-03-11 David Lutterkort <lutter@redhat.com>
1211 * lenses/group.aug (password): remove backslashes
1212 Backslashes in char classes are taken literally, they do not escape a
1215 2010-03-11 root <root@lx200.costest.lrz.de>
1217 Group: Added disabled password support
1218 * lenses/group.aug: '*' and '!' are allowed chars for disabled password
1219 * lenses/tests/test_group.aug: added test for lens change
1221 2010-03-11 David Lutterkort <lutter@redhat.com>
1223 * src/lens.c (lns_check_rec): avoid use of uninitialized 'result'
1224 The ensures can fail, and we check whether result is NULL in the error
1227 2010-03-05 David Lutterkort <lutter@redhat.com>
1229 * src/lens.c (lns_format_atype): format L_REC lenses
1231 * src/lens.c: remove asserts; better error for missed tag in switch
1233 Shellvars: handle a bare 'export VAR'
1235 Inittab: allow ':' in the process field
1236 Fixes part of bug #109
1238 2010-03-05 Tim Stoop <tim.stoop@gmail.com>
1240 Approx: allow keywords starting with '$'
1242 2010-03-04 David Lutterkort <lutter@redhat.com>
1244 Approx: lens and test for the approx proxy server
1246 Produce a better error when iteration stops prematurely during put/create
1247 We now try to include the name of the child node that caused us to stop in
1250 2010-03-03 David Lutterkort <lutter@redhat.com>
1252 * src/fa.c: allow the strange regexp syntax '(a|)'
1253 POSIX allows it, and so do we now
1257 2010-03-02 David Lutterkort <lutter@redhat.com>
1259 Passwd: parse NIS entries on Solaris
1260 Based on a fix by Stuart Sears
1262 2010-02-26 David Lutterkort <lutter@redhat.com>
1264 * src/fa.c: clean up error macros
1265 The error macros _E, _F, and _N use names reserved for system libraries;
1266 this leads to compile errors at least on Solaris (as reported by lanky).
1268 Rename _E and _F to E and F, and eliminate _N.
1270 2010-02-26 Frederik Wagner <wagner@lrz.de>
1272 Modprobe: Suse includes
1273 * lenses/modprobe.aug: included /etc/modprobe.conf.local
1275 Shellvars: Suse includes
1276 * lenses/shellvars.aug:
1277 added include for /etc/sysconfig/network/ifcfg-
1279 Grub: support empty kernel parameters, Suse incl.s
1281 - added support for kernel parameters of the form "parameter="
1283 - included /boot/grub/menu.lst
1284 - changed default for delimiter in kw_menu_arg to " "
1285 * lenses/tests/test_grub.aug: changes corresponding to lens change
1287 2010-02-26 Dominique Dumont <domi.dumont@free.fr>
1289 Debctrl: new lens and test
1291 2010-02-23 David Lutterkort <lutter@redhat.com>
1293 Ntp: add 'tinker' directive
1296 Logrotate: tolerate whitespace at the end of a line
1299 2010-02-23 Raphael Pinson <raphink@gmail.com>
1301 Dhclient: add rfc code parsing
1304 Sudoers: allow del_negate even if no negate_node is found
1307 Logrotate: files can be separated by newlines
1310 Dput: add 'allow_dcut' parameter
1313 2010-02-22 David Lutterkort <lutter@redhat.com>
1315 * src/augtool.c: ignore empty lines from stdin
1316 We still complain about the nonsensical 'augtool ""'.
1318 Fixes BZ 566844 reported by Mike Burns
1320 2010-02-22 Stuart Sears <ssears@redhat.com>
1322 Sudoers (parameter_string_nobool_kw): accept "secure_path "
1325 2010-02-19 Tim Stoop <tim.stoop@gmail.com>
1327 Nagisocfg: lens and test for /etc/nagios3/nagios.cfg
1329 2010-02-12 Ivana Hutarova Varekova <varekova@redhat.com>
1331 Cgrules: new lens and test
1332 See cgrules.conf for http://libcg.sourceforge.net/
1334 2010-02-11 Ivana Hutarova Varekova <varekova@redhat.com>
1336 Cgconfig: lens and tests for libcgroup config
1337 See http://libcg.sourceforge.net/
1339 2010-02-11 Laine Stump <laine@laine.org>
1341 * src/transform.c (file_info): fix memory leak
1343 2010-02-09 David Lutterkort <lutter@redhat.com>
1345 * lens.c (ambig_check): pretty print tree type errors
1346 Instead of dumping raw regular expressions for the tree encoding, print out
1347 something resembling our tree notation.
1349 2010-02-08 David Lutterkort <lutter@redhat.com>
1351 libfa: handle the syntax r{min,} properly
1352 * src/fa.c (parse_repeated_regexp): set max = -1 when we see r{min,};
1353 (re_iter_as_string): when max == -1, print r{min,}
1354 * tests/fatext.c (testExample): add a few tests for this syntax
1356 * src/fa.c (parse_int): flag not parsing anything as an error
1358 * src/jmt.c: add caller filtering
1359 Caller filtering is needed to weed out seemingly ambiguous parse trees (see
1360 Section 5.3 of Jim/Mandelbaum's paper)
1362 Also adds two pathological lenses and tests to
1363 pass_simple_recursion.aug. Those tests fail without caller filtering.
1365 * AUTHORS: reformatted
1367 * tests/Makefile.am: add test for cobblermodules.aug
1369 2010-02-08 Shannon Hughes <shughes@redhat.com>
1371 Cobblermodules: lens + tests for cobbler's modules.conf
1373 2010-02-02 David Lutterkort <lutter@redhat.com>
1375 Shellvars: allow spaces after/before opening/closing parens for array
1376 Bug reported by Doug Warner
1378 2010-02-01 Matthew Palmer <matt@anchor.net.au>
1380 Sshd: allow optional arguments in subsystem commands
1382 2010-01-27 David Lutterkort <lutter@redhat.com>
1384 * src/augeas.c (tree_replace): don't bother marking the new parent as dirty
1385 We call tree_rm on it earlier, which already marks it as dirty.
1387 This line also triggered a SEGV when sub == NULL; this happened, for
1388 example, when /etc/apt/preferences was an empty file.
1390 Bug reported by Matt Palmer
1392 * src/get.c (no_match_error): initialize lname
1393 Otherwise, gcc complains about a possibly uninitialized value with -O2
1395 2010-01-25 David Lutterkort <lutter@redhat.com>
1397 Test for using a recursive lens inside other lenses
1399 * src/get.c: handle recursive lenses that are not L_REC
1400 Since any lens that uses an L_REC is itself recursive, the distinction
1401 whether to use get_rec or get_lens can be made in lns_get
1403 rec_process will also build the jmt if it does not exist yet
1407 Properly handle lenses that use L_REC lenses
1408 In constructs involving a recursive lens, we need to take the body of the
1409 recursive lens into consideration. We avoid infinite recursion by stopping
1410 when we see an L_REC that is marked as rec_internal, since that's the
1411 struct lens that points back to the top of the lens from within it.
1413 jmt_build now expects to be handed a properly set up recursive lens, which
1414 means that for an L_REC both the internal and external instances have to
1415 exist and be connected
1417 * src/lens.c (lns_check_rec): defer building the jmt until the end
1418 * src/jmt.c: when building the jmt, consider L_REC as long as it's not
1421 * src/jmt.c (print_grammar): recurse into L_REC if they are not rec_internal
1423 * src/jmt.c (jmt_visit): allow for toplevel lenses that are not L_REC
1424 To reconstruct the parse of a lens that is not L_REC, but uses L_REC,
1425 e.g. l* where l is L_REC, we can not assume any longer that the root of the
1426 parse tree has only one child. Consequently, we need to start
1427 reconstruction with listing all the children of the root node.
1429 Split build_tree into build_children (collects a list of child nodes) and
1430 build_tree which creates the tree for a nonterminal.
1432 To start reconstruction, we now start with collecting the list of children
1433 of the root of the parse tree; the Earley graph does not contain an item
1434 for that, which makes this operation slightly special.
1436 * src/lens.c: propagate rec_internal in the body of an L_REC
1438 * src/lens.c: don't short-circuit typechecking for recursive lenses explicitly
1439 The typecheck helpers are all smart enough to not run checks when one of
1440 the types is NULL, as is the case for recursive lenses.
1442 * src/lens.h (struct lens): explain better how we handle recursive lenses
1444 * src/jmt.c (build_trace): allow passing in a NULL item
1446 * src/lens.c (tags): add name for value primitive
1448 * src/get.c: replace assert's by ensure's
1449 assert aborts, which a library shouldn't do
1451 * src/errcode.h (ensure0): convenience version of ensure
1453 * src/get.c (find_seq): properly report OOM, do not call abort
1455 Remove assert_error_at
1456 This function was dangerous, since it does not jump, and therefore users
1457 will continue doing what they were doing, even if an assertion failed. Use
1460 * src/get.c (struct state): make info a pointer
1462 2010-01-23 David Lutterkort <lutter@redhat.com>
1464 * src/lens.c (restrict_regexp): properly report OOM
1466 2010-01-20 David Lutterkort <lutter@redhat.com>
1468 Document the basics of building from git
1470 2010-01-15 David Lutterkort <lutter@redhat.com>
1472 * src/builtin.c: builtins for printing and inspecting lenses
1475 The literal '()' is the only member of the unit type. Composition is now
1476 allowed if the first expression is of type unit, i.e. '() ; something' is
1479 Language: allow '_' as an identifier that is never bound
1482 will evaluate something and then immediately forget it
1484 * src/lexer.l (LID): allow leading underscore
1485 * src/syntax.c (bind, bind_type): do not bind '_'
1487 New primitive lens 'value'
1488 In analogy to 'label', this lens allows setting the value of a tree node to
1491 2010-01-14 David Lutterkort <lutter@redhat.com>
1495 Json: lens and tests for generic Json files
1497 Tests for recursive (context free) lenses
1499 Syntax for recursive lenses
1500 Add a 'let rec' construct; the syntax should be considered experimental and
1501 might be changed to some other form of expressing recursion.
1503 With recursive lenses, we can't do the bottom-up typechecking that we do
1504 for regular lenses; we need to consider the whole lens at once. This is
1505 achieved by inserting a callback to lns_check_rec when we parse 'let rec
1508 * src/builtin.c (lns_check_rec_glue): new function
1509 * src/lexer.l: new token LETREC
1510 * src/parser.y: add syntax rule for LETREC and desugar it into a call to
1512 * src/syntax.h: make free_term available, constant for name
1513 of let_check_rec within the interpreter
1514 * src/syntax.c (free_term): now extern, not static
1516 * src/get.c (get_rec, parse_rec): get/parse for recursive lenses
1518 * src/put.c: put/create for recursive lenses
1520 Remember the jmt in the lens and free it when it is no loner needed
1522 Earley parser based on Jim/Mandelbaum's transducers
1524 Calculate if a lens's ctype is nullable
1526 Add a typechecker and constructor for recursive lenses
1527 * src/lens.h (lns_make_rec, lns_check_rec): new functions
1528 * src/lens.c (lns_make_rec, lns_check_rec): new functions
1530 Suppress buildtime typechecks for L_REC; propagate recursive flag
1532 * src/lens.c (free_lens): free recursive lenses
1534 * src/lens.h: add a recursive lens combinator
1536 A simple debug facility
1537 Debugging is disabled by default. When configured with --enable-debug=yes,
1538 Augeas will look at runtime at the environment variable AUGEAS_DEBUG, which
1539 should contain a colon-separated list of categories. Besides printing
1540 various thigs on stdout, some debug output is also left in files in the
1541 directory set by the environment variable AUGEAS_DEBUG_DIR, e.g., dot
1542 graphs of various internal data structures.
1544 * configure.ac: add --enable-debug option
1545 * src/internal.h (debugging, debug_file): new functions
1546 * src/internal.c (debugging, debug_file): new functions
1548 struct error: add pointer back to struct augeas
1550 * src/errcode.h: more usable BUG_ON and BUG_FMT
1552 * src/lens.c (ambig_check): report OOM from fa_ambig_example
1554 * src/fa.c (fa_ambig_example): getting a NULL example is not an error
1556 * src/syntax.c (compile): give up after the first error
1557 We have no error recovery to speak off; if we keep going, we most of the
1558 time carpet-bomb the user with error messages that are simple follow-ons to
1561 * TODO: deleted, that list is in Trac now
1563 * src/fa.c (fa_intersect): initialize vars that could be used on error
1565 * src/fa.c (fa_as_regexp): convert strings more efficiently
1566 Since we are building the transitive closure of the FA, cut down the size
1567 of the FA by first extracting strings and removing their internal states.
1569 * src/fa.c (fa_as_regexp): fin only accepting state, no trans fin->fin
1571 Indicate whether an FA uses character ranges or regexps on transitions
1572 * src/fa.c (struct fa): new field trans_re; (fa_as_regexp): set trans_re;
1573 (fa_dot): print regexp rather than char range if trans_re is set
1575 2010-01-13 David Lutterkort <lutter@redhat.com>
1577 Add syntax for case-insensitive regexps
1578 A regexp literal /regexp/i will be converted to a case-insensitive regexp.
1580 * src/regexp.c (regexp_minus): respect nocase flags
1582 * src/lens.c (str_to_fa): compile nocase fa when needed
1584 * src/lens.c (str_to_fa): remove FIXME's and use proper error reporting
1586 Support for case-insensitive regexps
1587 Add nocase argument to make_regexp, and adjust all uses of make_regexp to
1588 pass that in. For concatenation and union of regexps we have to expand
1589 case-insensitive regexps when they are mixed with case-sensitive regexps.
1591 Adjust all uses of make_regexp.
1593 Add fa_expand_nocase to libfa
1595 Support for case-insensitive operations in libfa
1596 * src/fa.h (fa_nocase, fa_is_nocase): new functions
1597 * src/fa.c (struct fa): new field nocase; (fa_is_basic): a total FA has
1598 two transitions under nocase; (fa_clone): preserve nocase flag;
1599 (union_in_place, concat_in_place, fa_intersect): if one operand is
1600 nocase, and the other isn't, expand the nocase FA to a case-sensitive
1601 one; (totalize): do not add transitions on [A-Z]; (fa_nocase,
1602 fa_is_nocase): new functions; (case_expand): new function
1603 * tests/fatest.c (assertExample): also test against a nocase FA;
1604 (testNoCase): test concat etc. on nocase FA's
1606 * src/lens.c (subtree_atype): new function
1608 2010-01-07 David Lutterkort <lutter@redhat.com>
1610 Facelift for augtool
1611 This makes augtool somewhat friendlier, mostly because
1613 - help is organized better: typing 'help' produces a list of commands and
1614 a brief synopsis for each, typing 'help command' prints detailed help
1616 - augtool now knows about path expressions, so that they do not need to
1617 be enclosed in quotes if they have spaces with predicates, e.g. you can
1618 now type 'get /foo[ last() ]'
1620 Record an error if more than one lens tries to load a file
1621 * src/transform.c (file_info): new function; (transform_load): detect if
1622 more than one lens tries to load a file and record error in
1623 /augeas/files/PATH/error
1625 Pull computing a path underneath /files from a filename into a function
1626 * src/transform.c (file_name_path): new function; (load_file): use
1629 Change the metadata for individual files
1630 Record the name of the lens used to load the file in the lens node
1631 underneath /augeas/files/$PATH; the location info of the lens is kept in
1634 * src/transform.c (add_file_info): change what we keep underneath the
1636 * tests/xpath.tests (lircd-ancestor): adapt to metadata change
1638 * src/transform.c (add_file_info): manipulate tree directly
1639 Going through public functions like aug_set is silly, and causes all kinds
1642 Produce better error message for multiple matching transforms in save
1643 * src/augeas.h (aug_errcode_t): new error code AUG_EMXFM
1644 * src/augeas.c (errcodes): new error string for AUG_EMXFM; (tree_save):
1645 report multiple transforms as proper error
1646 * tests/test-save.c (testMultipleXfm): new test
1648 New function transform_file_error
1649 * src/transfrom.h (transform_file_error): add prototype
1650 * src/transform.c (transform_file_error): new function
1652 New function xfm_lens_name
1653 * src/transfrom.h (xfm_lens_name): add prototype
1654 * src/transform.c (xfm_lens_name): new function
1656 Tree functions to find/create a node with a path expression
1657 Internal counterparts to aug_get and aug_set
1659 * src/internal.h (tree_find, tree_find_cr): new prototypes
1660 * src/augeas.c (tree_find, tree_find_cr): new functions
1662 * src/internal.h: make various tree management functions available
1664 2010-01-06 David Lutterkort <lutter@redhat.com>
1666 Xinetd (name): fix bad '-' in character class
1668 2010-01-05 David Lutterkort <lutter@redhat.com>
1670 Do not choke on non-existing lens during save
1671 * src/transform.c (add_file_info): check that lens is non-NULL;
1672 (lens_from_name): provide detailed error message when lens lookup
1673 failed; (transform_validate): copy error from lens_from_name into tree
1674 * tests/test-save.c (testNonExistentLens): new test
1678 New error code AUG_ENOLENS
1679 Indicates failure to look a lens up by name from /augeas/load/*/lens
1681 * src/augeas.h (aug_errcode_t): new value AUG_ENOLENS
1682 * src/augeas.c (errcodes): new entry for AUG_ENOLENS
1684 * src/lens.c (lens_release): tolerate a NULL lens
1686 2010-01-04 Bryan Kearney <bkearney@localhost.localdomain>
1688 Cobblersettings: new lens and test
1690 2010-01-04 David Lutterkort <lutter@redhat.com>
1692 Rename read_file to xread_file
1694 2009-12-23 David Lutterkort <lutter@redhat.com>
1696 * src/lens.c (lns_make_union, lns_make_concat): do not access free'd memory
1697 make_lens_binop may free one of the lenses it gets passed. We can therefore
1698 not reference them after a call to make_lens_binop.
1700 * src/lens.c (format_lens): minimalistic pretty-printing of a lens
1702 * src/regexp.c (print_regexp): clean the regexp with fa_restrict_alphabet
1704 2009-12-18 David Lutterkort <lutter@redhat.com>
1706 * src/builtin.c (lens_get, lens_put): propagate errors as exceptions
1708 More convenience macros for errors
1709 Add BUG_ON and ERR_RET macros for reporting internal errors
1711 * src/errcode.h (BUG_ON, ERR_RET, HAS_ERR): new macros
1712 * src/errcode.c (bug_on): implementation for BUG_ON
1714 2009-12-17 David Lutterkort <lutter@redhat.com>
1716 Lokkit: allow '-' in arguments
1718 Iptables: handle both negation syntaxes
1719 Options can be negated either with '! --option arg' or with '--option !
1720 arg'. We now handle both, though they lead to slightly different trees
1722 2009-12-14 David Lutterkort <lutter@redhat.com>
1724 * doc/ftdetect/augeas.vim: fix syntax
1726 2009-12-09 Partha Aji <paji@redhat.com>
1728 Made samba aug accept entry keys with ':' in them
1730 2009-12-09 David Lutterkort <lutter@redhat.com>
1732 Shellvars: allow arrays that span multiple lines
1734 2009-12-07 David Lutterkort <lutter@redhat.com>
1736 Iptables: allow quoted strings as arguments
1738 2009-11-30 David Lutterkort <lutter@redhat.com>
1742 Distribute and install vim syntax files
1745 * Makefile.maint: sign tags
1747 Krb5: allow v4_name_convert in libdefaults section
1748 Fixes part of ticket #95
1750 Fstab: allow # in the spec
1751 Fixes part of ticket #95
1753 Group: allow empty password field
1754 Fixes part of ticket #95
1756 * src/parser.y: properly initialize yylloc
1759 2009-11-25 David Lutterkort <lutter@redhat.com>
1761 Properly check regexp literals for syntax errors
1762 * src/regexp.h (regexp_check): new function
1763 * src/regexp.c (regexp_compile_internal): new function to base both
1764 regexp_compile and regexp_check off
1765 * src/syntax.c (check_value): produce a syntax error if regexp does not
1766 pass regexp_check; (check_exp): make sure we do check values
1770 * src/lexer.l: include errcode.h; fix bad use of report_error
1772 * src/errcode.c: include stdarg.h
1774 Cron: variable names can contain '_' etc.
1775 Use Shellvars.key_re for consistency.
1779 2009-11-25 Matt Palmer <mpalmer@hezmatt.org>
1781 AptPreferences: add a put test
1782 Make sure we handle an empty file properly, and cleanup the resulting
1785 2009-11-24 Matt Palmer <mpalmer@hezmatt.org>
1787 Normalise records so that empty lines (which are a required part of the syntax) don't creep into the tree
1789 Support version pins in apt_preferences
1791 2009-11-23 David Lutterkort <lutter@redhat.com>
1793 * tests/Makefile.am (lens_tests): run postfix_access tests
1795 2009-11-16 Partha Aji <paji@redhat.com>
1797 Added a Post Fix Access lens along with the unit tests
1799 2009-11-13 David Lutterkort <lutter@redhat.com>
1801 * src/lens.c (ambig_check): distinguish error between concat and iteration
1803 * src/regexp.c (regexp_escape): treat NULL regexps as the empty regexp
1805 * src/regexp.c (regexp_escape): fix stripping of enclosing parens
1806 Only strip them if they belong together, and not for something like /(a)(b)/
1808 * src/syntax.c: spew exceptions less often
1809 print_value: only print exceptions that haven't been seen
1810 compile_test: only print the exception for a test when it hasn't
1813 * src/get.c: never try to process a string that doesn't match
1814 When a string during init_regs doesn't match at all, there's nothing useful
1815 we can do. Immediately return an error from lns_get.
1817 * src/syntax.h (exn_error): produce an exception to indicate an error
1818 exn_error returns a special exception that indicates that an error has
1819 happened (e.g., out-of-memory) that has already been reported in the
1820 central augeas->error instance.
1822 2009-11-12 David Lutterkort <lutter@redhat.com>
1824 * src/info.c (print_info): do not choke on NULL info
1826 * src/internal.h: new macros MEMCMP and MEMMOVE
1828 * src/lens.c (lns_make_subtype): explain type derivation
1830 * examples/fadot.c: by default, print minimized regexp
1832 * examples/fadot.c: fix formatting, no functional changes
1834 2009-11-10 David Lutterkort <lutter@redhat.com>
1836 Make augparse and augtool use user's locale
1838 * test/Makefile.am (TEST_ENVIRONMENT): set LANG to a non-C locale
1840 Remove character ranges from regexps if we are not in the C locale
1841 Since re_compile_pattern uses the current locale when expanding character
1842 ranges like [a-z], we need to be careful that such ranges are expanded in
1845 * configure.ac: check for uselocale
1846 * src/internal.[ch] (regexp_c_locale): new function
1847 * src/lens.c (digits_string): spell out the digits
1848 * src/lens.c (restrict_regexp): expand char ranges in restricted regexp
1849 * src/lexer.l (regexp_literal): run regexp literals through
1851 * src/regexp.c (regexp_escape): compress character ranges for printing
1852 * src/regexp.c (regexp_minus): expand charcter ranges
1854 Fixes ticket #35 for systems that do not have uselocale (for systems with
1855 uselocale, the fix is commit 07b6a880)
1857 libfa: new function fa_expand_char_ranges
1859 Calls to __aug_load_module need to go through api_entry/api_exit
1861 Switch to C locale on API entry on systems that have uselocale
1862 Since we need to do all our operations (especially regexp matching) in the
1863 C locale, we switch to that on API entry, and switch back to the user's
1866 That also makes it necessary that aug_init wraps the bulk of its work
1867 inside an api_entry/api_exit.
1869 Fixes ticket #35 for systems that have uselocale
1871 2009-10-26 David Lutterkort <lutter@redhat.com>
1873 Inittab: parse end-of-line comments into a #comment
1875 2009-10-23 David Lutterkort <lutter@redhat.com>
1877 * src/lens.c (lns_make_subtree): parenthesize key and value patterns
1878 These patterns may be a union not enclosed in parens
1880 * src/regexp.c (regexp_escape): don't clobber last character
1882 * src/lens.c: use regexp_escape to print regexps in error messages
1884 * src/fa.c (fa_restrict_alphabet): initialize parse
1886 * src/fa.c (special_chars): treat $ and ^ as special
1887 They are special when they are at the beginning resp. the end of a regular
1888 expression. Making them special (i.e., escaping them with '\') everywhere
1891 * src/fa.c (re_needs_parens_in_concat): ITER doesn't need parens in concat
1893 * src/fa.c (re_cset_as_string): work properly with negated cset
1894 We did not take re->negate into account, and always acted as if the cset
1895 was not negated. Introduce helper function cset_contains to both fix that
1896 and make the code a little clearer.
1898 2009-10-22 David Lutterkort <lutter@redhat.com>
1900 bootstrap: use stpcpy and stpncpy from gnulib
1902 Makefiles: gnulib now requires linking against libselinux
1903 * src/Makefile.am (libfa_la_LIBADD): add LIB_SELINUX
1904 * examples/Makefile.am (fadot_LDADD): remove GNULIB
1906 2009-10-21 David Lutterkort <lutter@redhat.com>
1908 Path expressions: add union operator
1909 Nodesets can now be unioned with the '|' operator
1913 * src/pathx.c (clone_nodeset): properly set size of the clone
1914 The size of the clone is the number of nodes in the original nodeset, not
1915 the size of the original nodeset.
1917 * src/regexp.c (regexp_union_n): insert '|' after the first non-NULL regexp
1918 We can not blindly insert a '|' after the first passed-in regexp since that
1919 (and any number of regexps at the beginning) might be NULL. We only insert
1920 '|' after actually copying a regexp into the result.
1922 2009-10-20 David Lutterkort <lutter@redhat.com>
1924 Wine: new lens and test
1925 Lens for parsing textual Windows registry files
1927 Pam: allow '-' before type
1928 The type field in a pam.d file can start with a '-' to indicate that
1929 missing the module should not cause an error. The '-' is now mapped into
1930 the tree as a separate node 'optional'
1932 Bug reported by Shannon Hughes
1934 * test/Makefile.am (lens_tests): add lens-ethers.sh
1936 * src/internal.c (escape): convert char to unsigned when printing as octal
1937 Without that, there's no guarantee that the char will be printed as three
1938 octal digits and not more
1940 Report line/column number when get/put test fails
1941 * src/builtin.c (make_exn_lns_error): add line/column number in error
1943 * src/internal.c (calc_line_ofs): moved here from transform.c
1944 * src/internal.h (calc_line_ofs): declare prototype
1945 * src/transform.c (calc_line_ofs): moved to internal.c
1947 * src/get.c (get_error): use end of last match as error position
1949 * man/augtool.1: regenerate
1951 2009-10-19 David Lutterkort <lutter@redhat.com>
1953 Krb5: support a [kdc] section
1954 The only entry it can have so far is 'profile' - no idea what else can go
1955 there since it's not documented in krb5.conf(5), but used, e.g. on Fedora
1958 2009-10-12 David Lutterkort <lutter@redhat.com>
1960 Rx (device_name): allow '!' in device name
1962 2009-10-09 David Lutterkort <lutter@redhat.com>
1964 Lokkit: make argument for --trust more permissive
1965 The --trust option takes an interface name, whcih can be more than what
1968 * lenses/lokkit.aug (trust): new lens; (entry): use trust
1969 * lenses/rx.aug (device_name): new regexp
1970 * lenses/tests/test_lokkit.aug: new test for more permissive device names
1972 Lokkit.forward_port: add missing eol
1973 Also adjust test_lokkit.aug since we're not getting a spurious empty entry
1976 2009-10-06 Satoru SATOH <satoru.satoh@gmail.com>
1978 /etc/ethers: new lens and test
1979 The followings adds a new lens for /etc/ethers and associated test.
1981 2009-09-30 David Lutterkort <lutter@redhat.com>
1983 * src/augparse.c: get error details from error API
1985 interpreter: do not abort() on fatal errors or print on stderr
1986 Use the error reporting infrastructure for most errors. Fatal errors (bugs)
1987 in the interpreter now lead to an error code AUG_EINTERNAL, and not an
1990 * src/parser.y: do not print to stderr
1992 * src/lexer.l: print into struct error instead of stderr
1994 New error code AUG_ESYNTAX
1996 * src/info.c (format_info): minor fixes
1997 - append a ':' after the location
1998 - produce a result even when line numbers are invalid
1999 - use xasprintf, not asprintf
2001 * src/lexer.l (to_int): unused, remove
2003 Make struct error available in struct info
2004 This makes it much easier to report errors into the central struct error
2005 instance hanging off the Augeas instance.
2007 Put struct error and report_error into its own file
2008 Also, make the struct error in struct augeas a pointer
2010 * src/info.h: optimize layout of struct info
2012 *src/syntax.c: catch some allocation errors
2014 * src/ref.h (make_ref_err): convenience macro
2016 * tests/fatest.c (print_regerror): only print first 40 chars of regexp
2018 libfa: handle allocation failures gracefully
2020 parser: report some allocation failures
2022 * src/fatest.c: make testable with failmalloc
2023 - when FAILMALLOC_INTERVAL is set, report success, no matter
2024 how many tests failed (presumably because of memory starvation)
2025 - abort with die_oom() if crucial internal checks can't be performed
2026 because of allocation failures
2028 cutest: fortify against allocation failures
2029 - new function die_oom which sets exit status to 2 when
2030 we die from an oom condition
2031 - use the safe-alloc macros for allocations
2032 - abort the test when internal allocations fail
2034 * src/hash.c (hash_alloc_insert): return 0/-1 for success/error
2036 Use a proper function for make_ref
2037 That allows us to require that callers check the return value
2039 Handle allocation failures from define_native_intl
2041 build: support for running with libfailmalloc preloaded
2042 Add --with-failmalloc=LIB configure option and failmalloc targets to run
2043 select programs with failing allocations.
2045 2009-09-24 David Lutterkort <lutter@redhat.com>
2047 * src/transform.c: do not include canonicalize.h anymore
2048 The canonicalize-lgpl gnulib module doesn't require that anymore
2050 2009-09-21 David Lutterkort <lutter@redhat.com>
2052 Path expressions: add regexp matching
2053 Add a function regexp : string -> regexp and an operator
2054 =~ : string|nodeset -> regexp -> boolean to the language for
2057 * src/regexp.c (regexp_compile): do not print anything on error
2059 Split regexps, info and strings out of syntax.[ch]
2060 * Move struct string and struct info and related functions into info.[ch]
2061 * Move headers for regexp.c into new file regexp.h
2063 This makes it easier to reuse these outside of syntax.[ch] - including
2064 syntax.h in get.c and put.c was way too much anyway.
2066 aug_match, aug_mv: return -1 when pathx evaluation fails
2068 Report errors when exactly one match is expected
2069 aug_mv and aug_insert expect that exactly one node matches the path
2070 expressions they are given. Report new errors if none or more than one node
2073 * src/augtool.c: use new error API
2074 Call into the error API after each aug_* call and print error details
2076 Propagate pathx errors during evalutaion
2077 We did not report errors from pathx evaluation functions, only from the
2078 parser/typechecker. Now functions like pathx_first etc. report errors
2081 Store pathx parse errors in internal error struct
2082 The pathx_parse function will now store error information in a struct
2083 error; we pass the one from struct augeas in and save it in the pathx.
2085 Reset old error messages on each entry through the API from the outside
2087 * src/syntax.c (interpreter_init): report errors
2089 Error reporting API and infrastructure
2090 Only reporting errors in the tree makes the API much harder to use; the
2091 aug_error* functions make it easier to inquire about errors
2094 * src/pathx.c (pathx_symtab_init): unused, remove
2096 2009-09-18 David Lutterkort <lutter@redhat.com>
2098 * src/syntax.c (interpreter_init): fix potential leak
2099 If globbuf has entries in it when we encounter an error, we need to
2102 2009-09-17 Matt Palmer <mpalmer@hezmatt.org>
2104 Sudoers: allow certain backslash-quoted characters in a command
2105 Commands may contain backslashes by themselves and the two-char sequences
2108 2009-09-14 David Lutterkort <lutter@redhat.com>
2112 2009-09-11 David Lutterkort <lutter@redhat.com>
2114 Man pages: update to match current augtool and augparse
2116 Add --version option to augtool and augparse
2119 A couple more files for the test root
2121 Add preceding-sibling and following-sibling axes to path expressions
2123 2009-09-10 David Lutterkort <lutter@redhat.com>
2125 Better error message for too many args in a path expression
2127 2009-09-09 David Lutterkort <lutter@redhat.com>
2129 Slapd: include /etc/openldap/slapd.conf
2130 This is the default location in Fedora.
2134 2009-09-04 David Lutterkort <lutter@redhat.com>
2136 Multipath: new lens for /etc/multipath.conf
2138 * src/try: fix 'set annotate' for gdb
2140 2009-09-03 David Lutterkort <lutter@redhat.com>
2142 Transparent save of cross-device links
2143 When saving to a file, we first write to a file with extension .augnew and
2144 then rename that file to the actual file. This fails when the original is a
2145 symlink to a file on another device.
2147 We now write the .augnew file next to the canonicalized original file to
2148 avoid that headache. There are still situations where the rename fails,
2149 e.g. when the original file is bindmounted - in that situation, we have to
2152 * src/syntax.c (print_value): use print_tree instead of dump_tree
2154 2009-09-02 David Lutterkort <lutter@redhat.com>
2156 * lenses/rx.aug (fspath): simplistic regex for filesystem paths
2158 * src/lens.c (disjoint_check): print example as tree for put
2159 When the typechecker finds lens overlap in a union's put direction, format
2160 the generated example as a tree to make it more readable.
2162 * src/lens.c(enc_format): remove extraneous quote
2164 Make fa_example work for strings with embedded NUL's
2166 2009-09-01 Matt Palmer <mpalmer@hezmatt.org>
2168 Inetd: new lens and test
2170 2009-08-31 David Lutterkort <lutter@redhat.com>
2172 Pretty-print lens atypes and use that for errors during put
2173 * src/lens.c (lns_format_atype): new function
2174 * src/lens.h (lns_format_atype): new prototype
2175 * src/put.c (regexp_match_error): use lns_format_atype for errors
2177 * tests/modules/pass_strip_quotes.aug: test quote stripping
2178 The tests strips optional quotes and puts them back (or creates them) as
2179 needed, only depending on the value of the tree node.
2181 Match trees on label and value, not just label
2182 We still only use one level in the tree for matching in the put direction,
2183 but take the values of nodes into account.
2185 We had fail_ tests in place to document the deficiency of the tree matcher,
2186 but with that deficiency gone, these now become passing tests.
2188 Restrict the alphabet of a regexp
2190 Use offsets for various lens types
2192 Carry the key type explicitly in lenses
2193 Instead of computing the key type recursively, store it in lens->ktype. The
2194 key type becomes the new abstract type (atype) when a lens is used inside a
2197 Allow NULLS in regexp_(union|concat)_n
2198 It's sometimes useful to union/concat N regexps even if some of them are
2199 NULL. regexp_(union|concat)_n will ignore them.
2201 libfa: handle regexps with embedded NUL characters
2202 So far, the API promised that we could do that, but that wasn't implemented.
2204 fa_compile: accept regexps with embedded NUL's
2206 Make regexp_escape strip enclosing parens; make API const correct
2207 * src/syntax.h (regexp_escape): make const correct
2208 * src/regexp.h (regexp_escape): strip '(...)' enclosing entire regexp
2210 * src/builtin.c (tree_clear_glue): primitive clear function for use in tests
2212 Utility function xasprintf
2213 Like asprintf, but don't leave first arg in limbo on error
2215 * src/internal.h (xasprintf): new prototype
2216 * src/internal.c (xasprintf): new function
2218 regexp_release: allow NULL regexp
2220 * src/augeas.c: do not read past the end of the load path
2222 2009-08-14 David Lutterkort <lutter@redhat.com>
2224 Only read regular files
2225 * src/transform.c (is_regular_file): new function
2226 * src/transform.c (filter_generate): do not include non-regular files
2230 2009-08-12 David Lutterkort <lutter@redhat.com>
2232 Do not assume how glob allocates gl_pathv
2233 We assumed that the gl_pathv in a glob_t was allocated in a particular
2236 * src/transform.c (filter_generate): make a copy of gl_pathv
2238 2009-08-10 David Lutterkort <lutter@redhat.com>
2240 aug_load: cleanup variables when deleting /files
2241 The first thing aug_load does is delete /augeas/files and /files. We need
2242 to make sure that any variables that contain references to nodes in those
2243 subtrees are cleaned up properly, i.e. that we remove such nodes from
2244 nodesets in the variables.
2246 * src/augeas.c (tree_unlink_children): remove descendants of the tree we
2247 are deleting from variables.
2248 * tests/test-load.c (testLoadDefined): verify fix
2252 Pass symtab explicitly into pathx_symtab_remove_descendants
2254 2009-08-06 David Lutterkort <lutter@redhat.com>
2256 Record new files under /augeas/files when they are saved
2257 * src/transform.c (transform_save): add file info with add_file_info
2258 * tests/test-save.c: test that file info is added for a new file
2259 * tests/Makefile.am: build and run test-save
2260 * .gitignore: ignore tests/test-save
2264 * src/transform.c (add_file_info): change what we store about a file
2265 For a file FILE, we now only record the path and the info for the lens;
2268 /augeas/files/FILE/path = /files/FILE
2269 /augeas/files/FILE/lens/info = ...
2270 /augeas/files/FILE/lens/id = 0x...
2274 /augeas/files/FILE/path = /files/FILE
2275 /augeas/files/FILE/lens = ...
2277 The id wasn't useful to anybody, and the lens info is useful for debugging
2280 * src/transform.c (add_file_info): minor cleanup
2281 - Rename add_load_info to add_file_info
2282 - Eliminate filename argument, since it's redundant
2284 defnode: when creating new node, put it in the nodeset
2285 When a new node is created, e.g. with 'defnode x "/foo[0 = 1]"' we used to
2286 assign an empty nodeset to x. Now x will hold a reference to the newly
2287 created node, even though the initial path expression would never match any
2290 * src/augeas.c (aug_defnode): call pathx_symtab_assign_tree after
2292 * src/pathx.c (pathx_symtab_assign_tree): new function to assign a single
2293 tree node to a variable
2294 * src/internal.h: declare pathx_symtab_assign_tree
2295 * tests/test-xpath.c (test_defnode_nonexistent): test new behavior
2297 2009-08-05 David Lutterkort <lutter@redhat.com>
2299 * src/lexer.l: allow DOS line endings
2300 Accept \r\n as a line ending in addition to \n
2302 Fixes RH Bugzilla 514712
2304 2009-08-04 Matthew Booth <mbooth@redhat.com>
2306 Require quotes around strings in xorg.conf
2307 man xorg.conf appears to support this:
2308 String a string enclosed in double quote marks (")
2310 This change means that explicitly parsed values will remove quotes in the
2311 get directory and insert them in the put direction.
2313 Currently, only the following entries are explicitly parsed:
2323 * All entries in the Display Subsection
2325 The lens will also accept any other entry name not in this list. However,
2326 as it does not know what types to expect, it stores a bare string. This
2327 will include quote marks.
2329 Add more specific entry handlers to xorg.conf
2330 Additionally handle:
2336 This covers all entries in the default configuration.
2338 The advantage of having a specific handler is that it knows more about what
2339 values are valid. For example, with this patch Driver will not accept an
2340 unquoted value, which would cause the X server not to start.
2342 Parse more directives in xorg.conf
2343 The default xorg.conf generated by pyxf86config on Red Hat/Fedora systems
2344 is not parsed by the current xorg.conf. Specifically it does not
2347 * Screen, in ServerLayout
2348 * InputDevice, in ServerLayout
2349 * SubSection "Display" ..., in Screen
2351 This patch adds support for those values, so that the default xorg.conf on
2352 Red Hat/Fedora systems now parses.
2354 It should also add support for all directives in the Display subsection,
2355 however they are not covered by the test.
2357 2009-07-31 Marc Fournier <marc.fournier@camptocamp.com>
2359 vim: extra carriage return caused a parse error
2361 2009-07-23 Jim Meyering <meyering@redhat.com>
2363 tests: extract SELinux context more portably
2364 * test-preserve.sh: Use stat --format=%C $hosts ... rather than
2365 ls -lZ $hosts | cut -d ' ' -f 5. The latter fails with some
2366 combinations of ls and SELinux.
2368 2009-07-16 David Lutterkort <lutter@redhat.com>
2370 * src/Makefile.am: link libfa with gnulib, needed on AIX
2372 2009-07-14 Bruno Cornec <Bruno.Cornec@hp.com>
2374 * doc/augeas.vim: vi syntax highlighting for .aug files
2376 2009-07-13 David Lutterkort <lutter@redhat.com>
2380 2009-07-09 David Lutterkort <lutter@redhat.com>
2382 tree handling: propagate dirty flag into root
2383 We had an off-by-one error in tree_mark_dirty that lead to the root of the
2384 tree not being marked as dirty. As a consequence, performing a tree_clean
2385 on such a tree would not mark the tree as clean; that caused an aug_load
2386 directly followed by aug_save to write to disk, even though the tree was
2389 * src/augeas.c (tree_mark_dirty): propagate dirty flag to the root
2390 * tests/test-load.c (testLoadSave): test that simple load + save
2391 does not touch the filesystem
2393 This bug was introduced in commit 7278965b
2395 2009-07-08 David Lutterkort <lutter@redhat.com>
2397 Ntp: allow additional options for server etc.
2398 Allow options listed on http://doc.ntp.org/4.2.4/confopt.html
2400 Fixes bug #72 reported by Micah
2402 Shellvars: allow backticks as quote characters
2403 * lenses/shellvars.aug (simple_value): allow backticks as quotes
2404 * lenses/tests/test_shellvars.aug: add tests
2406 Fixes bug #74 reported by Micah
2408 2009-07-08 Jim Meyering <meyering@redhat.com>
2410 build: ignore generated test files
2411 * tests/.gitignore: Remove file.
2412 * .gitignore: ignore tests/lens-*.sh
2414 2009-07-08 David Lutterkort <lutter@redhat.com>
2416 Logrotate: allow filenames to be indented
2417 * lenses/logrotate.aug (rule): allow indentation at start of rule
2418 * lenses/tests/test_logrotate.aug: add tests
2420 Fixes part of bug #67 reported by Micah
2422 Logrotate: make owner/group in create statement optional
2423 * lenses/logrotate.aug (create): make mode/owner/group optional
2424 * lenses/test/test_logrotate.aug: add tests
2426 Fixes part of bug #67 reported by Micah
2428 * configure.ac: use AC_SYS_LARGEFILE
2429 Suggested by Jeff Johnson <n3npq@mac.com>
2431 * src/augeas.c (init_root): when root0 == "", use "/" as root
2432 When an empty string is passed as root0, make sure we do not make an
2433 invalid memory access when we look for the trailing slash.
2435 Reported and fix suggested by Jeff Johnson <n3npq@mac.com>
2437 2009-06-26 Jim Meyering <meyering@redhat.com>
2439 tests: divide test-lenses.sh into its 54 independent tests
2440 This permits these tests to be run in parallel.
2441 * tests/lens-test-1: New file.
2442 * tests/Makefile.am (lens_tests): Define.
2443 (check-lens-tests): New rule, to ensure that the above stays in
2445 (check): Depend on check-lens-tests.
2446 ($(lens_tests)): New rule. Generate these files.
2447 (check_SCRIPTS): Remove test-lenses.sh. Add $(lens_tests).
2448 (EXTRA_DIST): Add lens-test-1.
2449 * tests/test-lenses.sh: Remove file.
2450 * tests/.gitignore: suppress lens-*.sh files
2452 enable automake-1.11 features: colorized and parallel tests, etc.
2453 Also enable automake's new "silent-rules" feature.
2454 Use "make V=1" to see the usual, verbose-mode commands.
2455 * configure.ac: Require automake-1.11.
2456 Enable color-tests parallel-tests. Use AM_SILENT_RULES([yes])
2458 2009-06-26 Marc Fournier <marc.fournier@camptocamp.com>
2460 Yum: also read files in /etc/yum/pluginconf.d
2462 2009-06-16 David Lutterkort <lutter@redhat.com>
2464 Inittab: clean up formatting some
2466 2009-06-16 Matt Palmer <matt@anchor.net.au>
2468 Inittab: simplified schema, map comments
2469 Change the structure of the inittab lens so that the 'id' field is used
2470 as the name of the subtree for that line in /etc/inittab.
2472 Map comments as '#comment' nodes
2474 2009-06-16 David Lutterkort <lutter@redhat.com>
2476 augtool: add --echo option
2477 * src/augtool.c: add --echo option to print commands when reading
2478 from a file via stdin
2479 * man/augtool.pod: document --echo option
2480 * man/augtool.1: regenerated
2482 2009-06-15 Jim Meyering <meyering@redhat.com>
2484 build: fix "make distcheck" failure
2485 * src/Makefile.am (EXTRA_DIST): Add fa_sym.version.
2487 2009-06-12 Anders F Bjorklund <afb@users.sourceforge.net>
2489 * tests/augtest: convert darwin's double slashes to single slash
2491 * test-test-preserve.sh: work with BSD ls, as well as GNU ls
2492 Needed to make the test pass on OS/X
2494 2009-06-11 David Lutterkort <lutter@redhat.com>
2496 libfa: use linker script to only export public symbols
2497 libfa was exporting all kinds of symbols that were meant to be internal;
2498 now it only exports what's in fa.h
2500 2009-06-11 Anders F Björklund <afb@users.sourceforge.net>
2502 configure: do not use version script if the linker doesn't support it
2503 That is the case on OS X
2505 Fixes part of ticket #66
2507 configuration: check whether rl_completion_matches is available
2508 That function is missing on OS/X; we substitute it with a dummy if readline
2509 does not provide it.
2511 Fixes part of ticket #66
2513 * src/augtool.c: add missing include for ctype.h
2514 Part of fix for ticket #66
2516 2009-06-09 David Lutterkort <lutter@redhat.com>
2520 * tests/test-put-symlink.sh: fix broken test
2521 - use lenses in ../lenses
2522 - fix typo: HOSTS_AUGSAVE, not HOSTS_AGSAVE
2524 * bootstrap: use getline module from gnulib
2526 * src/augtool.c: initialize 'line' to NULL
2528 2009-06-05 David Lutterkort <lutter@redhat.com>
2530 Logrotate (hooks): simplify to speed up typechecker
2532 Logrotate: make newline at end of script optional
2534 * src/put.c (put_store): escape regexp before printing
2536 * src/pathx.c: coerce the operands of 'and'/'or' to boolean
2539 * src/lexer.l: allow empty regexps
2542 Dnsmasq: process files in /etc/dnsmasq.d/*
2543 Fixes bug #65 reported by abnormaliti
2545 2009-06-01 David Lutterkort <lutter@redhat.com>
2547 * src/augtool.c: allow comments starting with '#'
2549 2009-05-29 David Lutterkort <lutter@redhat.com>
2551 Whitespace cleanup (no functional change)
2552 Remove trailing whitespace
2554 Ntp: support more commands
2555 * process 'broadcastdelay'
2556 * process enable/disable flags
2559 Minor amount of code cleanup
2561 Fixes bug #62, reported by Frank Sweetser
2563 Fix grammar docs (production for PrimaryExpr was wrong)
2565 * tests/root/etc/: add group and passwd files
2567 2009-05-28 Matt Palmer <matt@anchor.net.au>
2569 Interfaces: various bug fixes
2570 * disallow end-of-line comments
2571 * support generic allow-* stanzas
2573 Interfaces: accept options containing '_'
2574 Bug reported by Jonas Eriksson
2576 2009-05-28 David Lutterkort <lutter@redhat.com>
2578 * tests/grub-rm-entry.rb: 'savedefault' indented by '\t', not ''
2580 2009-05-14 David Lutterkort <lutter@redhat.com>
2582 Modprobe: handle comments at the end of a line
2584 2009-04-13 David Lutterkort <lutter@redhat.com>
2586 Grub: allow optional argument for savedefault command
2588 Grub: parse arguments to chainloader command
2590 Grub: parse arguments for terminal command
2592 Grub: parse individual arguments for serial command
2594 Grub: parse kernel and module arguments
2596 Grub: simplify comment_re to speed up typecheck
2598 2009-04-13 Raphael Pinson <raphink@gmail.com>
2600 Cron: add a "time" node
2602 2009-04-13 David Lutterkort <lutter@redhat.com>
2604 * src/augeas.h: improve some comments
2606 2009-04-09 David Lutterkort <lutter@redhat.com>
2608 * src/augparse.c: add --notypecheck option
2610 2009-04-08 Raphael Pinson <raphink@gmail.com>
2612 Pbuilder: lens and tests for Debian's personal builder
2614 Shellvars: map comments with Util.comment and Util.empty
2616 Shellvars: parse 'export' and 'unset' commands
2618 2009-04-08 David Lutterkort <lutter@redhat.com>
2620 Add Cron to the dosumentation menu
2622 2009-04-08 Raphael Pinson <raphink@gmail.com>
2624 Cron: new lens and test
2625 Parses /etc/crontab and /etc/cron.d
2627 Sudoers: allow backslashes inside sto_to_com and sto_to_com_user
2628 This patch fixes ticket #60 which reports the possible usage of
2629 backslashes in sudoers aliases (for use with e.g. Windows resources).
2631 Backslashes are now allowed only in the middle of sto_to_com and
2634 Additionally, add a line with backslashes in test_sudoers to prevent
2637 Xinetd: map comments using Util.comment
2639 Squid: allow indentation of entries
2641 2009-04-07 Raphael Pinson <raphink@gmail.com>
2643 Logrotate: allow = as a separator for value_to_eol
2644 Fix ticket #61 by allowing "=" as a valid separator in value_to_eol.
2645 "word" may not contain "=" anymore in this case. Note that this is not
2646 documented in "man logrotate" but is shipped by default in CentOS (cf
2649 2009-04-07 David Lutterkort <lutter@redhat.com>
2651 Ntp: fixes to make the default Fedora config work
2652 Now enough of ntp.conf is understood so that the config from Fedora 10 with
2653 all directives uncommented can be processed.
2655 2009-04-07 Raphael Pinson <raphink@gmail.com>
2657 Ntp: add fudge directive
2660 2009-04-07 David Lutterkort <lutter@redhat.com>
2662 * src/transform.c (transform_save): append newline to old text
2663 If we appended a newline to initially load the file, we also need to do
2664 that when we parse the file again during save.
2666 Bug reported by Michael Conigliaro <mike@conigliaro.org>
2668 2009-04-03 David Lutterkort <lutter@redhat.com>
2670 * src/augtool.c: new option --noautoload
2672 * src/augeas.h: expose flag to suppress module autoload
2673 With AUG_NO_MODL_AUTOLOAD, modules are only loaded when they are needed.
2675 * src/transform.c (filter_generate): avoid segfault if we never call glob
2677 Php: some more tests, sample php.ini in test root
2679 Rx: remove \b and \d escapes
2681 2009-04-03 Raphael Pinson <raphink@gmail.com>
2683 Modify some existing lenses to use new utility modules
2684 Changes Aliases, Exports, Fstab, Group, and Monit
2686 Also exposes comments in /etc/aliases as #comment nodes
2688 New utility modules Build, Rx, and Sep
2690 2009-04-03 Marc Fournier <marc.fournier@camptocamp.com>
2692 Php: added default path on redhat
2694 2009-04-02 Raphael Pinson <raphink@gmail.com>
2696 Use readline only when stdin is a tty, use getline otherwise
2698 2009-04-01 Marc Fournier <marc.fournier@camptocamp.com>
2700 Vsftpd: several fixes
2701 * map comments as #comment
2702 * handle empty lines
2703 * find vsftpd.conf on Fedora/RHEL
2705 2009-03-27 David Lutterkort <lutter@redhat.com>
2707 Iptables: fix ticket #51
2708 * allow more characters in chain names
2709 * allow comments mixed in with chains and rules
2711 * augeas.spec.in: fadot is not installed yet
2715 Fix build problems uncovered by distcheck
2717 * src/get.c (get_quant_star): do not leak registers
2719 Some more test files
2721 Fix uninitialized variables found by optimizer
2723 * src/hash.c (hash_free_nodes): simplify and accelerate
2724 Reduces time to typecheck grub.aug from 9.8s to 8.5s on my machine.
2726 * src/hash.c: mark some asserts as expensive
2728 * tests/root/etc/krb5.conf: simple example file
2730 Krb5: lens and tests for /etc/krb5.conf
2732 2009-03-25 Raphael Pinson <raphink@gmail.com>
2734 Grub: add support for Debian's update-grub (ticket #50)
2735 Bug reported by Micah Anderson
2737 2009-03-25 David Lutterkort <lutter@redhat.com>
2739 * src/fa.c (fa_ambig_example): use heuristic for fast checking
2740 This avoids a lot of intersections in the Augeas typechecker, and speeds
2741 typechecking up by between 5% and 20%, depending on the lens.
2743 Thanks to Nate Foster for the inspiration of this
2745 Sudoers: produce at most one negate node
2746 Even if there are multiple '!' signs, only produce one negate node.
2748 2009-03-25 Raphael Pinson <raphink@gmail.com>
2750 Sudoers: fix ticket #48
2751 * make a difference between boolean and non boolean values for integers and
2753 * allow multiple negate flags (odd/even numbers change the behaviour)
2754 * add optional double quotes to integer and string field
2756 Bug reported by Frank Sweetser
2758 2009-03-25 David Lutterkort <lutter@redhat.com>
2760 * src/augtool.c: make second argument for 'set' optional
2761 This makes it possible to set a tree node's value to the empty string
2767 2009-03-24 David Lutterkort <lutter@redhat.com>
2769 * src/augeas.c (aug_init): make it easier to override distributed lenses
2770 Make the default load path
2772 $(datadir)/augeas/lenses:$(datadir)/augeas/lenses/dist
2774 and instal the lenses we distribute into the dist/ subdir. That makes it
2775 easy for other packages to override lenses we ship: when they are installed
2776 into $(datadir)/augeas/lenses, they are automatically preferred over the
2779 New API call aug_defnode and augtool command defnode
2780 It's common that we want to define a variable to reference /foo/bar, and
2781 create that node if it does not exist yet. aug_defnode bundles that
2782 together into one convenient call.
2784 * src/pathx.c (eval_filter): correctly hande realloc of value_pool
2786 * src/pathx.c (expand_tree): ensure we start with a nonempty lp_trace
2788 * src/augtool.c: new 'defvar' command
2790 Add variables for path expressions
2791 The new API call aug_defvar allows defining variables that can later be
2792 used in path expressions.
2794 2009-03-22 David Lutterkort <lutter@redhat.com>
2796 Add FilterExpr to path expression grammar
2797 This allows using constructs like $foo/some/path and $foo[2]
2799 * src/augeas.c (parse_user_pathx): new parameter need_nodeset
2801 * src/pathx.c (pathx_parse): new parameter need_nodeset
2803 * src/pathx.c (ns_filter): new function
2805 * src/pathx.c: rename E_LOCPATH to E_FILTER
2807 * src/pathx.c (clone_value): new function
2809 2009-03-21 David Lutterkort <lutter@redhat.com>
2811 * src/pathx.c (release_value): factor logic into separate function
2813 * src/pathx.c: remove assumption that toplevel expression is a locpath
2814 We can't assume that anymore when we have variables. That requires some
2815 headache for pathx_expand_tree, since that needs a full trace of evaluating
2816 a locpath against the tree.
2818 * src/pathx.c (pathx_eval): factor eval into a function
2820 * examples/fadot: remove, checked in by mistake
2822 2009-03-20 David Lutterkort <lutter@redhat.com>
2824 * .gitignore: ignore examples/fadot
2826 * src/get.c: rename 'Short iteration' to a more helpful message
2828 * src/transform.c (store_error): report which lens failed
2830 * src/transform.c (store_error): ignore errors from err_set
2832 * src/transform.c (store_error): calculate line number/ofs for error
2834 * src/transform.c (err_set): new function
2836 2009-03-20 Francis Giraldeau <francis.giraldeau@revolutionlinux.com>
2838 * examples/fadot.c: tool to generate dot graphs of FA's
2839 The fadot tool produces dot graphs of finite automata, and allows certain
2840 operations on FA's from the command line, like intersection and complement
2843 2009-03-19 David Lutterkort <lutter@redhat.com>
2845 * src/pathx.c: call make_value before pop_value
2846 Since make_value might realloc, pointers retrieved with pop_value may
2847 become invalid across make_value calls.
2849 * src/augeas.c: remove some internal uses of pathx_parse
2851 * src/augeas.c: create various /augeas nodes when they go missing
2853 * src/put.c (create_concat): fix goofy error message
2855 Update and refresh man pages
2857 * src/augtool.c: add --noload option
2859 Validate trees representing a transform before using them
2861 * tests/test-load.c: new test for aug_load
2863 * src/augeas.h (aug_init): make loading the tree optional
2864 The new flag AUG_NO_LOAD can be used to keep aug_init from loading any
2865 files. This gives the user a chance to modify /augeas/load and then call
2868 * src/augtool.c: new 'load' command
2870 * src/augeas.h (aug_load): new public function
2872 * src/transform.h: use tree encoded transforms
2874 * src/lens.c (lens_release): allow NULL lens to be passed in
2876 * src/syntax.h (lens_lookup): new function
2878 * src/augeas.c: report transforms under /augeas/load
2880 Rename AUG_NO_DEFAULT_LOAD to AUG_NO_MODL_AUTOLOAD
2882 Limits (filter): no need to exclude anything
2884 2009-03-19 Raphael Pinson <raphink@gmail.com>
2886 Limits: map domain into the value of domain node (schema change)
2887 Mapping the domain as the label of a node leads to difficulties since '*'
2888 is a valid domain name.
2890 Problem reported by Mark Drayton (ticket #47)
2892 2009-03-19 David Lutterkort <lutter@redhat.com>
2894 Lokkit: new lens and test
2896 2009-03-17 David Lutterkort <lutter@redhat.com>
2898 Iptables: new lens and test
2899 A fairly basic parse of the iptables config file. It should accept any
2900 legal iptables config file; what makes it basic is that it doesn't break
2901 some of the values down as fine-grained as I would like to have them
2903 2009-03-13 David Lutterkort <lutter@redhat.com>
2905 * configure.ac: bump major version of libfa
2907 * src/fa.h (fa_as_regexp): cleaner prototype
2909 * src/fa.h (fa_ambig_example): cleaner prototype
2911 * src/fa.h (fa_example): cleaner prototype
2913 * src/fa.h (fa_compile): pass in size of regexp
2915 * src/fa.h: use 'struct fa *' instead of fa_t
2917 * src/augeas.c: fix handling of dirty flag
2918 Under some circumstances, we did not properly propagate the dirty flag up
2919 the tree, leading to files that were not saved even though they should have
2922 This also removes two full sweeps over the tree for dirty handling, and now
2923 only touches nodes that are/need to be marked dirty.
2925 * Makefile.maint: different setup at home
2927 2009-03-12 David Lutterkort <lutter@redhat.com>
2929 * src/transform.c (transform_save): properly sync data to disk
2930 Make sure the data we write into the .augnew file hits the disk before
2931 renaming to the proper name
2933 Modprobe: lens and tests for modprobe.conf
2935 * src/fa.c (re_cset_as_string): turn '[^\n]' into '.'
2937 Place Sudoers and Util under LGPLv2+
2938 Raphael Pinson agreed to changing the license for these to LGPLv2+ like the
2941 2009-03-09 David Lutterkort <lutter@redhat.com>
2945 Logrotate: process 'minsize 1M' rule
2946 logrotate allows unit suffixes 'k', 'M' and 'G' for 'size' and 'minsize'
2948 Squid: add squid.conf from Fedora 11 rawhide
2950 * src/builtin.c: new builtins Sys.getenv and Sys.read_file
2952 * src/syntax.h (dup_string): duplicate a string
2954 * src/internal.h (xstrerror): new function
2956 2009-03-09 Francois Deppierraz <francois.deppierraz@camptocamp.com>
2958 Test the Debian Lenny sample squid.conf
2960 Add a bunch of keywords available on squid-2.7-STABLE6 or squid-3.HEAD-20090308.
2961 The keywords list was generated by the following command:
2963 fgrep TAG squid-2.7.STABLE6/src/squid.conf.default | awk '{ print " | \""$3"\"" }' | sort > /tmp/squid2.7
2965 fgrep TAG squid-3.HEAD-20090308/src/squid.conf.documented | awk '{ print " | \""$3"\"" }' | sort > /tmp/squid3-HEAD
2967 cat /tmp/squid2.7 /tmp/squid3-HEAD | sort | uniq
2969 2009-03-08 David Lutterkort <lutter@redhat.com>
2971 * tests/xpath.tests: Hosts lens puts comments into #comment nodes
2973 * augeas.spec.in: BR for libselinux-devel (bug #26)
2974 Without the BR, the Fedora and EPEL builds are done without SELinux
2975 support, resulting in a binary that does not preserve SELinux contexts
2977 2009-03-06 David Lutterkort <lutter@redhat.com>
2979 Sshd: map comments as '#comment' nodes
2981 Change the label for comment nodes to '#comment'
2983 Do not delete files that had an error upon parsing
2984 When we can't read a file, we create an entry for it under /augeas, but
2985 there won't be anything for it under /files. That looks a lot like a file
2986 whose entire subtree was deleted; but since we failed reading the file, we
2987 should not delete it either.
2989 * src/augeas.c (aug_init): always create /files
2991 Sshd: add test showing how to add a Subsystem
2993 2009-03-03 David Lutterkort <lutter@redhat.com>
2995 * Makefile.maint: add autogen target
2997 * src/pathx.c (eval_rel): for numbers, '<' and '<=' were reversed
2999 Postfix_main: handle continuation lines
3001 * src/pathx.c: fix some comments
3003 2009-03-02 David Lutterkort <lutter@redhat.com>
3007 * configure.ac: make default warning level 'maximum'
3008 Using 'error' here is too unfriendly on weird platforms, since builds can
3009 fail, e.g. because of broken system headers. When doing actual development,
3010 set this to 'error'.
3012 * src/pathx.c: function label() returning the label of the ctx node
3014 * src/pathx.c: make sure ['foo' != 'foo'] is false
3016 * src/pathx.c: handle names with '.' properly
3017 Make sure that a component ina path expression like '.bar' is parsed as a
3018 single step (name), and not as the self axis '.' followed by some
3021 Bug reported by Jan Kupec
3023 * src/pathx.c: it is an error if we don't consume the whole expression
3025 2009-02-27 David Lutterkort <lutter@redhat.com>
3027 * tests/test-event-saved.sh: make sure fuiles are writable by owner
3029 2009-02-25 David Lutterkort <lutter@redhat.com>
3031 Plug a few memory leaks
3033 Remove files whose tree under /files was deleted
3034 When doing rm /files/etc/hosts, we now delete the file /etc/hosts
3037 Move path formatting functions around
3038 Move path_expand and format_path to internal.c
3039 Rename format_path to path_of_tree
3041 * src/augeas.c (tree_find): helper for getting a tree node
3043 2009-02-24 David Lutterkort <lutter@redhat.com>
3045 * src/augeas.c: erase /augeas/events/saved only once
3046 tree_save is called recursively; /augeas/events/saved must be reset
3047 in aug_save, not tree_save
3049 Record saved files in transform_save, not tree_save
3051 * src/augeas.c (tree_unlink): remove and free a subtree
3053 * src/transform.h: move transform decls out of syntax.h
3055 Util.stdexcl: exclude .augsave and .augnew files
3057 2009-02-20 David Lutterkort <lutter@redhat.com>
3059 * src/lexer.l: correct location info for strings and regexps
3061 * src/get.c: check for valid match before calling token()
3063 2009-02-19 David Lutterkort <lutter@redhat.com>
3065 * src/parser.y: do not allow epsilon as a tree constant
3066 This grammar mistake made epsilon a valid expression
3068 * src/fa.c: cache hash values in the state
3069 This gives about a 15% performance improvement in typechecking
3072 2009-02-18 David Lutterkort <lutter@redhat.com>
3074 * src/pathx.c: allow '(' Expr ')'
3076 * src/pathx.c: add 'and' and 'or' operators
3078 * src/pathx.c: add relational expressions '>', '<', '>=', '<='
3080 * src/pathx.c: add count() function
3082 * src/pathx.c (parse_name): do not allow ')' in names
3083 Names can not contain ')', otherwise we will run beyond the end of
3084 arguments in a function call like 'f(name)'
3086 * src/pathx.c: add position() function
3088 * src/pathx.c: allow '=' and '!=' of numbers
3090 * src/pathx.c: fix matching multiple predicates
3091 We used to evaluate /path[pred1][last()] wrong - last() must match the last
3092 node in the nodeset /path[pred1], not the last node in the nodeset /path.
3094 This requires that we compute nodesets explicitly.
3096 Logrotate: small fixes
3097 * recognize 'yearly' schedule
3098 * allow whitespaces around { and }
3100 2009-02-17 David Lutterkort <lutter@redhat.com>
3102 * src/get.c: speed up initial match
3103 Avoid matching the entire input string, since it can be _very_ slow.
3104 Since it is very common that the toplevel lens is (l)*, optimize for
3107 * src/get.c: reduce the number of calls to regexp_match
3108 Only call the regexp matcher at the very beginning of get/parse, and once
3109 for every match inside an iteration. Use re_registers to keep track of the
3110 substrings being worked on in favor of 'struct split'
3112 Always do REGS_REALLOCATE for regexp match registers
3114 * src/regexp.c: clean up syntax options
3116 * src/put.c: remove outdated debug msgs and comments
3118 * src/internal.h: Remove bogus DEBUG define
3121 These enhancements are needed to make the Ntp.lns process the default
3122 /etc/ntp.conf on Fedora
3124 2009-02-16 David Lutterkort <lutter@redhat.com>
3126 * src/syntax.c: print tests results in the same form we read them
3128 2009-02-13 David Lutterkort <lutter@redhat.com>
3130 Allow passing NULL regexps in some regexp routines
3132 2009-02-13 Raphael Pinson <raphink@gmail.com>
3134 Xorg: new lens and tests
3136 2009-02-11 David Lutterkort <lutter@redhat.com>
3138 Test that an invalid regexp makes module loading fail
3140 Services: various small fixes to process Fedora's /etc/services
3142 * tests/test-get.sh: print all error info on failure
3144 Better error mesages when re match fails during get/put
3146 * src/lens.c: throw exception on regexp syntax errors
3148 * src/fa.c: test for invalid ranges like [z-a]
3150 2009-02-11 Raphael Pinson <raphink@gmail.com>
3152 Lens and test for /etc/services
3154 2009-02-11 David Lutterkort <lutter@redhat.com>
3156 * src/augtool.c (cmd_match): check return from aug_match more defensively
3158 2009-02-06 David Lutterkort <lutter@redhat.com>
3162 Use printf instead of 'echo -e' in tests
3163 Printf is more portable
3165 Fix compilation on OpenSolaris
3166 * src/pathx.c (position): assert not marked as noreturn
3168 * tests/test-xpath.c (run_one_test): allow results in arbitrary order. Files on Fedora and Debian are enumerated in different order, leading to spurious test failures
3170 * src/pathx.c: remove the value() function, it's redundant with '.'
3172 * pathx.c: when comparing strings consider NULL == ""
3174 Change how names are parsed in path expressions
3175 Names can not contain any of the characters [][=/ \t\n] - to include
3176 them in a name, they need to be escaped with a '\', so that 'foo\=bar'
3177 matches a node with literal label 'foo=bar'.
3179 * tests/grub-rm-entry.rb: fix test failure
3181 * tests/augtest: do not typecheck everything
3182 The typecheck is redundant (we already do that when running lens tests) and
3185 Grub: process 'savedefault' in boot stanza
3186 Also, allow keywords to be preceded by whitespace
3190 Minor whitespace cleanup
3192 2009-02-02 Free Ekanayaka <free@64studio.com>
3194 Lens and tests for DarkIce
3195 See http://darkice.tyrell.hu/
3197 2009-02-01 David Lutterkort <lutter@redhat.com>
3199 * src/augeas.c: use ALLOC instead of CALLOC
3201 * augeas.c (aug_init): check an allocation failure
3203 * src/internal.c (escape, unescape): check allocation failures
3205 * src/pathx.c (free_state): allow NULL state
3207 * src/augeas.c (init_root): check for failure of strdup
3209 2009-01-30 David Lutterkort <lutter@redhat.com>
3211 * src/pathx.c: factor test if a step matches into step_matches
3212 This also fixes a problem matching, test also included
3214 * src/pathx.c: use bool for boolean values
3216 Build changes so that 'make' on Opensolaris 5.11 works
3217 The tests ('make check') still fail, because of trouble with
3218 some of the shell scripts
3220 * src/transform.c: use POSIX conform FNM_PATHNAME, nut GNU alias
3222 * src/get.c: remove braindead use of alloca
3224 * tests/test-get.sh: use new descendant syntax to find errors
3226 Remove unneeded call to pathx_parse in aug_match
3228 Introduce parse_user_pathx to report errors
3229 If user-supplied path expressions have errors, report them in
3232 Move parsing of path expressions into public API methods
3233 For path expressions that are passed through the API, we need to report
3234 errors. This change lays the groundwork, so that we can distinguish between
3235 parsing user-supplied path expressions and internally generated path
3238 Rename aug_tree_replace to tree_replace
3239 We reserve the aug_ prefix for public functions. There is also no need to
3240 pass struct augeas here, a tree root is enough.
3242 More xpath tests; allow ... in tests
3244 Simplify internal API's
3245 * pass origin, not root to pathx_parse
3246 * pathx_next does not need an explicit argument for the current
3249 Expand the grammar for path expressions
3250 * add predicates based on labels and values
3251 * allow path expressions in predicates, e.g. '/foo/bar[../baz = "7"]'
3252 * add explicit axes and some abbreviations thereof
3254 This requires a rewrite of the interpreter of path expressions; the
3255 interpreter is now based on a more explicit representation of the abstract
3256 syntax of the path expression and is statically type checked.
3258 Also add tests to check path expression evaluation
3260 Use absolute paths in lens tests when manipulating the tree
3261 Paths that start with a number (like '1/ipaddr') are ambiguous in the new
3262 path expression grammar and will confuse the parser; to make it clear that
3263 they are paths, and not just a number, use absolute paths.
3265 Notes on new XPath grammar
3267 Rename struct path to struct pathx
3268 Also rename path_* functions to pathx_*; rename make_pathx to pathx_parse
3269 and change its signature to allow cleaner error reporting
3271 2009-01-29 David Lutterkort <lutter@redhat.com>
3273 Grub: support color directive
3275 2009-01-26 David Lutterkort <lutter@redhat.com>
3279 2009-01-26 Dominique Dumont <dominique.dumont@hp.com>
3281 Sshd: add documentation on usage
3283 2009-01-25 David Lutterkort <lutter@redhat.com>
3285 Add indented puppet.conf to test root
3287 2009-01-22 David Lutterkort <lutter@redhat.com>
3289 Fix bug #25 - allow indented entries in puppet.conf
3290 * lenses/inifile.aug: add new indented_entry and indented_title
3292 * lenses/puppet.aug: use the indented_* lenses
3293 * lenses/tests/test_puppet.aug: test with indented entries
3295 2009-01-19 David Lutterkort <lutter@redhat.com>
3297 Report version and legal save modes in /augeas/version
3299 2009-01-17 David Lutterkort <lutter@redhat.com>
3301 * ref.h: include limits.h, since we use UINT_MAX
3303 2009-01-16 David Lutterkort <lutter@redhat.com>
3305 Mark up code in documentation comments for Dpkg and Exports
3307 2009-01-16 Robin Lee Powell <rlpowell@digitalkingdom.org>
3309 Documentation for Exports and Dpkg
3311 2009-01-13 David Lutterkort <lutter@redhat.com>
3313 Minor changes to handling of save flag
3314 * complain if /augeas/save is missing or has an invalid value
3315 * do not clobber non-save flags when updating from /augeas/save
3318 2009-01-13 Bryan Kearney <bkearney@redhat.com>
3320 Dynamically change behavior of aug_save; add noop save mode
3321 * control behavior of aug_save through changing /augeas/save
3322 * noop mode allows checking if changes will be written, without
3323 changing file system
3325 2009-01-08 Jim Meyering <meyering@redhat.com>
3330 24 bytes in 1 blocks are definitely lost in loss record 1 of 1
3331 at 0x4021BDE: calloc (vg_replace_malloc.c:397)
3332 by 0x4029379: make_tree (augeas.c:316)
3333 by 0x403AC70: get_lens (get.c:592)
3334 by 0x403ACB6: get_lens (get.c:523)
3335 by 0x403AB4F: get_lens (get.c:474)
3336 by 0x403ACDE: get_lens (get.c:523)
3337 by 0x403AB4F: get_lens (get.c:474)
3338 by 0x403AF20: lns_get (get.c:684)
3339 by 0x4034E81: lens_get (builtin.c:124)
3340 by 0x402CDC7: native_call (syntax.c:967)
3341 by 0x402F4C9: compile_exp (syntax.c:1574)
3342 by 0x402EF17: compile_exp (syntax.c:1487)
3343 by 0x402FEEC: __aug_load_module_file (syntax.c:1600)
3344 by 0x80489AE: main (augparse.c:86)
3346 test ls output more portably in face of SELinux differences
3347 * test-preserve.sh: Use cut -b1-10 to get mode from ls -l output.
3348 Use ls -lZ (not ls -Z, which is not portable) to get SELinux context.
3350 2009-01-04 Arnaud Gomes-do-Vale <arnaud.gomes@ircam.fr>
3352 * src/Makefile.am: fix bz #478619 - do not use abspath
3354 2009-01-03 Robin Lee Powell <rlpowell@digitalkingdom.org>
3356 Dpkg: new lens and test
3358 2009-01-03 David Lutterkort <lutter@redhat.com>
3360 Php: expand filter slightly
3361 Suggested by Robin Lee Powell <rlpowell@digitalkingdom.org>
3363 2008-12-29 David Lutterkort <lutter@redhat.com>
3365 Fix segfault when branch in a union does not have a ktype
3366 * src/lens.c (lns_key_regexp): check for NULL ktype of branch
3367 * tests/modules/pass_union_nokey.aug: test the fix
3369 Bug reported by Robin Lee Powell <rlpowell@digitalkingdom.org>
3371 2008-12-27 Free Ekanayaka <free@64studio.com>
3373 Add soma lens and test
3375 Add limits lens and test
3377 2008-12-24 David Lutterkort <lutter@redhat.com>
3379 * autogen.sh: remove bogus argument to configure
3381 2008-12-24 Marc Fournier <marc.fournier@camptocamp.com>
3383 Php, Gdm: exclude literal ".anon" from title, not regexp /.anon/
3385 2008-12-24 Free Ekanayaka <free@64studio.com>
3387 Phpvars: allow whitespaces before the \n in the <?php head line
3389 2008-12-23 David Lutterkort <lutter@redhat.com>
3393 * transform.c (transfer_file_attrs): ignore SELinux failures if filesystem does not support extended attributes
3395 * transform.c (clone_file): fix #32; only copy if /augeas/save/copy_if_rename_fails exists
3397 Group: split list of users, make it optional
3398 The list of users in a group is now split into individual 'user/'
3399 nodes. If a group has no members, no user/ nodes are produced.
3401 2008-12-23 Free Ekanayaka <free@64studio.com>
3403 Add lens and test for /etc/group
3405 2008-12-23 David Lutterkort <lutter@redhat.com>
3407 Simpler interface and implementation for path_find_one
3409 Add path_expand_tree
3410 Instead of calling path_find_one/tree_create
3412 Move implementation dealing with path expressions into separate file
3414 Simplify searching in the tree by using parent pointers
3415 Segments do not need to track the tree node where they matched anymore,
3416 since we can get the same information by following parent pointers.
3418 Make finding the parent and siblings of a node uniform
3419 All nodes (including the root) now have a parent node, so
3420 that the start of the list of siblings can be found as
3421 tree->parent->children for any node.
3423 All 'standalone' trees now have a fake root, called 'origin' whose
3424 children are the real root nodes. Another way to look at this is
3425 that the tree is now edge-labeled.
3427 Rename seg_siblings to tree_siblings
3429 Add an explicit parent pointer to the tree
3431 2008-12-23 Free Ekanayaka <free@64studio.com>
3433 Lens and test for config files using PHP-style variables
3434 Process /etc/squirrelmail/config.php
3436 2008-12-23 Marc Fournier <marc.fournier@camptocamp.com>
3438 New lens and tests for /etc/rsyncd.conf
3439 rsyncd.conf is an ini file which allows indented
3440 parameters (like smb.conf) as well as entries outside
3441 any section (like php.ini).
3443 2008-12-23 David Lutterkort <lutter@redhat.com>
3445 * fa.c: mark '.' as a special character that needs to be escaped
3447 2008-12-22 David Lutterkort <lutter@redhat.com>
3449 Notes on the expanded XPath notation
3451 2008-12-22 Free Ekanayaka <free@64studio.com>
3453 Add lens and test for /etc/passwd
3455 Shellvars: process two more files on Debian
3456 Add /etc/arno-iptables-firewall/debconf.cfg and /etc/cron-apt/config
3458 Add lenses and tests for postfix's main.cf and master.cf
3460 Squid: new lens for squid.conf
3464 2008-12-16 David Lutterkort <lutter@redhat.com>
3466 Shellvars: load /etc/sysconfig/sendmail
3468 2008-12-03 David Lutterkort <lutter@redhat.com>
3470 Xinetd: make sure equal sign is surrounded by spaces
3473 * lenses/xinetd.aug: make sure new equal signs have a space before
3474 and after them; indent attributes with a tab by default
3475 * lenses/tests/test_xinetd.aug: add test
3477 2008-11-20 David Lutterkort <lutter@redhat.com>
3479 Sshd: change the structure of Condition subtrees
3480 The conditions for a match block are now a single subtree, instead of
3481 one subtree per condition.
3483 2008-11-19 David Lutterkort <lutter@redhat.com>
3485 Only try to save backup file if original exists
3486 * transform.c (transform_save): check that original exists before
3489 Fix saving of files where backup/new and target are on different devices
3490 * transform.c (clone_file): new function
3491 * transform.c (transform_save): if rename fails because new/backup file
3492 and target file are on different devices, copy the files
3494 2008-11-05 David Lutterkort <lutter@redhat.com>
3496 * Makefile.maint: add target tag-release
3500 * test-preserve.sh: check that augtool -b produces a backup
3502 2008-10-30 David Lutterkort <lutter@redhat.com>
3504 Fix problem with transferring file attributes during save
3505 * src/transform.c(transform_save): transfer attributes from the original to
3506 the new file as soon as the new file is created; create a .augsave file
3507 as a hardlink, not by renaming
3508 * src/transform.c(file_replace): pull out the code to transfer attributes
3509 into new function transfer_file_attrs; rename of new file to original is
3510 now done in transform_save
3512 2008-10-24 David Lutterkort <lutter@redhat.com>
3516 * Makefile.maint: add upload target
3518 Modest beginnings of a maiintainer Makefile
3519 * Makefile.maint: new file
3521 Undo API breakage introduced in commit 48c285c
3522 * src/augeas.c (aug_save): return 0 on success, instead of the number of
3524 * src/augtool.c (cmd_save): get the number of files changed from aug_match
3526 build: use LIB_SELINUX as set by gnulib
3527 * configure.ac: do not set up LIB_SELINUX, gnulib does that
3529 2008-10-22 Sylvain Baubeau <bob@glumol.com>
3531 Grub: support "rootnoverify" and "chainloader" directives
3533 2008-10-21 David Lutterkort <lutter@redhat.com>
3537 test-preserve.sh: do not check SELinux context on non-SELinux systems
3539 test-events-saved.sh: sort the list of saved files
3541 aug_save: report saved files in /augeas/events/saved
3542 aug_save now reports which files were changed on disk underneath
3543 /augeas/events/saved; if multiple files are changed in one save operation,
3544 there will be multiple /augeas/events/saved entries in the tree. The value
3545 of each is the path to the file prefixed with /files.
3547 Generate ChangeLog from git history
3549 file_replace: preserve SELinux context
3550 Copy the SELinux context from the existing file.
3552 transform_save: preserve file owner/group and mode when saving
3553 Take the file owner/group and mode from the existing file and set it on the
3554 newly created file during save. When a file is created from scratch, we
3555 still create the file with whatever default user/group/mode the current
3558 2008-10-20 David Lutterkort <lutter@redhat.com>
3560 aug_save: report the number of files that were changed
3561 When the tree is saved, keep track of the number of files that were
3562 actually changed and return that number.
3564 transform_save: make saving idempotent
3565 When a file needs to be saved, its contents are first generated in a temp
3566 file which is then moved over the original file. Between generating the
3567 temp file and moving it in its final place, read its contents back in and
3568 compare with the contents of the original file. Only move the tempfile over
3569 the original if the contents do indeed differ. This avoids spurious changes
3574 2008-10-16 Jim Meyering <jim@meyering.net>
3576 Include <config.h> early, so its _GNU_SOURCE definition takes effect.
3577 * src/lexer.l (%top{...}): Include <config.h> here, not in %{...}.
3578 Otherwise, the flex-emitted inclusion of <string.h> would
3579 precede the definition of _GNU_SOURCE, rendering it useless.
3580 This also avoids warnings about strndup being undeclared.
3581 Don't include <string.h> explicitly, since flex already does that.
3583 2008-10-13 Joel Nimety <jnimety@perimeterusa.com>
3585 Grub: add support for password directive
3587 2008-10-06 Free Ekanayaka <free@64studio.com>
3589 Samba: Change default indentation and separation
3590 Match indentation of the example configuration file shipped by the upstream
3593 Add gdm lens and associated test
3595 2008-10-02 David Lutterkort <lutter@redhat.com>
3597 Ignore files based on .hgignore
3599 2008-10-01 David Lutterkort <lutter@redhat.com>
3601 Complain when nodes in the tree can not be put
3602 When nodes are added to the tree that do not match the appropriate
3603 key/label lens, we used to silently drop them if the key/label was inside a
3604 repetition inside a concat.
3606 Now, we check when we split the tree for a concat that we have used all the
3607 nodes in the tree that we were supposed to, and complain otherwise.
3609 This also uncovered that the test rec-hosts-add.rb was broken, but still
3612 2008-10-01 David Lutterkort <dlutter@redhat.com>
3614 Pass --nostdinc properly when running under gdb
3616 Logrotate: parse tabooext into list; add processing of a number of options
3617 Patch by Sean E. Millichamp
3619 2008-09-22 David Lutterkort <dlutter@redhat.com>
3621 Grub: add support for 'serial' and 'terminal'
3622 Patch by Sean E. Millichamp
3624 Add backlinks to main site
3628 Logrotate: add dateext flag
3629 Patch by Sean E. Millichamp
3631 Various changes to the NaturalDocs support
3632 This patch changes a few things around in the NaturalDocs support:
3634 - There is no explicit --with-naturaldocs option anymore; instead,
3635 configure.ac looks for a program that's either called 'naturaldocs' or
3636 'NaturalDocs' and enables support for doc generation depending on whether
3637 that program is found or not.
3639 This works in any of the following situations:
3640 (1) NaturalDocs is installed from an RPM, and therefore on the default
3641 PATH, with its Perl modules installed on the standard Perl library
3643 (2) NaturalDocs is installed in a random directory, and both PATH and
3644 PERL5LIB are set accordingly
3645 (3) A wrapper script that sets the path is on PATH
3647 - Various fixes to make 'make distcheck' work
3649 2008-09-12 David Lutterkort <dlutter@redhat.com>
3651 Properly include test modules
3653 2008-09-11 Raphael Pinson <raphink@gmail.com>
3655 Add naturaldocs support Build pdf docs
3657 2008-09-09 Raphael Pinson <raphink@gmail.com>
3659 Adapt comments for NaturalDocs parsing
3661 Add comments for NaturalDocs parsing
3663 Add comments for NaturalDocs parsing
3665 Add comments for NaturalDocs parsing Reorganize a bit
3667 Adapt sudoers.aug for NaturalDocs parsing
3669 Adapt augeas.h for NaturalDocs parsing
3671 2008-09-08 David Lutterkort <dlutter@redhat.com>
3673 Sshd: better handling of match blocks
3674 Split match conditions into individual 'Condition' entries. Store the
3675 settings for a match block inside 'Settings' entries.
3677 2008-09-08 Free Ekanayaka <free@64studio.com>
3679 Add monit lens and test
3681 2008-09-06 Free Ekanayaka <free@64studio.com>
3683 Ldap: merge with Spacevars. Spacevars: process havp.config
3684 Adapt Test_ldap, since there is no Ldap.lns anymore
3686 2008-09-08 David Lutterkort <dlutter@redhat.com>
3688 Use --nostdinc in tests
3689 We never want to use installed lenses in the tests; they should only be
3690 read from the directories that are specified explicitly
3692 augtool, augparse: add --nostdinc option
3694 augtool, augparse: allow long options
3696 2008-09-06 Free Ekanayaka <free@64studio.com>
3698 Shellvars: merge Sysconfig, Ifcfg; support /etc/default
3699 Merge Sysconfig and Ifcfg into Shellvars
3701 Add /etc/default/* to the list of supported configuration files
3703 2008-09-05 David Lutterkort <dlutter@redhat.com>
3705 transform: append missing newlines
3706 If a file does not end with a newline, append one automatically. Most
3707 lenses require that a file ends with a newline, and files that are missing
3708 them are quite common.
3710 Shellvars: use Util.eol for eol
3712 test/modules: only distribute .aug files
3714 Shellvars: handle space at the end of a line
3716 2008-09-04 David Lutterkort <dlutter@redhat.com>
3718 Added tag release-0.3.1 for changeset 803c17b1833a
3722 Sysctl: lens for sysctl.conf
3723 Contributed by Sean Millichamp
3725 2008-09-04 Free Ekanayaka <free@64studio.com>
3727 Add lens and test for dnsmasq.conf
3729 2008-09-02 Free Ekanayaka <free@64studio.com>
3731 Add slapd.aug and test modules
3733 Spacevars: Allow passing the entry keyword as a parameter
3734 Modify Ldap.lns and Test_spacevars accordingly
3736 2008-08-30 Free Ekanayaka <free@64studio.com>
3738 Add samba.aug and associated test
3740 2008-08-27 Free Ekanayaka <free@64studio.com>
3742 Inifile: support empty comments
3743 Empty comments are lines beginning with ";" or "#" but without any more text
3745 2008-08-29 Raphael Pinson <raphink@gmail.com>
3747 Map entries outside of sections inside a ".anon" section
3748 Clean regexp for entry key
3749 Remove /.anon/ from record key regexp
3750 Modify test_php.aug according to new mapping policy
3751 entry_re is standard in php.aug
3753 2008-09-03 David Lutterkort <dlutter@redhat.com>
3755 typecheck_maybe: less convoluted check for empty match
3756 There's no need to construct an FA to check if a regular expression matches
3759 Properly typecheck the '?' operator
3760 The '?' operator was completely missing a typecheck for the atype. The
3761 check must make sure that neither the ctype nor the atype match the empty
3764 To allow constructs like (store re)?, we allow the atype to match the empty
3765 word, as long as the lens inside the '?' consumes the value of the current
3766 node, since that also tells as whether to use the inner lens or not.
3768 Various existing lenses failed to typecheck after this change and have been
3769 adapted; this also fixes a bug in the Fstab.lns where existing whitespace
3770 was being replaced with a default tab. The Interfaces.lns needed a fairly
3771 invasive change, and as a consequence produces way more (too many?)
3772 anonymous tree nodes.
3774 Added tests to verify the typechecking of '?'
3776 2008-09-02 David Lutterkort <dlutter@redhat.com>
3778 Minor error message improvements
3779 - Include information about the lens that produced the error if it's
3781 - When a union during 'put' does not match, produce an error instead of
3784 2008-08-28 David Lutterkort <dlutter@redhat.com>
3786 Fix a bug with transferring skeletons
3787 It is possible for a skeleton to move from one subtree lens to another, if
3788 both use the same key; since the lenses might have different skeleton
3789 types, we need to detect this and discard the skeleton if its type does not
3790 match the lens that is used during put.
3792 skel_instance_of: fix bad check for regexp match
3793 The return value of regexp_match was interpreted incorrectly, making it
3794 seem that the skel_instance_of test should fail if we ever tried to match
3797 2008-08-27 David Lutterkort <dlutter@redhat.com>
3799 Some files for the test root
3801 A test for the del typecheck
3803 Script to run lens tests through Valgrind
3804 We don't run this as part of 'make check' since it's _very_ slow.
3806 Dhclient: change some defaults for del
3807 This is really a bug in how string literals are unescaped by the lexer, but
3808 we can sidestep the problem here.
3810 The lexer bug is https://fedorahosted.org/augeas/ticket/12
3812 2008-08-27 Free Ekanayaka <free@64studio.com>
3816 2008-08-26 Raphael Pinson <raphink@gmail.com>
3818 Add OpenVPN lens and associated test
3820 2008-08-27 Free Ekanayaka <free@64studio.com>
3822 Dput: add allowed_distributions entry
3823 See man dput.cf(5) from a recent dput version (Ubuntu/hardy or
3826 2008-08-26 David Lutterkort <dlutter@redhat.com>
3829 The builtin lens 'del RE STR' was missing a typecheck: the default string
3830 STR must match the regular expression RE, otherwise we might produce text
3831 that we cant parse back in.
3833 This patch fixes that, adds a test that the check is performed, and fixes
3834 all the places in existing lenses where a use of 'del' failed the
3837 2008-08-18 Nahum Shalman <nshalman elys com>
3839 Shellvars: fix arrays so that saving works properly * based on an IRC conversation with raphink
3841 2008-08-25 David Lutterkort <dlutter@redhat.com>
3843 Acknowledge Free Ekanayaka
3845 2008-08-25 Free Ekanayaka <free@64studio.com>
3851 2008-08-24 Free Ekanayaka <free@64studio.com>
3853 Interfaces: new lens to process Debian's /etc/network/interfaces
3855 2008-08-25 David Lutterkort <dlutter@redhat.com>
3857 Util.comment: produce #comment nodes
3859 2008-08-14 Raphael Pinson <raphink@gmail.com>
3861 Inifile: complete rewrite. Also rewrite lenses using Inifile
3862 Adapt Php, Dput, Puppet and the corresponding tests to use the new Inifile
3865 Php: allow entries outside of sections
3866 Adapt php.aug to support entries outside of sections and still map sections
3869 2008-08-15 David Lutterkort <dlutter@redhat.com>
3871 Shellvars: one more cornercase with double quoted strings
3873 Shellvars: much improved handling
3874 - handle single and double quoted strings correctly
3875 - parse arrays into a subtree
3877 Inspired by a chat and preliminary work by nahamu
3879 skel_instance_of: remove pointless check
3880 There is no point in trying to match against skel->text for a store lens
3881 since that is always NULL.
3883 Fix syntax error in test
3885 augl_error: Initialize info
3887 2008-08-14 David Lutterkort <dlutter@redhat.com>
3889 aug_mv: fix bug when moving at the root level
3890 When moving from the root level, the source node needs to be removed from
3891 aug->tree, not aug->tree->children. In addition, the list_remove macro must
3892 be passed aug->tree and not a local variable holding that value, since we
3893 might have to remove the list entry that aug->tree is pointing to.
3895 Added test in test-mv.sh to test that moving at the root level works.
3897 Module names are treated case-insensitively
3898 Before, if you had a module 'Mod' in file 'mod.aug' and requested variable
3899 'MoD.var' from another module, the interpreter would throw itself into a
3900 loop where it kept loading 'mod.aug', but never found 'MoD.var' because the
3901 comparison of module names 'MoD' and 'Mod' was case sensitive.
3903 2008-08-13 Raphael Pinson <raphink@gmail.com>
3905 Add puppet.aug and associated test
3907 test_php.aug: make a nice test for PHP
3909 Php: simplified and based on Inifile
3910 "Slightly" simplify php.aug now that the comment issue is fixed in
3913 Inifile: use #comment for comment fields
3914 Adapt test_dput.aug and test_inifile.aug
3916 Inifile: no space around seps by default
3918 Inifile: reformat inifile.aug, ignore empty comments
3919 Reformat inifile.aug :
3920 - improve readability
3921 - limit line width to 80 chars
3922 - change a few var names
3923 Ignore empty comments
3924 Adapt test_dput.aug to ignore empty comments
3926 Fstab: map comments and support empty lines
3928 Sudoers: clean up comment definition
3930 2008-08-12 David Lutterkort <dlutter@redhat.com>
3932 Hosts: handle comments at the end of a host entry
3933 Comments are put into the tree as part of that host node, i.e. will live as
3934 long as the host entry.
3936 Based on an initial patch by Kjetil Torgrim Homme <kjetilho@linpro.no>
3938 2008-08-12 Raphael Pinson <raphink@gmail.com>
3940 Pam: Use eol, indent, comment and empty from Util
3942 Util: add eol, indent, comment and empty
3944 Pam: allow comments at the end of lines and leading spaces
3946 Xinetd: better handling of whitespace
3947 - allow indented comments
3948 - allow spaces around "}" to close a service
3950 2008-08-12 David Lutterkort <dlutter@redhat.com>
3952 Exports: fix failing test
3953 Exports.lns uses Hosts.comment .. since that changed, we also need to
3956 2008-08-12 Raphael Pinson <raphink@gmail.com>
3958 Hosts: put comments into tree and better whitespace handling
3959 - allow spaces at the end of the line
3960 - allow indentation at the beginning of entries
3961 - allow indented comments
3962 - show comments as fields and ignore empty lines and empty comments
3964 Handle indentation for Sudoers
3965 Allow indentation for every field
3966 cmnd_spec: use sto_to_com_cmnd (allows spaces)
3967 Add a test with new tricky commands in spec
3969 Various small fixes for Sudoers
3970 Deal with empty comments in empty.
3971 Add "!" as a valid parameter delimiter in Defaults.
3972 Make tests a bit more interesting in test_sudoers.aug.
3974 Sudoers: fix Runas_Spec
3975 sep_cont is not mandatory after runas_spec.
3976 Remove a space after a runas_spec in the test.
3978 Sudoers: various fixes for Defaults
3979 Do not allow "Defaults.*" as user name for spec (instead of "Defaults").
3980 Simplify Defaults type from (@|:|>) into [@:>].
3981 Make a specific regexp for Defaults value to allow spaces.
3982 Add a test line in test_sudoers.aug to test a more complex Defaults line.
3984 Add sudoers lens and associated test
3986 2008-08-11 David Lutterkort <dlutter@redhat.com>
3988 Test for continuation lines
3990 Posix ERE compliant escaping
3991 Posix extended regular expressions treat a backslash outside of a character
3992 class always as an escape character, with the character sequence '\\x'
3993 being identical to 'x', even if 'x' is a special char like '['.
3995 Inside character classes, the backslash does not escape anything, and is
3996 treated as an ordianry character.
3999 http://www.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap09.html#tag_09_04
4001 2008-08-09 David Lutterkort <dlutter@redhat.com>
4003 Revamp the dict data structure
4004 Dicts were simple linked lists of key/value pairs, and appending and
4005 searching on those lists caused serious slowdown when the dicts became
4006 large, for example when writing an /etc/hosts file with > 2000 lines.
4008 Dicts are now organized as arrays that are kept sorted by the key, and
4009 lookup is done through binary search. Though this is still quadratic in
4010 theory, it behaves linearly in practice even for a very large /etc/hosts
4011 file (~ 60k lines); when keys appear in order (e.g. when they are generated
4012 by a sequence) or when all entries fall under one key, adding an entry to a
4015 Don't use registers in split_iter
4016 The data in the registers was never used, calculating it causes some
4017 overhead in the matcher.
4019 2008-08-08 David Lutterkort <dlutter@redhat.com>
4021 Eliminate unneeded calls to regexp_match in split_iter
4023 Don't call regexp_match when we know that there is no match
4024 It is common in the put direction that we try and split when we're already
4025 inside a leaf node. In that case, we know that there is no possible split,
4026 and therefore can save the trouble of calling regexp_match.
4028 Avoid O(n^2) runtime by appending to lists in constant time
4029 The data structure used to keep track of successive matches of an iterated
4030 lens, a split list, was being appended to by traversing the list for each
4031 new element. Now, we remember the last element on the list and append in
4034 The same was true in a few other places: the building of a tree and of
4035 skeletons suffered from the same problem.
4037 Dicts still have that problem - they need to be changed to hash tables to
4040 Add list_reverse and list_tail_cons
4041 list_reverse reverses a list in place. list_tail_cons appends to a list in
4042 constant time, since it is given a pointer to the tail of the list.
4044 2008-08-07 David Lutterkort <dlutter@redhat.com>
4046 Added tag release-0.3.0 for changeset 60f2a13c2528
4050 Mention the exit status
4052 Version libfa and libaugeas
4053 Use libtool's version support to properly version these two libraries. For
4054 libaugeas, we also bump the minor version, since we just added aug_mv to
4057 Check that 'put' fails when invalid tree entries are present
4058 put_quant_star and create_quant_star did not compare the part of the tree
4059 they should transform against the part of the tree they actually
4060 transformed. This lead to parts of the tree getting ignored during 'put' if
4061 the tree contained invalid nodes, and ultimately to files getting
4064 This is now checked and causes a 'Short iteration' error, avoiding file
4065 truncation. The fix also uncovered an error in the test for Aptsources.lns,
4066 where an invalid tree node was put into the tree, but did not lead to a
4069 Fixes bug https://fedorahosted.org/augeas/ticket/1
4071 Return an exit status from augtool
4072 augtool will return a non-zero exit status if any command issued
4073 failed. This is useful when piping multiple commands into augtool to check
4074 that they all succeeded.
4076 2008-07-29 David Lutterkort <dlutter@redhat.com>
4078 Fix failures on FreeBSD
4079 (1) Point augtool at the lenses in the source dir (not FreeBSD problem,
4080 happens whenever Augeas is not installed yet)
4081 (2) Remove bashism 'echo $"..."' with 'echo -e "..."'
4085 2008-07-29 Raphael Pinson <raphink@gmail.com>
4087 Use regexp union instead of lens union in php.aug
4088 Using a union of regexps is much faster than a union of lenses, since the
4089 regular expressions that are constructed internally are much simpler.
4091 2008-07-25 Raphael Pinson <raphink@gmail.com>
4093 Fix php.aug now that inifile.aug supports spaces in values
4095 Add PHP module and associated (basic) test file
4097 2008-07-29 Raphael Pinson <raphink@gmail.com>
4099 Use regexp union instead of lens union in dput.aug
4100 Using a union of regexps is much faster than a union of lenses, since the
4101 regular expressions that are constructed internally are much simpler.
4103 2008-07-25 Raphael Pinson <raphink@gmail.com>
4105 Rewrite dput.aug using inifile.aug Add a few keywords from man dput.cf Fix test file after rewrite
4107 Allow spaces in entry values
4109 Allow spaces in titles
4111 Fix empty comments in INI file
4113 2008-07-29 David Lutterkort <dlutter@redhat.com>
4115 Include canonicalize.h
4116 On non-glibc systems, we need to make sure canonicalize_file_name is
4117 declared from gnulib.
4119 Fail the whole test if one of the lens tests fails
4121 2008-07-28 David Lutterkort <dlutter@redhat.com>
4123 Add a call to move a subtree to the public API
4125 2008-07-26 David Lutterkort <dlutter@redhat.com>
4127 Refactor tree_create
4129 Don't run the typechecker by default from try
4131 2008-07-24 David Lutterkort <dlutter@redhat.com>
4133 Flatten the tree of lenses
4134 For union and concat, we used to store multiple unions/concats in a binary
4135 tree. Now, the tree is flattened and a string of concats is stored as one
4138 Allow a key and store in each branch of a union
4140 lns_key_regexp: store does not do anything about the key
4141 We used to generate tree nodes with a NULL label for a STORE, but that is
4142 no longer the case, and therefore the STORE lens should not produce any key
4145 Correctly handle saving to nonexistant files
4148 When encountering system errors while reading or writing a file, extract
4149 the full error message corresponding to errno and store it in error/message
4151 2008-07-23 Raphael Pinson <raphink@gmail.com>
4153 Add AptPreferences module and associated test
4155 Add bbhosts module and associated test
4157 Add ntp module and associated test
4159 Add logrotate and associated test
4161 Add support for end of line comments in entry* Add new entry* lenses for comments_nosharp Make more generic entry and comment lenses Update test_inifile.aug to test end of line comments
4163 Add inifile generic module and associated test module
4165 2008-07-22 David Lutterkort <dlutter@redhat.com>
4167 Fix segfault when running 'augtool print'
4169 2008-07-21 David Lutterkort <dlutter@redhat.com>
4171 Canonicalize file names before writing
4172 We used to clobber symlinks because writing a file consists of writing to
4173 an intermediate .augnew file, and then moving that over the target file. To
4174 keep target files that are symlinks intact, we now canonicalize the target
4175 filename and then move the intermediate file to the canonicalized target
4178 Avoid picking '\0' in examples.
4179 Now, we only pick '\0' as the example character for a transition if it is
4180 the only char for that transition.
4182 2008-07-18 David Lutterkort <dlutter@redhat.com>
4184 Added tag release-0.2.2 for changeset e7f6d16e75df
4188 Rename rule because FreeBSD's make chokes on it
4189 Rename the rule .FORCE-datadir.h to FORCE-datadir.h
4191 Sample dput.cf for dput lens
4193 Lens for Debian's dput files
4194 Contributed by Raphael Pinson
4196 2008-07-17 David Lutterkort <dlutter@redhat.com>
4198 augtool: Print '(none)' when getting a path with no value
4199 The output used to be mangled. Now it is 'path = value' if hte path has a
4200 non-NULL value, 'path (none)' if the path exists but has a NULL value, and
4201 'path (o)' if an error occurred.
4203 Added tag release-0.2.1 for changeset 13fdcd9bb18a
4205 aliases.aug: Do not require whitespace after commas
4206 It's perfectly fine to have an alias like 'alias: target1,target2'
4208 Bug reported by Greg Swift
4210 2008-07-16 David Lutterkort <dlutter@redhat.com>
4212 Fix insertion before the first child
4213 Inserting a node as the new first child was completely broken.
4215 Bug reported by Raphael Pinson.
4217 Add support for 'insert' in unit tests
4218 Two new primitives 'insa' (insert after) and 'insb' (insert before) are
4219 added so that unit tests can modify the tree through insert, as in
4221 test lns put str after
4222 insa label path = str2
4224 It would be nice to kill insert with one primitive, but that would have
4225 either required special syntax (like 'ins STR before/after STR') or some
4226 addition to the type system to make it syntactically reasonable.
4228 2008-07-09 David Lutterkort <dlutter@redhat.com>
4230 Test that putting into an empty string works
4232 Initialize state->pos in lns_parse and lns_get
4233 Otherwise, get and parse on an empty string will produce a 'short
4234 iteration' error, even if the empty string is acceptable for that lens.
4236 2008-07-07 David Lutterkort <dlutter@redhat.com>
4238 Put the default dir for lenses into DATADIR (the real fix)
4239 Reworks 527:14602e2757dd in a way that actually works and conforms to the
4240 GNU coding standards.
4242 Most of this fix suggested by Jim Meyering, I only touched it up a little
4243 (and no doubt introduced all the bugs).
4245 Check for NULL values in the put direction of store
4246 This is now flagged as an error instead of causing a segfault.
4248 2008-07-03 David Lutterkort <dlutter@redhat.com>
4250 Lens for /etc/exports
4252 2008-07-01 David Lutterkort <dlutter@redhat.com>
4256 distclean-local: Do not clobber build/aux
4258 Suppress generated manpages
4260 2008-06-30 David Lutterkort <dlutter@redhat.com>
4262 Put the default dir for lenses into DATADIR
4263 Instead of hardcoding the default dir for lenses to somewhere in '/usr',
4264 look in DATADIR - that's after all where the default lenses are installed
4265 if DATADIR (or PREFIX) is changed.
4267 Man page for augparse
4269 Put Augeas version into footer
4271 2008-06-23 David Lutterkort <dlutter@redhat.com>
4273 Auto-generate the ChangeLog file from mercurial logs
4274 Reviewed-by: David Lutterkort <dlutter@redhat.com>
4276 2008-06-13 David Lutterkort <dlutter@redhat.com>
4278 Fix two problems in the grub lens
4279 (1) The grub lens did not handle blank lines
4280 (2) Ubuntu uses 'quiet' in its boot stanzas, which we didn't know about
4282 Reported by Jason Dobies
4284 Produce more helpful errors
4285 The previous check whether we could proces the entire input was too crude
4286 and produced the unhelpful error message "Get could not process entire
4287 input", pointing to the start of the string, even if the problem was much
4288 farther down the line.
4290 With this change, error messages contain an indication to where the error
4291 happened that is a little closer to the actual trouble spot.
4293 2008-06-12 David Lutterkort <dlutter@redhat.com>
4295 Check that we take the right branch in a union
4297 Process /etc/sysconfig/selinux
4300 Fix segfault when aug_init/close are called multiple times
4301 The way we cached the regexp '[0-9]+/' was totally botched. We now allocate
4302 the pattern statically in memory and pin it to protect it from being freed,
4305 Reported by Harald Hoyer
4307 2008-06-06 David Lutterkort <dlutter@redhat.com>
4309 Initialize out parameters
4311 Change struct fields of type (const char *) to (char *)
4312 There were many places where struct fields were declared (const char *) but
4313 then used as (char *) - mostly to free them. Remove the 'const' from those
4316 I would really appreciate if somebody could look over these and make sure I
4317 don't throw away constness in too many places. It seems strange to declare a
4318 field as non-const, even if the string referenced by it is never modified,
4319 and only ever free'd when the enclosing struct is free'd.
4321 2008-06-05 David Lutterkort <dlutter@redhat.com>
4323 Added tag release-0.2.0 for changeset d23f95cd13f3
4327 2008-06-03 David Lutterkort <dlutter@redhat.com>
4329 Remove bashisms from test scripts
4330 Make tests scripts work with plain old sh; also, don't hardcode location of
4331 Ruby interpreter to /usr/bin/ruby.
4333 Work around a problem with Bison on FreeBSD
4334 Bison looks for _STDLIB_H to see if stdlib.h has been included, but the
4335 system includes use _STDLIB_H_; that makes Bison think malloc/free have not
4336 been declared yet and it goes and does that. gcc then complains about the
4337 duplicate declaration.
4339 Infrastructure and import of gnulib modules
4340 We do not keep the gnulib sources in our own repo. Instead, autogen.sh now
4341 calls out to bootstrap to pull in needed files from gnulib.
4343 The bootstrap script was copied from libvirt.
4345 2008-06-02 David Lutterkort <dlutter@redhat.com>
4347 Use a build aux dir (in build/aux)
4349 Use autoheader and generate config.h
4351 Work around lack of open_memstream on non-GNU systems
4352 Since open_memstream is only available with glibc, wrap its use and fall
4353 back to writing to a tempfile on other platforms.
4356 It was a bad idea to begin with; fold the contents into internal.h and make
4357 room for a generated config.h
4359 Support the @include syntax
4360 Debian uses lines of the form '@include module' to reference other pam
4361 configs. The official PAM docs don't mention it, but obviously it works.
4363 Handle trailing whitespace in pam.d; split module-arguments
4365 Allow multiple comma-separated fs types in fstab
4366 On Debian Etch, the CDROM has fs type 'udf,iso9660'
4368 Handle blank lines in /etc/hosts
4370 Fix missing ref on an info struct in syntax.c(compile_minus)
4372 2008-05-30 Jim Meyering <meyering@redhat.com>
4374 * tests/test-lenses.sh: more quotes, protect against space in abs_srcdir
4376 don't conflate top_srcdir and abs_top_srcdir
4377 * tests/Makefile.am: Use $(var), rather than obsolete @var@ notation.
4378 (TESTS_ENVIRONMENT): Rename LHS to match RHS to help avoid (my) confusion:
4379 s/top_builddir/abs_top_builddir/ and s/top_srcdir/abs_top_srcdir/.
4380 * tests/augtest: Reflect renamings.
4381 * tests/test-interpreter.sh: Likewise.
4382 * tests/test-get.sh: Likewise, and remove unused top_builddir= assignment.
4383 * tests/test-lenses.sh: Likewise; remove unnecessary braces, add quotes
4384 to protect against pathological $TMPDIR.
4386 2008-05-29 David Lutterkort <dlutter@redhat.com>
4388 Make distcheck work again
4389 Restore top_builddir and top_srcdir so that augtest passes during make
4392 Fix memory leak in make_exn_lns_error
4394 2008-05-29 Jim Meyering <meyering@redhat.com>
4396 Remove some absolute paths for binaries.
4397 * tests/Makefile.am [TESTS_ENVIRONMENT]: Add a PATH definition that
4398 lets tests invoke "augtool" and "augparse" without any absolute prefix.
4399 Remove top_builddir and top_srcdir definitions; no longer needed.
4400 * tests/augtest: Remove definition of AUGTOOL. Update use.
4401 * tests/test-lenses.sh: Likewise for AUGPARSE.
4402 * tests/test-interpreter.sh: Likewise.
4403 * tests/rec-initdefault.rb: Use 'augtool -n' in place of #{AUGTOOL}.
4405 2008-05-23 David Lutterkort <dlutter@redhat.com>
4407 Fix use of possibly uninitialized variable
4408 * get.c(lns_parse): initialize skel; gcc complains about possible
4411 2008-05-28 David Lutterkort <dlutter@redhat.com>
4413 Check that augtool reads all of tests/root/ without error
4415 2008-05-23 David Lutterkort <dlutter@redhat.com>
4417 Add a test to check we take the right branch
4418 This does essentially the same as the test Pass_prefix_union introduced
4419 with cset 489:3f4414038a30, but in a real world lens.
4421 Escape | when turning a string into a regexp
4423 Add source statements in shell scripts as '.source' nodes
4425 Escape label strings when creating the key regexp for them
4427 Allow lower case characters in shell vars
4429 2008-05-23 Jim Meyering <meyering@redhat.com>
4431 "echo get /|augtool -n" would read one past end of malloc'd buffer * src/augeas.c (make_path): Avoid buffer overrun.
4433 2008-05-23 David Lutterkort <dlutter@redhat.com>
4435 Fix a major bug in the get implementation of lenses
4436 We used to process the input from left to right, matching the regular
4437 expressions of lenses with the input successively. That is very wrong, in
4438 particular, it leads to lens union choosing the wrong branch: in the union
4439 l1|l2, union would always choose l1 if l1 matched a prefix of l2.
4441 We now process the input in a top-down fashion, splitting the string into
4442 parts as we descend in the tree of lenses. As evidenced by the test
4443 pass_prefix_union, that fixes the bad behavior.
4445 Incidentally, it also uncovered another bug in the test_hosts.aug, where a
4446 test passed, even though the string we were using did not end with the
4447 newline that is mandatory for Hosts.record.
4449 This change also does away with pasing flags and a FILE* for logging
4450 details about hte parse process; they don't really make sense anymore, nor
4451 is that behavior very useful in a library.
4453 2008-05-22 David Lutterkort <dlutter@redhat.com>
4455 Fix use of uninitialized pointer
4456 ERR must be initialized, since it is later passed to free_lns_error
4458 Lens for vsftpd.conf
4459 The lens is very tight, in that it only allows actual options, and knows
4460 what kind of value each option accepts.
4462 2008-05-21 James Antill <james@code.and.org>
4464 Fix for the joy that is the glibc asprintf API.
4466 2008-05-21 James Antill <james@and.org>
4468 Minor fix to not use bad memory.
4470 Remove strcat's for stpcpy's
4472 Fix escaping strings that end in \ Fix escaping of unprintable bytes
4474 Fix buffer overflow on strings ending in \
4476 2008-05-21 David Lutterkort <dlutter@redhat.com>
4478 Use glibtoolize on OSX
4479 Patch provided by Rizwan Kassim
4481 2008-05-21 Jim Meyering <meyering@redhat.com>
4483 Make a file-scoped static array "const".
4485 2008-05-18 Jim Meyering <meyering@redhat.com>
4487 * src/augtool.c (cleanpath): Don't access path[-1].
4489 * src/transform.c (transform_save): Detect pre-fclose write failure.
4491 * src/internal.c (read_file): Rewrite, plugging a file descriptor leak.
4493 2008-05-16 David Lutterkort <dlutter@redhat.com>
4495 Added tag release-0.1.1 for changeset fae07193655a
4499 Add dependency on ref.h
4501 Get rid of compiled regexps earlier
4502 After we're done with a transform, release the memory used by compiled
4503 regexps; storage for compiled regexps accounts for the lion's share of
4504 Augeas' memory needs.
4506 Before this patch, augtool run against the files in tests/root/ used more
4507 than 10MB of memory; with this patch, that is done to 250 kB after the
4508 initial load, with a spike of about 6MB during loading.
4510 2008-05-15 David Lutterkort <dlutter@redhat.com>
4512 Misc leak fixes in the interpreter
4513 * Do not ref the old binding in bind_type, ownership is transferred from
4514 the caller to the new list head
4515 * Unref the argument of an apply and the func computed in compile_compose
4516 * Unref the value after it is bound in the context in compile_decl
4517 * Unref various things in define_native_intl
4519 Don't leak the key when appending dict entries
4521 Free the actual struct exn when freeing an exn value
4522 Factor freeing a struct exn into free_exn; previously, the code did not
4523 free the storage for the struct exn itself.
4525 Don't leak key/value in parse on error
4527 Do not leak the split on error
4528 put_subtree has to free the split it computes; previously, it leaked that
4529 if an error inside the subtree occurred.
4532 Although not strictly necessary, it makes it easier to run augparse through
4533 valgrind and get meaningful results.
4539 Free the lns_error in lens_put
4541 Cleanly free regexp patterns; put empty_pattern into ro storage
4543 Ref the returned tree
4544 The tree that tree_set_glue and tree_rm_glue return needs to have its ref
4545 increased, as the calling conventions for builtin functions stipulate that
4546 the returned value is owned by the caller
4548 2008-05-14 David Lutterkort <dlutter@redhat.com>
4550 Report errors more clearly in the tree
4551 When an error happens during get/put, store additional info in the tree:
4552 for get errors, store the position in the file where the error occured, for
4553 put errors, the path of the node. In both cases, also store the
4554 human-readable message.
4556 For a file F, all this information is stored underneath /augeas/F/error,
4557 with the value associated with /augeas/F/error giving some indication about
4558 the kind of error encountered.
4560 2008-05-13 David Lutterkort <dlutter@redhat.com>
4562 Report errors during put
4564 Check that values match the regexp for the corresponding store during put
4566 Lens and transform for /etc/fstab
4567 The lens could be further refined by distinguishing between the legal
4568 values in the first field (LABEL=xxx vs special file system vs device) and
4569 by trying to model more of the vfs/option dependencies, but that's more of
4572 Remove bad assertions
4573 It is perfectly legal for create_* functions to be called with a non-NULL
4574 skeleton; that happens for example when the union combinator puts a tree
4575 that "jumped branches", i.e. whose get used one branch of the union, and
4576 the put uses the other branch because of changes to the tree.
4578 Reduce the number of calls to collect
4579 We were calling collect way too often, which was slowing things down. Also
4580 broke collect into separate subfunctions so we can see better when one of
4581 them becomes a bottleneck.
4583 Stricter skeleton instance check for del and store
4584 Besides having the right tag, del and store match a skeleton only if the
4585 text for that skeleton also matches their regexp.
4587 Weaken the check for key, label, seq, and counter a tiny bit.
4589 2008-05-12 David Lutterkort <dlutter@redhat.com>
4591 Proper typecheck for lens unions
4592 Check that lenses have disjoint ctypes and atypes in a union.
4594 Fix up the existing lenses that violate that.
4596 2008-05-09 David Lutterkort <dlutter@redhat.com>
4598 Keep re_cset_as_string from including an explicit '\0'
4599 We use NUL delimited strings; that means we can not use a CSET
4600 representation that mentions '\0' explicitly.
4602 Use the new '-' operator for key_re
4604 Add subtraction of regular expressions to the language
4605 It is now possible to say something like
4607 let re = /[a-z]+/ - "baseurl"
4609 The '-' operator is only defined between regexps.
4611 Add REGEXP_MINUS; move REGEXP_TO_FA to regexp.c
4613 Refactor typechecking for union/concat
4614 The typechecking for union and concat is incredibly similar, but was
4615 implemented with too much code duplication.
4617 Store character sets as bitsets
4618 Also clean up the definition of the bitset type and make the bitset_*
4619 functions const correct
4621 Add fa_as_regexp that converts an automaton back to a regexp
4622 During conversion from FA to regexp, our FA mutates into a 'generalized
4623 transition graph' where transitions aren't labelled with character
4624 intervals, but with regular expressions.
4626 There are lots of gyrations to keep the generated regexp reasonably short
4627 (and syntactically correct)
4629 2008-05-08 David Lutterkort <dlutter@redhat.com>
4631 Check for (some) allocation failures
4633 Reference count 'struct re' instances
4635 Split ref counting macros into separate header
4637 Remove use of bad REALLOC macro.
4638 The old REALLOC macro caused an automatic memory leak when REALLOC
4639 failed. Use of REALLOC_N instead also forces checking of more allocation
4642 Safer memory allocation from libvirt
4644 Fix a rather embarrassing #ifdef problem
4645 When __GNUC__ was not defined, a big chunk of internal.h was suppressed
4646 that is not compiler dependent.
4648 Also, add ATTRIBUTE_PURE macro.
4650 Switch to using unsigned char internally
4651 Since we use chars as indices into arrays in some cases, it is simpler to
4652 treat characters as unsigned. This also addresses passing possibly signed
4653 chars to is* functions - by using unsigned char, we avoid possible silent
4654 conversion problems when going from char -> int.
4656 There were also cases where we iterated over chars using a char, which was
4657 prone to silent overflow.
4659 Fix mistaken assignments in asserts
4660 Reported by Jeff Johnson
4662 2008-05-06 David Lutterkort <dlutter@redhat.com>
4664 Cleaner way of turning off expensive asserts
4665 Avoid littering everything with #ifdef's, define an 'expensive_assert'
4666 instead that expands to nothing unless HASH_DEBUG_VERIFY is defined.
4668 Patch by Jim Meyering
4670 Small fixes to the specfile
4671 Suggested by Michael Schwendt
4673 2008-05-05 David Lutterkort <dlutter@redhat.com>
4675 Lens and transform for xinetd.conf
4677 Enclose the regexp for a key in (..) before adding a /
4679 Properly determine if segment needs qualifier
4680 For segments with label NULL, we didn't qualify the first sibling with the
4681 NULL label since we were comparing NULL to the result of seg_label, which
4684 Be more consistent in how NULL labels are printed
4686 Suppress assert of hash_verify
4687 Doing the assert(hash_verify(hash)) at various places in hash.c is very
4688 expensive and slows things down considerably when assertions are turned
4691 Rather than turning assertions off globally, only do the hash_verify
4692 asserts when they are explicitly requested by defining HASH_DEBUG_VERIFY
4694 Do not minimize freshly created regexps
4695 The minimization imposes a serious performance penalty, and is generally
4698 This also exposes a bug in fa_overlap; for acceptToAccept to work properly,
4699 it needs to be passed a deterministic automaton.
4701 Fix containment check
4702 Checking for FA2\FA1 being empty was plain silly; this check is a little
4703 better, but still not the correct disjointness check.
4705 2008-05-02 David Lutterkort <dlutter@redhat.com>
4709 2008-05-01 David Lutterkort <dlutter@redhat.com>
4711 Added tag release-0.1.0 for changeset c032a957c316
4715 Rename parameter 'glob' to 'glb'
4716 gcc on RHEL4 gets confused and thinks that that shadows the global 'glob'
4719 2008-04-30 David Lutterkort <dlutter@redhat.com>
4721 Process lots of files in /etc/sysconfig
4722 Load all those shell-script style config files from /etc/sysconfig using
4723 the generic Shellvars lens.
4725 Ultimately, it would be better if we definedfor each of them which
4726 variables are actually going to be looked at (together with some
4727 restrictions on possible values)
4729 Test files for various /etc/sysconfig files
4730 The next commit will add a lens for handling shell var style files in
4731 /etc/sysconfig. These are simply test/sample files. No functionality.
4734 This puts the bits that are generally useful for processing /etc/sysconfig
4735 files into shell.aug
4737 2008-04-30 Jim Meyering <meyering@redhat.com>
4739 check for a few failed memory allocations
4740 * src/augtool.c: check for a few failed memory allocations
4742 2008-04-30 Harald Hoyer <harald@redhat.com>
4744 do ldconfig in post/postun of the libs subpackage
4746 2008-04-28 David Lutterkort <dlutter@redhat.com>
4748 Free the value when freeing a tree node
4750 Plug another memory leak
4752 2008-04-25 David Lutterkort <dlutter@redhat.com>
4754 Fix segfault when aug_get was passed a "/"
4755 In that case, make_path returns NULL, which must be checked.
4757 The bigger question, why "/" is not a valid path is a little more subtle:
4758 the tree is really edge-labeled, not node-labeled, i.e. a label applies to
4759 the edge going from a parent to its child, but root has no parent, and
4760 therefore "/" does not really make sense.
4762 Split multiple baseurl's in a yum file into multiple baseurl nodes
4763 With this, the schema for yum config files may now contain nodes like
4765 ... other key/value pairs ...
4766 { "baseurl" = "url1" }
4767 { "baseurl" = "url2" }
4769 { "baseurl" = "urlN" }
4770 ... other key/value pairs ...
4773 Note that the baseurl nodes have to be consecutive; otherwise, put will
4776 2008-04-24 David Lutterkort <dlutter@redhat.com>
4778 Fix lens selection in union
4779 The logic in put to select the appropriate branch in unions got it wrong if
4780 the first branch matched the empty word, because applies only checked that
4781 the atype for the sublens matched some of the tree. It has to check for a
4782 complete match of its tree.
4784 This change fixes that and adds a test to demonstrate the problem.
4786 Fix ref counting error in lns_make_plus
4787 We burnt the passed-in ownership of L when constructing STAR; also, since
4788 we unref STAR at the end, we need to take ownership of STAR->LENS when
4789 constructing the concat of L and STAR->LENS
4791 * src/fa.c (string_extend): Handle realloc failure.
4792 Patch by Jim Meyering
4796 Processing of Apt's sources files
4797 Contributed by Dean Wilson
4799 Make sure install preserves timestamps
4800 Avoids getting into trouble with the .aug files in augeas-libs on multilib
4801 when installing more than one arch.
4803 See http://fedoraproject.org/wiki/PackagingDrafts/MultilibTricks
4805 Remove trailing whitespace from the end of lines
4806 No functional change, only formatting.
4808 2008-04-23 David Lutterkort <dlutter@redhat.com>
4810 Remove aug_exists - it does not exist anymore
4812 Delete old, outdated notes
4814 Some repo files for yum
4816 Add todo file for low-level tasks that don't make sense on the website
4818 Split libraries into a -libs package
4819 This also includes the files in /usr/share/augeas, since they are read by
4820 the library and control how configuration files are processed.
4822 Patch provided by Harald Hoyer
4824 Include the augtool manpage as doc in the RPM
4826 Don't die on NULL entries in args
4827 There is no guarantee that parseline will fill all of args with strings,
4828 empty or otherwise; chk_args needs to be prepared that any entry in args
4831 Also, parseline initializes all args as NULL now to guard against garbage
4832 pointers accumulating from previous uses.
4834 Don't complain about missing optional args
4835 For example, both 'print' and 'print PATH' are legal. Make sure we accept
4838 Properly handle lines with spaces
4839 The lines read in through readline can now have spaces in their arguments,
4840 if those arguments are enclosed in single or double quotes.
4845 Provided by Dean Wilson
4847 2008-04-22 David Lutterkort <dlutter@redhat.com>
4849 Fix two memory leaks in the interpreter
4851 Plug more memory leaks
4853 Fix memory leak from not freeing hash table entries
4855 Clean up the error path in load_file; free the loaded text in transform_load
4857 Use fread_file_lim to read entire files
4858 The function is taken verbatim from libvirt's util.c, and due to show up in
4861 Also, make read_file return a char * instead of the silly const char *.
4863 Check the return value from hash_create
4865 More const-correctness fixes
4866 Patch provided by Jim Meyering
4868 File needed for running the tests
4870 Stick more closely to what the shell accepts as assignments
4872 Properly escape/unescape quotes in strings
4873 Patch provided by Alan Pevec
4875 2008-04-21 David Lutterkort <dlutter@redhat.com>
4877 Updated for 0.0.8 and upcoming 0.1.0 release
4879 Remove aug_exists from public API
4880 aug_get now combines the functionality of the old aug_exists and aug_get
4881 calls, so that callers can retrieve a value and check whether a path
4882 expression matches exactly one node in a single call.
4884 Make creation of new files work
4885 When a subtree is created that corresponds to a brandnew file, create the
4886 underlying file properly.
4888 Propagate failure of transform_save up
4890 Sync compiler warnings with latest from libvirt
4891 This should avoid build failures seen on Debian, caused by
4894 Also fix build failure caused by addition of -Wformat-security
4896 Mention people who sent patches
4898 Parse network configs in /etc/sysconfig/ifcfg-*
4899 Patch provided by Alan Pevec
4901 Don't mark ROOT for MAKE_PATH as const - it's not always true
4903 Cap file reads (arbitrarily) at 32MB
4905 Don't ever try to read a directory
4906 Suggested by Jim Meyering.
4908 Return int from aug_print to indicate errors
4909 Check for failures during printing and return an indication whether printing
4912 Don't hide pointer in typedef; const correctness
4913 The type for the Augeas handle is now called 'augeas' insteda of
4914 'augeas_t', and is a struct, not a pointer to a struct.
4916 Mark the places where the passed-in struct augeas is readonly in the API.
4918 Patch provided by Jim Meyering
4920 Change names of macros used to guard against double-inclusion
4921 Change the names from __NAME_H to NAME_H_ since __* macros are reserved.
4923 Suggested by Jim Meyering.
4925 Add "2008" to the copyright in the headers
4927 2008-04-19 David Lutterkort <dlutter@redhat.com>
4929 Remove dependency on glib and use kazlib's hash table instead
4930 The dependency on glib was only there for the hash tables used by
4931 libfa. Rather than requiring all of glib just for that, use the hash table
4932 implementation in hash.[ch] taken from kazlib.
4934 2008-04-18 David Lutterkort <dlutter@redhat.com>
4936 Hashtable from Kazlib 1.20
4937 Available from http://users.footprints.net/~kaz/kazlib.html
4939 Abort if failing assertions are not used
4941 2008-04-19 David Lutterkort <dlutter@redhat.com>
4943 Remove pathsplit symbol
4945 2008-04-16 David Lutterkort <dlutter@redhat.com>
4947 Added tag release-0.0.8 for changeset cb00aa18e518
4951 Remove unused function
4953 Install lens tests in lenses/tests/ not lenses/
4955 Use the right path expression to print the whole tree
4957 Don't segfault when a test fails without producing any tree
4959 2008-04-15 David Lutterkort <dlutter@redhat.com>
4961 Call the node for a boot entry 'title'
4963 2008-04-14 David Lutterkort <dlutter@redhat.com>
4965 Remove the use in sequences in some places
4966 Where indentation isn't important, we can flatten and simplify the tree by
4967 not using seqs. Instead of something like aliases/1, aliases/2, ... we now
4968 have alias[1], alias[2] etc.
4970 Start sequences at 1, in symmetry with the element[N] counting
4972 Consolidate tree allocation into one make_tree function
4974 Change the ins syntax to support insert before/after
4975 This reflects the change to the aug_insert API
4977 Handle searching for the last() element properly
4978 path_first didn't find anything when looking for 'element[last()]'
4982 Don't delete too many siblings
4983 When a path specified a node that had siblings with the same name, tree_rm
4984 was deleting that node and all the siblings after it (because the name
4985 label[3] would ssuccessively refer to its later siblings as label[3] was
4988 Now, first generate a list of nodes to delete before removing anything.
4990 Fix put test - it was checking for hte wrong result
4992 Running a failing test fails loading the whole module
4994 2008-04-11 David Lutterkort <dlutter@redhat.com>
4996 Add path expressions allowing XPath-like path matching
4997 Path expressions passed in through the public API can now contain indices
4998 to denote a specific sibling (including [last()]) amongst siblings with
4999 multiple labels, and use '*' to match nodes with any label.
5001 Syntax and semantics follow XPath.
5003 Run all tests - don't abort after the first failure
5005 2008-04-10 David Lutterkort <dlutter@redhat.com>
5007 Escape values and enclose them in quotes when printing
5009 Typecheck only on the first test
5010 It's enough to pass -c to augtool on the first test we run; doing it again
5011 in later tests is completely redundant and just slows the test run down.
5013 2008-04-09 David Lutterkort <dlutter@redhat.com>
5015 Complain if a transform is built from a lens orphaning a key/value
5016 Such a transform would lose information when applied and can't be
5017 valid. Ideally, this check would be in the typechecker, but requires
5018 dependant types, too much of a complication right now.
5020 Clean up some confusion around the semantics of store
5021 Store does not create a tree; instead it puts a value in place where the
5022 enclosing subtree will find it.
5024 During lens building, there is now a check to make sure the key and value
5025 are set in at most one place in each subtree. Ideally, this check would
5026 happen in the typechecker, but it would require that we parametrize the
5027 lens type, considerably complicating matters.
5029 When get encounters an error during a test, include hte tree in the exn
5030 lns_get now returns a tree even if the full input was not consumed. To
5031 check whether get succeeded, the ERR parameter needs to be checked.
5035 Remove 'spec' files and tests that don't make sense any longer
5037 Fail test scripts on _any_ unexpected error
5039 Distribute lens tests
5041 Suppress .rpmnew/save files
5043 Obey AUG_TYPE_CHECK flag
5044 Do not do the expensive lens type checks if AUG_TYPE_CHECK is not set. Run
5045 augtool with -c in tests to ensure tests do type checks.
5047 Update augtool round-trip tests and add them to 'make check'
5048 Update the tests to the new layout of the tree.
5050 augtest allows marking tests to skip (by putting 'skip=true' into the
5051 test) and sets the exit status properly so that 'make check' will fail if
5052 one of the augtool tests fails
5056 Only attempt to save if there are dirty files
5058 Reread the original file from the same root on save
5060 Pass the children of the right tree
5062 Fix some errors that made aug_save fail
5064 Mark a freshly loaded tree as clean
5066 Check the return value of asprintf
5067 Handling of asprintf failures (and allocation failures in general) needs a
5070 Small touchup - needs much more work
5072 Fix segfault if a qualified name references the module it is in
5073 Now explicitly referencing the enclosing module works properly: if the name
5074 is already defined locally, everything works, and if it is not, an error is
5077 2008-04-08 David Lutterkort <dlutter@redhat.com>
5079 Typecheck the atype of concat and iter
5081 Typecheck the atype of union
5083 Change the typecheck on union
5084 Typecheck unions l1|l2 less strictly (and less annoyingly) by requiring
5085 that l2 has a chance of ever being used, and not the stricter criterion of
5086 disjoint ctypes for l1 and l2
5088 Port of the lenses for inittab and sshd_config tothe new syntax
5090 Curb the repeated printing of exceptions
5092 Clearer error message
5096 Pull some useful space deleters into Util
5098 Check that let expressions work
5100 Fix problem in concating filters
5101 The check whether we fully own a filter in compile_concat, and therefore
5102 can modify it destructively, was wrong. Besides holding the only reference
5103 to the filter, we also need to be holding the only reference to the value
5104 wrapping the filter.
5106 Mark hosts and aliases for autoloading
5108 Load from the new ../lenses dir
5110 Obey setting of an explicit root directory
5112 Don't segfault when there is no filter arg for a match
5113 Before, running "augtool match '/augeas/files/*/error'" would result in a
5114 segfault. Now it prints all matching entries, regardless of their value.
5116 Handle continuation lines; more thorough tests
5118 Check that labels and keys do not contain a '/'
5119 We rely on that fact in various places when handling paths; '/' is the
5120 separator of path components and can never appear in a path component.
5122 Print a newline on EOF
5124 Autoloading of files for augtool
5125 Autoload is indicated by putting a 'autoload ...' statement as the first
5126 expression in a module. Currently, there can only be one autoload; the
5127 identifier mentioned in the autoload must be defined in the enclosing
5130 2008-04-07 David Lutterkort <dlutter@redhat.com>
5132 Builtins for filters and transforms
5133 Three simple builtins to construct transforms:
5135 - incl : string -> filter includes all files matching a glob
5136 - excl : string -> filter -> filter excludes all files matching a glob
5137 - transform: lens -> filter -> transform
5139 2008-04-08 David Lutterkort <dlutter@redhat.com>
5143 2008-04-07 David Lutterkort <dlutter@redhat.com>
5151 Local let expressions
5157 Plug two more memory leaks
5158 - require_exp_type is sometimes called with a term that already has
5159 a type. Don't typecheck such terms again
5160 - compile_compose should not run the full typechecker on the closure it is
5161 building, since parts of it have been typechecked already. Instead,
5162 manually create types for the new terms. Also, don't evaluate the
5163 subexpressions since their values are not used at all
5165 Add a 'gensym' builtin
5167 More ref ocunting fixes
5168 - aug_close now releases the list of modules
5169 - compile_bracket cleans up the arg
5170 - augparse closes the augeas connection, mostly so that we can see leaks
5173 2008-04-04 David Lutterkort <dlutter@redhat.com>
5175 Fix major brainfart in ref counting lists
5176 The way lists were reference counted (and particularly unref'd) was just
5177 plain stupid wrong. A list 'next' pointer is no different from any other
5178 pointer when it comes to ref counting.
5180 Initialize *err properly, even if there is no tree
5182 Fix bug with nested subtrees
5183 There was no clear indication if a subtree was a leaf (and should therefore
5184 not grow any tree returned by its child) or was an interior subtree (so
5185 that any returned tree needs to become a child of a new tree)
5187 Kludge around an inconsistency with print_tree
5189 Beginnings of tests for the interpreter
5191 Exceptions during compilation countas failure
5193 Fix how the key regexp for unions is calculated
5194 Union would produce spurious empty keys, for example in the expression
5195 [ key /a/ . ([ l1 ] | [ l2 ]) ]
5196 the union would get an atype of '//' which is wrong, since the subtree []
5197 does not contribute to an atype.
5199 Start a util module with some common functions
5201 Run lens tests during 'make check'
5203 Fix bug introduced in 292:5123e63e004b
5204 Don't compare with the whole path if there is a parent, only the last
5205 component of that path.
5207 Handle trailing slashes on loadpath components cleanly
5209 /etc/aliases processing in the new syntax with tests
5211 Allow rm from toplevel of tree
5212 The only issue with this is that the dirty flag can not be set properly
5213 when deleting from the toplevel of the tree since the flag has to be set on
5214 the parent, which we don't have.
5216 This is really only an issue if (a) we delete the whole tree (b) the next
5217 sibling of the node we delete is semantically different from the deleted
5218 node (e.g. because it goes into a different file)
5220 Either way, this only happens during tests; in the 'real' tree, toplevel
5221 nodes are fixed, like /files and /augeas, and we don't really have an issue
5226 Produce exn when tree_rm/tree_set fail
5228 Update yylloc for string/regexp constants
5230 2008-04-03 David Lutterkort <dlutter@redhat.com>
5232 When compile_exp produces an exn, bind it anyway
5233 This avoids lots of trouble with NULL values
5236 The construct (lens)+ is now processed as lens . lens*
5238 Fix segv on repetition of regexps
5240 Clearer error messages from typechecking lenses
5242 Fix key regexp for union; throw exception on subtrees with multiple keys
5244 Have lens constructors return exns on failure
5245 Also refactor exception generation.
5247 Add a test that produces an exception
5249 Allow '*' as a test result indicating an expected exception
5251 Error propagation from lns_put
5252 Record a lns_error if things don't work out during put. Generate an
5255 A very first lens in the new syntax, with tests
5257 Use the default string for a del lens, really.
5259 Module names must be consistent with the name of the file they are in
5260 The basename of the file must be the name of the module, lowercased and
5261 with ".aug" appended
5263 Add explicit loadpath
5264 augtool and augparse now take an explicit loadpath with the -I option,
5265 which can be repeated multiple times.
5267 aug_init takes a loadpath as a new argument
5270 When the module for a qualified identifier Mod.name is not loaded yet,
5271 automatically load it by looking for a file mod.aug on the module load
5274 Rename struct env to struct module
5276 Separate function composition from concatenation
5277 Function composition is now written as 'f ; g' instead of 'f . g'
5279 Allow tree constants with NULL labels
5281 Clean up printing of empty trees
5283 Clarify the reference counting terminology
5285 Free the skel that lns_put creates initially
5287 Make sure free_dict frees the whole dict
5289 Fix reference problem
5290 The wrong type was being unref'd
5292 2008-04-02 David Lutterkort <dlutter@redhat.com>
5294 Free the whole dictionary
5295 While entries are looked up, dict->entry changes; dict->mark is the head of
5296 the list of all entries that were ever in the dict.
5298 Clear skel and dict in state so assertions in create_ don't trip
5300 Always split the full tree
5301 There's no need to support splitting a partial tree for now. This means
5302 that lns_put will put TREE and all its siblings.
5304 Fix incorrect usage of size parameter for re_match
5306 Add missing break in get/parse_union
5307 Without it, it acts like a concat that drops trees on the floor
5309 Allow printing of hidden tree nodes
5310 When printing test results, we want to see the full tree
5312 Pass lns_error to parse; free dicts and skels
5314 Report errors from get as exceptions
5315 Adds a value kind 'EXN'. When the interpreter gets such a value, it bails
5318 lns_get now reports parse errors in an lns_error struct, which is turned
5319 into an exception in the interpreter.
5321 Added tag ml-syntax-start for changeset fcd6c04a1eed
5323 A subtree without a key matches "/"
5325 Print \n after test result
5327 Allocate enough bytes for string in unescape
5329 Free regexps cleanly
5331 Fill in subtree->atype with empty regexp
5333 2008-04-01 David Lutterkort <dlutter@redhat.com>
5335 Interpreter for the new file description syntax
5336 This is by no means done, but done enough to allow incremental fixes from
5337 now on. This checkin still contains lots of FIXME's and bugs. Very simple
5338 unit tests do work though.
5340 The syntax for describing files is now a very simple OCaml-like functional
5341 language; the file syntax.c implements an interpreter for that language.
5343 2008-03-25 David Lutterkort <dlutter@redhat.com>
5347 2008-03-14 David Lutterkort <dlutter@redhat.com>
5349 Remove comment about fa_overlap/fa_ambig_example
5350 I don't really have the data to support preferring one over the other that.
5352 Rename parse_* functions to get_*
5354 Rename parser.c to get.c
5356 Add bcprules (by Benjamin Pierce); needed by lenses.tex
5358 Added tag release-0.0.7 for changeset 93563112907c
5362 Expose typechecking in augtool
5363 Run 'augtool -c' to get typechecking. Very useful during
5364 development. (Though augparse is even more useful when writing new lenses)
5366 Be a little more restrictive on when to dump the whole grammar
5368 Fix lenses so that they pass type checking.
5369 There were several subtle amibuities in the lenses previously, which the
5370 typechecker nicely discovers now.
5372 When splitting the tree, check that we are atthe right subtree
5373 Without the check, spliting at a subtree just gobbles up trees without any
5374 regard for what that tree is. This becmoes a problem in a sequence like
5375 [ COMMENT ] * . [ key FOO . store BAR ] *
5376 when there is no comment, and therefore no subtree witha NULL label. A tree
5377 with a single node matching FOO is wrongly split as if there was a COMMENT
5378 (which, if it were there would have to have a NULL label)
5380 2008-03-13 David Lutterkort <dlutter@redhat.com>
5382 Defer allocating storage for a state_set as long as possible
5384 Rename constants state_set_* to array_*
5385 We use state_set_initial_size and state_set_max_stride for both state_set
5386 and transitions arrays. Rename them to array_initial_size and
5389 Speed up FA_MINUS by checking for some simple cases with fixed results
5391 Speed up fa_contains by not determinizing FA1
5393 Speed up intersection
5394 (1) Do not determinize before intersecting
5395 (2) Check if one of the automata is the empty language, and return the
5396 empty language if so
5398 Store transitions in an array
5399 Brings about a 10% performance gain since we don't allocate each transition
5400 individually, and since traversing and accessing transitions is a wee bit
5405 Clean up fa_iter some
5406 Now both cases (max == -1 for unbounded iteration) and max >=0 use the same
5407 code to generate the automaton (fa){min}
5409 Compute union and concat in place internally
5410 Reduces the number of times we clone an fa for internal purposes, and
5411 therefore the memory management overhead.
5413 Rejigger the weights assigned by chr_score to make fa_example more predictable
5415 Minor optimization for fa_example
5417 Keep the list of states for clone in a sorted set
5418 This speeds up things enormously (for cmfm.aug, augparse goes from 17s to 6s)
5420 Store that pairs of states for intersection in a hash table
5423 When order of states in a set doesn't matter, allow the set to be kept
5424 sorted so that search can use binary search.
5426 2008-03-12 David Lutterkort <dlutter@redhat.com>
5428 Fix two memory leaks
5430 Remove the last uses of FA_MAP
5431 Use STATE_SET instead, since it's faster and lighterweight
5433 Rename structs fa_state and fa_trans to state and trans
5435 [mq]: min_hopcroft.patch
5437 Sort transitions before generating examples
5438 Otherwise, examples depend on the order in which transitions appear for
5441 Add state sets at head of state_set_list
5443 Use state_set in fa_clone
5444 To speed up fa_clone, keep the correspondence between old and new states in
5445 a state_set to reduce allocation overhead.
5447 Reverse transitions in place in fa_reverse
5449 Improve the performance of fa_intersect with better data structures
5450 Store the map of (s1, s2) -> s for intersection in nested state sets
5451 instead of a linked list.
5453 Faster data structures for sets of states and a list of sets of states
5454 Store the list of sets of states for determinize in a hash table. Since I
5455 don't feel like implementing my own, pull in glib and use GHashTable.
5457 Store sets of states in an array rather than in a linked list. This greatly
5458 reducs the overhead from memory allocations, since the array is expanded by
5459 doubling its size (up to some threshold)
5461 2008-03-11 David Lutterkort <dlutter@redhat.com>
5463 fa_star added a spurious epstrans loop on new initial
5465 Mark live and reachable states
5466 Performance improvement. Instead of allocating temporary lists for live and
5467 reachable states, use one bit each in the state to mark them for that
5470 Add typechecking of lenses
5471 Concatenation and iteration of lenses is now checked for ambiguity. Union
5472 is checked for disjointness, but that is only flagged as a warning, since
5473 it's mostly a harmless problem, and fixing it requires writing nasty
5474 regexps in the spec files.
5476 Fix existing specs to pass typeckecking. Typechecking is extremely slow
5477 right now, some of that will be addressed shortly. For now, augtool does
5478 not do typechecking, but augparse does by default.
5480 2008-03-10 David Lutterkort <dlutter@redhat.com>
5482 Fix subtle bug in determinize
5483 Fix a bug that would only hit if '\0' is ever in points.
5485 2008-03-06 David Lutterkort <dlutter@redhat.com>
5487 Add fa_ambig_example to generate ambiguous words
5488 Generate an ambiguous string upv given two languages and directions on how
5489 to split that string into u.pv and up.v. Algorithm from Anders Moeller from
5490 the dk.brics.grammar package.
5492 Fix example generation, it was completely broken
5493 The previous algorithm was way too simplistic, and failed on more
5494 complicated languages.
5496 fa_example now generates a relatively short word, subject to certain
5497 preferences, so that for example, alnum characters are preferred over
5498 printable ones, and those over nonprintable ones.
5500 Fix some cornercases in fa_example
5502 2008-03-05 David Lutterkort <dlutter@redhat.com>
5504 Add generators and tests for some basic languages
5505 Basic languages are the empty language, the language containing only the
5506 empty word, and the total language \Sigma^*
5510 Added tag release-0.0.6 for changeset 9a4f846673ac
5512 Released version 0.0.6
5514 Allow influencing the behavior of save
5515 By passing one of the flags AUG_SAVE_BACKUP or AUG_SAVE_NEWFILE to
5516 aug_init, it is possible to influence the behavior of aug_save to either
5517 overwrite files in palce, save originals with extension .augsave, or put
5518 changes into files with extension .augnew.
5520 Also added switches to augtool to set this from the command line, and to
5521 set the filesystem root.
5523 Added tag release-0.0.5 for changeset 0efe2a620e39
5525 Mark print_re as unused
5529 Make aug_close public
5531 Public API change: include a reference to an augeas_t in all calls
5532 To make Augeas threadsafe, we need to move away from keeping stuff in
5535 2008-03-04 David Lutterkort <dlutter@redhat.com>
5537 Add fa_example which produces an example string from a regular language
5539 Add a test that performs Anders Moeller's ambiguity algorithm manually
5542 (1) fa_make_char_set would never create transitions with min == max
5543 (2) fa_intersect got things wrong when t2 had an interval that overlapped
5544 several intervals on t1
5546 Also added tests to check these two problems.
5548 Fix handling of negated charsets
5549 Negated charsets where handled entirely wrong. A character set is now
5550 represented as a map from char -> {0, 1}. That map is rather big (one byte
5553 Fix order in which libraries are installed
5554 libaugeas must be installed after libfa, since it depends on it.
5556 Remove old sketch of interface; not needed anymore
5558 Compute the complement, set difference and overlap of two languages
5560 Fix a bug in how '.' is being handled
5561 The '.' was treated the same as [\n] instead of [^\n] by mistake.
5563 Also fixes a small bug in fa_contains.
5565 Add deciding unambiguously iterable based on ua concatenable
5567 2008-03-03 David Lutterkort <dlutter@redhat.com>
5569 Automatically free all automata allocated during a test
5571 Cleanup the returned FA in fa_intersect
5573 Add a target to run fatest through valgrind
5575 Add fa_intersect: intersection of regular languages
5577 Comment the uses of FA_MAP better and rename some internal helper functions
5579 Clean up management of state lists
5580 Centralise allocating new states for a fa in add_state; that makes sure
5581 that all states appear on the list of states in fa->initial.
5583 Do not rely on gcc >= 4.0 for restricting symbol exports
5584 Use a linker script instead. The visibility pragma is only available in gcc
5585 >= 4.0, and thus imposes a pretty high burden to build Augeas.
5587 2008-02-29 David Lutterkort <dlutter@redhat.com>
5589 Reign in the number of symbols exported from libaugeas
5590 Use visibility=hidden to keep most local symbols to ourselves. Still needs
5591 some work for augparse/augtool
5593 Performance improvements
5594 (1) Don't minimize the automaton quite so often. Now, only fa_compile minimizes
5596 (2) Instead of full-on minimization, clean up the automaton before
5597 returning to the user by removing dead transitions/states.
5599 Remove gratuitous list traversals
5600 Replace list_append with list_cons (adds at the head of a list) where order
5601 of the list does not matter.
5603 Add tests for language subsets and equality
5605 The beginnings of a finite automata library
5606 The code is heavily based on the Java package dk.brics.automaton by Anders
5607 Moeller (http://www.brics.dk/automaton/)
5609 Eventually, this should becomea standalone library, seeing how there does
5610 not seem to be any open-source, maintained finite automata library.
5612 Some unit testing help
5613 This is an adapted version of CuTest
5614 (http://sourceforge.net/projects/cutest/) written by Asim Jalis
5616 Minimal docs for aug_save and aug_print
5618 2008-02-26 David Lutterkort <dlutter@redhat.com>
5622 Fix segfault in aug_ls
5623 When skipping nodes with NULL label, don't segfault if the whole tail of
5624 the list has NULL labels
5626 2008-02-25 David Lutterkort <dlutter@redhat.com>
5628 Added tag release-0.0.4 for changeset d8e750d82f97
5636 Turn off warnings-as-errors when building spec-lex.l
5637 We need -Wno-error, otherwise the CFLAGS passed during mock builds turn
5638 checking for unused parameters back on; flex doesn't provide an easy way to
5639 generate code that passes those checks (that's the reason for building the
5640 liblexer.la convenience lib)
5642 Only define print_dict when it is used
5644 Added tag release-0.0.3 for changeset 56cb08f222a3
5648 Test for readline in a way that works on RHEL5
5650 Some build/install tweaks
5651 (1) Rename spec in $(datadir)/augeas/spec to lenses
5652 (2) Add pkgconfig info for libaugeas
5653 (3) Install augeas.h as a header
5655 Rename AUGEAS_SPECLIB to AUGEAS_LENS_LIB
5657 Added tag release-0.0.2 for changeset f981ccccb0ab
5659 Include the try script in the distribution
5661 Bump version to 0.0.2
5663 Fix things up so that 'make distcheck' works
5664 (1) make test runs work when when top_builddir != top_srcdir
5665 (2) Include spec/ files in distribution
5666 (3) disable test-grammars.sh since the test grammars are busted right now
5668 Fix warnings about uninitialized variables
5670 Add config.h to libaugeas.la
5672 Stricter types for some combinators. List needed reg lang operations
5674 2008-02-21 David Lutterkort <dlutter@redhat.com>
5676 Some changes to the yum description
5677 (1) Use a yum.conf that is actually shipping
5678 (2) Make COMMENT match blank lines
5679 (3) Fix tests to work with updated yum.conf
5681 Only create /tmp/augcmds.txt if it doesn't exist
5682 Nothing deep; just trying to keep Mercurial from marking the file as
5683 modified as I change the commands that try runs
5685 Make aug_ls return all the children for a given path
5686 aug_ls did not handle entries that were split across several nodes
5687 properly. Now, we find all the nodes for the given path and list their
5690 Fix splitting of AcceptEnv
5691 The list of env vars for AcceptEnv was not being split into individual
5694 2008-02-20 David Lutterkort <dlutter@redhat.com>
5696 A (pretty kludgy) description for cmfm.conf
5698 Make printing of skel/dict optional
5700 Print test results a tad prettier
5702 Use GNU regex instead of PCRE
5703 Use the GNU regex functions from glibc instead of PCRE, as glibc uses a DFA
5704 implementation that does not suffer the limitations of PCRE's backtracking
5707 The syntax for regular expressions is now RE_SYNTAX_POSIX_MINIMAL_EXTENDED,
5708 essentially extended POSIX regular expressions, except that '.' does not
5711 Clean up regexps for POSIX
5712 Various small fixes to regexps to make them work properly as POSIX regexps.
5714 Added tag remove-any-first-follow for changeset 0d22160e9494
5716 Remove any matches ... and ..? from the language. Remove first/follow sets
5717 They currently require lookahead assertions from the underlying regexp
5720 Since any matches were the only reason to compute first/follow sets, remove
5723 Remove the use of the any operators '...' and '..?'
5724 These operators inherently require lookahead assertions, but we need to
5725 switch to a regexp engine that does not support them.
5727 Don't segfault when parsing fails
5729 2008-02-19 David Lutterkort <dlutter@redhat.com>
5731 Drop CF-oriented check for ambiguity through looking at first sets
5733 Allow escaping of a slash in tegular expressions
5735 2008-02-18 David Lutterkort <dlutter@redhat.com>
5737 Base parsing completely off regexp matching.
5738 Parsing now uses regexp matching, and not the CFG-style parsing based on
5739 first sets previously used. This actually makes it easier to write specs,
5740 since parsing decisions are made based on the complete string, not just the
5743 The downside is that rules can not be recursive anymore, as that would
5744 make the matched language non-regular.
5746 The main motivator for this change is that it makes it possible to do
5747 stricter checking of the input spec using type checking similar to
5748 boomerang's string lenses based on operations on regular languages.
5750 Unfortunately, we have to keep first/follow computations to construct the
5751 fairly tricky regexps that are used for ANY patterns.
5753 Remove unused token T_FIELD
5755 Rename match.xaction to match.action
5756 The field was named initially to avoid a clash with another 'action' field,
5757 but that field is gone now.
5761 Remove leading whitespace inside Match directives
5764 For a lens like a . (b . c)*, tree_split used to return a split that looked
5765 like [a; b; c; b; c] That is wrong: when we split on the outer '.', we need
5766 to produce a split with exactly two entries: [a; b] (where b stands as the
5767 first entry in the tree that '*' will act on.
5769 split_tree_car cleans up recursively computed splits in this manner; those
5770 subsplits are mostly computed for their sideeffect, particularly for the
5771 fact that they change state->tree.
5773 Properly print split nodes
5775 Lenses for sshd_config
5776 This is interesting because of the treatment of AcceptEnv and similar
5779 For split nodes, append entries at the last occurence
5780 It is possible that one logical node is split across several physical
5781 nodes to accomodate settings that are spread across several lines like
5782 'AcceptEnv' for sshd_config. Such lines lead to multiple nodes
5783 /system/config/sshd/AcceptEnv (all siblings of each other)
5785 When a call to aug_set creates a new entry underneath such a split node,
5786 make sure that that the new node is put under the last such node. This
5787 helps maintain the illusion for users that the split node is really just
5790 2008-02-15 David Lutterkort <dlutter@redhat.com>
5792 Report some information underneath /augeas
5793 The root directory and information about how files were loaded into the
5794 tree are kept in the /augeas hierarchy now
5796 Fix very bad use of realloc
5798 Adjust expected diff
5799 Do not allow comments to disappear
5802 The old diff was bogus (it expected a comment to be removed that has to
5805 Cleanly handle comments
5807 Default COLON to ':' plus tab. Simple tests for aliases
5809 Informal survey of files in /etc
5811 Ignore intermediate Latex files
5813 Store comments in subtrees so they are restored properly
5815 Turn into a test on a legal tree and make it pass
5817 Fix split of QUANT_MAYBE. Add create_quant_maybe
5821 Free the results of split_tree
5823 Properly split an empty * as an empty list
5825 Try to make putting QUANT_MAYBE work
5826 This is still kinda suspect
5828 parse_subtree must always generates a tree
5829 We have to have a subtree, no matter what, even if it is completely
5830 empty. If the subtree doesn't contain any key and store instructions, we
5831 still need to have a tree [ NULL -> NULL ]
5833 Modified yum spec that seems to work
5835 Script to ease testing of augtool
5837 Enable parsing of pam
5839 Remove bogus reset of 'record' counter
5842 Print did not generate paths right; it would print children of a node with
5843 a path that did not contain the label of that node.
5847 Properly handle a NULL value in aug_set. Make aug_insert deal with NULL labels.
5849 2008-02-14 David Lutterkort <dlutter@redhat.com>
5851 Fixed, nicely working tests
5854 Complete command names and tree paths.
5856 Also cleans up the path entered by the user so that it doesn't have
5857 trailing spaces or '/'. Cleaning should probably be done by the public
5861 Code still unbelievably buggy and segfaults in lots of places, but it is
5862 fairly clean and works for choice examples.
5864 The reworked code is based fairly closely of boomerang and
5865 lenses. doc/lenses.tex describes some of the background.
5867 2008-02-13 David Lutterkort <dlutter@redhat.com>
5870 The spec language now contains instructions on how to build the tree inline
5873 This change is majorly broken.
5875 2008-02-12 David Lutterkort <dlutter@redhat.com>
5877 Better description of lenses
5879 Different representation of the tree
5880 The tree is now represented as a tree data structure, where each node in
5881 the tree stores only a path component (label).
5883 2008-02-08 David Lutterkort <dlutter@redhat.com>
5885 Beginnings of a formal writeup
5887 2008-01-30 David Lutterkort <dlutter@redhat.com>
5889 Remove field references as a match
5890 It used to be possible to have a rule like
5892 with the meaning that $1 would match the same thing as RE. That hasn't been
5893 used yet; unclear if it ever will.
5895 When deleting, only mark AST changed when leaf was deleted
5896 This is really a kludge to work around the fact that we might construct
5899 Slightly mroe helpful error message during parsing
5901 Don't segfault when the parse matches nothing
5903 2008-01-29 David Lutterkort <dlutter@redhat.com>
5907 Remove more unneeded cruft
5909 Remove unneeded safe_free, TRUE and FALSE
5911 Remove unneeded ROOT_DIR and update augtool help
5913 Remove dead code and misleading comment
5915 Remove files not needed any longer
5919 Run all the augtest tests by default and from make check
5921 Test key/value parsing with yum
5922 The test file also nicely illustrates some shortcomings of the way comments
5923 are associated with tree entries. There's not enough flexibility to let the
5924 user cleanly indicate what a comment goes with (e.g., an entire section,
5925 the next key/value pair etc.)
5927 Initialize fields used as path components
5928 When a field is used in a path component, initialize its value from the
5929 path. Since it is not possible to change an existing path, this operation
5930 is only needed when new parts of the AST are created.
5932 The code assumes that the leaf for the path component is in the subtree
5933 where the leaf's value is used. That is not necessarily true; at least,
5934 it's not being checked from the grammar.
5936 Test that reordering of subtrees works
5938 Set the root of the tree from include
5940 Respect ordering of nodes in the config tree.
5941 Previously, reordering of branches in the config tree did not lead to a
5942 corresponding reordering of elements in the file. Branches in the AST are
5943 now reordered in such a way that their ordering reflects the ordering in
5946 Iterator nodes with a $seq action need to be treated special: they do not
5947 change the path for the current (iterator) node, only for the child nodes.
5948 That is terribly ugly.
5950 Fix bug in creating sequence subtrees
5952 Distribute enters so we have one per match
5953 Simultaneous traversal of the AST and the config tree is much simpler if
5954 any match will only go at most one level deeper. That guarantees that
5955 entering a child in the config tree corresponds to entering an AST node
5956 (possibly followed by entering some more AST nodes labelled with the same
5959 To this end, split actions with multiple enters into fake SEQUENCE matches
5960 (followed by the match that held the initial action). The fake SEQUENCE
5961 matches all have exactly one child in their matches field, and one of the
5962 enter instructions from the action for them.
5964 Actions are also lifted up in the grammar as far as possible; in
5965 particular, this pulls constants (but not $seq) out of iterators. This
5966 ensures that the children of an AST node differ in exactly one path
5969 Push stores to the matches they store in the tree
5970 In an assignment, the value being stored can only be a field
5971 reference. Push the corresponding action for the store to that field. This
5972 simplifies both getting and putting the tree.
5974 As a byproduct, a number of questionable constructs are spotted and
5976 (1) Assignments that move the value out of the current tree
5977 (2) Storing the same value in more than one place in the tree (which
5978 would make it possible to change one copy, but not both)
5979 (3) Useless enter instructions; they don't cause harm but probably
5980 indicate some other problem in the grammar. They are only spotted
5981 if they get in the way of a store, but should probably be checked for
5984 Produce dot files for the grammar
5986 Various changes to the tests to make them (almost) work
5987 (1) Adjust to the fact that the root dir is now a variable
5988 (2) Mark tests as failing if augtool exits with an error exit status
5989 (3) Use numbers matching [0-9]+ where the grammar uses $seq, otherwise
5990 augtool will (rightly) report an impossible path
5992 Some of the tests are still failing.
5994 aug_ls: Fix bad parent comparison
5995 Before /foo/1000 was listed as a child of /foo/1
5999 2008-01-24 David Lutterkort <dlutter@redhat.com>
6001 Rough thoughts about emit
6003 2008-01-21 David Lutterkort <dlutter@redhat.com>
6005 For quantified groups, count the quantifier as the group
6006 Previously, for a match like '(A)*' A was counted as a group, which meant
6007 that if an action was attached to the group, all the children of the '*'
6008 node in the AST had the same path. By counting the '*' as the group, not
6009 'A', the children will have different name if different subtrees are
6010 produced in the group.
6012 This ensures that in the AST, the children of '*' and '+' have different
6013 names and simplifies the 'put' direction of the transformation
6016 Some config settings - most of them need to be exposed through configure.ac
6018 2008-01-18 David Lutterkort <dlutter@redhat.com>
6020 Global filename does not exist. Use basename
6022 Only increment $seq when it has been used
6023 With this change, $seq goes structly sequential in the generated tree
6024 nodes. Before, things like comments that don't lead to changes in the tree
6025 increased the counter, too.
6027 Spec files needed by the tests
6029 Don't segfault in ast_dot on NULL ast
6031 Only save files with actual changes
6032 Split emitting into two parts: updating the AST from the config tree and
6033 actually writing the AST to file. do_insertion and do_deletion now report
6034 if they made any changes to the tree so that the provider can decide
6035 whether to save the file or not.
6037 As a byproduct, parts of the AST that are no longer needed are actually
6040 Handle null values/tokens when storing
6042 Detect association of values with impossible paths
6044 2008-01-17 David Lutterkort <dlutter@redhat.com>
6046 Make augtest set AUGEAS_ROOT and AUGEAS_SPECLIB before running augtool.
6047 augtest now copies test files into a separate subdirectory and points
6048 augtool to that as its root. It also points augtool to ../spec for the spec
6051 Add the spec provider.
6052 The provider should have been committed in 57:9e439a136787, but
6053 wasn't. Unfortunately, versions of prov_spec.c that would compile with that
6054 version have been lost. Therefore, builds between 57:9e439a136787 and this
6057 Emit a the current tree into a file
6058 Based on the AST, generate the file that lead to that AST. Changes to the
6059 config tree are mirrored by corresponding changes in the AST before it is
6062 This is a first version that works for some restricted set of grammars, but
6063 needs a lot more testing.
6065 Compute tree handles for each match
6066 The handle of a match is a set of regular expressions that indicate which
6067 subtrees are generated by that match. Handles are computed based on the
6068 actions in the grammar and propagated.
6070 The handle of an action is a regular expression matching the path generated
6073 Build an explicit AST
6074 Instead of representing the parsed file by a simple list of tokens, build a
6075 fullblown AST for that file. The AST is actually not very abstract, and is
6076 directly the parse tree from parsing a file with a certain grammar.
6078 Split parsing and evaluating into to passes; references to fields
6079 are too hard to resolve with a partially constructed AST.
6081 Also adds a routine (ast_dot) to output the AST as a dot file; this eases
6082 debugging tremendously. augparse will now produce dot files when given '-P
6085 Remove aug_token and any mention of it - that has been replaced by struct
6088 Represent quantifiers in their own match nodes
6089 Instead of using a field in struct match for quantifiers '*', '+', '?',
6090 represent quantified expressions by their own struct match, with a matches
6091 field pointing to the quantified expression.
6093 This leads to a cleaner parser and makes constructing an explicit AST
6096 Prefer comments over kv
6098 Print first sets for every match
6099 Factor printing of a literal_set into print_literal_set and use it for
6100 printing both first and follow sets.
6102 Remove debug printing in augparse about loaded maps
6104 2008-01-07 David Lutterkort <dlutter@redhat.com>
6106 Free tokens entirely when freeing file
6108 Set action in all path components
6110 2008-01-03 David Lutterkort <dlutter@redhat.com>
6112 Provider that uses specs
6113 The spec provider is hooked into libaugeas and loaded. It reads spec files
6114 from /usr/share/augeas/spec and paths mentioned on AUGEAS_SPECLIB. Files
6115 are parsed according to the specs loaded, and values are written into the
6116 tree after parsing those files.
6118 Still missing is saving of the tree back to file, and in particular adding
6119 new entries in the tree to such files.
6121 Move hosts and inittab under /etc
6123 Always set the passed-in grammars and maps to NULL
6124 Without that, it's too easy to pass an invalid pointer in from random
6125 nonsense on the stack. And since we do not append to anything the user may
6126 pass in, setting to NULL is safe.
6128 Compile regexps for multiline matching
6130 2008-01-02 David Lutterkort <dlutter@redhat.com>
6132 Fix syntax error; we want to test that missing defaults are noticed
6134 Add filemappings to the language
6135 The map construct specifies a grammar and a list of glob patterns that this
6136 grammar should be applied to.
6138 Print the filename in errors about tokens (abbrevs)
6140 Add name to grammars
6142 Add -v switch for printing errors
6144 Two more test grammars
6146 Execute actions (not writing to tree yet)
6147 Actions are executed at the right points during the parse, and a stack of
6148 paths is maintained. References to values work with the exception of
6149 references to rules.
6151 2007-12-21 David Lutterkort <dlutter@redhat.com>
6153 Check grammar acceptance/rejection
6155 More precise syntax for where actions attach in a rule
6156 Previously, it was not clear how far into a rule the current path would be
6157 modified during parsing. This syntax defines some clear rules for that:
6158 - if the rule applies to a parenthesized group (@n), the
6159 path is in effect until the end of the group
6160 - if the rule applies to a field (@$n), the new path is used during
6161 parsing of that field
6162 - the assignment part of the action is done after the field/group
6165 Snapshot before changing the syntax of rule actions
6167 2007-12-20 David Lutterkort <dlutter@redhat.com>
6169 Remove unused keyword and token 'default'
6171 Fix field number computation
6173 Two more rejection tests
6175 Add a simple test for rejecting bad grammars
6177 Don't try to dump a NULL grammar
6179 Introduce SUBMATCH_P macro; cleanup unnecessary switch statements.
6181 Statically number all matches in a rule. Check for illegal field refs.
6183 Collect unprocessed tokens in the parser state.
6185 Print quantifier after rule reference
6187 Remove unneeded debug print
6189 Produce tokens during parsing.
6190 Also, nicer printing of the tokens read.
6192 Stricter checking for ambiguous rules
6193 Check that all items in alternatives have non-overlapping first sets. Two
6194 sets are overlapping if they both contain an entry pointing to the same
6195 struct literal or if the contain entries where the literals have the same
6196 patterns (as strings)
6198 This still misses the case where literals have equivalent regular
6199 expresions (e.g. /[ab]/ in one and /[ba]/ in the other) but that seems very
6202 Print first/follow sets prettier, print control characters escaped with ~
6203 Literals from first/follow sets are now reduced back to the abbrev they
6204 belong to if that exists.
6206 Add options to control grammar printing
6208 Set match->owner for _all_ matches
6210 Two more sample/test grammars
6212 First step towards a specification for config files
6213 Definition of a simple language for describing the syntax of config files
6214 and how they are to be mapped to a tree. Lexer/parser for the language and
6215 data structures to hold the specification. Parses files defined by the
6216 grammar - processing of the parse is missing though.
6218 2007-12-14 David Lutterkort <dlutter@redhat.com>
6220 Factor aug_make_file into internal.c
6222 2007-12-01 David Lutterkort <dlutter@redhat.com>
6224 Be more verbose about which tests were run
6226 Do not include unused util.h
6228 Mention language bindings
6230 Added tag release-0.0.1 for changeset 69688020bb1b
6234 Disribute tests and doc/examples.txt
6236 Some pseudo-code examples
6240 2007-11-30 David Lutterkort <dlutter@redhat.com>
6242 Add a test that shows how to change the initdefault
6244 Add help texts and a help command
6246 Add aug_match as a simple query facility
6250 Make the ROOT_DIR a constant instead of hardcoding it everywhere
6252 Test deleting everything from /etc/hosts
6254 Describe what a test description looks like
6256 Add a provider for /etc/hosts and reorganize how providers are loaded/saved a little
6258 aug_rec_save: Check input parameters
6260 Major overhaul of record parsing
6261 Use PCRE to split records with regexps, and abstract a major chunk of
6262 functionality out so it is independent of parsing pam config files
6264 Translate changes in the tree into changes in files (change/insert/delete
6265 of nodes are translated into changing fields and insert/delete of fields
6268 Root filesys that tests pass against
6270 Basic tests for record parsing
6272 2007-11-26 David Lutterkort <dlutter@redhat.com>
6274 Trim trailing slashes from paths
6276 Keep /system and /system/config around at all times
6278 Access aug_insert from the command line; do better error checking for aug_insert
6280 Autotools support for building
6282 Very simplistic key store with a public API in augeas.h
6283 The implementation is braindead and slow, but good enough to experiment
6284 with the actual difficulty for augeas: parsing and editing different config
6287 augtool gives a basic mean to inspect the keystore from the command line