Upload Tizen:Main source
[external/augeas.git] / ChangeLog
1 2011-04-15  David Lutterkort  <lutter@redhat.com>
2
3         Iptables: handle --tcp-flags
4         Fixes bug #157
5
6 2011-04-14  David Lutterkort  <lutter@redhat.com>
7
8         * src/augtool.c: respect autosave flag when executing a single command
9         Fixes bug #193
10
11 2011-04-13  Erinn Looney-Triggs  <erinn.looneytriggs@gmail.com>
12
13         Grub: support the 'device' directive for UEFI boot
14         Fixes bug #189
15
16 2011-04-13  David Lutterkort  <lutter@redhat.com>
17
18         Access: support the format @netgroup@@nisdomain
19         Fixes bug #190
20
21         * lenses/tests/test_fstab.aug: test that we parse SELinux context correctly
22
23 2011-03-25  David Lutterkort  <lutter@redhat.com>
24
25         Httpd: remove duplicate inclusion of /etc/httpd/conf/httpd.conf
26
27 2011-03-25  Bill Pemberton  <wfp5p@virginia.edu>
28
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
33
34         Enable the test for continuation lines in test_httpd.aug
35
36         Add /etc/httpd/conf/httpd.conf to the filter list for httpd.aug
37
38         Allow blank and comment lines throughout config file in iptables
39
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.
43
44 2011-03-23  David Lutterkort  <lutter@redhat.com>
45
46         Mysql: include /etc/my.cnf used on Fedora/RHEL
47         Fixes https://bugzilla.redhat.com/show_bug.cgi?id=688053
48
49         Httpd: include /etc/httpd/conf/httpd.conf used on Fedora/RHEL
50         Fixes https://bugzilla.redhat.com/show_bug.cgi?id=688149
51
52 2011-03-22  David Lutterkort  <lutter@redhat.com>
53
54         * src/lexer.l: fix a few compilation warnings
55
56         Eliminate global variable 'comment_depth' in lexer
57
58 2011-03-19  Francis Giraldeau  <francis.giraldeau@gmail.com>
59
60         Add support for configfile and background in grub
61         Test for the new configuration directives are also provided.
62
63         Thanks to Onur Küçük for the patch.
64
65 2011-03-18  Raphaël Pinson  <raphink@gmail.com>
66
67         #include is also valid in sudoers.aug
68
69         Add support for #includedir in sudoers.aug and test (ticket #188)
70
71 2011-03-17  Francis Giraldeau  <francis.giraldeau@gmail.com>
72
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.
76
77         Fix bug #187
78
79         Thanks to thefoxbox for the enhancement
80
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.
86
87         Fix bug #186
88
89         Thanks to spamaps for the help to resolve this issue.
90
91 2011-03-16  David Lutterkort  <lutter@redhat.com>
92
93         * src/lexer.l (augl_init_lexer): really close the input file on error
94
95 2011-03-16  Richard W.M. Jones  <rjones@redhat.com>
96
97         Add FreeBSD /etc/rc.conf file to Shellvars lens.
98
99 2011-03-15  David Lutterkort  <lutter@redhat.com>
100
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
103             alternatives match
104           * lenses/tests/test_shellvars.aug: add a test to trigger that code path
105             in create_union
106
107         Fixes bug #183
108
109 2011-03-10  David Lutterkort  <lutter@redhat.com>
110
111         * src/augeas.c (aug_init): check return value of argz_* for ENOMEM
112
113 2011-03-10  Matthew Booth  <mbooth@redhat.com>
114
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
118
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.
122
123 2011-03-08  David Lutterkort  <lutter@redhat.com>
124
125         Be more defensive about closing input files for the lexer
126
127 2011-03-04  David Lutterkort  <lutter@redhat.com>
128
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
133
134 2011-03-03  Matthew Booth  <mbooth@redhat.com>
135
136         Use getopt-gnu from gnulib for AIX support
137
138         Update to gnulib commit c2090a8
139         Required for updated getopt-gnu license.
140
141 2011-03-03  Raphaël Pinson  <raphink@gmail.com>
142
143         Remove trailing spaces in lenses/tests/test_nagiosobjects.aug
144
145         Add nagiosobjects.aug based on Sebastien Aperghis' work.
146
147         Remove trailing spaces in nagioscfg.aug
148
149         Improve nagioscfg.aug as per Sebastien Aperghis' work.
150
151 2011-03-02  Raphaël Pinson  <raphink@gmail.com>
152
153         Fix single quotes support in httpd.aug.
154
155         Support single quotes in httpd.aug. Add unit test for it in test_httpd.aug.
156
157 2011-03-02  David Lutterkort  <lutter@redhat.com>
158
159         * tests/fatest.c (testManualAmbig): don't use '$' in variable names
160         Breaks on, at least, AIX
161
162 2011-03-02  Raphaël Pinson  <raphink@gmail.com>
163
164         Add Sep.equal, used in nrpe.aug
165
166         Changes in nrpe.aug Remove wrong ^ in comment regex Use Util.comment_generic Use generic modules Improve NaturalDocs documentation
167
168 2011-02-23  David Lutterkort  <lutter@redhat.com>
169
170         Version 0.8.0
171
172         Fix compile errors found by gcc 4.6.0
173         There were several places that caused the new 'variable assigned but not
174         used' warning.
175
176         The struct lens also contained the member jmt twice; it is now only
177         available for L_REC lenses.
178
179         * src/info.h: include stdlib so we can use uint
180
181         * tests/Makefile.am: distribute the test data in test-augtool/
182
183 2011-02-23  Dominic Cleal  <dcleal@redhat.com>
184
185         Split Solaris multiboot argument for the kernel path into @path node (ticket #158)
186
187 2011-02-22  Francis Giraldeau  <francis.giraldeau@gmail.com>
188
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.
197
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
200         tree.
201
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
213
214 2011-02-22  Raphaël Pinson  <raphink@gmail.com>
215
216         Add short options for --nostdinc, --noload and --noautoload Update manpage and pod accordingly
217
218         Distribute bcprules.sty and xpath.txt
219
220 2011-02-19  Raphaël Pinson  <raphink@gmail.com>
221
222         Add indented_title_label in inifile.aug Use indented_title_label in mysql.aug Adjust test for mysql.aug accordingly
223
224 2011-02-18  Raphaël Pinson  <raphink@gmail.com>
225
226         Allow indentation for "iface" entries in interfaces.aug (Fix ticket #182) Add unit test for "iface" indentation
227
228 2011-02-16  Francis Giraldeau  <francis.giraldeau@gmail.com>
229
230         Minor code format cleanup
231           * Cut long lines to 80 chars
232           * Indentation fix
233
234         Fix memory leak with recursive square lens
235
236 2011-02-16  Raphaël Pinson  <raphink@gmail.com>
237
238         Remove trailing whitespaces in util.aug
239
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
241
242 2011-02-15  Francis Giraldeau  <francis.giraldeau@gmail.com>
243
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.
250
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.
254
255         Closes trac ticket #180.
256
257 2011-02-15  Raphaël Pinson  <raphink@gmail.com>
258
259         Improve vim syntax file
260
261 2011-02-14  David Lutterkort  <lutter@redhat.com>
262
263         man pages: update man page for augtool
264
265 2011-02-14  Raphaël Pinson  <raphink@gmail.com>
266
267         augtool: add --interactive option
268         This option runs an interactive shell after evaluating STDIN or an explicit
269         inputfile
270
271 2011-02-14  David Lutterkort  <lutter@redhat.com>
272
273         Mysql: change default comment delimiter from ';' to '#'
274         Fixes bug #181 reported by devzero
275
276 2011-02-06  Francis Giraldeau  <francis.giraldeau@usherbrooke.ca>
277
278         Add Dhcpd lens
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
283
284         Replace seq by label in option list
285
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.
289
290 2011-01-28  Raphaël Pinson  <raphink@gmail.com>
291
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
297
298 2011-01-25  Francis Giraldeau  <francis.giraldeau@gmail.com>
299
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
305
306         Add Httpd lens
307         The Httpd lens parses Apache Web server configuration according to the manual.
308
309           * Generic sections with square lens
310           * Generic directives
311           * Arguments of sections and directives are handled as list
312
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.
316
317 2011-01-25  David Lutterkort  <lutter@redhat.com>
318
319         * src/pathx.c (store_error): make sure pos_str is always NUL terminated
320         Fixes bug #178
321
322 2011-01-19  Fred  <frederic.lespez@free.fr>
323
324         PuppetFileserver: new lens for Puppet's fileserver.conf
325
326 2011-01-19  David Lutterkort  <lutter@redhat.com>
327
328         * man/augtool.pod: fix typos
329         Fixes https://bugzilla.redhat.com/show_bug.cgi?id=628502
330
331 2011-01-14  David Lutterkort  <lutter@redhat.com>
332
333         Allow compiling with NDEBUG defined
334           * src/errcode.h (ensure0): do not mention 'error' label when NDEBUG is
335             defined
336           * src/pathx.c (coerce_to_bool, eval_pred): make sure we return something
337             when assert(0) is compiled away
338
339 2011-01-13  Francis Giraldeau  <francis.giraldeau@gmail.com>
340
341         Fix a small bashism from test script
342
343 2011-01-13  David Lutterkort  <lutter@redhat.com>
344
345         Xorg: "position" in "screen" section is optional; allow "Extensions" section
346         Patch by omzzk
347
348         Fixes bug #175
349
350 2011-01-11  David Lutterkort  <lutter@redhat.com>
351
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.
355
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
360
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.
365
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
368         reliable fashion
369
370         * src/pathx.c (store_error): never append to an uninitialized string
371
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
375         is a tty)
376
377 2011-01-11  Fred  <frederic.lespez@free.fr>
378
379         Crypttab: new lens for /etc/crypttab
380
381 2011-01-11  Raphaël Pinson  <raphink@gmail.com>
382
383         In autosave mode, print "save" when in echo or interactive mode. Remove comma at the end of enum list.
384
385 2011-01-10  Raphaël Pinson  <raphink@gmail.com>
386
387         Refactor augtool.c to use only readline
388
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
394
395         Fixes ticket #172
396
397 2011-01-07  David Lutterkort  <lutter@redhat.com>
398
399         bootstrap: add sys_wait module
400         Fixes bug #164
401
402 2011-01-07  Dominic Cleal  <dcleal@redhat.com>
403
404         Add support for Solaris multiboot kernels with slashes in the first kernel argument (Fix ticket #158)
405
406         Allow kernel$ and module$ extensions to GRUB for Solaris (Fix ticket #158)
407
408 2011-01-07  David Lutterkort  <lutter@redhat.com>
409
410         Shellvars: read various snmpd config files
411         Patch by erinn
412
413         Fixes ticket #170
414
415 2011-01-07  Dominic Cleal  <dcleal@redhat.com>
416
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
421
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,
424         bitwise AND and OR).
425
426 2011-01-07  David Lutterkort  <lutter@redhat.com>
427
428         Resolv: allow comments starting with semicolon
429         Patch by erinn
430
431         Fixes bug #173
432
433 2011-01-03  Raphaël Pinson  <raphink@gmail.com>
434
435         Add automount, netmasks and sendmailvars keywords for databases in nsswitch.aug
436
437         Add bootparams as database keyword (Fix ticket #171) Update test file accordingly
438
439 2010-12-29  Raphaël Pinson  <raphink@gmail.com>
440
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
442
443 2010-12-28  Francis Giraldeau  <francis.giraldeau@usherbrooke.ca>
444
445         Add xml lens
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.
449
450         Supported:
451           * Document type declaration: elements, attlist, entity
452           * XML Prolog
453           * XML comments
454           * XML processing instructions
455           * Neested elements, including empty elements
456           * Element attributes
457           * Mixed content, text and elements
458           * CDATA sections
459
460         Not supported:
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
464
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.
469
470 2010-12-22  Raphaël Pinson  <raphink@gmail.com>
471
472         Fix ticket #169 and add unit tests by Sergio Ballestrero.
473
474 2010-12-20  David Lutterkort  <lutter@redhat.com>
475
476         * src/pathx.c (func_regexp): do not SEGV on error; provide better error msg
477         Fixes bug 168
478
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
488
489         # Please enter the commit message for your changes. Lines starting
490         # with '#' will be ignored, and an empty message aborts the commit.
491         # On branch master
492         # Changes to be committed:
493         #   (use "git reset HEAD <file>..." to unstage)
494         #
495         #       modified:   src/pathx.c
496         #
497         # Untracked files:
498         #   (use "git add <file>..." to include in what will be committed)
499         #
500         #       doc/cfg.txt
501         #       doc/naturaldocs/conf/lenses/Menu_Backup.txt
502         #       doc/naturaldocs/conf/lenses/Menu_Backup_2.txt
503         #       p/
504         #       site.orig/
505         #       tests/root-small/
506         #       tests/root/etc/network/
507         #       tests/root/etc/samba/
508         #       tests/root/etc/sysconfig/system-config-firewall
509
510 2010-12-10  Francis Giraldeau  <francis.giraldeau@usherbrooke.ca>
511
512         Enable square lens in dump_lens
513
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.
519
520           * src/builtin.c: add "square" keyword to language
521           * src/lens.c: lns_make_square to compile the lens from actual simpler
522             lenses
523           * src/lens.h: append L_SQUARE to lens_tag enum to identify the square lens
524             type object
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
528             L_SQUARE
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
533
534 2010-12-09  Francis Giraldeau  <francis.giraldeau@usherbrooke.ca>
535
536         Add test for lens-access.sh in Makefile
537
538 2010-12-02  Raphaël Pinson  <raphink@gmail.com>
539
540         Relicense pg_hba.aug as LGPLv2+ as the rest of Augeas.
541
542 2010-12-02  Lorenzo Dalrio  <lorenzo.dalrio@gmail.com>
543
544         Add access.aug and associated test file
545
546 2010-12-02  Raphaël Pinson  <raphink@gmail.com>
547
548         Fix GPL into LGPLv2+ for a series of lenses.
549
550 2010-11-24  Francis Giraldeau  <francis.giraldeau@gmail.com>
551
552         Ignore eclipse project files
553
554 2010-11-22  Raphael Pinson  <raphink@gmail.com>
555
556         Add support for "map" entries in grub.aug and adapt test accordingly (Fix ticket #148)
557
558 2010-11-19  David Lutterkort  <lutter@redhat.com>
559
560         Version 0.7.4
561
562 2010-11-19  Raphaël Pinson  <raphink@gmail.com>
563
564         * lenses/util.aug: improve management of eol comments
565           - add comment_generic
566           - use comment_generic in comment
567           - add comment_eol
568           - add comment_or_eol
569
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.
573
574         Add "indomU" Debian setting to grub.aug (Fix ticket #162)
575
576         Allow "\" style newlines in syslog.aug and add corresponding test (Fix ticket #161).
577
578 2010-11-18  Raphael Pinson  <raphink@gmail.com>
579
580         Make filter a View in sudoers.aug to make it appear properly in doc
581
582         Improve doc on services.aug
583
584         Add some doc to pg_hba.aug
585
586         Add a bit of doc to pbuilder.aug
587
588         Add all missing lenses to Menu.txt
589
590 2010-11-18  Mathieu Arnold  <mat@FreeBSD.org>
591
592         Add syslog.aug and associated test file
593
594 2010-11-18  Raphaël Pinson  <raphink@gmail.com>
595
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
597         Fix ticket #46
598
599 2010-11-18  Mathieu Arnold  <mat@FreeBSD.org>
600
601         On FreeBSD (at least) the sudoers file is in /usr/local/etc/.
602
603 2010-11-18  Francis Giraldeau  <francis.giraldeau@gmail.com>
604
605         Parse ulimit builtin in shellvars.aug (fix ticket #73).
606
607         Accept double quotes in arguments in postfix_master.aug, fix bug# 69
608
609 2010-11-18  David Lutterkort  <lutter@redhat.com>
610
611         * tests/Makefile.am (lens_tests): add tests for new lenses
612
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.
617
618         Fixes bug https://fedorahosted.org/augeas/ticket/139
619
620 2010-11-18  Matthew Booth  <mbooth@redhat.com>
621
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:
627
628         https://fedorahosted.org/augeas/ticket/149
629
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
642         optimizer.
643
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
647         example:
648
649         printf("%p", dict);
650
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.
656
657 2010-11-17  Raphael Pinson  <raphink@gmail.com>
658
659         Allow underscore in chain_name for iptables.aug and adjust test accordingly.
660
661 2010-11-17  Erinn Looney-Triggs  <erinn.looneytriggs@gmail.com>
662
663         Add login_defs.aug and associated test file.
664
665 2010-11-14  Marc Fournier  <marc.fournier@camptocamp.com>
666
667         pg_hba: added debian systems path to filter - fixes #154.
668
669         util.aug: exclude unneeded files on debian systems (fix ticket #153)
670
671 2010-11-05  Raphael Pinson  <raphink@gmail.com>
672
673         Map comments and use Util.comment and Util.empty in order to full fix ticket #151. Adapt test accordingly.
674
675         Allow indented lines in aptsources.aug (Fix ticket #151) and add associated test
676
677         Allow "=" as a separator for title in grub.aug (Fix ticket #150) and adapt test accordingly.
678
679 2010-11-04  Raphael Pinson  <raphink@gmail.com>
680
681         Fix example in lens
682
683 2010-11-02  Raphael Pinson  <raphink@gmail.com>
684
685         Add a few lenses to Menu.txt
686
687         Add shells.aug and associated test
688
689 2010-11-01  Raphael Pinson  <raphink@gmail.com>
690
691         Add mke2fs.aug and associated test
692
693 2010-10-31  Raphael Pinson  <raphink@gmail.com>
694
695         Add support for rpc services in inetd.aug, rework lens to allow it and add tests accordingly.
696
697         Parse option values in fstab.aug, adapt test file accordingly.
698
699         Map service names in node values instead of node names to prevent variable node names.
700
701 2010-10-29  Raphael Pinson  <raphink@gmail.com>
702
703         Add /etc/mtab to known files
704
705 2010-10-28  Raphael Pinson  <raphink@gmail.com>
706
707         Fix paramater into parameter in ND comment
708
709 2010-10-27  Raphael Pinson  <raphink@gmail.com>
710
711         Use generic modules in bbhosts.aug
712
713 2010-10-26  Francis Giraldeau  <francis.giraldeau@gmail.com>
714
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.
719
720 2010-10-26  Raphael Pinson  <raphink@gmail.com>
721
722         Fix filter to use proper file
723
724         Remove trailing whitespace
725
726         Add nsswitch.aug and associated test
727
728 2010-10-26  Francis Giraldeau  <francis.giraldeau@gmail.com>
729
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
733         AUGEAS_DEBUG=lenses
734
735 2010-10-26  David Lutterkort  <lutter@redhat.com>
736
737         Sudoers: allow 'visiblepw' parameter flag
738         Fix provided by christj. Fixes bug #143
739
740 2010-10-26  Francis Giraldeau  <francis.giraldeau@gmail.com>
741
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. 
745
746         Fix ticket #146
747
748 2010-10-26  Raphael Pinson  <raphink@gmail.com>
749
750         /etc/sudoers.d is now supported (at least in Debian and Ubuntu)
751
752         Add resolv.aug and test
753
754 2010-10-14  Aurelien Bompard  <aurelien@bompard.org>
755
756         Pg_hba: new lens and test
757         Fixes bug #140
758
759 2010-09-30  Raphaël Pinson  <raphink@gmail.com>
760
761         Add a few lenses to Menu.txt
762
763         Use Rx.ipv4 and Rx.integer in openvpn.aug
764
765         Use generic modules Rx, Sep and Build in keepalived.aug
766
767         Add email_addr to rx.aug
768
769         Improve build.aug
770
771         Improve documentation of build.aug
772
773 2010-09-29  Raphaël Pinson  <raphink@gmail.com>
774
775         Move Build, Rx and Sep into Generic Modules, add Keepalived
776
777 2010-09-24  Raphaël Pinson  <raphink@gmail.com>
778
779         Improve keepalived.aug
780
781 2010-09-23  Raphaël Pinson  <raphink@gmail.com>
782
783         Add a lens for keepalived.conf and associated test
784
785 2010-09-23  David Lutterkort  <lutter@redhat.com>
786
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.
793
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
798         aug_xxx functions.
799
800         Fixes bug #138
801
802 2010-09-21  Raphaël Pinson  <raphink@gmail.com>
803
804         * src/augtool.c: add -f|--file option to get commands from an input file
805
806 2010-09-21  Marc Fournier  <marc.fournier@camptocamp.com>
807
808         Nrpe: new lens and tests.
809
810         Odbc: new lens and tests.
811
812 2010-09-15  David Lutterkort  <lutter@redhat.com>
813
814         When setting a tree node to the value it already has, do not modify the tree
815
816 2010-09-09  David Lutterkort  <lutter@redhat.com>
817
818         * src/try: add an optioj to strace augtool
819
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.
825
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.
834
835         Thanks to Laine Stump for spotting this
836
837 2010-08-27  Francis Giraldeau  <francis.giraldeau@gmail.com>
838
839         Fix yum tests
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
843
844 2010-08-27  David Lutterkort  <lutter@redhat.com>
845
846         * bootstrap: add locale module from gnulib
847         Fixes bug #137
848
849 2010-08-16  David Lutterkort  <lutter@redhat.com>
850
851         Yum: accept continuation lines for gpgkey
852         Fixes bug #132
853
854 2010-08-16  Francis Giraldeau  <francis.giraldeau@gmail.com>
855
856         * src/get.c (visit_exit): fix segfault from empty stack for L_MAYBE
857         Fixes bug #136
858
859 2010-08-06  David Lutterkort  <lutter@redhat.com>
860
861         Version 0.7.3
862
863         Fix behavior of aug_defnode
864           (1) Make sure that the definition of the variable is recorded under
865               /augeas/variables
866           (2) Do not report an error if the expression evaluates to a non-empty
867               nodeset
868
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
872             definition
873           * tests/test-api.c: add tests for defvar and defnode behavior
874
875 2010-08-05  David Lutterkort  <lutter@redhat.com>
876
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.
880
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
884             root
885
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
890         tree_replace.
891
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
895             global symtab
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
899
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
904
905 2010-08-03  Raphael Pinson  <raphink@gmail.com>
906
907         Sudoers: allow escaped spaces in user/group names
908         Fixes bug #124
909
910 2010-07-26  David Lutterkort  <lutter@redhat.com>
911
912         Limits: also look for files in /etc/security/limits.d
913         Suggested by David Timms
914
915 2010-07-23  Tim Stoop  <tim.stoop@gmail.com>
916
917         Mysql: lens for MySQL's *.cnf files
918
919 2010-07-23  David Lutterkort  <lutter@redhat.com>
920
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.
926
927         This lens is a variation on Shellvars that changes a few important aspects
928         of it:
929
930           * Strip quotes from values when reading a file, and restore quotes as
931             needed upon writing
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
934             syntax)
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
938
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.
941
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.
945
946 2010-07-21  David Lutterkort  <lutter@redhat.com>
947
948         * src/syntax.c (load_module_file): make sure we report an error
949
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
954         was NULL.
955
956         Fixes bug #129
957
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 '= *')
961
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
966
967 2010-07-20  Francis Giraldeau  <francis.giraldeau@gmail.com>
968
969         * src/put.c (split_concat): fix memory leak when split doesn't match
970
971 2010-07-19  David Lutterkort  <lutter@redhat.com>
972
973         Use gnulib from a submodule
974         This allows us to record the exact changeset from gnulib that everybody
975         should be using.
976
977 2010-07-19  Frederik Wagner  <fnerdwq@googlemail.com>
978
979         Added /etc/sysconfig/suseconfig to shellvars lens.
980
981 2010-07-08  Francis Giraldeau  <francis.giraldeau@gmail.com>
982
983         Adding is_scan in the condition to accept an item
984
985 2010-06-30  Matthew Booth  <mbooth@redhat.com>
986
987         Device_map: new lens for grub's device.map
988
989 2010-06-29  David Lutterkort  <lutter@redhat.com>
990
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.
994
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.
998
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
1002             tree_store_value
1003
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
1007
1008         Add xstrtoint64 to internal.[ch]
1009         The implementation is directly from libvirt
1010
1011           * src/internal.h (xstrtoint64): add prototype
1012           * src/internal.c (xstrtoint64): add impl
1013
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
1016
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
1021
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.
1026
1027         The change in behavior is backwards compatible, since at worst, users will
1028         redefine variables themselves after an aug_load
1029
1030         * src/augeas.c (aug_init): create /augeas/variables on startup
1031
1032         * src/augeas.c (aug_defvar): use constants to create /augeas/variables
1033
1034 2010-06-22  David Lutterkort  <lutter@redhat.com>
1035
1036         Version 0.7.2
1037
1038         * augeas.spec.in: fix ownership of /usr/share/augeas
1039         fixes BZ 569393
1040
1041 2010-06-17  David Lutterkort  <lutter@redhat.com>
1042
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
1046
1047         * src/augeas.c (aug_setm): do not segfault when sub is NULL
1048
1049 2010-06-17  Frederik Wagner  <fnerdwq@gmail.com>
1050
1051         Tests for new aug_setm function
1052         Test through augtool calls.
1053
1054         Exposed aug_setm to augtool.
1055
1056 2010-06-17  David Lutterkort  <lutter@redhat.com>
1057
1058         Add aug_setm to API
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
1062
1063 2010-05-24  Frederik Wagner  <fnerdwq@googlemail.com>
1064
1065         Shellvars: added SuSE sysconfig puppet files
1066         For SuSE systems, added /etc/sysconfig/{puppet,puppetmaster} to lens.
1067
1068 2010-05-18  Frederik Wagner  <fnerdwq@googlemail.com>
1069
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'.
1073
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
1077
1078 2010-05-13  David Lutterkort  <lutter@redhat.com>
1079
1080         Add modules_conf to naturaldocs Menu
1081
1082         Add /etc/modules.conf from hell
1083         Actually, from http://www.janerob.com/rob/ts5100/modules.conf
1084
1085 2010-05-13  Matthew Booth  <mbooth@redhat.com>
1086
1087         Modules_conf: new lens for modules.conf and conf.modules
1088
1089         Modprobe: Refactor to make re-use easier
1090
1091 2010-05-11  David Lutterkort  <lutter@redhat.com>
1092
1093         * src/augeas.c: record expression for defvar in /augeas/variables
1094
1095 2010-05-07  David Lutterkort  <lutter@redhat.com>
1096
1097         * Grub: handle comments within a boot stanza
1098         Fixes RH BZ 590067
1099
1100         Adjust copyright notices
1101           - copyright is from creation of file through 2010
1102           - adjust copyright owner according to Red Hat's policy
1103
1104 2010-05-04  Raphael Pinson  <raphink@gmail.com>
1105
1106         Group: add test for disabled account ('!' in password field)
1107
1108 2010-04-27  seph  <seph@directionless.org>
1109
1110         Shellvars: process /etc/environment
1111
1112 2010-04-26  Nicolas Valcárcel Scerpella  <nvalcarcel@ubuntu.com>
1113
1114         Iptables: also look for /etc/iptables-save
1115         This is where Debian keeps iptables rules
1116
1117 2010-04-26  Frederik Wagner  <fnerdwq@googlemail.com>
1118
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
1124
1125 2010-04-21  David Lutterkort  <lutter@redhat.com>
1126
1127         Version 0.7.1
1128
1129 2010-04-21  Simon Josi  <josi@puzzle.ch>
1130
1131         Securetty: new lens and test for /etc/securetty
1132
1133 2010-04-21  David Lutterkort  <lutter@redhat.com>
1134
1135         Sudoers: use example file from Fedora 13
1136         This is causing trouble with release-0.7.0, but not this revision.
1137
1138         File was reported in bug #122
1139
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.
1144
1145         Tests now mostly pass (82/85) on the OpenCSW Solaris 5.10 build machine
1146
1147         * tests/test-save.c: use proper includes for WIFEXITED
1148         Without them, the build fails on FreeBSD
1149
1150 2010-04-20  David Lutterkort  <lutter@redhat.com>
1151
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
1157         character.
1158
1159         Debctrl: whitespace cleanup, no functional change
1160
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 '\|'
1163
1164           * tests/fatest.c (testExpandCharRanges): test escaping of literal '|'
1165
1166 2010-04-19  David Lutterkort  <lutter@redhat.com>
1167
1168         * tests/fatest.c (print_regerror): do not use alloca
1169
1170         * bootstrap: pull in isblank explicitly
1171         Fixes bug #111
1172
1173         * src/lens.c (lns_check_rec): fix refcounting mistake on error path
1174         Fixes bug #120
1175
1176         * src/augtool.c: report an error when 'get' fails
1177
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.
1181
1182         Fixes bug #121
1183
1184 2010-04-16  David Lutterkort  <lutter@redhat.com>
1185
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.
1192
1193         By changing the return value for jmt_visit, it's now possible to
1194         distinguish between internal errors, syntax errors and successful parses
1195         properly.
1196
1197         * src/get.c (visit_exit): handle L_MAYBE
1198         Added test to tests/modules/pass_simple_recursion.aug, lens 'maybe'
1199
1200         Fixes bug #119
1201
1202         * src/jmt.c (build_tree): print debug output for build_nullable
1203
1204 2010-03-12  David Lutterkort  <lutter@redhat.com>
1205
1206         * lenses/tests/test_logrotate.aug: add test for files separated by newlines
1207         This test the fix for bug #104, commit fe0453ce.
1208
1209 2010-03-11  David Lutterkort  <lutter@redhat.com>
1210
1211         * lenses/group.aug (password): remove backslashes
1212         Backslashes in char classes are taken literally, they do not escape a
1213         character.
1214
1215 2010-03-11  root  <root@lx200.costest.lrz.de>
1216
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
1220
1221 2010-03-11  David Lutterkort  <lutter@redhat.com>
1222
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
1225         path.
1226
1227 2010-03-05  David Lutterkort  <lutter@redhat.com>
1228
1229         * src/lens.c (lns_format_atype): format L_REC lenses
1230
1231         * src/lens.c: remove asserts; better error for missed tag in switch
1232
1233         Shellvars: handle a bare 'export VAR'
1234
1235         Inittab: allow ':' in the process field
1236         Fixes part of bug #109
1237
1238 2010-03-05  Tim Stoop  <tim.stoop@gmail.com>
1239
1240         Approx: allow keywords starting with '$'
1241
1242 2010-03-04  David Lutterkort  <lutter@redhat.com>
1243
1244         Approx: lens and test for the approx proxy server
1245
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
1248         the error message.
1249
1250 2010-03-03  David Lutterkort  <lutter@redhat.com>
1251
1252         * src/fa.c: allow the strange regexp syntax '(a|)'
1253         POSIX allows it, and so do we now
1254
1255         Fixes bug #113
1256
1257 2010-03-02  David Lutterkort  <lutter@redhat.com>
1258
1259         Passwd: parse NIS entries on Solaris
1260         Based on a fix by Stuart Sears
1261
1262 2010-02-26  David Lutterkort  <lutter@redhat.com>
1263
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).
1267
1268         Rename _E and _F to E and F, and eliminate _N.
1269
1270 2010-02-26  Frederik Wagner  <wagner@lrz.de>
1271
1272         Modprobe: Suse includes
1273         * lenses/modprobe.aug: included /etc/modprobe.conf.local
1274
1275         Shellvars: Suse includes
1276         * lenses/shellvars.aug:
1277             added include for /etc/sysconfig/network/ifcfg-
1278
1279         Grub: support empty kernel parameters, Suse incl.s
1280         * lenses/grub.aug:
1281           - added support for kernel parameters of the form "parameter="
1282             w/o given value
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
1286
1287 2010-02-26  Dominique Dumont  <domi.dumont@free.fr>
1288
1289         Debctrl: new lens and test
1290
1291 2010-02-23  David Lutterkort  <lutter@redhat.com>
1292
1293         Ntp: add 'tinker' directive
1294         Fixes bug #103
1295
1296         Logrotate: tolerate whitespace at the end of a line
1297         Fixes bug #101
1298
1299 2010-02-23  Raphael Pinson  <raphink@gmail.com>
1300
1301         Dhclient: add rfc code parsing
1302         Fixes bug #107
1303
1304         Sudoers: allow del_negate even if no negate_node is found
1305         Fixes bug #106
1306
1307         Logrotate: files can be separated by newlines
1308         Fixes bug #104
1309
1310         Dput: add 'allow_dcut' parameter
1311         Fixes bug #105
1312
1313 2010-02-22  David Lutterkort  <lutter@redhat.com>
1314
1315         * src/augtool.c: ignore empty lines from stdin
1316         We still complain about the nonsensical 'augtool ""'.
1317
1318         Fixes BZ 566844 reported by Mike Burns
1319
1320 2010-02-22  Stuart Sears  <ssears@redhat.com>
1321
1322         Sudoers (parameter_string_nobool_kw): accept "secure_path "
1323         Fixes BX 566134
1324
1325 2010-02-19  Tim Stoop  <tim.stoop@gmail.com>
1326
1327         Nagisocfg: lens and test for /etc/nagios3/nagios.cfg
1328
1329 2010-02-12  Ivana Hutarova Varekova  <varekova@redhat.com>
1330
1331         Cgrules: new lens and test
1332         See cgrules.conf for http://libcg.sourceforge.net/
1333
1334 2010-02-11  Ivana Hutarova Varekova  <varekova@redhat.com>
1335
1336         Cgconfig: lens and tests for libcgroup config
1337         See http://libcg.sourceforge.net/
1338
1339 2010-02-11  Laine Stump  <laine@laine.org>
1340
1341         * src/transform.c (file_info): fix memory leak
1342
1343 2010-02-09  David Lutterkort  <lutter@redhat.com>
1344
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.
1348
1349 2010-02-08  David Lutterkort  <lutter@redhat.com>
1350
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
1355
1356         * src/fa.c (parse_int): flag not parsing anything as an error
1357
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)
1361
1362         Also adds two pathological lenses and tests to
1363         pass_simple_recursion.aug. Those tests fail without caller filtering.
1364
1365         * AUTHORS: reformatted
1366
1367         * tests/Makefile.am: add test for cobblermodules.aug
1368
1369 2010-02-08  Shannon Hughes  <shughes@redhat.com>
1370
1371         Cobblermodules: lens + tests for cobbler's modules.conf
1372
1373 2010-02-02  David Lutterkort  <lutter@redhat.com>
1374
1375         Shellvars: allow spaces after/before opening/closing parens for array
1376         Bug reported by Doug Warner
1377
1378 2010-02-01  Matthew Palmer  <matt@anchor.net.au>
1379
1380         Sshd: allow optional arguments in subsystem commands
1381
1382 2010-01-27  David Lutterkort  <lutter@redhat.com>
1383
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.
1386
1387         This line also triggered a SEGV when sub == NULL; this happened, for
1388         example, when /etc/apt/preferences was an empty file.
1389
1390         Bug reported by Matt Palmer
1391
1392         * src/get.c (no_match_error): initialize lname
1393         Otherwise, gcc complains about a possibly uninitialized value with -O2
1394
1395 2010-01-25  David Lutterkort  <lutter@redhat.com>
1396
1397         Test for using a recursive lens inside other lenses
1398
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
1402
1403         rec_process will also build the jmt if it does not exist yet
1404
1405         Fixes ticket #100
1406
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.
1412
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
1416
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
1419             internal
1420
1421         * src/jmt.c (print_grammar): recurse into L_REC if they are not rec_internal
1422
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.
1428
1429         Split build_tree into build_children (collects a list of child nodes) and
1430         build_tree which creates the tree for a nonterminal.
1431
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.
1435
1436         * src/lens.c: propagate rec_internal in the body of an L_REC
1437
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.
1441
1442         * src/lens.h (struct lens): explain better how we handle recursive lenses
1443
1444         * src/jmt.c (build_trace): allow passing in a NULL item
1445
1446         * src/lens.c (tags): add name for value primitive
1447
1448         * src/get.c: replace assert's by ensure's
1449         assert aborts, which a library shouldn't do
1450
1451         * src/errcode.h (ensure0): convenience version of ensure
1452
1453         * src/get.c (find_seq): properly report OOM, do not call abort
1454
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
1458         BUG_ON instead.
1459
1460         * src/get.c (struct state): make info a pointer
1461
1462 2010-01-23  David Lutterkort  <lutter@redhat.com>
1463
1464         * src/lens.c (restrict_regexp): properly report OOM
1465
1466 2010-01-20  David Lutterkort  <lutter@redhat.com>
1467
1468         Document the basics of building from git
1469
1470 2010-01-15  David Lutterkort  <lutter@redhat.com>
1471
1472         * src/builtin.c: builtins for printing and inspecting lenses
1473
1474         Add a unit type
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
1477         legal.
1478
1479         Language: allow '_' as an identifier that is never bound
1480           The expression
1481             let _ = something
1482           will evaluate something and then immediately forget it
1483
1484           * src/lexer.l (LID): allow leading underscore
1485           * src/syntax.c (bind, bind_type): do not bind '_'
1486
1487         New primitive lens 'value'
1488         In analogy to 'label', this lens allows setting the value of a tree node to
1489         a fixed string
1490
1491 2010-01-14  David Lutterkort  <lutter@redhat.com>
1492
1493         Version 0.7.0
1494
1495         Json: lens and tests for generic Json files
1496
1497         Tests for recursive (context free) lenses
1498
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.
1502
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
1506         ident = exp'.
1507
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
1511             lns_check_rec
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
1515
1516         * src/get.c (get_rec, parse_rec): get/parse for recursive lenses
1517
1518         * src/put.c: put/create for recursive lenses
1519
1520         Remember the jmt in the lens and free it when it is no loner needed
1521
1522         Earley parser based on Jim/Mandelbaum's transducers
1523
1524         Calculate if a lens's ctype is nullable
1525
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
1529
1530         Suppress buildtime typechecks for L_REC; propagate recursive flag
1531
1532         * src/lens.c (free_lens): free recursive lenses
1533
1534         * src/lens.h: add a recursive lens combinator
1535
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.
1543
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
1547
1548         struct error: add pointer back to struct augeas
1549
1550         * src/errcode.h: more usable BUG_ON and BUG_FMT
1551
1552         * src/lens.c (ambig_check): report OOM from fa_ambig_example
1553
1554         * src/fa.c (fa_ambig_example): getting a NULL example is not an error
1555
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
1559         the first error.
1560
1561         * TODO: deleted, that list is in Trac now
1562
1563         * src/fa.c (fa_intersect): initialize vars that could be used on error
1564
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.
1568
1569         * src/fa.c (fa_as_regexp): fin only accepting state, no trans fin->fin
1570
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
1574
1575 2010-01-13  David Lutterkort  <lutter@redhat.com>
1576
1577         Add syntax for case-insensitive regexps
1578         A regexp literal /regexp/i will be converted to a case-insensitive regexp.
1579
1580         * src/regexp.c (regexp_minus): respect nocase flags
1581
1582         * src/lens.c (str_to_fa): compile nocase fa when needed
1583
1584         * src/lens.c (str_to_fa): remove FIXME's and use proper error reporting
1585
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.
1590
1591         Adjust all uses of make_regexp.
1592
1593         Add fa_expand_nocase to libfa
1594
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
1605
1606         * src/lens.c (subtree_atype): new function
1607
1608 2010-01-07  David Lutterkort  <lutter@redhat.com>
1609
1610         Facelift for augtool
1611         This makes augtool somewhat friendlier, mostly because
1612
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
1615             about a command
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() ]'
1619
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
1624
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
1627             file_name_path
1628
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
1632         lens/info
1633
1634           * src/transform.c (add_file_info): change what we keep underneath the
1635             lens node
1636           * tests/xpath.tests (lircd-ancestor): adapt to metadata change
1637
1638         * src/transform.c (add_file_info): manipulate tree directly
1639         Going through public functions like aug_set is silly, and causes all kinds
1640         of string munging.
1641
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
1647
1648         New function transform_file_error
1649           * src/transfrom.h (transform_file_error): add prototype
1650           * src/transform.c (transform_file_error): new function
1651
1652         New function xfm_lens_name
1653           * src/transfrom.h (xfm_lens_name): add prototype
1654           * src/transform.c (xfm_lens_name): new function
1655
1656         Tree functions to find/create a node with a path expression
1657         Internal counterparts to aug_get and aug_set
1658
1659           * src/internal.h (tree_find, tree_find_cr): new prototypes
1660           * src/augeas.c (tree_find, tree_find_cr): new functions
1661
1662         * src/internal.h: make various tree management functions available
1663
1664 2010-01-06  David Lutterkort  <lutter@redhat.com>
1665
1666         Xinetd (name): fix bad '-' in character class
1667
1668 2010-01-05  David Lutterkort  <lutter@redhat.com>
1669
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
1675
1676         Fixes bug #98
1677
1678         New error code AUG_ENOLENS
1679         Indicates failure to look a lens up by name from /augeas/load/*/lens
1680
1681           * src/augeas.h (aug_errcode_t): new value AUG_ENOLENS
1682           * src/augeas.c (errcodes): new entry for AUG_ENOLENS
1683
1684         * src/lens.c (lens_release): tolerate a NULL lens
1685
1686 2010-01-04  Bryan Kearney  <bkearney@localhost.localdomain>
1687
1688         Cobblersettings: new lens and test
1689
1690 2010-01-04  David Lutterkort  <lutter@redhat.com>
1691
1692         Rename read_file to xread_file
1693
1694 2009-12-23  David Lutterkort  <lutter@redhat.com>
1695
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.
1699
1700         * src/lens.c (format_lens): minimalistic pretty-printing of a lens
1701
1702         * src/regexp.c (print_regexp): clean the regexp with fa_restrict_alphabet
1703
1704 2009-12-18  David Lutterkort  <lutter@redhat.com>
1705
1706         * src/builtin.c (lens_get, lens_put): propagate errors as exceptions
1707
1708         More convenience macros for errors
1709         Add BUG_ON and ERR_RET macros for reporting internal errors
1710
1711           * src/errcode.h (BUG_ON, ERR_RET, HAS_ERR): new macros
1712           * src/errcode.c (bug_on): implementation for BUG_ON
1713
1714 2009-12-17  David Lutterkort  <lutter@redhat.com>
1715
1716         Lokkit: allow '-' in arguments
1717
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
1721
1722 2009-12-14  David Lutterkort  <lutter@redhat.com>
1723
1724         * doc/ftdetect/augeas.vim: fix syntax
1725
1726 2009-12-09  Partha Aji  <paji@redhat.com>
1727
1728         Made samba aug accept entry keys with ':' in them
1729
1730 2009-12-09  David Lutterkort  <lutter@redhat.com>
1731
1732         Shellvars: allow arrays that span multiple lines
1733
1734 2009-12-07  David Lutterkort  <lutter@redhat.com>
1735
1736         Iptables: allow quoted strings as arguments
1737
1738 2009-11-30  David Lutterkort  <lutter@redhat.com>
1739
1740         Version 0.6.0
1741
1742         Distribute and install vim syntax files
1743         Fixes ticket #97
1744
1745         * Makefile.maint: sign tags
1746
1747         Krb5: allow v4_name_convert in libdefaults section
1748         Fixes part of ticket #95
1749
1750         Fstab: allow # in the spec
1751         Fixes part of ticket #95
1752
1753         Group: allow empty password field
1754         Fixes part of ticket #95
1755
1756         * src/parser.y: properly initialize yylloc
1757         Fixes ticket #96
1758
1759 2009-11-25  David Lutterkort  <lutter@redhat.com>
1760
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
1767
1768         Fixes ticket #93
1769
1770         * src/lexer.l: include errcode.h; fix bad use of report_error
1771
1772         * src/errcode.c: include stdarg.h
1773
1774         Cron: variable names can contain '_' etc.
1775         Use Shellvars.key_re for consistency.
1776
1777         Fixes ticket #94
1778
1779 2009-11-25  Matt Palmer  <mpalmer@hezmatt.org>
1780
1781         AptPreferences: add a put test
1782         Make sure we handle an empty file properly, and cleanup the resulting
1783         hassle
1784
1785 2009-11-24  Matt Palmer  <mpalmer@hezmatt.org>
1786
1787         Normalise records so that empty lines (which are a required part of the syntax) don't creep into the tree
1788
1789         Support version pins in apt_preferences
1790
1791 2009-11-23  David Lutterkort  <lutter@redhat.com>
1792
1793         * tests/Makefile.am (lens_tests): run postfix_access tests
1794
1795 2009-11-16  Partha Aji  <paji@redhat.com>
1796
1797         Added a Post Fix Access lens along with the unit tests
1798
1799 2009-11-13  David Lutterkort  <lutter@redhat.com>
1800
1801         * src/lens.c (ambig_check): distinguish error between concat and iteration
1802
1803         * src/regexp.c (regexp_escape): treat NULL regexps as the empty regexp
1804
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)/
1807
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
1811                         been seen
1812
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.
1816
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.
1821
1822 2009-11-12  David Lutterkort  <lutter@redhat.com>
1823
1824         * src/info.c (print_info): do not choke on NULL info
1825
1826         * src/internal.h: new macros MEMCMP and MEMMOVE
1827
1828         * src/lens.c (lns_make_subtype): explain type derivation
1829
1830         * examples/fadot.c: by default, print minimized regexp
1831
1832         * examples/fadot.c: fix formatting, no functional changes
1833
1834 2009-11-10  David Lutterkort  <lutter@redhat.com>
1835
1836         Make augparse and augtool use user's locale
1837
1838         * test/Makefile.am (TEST_ENVIRONMENT): set LANG to a non-C locale
1839
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
1843         the C locale.
1844
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
1850             regexp_c_locale
1851           * src/regexp.c (regexp_escape): compress character ranges for printing
1852           * src/regexp.c (regexp_minus): expand charcter ranges
1853
1854         Fixes ticket #35 for systems that do not have uselocale (for systems with
1855         uselocale, the fix is commit 07b6a880)
1856
1857         libfa: new function fa_expand_char_ranges
1858
1859         Calls to __aug_load_module need to go through api_entry/api_exit
1860
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
1864         locale on API exit.
1865
1866         That also makes it necessary that aug_init wraps the bulk of its work
1867         inside an api_entry/api_exit.
1868
1869         Fixes ticket #35 for systems that have uselocale
1870
1871 2009-10-26  David Lutterkort  <lutter@redhat.com>
1872
1873         Inittab: parse end-of-line comments into a #comment
1874
1875 2009-10-23  David Lutterkort  <lutter@redhat.com>
1876
1877         * src/lens.c (lns_make_subtree): parenthesize key and value patterns
1878         These patterns may be a union not enclosed in parens
1879
1880         * src/regexp.c (regexp_escape): don't clobber last character
1881
1882         * src/lens.c: use regexp_escape to print regexps in error messages
1883
1884         * src/fa.c (fa_restrict_alphabet): initialize parse
1885
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
1889         doesn't hurt.
1890
1891         * src/fa.c (re_needs_parens_in_concat): ITER doesn't need parens in concat
1892
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.
1897
1898 2009-10-22  David Lutterkort  <lutter@redhat.com>
1899
1900         bootstrap: use stpcpy and stpncpy from gnulib
1901
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
1905
1906 2009-10-21  David Lutterkort  <lutter@redhat.com>
1907
1908         Path expressions: add union operator
1909         Nodesets can now be unioned with the '|' operator
1910
1911         Fixes ticket #89
1912
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.
1916
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.
1921
1922 2009-10-20  David Lutterkort  <lutter@redhat.com>
1923
1924         Wine: new lens and test
1925         Lens for parsing textual Windows registry files
1926
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'
1931
1932         Bug reported by Shannon Hughes
1933
1934         * test/Makefile.am (lens_tests): add lens-ethers.sh
1935
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
1939
1940         Report line/column number when get/put test fails
1941           * src/builtin.c (make_exn_lns_error): add line/column number in error
1942             message
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
1946
1947         * src/get.c (get_error): use end of last match as error position
1948
1949         * man/augtool.1: regenerate
1950
1951 2009-10-19  David Lutterkort  <lutter@redhat.com>
1952
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
1956         11
1957
1958 2009-10-12  David Lutterkort  <lutter@redhat.com>
1959
1960         Rx (device_name): allow '!' in device name
1961
1962 2009-10-09  David Lutterkort  <lutter@redhat.com>
1963
1964         Lokkit: make argument for --trust more permissive
1965         The --trust option takes an interface name, whcih can be more than what
1966         token accepts.
1967
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
1971
1972         Lokkit.forward_port: add missing eol
1973         Also adjust test_lokkit.aug since we're not getting a spurious empty entry
1974         anymore
1975
1976 2009-10-06  Satoru SATOH  <satoru.satoh@gmail.com>
1977
1978         /etc/ethers: new lens and test
1979         The followings adds a new lens for /etc/ethers and associated test.
1980
1981 2009-09-30  David Lutterkort  <lutter@redhat.com>
1982
1983         * src/augparse.c: get error details from error API
1984
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
1988         abort()
1989
1990         * src/parser.y: do not print to stderr
1991
1992         * src/lexer.l: print into struct error instead of stderr
1993
1994         New error code AUG_ESYNTAX
1995
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
2000
2001         * src/lexer.l (to_int): unused, remove
2002
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.
2006
2007         Put struct error and report_error into its own file
2008         Also, make the struct error in struct augeas a pointer
2009
2010         * src/info.h: optimize layout of struct info
2011
2012         *src/syntax.c: catch some allocation errors
2013
2014         * src/ref.h (make_ref_err): convenience macro
2015
2016         * tests/fatest.c (print_regerror): only print first 40 chars of regexp
2017
2018         libfa: handle allocation failures gracefully
2019
2020         parser: report some allocation failures
2021
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
2027
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
2033
2034         * src/hash.c (hash_alloc_insert): return 0/-1 for success/error
2035
2036         Use a proper function for make_ref
2037         That allows us to require that callers check the return value
2038
2039         Handle allocation failures from define_native_intl
2040
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.
2044
2045 2009-09-24  David Lutterkort  <lutter@redhat.com>
2046
2047         * src/transform.c: do not include canonicalize.h anymore
2048         The canonicalize-lgpl gnulib module doesn't require that anymore
2049
2050 2009-09-21  David Lutterkort  <lutter@redhat.com>
2051
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
2055         path expressions.
2056
2057         * src/regexp.c (regexp_compile): do not print anything on error
2058
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
2062
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.
2065
2066         aug_match, aug_mv: return -1 when pathx evaluation fails
2067
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
2071         match.
2072
2073         * src/augtool.c: use new error API
2074         Call into the error API after each aug_* call and print error details
2075
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
2079         properly.
2080
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.
2084
2085         Reset old error messages on each entry through the API from the outside
2086
2087         * src/syntax.c (interpreter_init): report errors
2088
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
2092         programmatically.
2093
2094         * src/pathx.c (pathx_symtab_init): unused, remove
2095
2096 2009-09-18  David Lutterkort  <lutter@redhat.com>
2097
2098         * src/syntax.c (interpreter_init): fix potential leak
2099         If globbuf has entries in it when we encounter an error, we need to
2100         globfree it.
2101
2102 2009-09-17  Matt Palmer  <mpalmer@hezmatt.org>
2103
2104         Sudoers: allow certain backslash-quoted characters in a command
2105         Commands may contain backslashes by themselves and the two-char sequences
2106         \\[=:,\\]
2107
2108 2009-09-14  David Lutterkort  <lutter@redhat.com>
2109
2110         Version 0.5.3
2111
2112 2009-09-11  David Lutterkort  <lutter@redhat.com>
2113
2114         Man pages: update to match current augtool and augparse
2115
2116         Add --version option to augtool and augparse
2117         Fixes bug #88
2118
2119         A couple more files for the test root
2120
2121         Add preceding-sibling and following-sibling axes to path expressions
2122
2123 2009-09-10  David Lutterkort  <lutter@redhat.com>
2124
2125         Better error message for too many args in a path expression
2126
2127 2009-09-09  David Lutterkort  <lutter@redhat.com>
2128
2129         Slapd: include /etc/openldap/slapd.conf
2130         This is the default location in Fedora.
2131
2132         Fixes bug #85
2133
2134 2009-09-04  David Lutterkort  <lutter@redhat.com>
2135
2136         Multipath: new lens for /etc/multipath.conf
2137
2138         * src/try: fix 'set annotate' for gdb
2139
2140 2009-09-03  David Lutterkort  <lutter@redhat.com>
2141
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.
2146
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
2150         copy.
2151
2152         * src/syntax.c (print_value): use print_tree instead of dump_tree
2153
2154 2009-09-02  David Lutterkort  <lutter@redhat.com>
2155
2156         * lenses/rx.aug (fspath): simplistic regex for filesystem paths
2157
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.
2161
2162         * src/lens.c(enc_format): remove extraneous quote
2163
2164         Make fa_example work for strings with embedded NUL's
2165
2166 2009-09-01  Matt Palmer  <mpalmer@hezmatt.org>
2167
2168         Inetd: new lens and test
2169
2170 2009-08-31  David Lutterkort  <lutter@redhat.com>
2171
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
2176
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.
2180
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.
2184
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.
2187
2188         Restrict the alphabet of a regexp
2189
2190         Use offsets for various lens types
2191
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
2195         subtree combinator.
2196
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.
2200
2201         libfa: handle regexps with embedded NUL characters
2202         So far, the API promised that we could do that, but that wasn't implemented.
2203
2204         fa_compile: accept regexps with embedded NUL's
2205
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
2209
2210         * src/builtin.c (tree_clear_glue): primitive clear function for use in tests
2211
2212         Utility function xasprintf
2213         Like asprintf, but don't leave first arg in limbo on error
2214
2215         *  src/internal.h (xasprintf): new prototype
2216         *  src/internal.c (xasprintf): new function
2217
2218         regexp_release: allow NULL regexp
2219
2220         * src/augeas.c: do not read past the end of the load path
2221
2222 2009-08-14  David Lutterkort  <lutter@redhat.com>
2223
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
2227
2228         Fixes bug #68
2229
2230 2009-08-12  David Lutterkort  <lutter@redhat.com>
2231
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
2234         manner.
2235
2236           * src/transform.c (filter_generate): make a copy of gl_pathv
2237
2238 2009-08-10  David Lutterkort  <lutter@redhat.com>
2239
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.
2245
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
2249
2250         Fixes bug #79
2251
2252         Pass symtab explicitly into pathx_symtab_remove_descendants
2253
2254 2009-08-06  David Lutterkort  <lutter@redhat.com>
2255
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
2261
2262         Fixes bug #78
2263
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;
2266         instead of
2267
2268           /augeas/files/FILE/path      = /files/FILE
2269           /augeas/files/FILE/lens/info = ...
2270           /augeas/files/FILE/lens/id = 0x...
2271
2272         we only record
2273
2274           /augeas/files/FILE/path  = /files/FILE
2275           /augeas/files/FILE/lens  = ...
2276
2277         The id wasn't useful to anybody, and the lens info is useful for debugging
2278         at best
2279
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
2283
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
2288         nodes.
2289
2290           * src/augeas.c (aug_defnode): call pathx_symtab_assign_tree after
2291             creating a node
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
2296
2297 2009-08-05  David Lutterkort  <lutter@redhat.com>
2298
2299         * src/lexer.l: allow DOS line endings
2300         Accept \r\n as a line ending in addition to \n
2301
2302         Fixes RH Bugzilla 514712
2303
2304 2009-08-04  Matthew Booth  <mbooth@redhat.com>
2305
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 (")
2309
2310         This change means that explicitly parsed values will remove quotes in the
2311         get directory and insert them in the put direction.
2312
2313         Currently, only the following entries are explicitly parsed:
2314         * Option
2315         * Screen
2316         * InputDevice
2317         * Driver
2318         * SubSection
2319         * Identifier
2320         * VideoRam
2321         * DefaultDepth
2322         * Device
2323         * All entries in the Display Subsection
2324
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.
2328
2329         Add more specific entry handlers to xorg.conf
2330         Additionally handle:
2331         * Driver
2332         * Identifier
2333         * VideoRam
2334         * DefaultDepth
2335
2336         This covers all entries in the default configuration.
2337
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.
2341
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
2345         understand:
2346
2347         * Screen, in ServerLayout
2348         * InputDevice, in ServerLayout
2349         * SubSection "Display" ..., in Screen
2350
2351         This patch adds support for those values, so that the default xorg.conf on
2352         Red Hat/Fedora systems now parses.
2353
2354         It should also add support for all directives in the Display subsection,
2355         however they are not covered by the test.
2356
2357 2009-07-31  Marc Fournier  <marc.fournier@camptocamp.com>
2358
2359         vim: extra carriage return caused a parse error
2360
2361 2009-07-23  Jim Meyering  <meyering@redhat.com>
2362
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.
2367
2368 2009-07-16  David Lutterkort  <lutter@redhat.com>
2369
2370         * src/Makefile.am: link libfa with gnulib, needed on AIX
2371
2372 2009-07-14  Bruno Cornec  <Bruno.Cornec@hp.com>
2373
2374         * doc/augeas.vim: vi syntax highlighting for .aug files
2375
2376 2009-07-13  David Lutterkort  <lutter@redhat.com>
2377
2378         Version 0.5.2
2379
2380 2009-07-09  David Lutterkort  <lutter@redhat.com>
2381
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
2387         unchanged.
2388
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
2392
2393         This bug was introduced in commit 7278965b
2394
2395 2009-07-08  David Lutterkort  <lutter@redhat.com>
2396
2397         Ntp: allow additional options for server etc.
2398         Allow options listed on http://doc.ntp.org/4.2.4/confopt.html
2399
2400         Fixes bug #72 reported by Micah
2401
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
2405
2406         Fixes bug #74 reported by Micah
2407
2408 2009-07-08  Jim Meyering  <meyering@redhat.com>
2409
2410         build: ignore generated test files
2411         * tests/.gitignore: Remove file.
2412         * .gitignore: ignore tests/lens-*.sh
2413
2414 2009-07-08  David Lutterkort  <lutter@redhat.com>
2415
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
2419
2420         Fixes part of bug #67 reported by Micah
2421
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
2425
2426         Fixes part of bug #67 reported by Micah
2427
2428         * configure.ac: use AC_SYS_LARGEFILE
2429         Suggested by Jeff Johnson <n3npq@mac.com>
2430
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.
2434
2435         Reported and fix suggested by Jeff Johnson <n3npq@mac.com>
2436
2437 2009-06-26  Jim Meyering  <meyering@redhat.com>
2438
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
2444         sync with reality.
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
2451
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])
2457
2458 2009-06-26  Marc Fournier  <marc.fournier@camptocamp.com>
2459
2460         Yum: also read files in /etc/yum/pluginconf.d
2461
2462 2009-06-16  David Lutterkort  <lutter@redhat.com>
2463
2464         Inittab: clean up formatting some
2465
2466 2009-06-16  Matt Palmer  <matt@anchor.net.au>
2467
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.
2471
2472         Map comments as '#comment' nodes
2473
2474 2009-06-16  David Lutterkort  <lutter@redhat.com>
2475
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
2481
2482 2009-06-15  Jim Meyering  <meyering@redhat.com>
2483
2484         build: fix "make distcheck" failure
2485         * src/Makefile.am (EXTRA_DIST): Add fa_sym.version.
2486
2487 2009-06-12  Anders F Bjorklund  <afb@users.sourceforge.net>
2488
2489         * tests/augtest: convert darwin's double slashes to single slash
2490
2491         * test-test-preserve.sh: work with BSD ls, as well as GNU ls
2492         Needed to make the test pass on OS/X
2493
2494 2009-06-11  David Lutterkort  <lutter@redhat.com>
2495
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
2499
2500 2009-06-11  Anders F Björklund  <afb@users.sourceforge.net>
2501
2502         configure: do not use version script if the linker doesn't support it
2503         That is the case on OS X
2504
2505         Fixes part of ticket #66
2506
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.
2510
2511         Fixes part of ticket #66
2512
2513         * src/augtool.c: add missing include for ctype.h
2514         Part of fix for ticket #66
2515
2516 2009-06-09  David Lutterkort  <lutter@redhat.com>
2517
2518         Version 0.5.1
2519
2520         * tests/test-put-symlink.sh: fix broken test
2521         - use lenses in ../lenses
2522         - fix typo: HOSTS_AUGSAVE, not HOSTS_AGSAVE
2523
2524         * bootstrap: use getline module from gnulib
2525
2526         * src/augtool.c: initialize 'line' to NULL
2527
2528 2009-06-05  David Lutterkort  <lutter@redhat.com>
2529
2530         Logrotate (hooks): simplify to speed up typechecker
2531
2532         Logrotate: make newline at end of script optional
2533
2534         * src/put.c (put_store): escape regexp before printing
2535
2536         * src/pathx.c: coerce the operands of 'and'/'or' to boolean
2537         Fixes bug #44
2538
2539         * src/lexer.l: allow empty regexps
2540         Fixes bug #34
2541
2542         Dnsmasq: process files in /etc/dnsmasq.d/*
2543         Fixes bug #65 reported by abnormaliti
2544
2545 2009-06-01  David Lutterkort  <lutter@redhat.com>
2546
2547         * src/augtool.c: allow comments starting with '#'
2548
2549 2009-05-29  David Lutterkort  <lutter@redhat.com>
2550
2551         Whitespace cleanup (no functional change)
2552         Remove trailing whitespace
2553
2554         Ntp: support more commands
2555         * process 'broadcastdelay'
2556         * process enable/disable flags
2557         * process leapfile
2558
2559         Minor amount of code cleanup
2560
2561         Fixes bug #62, reported by Frank Sweetser
2562
2563         Fix grammar docs (production for PrimaryExpr was wrong)
2564
2565         * tests/root/etc/: add group and passwd files
2566
2567 2009-05-28  Matt Palmer  <matt@anchor.net.au>
2568
2569         Interfaces: various bug fixes
2570         * disallow end-of-line comments
2571         * support generic allow-* stanzas
2572
2573         Interfaces: accept options containing '_'
2574         Bug reported by Jonas Eriksson
2575
2576 2009-05-28  David Lutterkort  <lutter@redhat.com>
2577
2578         * tests/grub-rm-entry.rb: 'savedefault' indented by '\t', not ''
2579
2580 2009-05-14  David Lutterkort  <lutter@redhat.com>
2581
2582         Modprobe: handle comments at the end of a line
2583
2584 2009-04-13  David Lutterkort  <lutter@redhat.com>
2585
2586         Grub: allow optional argument for savedefault command
2587
2588         Grub: parse arguments to chainloader command
2589
2590         Grub: parse arguments for terminal command
2591
2592         Grub: parse individual arguments for serial command
2593
2594         Grub: parse kernel and module arguments
2595
2596         Grub: simplify comment_re to speed up typecheck
2597
2598 2009-04-13  Raphael Pinson  <raphink@gmail.com>
2599
2600         Cron: add a "time" node
2601
2602 2009-04-13  David Lutterkort  <lutter@redhat.com>
2603
2604         * src/augeas.h: improve some comments
2605
2606 2009-04-09  David Lutterkort  <lutter@redhat.com>
2607
2608         * src/augparse.c: add --notypecheck option
2609
2610 2009-04-08  Raphael Pinson  <raphink@gmail.com>
2611
2612         Pbuilder: lens and tests for Debian's personal builder
2613
2614         Shellvars: map comments with Util.comment and Util.empty
2615
2616         Shellvars: parse 'export' and 'unset' commands
2617
2618 2009-04-08  David Lutterkort  <lutter@redhat.com>
2619
2620         Add Cron to the dosumentation menu
2621
2622 2009-04-08  Raphael Pinson  <raphink@gmail.com>
2623
2624         Cron: new lens and test
2625         Parses /etc/crontab and /etc/cron.d
2626
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).
2630
2631         Backslashes are now allowed only in the middle of sto_to_com and
2632         sto_to_com_cmnd.
2633
2634         Additionally, add a line with backslashes in test_sudoers to prevent
2635         regressions.
2636
2637         Xinetd: map comments using Util.comment
2638
2639         Squid: allow indentation of entries
2640
2641 2009-04-07  Raphael Pinson  <raphink@gmail.com>
2642
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
2647         ticket #61).
2648
2649 2009-04-07  David Lutterkort  <lutter@redhat.com>
2650
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.
2654
2655 2009-04-07  Raphael Pinson  <raphink@gmail.com>
2656
2657         Ntp: add fudge directive
2658         Fixes ticket #59
2659
2660 2009-04-07  David Lutterkort  <lutter@redhat.com>
2661
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.
2665
2666         Bug reported by Michael Conigliaro <mike@conigliaro.org>
2667
2668 2009-04-03  David Lutterkort  <lutter@redhat.com>
2669
2670         * src/augtool.c: new option --noautoload
2671
2672         * src/augeas.h: expose flag to suppress module autoload
2673         With AUG_NO_MODL_AUTOLOAD, modules are only loaded when they are needed.
2674
2675         * src/transform.c (filter_generate): avoid segfault if we never call glob
2676
2677         Php: some more tests, sample php.ini in test root
2678
2679         Rx: remove \b and \d escapes
2680
2681 2009-04-03  Raphael Pinson  <raphink@gmail.com>
2682
2683         Modify some existing lenses to use new utility modules
2684         Changes Aliases, Exports, Fstab, Group, and Monit
2685
2686         Also exposes comments in /etc/aliases as #comment nodes
2687
2688         New utility modules Build, Rx, and Sep
2689
2690 2009-04-03  Marc Fournier  <marc.fournier@camptocamp.com>
2691
2692         Php: added default path on redhat
2693
2694 2009-04-02  Raphael Pinson  <raphink@gmail.com>
2695
2696         Use readline only when stdin is a tty, use getline otherwise
2697
2698 2009-04-01  Marc Fournier  <marc.fournier@camptocamp.com>
2699
2700         Vsftpd: several fixes
2701         * map comments as #comment
2702         * handle empty lines
2703         * find vsftpd.conf on Fedora/RHEL
2704
2705 2009-03-27  David Lutterkort  <lutter@redhat.com>
2706
2707         Iptables: fix ticket #51
2708          * allow more characters in chain names
2709          * allow comments mixed in with chains and rules
2710
2711         * augeas.spec.in: fadot is not installed yet
2712
2713         Version 0.5.0
2714
2715         Fix build problems uncovered by distcheck
2716
2717         * src/get.c (get_quant_star): do not leak registers
2718
2719         Some more test files
2720
2721         Fix uninitialized variables found by optimizer
2722
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.
2725
2726         * src/hash.c: mark some asserts as expensive
2727
2728         * tests/root/etc/krb5.conf: simple example file
2729
2730         Krb5: lens and tests for /etc/krb5.conf
2731
2732 2009-03-25  Raphael Pinson  <raphink@gmail.com>
2733
2734         Grub: add support for Debian's update-grub (ticket #50)
2735         Bug reported by Micah Anderson
2736
2737 2009-03-25  David Lutterkort  <lutter@redhat.com>
2738
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.
2742
2743         Thanks to Nate Foster for the inspiration of this
2744
2745         Sudoers: produce at most one negate node
2746         Even if there are multiple '!' signs, only produce one negate node.
2747
2748 2009-03-25  Raphael Pinson  <raphink@gmail.com>
2749
2750         Sudoers: fix ticket #48
2751         * make a difference between boolean and non boolean values for integers and
2752           strings
2753         * allow multiple negate flags (odd/even numbers change the behaviour)
2754         * add optional double quotes to integer and string field
2755
2756         Bug reported by Frank Sweetser
2757
2758 2009-03-25  David Lutterkort  <lutter@redhat.com>
2759
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
2762         with
2763           set /foo ""
2764         and
2765           set /foo
2766
2767 2009-03-24  David Lutterkort  <lutter@redhat.com>
2768
2769         * src/augeas.c (aug_init): make it easier to override distributed lenses
2770         Make the default load path
2771
2772            $(datadir)/augeas/lenses:$(datadir)/augeas/lenses/dist
2773
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
2777         ones we ship.
2778
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.
2783
2784         * src/pathx.c (eval_filter): correctly hande realloc of value_pool
2785
2786         * src/pathx.c (expand_tree): ensure we start with a nonempty lp_trace
2787
2788         * src/augtool.c: new 'defvar' command
2789
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.
2793
2794 2009-03-22  David Lutterkort  <lutter@redhat.com>
2795
2796         Add FilterExpr to path expression grammar
2797         This allows using constructs like $foo/some/path and $foo[2]
2798
2799         * src/augeas.c (parse_user_pathx): new parameter need_nodeset
2800
2801         * src/pathx.c (pathx_parse): new parameter need_nodeset
2802
2803         * src/pathx.c (ns_filter): new function
2804
2805         * src/pathx.c: rename E_LOCPATH to E_FILTER
2806
2807         * src/pathx.c (clone_value): new function
2808
2809 2009-03-21  David Lutterkort  <lutter@redhat.com>
2810
2811         * src/pathx.c (release_value): factor logic into separate function
2812
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.
2817
2818         * src/pathx.c (pathx_eval): factor eval into a function
2819
2820         * examples/fadot: remove, checked in by mistake
2821
2822 2009-03-20  David Lutterkort  <lutter@redhat.com>
2823
2824         * .gitignore: ignore examples/fadot
2825
2826         * src/get.c: rename 'Short iteration' to a more helpful message
2827
2828         * src/transform.c (store_error): report which lens failed
2829
2830         * src/transform.c (store_error): ignore errors from err_set
2831
2832         * src/transform.c (store_error): calculate line number/ofs for error
2833
2834         * src/transform.c (err_set): new function
2835
2836 2009-03-20  Francis Giraldeau  <francis.giraldeau@revolutionlinux.com>
2837
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
2841         of FA's.
2842
2843 2009-03-19  David Lutterkort  <lutter@redhat.com>
2844
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.
2848
2849         * src/augeas.c: remove some internal uses of pathx_parse
2850
2851         * src/augeas.c: create various /augeas nodes when they go missing
2852
2853         * src/put.c (create_concat): fix goofy error message
2854
2855         Update and refresh man pages
2856
2857         * src/augtool.c: add --noload option
2858
2859         Validate trees representing a transform before using them
2860
2861         * tests/test-load.c: new test for aug_load
2862
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
2866         aug_load.
2867
2868         * src/augtool.c: new 'load' command
2869
2870         * src/augeas.h (aug_load): new public function
2871
2872         * src/transform.h: use tree encoded transforms
2873
2874         * src/lens.c (lens_release): allow NULL lens to be passed in
2875
2876         * src/syntax.h (lens_lookup): new function
2877
2878         * src/augeas.c: report transforms under /augeas/load
2879
2880         Rename AUG_NO_DEFAULT_LOAD to AUG_NO_MODL_AUTOLOAD
2881
2882         Limits (filter): no need to exclude anything
2883
2884 2009-03-19  Raphael Pinson  <raphink@gmail.com>
2885
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.
2889
2890         Problem reported by Mark Drayton (ticket #47)
2891
2892 2009-03-19  David Lutterkort  <lutter@redhat.com>
2893
2894         Lokkit: new lens and test
2895
2896 2009-03-17  David Lutterkort  <lutter@redhat.com>
2897
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
2902
2903 2009-03-13  David Lutterkort  <lutter@redhat.com>
2904
2905         * configure.ac: bump major version of libfa
2906
2907         * src/fa.h (fa_as_regexp): cleaner prototype
2908
2909         * src/fa.h (fa_ambig_example): cleaner prototype
2910
2911         * src/fa.h (fa_example): cleaner prototype
2912
2913         * src/fa.h (fa_compile): pass in size of regexp
2914
2915         * src/fa.h: use 'struct fa *' instead of fa_t
2916
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
2920         been.
2921
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.
2924
2925         * Makefile.maint: different setup at home
2926
2927 2009-03-12  David Lutterkort  <lutter@redhat.com>
2928
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
2932
2933         Modprobe: lens and tests for modprobe.conf
2934
2935         * src/fa.c (re_cset_as_string): turn '[^\n]' into '.'
2936
2937         Place Sudoers and Util under LGPLv2+
2938         Raphael Pinson agreed to changing the license for these to LGPLv2+ like the
2939         rest of Augeas.
2940
2941 2009-03-09  David Lutterkort  <lutter@redhat.com>
2942
2943         Version 0.4.2
2944
2945         Logrotate: process 'minsize 1M' rule
2946         logrotate allows unit suffixes 'k', 'M' and 'G' for 'size' and 'minsize'
2947
2948         Squid: add squid.conf from Fedora 11 rawhide
2949
2950         * src/builtin.c: new builtins Sys.getenv and Sys.read_file
2951
2952         * src/syntax.h (dup_string): duplicate a string
2953
2954         * src/internal.h (xstrerror): new function
2955
2956 2009-03-09  Francois Deppierraz  <francois.deppierraz@camptocamp.com>
2957
2958         Test the Debian Lenny sample squid.conf
2959
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:
2962
2963         fgrep TAG squid-2.7.STABLE6/src/squid.conf.default  | awk '{ print "                | \""$3"\"" }' | sort > /tmp/squid2.7
2964
2965         fgrep TAG squid-3.HEAD-20090308/src/squid.conf.documented | awk '{ print "                | \""$3"\"" }' | sort > /tmp/squid3-HEAD
2966
2967         cat /tmp/squid2.7 /tmp/squid3-HEAD | sort | uniq
2968
2969 2009-03-08  David Lutterkort  <lutter@redhat.com>
2970
2971         * tests/xpath.tests: Hosts lens puts comments into #comment nodes
2972
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
2976
2977 2009-03-06  David Lutterkort  <lutter@redhat.com>
2978
2979         Sshd: map comments as '#comment' nodes
2980
2981         Change the label for comment nodes to '#comment'
2982
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.
2988
2989         * src/augeas.c (aug_init): always create /files
2990
2991         Sshd: add test showing how to add a Subsystem
2992
2993 2009-03-03  David Lutterkort  <lutter@redhat.com>
2994
2995         * Makefile.maint: add autogen target
2996
2997         * src/pathx.c (eval_rel): for numbers, '<' and '<=' were reversed
2998
2999         Postfix_main: handle continuation lines
3000
3001         * src/pathx.c: fix some comments
3002
3003 2009-03-02  David Lutterkort  <lutter@redhat.com>
3004
3005         Version 0.4.1
3006
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'.
3011
3012         * src/pathx.c: function label() returning the label of the ctx node
3013
3014         * src/pathx.c: make sure ['foo' != 'foo'] is false
3015
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
3019         garbage.
3020
3021         Bug reported by Jan Kupec
3022
3023         * src/pathx.c: it is an error if we don't consume the whole expression
3024
3025 2009-02-27  David Lutterkort  <lutter@redhat.com>
3026
3027         * tests/test-event-saved.sh: make sure fuiles are writable by owner
3028
3029 2009-02-25  David Lutterkort  <lutter@redhat.com>
3030
3031         Plug a few memory leaks
3032
3033         Remove files whose tree under /files was deleted
3034         When doing rm /files/etc/hosts, we now delete the file /etc/hosts
3035         on save
3036
3037         Move path formatting functions around
3038         Move path_expand and format_path to internal.c
3039         Rename format_path to path_of_tree
3040
3041         * src/augeas.c (tree_find): helper for getting a tree node
3042
3043 2009-02-24  David Lutterkort  <lutter@redhat.com>
3044
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
3048
3049         Record saved files in transform_save, not tree_save
3050
3051         * src/augeas.c (tree_unlink): remove and free a subtree
3052
3053         * src/transform.h: move transform decls out of syntax.h
3054
3055         Util.stdexcl: exclude .augsave and .augnew files
3056
3057 2009-02-20  David Lutterkort  <lutter@redhat.com>
3058
3059         * src/lexer.l: correct location info for strings and regexps
3060
3061         * src/get.c: check for valid match before calling token()
3062
3063 2009-02-19  David Lutterkort  <lutter@redhat.com>
3064
3065         * src/parser.y: do not allow epsilon as a tree constant
3066         This grammar mistake made epsilon a valid expression
3067
3068         * src/fa.c: cache hash values in the state
3069         This gives about a 15% performance improvement in typechecking
3070         the logrotate lens
3071
3072 2009-02-18  David Lutterkort  <lutter@redhat.com>
3073
3074         * src/pathx.c: allow '(' Expr ')'
3075
3076         * src/pathx.c: add 'and' and 'or' operators
3077
3078         * src/pathx.c: add relational expressions '>', '<', '>=', '<='
3079
3080         * src/pathx.c: add count() function
3081
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)'
3085
3086         * src/pathx.c: add position() function
3087
3088         * src/pathx.c: allow '=' and '!=' of numbers
3089
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.
3093
3094         This requires that we compute nodesets explicitly.
3095
3096         Logrotate: small fixes
3097         * recognize 'yearly' schedule
3098         * allow whitespaces around { and }
3099
3100 2009-02-17  David Lutterkort  <lutter@redhat.com>
3101
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
3105         that.
3106
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'
3111
3112         Always do REGS_REALLOCATE for regexp match registers
3113
3114         * src/regexp.c: clean up syntax options
3115
3116         * src/put.c: remove outdated debug msgs and comments
3117
3118         * src/internal.h: Remove bogus DEBUG define
3119
3120         Ntp: enhance lens
3121         These enhancements are needed to make the Ntp.lns process the default
3122         /etc/ntp.conf on Fedora
3123
3124 2009-02-16  David Lutterkort  <lutter@redhat.com>
3125
3126         * src/syntax.c: print tests results in the same form we read them
3127
3128 2009-02-13  David Lutterkort  <lutter@redhat.com>
3129
3130         Allow passing NULL regexps in some regexp routines
3131
3132 2009-02-13  Raphael Pinson  <raphink@gmail.com>
3133
3134         Xorg: new lens and tests
3135
3136 2009-02-11  David Lutterkort  <lutter@redhat.com>
3137
3138         Test that an invalid regexp makes module loading fail
3139
3140         Services: various small fixes to process Fedora's /etc/services
3141
3142         * tests/test-get.sh: print all error info on failure
3143
3144         Better error mesages when re match fails during get/put
3145
3146         * src/lens.c: throw exception on regexp syntax errors
3147
3148         * src/fa.c: test for invalid ranges like [z-a]
3149
3150 2009-02-11  Raphael Pinson  <raphink@gmail.com>
3151
3152         Lens and test for /etc/services
3153
3154 2009-02-11  David Lutterkort  <lutter@redhat.com>
3155
3156         * src/augtool.c (cmd_match): check return from aug_match more defensively
3157
3158 2009-02-06  David Lutterkort  <lutter@redhat.com>
3159
3160         Version 0.4.0
3161
3162         Use printf instead of 'echo -e' in tests
3163         Printf is more portable
3164
3165         Fix compilation on OpenSolaris
3166         * src/pathx.c (position): assert not marked as noreturn
3167
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
3169
3170         * src/pathx.c: remove the value() function, it's redundant with '.'
3171
3172         * pathx.c: when comparing strings consider NULL == ""
3173
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'.
3178
3179         * tests/grub-rm-entry.rb: fix test failure
3180
3181         * tests/augtest: do not typecheck everything
3182         The typecheck is redundant (we already do that when running lens tests) and
3183         really slow
3184
3185         Grub: process 'savedefault' in boot stanza
3186         Also, allow keywords to be preceded by whitespace
3187
3188         Fixes ticket #36
3189
3190         Minor whitespace cleanup
3191
3192 2009-02-02  Free Ekanayaka  <free@64studio.com>
3193
3194         Lens and tests for DarkIce
3195         See http://darkice.tyrell.hu/
3196
3197 2009-02-01  David Lutterkort  <lutter@redhat.com>
3198
3199         * src/augeas.c: use ALLOC instead of CALLOC
3200
3201         * augeas.c (aug_init): check an allocation failure
3202
3203         * src/internal.c (escape, unescape): check allocation failures
3204
3205         * src/pathx.c (free_state): allow NULL state
3206
3207         * src/augeas.c (init_root): check for failure of strdup
3208
3209 2009-01-30  David Lutterkort  <lutter@redhat.com>
3210
3211         * src/pathx.c: factor test if a step matches into step_matches
3212         This also fixes a problem matching, test also included
3213
3214         * src/pathx.c: use bool for boolean values
3215
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
3219
3220         * src/transform.c: use POSIX conform FNM_PATHNAME, nut GNU alias
3221
3222         * src/get.c: remove braindead use of alloca
3223
3224         * tests/test-get.sh: use new descendant syntax to find errors
3225
3226         Remove unneeded call to pathx_parse in aug_match
3227
3228         Introduce parse_user_pathx to report errors
3229         If user-supplied path expressions have errors, report them in
3230         /augeas/pathx/error
3231
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
3236         expressions.
3237
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.
3241
3242         More xpath tests; allow ... in tests
3243
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
3247           tree node any more
3248
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
3253
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.
3257
3258         Also add tests to check path expression evaluation
3259
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.
3264
3265         Notes on new XPath grammar
3266
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
3270
3271 2009-01-29  David Lutterkort  <lutter@redhat.com>
3272
3273         Grub: support color directive
3274
3275 2009-01-26  David Lutterkort  <lutter@redhat.com>
3276
3277         Version 0.3.6
3278
3279 2009-01-26  Dominique Dumont  <dominique.dumont@hp.com>
3280
3281         Sshd: add documentation on usage
3282
3283 2009-01-25  David Lutterkort  <lutter@redhat.com>
3284
3285         Add indented puppet.conf to test root
3286
3287 2009-01-22  David Lutterkort  <lutter@redhat.com>
3288
3289         Fix bug #25 - allow indented entries in puppet.conf
3290         * lenses/inifile.aug: add new indented_entry and indented_title
3291           lenses
3292         * lenses/puppet.aug: use the indented_* lenses
3293         * lenses/tests/test_puppet.aug: test with indented entries
3294
3295 2009-01-19  David Lutterkort  <lutter@redhat.com>
3296
3297         Report version and legal save modes in /augeas/version
3298
3299 2009-01-17  David Lutterkort  <lutter@redhat.com>
3300
3301         * ref.h: include limits.h, since we use UINT_MAX
3302
3303 2009-01-16  David Lutterkort  <lutter@redhat.com>
3304
3305         Mark up code in documentation comments for Dpkg and Exports
3306
3307 2009-01-16  Robin Lee Powell  <rlpowell@digitalkingdom.org>
3308
3309         Documentation for Exports and Dpkg
3310
3311 2009-01-13  David Lutterkort  <lutter@redhat.com>
3312
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
3316         * add a test
3317
3318 2009-01-13  Bryan Kearney  <bkearney@redhat.com>
3319
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
3324
3325 2009-01-08  Jim Meyering  <meyering@redhat.com>
3326
3327         comment typos
3328
3329         plug a leak
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)
3345
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.
3349
3350 2009-01-04  Arnaud Gomes-do-Vale  <arnaud.gomes@ircam.fr>
3351
3352         * src/Makefile.am: fix bz #478619 - do not use abspath
3353
3354 2009-01-03  Robin Lee Powell  <rlpowell@digitalkingdom.org>
3355
3356         Dpkg: new lens and test
3357
3358 2009-01-03  David Lutterkort  <lutter@redhat.com>
3359
3360         Php: expand filter slightly
3361         Suggested by Robin Lee Powell <rlpowell@digitalkingdom.org>
3362
3363 2008-12-29  David Lutterkort  <lutter@redhat.com>
3364
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
3368
3369         Bug reported by Robin Lee Powell <rlpowell@digitalkingdom.org>
3370
3371 2008-12-27  Free Ekanayaka  <free@64studio.com>
3372
3373         Add soma lens and test
3374
3375         Add limits lens and test
3376
3377 2008-12-24  David Lutterkort  <lutter@redhat.com>
3378
3379         * autogen.sh: remove bogus argument to configure
3380
3381 2008-12-24  Marc Fournier  <marc.fournier@camptocamp.com>
3382
3383         Php, Gdm: exclude literal ".anon" from title, not regexp /.anon/
3384
3385 2008-12-24  Free Ekanayaka  <free@64studio.com>
3386
3387         Phpvars: allow whitespaces before the \n in the <?php head line
3388
3389 2008-12-23  David Lutterkort  <lutter@redhat.com>
3390
3391         Version 0.3.5
3392
3393         * transform.c (transfer_file_attrs): ignore SELinux failures if filesystem   does not support extended attributes
3394
3395         * transform.c (clone_file): fix #32; only copy if   /augeas/save/copy_if_rename_fails exists
3396
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.
3400
3401 2008-12-23  Free Ekanayaka  <free@64studio.com>
3402
3403         Add lens and test for /etc/group
3404
3405 2008-12-23  David Lutterkort  <lutter@redhat.com>
3406
3407         Simpler interface and implementation for path_find_one
3408
3409         Add path_expand_tree
3410         Instead of calling path_find_one/tree_create
3411
3412         Move implementation dealing with path expressions into separate file
3413
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.
3417
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.
3422
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.
3426
3427         Rename seg_siblings to tree_siblings
3428
3429         Add an explicit parent pointer to the tree
3430
3431 2008-12-23  Free Ekanayaka  <free@64studio.com>
3432
3433         Lens and test for config files using PHP-style variables
3434         Process /etc/squirrelmail/config.php
3435
3436 2008-12-23  Marc Fournier  <marc.fournier@camptocamp.com>
3437
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).
3442
3443 2008-12-23  David Lutterkort  <lutter@redhat.com>
3444
3445         * fa.c: mark '.' as a special character that needs to be escaped
3446
3447 2008-12-22  David Lutterkort  <lutter@redhat.com>
3448
3449         Notes on the expanded XPath notation
3450
3451 2008-12-22  Free Ekanayaka  <free@64studio.com>
3452
3453         Add lens and test for /etc/passwd
3454
3455         Shellvars: process two more files on Debian
3456         Add /etc/arno-iptables-firewall/debconf.cfg and /etc/cron-apt/config
3457
3458         Add lenses and tests for postfix's main.cf and master.cf
3459
3460         Squid: new lens for squid.conf
3461
3462         Webmin: new lens
3463
3464 2008-12-16  David Lutterkort  <lutter@redhat.com>
3465
3466         Shellvars: load /etc/sysconfig/sendmail
3467
3468 2008-12-03  David Lutterkort  <lutter@redhat.com>
3469
3470         Xinetd: make sure equal sign is surrounded by spaces
3471         Fix ticket #30
3472
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
3476
3477 2008-11-20  David Lutterkort  <lutter@redhat.com>
3478
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.
3482
3483 2008-11-19  David Lutterkort  <lutter@redhat.com>
3484
3485         Only try to save backup file if original exists
3486         * transform.c (transform_save): check that original exists before
3487         creating backup
3488
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
3493
3494 2008-11-05  David Lutterkort  <lutter@redhat.com>
3495
3496         * Makefile.maint: add target tag-release
3497
3498         Version 0.3.4
3499
3500         * test-preserve.sh: check that augtool -b produces a backup
3501
3502 2008-10-30  David Lutterkort  <lutter@redhat.com>
3503
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
3511
3512 2008-10-24  David Lutterkort  <lutter@redhat.com>
3513
3514         Version 0.3.3
3515
3516         * Makefile.maint: add upload target
3517
3518         Modest beginnings of a maiintainer Makefile
3519         * Makefile.maint: new file
3520
3521         Undo API breakage introduced in commit 48c285c
3522         * src/augeas.c (aug_save): return 0 on success, instead of the number of
3523           files changed
3524         * src/augtool.c (cmd_save): get the number of files changed from aug_match
3525
3526         build: use LIB_SELINUX as set by gnulib
3527         * configure.ac: do not set up LIB_SELINUX, gnulib does that
3528
3529 2008-10-22  Sylvain Baubeau  <bob@glumol.com>
3530
3531         Grub: support "rootnoverify" and "chainloader" directives
3532
3533 2008-10-21  David Lutterkort  <lutter@redhat.com>
3534
3535         Version 0.3.2
3536
3537         test-preserve.sh: do not check SELinux context on non-SELinux systems
3538
3539         test-events-saved.sh: sort the list of saved files
3540
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.
3546
3547         Generate ChangeLog from git history
3548
3549         file_replace: preserve SELinux context
3550         Copy the SELinux context from the existing file.
3551
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
3556         user has set.
3557
3558 2008-10-20  David Lutterkort  <lutter@redhat.com>
3559
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.
3563
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
3570         in mtime.
3571
3572         Formatting changes
3573
3574 2008-10-16  Jim Meyering  <jim@meyering.net>
3575
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.
3582
3583 2008-10-13  Joel Nimety  <jnimety@perimeterusa.com>
3584
3585         Grub: add support for password directive
3586
3587 2008-10-06  Free Ekanayaka  <free@64studio.com>
3588
3589         Samba: Change default indentation and separation
3590         Match indentation of the example configuration file shipped by the upstream
3591         authors
3592
3593         Add gdm lens and associated test
3594
3595 2008-10-02  David Lutterkort  <lutter@redhat.com>
3596
3597         Ignore files based on .hgignore
3598
3599 2008-10-01  David Lutterkort  <lutter@redhat.com>
3600
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.
3605
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.
3608
3609         This also uncovered that the test rec-hosts-add.rb was broken, but still
3610         passed.
3611
3612 2008-10-01  David Lutterkort  <dlutter@redhat.com>
3613
3614         Pass --nostdinc properly when running under gdb
3615
3616         Logrotate: parse tabooext into list; add processing of a number of options
3617         Patch by Sean E. Millichamp
3618
3619 2008-09-22  David Lutterkort  <dlutter@redhat.com>
3620
3621         Grub: add support for 'serial' and 'terminal'
3622         Patch by Sean E. Millichamp
3623
3624         Add backlinks to main site
3625
3626         Remove some italics
3627
3628         Logrotate: add dateext flag
3629         Patch by Sean E. Millichamp
3630
3631         Various changes to the NaturalDocs support
3632         This patch changes a few things around in the NaturalDocs support:
3633
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.
3638
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
3642               path
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
3646
3647         - Various fixes to make 'make distcheck' work
3648
3649 2008-09-12  David Lutterkort  <dlutter@redhat.com>
3650
3651         Properly include test modules
3652
3653 2008-09-11  Raphael Pinson  <raphink@gmail.com>
3654
3655         Add naturaldocs support Build pdf docs
3656
3657 2008-09-09  Raphael Pinson  <raphink@gmail.com>
3658
3659         Adapt comments for NaturalDocs parsing
3660
3661         Add comments for NaturalDocs parsing
3662
3663         Add comments for NaturalDocs parsing
3664
3665         Add comments for NaturalDocs parsing Reorganize a bit
3666
3667         Adapt sudoers.aug for NaturalDocs parsing
3668
3669         Adapt augeas.h for NaturalDocs parsing
3670
3671 2008-09-08  David Lutterkort  <dlutter@redhat.com>
3672
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.
3676
3677 2008-09-08  Free Ekanayaka  <free@64studio.com>
3678
3679         Add monit lens and test
3680
3681 2008-09-06  Free Ekanayaka  <free@64studio.com>
3682
3683         Ldap: merge with Spacevars. Spacevars: process havp.config
3684         Adapt Test_ldap, since there is no Ldap.lns anymore
3685
3686 2008-09-08  David Lutterkort  <dlutter@redhat.com>
3687
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
3691
3692         augtool, augparse: add --nostdinc option
3693
3694         augtool, augparse: allow long options
3695
3696 2008-09-06  Free Ekanayaka  <free@64studio.com>
3697
3698         Shellvars: merge Sysconfig, Ifcfg; support /etc/default
3699         Merge Sysconfig and Ifcfg into Shellvars
3700
3701         Add /etc/default/* to the list of supported configuration files
3702
3703 2008-09-05  David Lutterkort  <dlutter@redhat.com>
3704
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.
3709
3710         Shellvars: use Util.eol for eol
3711
3712         test/modules: only distribute .aug files
3713
3714         Shellvars: handle space at the end of a line
3715
3716 2008-09-04  David Lutterkort  <dlutter@redhat.com>
3717
3718         Added tag release-0.3.1 for changeset 803c17b1833a
3719
3720         Release 0.3.1
3721
3722         Sysctl: lens for sysctl.conf
3723         Contributed by Sean Millichamp
3724
3725 2008-09-04  Free Ekanayaka  <free@64studio.com>
3726
3727         Add lens and test for dnsmasq.conf
3728
3729 2008-09-02  Free Ekanayaka  <free@64studio.com>
3730
3731         Add slapd.aug and test modules
3732
3733         Spacevars: Allow passing the entry keyword as a parameter
3734         Modify Ldap.lns and Test_spacevars accordingly
3735
3736 2008-08-30  Free Ekanayaka  <free@64studio.com>
3737
3738         Add samba.aug and associated test
3739
3740 2008-08-27  Free Ekanayaka  <free@64studio.com>
3741
3742         Inifile: support empty comments
3743         Empty comments are lines beginning with ";" or "#" but without any more text
3744
3745 2008-08-29  Raphael Pinson  <raphink@gmail.com>
3746
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
3752
3753 2008-09-03  David Lutterkort  <dlutter@redhat.com>
3754
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
3757         the empty string.
3758
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
3762         word.
3763
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.
3767
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.
3773
3774         Added tests to verify the typechecking of '?'
3775
3776 2008-09-02  David Lutterkort  <dlutter@redhat.com>
3777
3778         Minor error message improvements
3779         - Include information about the lens that produced the error if it's
3780           available
3781         - When a union during 'put' does not match, produce an error instead of
3782           aborting
3783
3784 2008-08-28  David Lutterkort  <dlutter@redhat.com>
3785
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.
3791
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
3795         an empty string.
3796
3797 2008-08-27  David Lutterkort  <dlutter@redhat.com>
3798
3799         Some files for the test root
3800
3801         A test for the del typecheck
3802
3803         Script to run lens tests through Valgrind
3804         We don't run this as part of 'make check' since it's _very_ slow.
3805
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.
3809
3810         The lexer bug is https://fedorahosted.org/augeas/ticket/12
3811
3812 2008-08-27  Free Ekanayaka  <free@64studio.com>
3813
3814         Dhclient lens
3815
3816 2008-08-26  Raphael Pinson  <raphink@gmail.com>
3817
3818         Add OpenVPN lens and associated test
3819
3820 2008-08-27  Free Ekanayaka  <free@64studio.com>
3821
3822         Dput: add allowed_distributions entry
3823         See man dput.cf(5) from a recent dput version (Ubuntu/hardy or
3824         Debian/lenny)
3825
3826 2008-08-26  David Lutterkort  <dlutter@redhat.com>
3827
3828         Typecheck del lens
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.
3832
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
3835         typecheck.
3836
3837 2008-08-18  Nahum Shalman  <nshalman elys com>
3838
3839         Shellvars: fix arrays so that saving works properly  * based on an IRC conversation with raphink
3840
3841 2008-08-25  David Lutterkort  <dlutter@redhat.com>
3842
3843         Acknowledge Free Ekanayaka
3844
3845 2008-08-25  Free Ekanayaka  <free@64studio.com>
3846
3847         Ldap lens
3848
3849         Spacevars lens
3850
3851 2008-08-24  Free Ekanayaka  <free@64studio.com>
3852
3853         Interfaces: new lens to process Debian's /etc/network/interfaces
3854
3855 2008-08-25  David Lutterkort  <dlutter@redhat.com>
3856
3857         Util.comment: produce #comment nodes
3858
3859 2008-08-14  Raphael Pinson  <raphink@gmail.com>
3860
3861         Inifile: complete rewrite. Also rewrite lenses using Inifile
3862         Adapt Php, Dput, Puppet and the corresponding tests to use the new Inifile
3863         module.
3864
3865         Php: allow entries outside of sections
3866         Adapt php.aug to support entries outside of sections and still map sections
3867         as labels (Fix #9)
3868
3869 2008-08-15  David Lutterkort  <dlutter@redhat.com>
3870
3871         Shellvars: one more cornercase with double quoted strings
3872
3873         Shellvars: much improved handling
3874         - handle single and double quoted strings correctly
3875         - parse arrays into a subtree
3876
3877         Inspired by a chat and preliminary work by nahamu
3878
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.
3882
3883         Fix syntax error in test
3884
3885         augl_error: Initialize info
3886
3887 2008-08-14  David Lutterkort  <dlutter@redhat.com>
3888
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.
3894
3895         Added test in test-mv.sh to test that moving at the root level works.
3896
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.
3902
3903 2008-08-13  Raphael Pinson  <raphink@gmail.com>
3904
3905         Add puppet.aug and associated test
3906
3907         test_php.aug: make a nice test for PHP
3908
3909         Php: simplified and based on Inifile
3910         "Slightly" simplify php.aug now that the comment issue is fixed in
3911         inifile.aug
3912
3913         Inifile: use #comment for comment fields
3914         Adapt test_dput.aug and test_inifile.aug
3915
3916         Inifile: no space around seps by default
3917
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
3925
3926         Fstab: map comments and support empty lines
3927
3928         Sudoers: clean up comment definition
3929
3930 2008-08-12  David Lutterkort  <dlutter@redhat.com>
3931
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.
3935
3936         Based on an initial patch by Kjetil Torgrim Homme <kjetilho@linpro.no>
3937
3938 2008-08-12  Raphael Pinson  <raphink@gmail.com>
3939
3940         Pam: Use eol, indent, comment and empty from Util
3941
3942         Util: add eol, indent, comment and empty
3943
3944         Pam: allow comments at the end of lines and leading spaces
3945
3946         Xinetd: better handling of whitespace
3947         - allow indented comments
3948         - allow spaces around "}" to close a service
3949
3950 2008-08-12  David Lutterkort  <dlutter@redhat.com>
3951
3952         Exports: fix failing test
3953         Exports.lns uses Hosts.comment .. since that changed, we also need to
3954         change Exports.lns
3955
3956 2008-08-12  Raphael Pinson  <raphink@gmail.com>
3957
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
3963
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
3968
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.
3973
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.
3977
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.
3983
3984         Add sudoers lens and associated test
3985
3986 2008-08-11  David Lutterkort  <dlutter@redhat.com>
3987
3988         Test for continuation lines
3989
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 '['.
3994
3995         Inside character classes, the backslash does not escape anything, and is
3996         treated as an ordianry character.
3997
3998         See regex(7) or
3999         http://www.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap09.html#tag_09_04
4000
4001 2008-08-09  David Lutterkort  <dlutter@redhat.com>
4002
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.
4007
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
4013         dict is O(log n).
4014
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.
4018
4019 2008-08-08  David Lutterkort  <dlutter@redhat.com>
4020
4021         Eliminate unneeded calls to regexp_match in split_iter
4022
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.
4027
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
4032         constant time.
4033
4034         The same was true in a few other places: the building of a tree and of
4035         skeletons suffered from the same problem.
4036
4037         Dicts still have that problem - they need to be changed to hash tables to
4038         address this issue.
4039
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.
4043
4044 2008-08-07  David Lutterkort  <dlutter@redhat.com>
4045
4046         Added tag release-0.3.0 for changeset 60f2a13c2528
4047
4048         Release 0.3.0
4049
4050         Mention the exit status
4051
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
4055         the interface.
4056
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
4062         truncated.
4063
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
4067         test failure.
4068
4069         Fixes bug https://fedorahosted.org/augeas/ticket/1
4070
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.
4075
4076 2008-07-29  David Lutterkort  <dlutter@redhat.com>
4077
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 "..."'
4082
4083         Quiet the test
4084
4085 2008-07-29  Raphael Pinson  <raphink@gmail.com>
4086
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.
4090
4091 2008-07-25  Raphael Pinson  <raphink@gmail.com>
4092
4093         Fix php.aug now that inifile.aug supports spaces in values
4094
4095         Add PHP module and associated (basic) test file
4096
4097 2008-07-29  Raphael Pinson  <raphink@gmail.com>
4098
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.
4102
4103 2008-07-25  Raphael Pinson  <raphink@gmail.com>
4104
4105         Rewrite dput.aug using inifile.aug Add a few keywords from man dput.cf Fix test file after rewrite
4106
4107         Allow spaces in entry values
4108
4109         Allow spaces in titles
4110
4111         Fix empty comments in INI file
4112
4113 2008-07-29  David Lutterkort  <dlutter@redhat.com>
4114
4115         Include canonicalize.h
4116         On non-glibc systems, we need to make sure canonicalize_file_name is
4117         declared from gnulib.
4118
4119         Fail the whole test if one of the lens tests fails
4120
4121 2008-07-28  David Lutterkort  <dlutter@redhat.com>
4122
4123         Add a call to move a subtree to the public API
4124
4125 2008-07-26  David Lutterkort  <dlutter@redhat.com>
4126
4127         Refactor tree_create
4128
4129         Don't run the typechecker by default from try
4130
4131 2008-07-24  David Lutterkort  <dlutter@redhat.com>
4132
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
4136         lens.
4137
4138         Allow a key and store in each branch of a union
4139
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
4143         regexp.
4144
4145         Correctly handle saving to nonexistant files
4146
4147         Store system errors
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
4150
4151 2008-07-23  Raphael Pinson  <raphink@gmail.com>
4152
4153         Add AptPreferences module and associated test
4154
4155         Add bbhosts module and associated test
4156
4157         Add ntp module and associated test
4158
4159         Add logrotate and associated test
4160
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
4162
4163         Add inifile generic module and associated test module
4164
4165 2008-07-22  David Lutterkort  <dlutter@redhat.com>
4166
4167         Fix segfault when running 'augtool print'
4168
4169 2008-07-21  David Lutterkort  <dlutter@redhat.com>
4170
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
4176         file.
4177
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.
4181
4182 2008-07-18  David Lutterkort  <dlutter@redhat.com>
4183
4184         Added tag release-0.2.2 for changeset e7f6d16e75df
4185
4186         Release 0.2.2
4187
4188         Rename rule because FreeBSD's make chokes on it
4189         Rename the rule .FORCE-datadir.h to FORCE-datadir.h
4190
4191         Sample dput.cf for dput lens
4192
4193         Lens for Debian's dput files
4194         Contributed by Raphael Pinson
4195
4196 2008-07-17  David Lutterkort  <dlutter@redhat.com>
4197
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.
4202
4203         Added tag release-0.2.1 for changeset 13fdcd9bb18a
4204
4205         aliases.aug: Do not require whitespace after commas
4206         It's perfectly fine to have an alias like 'alias: target1,target2'
4207
4208         Bug reported by Greg Swift
4209
4210 2008-07-16  David Lutterkort  <dlutter@redhat.com>
4211
4212         Fix insertion before the first child
4213         Inserting a node as the new first child was completely broken.
4214
4215         Bug reported by Raphael Pinson.
4216
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
4220
4221           test lns put str after
4222             insa label path = str2
4223
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.
4227
4228 2008-07-09  David Lutterkort  <dlutter@redhat.com>
4229
4230         Test that putting into an empty string works
4231
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.
4235
4236 2008-07-07  David Lutterkort  <dlutter@redhat.com>
4237
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.
4241
4242         Most of this fix suggested by Jim Meyering, I only touched it up a little
4243         (and no doubt introduced all the bugs).
4244
4245         Check for NULL values in the put direction of store
4246         This is now flagged as an error instead of causing a segfault.
4247
4248 2008-07-03  David Lutterkort  <dlutter@redhat.com>
4249
4250         Lens for /etc/exports
4251
4252 2008-07-01  David Lutterkort  <dlutter@redhat.com>
4253
4254         Release 0.2.1
4255
4256         distclean-local: Do not clobber build/aux
4257
4258         Suppress generated manpages
4259
4260 2008-06-30  David Lutterkort  <dlutter@redhat.com>
4261
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.
4266
4267         Man page for augparse
4268
4269         Put Augeas version into footer
4270
4271 2008-06-23  David Lutterkort  <dlutter@redhat.com>
4272
4273         Auto-generate the ChangeLog file from mercurial logs
4274         Reviewed-by: David Lutterkort <dlutter@redhat.com>
4275
4276 2008-06-13  David Lutterkort  <dlutter@redhat.com>
4277
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
4281
4282         Reported by Jason Dobies
4283
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.
4289
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.
4292
4293 2008-06-12  David Lutterkort  <dlutter@redhat.com>
4294
4295         Check that we take the right branch in a union
4296
4297         Process /etc/sysconfig/selinux
4298         Patch by Alan Pevec
4299
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,
4303         ever.
4304
4305         Reported by Harald Hoyer
4306
4307 2008-06-06  David Lutterkort  <dlutter@redhat.com>
4308
4309         Initialize out parameters
4310
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
4314         fields.
4315
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.
4320
4321 2008-06-05  David Lutterkort  <dlutter@redhat.com>
4322
4323         Added tag release-0.2.0 for changeset d23f95cd13f3
4324
4325         Release 0.2.0
4326
4327 2008-06-03  David Lutterkort  <dlutter@redhat.com>
4328
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.
4332
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.
4338
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.
4342
4343         The bootstrap script was copied from libvirt.
4344
4345 2008-06-02  David Lutterkort  <dlutter@redhat.com>
4346
4347         Use a build aux dir (in build/aux)
4348
4349         Use autoheader and generate config.h
4350
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.
4354
4355         Remove src/config.h
4356         It was a bad idea to begin with; fold the contents into internal.h and make
4357         room for a generated config.h
4358
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.
4362
4363         Handle trailing whitespace in pam.d; split module-arguments
4364
4365         Allow multiple comma-separated fs types in fstab
4366         On Debian Etch, the CDROM has fs type 'udf,iso9660'
4367
4368         Handle blank lines in /etc/hosts
4369
4370         Fix missing ref on an info struct in syntax.c(compile_minus)
4371
4372 2008-05-30  Jim Meyering  <meyering@redhat.com>
4373
4374         * tests/test-lenses.sh: more quotes, protect against space in abs_srcdir
4375
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.
4385
4386 2008-05-29  David Lutterkort  <dlutter@redhat.com>
4387
4388         Make distcheck work again
4389         Restore top_builddir and top_srcdir so that augtest passes during make
4390         distcheck.
4391
4392         Fix memory leak in make_exn_lns_error
4393
4394 2008-05-29  Jim Meyering  <meyering@redhat.com>
4395
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}.
4404
4405 2008-05-23  David Lutterkort  <dlutter@redhat.com>
4406
4407         Fix use of possibly uninitialized variable
4408         * get.c(lns_parse): initialize skel; gcc complains about possible
4409           uninitialized use
4410
4411 2008-05-28  David Lutterkort  <dlutter@redhat.com>
4412
4413         Check that augtool reads all of tests/root/ without error
4414
4415 2008-05-23  David Lutterkort  <dlutter@redhat.com>
4416
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.
4420
4421         Escape | when turning a string into a regexp
4422
4423         Add source statements in shell scripts as '.source' nodes
4424
4425         Escape label strings when creating the key regexp for them
4426
4427         Allow lower case characters in shell vars
4428
4429 2008-05-23  Jim Meyering  <meyering@redhat.com>
4430
4431         "echo get /|augtool -n" would read one past end of malloc'd buffer * src/augeas.c (make_path): Avoid buffer overrun.
4432
4433 2008-05-23  David Lutterkort  <dlutter@redhat.com>
4434
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.
4440
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.
4444
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.
4448
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.
4452
4453 2008-05-22  David Lutterkort  <dlutter@redhat.com>
4454
4455         Fix use of uninitialized pointer
4456         ERR must be initialized, since it is later passed to free_lns_error
4457
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.
4461
4462 2008-05-21  James Antill  <james@code.and.org>
4463
4464          Fix for the joy that is the glibc asprintf API.
4465
4466 2008-05-21  James Antill  <james@and.org>
4467
4468          Minor fix to not use bad memory.
4469
4470          Remove strcat's for stpcpy's
4471
4472          Fix escaping strings that end in \  Fix escaping of unprintable bytes
4473
4474          Fix buffer overflow on strings ending in \
4475
4476 2008-05-21  David Lutterkort  <dlutter@redhat.com>
4477
4478         Use glibtoolize on OSX
4479         Patch provided by Rizwan Kassim
4480
4481 2008-05-21  Jim Meyering  <meyering@redhat.com>
4482
4483         Make a file-scoped static array "const".
4484
4485 2008-05-18  Jim Meyering  <meyering@redhat.com>
4486
4487         * src/augtool.c (cleanpath): Don't access path[-1].
4488
4489         * src/transform.c (transform_save): Detect pre-fclose write failure.
4490
4491         * src/internal.c (read_file): Rewrite, plugging a file descriptor leak.
4492
4493 2008-05-16  David Lutterkort  <dlutter@redhat.com>
4494
4495         Added tag release-0.1.1 for changeset fae07193655a
4496
4497         Release 0.1.1
4498
4499         Add dependency on ref.h
4500
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.
4505
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.
4509
4510 2008-05-15  David Lutterkort  <dlutter@redhat.com>
4511
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
4518
4519         Don't leak the key when appending dict entries
4520
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.
4524
4525         Don't leak key/value in parse on error
4526
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.
4530
4531         Free loadpath
4532         Although not strictly necessary, it makes it easier to run augparse through
4533         valgrind and get meaningful results.
4534
4535         Free path
4536
4537         Don't leak SNAME
4538
4539         Free the lns_error in lens_put
4540
4541         Cleanly free regexp patterns; put empty_pattern into ro storage
4542
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
4547
4548 2008-05-14  David Lutterkort  <dlutter@redhat.com>
4549
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.
4555
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.
4559
4560 2008-05-13  David Lutterkort  <dlutter@redhat.com>
4561
4562         Report errors during put
4563
4564         Check that values match the regexp for the corresponding store during put
4565
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
4570         a v2 feature.
4571
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.
4577
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.
4582
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.
4586
4587         Weaken the check for key, label, seq, and counter a tiny bit.
4588
4589 2008-05-12  David Lutterkort  <dlutter@redhat.com>
4590
4591         Proper typecheck for lens unions
4592         Check that lenses have disjoint ctypes and atypes in a union.
4593
4594         Fix up the existing lenses that violate that.
4595
4596 2008-05-09  David Lutterkort  <dlutter@redhat.com>
4597
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.
4601
4602         Use the new '-' operator for key_re
4603
4604         Add subtraction of regular expressions to the language
4605         It is now possible to say something like
4606
4607           let re = /[a-z]+/ - "baseurl"
4608
4609         The '-' operator is only defined between regexps.
4610
4611         Add REGEXP_MINUS; move REGEXP_TO_FA to regexp.c
4612
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.
4616
4617         Store character sets as bitsets
4618         Also clean up the definition of the bitset type and make the bitset_*
4619         functions const correct
4620
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.
4625
4626         There are lots of gyrations to keep the generated regexp reasonably short
4627         (and syntactically correct)
4628
4629 2008-05-08  David Lutterkort  <dlutter@redhat.com>
4630
4631         Check for (some) allocation failures
4632
4633         Reference count 'struct re' instances
4634
4635         Split ref counting macros into separate header
4636
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
4640         failures.
4641
4642         Safer memory allocation from libvirt
4643
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.
4647
4648         Also, add ATTRIBUTE_PURE macro.
4649
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.
4655
4656         There were also cases where we iterated over chars using a char, which was
4657         prone to silent overflow.
4658
4659         Fix mistaken assignments in asserts
4660         Reported by Jeff Johnson
4661
4662 2008-05-06  David Lutterkort  <dlutter@redhat.com>
4663
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.
4667
4668         Patch by Jim Meyering
4669
4670         Small fixes to the specfile
4671         Suggested by Michael Schwendt
4672
4673 2008-05-05  David Lutterkort  <dlutter@redhat.com>
4674
4675         Lens and transform for xinetd.conf
4676
4677         Enclose the regexp for a key in (..) before adding a /
4678
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
4682         was "(none)"
4683
4684         Be more consistent in how NULL labels are printed
4685
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
4689         on.
4690
4691         Rather than turning assertions off globally, only do the hash_verify
4692         asserts when they are explicitly requested by defining HASH_DEBUG_VERIFY
4693
4694         Do not minimize freshly created regexps
4695         The minimization imposes a serious performance penalty, and is generally
4696         not needed.
4697
4698         This also exposes a bug in fa_overlap; for acceptToAccept to work properly,
4699         it needs to be passed a deterministic automaton.
4700
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.
4704
4705 2008-05-02  David Lutterkort  <dlutter@redhat.com>
4706
4707         Spec file fixes
4708
4709 2008-05-01  David Lutterkort  <dlutter@redhat.com>
4710
4711         Added tag release-0.1.0 for changeset c032a957c316
4712
4713         Version 0.1.0
4714
4715         Rename parameter 'glob' to 'glb'
4716         gcc on RHEL4 gets confused and thinks that that shadows the global 'glob'
4717         function.
4718
4719 2008-04-30  David Lutterkort  <dlutter@redhat.com>
4720
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.
4724
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)
4728
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.
4732
4733         Refactor ifcfg.aug
4734         This puts the bits that are generally useful for processing /etc/sysconfig
4735         files into shell.aug
4736
4737 2008-04-30  Jim Meyering  <meyering@redhat.com>
4738
4739         check for a few failed memory allocations
4740         * src/augtool.c: check for a few failed memory allocations
4741
4742 2008-04-30  Harald Hoyer  <harald@redhat.com>
4743
4744         do ldconfig in post/postun of the libs subpackage
4745
4746 2008-04-28  David Lutterkort  <dlutter@redhat.com>
4747
4748         Free the value when freeing a tree node
4749
4750         Plug another memory leak
4751
4752 2008-04-25  David Lutterkort  <dlutter@redhat.com>
4753
4754         Fix segfault when aug_get was passed a "/"
4755         In that case, make_path returns NULL, which must be checked.
4756
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.
4761
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
4764           { "section"
4765              ... other key/value pairs ...
4766              { "baseurl" = "url1" }
4767              { "baseurl" = "url2" }
4768              ...
4769              { "baseurl" = "urlN" }
4770              ... other key/value pairs ...
4771           }
4772
4773         Note that the baseurl nodes have to be consecutive; otherwise, put will
4774         fail.
4775
4776 2008-04-24  David Lutterkort  <dlutter@redhat.com>
4777
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.
4783
4784         This change fixes that and adds a test to demonstrate the problem.
4785
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
4790
4791         * src/fa.c (string_extend): Handle realloc failure.
4792         Patch by Jim Meyering
4793
4794         Update AUTHORS/NEWS
4795
4796         Processing of Apt's sources files
4797         Contributed by Dean Wilson
4798
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.
4802
4803         See http://fedoraproject.org/wiki/PackagingDrafts/MultilibTricks
4804
4805         Remove trailing whitespace from the end of lines
4806         No functional change, only formatting.
4807
4808 2008-04-23  David Lutterkort  <dlutter@redhat.com>
4809
4810         Remove aug_exists - it does not exist anymore
4811
4812         Delete old, outdated notes
4813
4814         Some repo files for yum
4815
4816         Add todo file for low-level tasks that don't make sense on the website
4817
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.
4821
4822         Patch provided by Harald Hoyer
4823
4824         Include the augtool manpage as doc in the RPM
4825
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
4829         can be NULL.
4830
4831         Also, parseline initializes all args as NULL now to guard against garbage
4832         pointers accumulating from previous uses.
4833
4834         Don't complain about missing optional args
4835         For example, both 'print' and 'print PATH' are legal. Make sure we accept
4836         either.
4837
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.
4841
4842         Revised help texts
4843
4844         Man page
4845         Provided by Dean Wilson
4846
4847 2008-04-22  David Lutterkort  <dlutter@redhat.com>
4848
4849         Fix two memory leaks in the interpreter
4850
4851         Plug more memory leaks
4852
4853         Fix memory leak from not freeing hash table entries
4854
4855         Clean up the error path in load_file; free the loaded text in transform_load
4856
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
4859         gnulib soon.
4860
4861         Also, make read_file return a char * instead of the silly const char *.
4862
4863         Check the return value from hash_create
4864
4865         More const-correctness fixes
4866         Patch provided by Jim Meyering
4867
4868         File needed for running the tests
4869
4870         Stick more closely to what the shell accepts as assignments
4871
4872         Properly escape/unescape quotes in strings
4873         Patch provided by Alan Pevec
4874
4875 2008-04-21  David Lutterkort  <dlutter@redhat.com>
4876
4877         Updated for 0.0.8 and upcoming 0.1.0 release
4878
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.
4883
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.
4887
4888         Propagate failure of transform_save up
4889
4890         Sync compiler warnings with latest from libvirt
4891         This should avoid build failures seen on Debian, caused by
4892         -fstack-protector
4893
4894         Also fix build failure caused by addition of -Wformat-security
4895
4896         Mention people who sent patches
4897
4898         Parse network configs in /etc/sysconfig/ifcfg-*
4899         Patch provided by Alan Pevec
4900
4901         Don't mark ROOT for MAKE_PATH as const - it's not always true
4902
4903         Cap file reads (arbitrarily) at 32MB
4904
4905         Don't ever try to read a directory
4906         Suggested by Jim Meyering.
4907
4908         Return int from aug_print to indicate errors
4909         Check for failures during printing and return an indication whether printing
4910         succeeded or not.
4911
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.
4915
4916         Mark the places where the passed-in struct augeas is readonly in the API.
4917
4918         Patch provided by Jim Meyering
4919
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.
4922
4923         Suggested by Jim Meyering.
4924
4925         Add "2008" to the copyright in the headers
4926
4927 2008-04-19  David Lutterkort  <dlutter@redhat.com>
4928
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.
4933
4934 2008-04-18  David Lutterkort  <dlutter@redhat.com>
4935
4936         Hashtable from Kazlib 1.20
4937         Available from http://users.footprints.net/~kaz/kazlib.html
4938
4939         Abort if failing assertions are not used
4940
4941 2008-04-19  David Lutterkort  <dlutter@redhat.com>
4942
4943         Remove pathsplit symbol
4944
4945 2008-04-16  David Lutterkort  <dlutter@redhat.com>
4946
4947         Added tag release-0.0.8 for changeset cb00aa18e518
4948
4949         Release 0.0.8
4950
4951         Remove unused function
4952
4953         Install lens tests in lenses/tests/ not lenses/
4954
4955         Use the right path expression to print the whole tree
4956
4957         Don't segfault when a test fails without producing any tree
4958
4959 2008-04-15  David Lutterkort  <dlutter@redhat.com>
4960
4961         Call the node for a boot entry 'title'
4962
4963 2008-04-14  David Lutterkort  <dlutter@redhat.com>
4964
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.
4969
4970         Start sequences at 1, in symmetry with the element[N] counting
4971
4972         Consolidate tree allocation into one make_tree function
4973
4974         Change the ins syntax to support insert before/after
4975         This reflects the change to the aug_insert API
4976
4977         Handle searching for the last() element properly
4978         path_first didn't find anything when looking for 'element[last()]'
4979
4980         Process grub.conf
4981
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
4986         deleted)
4987
4988         Now, first generate a list of nodes to delete before removing anything.
4989
4990         Fix put test - it was checking for hte wrong result
4991
4992         Running a failing test fails loading the whole module
4993
4994 2008-04-11  David Lutterkort  <dlutter@redhat.com>
4995
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.
5000
5001         Syntax and semantics follow XPath.
5002
5003         Run all tests - don't abort after the first failure
5004
5005 2008-04-10  David Lutterkort  <dlutter@redhat.com>
5006
5007         Escape values and enclose them in quotes when printing
5008
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.
5012
5013 2008-04-09  David Lutterkort  <dlutter@redhat.com>
5014
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.
5019
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.
5023
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.
5028
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.
5032
5033         Update README
5034
5035         Remove 'spec' files and tests that don't make sense any longer
5036
5037         Fail test scripts on _any_ unexpected error
5038
5039         Distribute lens tests
5040
5041         Suppress .rpmnew/save files
5042
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.
5046
5047         Update augtool round-trip tests and add them to 'make check'
5048         Update the tests to the new layout of the tree.
5049
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
5053
5054         Fix underallocation
5055
5056         Only attempt to save if there are dirty files
5057
5058         Reread the original file from the same root on save
5059
5060         Pass the children of the right tree
5061
5062         Fix some errors that made aug_save fail
5063
5064         Mark a freshly loaded tree as clean
5065
5066         Check the return value of asprintf
5067         Handling of asprintf failures (and allocation failures in general) needs a
5068         lot more work.
5069
5070         Small touchup - needs much more work
5071
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
5075         produced.
5076
5077 2008-04-08  David Lutterkort  <dlutter@redhat.com>
5078
5079         Typecheck the atype of concat and iter
5080
5081         Typecheck the atype of union
5082
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
5087
5088         Port of the lenses for inittab and sshd_config tothe new syntax
5089
5090         Curb the repeated printing of exceptions
5091
5092         Clearer error message
5093
5094         Processing of pam.d
5095
5096         Pull some useful space deleters into Util
5097
5098         Check that let expressions work
5099
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.
5105
5106         Mark hosts and aliases for autoloading
5107
5108         Load from the new ../lenses dir
5109
5110         Obey setting of an explicit root directory
5111
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.
5115
5116         Handle continuation lines; more thorough tests
5117
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.
5121
5122         Print a newline on EOF
5123
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
5128         module.
5129
5130 2008-04-07  David Lutterkort  <dlutter@redhat.com>
5131
5132         Builtins for filters and transforms
5133         Three simple builtins to construct transforms:
5134
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
5138
5139 2008-04-08  David Lutterkort  <dlutter@redhat.com>
5140
5141         Implement free_lens
5142
5143 2008-04-07  David Lutterkort  <dlutter@redhat.com>
5144
5145         A lens for yum
5146
5147         Fix bad free
5148
5149         Add Util.split
5150
5151         Local let expressions
5152         Add syntax for
5153           let a =
5154             let b = exp in
5155               exp
5156
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
5164
5165         Add a 'gensym' builtin
5166
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
5171           in valgrind better
5172
5173 2008-04-04  David Lutterkort  <dlutter@redhat.com>
5174
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.
5179
5180         Initialize *err properly, even if there is no tree
5181
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)
5186
5187         Kludge around an inconsistency with print_tree
5188
5189         Beginnings of tests for the interpreter
5190
5191         Exceptions during compilation countas failure
5192
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.
5198
5199         Start a util module with some common functions
5200
5201         Run lens tests during 'make check'
5202
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.
5206
5207         Handle trailing slashes on loadpath components cleanly
5208
5209         /etc/aliases processing in the new syntax with tests
5210
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.
5215
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)
5219
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
5222         there.
5223
5224         Small tweaks
5225
5226         Produce exn when tree_rm/tree_set fail
5227
5228         Update yylloc for string/regexp constants
5229
5230 2008-04-03  David Lutterkort  <dlutter@redhat.com>
5231
5232         When compile_exp produces an exn, bind it anyway
5233         This avoids lots of trouble with NULL values
5234
5235         Desugar (lens)+
5236         The construct (lens)+ is now processed as lens . lens*
5237
5238         Fix segv on repetition of regexps
5239
5240         Clearer error messages from typechecking lenses
5241
5242         Fix key regexp for union; throw exception on subtrees with multiple keys
5243
5244         Have lens constructors return exns on failure
5245         Also refactor exception generation.
5246
5247         Add a test that produces an exception
5248
5249         Allow '*' as a test result indicating an expected exception
5250
5251         Error propagation from lns_put
5252         Record a lns_error if things don't work out during put. Generate an
5253         exception on error.
5254
5255         A very first lens in the new syntax, with tests
5256
5257         Use the default string for a del lens, really.
5258
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
5262
5263         Add explicit loadpath
5264         augtool and augparse now take an explicit loadpath with the -I option,
5265         which can be repeated multiple times.
5266
5267         aug_init takes a loadpath as a new argument
5268
5269         Load needed modules
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
5272         path.
5273
5274         Rename struct env to struct module
5275
5276         Separate function composition from concatenation
5277         Function composition is now written as 'f ; g' instead of 'f . g'
5278
5279         Allow tree constants with NULL labels
5280
5281         Clean up printing of empty trees
5282
5283         Clarify the reference counting terminology
5284
5285         Free the skel that lns_put creates initially
5286
5287         Make sure free_dict frees the whole dict
5288
5289         Fix reference problem
5290         The wrong type was being unref'd
5291
5292 2008-04-02  David Lutterkort  <dlutter@redhat.com>
5293
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.
5297
5298         Clear skel and dict in state so assertions in create_ don't trip
5299
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.
5303
5304         Fix incorrect usage of size parameter for re_match
5305
5306         Add missing break in get/parse_union
5307         Without it, it acts like a concat that drops trees on the floor
5308
5309         Allow printing of hidden tree nodes
5310         When printing test results, we want to see the full tree
5311
5312         Pass lns_error to parse; free dicts and skels
5313
5314         Report errors from get as exceptions
5315         Adds a value kind 'EXN'. When the interpreter gets such a value, it bails
5316         out immediately.
5317
5318         lns_get now reports parse errors in an lns_error struct, which is turned
5319         into an exception in the interpreter.
5320
5321         Added tag ml-syntax-start for changeset fcd6c04a1eed
5322
5323         A subtree without a key matches "/"
5324
5325         Print \n after test result
5326
5327         Allocate enough bytes for string in unescape
5328
5329         Free regexps cleanly
5330
5331         Fill in subtree->atype with empty regexp
5332
5333 2008-04-01  David Lutterkort  <dlutter@redhat.com>
5334
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.
5339
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.
5342
5343 2008-03-25  David Lutterkort  <dlutter@redhat.com>
5344
5345         Revamp the language
5346
5347 2008-03-14  David Lutterkort  <dlutter@redhat.com>
5348
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.
5351
5352         Rename parse_* functions to get_*
5353
5354         Rename parser.c to get.c
5355
5356         Add bcprules (by Benjamin Pierce); needed by lenses.tex
5357
5358         Added tag release-0.0.7 for changeset 93563112907c
5359
5360         Release 0.0.7
5361
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)
5365
5366         Be a little more restrictive on when to dump the whole grammar
5367
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.
5371
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)
5379
5380 2008-03-13  David Lutterkort  <dlutter@redhat.com>
5381
5382         Defer allocating storage for a state_set as long as possible
5383
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
5387         array_max_expansion
5388
5389         Speed up FA_MINUS by checking for some simple cases with fixed results
5390
5391         Speed up fa_contains by not determinizing FA1
5392
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
5397
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
5401         faster.
5402
5403         Remove unused macro
5404
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}
5408
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.
5412
5413         Rejigger the weights assigned by chr_score to make fa_example more predictable
5414
5415         Minor optimization for fa_example
5416
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)
5419
5420         Store that pairs of states for intersection in a hash table
5421
5422         Sorted state sets
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.
5425
5426 2008-03-12  David Lutterkort  <dlutter@redhat.com>
5427
5428         Fix two memory leaks
5429
5430         Remove the last uses of FA_MAP
5431         Use STATE_SET instead, since it's faster and lighterweight
5432
5433         Rename structs fa_state and fa_trans to state and trans
5434
5435         [mq]: min_hopcroft.patch
5436
5437         Sort transitions before generating examples
5438         Otherwise, examples depend on the order in which transitions appear for
5439         each state.
5440
5441         Add state sets at head of state_set_list
5442
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.
5446
5447         Reverse transitions in place in fa_reverse
5448
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.
5452
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.
5456
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)
5460
5461 2008-03-11  David Lutterkort  <dlutter@redhat.com>
5462
5463         fa_star added a spurious epstrans loop on new initial
5464
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
5468         purpose.
5469
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.
5475
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.
5479
5480 2008-03-10  David Lutterkort  <dlutter@redhat.com>
5481
5482         Fix subtle bug in determinize
5483         Fix a bug that would only hit if '\0' is ever in points.
5484
5485 2008-03-06  David Lutterkort  <dlutter@redhat.com>
5486
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.
5491
5492         Fix example generation, it was completely broken
5493         The previous algorithm was way too simplistic, and failed on more
5494         complicated languages.
5495
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.
5499
5500         Fix some cornercases in fa_example
5501
5502 2008-03-05  David Lutterkort  <dlutter@redhat.com>
5503
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^*
5507
5508         Fix tyops
5509
5510         Added tag release-0.0.6 for changeset 9a4f846673ac
5511
5512         Released version 0.0.6
5513
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.
5519
5520         Also added switches to augtool to set this from the command line, and to
5521         set the filesystem root.
5522
5523         Added tag release-0.0.5 for changeset 0efe2a620e39
5524
5525         Mark print_re as unused
5526
5527         Release 0.0.5
5528
5529         Make aug_close public
5530
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
5533         global variables.
5534
5535 2008-03-04  David Lutterkort  <dlutter@redhat.com>
5536
5537         Add fa_example which produces an example string from a regular language
5538
5539         Add a test that performs Anders Moeller's ambiguity algorithm manually
5540
5541         Two bug fixes
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
5545
5546         Also added tests to check these two problems.
5547
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
5551         per character)
5552
5553         Fix order in which libraries are installed
5554         libaugeas must be installed after libfa, since it depends on it.
5555
5556         Remove old sketch of interface; not needed anymore
5557
5558         Compute the complement, set difference and overlap of two languages
5559
5560         Fix a bug in how '.' is being handled
5561         The '.' was treated the same as [\n] instead of [^\n] by mistake.
5562
5563         Also fixes a small bug in fa_contains.
5564
5565         Add deciding unambiguously iterable based on ua concatenable
5566
5567 2008-03-03  David Lutterkort  <dlutter@redhat.com>
5568
5569         Automatically free all automata allocated during a test
5570
5571         Cleanup the returned FA in fa_intersect
5572
5573         Add a target to run fatest through valgrind
5574
5575         Add fa_intersect: intersection of regular languages
5576
5577         Comment the uses of FA_MAP better and rename some internal helper functions
5578
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.
5582
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.
5586
5587 2008-02-29  David Lutterkort  <dlutter@redhat.com>
5588
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
5592
5593         Performance improvements
5594         (1) Don't minimize the automaton quite so often. Now, only fa_compile minimizes
5595             by default.
5596         (2) Instead of full-on minimization, clean up the automaton before
5597             returning to the user by removing dead transitions/states.
5598
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.
5602
5603         Add tests for language subsets and equality
5604
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/)
5608
5609         Eventually, this should becomea standalone library, seeing how there does
5610         not seem to be any open-source, maintained finite automata library.
5611
5612         Some unit testing help
5613         This is an adapted version of CuTest
5614         (http://sourceforge.net/projects/cutest/) written by Asim Jalis
5615
5616         Minimal docs for aug_save and aug_print
5617
5618 2008-02-26  David Lutterkort  <dlutter@redhat.com>
5619
5620         Ignore more stuff
5621
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
5625
5626 2008-02-25  David Lutterkort  <dlutter@redhat.com>
5627
5628         Added tag release-0.0.4 for changeset d8e750d82f97
5629
5630         Version 0.0.4
5631
5632         Some NEWS
5633
5634         Package as RPM
5635
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)
5641
5642         Only define print_dict when it is used
5643
5644         Added tag release-0.0.3 for changeset 56cb08f222a3
5645
5646         Version 0.0.3
5647
5648         Test for readline in a way that works on RHEL5
5649
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
5654
5655         Rename AUGEAS_SPECLIB to AUGEAS_LENS_LIB
5656
5657         Added tag release-0.0.2 for changeset f981ccccb0ab
5658
5659         Include the try script in the distribution
5660
5661         Bump version to 0.0.2
5662
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
5667
5668         Fix warnings about uninitialized variables
5669
5670         Add config.h to libaugeas.la
5671
5672         Stricter types for some combinators. List needed reg lang operations
5673
5674 2008-02-21  David Lutterkort  <dlutter@redhat.com>
5675
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
5680
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
5684
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
5688         children.
5689
5690         Fix splitting of AcceptEnv
5691         The list of env vars for AcceptEnv was not being split into individual
5692         pieces
5693
5694 2008-02-20  David Lutterkort  <dlutter@redhat.com>
5695
5696         A (pretty kludgy) description for cmfm.conf
5697
5698         Make printing of skel/dict optional
5699
5700         Print test results a tad prettier
5701
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
5705         implementation.
5706
5707         The syntax for regular expressions is now RE_SYNTAX_POSIX_MINIMAL_EXTENDED,
5708         essentially extended POSIX regular expressions, except that '.' does not
5709         match newlines.
5710
5711         Clean up regexps for POSIX
5712         Various small fixes to regexps to make them work properly as POSIX regexps.
5713
5714         Added tag remove-any-first-follow for changeset 0d22160e9494
5715
5716         Remove any matches ... and ..? from the language. Remove first/follow sets
5717         They currently require lookahead assertions from the underlying regexp
5718         engine.
5719
5720         Since any matches were the only reason to compute first/follow sets, remove
5721         those, too.
5722
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.
5726
5727         Don't segfault when parsing fails
5728
5729 2008-02-19  David Lutterkort  <dlutter@redhat.com>
5730
5731         Drop CF-oriented check for ambiguity through looking at first sets
5732
5733         Allow escaping of a slash in tegular expressions
5734
5735 2008-02-18  David Lutterkort  <dlutter@redhat.com>
5736
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
5741         first 'token'.
5742
5743         The downside is that rules can not be recursive anymore, as that would
5744         make the matched language non-regular.
5745
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.
5749
5750         Unfortunately, we have to keep first/follow computations to construct the
5751         fairly tricky regexps that are used for ANY patterns.
5752
5753         Remove unused token T_FIELD
5754
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.
5758
5759         Add Match blocks
5760
5761         Remove leading whitespace inside Match directives
5762
5763         Fix nested splits
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.
5768
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.
5772
5773         Properly print split nodes
5774
5775         Lenses for sshd_config
5776         This is interesting because of the treatment of AcceptEnv and similar
5777         constructs
5778
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)
5784
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
5788         one node.
5789
5790 2008-02-15  David Lutterkort  <dlutter@redhat.com>
5791
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
5795
5796         Fix very bad use of realloc
5797
5798         Adjust expected diff
5799         Do not allow comments to disappear
5800
5801         Fix test
5802         The old diff was bogus (it expected a comment to be removed that has to
5803         stay there)
5804
5805         Cleanly handle comments
5806
5807         Default COLON to ':' plus tab. Simple tests for aliases
5808
5809         Informal survey of files in /etc
5810
5811         Ignore intermediate Latex files
5812
5813         Store comments in subtrees so they are restored properly
5814
5815         Turn into a test on a legal tree and make it pass
5816
5817         Fix split of QUANT_MAYBE. Add create_quant_maybe
5818
5819         Make aliases work
5820
5821         Free the results of split_tree
5822
5823         Properly split an empty * as an empty list
5824
5825         Try to make putting QUANT_MAYBE work
5826         This is still kinda suspect
5827
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 ]
5832
5833         Modified yum spec that seems to work
5834
5835         Script to ease testing of augtool
5836
5837         Enable parsing of pam
5838
5839         Remove bogus reset of 'record' counter
5840
5841         Fix print problem
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.
5844
5845         Add clear command
5846
5847         Properly handle a NULL value in aug_set. Make aug_insert deal with NULL labels.
5848
5849 2008-02-14  David Lutterkort  <dlutter@redhat.com>
5850
5851         Fixed, nicely working tests
5852
5853         Readline completion
5854         Complete command names and tree paths.
5855
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
5858         API.
5859
5860         Major rework
5861         Code still unbelievably buggy and segfaults in lots of places, but it is
5862         fairly clean and works for choice examples.
5863
5864         The reworked code is based fairly closely of boomerang and
5865         lenses. doc/lenses.tex describes some of the background.
5866
5867 2008-02-13  David Lutterkort  <dlutter@redhat.com>
5868
5869         Cleaner syntax
5870         The spec language now contains instructions on how to build the tree inline
5871         with the grammar.
5872
5873         This change is majorly broken.
5874
5875 2008-02-12  David Lutterkort  <dlutter@redhat.com>
5876
5877         Better description of lenses
5878
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).
5882
5883 2008-02-08  David Lutterkort  <dlutter@redhat.com>
5884
5885         Beginnings of a formal writeup
5886
5887 2008-01-30  David Lutterkort  <dlutter@redhat.com>
5888
5889         Remove field references as a match
5890         It used to be possible to have a rule like
5891           rule: RE '=' $1
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.
5894
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
5897         incomplete AST's.
5898
5899         Slightly mroe helpful error message during parsing
5900
5901         Don't segfault when the parse matches nothing
5902
5903 2008-01-29  David Lutterkort  <dlutter@redhat.com>
5904
5905         Another yum test
5906
5907         Remove more unneeded cruft
5908
5909         Remove unneeded safe_free, TRUE and FALSE
5910
5911         Remove unneeded ROOT_DIR and update augtool help
5912
5913         Remove dead code and misleading comment
5914
5915         Remove files not needed any longer
5916
5917         Update NEWS
5918
5919         Run all the augtest tests by default and from make check
5920
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.)
5926
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.
5931
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.
5935
5936         Test that reordering of subtrees works
5937
5938         Set the root of the tree from include
5939
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
5944         the config tree.
5945
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.
5949
5950         Fix bug in creating sequence subtrees
5951
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
5957         path)
5958
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.
5963
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
5967         component.
5968
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.
5973
5974         As a byproduct, a number of questionable constructs are spotted and
5975         rejected:
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
5982               the whole grammar
5983
5984         Produce dot files for the grammar
5985
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
5991
5992         Some of the tests are still failing.
5993
5994         aug_ls: Fix bad parent comparison
5995         Before /foo/1000 was listed as a child of /foo/1
5996
5997         Docs
5998
5999 2008-01-24  David Lutterkort  <dlutter@redhat.com>
6000
6001         Rough thoughts about emit
6002
6003 2008-01-21  David Lutterkort  <dlutter@redhat.com>
6004
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.
6011
6012         This ensures that in the AST, the children of '*' and '+' have different
6013         names and simplifies the 'put' direction of the transformation
6014         considerably.
6015
6016         Some config settings - most of them need to be exposed through configure.ac
6017
6018 2008-01-18  David Lutterkort  <dlutter@redhat.com>
6019
6020         Global filename does not exist. Use basename
6021
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.
6026
6027         Spec files needed by the tests
6028
6029         Don't segfault in ast_dot on NULL ast
6030
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.
6036
6037         As a byproduct, parts of the AST that are no longer needed are actually
6038         freed.
6039
6040         Handle null values/tokens when storing
6041
6042         Detect association of values with impossible paths
6043
6044 2008-01-17  David Lutterkort  <dlutter@redhat.com>
6045
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
6049         files.
6050
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
6055         revision will fail.
6056
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
6060         written to disk.
6061
6062         This is a first version that works for some restricted set of grammars, but
6063         needs a lot more testing.
6064
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.
6069
6070         The handle of an action is a regular expression matching the path generated
6071         by that action.
6072
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.
6077
6078         Split parsing and evaluating into to passes; references to fields
6079         are too hard to resolve with a partially constructed AST.
6080
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
6083         ast'
6084
6085         Remove aug_token and any mention of it - that has been replaced by struct
6086         ast.
6087
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.
6092
6093         This leads to a cleaner parser and makes constructing an explicit AST
6094         simpler.
6095
6096         Prefer comments over kv
6097
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.
6101
6102         Remove debug printing in augparse about loaded maps
6103
6104 2008-01-07  David Lutterkort  <dlutter@redhat.com>
6105
6106         Free tokens entirely when freeing file
6107
6108         Set action in all path components
6109
6110 2008-01-03  David Lutterkort  <dlutter@redhat.com>
6111
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.
6117
6118         Still missing is saving of the tree back to file, and in particular adding
6119         new entries in the tree to such files.
6120
6121         Move hosts and inittab under /etc
6122
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.
6127
6128         Compile regexps for multiline matching
6129
6130 2008-01-02  David Lutterkort  <dlutter@redhat.com>
6131
6132         Fix syntax error; we want to test that missing defaults are noticed
6133
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.
6137
6138         Print the filename in errors about tokens (abbrevs)
6139
6140         Add name to grammars
6141
6142         Add -v switch for printing errors
6143
6144         Two more test grammars
6145
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.
6150
6151 2007-12-21  David Lutterkort  <dlutter@redhat.com>
6152
6153         Check grammar acceptance/rejection
6154
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
6163             has been parsed
6164
6165         Snapshot before changing the syntax of rule actions
6166
6167 2007-12-20  David Lutterkort  <dlutter@redhat.com>
6168
6169         Remove unused keyword and token 'default'
6170
6171         Fix field number computation
6172
6173         Two more rejection tests
6174
6175         Add a simple test for rejecting bad grammars
6176
6177         Don't try to dump a NULL grammar
6178
6179         Introduce SUBMATCH_P macro; cleanup unnecessary switch statements.
6180
6181         Statically number all matches in a rule. Check for illegal field refs.
6182
6183         Collect unprocessed tokens in the parser state.
6184
6185         Print quantifier after rule reference
6186
6187         Remove unneeded debug print
6188
6189         Produce tokens during parsing.
6190         Also, nicer printing of the tokens read.
6191
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)
6197
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
6200         hard to determine.
6201
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.
6205
6206         Add options to control grammar printing
6207
6208         Set match->owner for _all_ matches
6209
6210         Two more sample/test grammars
6211
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.
6217
6218 2007-12-14  David Lutterkort  <dlutter@redhat.com>
6219
6220         Factor aug_make_file into internal.c
6221
6222 2007-12-01  David Lutterkort  <dlutter@redhat.com>
6223
6224         Be more verbose about which tests were run
6225
6226         Do not include unused util.h
6227
6228         Mention language bindings
6229
6230         Added tag release-0.0.1 for changeset 69688020bb1b
6231
6232         Some news
6233
6234         Disribute tests and doc/examples.txt
6235
6236         Some pseudo-code examples
6237
6238         Explain yourself
6239
6240 2007-11-30  David Lutterkort  <dlutter@redhat.com>
6241
6242         Add a test that shows how to change the initdefault
6243
6244         Add help texts and a help command
6245
6246         Add aug_match as a simple query facility
6247
6248         Handle /etc/inittab
6249
6250         Make the ROOT_DIR a constant instead of hardcoding it everywhere
6251
6252         Test deleting everything from /etc/hosts
6253
6254         Describe what a test description looks like
6255
6256         Add a provider for /etc/hosts and reorganize how providers are loaded/saved a little
6257
6258         aug_rec_save: Check input parameters
6259
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
6263
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
6266         and records/lines)
6267
6268         Root filesys that tests pass against
6269
6270         Basic tests for record parsing
6271
6272 2007-11-26  David Lutterkort  <dlutter@redhat.com>
6273
6274         Trim trailing slashes from paths
6275
6276         Keep /system and /system/config around at all times
6277
6278         Access aug_insert from the command line; do better error checking for aug_insert
6279
6280         Autotools support for building
6281
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
6285         files
6286
6287         augtool gives a basic mean to inspect the keystore from the command line
6288
6289         Ignore some files