From: TizenOpenSource Date: Tue, 20 Feb 2024 05:50:41 +0000 (+0900) Subject: Bump to 1.14.1 X-Git-Tag: accepted/tizen/unified/20240221.062943^0 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fupstream%2Faugeas.git;a=commitdiff_plain;h=HEAD Bump to 1.14.1 Signed-off-by: TizenOpenSource --- diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 0000000..0218c87 --- /dev/null +++ b/AUTHORS @@ -0,0 +1,156 @@ +-*- coding: utf-8 -*- + +Written by: + + David Lutterkort + +Committers: + + Matthew Booth + Michael Chapman + Dominic Cleal + Francis Giraldeau + Raphaël Pinson + +Contributions by: + + Jasper Lievisse Adriaanse + Partha Aji + Erik B. Andersen + Sebastien Aperghis-Tramoni + Mathieu Arnold + Sergio Ballestrero + Sylvain Baubeau + Oliver Beattie + Tim Bishop + Anders F Björklund + Jurjen Bokma + Aurelien Bompard + Joey Boggs + Lorenzo Dalrio + Francois Deppierraz + Luc Didry + Dominique Dumont + Craig Dunn + Free Ekanayaka + Michal Filka + Freakin + Marc Fournier + Davide Guerri + Andy Grimm + Travis Groth + Adam Helms + Harald Hoyer + Shannon Hughes + Richard W.M. Jones + Simon Josi + Bryan Kearney + Jason Kincl + Andrew Colin Kissa + Francois Lebel + Frédéric Lespez + Miroslav Lichvar + Jasper Lievisse Adriaanse + Tom Limoncelli + Erinn Looney-Triggs + Duncan Mac-Vicar P. + Jeroen van Meeuwen + Jim Meyering + Sean Millichamp + Craig Miskell + Michael Moll + Tim Mooney + Joel Nimety + Matthaus Owens + Matt Palmer + Bill Pemberton + Dan Prince + Alan Pevec + Brett Porter + Robin Lee Powell + Michael Pimmer + Branan Purvine-Riley + Andrew Replogle + Pat Riehecky + Lubomir Rintel + Roman Rakus + David Salmen + Carlos Sanchez + Satoru SATOH + Nicolas Valcárcel Scerpella + Gonzalo Servat + Nahum Shalman + Borislav Stoichkov + Tim Stoop + Laine Stump + Jiri Suchomel + Ivana Hutarova Varekova + Simon Vocella + Frederik Wagner + Dean Wilson + Igor Pashev + Micah Anderson + Domen Kožar + Filip Andres + Josh Kayse + Jacob M. McCann + Danny Yates + Terence Haddock + Athir Nuaimi + Ian Berry + Gabriel de Perthuis + Brian Harrington + Mathieu Alorent + Rob Tucker + Stephen P. Schaefer + Pascal Lalonde + Tom Hendrikx + Yanis Guenane + Esteve Fernandez + Dietmar Kling + Michael Haslgrübler + Andrew N Golovkov + Matteo Cerutti + Tomas Hoger + Tomas Klouda + Kaarle Ritvanen + François Maillard + Mykola Nikishov + Robert Drake + Simon Séhier + Vincent Brillault + Mike Latimer + Lorenzo M. Catucci + Joel Loudermilk + Frank Grötzner + Pino Toscano + Geoffrey Gardella + Matt Dainty + Jan Doleschal + Joe Topjian + Julien Pivotto + Gregory Smith + Justin Akers + Oliver Mangold + Geoff Williams + Florian Chazal + Dimitar Dimitrov + Cédric Bosdonnat + Christoph Maser + Chris Reeves + Gerlof Fokkema + Daniel Trebbien + Robert Moucha + Craig Miskell + Anton Baranov + Josef Reidinger + James Valleroy + Pavel Chechetin + Pedro Valero Mejia + David Farrell + Nathan Ward + Xavier Mol + Nicolas Gif + Jason A. Smith + George Hansper + Heston Snodgrass diff --git a/COPYING b/COPYING index 6ad3d4b..cf9b6b9 100644 --- a/COPYING +++ b/COPYING @@ -1,18 +1,510 @@ -$Id: COPYING,v 1.3 2006-10-26 16:20:28 eggert Exp $ -The files in here are mostly copyright (C) Free Software Foundation, and -are under assorted licenses. Mostly, but not entirely, GPL. - -Many modules are provided dual-license, either GPL or LGPL at your -option. The headers of files in the lib directory (e.g., lib/error.c) -state GPL for convenience, since the bulk of current gnulib users are -GPL'd programs. But the files in the modules directory (e.g., -modules/error) state the true license of each file, and when you use -'gnulib-tool --lgpl --import ', gnulib-tool either rewrites -the files to have an LGPL header as part of copying them from gnulib -to your project directory, or fails because the modules you requested -were not licensed under LGPL. - -Some of the source files in lib/ have different licenses. Also, the -copy of maintain.texi in doc/ has a verbatim-copying license, and -doc/standards.texi and make-stds.texi are GFDL. Most (but not all) -m4/*.m4 files have nearly unlimited licenses. + + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations +below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. +^L + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it +becomes a de-facto standard. To achieve this, non-free programs must +be allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. +^L + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control +compilation and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. +^L + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. +^L + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at least + three years, to give the same user the materials specified in + Subsection 6a, above, for a charge no more than the cost of + performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. +^L + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. +^L + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply, and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License +may add an explicit geographical distribution limitation excluding those +countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. +^L + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS +^L + How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms +of the ordinary General Public License). + + To apply these terms, attach the following notices to the library. +It is safest to attach them to the start of each source file to most +effectively convey the exclusion of warranty; and each file should +have at least the "copyright" line and a pointer to where the full +notice is found. + + + + Copyright (C) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or +your school, if any, to sign a "copyright disclaimer" for the library, +if necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James + Random Hacker. + + , 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! + + diff --git a/HACKING.md b/HACKING.md new file mode 100644 index 0000000..b04dde9 --- /dev/null +++ b/HACKING.md @@ -0,0 +1,74 @@ +This file explains some details about developing the Augeas C library. + +# Check out the sources + +The sources are in a git repo; to check it out run + +``` + git clone git://github.com/hercules-team/augeas +``` + +# Building from git + +Besides the usual build tools (gcc, autoconf, automake etc.) you need the +following tools and libraries to build Augeas: + +* Bison +* Flex +* readline-devel +* libxml2-devel +* libselinux-devel (optional) + +Augeas uses gnulib, and you need a checkout of gnulib. The build scripts +can create a checkout for you behind the scenes - though if you already +have a gnulib checkout, you can pass its location to autogen.sh with the +--gnulib-srcdir option. + +At its simplest, you build Augeas from git by running the following +commands in the toplevel directory of your Augeas checkout: + + ./autogen.sh [--gnulib-srcdir=$GNULIB_CHECKOUT] + make && make check && make install + +It is recommended though to turn on a few development features when +building; in particular, stricter compiler warnings and some debug +logging. You can pass these options either to autogen.sh or to +configure. You'd then run autogen like this: + + ./autogen.sh --enable-compile-warnings=error --enable-debug=yes + +# Running augtool + +The script ./src/try can be used to run ./src/augtool against a fresh +filesystem root. It copies the files from tests/root/ to build/try/ and +starts augtool against that root, using the lenses from lenses/ (and none +of the ones that might be installed on your system) + +The script can be used for the following; OPTS are options that are passed +to augtool verbatim + +* `./src/try OPTS`: run the commands from `build/augcmds.txt` +* `./src/try cli OPTS`: start an interactive session with augtool +* `./src/try gdb`: start gdb and set it up from `build/gdbcmds.txt` for + debugging augtool with commands in `build/augcmds.txt` +* `./src/try valgrind`: run the commands from `build/augcmds.txt` through + augtool under valgrind to check for memory leaks + +Furthermore, the test suite invoked with `make check` includes a test +called `test-get.sh`, which ensures that reading the files in +`tests/root/` with `augtool` does not lead to any errors. (It does not +verify the parsed syntax tree however; you'll have to extend the +individual lens tests under `lenses/tests/` for that.) + +# Platform specific notes + +## Mac OSX + +OSX comes with a crippled reimplementation of readline, `libedit`; while +Augeas will build against `libedit`, you can get full readline +functionality by installing the `readline` package from +[Homebrew](http://brew.sh/) and setting the following: +```sh +> export CPPFLAGS=-I/usr/local/opt/readline/include +> export LDFLAGS=-L/usr/local/opt/readline/lib +``` diff --git a/INSTALL b/INSTALL new file mode 100644 index 0000000..5458714 --- /dev/null +++ b/INSTALL @@ -0,0 +1,234 @@ +Installation Instructions +************************* + +Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, +2006 Free Software Foundation, Inc. + +This file is free documentation; the Free Software Foundation gives +unlimited permission to copy, distribute and modify it. + +Basic Installation +================== + +Briefly, the shell commands `./configure; make; make install' should +configure, build, and install this package. The following +more-detailed instructions are generic; see the `README' file for +instructions specific to this package. + + The `configure' shell script attempts to guess correct values for +various system-dependent variables used during compilation. It uses +those values to create a `Makefile' in each directory of the package. +It may also create one or more `.h' files containing system-dependent +definitions. Finally, it creates a shell script `config.status' that +you can run in the future to recreate the current configuration, and a +file `config.log' containing compiler output (useful mainly for +debugging `configure'). + + It can also use an optional file (typically called `config.cache' +and enabled with `--cache-file=config.cache' or simply `-C') that saves +the results of its tests to speed up reconfiguring. Caching is +disabled by default to prevent problems with accidental use of stale +cache files. + + If you need to do unusual things to compile the package, please try +to figure out how `configure' could check whether to do them, and mail +diffs or instructions to the address given in the `README' so they can +be considered for the next release. If you are using the cache, and at +some point `config.cache' contains results you don't want to keep, you +may remove or edit it. + + The file `configure.ac' (or `configure.in') is used to create +`configure' by a program called `autoconf'. You need `configure.ac' if +you want to change it or regenerate `configure' using a newer version +of `autoconf'. + +The simplest way to compile this package is: + + 1. `cd' to the directory containing the package's source code and type + `./configure' to configure the package for your system. + + Running `configure' might take a while. While running, it prints + some messages telling which features it is checking for. + + 2. Type `make' to compile the package. + + 3. Optionally, type `make check' to run any self-tests that come with + the package. + + 4. Type `make install' to install the programs and any data files and + documentation. + + 5. You can remove the program binaries and object files from the + source code directory by typing `make clean'. To also remove the + files that `configure' created (so you can compile the package for + a different kind of computer), type `make distclean'. There is + also a `make maintainer-clean' target, but that is intended mainly + for the package's developers. If you use it, you may have to get + all sorts of other programs in order to regenerate files that came + with the distribution. + +Compilers and Options +===================== + +Some systems require unusual options for compilation or linking that the +`configure' script does not know about. Run `./configure --help' for +details on some of the pertinent environment variables. + + You can give `configure' initial values for configuration parameters +by setting variables in the command line or in the environment. Here +is an example: + + ./configure CC=c99 CFLAGS=-g LIBS=-lposix + + *Note Defining Variables::, for more details. + +Compiling For Multiple Architectures +==================================== + +You can compile the package for more than one kind of computer at the +same time, by placing the object files for each architecture in their +own directory. To do this, you can use GNU `make'. `cd' to the +directory where you want the object files and executables to go and run +the `configure' script. `configure' automatically checks for the +source code in the directory that `configure' is in and in `..'. + + With a non-GNU `make', it is safer to compile the package for one +architecture at a time in the source code directory. After you have +installed the package for one architecture, use `make distclean' before +reconfiguring for another architecture. + +Installation Names +================== + +By default, `make install' installs the package's commands under +`/usr/local/bin', include files under `/usr/local/include', etc. You +can specify an installation prefix other than `/usr/local' by giving +`configure' the option `--prefix=PREFIX'. + + You can specify separate installation prefixes for +architecture-specific files and architecture-independent files. If you +pass the option `--exec-prefix=PREFIX' to `configure', the package uses +PREFIX as the prefix for installing programs and libraries. +Documentation and other data files still use the regular prefix. + + In addition, if you use an unusual directory layout you can give +options like `--bindir=DIR' to specify different values for particular +kinds of files. Run `configure --help' for a list of the directories +you can set and what kinds of files go in them. + + If the package supports it, you can cause programs to be installed +with an extra prefix or suffix on their names by giving `configure' the +option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. + +Optional Features +================= + +Some packages pay attention to `--enable-FEATURE' options to +`configure', where FEATURE indicates an optional part of the package. +They may also pay attention to `--with-PACKAGE' options, where PACKAGE +is something like `gnu-as' or `x' (for the X Window System). The +`README' should mention any `--enable-' and `--with-' options that the +package recognizes. + + For packages that use the X Window System, `configure' can usually +find the X include and library files automatically, but if it doesn't, +you can use the `configure' options `--x-includes=DIR' and +`--x-libraries=DIR' to specify their locations. + +Specifying the System Type +========================== + +There may be some features `configure' cannot figure out automatically, +but needs to determine by the type of machine the package will run on. +Usually, assuming the package is built to be run on the _same_ +architectures, `configure' can figure that out, but if it prints a +message saying it cannot guess the machine type, give it the +`--build=TYPE' option. TYPE can either be a short name for the system +type, such as `sun4', or a canonical name which has the form: + + CPU-COMPANY-SYSTEM + +where SYSTEM can have one of these forms: + + OS KERNEL-OS + + See the file `config.sub' for the possible values of each field. If +`config.sub' isn't included in this package, then this package doesn't +need to know the machine type. + + If you are _building_ compiler tools for cross-compiling, you should +use the option `--target=TYPE' to select the type of system they will +produce code for. + + If you want to _use_ a cross compiler, that generates code for a +platform different from the build platform, you should specify the +"host" platform (i.e., that on which the generated programs will +eventually be run) with `--host=TYPE'. + +Sharing Defaults +================ + +If you want to set default values for `configure' scripts to share, you +can create a site shell script called `config.site' that gives default +values for variables like `CC', `cache_file', and `prefix'. +`configure' looks for `PREFIX/share/config.site' if it exists, then +`PREFIX/etc/config.site' if it exists. Or, you can set the +`CONFIG_SITE' environment variable to the location of the site script. +A warning: not all `configure' scripts look for a site script. + +Defining Variables +================== + +Variables not defined in a site shell script can be set in the +environment passed to `configure'. However, some packages may run +configure again during the build, and the customized values of these +variables may be lost. In order to avoid this problem, you should set +them in the `configure' command line, using `VAR=value'. For example: + + ./configure CC=/usr/local2/bin/gcc + +causes the specified `gcc' to be used as the C compiler (unless it is +overridden in the site shell script). + +Unfortunately, this technique does not work for `CONFIG_SHELL' due to +an Autoconf bug. Until the bug is fixed you can use this workaround: + + CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash + +`configure' Invocation +====================== + +`configure' recognizes the following options to control how it operates. + +`--help' +`-h' + Print a summary of the options to `configure', and exit. + +`--version' +`-V' + Print the version of Autoconf used to generate the `configure' + script, and exit. + +`--cache-file=FILE' + Enable the cache: use and save the results of the tests in FILE, + traditionally `config.cache'. FILE defaults to `/dev/null' to + disable caching. + +`--config-cache' +`-C' + Alias for `--cache-file=config.cache'. + +`--quiet' +`--silent' +`-q' + Do not print messages saying which checks are being made. To + suppress all normal output, redirect it to `/dev/null' (any error + messages will still be shown). + +`--srcdir=DIR' + Look for the package's source code in directory DIR. Usually + `configure' can determine that directory automatically. + +`configure' also accepts some other, not widely useful, options. Run +`configure --help' for more details. + diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000..c89e21e --- /dev/null +++ b/Makefile.am @@ -0,0 +1,30 @@ +SUBDIRS = gnulib/lib src +if ENABLE_GNULIB_TESTS +SUBDIRS += gnulib/tests +endif +SUBDIRS += tests man doc examples + +ACLOCAL_AMFLAGS = -I gnulib/m4 + +lensdir=$(datadir)/augeas/lenses/dist +lenstestdir=$(datadir)/augeas/lenses/dist/tests + +dist_lens_DATA=$(wildcard lenses/*.aug) +dist_lenstest_DATA=$(wildcard lenses/tests/*.aug) + +EXTRA_DIST=augeas.spec build/ac-aux/move-if-change Makefile.am HACKING.md + +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = augeas.pc + +distclean-local: + -find $(top_builddir)/build/* -maxdepth 0 -not -name ac-aux | xargs rm -rf + +ChangeLog: + if test -d $(top_srcdir)/.git; then \ + $(top_srcdir)/build/ac-aux/gitlog-to-changelog > $@; \ + fi + +dist: ChangeLog + +.PHONY: ChangeLog diff --git a/Makefile.inc b/Makefile.inc new file mode 100644 index 0000000..a791ae5 --- /dev/null +++ b/Makefile.inc @@ -0,0 +1,30 @@ +# -*- Makefile-automake -*- +# +# Support for running programs with failmalloc preloaded. Include in other +# automake files and make sure the following variables are set: +# +# FAILMALLOC_START - number of first FAILMALLOC_INTERVAL +# FAILMALLOC_REP - how often to repeat with increasing FAILMALLOC_INTERVAL +# FAILMALLOC_PROG - the program to run with linfailmalloc preloaded + +if WITH_FAILMALLOC +failmalloc: failmalloc-run +else +failmalloc: failmalloc-error +endif + +failmalloc-run: $(FAILMALLOC_PROG) + @(echo "Running $(FAILMALLOC_PROG) with failmalloc"; \ + for i in $$(seq $(FAILMALLOC_START) $$(expr $(FAILMALLOC_START) + $(FAILMALLOC_REP) - 1)) ; do \ + resp=$$(libtool --mode=execute env LD_PRELOAD=$(LIBFAILMALLOC) FAILMALLOC_INTERVAL=$$i $(FAILMALLOC_PROG)); \ + status=$$?; \ + if [ $$status -ne 0 -a $$status -ne 2 ] ; then \ + printf "%5d FAIL %3d %s\n" $$i $$status "$$resp" ; \ + elif [ x$(V) = x1 -o $$(( $$i % 100 )) -eq 0 ] ; then \ + printf "%5d PASS %s\n" $$i "$$resp" ; \ + fi \ + done) + +failmalloc-error: + @(echo "You need to turn on failmalloc support with --with-failmalloc"; \ + exit 1) diff --git a/Makefile.maint b/Makefile.maint new file mode 100644 index 0000000..b126be9 --- /dev/null +++ b/Makefile.maint @@ -0,0 +1,39 @@ +# -*- makefile -*- + +# Targets useful for maintenance/making releases etc. Some of them depend +# on very specific local setups + +include Makefile + +rpmbuild_dir=/data/rpmbuild/$(PACKAGE_NAME)-$(PACKAGE_VERSION) +rpb_spec=$(rpmbuild_dir)/augeas.spec +release_dir=weave:/var/www/sites/download.augeas.net/ + +tarball=$(PACKAGE_NAME)-$(PACKAGE_VERSION).tar.gz + +# This only works with the way I have set up my .rpmmacros +build-rpm: + test -d $(rpmbuild_dir) || mkdir $(rpmbuild_dir) + rm -f $(rpmbuild_dir)/$(tarball) $(rpb_spec) + ln -sf $(abs_top_srcdir)/$(tarball) $(rpmbuild_dir) + ln -sf $(abs_top_srcdir)/augeas.spec $(rpmbuild_dir) + rpmbuild -ba $(rpmbuild_dir)/augeas.spec + +upload: + @gpg -q --batch --verify $(tarball).sig > /dev/null 2>&1 || \ + gpg --output $(tarball).sig --detach-sig $(tarball); \ + rsync -v $(tarball) $(tarball).sig $(release_dir); \ + git push --tags + +tag-release: + @git tag -s release-$(VERSION) + +# Print all the debug categories in use +debug-categories: + @fgrep 'debugging("' src/*.c | sed -r -e 's/^.*debugging\("([^"]+)"\).*$$/\1/' | sort -u + +# This is how I run autogen.sh locally +autogen: + ./autogen.sh CFLAGS=-g --prefix=/data/share/ --gnulib-srcdir=${HOME}/code/gnulib/ --enable-compile-warnings=error --enable-debug=yes + +.PHONY: build-rpm diff --git a/NEWS b/NEWS index ac302b5..7120e4f 100644 --- a/NEWS +++ b/NEWS @@ -1,754 +1,1891 @@ -Important notes ---------------- - -Date Modules Changes - -2015-04-24 acl This module no longer defines file_has_acl. - Use the new file-has-acl module for that. - Using only the latter module makes for fewer - link-time dependencies on GNU/Linux. - -2015-04-15 acl If your project only uses the file_has_acl() - detection routine, then the requirements are - potentially reduced by using $LIB_HAS_ACL rather - than $LIB_ACL. - -2013-04-24 gettext If your project uses 'gettextize --intl' it is now - your responsibility to put -I$(top_builddir)/intl - into the Makefile.am for gnulib. - -2012-06-27 elisp-comp The module 'elisp-comp' is removed; the script is - not independently useful outside of automake. - -2012-06-21 gnulib-tool The option --with-tests is now implied by the - options --create-testdir, --test, - --create-megatestdir, --megatest. - -2012-01-07 quotearg In the C locale, the function will no longer use - the grave accent character to begin a quoted - string (`like this'). It will use apostrophes - 'like these' or, in Unicode locales, single quotes - ‘like these’. You may want to adjust any error - messages that hard code the quoting characters. - -2010-09-04 gnulib-tool The option '--import' is no longer cumulative; it - now expects the complete list of modules and other - options on the command line. If you want to - augment (not set) the list of modules, use the - new option '--add-import' instead of '--import'. - -User visible incompatible changes ---------------------------------- - -Date Modules Changes - -2016-09-05 progname This module is deprecated. Please switch to the - 'getprogname' module and its getprogname() - function to obtain the name of the current program. - Note that there is no longer any need to export a - 'const char *program_name' variable. - Currently there is no replacement for - set_program_name(). - -2016-08-17 stdbool This no longer supports _Bool for C++. - Programs intended to be portable to C++ - compilers should use plain 'bool' instead. - -2016-04-12 intprops The following macros were removed: - TYPE_TWOS_COMPLEMENT TYPE_ONES_COMPLEMENT - TYPE_SIGNED_MAGNITUDE - -2015-09-25 c-ctype The following macros were removed: - C_CTYPE_CONSECUTIVE_DIGITS - C_CTYPE_CONSECUTIVE_LOWERCASE - C_CTYPE_CONSECUTIVE_UPPERCASE - -2015-09-22 savewd SAVEWD_CHDIR_READABLE constant removed. - -2015-07-24 fprintftime Exported functions' time zone arguments are now of - strftime type timezone_t (with NULL denoting UTC) instead of - type int (with nonzero denoting UTC). These - modules now depend on time_rz. - -2015-04-03 hash hash_insert0 function removed (deprecated in 2011). - -2014-10-29 obstack The obstack functions are no longer limited to - int sizes; size values are now of type size_t. - This changes both the ABI and the API. - obstack_blank no longer accepts a negative size to - shrink the current object; callers must now use - obstack_blank_fast with a "negative" (actually, - large positive) size for that. - -2014-02-23 diffseq The members too_expensive, lo_minimal and hi_minimal - were removed from public structures, and the - find_minimal argument was removed from diag - and compareseq. - -2014-02-11 savedir The savedir and streamsavedir functions have a - new argument specifying how to sort the result. - The fdsavedir function is removed. - -2013-05-04 gnulib-tool CVS checkout of gnulib are no longer supported. - -2013-02-08 careadlinkat This module no longer provides the careadlinkatcwd - function. - -2012-06-26 getopt-posix This module no longer guarantees that option - processing is resettable. If your code uses - 'optreset' or 'optind = 0;', rewrite it to make - only one pass over the argument array. - -2012-02-24 streq This module no longer provides the STREQ macro. - Use STREQ_OPT instead. - -2012-01-10 ignore-value This module no longer provides the ignore_ptr - function. It was deprecated a year ago, but existed - so briefly before then that it never came into use. - Now, the ignore_value function does its job. - -2011-11-18 hash This module deprecates the hash_insert0 function - using gcc's "deprecated" attribute. Use the better- - named hash_insert_if_absent equivalent. - -2011-11-04 openat This module no longer provides the mkdirat() - function. If you need this function, you now need - to request the 'mkdirat' module. - -2011-11-04 openat This module no longer provides the fstatat() - function. If you need this function, you now need - to request the 'fstatat' module. - -2011-11-03 openat This module no longer provides the unlinkat() - function. If you need this function, you now need - to request the 'unlinkat' module. - -2011-11-02 openat This module no longer provides the fchmodat() - function. If you need this function, you now need - to request the 'fchmodat' module. - -2011-11-01 alignof This module no longer provides the alignof() macro. - Use either alignof_slot() or alignof_type() instead. - -2011-11-01 openat This module no longer provides the fchownat() - function. If you need this function, you now need - to request the 'fchownat' module. - -2011-10-03 poll The link requirements of this module are changed - from empty to $(LIB_POLL). - -2011-09-25 sys_stat This module no longer provides the fstat() - function. If you need this function, you now need - to request the 'fstat' module. - -2011-09-23 signal This module is renamed to 'signal-h'. - -2011-09-22 select The link requirements of this module are changed - from $(LIBSOCKET) to $(LIB_SELECT). - -2011-09-12 fchdir This module no longer overrides the functions - opendir() and closedir(), unless the modules - 'opendir' and 'closedir' are in use, respectively. - If you use opendir(), please use module 'opendir'. - If you use closedir(), please use module 'closedir'. - -2011-08-04 pathmax The header file "pathmax.h" no longer defines - PATH_MAX on GNU/Hurd. Please use one of the methods - listed in pathmax.h to ensure your package is - portable to GNU/Hurd. - -2011-07-24 close This module no longer pulls in the 'fclose' module. - If your code creates a socket descriptor using - socket() or accept(), then a FILE stream referring - to it using fdopen(), then in order to close this - stream, you need the 'fclose' module. - -2011-07-12 arg-nonnull Renamed to snippet/arg-nonnull. - c++defs Renamed to snippet/c++defs. - link-warning Renamed to snippet/link-warning. - unused-parameter Renamed to snippet/unused-parameter. - warn-on-use Renamed to snippet/warn-on-use. - -2011-06-15 verify verify_true (V) is deprecated; please use - verify_expr (V, 1) instead. - -2011-06-05 ansi-c++-opt When a C++ compiler is not found, the variable CXX - is now set to "no", not to ":". - -2011-05-11 group-member The include file is changed from "group-member.h" - to . - -2011-05-02 exit The module is removed. It was deprecated - on 2010-03-05. Use 'stdlib' directly instead. - -2011-04-27 mgetgroups The 'xgetgroups' function has been split into - a new 'xgetgroups' module. - -2011-04-27 save-cwd This module pulls in fewer dependencies by - default; to retain robust handling of directories - with an absolute name longer than PATH_MAX, you - must now explicitly include the 'getcwd' module. - -2011-04-19 close-hook This module has been renamed to 'fd-hook' and - generalized. - -2011-03-08 regex-quote The last argument is no longer an 'int cflags' - but instead a pointer to a previously constructed - 'struct regex_quote_spec'. - -2011-02-25 dirname These modules no longer put #defines for the - dirname-lgpl following symbols into : ISSLASH, - backupfile FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX, - lstat FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR, - openat FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE. - remove Applications that need ISSLASH can include the new - rmdir header dosname.h. - savewd - stat - unlink - -2011-02-14 getloadavg This module no longer #defines C_GETLOADAVG or - HAVE_GETLOADAVG, as the application no longer needs - to worry about how getloadavg is defined. It no - longer defines the obsolete symbol NLIST_NAME_UNION - (which should have been internal to the module - anyway). Also, support for setgid use has been - removed, as nobody seems to be using it; thus - GETLOADAVG_PRIVILEGED is no longer #defined and - KMEM_GROUP and NEED_SETGID are no longer - substituted for. - -2011-02-08 stdlib Unless the random_r module is also used, this - module no longer guarantees that the following are - defined: struct random_data, RAND_MAX, random_r, - srandom_r, initstate_r, setstate_r. - -2011-02-08 wctype-h This module no longer provides the iswblank() - function. If you need this function, you now need - to request the 'iswblank' module. - -2011-02-07 wctype This module is renamed to wctype-h. - -2011-01-18 multiarch This no longer #defines AA_APPLE_UNIVERSAL_BUILD; - instead, use the shell var APPLE_UNIVERSAL_BUILD. - -2010-12-10 pipe This module is renamed to spawn-pipe. The include - file is renamed to "spawn-pipe.h". - -2010-10-05 getdate This module is deprecated. Please use the new - parse-datetime module for the replacement - function parse_datetime(), or help us write - getdate-posix for getdate(). Also, the header - "getdate.h" has been renamed "parse-datetime.h", - and doc/getdate.texi to doc/parse-datetime.texi. - -2010-09-29 sys_wait This module no longer provides the waitpid() - function. If you need this function, you now need - to request the 'waitpid' module. - -2010-09-17 utimens The function gl_futimens is removed, and its - signature has been migrated to fdutimens. Callers - of gl_futimens should change function name, and - callers of fdutimens should swap parameter order. - -2010-09-17 fdutimensat This function has a new signature: the fd now comes - first instead of the dir/name pair, and a new - atflag parameter is added at the end. Old code - should rearrange parameters, and pass 0 for atflag. - -2010-09-13 regex The module is not guaranteeing anymore support for - 64-bit regoff_t on 64-bit systems. The size of - regoff_t will always be 32-bit unless the program - is being configured --with-included-regex. This - may change again in the future once glibc provides - this feature as well. - -2010-09-12 savedir The fdsavedir function is now deprecated. - -2010-09-10 fcntl-h This module now defaults O_CLOEXEC to 0, and - it defaults O_EXEC and O_SEARCH to O_RDONLY. - Use "#if O_CLOEXEC" instead of "#ifdef O_CLOEXEC". - -2010-08-28 realloc This module is deprecated. Use 'realloc-gnu' - instead. It will be removed 2012-01-01. - -2010-08-28 calloc This module is deprecated. Use 'calloc-gnu' - instead. It will be removed 2012-01-01. - -2010-08-28 malloc This module is deprecated. Use 'malloc-gnu' - instead. It will be removed 2012-01-01. - -2010-08-14 memxfrm This module is renamed to amemxfrm. The include - file is renamed to "amemxfrm.h". The function is - renamed to amemxfrm. - -2010-08-09 symlinkat This module now only provides symlinkat; use the - new module 'readlinkat' if needed. - -2010-07-31 ansi-c++-opt If Autoconf >= 2.66 is used, the 'configure' - option is now called --disable-c++ rather than - --disable-cxx. - -2010-04-02 maintainer-makefile - The macro _prohibit_regexp has been revamped into - a new macro _sc_search_regexp; custom syntax - checks in your cfg.mk will need to be rewritten. - -2010-03-28 lib-ignore This module now provides a variable - IGNORE_UNUSED_LIBRARIES_CFLAGS that you should - add to LDFLAGS (when linking C programs only) or - CFLAGS yourself. It is no longer added to LDFLAGS - automatically. - -2010-03-18 pty This module now only declares the pty.h header. - Use the new modules 'forkpty' or 'openpty' to - get the functions that were previously provided. - -2010-03-05 exit This module is deprecated, use 'stdlib' directly - instead. It will be removed 2011-01-01. - -2009-12-13 sublist The module does not define functions any more that - call xalloc_die() in out-of-memory situations. Use - module 'xsublist' and include file "gl_xsublist.h" - instead. - -2009-12-13 list The module does not define functions any more that - call xalloc_die() in out-of-memory situations. - Use module 'xlist' and include file "gl_xlist.h" - instead. - -2009-12-13 oset The module does not define functions any more that - call xalloc_die() in out-of-memory situations. - Use module 'xoset' and include file "gl_xoset.h" - instead. - -2009-12-10 * Most source code files have been converted to - indentation by spaces (rather than tabs). Patches - of gnulib source code needs to be updated. - -2009-12-09 link-warning The Makefile rules that use $(LINK_WARNING_H) now - must contain an explicit dependency on - $(LINK_WARNING_H). - -2009-11-12 getgroups These functions now use a signature of gid_t, - getugroups rather than GETGROUPS_T. This probably has no - effect except on very old platforms. - -2009-11-04 tempname The gen_tempname function takes an additional - 'suffixlen' argument. You can safely pass 0. - -2009-11-04 nproc The num_processors function now takes an argument. - -2009-11-02 inet_pton The use of this module now requires linking with - $(INET_PTON_LIB). - -2009-11-02 inet_ntop The use of this module now requires linking with - $(INET_NTOP_LIB). - -2009-10-10 utimens The use of this module now requires linking with - $(LIB_CLOCK_GETTIME). - -2009-09-16 canonicalize-lgpl - The include file is changed from "canonicalize.h" - to . - -2009-09-04 link-follow The macro LINK_FOLLOWS_SYMLINK is now tri-state, - rather than only defined to 1. - -2009-09-03 openat The include files are standardized to POSIX 2008. - For openat, include ; for - fchmodat, fstatat, and mkdirat, include - ; for fchownat and unlinkat, - include . For all other - functions provided by this module, - continue to include "openat.h". - -2009-08-30 striconveh The functions mem_cd_iconveh and str_cd_iconveh - now take an 'iconveh_t *' argument instead of three - iconv_t arguments. - -2009-08-23 tempname The gen_tempname function takes an additional - 'flags' argument. You can safely pass 0. - -2009-08-12 getopt This module is deprecated. Please choose among - getopt-posix and getopt-gnu. getopt-gnu provides - "long options" and "options with optional - arguments", getopt-posix doesn't. - -2009-06-25 fpurge The include file is changed from "fpurge.h" to - . - -2009-04-26 modules/uniconv/u8-conv-from-enc - modules/uniconv/u16-conv-from-enc - modules/uniconv/u32-conv-from-enc - The calling convention of the functions - u*_conv_from_encoding is changed. - -2009-04-26 modules/uniconv/u8-conv-to-enc - modules/uniconv/u16-conv-to-enc - modules/uniconv/u32-conv-to-enc - The calling convention of the functions - u*_conv_to_encoding is changed. - -2009-04-24 maintainer-makefile - The maint.mk file was copied from - coreutils, and the old - coverage/gettext/indent rules were - re-added. If you used 'make syntax-check' - this will add several new checks. If some - new check is annoying, add the name of the - checks to 'local-checks-to-skip' in your - cfg.mk. - -2009-04-01 visibility Renamed to lib-symbol-visibility. - -2009-04-01 ld-version-script Renamed to lib-symbol-versions. - -2009-03-20 close The substituted variable LIB_CLOSE is removed. - -2009-03-05 filevercmp Move hidden files up in ordering. - -2009-01-22 c-strtod This function no longer calls xalloc_die(). If - c-strtold you want to exit the program in case of out-of- - memory, the calling function needs to arrange - for it, like this: - errno = 0; - val = c_strtod (...); - if (val == 0 && errno == ENOMEM) - xalloc_die (); - -2009-01-17 relocatable-prog In the Makefile.am or Makefile.in, you now also - need to set RELOCATABLE_STRIP = :. - -2008-12-22 getaddrinfo When using this module, you now need to link with - canon-host $(GETADDRINFO_LIB). - -2008-12-21 mbiter The header files "mbiter.h", "mbuiter.h", - mbuiter "mbfile.h" can now be included without checking - mbfile HAVE_MBRTOWC. The macro HAVE_MBRTOWC will no - longer be defined by these modules in a year. If - you want to continue to use it, you need to invoke - AC_FUNC_MBRTOWC yourself. - -2008-11-11 warnings This module subsumes the file m4/warning.m4 which - was removed. - -2008-10-20 lstat The include file is changed from "lstat.h" to - . - -2008-10-20 getaddrinfo The include file is changed from "getaddrinfo.h" - to . - -2008-10-19 isnanf The include file is changed from "isnanf.h" to - . - isnand The include file is changed from "isnand.h" to - . - isnanl The include file is changed from "isnanl.h" to - . - -2008-10-18 lchmod The include file is changed from "lchmod.h" to - . - -2008-10-18 dirfd The include file is changed from "dirfd.h" to - . - -2008-10-18 euidaccess The include file is changed from "euidaccess.h" - to . - -2008-10-18 getdomainname The include file is changed from "getdomainname.h" - to . - -2008-09-28 sockets When using this module, you now need to link with - $(LIBSOCKET). - -2008-09-24 sys_select The limitation on 'select', introduced 2008-09-23, - was removed. sys_select now includes a select - wrapper for Winsock. The wrapper expects socket - and file descriptors to be compatible as arranged - by the sys_socket on MinGW. - -2008-09-23 sys_socket Under Windows (MinGW), the module now adds - wrappers around Winsock functions, so that - socket descriptors are now compatible with - file descriptors. In general, this change - will simply improve your code's portability - between POSIX platforms and Windows. In - particular, you will be able to use ioctl and - close instead of ioctlsocket and closesocket, - and test errno instead of WSAGetLastError (). - On the other hand, you have to audit your code to - remove usage of these Winsock-specific functions. - - This change does not remove the need to call - the gl_sockets_startup function from the sockets - gnulib module. Also, for now select is disabled - when you include the sys_socket module; while - the functionality will be restored soon, for - efficiency it is suggested to use the poll system - poll system call and gnulib module instead. - -2008-09-13 EOVERFLOW The module is removed. Use module errno instead. - -2008-09-01 filename The module does not define the function - concatenated_filename any more. To get an - equivalent function, use function - xconcatenated_filename from module - 'xconcat-filename'. - -2008-08-31 havelib On Solaris, when searching for 64-bit mode - libraries the directory $prefix/lib is now ignored. - Instead the directory $prefix/lib/64 is searched. - You may need to create a symbolic link for - $prefix/lib/64 if you have 64-bit libraries - installed in $prefix/lib. - -2008-08-19 strverscmp The include file is changed from "strverscmp.h" - to . - -2008-08-14 lock The include file is changed from "lock.h" - to "glthread/lock.h". - tls The include file is changed from "tls.h" - to "glthread/tls.h". - -2008-07-17 c-stack The module now requires the addition of - $(LIBCSTACK) or $(LTLIBCSTACK) in Makefile.am, - since it may depend on linking with libsigsegv. - -2008-07-07 isnanf-nolibm The include file is changed from "isnanf.h" - to "isnanf-nolibm.h". - isnand-nolibm The include file is changed from "isnand.h" - to "isnand-nolibm.h". - -2008-06-10 execute The execute function takes an additional termsigp - argument. Passing termsigp = NULL is ok. - wait-process The wait_subprocess function takes an additional - termsigp argument. Passing termsigp = NULL is ok. - -2008-05-10 linebreak The module is split into several modules unilbrk/*. - The include file is changed from "linebreak.h" to - "unilbrk.h". Two functions are renamed: - mbs_possible_linebreaks -> ulc_possible_linebreaks - mbs_width_linebreaks -> ulc_width_linebreaks - -2008-04-28 rpmatch The include file is now . - -2008-04-28 inet_ntop The include file is changed from "inet_ntop.h" - to . - -2008-04-28 inet_pton The include file is changed from "inet_pton.h" - to . - -2008-03-06 freadahead The return value's computation has changed. It - now increases by 1 after ungetc. - -2008-01-26 isnan-nolibm The module name is changed from isnan-nolibm to - isnand-nolibm. The include file is changed from - "isnan.h" to "isnand.h". The function that it - defines is changed from isnan() to isnand(). - -2008-01-14 strcasestr This module now replaces worst-case inefficient - implementations; clients that use controlled - needles and thus do not care about worst-case - efficiency should use the new strcasestr-simple - module instead for smaller code size. - -2008-01-09 alloca-opt Now defines HAVE_ALLOCA_H only when the system - supplies an . Gnulib-using code is now - expected to include unconditionally. - Non-gnulib-using code can continue to include - only if HAVE_ALLOCA_H is defined. - -2008-01-08 memmem This module now replaces worst-case inefficient - implementations; clients that use controlled - needles and thus do not care about worst-case - efficiency should use the new memmem-simple - module instead for smaller code size. - -2007-12-24 setenv The include file is changed from "setenv.h" to - . Also, the unsetenv function is no - longer declared in this module; use the 'unsetenv' - module if you need it. - -2007-12-03 getpagesize The include file is changed from "getpagesize.h" - to . - -2007-12-03 strcase The include file is changed from to - . - -2007-10-07 most modules The license for most modules has changed from - GPLv2+ to GPLv3+, and from LGPLv2+ to LGPLv3+. - A few modules are still under LGPLv2+; see the - module description for the applicable license. - -2007-09-01 linebreak "linebreak.h" no longer declares the functions - locale_charset, uc_width, u{8,16,32}_width. Use - "uniwidth.h" to get these functions declared. - -2007-08-28 areadlink-with-size - Renamed from mreadlink-with-size. - Function renamed: mreadlink_with_size -> - areadlink_with_size. - -2007-08-22 getdelim, getline - The include file is changed from "getdelim.h" - and "getline.h" to the POSIX 200x . - -2007-08-18 idcache Now provides prototypes in "idcache.h". - -2007-08-10 xstrtol The STRTOL_FATAL_ERROR macro is removed. - Use the new xstrtol_fatal function instead. - -2007-08-04 human The function human_options no longer reports an - error to standard error; that is now the - caller's responsibility. It returns an - error code of type enum strtol_error - instead of the integer option value, and stores - the option value via a new int * argument. - xstrtol The first two arguments of STRTOL_FATAL_ERROR - are now an option name and option argument - instead of an option argument and a type string, - STRTOL_FAIL_WARN is removed. - -2007-07-14 gpl, lgpl New Texinfo versions with no sectioning commands. - -2007-07-10 version-etc Output now mentions GPLv3+, not GPLv2+. Use - gnulib-tool --local-dir to override this. - -2007-07-07 wcwidth The include file is changed from "wcwidth.h" to - . - -2007-07-02 gpl, lgpl Renamed to gpl-2.0 and lgpl-2.1 respectively. - (There is also a new module gpl-3.0.) - -2007-06-16 lchown The include file is changed from "lchown.h" to - . - -2007-06-09 xallocsa Renamed to xmalloca. The include file "xallocsa.h" - was renamed to "xmalloca.h". The function was - renamed: - xallocsa -> xmalloca - -2007-06-09 allocsa Renamed to malloca. The include file "allocsa.h" - was renamed to "malloca.h". The function-like - macros were renamed: - allocsa -> malloca - freesa -> freea - -2007-05-20 utimens Renamed futimens to gl_futimens, to avoid - conflict with the glibc-2.6-introduced function - that has a different signature. - -2007-05-01 sigprocmask The module now depends on signal, so replace - #include "sigprocmask.h" - with - #include - -2007-04-06 gettext The macro HAVE_LONG_DOUBLE is no longer set. - You can replace all its uses with 1, i.e. assume - 'long double' as a type exists. - -2007-04-01 arcfour Renamed to crypto/arcfour. - arctwo Renamed to crypto/arctwo. - des Renamed to crypto/des. - gc Renamed to crypto/gc. - gc-arcfour Renamed to crypto/gc-arcfour. - gc-arctwo Renamed to crypto/gc-arctwo. - gc-des Renamed to crypto/gc-des. - gc-hmac-md5 Renamed to crypto/gc-hmac-md5. - gc-hmac-sha1 Renamed to crypto/gc-hmac-sha1. - gc-md2 Renamed to crypto/gc-md2. - gc-md4 Renamed to crypto/gc-md4. - gc-md5 Renamed to crypto/gc-md5. - gc-pbkdf2-sha1 Renamed to crypto/gc-pbkdf2-sha1. - gc-random Renamed to crypto/gc-random. - gc-rijndael Renamed to crypto/gc-rijndael. - gc-sha1 Renamed to crypto/gc-sha1. - hmac-md5 Renamed to crypto/hmac-md5. - hmac-sha1 Renamed to crypto/hmac-sha1. - md2 Renamed to crypto/md2. - md4 Renamed to crypto/md4. - md5 Renamed to crypto/md5. - rijndael Renamed to crypto/rijndael. - sha1 Renamed to crypto/sha1. - -2007-03-27 vasprintf The module now depends on stdio, so replace - #include "vasprintf.h" - with - #include - -2007-03-24 tsearch The include file is changed from "tsearch.h" to - . - -2007-03-24 utf8-ucs4 The include file is changed from "utf8-ucs4.h" - to "unistr.h". - utf8-ucs4-unsafe The include file is changed from - "utf8-ucs4-unsafe.h" to "unistr.h". - utf16-ucs4 The include file is changed from "utf16-ucs4.h" - to "unistr.h". - utf16-ucs4-unsafe The include file is changed from - "utf16-ucs4-unsafe.h" to "unistr.h". - ucs4-utf8 The include file is changed from "ucs4-utf8.h" - to "unistr.h". - ucs4-utf16 The include file is changed from "ucs4-utf16.h" - to "unistr.h". - -2007-03-19 iconvme The module is removed. Use module striconv instead: - iconv_string -> str_iconv - iconv_alloc -> str_cd_iconv (with reversed - arguments) - -2007-03-15 list The functions gl_list_create_empty and - array-list gl_list_create now take an extra fourth argument. - carray-list You can pass NULL. - linked-list - linkedhash-list - avltree-list - rbtree-list - avltreehash-list - rbtreehash-list - -2007-03-15 oset The function gl_oset_create_empty now takes a - array-oset third argument. You can pass NULL. - avltree-oset - rbtree-oset - -2007-03-12 des The types and functions in lib/des.h have been - gc-des renamed: - - des_ctx -> gl_des_ctx, tripledes_ctx -> gl_3des_ctx, - des_is_weak_key -> gl_des_is_weak_key, - des_setkey -> gl_des_setkey, - des_makekey -> gl_des_makekey, - des_ecb_crypt -> gl_des_ecb_crypt, - des_ecb_encrypt -> gl_des_ecb_encrypt, - des_ecb_decrypt -> gl_des_ecb_decrypt, - tripledes_set2keys -> gl_3des_set2keys, - tripledes_set3keys -> gl_3des_set3keys, - tripledes_makekey -> gl_3des_makekey, - tripledes_ecb_crypt -> gl_3des_ecb_crypt. - - Also consider using the "gc-des" buffer instead of - using the "des" module directly. - -2007-02-28 xreadlink The module xreadlink was renamed to - xreadlink-with-size. The function was renamed: - xreadlink -> xreadlink_with_size. - -2007-02-18 exit The modules now depend on stdlib, so replace - mkdtemp #include "exit.h" - mkstemp #include "mkdtemp.h" - #include "mkstemp.h" - with - #include - -2007-01-26 strdup The module now depends on string, so replace - #include "strdup.h" - with - #include - -# This is for Emacs. -# Local Variables: -# coding: utf-8 -# indent-tabs-mode: nil -# whitespace-check-buffer-indent: nil -# End: +1.14.1 - 2023-06-27 + - General changes/additions + * internal.c: update #if to only use GNU-specific strerror_r() when __GLIBC__ is defined (#791) Dimitry Andric + * augeas.c: Fix bug from PR#691 where the nodes of a newly created file are lost upon a subsequent load operation (#810) George Hansper + * HACKING.md: describe testing (#796) Laszlo Ersek + * Add GitHub Actions (#714) Raphaël Pinson + * augprint.c: remove `#include ` , add `#include ` (#792) Ruoyu Zhong + + - Lens changes/additions + * TOML: support trailing commas in arrays (#809) Bao + * Tmpfiles: allow '=', '~', '^' for letter types, allow ":" as prefix for the mode (#805) Pino Toscano + * Sshd: Add keyword PubkeyAcceptedAlgorithms as comma-separated list of items (#806) Dave Re + * Cmdline: Allow whitespace at the end of kernel commnd line (#798) rwmjones + +1.14.0 - 2022-12-07 + - General changes/additions + * Update submodule gnulib to 2f7479a16a3395f1429c7795f10c5d19b9b4453e (#781) + * Add bash-completion for augtool, augmatch, augprint (#783) George Hansper + * Fix: Allow values to contain arbitrary unbalanced square brackets (#782) George Hansper + * Add package bash to build stage in Dockerfile (#776) George Hansper + * Add augprint tool for creating idempotent augtool scripts (#752) George Hansper + * Replace deprecated 'security_context_t' with 'char *' (#747) Leo-Schmit + * src/syntax.c: Fix whitespace which confuses static checkers (#725) rwmjones + * README.md: Add oss-fuzz status badge (#702) Sergey Nizovtsev + * Package augmatch, too (#688) oleksandriegorov + * Add Github workflow to create releases with complete source tarballs (#744) Hilko Bengen + + - Lens changes/additions + * Resolv: add option trust-ad (#784) George Hansper + * Sos: new lens for /etc/sos/sos.conf (based on IniFile) + (#779) George Hansper + * Pg_Hba: unquoted auth-method may contain hyphens (#777) George Hansper + * Sysctl: Allow keys to contain * and : and / characters (#755) M Filka + * Semanage: Fix parsing of ignoredirs (#758) Richard W M Jones + * Systemd: allow empty quoted environment variable values + (#757) Michal Vasko + * Systemd: allow values starting with whitespaces for Exec* and + Environment service entries. (#757) Michal Vasko + * Toml: workaround to allow writing toml files (#742) Richard + * Kdump: parse "auto_reset_crashkernel" (#754) Laszlo Ersek + * Keepalived: add parameters notify_stop and notify_deleted (#749) Adam Bambuch + * Chrony: add new directives and options (#745) Miroslav Lichvar + * Redis: Allow redis lens to set 'SAVE ""' as a valid option + (#738) Mitch Hagstrand + * ClamAV: update ClamAV lens to autoload /etc/clamav/*.conf + (#748) Guillaume Ross + * AuthselectPam: new lens for /etc/authselect/custom/*/*-auth and + /etc/authselect/custom/*/postlogin (#743) Heston Snodgrass + * Sshd: Parse GSSAPIKexAlgorithms PubkeyAcceptedKeyTypes CASignatureAlgorithms + as comma-seperated lists instead of simple strings + (#721) Edward Garbade + * Yum: Add additional unit tests (#677) Pat Riehecky + * Cockpit: new lens for /etc/cockpit/cockpit.conf (#675) Pat Riehecky + +1.13.0 - 2021-10-15 + - General changes/additions + * Add Dockerfile (Nicolas Gif) (Issue #650) + * augtool: Improved readline integration to handle quoting issues + (Pino Toscano) + * typechecker: Allow including '/' in keys and labels. Thanks to + felixdoerre for pointing out that this restriction was + unnecessary. See issue #668 for the discussion. + * Add function modified() to select nodes which are marked as dirty + (George Hansper) (Issue #691) + * Add CLI command 'preview' and API 'aug_preview' to preview file contents + (George Hansper) (#690) + * Add "else" operator to augeas path-filter expressions (priority selector) + (George Hansper) (#692) + * Add new axis 'seq' to allow /path/seq::*[expr] to match and create numeric + nodes, as idempotent alternative to /path/*[expr] (George Hansper) (#706) + + - Lens changes/additions + * Authinfo2: new lens to parse Authinfo2 format (Nicolas Gif) (Issue #649) + * Chrony: add new options (Miroslav Lichvar) (Issue #698) + * Cmdline: New lens to parse /proc/cmdline (Thomas Weißschuh) + * Crypttab: support UUID in device and / in opt (Raphaël Pinson) (#713) + * Fail2ban: new lens to parse Fail2ban format (Nicolas Gif) (Issue #651) + * Grub: support '+' in kernel command line option names + (Pino Toscano) (Issue #647) + * Krb5: handle [plugins] subsection (Pino Toscano) (Issue #663) + * Limits: support colons in the domain pattern of the limits lens + (Xavier Mol) (Issue #645) + * Logrotate: add hourly schedule (Jason A. Smith) (Issue #655) + * Mke2fs: parse more common entries between [defaults] and the tags + in [fs_types], fix the type of few entries, handle the [options] + stanza (Pino Toscano) (Issue #642) + support quoted values (Pino Toscano) (Issue #661) + * NetworkManager: allow # in values (mfilka) (#723) + * Opendkim: update to match current conffile format (Issue #644) + * Postfix_Master: Allow unix-dgram as type (Issue #635) + * Postfix_transport: Allow underscore (Anton Baranov) (Issue #678) + * Postgresql: Allow hyphen '-' in values that don't require quotes + (Marcin Barczyński) (Issues #700 #701) + * Properties: Allow "/" in property names (felixdoerre) (Issue #680) + * Redis: add incl path /etc/redis.conf (Raphaël Pinson) (#726) + support "replicaof" (Raphaël Pinson) (#727) + fix support for "sentinel" (Raphaël Pinson) (#728) + * Resolv: Support new options (Trevor Vaughan) (Issues #707 #708) + * Rsyslog: support multiple actions in filters and selectors (Issue #653) + * Shellvars: exclude more tcsh profile scripts (Pino Toscano) (Issue #627) + * Simplevars: add ocsinventory-agent.cfg (Pat Riehecky) (Issue #637) + * Sudoers: support new @include/@includedir directives + (Pino Toscano) (Issue #693) + * Sudoers: Allow AD groups (luchihoratiu) (Issue #696) + Support negative integers (Ando David Roots) (#724) + * Ssh: add Match keyword support (granquet) (Issue #695) + * Sshd: support quotes in Match conditions (Issue #739) + * Systemd: fix parsing of envvars with spaces (Pino Toscano) (#659) + Add incl paths according to 'systemd.network(5)' (chruetli) (#683) + * Tinc: new lens for Tinc VPN configuration files (Thomas Weißschuh) (#718) + * Toml: support arrays (norec) in inline tables (Raphaël Pinson) (#703) + * Tmpfiles: improvements to the types specification + (Pino Toscano) (Issue #694) + +1.12.0 - 2019-04-13 + - General changes/additions + * update gnulib to 91584ed6 + - Lens changes/additions + * Anaconda: new lens to process /etc/sysconfig/anaconda instead of + Shellvars (Pino Toscano) (Issue #597) + * DevfsRules: add lens for FreeBSD devfs.rules files + * Dovecot: permit ! in block titles (Nathan Ward) (Issue #599) + * Hostname: Allow creation of hostname when file is missing + (David Farrell) (Issue #606) + * Krb5: add more pkinit_* options (Issue #603) + * Logrotate: fix missing recognition of double quoted filenames (Issue #611) + * Multipath: accept values enclosed in quotes (Issue #583) + * Nginx: support unix sockets as server address (Issue #618) + * Nsswitch: add merge action (Issue #609) + * Pam: accept continuation lines (Issue #590) + * Puppetfile: allow symbols as (optional) values (Issue #619) + allow comments in entries (Issue #620) + * Rsyslog: support dynamic file paths (Issue #622) + treat #!/+/- as comment (arnolda, PR #595) + * Syslog: accept 'include' directive (Issue #486) + * Semanage: new lens to process /etc/selinux/semanage.conf instead of + Simplevars (Pino Toscano) (Issue #594) + * Shellvars: allow and/or in @if conditions (#582) + accept functions wrapped in round brackets, + accept variables with a dash in their name, + exclude csh/tcsh profile scripts (Pino Toscano) (Issue #600) + accept variable as command (Issue #601) + * Ssh: accept RekeyLimit (Issue #605) + * Sshd: accept '=' to separate option names from their values + (Emil Dragu, #587) + * Sudoers: support 'always_query_group_plugin' flag (Steve Traylen, #588) + * Strongswan: parse lists. This is a backwards-incompatible change + since list entries that were parsed into a single string + are now split into a list of entries (Kaarle Ritvanen) + * Toml: new lens to parse .toml files (PR #91) + * Xorg: accept empty values for options (arnolda, PR #596) + +1.11.0 - 2018-08-24 + - General changes/additions + * augmatch: add a --quiet option; make the exit status useful to tell + whether there was a match or not + * Drastically reduce the amount of memory needed to evaluate complex + path expressions against large files (Issue #569) + * Fix a segfault on OSX when 'augmatch' is run without any + arguments (Issue #556) + - API changes + * aug_source did not in fact return the source; and always returned + NULL for that. That has been fixed. + - Lens changes/additions + * Chrony: add new options supported in chrony 3.2 and 3.3 (Miroslav Lichvar) + * Dhclient: fix parsing of append/prepend and similar directives + (John Morrissey) + * Fstab: allow leading whitespace in mount entry lines + (Pino Toscano) (Issue #544) + * Grub: tolerate some invalid entries. Those invalid entries + get mapped to '#error' nodes + * Httpd: accept comments with whitespace right after a tag + opening a section (Issue #577) + * Json: allow escaped slashes in strings (Issue #557) + * Multipath: accept regular expressions for devnode, wwid, and property + in blacklist and blacklist_exceptions sections (Issue #564) + * Nginx: parse /etc/nginx/sites-enabled (plumbeo) + allow semicolons inside double quoted strings in + simple directives, and allow simple directives without + an argument (Issue #566) + * Redis: accept the 'bind' statement with multiple IP addresses + (yannh) (Issue #194) + * Rsyslog: support include() directive introduced in rsyslog 8.33 + * Strongswan: new lens (Kaarle Ritvanen) + * Systemd: do not try to treat *.d or *.wants directories as + configuration files (Issue #548) + +1.10.1 - 2018-01-29 + - API changes + * Fix a symbol versioning mistake in libfa that unnecessarily broke ABI + +1.10.0 - 2018-01-25 + DO NOT USE THIS RELEASE, USE 1.10.1 INSTEAD + + - General changes/additions + * New CLI utility 'augmatch' to print the tree for a file and select + some of its contents + * New command 'count' in augtool + * New function 'not(bool) -> bool' for path expressions + * The path expression 'label[. = "value"]' can now be written more + concisely as 'label["value"]' + - API changes + * libfa has now a function fa_json to export an FA as a JSON file, and + fa_state_* functions that make it possible to iterate over the FA's + states and transitions. (Pedro Valero Mejia) + * Add functions aug_ns_label, aug_ns_value, aug_ns_count, and + aug_ns_path to get the label (with index), the value, the number of + nodes, and the fully qualified path for nodes stored in a nodeset in + a variable efficiently + - Lens changes/additions + * Grubenv: new lens to process /boot/grub/grubenv (omgold) + * Httpd: also read files from /etc/httpd/conf.modules.d/*.conf + (Tomas Meszaros) (Issue #537) + * Nsswitch: allow comments at the end of a line (Philip Hahn) (Issue #517) + * Ntp: accept 'ntpsigndsocket' statement (Philip Hahn) (Issue #516) + * Properties: accept empty comments with DOS line endings (Issue #161) + * Rancid: new lens for RANCiD router databases (Matt Dainty) + * Resolv: accept empty comments with DOS line endings (Issue #161) + * Systemd: also process /etc/systemd/logind.conf (Pat Riehecky) + * YAML: process a document that is just a sequence (John Vandenberg) + +1.9.0 - 2017-10-06 + - General changes/additions + * several improvements to the error messages when transforming a tree + back to text fails. They now make it clearer what part of the tree + was problematic, and what the tree should have looked like. + * Fixed the pkg-config file, which should now be usable + * Fix handling of backslash-escaping in strings and regular expressions + in the lens language. We used to handle constructs like "\\" and + /\\\\/ incorrectly. (Issue #495) + * do not unescape the default value of a del on create; otherwise we are + double unescaping these strings (Issue #507) + * remove tempfile when saving files because destination is not writable + (Issue #479) + * span information is now updated on save (Issue #467) + * fix lots of warnings generated by gcc 7.1 + * Various changes to reduce bashisms in tests and make them run on + FreeBSD (Romain Tartière) + * Fix building on Solaris (Shawn Ferry) + - API changes + * add function aug_ns_attr to allow iterating through a nodeset + quickly. See examples/dump.c for an example of how to use them + instead of aug_get, aug_label etc. and for a way to measure + performance gains. + - Lens changes/additions + * Ceph: new lens for /etc/ceph/ceph.conf + * Cgconfig: accept fperm & dperm in admin & task (Pino Toscano) + * Dovecot: also load files from /usr/local/etc (Roy Hubbard) + * Exports: relax the rules for the path at the beginning of a line so + that double-quoted paths are legal, too + * Getcap: new lens to parse generic termcap-style capability databases + (Matt Dainty) + * Grub: accept toplevel 'boot' entry (Pino Toscano) + * Httpd: handle empty comments with a continuation line (Issue #423); + handle '>""' in a directive properly (Issue #429); make space between + quoted arguments optional (Issue #435); accept quoted strings as part + of bare arguments (Issue #470) + * Nginx: load files from sites-available directory (Omer Katz) (Issue #471) + * Nslcd: new lens for nss-pam-ldapd config (Jose Plana) + * Oz: New lense for /etc/oz/oz.cnf + * postfix lenses: also load files from /usr/local/etc (Roy Hubbard) + * Properties: accept DOS line endings (Issue #468) + * Rtadvd: new lens to parse the rtadvd configuration file (Matt Dainty) + * Rsyslog: load files from /etc/rsyslog.d (Doug Wilson) (Issue #475); + allow spaces before the # starting a comment; allow comments inside + config statements like 'module' + * Shellvars: load FreeBSD's /etc/rc.conf.d (Roy Hubbard) + * Ssh: accept '=' to separate keyword from arguments + * Sshd: split HostKeyAlgorithms into list of values; recognize quoted + group names with spaces in them (Issue #477) + * Sudoers: recognize "match_group_by_gid" (Luigi Toscano) (Issue #482) + * Syslog: allow spaces before the # starting a comment + * Termcap: new lens to parse termcap capability databases (Matt Dainty) + * Vsftpd: accept seccomp_sandbox (Denys Stroebel) + * Xymon: accept 'group-sorted' directive (Issue #462) + +1.8.1 - 2017-08-17 + - General changes/addition + * Fix error in handling escaped whitespace at the end of path expressions + (addresses CVE-2017-7555) + +1.8.0 - 2017-03-20 + - General changes/additions + * augtool: add a 'source' command exposing the aug_source API call + * augtool: add a 'context' command to make changing into a node more + discoverable + * augtool: add an 'info' command to print important information + * augtool: dramatically reduce memory consumption when all lenses are + loaded by more aggressively releasing temporary data structures. On + my machine, maximum memory usage of 'augtool -L' drops from roughly + 90MB to about 20MB. This will not change the amount of memory used + when only specific lenses are used, only the default behavior of + loading all lenses, i.e., when -A is not passed. + * make building augtool statically possible (Jörg Krause) + * split aug_to_xml into its own source file, so that statically linking + against libaugeas.a doesn't require also linking against libXml2 and + its dependencies, provided aug_to_xml is not needed. + - API changes + * add aug_source to find the source file for a particular node + * reduce memory consumption when AUG_NO_MODL_AUTOLOAD is _not_ passed; + exact same details as described above for augtool + - Lens changes/additions + * Chrony: allow floating point numbers (Miroslav Lichvar) + add new directives from chrony 3.0 and 3.1 (Miroslav Lichvar) + * Krb5: support include/includedir directives (Jason Smith) (Issue #430) + support realms that start with numbers (Dustin Wheeler) (Issue #437) + * Multipath: update to multipath-0.4.9-99.el7 (Xavier Mol) + * Php: also look for FPM files in /etc/php/*/fpm/pool.d (Daniel Dico) + * Postfix_virtual: allow underscores in e-mail addresses (Jason Lingohr) + (Issue #439) + * Radicale: new lens for config of http://radicale.org/ (James Valleroy) + * Rsyslog: support multiple options in module statements (Craig Miskell) + * Ssh: also look for files in in /etc/ssh/ssh_config.d (Ian Mortimer) + * Tmpfiles: parse 'q'/'Q' modes, parse two-character arguments, + parse three-digit file modes + * Xml: support external entity declarations in the doctype (Issue #142) + * Yum: also read DNF files from /etc/dnf (Pat Riehecky) (Issue #434) + +1.7.0 - 2016-11-08 + - General changes/additions + * allow multiple transforms handling the same file as long as they + also use the same lens (reported by Rich Jones) + * fix a use-after-free in recursive lenses when spans are + enabled (Issue #397) + * fix an illegal memory access during put that can be triggered by a + lens of the form 'del ... | l1 . l2' when the put has to jump + branches in the union (Issue #398) + * a large number of fixes based on Coverity scanning and running with + gcc's address sanitizer. None of the issues uncovered would have lead + to particularly significant leaks (they were all on the order 100-200 + bytes) and often hard to trigger, but we now have proof that at least + while running tests there are no leaks at all. + See https://github.com/hercules-team/augeas/pull/405 for details. + * The type checker now checks regexes that are involved in + expressions. For example, it used to be possible to write 'let rx = + /a/ | /b)/' and not get an error from the syntax checker, even though + 'let rx = /b)/' would result in an error. Such constructs are now + checked properly. This new check might lead to errors in existing + lenses, requiring that they be fixed. + - Lens changes/additions + * Cron_User: New lens to handle user crontab files in /var/spool/cron + * Csv: fix failure to load lens on OpenBSD (Issue #396) + * Grub: also look for UEFI grub files in /boot/efi/EFI/*/grub.conf + (Rich Jones) + * Opendkim: new lens for /etc/opendkim.conf (Craig Miskell) + * Php: look for php.ini where Ubunto 16.04 puts it, too (Michael Wodniok) + * Splunk: support Splunk Universal Forwarder and underscore-prefixed + keys for 6.x (Jason Antman) + +1.6.0 - 2016-08-05 + - General changes/additions + * augtool: add --load-file option, and corresponding load-file command + to load individual files based on the autoload information in lenses + * path expressions: numbers in path expressions are now 64 bit integers + rather than whatever the C compiler decided 'int' would be + - API changes + * add aug_load_file to load individual files, bug #135 + - Lens changes/additions + * Httpd: follow line continuations in comments + * Nginx: look for nginx.conf in /usr/local/etc, too (Omer Katz) + * Ntp: allow 'pool' (Craig Miskell) (Issue #378); + fix restrict to allow also -4 and also fix + save/store ability (Josef Reidinger) (Issue #386) + * Pam: use spaces instead of tabs as the separator in new entries + (Loren Gordon) (Issue #236) + * Postfix_Passwordmap: New lens to parse Postfix password maps + (Anton Baranov) (Issue #380) + * Rsyslog: Support for rsyslog RainerScript syntax + (Craig Miskell) (Issue #379) + * Shellvars: Load /etc/lbu/lbu.conf, the config for Alpine's Local + Backup Utility (Kaarle Ritvanen) + Load /etc/profile, /etc/profile.d/*, and /etc/byobu + * Vsftpd: Add allow_writeable_chroot boolead option + (Robert Moucha) (Issue #376) + +1.5.0 - 2016-05-11 + - General changes/additions + * augtool: new --timing option that prints after each operation how long + it took + * augtool: print brief help message when incorrect options are given rather + than dumping all help text + * Path expressions: optimize performance of evaluating certain + expressions + * lots of safety improvements in libfa to avoid using uninitialized + values and the like (Daniel Trebbien) + * tolerate building against OSX' libedit (Issue #256) + - API changes + * aug_match: fix a bug where expressions like /foo/*[2] would match a + hidden node and pretend there was no match at all. We now make sure + we never match a hidden node. Thanks to Xavier Mol for reporting the + problem. + * aug_get: make sure we set *value to NULL, even if the provided path is + invalid (Issue #372) + * aug_rm: fix segfault when deleting a tree and one of its ancestors + (Issue #319) + * aug_save: fix segfault when trying to save an invalid subtree. A + routine that was generating details for the error message overflowed + a buffer it had created (Issue #349) + - Lens changes/additions + * AptConf: support hash comments + * AptSources: support options (Issue #295), + support brackets with spaces in URI (GH #296) + rename test file to test_aptsources.aug + * Chrony: allow signed numbers and indentation, fix stray EOL entry, + disallow comment on EOL, add many missing directives and + options (Miroslav Lichvar, RHBZ#1213281) + add new directives and options that were added in + chrony-2.2 and chrony-2.3 and improve parsing of + access configuration (Miroslav Lichvar, Issue #348) + add new options for chrony-2.4 (Miroslav Lichvar) + * Dhclient: avoid put ambiguity for node without value (Issue #294) + * Group: support NIS map, support an overridden and disabled password, + i.e. `+:*::` (Matt Dainty) (Issue #258) + * Host_Conf: support spaces between list items (Cedric Bosdonnat, Issue #358) + * Httpd: add paths to SLES vhosts + (Jan Doleschal) (Issue #268) + parse backslashes in directive arguments (Issue #307) + parse mismatching case of opening/closing tags + parse multiple ending section tags on one line + parse wordlists in braces in SSLRequire directives + parse directive args starting with double quote (Issue #330) + parse directive args containing quotes + support perl directives (Issue #327) + parse line breaks/continuations in section arguments + parse escaped spaces in directive/section arguments + parse backslashes at the start of directive args (Issue #324) + * Inputrc: support $else (Cedric Bosdonnat, Issue #359) + * Interfaces: add support for source-directory (Issue #306) + * Json: add comments support, refactor, + allow escaped quotes and blackslashes + * Keepalived: fix space/tag alignments and hanging spaces, + add vrrp_mcast_group4 and vrrp_mcast_group6, + add more vrrp_instance flags, + add mcast/unicast_src_ip and unicast_peer, + add missing garp options, + add vrrp_script options, + expand vrrp_sync_group block, + allow notify option + (Joe Topjian) (Issue #266) + * Known_Hosts: refactoring and description fixed + * Logrotate: support dateyesterday option (Chris Reeves) (GH #367, #368) + * MasterPasswd: new lens to parse /etc/master.passwd + (Matt Dainty) (Issue #258) + * Multipath: add various missing keywoards (Olivier Mangold) (Issue #289) + * MySQL: include /etc/my.cnf.d/*.cnf (Issue #353) + * Nginx: improve typechecking of lens, + allow masks in IP keys and IPv6 (Issue #260) + add @server simple nodes (Issue #335) + * Ntp: add support for basic interface syntax + * OpenShift_Quickstarts: Use Json.lns + * OpenVPN: add all options available in OpenVPN 2.3o + (Justin Akers) (Issue #278) + * Puppetfile: name separator is not mandatory + add support for moduledir (Christoph Maser) + * Rabbitmq: remove space in option name, + add support for cluster_partitioning_handling, + add missing simple options (Joe Topjian) (Issue #264) + * Reprepro_Uploaders: add support for distribution field + (Mathieu Alorent) (Issue #277), + add support for groups (Issue #283) + * Rhsm: new lens to parse subscription-manager's /etc/rhsm/rhsm.conf + * Rsyslog: improve property filter parsing, + treat whitespace after commas as optional. + recognize '~' as a valid syslog action (discard) + (Gregory Smith) (Issue #282), + add support for redirecting output to named pipes + (Gerlof Fokkema) (Issue #366) + * Shellvars: allow partial quoting, mixing multiple styles + (Kaarle Ritvanen) (Issue #183); + allow wrapping builtin argument to multiple lines + (Kaarle Ritvanen) (Issue #184); + support ;; on same line with multiple commands + (Kaarle Ritvanen) (Issue #185); + allow line wrapping and improve quoting support + (Kaarle Ritvanen) (Issue #187); + accept [] and [[]] builtins (Issue #188); + allow && and || constructs after condition + (Kaarle Ritvanen) (Issue #265); + add pattern nodes in case entries + (BREAKING CHANGE: case entry values are now in a + @pattern subnode) (Kaarle Ritvanen) (Issue #265) + add eval builtin support; + add alias builtin support; + allow (almost) any command; + allow && and || after commands (Issue #215); + allow wrapping command sequences + (Kaarle Ritvanen) (Issue #333); + allow command-specific environment variable + (Kaarle Ritvanen) (Issue #332); + support subshells (Issue #339) + newlines in start of functions + allow newlines after actions + support comments after function name (Issue #339) + exclude SuSEfirewall2 (Cedric Bosdonnat, Issue #357) + * Simplelines: parse OpenBSD's hostname.if(5) + files (Jasper Lievisse Adriaanse) (Issue #252) + * Smbusers: add support for ; comments + * Spacevars: support flags (Issue #279) + * Ssh: add support for HostKeyAlgorithms, KexAlgorithms + and PubkeyAcceptedKeyTypes (Oliver Mangold) (Issue #290), + add support for GlobalKnownHostsFile (Issue #316) + * Star: New lens to parse /etc/default/star + * Sudoers: support for negated command alias + (Geoff Williams) (Issue #262) + * Syslog: recognize '~' as a valid syslog action (discard) + (Gregory Smith) (Issue #282) + * Tmpfiles: new lens to parse systemd's tempfiles.d configuration + files (Julien Pivotto) (Issue #269) + * Trapperkeeper: new lens for Puppet server configuration files + * Util: add comment_c_style_or_hash lens + add empty_any lens + * Vsftpd: add isolate and isolate_network options + (Florian Chazal) (Issue #334) + * Xml: allow empty document (Issue #255) + * YAML: new lens (subset) (Dimitar Dimitrov) (Issue #338) + +1.4.0 - 2015-05-22 + - General changes/additions + * add a aug_escape_name call to sanitize strings for use in path + expressions. There are a few characters that are special in path + expressions. This function makes it possible to have them all escaped + so that the resulting string can be used in a path expression and is + guaranteed to only match a node with exactly that name + * paths generated by Augeas are now properly escaped so that, e.g., the + strings returned by aug_match can always be fed to aug_get, even if + they contain special characters + * augtool: correctly record history when reading commands from a file + and then switching to interactive mode (Robert Drake) + * augtool: new command 'errors' that pretty-prints /augeas//error + messages; improve the information provided with 'short iteration' + errors + * fix segfault when saving to a file that was not writable (Issue #178) + * augtool: on interrupt (Ctrl-C), cancel current line instead of + exiting (jeremy Lin) + * updated parser.y to work with Bison 3.0.2 + * fix put-symlink-augsave test to run on Solaris (Geoffrey Gardella, + issue #242) + - Lens changes/additions + * AFS_Cellalias: new lens (Pat Riehecky) + * Authorized_keys: allow double quotes in option values (Issue #135) + * Chrony: fix typo in log flag 'measurements' (Pat Riehecky) + * Clamav: new lens (Andrew Colin Kissa) + * Dns_Zone: New lens to parse DNS zone files (Kaarle Ritvanen) + * Dnsmasq: Parse the structure of the 'address' and 'server' options + (incompatible change) (Kaarle Ritvanen) + * Erlang: parse kernel app config, handle empty lists (RHBZ#1175546) + * Exports: support brackets in machine names (Vincent Desjardins) + * Grub: support password stanza inside boot/title section (Issue #229) + * Httpd: handle eol after opening tag (Issue #220); fix type checking + issue (Issue #223) + * Iscsid: new lens (Joey Boggs and Pat Riehecky) (Issue #174) + * Jaas: several improvements to cover more valid syntax (Steve Shipway) + * Known_Hosts: handle aliases for the host name + * Krb5: support keyword krb524_server; allow realm names starting + with lower-case characters (Jurjen Bokma) + * Limits: allow comments at end of line (timdeluxe) + * Logrotate: support 'dateformat' directive (Issue #217) + support 'maxsize' directive (RHBZ#1213292) + do not require a space before an opening '{' (Issue #123) + * Mailscanner: new lens (Andrew Colin Kissa) + * Mailscanner_Rules: new lens for MailScanner rules (Andrew Colin Kissa) + * NagiosCfg: default to no spaces around equal (Issue #177) + * Nginx: significantly reworked, now parses entire Nginx stock + config successfully (Issue #179) + * Pagekite: more fine-grained control of service_on entries; instead of + 'source' and 'destination', parse into protocol, kitename, + backend_host, backend_port, and secret (Michael Pimmer) + (incompatible change) + * Passwd: support nis [+-]username syntax (Borislav Stoichkov); fix + @nisdefault on OpenBSD (Matt Dainty) + * Pgbouncer: new lense for the pgbouncer connection pooler (Andrew + Colin Kissa) + * Postfix_sasl_smtpd: new lens contributed by larsen0815 (Issue #182) + * Postgresql: look for postgresql.conf in paths used on Red Hat based + distros (Haotian Liu) + * Puppetfile: new lens to parse librarian-puppet's Puppetfile + * Pylonspaste: new lense for Pylon's paste init configuration files + (Andrew Colin Kissa) + * PythonPaste: parse "set" keyword for default overrides (RHBZ#1175545) + * Shadow: allow NIS entries (Borislav Stoichkov) + * Shellvars: case: support ;; on same line with multiple commands + (Kaarle Ritvanen); make insertion at the beginning of a + file that starts with blank lines work; the new lens will + remove blank lines from the beginning of a file as soon as + lines are added to or removed from it (GH issue #202); + handle associative arrays; add /etc/periodic.conf for + FreeBSD (Michael Moll) + * Shellvars_list: support double-quoted continued lines + * Sudoers: allow '+' in user/groupnames (Andreas Grüninger) + * Sysctl: add /boot/loader.conf for FreeBSD (Michael Moll) + * Sysconfig: handle leading whitespace at beginning of a line, + RHBZ#761246 + +1.3.0 - 2014-11-07 + - General changes/additions + * Add missing cp entry in manpage (GH issue #78) + * Add seq to vim syntax highlight (Robert Drake) + * Update augtool.1 man page with new commands and --span, RHBZ#1100077 + * augtool autocomplete includes command aliases, RHBZ#1100184 + * Remove unused "filename" argument from dump-xml command, RHBZ#1100106 + * aug_save returns non-zero result when unable to delete files, + RHBZ#1091143 + - Lens changes/additions + * Aliases: permit missing whitespace between colon and recipients + * AptPreferences: Support spaces in origin fields + * Cgconfig: handle additional valid controllers (Andy Grimm) + * Chrony: New lens to parse /etc/chrony.conf (Pat Riehecky) + * CPanel: New lens to parse cpanel.config files + * Desktop: Allow @ in keys (GH issue #92) + * Device_map: Parse all device.map files under /boot (Mike Latimer) + * Dhclient: Add support for option modifiers (Robert Drake, + GH issue #95) + Parse hash statements with dhcp-eval strings + * Dhcpd: stmt_string quoted blocks no longer store quote marks + (incompatible change), + many changes to support more record types (Robert Drake) + * Group: NIS support (KaMichael) + * Grub: handle "foreground" option, RHBZ#1059383 (Miguel Armas) + * Gshadow: New lens (Lorenzo Catucci) + * Httpd: Allow eol comments after section tags + Allow continued lines inside quoted value (GH issue #104) + Allow comparison operators in tags (GH issue #154) + * IPRoute2: handle "/" in protocol name, swap ID and name fields + (incompatible change), RHBZ#1063968, + handle hex IDs and hyphens, as present in + rt_dsfield, RHBZ#1063961 + * Iptables: parse /etc/sysconfig/iptables.save, RHBZ#1144651 + * Kdump: parse new options, permit EOL comments, refactor, RHBZ#1139298 + * Keepalived: Add more virtual/real server settings and checks, RHBZ#1064388 + * Known_Hosts: New lens for SSH known hosts files + * Krb5: permit braces in values when not in sub-section, RHBZ#1066419 + * Ldso: handle "hwcap" lines (GH issue #100) + * Lvm: support negative numbers, parse /etc/lvm/lvm.conf (Pino Toscano) + * Multipath: add support for rr_min_io_rq (Joel Loudermilk) + * NagiosConfig and NagiosObjects: Fix documentation (Simon Sehier) + * NetworkManager: Use the Quote module, support # in values (no eol comments) + * OpenVPN: Add support for fragment, mssfix, and script-security + (Frank Grötzner) + * Pagekite: New lens (Michael Pimmer) + * Pam: Add partial support for arguments enclosed in [] (Vincent Brillault) + * Passwd: Refactor lens (Lorenzo Catucci) + * Redis: Allow empty quoted values (GH issue #115) + * Rmt: New lens to parse /etc/default/rmt, RHBZ#1100549 + * Rsyslog: support complex $template lines, property filters and file + actions with templates, RHBZ#1083016 + * Services: permit colons in service name, RHBZ#1121263 + * Shadow: New lens (Lorenzo Catucci) + * Shellvars: Handle case statements with same-line ';;', RHBZ#1033799 + Allow any kind of quoted values in block + conditions (GH issue #118) + Support $(( .. )) arithmetic expansion in variable + assignment, RHBZ#1100550 + * Simplevars: Support flags and empty values + * Sshd: Allow all types of entries in Match groups (GH issue #75) + * Sssd: Allow ; for comments + * Squid: Support configuration files for squid 3 (Mykola Nikishov) + * Sudoers: Allow wuoted string in default str/bool params (Nick Piacentine) + * Syslog: Support "# !" style comments (Robert Drake, GH issue #65) + Permit IPv6 loghost addresses, RHBZ#1129388 + * Systemd: Allow quoted Environment key=value pairs, RHBZ#1100547 + Parse /etc/sysconfig/*.systemd, RHBZ#1083022 + Parse semicolons inside entry values, RHBZ#1139498 + * Tuned: New lens for /etc/tuned/tuned-main.conf (Pat Riehecky) + * UpdateDB: New lens to parse /etc/updatedb.conf + (incompatible change as this file used to be processed with + Simplevars) + * Xml: Allow backslash in #attribute values (GH issue #145) + Parse CDATA elements (GH issue #80) + * Xymon_Alerting: refactor lens (GH issue #89) + +1.2.0 - 2014-01-27 + - API changes + * Add aug_cp and the cp and copy commands + * aug_to_xml now includes span information in the XML dump + - General changes/additions + * Fix documentation link in c_api NaturalDocs menu + * Fix NaturalDocs documentation for various lenses + * src/transform.c (filter_matches): wrap fnmatch to ensure that an incl + pattern containing "//" matches file paths, RHBZ#1031084 + * Correct locations table for transform_save() (Tomas Hoger) + * Corrections for CVE-2012-0786 tests (Tomas Hoger) + * Fix umask handling when creating new files, RHBZ#1034261 + - Lens changes/additions + * Access: support DOMAIN\user syntax for users and groups, bug #353 + * Authorized_Keys: Allow 'ssh-ed25519' as a valid authorized_key + type (Jasper Lievisse Adriaanse) + * Automounter: Handle hostnames with dashes in them, GH issue #27 + * Build: Add combinatorics group + * Cyrus_Imapd: Create new entries without space before separator, + RHBZ#1014974 (Dietmar Kling) + * Desktop: Support square brackets in keys + * Dhclient: Add dhclient.conf path for Debian/Ubuntu (Esteve Fernandez) + * Dhcpd: Support conditionals, GH issue #34 + Support a wider variety of allow/deny statement, including + booting and bootp (Yanis Guenane) + Support a wider variety of DHCP allow/deny/ignore statements + (Yanis Guenane) + * Dovecot: Various enhancements and bug fixes (Michael Haslgrübler): + add mailbox to block_names, fix for block_args in quotes, + fix for block's brackets upon write, + fixes broken tests for mailbox, + fixes indention, + test case for block_args with "" + fixes broken indention + Use Quote module + * Exports: Permit colons for IPv6 client addresses, bug #366 + * Grub: Support the 'setkey' and 'lock' directives + NFC fix whitespace errors + Handle makeactive menu command, bug #340 + Add 'verbose' option, GH issue #73 + * Interfaces: Add in support for the source stanza in + /etc/network/interfaces files + Map bond-slaves and bridge-ports to arrays (incompatible + change) (Kaarle Ritvanen) + Add /etc/network/interfaces.d/* support + Allow numeric characters in stanza options (Pascal Lalonde) + * Koji: New lens to parse Koji configs (Pat Riehecky) + * MongoDBServer: Accept quoted values (Tomas Klouda) + * NagiosCfg: Do not try to parse /etc/nagios/nrpe.cfg anymore, GH issue #43 + /etc/nagios/nrpe.cfg is parsed by Nrpe (Yanis Guenane) + * Nagiosobjects: Add support for optional spaces and indents + and whole-line comments (Sean Millichamp) + * OpenVPN: Support daemon, client-config-dir, route, and management + directives (Freakin https://github.com/Freakin) + * PHP: allow php-fpm syntax in keys, GH issue #35 + * Postfix_Main: Handle stray whitespace at end of multiline lines, bug #348 + * Postfix_virtual: allow '+' and '=' in email addresses (Tom Hendrikx) + * Properties: support multiline starting with an empty string, GH issue #19 + * Samba: Permit asterisk in key name, bug #354 + * Shellvars: Read /etc/firewalld/firewalld.conf, bug #363 + Support all types of quoted strings in arrays, bug #357 + Exclude /etc/sysconfig/ip*tables.save files + * Shellvars, Sysconfig: map "bare" export and unset lines to seq numbered + nodes to handle multiple variables (incompatible change), RHBZ#1033795 + * Shellvars_list: Handle backtick variable assignments, bug #368 + Allow end-of-line comments, bug #342 + * Simplevars: Add /etc/selinux/semanage.conf + * Slapd: use smart quotes for database entries; rename by/what to by/access; + allow access to be absent as per official docs (incompatible change) + * Sshd: Indent Match entries by 2 spaces by default + Support Ciphers and KexAlgorithms groups, GH issue #69 + Let all special keys be case-insensitive + * Sudoers: Permit underscores in group names, bug #370 (Matteo Cerutti) + Allow uppercase characters in user names, bug #376 + * Sysconfig: Permit empty comments after comment lines, RHBZ#1043636 + * Sysconfig_Route: New lens for RedHat's route configs + * Syslog: Accept UDP(@) and TCP(@@) protocol, bug #364 (Yanis Guenane) + * Xymon_Alerting: New lens for Xymon alerting files (François Maillard) + * Yum: Add yum-cron*.conf files (Pat Riehecky) + Include only *.repo files from yum.repos.d (Andrew N Golovkov) + Permit spaces after equals sign in list options, GH issue #45 + Split excludes as lists, bug #275 + +1.1.0 - 2013-06-14 + - General changes/additions + * Handle files with special characters in their name, bug #343 + * Fix type error in composition ('f; g') of functions, bug #328 + * Improve detection of version script; make build work on Illumos with + GBU ld (Igor Pashev) + * augparse: add --trace option to print filenames of all modules being + loaded + * Various lens documentation improvements (Jasper Lievisse Adriaanse) + - Lens changes/additions + * ActiveMQ_*: new lens for ActiveMQ/JBoss A-MQ (Brian Harrington) + * AptCacherNGSecurity: new lens for /etc/apt-cacher-ng/security.conf + (Erik Anderson) + * Automaster: accept spaces between options + * BBHosts: support more flags and downtime feature (Mathieu Alorent) + * Bootconf: new lens for OpenBSD's /etc/boot.conf (Jasper Lievisse Adriaanse) + * Desktop: Support dos eol + * Dhclient: read /etc/dhclient.conf used in OpenBSD (Jasper Lievisse Adriaanse) + * Dovecot: New lens for dovecot configurations (Serge Smetana) + * Fai_Diskconfig: Optimize some regexps + * Fonts: exclude all README files (Jasper Lievisse Adriaanse) + * Inetd: support IPv6 addresses, bug #320 + * IniFile: Add lns_loose and lns_loose_multiline definitions + Support smart quotes + Warning: Smart quotes support means users should not add + escaped double quotes themselves. Tests need to be fixed + also. + Use standard Util.comment_generic and Util.empty_generic + Warning: Existing lens tests must be adapted to use standard + comments and empty lines + Allow spaces in entry_multiline* values + Add entry_generic and entry_multiline_generic + Add empty_generic and empty_noindent + Let multiline values begin with a single newline + Support dos eol + Warning: Support for dos eol means existing lenses usually + need to be adapted to exclude \r as well as \n. + * IPRoute2: Support for iproute2 files (Davide Guerri) + * JaaS: lens for the Java Authentication and Authorization Service + (Simon Vocella) + * JettyRealm: new lens for jetty-realm.properties (Brian Harrington) + * JMXAccess, JMXPassword: new lenses for ActiveMQ's JMX files + (Brian Harrington) + * Krb5: Use standard comments and empty lines + Support dos eol + Improve performance + Accept pkinit_anchors (Andrew Anderson) + * Lightdm: Use standard comments and empty lines + * LVM: New lens for LVM metadata (Gabriel) + * Mdadm_conf: optimize some regexps + * MongoDBServer: new lens (Brian Harrington) + * Monit: also load /etc/monitrc (Jasper Lievisse Adriaanse) + * MySQL: Use standard comments and empty lines + Support dos eol + * NagiosCfg: handle Icinga and resources.cfg (Jasper Lievisse Adriaanse) + * Nrpe: accept any config option rather than predefined list (Gonzalo + Servat); optimize some regexps + * Ntpd: new lense for OpenNTPD config (Jasper Lievisse Adriaanse) + * Odbc: Use standard comments and empty lines + * Openshift_*: new lenses for Openshift support (Brian Harrington) + * Quote: allow multiple spaces in quote_spaces; improve docs + * Passwd: allow period in user names in spec, bug #337; allow overrides + in nisentry + * PHP: Support smart quotes + Use standard comments and empty lines + Load /etc/php*/fpm/pool.d/*.conf (Enrico Stahn) + * Postfix_master: allow [] in words, bug #345 + * Resolv: support 'lookup' and 'family' key words, bug #320 + (Jasper Lievisse Adriaanse)) + * Rsyslog: support :omusrmsg: list of users in actions + * RX: add CR to RX.space_in + * Samba: Use standard comments and empty lines + Support dos eol + * Schroot: Support smart quotes + * Services: support port ranges (Branan Purvine-Riley) + * Shellvars: optimize some regexps; reinstate /etc/sysconfig/network, + fixes bug #330, RHBZ#904222, RHBZ#920609; parse /etc/rc.conf.local + from OpenBSD + * Sip_Conf: New lens for sip.conf configurations (Rob Tucker) + * Splunk: new lens (Tim Brigham) + * Subversion: Support smart quotes + Use standard comments and empty lines + Use IniFile.entry_multiline_generic + Use IniFile.empty_noindent + Support dos eol + * Sudoers: allow user aliases in specs + * Sysctl: exclude README file + * Systemd: Support smart quotes; allow backslashes in values + * Xinetd: handle missing values in list, bug #307 + * Xorg: allow 'Screen' in Device section, bug #344 + * Yum: Support dos eol, optimize some regexps + +1.0.0 - 2012-12-21 + - General changes/additions + * fix missing requirement on libxml2 in pkg-config + * do not replace pathin with '/*' unless the length is 0 + or pathin is '/', bug #239 + * create context path if it doesn't exist + * add missing argument to escape() to fix build on solaris, bug #242 + * fix fatest linking with libfa + * don't use variables uninitialized upon error (Jim Meyering) + * bootstrap: add strchrnul gnulib module (for Solaris) + * remove Linux-isms so tests can run on Solaris + * re-open rl_outstream/stdout only when stdout isn't a tty + (fixes -e -i); use /dev/tty instead of /dev/stdout when re-opening + to prevent permission errors, bug #241 + * take root into account for excludes, bug #252 + * fix different errors for parse and put failure + * fix various memory leaks + * add leak test + * allocate exception instead of static const value + * improve aug_srun quoting to permit concatenation and better detect + bad quoting + * rename echo to echo_commands to fix differing types reported + with Solaris linker (Tim Mooney), bug #262 + * fix excl filters that only specify a filename or wildcard + * make sure reloading discards changes after save with mode 'newfile' + * remove loop that added a second iteration around children of /files, + causing multiple saves in newfile and noop modes when editing under + /files/boot, bug #264 + * support \t and \n in aug_srun tokens, bug #265 + * compile_exp: don't return an uninitialized pointer upon failure + (Jim Meyering) + * include 'extern "C"' wrapper for C++, bug #272 (Igor Pashev) + * src/try: don't overwrite gdbcmds.txt if it exists + * fix behavior of set with empty strings + * allow running individual tests with test-run + * test-augtool.sh: escape all possible regular expressions before + they are sent to sed (Micah Anderson) + * add new print_tree primitive + * fix bad memory access in regexp.c + * case-insensitive regexps: fix a problem with number of groups + * prevent symlink attacks via .augnew during saving, + RedHat bug #772257, CVE-2012-0786 + * prevent cross-mountpoint attacks via .augsave during saving, + RedHat bug #772261, CVE-2012-0787 + * add bundled (gnulib) provides in augeas.spec.in, RedHat bug #821745 + * make Travis CI builds + * src/transform.c (xread_file): catch failed fopen, e.g. EACCES + * src/augrun.c (cmd_retrieve_help): tidy line wrapping + * make get_square case insensitive on the ending key + * escape double quotes when dumping regexp + * use constants for "lens", "incl" and "excl" + * src/transform.c (filter_generate): remove duplicate variable assignment + * src/jmt.c (parse_add_item): ensure return is defined on goto error + * src/transform.c (transform_save): chmod after creating new files to + permissions implied by the umask + * ignore eclipse settings directory + * fix memory leak in dbg_visit + * build AST while visiting the parse v2 + * rewrite square lens to be more generic, allowing e.g. square quoting + * tests/modules/fail_shadow_union.aug: fix unintended test failure + * src/syntax.c (compile_test): print which test failed when missing + exception + * libfa (fa_enumerate): new function + * use precise ctype of a square lens if it is indeed regula + * square: properly handle first lens matching empty string + * square lens: correctly process skeletons during put + * src/pathx.c: disallow ',' in names in path expressions + * src/pathx.c: match functions by name and arity + * src/pathx.c: pass the number of actual arguments to the func + implementation + * correctly parse escaped string literals in vim syntax file (Domen Ko¿ar) + - API changes/additions + * add aug_text_store to write string to tree + * add aug_text_retrieve to turn tree into text + * add aug_rename to rename node labels without moving them in the tree + * add aug_transform to allow specifying transforms + * add aug_label to retrieve the label from a path + - Augtool/aug_srun changes/additions + * add "touch" command to create node if it doesn't exist, bug #276 + * make argument to "set" and "setm" optional, bug #276 + * add "text_store" and "text_retrieve" commands + * add "rename" command + * add "transform" command and "-t|--transform" option + * add "label" command + * arrange commands in groups for better help + * man/augtool.pod: update mentions of default load path + * fix exit code when using autosave + * output errors when sending a command as argument + * honor --echo when sending a command as argument + - XPath changes/additions + * add support for an 'i' flag in regexp builtin function + - Lens changes/additions + * Aliases: commands can be fully enclosed in quotes, bug #229 + * Anacron: new lens for /etc/anacrontab + * Apt_Update_Manager: new lens for /etc/update-manager + * AptPreferences: #comments are accepted within entries + * AuthorizedKeys: new lens for SSH's authorized_keys + * AutoMaster: new lens for auto.master files + * AutoMounter: new lens for automounter maps (/etc/auto.*) + * Avahi: new lens for /etc/avahi/avahi-daemon.conf (Athir Nuaimi) + * Build: add blocks + * Cachefilesd: new lens for /etc/cachefilesd.conf (Pat Riehecky) + * Carbon: new lens for /etc/carbon files (Marc Fournier) + * Cgconfig: add space between group and id (Filip Andres) + * Channels: new lens for channels.conf + * Collectd: new lens for /etc/collectd.conf + * Cron: exclude cron allow/deny files; + optimize typechecking; + records can be prefixed by '-' (Michal Filka) + * CronAllow: new lens for cron/at allow/deny files + * Cups: new lens for Cups files + * Cyrus_Imapd: new lens for /etc/imapd.conf, bug #296 (Jeroen van Meeuwen) + * Debctrl: fixed package paragraph keywords, allow variables + for version numbers in dependency lists, + allow DM-Upload-Allowed keyword, Debian bug #650887; + allow control extensions for Python packages, bug #267 + * Dhcpd: fix primary statement arguments, bug #293; + use the Quote module to manage quoted values; + force double quotes for filename attribute, bug #311 + * Dput: use Sys.getenv("HOME") + * Erlang: new generic lens to build Erlang config lenses + * Fonts: new lens for /etc/fonts files + * Fstab: handle options with empty values ("password="); + make options field optional; + allow end-of-line comment + * Fuse: new lens for fuse.conf + * Gdm: include /etc/gdm/custom.conf + * Grub: parse "password --encrypted" properly, bug #250; + optimize typechecking; + add /boot/grub/grub.conf to transform (Josh Kayse) + * GtkBookmarks: new lens for $HOME/.gtk-bookmarks + * Hosts_Access: add netmask; + permit more client list formats + (whitespace separated lists, @netgroups, + IPv6 hosts, inc. zone indices, + paths to lists of clients, wildcards, + hosts_options), bug #256 + * Htpasswd: new lens for htpasswd/rsyncd.secret files (Marc Fournier) + * Httpd: support DOS eol + * IniFile: allow # and ; in quoted values, bug #243; + add entry_list and entry_list_nocomment + * Inputrc: new lens for /etc/inputrc + * Iptables: test that blank lines are accepted (Terence Haddock) + * Json: allow JSON number literals to be followed by whitespace; + correctly parse empty object and arrays (Lubomir Rintel) + * Keepalived: various improvements, optimize typechecking + * Krb5: handle host{} sections in v4_name_convert; + support ticket_lifetime; + handle multiple arguments to *_enctypes (Pat Riehecky); + better whitespace and semicolon comment support + * Ldif: new lens to read LDIF files per RFC2849 + * Ldso: new lens for ld.so.conf files + * Lightdm: new lens for /etc/lightdm/*.conf, bug #302 (David Salmen) + * Logrotate: rewrite with Build, Rx, and Sep; + add su logrotate.conf option (Luc Didry); + accept integers prefixed by a sign (Michal Filka) + * Logwatch: new lens for /etc/logwatch/conf/logwatch.conf (Francois Lebel) + * Mcollective: new lens for Mcollective files (Marc Fournier) + * Memcached: new lens for /etc/memcached.conf (Marc Fournier) + * Mdadm_conf: include /etc/mdadm/mdadm.conf + * Mke2fs: add support for default_mntopts, enable_periodic_fsck, + and auto_64-bit_support + * Modprobe: support softdep command, Debian bug #641813; + allow spaces around '=' in option, RedHat bug #826752; + support multiline split commands, Ubuntu bug #1054306; + revert inner lens name change, fixes Modules_conf + * Modules: define own entry regexp as referenced Modprobe inner lens + doesn't match file format + * Multipath: allow devices to override defaults, bug #278 (Jacob M. McCann) + * NagiosCfg: support syntax for commands.cfg and resource.cfg + * Netmask: new lens for /etc/inet/netmasks on Solaris + * NetworkManager: new lens for NetworkManager files + * Networks: handle multiple missing network octets, + fix sequencing of aliases + * Nginx: new lens for /etc/nginx/nginx.conf (Ian Berry) + * Nsswitch: add passwd_compat, group_compat and shadow_compat + GNU extensions (Travis Groth); + remove long list of databases, match by regexp + * Ntp: allow deprecated 'authenticate' setting; + add tos directive, bug #297 (Jacob M. McCann) + * OpenVPN: use the Quote module to manage quoted values + * Pam: allow uppercase chars in 'types', remove /etc/pam.conf from filter; + ignore allow.pamlist; + exclude /etc/pam.d/README, bug #255 + * PamConf: new lens for /etc/pam.conf + * Passwd: allow asterisk in password field, bug #255 + * Pg_Hba: support multiple options, bug #313; + add a path to pg_hba.aug, bug #281 (Marc Fournier) + * Php: support include() statements + * Phpvars: map arrays with @arraykey subnodes to make working paths; + support classes and public/var values, bug #299 (aheahe) + * Postfix_Transport: new lens for Postfix transport files; + allow host:port and [host]:port syntaxes, bug #303 + * Postfix_Virtual: new lens for Postfix virtual files + * Postgresql: new lens for postgresql.conf; + properly support quotes, bug #317 + * Properties: improve handling of whitespace, empty props, and underscores + in keys (Brett Porter, Carlos Sanchez) + * Protocols: new lens for /etc/protocols + * Puppet: add /usr/local/etc/puppet paths (Tim Bishop) + * Puppet_Auth: new lens for /etc/puppet/auth.conf + * PuppetFileserver: add /usr/local/etc/puppet paths (Tim Bishop) + * PythonPaste: new lens for Python Paste configs (Dan Prince) + * Qpid: new lens to read Apache Qpid daemon/client configs (Andrew Replogle) + * Quote: new generic lens to manage quoted values using square lenses + * Rabbitmq: new lens for /etc/rabbitmq/rabbitmq.config + * Redis: new lens for /etc/redis/redis.conf (Marc Fournier) + * Resolv: add in single-request-reopen (Erinn Looney-Triggs) + * Rsyslog: new lens for rsyslog files + * Rx: add continous lines (cl, cl_or_space, cl_or_opt_space) + * Sep: add space_equal; + add continous lines (cl_or_space, cl_or_opt_space) + * Shellvars: support @return; + allow multiple elif statements; + parse functions; + add more includes; + autoload some SuSe and RHN specific files (Duncan Mac-Vicar P); + add BSD's /etc/rc.conf, bug #255; + remove non-shell files, up2date now has a lens, + move updatedb.conf to Simplevars; + include /etc/{default,sysconfig}/* and /etc/selinux/config; + add systemd's /etc/os-release file; + exclude bootloader from shellvars (Duncan Mac-Vicar P); + handle bash's implicit concatenation of quoted strings + (Michal Filka); + exclude /etc/default/whoopsie; + fix ambiguity by making semi-colons illegal in bquot + and arrays; + add lns_norec to check for ambiguities; + allow newlines in quoted values; + allow semi-colons in bquot and dollar_assign; + make end-of-line comments begin with a space; + allow double backquoted values; + support matching keys in var_action, bug #290; + fix empty lines after comments; + add shift and exit builtins, with optional args; + allow double quotes around variables in case statements; + fix empty comments; + add locale.conf, vconsole.conf systemd configs, + RedHat bug #881841 + * Shells: permit same-line comments + * Simplelines: new lens for simple lines files + * Simplevars: new lens for simple key/value, non shellvars files + * Smbusers: new lens for Samba's smbusers + * Sssd: new lens for sssd.conf (Erinn Looney-Triggs) + * Ssh: use Sys.getenv('HOME') in filter instead of ~ since it's not + expanded (Luc Didry) + * Sshd: permit hyphens in subsystem names + * Subversion: new lens for /etc/subversion files + * Sudoers: optimize typechecking; + allow = in commands (but force ! or / as first character + if not an alias); + allow commands without full path if they begin with a lowcase + letter; + allow "!" as a type of Defaults entry, Debian bug #650079; + allow quoted strings in Defaults parameters, bug #263 + * Sysconfig: handle end of line comments and semicolons; strip quotes, + RedHat bug #761246 + * Sysctl: include /etc/sysctl.d files + * Syslog: allow capital letters in tokens + * Systemd: new lens to parse systemd unit files + * Thttpd: new lens for /etc/thttpd/thttpd.conf (Marc Fournier) + * Up2date: new lens for /etc/sysconfig/rhn/up2date + * Util: add comment_noindent; add delim; add doseol; + support DOS eols in various places; + add *.bak and *.old to stdexcl, to match files in /etc/sysconfig + * Vfstab: new lens for /etc/vfstab config on Solaris + * Vmware_Config: new lens for /etc/vmware/config + * Vsftpd: add require_ssl_reuse option (Danny Yates) + * Xinetd: rewrite with Build, Sep, and Rx; + make attribute names case-insensitive (Michal Filka) + * Xml: support single _and_ double quoted attribute values, + RedHat bug #799885, bug #258 + * Xymon: new lens for Xymon config files, bug #266 (Jason Kincl) + * Yum: rebase on IniFile, support for comments, bug #217 + +0.10.0 - 2011-12-02 + - support relative paths by taking them relative to the value + of /augeas/context in all API functions where paths are used + - add aug_to_xml to API: transform tree(s) into XML, exposed as dump-xml + in aug_srun and augtool. Introduces dependency on libxml2 + - fix regular expression escaping. Previously, /[\/]/ match either a + backslash or a slash. Now it only matches a slash + - path expressions: add function 'int' to convert a node value (string) + to an integer + - path expressions: make sure the regexp produced by empty nodesets from + regexp() and glob() matches nothing, rather than the empty word + - fix --autosave when running single command from command line, BZ 743023 + - aug_srun: support 'insert' and 'move' as aliases for 'ins' and 'mv' + - aug_srun: allow escaping of spaces, quotes and brackets with \ + - aug_init: accept AUG_NO_ERR_CLOSE flag; return augeas handle even when + intialization fails so that caller gets some details about why + initialization failed + - aug_srun: tolerate trailing white space in commands + - much improved, expanded documentation of many lenses + - always interpret lens filter paths as absolute, bug #238 + - fix bug in libfa that would incorrectly calculate the difference of a + case sensistive and case insensitive regexp (/[a-zA-Z]+/ - /word/i + would match 'worD') + - new builtin 'regexp_match' for .aug files to make testing regexp + matching easier during development + - fix 'span' command, bug #220 + - Lens changes/additions + * Access: parse user@host and (group) in users field; field separator + need not be surrounded by spaces + * Aliases: allow spaces before colons + * Aptconf: new lens for /etc/apt/apt.conf + * Aptpreferences: support origin entries + * Backuppchosts: new lens for /etc/backuppc/hosts, bug 233 (Adam Helms) + * Bbhosts: various fixes + * Cgconfig: id allowed too many characters + * Cron: variables aren't set like shellvars, semicolons are allowed in + email addresses; fix parsing of numeric fields, previously upper case + chars were allowed; support ranges in time specs + * Desktop: new lens for .desktop files + * Dhcpd: slashes must be double-quoted; add Red Hat's dhcpd.conf + locations + * Exports: allow empty options + * Fai_diskconfig: new lens for FAI disk_config files + * Fstab: allow ',' in file names, BZ 751342 + * Host_access: new lens for /etc/hosts.{allow,deny} + * Host_conf: new lens for /etc/host.conf + * Hostname: new lens for /etc/hostname + * Hosts: also load /etc/mailname by default + * Iptables: allow digits in ipt_match keys, bug #224 + * Json: fix whitespace handling, removing some cf ambiguities + * Kdump: new lens for /etc/kdump.conf (Roman Rakus) + * Keepalived: support many more flags, fields and blocks + * Krb5: support [pam] section, bug #225 + * Logrotate: be more tolerant of whitespace in odd places + * Mdadm_conf: new lens for /etc/mdadm.conf + * Modprobe: Parse commands in install/remove stanzas (this introduces a + backwards incompatibility); Drop support for include as it is not + documented in manpages and no unit tests are shipped. + * Modules: new lens for /etc/modules + * Multipath: add support for seveal options in defaults section, bug #207 + * Mysql: includedir statements are not part of sections; support + \!include; allow indentation of entries and flags + * Networks: new lens for /etc/networks + * Nrpe: allow '=' in commands, bug #218 (Marc Fournier) + * Php: allow indented entries + * Phpvars: allow double quotes in variable names; accept case + insensitive PHP tags; accept 'include_once'; allow empty lines at + EOF; support define() and bash-style and end-of-line comments + * Postfix_master: allow a lot more chars in words/commands, including + commas + * PuppetFileserver: support same-line comments and trailing whitespace, + bug #214 + * Reprepo_uploaders: new lens for reprepro's uploaders files + * Resolv: permit end-of-line comments + * Schroot: new lens for /etc/schroot/schroot.conf + * Shellvars: greatly expand shell syntax understood; support various + syntactic constructs like if/then/elif/else, for, while, until, case, + and select; load /etc/blkid.conf by default + * Spacevars: add toplevel lens 'lns' for consistency + * Ssh: new lens for ssh_config (Jiri Suchomel) + * Stunnel: new lens for /etc/stunnel/stunnel.conf (Oliver Beattie) + * Sudoers: support more parameter flags/options, bug #143 + * Xendconfsxp: lens for Xen configuration (Tom Limoncelli) + * Xinetd: allow spaces after '{' + +0.9.0 - 2011-07-25 + - augtool: keep history in ~/.augeas/history + - add aug_srun API function; this makes it possible to run a sequence of + commands through the API + - aug_mv: report error AUG_EMVDESC on attempts to move a node into one of + its descendants + - path expressions: allow whitespace inside names, making '/files/etc/foo + bar/baz' a legal path, but parse [expr1 or expr2] and [expr1 and expr2] + as the logical and/or of expr1 and expr2 + - path expressions: interpret escape sequences in regexps; since '.' does + not match newlines, it has to be possible to write '.|\n' to match any + character + - path expressions: allow concatenating strings and regexps; add + comparison operator '!~'; add function 'glob'; allow passing a nodeset + to function 'regexp' + - store the names of the functions available in path expressions under + /augeas/version + - fix several smaller memory leaks + - Lens changes/additions + * Aliases: allow spaces and commas in aliases (Mathieu Arnold) + * Grub: allow "bootfs" Solaris/ZFS extension for dataset name, bug #201 + (Dominic Cleal); allow kernel path starting with a BIOS device, + bug #199 + * Inifile: allow multiline values + * Php: include files from Zend community edition, bug #210 + * Properties: new lens for Java properties files, bug #194 (Craig Dunn) + * Spacevars: autoload two ldap files, bug #202 (John Morrissey) + * Sudoers: support users:groups format in a Runas_Spec line, bug #211; + add CSW paths (Dominic Cleal) + * Util: allow comment_or_eol to match whitespace-only comments, + bug #205 (Dominic Cleal) + * Xorg: accept InputClass section; autoload from /etc/X11/xorg.conf.d, + bug #197 + +0.8.1 - 2011-04-15 + - augtool: respect autosave flag in oneshot mode, bug #193; fix segfault + caused by unmatched bracket in path expression, bug #186 + - eliminate a global variable in the lexer, fixes BZ 690286 + - replace an erroneous assert(0) with a proper error message when none of + the alternatives in a union match during saving, bug #183 + - improve AIX support + - Lens changes/additions + * Access: support the format @netgroup@@nisdomain, bug #190 + * Fstab: fix parsing of SELinux labels in the fscontext option (Matt Booth) + * Grub: support 'device' directive for UEFI boot, bug #189; support + 'configfile' and 'background' (Onur Küçük) + * Httpd: handle continuation lines (Bill Pemberton); autoload + httpd.conf on Fedora/RHEL, BZ 688149; fix support for single-quoted + strings + * Iptables: support --tcp-flags, bug #157; allow blank and comment + lines anywhere + * Mysql: include /etc/my.cnf used on Fedora/RHEL, BZ 688053 + * NagiosCfg: parse setting multiple values on one line (Sebastien Aperghis) + * NagiosObjects: process /etc/nagios3/objects/*.cfg (Sebastien Aperghis) + * Nsswitch: support 'sudoers' as a database, bug #187 + * Shellvars: autoload /etc/rc.conf used in FreeBSD (Rich Jones) + * Sudoers: support '#include' and '#includedir', bug #188 + * Yum: exclude /etc/yum/pluginconf.d/versionlock.list (Bill Pemberton) + +0.8.0 - 2011-02-22 + - add new 'square' lens combinator + - add new aug_span API function + - augtool: short options for --nostdinc, --noload, and --noautoload + - augtool: read commands from tty after executing file with --interactive + - augtool: add --autosave option + - augtool: add --span option to load nodes' span + - augtool: add span command to get the node's span according to the input + file + - augtool: really be quiet when we shouldn't be echoing + - fix segfault in get.c with L_MAYBE lens; bug #180 + - fix segfault when a path expression called regexp() with an invalid + regexp; bug #168 + - improved vim syntax file + - replace augtest by test-augtool.sh to obviate the need for Ruby to run + tests + - use sys_wait module from gnulib; bug #164 + - Lens changes/additions + * Access: new lens for /etc/security/access.conf (Lorenzo Dalrio) + * Crypttab: new lens for /etc/crypttab (Frederic Lespez) + * Dhcpd: new lens + * Exports: accept hostnames with dashes; bug #169 (Sergio Ballestrero) + * Grub: add various Solaris extensions (Dominic Cleal); support "map" + entries, bug #148 + * Httpd: new lens for Apache config + * Inifile: new lens indented_title_label + * Interfaces: allow indentation for "iface" entries; bug #182 + * Mysql: change default comment delimiter from ';' to '#'; bug #181 + * Nsswitch: accept various add'l databases; bug #171 + * PuppetFileserver: new lens for Puppet's fileserver.conf (Frederic Lespez) + * REsolv: allow comments starting with ';'; bug #173 (erinn) + * Shellvars: autoload various snmpd config files; bug #170 (erinn) + * Solaris_system: new lens for /etc/system on Solaris (Dominic Cleal) + * Util (comment_c_style, empty_generic, empty_c_style): new lenses + * Xml: generic lens to process XML files + * Xorg: make "position" in "screen" optional; allow "Extensions" + section; bug #175 (omzkk) + +0.7.4 - 2010-11-19 + - augtool: new clearm command to parallel setm + - augtool: add --file option + - Fix SEGV under gcc 4.5, caused by difficulties of the gcc optimizer + handling bitfields (bug #149; rhbz #651992) + - Preserve parse errors under /augeas//error: commit 5ee81630, released + in 0.7.3, introduced a regression that would cause the loss of parse + errors; bug #138 + - Avoid losing already parsed nodes under certain circumstances; bug #144 + - Properly record the new mtime of a saved file; previously the mtime in + the tree was reset to 0 when a file was saved, causing unnecessary file + reloads + - fix a SEGV when using L_MAYBE in recursive lens; bug #136 + - Incompatible lens changes + * Fstab: parse option values + * Squid: various improvements, see bug #46; + * Xinetd: map service names differently + - Lens changes/additions + * Aptsources: map comments properly, allow indented lines; bug #151 + * Grub: add indomU setting for Debian. Allow '=' as separator in title; + bug #150 + * Fstab: also process /etc/mtab + * Inetd: support rpc services + * Iptables: allow underscore in chain names + * Keepalived: new lens for /etc/keepalived/keepalived.conf + * Krb5: allow digits in realm names; bug #139 + * Login_defs: new lens for /etc/login.defs (Erinn Looney-Triggs) + * Mke2fs: new lens for /etc/mke2fs.conf + * Nrpe: new lens for Nagios nrpe (Marc Fournier) + * Nsswitch: new lens for /etc/nsswitch.conf + * Odbc: new lens for /etc/odbc.ini (Marc Fournier) + * Pg_hba: New lens; bug #140 (Aurelien Bompard). Add system path on + Debian; bug #154 (Marc Fournier) + * Postfix_master: parse arguments in double quotes; bug #69 + * Resolv: new lens for /etc/resolv.conf + * Shells: new lens for /etc/shells + * Shellvars: parse ulimit builtin + * Sudoers: load file from /usr/local/etc (Mathieu Arnold) Allow + 'visiblepw' parameter flag; bug #143. Read files from /etc/sudoers.d + * Syslog: new lens for /etc/syslog.conf (Mathieu Arnold) + * Util: exclude dpkg backup files; bug #153 (Marc Fournier) + * Yum: accept continuation lines for gpgkey; bug #132 + +0.7.3 - 2010-08-06 + - aug_load: only reparse files that have actually changed; greatly speeds + up reloading + - record all variables in /augeas/variables, regardless of whether they + were defined with aug_defvar or aug_defnode; make sure + /augeas/variables always exists + - redefine all variables (by reevaluating their corresponding + expressions) after a aug_load. This makes variables 'sticky' across + loads + - fix behavior of aug_defnode to not fail when the expression evaluates + to a nonempty node set + - make gnulib a git submodule so that we record the gnulib commit off + which we are based + - allow 'let rec' with non-recursive RHS + - fix memory corruption when reloading a tree into which a variable + defined by defnode points (BZ 613967) + - plug a few small memory leaks, and some segfaults + - Lens changes/additions + * Device_map: new lens for grub's device.map (Matt Booth) + * Limits: also look for files in /etc/security/limits.d + * Mysql: new lens (Tim Stoop) + * Shellvars: read /etc/sysconfig/suseconfig (Frederik Wagner) + * Sudoers: allow escaped spaces in user/group names (Raphael Pinson) + * Sysconfig: lens for the shell subdialect used in /etc/sysconfig; lens + strips quotes automatically + +0.7.2 - 2010-06-22 + - new API call aug_setm to set/create multiple nodes simultaneously + - record expression used in a defvar underneath /augeas/variables + - Lens changes/additions + * Group: add test for disabled account (Raphael Pinson) + * Grub: handle comments within a boot stanza + * Iptables: also look for /etc/iptables-save (Nicolas Valcarcel) + * Modules_conf: new lens for /etc/modules.conf (Matt Booth) + * Securetty: added handling of emtpy lines/comments (Frederik Wagner) + * Shellvars: added SuSE sysconfig puppet files (Frederik Wagner), + process /etc/environment (seph) + * Shellvars_list: Shellvars-like lens that treats strings of + space-separated words as lists (Frederik Wagner) + +0.7.1 - 2010-04-21 + - new primitive lens 'value' to set value of a node to a constant, + similar to 'label' for the key (see http://augeas.net/docs/lenses.html) + - new builtins for printing and getting the types of a lens (see + http://augeas.net/docs/builtins.html) + - add unit type to lens language; allow '_' as an identifier in let's to + force evaluation for side effect only + - Various fixes for Solaris. Augeas now builds cleanly on Solaris 5.10, + and most of the tests pass. The three tests that fail all fail because + the test scripts have Linux idiosyncrasies. This needs to be addressed + in a future release. Much thanks to Dagobert Michelsen and the OpenCSW + project (http://www.opencsw.org/) for providing me with access to their + build farm. + - fix crash when recursive lens was used in a nonrecursive lens (bug #100) + - context free parser/recursive lenses: handle 'l?' properly (bug #119); + distinguish between successful parse and parse with an error at end of + input; do caller filtering to avoid spurious ambiguous parses with + grammars containing epsilon productions + - aug_get: return -1 when multiple nodes match (bug #121) + - much better error message when iteration stops prematurely during + put/create than the dreaded 'Short iteration' + - augtool: ignore empty lines from stdin; report error when get fails + - fix memory leak in file_info (transform.c); this was leaking a file + name every time we loaded a file (Laine Stump) + - nicer error message when typechecker spots ambiguity in atype + - libfa: handle '(a|)' and 'r{min,}' properly + - locale independence: handle a literal '|' properly on systems that lack + use_locale + - bootstrap: pull in isblank explicitly (needed on Solaris) + - src/lens.c (lns_check_rec): fix refcounting mistake on error path (bug #120) + - fix SEGV when loading empty files + - improvements in handling some OOM's + - Lens changes/additions + * Approx: lens and test for the approx proxy server (Tim Stoop) + * Cgconfig: lens and tests for libcgroup config (Ivana Hutarova Varekova) + * Cgrules: new lens and test (Ivana Hutarova Varekova) + * Cobblermodules: lens + tests for cobbler's modules.conf (Shannon Hughes) + * Debctrl: new lens and test (Dominique Dumont) + * Dput: add 'allow_dcut' parameter (bug #105) (Raphael Pinson) + * Dhclient: add rfc code parsing (bug #107) (Raphael Pinson) + * Group: handle disabled passwords + * Grub: support empty kernel parameters, Suse incl.s (Frederik Wagner) + * Inittab: allow ':' in the process field (bug #109) + * Logrotate: tolerate whitespace at the end of a line (bug #101); files + can be separated by newlines (bug #104) (Raphael Pinson) + * Modprobe: Suse includes (Frederik Wagner) + * Nagisocfg: lens and test for /etc/nagios3/nagios.cfg (Tim Stoop) + * Ntp: add 'tinker' directive (bug #103) + * Passwd: parse NIS entries on Solaris + * Securetty: new lens and test for /etc/securetty (Simon Josi) + * Shellvars: handle a bare 'export VAR'; Suse includes (Frederik + Wagner); allow spaces after/before opening/closing parens for array + * Sshd: allow optional arguments in subsystem commands (Matt Palmer) + * Sudoers: allow del_negate even if no negate_node is found (bug #106) + (Raphael Pinson); accept 'secure_path' (BZ 566134) (Stuart + Sears) + +0.7.0 - 2010-01-14 + - Support for context-free lenses via the 'let rec' keyword. The syntax + is experimental, though the feature is here to stay. See + lenses/json.aug for an example of what's possible with that. + - Support for case-insensitive regular expressions. Simply append 'i' to + a regexp literal to make it case-insensitive, e.g. /hello/i will match + all variations of hello, regardless of case. + - Major revamp of augtool. In particular, path expressions don't need to + be quoted anymore. The online help has been greatly improved. + - Check during load/save that each file is only matched by one transform + under /augeas/load. If there are multiple transforms for a file, the + file is skipped. + - New error codes AUG_ENOLENS and AUG_EMXFM + - Do not choke on non-existing lens during save + - Change the metadata for files under /augeas/files slightly: the node + /augeas/files/$PATH/lens now has the name of the lens used to load the + file; the source location of that lens has moved to + /augeas/files/$PATH/lens/info + - New public functions fa_nocase, fa_is_nocase, and fa_expand_nocase in + libfa + - Various smaller bug fixes, performance improvements and improved error + messages + - Lens changes/additions + * Cobblersettings: new lens and test (Bryan Kearney) + * Iptables: allow quoted strings as arguments; handle both negation + syntaxes + * Json: lens and tests for generic Json files + * Lokkit: allow '-' in arguments + * Samba: accept entry keys with ':' (Partha Aji) + * Shellvars: allow arrays that span multiple lines + * Xinetd (name): fix bad '-' in character class + +0.6.0 - 2009-11-30 + - Add error reporting API (aug_error and related calls); use to report + error details in a variety of places + - Path expressions: add regexp matching; add operator '|' to form union + of nodesets (ticket #89) + - Tolerate non-C locales from the environment (ticket #35); it is no + longer necessary to set the locale to C from the outside + - use stpcpy/stpncpy from gnulib (needed for building on Solaris) + - Properly check regexp literals for syntax errors (ticket #93) + - Distribute and install vim syntax files (ticket #97) + - many more bugfixes + - Lens changes/additions + * Apt_preferences: support version pin; filter out empty lines (Matt + Palmer) + * Cron: variables can contain '_' etc. (ticket #94) + * Ethers: new lens for /etc/ethers (Satoru SATOH) + * Fstab: allow '#' in spec (ticket #95) + * Group: allow empty password field (ticket #95) + * Inittab: parse end-of-line comments into a #comment + * Krb5: support kdc section; add v4_name_convert subsection to + libdefaults (ticket #95) + * Lokkit: add mising eol to forward_port; make argument for --trust + more permissive + * Pam: allow '-' before type + * Postfix_access: new lens for /etc/postfix/access (Partha Aji) + * Rx: allow '!' in device_name + * Sudoers: allow certain backslash-quoted characters in a command (Matt + Palmer) + * Wine: new lens to read Windows registry files + +0.5.3 - 2009-09-14 + - Match trees on label + value, not just label; see + tests/modules/pass_strip_quotes.aug for how that enables stripping + quotes + - Do not trip over symlinks to files on a different device during save; + fixes problems with writing to /etc/grub.conf on Fedora/RHEL + - API (defnode): always add the newly created node into the resulting + nodeset + - Add preceding-sibling and following-sibling axes to path expressions + - augtool, augparse: add --version option (bug #88) + - Change file info recorded under /augeas/files/FILE/*: remove lens/id + and move lens/info to lens + - Properly record new files under /augeas/files (bug #78) + - aug_load: clean up variables to avoid dangling references (bug #79) + - Make Augeas work on AIX + - Ignore anything but regular files when globbing + - Add 'clear' function to language for use in unit tests + - typechecker: print example trees in tree format + - libfa: properly support regexps with embedded NUL's + - Lens changes/additions + * Xorg: revamped, fixes various parse failures (Matt Booth) + * Inetd: new lens and test (Matt Palmer) + * Multipath: new lens and test + * Slapd: also read /etc/openldap.slapd.conf (bug #85) + +0.5.2 - 2009-07-13 + - Make Augeas work on Mac OS/X (bug #66) (Anders Bjoerklund) + - reduce symbols exported from libfa with linker script + - add --echo option to augtool + - require Automake 1.11 (Jim Meyering) + - avoid spurious save attempts for freshly read files + - Lens changes/additions + * Inittab: schema change: use 'id' field as name of subtree for a line, + instead of a generated number. Map comments as '#comment' (Matt Palmer) + * Logrotate: make owner/group in create statement optional, allow + filenames to be indented + * Ntp: allow additional options for server etc. (bug #72) + * Shellvars: allow backticks as quote characters (bug #74) + * Yum: also read files in /etc/yum/pluginconf.d (Marc Fournier) + +0.5.1 - 2009-06-09 + - augeas.h: flag AUG_NO_MODL_AUTOLOAD suppresses initial loading + of modules; exposed as --noautoload in augtool + - augtool: don't prompt when input is not from tty (Raphael Pinson) + - augparse: add --notypecheck option + - path expressions: allow things like '/foo and /bar[3]' in predicates + - Lens changes/additions + * Aliases: map comments as #comment (Raphael Pinson) + * Build, Rx, Sep: new utility modules (Raphael Pinson) + * Cron: new lens (Raphael Pinson) + * Dnsmasq: process files in /etc/dnsmasq.d/* (ticket #65) + * Grub: parse kernel and module args into separate nodes; parse + arguments for 'serial', 'terminal', and 'chainloader'; allow + optional argument for 'savedefault' + * Interfaces: make compliant with actual Debian spec (Matt Palmer) + * Iptables: relax regexp for chain names; allow comment lines mixed + in with chains and rules (ticket #51) + * Logrotate: allow '=' as separator (ticket #61); make newline at end + of scriptlet optional + * Modprobe: handle comments at end of line + * Ntp: parse fudge record (Raphael Pinson); parse all directives in + default Fedora ntp.conf; process 'broadcastdelay', 'leapfile', + and enable/disable flags (ticket #62) + * Pbuilder: new lens for Debian's personal builder (Raphael Pinson) + * Php: add default path on Fedora/RHEL (Marc Fournier) + * Squid: handle indented entries (Raphael Pinson) + * Shellvars: map 'export' and 'unset'; map comments as #comment + (Raphael Pinson) + * Sudoers: allow backslashes inside values (ticket #60) (Raphael Pinson) + * Vsftpd: map comments as #comment; handle empty lines; find + vsftpd.conf on Fedora/RHEL + * Xinetd: map comments as #comment (Raphael Pinson) + +0.5.0 - 2009-03-27 + - Clean up interface for libfa; the interface is now considered stable + - New aug_load API call; allows controlling which files to load by + modifying /augeas/load and then calling aug_load; on startup, the + transforms marked with autoload are reported under /augeas/load + - New flag AUG_NO_LOAD for aug_init to keep it from loading files on + startup; add --noload option to augtool + - New API calls aug_defvar and aug_defnode to define variables for + path expressions; exposed as 'defvar' and 'defnode' in augtool + - Lenses distributed with Augeas are now installed in + /usr/share/augeas/lenses/dist, which is searched after + /usr/share/augeas/lenses, so that lenses installed by other packages + take precedence + - New program examples/fadot to draw various finite automata (Francis + Giraldeau) + - Report line number and character offset in the tree when parsing a + file with a lens fails + - Fix error in propagation of dirty flag, which could lead to only + parts of a tree being saved when multiple files were modified + - Flush files to disk before moving them + - Fix a number of memory corruptions in the XPath evaluator + - Several performance improvements in libfa + - Lens changes/additions + * Grub: process embedded comments for update-grub (Raphael Pinson) + * Iptables: new lens for /etc/sysconfig/iptables + * Krb5: new lens for /etc/krb5.conf + * Limits: map dpmain as value of 'domain' node, not as label + (Raphael Pinson) + * Lokkit: new lens for /etc/sysconfig/system-config-firewall + * Modprobe: new lens for /etc/modprobe.d/* + * Sudoers: more finegrained parsing (ticket #48) (Raphael Pinson) + +0.4.2 - 2009-03-09 + - Do not delete files that had an error upon parsing + - For Fedora/EPEL RPM's, BuildRequire libselinux-devel (bug #26) + - Bug fixes in path expressions + * for numbers, the meaning of '<' and '<=' was reversed + - Always create an entry /files in aug_init + - New builtin 'Sys' module with functions 'getenv' and 'read_file', + the latter reads a the contents of a file into a string + - Lens changes/additions + * Postfix_main: handle continuation lines + * Bbhosts, Hosts, Logrotate, Sudoers: label comment nodes as '#comment' + * Sshd: map comments as '#comment' nodes + * Squid: add all keywords from squid 2.7 and 3 (Francois Deppierraz) + * Logrotate: process unit suffixes for 'size' and 'minsize' + +0.4.1 - 2009-03-02 + - Remove files when their entire subtree under /files is deleted + - Various bug fixes and syntax enhancements for path expressions + (see tests/xpath.tests for details) + - Evaluate path expressions with multiple predicates correctly + - Fix incorrect setting of /augeas/events/saved + - Major cleanup of matching during get; drastically improves + performance for very large (on the order of 10k lines) config files + - Small performance improvement in the typechecker + - Reject invalid character sets like [x-u] during typecheck + - Build with compile warnings set to 'maximum' instead of 'error', so + that builds on platforms with broken headers will work out of the box + - Lens changes/additions + * Util.stdexcl now excludes .augsave and .augnew files + * Logrotate: allow 'yearly' schedule, spaces around braces + * Ntp: fix so that it processes ntp.conf on Fedora 10 + * Services: lens for /etc/services (Raphael Pinson) + * Xorg: new lens and tests (Raphael Pinson) + +0.4.0 - 2009-02-06 + - Much improved and expanded support for path expressions in the public + API. See doc/xpath.txt and tests/xpath.tests for details. + - Solaris support: builds at least on OpenSolaris 2008.11 + - Lens changes/additions + * Grub: support color and savedefault + * DarkIce: new lens for http://darkice.tyrell.hu/ (Free Ekanayaka) + +0.3.6 - 2009-01-26 + - report version in /augeas/version, report legal save modes in + /augeas/version/save/mode for feature tests/version checking + - dynamically change behavior of aug_save; add noop save mode + (Bryan Kearney) + - plug memory leak, more portable SELinux test (Jim Meyering) + - fix bz #478619 - do not use abspath (Arnaud Gomes-do-Vale) + - fix segfault when branch in a union does not have a ktype + - Lens changes/additions + * Dpkg: new lens for Debian's dpkg.cfg (Robin Lee Powell) + * Limits: new lens for /etc/security/limits.conf (Free Ekanayaka) + * Soma: new lens for http://www.somasuite.org/ config + (Free Ekanayaka) + * Php, Gdm: fix minor regexp error (Marc Fournier) + expand filter for Php config files (Robin Lee Powell) + * Phpvars: whitspace fixes (Free Ekanayaka) + * Puppet: accept indented puppet.conf (ticket #25) + +0.3.5 - 2008-12-23 + - add an option to rewrite files by overwriting their contents instead of + putting the new file in place atomically with rename(2); file contents + are only copied after rename fails with EXDEV or EBUSY, and only if the + node /augeas/save/copy_if_rename_fails (fix #32) + - saving of backup (.augsave) files now works even if the original and + backup files are on different devices + - major refactoring of how path expressions are handled internally. Fixes + a number of bugs and oddities (e.g. tickets #7 and #23) + - fix a bug in fa_as_regexp: a '.' wasn't escaped, ultimately leading to + spurious errors from the typechecker + - Lens changes/additions + * Group: process /etc/group (Free Ekanayaka) + * Passwd: process /etc/passwd (Free Ekanayaka) + * Phpvars: process files that set PHP variables, in particular + /etc/squirrelmail/config.php (Free Ekanayaka) + * Rsyncd: process /etc/rsyncd.conf (Marc Fournier) + * Shellvars: process /etc/arno-iptables-firewall/debconf.cfg and + /etc/cron-apt/config (Free Ekanayaka), load /etc/sysconfig/sendmail + * Postfix: process postfix's main.cf and master.cf (Free Ekanayaka) + * Squid: new lens for squid.conf (Free Ekanayaka) + * Webmin: new lens (Free Ekanayaka) + * Xinetd: make sure equal sign is surrounded by spaces (#30) + * Sshd: change the structure of Condition subtrees (Dominique Dumont) + +0.3.4 - 2008-11-05 + - fix saving of backup files; in 0.3.3, when AUG_SAVE_BACKUP was passed + to aug_init, aug_save would always fail + +0.3.3 - 2008-10-24 + - restore the behavior of aug_save; in 0.3.2, aug_save broke API by + returning the number of files changed on success instead of 0 + +0.3.2 - 2008-10-21 + - saving now reports which files were actually changed in + /augeas/events/saved; aug_save also returns the number of files + that were changed + - preserve file owner, permissions and SELinux context when changing a file. + - make saving idempotent, i.e. when a change to the tree does not result + in changes to the actual file's content, do not touch the original file + - report an error if there are nodes in the tree with a label that + is not allowed by the lens + - quietly append a newline to files that do not have one + - generate lens documentation using NaturalDocs and publish those + on the Auegas website (Raphael Pinson) + - Lens changes/additions + * Grub: support the 'password' directive (Joel Nimety) + * Grub: support 'serial' and 'terminal' directives (Sean E. Millichamp) + * Samba: change default indentation and separators (Free Ekanayaka) + * Logrotate: process tabooext, add dateext flag (Sean E. Millichamp) + * Sshd: Cleaner handling of 'Match' blocks (Dominique Dumont) + * Monit: new lens (Free Ekanayaka) + * Ldap: merge with Spacevars (Free Ekanayaka) + * Shellvars: support /etc/default (Free Ekanayaka) + * Shellvars: handle space at the end of a line + +0.3.1 - 2008-09-04 + - Major performance improvement when processing huge files, reducing some + O(n^2) behavior to O(n) behavior. It's now entirely feasible to + manipulate for example /etc/hosts files with 65k lines + - Handle character escapes '\x' in regular expressions in compliance with + Posix ERE + - aug_mv: fix bug when moving at the root level + - Fix endless loop when using a mixed-case module name like MyMod.lns + - Typecheck del lens: for 'del RE STR', STR must match RE + - Properly typecheck the '?' operator, especially the atype; also allow + '?' to be applied to lenses that contain only 'store', and do not + produce tree nodes. + - Many new/improved lenses + * many lenses now map comments as '#comment' nodes instead of just + deleting them + * Sudoers: added (Raphael Pinson) + * Hosts: map comments into tree, handle whitespace and comments + at the end of a line (Kjetil Homme) + * Xinetd: allow indented comments and spaces around "}" (Raphael Pinson) + * Pam: allow comments at the end of lines and leading spaces + (Raphael Pinson) + * Fstab: map comments and support empty lines (Raphael Pinson) + * Inifile: major revamp (Raphael Pinson) + * Puppet: new lens for /etc/puppet.conf (Raphael Pinson) + * Shellvars: handle quoted strings and arrays (Nahum Shalman) + * Php: map entries outside of sections to a '.anon' section + (Raphael Pinson) + * Ldap: new lens for /etc/ldap.conf (Free Ekanayaka) + * Dput: add allowed_distributions entry (Free Ekanayaka) + * OpenVPN: new lens for /etc/openvpn/{client,server}.conf (Raphael Pinson) + * Dhclient: new lens for /etc/dhcp3/dhclient.conf (Free Ekanayaka) + * Samba: new lens for /etc/samba/smb.conf (Free Ekanayaka) + * Slapd: new lens for /etc/ldap/slapd.conf (Free Ekanayaka) + * Dnsmasq: new lens for /etc/dnsmasq.conf (Free Ekanayaka) + * Sysctl: new lens for /etc/sysctl.conf (Sean Millichamp) + +0.3.0 - 2008-08-07 + - Add aug_mv call to public API + - Do not clobber symlinks, instead write new files to target of symlink + - Fail 'put' when tree has invalid entries + - Set exit status of augtool + - Avoid picking special characters, in particular '\0', in examples (libfa) + - Store system errors, using strerror, in the tree during writing of files + - New lenses + * Generic inifile module (Raphael Pinson) + * logrotate (Raphael Pinson) + * /etc/ntp.conf (Raphael Pinson) + * /etc/apt/preferences (Raphael Pinson) + * bbhosts for Big Brother [http://www.bb4.org/] (Raphael Pinson) + * php.ini (Raphael Pinson) + +0.2.2 - 2008-07-18 + - Fix segfault in store.put on NULL values + - Properly move default lens dir with DATADIR (Jim Meyering) + - Fix 'short iteration' error on get/parse of empty string; this bug + made it impossible to save into a new file + - Add 'insa' and 'insb' primitives to allow insertion from + put unit tests + - aug_insert: handle insertion before first child properly + - New lenses + * /etc/exports: NFS exports + * /etc/dput.cf: Debian's dput (Raphael Pinson) + * /etc/aliases: don't require whitespace after comma (Greg Swift) + +0.2.1 - 2008-07-01 + - Address some compilation issues found on Ubuntu/Debian unstable + - Fix segfault when aug_init/close are called multiple times + - Man page for augparse + - New lenses + * /etc/sysconfig/selinux + * Bugfixes for grub.conf + +0.2.0 - 2008-06-05 + - Augeas is now much more portable + * Pull in gnulib on non-glibc systems + * Augeas now builds and runs on FreeBSD (possibly others, too) + - Various fixes for memory corruption and the like + (Jim Meyering, James Antill) + - New lenses + * vsftpd.conf + * various bugfixes in existing lenses + +0.1.1 - 2008-05-16 + - Add subtraction of regexps to the language, for example + let re = /[a-z]+/ - /(Allow|Deny)Users/ + - Report errors during get/put in the tree; added subnodes to + /augeas/files/PATH/error for that purpose + - Many many bugfixes: + * plugged all known memory leaks + * fixed typecheck for lens union (l1 | l2) which was plain wrong + * reduce overall memory usage by releasing unused compiled regexps + * further performance improvements in libfa + * check that values match the regexps in STORE when saving + - libfa can now convert an automaton back to a regular expression + (FA_AS_REGEXP) + - New lenses + * /etc/fstab + * /etc/xinetd.conf and /etc/xinetd.d/* + +0.1.0 - 2008-05-01 + - Various changes to public API: + * Remove aug_exists from public API, and merge functionality into aug_get + * Do not hide pointer behind typedef; instead Augeas 'handle' type is now + struct augeas, typedef'd to augeas (Jim Meyering) + * Const-correctness of public API, return error indication + from aug_print (Jim Meyering) + * Make buildable on Debian Etch (remove -fstack-protector from compiler + switches) + - Public API is now stable, and existing calls will be supported without + further changes + - New schema: + * /etc/sysconfig/network-scripts/ifcfg-* (Alan Pevec) + * Assorted other files from /etc/sysconfig (the ones that just set + shell variables) + * /etc/apt/sources.list and /etc/apt/sources.list.d/* (Dean Wilson) + - Man page for augtool (Dean Wilson) + +0.0.8 - 2008-04-16 + - Complete rewrite of the language for schema descriptions + +0.0.7 - 2008-03-14 + - Typecheck lenses; in particular, discover and complain about ambiguous + concatenation and iteration + - Enable typechecking for augparse by default, and for augtool via the + '-c' flag + - Fixed lens definitions in spec/ to pass typechecking. They contained + quite a few stupid and subtle problems + - Greatly improved libfa performance to make typechecking reasonably + fast. Typechecking cmfm.aug went from more than two hours to under two + seconds + +0.0.6 - 2008-03-05 + - Make it possible to overwrite files when saving with and without + backups + - Take the filesystem root as an optional argument to aug_init + - Expose these two things as command line options in augtool + +0.0.5 - 2008-03-05 + - Changed public API to contain explicit reference to augeas_t + structure. This makes it easier to write threadsafe code using Augeas + - Added libfa, finite automata library, though it's not yet used by + Augeas + +0.0.4 - 2008-02-25 + - package as RPM and make sure Augeas can be build on Fedora/RHEL + +0.0.3 - 2008-02-25 + - further rework; file processing now resembles Boomerang lenses much + more closely + - major revamp of the internal tree representation (ordered tree where + multiple children can have the same label, including NULL labels) + - move away from LL(1) parsing in favor of regular languages, since they + enable much better ahead-of-time checks (which are not implemented yet) + +0.0.2 - 2008-01-29: + - completely reworked + - processing of files is now based on a textual description of the + structure of the files (basically a LL(1) grammar) + +0.0.1 - 2007-12-01: + - First release. + - Public API and basic tree data structure. + - Record scanning works. + - Providers for pam.d, inittab and /etc/hosts + - Simple tests and test driver diff --git a/README b/README deleted file mode 100644 index 0191f7a..0000000 --- a/README +++ /dev/null @@ -1 +0,0 @@ -Please see doc/gnulib-readme.texi for basic information about Gnulib. diff --git a/README b/README new file mode 120000 index 0000000..42061c0 --- /dev/null +++ b/README @@ -0,0 +1 @@ +README.md \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..3ed2a82 --- /dev/null +++ b/README.md @@ -0,0 +1,88 @@ +[![Build Status](https://travis-ci.org/hercules-team/augeas.svg?branch=master)](https://travis-ci.org/hercules-team/augeas) +[![Fuzzing Status](https://oss-fuzz-build-logs.storage.googleapis.com/badges/augeas.svg)](https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened&can=1&q=proj:augeas) + +Introduction +------------ + + Augeas is a library and command line tool that focuses on the most basic + problem in handling Linux configurations programmatically: editing actual + configuration files in a controlled manner. + + To that end, Augeas exposes a tree of all configuration settings (well, + all the ones it knows about) and a simple local API for manipulating the + tree. Augeas then modifies underlying configuration files according to + the changes that have been made to the tree; it does as little modeling + of configurations as possible, and focuses exclusively on transforming + the tree-oriented syntax of its public API to the myriad syntaxes of + individual configuration files. + + This focus on editing sets Augeas apart from any other configuration tool + I know of. Hopefully, Augeas will form a more solid foundation on which + these tools can be built; with a clean, simple API these tools should + be able to focus more on their core concerns and less on the mechanics + of running sed, grep, awk, etc. to tweak a config file. + + If all you need is a tool to edit configuration files, you only need to + concern yourself with the handful of public API calls that Augeas exposes + (or their equivalent language bindings). However, to teach Augeas about a + new file format, you need to describe that file format in Augeas's domain + specific language (a very small subset of ML) Documentation for that + language can be found on the Augeas website at http://augeas.net/ If you + do that, please contribute the description if at all possible, or include + it in the distribution of your software - all you need to do for that is + add a couple of text files, there is no need to change existing + code. Ultimately, Augeas should describe all config files commonly found + on a Linux system. + +Non-goals +--------- + +Augeas is as much defined by the things it does _not_ try to accomplish +as by its goals: + +* No abstraction from native config format, i.e. the organization of + the tree mirrors closely how the native config files are organized +* No cross-platform abstraction - what is logically the same value may + live in different places in the tree on different + distributions. Dealing with that should be left to a higher-level + tool +* No remote management support. Augeas is a local API, other ways of + access to Augeas should be built on top of it +* No (or very little) modelling. Augeas is focused on syntax + transformation, not on any higher-level understanding of + configuration. + +The above non-goals are of course important concerns in +practice. Historically though, too many config mgmt projects have failed +because they set their sights too high and tried to address syntax +transformation, modelling, remote support, and scalable management all in +one. That leads to a lack of focus, and to addressing each of those goals +unsatisfactorily. + +Building +-------- + +These instructions apply to building a released tarball. If you want to +build from a git checkout, see the file HACKING. + +See the generic instructions in INSTALL. Generally, + + ./configure + make && make install +should be all that is needed. + +You need to have readline-devel installed. On systems that support +SELinux, you should also install libselinux-devel. + +Documentation +------------- + +Documentation can be found on Augeas' website http://augeas.net/ The site +also contains information on how to get in touch, what you can do to help +etc. + +License +------- + +Augeas is released under the [Lesser General Public License, Version 2.1](http://www.gnu.org/licenses/lgpl-2.1.html) +See the file COPYING for details. diff --git a/acinclude.m4 b/acinclude.m4 new file mode 100644 index 0000000..31988b1 --- /dev/null +++ b/acinclude.m4 @@ -0,0 +1,148 @@ +dnl +dnl Taken from libvirt/acinclude.m4 +dnl +dnl We've added: +dnl -Wextra -Wshadow -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Winline -Wredundant-decls +dnl We've removed +dnl CFLAGS="$realsave_CFLAGS" +dnl to avoid clobbering user-specified CFLAGS +dnl +AC_DEFUN([AUGEAS_COMPILE_WARNINGS],[ + dnl ****************************** + dnl More compiler warnings + dnl ****************************** + + AC_ARG_ENABLE(compile-warnings, + AC_HELP_STRING([--enable-compile-warnings=@<:@no/minimum/yes/maximum/error@:>@], + [Turn on compiler warnings]),, + [enable_compile_warnings="m4_default([$1],[maximum])"]) + + warnCFLAGS= + + common_flags="-fexceptions -fasynchronous-unwind-tables" + + case "$enable_compile_warnings" in + no) + try_compiler_flags="" + ;; + minimum) + try_compiler_flags="-Wall -Wformat -Wformat-security $common_flags" + ;; + yes) + try_compiler_flags="-Wall -Wformat -Wformat-security -Wmissing-prototypes $common_flags" + ;; + maximum|error) + try_compiler_flags="-Wall -Wformat -Wformat-security -Wmissing-prototypes -Wnested-externs -Wpointer-arith" + try_compiler_flags="$try_compiler_flags -Wextra -Wshadow -Wcast-align -Wwrite-strings -Waggregate-return" + try_compiler_flags="$try_compiler_flags -Wstrict-prototypes -Winline -Wredundant-decls -Wno-sign-compare" + try_compiler_flags="$try_compiler_flags $common_flags" + if test "$enable_compile_warnings" = "error" ; then + try_compiler_flags="$try_compiler_flags -Werror" + fi + ;; + *) + AC_MSG_ERROR(Unknown argument '$enable_compile_warnings' to --enable-compile-warnings) + ;; + esac + + AH_VERBATIM([FORTIFY_SOURCE], + [/* Enable compile-time and run-time bounds-checking, and some warnings, + without upsetting newer glibc. */ + #if !defined _FORTIFY_SOURCE && defined __OPTIMIZE__ && __OPTIMIZE__ + # define _FORTIFY_SOURCE 2 + #endif + ]) + + compiler_flags= + for option in $try_compiler_flags; do + SAVE_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $option" + AC_MSG_CHECKING([whether gcc understands $option]) + AC_TRY_LINK([], [], + has_option=yes, + has_option=no,) + CFLAGS="$SAVE_CFLAGS" + AC_MSG_RESULT($has_option) + if test $has_option = yes; then + compiler_flags="$compiler_flags $option" + fi + unset has_option + unset SAVE_CFLAGS + done + unset option + unset try_compiler_flags + + AC_ARG_ENABLE(iso-c, + AC_HELP_STRING([--enable-iso-c], + [Try to warn if code is not ISO C ]),, + [enable_iso_c=no]) + + AC_MSG_CHECKING(what language compliance flags to pass to the C compiler) + complCFLAGS= + if test "x$enable_iso_c" != "xno"; then + if test "x$GCC" = "xyes"; then + case " $CFLAGS " in + *[\ \ ]-ansi[\ \ ]*) ;; + *) complCFLAGS="$complCFLAGS -ansi" ;; + esac + case " $CFLAGS " in + *[\ \ ]-pedantic[\ \ ]*) ;; + *) complCFLAGS="$complCFLAGS -pedantic" ;; + esac + fi + fi + AC_MSG_RESULT($complCFLAGS) + + WARN_CFLAGS="$compiler_flags $complCFLAGS" + AC_SUBST(WARN_CFLAGS) +]) + +dnl +dnl Determine readline linker flags in a way that works on RHEL 5 +dnl Check for rl_completion_matches (missing on OS/X) +dnl +AC_DEFUN([AUGEAS_CHECK_READLINE], [ + AC_CHECK_HEADERS([readline/readline.h]) + + # Check for readline. + AC_CHECK_LIB(readline, readline, + [use_readline=yes; READLINE_LIBS=-lreadline], + [use_readline=no]) + + # If the above test failed, it may simply be that -lreadline requires + # some termcap-related code, e.g., from one of the following libraries. + # See if adding one of them to LIBS helps. + if test $use_readline = no; then + saved_libs=$LIBS + LIBS= + AC_SEARCH_LIBS(tgetent, ncurses curses termcap termlib) + case $LIBS in + no*) ;; # handle "no" and "none required" + *) # anything else is a -lLIBRARY + # Now, check for -lreadline again, also using $LIBS. + # Note: this time we use a different function, so that + # we don't get a cached "no" result. + AC_CHECK_LIB(readline, rl_initialize, + [use_readline=yes + READLINE_LIBS="-lreadline $LIBS"],, + [$LIBS]) + ;; + esac + test $use_readline = no && + AC_MSG_WARN([readline library not found]) + LIBS=$saved_libs + fi + + if test $use_readline = no; then + AC_MSG_ERROR(Could not find a working readline library (see config.log for details).) + fi + + AC_SUBST(READLINE_LIBS) + + if test $use_readline = yes; then + saved_libs=$LIBS + LIBS=$READLINE_LIBS + AC_CHECK_FUNCS([rl_completion_matches rl_crlf rl_replace_line]) + LIBS=$saved_libs + fi +]) diff --git a/augeas.pc.in b/augeas.pc.in new file mode 100644 index 0000000..530ddfa --- /dev/null +++ b/augeas.pc.in @@ -0,0 +1,12 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: augeas +Version: @VERSION@ +Description: Augeas configuration editing library +Requires.private: libxml-2.0 @PC_SELINUX@ +Libs: -L${libdir} -laugeas +Libs.private: -lfa +Cflags: -I${includedir} diff --git a/augeas.spec.in b/augeas.spec.in new file mode 100644 index 0000000..be3e33d --- /dev/null +++ b/augeas.spec.in @@ -0,0 +1,292 @@ +Name: augeas +Version: @VERSION@ +Release: 1%{?dist} +Summary: A library for changing configuration files + +Group: System Environment/Libraries +License: LGPLv2+ +URL: http://augeas.net/ +Source0: http://download.augeas.net/%{name}-%{version}.tar.gz + +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +BuildRequires: readline-devel libselinux-devel libxml2-devel +Requires: %{name}-libs = %{version}-%{release} + +%description +A library for programmatically editing configuration files. Augeas parses +configuration files into a tree structure, which it exposes through its +public API. Changes made through the API are written back to the initially +read files. + +The transformation works very hard to preserve comments and formatting +details. It is controlled by ``lens'' definitions that describe the file +format and the transformation into a tree. + +%package devel +Summary: Development files for %{name} +Group: Development/Libraries +Requires: %{name}-libs = %{version}-%{release} +Requires: pkgconfig + +%description devel +The %{name}-devel package contains libraries and header files for +developing applications that use %{name}. + + +%package libs +Summary: Libraries for %{name} +Group: System Environment/Libraries + +%description libs +The libraries for %{name}. + +Augeas is a library for programmatically editing configuration files. It parses +configuration files into a tree structure, which it exposes through its +public API. Changes made through the API are written back to the initially +read files. + +%package static +Summary: Static libraries for %{name} +Group: Development/Libraries +Requires: %{name}-devel = %{version}-%{release} + +%description static +The %{name}-static package contains static libraries needed to produce +static builds using %{name}. + + + +%prep +%setup -q + +%build +%configure \ +%ifarch riscv64 + --disable-gnulib-tests \ +%endif + --enable-static +make %{?_smp_mflags} + +%check +# Disable test-preserve.sh SELinux testing. This fails when run under mock due +# to differing SELinux labelling. +export SKIP_TEST_PRESERVE_SELINUX=1 + +make %{?_smp_mflags} check || { + echo '===== tests/test-suite.log =====' + cat tests/test-suite.log + exit 1 +} + +%install +rm -rf $RPM_BUILD_ROOT +make install DESTDIR=$RPM_BUILD_ROOT INSTALL="%{__install} -p" +find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';' + +# The tests/ subdirectory contains lenses used only for testing, and +# so it shouldn't be packaged. +rm -r $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/dist/tests + +%clean +rm -rf $RPM_BUILD_ROOT + +%post libs -p /sbin/ldconfig + +%postun libs -p /sbin/ldconfig + +%files +%defattr(-,root,root,-) +%{_bindir}/augtool +%{_bindir}/augparse +%{_bindir}/augmatch +%{_bindir}/augprint +%{_bindir}/fadot +%doc %{_mandir}/man1/* +%{_datadir}/vim/vimfiles/syntax/augeas.vim +%{_datadir}/vim/vimfiles/ftdetect/augeas.vim +%{bash_completions_dir}/* + +%files libs +%defattr(-,root,root,-) +# _datadir/augeas and _datadir/augeas/lenses are owned +# by filesystem. +%{_datadir}/augeas/lenses/dist +%{_libdir}/*.so.* +%doc AUTHORS COPYING NEWS + +%files devel +%defattr(-,root,root,-) +%doc +%{_includedir}/* +%{_libdir}/*.so +%{_libdir}/pkgconfig/augeas.pc + +%files static +%defattr(-,root,root,-) +%{_libdir}/libaugeas.a +%{_libdir}/libfa.a + +%changelog +* Wed Dec 7 2022 George Hansper - 1.14.0 +- add augprint, fix bash-completion filenames + +* Sun Nov 20 2022 George Hansper - 1.14.0 +- add bash completions + +* Fri Mar 17 2017 David Lutterkort - 1.8.0-1 +- add static subpackage + +* Fri Feb 10 2017 Fedora Release Engineering - 1.7.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Thu Jan 12 2017 Igor Gnatenko - 1.7.0-3 +- Rebuild for readline 7.x + +* Sat Nov 12 2016 Richard W.M. Jones - 1.7.0-2 +- riscv64: Disable gnulib tests on riscv64 architecture. + +* Wed Nov 09 2016 Dominic Cleal - 1.7.0-1 +- Update to 1.7.0 + +* Mon Aug 08 2016 Dominic Cleal - 1.6.0-1 +- Update to 1.6.0 + +* Thu May 12 2016 Dominic Cleal - 1.5.0-1 +- Update to 1.5.0 + +* Wed Feb 03 2016 Fedora Release Engineering - 1.4.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Wed Jun 17 2015 Fedora Release Engineering - 1.4.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Tue Jun 02 2015 Dominic Cleal - 1.4.0-1 +- Update to 1.4.0 + +* Sat Nov 08 2014 Dominic Cleal - 1.3.0-1 +- Update to 1.3.0; remove all patches + +* Fri Aug 15 2014 Fedora Release Engineering - 1.2.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Sat Jun 07 2014 Fedora Release Engineering - 1.2.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Mon Mar 31 2014 Dominic Cleal - 1.2.0-2 +- Add patch for Krb5, parse braces in values (RHBZ#1079444) + +* Wed Feb 12 2014 Dominic Cleal - 1.2.0-1 +- Update to 1.2.0, add check section +- Update source URL to download.augeas.net (RHBZ#996032) + +* Sat Aug 03 2013 Fedora Release Engineering - 1.1.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Wed Jun 19 2013 David Lutterkort - 1.1.0-1 +- Update to 1.1.0; remove all patches + +* Tue Jun 18 2013 Richard W.M. Jones - 1.0.0-4 +- Fix /etc/sysconfig/network (RHBZ#904222). + +* Wed Jun 5 2013 Richard W.M. Jones - 1.0.0-3 +- Don't package lenses in tests/ subdirectory. + +* Wed Feb 13 2013 Fedora Release Engineering - 1.0.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Fri Jan 4 2013 David Lutterkort - 1.0.0-1 +- New version; remove all patches + +* Wed Jul 18 2012 Fedora Release Engineering - 0.10.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Tue Jan 10 2012 David Lutterkort - 0.10.0-3 +- Add patches for bugs 247 and 248 (JSON lens) + +* Sat Dec 3 2011 Richard W.M. Jones - 0.10.0-2 +- Add patch to resolve missing libxml2 requirement in augeas.pc. + +* Fri Dec 2 2011 David Lutterkort - 0.10.0-1 +- New version + +* Mon Jul 25 2011 David Lutterkort - 0.9.0-1 +- New version; removed patch pathx-whitespace-ea010d8 + +* Tue May 3 2011 David Lutterkort - 0.8.1-2 +- Add patch pathx-whitespace-ea010d8.patch to fix BZ 700608 + +* Fri Apr 15 2011 David Lutterkort - 0.8.1-1 +- New version + +* Wed Feb 23 2011 David Lutterkort - 0.8.0-1 +- New version + +* Mon Feb 07 2011 Fedora Release Engineering - 0.7.4-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Mon Nov 22 2010 Matthew Booth - 0.7.4-1 +- Update to version 0.7.4 + +* Thu Nov 18 2010 Richard W.M. Jones - 0.7.3-2 +- Upstream patch proposed to fix GCC optimization bug (RHBZ#651992). + +* Fri Aug 6 2010 David Lutterkort - 0.7.3-1 +- Remove upstream patches + +* Tue Jun 29 2010 David Lutterkort - 0.7.2-2 +- Patches based on upstream fix for BZ 600141 + +* Tue Jun 22 2010 David Lutterkort - 0.7.2-1 +- Fix ownership of /usr/share/augeas. BZ 569393 + +* Wed Apr 21 2010 David Lutterkort - 0.7.1-1 +- New version + +* Thu Jan 14 2010 David Lutterkort - 0.7.0-1 +- Remove patch vim-ftdetect-syntax.patch. It's upstream + +* Tue Dec 15 2009 David Lutterkort - 0.6.0-2 +- Fix ftdetect file for vim + +* Mon Nov 30 2009 David Lutterkort - 0.6.0-1 +- Install vim syntax files + +* Mon Sep 14 2009 David Lutterkort - 0.5.3-1 +- Remove separate xorg.aug, included in upstream source + +* Tue Aug 25 2009 Matthew Booth - 0.5.2-3 +- Include new xorg lens from upstream + +* Fri Jul 24 2009 Fedora Release Engineering - 0.5.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Mon Jul 13 2009 David Lutterkort - 0.5.2-1 +- New version + +* Fri Jun 5 2009 David Lutterkort - 0.5.1-1 +- Install fadot + +* Fri Mar 27 2009 David Lutterkort - 0.5.0-2 +- fadot isn't being installed just yet + +* Tue Mar 24 2009 David Lutterkort - 0.5.0-1 +- New program /usr/bin/fadot + +* Mon Mar 9 2009 David Lutterkort - 0.4.2-1 +- New version + +* Fri Feb 27 2009 David Lutterkort - 0.4.1-1 +- New version + +* Fri Feb 6 2009 David Lutterkort - 0.4.0-1 +- New version + +* Mon Jan 26 2009 David Lutterkort - 0.3.6-1 +- New version + +* Tue Dec 23 2008 David Lutterkort - 0.3.5-1 +- New version + +* Mon Feb 25 2008 David Lutterkort - 0.0.4-1 +- Initial specfile diff --git a/autogen.sh b/autogen.sh new file mode 100755 index 0000000..24f864e --- /dev/null +++ b/autogen.sh @@ -0,0 +1,102 @@ +#!/usr/bin/env bash +# Run this to generate all the initial makefiles, etc. + +usage() { + echo >&2 "\ +Usage: $0 [OPTION]... +Generate makefiles and other infrastructure needed for building + + +Options: + --gnulib-srcdir=DIRNAME Specify the local directory where gnulib + sources reside. Use this if you already + have gnulib sources on your machine, and + do not want to waste your bandwidth downloading + them again. + --help Print this message + any other option Pass to the 'configure' script verbatim + +Running without arguments will suffice in most cases. +" +} + +BUILD_AUX=build/ac-aux +GNULIB_DIR=gnulib + +set -e +srcdir=`dirname $0` +test -z "$srcdir" && srcdir=. + +THEDIR=`pwd` +cd $srcdir + +# Split out options for bootstrap and for configure +declare -a CF_ARGS +for option +do + case $option in + --help) + usage + exit;; + --gnulib-srcdir=*) + GNULIB_SRCDIR=$option;; + *) + CF_ARGS[${#CF_ARGS[@]}]=$option;; + esac +done + +#Check for OSX +case `uname -s` in +Darwin) LIBTOOLIZE=glibtoolize;; +*) LIBTOOLIZE=libtoolize;; +esac + + +DIE=0 + +(autoconf --version) < /dev/null > /dev/null 2>&1 || { + echo + echo "You must have autoconf installed to compile augeas." + echo "Download the appropriate package for your distribution," + echo "or see http://www.gnu.org/software/autoconf" + DIE=1 +} + +(automake --version) < /dev/null > /dev/null 2>&1 || { + echo + DIE=1 + echo "You must have automake installed to compile augeas." + echo "Download the appropriate package for your distribution," + echo "or see http://www.gnu.org/software/automake" +} + +if test "$DIE" -eq 1; then + exit 1 +fi + +if test -z "${CF_ARGS[*]}"; then + echo "I am going to run ./configure with --enable-warnings - if you " + echo "wish to pass any extra arguments to it, please specify them on " + echo "the $0 command line." +fi + +mkdir -p $BUILD_AUX + +$LIBTOOLIZE --copy --force +./bootstrap $GNULIB_SRCDIR +aclocal -I gnulib/m4 +autoheader +automake --add-missing +autoconf + +cd $THEDIR + +if test x$OBJ_DIR != x; then + mkdir -p "$OBJ_DIR" + cd "$OBJ_DIR" +fi + +$srcdir/configure "${CF_ARGS[@]}" && { + echo + echo "Now type 'make' to compile augeas." +} diff --git a/bootstrap b/bootstrap new file mode 100755 index 0000000..a84eb39 --- /dev/null +++ b/bootstrap @@ -0,0 +1,101 @@ +#!/bin/sh + +usage() { + echo >&2 "\ +Usage: $0 [OPTION]... +Bootstrap this package from the checked-out sources. + +Options: + --gnulib-srcdir=DIRNAME Specify the local directory where gnulib + sources reside. Use this if you already + have gnulib sources on your machine, and + do not want to waste your bandwidth downloading + them again. + +If the file bootstrap.conf exists in the current working directory, its +contents are read as shell variables to configure the bootstrap. + +Running without arguments will suffice in most cases. +" +} + +for option +do + case $option in + --help) + usage + exit;; + --gnulib-srcdir=*) + GNULIB_SRCDIR=${option#--gnulib-srcdir=};; + *) + echo >&2 "$0: $option: unknown option" + exit 1;; + esac +done + +# Get gnulib files. + +case ${GNULIB_SRCDIR--} in +-) + echo "$0: getting gnulib files..." + git submodule init || exit $? + git submodule update || exit $? + GNULIB_SRCDIR=.gnulib + ;; +*) + # Redirect the gnulib submodule to the directory on the command line + # if possible. + if test -d "$GNULIB_SRCDIR"/.git && \ + git config --file .gitmodules submodule.gnulib.url >/dev/null; then + git submodule init + GNULIB_SRCDIR=`cd $GNULIB_SRCDIR && pwd` + git config --replace-all submodule.gnulib.url $GNULIB_SRCDIR + echo "$0: getting gnulib files..." + git submodule update || exit $? + GNULIB_SRCDIR=.gnulib + else + echo >&2 "$0: invalid gnulib srcdir: $GNULIB_SRCDIR" + exit 1 + fi + ;; +esac + +gnulib_tool=$GNULIB_SRCDIR/gnulib-tool +<$gnulib_tool || exit + +modules=' +argz +fnmatch +getline +getopt-gnu +gitlog-to-changelog +canonicalize-lgpl +isblank +locale +mkstemp +regex +safe-alloc +selinux-h +stpcpy +stpncpy +strchrnul +strndup +sys_wait +vasprintf +' + +# Tell gnulib to: +# require LGPLv2+ +# put *.m4 files in new gnulib/m4/ dir +# put *.[ch] files in new gnulib/lib/ dir. + +$gnulib_tool \ + --lgpl=2 \ + --with-tests \ + --m4-base=gnulib/m4 \ + --source-base=gnulib/lib \ + --tests-base=gnulib/tests \ + --aux-dir=build/ac-aux \ + --libtool \ + --quiet \ + --import $modules diff --git a/build/ac-aux/move-if-change b/build/ac-aux/move-if-change new file mode 100755 index 0000000..fb6a451 --- /dev/null +++ b/build/ac-aux/move-if-change @@ -0,0 +1,83 @@ +#!/bin/sh +# Like mv $1 $2, but if the files are the same, just delete $1. +# Status is zero if successful, nonzero otherwise. + +VERSION='2011-01-28 20:09'; # UTC +# The definition above must lie within the first 8 lines in order +# for the Emacs time-stamp write hook (at end) to update it. +# If you change this file with Emacs, please let the write hook +# do its job. Otherwise, update this string manually. + +# Copyright (C) 2002-2007, 2009-2012 Free Software Foundation, Inc. + +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +usage="usage: $0 SOURCE DEST" + +help="$usage + or: $0 OPTION +If SOURCE is different than DEST, then move it to DEST; else remove SOURCE. + + --help display this help and exit + --version output version information and exit + +The variable CMPPROG can be used to specify an alternative to \`cmp'. + +Report bugs to ." + +version=`expr "$VERSION" : '\([^ ]*\)'` +version="move-if-change (gnulib) $version +Copyright (C) 2011 Free Software Foundation, Inc. +License GPLv3+: GNU GPL version 3 or later +This is free software: you are free to change and redistribute it. +There is NO WARRANTY, to the extent permitted by law." + +cmpprog=${CMPPROG-cmp} + +for arg +do + case $arg in + --help | --hel | --he | --h) + exec echo "$help" ;; + --version | --versio | --versi | --vers | --ver | --ve | --v) + exec echo "$version" ;; + --) + shift + break ;; + -*) + echo "$0: invalid option: $arg" >&2 + exit 1 ;; + *) + break ;; + esac +done + +test $# -eq 2 || { echo "$0: $usage" >&2; exit 1; } + +if test -r "$2" && $cmpprog -- "$1" "$2" >/dev/null; then + rm -f -- "$1" +else + if mv -f -- "$1" "$2"; then :; else + # Ignore failure due to a concurrent move-if-change. + test -r "$2" && $cmpprog -- "$1" "$2" >/dev/null && rm -f -- "$1" + fi +fi + +## Local Variables: +## eval: (add-hook 'write-file-hooks 'time-stamp) +## time-stamp-start: "VERSION='" +## time-stamp-format: "%:y-%02m-%02d %02H:%02M" +## time-stamp-time-zone: "UTC" +## time-stamp-end: "'; # UTC" +## End: diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..c584491 --- /dev/null +++ b/configure.ac @@ -0,0 +1,147 @@ +AC_INIT(augeas, 1.14.1) +AC_CONFIG_SRCDIR([src/augeas.c]) +AC_CONFIG_AUX_DIR([build/ac-aux]) +AM_CONFIG_HEADER([config.h]) +AM_INIT_AUTOMAKE([-Wno-portability color-tests parallel-tests]) +AM_SILENT_RULES([yes]) # make --enable-silent-rules the default. + + +dnl Check for NaturalDocs +AC_PATH_PROGS([ND_PROG], [naturaldocs NaturalDocs], missing) +AM_CONDITIONAL([ND_ENABLED], [test "x$ND_PROG" != "xmissing"]) + +dnl NaturalDocs output format, defaults to HTML +ND_FORMAT=HTML +AC_ARG_WITH([naturaldocs-output], + [AS_HELP_STRING([--with-naturaldocs-output=FORMAT], + [format of NaturalDocs output (possible values: HTML/FramedHTML, default: HTML)])], + [ + if test "x$ND_PROG" = "xmissing"; then + AC_MSG_ERROR([NaturalDocs was not found on your path; there's no point in setting the output format]) + fi + case $withval in + HTML|FramedHTML) + ND_FORMAT=$withval + ;; + *) + AC_MSG_ERROR($withval is not a supported output format for NaturalDocs) + ;; + esac + ]) +AC_SUBST(ND_FORMAT) + + +dnl Check for pdflatex +PDFDOCS="" +AC_ARG_WITH([pdfdocs], + [AS_HELP_STRING([--with-pdfdocs], + [whether to use pdflatex to build PDF docs])], + [AC_PATH_PROG(PDFLATEX, pdflatex, no) + if test "x$PDFLATEX" = "xno"; then + AC_MSG_ERROR(You asked to use PDFLatex but it could not be found) + else + PDFDOCS="pdfdocs" + fi + ]) +AC_SUBST(PDFLATEX) +AC_SUBST(PDFDOCS) + +dnl Support for memory tests with failmalloc +AC_ARG_WITH([failmalloc], + [AS_HELP_STRING([--with-failmalloc=FAILMALLOC], + [enable failmalloc test targets and use the failmalloc library FAILMALLOC])], + [AC_SUBST([LIBFAILMALLOC], ["$with_failmalloc"])], + [with_failmalloc=no]) + +AM_CONDITIONAL([WITH_FAILMALLOC], [test x$with_failmalloc != xno]) + +dnl --enable-debug=(yes|no) +AC_ARG_ENABLE([debug], + [AC_HELP_STRING([--enable-debug=no/yes], + [enable debugging output])],[],[enable_debug=yes]) +AM_CONDITIONAL([ENABLE_DEBUG], test x"$enable_debug" = x"yes") +if test x"$enable_debug" = x"yes"; then + AC_DEFINE([ENABLE_DEBUG], [1], [whether debugging is enabled]) +fi + +dnl Version info in libtool's notation +AC_SUBST([LIBAUGEAS_VERSION_INFO], [25:0:25]) +AC_SUBST([LIBFA_VERSION_INFO], [6:3:5]) + +AC_GNU_SOURCE + +AC_PROG_CC +gl_EARLY +AC_SYS_LARGEFILE + +dnl gl_INIT uses m4_foreach_w, yet that is not defined in autoconf-2.59. +dnl In order to accommodate developers with such old tools, here's a +dnl replacement definition. +m4_ifndef([m4_foreach_w], + [m4_define([m4_foreach_w], + [m4_foreach([$1], m4_split(m4_normalize([$2]), [ ]), [$3])])]) + +AC_PROG_LIBTOOL +AC_PROG_YACC +AC_PROG_LEX + +AUGEAS_COMPILE_WARNINGS(maximum) + +## Compiler flags to be used everywhere +AUGEAS_CFLAGS=-std=gnu99 +AC_SUBST(AUGEAS_CFLAGS) + +AUGEAS_CHECK_READLINE +AC_CHECK_FUNCS([open_memstream uselocale]) + +AC_MSG_CHECKING([how to pass version script to the linker ($LD)]) +VERSION_SCRIPT_FLAGS=none +if $LD --help 2>&1 | grep "version-script" >/dev/null 2>/dev/null; then + VERSION_SCRIPT_FLAGS=-Wl,--version-script= + # Solaris needs gnu-version-script-compat to use version-script + if test x"$host_os" = x"solaris2.11"; then + VERSION_SCRIPT_FLAGS="-z gnu-version-script-compat,${VERSION_SCRIPT_FLAGS}" + fi +elif $LD --help 2>&1 | grep "M mapfile" >/dev/null 2>/dev/null; then + VERSION_SCRIPT_FLAGS="-Wl,-M -Wl," +fi +AC_MSG_RESULT([$VERSION_SCRIPT_FLAGS]) +AC_SUBST(VERSION_SCRIPT_FLAGS) +AM_CONDITIONAL([USE_VERSION_SCRIPT], [test "$VERSION_SCRIPT_FLAGS" != none]) + +gl_INIT + +dnl Should we run the gnulib tests? +AC_MSG_CHECKING([if we should run the GNUlib tests]) +AC_ARG_ENABLE([gnulib-tests], + [AS_HELP_STRING([--disable-gnulib-tests], + [disable running GNU Portability library tests @<:@default=yes@:>@])], + [ENABLE_GNULIB_TESTS="$enableval"], + [ENABLE_GNULIB_TESTS=yes]) +AM_CONDITIONAL([ENABLE_GNULIB_TESTS],[test "x$ENABLE_GNULIB_TESTS" = "xyes"]) +AC_MSG_RESULT([$ENABLE_GNULIB_TESTS]) + +dnl set PC_SELINUX for use by augeas.pc.in +PC_SELINUX=$(echo $LIB_SELINUX | sed -e 's/-l/lib/') +AC_SUBST([PC_SELINUX]) + +PKG_PROG_PKG_CONFIG +PKG_CHECK_MODULES([LIBXML], [libxml-2.0]) + +AC_CHECK_FUNCS([strerror_r fsync]) + +AC_OUTPUT(Makefile \ + gnulib/lib/Makefile \ + gnulib/tests/Makefile \ + src/Makefile \ + man/Makefile \ + tests/Makefile \ + examples/Makefile \ + doc/Makefile \ + doc/naturaldocs/Makefile \ + augeas.pc augeas.spec) + +# Bash completion ... +PKG_CHECK_VAR(bashcompdir, [bash-completion], [completionsdir], , + bashcompdir="${sysconfdir}/bash_completion.d") +AC_SUBST(bashcompdir) diff --git a/doc/.gitignore b/doc/.gitignore deleted file mode 100644 index 8d6623a..0000000 --- a/doc/.gitignore +++ /dev/null @@ -1,24 +0,0 @@ -gnulib.aux -gnulib.cn -gnulib.cp -gnulib.cps -gnulib.dvi -gnulib.fn -gnulib.ky -gnulib.log -gnulib.pg -gnulib.toc -gnulib.tp -gnulib.vr -gnulib.vrs -gnulib.info -gnulib.info-1 -gnulib.info-2 -gnulib.info-3 -gnulib.info-4 -gnulib.info-5 -gnulib.info-6 -gnulib.html -gnulib.pdf -regex.info -updated-stamp diff --git a/doc/Makefile.am b/doc/Makefile.am new file mode 100644 index 0000000..b43f97a --- /dev/null +++ b/doc/Makefile.am @@ -0,0 +1,19 @@ + +SUBDIRS = naturaldocs + +EXTRA_DIST = lenses.tex unambig.tex syntax/augeas.vim ftdetect/augeas.vim bcprules.sty xpath.txt + +vimdir = $(datadir)/vim/vimfiles +nobase_vim_DATA = syntax/augeas.vim ftdetect/augeas.vim + +# PDF targets +PDFTARGETS=lenses.pdf unambig.pdf + +all-local: $(PDFDOCS) + +pdfdocs: $(PDFTARGETS) +%.pdf: %.tex + $(PDFLATEX) $< + +clean-local: + rm -f *.pdf *.aux *.log diff --git a/doc/bcprules.sty b/doc/bcprules.sty new file mode 100644 index 0000000..8da0fe2 --- /dev/null +++ b/doc/bcprules.sty @@ -0,0 +1,317 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%% %%% +%%% BCP's latex tricks for typesetting inference rules %%% +%%% %%% +%%% Version 1.4 %%% +%%% %%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +%%% +%%% This package supports two styles of rules: named and unnamed. +%%% Unnamed rules are centered on the page. Named rules are set so +%%% that a series of them will have the rules centered in a vertical +%%% column taking most of the page and the labels right-justified. +%%% When a label would overlap its rule, the label is moved down. +%%% +%%% The width of the column of labels can be varied using a command of the +%%% form +%%% +%%% \typicallabel{T-Arrow-I} +%%% +%%% The default setting is: +%%% +%%% \typicallabel{} +%%% +%%% In other words, the column of rules takes up the whole width of +%%% the page: rules are centered on the centerline of the text, and no +%%% extra space is left for the labels. +%%% +%%% The minimum distance between a rule and its label can be altered by a +%%% command of the form +%%% +%%% \setlength{\labelminsep}{0.5em} +%%% +%%% (This is the default value.) +%%% +%%% Examples: +%%% +%%% An axiom with a label in the right-hand column: +%%% +%%% \infax[The name]{x - x = 0} +%%% +%%% An inference rule with a name: +%%% +%%% \infrule[Another name] +%%% {\mbox{false}} +%%% {x - x = 1} +%%% +%%% A rule with multiple premises on the same line: +%%% +%%% \infrule[Wide premises] +%%% {x > 0 \andalso y > 0 \andalso z > 0} +%%% {x + y + z > 0} +%%% +%%% A rule with several lines of premises: +%%% +%%% \infrule[Long premises] +%%% {x > 0 \\ y > 0 \\ z > 0} +%%% {x + y + z > 0} +%%% +%%% A rule without a name, but centered on the same vertical line as rules +%%% and axioms with names: +%%% +%%% \infrule[] +%%% {x - y = 5} +%%% {y - x = -5} +%%% +%%% A rule without a name, centered on the page: +%%% +%%% \infrule +%%% {x = 5} +%%% {x - 1 > 0} +%%% +%%% +%%% Setting the flag \indexrulestrue causes an index entry to be +%%% generated for each named rule. +%%% +%%% Setting the flag \suppressrulenamestrue causes the names of all rules +%%% to be left blank +%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +%%% A switch controlling the sizes of rule names +\newif\ifsmallrulenames \smallrulenamesfalse +\newcommand{\smallrulenames}{\smallrulenamestrue} +\newcommand{\choosernsize}[2]{\ifsmallrulenames#1\else#2\fi} + +%%% The font for setting inference rule names +\newcommand{\rn}[1]{% + \ifmmode + \mathchoice + {\mbox{\choosernsize{\small}{}\sc #1}} + {\mbox{\choosernsize{\small}{}\sc #1}} + {\mbox{\choosernsize{\tiny}{\small}\sc #1}} + {\mbox{\choosernsize{\tiny}{\tiny}\uppercase{#1}}}% + \else + \hbox{\choosernsize{\small}{}\sc #1}% + \fi} + +\newif\ifsuppressrulenames +\suppressrulenamesfalse + +\newif\ifbcprulessavespace +\bcprulessavespacefalse + +\newif\ifbcprulestwocol +\bcprulestwocolfalse + +%%% How to display a rule's name to the right of the rule +\newcommand{\inflabel}[1]{% + \ifsuppressrulenames\else + \def\lab{#1}% + \ifx\lab\empty + \relax + \else + (\rn{\lab})% + \fi\fi +} + +%%% Amount of extra space to add before and after a rule +\newlength{\afterruleskip} +\setlength{\afterruleskip}{\bigskipamount} + +%%% Minimum distance between a rule and its label +\newlength{\labelminsep} +\setlength{\labelminsep}{0.2em} + +%%% The ``typical'' width of the column of labels: labels are allowed +%%% to project further to the left if necessary; the rules will be +%%% centered in a column of width \linewidth - \labelcolwidth +\newdimen\labelcolwidth + +%%% Set the label column width by providing a ``typical'' label -- +%%% i.e. a label of average length +\newcommand{\typicallabel}[1]{ + \setbox \@tempboxa \hbox{\inflabel{#1}} + \labelcolwidth \wd\@tempboxa + } +\typicallabel{} + +%%% A flag controlling generation of index entries +\newif \ifindexrules \indexrulesfalse + +%%% Allocate some temporary registers +\newbox\@labelbox +\newbox\rulebox +\newdimen\ruledim +\newdimen\labeldim + +%%% Put a rule and its label on the same line if this can be done +%%% without overlapping them; otherwise, put the label on the next +%%% line. Put a small amount of vertical space above and below. +\newcommand{\layoutruleverbose}[2]% + {\unvbox\voidb@x % to make sure we're in vmode + \addvspace{\afterruleskip}% + + \setbox \rulebox \hbox{$\displaystyle #2$} + + \setbox \@labelbox \hbox{#1} + \ruledim \wd \rulebox + \labeldim \wd \@labelbox + + %%% Will it all fit comfortably on one line? + \@tempdima \linewidth + \advance \@tempdima -\labelcolwidth + \ifdim \@tempdima < \ruledim + \@tempdima \ruledim + \else + \advance \@tempdima by \ruledim + \divide \@tempdima by 2 + \fi + \advance \@tempdima by \labelminsep + \advance \@tempdima by \labeldim + \ifdim \@tempdima < \linewidth + % Yes, everything fits on a line + \@tempdima \linewidth + \advance \@tempdima -\labelcolwidth + \hbox to \linewidth{% + \hbox to \@tempdima{% + \hfil + \box\rulebox + \hfil}% + \hfill + \hbox to 0pt{\hss\box\@labelbox}% + }% + \else + % + % Will it all fit _UN_comfortably on one line? + \@tempdima 0pt + \advance \@tempdima by \ruledim + \advance \@tempdima by \labelminsep + \advance \@tempdima by \labeldim + \ifdim \@tempdima < \linewidth + % Yes, everything fits, but not centered + \hbox to \linewidth{% + \hfil + \box\rulebox + \hskip \labelminsep + \box\@labelbox}% + \else + % + % Better put the label on the next line + \@tempdima \linewidth + \advance \@tempdima -\labelcolwidth + \hbox to \linewidth{% + \hbox to \@tempdima{% + \hfil + \box\rulebox + \hfil} + \hfil}% + \penalty10000 + \hbox to \linewidth{% + \hfil + \box\@labelbox}% + \fi\fi + + \addvspace{\afterruleskip}% + \@doendpe % use LaTeX's trick of inhibiting paragraph indent for + % text immediately following a rule + \ignorespaces + } + +% Simplified form for when there is no label +\newcommand{\layoutrulenolabel}[1]% + {\unvbox\voidb@x % to make sure we're in vmode + \addvspace{\afterruleskip}% + + \setbox \rulebox \hbox{$\displaystyle #1$} + + \@tempdima \linewidth + \advance \@tempdima -\labelcolwidth + \hbox to \@tempdima{% + \hfil + \box\rulebox + \hfil}% + + \addvspace{\afterruleskip}% + \@doendpe % use LaTeX's trick of inhibiting paragraph indent for + % text immediately following a rule + \ignorespaces + } + +% Alternate form, for when we need to save space +%\newcommand{\layoutruleterse}[2]% +% {\noindent +% \parbox[b]{0.5\linewidth}{\layoutruleverbose{#1}{#2}}} + +\newcommand{\layoutruleterse}[2]% + {\setbox \rulebox \hbox{$\displaystyle #2$} + \noindent + \parbox[b]{0.5\linewidth} + {\vspace*{0.4em} \hfill\box\rulebox\hfill~} + } + +%%% Select low-level layout driver based on \bcprulessavespace flag +\newcommand{\layoutrule}[2]{% + \ifbcprulessavespace + \layoutruleterse{#1}{#2} + \else + \layoutruleverbose{#1}{#2} + \fi +} + +%%% Highlighting for new versions of rules +\newif\ifnewrule \newrulefalse +\newcommand{\setrulebody}[1]{% + \ifnewrule + \@ifundefined{HIGHLIGHT}{% + \fbox{\ensuremath{#1}}% + }{% + \HIGHLIGHT{#1}}% + \else + #1 + \fi +} + +%%% Commands for setting axioms and rules +\newcommand{\typesetax}[1]{% + \setrulebody{% + \begin{array}{@{}c@{}}#1\end{array}}} +\newcommand{\typesetrule}[2]{% + \setrulebody{% + \frac{\begin{array}{@{}c@{}}#1\end{array}}% + {\begin{array}{@{}c@{}}#2\end{array}}}} + +%%% Indexing +\newcommand{\ruleindexprefix}[1]{% + \gdef\ruleindexprefixstring{#1}} +\ruleindexprefix{} +\newcommand{\maybeindex}[1]{% + \ifindexrules + \index{\ruleindexprefixstring#1@\rn{#1}}% + \fi} + +%%% Setting axioms, with or without names +\def\infax{\@ifnextchar[{\@infaxy}{\@infaxx}} +\def\@infaxx#1{% + \ifbcprulessavespace $\typesetax{#1}$% + \else \layoutrulenolabel{\typesetax{#1}}% + \fi\newrulefalse\ignorespaces} +\def\@infaxy[#1]{\maybeindex{#1}\@infax{\inflabel{#1}}} +\def\@infax#1#2{\layoutrule{#1}{\typesetax{#2}}\ignorespaces} + +%%% Setting rules, with or without names +\def\infrule{\@ifnextchar[{\@infruley}{\@infrulex}} +\def\@infrulex#1#2{% + \ifbcprulessavespace $\typesetrule{#1}{#2}$% + \else \layoutrulenolabel{\typesetrule{#1}{#2}}% + \fi\newrulefalse\ignorespaces} +\def\@infruley[#1]{\maybeindex{#1}\@infrule{\inflabel{#1}}} +\def\@infrule#1#2#3{\layoutrule{#1}{\typesetrule{#2}{#3}}\ignorespaces} + +%%% Miscellaneous helpful definitions +\newcommand{\andalso}{\quad\quad} + +% Abbreviations +\newcommand{\infabbrev}[2]{\infax{#1 \quad\eqdef\quad #2}} + diff --git a/doc/cutest-license.txt b/doc/cutest-license.txt new file mode 100644 index 0000000..631e6ee --- /dev/null +++ b/doc/cutest-license.txt @@ -0,0 +1,46 @@ +The files tests/cutest.[ch] contain a modified version of CuTest, written +by Asim Jalis. The original code can be found at +http://sourceforge.net/projects/cutest/ + +What follows is the license under which CuTest is distributed, as retrieved +on 2008-02-29 from +http://cutest.cvs.sourceforge.net/cutest/cutest/license.txt?revision=1.3 + +NOTE + +The license is based on the zlib/libpng license. For more details see +http://www.opensource.org/licenses/zlib-license.html. The intent of the +license is to: + +- keep the license as simple as possible +- encourage the use of CuTest in both free and commercial applications + and libraries +- keep the source code together +- give credit to the CuTest contributors for their work + +If you ship CuTest in source form with your source distribution, the +following license document must be included with it in unaltered form. +If you find CuTest useful we would like to hear about it. + +LICENSE + +Copyright (c) 2003 Asim Jalis + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not +claim that you wrote the original software. If you use this software in +a product, an acknowledgment in the product documentation would be +appreciated but is not required. + +2. Altered source versions must be plainly marked as such, and must not +be misrepresented as being the original software. + +3. This notice may not be removed or altered from any source +distribution. diff --git a/doc/etc.txt b/doc/etc.txt new file mode 100644 index 0000000..37ed97a --- /dev/null +++ b/doc/etc.txt @@ -0,0 +1,262 @@ +/etc/ +|-- DIR_COLORS +|-- DIR_COLORS.xterm + records: line, + format: kw ' '+ \value, fixed kw + user extensions + comments: #.*$ +|-- acpi +| |-- actions/* +| `-- events/* + shell scripts +|-- adjtime + ??? +|-- aliases + records: line + format: alias ':' redir + comments: #.*$ +|-- anacrontab + format: crontab +|-- apt + ??? +|-- at.deny + ??? +|-- auto.master + records: line + format: key [ options ] location + comments: #.*$ +|-- auto.misc + automounter map +|-- autofs_ldap_auth.conf + XML +|-- avahi + ??? some XML, some shell scripts +|-- blkid +| |-- blkid.tab + XML +|-- cron.d/* + crontab with users +|-- cron.daily + shell scripts +|-- cron.deny + ??? +|-- cron.hourly + shell scripts +|-- cron.monthly + shell scripts +|-- cron.weekly + shell scripts +|-- crontab + crontab with users +|-- cups + custom +|-- dbus-1 + XML +|-- default + sysconfig +|-- depmod.d/* + records: line, + format: kw ' '+ \value, fixed kw + user extensions + comments: #.*$ +|-- dev.d + ??? +|-- diskdump + ??? +|-- dnsmasq.conf + records: line + kw [ '=' value ] + comments: #.*$ +|-- dnsmasq.d/* + ??? +|-- environment + ??? +|-- exports + records: line w/ continuation + export_point ( ' ' client [ '(' option ( ',' option ) * ')' ] ) + comments: #.*$ +|-- fedora-release + freeform +|-- fstab + records: line + device ' \t'+ mount_point ' \t'+ fs [ option ( ',' option ) * ] freq passno + comments: ^#.*$ +|-- group + POSIX +|-- grub.conf -> ../boot/grub/grub.conf + records: line + format: kw ' '+ value + comments: #.*$ +|-- gshadow +|-- hal + ??? +|-- host.conf +|-- hosts + records: line + format: ip_addr ' \t'+ (hostname [ ' \t'+ alias ] * ) + comments: #.*$ +|-- hosts.allow +|-- hosts.deny + ??? + records: line w/ continuation, ordered + format: daemon_list ':' client_list [ ':' shell_command ] + comments: #.*$ +|-- htdig +| `-- htdig.conf.rpmsave +|-- httpd + custom +|-- idmapd.conf + ini-style +|-- initlog.conf + records: line + format: kw ' '+ value + comments: ^#.*$ +|-- inittab + records: line + format: id ':' runlevels ':' action ':' process ':' + comments: ^#.*$ +|-- iscsi + ??? +|-- issue +|-- issue.net + freeform +|-- jwhois.conf + custom (libconfuse ?) +|-- kdump.conf + ??? +|-- koji.conf + inistyle +|-- krb5.conf + inistyle wit { } subsections +|-- ld.so.conf + ??? +|-- ldap.conf + records: line + format: kw ' '+ value + comments: #.*$ +|-- libaudit.conf + records: line + format: kw ' '+ '=' ' '+ value + comments: #.*$ +|-- libuser.conf + inistyle +|-- libvirt + XML +|-- localtime + opaque +|-- login.defs + records: line + format: kw ' '+ value + comments: #.*$ +|-- logrotate.conf +|-- logrotate.d + custom +|-- logwatch + ??? +|-- mail.rc + custom +|-- mailcap + records: line + format: kw ' '+ '=' ' '+ value + comments: #.*$ +|-- makedev.d + ??? +|-- man.config + records: line, + format: kw ' '+ \value, fixed kw + user extensions + comments: #.*$ +|-- mime.types +|-- minicom.users +|-- mke2fs.conf + custom, like krb5.conf +|-- mock/*.cfg + python script +|-- modprobe.conf +|-- modprobe.d/* + custom +|-- multipath.conf + custom, libconfuse ? +|-- netconfig + line records +|-- nscd.conf + custom +|-- nsswitch.conf +|-- ntp + custom +|-- ntp.conf + custom +|-- openldap + ??? +|-- opt +|-- pam.d + custom +|-- pam_pkcs11 +| |-- pam_pkcs11.conf +| `-- pkcs11_eventmgr.conf + libconfuse ? +|-- passwd + Posix +|-- postfix + ??? +|-- prelink.conf + custom +|-- puppet +| |-- puppet.conf + Ini-style +|-- quotagrpadmins + records: line + format: alias ':' redir + comments: #.*$ +|-- quotatab +|-- racoon +| `-- racoon.conf + custom +|-- readahead.conf + sysconfig +|-- readahead.d + path lists +|-- resolv.conf + custom +|-- rpm + random rpm macros (kw ' ' value style) +|-- rwtab +|-- rwtab.d +|-- sasl2 +|-- scsi_id.config +|-- securetty + list of ttys +|-- security + ??? +|-- selinux + ??? +|-- sensors.conf + custom +|-- sestatus.conf + inistyle +|-- shadow + POSIX +|-- shells + list of shells +|-- smartd.conf + custom +|-- ssh + key/value pairs +|-- statetab +|-- statetab.d + list of paths +|-- sudoers + custom +|-- sysconfig + sysconfig +|-- sysctl.conf + sysconfig, with special meaning for keys +|-- syslog.conf + key/value, space separated +|-- udev + custom +|-- updatedb.conf + sysconfig +|-- xinetd.d/* + custom +|-- yum +|-- yum.conf +`-- yum.repos.d/* + inistyle with includes diff --git a/doc/examples.txt b/doc/examples.txt new file mode 100644 index 0000000..1407d2f --- /dev/null +++ b/doc/examples.txt @@ -0,0 +1,66 @@ +These examples show what hopefully will be possible with augeas one day. +For now, they are more a guide in writing the public API and augtool. + +1) Change default runlevel + + p = match("/system/config/inittab/*/action", "initdefault") + set( join(dirname(p), "runlevels"), "3") + + [works] + +2) yum + + - enable a repo + set("/system/config/yum/myrepo/enabled", "1") + + - turn off mirrorlist and set baseurl + rm("/system/config/yum/myrepo/mirrorlist") + set("/system/config/yum/myrepo/baseurl", "http://yum.example.com/repo") + + [not implemented, needs ini scanner] + +3) add entry to hosts + set("/system/config/hosts/i0/ipaddr", "192.168.1.1") + set("/system/config/hosts/i0/canonical", "pigiron.example.com") + set("/system/config/hosts/i0/aliases", "pigiron pigiron.example") + + [works] + +4) add to fstab [tree structure will probably look different] + p = "/system/config/fstab" + rm (p + "/dev.vg00.local/local") + set (p + "/dev.vg00.local/local/device", "/dev/vg00/local") + set (p + "/dev.vg00.local/local/mountpoint", "/local") + set (p + "/dev.vg00.local/local/fs", "ext3") + set (p + "/dev.vg00.local/local/options", "defaults") + set (p + "/dev.vg00.local/local/freq", "1") + set (p + "/dev.vg00.local/local/pass", "2") + + [requires fstab provider, easy, based on record scanner] + +5) Mount /dev/sda1 on /exports/foo rather than /foo + p = "/system/config/fstab" + move entries from p + "/dev.sda1/foo" to p + "/dev.sda1/exports.foo" + set(p + "/dev.sda1/exports.foo/mountpoint", "/foo") + + [same as above] + +6) Change gateway on all static interfaces + for p in find("/system/config/sysconfig/interfaces/**/gateway", "192.168.0.1") + set(p, "192.168.0.254") + + [requires key/value scanner] + +7) Setup a static interface from scratch + p = "/system/config/sysconfig/interfaces/lo" + rm (p) + set (p + "/device", "lo") + set (p + "/ipaddr", "127.0.0.1") + ... + + [requires key/value scanner] + +8) Turn on SELinux + set ("/system/config/sysconfig/selinux", "enforcing") + + [requires key/value scanner] diff --git a/doc/ftdetect/augeas.vim b/doc/ftdetect/augeas.vim new file mode 100644 index 0000000..7120691 --- /dev/null +++ b/doc/ftdetect/augeas.vim @@ -0,0 +1 @@ +au BufNewFile,BufRead *.aug set filetype=augeas diff --git a/doc/lenses.tex b/doc/lenses.tex new file mode 100644 index 0000000..d00493d --- /dev/null +++ b/doc/lenses.tex @@ -0,0 +1,437 @@ +\documentclass[12pt,fleqn]{amsart} + +\usepackage{amsmath} +\usepackage{xspace} +\usepackage{amssymb} +\usepackage{bcprules} + +\newcommand{\ensmath}[1]{\ensuremath{#1}\xspace} + +\newcommand{\opnam}[1]{\ensmath{\operatorname{\mathit{#1}}}} +\newcommand{\nget}{\opnam{get}} +\newcommand{\nput}{\opnam{put}} +\newcommand{\nparse}{\opnam{parse}} +\newcommand{\ncreate}{\opnam{create}} +\newcommand{\nkey}{\opnam{key}} +\newcommand{\lget}[1]{\opnam{get}{#1}} +\newcommand{\lparse}[1]{\nparse{#1}} +\newcommand{\lput}[2]{\opnam{put}{#1}\,{(#2)}} +\newcommand{\lcreate}[2]{\opnam{create}{#1}\,{(#2)}} +\newcommand{\lkey}[1]{\nkey{#1}} + +\newcommand{\suff}{\ensmath{\operatorname{suff}}} +\newcommand{\pref}{\ensmath{\operatorname{pref}}} +\newcommand{\lenstype}[3][K]{\ensmath{{#2}\stackrel{#1}{\Longleftrightarrow}{#3}}} +\newcommand{\tree}[1]{\ensmath{[#1]}} +\newcommand{\niltree}{\ensmath{[]}} +\newcommand{\nildict}{\ensmath{\{\!\}}} +\newcommand{\Regexp}{\ensmath{\mathcal R}} +\newcommand{\reglang}[1]{\ensmath{[\![{#1}]\!]}} +\newcommand{\lens}[1]{\opnam{#1}} +\newcommand{\eps}{\ensmath{\epsilon}} +\newcommand{\conc}[2]{\ensmath{#1\cdot #2}} +\newcommand{\uaconc}[2]{\ensmath{#1\cdot^{!} #2}} +\newcommand{\xconc}[2]{\ensmath{#1\odot #2}} +\newcommand{\dconc}[2]{\ensmath{#1\oplus #2}} +\newcommand{\alt}[2]{\ensmath{#1\,|\,#2}} +\newcommand{\cstar}[1]{\ensmath{#1^*}} +\newcommand{\uastar}[1]{\ensmath{#1^{!*}}} +\newcommand{\Trees}{\ensmath{\mathcal T}} +\newcommand{\Words}{\ensmath{\Sigma^*_{\rhd}}} +\newcommand{\tmap}[2]{\ensmath{#1\mapsto #2}} +\newcommand{\tmapv}[3]{\ensmath{#1 = #2\mapsto #3}} +\newcommand{\tmaptt}[2]{\ensmath{{\mathtt #1}\mapsto {\mathtt #2}}} +\newcommand{\dom}[1]{\ensmath{\mathrm{dom}(#1)}} +\newcommand{\List}[1]{\ensmath{\mathtt{List(#1)}}} +\newcommand{\redigits}{\ensmath{\mathtt{D}}} +\newcommand{\Skel}{\ensmath{\mathcal{S}}} +\newcommand{\Powerset}{\ensmath{\mathcal{P}}} +\newcommand{\Keys}{\ensmath{\mathcal{K}}} +\newcommand{\key}[1]{\ensmath{\kappa(#1)}} +\newcommand{\lto}{\ensmath{\longrightarrow}} +\newcommand{\Dictlangs}{\ensmath{\List{\Powerset(\Skel)}}} +\newcommand{\lookup}{\opnam{lookup}} + +\newtheorem{theorem}{Theorem} +\newtheorem{lemma}[theorem]{Lemma} +{\theoremstyle{definition} + \newtheorem{defn}{Definition} + \newtheorem*{remark}{Remark} + \newtheorem*{example}{Example}} + +\begin{document} + +\section{Trees} +We use trees as the abstract view for our lenses; since the concrete data +structure, strings, is ordered, and to support some properties of lenses +that seem sensible intuitively, the trees differ from garden-variety trees +in a number of ways: +\begin{itemize} + \item a tree node consists of three pieces of data: a \emph{label}, a + \emph{value} and an ordered list of \emph{children}, each of them a + tree by themselves. + \item the labels for tree nodes are either words not containing a slash + {\tt /} or the special symbol $\rhd$; in the implementation $\rhd$ + corresponds to {\tt NULL}. The latter is used to indicate + that an entry in the tree corresponds to text that was deleted. + \item the children of a tree node form a list of subtrees, i.e. are + ordered. In addition, several subtrees in such a list may use the same + label. This makes it possible to accommodate concrete files where + entries that are logically connected are stored scattered between + unrelated entries like the {\tt AcceptEnv} entries in {\tt + sshd\_config}. +\end{itemize} + +We write $\tmapv{k}{v}{t}$ for a tree node with label $k$, value $v$ and +children $t$. If it is clear from the context, or unimportant, $v$ will +often be omitted. + +\subsection{Tree labels} +We take the tree labels from the set of \emph{path components} $\Keys = +(\Sigma \setminus \{ {\mathtt /} \})^+ \cup \{ \rhd \}$, that is, +a tree label is any word not containing a backslash or the special symbol +$\rhd$. For tree labels, we define a partial concatenation operator +$\odot$, as +\begin{equation*} + \xconc{k_1}{k_2} = \begin{cases} + k_1 & \text{if } k_2 = \rhd\\ + k_2 & \text{if } k_1 = \rhd\\ + \text{undefined} & \text{otherwise} + \end{cases} +\end{equation*} + +Defining tree labels in this way (1) guarantees that there is a +one--to--one correspondence between a tree label and the word it came from +in the concrete text and (2) avoids any pain in splitting tree labels in +the \nput direction. + +\subsection{Trees} +The set of \emph{ordered trees} \Trees over $\Words$ is recursively +defined as +\begin{itemize} +\item The empty tree $\rhd$ +\item For any words $k\in\Keys$, $v\in\Words$ and any tree $t\in\Trees$, + $\tree{\tmapv{k}{v}{t}}$ is in \Trees +\item For any $n$ and trees $\tree{\tmapv{k_i}{v_i}{t_i}} \in Trees$, + the list + $[\tmapv{k_1}{v_1}{t_1};\tmapv{k_2}{v_2}{t_2};\ldots;\tmapv{k_n}{v_n}{t_n}]$ + is in \Trees +\end{itemize} + +Note that this allows the same key to be used multiple times in a tree; for +example, $[\tmaptt{a}{x}; \tmaptt{a}{x}]$ is a valid tree and +different from $[\tmaptt{a}{x}]$. + +The domain of a tree $\dom{t}$ is the list of all its labels, i.e. an +element of $\List{\Keys}$; for a tree $t = +\tree{\tmap{k_1}{t_1};\ldots;\tmap{k_n}{t_n}}$, $\dom{t} = + [k_1;\ldots;k_n].$ + +%% Why ? +%A tree $t$ can also be viewed as a total map from \Words to +%$\List{\Trees\cup\Words}$, defined as +%\begin{equation*} +% t(k) = +% \begin{cases} +% v & \text{for } t = \tree{v}\\ +% [t_1] :: t_2(k) & \text{for } t = t' :: t_2 +% \text{ and } t' = \tree{\tmap{k}{t_1}}\\ +% t_2(k) & \text{for } t = t' :: t_2 +% \text{ and } t' = \tree{\tmap{k'}{t_1}} \text{with } k\neq k' +% \end{cases} +%\end{equation*} +% +%Note that this definition implies that for a tree $t = \tree{\tmap{k}{v}}$ +%with $k,v\in\Words$, $t(k)=[v].$ For the tree $t_{\mathtt{aa}} = [\tmaptt{a}{x}; +% \tmaptt{a}{x}]$, $t_{\mathtt{aa}}(\mathtt a) = [\mathtt x; \mathtt x]$. + +The concatenation of trees $\conc{t_1}{t_2}$ is simply list concatenation. + +For sets $K\subset\Keys$ and $T\subset\Trees$, $\tree{\tmap{K}{T}}$ +denotes the set of all trees $t = \tree{\tmap{k}{t'}}$ with $k\in K$, $t' +\in T$. + +\subsection{Concatenation and iteration} +For a tree $t\in \Trees$, we define its underlying \emph{key language} +$\key{t}$ by +\begin{equation*} + \key{t} = \begin{cases} + {\tt /} & \text{if } t = \rhd \text{ or } t = \tree{\tmap{\rhd}{t_1}}\\ + k \cdot {\mathtt /} & \text{if } t = \tree{\tmap{k}{t_1}}\\ + k\cdot {\mathtt /}\cdot \key{t_2} & \text{for } t = \tree{\tmap{k}{t_1};t_2} + \end{cases} +\end{equation*} +where $\conc{k_1}{k_2}$ is normal string concatenation. The key language of +a set of trees $\key{T}$ is defined as $\{\key{t} | t \in T\}$. + +In analogy to languages, we call two tree sets $T_1, T_2 \subseteq \Trees$ +\emph{unambiguously concatenable} if the key languages $\key{T_1}$ and +$\key{T_2}$ are unambiguously concatenable. A tree set $T\in\Trees$ is +\emph{unambiguously iterable} if the underlying key language $\key{T}$ is +unambiguously iterable. + +\subsection{Public tree operations} +We need the public API to support the following operations. The set +$P\subseteq \Sigma^*$ are paths + +\begin{itemize} + \item $\opnam{lookup}(p, t): P \times \Trees \lto \Trees$ finds the tree + with path $p$ + \item $\opnam{assign}(p, v, t): P \times \Sigma^* \times \Trees \lto + \Trees$ assigns the value $v$ to the tree node $p$ + \item $\opnam{remove}(p, t): P \times \Trees \lto \Trees$ removes the + subtree denoted by $p$ + \item $\opnam{get}(p, t): P \times \Trees \lto \Sigma^*$ looks up the + value associated with $p$ + \item $\opnam{ls}(p, t): P \times \Trees \lto \List{\Trees}$ lists all + the subtrees underneath $p$ +\end{itemize} + +\section{Lenses} + +Lenses map between strings in the regular language $C$ and trees +$T\subseteq\Trees$. They can also produce keys from a regular language $K$; +these keys are used by the $\lens{subtree}$ lens to construct new +trees. + +A lens $l$ consists of the functions $\nget$, $\nput$, $\ncreate$, and +$\nparse$. + +Lenses here are written as $l:\lenstype[K,S,L]{C}{T}$ where $K$ and $C$ are +regular languages and $T\subseteq\Trees$. The skeletons $S\subseteq\Skel$ +and dictionary type specifications $L$ are as for Boomerang (really ??) +Intuitively, the notation says that $l$ is a lens that takes strings from +$C$ and transforms them to trees in $T$. Generally, + +\infrule{C\subseteq\Words \andalso K\subseteq\List{\Keys} + \andalso T\subseteq\Trees + \andalso S\subseteq\Skel \andalso L \in \Dictlangs} + {\lens{l} \in \lenstype[K,S,L]{C}{T}} + +\begin{align*} + \nget &\in C \lto T\\ + \nparse &\in C \lto K \times S \times D(L)\\ + \nput &\in T \lto K \times S \times D(L) \lto C \times D(L)\\ + \ncreate &\in T \lto K \times D(L) \lto C \times D(L) +\end{align*} + +\subsection{const} + +The $\lens{const} E\,t\,v$ maps words matching $E$ in the \nget direction +to a fixed tree $t$ and maps that fixed tree $t$ back in the \nput +direction. When text needs to be created from $t$, it produces the default +word $v$. + +\infrule{E\in\Regexp \andalso t\in T\andalso u\in\reglang{E} \andalso L \in \Dictlangs} + {\lens{const} E\,t\,u \in \lenstype[\rhd,\reglang{E},L]{\reglang{E}}{\{t\}}} + +\begin{align*} + \lget{c} &= t\\ + \lparse{c} &= \rhd, c, \nildict\\ + \lput{t}{k,s,d} &= s, d\\ + \lcreate{t}{k,d} &= u, d +\end{align*} + +The \lens{del} lens is syntactic sugar: $\lens{del} E\,u = \lens{const} +E\,\niltree\,u$. + +\subsection{copy} + +Copies a word into a leaf. + +\infrule{E\in\Regexp \andalso L\in\Dictlangs} + {\lens{copy}\in\lenstype[\rhd,\reglang{E},L]{\reglang{E}}{\tree{\reglang{E}}}} + +\begin{align*} + \lget{c} &= \tree{c}\\ + \lparse{c} &= \rhd, c, \nildict\\ + \lput{\tree{v}}{k,s,d} &= v, d\\ + \lcreate{\tree{v}}{k,d} &= v, d +\end{align*} + +\subsection{seq} + +Gets the next value from a sequence as the key. We assume there's a +generator $\mathtt{nextval}: \Sigma^* \to \mathbb{N}$ that returns +successive numbers on each invocation. \redigits is the regular expression +{\tt [0-9]+} that matches positive numbers. + +\infrule{w\in\Sigma^* \andalso L\in\Dictlangs \andalso n = \mathtt{nextval}(w)} + {\lens{seq} w\in\lenstype[\reglang{\redigits},\eps,L]{\eps}{\niltree}} + +\begin{align*} + \lget{\eps} &= \niltree\\ + \lparse{\eps} &= n, \eps, \nildict\\ + \lput{\niltree}{k,\eps,d} &= \eps, d\\ + \lcreate{\niltree}{k,d} &= \eps,d +\end{align*} + +\subsection{label} + +Uses a fixed tree label + +\infrule{w\in\Sigma^* \andalso L\in\Dictlangs} + {\lens{label} w\in\lenstype[w,\eps,L]{\eps}{\niltree}} + +\begin{align*} + \lget{\eps} &= \niltree\\ + \lparse{\eps} &= w,\eps,\nildict\\ + \lput{\niltree}{w,\eps,d} &= \eps,d\\ + \lcreate{\niltree}{k,d} &= \eps,d +\end{align*} + +\subsection{key} + +Uses a parsed tree label + +\infrule{E\in\Regexp \andalso L\in\Dictlangs} + {\lens{key} E\in\lenstype[\reglang{E},\eps,L]{\reglang{E}}{\niltree}} + +\begin{align*} + \lget{c} &= \niltree\\ + \lparse{c} &= c,\eps,\nildict\\ + \lput{\niltree}{c,\eps,d} &= c,d\\ + \lcreate{\niltree}{c, d} &= c,d +\end{align*} + +\subsection{subtree} + +The subtree combinator $[l]$ constructs a subtree from $l$ + +\infrule{l\in\lenstype[K,S,L]{C}{T}} + {[l]\in\lenstype[\rhd,\square,S::L]{C}{\tree{\tmap{K}{T}}}} + +\begin{align*} + \lget{c} &= \tree{\tmap{l.\lkey{c}}{l.\lget{c}}}\\ + \lparse{c} &= \rhd, \square, \{\tmap{l.\lkey{c}}{[l.\lparse{c}]}\}\\ + \lput{\tree{\tmap{k}{t}}}{k',\square,d} &= + \begin{cases} + \pi_1\left(l.\lput{t}{k,\bar{s},\bar{d}}\right),d' & \text{if } (\bar{k}, \bar{s}, \bar{d}), d' = \lookup(k, d)\\ + \pi_1\left(l.\lcreate{t}{k,\nildict}\right), d & \text{if } \lookup(k, + d) \text{ undefined} + \end{cases}\\ + \lcreate{\tree{\tmap{k}{t}}}{k',d} &= \lput{\tree{\tmap{k}{t}}}{k',\square,d} +\end{align*} + +We store a triple $(k,s,d)$ in dictionaries, but we don't use the stored +key $k$. + +\subsection{concat} + +The concat combinator $\conc{l_1}{l_2}$ joins two trees. + +\infrule{l_1\in\lenstype[K_1,S_1,L]{C_1}{T_1} + \andalso l_2\in\lenstype[K_2,S_2,L]{C_2}{T_2} + \andalso \uaconc{C_1}{C_2} + \andalso \uaconc{\key{T_1}}{\key{T_2}}} + {\conc{l_1}{l_2}\in\lenstype[\conc{K_1}{K_2},S_1\times S_2, L]{\conc{C_1}{C_2}}{\conc{T_1}{T_2}}} + +\begin{align*} + \lget{(\conc{c_1}{c_2})} &= \conc{(l_1.\lget{c_1})}{(l_2.\lget{c_2})}\\ + \lparse{\conc{c_1}{c_2}} &= \xconc{k_1}{k_2}, (s_1,s_2), \dconc{d_1}{d_2} \\ + \lput{\conc{t_1}{t_2}}{k, (s_1,s_2), d_1} &= \conc{c_1}{c_2}, d_3 \\ + & \text{where } c_i, d_{i+1} = l_i.\lput{t_i}{k, s_i, d_i} \\ + \lcreate{\conc{t_1}{t_2}}{k, d_1} &= \conc{c_1}{c_2}, d_3\\ + & \text{where } c_i, d_{i+1} = l_i.\lcreate{t_i}{k, d_i} +\end{align*} + +\subsection{union} + +The union combinator $\alt{l_1}{l_2}$ chooses. + +\infrule{l_i\in\lenstype[K_i,S_i,L]{C_i}{T_i}\text{ for } i=1,2 + \andalso C_1 \cap C_2 = \emptyset + \andalso S_1 \cap S_2 = \emptyset + \andalso \key{T_1} \cap \key{T_2} = \emptyset} + {\alt{l_1}{l_2}\in\lenstype[K_1\cup K_2, S_1\cup S_2, L]{C_1 \cup C_2}{T_1 \cup T_2}} + +\begin{align*} + \lget{c} &= + \begin{cases} + l_1.\lget{c} & \text{if } c \in C_1\\ + l_2.\lget{c} & \text{if } c \in C_2\\ + \end{cases} + \\ + \lparse{c} &= + \begin{cases} + l_1.\lparse{c} & \text{if } c \in C_1\\ + l_2.\lparse{c} & \text{if } c \in C_2\\ + \end{cases} + \\ + \lput{t}{k, s, d} &= + \begin{cases} + l_1.\lput{t}{k, s, d} & \text{if } t, s \in T_1 \times S_1 \\ + l_2.\lput{t}{k, s, d} & \text{if } t, s \in T_2 \times S_2 \\ + l_1.\lcreate{t}{k, d} & \text{if } t, s \in (T_1\setminus T_2) + \times S_2\\ + l_2.\lcreate{t}{k, d} & \text{if } t, s \in (T_2\setminus T_1) + \times S_1 + \end{cases}\\ + \lcreate{t}{k, d} &= + \begin{cases} + l_1.\lcreate{t}{k, d} & \text{if } t\in T_1\\ + l_2.\lcreate{t}{k, d} & \text{if } t\in T_2\setminus T_1 + \end{cases} +\end{align*} + +\subsection{star} + +The star combinator $\cstar{l}$ iterates. + +\infrule{l\in\lenstype{C}{T} \andalso \uastar{C} \andalso \uastar{\key{T}}} + {\cstar{l}\in\lenstype[\cstar{K}]{\cstar{C}}{\cstar{T}}} + +\begin{align*} + \lget{c_1\cdots c_n} &= (l.\lget{c_1}) \cdots (l.\lget{c_n})\\ + \lparse{c_1\cdots c_n} &= k_1\odot\ldots\odot k_n, [s_1;\ldots;s_n], + d_1\oplus\ldots\oplus d_n\\ + & \text{where } k_i,s_i,d_i = l.\lparse{c_i}\\ + \lput{t_1\cdots t_n}{k, [s_1;\cdots;s_m], d_1} &= (c_1 \cdots c_n), d_{n+1}\\ + \text{where } &c_i, d_{i+1} = + \begin{cases} + l.\lput{t_i}{k, s_i, d_i} & \text{for } 1 \leq i \leq \min(m,n)\\ + l.\lcreate{t_i}{k, d_i} & m+1 \leq i \leq n + \end{cases}\\ + \lcreate{t_1 \cdots t_n}{k, d_1} &= (c_1\cdots c_n), d_{n+1}\\ + & \text{where } c_i, d_{i+1} = l.\lcreate{t_i}{k, d_i} +\end{align*} + +Want reordering and insertion in the middle to be reflected. If +$\lget{\conc{c_1}{c_2}} = \conc{t_1}{t_2}$, want +$\lput{(\conc{t_2}{t_1})}{\conc{c_1}{c_2}} = +\conc{l.\lput{t_2}{c_2}}{l.\lput{t_1}{c_1}}$ This can only happen if the +information to be reordered is in subtrees. In particular, comment lines +need to become their own subtree, with some support from the language to +create `hidden' entries. Simplest: allow {\tt NULL} as the key for a +subtree and ignore such tree entries in the public API. + +Need to split a tree $t\in T$ into subtrees according to ?? Keeping a fake +`slot' $\rhd$ around for text that didn't produce a tree should help with +that. + +For $K^*$ to make any sense, must have $\rhd\in K$ and the application of +$(l^*).\nparse$ must return $\rhd$ for all except at most one application. + +\section{Regular expressions and languages} + +For type checking, we need to compute the following properties of regular +languages $R, R_1, R_2$ +\begin{itemize} +\item decide unambiguous concatenation $\uaconc{R_1}{R_2}$ and compute + $\conc{R_1}{R_2}$ +\item decide unambiguous iteration $\uastar{R}$ and compute $R^*$ +\item disjointness $R_1 \cap R_2 = \emptyset$ (we don't need general + intersection, though I don't know of a quicker way to decide + disjointness) +\item compute the regular language $R = \reglang{E}$ for a regular + expression $E\in\Regexp$ +\end{itemize} +\end{document} + +%% TeX-parse-self: t +%% TeX-auto-save: t + +%% Local Variables: +%% TeX-master: "lenses.tex" +%% compile-command: "pdflatex -file-line-error -halt-on-error lenses.tex" +%% End: diff --git a/doc/naturaldocs/Makefile.am b/doc/naturaldocs/Makefile.am new file mode 100644 index 0000000..342f308 --- /dev/null +++ b/doc/naturaldocs/Makefile.am @@ -0,0 +1,54 @@ + +EXTRA_DIST = $(wildcard conf/Augeas.css conf/c_api/*.txt) \ + $(wildcard conf/lenses/*.txt) \ + Modules/NaturalDocs/Languages/Augeas.pm + +ND_CONF=$(srcdir)/conf +ND_OUTPUT=output +ND_STYLE=../Augeas + +ND_PERL5LIB=$(abs_srcdir)/Modules +ND_PERL5OPT='-MNaturalDocs::Languages::Augeas' + +if ND_ENABLED +all-local: NaturalDocs +endif + +NaturalDocs: NDLenses NDCAPI + +env: + echo LIB $(ND_PERL5LIB) + echo OPT $(ND_PERL5OPT) + test -n "$$PERL5OPT" && ND_PERL5OPT="$(ND_PERL5OPT) $$PERL5OPT" || ND_PERL5OPT=$(ND_PERL5OPT); \ + test -n "$$PERL5LIB" && ND_PERL5LIB="$(ND_PERL5LIB):$$PERL5LIB" || ND_PERL5LIB=$(ND_PERL5LIB); \ + PERL5LIB=$$ND_PERL5LIB PERL5OPT=$$ND_PERL5OPT env | grep PERL + +NDLenses: NDConf + @mkdir -p $(ND_OUTPUT)/lenses + @(echo "Format lens documentation"; \ + test -n "$$PERL5OPT" && ND_PERL5OPT="$(ND_PERL5OPT) $$PERL5OPT" || ND_PERL5OPT=$(ND_PERL5OPT); \ + test -n "$$PERL5LIB" && ND_PERL5LIB="$(ND_PERL5LIB):$$PERL5LIB" || ND_PERL5LIB=$(ND_PERL5LIB); \ + PERL5LIB=$$ND_PERL5LIB PERL5OPT=$$ND_PERL5OPT \ + $(ND_PROG) -p conf/lenses \ + -i $(top_srcdir)/lenses \ + -o $(ND_FORMAT) $(ND_OUTPUT)/lenses \ + -s $(ND_STYLE)) + +NDCAPI: NDConf + @mkdir -p $(ND_OUTPUT)/c_api + @(echo "Format C API documentation"; \ + test -n "$$PERL5OPT" && ND_PERL5OPT="$(ND_PERL5OPT) $$PERL5OPT" || ND_PERL5OPT=$(ND_PERL5OPT); \ + test -n "$$PERL5LIB" && ND_PERL5LIB="$(ND_PERL5LIB):$$PERL5LIB" || ND_PERL5LIB=$(ND_PERL5LIB); \ + $(ND_PROG) -p conf/c_api \ + -i $(top_srcdir)/src \ + -o $(ND_FORMAT) $(ND_OUTPUT)/c_api \ + -s $(ND_STYLE)) + +NDConf: + @(if test ! -d $(ND_CONF); then \ + cp -pr $(ND_CONF) conf; \ + fi) + +clean-local: + rm -rf output conf/Data + rm -rf $(ND_CONF)/c_api/Data $(ND_CONF)/lenses/Data diff --git a/doc/naturaldocs/Modules/NaturalDocs/Languages/Augeas.pm b/doc/naturaldocs/Modules/NaturalDocs/Languages/Augeas.pm new file mode 100644 index 0000000..c69143f --- /dev/null +++ b/doc/naturaldocs/Modules/NaturalDocs/Languages/Augeas.pm @@ -0,0 +1,103 @@ +############################################################################### +# +# Class: NaturalDocs::Languages::Augeas +# +############################################################################### +# +# A subclass to handle the language variations of Tcl. +# +############################################################################### + +# This file is part of Natural Docs, which is Copyright (C) 2003-2008 Greg Valure +# Natural Docs is licensed under the GPL + +use strict; +use integer; + +package NaturalDocs::Languages::Augeas; + +use base 'NaturalDocs::Languages::Simple'; + + +my $pastFirstLet; +my $pastFirstTest; + + +sub OnCode { + my ($self, @params) = @_; + + $pastFirstLet = 0; + $pastFirstTest = 0; + + return $self->SUPER::OnCode(@params); +}; + + +# Override NormalizePrototype and ParsePrototype +sub NormalizePrototype { + my ($self, $prototype) = @_; + return $prototype; +} + +sub ParsePrototype { + my ($self, $type, $prototype) = @_; + + my $object = NaturalDocs::Languages::Prototype->New($prototype); + return $object; +} + + + +# +# Function: OnPrototypeEnd +# +# Tcl's function syntax is shown below. +# +# > proc [name] { [params] } { [code] } +# +# The opening brace is one of the prototype enders. We need to allow the first opening brace because it contains the +# parameters. +# +# Also, the parameters may have braces within them. I've seen one that used { seconds 20 } as a parameter. +# +# Parameters: +# +# type - The of the prototype. +# prototypeRef - A reference to the prototype so far, minus the ender in dispute. +# ender - The ender symbol. +# +# Returns: +# +# ENDER_ACCEPT - The ender is accepted and the prototype is finished. +# ENDER_IGNORE - The ender is rejected and parsing should continue. Note that the prototype will be rejected as a whole +# if all enders are ignored before reaching the end of the code. +# ENDER_ACCEPT_AND_CONTINUE - The ender is accepted so the prototype may stand as is. However, the prototype might +# also continue on so continue parsing. If there is no accepted ender between here and +# the end of the code this version will be accepted instead. +# ENDER_REVERT_TO_ACCEPTED - The expedition from ENDER_ACCEPT_AND_CONTINUE failed. Use the last accepted +# version and end parsing. +# +sub OnPrototypeEnd { + my ($self, $type, $prototypeRef, $ender) = @_; + + if ($ender eq "\n") { + return ::ENDER_ACCEPT_AND_CONTINUE(); + } elsif ( ($type eq "augeasvariable" || $type eq "augeaslens" || $type eq "augeastest") && + $ender eq "let" && + (!$pastFirstLet || $$prototypeRef =~ /\=[ \t\r\n]*$/ + || $$prototypeRef =~ /in[ \t\r\n]+$/) ) { + $pastFirstLet = 1; + return ::ENDER_IGNORE(); + } elsif ( ($type eq "augeasvariable" || $type eq "augeaslens" || $type eq "augeastest") && + $ender eq "test" && + (!$pastFirstTest || $$prototypeRef =~ /\=[ \t\r\n]*$/ + || $$prototypeRef =~ /in[ \t\r\n]+$/) ) { + $pastFirstTest = 1; + return ::ENDER_IGNORE(); + } else { + return ::ENDER_ACCEPT(); + }; +}; + + +1; diff --git a/doc/naturaldocs/conf/Augeas.css b/doc/naturaldocs/conf/Augeas.css new file mode 100644 index 0000000..14b84d1 --- /dev/null +++ b/doc/naturaldocs/conf/Augeas.css @@ -0,0 +1,782 @@ +/* + IMPORTANT: If you're editing this file in the output directory of one of + your projects, your changes will be overwritten the next time you run + Natural Docs. Instead, copy this file to your project directory, make your + changes, and you can use it with -s. Even better would be to make a CSS + file in your project directory with only your changes, which you can then + use with -s [original style] [your changes]. + + On the other hand, if you're editing this file in the Natural Docs styles + directory, the changes will automatically be applied to all your projects + that use this style the next time Natural Docs is run on them. + + This file is part of Natural Docs, which is Copyright (C) 2003-2008 Greg Valure + Natural Docs is licensed under the GPL +*/ + +body { + background: white; + background: url('http://augeas.net/styles/augeas-logo.png'); + background-repeat: no-repeat; + background-position: 3px 3px; + color: black; + font: 10pt Verdana, Arial, sans-serif; + margin: 0; padding: 0; + } + +.ContentPage, +.IndexPage, +.FramedMenuPage { + background-color: white; + } +.FramedContentPage, +.FramedIndexPage, +.FramedSearchResultsPage, +.PopupSearchResultsPage { + background-color: #white; + } + + +a:link, +a:visited { color: #900000; text-decoration: none } +a:hover { color: #900000; text-decoration: underline } +a:active { color: #FF0000; text-decoration: underline } + +td { + vertical-align: top } + +img { border: 0; } + + +/* + Comment out this line to use web-style paragraphs (blank line between + paragraphs, no indent) instead of print-style paragraphs (no blank line, + indented.) +*/ +p { + text-indent: 5ex; margin: 0 } + + +/* Opera doesn't break with just wbr, but will if you add this. */ +.Opera wbr:after { + content: "\00200B"; + } + + +/* Blockquotes are used as containers for things that may need to scroll. */ +blockquote { + padding: 0; + margin: 0; + overflow: auto; + margin-left: 5ex; + } + + +.Firefox1 blockquote { + padding-bottom: .5em; + } + +/* Turn off scrolling when printing. */ +@media print { + blockquote { + overflow: visible; + } + .IE blockquote { + width: auto; + } + } + + + +#Menu { + float: left; + padding-top: 100px; + left: 0px; + margin-bottom: 1em; + margin-left:10px; + } +#Menu a { + color:black; + list-style: none; + padding: 0px; + font-weight: bold; + } +.ContentPage #Menu, +.IndexPage #Menu { + position: absolute; + top: 0; + left: 0; + width: 200px; + overflow: hidden; + } +.ContentPage .Firefox #Menu, +.IndexPage .Firefox #Menu { + width: 27ex; + } + + + .MTitle { + font-size: 16pt; font-weight: bold; font-variant: small-caps; + text-align: center; + padding: 5px 10px 15px 10px; + border-bottom: 1px dotted #000000; + color: #8d4a2c; + margin-bottom: 15px } + + .MSubTitle { + font-size: 9pt; font-weight: normal; font-variant: normal; + margin-top: 1ex; margin-bottom: 5px } + + + .MEntry { } + + .MEntry a:link, + .MEntry a:hover, + .MEntry a:visited { margin-right: 0 } + .MEntry a:active { margin-right: 0 } + + + .MGroup { + font-variant: small-caps; font-weight: bold; + margin: 1em 0 1em 10px; + } + + .MGroupContent { + font-variant: normal; font-weight: normal } + + .MGroup a:link, + .MGroup a:hover, + .MGroup a:visited { margin-right: 10px } + .MGroup a:active { margin-right: 10px } + + + .MFile, + .MText, + .MLink, + .MIndex { + padding: 5px 10px 7px 20px; + margin: .1em 0 .1em 0; + background: #c9e0a7; + } + + .MText { } + + .MLink { } + + #MSelected { + color: #000000; background-color: #FFFFFF; + /* Replace padding with border. */ + background: #65a703; + font-weight: bold; + } + + + #MSearchPanel { + padding: 0px 6px; + margin: .25em 0; + } + + + #MSearchField { + color: #606060; + background-color: #E8E8E8; + border: none; + padding: 2px 4px; + width: 100%; + } + /* Only Opera gets it right. */ + .Firefox #MSearchField, + .IE #MSearchField, + .Safari #MSearchField { + width: 94%; + } + .Opera9 #MSearchField, + .Konqueror #MSearchField { + width: 97%; + } + .FramedMenuPage .Firefox #MSearchField, + .FramedMenuPage .Safari #MSearchField, + .FramedMenuPage .Konqueror #MSearchField { + width: 98%; + } + + /* Firefox doesn't do this right in frames without #MSearchPanel added on. + It's presence doesn't hurt anything other browsers. */ + #MSearchPanel.MSearchPanelInactive:hover #MSearchField { + background-color: #FFFFFF; + border: 1px solid #C0C0C0; + padding: 1px 3px; + } + .MSearchPanelActive #MSearchField { + background-color: #FFFFFF; + border: 1px solid #C0C0C0; + font-style: normal; + padding: 1px 3px; + } + + #MSearchType { + visibility: hidden; + font: 8pt Verdana, sans-serif; + width: 98%; + padding: 0; + border: 1px solid #C0C0C0; + } + .MSearchPanelActive #MSearchType, + /* As mentioned above, Firefox doesn't do this right in frames without #MSearchPanel added on. */ + #MSearchPanel.MSearchPanelInactive:hover #MSearchType, + #MSearchType:focus { + visibility: visible; + color: #606060; + } + #MSearchType option#MSearchEverything { + font-weight: bold; + } + + .Opera8 .MSearchPanelInactive:hover, + .Opera8 .MSearchPanelActive { + margin-left: -1px; + } + + + iframe#MSearchResults { + width: 60ex; + height: 15em; + } + #MSearchResultsWindow { + display: none; + position: absolute; + left: 0; top: 0; + border: 1px solid #000000; + background-color: #E8E8E8; + } + #MSearchResultsWindowClose { + font-weight: bold; + font-size: 8pt; + display: block; + padding: 2px 5px; + } + #MSearchResultsWindowClose:link, + #MSearchResultsWindowClose:visited { + color: #000000; + text-decoration: none; + } + #MSearchResultsWindowClose:active, + #MSearchResultsWindowClose:hover { + color: #800000; + text-decoration: none; + background-color: #F4F4F4; + } + + + + +#Content { + margin-top: 100px; + padding-bottom: 15px; + } + +.ContentPage #Content { + background-color: #FFFFFF; + font-size: 9pt; /* To make 31ex match the menu's 31ex. */ + margin-left: 34ex; + } +.ContentPage .Firefox #Content { + margin-left: 34ex; + } + + + + .CTopic { + font-size: 10pt; + margin-bottom: 3em; + } + + + .CTitle { + font-size: 12pt; font-weight: bold; + border-width: 0 0 1px 0; border-style: solid; border-color: #A0A0A0; + margin: 0 15px .5em 15px } + + .CGroup .CTitle { + font-size: 16pt; font-variant: small-caps; + padding-left: 15px; padding-right: 15px; + border-width: 0 0 2px 0; border-color: #000000; + margin-left: 0; margin-right: 0; color: #8d4a2c } + + .CClass .CTitle, + .CInterface .CTitle, + .CDatabase .CTitle, + .CDatabaseTable .CTitle, + .CSection .CTitle { + font-size: 18pt; + font-weight: bold; + color: #8d4a2c; + padding: 10px 15px 10px 15px; + border-width: 2px 0; border-color: #000000; + margin-left: 0; margin-right: 0 } + + #MainTopic .CTitle { + font-size: 20pt; + font-weight: bold; + color: #8d4a2c; + padding: 10px 15px 10px 15px; + border-width: 0 0 3px 0; border-color: #000000; + margin-left: 0; margin-right: 0 } + + .CBody { + margin-left: 0; margin-right: 15px } + + + .CToolTip { + position: absolute; visibility: hidden; + left: 0; top: 0; + background-color: #FFFFE0; + padding: 5px; + border-width: 1px 2px 2px 1px; border-style: solid; border-color: #000000; + font-size: 8pt; + } + + .Opera .CToolTip { + max-width: 98%; + } + + /* Scrollbars would be useless. */ + .CToolTip blockquote { + overflow: hidden; + } + .IE6 .CToolTip blockquote { + overflow: visible; + } + + .CHeading { + font-weight: bold; font-size: 10pt; + margin: 1.5em 0 .5em 0; + } + + .CBody pre { + font: 10pt "Courier New", Courier, monospace; + margin: 1em 0; + } + + .CBody ul { + /* I don't know why CBody's margin doesn't apply, but it's consistent across browsers so whatever. + Reapply it here as padding. */ + padding-left: 15px; padding-right: 15px; + margin: .5em 5ex .5em 5ex; + } + + .CDescriptionList { + margin: .5em 5ex 0 5ex } + + .CDLEntry { + font: 10pt "Courier New", Courier, monospace; color: #808080; + padding-bottom: .25em; + white-space: nowrap } + + .CDLDescription { + font-size: 10pt; /* For browsers that don't inherit correctly, like Opera 5. */ + padding-bottom: .5em; padding-left: 5ex } + + + .CTopic img { + text-align: center; + display: block; + margin: 1em auto; + } + .CImageCaption { + font-variant: small-caps; + font-size: 8pt; + color: #808080; + text-align: center; + position: relative; + top: 1em; + } + + .CImageLink { + color: #808080; + } + a.CImageLink:link, + a.CImageLink:visited, + a.CImageLink:hover { color: #808080 } + + + + + +.Prototype { + font: 10pt "Courier New", Courier, monospace; + padding: 5px 3ex; + border: 1px solid #65A703; + margin: 0 5ex 1.5em 0; + background: #EBF8D5; + } + + .Prototype td { + font-size: 10pt; + } + + .PDefaultValue, + .PDefaultValuePrefix, + .PTypePrefix { + color: #8F8F8F; + } + .PTypePrefix { + text-align: right; + } + .PAfterParameters { + vertical-align: bottom; + } + + .IE .Prototype table { + padding: 0; + } + + .CFunction .Prototype { + background-color: #F4F4F4; border-color: #D0D0D0 } + .CProperty .Prototype { + background-color: #F4F4FF; border-color: #C0C0E8 } + .CVariable .Prototype { + background-color: #FFFFF0; border-color: #E0E0A0 } + + .CClass .Prototype { + border-width: 1px 2px 2px 1px; border-style: solid; border-color: #A0A0A0; + background-color: #F4F4F4; + } + .CInterface .Prototype { + border-width: 1px 2px 2px 1px; border-style: solid; border-color: #A0A0D0; + background-color: #F4F4FF; + } + + .CDatabaseIndex .Prototype, + .CConstant .Prototype { + background-color: #D0D0D0; border-color: #000000 } + .CType .Prototype, + .CEnumeration .Prototype { + background-color: #FAF0F0; border-color: #E0B0B0; + } + .CDatabaseTrigger .Prototype, + .CEvent .Prototype, + .CDelegate .Prototype { + background-color: #F0FCF0; border-color: #B8E4B8 } + + .CToolTip .Prototype { + margin: 0 0 .5em 0; + white-space: nowrap; + } + + + + + +.Summary { + margin: 1.5em 5ex 0 5ex } + + .STitle { + font-size: 12pt; font-weight: bold; + margin-bottom: .5em; + color: #8d4a2c; } + + + .SBorder { + background-color: #FFFFF0; + padding: 15px; + border: 1px solid #C0C060 } + + /* In a frame IE 6 will make them too long unless you set the width to 100%. Without frames it will be correct without a width + or slightly too long (but not enough to scroll) with a width. This arbitrary weirdness simply astounds me. IE 7 has the same + problem with frames, haven't tested it without. */ + .FramedContentPage .IE .SBorder { + width: 100% } + + /* A treat for Mozilla users. Blatantly non-standard. Will be replaced with CSS 3 attributes when finalized/supported. */ + .Firefox .SBorder { + -moz-border-radius: 20px } + + + .STable { + font-size: 9pt; width: 100% } + + .SEntry { + width: 30% } + .SDescription { + width: 70% } + + + .SMarked { + background-color: #F8F8D8 } + + .SDescription { padding-left: 2ex } + .SIndent1 .SEntry { padding-left: 1.5ex } .SIndent1 .SDescription { padding-left: 3.5ex } + .SIndent2 .SEntry { padding-left: 3.0ex } .SIndent2 .SDescription { padding-left: 5.0ex } + .SIndent3 .SEntry { padding-left: 4.5ex } .SIndent3 .SDescription { padding-left: 6.5ex } + .SIndent4 .SEntry { padding-left: 6.0ex } .SIndent4 .SDescription { padding-left: 8.0ex } + .SIndent5 .SEntry { padding-left: 7.5ex } .SIndent5 .SDescription { padding-left: 9.5ex } + + .SDescription a { color: #800000} + .SDescription a:active { color: #A00000 } + + .SGroup td { + padding-top: .5em; padding-bottom: .25em } + + .SGroup .SEntry { + font-weight: bold; font-variant: small-caps } + + .SGroup .SEntry a { color: #800000 } + .SGroup .SEntry a:active { color: #F00000 } + + + .SMain td, + .SClass td, + .SDatabase td, + .SDatabaseTable td, + .SSection td { + font-size: 10pt; + padding-bottom: .25em } + + .SClass td, + .SDatabase td, + .SDatabaseTable td, + .SSection td { + padding-top: 1em } + + .SMain .SEntry, + .SClass .SEntry, + .SDatabase .SEntry, + .SDatabaseTable .SEntry, + .SSection .SEntry { + font-weight: bold; + } + + .SMain .SEntry a, + .SClass .SEntry a, + .SDatabase .SEntry a, + .SDatabaseTable .SEntry a, + .SSection .SEntry a { color: #000000 } + + .SMain .SEntry a:active, + .SClass .SEntry a:active, + .SDatabase .SEntry a:active, + .SDatabaseTable .SEntry a:active, + .SSection .SEntry a:active { color: #A00000 } + + + + + +.ClassHierarchy { + margin: 0 15px 1em 15px } + + .CHEntry { + border-width: 1px 2px 2px 1px; border-style: solid; border-color: #A0A0A0; + margin-bottom: 3px; + padding: 2px 2ex; + font-size: 10pt; + background-color: #F4F4F4; color: #606060; + } + + .Firefox .CHEntry { + -moz-border-radius: 4px; + } + + .CHCurrent .CHEntry { + font-weight: bold; + border-color: #000000; + color: #000000; + } + + .CHChildNote .CHEntry { + font-style: italic; + font-size: 8pt; + } + + .CHIndent { + margin-left: 3ex; + } + + .CHEntry a:link, + .CHEntry a:visited, + .CHEntry a:hover { + color: #606060; + } + .CHEntry a:active { + color: #800000; + } + + + + + +#Index { + margin-top: 100px; + margin-left: 30px; + } + +/* As opposed to .PopupSearchResultsPage #Index */ +.IndexPage #Index, +.FramedIndexPage #Index, +.FramedSearchResultsPage #Index { + padding: 15px; + } + +.IndexPage #Index { + font-size: 9pt; /* To make 27ex match the menu's 27ex. */ + margin-left: 27ex; + } + + + .IPageTitle { + font-size: 20pt; font-weight: bold; + color: #8d4a2c; + padding: 10px 15px 10px 15px; + margin: -15px -15px 0 -15px } + + .FramedSearchResultsPage .IPageTitle { + margin-bottom: 15px; + } + + .INavigationBar { + font-size: 10pt; + text-align: center; + background-color: #FFFFF0; + padding: 5px; + border-bottom: solid 1px black; + margin: 0 -15px 15px -15px; + margin-left: 20px; + } + + .INavigationBar a { + font-weight: bold } + + .IHeading { + font-size: 16pt; font-weight: bold; + padding: 2.5em 0 .5em 0; + text-align: center; + width: 3.5ex; + } + #IFirstHeading { + padding-top: 0; + } + + .IEntry { + font-size: 10pt; + padding-left: 1ex; + } + .PopupSearchResultsPage .IEntry { + font-size: 8pt; + padding: 1px 5px; + } + .PopupSearchResultsPage .Opera9 .IEntry, + .FramedSearchResultsPage .Opera9 .IEntry { + text-align: left; + } + .FramedSearchResultsPage .IEntry { + padding: 0; + } + + .ISubIndex { + padding-left: 3ex; padding-bottom: .5em } + .PopupSearchResultsPage .ISubIndex { + display: none; + } + + /* While it may cause some entries to look like links when they aren't, I found it's much easier to read the + index if everything's the same color. */ + .ISymbol { + font-weight: bold; color: #900000 } + + .IndexPage .ISymbolPrefix, + .FramedIndexPage .ISymbolPrefix { + font-size: 10pt; + text-align: right; + color: #C47C7C; + background-color: #F8F8F8; + border-right: 3px solid #E0E0E0; + border-left: 1px solid #E0E0E0; + padding: 0 1px 0 2px; + } + .PopupSearchResultsPage .ISymbolPrefix, + .FramedSearchResultsPage .ISymbolPrefix { + color: #900000; + } + .PopupSearchResultsPage .ISymbolPrefix { + font-size: 8pt; + } + + .IndexPage #IFirstSymbolPrefix, + .FramedIndexPage #IFirstSymbolPrefix { + border-top: 1px solid #E0E0E0; + } + .IndexPage #ILastSymbolPrefix, + .FramedIndexPage #ILastSymbolPrefix { + border-bottom: 1px solid #E0E0E0; + } + .IndexPage #IOnlySymbolPrefix, + .FramedIndexPage #IOnlySymbolPrefix { + border-top: 1px solid #E0E0E0; + border-bottom: 1px solid #E0E0E0; + } + + a.IParent, + a.IFile { + display: block; + } + + .PopupSearchResultsPage .SRStatus { + padding: 2px 5px; + font-size: 8pt; + font-style: italic; + } + .FramedSearchResultsPage .SRStatus { + font-size: 10pt; + font-style: italic; + } + + .SRResult { + display: none; + } + + +#Footer { + font-size: 8pt; + color: #989898; + text-align: right; + } + +#Footer p { + text-indent: 0; + margin-bottom: .5em; + } + +.ContentPage #Footer, +.IndexPage #Footer { + text-align: right; + margin: 2px; + } + +.FramedMenuPage #Footer { + text-align: center; + margin: 5em 10px 10px 10px; + padding-top: 1em; + border-top: 1px solid #C8C8C8; + } + + #Footer a:link, + #Footer a:hover, + #Footer a:visited { color: #989898 } + #Footer a:active { color: #A00000 } + +.CAugeasLens td { + white-space: pre !important; +} + +.CAugeasVariable td { + white-space: pre !important; +} + +.CAugeasModule td { + white-space: pre !important; +} + +.CAugeasTest td { + white-space: pre !important; +} diff --git a/doc/naturaldocs/conf/c_api/Languages.txt b/doc/naturaldocs/conf/c_api/Languages.txt new file mode 100644 index 0000000..42b197c --- /dev/null +++ b/doc/naturaldocs/conf/c_api/Languages.txt @@ -0,0 +1,113 @@ +Format: 1.52 + +# This is the Natural Docs languages file for this project. If you change +# anything here, it will apply to THIS PROJECT ONLY. If you'd like to change +# something for all your projects, edit the Languages.txt in Natural Docs' +# Config directory instead. + + +# You can prevent certain file extensions from being scanned like this: +# Ignore Extensions: [extension] [extension] ... + + +#------------------------------------------------------------------------------- +# SYNTAX: +# +# Unlike other Natural Docs configuration files, in this file all comments +# MUST be alone on a line. Some languages deal with the # character, so you +# cannot put comments on the same line as content. +# +# Also, all lists are separated with spaces, not commas, again because some +# languages may need to use them. +# +# Language: [name] +# Alter Language: [name] +# Defines a new language or alters an existing one. Its name can use any +# characters. If any of the properties below have an add/replace form, you +# must use that when using Alter Language. +# +# The language Shebang Script is special. It's entry is only used for +# extensions, and files with those extensions have their shebang (#!) lines +# read to determine the real language of the file. Extensionless files are +# always treated this way. +# +# The language Text File is also special. It's treated as one big comment +# so you can put Natural Docs content in them without special symbols. Also, +# if you don't specify a package separator, ignored prefixes, or enum value +# behavior, it will copy those settings from the language that is used most +# in the source tree. +# +# Extensions: [extension] [extension] ... +# [Add/Replace] Extensions: [extension] [extension] ... +# Defines the file extensions of the language's source files. You can +# redefine extensions found in the main languages file. You can use * to +# mean any undefined extension. +# +# Shebang Strings: [string] [string] ... +# [Add/Replace] Shebang Strings: [string] [string] ... +# Defines a list of strings that can appear in the shebang (#!) line to +# designate that it's part of the language. You can redefine strings found +# in the main languages file. +# +# Ignore Prefixes in Index: [prefix] [prefix] ... +# [Add/Replace] Ignored Prefixes in Index: [prefix] [prefix] ... +# +# Ignore [Topic Type] Prefixes in Index: [prefix] [prefix] ... +# [Add/Replace] Ignored [Topic Type] Prefixes in Index: [prefix] [prefix] ... +# Specifies prefixes that should be ignored when sorting symbols in an +# index. Can be specified in general or for a specific topic type. +# +#------------------------------------------------------------------------------ +# For basic language support only: +# +# Line Comments: [symbol] [symbol] ... +# Defines a space-separated list of symbols that are used for line comments, +# if any. +# +# Block Comments: [opening sym] [closing sym] [opening sym] [closing sym] ... +# Defines a space-separated list of symbol pairs that are used for block +# comments, if any. +# +# Package Separator: [symbol] +# Defines the default package separator symbol. The default is a dot. +# +# [Topic Type] Prototype Enders: [symbol] [symbol] ... +# When defined, Natural Docs will attempt to get a prototype from the code +# immediately following the topic type. It stops when it reaches one of +# these symbols. Use \n for line breaks. +# +# Line Extender: [symbol] +# Defines the symbol that allows a prototype to span multiple lines if +# normally a line break would end it. +# +# Enum Values: [global|under type|under parent] +# Defines how enum values are referenced. The default is global. +# global - Values are always global, referenced as 'value'. +# under type - Values are under the enum type, referenced as +# 'package.enum.value'. +# under parent - Values are under the enum's parent, referenced as +# 'package.value'. +# +# Perl Package: [perl package] +# Specifies the Perl package used to fine-tune the language behavior in ways +# too complex to do in this file. +# +#------------------------------------------------------------------------------ +# For full language support only: +# +# Full Language Support: [perl package] +# Specifies the Perl package that has the parsing routines necessary for full +# language support. +# +#------------------------------------------------------------------------------- + +# The following languages are defined in the main file, if you'd like to alter +# them: +# +# Text File, Shebang Script, C/C++, C#, Java, JavaScript, Perl, Python, +# PHP, SQL, Visual Basic, Pascal, Assembly, Ada, Tcl, Ruby, Makefile, +# ActionScript, ColdFusion, R, Fortran + +# If you add a language that you think would be useful to other developers +# and should be included in Natural Docs by default, please e-mail it to +# languages [at] naturaldocs [dot] org. diff --git a/doc/naturaldocs/conf/c_api/Menu.txt b/doc/naturaldocs/conf/c_api/Menu.txt new file mode 100644 index 0000000..c8fdf1b --- /dev/null +++ b/doc/naturaldocs/conf/c_api/Menu.txt @@ -0,0 +1,66 @@ +Format: 1.52 + + +Title: Augeas Documentation +SubTitle: C API + +# You can add a footer to your documentation like this: +# Footer: [text] +# If you want to add a copyright notice, this would be the place to do it. + +# You can add a timestamp to your documentation like one of these: +# Timestamp: Generated on month day, year +# Timestamp: Updated mm/dd/yyyy +# Timestamp: Last updated mon day +# +# m - One or two digit month. January is "1" +# mm - Always two digit month. January is "01" +# mon - Short month word. January is "Jan" +# month - Long month word. January is "January" +# d - One or two digit day. 1 is "1" +# dd - Always two digit day. 1 is "01" +# day - Day with letter extension. 1 is "1st" +# yy - Two digit year. 2006 is "06" +# yyyy - Four digit year. 2006 is "2006" +# year - Four digit year. 2006 is "2006" + + +# -------------------------------------------------------------------------- +# +# Cut and paste the lines below to change the order in which your files +# appear on the menu. Don't worry about adding or removing files, Natural +# Docs will take care of that. +# +# You can further organize the menu by grouping the entries. Add a +# "Group: [name] {" line to start a group, and add a "}" to end it. +# +# You can add text and web links to the menu by adding "Text: [text]" and +# "Link: [name] ([URL])" lines, respectively. +# +# The formatting and comments are auto-generated, so don't worry about +# neatness when editing the file. Natural Docs will clean it up the next +# time it is run. When working with groups, just deal with the braces and +# forget about the indentation and comments. +# +# -------------------------------------------------------------------------- + + +Group: Main Links { + + Link: Main (/index.html) + Link: Documentation (/docs/index.html) + } # Group: Main Links + +File: Public API (no auto-title, augeas.h) +File: Internal API (no auto-title, internal.h) + +Group: Index { + + Index: Everything + Class Index: Classes + Function Index: Functions + File Index: Files + Macro Index: Macros + Type Index: Types + } # Group: Index + diff --git a/doc/naturaldocs/conf/c_api/Topics.txt b/doc/naturaldocs/conf/c_api/Topics.txt new file mode 100644 index 0000000..905270f --- /dev/null +++ b/doc/naturaldocs/conf/c_api/Topics.txt @@ -0,0 +1,81 @@ +Format: 1.52 + +# This is the Natural Docs topics file for this project. If you change anything +# here, it will apply to THIS PROJECT ONLY. If you'd like to change something +# for all your projects, edit the Topics.txt in Natural Docs' Config directory +# instead. + + +# If you'd like to prevent keywords from being recognized by Natural Docs, you +# can do it like this: +# Ignore Keywords: [keyword], [keyword], ... +# +# Or you can use the list syntax like how they are defined: +# Ignore Keywords: +# [keyword] +# [keyword], [plural keyword] +# ... + + +#------------------------------------------------------------------------------- +# SYNTAX: +# +# Topic Type: [name] +# Alter Topic Type: [name] +# Creates a new topic type or alters one from the main file. Each type gets +# its own index and behavior settings. Its name can have letters, numbers, +# spaces, and these charaters: - / . ' +# +# Plural: [name] +# Sets the plural name of the topic type, if different. +# +# Keywords: +# [keyword] +# [keyword], [plural keyword] +# ... +# Defines or adds to the list of keywords for the topic type. They may only +# contain letters, numbers, and spaces and are not case sensitive. Plural +# keywords are used for list topics. You can redefine keywords found in the +# main topics file. +# +# Index: [yes|no] +# Whether the topics get their own index. Defaults to yes. Everything is +# included in the general index regardless of this setting. +# +# Scope: [normal|start|end|always global] +# How the topics affects scope. Defaults to normal. +# normal - Topics stay within the current scope. +# start - Topics start a new scope for all the topics beneath it, +# like class topics. +# end - Topics reset the scope back to global for all the topics +# beneath it. +# always global - Topics are defined as global, but do not change the scope +# for any other topics. +# +# Class Hierarchy: [yes|no] +# Whether the topics are part of the class hierarchy. Defaults to no. +# +# Page Title If First: [yes|no] +# Whether the topic's title becomes the page title if it's the first one in +# a file. Defaults to no. +# +# Break Lists: [yes|no] +# Whether list topics should be broken into individual topics in the output. +# Defaults to no. +# +# Can Group With: [type], [type], ... +# Defines a list of topic types that this one can possibly be grouped with. +# Defaults to none. +#------------------------------------------------------------------------------- + +# The following topics are defined in the main file, if you'd like to alter +# their behavior or add keywords: +# +# Generic, Class, Interface, Section, File, Group, Function, Variable, +# Property, Type, Constant, Enumeration, Event, Delegate, Macro, +# Database, Database Table, Database View, Database Index, Database +# Cursor, Database Trigger, Cookie, Build Target + +# If you add something that you think would be useful to other developers +# and should be included in Natural Docs by default, please e-mail it to +# topics [at] naturaldocs [dot] org. diff --git a/doc/naturaldocs/conf/lenses/Languages.txt b/doc/naturaldocs/conf/lenses/Languages.txt new file mode 100644 index 0000000..47a9622 --- /dev/null +++ b/doc/naturaldocs/conf/lenses/Languages.txt @@ -0,0 +1,123 @@ +Format: 1.52 + +# This is the Natural Docs languages file for this project. If you change +# anything here, it will apply to THIS PROJECT ONLY. If you'd like to change +# something for all your projects, edit the Languages.txt in Natural Docs' +# Config directory instead. + + +# You can prevent certain file extensions from being scanned like this: +# Ignore Extensions: [extension] [extension] ... + + +#------------------------------------------------------------------------------- +# SYNTAX: +# +# Unlike other Natural Docs configuration files, in this file all comments +# MUST be alone on a line. Some languages deal with the # character, so you +# cannot put comments on the same line as content. +# +# Also, all lists are separated with spaces, not commas, again because some +# languages may need to use them. +# +# Language: [name] +# Alter Language: [name] +# Defines a new language or alters an existing one. Its name can use any +# characters. If any of the properties below have an add/replace form, you +# must use that when using Alter Language. +# +# The language Shebang Script is special. It's entry is only used for +# extensions, and files with those extensions have their shebang (#!) lines +# read to determine the real language of the file. Extensionless files are +# always treated this way. +# +# The language Text File is also special. It's treated as one big comment +# so you can put Natural Docs content in them without special symbols. Also, +# if you don't specify a package separator, ignored prefixes, or enum value +# behavior, it will copy those settings from the language that is used most +# in the source tree. +# +# Extensions: [extension] [extension] ... +# [Add/Replace] Extensions: [extension] [extension] ... +# Defines the file extensions of the language's source files. You can +# redefine extensions found in the main languages file. You can use * to +# mean any undefined extension. +# +# Shebang Strings: [string] [string] ... +# [Add/Replace] Shebang Strings: [string] [string] ... +# Defines a list of strings that can appear in the shebang (#!) line to +# designate that it's part of the language. You can redefine strings found +# in the main languages file. +# +# Ignore Prefixes in Index: [prefix] [prefix] ... +# [Add/Replace] Ignored Prefixes in Index: [prefix] [prefix] ... +# +# Ignore [Topic Type] Prefixes in Index: [prefix] [prefix] ... +# [Add/Replace] Ignored [Topic Type] Prefixes in Index: [prefix] [prefix] ... +# Specifies prefixes that should be ignored when sorting symbols in an +# index. Can be specified in general or for a specific topic type. +# +#------------------------------------------------------------------------------ +# For basic language support only: +# +# Line Comments: [symbol] [symbol] ... +# Defines a space-separated list of symbols that are used for line comments, +# if any. +# +# Block Comments: [opening sym] [closing sym] [opening sym] [closing sym] ... +# Defines a space-separated list of symbol pairs that are used for block +# comments, if any. +# +# Package Separator: [symbol] +# Defines the default package separator symbol. The default is a dot. +# +# [Topic Type] Prototype Enders: [symbol] [symbol] ... +# When defined, Natural Docs will attempt to get a prototype from the code +# immediately following the topic type. It stops when it reaches one of +# these symbols. Use \n for line breaks. +# +# Line Extender: [symbol] +# Defines the symbol that allows a prototype to span multiple lines if +# normally a line break would end it. +# +# Enum Values: [global|under type|under parent] +# Defines how enum values are referenced. The default is global. +# global - Values are always global, referenced as 'value'. +# under type - Values are under the enum type, referenced as +# 'package.enum.value'. +# under parent - Values are under the enum's parent, referenced as +# 'package.value'. +# +# Perl Package: [perl package] +# Specifies the Perl package used to fine-tune the language behavior in ways +# too complex to do in this file. +# +#------------------------------------------------------------------------------ +# For full language support only: +# +# Full Language Support: [perl package] +# Specifies the Perl package that has the parsing routines necessary for full +# language support. +# +#------------------------------------------------------------------------------- + +# The following languages are defined in the main file, if you'd like to alter +# them: +# +# Text File, Shebang Script, C/C++, C#, Java, JavaScript, Perl, Python, +# PHP, SQL, Visual Basic, Pascal, Assembly, Ada, Tcl, Ruby, Makefile, +# ActionScript, ColdFusion, R, Fortran + +# If you add a language that you think would be useful to other developers +# and should be included in Natural Docs by default, please e-mail it to +# languages [at] naturaldocs [dot] org. + + +Language: Augeas + + Extension: aug + Block Comment: (* *) + Augeas Test Prototype Enders: \n let test module filter + Augeas Lens Prototype Enders: \n let test module filter + Augeas Variable Prototype Enders: \n let test module filter + Perl Package: NaturalDocs::Languages::Augeas diff --git a/doc/naturaldocs/conf/lenses/Menu.txt b/doc/naturaldocs/conf/lenses/Menu.txt new file mode 100644 index 0000000..a0b999e --- /dev/null +++ b/doc/naturaldocs/conf/lenses/Menu.txt @@ -0,0 +1,336 @@ +Format: 1.52 + + +Title: Augeas Documentation +SubTitle: Modules + +# You can add a footer to your documentation like this: +# Footer: [text] +# If you want to add a copyright notice, this would be the place to do it. + +# You can add a timestamp to your documentation like one of these: +# Timestamp: Generated on month day, year +# Timestamp: Updated mm/dd/yyyy +# Timestamp: Last updated mon day +# +# m - One or two digit month. January is "1" +# mm - Always two digit month. January is "01" +# mon - Short month word. January is "Jan" +# month - Long month word. January is "January" +# d - One or two digit day. 1 is "1" +# dd - Always two digit day. 1 is "01" +# day - Day with letter extension. 1 is "1st" +# yy - Two digit year. 2006 is "06" +# yyyy - Four digit year. 2006 is "2006" +# year - Four digit year. 2006 is "2006" + +# These are indexes you deleted, so Natural Docs will not add them again +# unless you remove them from this line. + +Don't Index: Properties + + +# -------------------------------------------------------------------------- +# +# Cut and paste the lines below to change the order in which your files +# appear on the menu. Don't worry about adding or removing files, Natural +# Docs will take care of that. +# +# You can further organize the menu by grouping the entries. Add a +# "Group: [name] {" line to start a group, and add a "}" to end it. +# +# You can add text and web links to the menu by adding "Text: [text]" and +# "Link: [name] ([URL])" lines, respectively. +# +# The formatting and comments are auto-generated, so don't worry about +# neatness when editing the file. Natural Docs will clean it up the next +# time it is run. When working with groups, just deal with the braces and +# forget about the indentation and comments. +# +# -------------------------------------------------------------------------- + + +Group: Main Site { + + Link: Main (/index.html) + Link: Documentation (/docs/index.html) + } # Group: Main Site + +Group: Specific Modules { + + File: Access (access.aug) + File: ActiveMQ_Conf (activemq_conf.aug) + File: ActiveMQ_XML (activemq_xml.aug) + File: AFS_cellalias (afs_cellalias.aug) + File: Aliases (aliases.aug) + File: Anacron (anacron.aug) + File: Approx (approx.aug) + File: Apt_Update_Manager (apt_update_manager.aug) + File: AptCacherNGSecurity (aptcacherngsecurity.aug) + File: AptConf (aptconf.aug) + File: AptPreferences (aptpreferences.aug) + File: Aptsources (aptsources.aug) + File: Authorized_Keys (authorized_keys.aug) + File: Automaster (automaster.aug) + File: Automounter (automounter.aug) + File: Avahi (avahi.aug) + File: BackupPCHosts (backuppchosts.aug) + File: BootConf (bootconf.aug) + File: Cachefilesd (cachefilesd.aug) + File: Carbon (carbon.aug) + File: Cgconfig (no auto-title, cgconfig.aug) + File: Cgrules (no auto-title, cgrules.aug) + File: Channels (channels.aug) + File: Chrony (chrony.aug) + File: Collectd (collectd.aug) + File: CPanel (cpanel.aug) + File: Cron (cron.aug) + File: Crypttab (crypttab.aug) + File: CSV (csv.aug) + File: Cups (cups.aug) + File: Debctrl (no auto-title, debctrl.aug) + File: Desktop (desktop.aug) + File: Dhcpd (dhcpd.aug) + File: Dovecot (dovecot.aug) + File: Dpkg (dpkg.aug) + File: Exports (exports.aug) + File: FAI_DiskConfig (fai_diskconfig.aug) + File: Fonts (fonts.aug) + File: Fuse (fuse.aug) + File: Gshadow (gshadow.aug) + File: Grub (grub.aug) + File: GtkBookmarks (gtkbookmarks.aug) + File: Host_Conf (host_conf.aug) + File: Hostname (hostname.aug) + File: Hosts_Access (hosts_access.aug) + File: Htpasswd (htpasswd.aug) + File: Inputrc (inputrc.aug) + File: JettyRealm (jettyrealm.aug) + File: JMXAccess (jmxaccess.aug) + File: JMXPassword (jmxpassword.aug) + File: Iscsid (iscsid.aug) + File: Iptables (iptables.aug) + File: Kdump (kdump.aug) + File: Keepalived (keepalived.aug) + File: Known_Hosts (known_hosts.aug) + File: Koji (koji.aug) + File: Ldif (ldif.aug) + File: Ldso (no auto-title, ldso.aug) + File: Lightdm (lightdm.aug) + File: Login_defs (login_defs.aug) + File: Lokkit (lokkit.aug) + File: LVM (lvm.aug) + File: MCollective (mcollective.aug) + File: Memcached (memcached.aug) + File: Mke2fs (mke2fs.aug) + File: Modprobe (modprobe.aug) + File: MongoDBServer (mongodbserver.aug) + File: Modules (modules.aug) + File: Modules_conf (modules_conf.aug) + File: NagiosCfg (no auto-title, nagioscfg.aug) + File: NagiosObjects (nagiosobjects.aug) + File: Netmasks (netmasks.aug) + File: NetworkManager (networkmanager.aug) + File: Networks (networks.aug) + File: Nginx (nginx.aug) + File: Nrpe (nrpe.aug) + File: Nslcd (nslcd.aug) + File: Nsswitch (nsswitch.aug) + File: Ntpd (ntpd.aug) + File: OpenShift_Config (openshift_config.aug) + File: OpenShift_Http (openshift_http.aug) + File: OpenShift_Quickstarts (openshift_quickstarts.aug) + File: Pagekite (pagekite.aug) + File: Pam (pam.aug) + File: PamConf (pamconf.aug) + File: Passwd (passwd.aug) + File: Pbuilder (pbuilder.aug) + File: Pg_Hba (pg_hba.aug) + File: Postfix_Passwordmap (postfix_passwordmap.aug) + File: Postfix_Transport (postfix_transport.aug) + File: Postfix_Virtual (postfix_virtual.aug) + File: Postgresql (postgresql.aug) + File: Protocols (protocols.aug) + File: Puppetfile (no auto-title, puppetfile.aug) + File: PuppetFileserver (no auto-title, puppetfileserver.aug) + File: Puppet_Auth (no auto-title, puppet_auth.aug) + File: Qpid (qpid.aug) + File: Rabbitmq (rabbitmq.aug) + File: Redis (redis.aug) + File: Reprepro_Uploaders (reprepro_uploaders.aug) + File: Resolv (resolv.aug) + File: Rhsm (rhsm.aug) + File: Rmt (rmt.aug) + File: Rsyslog (rsyslog.aug) + File: Schroot (schroot.aug) + File: Services (services.aug) + File: Shadow (shadow.aug) + File: Shells (shells.aug) + File: Shellvars (shellvars.aug) + File: Simplelines (simplelines.aug) + File: Simplevars (simplevars.aug) + File: Sip_Conf (sip_conf.aug) + File: SmbUsers (smbusers.aug) + File: Splunk (splunk.aug) + File: Solaris_System (solaris_system.aug) + File: Ssh (ssh.aug) + File: Sshd (sshd.aug) + File: Sssd (no auto-title, sssd.aug) + File: Star (star.aug) + File: Subversion (subversion.aug) + File: Sudoers (sudoers.aug) + File: Sysconfig_Route (sysconfig_route.aug) + File: Sysctl (sysctl.aug) + File: Syslog (syslog.aug) + File: Systemd (systemd.aug) + File: Thttpd (thttpd.aug) + File: Tmpfiles (tmpfiles.aug) + File: Tuned (tuned.aug) + File: Up2date (up2date.aug) + File: UpdateDB (updatedb.aug) + File: VWware_Config (vmware_config.aug) + File: Vfstab (vfstab.aug) + File: Xinetd (xinetd.aug) + File: Xorg (xorg.aug) + File: ClamAV (clamav.aug) + File: Dns_Zone (dns_zone.aug) + File: Mailscanner (mailscanner.aug) + File: Mailscanner_rules (mailscanner_rules.aug) + File: MasterPasswd (masterpasswd.aug) + File: Pgbouncer (pgbouncer.aug) + File: PylonsPaste (pylonspaste.aug) + File: Trapperkeeper (trapperkeeper.aug) + File: Xymon_Alerting (xymon_alerting.aug) + File: Yaml (yaml.aug) + File: Cron_User (cron_user.aug) + File: Oz (oz.aug) + File: Getcap (getcap.aug) + File: Rancid (rancid.aug) + File: Rtadvd (rtadvd.aug) + File: Strongswan (strongswan.aug) + File: Termcap (termcap.aug) + File: Anaconda (anaconda.aug) + File: Semanage (semanage.aug) + File: Toml (toml.aug) + } # Group: Specific Modules + +Group: Generic Modules { + + File: Build (build.aug) + File: Erlang (erlang.aug) + File: IniFile (inifile.aug) + File: Quote (quote.aug) + File: Rx (rx.aug) + File: Sep (sep.aug) + File: Util (util.aug) + } # Group: Generic Modules + +Group: Tests and Examples { + + File: Test_Access (tests/test_access.aug) + File: Test_ActiveMQ_Conf (tests/test_activemq_conf.aug) + File: Test_ActiveMQ_XML (tests/test_activemq_xml.aug) + File: Test_AFS_cellalias (tests/test_afs_cellalias.aug) + File: Test_Aliases (tests/test_aliases.aug) + File: Test_Anacron (tests/test_anacron.aug) + File: Test_Approx (tests/test_approx.aug) + File: Test_Apt_Update_Manager (tests/test_apt_update_manager.aug) + File: Test_Authorized_Keys (tests/test_authorized_keys.aug) + File: Test_BootConf (tests/test_bootconf.aug) + File: Test_Build (tests/test_build.aug) + File: Test_Carbon (tests/test_carbon.aug) + File: Test_Channels (tests/test_channels.aug) + File: Test_Chrony (tests/test_chrony.aug) + File: Test_Collectd (tests/test_collectd.aug) + File: Test_CPanel (tests/test_cpanel.aug) + File: Test_CSV (no auto-title, tests/test_csv.aug) + File: Test_Cups (tests/test_cups.aug) + File: Test_Dovecot (tests/test_dovecot.aug) + File: Test_Erlang (tests/test_erlang.aug) + File: Test_FAI_DiskConfig (tests/test_fai_diskconfig.aug) + File: Test_Fonts (tests/test_fonts.aug) + File: Test_Fuse (tests/test_fuse.aug) + File: Test_GtkBookmarks (tests/test_gtkbookmarks.aug) + File: Test_Htpasswd (tests/test_htpasswd.aug) + File: Test_IniFile (tests/test_inifile.aug) + File: Test_Inputrc (tests/test_inputrc.aug) + File: Test_Iscsid (tests/test_iscsid.aug) + File: Test_JettyRealm (tests/test_jettyrealm.aug) + File: Test_JMXAccess (tests/test_jmxaccess.aug) + File: Test_JMXPassword (tests/test_jmxpassword.aug) + File: Test_Kdump (tests/test_kdump.aug) + File: Test_Keepalived (tests/test_keepalived.aug) + File: Test_Known_Hosts (tests/test_known_hosts.aug) + File: Test_Koji (tests/test_koji.aug) + File: Test_Ldso (tests/test_ldso.aug) + File: Test_Lightdm (tests/test_lightdm.aug) + File: Test_LVM (tests/test_lvm.aug) + File: Test_MCollective (tests/test_mcollective.aug) + File: Test_Memcached (tests/test_memcached.aug) + File: Test_MongoDBServer (tests/test_mongodbserver.aug) + File: Test_NagiosCfg (tests/test_nagioscfg.aug) + File: Test_NetworkManager (tests/test_networkmanager.aug) + File: Test_Nginx (tests/test_nginx.aug) + File: Test_Nslcd (tests/test_nslcd.aug) + File: Test_Ntpd (tests/test_ntpd.aug) + File: Test_OpenShift_Config (tests/test_openshift_config.aug) + File: Test_OpenShift_Http (tests/test_openshift_http.aug) + File: Test_OpenShift_Quickstarts (tests/test_openshift_quickstarts.aug) + File: Test_Postfix_Passwordmap (tests/test_postfix_passwordmap.aug) + File: Test_Postfix_Transport (tests/test_postfix_transport.aug) + File: Test_Postfix_Virtual (tests/test_postfix_virtual.aug) + File: Test_Postgresql (tests/test_postgresql.aug) + File: Test_Protocols (tests/test_protocols.aug) + File: Test_Puppet_Auth (tests/test_puppet_auth.aug) + File: Test_Puppetfile (tests/test_puppetfile.aug) + File: Test_Qpid (tests/test_qpid.aug) + File: Test_Quote (tests/test_quote.aug) + File: Test_Rabbitmq (tests/test_rabbitmq.aug) + File: Test_Redis (tests/test_redis.aug) + File: Test_Reprepro_Uploaders (tests/test_reprepro_uploaders.aug) + File: Test_Rhsm (tests/test_rhsm.aug) + File: Test_Rsyslog (tests/test_rsyslog.aug) + File: Test_Simplelines (tests/test_simplelines.aug) + File: Test_Simplevars (tests/test_simplevars.aug) + File: Test_SmbUsers (tests/test_smbusers.aug) + File: Test_Subversion (tests/test_subversion.aug) + File: Test_Sysconfig_Route (tests/test_sysconfig_route.aug) + File: Test_Sysctl (tests/test_sysctl.aug) + File: Test_Systemd (tests/test_systemd.aug) + File: Test_Thttpd (tests/test_thttpd.aug) + File: Test_Tmpfiles (tests/test_tmpfiles.aug) + File: Test_Up2date (tests/test_up2date.aug) + File: Test_UpdateDB (tests/test_updatedb.aug) + File: Test_VMware_Config (tests/test_vmware_config.aug) + File: Test_Xml (tests/test_xml.aug) + File: Test_Yum (tests/test_yum.aug) + File: Test_login_defs (tests/test_login_defs.aug) + File: Test_sssd (tests/test_sssd.aug) + File: Test_sudoers (no auto-title, tests/test_sudoers.aug) + File: Test_ssh (tests/test_ssh.aug) + File: Test_sshd (tests/test_sshd.aug) + File: AptPreferences.pin (tests/test_aptpreferences.aug) + File: Desktop.lns (tests/test_desktop.aug) + File: Interfaces.lns (tests/test_interfaces.aug) + File: test_httpd.aug (tests/test_httpd.aug) + File: test_shellvars.aug (tests/test_shellvars.aug) + File: test_shellvars_list.aug (tests/test_shellvars_list.aug) + File: test_slapd.aug (tests/test_slapd.aug) + File: test_trapperkeeper.aug (tests/test_trapperkeeper.aug) + File: Test_Xymon_Alerting (tests/test_xymon_alerting.aug) + File: Test_Anaconda (tests/test_anaconda.aug) + File: Test_Semanage (tests/test_semanage.aug) + File: test_toml.aug (tests/test_toml.aug) + } # Group: Tests and Examples + +Group: Index { + + Augeas Lens Index: Lenses + Augeas Module Index: Modules + Augeas Variable Index: Variables + Augeas Test Index: Tests + Index: Everything + File Index: Files + Variable Index: Variables + } # Group: Index + diff --git a/doc/naturaldocs/conf/lenses/Menu_Backup.txt b/doc/naturaldocs/conf/lenses/Menu_Backup.txt new file mode 100644 index 0000000..9782647 --- /dev/null +++ b/doc/naturaldocs/conf/lenses/Menu_Backup.txt @@ -0,0 +1,153 @@ +Format: 1.4 + + +Title: Augeas Documentation +SubTitle: Modules + +# You can add a footer to your documentation like this: +# Footer: [text] +# If you want to add a copyright notice, this would be the place to do it. + +# You can add a timestamp to your documentation like one of these: +# Timestamp: Generated on month day, year +# Timestamp: Updated mm/dd/yyyy +# Timestamp: Last updated mon day +# +# m - One or two digit month. January is "1" +# mm - Always two digit month. January is "01" +# mon - Short month word. January is "Jan" +# month - Long month word. January is "January" +# d - One or two digit day. 1 is "1" +# dd - Always two digit day. 1 is "01" +# day - Day with letter extension. 1 is "1st" +# yy - Two digit year. 2006 is "06" +# yyyy - Four digit year. 2006 is "2006" +# year - Four digit year. 2006 is "2006" + + +# -------------------------------------------------------------------------- +# +# Cut and paste the lines below to change the order in which your files +# appear on the menu. Don't worry about adding or removing files, Natural +# Docs will take care of that. +# +# You can further organize the menu by grouping the entries. Add a +# "Group: [name] {" line to start a group, and add a "}" to end it. +# +# You can add text and web links to the menu by adding "Text: [text]" and +# "Link: [name] ([URL])" lines, respectively. +# +# The formatting and comments are auto-generated, so don't worry about +# neatness when editing the file. Natural Docs will clean it up the next +# time it is run. When working with groups, just deal with the braces and +# forget about the indentation and comments. +# +# -------------------------------------------------------------------------- + + +Group: Main Site { + + Link: Main (/index.html) + Link: Documentation (/docs/index.html) + } # Group: Main Site + +Group: Specific Modules { + + File: Aliases (aliases.aug) + File: Approx (approx.aug) + File: AptPreferences (aptpreferences.aug) + File: Aptsources (aptsources.aug) + File: BBhosts (bbhosts.aug) + File: Cgconfig (cgconfig.aug) + File: Cgrules (cgrules.aug) + File: CobblerModules (cobblermodules.aug) + File: CobblerSettings (cobblersettings.aug) + File: Cron (cron.aug) + File: Darkice (darkice.aug) + File: Debctrl (debctrl.aug) + File: Device_map (device_map.aug) + File: Dhclient (dhclient.aug) + File: Dnsmasq (dnsmasq.aug) + File: Dpkg (dpkg.aug) + File: Dput (dput.aug) + File: Ethers (ethers.aug) + File: Exports (exports.aug) + File: Fstab (fstab.aug) + File: Gdm (gdm.aug) + File: Group (group.aug) + File: Grub (grub.aug) + File: Inetd (inetd.aug) + File: Inittab (inittab.aug) + File: Interfaces (interfaces.aug) + File: Iptables (iptables.aug) + File: Json (json.aug) + File: Keepalived (keepalived.aug) + File: Krb5 (krb5.aug) + File: Limits (limits.aug) + File: Login_defs (login_defs.aug) + File: Logrotate (logrotate.aug) + File: Lokkit (lokkit.aug) + File: Mke2fs (mke2fs.aug) + File: Modprobe (modprobe.aug) + File: Modules_conf (modules_conf.aug) + File: Monit (monit.aug) + File: Multipath (multipath.aug) + File: MySQL (mysql.aug) + File: NagiosCfg (nagioscfg.aug) + File: Nrpe (nrpe.aug) + File: Nsswitch (nsswitch.aug) + File: Ntp (ntp.aug) + File: Odbc (odbc.aug) + File: OpenVPN (openvpn.aug) + File: Pam (pam.aug) + File: Passwd (passwd.aug) + File: Pbuilder (pbuilder.aug) + File: Pg_Hba (pg_hba.aug) + File: PHP (php.aug) + File: Phpvars (phpvars.aug) + File: Postfix_Access (postfix_access.aug) + File: Postfix_Main (postfix_main.aug) + File: Postfix_Master (postfix_master.aug) + File: Puppet (puppet.aug) + File: Resolv (resolv.aug) + File: Rsyncd (rsyncd.aug) + File: Samba (samba.aug) + File: Securetty (securetty.aug) + File: Services (services.aug) + File: Shells (shells.aug) + File: Shellvars_list (shellvars_list.aug) + File: Shellvars (shellvars.aug) + File: Slapd (slapd.aug) + File: Soma (soma.aug) + File: Spacevars (spacevars.aug) + File: Squid (squid.aug) + File: Sshd (sshd.aug) + File: Sudoers (sudoers.aug) + File: Sysconfig (sysconfig.aug) + File: Sysctl (sysctl.aug) + File: Syslog (syslog.aug) + File: Vsftpd (vsftpd.aug) + File: Webmin (webmin.aug) + File: Wine (wine.aug) + File: Xinetd (xinetd.aug) + File: Xorg (xorg.aug) + File: Yum (yum.aug) + } # Group: Specific Modules + +Group: Generic Modules { + + File: Build (build.aug) + File: IniFile (inifile.aug) + File: Rx (rx.aug) + File: Sep (sep.aug) + File: Util (util.aug) + } # Group: Generic Modules + +Group: Index { + + Augeas Lens Index: Lenses + Augeas Module Index: Modules + Augeas Variable Index: Variables + Index: Everything + } # Group: Index + diff --git a/doc/naturaldocs/conf/lenses/Topics.txt b/doc/naturaldocs/conf/lenses/Topics.txt new file mode 100644 index 0000000..7054ff0 --- /dev/null +++ b/doc/naturaldocs/conf/lenses/Topics.txt @@ -0,0 +1,105 @@ +Format: 1.52 + +# This is the Natural Docs topics file for this project. If you change anything +# here, it will apply to THIS PROJECT ONLY. If you'd like to change something +# for all your projects, edit the Topics.txt in Natural Docs' Config directory +# instead. + + +Ignore Keywords: + class + + +#------------------------------------------------------------------------------- +# SYNTAX: +# +# Topic Type: [name] +# Alter Topic Type: [name] +# Creates a new topic type or alters one from the main file. Each type gets +# its own index and behavior settings. Its name can have letters, numbers, +# spaces, and these charaters: - / . ' +# +# Plural: [name] +# Sets the plural name of the topic type, if different. +# +# Keywords: +# [keyword] +# [keyword], [plural keyword] +# ... +# Defines or adds to the list of keywords for the topic type. They may only +# contain letters, numbers, and spaces and are not case sensitive. Plural +# keywords are used for list topics. You can redefine keywords found in the +# main topics file. +# +# Index: [yes|no] +# Whether the topics get their own index. Defaults to yes. Everything is +# included in the general index regardless of this setting. +# +# Scope: [normal|start|end|always global] +# How the topics affects scope. Defaults to normal. +# normal - Topics stay within the current scope. +# start - Topics start a new scope for all the topics beneath it, +# like class topics. +# end - Topics reset the scope back to global for all the topics +# beneath it. +# always global - Topics are defined as global, but do not change the scope +# for any other topics. +# +# Class Hierarchy: [yes|no] +# Whether the topics are part of the class hierarchy. Defaults to no. +# +# Page Title If First: [yes|no] +# Whether the topic's title becomes the page title if it's the first one in +# a file. Defaults to no. +# +# Break Lists: [yes|no] +# Whether list topics should be broken into individual topics in the output. +# Defaults to no. +# +# Can Group With: [type], [type], ... +# Defines a list of topic types that this one can possibly be grouped with. +# Defaults to none. +#------------------------------------------------------------------------------- + +# The following topics are defined in the main file, if you'd like to alter +# their behavior or add keywords: +# +# Generic, Class, Interface, Section, File, Group, Function, Variable, +# Property, Type, Constant, Enumeration, Event, Delegate, Macro, +# Database, Database Table, Database View, Database Index, Database +# Cursor, Database Trigger, Cookie, Build Target + +# If you add something that you think would be useful to other developers +# and should be included in Natural Docs by default, please e-mail it to +# topics [at] naturaldocs [dot] org. + + +Topic Type: Augeas Lens + + Plural: Augeas Lenses + Keywords: + view, views + + +Topic Type: Augeas Variable + + Plural: Augeas Variables + Keywords: + variable, variables + + +Topic Type: Augeas Test + + Plural: Augeas Tests + Keywords: + test, tests + + +Topic Type: Augeas Module + + Plural: Augeas Modules + Scope: Start + Page Title If First: Yes + + Keywords: + module, modules diff --git a/doc/syntax/augeas.vim b/doc/syntax/augeas.vim new file mode 100644 index 0000000..0a3983a --- /dev/null +++ b/doc/syntax/augeas.vim @@ -0,0 +1,108 @@ +" Vim syntax file +" Language: Augeas +" Version: 1.0 +" $Id$ +" Maintainer: Bruno Cornec +" Contributors: +" Raphaël Pinson + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + + +syn case ignore +syn sync lines=250 + +syn keyword augeasStatement module let incl transform autoload in rec excl +syn keyword augeasTestStatement test get after put insa insb set rm +syn keyword augeasTodo contained TODO FIXME XXX DEBUG NOTE + +if exists("augeas_symbol_operator") + syn match augeasSymbolOperator "[+\-/*=]" + syn match augeasSymbolOperator "[<>]=\=" + syn match augeasSymbolOperator "<>" + syn match augeasSymbolOperator ":=" + syn match augeasSymbolOperator "[()]" + syn match augeasSymbolOperator "\.\." + syn match augeasSymbolOperator "[\^.]" + syn match augeasMatrixDelimiter "[][]" + "if you prefer you can highlight the range + "syn match augeasMatrixDelimiter "[\d\+\.\.\d\+]" +endif + +if exists("augeas_no_tabs") + syn match augeasShowTab "\t" +endif + +syn region augeasComment start="(\*" end="\*)" contains=augeasTodo,augeasSpaceError + + +if !exists("augeas_no_functions") + " functions + syn keyword augeasLabel del key store label value square seq + syn keyword augeasFunction Util Build Rx Sep Quote +endif + +syn region augeasRegexp start="/" end="[^\\]/" +syn region augeasString start=+"+ end=+"+ skip=+\\"+ + + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_augeas_syn_inits") + if version < 508 + let did_augeas_syn_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink augeasAcces augeasStatement + HiLink augeasBoolean Boolean + HiLink augeasComment Comment + HiLink augeasConditional Conditional + HiLink augeasConstant Constant + HiLink augeasDelimiter Identifier + HiLink augeasDirective augeasStatement + HiLink augeasException Exception + HiLink augeasFloat Float + HiLink augeasFunction Function + HiLink augeasLabel Label + HiLink augeasMatrixDelimiter Identifier + HiLink augeasModifier Type + HiLink augeasNumber Number + HiLink augeasOperator Operator + HiLink augeasPredefined augeasStatement + HiLink augeasPreProc PreProc + HiLink augeasRepeat Repeat + HiLink augeasSpaceError Error + HiLink augeasStatement Statement + HiLink augeasString String + HiLink augeasStringEscape Special + HiLink augeasStringEscapeGPC Special + HiLink augeasRegexp Special + HiLink augeasStringError Error + HiLink augeasStruct augeasStatement + HiLink augeasSymbolOperator augeasOperator + HiLink augeasTestStatement augeasStatement + HiLink augeasTodo Todo + HiLink augeasType Type + HiLink augeasUnclassified augeasStatement + " HiLink augeasAsm Assembler + HiLink augeasError Error + HiLink augeasAsmKey augeasStatement + HiLink augeasShowTab Error + + delcommand HiLink +endif + + +let b:current_syntax = "augeas" + +" vim: ts=8 sw=2 diff --git a/doc/unambig.tex b/doc/unambig.tex new file mode 100644 index 0000000..837def8 --- /dev/null +++ b/doc/unambig.tex @@ -0,0 +1,150 @@ +\documentclass{amsart} + +\usepackage{amsmath} +\usepackage{xspace} +\usepackage{amssymb} +\usepackage{bcprules} + +\newcommand{\ensmath}[1]{\ensuremath{#1}\xspace} + +\newcommand{\opnam}[1]{\ensmath{\operatorname{\mathit{#1}}}} +\newcommand{\nget}{\opnam{get}} +\newcommand{\nput}{\opnam{put}} +\newcommand{\ncreate}{\opnam{create}} +\newcommand{\nkey}{\opnam{key}} +\newcommand{\lget}[1]{\opnam{get}{#1}} +\newcommand{\lput}[3]{\opnam{put}{#1}\,{#2}\,{#3}} +\newcommand{\lcreate}[2]{\opnam{create}{#1}\,{#2}} +\newcommand{\lkey}[1]{\nkey{#1}} + +\newcommand{\suff}{\ensmath{\operatorname{suff}}} +\newcommand{\pref}{\ensmath{\operatorname{pref}}} +\newcommand{\lenstype}[3][K]{\ensmath{{#2}\stackrel{#1}{\Longleftrightarrow}{#3}}} +\newcommand{\tree}[1]{\ensmath{[#1]}} +\newcommand{\niltree}{\ensmath{[]}} +\newcommand{\Regexp}{\ensmath{\mathcal R}} +\newcommand{\reglang}[1]{\ensmath{[\![{#1}]\!]}} +\newcommand{\lens}[1]{\opnam{#1}} +\newcommand{\eps}{\ensmath{\epsilon}} +\newcommand{\conc}[2]{\ensmath{#1\cdot #2}} +\newcommand{\uaconc}[2]{\ensmath{#1\cdot^{!} #2}} +\newcommand{\xconc}[2]{\ensmath{#1\odot #2}} +\newcommand{\alt}[2]{\ensmath{#1\,|\,#2}} +\newcommand{\cstar}[1]{\ensmath{#1^*}} +\newcommand{\uastar}[1]{\ensmath{#1^{!*}}} +\newcommand{\Trees}{\ensmath{\mathcal T}} +\newcommand{\Words}{\ensmath{\Sigma^*}} +\newcommand{\Wordsrhd}{\ensmath{\Words\cup\rhd}} +\newcommand{\tmap}[2]{\ensmath{#1\mapsto #2}} +\newcommand{\tmaptt}[2]{\ensmath{{\mathtt #1}\mapsto {\mathtt #2}}} +\newcommand{\dom}[1]{\ensmath{\mathrm{dom}(#1)}} +\newcommand{\List}{\ensmath{\mathtt{List}}} +\newcommand{\redigits}{\ensmath{\mathtt{D}}} + +\newcommand{\noeps}[1]{\ensmath{{#1}_{\setminus \epsilon}}} + +\newtheorem{theorem}{Theorem} +\newtheorem{lemma}[theorem]{Lemma} +{\theoremstyle{definition} + \newtheorem{defn}{Definition} + \newtheorem*{remark}{Remark} + \newtheorem*{example}{Example}} + +\begin{document} + +\section*{Ambiguity} + +\begin{defn} + For a language $L$ over $\Sigma$, define + \begin{equation*} + \begin{split} + \suff(L) = \{ p \in \Sigma^+ | \exists u \in L: up \in L \}\\ + \pref(L) = \{ p \in \Sigma^+ | \exists v \in L: pv \in L \} + \end{split} + \end{equation*} +\end{defn} +Note that $\suff(L)$ and $\pref(L)$ do not contain $\eps$. Note also that +we only take prefixes and suffixes that can be expanded to a word in $L$ +with another word in $L$, not any word in $\Sigma^*$. + +The set $\suff(L)$ is identical to the left quotient $L^{-1}L$ of $L$ by +itself. Similarly, $\pref(L) = LL^{-1}$. + +\begin{defn} +Two languages $L_1$ and $L_2$ are \emph{unambiguosuly concatenable}, +written \uaconc{L_1}{L_2}, iff for every $u_1, v_1 \in L_1$ and $u_2, v_2 +\in L_2$, if $u_1u_2=v_1v_2$ then $u_1=v_1$ and $u_2=v_2$. +\end{defn} + +\begin{lemma} + The languages $L_1$ and $L_2$ are unambiguously concatenable if and only + if $\suff(L_1) \cap \pref(L_2) = \emptyset$. +\end{lemma} +\begin{proof} +Let $L_1$ and $L_2$ not unambiguously concatenable, i.e. there exist $u_1$, +$v_1$ in $L_1$ and $u_2$, $v_2$ in $L_2$ such that $u_1u_2=v_1v_2$ and +$u_1\neq v_1$ and therefore $u_2 \neq v_2$. Assume $u_1$ is strictly +shorter than $v_1$, therefore $v_1 = u_1 p, p \neq \eps$. With that $v_1v_2 += u_1pv_2$ and $u_2 = pv_2$ and $p \in \suff(L_1) \cap \pref(L_2)$ + +Let $p \in \suff(L_1) \cap \pref(L_2)$. That implies that +there are $u\in L_1$ and $v\in L_2$ such that $up\in L_1$ and $pv\in +L_2$. The word $upv$ can be split as $\conc{up}{v}$ and as $\conc{u}{pv}$ +and therefore $L_1$ and $L_2$ are not unambiguously concatenable. +\end{proof} + +To ease notation we write $\noeps{L}$ for $L\setminus \{ +\epsilon \}$. + +\begin{defn} +A language $L$ is \emph{unambiguously iterable}, written \uastar{L}, iff +for every $u_1,\dots,u_m, v_1,\dots,v_n \in \noeps{L}$ with $u_1\cdots u_m += v_1 \cdots v_n$, $m=n$ and $u_i = v_i$. +\end{defn} + +It is very important that we exclude $\epsilon$ in the definition of +unambiguous iteration, since otherwise \emph{any} language $L$ that +contains $\epsilon$ is trivially not ambiguously iterable, even though that +presents no problems for our purposes, since we never split $\epsilon$ into +more than one word. + +\begin{lemma} +The language $L$ is unambiguously iterable if and only if $\noeps{L}$ and +$\noeps{\cstar{L}}$ are unambiguously concatenable. +\end{lemma} +\begin{proof} +Let $L$ be unambiguously iterable, and assume that there is $u_1v_1 = +u_2v_2$ with $u_i \in \noeps{L}$ and $v_i \in \noeps{\cstar{L}}$ and $u_1 +\neq u_2$. This contradicts $\uastar{L}$ since $\noeps{L}\cdot +\noeps{\cstar{L}}\subseteq \cstar{L}$. + +Let $\uaconc{\noeps{L}}{\noeps{\cstar{L}}}$ and assume there are +$u_1,\dots,u_m, v_1,\dots,v_n \in \noeps{L}$ with $u_1\cdots u_m = v_1 +\cdots v_n$, but there is an $i \leq \min(m,n)$ with $u_i \neq v_i$. We can +assume that $u_1 \neq v_1$\footnote{if $u_1 = v_1$, we simply use + $u_2\cdots u_m$ and $v_2 \cdots v_n$ for this argument}, and therefore +$\min(m,n)\geq 2$. Since $u_1$ and $v_1$ are in $\noeps{L}$, we have an +ambiguous split of a word from $\noeps{L}\cdot\noeps{\cstar{L}}$, +contradicting the initial assumption. +\end{proof} + +\begin{example} +Using regular expression notation, the language $L=(a|b|c|abc)$ is +unambiguously concatenable with itself, but not unambiguosly +iterable. $\cstar{L} = (a|b|c)^*$ and the word $abcabc$ can be split into +$abc\cdot abc$ and $a\cdot bcabc$. This example shows that $\uaconc{L}{L}$ +does not imply $\uastar{L}$, but as the previous lemma showed, +$\uaconc{\noeps{L}}{\noeps{\cstar{L}}}$ does. +\end{example} + +If you have $P = \suff(L_1) \cap \pref(L_2)$, how do you generate a word that +is ambiguous ? +\end{document} + +%% TeX-parse-self: t +%% TeX-auto-save: t + +%% Local Variables: +%% TeX-master: "unambig.tex" +%% compile-command: "pdflatex -file-line-error -halt-on-error unambig.tex" +%% End: diff --git a/doc/xpath.txt b/doc/xpath.txt new file mode 100644 index 0000000..2dc2be5 --- /dev/null +++ b/doc/xpath.txt @@ -0,0 +1,339 @@ +Path expressions +================ + +In the public API, especially for aug_match and aug_get, tree nodes can be +identified with a powerful syntax, that is modelled on the XPath syntax for +XML documents. + +In the simplest case, a path expression just lists a path to some node in +the tree, for example, + + /files/etc/hosts/1/ipaddr + +If multiple nodes have the same label, one of them can be picked out by +providing its position, either counting from the first such node (at +position 1) or counting from the end. For example, the second alias of the +first host entry is + + /files/etc/hosts/1/alias[2] + +and the penultimate alias is + + /files/etc/hosts/1/alias[last() - 1] + +For /etc/hosts, each entry can be thought of as a primary key (the ipaddr) +and additional attributes relating to that primary key, namely the +canonical host name and its aliases. It is therefore natural to refer to +host entries by their ipaddr, not by the synthetic sequence number in their +path. The canonical name of the host entry with ipaddr 127.0.0.1 can be +found with + + /files/etc/hosts/*[ipaddr = "127.0.0.1"]/canonical + +or, equivalently, with + + /files/etc/hosts/*/canonical[../ipaddr = "127.0.0.1"] + +The canonical names of all hosts that have at least one alias: + + /files/etc/hosts/*/canonical[../alias] + +It is also possible to search bigger parts of the tree by using '//'. For +example, all nodes called 'ipaddr' underneath /files/etc can be found with + + /files/etc//ipaddr + +This is handy for finding errors reported by Augeas underneath /augeas: + + /augeas//error + +A lazy way to find localhost is + + /files/etc//ipaddr[. = '127.0.0.1'] + +The vardir entry in the main section of puppet.conf is at + + /files/etc/puppet/puppet.conf/section[. = "main"]/vardir + +All pam entries that use the system-auth module: + + /files/etc/pam.d/*[.//module = "system-auth"] + +More examples can be found in tests/xpath.tests + +One further extension that might be useful is to add boolean operators for +predicates, so that we can write + + /files/etc/hosts/ipaddr[../alias = 'localhost' or ../canonical = 'localhost'] + +Grammar for path expressions +============================ + +Formally, path expressions are generated by this grammar. The grammar uses +nonterminals from the XPath 1.0 grammar to point out the similarities +between XPath and Augeas path expressions. + +Unfortunately, the production for PathExpr is ambiguous, since Augeas is +too liberal in what it allows as labels for tree nodes: the expression '42' +can either be the number 42 (a PrimaryExpr) or the RelativeLocationPath +'child::42'. The reason for this ambiguity is that we allow node names like +'42' in the tree; rather than forbid them, we resolve the ambiguity by +always parsing '42' as a number, and requiring that the user write the +RelativeLocationPath in a different form, e.g. 'child::42' or './42'. + +LocationPath ::= RelativeLocationPath | AbsoluteLocationPath + +AbsoluteLocationPath ::= '/' RelativeLocationPath? + | AbbreviatedAbsoluteLocationPath +AbbreviatedAbsoluteLocationPath ::= '//' RelativeLocationPath + +RelativeLocationPath ::= Step + | RelativeLocationPath '/' Step + | AbbreviatedRelativeLocationPath +AbbreviatedRelativeLocationPath ::= RelativeLocationPath '//' Step + +Step ::= AxisSpecifier NameTest Predicate* | '.' | '..' +AxisSpecifier ::= AxisName '::' | +AxisName ::= 'ancestor' + | 'ancestor-or-self' + | 'child' + | 'descendant' + | 'descendant-or-self' + | 'parent' + | 'self' + | 'root' +NameTest ::= '*' | Name +Predicate ::= "[" Expr "]" * + +PathExpr ::= LocationPath + | FilterExpr + | FilterExpr '/' RelativeLocationPath + | FilterExpr '//' RelativeLocationPath + +FilterExpr ::= PrimaryExpr Predicate + +PrimaryExpr ::= Literal + | Number + | FunctionCall + | VariableReference + | '(' Expr ')' + +FunctionCall ::= Name '(' ( Expr ( ',' Expr )* )? ')' + +Expr ::= EqualityExpr +EqualityExpr ::= RelationalExpr (EqualityOp RelationalExpr)? | ReMatchExpr +ReMatchExpr ::= RelationalExpr MatchOp RelationalExpr +MatchOp ::= "=~" | "!~" +EqualityOp ::= "=" | "!=" +RelationalExpr ::= AdditiveExpr (RelationalOp AdditiveExpr)? +RelationalOp ::= ">" | "<" | ">=" | "<=" +AdditiveExpr ::= MultiplicativeExpr (AdditiveOp MultiplicativeExpr)* +AdditiveOp ::= '+' | '-' +MultiplicativeExpr ::= UnionExpr ('*' UnionExpr)* +UnionExpr ::= PathExpr ("|" PathExpr)* + +Literal ::= '"' /[^"]* / '"' | "'" /[^']* / "'" +Number ::= /[0-9]+/ +/* Names can contain whitespace in the interior */ +NameNoWS ::= [^][|/\= \t\n] | \\. +NameWS ::= [^][|/\=] | \\. +Name ::= NameNoWS NameWS* NameNoWS | NameNoWS + +VariableReference ::= '$' /[a-zA-Z_][a-zA-Z0-9_]*/ + +Additional stuff +================ + +Just for reference, not really interesting as documentation + +XPath 1.0 (from http://www.w3.org/TR/xpath) +------------------------------------------- + +[ 1] LocationPath ::= RelativeLocationPath | AbsoluteLocationPath +[ 2] AbsoluteLocationPath ::= '/' RelativeLocationPath? + | AbbreviatedAbsoluteLocationPath +[ 3] RelativeLocationPath ::= Step + | RelativeLocationPath '/' Step + | AbbreviatedRelativeLocationPath +[ 4] Step ::= AxisSpecifier NodeTest Predicate* + | AbbreviatedStep +[ 5] AxisSpecifier ::= AxisName '::' + | AbbreviatedAxisSpecifier +[ 6] AxisName ::= 'ancestor' + | 'ancestor-or-self' + | 'attribute' + | 'child' + | 'descendant' + | 'descendant-or-self' + | 'following' + | 'following-sibling' + | 'namespace' + | 'parent' + | 'preceding' + | 'preceding-sibling' + | 'self' +[ 7] NodeTest ::= NameTest + | NodeType '(' ')' + | 'processing-instruction' '(' Literal ')' +[ 8] Predicate ::= '[' PredicateExpr ']' +[ 9] PredicateExpr ::= Expr +[10] AbbreviatedAbsoluteLocationPath ::= '//' RelativeLocationPath +[11] AbbreviatedRelativeLocationPath ::= RelativeLocationPath '//' Step +[12] AbbreviatedStep ::= '.' | '..' +[13] AbbreviatedAxisSpecifier ::= '@'? +[14] Expr ::= OrExpr +[15] PrimaryExpr ::= VariableReference + | '(' Expr ')' + | Literal + | Number + | FunctionCall +[16] FunctionCall ::= FunctionName '(' ( Argument ( ',' Argument )* )? ')' +[17] Argument ::= Expr +[18] UnionExpr ::= PathExpr + | UnionExpr '|' PathExpr +[19] PathExpr ::= LocationPath + | FilterExpr + | FilterExpr '/' RelativeLocationPath + | FilterExpr '//' RelativeLocationPath +[20] FilterExpr ::= PrimaryExpr + | FilterExpr Predicate +[21] OrExpr ::= AndExpr | OrExpr 'or' AndExpr +[22] AndExpr ::= EqualityExpr | AndExpr 'and' EqualityExpr +[23] EqualityExpr ::= RelationalExpr + | EqualityExpr '=' RelationalExpr + | EqualityExpr '!=' RelationalExpr +[24] RelationalExpr ::= AdditiveExpr + | RelationalExpr '<' AdditiveExpr + | RelationalExpr '>' AdditiveExpr + | RelationalExpr '<=' AdditiveExpr + | RelationalExpr '>=' AdditiveExpr + +[25] AdditiveExpr ::= MultiplicativeExpr + | AdditiveExpr '+' MultiplicativeExpr + | AdditiveExpr '-' MultiplicativeExpr +[26] MultiplicativeExpr ::= UnaryExpr + | MultiplicativeExpr MultiplyOperator UnaryExpr + | MultiplicativeExpr 'div' UnaryExpr + | MultiplicativeExpr 'mod' UnaryExpr +[27] UnaryExpr ::= UnionExpr + | '-' UnaryExpr +[28] ExprToken ::= '(' | ')' | '[' | ']' | '.' | '..' | '@' | ',' | '::' + | NameTest + | NodeType + | Operator + | FunctionName + | AxisName + | Literal + | Number + | VariableReference +[29] Literal ::= '"' [^"]* '"' + | "'" [^']* "'" +[30] Number ::= Digits ('.' Digits?)? | '.' Digits +[31] Digits ::= [0-9]+ +[32] Operator ::= OperatorName + | MultiplyOperator + | '/' | '//' | '|' | '+' | '-' | '=' | '!=' | '<' | '<=' | '>' | '>=' +[33] OperatorName ::= 'and' | 'or' | 'mod' | 'div' +[34] MultiplyOperator ::= '*' +[35] FunctionName ::= QName - NodeType +[36] VariableReference ::= '$' QName +[37] NameTest ::= '*' | NCName ':' '*' | QName +[38] NodeType ::= 'comment' | 'text' + | 'processing-instruction' + | 'node' +[39] ExprWhitespace ::= (#x20 | #x9 | #xD | #xA)+ + +Useful subset +------------- + +Big swath of XPath 1.0 that might be interesting for Augeas + +start symbol [14] Expr + +[14] Expr ::= OrExpr +[21] OrExpr ::= AndExpr ('or' AndExpr)* +[22] AndExpr ::= EqualityExpr ('and' EqualityExpr)* +[23] EqualityExpr ::= RelationalExpr + | EqualityExpr '=' RelationalExpr + | EqualityExpr '!=' RelationalExpr +[24] RelationalExpr ::= AdditiveExpr + | RelationalExpr '<' AdditiveExpr + | RelationalExpr '>' AdditiveExpr + | RelationalExpr '<=' AdditiveExpr + | RelationalExpr '>=' AdditiveExpr +[25] AdditiveExpr ::= MultiplicativeExpr + | AdditiveExpr '+' MultiplicativeExpr + | AdditiveExpr '-' MultiplicativeExpr +[26] MultiplicativeExpr ::= UnaryExpr + | MultiplicativeExpr MultiplyOperator UnaryExpr +[27] UnaryExpr ::= UnionExpr | '-' UnaryExpr +[18] UnionExpr ::= PathExpr ('|' PathExpr)* + +[19] PathExpr ::= LocationPath + | FilterExpr + | FilterExpr '/' RelativeLocationPath + | FilterExpr '//' RelativeLocationPath + +[ 1] LocationPath ::= RelativeLocationPath | AbsoluteLocationPath +[ 3] RelativeLocationPath ::= Step + | RelativeLocationPath '/' Step + | AbbreviatedRelativeLocationPath +[11] AbbreviatedRelativeLocationPath ::= RelativeLocationPath '//' Step +[ 2] AbsoluteLocationPath ::= '/' RelativeLocationPath? + | AbbreviatedAbsoluteLocationPath +[10] AbbreviatedAbsoluteLocationPath ::= '//' RelativeLocationPath + +[ 4] Step ::= AxisSpecifier NameTest Predicate* | '.' | '..' +[ 5] AxisSpecifier ::= AxisName '::' | + +[ 6] AxisName ::= 'ancestor' + | 'ancestor-or-self' + | 'attribute' + | 'child' + | 'descendant' + | 'descendant-or-self' + | 'following' + | 'following-sibling' + | 'namespace' + | 'parent' + | 'preceding' + | 'preceding-sibling' + | 'self' + +[ 8] Predicate ::= '[' Expr ']' + +[20] FilterExpr ::= PrimaryExpr Predicate* +[15] PrimaryExpr ::= '(' Expr ')' + | Literal + | Number + | FunctionCall +[16] FunctionCall ::= FunctionName '(' ( Argument ( ',' Argument )* )? ')' +[17] Argument ::= Expr + +Lexical structure + +[28] ExprToken ::= '(' | ')' | '[' | ']' | '.' | '..' | '@' | ',' | '::' + | NameTest + | NodeType + | Operator + | FunctionName + | AxisName + | Literal + | Number + | VariableReference +[29] Literal ::= '"' [^"]* '"' + | "'" [^']* "'" +[30] Number ::= Digits ('.' Digits?)? | '.' Digits +[31] Digits ::= [0-9]+ +[32] Operator ::= OperatorName + | MultiplyOperator + | '/' | '//' | '|' | '+' | '-' | '=' | '!=' | '<' | '<=' | '>' | '>=' +[33] OperatorName ::= 'and' | 'or' | 'mod' | 'div' +[34] MultiplyOperator ::= '*' +[35] FunctionName ::= QName - NodeType +[36] VariableReference ::= '$' QName +[37] NameTest ::= '*' | QName +[38] NodeType ::= 'comment' | 'text' + | 'processing-instruction' + | 'node' +[39] ExprWhitespace ::= (#x20 | #x9 | #xD | #xA)+ diff --git a/docker/Dockerfile b/docker/Dockerfile new file mode 100644 index 0000000..527ed15 --- /dev/null +++ b/docker/Dockerfile @@ -0,0 +1,22 @@ +FROM alpine AS build + +RUN apk add --no-cache --virtual=.build gcc libc-dev make bison flex readline-dev libxml2-dev git automake autoconf libtool pkgconf coreutils bash +COPY . /augeas +RUN set -ex ; \ + cd augeas \ + && ./autogen.sh --prefix=/opt/augeas \ + && make \ + && make install + +FROM alpine +RUN apk add --no-cache libgcc libxml2 readline bash +COPY --from=build /opt/augeas /opt/augeas +ENV PATH=$PATH:/opt/augeas/bin +RUN set -x ; \ + cd /opt/augeas/bin \ + && for TOOL in augcheck auggrep augload augloadone augparsediff augsed ; \ + do \ + wget https://raw.githubusercontent.com/raphink/augeas-sandbox/master/"$TOOL" ; \ + chmod +x "$TOOL" ; \ + done +CMD augtool diff --git a/docker/README.md b/docker/README.md new file mode 100644 index 0000000..bee1ecd --- /dev/null +++ b/docker/README.md @@ -0,0 +1,19 @@ +Building the image +------------------ + +First clone augeas repository then, build the image: + +```shell +git clone https://github.com/hercules-team/augeas.git +cd augeas +docker build -t augeas -f docker/Dockerfile . +``` + +Using the image +--------------- + +Here is an exemple to print ssh configuration: + +```shell +docker container run -ti --rm -v /etc/ssh/:/etc/ssh augeas augtool print /files/etc/ssh +``` diff --git a/examples/Makefile.am b/examples/Makefile.am new file mode 100644 index 0000000..0edefbd --- /dev/null +++ b/examples/Makefile.am @@ -0,0 +1,12 @@ + +AM_CFLAGS = @AUGEAS_CFLAGS@ @WARN_CFLAGS@ @LIBXML_CFLAGS@ \ + -I $(top_srcdir)/src + +bin_PROGRAMS = fadot +noinst_PROGRAMS = dump + +fadot_SOURCES = fadot.c +fadot_LDADD = $(top_builddir)/src/libfa.la + +dump_sources = dump.c +dump_LDADD = $(top_builddir)/src/libaugeas.la $(top_builddir)/src/libfa.la diff --git a/examples/cont.aug b/examples/cont.aug new file mode 100644 index 0000000..c2e2e69 --- /dev/null +++ b/examples/cont.aug @@ -0,0 +1,66 @@ +module Cont = + + (* An experiment in handling empty lines and comments in httpd.conf and + * similar. What makes this challenging is that httpd.conf allows + * continuation lines; the markers for continuation lines (backslash + + * newline) needs to be treated like any other whitespace. *) + + (* The continuation sequence that indicates that we should consider the + * next line part of the current line *) + let cont = /\\\\\r?\n/ + + (* Whitespace within a line: space, tab, and the continuation sequence *) + let ws = /[ \t]/ | cont + + (* Any possible character - '.' does not match \n *) + let any = /(.|\n)/ + + (* Newline sequence - both for Unix and DOS newlines *) + let nl = /\r?\n/ + + (* Whitespace at the end of a line *) + let eol = del (ws* . nl) "\n" + + (* A complete line that is either just whitespace or a comment that only + * contains whitespace *) + let empty = [ del (ws* . /#?/ . ws* . nl) "\n" ] + + (* A comment that is not just whitespace. We define it in terms of the + * things that are not allowed as part of such a comment: + * 1) Starts with whitespace or newline + * 2) Ends with whitespace, a backslash or \r + * 3) Unescaped newlines + *) + let comment = + let comment_start = del (ws* . "#" . ws* ) "# " in + let unesc_eol = /[^\]/ . nl in + (* As a complement, the above criteria can be written as + let line = any* - ((ws|nl) . any* + | any* . (ws|/[\r\\]/) + | any* . unesc_eol . any* )? in + * Printing this out with 'print_regexp line' and simplifying it while + * checking for equality with the ruby-fa bindings, we can write this + * as follows: *) + let w = /[^\t\n\r \\]/ in + let r = /[\r\\]/ in + let s = /[\t\r ]/ in + let b = "\\\\" in + let t = /[\t\n\r ]/ in + let line = ((r . s* . w|w|r) . (s|w)* . (b . (t? . (s|w)* ))*|(r.s* )?).w.(s*.w)* in + [ label "#comment" . comment_start . store line . eol ] + + let lns = (comment|empty)* + + test [eol] get " \n" = { } + test [eol] get " \t\n" = { } + test [eol] get "\\\n\n" = { } + + + test lns get "# \\\r\n \t \\\n\n" = { } + test lns get "# x\n" = { "#comment" = "x" } + test lns get "# x\\\n\n" = { "#comment" = "x" } + test lns get "# \\\r\n \tx \\\n\n" = { "#comment" = "x" } + test lns get " \t\\\n# x\n" = { "#comment" = "x" } + test lns get "# word\\\n word \n" = { "#comment" = "word\\\n word" } + (* Not valid as it is an incomplete 'line' *) + test lns get "# x\\\n" = * diff --git a/examples/dump.c b/examples/dump.c new file mode 100644 index 0000000..51a3c97 --- /dev/null +++ b/examples/dump.c @@ -0,0 +1,159 @@ +/* + * dump.c: + * + * Copyright (C) 2009 Red Hat Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Author: David Lutterkort + */ + +/* + * Example program for dumping (part of) the Augeas tree. + * + * Run it as 'dump [-n] [pattern] > /tmp/out.txt' to dump all the nodes + * matching PATTERN. The PATTERN '/files//descendant::*' dumps all nodes + * from files, and '//descendant::*' dumps absolutely everything. If -n is + * passed, uses a variable and aug_ns_* functions. Without -n, uses + * aug_match and straight aug_get/aug_label/aug_source. + * + * You might have to set AUGEAS_ROOT and AUGEAS_LENS_LIB to point at the + * right things. For example, to run dump against the tree that the Augeas + * tests use, and to use the lenses in the checkout, run it as + * AUGEAS_ROOT=$PWD/tests/root AUGEAS_LENS_LIB=$PWD/lenses \ + * dump '//descendant::*' + * + */ + +#include + +#include +#include +#include +#include + +/* + * Print out information for all nodes matching PATH using aug_match and + * then aug_get etc. on each of the matches. + */ +static void dump_match(struct augeas *aug, const char *path) { + char **matches; + int nmatches; + int i; + + nmatches = aug_match(aug, path, &matches); + if (nmatches < 0) { + fprintf(stderr, "aug_match for '%s' failed\n", path); + fprintf(stderr, "error: %s\n", aug_error_message(aug)); + exit(1); + } + + fprintf(stderr, "iterating matches\n"); + fprintf(stderr, "%d matches for %s\n", nmatches, path); + + for (i=0; i < nmatches; i++) { + const char *value, *label; + char *file; + + aug_get(aug, matches[i], &value); + aug_label(aug, matches[i], &label); + aug_source(aug, matches[i], &file); + + printf("%s: %s %s %s\n", matches[i], label, value, file); + free(file); + free(matches[i]); + } + free(matches); +} + +/* + * Print out information for all nodes matching PATH using aug_ns_* + * functions + */ +static void dump_var(struct augeas *aug, const char *path) { + int nmatches; + int i; + + /* Define the variable 'matches' to hold all the nodes we are + interested in */ + aug_defvar(aug, "matches", path); + + /* Count how many nodes we have */ + nmatches = aug_match(aug, "$matches", NULL); + if (nmatches < 0) { + fprintf(stderr, "aug_match for '%s' failed\n", path); + fprintf(stderr, "error: %s\n", aug_error_message(aug)); + exit(1); + } + + fprintf(stderr, "using var and aug_ns_*\n"); + fprintf(stderr, "%d matches for %s\n", nmatches, path); + + for (i=0; i < nmatches; i++) { + const char *value, *label; + char *file = NULL; + + /* Get information about the ith node, equivalent to calling + * aug_get etc. for "$matches[i]" but much more efficient internally + */ + aug_ns_attr(aug, "matches", i, &value, &label, &file); + + printf("%d: %s %s %s\n", i, label, value, file); + free(file); + } +} + +static void print_time_taken(const struct timeval *start, + const struct timeval *stop) { + time_t elapsed = (stop->tv_sec - start->tv_sec)*1000 + + (stop->tv_usec - start->tv_usec)/1000; + fprintf(stderr, "time: %ld ms\n", elapsed); +} + +int main(int argc, char **argv) { + int opt; + int use_var = 0; + const char *pattern = "/files//*"; + struct timeval stop, start; + + while ((opt = getopt(argc, argv, "n")) != -1) { + switch (opt) { + case 'n': + use_var = 1; + break; + default: + fprintf(stderr, "Usage: %s [-n] [pattern]\n", argv[0]); + fprintf(stderr, " without '-n', iterate matches\n"); + fprintf(stderr, " with '-n', use a variable and aug_ns_*\n"); + exit(EXIT_FAILURE); + break; + } + } + + struct augeas *aug = aug_init(NULL, NULL, 0); + + if (optind < argc) + pattern = argv[optind]; + + gettimeofday(&start, NULL); + if (use_var) { + dump_var(aug, pattern); + } else { + dump_match(aug, pattern); + } + gettimeofday(&stop, NULL); + print_time_taken(&start, &stop); + return 0; +} diff --git a/examples/examples.sh b/examples/examples.sh new file mode 100755 index 0000000..bc78ff4 --- /dev/null +++ b/examples/examples.sh @@ -0,0 +1,21 @@ +#!/bin/sh +# create some examples of operations on finite automaton + +export PATH=./:$PATH + +dest=/tmp/fadot-examples +mkdir -p $dest + +fadot -f $dest/sample.dot -o show "[a-z]*" +fadot -f $dest/concat.dot -o concat "[a-b]" "[b-c]" +fadot -f $dest/union.dot -o union "[a-b]" "[b-c]" +fadot -f $dest/intersect.dot -o intersect "[a-b]" "[b-c]" +fadot -f $dest/complement.dot -o complement "[a-z]" +fadot -f $dest/minus.dot -o minus "[a-z]" "[a-c]" + + +for i in $(ls -1 $dest/*.dot|cut -d. -f1); do + dot -Tpng -o $i.png $i.dot +done + +echo "Example compilation complete. Results are available in directory $dest" diff --git a/examples/fadot.c b/examples/fadot.c new file mode 100644 index 0000000..1993ffa --- /dev/null +++ b/examples/fadot.c @@ -0,0 +1,303 @@ +/* + * fadot.c: example usage of finite automata library + * + * Copyright (C) 2009, Francis Giraldeau + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Author: Francis Giraldeau + */ + +/* + * The purpose of this example is to show the usage of libfa + */ + +#include +#include +#include +#include +#include +#include + +#include + +#define UCHAR_NUM (UCHAR_MAX+1) + +const char *progname; + +static const char *const escape_chars = "\"\a\b\t\n\v\f\r\\"; +static const char *const escape_names = "\"abtnvfr\\"; + +__attribute__((noreturn)) +static void usage(void) { + fprintf(stderr, "\nUsage: %s [OPTIONS] REGEXP\n", progname); + fprintf(stderr, "\nCompile REGEXP and apply operation to them. By default, just print\n"); + fprintf(stderr, "the minimized regexp.\n"); + fprintf(stderr, "\nOptions:\n\n"); + fprintf(stderr, " -o OPERATION one of : show concat union intersect json\n"); + fprintf(stderr, " complement minus example print\n"); + fprintf(stderr, " -f DOT_FILE Path of output .dot file\n"); + fprintf(stderr, " -n do not minimize resulting finite automaton\n"); + + exit(EXIT_FAILURE); +} + +int main (int argc, char **argv) { + + opterr = 0; + + int reduce = 1; + char *file_output = NULL; + const char *operation = NULL; + FILE *fd; + int c; + int nb_regexp = 0; + + progname = argv[0]; + + while ((c = getopt (argc, argv, "nhf:o:")) != -1) + switch (c) + { + case 'n': + reduce = 0; + break; + case 'f': + file_output = optarg; + break; + case 'h': + usage(); + break; + case 'o': + operation = optarg; + break; + case '?': + if (optopt == 'o' || optopt == 'f') + fprintf (stderr, "Option -%c requires an argument.\n", optopt); + else if (isprint (optopt)) + fprintf (stderr, "Unknown option `-%c'.\n", optopt); + else + fprintf (stderr, + "Unknown option character `\\x%x'.\n", + optopt); + usage(); + break; + default: + usage(); + break; + } + + //printf ("reduce = %d, file_output = %s, operation = %s\n", + // reduce, file_output, operation); + + if (operation == NULL) + operation = "show"; + + for (int i = optind; i < argc; i++) { + nb_regexp++; + } + + if (nb_regexp == 0) { + printf("Please specify regexp to process.\n"); + usage(); + } + + struct fa* fa_result = NULL; + + if (!strcmp(operation,"show")) { + fa_compile(argv[optind], strlen(argv[optind]), &fa_result); + } else if (!strcmp(operation,"concat")) { + + if (nb_regexp < 2) { + fprintf(stderr,"Please specify 2 or more regexp to concat"); + return 1; + } + + fa_result = fa_make_basic(FA_EPSILON); + struct fa* fa_tmp; + for (int i = optind; i < argc; i++) { + fa_compile(argv[i], strlen(argv[i]), &fa_tmp); + fa_result = fa_concat(fa_result, fa_tmp); + } + + } else if (!strcmp(operation, "union")) { + + if (nb_regexp < 2) { + fprintf(stderr,"Please specify 2 or more regexp to union"); + return 1; + } + + fa_result = fa_make_basic(FA_EMPTY); + + struct fa* fa_tmp; + for (int i = optind; i < argc; i++) { + fa_compile(argv[i], strlen(argv[i]), &fa_tmp); + fa_result = fa_union(fa_result, fa_tmp); + } + + } else if (!strcmp(operation, "intersect")) { + + if (nb_regexp < 2) { + fprintf(stderr,"Please specify 2 or more regexp to intersect"); + return 1; + } + + fa_compile(argv[optind], strlen(argv[optind]), &fa_result); + struct fa* fa_tmp; + + for (int i = optind+1; i < argc; i++) { + fa_compile(argv[i], strlen(argv[i]), &fa_tmp); + fa_result = fa_intersect(fa_result, fa_tmp); + } + + } else if (!strcmp(operation, "complement")) { + + if (nb_regexp >= 2) { + fprintf(stderr,"Please specify one regexp to complement"); + return 1; + } + + fa_compile(argv[optind], strlen(argv[optind]), &fa_result); + fa_result = fa_complement(fa_result); + + } else if (!strcmp(operation, "minus")) { + + if (nb_regexp != 2) { + fprintf(stderr,"Please specify 2 regexp for operation minus"); + return 1; + } + + struct fa* fa_tmp1; + struct fa* fa_tmp2; + fa_compile(argv[optind], strlen(argv[optind]), &fa_tmp1); + fa_compile(argv[optind+1], strlen(argv[optind+1]), &fa_tmp2); + fa_result = fa_minus(fa_tmp1, fa_tmp2); + + } else if (!strcmp(operation, "example")) { + + if (nb_regexp != 1) { + fprintf(stderr,"Please specify one regexp for operation example"); + return 1; + } + + char* word = NULL; + size_t word_len = 0; + fa_compile(argv[optind], strlen(argv[optind]), &fa_result); + fa_example(fa_result, &word, &word_len); + printf("Example word = %s\n", word); + + } else if (!strcmp(operation, "json")) { + if (nb_regexp != 1) { + fprintf(stderr,"Please specify one regexp for operation example"); + return 1; + } + + fa_compile(argv[optind], strlen(argv[optind]), &fa_result); + + if (reduce) { + fa_minimize(fa_result); + } + + if (file_output != NULL) { + if ((fd = fopen(file_output, "w")) == NULL) { + fprintf(stderr, "Error while opening file %s \n", file_output); + return 1; + } + + fa_json(fd, fa_result); + fclose(fd); + } else { + fa_json(stdout, fa_result); + } + + return 0; + + } else if (!strcmp(operation, "print")) { + if (nb_regexp != 1) { + fprintf(stderr,"Please specify one regexp for operation example"); + return 1; + } + + fa_compile(argv[optind], strlen(argv[optind]), &fa_result); + + if (reduce) { + fa_minimize(fa_result); + } + + struct state *st, *st2; + uint32_t num_trans, i; + unsigned char begin, end; + + st = fa_state_initial(fa_result); + + printf("%s. Initial state: %p", fa_is_deterministic(fa_result) ? "DFA" : "NFA", fa_result); + + while (st != NULL) { + num_trans = fa_state_num_trans(st); + printf("\nFrom state %p (final = %s):\n", st, fa_state_is_accepting(st) == 1 ? "true" : "false"); + for (i = 0; i < num_trans; i++) { + if (fa_state_trans(st, i, &st2, &begin, &end) < 0) { + printf("Some error occur. \n"); + } + if (begin == end) + printf(" to: %p, label: %d\n", st2, begin); + else + printf(" to: %p, label: %d-%d\n", st2, begin, end); + } + st = fa_state_next(st); + } + + return 0; + + } + + if (reduce) { + fa_minimize(fa_result); + } + + if (file_output != NULL) { + if ((fd = fopen(file_output, "w")) == NULL) { + fprintf(stderr, "Error while opening file %s \n", file_output); + return 1; + } + + fa_dot(fd, fa_result); + fclose(fd); + } else { + int r; + char *rx; + size_t rx_len; + + r = fa_as_regexp(fa_result, &rx, &rx_len); + if (r < 0) { + fprintf(stderr, "Converting FA to regexp failed\n"); + return 1; + } + + for (size_t i=0; i < rx_len; i++) { + char *p; + if (rx[i] && ((p = strchr(escape_chars, rx[i])) != NULL)) { + printf("\\%c", escape_names[p - escape_chars]); + } else if (! isprint(rx[i])) { + printf("\\%030o", (unsigned char) rx[i]); + } else { + putchar(rx[i]); + } + } + putchar('\n'); + free(rx); + } + + return 0; +} diff --git a/lenses/access.aug b/lenses/access.aug new file mode 100644 index 0000000..39920d3 --- /dev/null +++ b/lenses/access.aug @@ -0,0 +1,128 @@ +(* +Module: Access + Parses /etc/security/access.conf + +Author: Lorenzo Dalrio + +About: Reference + Some examples of valid entries can be found in access.conf or "man access.conf" + +About: License + This file is licensed under the LGPL v2+, like the rest of Augeas. + +About: Lens Usage + Sample usage of this lens in augtool + + * Add a rule to permit login of all users from local sources (tty's, X, cron) + > set /files/etc/security/access.conf[0] + + > set /files/etc/security/access.conf[0]/user ALL + > set /files/etc/security/access.conf[0]/origin LOCAL + +About: Configuration files + This lens applies to /etc/security/access.conf. See . + +About: Examples + The file contains various examples and tests. +*) +module Access = + autoload xfm + +(* Group: Comments and empty lines *) +(* Variable: comment *) +let comment = Util.comment +(* Variable: empty *) +let empty = Util.empty + +(* Group: Useful primitives *) +(* Variable: colon + * this is the standard field separator " : " + *) +let colon = del (Rx.opt_space . ":" . Rx.opt_space) " : " + + +(************************************************************************ + * Group: ENTRY LINE + *************************************************************************) +(* View: access + * Allow (+) or deny (-) access + *) +let access = label "access" . store /[+-]/ + +(* Variable: identifier_re + Regex for user/group identifiers *) +let identifier_re = /[A-Za-z0-9_.\\-]+/ + +(* View: user_re + * Regex for user/netgroup fields + *) +let user_re = identifier_re - /[Ee][Xx][Cc][Ee][Pp][Tt]/ + +(* View: user + * user can be a username, username@hostname or a group + *) +let user = [ label "user" + . ( store user_re + | store Rx.word . Util.del_str "@" + . [ label "host" . store Rx.word ] ) ] + +(* View: group + * Format is (GROUP) + *) +let group = [ label "group" + . Util.del_str "(" . store identifier_re . Util.del_str ")" ] + +(* View: netgroup + * Format is @NETGROUP[@@NISDOMAIN] + *) +let netgroup = + [ label "netgroup" . Util.del_str "@" . store user_re + . [ label "nisdomain" . Util.del_str "@@" . store Rx.word ]? ] + +(* View: user_list + * A list of users or netgroups to apply the rule to + *) +let user_list = Build.opt_list (user|group|netgroup) Sep.space + +(* View: origin_list + * origin_list can be a single ipaddr/originname/domain/fqdn or a list of those values + *) +let origin_list = + let origin_re = Rx.no_spaces - /[Ee][Xx][Cc][Ee][Pp][Tt]/ + in Build.opt_list [ label "origin" . store origin_re ] Sep.space + +(* View: except + * The except operator makes it possible to write very compact rules. + *) +let except (lns:lens) = [ label "except" . Sep.space + . del /[Ee][Xx][Cc][Ee][Pp][Tt]/ "EXCEPT" + . Sep.space . lns ] + +(* View: entry + * A valid entry line + * Definition: + * > entry ::= access ':' user ':' origin_list + *) +let entry = [ access . colon + . user_list + . (except user_list)? + . colon + . origin_list + . (except origin_list)? + . Util.eol ] + +(************************************************************************ + * Group: LENS & FILTER + *************************************************************************) +(* View: lns + The access.conf lens, any amount of + * lines + * + * +*) +let lns = (comment|empty|entry) * + +(* Variable: filter *) +let filter = incl "/etc/security/access.conf" + +(* xfm *) +let xfm = transform lns filter diff --git a/lenses/activemq_conf.aug b/lenses/activemq_conf.aug new file mode 100644 index 0000000..191d811 --- /dev/null +++ b/lenses/activemq_conf.aug @@ -0,0 +1,61 @@ +(* +Module: ActiveMQ_Conf + ActiveMQ / FuseMQ conf module for Augeas + +Author: Brian Redbeard + +About: Reference + This lens ensures that conf files included in ActiveMQ /FuseMQ are properly + handled by Augeas. + +About: License + This file is licensed under the LGPL License. + +About: Lens Usage + Sample usage of this lens in augtool: + + * Get your current setup + > print /files/etc/activemq.conf + ... + + * Change ActiveMQ Home + > set /files/etc/activemq.conf/ACTIVEMQ_HOME /usr/share/activemq + + Saving your file: + + > save + +About: Configuration files + This lens applies to relevant conf files located in /etc/activemq/ and + the file /etc/activemq.conf . See . + +*) + +module ActiveMQ_Conf = + autoload xfm + +(* Variable: blank_val *) +let blank_val = del /^\z/ + +(* View: entry *) +let entry = + Build.key_value_line Rx.word Sep.space_equal Quote.any_opt + +(* View: empty_entry *) +let empty_entry = Build.key_value_line Rx.word Sep.equal Quote.dquote_opt_nil + +(* View: lns *) +let lns = (Util.empty | Util.comment | entry | empty_entry )* + +(* Variable: filter *) +let filter = incl "/etc/activemq.conf" + . incl "/etc/activemq/*" + . excl "/etc/activemq/*.xml" + . excl "/etc/activemq/jmx.*" + . excl "/etc/activemq/jetty-realm.properties" + . excl "/etc/activemq/*.ts" + . excl "/etc/activemq/*.ks" + . excl "/etc/activemq/*.cert" + . Util.stdexcl + +let xfm = transform lns filter diff --git a/lenses/activemq_xml.aug b/lenses/activemq_xml.aug new file mode 100644 index 0000000..df2a222 --- /dev/null +++ b/lenses/activemq_xml.aug @@ -0,0 +1,41 @@ +(* +Module: ActiveMQ_XML + ActiveMQ / FuseMQ XML module for Augeas + +Author: Brian Redbeard + +About: Reference + This lens ensures that XML files included in ActiveMQ / FuseMQ are properly + handled by Augeas. + +About: License + This file is licensed under the LGPL License. + +About: Lens Usage + Sample usage of this lens in augtool: + + * Get your current setup + > print /files/etc/activemq/activemq.xml + ... + + * Change OpenShift domain + > set /files/etc/openshift/broker.conf/CLOUD_DOMAIN ose.example.com + + Saving your file: + + > save + +About: Configuration files + This lens applies to relevant XML files located in /etc/activemq/ . See . + +*) + +module ActiveMQ_XML = + autoload xfm + +let lns = Xml.lns + +let filter = (incl "/etc/activemq/*.xml") + . Util.stdexcl + +let xfm = transform lns filter diff --git a/lenses/afs_cellalias.aug b/lenses/afs_cellalias.aug new file mode 100644 index 0000000..6b67675 --- /dev/null +++ b/lenses/afs_cellalias.aug @@ -0,0 +1,60 @@ +(* +Module: AFS_cellalias + Parses AFS configuration file CellAlias + +Author: Pat Riehecky + +About: Reference + This lens is targeted at the OpenAFS CellAlias file + +About: Lens Usage + Sample usage of this lens in augtool + + * Add a CellAlias for fnal.gov/files to fnal-files + > set /files/usr/vice/etc/CellAlias/target[99] fnal.gov/files + > set /files/usr/vice/etc/CellAlias/target[99]/linkname fnal-files + +About: License + This file is licensed under the LGPL v2+, like the rest of Augeas. +*) + +module AFS_cellalias = + autoload xfm + + (************************************************************************ + * Group: USEFUL PRIMITIVES + *************************************************************************) + + (* Group: Comments and empty lines *) + + (* View: eol *) + let eol = Util.eol + (* View: comment *) + let comment = Util.comment + (* View: empty *) + let empty = Util.empty + + (* Group: separators *) + + (* View: space + * Separation between key and value + *) + let space = Util.del_ws_spc + let target = /[^ \t\n#]+/ + let linkname = Rx.word + + (************************************************************************ + * Group: ENTRIES + *************************************************************************) + + (* View: entry *) + let entry = [ label "target" . store target . space . [ label "linkname" . store linkname . eol ] ] + + (* View: lns *) + let lns = (empty | comment | entry)* + + let xfm = transform lns (incl "/usr/vice/etc/CellAlias") + +(* Local Variables: *) +(* mode: caml *) +(* End: *) diff --git a/lenses/aliases.aug b/lenses/aliases.aug new file mode 100644 index 0000000..10c2d66 --- /dev/null +++ b/lenses/aliases.aug @@ -0,0 +1,89 @@ +(* +Module: Aliases + Parses /etc/aliases + +Author: David Lutterkort + +About: Reference + This lens tries to keep as close as possible to `man 5 aliases` where possible. + +About: License + This file is licenced under the LGPL v2+, like the rest of Augeas. + +About: Lens Usage + See . + +About: Configuration files + This lens applies to /etc/aliases. + +About: Examples + The file contains various examples and tests. +*) + +module Aliases = + autoload xfm + + (************************************************************************ + * Group: USEFUL PRIMITIVES + *************************************************************************) + + (* Group: basic tokens *) + + (* Variable: word *) + let word = /[^|", \t\n]+/ + (* Variable: name *) + let name = /([^ \t\n#:|@]+|"[^"|\n]*")/ (* " make emacs calm down *) + + (* Variable: command + * a command can contain spaces, if enclosed in double quotes, the case + * without spaces is taken care with + *) + let command = /(\|([^", \t\n]+|"[^"\n]+"))|("\|[^"\n]+")/ + + (* Group: Comments and empty lines *) + + (* View: eol *) + let eol = Util.eol + (* View: comment *) + let comment = Util.comment + (* View: empty *) + let empty = Util.empty + + (* Group: separators *) + (* View: colon + * Separation between the alias and it's destinations + *) + let colon = del /[ \t]*:[ \t]*/ ":\t" + (* View: comma + * Separation between multiple destinations + *) + let comma = del /[ \t]*,[ \t]*(\n[ \t]+)?/ ", " + + (* Group: alias *) + + (* View: destination + * Can be either a word (no spaces included) or a command with spaces + *) + let destination = ( word | command ) + + (* View: value_list + * List of destinations + *) + let value_list = Build.opt_list ([ label "value" . store destination]) comma + + (* View: alias + * a name with one or more destinations + *) + let alias = [ seq "alias" . + [ label "name" . store name ] . colon . + value_list + ] . eol + + (* View: lns *) + let lns = (comment | empty | alias)* + + let xfm = transform lns (incl "/etc/aliases") + +(* Local Variables: *) +(* mode: caml *) +(* End: *) diff --git a/lenses/anaconda.aug b/lenses/anaconda.aug new file mode 100644 index 0000000..8f618db --- /dev/null +++ b/lenses/anaconda.aug @@ -0,0 +1,30 @@ +(* +Module: Anaconda + Parses Anaconda's user interaction configuration files. + +Author: Pino Toscano + +About: Reference + https://anaconda-installer.readthedocs.io/en/latest/user-interaction-config-file-spec.html + +About: Configuration file + This lens applies to /etc/sysconfig/anaconda. + +About: License + This file is licensed under the LGPL v2+, like the rest of Augeas. +*) +module Anaconda = +autoload xfm + +let comment = IniFile.comment "#" "#" +let sep = IniFile.sep "=" "=" + +let entry = IniFile.entry IniFile.entry_re sep comment +let title = IniFile.title IniFile.record_re +let record = IniFile.record title entry + +let lns = IniFile.lns record comment + +let filter = incl "/etc/sysconfig/anaconda" + +let xfm = transform lns filter diff --git a/lenses/anacron.aug b/lenses/anacron.aug new file mode 100644 index 0000000..e7aa5ca --- /dev/null +++ b/lenses/anacron.aug @@ -0,0 +1,87 @@ +(* +Module: Anacron + Parses /etc/anacrontab + +Author: Raphael Pinson + +About: Reference + This lens tries to keep as close as possible to `man 5 anacrontab` where + possible. + +About: License + This file is licensed under the LGPL v2+, like the rest of Augeas. + +About: Lens Usage + +About: Configuration files + This lens applies to /etc/anacrontab. See . + +About: Examples + The file contains various examples and tests. +*) + +module Anacron = + autoload xfm + +(************************************************************************ + * Group: ENTRIES + *************************************************************************) + + +(************************************************************************ + * View: shellvar + * A shell variable in crontab + *************************************************************************) + +let shellvar = Cron.shellvar + + +(* View: period *) +let period = [ label "period" . store Rx.integer ] + +(* Variable: period_name_re + The valid values for . Currently only "monthly" *) +let period_name_re = "monthly" + +(************************************************************************ + * View: period_name + * In the format "@keyword" + *************************************************************************) +let period_name = [ label "period_name" . Util.del_str "@" + . store period_name_re ] + +(************************************************************************ + * View: delay + * The delay for an + *************************************************************************) +let delay = [ label "delay" . store Rx.integer ] + +(************************************************************************ + * View: job_identifier + * The job_identifier for an + *************************************************************************) +let job_identifier = [ label "job-identifier" . store Rx.word ] + +(************************************************************************ + * View: entry + * An anacrontab entry + *************************************************************************) + +let entry = [ label "entry" . Util.indent + . ( period | period_name ) + . Sep.space . delay + . Sep.space . job_identifier + . Sep.space . store Rx.space_in . Util.eol ] + + +(* + * View: lns + * The anacron lens + *) +let lns = ( Util.empty | Util.comment | shellvar | entry )* + + +(* Variable: filter *) +let filter = incl "/etc/anacrontab" + +let xfm = transform lns filter diff --git a/lenses/approx.aug b/lenses/approx.aug new file mode 100644 index 0000000..a482d1a --- /dev/null +++ b/lenses/approx.aug @@ -0,0 +1,59 @@ +(* +Module: Approx + Parses /etc/approx/approx.conf + +Author: David Lutterkort + +About: Reference + This lens tries to keep as close as possible to `man 5 approx.conf` where possible. + +About: License + This file is licenced under the LGPL v2+, like the rest of Augeas. + +About: Lens Usage + See . + +About: Configuration files + This lens applies to /etc/approx/approx.conf. + +About: Examples + The file contains various examples and tests. +*) + +module Approx = + autoload xfm + + (* Variable: eol + An *) + let eol = Util.eol + + (* Variable: indent + An *) + let indent = Util.indent + + (* Variable: key_re *) + let key_re = /\$?[A-Za-z0-9_.-]+/ + + (* Variable: sep *) + let sep = /[ \t]+/ + + (* Variable: value_re *) + let value_re = /[^ \t\n](.*[^ \t\n])?/ + + (* View: comment *) + let comment = [ indent . label "#comment" . del /[#;][ \t]*/ "# " + . store /([^ \t\n].*[^ \t\n]|[^ \t\n])/ . eol ] + + (* View: empty + An *) + let empty = Util.empty + + (* View: kv *) + let kv = [ indent . key key_re . del sep " " . store value_re . eol ] + + (* View: lns *) + let lns = (empty | comment | kv) * + + (* View: filter *) + let filter = incl "/etc/approx/approx.conf" + let xfm = transform lns filter diff --git a/lenses/apt_update_manager.aug b/lenses/apt_update_manager.aug new file mode 100644 index 0000000..f1c361d --- /dev/null +++ b/lenses/apt_update_manager.aug @@ -0,0 +1,47 @@ +(* +Module: Apt_Update_Manager + Parses files in /etc/update-manager + +Author: Raphael Pinson + +About: License + This file is licenced under the LGPL v2+, like the rest of Augeas. + +About: Lens Usage + To be documented + +About: Configuration files + This lens applies to files in /etc/update-manager. See . + +About: Examples + The file contains various examples and tests. +*) +module Apt_Update_Manager = + +autoload xfm + +(* View: comment *) +let comment = IniFile.comment IniFile.comment_re IniFile.comment_default + +(* View: sep *) +let sep = IniFile.sep IniFile.sep_re IniFile.sep_default + +(* View: title *) +let title = IniFile.title Rx.word + +(* View: entry *) +let entry = IniFile.entry Rx.word sep comment + +(* View: record *) +let record = IniFile.record title entry + +(* View: lns *) +let lns = IniFile.lns record comment + +(* Variable: filter *) +let filter = incl "/etc/update-manager/meta-release" + . incl "/etc/update-manager/release-upgrades" + . incl "/etc/update-manager/release-upgrades.d/*" + . Util.stdexcl + +let xfm = transform lns filter diff --git a/lenses/aptcacherngsecurity.aug b/lenses/aptcacherngsecurity.aug new file mode 100644 index 0000000..204ea5b --- /dev/null +++ b/lenses/aptcacherngsecurity.aug @@ -0,0 +1,25 @@ +(* Module: AptCacherNGSecurity + + Lens for config files like the one found in + /etc/apt-cacher-ng/security.conf + + + About: License + Copyright 2013 Erik B. Andersen; this file is licenced under the LGPL v2+. +*) +module AptCacherNGSecurity = + autoload xfm + + (* Define a Username/PW pair *) + let authpair = [ key /[^ \t:\/]*/ . del /:/ ":" . store /[^: \t\n]*/ ] + + (* Define a record. So far as I can tell, the only auth level supported is Admin *) + let record = [ key "AdminAuth". del /[ \t]*:[ \t]*/ ": ". authpair . Util.del_str "\n"] + + (* Define the basic lens *) + let lns = ( record | Util.empty | Util.comment )* + + let filter = incl "/etc/apt-cacher-ng/security.conf" + . Util.stdexcl + + let xfm = transform lns filter diff --git a/lenses/aptconf.aug b/lenses/aptconf.aug new file mode 100644 index 0000000..2131540 --- /dev/null +++ b/lenses/aptconf.aug @@ -0,0 +1,151 @@ +(* +Module: AptConf + Parses /etc/apt/apt.conf and /etc/apt/apt.conf.d/* + +Author: Raphael Pinson + +About: Reference + This lens tries to keep as close as possible to `man 5 apt.conf` +where possible. + +About: License + This file is licenced under the LGPL v2+, like the rest of Augeas. + +About: Lens Usage + To be documented + +About: Configuration files + This lens applies to /etc/apt/apt.conf and /etc/apt/apt.conf.d/*. +See . +*) + + +module AptConf = + autoload xfm + +(************************************************************************ + * Group: USEFUL PRIMITIVES + *************************************************************************) + +(* View: eol + And end of line *) +let eol = Util.eol + +(* View: empty + A C-style empty line *) +let empty = Util.empty_any + +(* View: indent + An indentation *) +let indent = Util.indent + +(* View: comment_simple + A one-line comment, C-style *) +let comment_simple = Util.comment_c_style_or_hash + +(* View: comment_multi + A multiline comment, C-style *) +let comment_multi = Util.comment_multiline + +(* View: comment + A comment, either or *) +let comment = comment_simple | comment_multi + + +(************************************************************************ + * Group: ENTRIES + *************************************************************************) + +(* View: name_re + Regex for entry names *) +let name_re = /[A-Za-z][A-Za-z-]*/ + +(* View: name_re_colons + Regex for entry names with colons *) +let name_re_colons = /[A-Za-z][A-Za-z:-]*/ + + +(* View: entry + An apt.conf entry, recursive + + WARNING: + This lens exploits a put ambiguity + since apt.conf allows for both + APT { Clean-Installed { "true" } } + and APT::Clean-Installed "true"; + but we're choosing to map them the same way + + The recursive lens doesn't seem + to care and defaults to the first + item in the union. + + This is why the APT { Clean-Installed { "true"; } } + form is listed first, since it supports + all subnodes (which Dpkg::Conf) doesn't. + + Exchanging these two expressions in the union + makes tests fails since the tree cannot + be mapped back. + + This situation results in existing + configuration being modified when the + associated tree is modified. For example, + changing the value of + APT::Clean-Installed "true"; to "false" + results in + APT { Clean-Installed "false"; } + (see unit tests) + *) +let rec entry_noeol = + let value = + Util.del_str "\"" . store /[^"\n]+/ + . del /";?/ "\";" in + let opt_eol = del /[ \t\n]*/ "\n" in + let long_eol = del /[ \t]*\n+/ "\n" in + let list_elem = [ opt_eol . label "@elem" . value ] in + let eol_comment = del /([ \t\n]*\n)?/ "" . comment in + [ key name_re . Sep.space . value ] + | [ key name_re . del /[ \t\n]*\{/ " {" . + ( (opt_eol . entry_noeol) | + list_elem | + eol_comment + )* . + del /[ \t\n]*\};?/ "\n};" ] + | [ key name_re . Util.del_str "::" . entry_noeol ] + +let entry = indent . entry_noeol . eol + + +(* View: include + A file inclusion + /!\ The manpage is not clear on the syntax *) +let include = + [ indent . key "#include" . Sep.space + . store Rx.fspath . eol ] + + +(* View: clear + A list of variables to clear + /!\ The manpage is not clear on the syntax *) +let clear = + let name = [ label "name" . store name_re_colons ] in + [ indent . key "#clear" . Sep.space + . Build.opt_list name Sep.space + . eol ] + + +(************************************************************************ + * Group: LENS AND FILTER + *************************************************************************) + +(* View: lns + The apt.conf lens *) +let lns = (empty|comment|entry|include|clear)* + + +(* View: filter *) +let filter = incl "/etc/apt/apt.conf" + . incl "/etc/apt/apt.conf.d/*" + . Util.stdexcl + +let xfm = transform lns filter diff --git a/lenses/aptpreferences.aug b/lenses/aptpreferences.aug new file mode 100644 index 0000000..0c3c84c --- /dev/null +++ b/lenses/aptpreferences.aug @@ -0,0 +1,69 @@ +(* +Module: AptPreferences + Apt/preferences module for Augeas + +Author: Raphael Pinson +*) + +module AptPreferences = +autoload xfm + +(************************************************************************ + * Group: Entries + ************************************************************************) + +(* View: colon *) +let colon = del /:[ \t]*/ ": " + +(* View: pin_gen + A generic pin + + Parameters: + lbl:string - the label *) +let pin_gen (lbl:string) = store lbl + . [ label lbl . Sep.space . store Rx.no_spaces ] + +(* View: pin_keys *) +let pin_keys = + let space_in = store /[^, \r\t\n][^,\n]*[^, \r\t\n]|[^, \t\n\r]/ + in Build.key_value /[aclnov]/ Sep.equal space_in + +(* View: pin_options *) +let pin_options = + let comma = Util.delim "," + in store "release" . Sep.space + . Build.opt_list pin_keys comma + +(* View: version_pin *) +let version_pin = pin_gen "version" + +(* View: origin_pin *) +let origin_pin = pin_gen "origin" + +(* View: pin *) +let pin = + let pin_value = pin_options | version_pin | origin_pin + in Build.key_value_line "Pin" colon pin_value + +(* View: entries *) +let entries = Build.key_value_line ("Explanation"|"Package"|"Pin-Priority") + colon (store Rx.space_in) + | pin + | Util.comment + +(* View: record *) +let record = [ seq "record" . entries+ ] + +(************************************************************************ + * Group: Lens + ************************************************************************) + +(* View: lns *) +let lns = Util.empty* . (Build.opt_list record Util.eol+ . Util.empty*)? + +(* View: filter *) +let filter = incl "/etc/apt/preferences" + . incl "/etc/apt/preferences.d/*" + . Util.stdexcl + +let xfm = transform lns filter diff --git a/lenses/aptsources.aug b/lenses/aptsources.aug new file mode 100644 index 0000000..d7a6b3b --- /dev/null +++ b/lenses/aptsources.aug @@ -0,0 +1,70 @@ +(* +Module: Aptsources + Parsing /etc/apt/sources.list +*) + +module Aptsources = + autoload xfm + +(************************************************************************ + * Group: Utility variables/functions + ************************************************************************) + (* View: sep_ws *) + let sep_ws = Sep.space + + (* View: eol *) + let eol = Util.del_str "\n" + + (* View: comment *) + let comment = Util.comment + (* View: empty *) + let empty = Util.empty + + (* View: word *) + let word = /[^][# \n\t]+/ + + (* View: uri *) + let uri = + let protocol = /[a-z+]+:/ + in let path = /\/[^] \t]*/ + in let path_brack = /\[[^]]+\]\/?/ + in protocol? . path + | protocol . path_brack + +(************************************************************************ + * Group: Keywords + ************************************************************************) + (* View: record *) + let record = + let option_sep = [ label "operation" . store /[+-]/]? . Sep.equal + in let option = Build.key_value /arch|trusted/ option_sep (store Rx.word) + in let options = [ label "options" + . Util.del_str "[" . Sep.opt_space + . Build.opt_list option Sep.space + . Sep.opt_space . Util.del_str "]" + . sep_ws ] + in [ Util.indent . seq "source" + . [ label "type" . store word ] . sep_ws + . options? + . [ label "uri" . store uri ] . sep_ws + . [ label "distribution" . store word ] + . [ label "component" . sep_ws . store word ]* + . del /[ \t]*(#.*)?/ "" + . eol ] + +(************************************************************************ + * Group: Lens + ************************************************************************) + (* View: lns *) + let lns = ( comment | empty | record ) * + + (* View: filter *) + let filter = (incl "/etc/apt/sources.list") + . (incl "/etc/apt/sources.list.d/*") + . Util.stdexcl + + let xfm = transform lns filter + +(* Local Variables: *) +(* mode: caml *) +(* End: *) diff --git a/lenses/authinfo2.aug b/lenses/authinfo2.aug new file mode 100644 index 0000000..7ef4ba2 --- /dev/null +++ b/lenses/authinfo2.aug @@ -0,0 +1,39 @@ +(* Authinfo2 module for Augeas *) +(* Author: Nicolas Gif *) +(* Heavily based on DPUT module by Raphael Pinson *) +(* *) +(* *) + +module Authinfo2 = + autoload xfm + +(************************************************************************ + * INI File settings + *************************************************************************) +let comment = IniFile.comment IniFile.comment_re "#" + +let sep = IniFile.sep IniFile.sep_re ":" + + +(************************************************************************ + * ENTRY + *************************************************************************) +let entry = + IniFile.entry_generic_nocomment (key IniFile.entry_re) sep IniFile.comment_re comment + + +(************************************************************************ + * TITLE & RECORD + *************************************************************************) +let title = IniFile.title IniFile.record_re +let record = IniFile.record title entry + + +(************************************************************************ + * LENS & FILTER + *************************************************************************) +let lns = IniFile.lns record comment + +let filter = (incl (Sys.getenv("HOME") . "/.s3ql/authinfo2")) + +let xfm = transform lns filter diff --git a/lenses/authorized_keys.aug b/lenses/authorized_keys.aug new file mode 100644 index 0000000..e913d4b --- /dev/null +++ b/lenses/authorized_keys.aug @@ -0,0 +1,72 @@ +(* +Module: Authorized_Keys + Parses SSH authorized_keys + +Author: Raphael Pinson + +About: Reference + This lens tries to keep as close as possible to `man 5 authorized_keys` where possible. + +About: License + This file is licenced under the LGPL v2+, like the rest of Augeas. + +About: Lens Usage + To be documented + +About: Configuration files + This lens applies to SSH authorized_keys. See . + +About: Examples + The file contains various examples and tests. +*) + + +module Authorized_Keys = + +autoload xfm + +(* View: option + A key option *) +let option = + let kv_re = "command" | "environment" | "from" + | "permitopen" | "principals" | "tunnel" + in let flag_re = "cert-authority" | "no-agent-forwarding" + | "no-port-forwarding" | "no-pty" | "no-user-rc" + | "no-X11-forwarding" + in let option_value = Util.del_str "\"" + . store /((\\\\")?[^\\\n"]*)+/ + . Util.del_str "\"" + in Build.key_value kv_re Sep.equal option_value + | Build.flag flag_re + +(* View: key_options + A list of key