Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
5 files changed, 107 insertions, 41 deletions
diff --git a/NEWS b/NEWS
index 26ef761..d99ce47 100644
--- a/NEWS
+++ b/NEWS
@@ -1,15 +1,22 @@
-Wydawca NEWS -- history of user-visible changes. 2019-07-15
+Wydawca NEWS -- history of user-visible changes. 2019-07-22
See the end of file for copying conditions.
Please send Wydawca bug reports to <>.
-Version 2.99.92 (git)
+Version 3.0, 2019-07-22
* Introduce loadable modules.
-Two modules are provided: mailutils, for using GNU mailutils, and
-logstat, for logging statistics.
+Two modules are provided: mailutils, for mail notification using GNU
+mailutils, and logstat, for logging statistics.
+* Directory setup
+The new statement "create-directories" instructs wydawca to create
+missing source, destination and archive directories. Additional
+configuration statements are provided to configure ownership and modes
+of the created directories.
* Bugfixes
** Avoid processing same triplet twice.
diff --git a/ b/
index b070a4c..2eb680f 100644
--- a/
+++ b/
@@ -15,7 +15,7 @@
# along with wydawca. If not, see <>.
-AC_INIT([wydawca], 2.99.92, [], [wydawca],
+AC_INIT([wydawca], 3.0, [], [wydawca],
diff --git a/doc/wydawca.texi b/doc/wydawca.texi
index 6f769d1..2763b6d 100644
--- a/doc/wydawca.texi
+++ b/doc/wydawca.texi
@@ -930,6 +930,11 @@ is similar to GNU m4 @option{--prefix-builtin} options, but has an
advantage that it works with non-GNU @command{m4} implementations as
+@sopindex{E, described}
+ To examine the preprocessed configuration, use the @option{-E}
+option. The output from @command{m4} will be printed on the standard
+output and the program will terminate.
Additional control over the preprocessor is provided via the
following command line options:
@@ -1774,6 +1779,11 @@ This statement is overridden by per-directory statements:
in @code{archive} block (@pxref{archivation}).
@end deffn
+Notice, that both @code{directory-mode} and @code{directory-owner}
+apply only to the last component of the created directory
+(@samp{basename}). Any intermediate directories are created with
+default mode and ownership.
@node archivation
@section Archivation
@cindex archivation, defined
@@ -2437,6 +2447,7 @@ Unless @var{file} in the @samp{module} statement it is an absolute
file name, it will be searched in the library load path, which is
defined as:
+@anchor{library search path}
@enumerate 1
Optional @dfn{prefix} search directories specified by the
@@ -2501,6 +2512,21 @@ configuration statements. See the module descriptions below for a
detailed discussion of these.
@end deffn
+@xopindex{module-help, introduced}
+To list module-specific configuration directives with a short usage
+instructions, use the @option{--module-help} statement:
+wydawca --module-help=@var{file}
+@end smallexample
+If the @var{file} argument is the base module name
+(e.g. @samp{mod_mailutils}), it will be looked in the default
+library load path (@pxref{library search path}). If it contains
+directory components, the @var{file} will be loaded from the specified
@node event notification
@subsection Event Notification
@@ -3625,25 +3651,34 @@ spool @var{tag:@i{string}} @{
@cindex invocation
@cindex command line options
This chapter presents a short reference of all @command{wydawca}
-command line options, in alphabetical order.
+command line options. The entries are sorted alphabetically by their
+long option name. Where no long option exists, short option
+is used instead.
@table @option
+@sopindex{c, summary}
@item --config-file=@var{file}
@itemx -c @var{file}
-Use @var{file} instead of the default configuration
+Use @var{file} instead of the default configuration file.
@xref{config-file, The @option{--config-file} option}.
+@item --config-help
+Display a concise summary of the available configuration directives.
+This does not include statements specific for particular loadable
+modules. To display these, use the @option{--module-help} option
+(@pxref{modules, --module-help}).
@item --cron
Run in cron mode. @xref{starting,, cron}.
@xref{stderr, The @option{--syslog} option}.
+@sopindex{d, summary}
@item --debug
@itemx -d
Increase debugging level by 1.
@@ -3651,8 +3686,9 @@ Increase debugging level by 1.
@xref{debug, The @option{--debug} option}.
+@sopindex{D, summary}
@item --define=@var{name}[=@var{value}]
-@itemx -D@var{name}[=@var{value}]
+@itemx -D @var{name}[=@var{value}]
Define the preprocessor symbol @var{name} as having @var{value}, or
empty. @xref{Preprocessor}.
@@ -3667,6 +3703,7 @@ Dump lexical analyzer traces. This is useful for debugging
@command{wydawca} configuration file parser.
+@sopindex{n, summary}
@item --dry-run
@itemx -n
@dfn{Dry-run mode}: do nothing, print almost everything. This option
@@ -3674,28 +3711,11 @@ implies @option{--debug --stderr}.
@xref{dry-run, The dry-run mode}.
-@item --stderr
-@itemx -e
-Log to the standard error.
-@xref{stderr, The @option{--stderr} option}.
-@item --spool=@var{tag}
-@itemx -S @var{tag}
-Process only spool with the given tag. @xref{spool selection}.
-@item --source=@var{dir}
-@itemx -s @var{dir}
-Process only spool with @var{dir} as the source directory.
-@xref{spool selection}.
-@item --syslog
-Log all diagnostics to syslog.
-@xref{stderr, The @option{--syslog} option}.
+@sopindex{E, summary}
+@item -E
+Dump the preprocessed configuration to stdout and exit.
@item --force
@@ -3706,7 +3726,14 @@ Force start-up, even if if the PID file already exists.
Remain in the foreground. This is mostly for debugging
+@sopindex{h, summary}
+@item --help
+@itemx -h
+Print a concise usage summary and exit.
+@sopindex{I, summary}
@item --include-directory=@var{dir}
@itemx -I @var{dir}
Add @var{dir} to include search path.
@@ -3714,6 +3741,7 @@ Add @var{dir} to include search path.
@xref{Pragmatic Comments, #include}. @xref{Preprocessor}.
+@sopindex{t, summary}
@item --lint
@itemx -t
Parse configuration file, report any errors on the standard error and
@@ -3721,6 +3749,14 @@ exit with code 0, if the syntax is OK, and with code 1 otherwise.
@xref{lint, The @option{--lint} option}.
+@item --module-help=@var{file}
+Loads module @var{file} (@pxref{modules}) and displays help about its
+configuration. If @var{file} is an absolute or relative pathname,
+it will be loaded as is. Otherwise, @command{wydawca} will search for
+module @var{file} in its default library load path (@pxref{library
+search path}).
@item --no-preprocessor
Disable preprocessor. @pxref{Preprocessor}.
@@ -3735,27 +3771,39 @@ Serialize job invocations by not forking subprocesses for each job.
@emph{Do not use this option in production environment}.
+@sopindex{s, summary}
@item --source=@var{name}
-@itemx -s@var{name}
+@itemx -s @var{name}
Process only the spool with the given source name. This option
may be given multiple times, to select several spools by their
source names.
+@sopindex{S, summary}
@item --spool=@var{tag}
-@itemx -S@var{tag}
+@itemx -S @var{tag}
Process only spool with the given tag. This option
may be given multiple times, to select several spools by their
tag names.
-@item --help
-@itemx -h
-Print a concise usage summary and exit.
+@sopindex{e, summary}
+@item --stderr
+@itemx -e
+Log to the standard error.
+@xref{stderr, The @option{--stderr} option}.
+@item --syslog
+Log all diagnostics to syslog.
+@xref{stderr, The @option{--syslog} option}.
+@sopindex{V, summary}
@item --version
-@itemx -v
+@itemx -V
Print the program version and exit.
@end table
diff --git a/modules/logstat/mod_logstat.c b/modules/logstat/mod_logstat.c
index 60b9da8..02452e2 100644
--- a/modules/logstat/mod_logstat.c
+++ b/modules/logstat/mod_logstat.c
@@ -117,8 +117,11 @@ wy_help(void)
logstat_kw },
{ NULL }
+ static char const *docstring = "\n\
+mod_logstat sends statistics reports to syslog\n";
- printf("\n\n# Usage in notify-event statement:\n");
+ puts(docstring);
+ printf("# Usage in notify-event statement:\n");
printf("notify-event {\n event statistics;\n module logstat;");
grecs_print_statement_array(top, 1, 1, stdout);
diff --git a/src/module.c b/src/module.c
index ad1812b..1a98418 100644
--- a/src/module.c
+++ b/src/module.c
@@ -275,7 +275,15 @@ module_help(const char *modname)
- lt_dladdsearchdir(WYDAWCA_MODDIR);
+ if (strchr(modname, '/')) {
+ char const *basename;
+ char *dirname;
+ basename = split_filename(modname, &dirname);
+ lt_dladdsearchdir(dirname);
+ modname = basename;
+ } else
+ lt_dladdsearchdir(WYDAWCA_MODDIR);
if (lt_dladvise_init(&advise))
wy_log(LOG_ERR, "lt_dladvise_init: %s", lt_dlerror());

Return to:

Send suggestions and report system problems to the System administrator.