aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NEWS15
-rw-r--r--configure.ac2
-rw-r--r--doc/wydawca.texi110
-rw-r--r--modules/logstat/mod_logstat.c5
-rw-r--r--src/module.c8
5 files changed, 103 insertions, 37 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 <bug-wydawca@gnu.org.ua>.
-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/configure.ac b/configure.ac
index b070a4c..2eb680f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -15,7 +15,7 @@
# along with wydawca. If not, see <http://www.gnu.org/licenses/>.
AC_PREREQ(2.63)
-AC_INIT([wydawca], 2.99.92, [bug-wydawca@gnu.org.ua], [wydawca],
+AC_INIT([wydawca], 3.0, [bug-wydawca@gnu.org.ua], [wydawca],
[http://www.gnu.org.ua/software/wydawca])
AC_CONFIG_SRCDIR([src/wydawca.c])
AC_CONFIG_AUX_DIR([build-aux])
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
well.
+@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
@item
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:
+
+@smallexample
+wydawca --module-help=@var{file}
+@end smallexample
+
+@noindent
+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
+directory.
+
@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
@opsummary{config-file}
+@sopindex{c, summary}
@item --config-file=@var{file}
@itemx -c @var{file}
-Use @var{file} instead of the default configuration
-file.
+Use @var{file} instead of the default configuration file.
@xref{config-file, The @option{--config-file} option}.
+@opsummary{config-help}
+@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}).
+
@opsummary{cron}
-@opsummary{syslog}
@item --cron
Run in cron mode. @xref{starting,, cron}.
@xref{stderr, The @option{--syslog} option}.
@opsummary{debug}
+@sopindex{d, summary}
@item --debug
@itemx -d
Increase debugging level by 1.
@@ -3651,6 +3686,7 @@ Increase debugging level by 1.
@xref{debug, The @option{--debug} option}.
@opsummary{define}
+@sopindex{D, summary}
@item --define=@var{name}[=@var{value}]
@itemx -D @var{name}[=@var{value}]
Define the preprocessor symbol @var{name} as having @var{value}, or
@@ -3667,6 +3703,7 @@ Dump lexical analyzer traces. This is useful for debugging
@command{wydawca} configuration file parser.
@opsummary{dry-run}
+@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}.
-@opsummary{stderr}
-@item --stderr
-@itemx -e
-Log to the standard error.
-
-@xref{stderr, The @option{--stderr} option}.
-
-@opsummary{spool}
-@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}.
-
-@opsummary{syslog}
-@item --syslog
-Log all diagnostics to syslog.
-
-@xref{stderr, The @option{--syslog} option}.
+@anchor{-E}
+@sopindex{E, summary}
+@item -E
+Dump the preprocessed configuration to stdout and exit.
+@pxref{Preprocessor}.
@opsummary{force}
@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
@command{wydawca}.
+@opsummary{help}
+@sopindex{h, summary}
+@item --help
+@itemx -h
+Print a concise usage summary and exit.
+
@opsummary{include-directory}
+@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}.
@opsummary{lint}
+@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}.
+@opsummary{module-help}
+@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}).
+
@opsummary{no-preprocessor}
@item --no-preprocessor
Disable preprocessor. @pxref{Preprocessor}.
@@ -3735,6 +3771,7 @@ Serialize job invocations by not forking subprocesses for each job.
@emph{Do not use this option in production environment}.
@opsummary{source}
+@sopindex{s, summary}
@item --source=@var{name}
@itemx -s @var{name}
Process only the spool with the given source name. This option
@@ -3742,20 +3779,31 @@ may be given multiple times, to select several spools by their
source names.
@opsummary{spool}
+@sopindex{S, summary}
@item --spool=@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.
-@opsummary{help}
-@item --help
-@itemx -h
-Print a concise usage summary and exit.
+@opsummary{stderr}
+@sopindex{e, summary}
+@item --stderr
+@itemx -e
+Log to the standard error.
+
+@xref{stderr, The @option{--stderr} option}.
+
+@opsummary{syslog}
+@item --syslog
+Log all diagnostics to syslog.
+
+@xref{stderr, The @option{--syslog} option}.
@opsummary{version}
+@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);
printf("}\n");
diff --git a/src/module.c b/src/module.c
index ad1812b..1a98418 100644
--- a/src/module.c
+++ b/src/module.c
@@ -275,6 +275,14 @@ module_help(const char *modname)
exit(EX_UNAVAILABLE);
}
+ 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))

Return to:

Send suggestions and report system problems to the System administrator.