aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/Makefile.am53
-rw-r--r--doc/pies.texi715
2 files changed, 607 insertions, 161 deletions
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 502c46e..d7d69d1 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -37,65 +37,33 @@ check-format:
37 false; \ 37 false; \
38 fi 38 fi
39 39
40check-pragmas:
41 @check-docs.sh pragmas \
42 '/} option_cache\[\] = {/,/^}/s/[ \t]*{ *"\(.*\)".*/\1/pg' \
43 's/@deffnx* {pragma option} *\([^@, ]*\) .*/\1/p' \
44 $(top_srcdir)/mfd/main.c -- \
45 $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) -E - \
46 $(info_TEXINFOS)
47
48check-options: 40check-options:
49 @check-docs.sh options \ 41 @check-docs.sh options \
50 '/argp_option options\[\] = /,/^}/s/[ \t]*{ *"\([^,"]*\)".*/\1/pg' \ 42 '/argp_option options\[\] = /,/^}/s/[ \t]*{ *"\([^,"]*\)".*/\1/pg' \
51 's/@opindex *\([^@,]*\).*/\1/p' \ 43 's/@opindex *\([^@,]*\).*/\1/p' \
52 $(top_srcdir)/mfd/main.c -- \ 44 $(top_srcdir)/src/pies.c -- \
53 $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) -E - \ 45 $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) -E - \
54 $(info_TEXINFOS) 46 $(info_TEXINFOS)
55 47
56check-config: 48check-config:
57 @check-docs.sh 'configuration statements' \ 49 @check-docs.sh 'configuration statements' \
58 '/mf_cfg_param\[\] *= *{/,/^}/s/[ \t]*{ *"\([^,"]*\)".*/\1/pg' \ 50 '/pies_keywords\[\] *= *{/,/^}/s/[ \t]*{ *"\([^,"]*\)".*/\1/pg' \
59 's/@deffn {Pies Conf} *\([^@,]*\).*/\1/p' \ 51 's/@deffn {Config} *\([^@,]*\).*/\1/p' \
60 $(top_srcdir)/mfd/main.c -- \ 52 $(top_srcdir)/src/pies.c -- \
61 $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) -E - \ 53 $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) -E - \
62 $(info_TEXINFOS) 54 $(info_TEXINFOS)
63 55
64check-sub-config: 56check-sub-config:
65 @list=`sed -n '/mf_cfg_param\[\] *= *{/,/^}/{s/[ \t]*{ *"\([^,"]*\)", *mu_cfg_section *,.*/\1/pg}' $(top_srcdir)/mfd/main.c`; \ 57 sed -n '/pies_keywords\[\] *= *{/,/^}/{p}' ../src/pies.c|tr '\n{' ' \n'|sed -n '/grecs_type_section/s/"\([^"]*\)".*grecs_type_section,[^,]*,[^,]*,[^,]*,[^,]*, *\(.*\) *}.*/\1 \2/p' | \
66 for ident in $$list; do \ 58 while read ident kw; do \
67 check-docs.sh "$$ident configuration statements" \ 59 check-docs.sh "$$ident configuration statements" \
68 "/$${ident}_section_param"'\[\] *= *{/,/^}/s/[ \t]*{ *"\([^,"]*\)".*/\1/pg' \ 60 "/$$kw"'\[\] *= *{/,/^}/s/[ \t]*{ *"\([^,"]*\)".*/\1/pg' \
69 "s/@deffn {$${ident}}"' *\([^@,]*\).*/\1/p' \ 61 "s/@deffn {Config: *$${ident}}"' *\([^@,]*\).*/\1/p' \
70 $(top_srcdir)/mfd/main.c -- \ 62 $(top_srcdir)/src/pies.c $(top_srcdir)/src/acl.c -- \
71 $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) -E - \ 63 $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) -E - \
72 $(info_TEXINFOS); \ 64 $(info_TEXINFOS); \
73 done 65 done
74 66
75check-builtins:
76 @check-docs.sh builtins \
77 '/MF_DEFUN/{s/[ \t]*MF_DEFUN *(\([a-zA-Z_][a-zA-Z0-9_]*\),.*/\1/p;s/[ \t]*MF_DEFUN_VARARGS\(_NO_PROM\)\? *(\([a-zA-Z_][a-zA-Z0-9_]*\),.*/\2/p;s/[ \t]*MF_DEFUN_CTYPE *(\([a-zA-Z_][a-zA-Z0-9_]*\))/\1/p}'\
78 's/@deftypefnx\{0,1\} {Built-in Function} *[^ ][^ ]* *\([^ ]*\).*/\1/p' \
79 $(top_srcdir)/mfd/bi_*.m4 -- \
80 $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) -E - \
81 $(info_TEXINFOS)
82
83check-mflib:
84 @check-docs.sh "library functions" \
85 '/^[ \t]*func[ \t][ \t]*__/b;/^[ \t]*func/s/[ \t]*func[ \t][ \t]*\(.[^ \t(]*\).*/\1/p' \
86 's/@deftypefn {Library Function} *[^ ][^ ]* *\([^ ]*\).*/\1/p' \
87 $(top_srcdir)/mflib/*.mf -- \
88 $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) -E - \
89 $(info_TEXINFOS)
90
91check-exceptions:
92 @check-docs.sh exceptions \
93 '/typedef enum mf_exception_code {/,/^};/s/[ \t]*mfe_\(.*\),.*/e_\1/p;/typedef enum mf_status_code {/,/^};/s/[ \t]*mf_\(.*\),.*/\1/p' \
94 's/@cindex \([^,][^,]*\), exception type/\1/p' \
95 $(top_srcdir)/mfd/pies.h -- \
96 $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) -E - \
97 $(info_TEXINFOS)
98
99check-refs: 67check-refs:
100 @for file in $(info_TEXINFOS) $(pies_TEXINFOS); \ 68 @for file in $(info_TEXINFOS) $(pies_TEXINFOS); \
101 do \ 69 do \
@@ -147,9 +115,8 @@ check-unrevised:
147 rm $@-t; \ 115 rm $@-t; \
148 fi 116 fi
149 117
150all-check-docs: check-format check-options check-pragmas \ 118all-check-docs: check-format check-options \
151 check-config check-sub-config \ 119 check-config check-sub-config \
152 check-builtins check-mflib check-exceptions \
153 check-refs check-fixmes check-writeme check-unrevised 120 check-refs check-fixmes check-writeme check-unrevised
154 121
155check-docs: 122check-docs:
diff --git a/doc/pies.texi b/doc/pies.texi
index cc35b5d..22c0f83 100644
--- a/doc/pies.texi
+++ b/doc/pies.texi
@@ -78,27 +78,25 @@ documents @command{pies} Version @value{VERSION}.
78@menu 78@menu
79* Intro:: 79* Intro::
80* Pies Configuration File:: 80* Pies Configuration File::
81* Component Statement::
82* include-meta1::
83* Global Configuration::
84* Pies Debugging:: 81* Pies Debugging::
85* Configuration Example:: 82* Configuration Example::
86* Command Line Usage:: 83* Command Line Usage::
87* Pies Invocation:: 84* Pies Invocation::
85* Reporting Bugs::
88 86
89Appendices 87Appendices
90 88
91* Copying This Manual:: The GNU Free Documentation License. 89* Copying This Manual:: The GNU Free Documentation License.
92* Concept Index:: Index of Concepts. 90* Concept Index:: Index of Concepts.
93 91
94@c @detailmenu 92@detailmenu
95@c @end detailmenu 93@end detailmenu
96 94
97@end menu 95@end menu
98 96
99@node Intro 97@node Intro
100@chapter Introduction 98@chapter Introduction
101@cindex component, pies 99@cindex component
102 The name @command{pies} (pronounced @samp{p-yes}) stands for 100 The name @command{pies} (pronounced @samp{p-yes}) stands for
103@samp{Program Invocation and Execution Supervisor}. This utility 101@samp{Program Invocation and Execution Supervisor}. This utility
104starts and controls execution of external programs, called 102starts and controls execution of external programs, called
@@ -110,9 +108,9 @@ terminates, @command{pies} restarts it. Its configuration allows to
110specify actions other than simple restart, depending on the exit code 108specify actions other than simple restart, depending on the exit code
111of the component. 109of the component.
112 110
113@cindex prerequisite, pies 111@cindex prerequisite
114@cindex dependency, pies 112@cindex dependency
115@cindex dependents, pies 113@cindex dependents
116@anchor{component prerequisite} 114@anchor{component prerequisite}
117 A component @samp{A} may depend on another components, say 115 A component @samp{A} may depend on another components, say
118@samp{B} and @samp{C}, i.e. require them to be running at the moment of its 116@samp{B} and @samp{C}, i.e. require them to be running at the moment of its
@@ -131,7 +129,7 @@ redirected to a file or to an arbitrary @command{syslog} channel.
131 129
132@anchor{init-style} 130@anchor{init-style}
133@cindex init-style components 131@cindex init-style components
134 These way of operation applies to so-called @dfn{init-style} 132 This way of operation applies to the @dfn{init-style}
135components, called so because of the similarity with the 133components, called so because of the similarity with the
136@command{init} process manager. @command{Pies} is also able to handle 134@command{init} process manager. @command{Pies} is also able to handle
137components that receive input on their @samp{stdin} and send reply to 135components that receive input on their @samp{stdin} and send reply to
@@ -180,40 +178,304 @@ stopping component dependencies, the same ordering is preserved.
180 This order is reversed for files included by @code{include-meta1} 178 This order is reversed for files included by @code{include-meta1}
181statement (@pxref{include-meta1}). 179statement (@pxref{include-meta1}).
182 180
181@node Pies Configuration File
182@chapter Pies Configuration File
183@cindex configuration file
184@flindex pies.conf
185@xopindex{config-file, introduced}
186 @command{Pies} reads its settings and component definitions from the
187@dfn{configuration file} @file{pies.conf}, located in the @dfn{system
188configuration directory} (in most cases @file{/etc} or
189@file{/usr/local/etc}, depending on how the package was compiled).
190An alternative location may be specified using @option{--config-file}
191(@option{-c} command line option.
192
193 If any errors are encountered in the configuration file, the program
194reports them on the standard error and exits with a non-zero status.
195
196@xopindex{lint, introduced}
197 To test the configuration file without actually starting the server, the
198@option{--lint} (@option{-t}) command line option is provided. It causes
199@command{pies} to check its configuration file and exit with status 0
200if no errors were detected, and with status 1 otherwise.
201
202@opindex -E, introduced
203 Before parsing, configuration file is preprocessed using
204@command{m4} (@pxref{Preprocessor}). To see the preprocessed
205configuration without actually parsing it, use @option{-E} command
206line option.
207
208@xopindex{config-help, introduced}
209 The rest of this section describes the configuration file syntax in
210detail. You can receive a concise summary of all configuration
211directives any time by running @command{pies --config-help}.
212
183@menu 213@menu
214* Syntax:: Configuration file syntax.
215* Component Statement::
216* ACL:: Access Control Lists
217* include-meta1::
218* Global Configuration::
184@end menu 219@end menu
185 220
186@node Pies Configuration File 221@node Syntax
187@chapter Pies Configuration File 222@section Configuration File Syntax
188 @command{Pies} reads its configuration from the main Mailutils 223 The configuration file consists of statements and comments.
189configuration file. @xref{configuration, Mailutils Configuration 224
190File,, mailutils, GNU Mailutils Manual}, for a description of GNU 225 There are three classes of lexical tokens: keywords, values, and
191Mailutils configuration system. It is recommended to use 226separators. Blanks, tabs, newlines and comments, collectively called
192@code{include @var{directory}} statement (@pxref{Include, Include 227@dfn{white space} are ignored except as they serve to separate
193Statement,, mailutils, GNU Mailutils Manual}), and to place 228tokens. Some white space is required to separate otherwise adjacent
194@command{pies} configuration in file @file{@var{directory}/pies}. 229keywords and values.
195@xref{MeTA1,,, mailfromd, Mailfromd Manual}, for an example. 230
196 231@menu
197The following standard Mailutils configuration statements are understood: 232* Comments::
198 233* Statements::
199@multitable @columnfractions 0.3 0.6 234