.\" This file is part of Eclat -*- nroff -*-
.\" Copyright (C) 2012-2018 Sergey Poznyakoff
.\"
.\" Eclat 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, or (at your option)
.\" any later version.
.\"
.\" Eclat 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 Eclat. If not, see .
.TH ECLAT.CONF 5 "March 15, 2018" "ECLAT" "Eclat User Reference"
.SH NAME
eclat.conf \- configuration file for
.BR eclat (1).
.SH DESCRIPTION
.PP
.B Eclat
configuration file consists of statements and comments.
.PP
There are three classes of lexical tokens: keywords, values, and
separators. Blanks, tabs, newlines and comments, collectively called
\fIwhite space\fR are ignored except as they serve to separate
tokens. Some white space is required to separate otherwise adjacent
keywords and values.
.SH COMMENTS
Comments may appear anywhere where white space may appear in the
configuration file. There are two kinds of comments:
single-line and multi-line comments. Single-line comments start
with
.B #
or
.B //
and continue to the end of the line:
.sp
.RS 4
.EX
# This is a comment
// This too is a comment
.EE
.RE
.PP
\fIMulti-line\fB or \fIC-style\fR comments start with the two
characters
.B /*
(slash, star) and continue until the first occurrence of
.B */
(star, slash).
.PP
Multi-line comments cannot be nested. However, single-line comments
may well appear within multi-line ones.
.SS "Pragmatic Comments"
Pragmatic comments are similar to usual single-line comments,
except that they cause some changes in the way the configuration is
parsed. Pragmatic comments begin with a
.B #
sign and end with the next physical newline character.
.TP
.BR "#include <" "file" >
.PD 0
.TP
.BR "#include " "file"
.PD
Include the contents of the file \fIfile\fR. If it is an
absolute file name, both forms are equivalent. Otherwise, the form
with angle brackets searches for the file in the \fIinclude
search path\fR, while the second one looks for it in the current working
directory first, and, if not found there, in the include search
path.
.sp
The default include search path is:
.sp
\fIprefix\fR/share/eclat/\fIVERSION\fR/include
.br
\fIprefix\fR/share/eclat/include
.sp
where \fIprefix\fR stands for the installation prefix (normally
\fB/usr\fR or \fB/usr/local\fR), and \fIVERSION\fR stands for
.B eclat
version number.
.sp
The include search path can be modified using the \fB\-I\fR
(\fB\-\-include\-directory) command line option.
.TP
.BR "#include_once <" "file" >
.PD 0
.TP
.BR "#include_once " "file"
.PD
Same as \fB#include\fR, except that, if the \fIfile\fR has already
been included, it will not be included again.
.TP
.BR "#line " "num"
.PD 0
.TP
.BR "#line " "num" " \(dq" "file" "\(dq"
.PD
This line causes the parser to believe, for purposes of error
diagnostics, that the line number of the next source line
is given by \fInum\fR and the current input file is named by
\fIfile\fR. If the latter is absent, the remembered file name
does not change.
.TP
.BR "# " "num" " \(dq" "file" "\(dq"
This is a special form of the \fB#line\fR statement, understood for
compatibility with the C preprocessor.
.PP
These statements provide a rudimentary preprocessing
features. For more sophisticated ways to modify configuration before
parsing, see \fBPREPROCESSOR\fR.
.SH STATEMENTS
.SS "Simple statement"
A \fIsimple statement\fR consists of a keyword and value
separated by any amount of whitespace. Simple statement is terminated
with a semicolon (\fB;\fR).
.PP
The following is a simple statement:
.sp
.RS 4
.EX
standalone yes;
pidfile /var/run/slb.pid;
.EE
.RE
.fi
.PP
A \fIkeyword\fR begins with a letter and may contain letters,
decimal digits, underscores (\fB_\fR) and dashes (\fB\-\fR).
Examples of keywords are:
.sp
.RS 4
.EX
region
format\-file
.EE
.PP
A \fIvalue\fR can be one of the following:
.TP
.I number
A number is a sequence of decimal digits.
.TP
.I boolean
A boolean value is one of the following: \fByes\fR, \fBtrue\fR,
\fBt\fR or \fB1\fR, meaning \fItrue\fR, and \fBno\fR,
\fBfalse\fR, \fBnil\fR, \fB0\fR meaning \fIfalse\fR.
.TP
.I unquoted string
An unquoted string may contain letters, digits, and any of the
following characters: \fB_\fR, \fB\-\fR, \fB.\fR, \fB/\fR,
\fB@\fR, \fB*\fR, \fB:\fR.
.TP
.I quoted string
A quoted string is any sequence of characters enclosed in
double-quotes (\fB\(dq\fR). A backslash appearing within a quoted
string introduces an \fIescape sequence\fR, which is replaced
with a single character according to the following rules:
.sp
.nf
.ta 8n 20n
.ul
Sequence Replaced with
\\a Audible bell character (ASCII 7)
\\b Backspace character (ASCII 8)
\\f Form-feed character (ASCII 12)
\\n Newline character (ASCII 10)
\\r Carriage return character (ASCII 13)
\\t Horizontal tabulation character (ASCII 9)
\\v Vertical tabulation character (ASCII 11)
\\\\ A single backslash
\\\(dq A double-quote.
.fi
.sp
In addition, the sequence \fB\\\fInewline\fR is removed from
the string. This allows to split long strings over several
physical lines, e.g.:
.sp
.EX
"a long string may be\\
split over several lines"
.EE
If the character following a backslash is not one of those specified
above, the backslash is ignored and a warning is issued.
Two or more adjacent quoted strings are concatenated, which gives
another way to split long strings over several lines to improve
readability. The following fragment produces the same result as the
example above:
.sp
.EX
"a long string may be"
" split over several lines"
.EE
.TP
.I Here-document
A \fIhere-document\fR is a special construct that allows to introduce
strings of text containing embedded newlines.
The
.BI "<<" "word"
construct instructs the parser to read all the following lines up to
the line containing only \fIword\fR, with possible trailing blanks.
Any lines thus read are concatenated together into a single string.
For example:
.sp
.EX
< {
type ldap;
key \fItrans\fR;
ldap\-version \fInumber\fR;
uri \fIstring\fR;
base \fIstring\fR;
binddn \fIstring\fR;
bindpw \fIstring\fR;
passfile \fIstring\fR;
prompt \fIboolean\fR;
tls [no | yes | only];
filter \fIstring\fR;
attr \fIstring\fR;
debug \fInumber\fR;
}
.EE
.sp
.TP
\fBldap\-version\fR \fIn\fR
Defines the LDAP version to use. Valid values for \fIn\fR are 2 and 3
(the default).
.TP
\fBuri\fR \fIstring\fR
Defines the URI of the LDAP server. This statement is mandatory.
.TP
\fBbase\fR \fIstring\fR
Defines the search base.
.TP
\fBbinddn\fR \fIdn\fR
Specifies the default bind DN to use when performing ldap operations.
The \fIdn\fR argument must be specified as a Distinguished Name in
LDAP format.
.sp
The argument is subject to macro expansion using the default set of macros.
.TP
\fBbindpw\fR \fIstring\fR
Specifies the password to use when performing the bind. Use this
option only if the configuration file is protected by appropriate
permissions. Otherwise, use \fBpassfile\fR or \fBprompt\fR
statements.
.TP
\fBpassfile\fR \fIfile\fR
Read the first line from \fIfile\fR and use it as the password. The
newline character is stripped from the input.
.sp
The \fIfile\fR argument is subject to macro expansion, using the
default set of macros.
.TP
\fBprompt\fR \fIboolean\fR
Prompt the user for the user name and password, unless the latter is
determined using the \fBpassfile\fR statement.
.TP
\fBtls\fR \fIvalue\fR
Controls whether TLS is desired or required. If \fIvalue\fR is
\fBno\fR (the default), TLS will not be used. If it is \fByes\fR, the
module will issue the ``StartTLS'' command, but will continue anyway
if it fails. Finally, if \fIvalue\fR is \fBonly\fR, TLS is mandatory,
and the backend will not establish LDAP connection unless ``StartTLS''
succeeds.
.TP
\fBfilter\fR \fIexpr\fR
Sets the LDAP filter expression. The \fIexpr\fR should conform to the
string representation for search filters as defined in RFC 4515.
.sp
This statement is mandatory.
.TP
\fBattr\fR \fIstring\fR
Defines the attribute to use for the return value.
.sp
This statement is mandatory.
.TP
\fBdebug\fR \fIn\fR
Sets the LDAP debug number. Refer to the OpenLDAP documentation for
the valid values of \fIn\fR and their meaning.
.SS EC2 MAP
This map makes it possible to use \fBEC2\fR services to translate
identifiers. The idea is to query \fBEC2\fR using the symbolic ID and
obtain the real resource ID from the request. The map is defined as
follows:
.PP
.EX
map {
type ec2;
key \fItrans\fR;
action \fIaction-name\fR;
arguments \fIarg-list\fR;
return \fIreturn-path\fR;
}
.EE
.sp
.TP
\fBaction\fR \fIaction-name\fR
Defines the \fBEC2\fR action name to use. Refer to the Amazon API
documentation for a list of action names.
.TP
\fBarguments\fR \fIarg-list\fR
Defines the list of arguments to send with the request. Any
occurrence of the \fB$key\fR variable within that list is replaced
with the actual key value.
.TP
\fBreturn\fR \fIreturn-path\fR
Defines the return value, using a path notation.
.PP
The example below illustrates the use of the \fBDescribeImages\fR
action to implement the \fBImageId\fR map:
.PP
.EX
map "ImageId" {
type ec2;
action DescribeImages;
arguments ("Owner.1=self",
"Filter.1.Name=tag:Name",
"Filter.1.Value.1=${key}");
return ".DescribeImagesResponse.imagesSet.item.imageId";
}
.EE
.SH "SEE ALSO"
.BR eclat (1),
.BR m4 (1).
.SH AUTHORS
Sergey Poznyakoff
.SH "BUG REPORTS"
Report bugs to .
.SH COPYRIGHT
Copyright \(co 2012-2015 Sergey Poznyakoff
.br
.na
License GPLv3+: GNU GPL version 3 or later
.br
.ad
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
.\" Local variables:
.\" eval: (add-hook 'write-file-hooks 'time-stamp)
.\" time-stamp-start: ".TH [A-Z_][A-Z0-9_.-]* [0-9] \""
.\" time-stamp-format: "%:B %:d, %:y"
.\" time-stamp-end: "\""
.\" time-stamp-line-limit: 20
.\" end: