aboutsummaryrefslogtreecommitdiff
path: root/doc/wydawca.texi
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2019-07-22 12:22:44 +0300
committerSergey Poznyakoff <gray@gnu.org>2019-07-22 12:22:44 +0300
commit0917d1276103d9cc893e8ac091e9e63c5e6182f8 (patch)
treee7dc735efc3b6543922e56d24e1e3289a25e71cd /doc/wydawca.texi
parent77f10fa54db3a4f0d9c782e8e9dd39051afc19f0 (diff)
downloadwydawca-0917d1276103d9cc893e8ac091e9e63c5e6182f8.tar.gz
wydawca-0917d1276103d9cc893e8ac091e9e63c5e6182f8.tar.bz2
Document the module subsystem
Diffstat (limited to 'doc/wydawca.texi')
-rw-r--r--doc/wydawca.texi579
1 files changed, 407 insertions, 172 deletions
diff --git a/doc/wydawca.texi b/doc/wydawca.texi
index ca58d1d..db06139 100644
--- a/doc/wydawca.texi
+++ b/doc/wydawca.texi
@@ -37,13 +37,10 @@ Copyright @copyright{} 2007, 2009, 2010, 2011, 2012, 2013, 2014, 2015,
37Permission is granted to copy, distribute and/or modify this document 37Permission is granted to copy, distribute and/or modify this document
38under the terms of the GNU Free Documentation License, Version 1.2 or 38under the terms of the GNU Free Documentation License, Version 1.2 or
39any later version published by the Free Software Foundation; with no 39any later version published by the Free Software Foundation; with no
40Invariant Sections, with the Front-Cover texts being ``A GNU Manual'', 40Invariant Sections, no Front-Cover, and no Back-Cover texts.
41and with the Back-Cover Texts as in (a) below. A copy of the license
42is included in the section entitled ``GNU Free Documentation License''.
43 41
44(a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify 42A copy of the license is included in the section entitled ``GNU Free
45this GNU Manual, like GNU software. Copies published by the Free 43Documentation License''.
46Software Foundation raise funds for GNU development.''
47@end copying 44@end copying
48 45
49@titlepage 46@titlepage
@@ -144,7 +141,7 @@ Mail Notification
144@chapter Introduction to Wydawca 141@chapter Introduction to Wydawca
145@cindex introduction 142@cindex introduction
146 Let's begin with a short synopsis. Suppose you run a developer's 143 Let's begin with a short synopsis. Suppose you run a developer's
147site, like, e.g. @indicateurl{gnu.org}. You have two 144site, such as e.g. @indicateurl{gnu.org}. You have two
148@dfn{distribution @acronym{URL}s}: @indicateurl{ftp.gnu.org}, which 145@dfn{distribution @acronym{URL}s}: @indicateurl{ftp.gnu.org}, which
149distributes stable versions of the software, and 146distributes stable versions of the software, and
150@indicateurl{alpha.gnu.org}, which distributes alpha and pre-test 147@indicateurl{alpha.gnu.org}, which distributes alpha and pre-test
@@ -194,8 +191,8 @@ their distribution sites.
194 191
195 @command{Wydawca} is such a release submission daemon. It is able to 192 @command{Wydawca} is such a release submission daemon. It is able to
196handle any number of @samp{source/destination} pairs (called 193handle any number of @samp{source/destination} pairs (called
197@dfn{spools}) in real time, and offers an extensible logging and mail 194@dfn{spools}) in real time, and offers extensible logging and
198notification mechanism, allowing both package maintainers and site 195notification mechanisms, allowing both package maintainers and site
199administrators to be immediately notified about any occurring problems. 196administrators to be immediately notified about any occurring problems.
200 197
201 @command{Wydawca} supports upload directive versions 1.1@footnote{ 198 @command{Wydawca} supports upload directive versions 1.1@footnote{
@@ -249,14 +246,14 @@ that case.
249upload and corresponding distribution directories. In 246upload and corresponding distribution directories. In
250@command{wydawca} terminology, upload directories are also called 247@command{wydawca} terminology, upload directories are also called
251@dfn{source}, and distribution directories -- @dfn{destination} 248@dfn{source}, and distribution directories -- @dfn{destination}
252directories. The configuration file also supplies all the information 249directories. The configuration file supplies also the information
253necessary to access user and project databases. 250necessary to access user and project databases.
254 251
255 When started, @command{wydawca} scans each source directory and 252 When started, @command{wydawca} scans each source directory and
256prepares a list of files found there. Then, it compacts this list by 253prepares a list of files found there. Then, it compacts this list by
257looking for @dfn{directive files} and re-arranging list members in 254looking for @dfn{directive files} and re-arranging list members in
258@dfn{triplets}. A @dfn{directive file} is a special file that must be 255@dfn{triplets}. A @dfn{directive file} is a special file that must be
259supplied with each upload and that contains directive regarding the 256supplied with each upload and that contains instructions regarding the
260placement of the uploaded files. A @dfn{triplet} is a standard 257placement of the uploaded files. A @dfn{triplet} is a standard
261entity, consisting of three files: a clear-signed directive file, a 258entity, consisting of three files: a clear-signed directive file, a
262file to be distributed, and a detached signature of the latter. 259file to be distributed, and a detached signature of the latter.
@@ -288,8 +285,8 @@ possibility to restart interrupted or otherwise broken uploads later.
288@cindex @acronym{PGP} 285@cindex @acronym{PGP}
289 After completing these preliminary stages, @command{wydawca} 286 After completing these preliminary stages, @command{wydawca}
290analyzes the directive file and extracts the project name 287analyzes the directive file and extracts the project name
291from it. Using this name as a key, it looks up in the @dfn{project 288from it. Using this name as a key, it searches in the @dfn{project
292dictionary} a list of users authorized to make uploads for this 289dictionary} for a list of users authorized to make uploads for this
293project. This list contains user names and their corresponding public 290project. This list contains user names and their corresponding public
294@acronym{PGP} keys. @command{Wydawca} tries to verify the directive 291@acronym{PGP} keys. @command{Wydawca} tries to verify the directive
295file using each @acronym{PGP} key from this list, until a matching 292file using each @acronym{PGP} key from this list, until a matching
@@ -435,6 +432,11 @@ by using the following options:
435$ wydawca --spool=ftp --spool=test --source=/home/ftp/test-upload 432$ wydawca --spool=ftp --spool=test --source=/home/ftp/test-upload
436@end smallexample 433@end smallexample
437 434
435 Any non-optional arguments appearing in the command line, are
436treated as the uploaders' UIDs. If present, only triplets uploaded by
437these users will be processed. Of course, such UIDs can be combined
438with the @option{--spool} and @option{--source} options.
439
438@anchor{debug} 440@anchor{debug}
439@xopindex{debug, described} 441@xopindex{debug, described}
440@sopindex{d, described} 442@sopindex{d, described}
@@ -480,7 +482,7 @@ $ wydawca -c new.cfg --dry-run
480@dfn{configuration file} @file{wydawca.rc}. By default it is located 482@dfn{configuration file} @file{wydawca.rc}. By default it is located
481in @var{$sysconfidr} (i.e., in most cases @file{/usr/local/etc}, or 483in @var{$sysconfidr} (i.e., in most cases @file{/usr/local/etc}, or
482@file{/etc}), but an alternative location may be specified using 484@file{/etc}), but an alternative location may be specified using
483@option{--config} command line option (@pxref{starting, config-file}). 485@option{--config-file} command line option (@pxref{starting, config-file}).
484 486
485 If any errors are encountered in the configuration file, the program 487 If any errors are encountered in the configuration file, the program
486reports them on its error output and exits with a non-zero status. 488reports them on its error output and exits with a non-zero status.
@@ -2252,20 +2254,196 @@ statistics (all, errors, warnings);
2252@end deffn 2254@end deffn
2253 2255
2254@node notification 2256@node notification
2255@section Mail Notification 2257@section Notification Mechanism
2256@cindex mail notification 2258@cindex notification
2257While running, @command{wydawca} keeps track of certain events 2259While running, @command{wydawca} keeps track of certain events
2258occurring, such as, for example, broken @acronym{PGP} signatures or 2260occurring, such as, for example, broken @acronym{PGP} signatures or
2259file uploads attempted by unauthorized users. The utility can notify, 2261file uploads attempted by unauthorized users. It can issue
2260via email, project administrators about any of those events that 2262notifications about such events using the supplied loadable modules.
2261concern their projects. Additionally, the system administrator can 2263
2262choose to obtain via email the execution statistics, described in the 2264Configuration of notifications consists of two parts. First the
2263previous section. 2265required loadable module must be loaded and configured. Then,
2266configure the notification itself.
2267
2268@menu
2269* modules::
2270* event notification::
2271* mod_mailutils:: Mail Notification
2272* mod_logstat:: Notification to syslog
2273@end menu
2274
2275@node modules
2276@subsection modules
2277
2278A @dfn{loadable module} is a piece of software that provides
2279notification mechanism for @command{wydawca}. It is built as a UNIX
2280dynamically loaded library and placed in one of the preconfigured
2281directories which constitute a @dfn{library load path}. To load a
2282module, the following statement is used:
2283
2284@deffn {Config} module @var{name} @var{file}
2285Load the module @var{name} from @var{file}. Other places of the
2286configuration file can refer to the module as @var{name}.
2287
2288The @var{file} argument is a file name of the module (normally, a
2289@samp{file.so} or @samp{file.la} file).
2290@end deffn
2291
2292Unless @var{file} in the @samp{module} statement it is an absolute
2293file name, it will be searched in the library load path, which is
2294defined as:
2295
2296@enumerate 1
2297@item
2298Optional @dfn{prefix} search directories specified by the
2299@samp{module-prepend-load-path} directive (see below).
2300
2301@item
2302@command{Wydawca} module directory: @samp{@var{$prefix}/lib/wydawca}.
2303
2304@item
2305Additional search directories specified by the @command{module-load-path}
2306directive (see below).
2307
2308@item
2309The value of the environment variable @env{LTDL_LIBRARY_PATH}.
2310
2311@item
2312The system dependent library search path (e.g. on GNU/Linux it is
2313defined by the file @file{/etc/ld.so.conf} and the environment variable
2314@env{LD_LIBRARY_PATH}).
2315@end enumerate
2316
2317The value of @env{LTDL_LIBRARY_PATH} and @env{LD_LIBRARY_PATH} must be a
2318colon-separated list of absolute directory names, for example
2319@samp{/usr/lib/mypkg:/lib/foo}.
2320
2321In any of these directories, @command{wydawca} first attempts to find
2322and load the given filename. If this fails, it tries to append the following
2323suffixes to it:
2324
2325@enumerate 1
2326@item the libtool archive suffix: @samp{.la}
2327
2328@item the suffix used for native dynamic libraries on the host platform,
2329e.g., @samp{.so}, @samp{.sl}, etc.
2330@end enumerate
2331
2332The statements that modify the module search path are:
2333
2334@deffn {Config} module-load-path @var{list}
2335This directive adds the directories listed in its argument to the
2336module load path. Example:
2337
2338@example
2339module-load-path (/usr/lib/wydawca,/usr/local/wydawca/lib);
2340@end example
2341@end deffn
2342
2343@deffn {Config} module-prepend-load-path @var{list}
2344Same as above, but the directories from @var{list} are added to the
2345beginning of the module search list, rather than to its end. The
2346order of directories in @var{list} is preserved in both cases.
2347@end deffn
2348
2349Once loaded, the module can be initialized. This is done by the
2350following block statement:
2351
2352@deffn {Config} module-init @var{name} @{ ... @}
2353Initialize the module identified by @var{name}. The module must have
2354been previously loaded using the @samp{module} statement, as described
2355above. The statements between curly braces are module-specific
2356configuration statements. See the module descriptions below for a
2357detailed discussion of these.
2358@end deffn
2359
</