<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>bcfg2-lint — Bcfg2 1.3.0 documentation</title> <link rel="stylesheet" href="../_static/default.css" type="text/css" /> <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> <script type="text/javascript"> var DOCUMENTATION_OPTIONS = { URL_ROOT: '../', VERSION: '1.3.0', COLLAPSE_INDEX: false, FILE_SUFFIX: '.html', HAS_SOURCE: true }; </script> <script type="text/javascript" src="../_static/jquery.js"></script> <script type="text/javascript" src="../_static/underscore.js"></script> <script type="text/javascript" src="../_static/doctools.js"></script> <script type="text/javascript" src="../_static/sidebar.js"></script> <link rel="shortcut icon" href="../_static/favicon.ico"/> <link rel="top" title="Bcfg2 1.3.0 documentation" href="../index.html" /> <link rel="up" title="Man Pages" href="index.html" /> <link rel="next" title="bcfg2-lint.conf" href="bcfg2-lint.conf.html" /> <link rel="prev" title="bcfg2-info" href="bcfg2-info.html" /> <link rel="stylesheet" href="../_static/bcfg2.css" type=""/> </head> <body> <div style="text-align: left; padding: 10px 10px 15px 15px"> <a href="../index.html"><img src="../_static/bcfg2_logo.png" border="0" alt="sampledoc"/></a> </div> <div class="related"> <h3>Navigation</h3> <ul> <li class="right" style="margin-right: 10px"> <a href="../genindex.html" title="General Index" accesskey="I">index</a></li> <li class="right" > <a href="../py-modindex.html" title="Python Module Index" >modules</a> |</li> <li class="right" > <a href="bcfg2-lint.conf.html" title="bcfg2-lint.conf" accesskey="N">next</a> |</li> <li class="right" > <a href="bcfg2-info.html" title="bcfg2-info" accesskey="P">previous</a> |</li> <li><a href="../index.html">home</a> | </li> <!--<li><a href="../search.html">search</a> | </li>--> <li><a href="../help/index.html">help</a> | </li> <li><a href="../contents.html">documentation </a> »</li> <li><a href="../contents.html" >Bcfg2 documentation 1.3.0</a> »</li> <li><a href="index.html" accesskey="U">Man Pages</a> »</li> </ul> </div> <div class="document"> <div class="documentwrapper"> <div class="bodywrapper"> <div class="body"> <div class="section" id="bcfg2-lint"> <h1>bcfg2-lint<a class="headerlink" href="#bcfg2-lint" title="Permalink to this headline">¶</a></h1> <div class="section" id="synopsis"> <h2>Synopsis<a class="headerlink" href="#synopsis" title="Permalink to this headline">¶</a></h2> <p><strong>bcfg2-lint</strong> [<em>options</em>] [<em>plugin</em> [<em>plugin</em>...]]</p> </div> <div class="section" id="description"> <h2>Description<a class="headerlink" href="#description" title="Permalink to this headline">¶</a></h2> <p><strong class="program">bcfg2-lint</strong> checks the Bcfg2 specification for schema validity, common mistakes, and other criteria. It can be quite helpful in finding typos or malformed data.</p> <p><strong class="program">bcfg2-lint</strong> exits with a return value of 2 if errors were found, and 3 if warnings (but no errors) were found. Any other non-0 exit value denotes some failure in the script itself.</p> <p><strong class="program">bcfg2-lint</strong> is a rewrite of the older bcfg2-repo-validate tool.</p> </div> <div class="section" id="options"> <h2>Options<a class="headerlink" href="#options" title="Permalink to this headline">¶</a></h2> <table class="docutils option-list" frame="void" rules="none"> <col class="option" /> <col class="description" /> <tbody valign="top"> <tr><td class="option-group"> <kbd><span class="option">-C <var>configfile</var></span></kbd></td> <td>Specify alternate bcfg2.conf location.</td></tr> <tr><td class="option-group"> <kbd><span class="option">-Q <var>path</var></span></kbd></td> <td>Specify the path to the server repository.</td></tr> <tr><td class="option-group"> <kbd><span class="option">-v</span></kbd></td> <td>Be verbose.</td></tr> <tr><td class="option-group"> <kbd><span class="option">--lint-config</span></kbd></td> <td>Specify path to bcfg2-lint.conf (default <tt class="docutils literal"><span class="pre">/etc/bcfg2-lint.conf</span></tt>).</td></tr> <tr><td class="option-group"> <kbd><span class="option">--stdin</span></kbd></td> <td><p class="first">Rather than operating on all files in the Bcfg2 specification, only validate a list of files supplied on stdin. This mode is particularly useful in pre-commit hooks.</p> <p>This makes a few assumptions:</p> <p>Metadata files will only be checked if a valid chain of XIncludes can be followed all the way from clients.xml or groups.xml. Since there are multiple formats of metadata stored in Metadata/ (i.e., clients and groups), there is no way to determine which sort of data a file contains unless there is a valid chain of XIncludes. It may be useful to always specify all metadata files should be checked, even if not all of them have changed.</p> <p class="last">Property files will only be validated if both the property file itself and its matching schema are included on stdin.</p> </td></tr> </tbody> </table> </div> <div class="section" id="plugins"> <h2>Plugins<a class="headerlink" href="#plugins" title="Permalink to this headline">¶</a></h2> <p>In addition to the plugins listed below, Bcfg2 server plugins may have their own <em>bcfg2-lint</em> functionality, which is enabled automatically when the server plugin is enabled. See <em class="manpage">bcfg2-lint.conf(5)</em> for more information on lint plugin configuration.</p> <dl class="docutils"> <dt>Comments</dt> <dd><p class="first">Check the specification for VCS keywords and any comments that are required. By default, this only checks that the <em>$Id$</em> keyword is included and expanded in all files. You may specify VCS keywords to check and comments to be required in the config file. (For instance, you might require that every file have a “Maintainer” comment.)</p> <p class="last">In XML files, only comments are checked for the keywords and comments required.</p> </dd> <dt>Genshi</dt> <dd>Ensure that all Genshi templates are valid and compile properly.</dd> <dt>GroupNames</dt> <dd>Ensure that all groups called by name in Metadata, Rules, Bundler, GroupPatterns, and Cfg are valid.</dd> <dt>InfoXML</dt> <dd>Check that certain attributes are specified in <em>info.xml</em> files. By default, requires that <em>owner</em>, <em>group</em>, and <em>mode</em> are specified. Can also require that an <em>info.xml</em> exists for all Cfg files, and that paranoid mode be enabled for all files.</dd> <dt>MergeFiles</dt> <dd>Suggest that similar probes and config files be merged into single probes or TGenshi templates.</dd> <dt>RequiredAttrs</dt> <dd>Check that all entries have the appropriate required attributes, and that the attributes are in a valid format. This goes above and beyond the validation offered by an XML schema.</dd> <dt>Validate</dt> <dd><p class="first">Validate the Bcfg2 specification against the XML schemas.</p> <p class="last">Property files are freeform XML, but if a <em>.xsd</em> file with a matching filename is provided, then schema validation will be performed on property files individually as well. For instance, if you have a property file named <em>ntp.xml</em> then by placing a schema for that file in <em>ntp.xsd</em> schema validation will be performed on <em>ntp.xml</em>.</p> </dd> </dl> </div> <div class="section" id="bugs"> <h2>Bugs<a class="headerlink" href="#bugs" title="Permalink to this headline">¶</a></h2> <p><strong class="program">bcfg2-lint</strong> may not handle some deprecated plugins as well as it handles newer ones. For instance, there may be some places where it expects all of your configuration files to be handled by Cfg rather than by a mix of Cfg and TGenshi or TCheetah.</p> </div> <div class="section" id="see-also"> <h2>See Also<a class="headerlink" href="#see-also" title="Permalink to this headline">¶</a></h2> <p><em class="manpage">bcfg2(1)</em>, <em class="manpage">bcfg2-server(8)</em>, <em class="manpage">bcfg2-lint.conf(5)</em></p> </div> </div> </div> </div> </div> <div class="sphinxsidebar"> <div class="sphinxsidebarwrapper"> <h3><a href="../index.html">Table Of Contents</a></h3> <ul> <li><a class="reference internal" href="#">bcfg2-lint</a><ul> <li><a class="reference internal" href="#synopsis">Synopsis</a></li> <li><a class="reference internal" href="#description">Description</a></li> <li><a class="reference internal" href="#options">Options</a></li> <li><a class="reference internal" href="#plugins">Plugins</a></li> <li><a class="reference internal" href="#bugs">Bugs</a></li> <li><a class="reference internal" href="#see-also">See Also</a></li> </ul> </li> </ul> <h4>Previous topic</h4> <p class="topless"><a href="bcfg2-info.html" title="previous chapter">bcfg2-info</a></p> <h4>Next topic</h4> <p class="topless"><a href="bcfg2-lint.conf.html" title="next chapter">bcfg2-lint.conf</a></p> <h3>This Page</h3> <ul class="this-page-menu"> <li><a href="../_sources/man/bcfg2-lint.txt" rel="nofollow">Show Source</a></li> </ul> <div id="searchbox" style="display: none"> <h3>Quick search</h3> <form class="search" action="../search.html" method="get"> <input type="text" name="q" /> <input type="submit" value="Go" /> <input type="hidden" name="check_keywords" value="yes" /> <input type="hidden" name="area" value="default" /> </form> <p class="searchtip" style="font-size: 90%"> Enter search terms or a module, class or function name. </p> </div> <script type="text/javascript">$('#searchbox').show(0);</script> </div> </div> <div class="clearer"></div> </div> <div class="related"> <h3>Navigation</h3> <ul> <li class="right" style="margin-right: 10px"> <a href="../genindex.html" title="General Index" >index</a></li> <li class="right" > <a href="../py-modindex.html" title="Python Module Index" >modules</a> |</li> <li class="right" > <a href="bcfg2-lint.conf.html" title="bcfg2-lint.conf" >next</a> |</li> <li class="right" > <a href="bcfg2-info.html" title="bcfg2-info" >previous</a> |</li> <li><a href="../index.html">home</a> | </li> <!--<li><a href="../search.html">search</a> | </li>--> <li><a href="../help/index.html">help</a> | </li> <li><a href="../contents.html">documentation </a> »</li> <li><a href="../contents.html" >Bcfg2 documentation 1.3.0</a> »</li> <li><a href="index.html" >Man Pages</a> »</li> </ul> </div> <div class="footer"> © Copyright 2009-2013, Narayan Desai. Last updated on Mar 20, 2013. Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3. </div> </body> </html>