summaryrefslogtreecommitdiffstats
path: root/man/bcfg2-lint.8
blob: 22632f5dd485250a26a4213222b4e536a9828a0c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
.TH "BCFG2-LINT" "8" "March 18, 2013" "1.3" "Bcfg2"
.SH NAME
bcfg2-lint \- Check Bcfg2 specification for validity, common mistakes, and style
.
.nr rst2man-indent-level 0
.
.de1 rstReportMargin
\\$1 \\n[an-margin]
level \\n[rst2man-indent-level]
level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
-
\\n[rst2man-indent0]
\\n[rst2man-indent1]
\\n[rst2man-indent2]
..
.de1 INDENT
.\" .rstReportMargin pre:
. RS \\$1
. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
. nr rst2man-indent-level +1
.\" .rstReportMargin post:
..
.de UNINDENT
. RE
.\" indent \\n[an-margin]
.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
.nr rst2man-indent-level -1
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
..
.\" Man page generated from reStructuredText.
.
.SH SYNOPSIS
.sp
\fBbcfg2\-lint\fP [\fIoptions\fP] [\fIplugin\fP [\fIplugin\fP...]]
.SH DESCRIPTION
.sp
\fBbcfg2\-lint\fP checks the Bcfg2 specification for schema
validity, common mistakes, and other criteria. It can be quite helpful
in finding typos or malformed data.
.sp
\fBbcfg2\-lint\fP 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.
.sp
\fBbcfg2\-lint\fP is a rewrite of the older bcfg2\-repo\-validate
tool.
.SH OPTIONS
.INDENT 0.0
.TP
.BI \-C \ configfile
Specify alternate bcfg2.conf location.
.TP
.BI \-Q \ path
Specify the path to the server repository.
.TP
.B \-v
Be verbose.
.TP
.B \-\-lint\-config
Specify path to bcfg2\-lint.conf (default
\fB/etc/bcfg2\-lint.conf\fP).
.TP
.B \-\-stdin
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.
.sp
This makes a few assumptions:
.sp
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.
.sp
Property files will only be validated if both the
property file itself and its matching schema are
included on stdin.
.UNINDENT
.SH PLUGINS
.sp
In addition to the plugins listed below, Bcfg2 server plugins may have
their own \fIbcfg2\-lint\fP functionality, which is enabled automatically
when the server plugin is enabled.  See \fIbcfg2\-lint.conf(5)\fP
for more information on lint plugin configuration.
.INDENT 0.0
.TP
.B Comments
Check the specification for VCS keywords and any comments that are
required. By default, this only checks that the \fI$Id$\fP 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.)
.sp
In XML files, only comments are checked for the keywords and
comments required.
.TP
.B Genshi
Ensure that all Genshi templates are valid and compile properly.
.TP
.B GroupNames
Ensure that all groups called by name in Metadata, Rules, Bundler,
GroupPatterns, and Cfg are valid.
.TP
.B InfoXML
Check that certain attributes are specified in \fIinfo.xml\fP files. By
default, requires that \fIowner\fP, \fIgroup\fP, and \fImode\fP are specified.
Can also require that an \fIinfo.xml\fP exists for all Cfg files, and
that paranoid mode be enabled for all files.
.TP
.B MergeFiles
Suggest that similar probes and config files be merged into single
probes or TGenshi templates.
.TP
.B RequiredAttrs
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.
.TP
.B Validate
Validate the Bcfg2 specification against the XML schemas.
.sp
Property files are freeform XML, but if a \fI.xsd\fP 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 \fIntp.xml\fP then by placing a schema for that file
in \fIntp.xsd\fP schema validation will be performed on \fIntp.xml\fP.
.UNINDENT
.SH BUGS
.sp
\fBbcfg2\-lint\fP 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.
.SH SEE ALSO
.sp
\fIbcfg2(1)\fP, \fIbcfg2\-server(8)\fP,
\fIbcfg2\-lint.conf(5)\fP
.\" Generated by docutils manpage writer.
.