aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2019-07-22 17:29:02 +0300
committerSergey Poznyakoff <gray@gnu.org>2019-07-22 17:31:26 +0300
commitc4b4a65f12ac60ccdc964a866875cf3c8d42fcd5 (patch)
treebec9d8b60bb2759252df605e6cd7bc4faa5a6e35
parent4b670788bc8a21cf04119a8fd8ae2733860f2b9b (diff)
downloadwydawca-c4b4a65f12ac60ccdc964a866875cf3c8d42fcd5.tar.gz
wydawca-c4b4a65f12ac60ccdc964a866875cf3c8d42fcd5.tar.bz2
Verion 3.0release-3.0
-rw-r--r--NEWS15
-rw-r--r--configure.ac2
-rw-r--r--doc/wydawca.texi116
-rw-r--r--modules/logstat/mod_logstat.c5
-rw-r--r--src/module.c10
5 files changed, 107 insertions, 41 deletions
diff --git a/NEWS b/NEWS
index 26ef761..d99ce47 100644
--- a/NEWS
+++ b/NEWS
@@ -1,18 +1,25 @@
-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.
** Fix memory allocation bugs.
diff --git a/configure.ac b/configure.ac
index b070a4c..2eb680f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -12,13 +12,13 @@
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# 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])
AC_CONFIG_HEADER([config.h])
AC_CONFIG_MACRO_DIR(m4)
AM_INIT_AUTOMAKE([1.11 gnits tar-ustar dist-bzip2 dist-xz std-options silent-rules subdir-objects])
diff --git a/doc/wydawca.texi b/doc/wydawca.texi
index 6f769d1..2763b6d 100644
--- a/doc/wydawca.texi
+++ b/doc/wydawca.texi
@@ -927,12 +927,17 @@ diagnostic. An initial set of macro definitions is supplied by the
The default @file{pp-setup} file renames all @command{m4} built-in
macro names so they all start with the prefix @samp{m4_}. This
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:
@table @option
@xopindex{define, introduced}
@sopindex{D, introduced}
@@ -1771,12 +1776,17 @@ The same holds for the @var{gid} argument.
This statement is overridden by per-directory statements:
@code{source-owner} and @code{destination-owner} statements in
@code{spool} block (@pxref{spool}) and @code{directory-owner} statement
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
There may be cases when project maintainers need to overwrite
existing distributed files with another ones, having the same names.
(Note, however, that this practice is not encouraged). In that case,
@@ -2434,12 +2444,13 @@ The @var{file} argument is a file name of the module (normally, a
@end deffn
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
@samp{module-prepend-load-path} directive (see below).
@item
@@ -2498,12 +2509,27 @@ Initialize the module identified by @var{name}. The module must have
been previously loaded using the @samp{module} statement, as described
above. The statements between curly braces are module-specific
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
A number of @dfn{events} are tracked during the execution. Any of
them can be used to trigger the notification mechanism. It is
configured using the following statement:
@@ -3622,40 +3648,50 @@ spool @var{tag:@i{string}} @{
@node invocation
@chapter @command{Wydawca} invocation summary.
@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.
@xref{debug, The @option{--debug} option}.
@opsummary{define}
+@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}.
@opsummary{dump-grammar-trace}
@item --dump-grammar-trace
Dump configuration grammar traces. This is useful for debugging
@@ -3664,66 +3700,66 @@ Dump configuration grammar traces. This is useful for debugging
@opsummary{dump-lex-trace}
@item --dump-lex-trace
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
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
Force start-up, even if if the PID file already exists.
@opsummary{foreground}
@item --foreground
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.
@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
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}.
@opsummary{preprocessor}
@item --preprocessor=@var{command}
@@ -3732,33 +3768,45 @@ Use @var{command} instead of the default preprocessor. @pxref{Preprocessor}.
@opsummary{single-process}
@item --single-process
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}
+@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.
@opsummary{spool}
+@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.
-@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
@node Reporting Bugs
@chapter How to Report a Bug
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
@@ -114,12 +114,15 @@ wy_help(void)
{ "module-config", NULL,
"module configuration",
grecs_type_section, GRECS_INAC, NULL, 0, NULL, NULL,
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
@@ -272,13 +272,21 @@ module_help(const char *modname)
if (lt_dlinit()) {
wy_log(LOG_ERR, _("failed to initialize libtool"));
exit(EX_UNAVAILABLE);
}
- 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());
else {
if (lt_dladvise_ext(&advise))
wy_log(LOG_ERR, "lt_dladvise_ext: %s", lt_dlerror());

Return to:

Send suggestions and report system problems to the System administrator.