aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.dir-locals.el1
-rw-r--r--Makefile.am4
-rw-r--r--NEWS42
-rw-r--r--README2
-rw-r--r--README-alpha2
-rw-r--r--README-hacking2
-rw-r--r--am/ax_closefrom.m464
-rw-r--r--am/ax_pthread.m42
-rw-r--r--am/wy_check_lib.m42
-rw-r--r--configure.ac49
-rw-r--r--doc/Makefile.am2
-rw-r--r--doc/html.init2
-rw-r--r--doc/wydawca.texi40
-rw-r--r--etc/Makefile.am3
-rw-r--r--etc/wydawca.conf2
m---------grecs0
-rw-r--r--include/wydawca/cfg.h2
-rw-r--r--include/wydawca/wydawca.h5
-rw-r--r--modules/logstat/mod_logstat.c2
-rw-r--r--modules/mailutils/mod_mailutils.c43
-rw-r--r--src/Makefile.am8
-rw-r--r--src/backup.c2
-rw-r--r--src/builtin.c2
-rw-r--r--src/builtin.h2
-rw-r--r--src/closefrom.c135
-rw-r--r--src/cmdline.opt81
-rw-r--r--src/config.c60
-rw-r--r--src/dictionary.c2
-rw-r--r--src/directive.c187
-rw-r--r--src/diskio.c24
-rw-r--r--src/exec.c5
-rw-r--r--src/gpg.c38
-rw-r--r--src/interval.c2
-rw-r--r--src/micron.c2
-rw-r--r--src/micron.h2
-rw-r--r--src/module.c146
-rw-r--r--src/net.c2
-rw-r--r--src/null.c2
-rw-r--r--src/pidfile.c2
-rw-r--r--src/spool.c17
-rw-r--r--src/sql.c2
-rw-r--r--src/sql.h2
-rw-r--r--src/stat.c3
-rw-r--r--src/tcpwrap.c2
-rw-r--r--src/triplet.c70
-rw-r--r--src/userprivs.c2
-rw-r--r--src/verify.c12
-rw-r--r--src/vtab.c2
-rw-r--r--src/watcher.c2
-rw-r--r--src/wydawca.c10
-rw-r--r--src/wydawca.h32
-rw-r--r--tests/Makefile.am4
-rw-r--r--tests/atlocal.in19
-rw-r--r--tests/backup00.at2
-rw-r--r--tests/backup01.at2
-rw-r--r--tests/backup02.at2
-rw-r--r--tests/backup03.at2
-rw-r--r--tests/bkupname.c2
-rw-r--r--tests/chargen.c2
-rw-r--r--tests/check-fail.at6
-rw-r--r--tests/check-notify.at8
-rw-r--r--tests/check-ok.at6
-rw-r--r--tests/cwdrepl.c2
-rw-r--r--tests/dry_run00.at5
-rw-r--r--tests/dry_run01.at9
-rw-r--r--tests/dry_run02.at5
-rw-r--r--tests/etc/Makefile.am4
-rw-r--r--tests/etc/mailstats.cfin2
-rw-r--r--tests/etc/notify.cf2
-rw-r--r--tests/inotify-ok.at4
-rw-r--r--tests/inotify-rmsymlink.at4
-rw-r--r--tests/inotify-symlink.at5
-rw-r--r--tests/inotify-unatt00.at5
-rw-r--r--tests/inotify-unatt01.at6
-rw-r--r--tests/mailnotify.at6
-rw-r--r--tests/mailstats.at6
-rw-r--r--tests/nullmail.c3
-rw-r--r--tests/rmsymlink00.at5
-rw-r--r--tests/spoolsrc.at45
-rw-r--r--tests/symlink00.at5
-rw-r--r--tests/symlink01.at5
-rw-r--r--tests/testsuite.at9
-rw-r--r--tests/unp-idle.at4
-rw-r--r--tests/unp00.at4
-rw-r--r--tests/unp01.at4
-rw-r--r--tests/unp02.at6
-rw-r--r--tests/upload00.at5
-rw-r--r--tests/upload01.at7
-rw-r--r--tests/upload02.at7
-rw-r--r--tests/upload03.at5
-rw-r--r--tests/upload04.at27
-rw-r--r--tests/upload05.at5
-rw-r--r--tests/verify.at62
-rw-r--r--tests/version.at3
-rw-r--r--tests/wyasync.c2
-rw-r--r--tests/wyclt.c5
-rw-r--r--tests/wyinit.c4
97 files changed, 992 insertions, 481 deletions
diff --git a/.dir-locals.el b/.dir-locals.el
new file mode 100644
index 0000000..8d1a768
--- /dev/null
+++ b/.dir-locals.el
@@ -0,0 +1 @@
+((c-mode . ((c-file-style . "k&r") (c-basic-offset . 4))))
diff --git a/Makefile.am b/Makefile.am
index db70dde..b86779a 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,5 +1,5 @@
# This file is part of Wydawca
-# Copyright (C) 2007, 2009-2013, 2017, 2019-2020 Sergey Poznyakoff
+# Copyright (C) 2007, 2009-2013, 2017, 2019-2023 Sergey Poznyakoff
#
# Wydawca is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -16,7 +16,7 @@
ACLOCAL_AMFLAGS = -I m4 -I am -I grecs/am -I imprimatur
-SUBDIRS=grecs libltdl include src modules imprimatur doc etc tests
+SUBDIRS=grecs include src modules imprimatur doc etc tests
# We never remove files from the configuration directory
distuninstallcheck_listfiles = \
diff --git a/NEWS b/NEWS
index 1122c6f..5ad16b9 100644
--- a/NEWS
+++ b/NEWS
@@ -1,12 +1,44 @@
-Wydawca NEWS -- history of user-visible changes. 2020-05-17
+Wydawca NEWS -- history of user-visible changes. 2023-03-31
See the end of file for copying conditions.
Please send Wydawca bug reports to <bug-wydawca@gnu.org.ua>.
-Version 4.0.99 (git)
+Version 4.0.90 (git)
+
+* Distribution verification is run in a separate temporary directory
+
+* Directives in a directive file can appear in any order
+
+* Improved verification of the directive file format
+
+* Loadable Modules
+
+The argument to the "module" statement must be the loadable library
+name (with optional directive part). Libtool-compatible ".la" files
+are no longer supported.
+
+Libraries are searched in the path defined by module-load-path and
+module-prepend-load-path statements. The LTDL_LIBRARY_PATH
+environment variable is no longer used.
+
+* New version of the configuration parser
+
+* Various bugfixes
+
+
+Version 4.0.3, 2021-01-06
+
+Fix handling of archivation requests.
+
+
+Version 4.0.2, 2020-10-12
* Timers removed
+* Work over the bug in mailutils mailer implementation.
+
+* Fix creation of spool source directories
+
Version 4.0.1, 2020-05-02
@@ -26,7 +58,7 @@ Other important changes:
Upon startup, wydawca always scans the configured spools. This
ensures that when started in daemon mode, it will pick up any
-triplets that may have been upload while it was down.
+triplets that may have been uploaded while it was down.
* No unnecessary chdirs.
@@ -51,7 +83,7 @@ Previous versions of wydawca allowed for several instances to be run
at the same time. In particular, it allowed for wydawca to be started
in cron mode while another instance of the program was running as a
deamon. To prevent two wydawca instances from accessing the same
-spool simultaneously lock files were used.
+spool simultaneously, lock files were used.
This version does not allow for such usage. Only one copy of wydawca
can be running. Therefore spool locking has been discontinued.
@@ -349,7 +381,7 @@ Version 1.0, 2008-08-23
----------------------------------------------------------------------
Copyright information:
-Copyright (C) 2007-2020 Sergey Poznyakoff
+Copyright (C) 2007-2022 Sergey Poznyakoff
Permission is granted to anyone to make or distribute verbatim copies
of this document as received, in any medium, provided that the
diff --git a/README b/README
index b8dba20..6a3ef4b 100644
--- a/README
+++ b/README
@@ -36,7 +36,7 @@ Send bug reports to <bug-wydawca@gnu.org.ua>.
* Copyright information:
-Copyright (C) 2007-2020 Sergey Poznyakoff
+Copyright (C) 2007-2022 Sergey Poznyakoff
Permission is granted to anyone to make or distribute verbatim copies
of this document as received, in any medium, provided that the
diff --git a/README-alpha b/README-alpha
index b353ea5..75dcc1d 100644
--- a/README-alpha
+++ b/README-alpha
@@ -39,7 +39,7 @@ SVN version.
* Copyright information
- Copyright (C) 2007-2020 Sergey Poznyakoff
+ Copyright (C) 2007-2022 Sergey Poznyakoff
Permission is granted to anyone to make or distribute verbatim copies
of this document as received, in any medium, provided that the
diff --git a/README-hacking b/README-hacking
index b38cd43..645f6a5 100644
--- a/README-hacking
+++ b/README-hacking
@@ -53,7 +53,7 @@ For more information about `bootstrap', run `bootstrap --help'.
* Copyright information
- Copyright (C) 2007-2020 Sergey Poznyakoff
+ Copyright (C) 2007-2022 Sergey Poznyakoff
Permission is granted to anyone to make or distribute verbatim copies
of this document as received, in any medium, provided that the
diff --git a/am/ax_closefrom.m4 b/am/ax_closefrom.m4
new file mode 100644
index 0000000..959e767
--- /dev/null
+++ b/am/ax_closefrom.m4
@@ -0,0 +1,64 @@
+# SYNOPSIS
+#
+# AX_CLOSEFROM
+#
+# DESCRIPTION
+#
+# This macro figures out the best way to close all file descriptors
+# greater than or equal to the given one. It evaluates the following
+# variants:
+#
+# 1. closefrom call (FreeBSD)
+# 2. F_CLOSEM fcntl (NetBSD, AIX, IRIX)
+# 3. proc_pidinfo call (Darwin)
+# 4. /proc/self/fd filesystem (Linux)
+#
+# If none of these is applicable, brute force approach will be used.
+#
+# LICENSE
+#
+# This file is part of Wydawca
+# Copyright (C) 2021-2023 Sergey Poznyakoff
+#
+# Wydawca is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# Wydawca is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# 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_DEFUN([AX_CLOSEFROM],
+[
+AC_CHECK_FUNCS([sysconf getdtablesize closefrom proc_pidinfo])
+
+AC_CHECK_DECL([F_CLOSEM],
+ AC_DEFINE([HAVE_FCNTL_CLOSEM], [1],
+ [Use F_CLOSEM fcntl for wy_close_fds_from]),
+ [],
+ [#include <limits.h>
+ #include <fcntl.h>
+])
+
+AC_CHECK_HEADERS([libproc.h])
+
+AC_MSG_CHECKING([for closefrom interface])
+if test "$ac_cv_func_closefrom" = yes; then
+ closefrom_api=closefrom
+elif test "$ac_cv_have_decl_F_CLOSEM" = yes; then
+ closefrom_api=F_CLOSEM
+elif test "${ac_cv_header_libproc_h}-$ac_cv_func_proc_pidinfo" = "yes-yes"; then
+ closefrom_api=proc_pidinfo
+elif test -d "/proc/self/fd" ; then
+ AC_DEFINE([HAVE_PROC_SELF_FD], [1], [Define if you have /proc/self/fd])
+ closefrom_api=proc
+else
+ closefrom_api=bruteforce
+fi
+AC_MSG_RESULT([$closefrom_api])
+])
diff --git a/am/ax_pthread.m4 b/am/ax_pthread.m4
index 1598d07..507f182 100644
--- a/am/ax_pthread.m4
+++ b/am/ax_pthread.m4
@@ -386,7 +386,7 @@ if test "x$ax_pthread_clang" = "xyes"; then
# step
ax_pthread_save_ac_link="$ac_link"
ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
- ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"`
+ ax_pthread_link_step=`AS_ECHO(["$ac_link"]) | sed "$ax_pthread_sed"`
ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
ax_pthread_save_CFLAGS="$CFLAGS"
for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
diff --git a/am/wy_check_lib.m4 b/am/wy_check_lib.m4
index fb6c8ce..b52aa41 100644
--- a/am/wy_check_lib.m4
+++ b/am/wy_check_lib.m4
@@ -1,4 +1,4 @@
-# Copyright (C) 2001, 2006, 2008-2011, 2017, 2019-2020 Sergey Poznyakoff
+# Copyright (C) 2001, 2006, 2008-2011, 2017, 2019-2022 Sergey Poznyakoff
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/configure.ac b/configure.ac
index cc85145..b08fcb1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,5 +1,5 @@
# This file is part of Wydawca -*- autoconf -*-
-# Copyright (C) 2007-2020 Sergey Poznyakoff
+# Copyright (C) 2007-2023 Sergey Poznyakoff
#
# Wydawca is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -14,14 +14,14 @@
# 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], 4.0.1, [bug-wydawca@gnu.org.ua], [wydawca],
+AC_PREREQ([2.71])
+AC_INIT([wydawca], 4.0.90, [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_HEADERS([config.h])
AC_CONFIG_MACRO_DIRS([m4])
-AM_INIT_AUTOMAKE([1.15 gnits tar-ustar dist-bzip2 dist-xz std-options silent-rules subdir-objects])
+AM_INIT_AUTOMAKE([1.16.5 gnits tar-ustar dist-bzip2 dist-xz std-options silent-rules subdir-objects])
# Enable silent rules by default:
AM_SILENT_RULES([yes])
@@ -31,25 +31,13 @@ AC_PROG_CC
dnl AC_PROG_RANLIB
AC_USE_SYSTEM_EXTENSIONS
-LT_PREREQ(2.2.5a)
-LT_CONFIG_LTDL_DIR([libltdl])
LT_INIT([dlopen])
-LTDL_INIT([recursive])
-LT_WITH_LTDL
-AC_CONFIG_FILES([libltdl/Makefile])
AC_SUBST(WYDAWCA_MODDIR,'$(libdir)/$(PACKAGE)')
# Checks for libraries.
AC_CHECK_LIB(rt, clock_gettime)
-# Checks for header files.
-AC_HEADER_STDC
-AC_HEADER_SYS_WAIT
-AC_CHECK_HEADERS([stdlib.h string.h sys/file.h unistd.h sys/inotify.h])
-
# Checks for typedefs, structures, and compiler characteristics.
-AC_C_CONST
-AC_TYPE_SIGNAL
AC_TYPE_UID_T
AC_TYPE_PID_T
AC_TYPE_SIZE_T
@@ -62,19 +50,16 @@ AC_CHECK_MEMBERS([struct tm.tm_gmtoff],,,
])
# Checks for library functions.
-AC_FUNC_FORK
-AC_FUNC_MALLOC
-AC_FUNC_MEMCMP
-AC_FUNC_STAT
AC_FUNC_VPRINTF
-AC_CHECK_FUNCS([fchdir setegid setregid setresgid setresuid seteuid \
- setreuid vsyslog sysconf getdtablesize inotify_init])
+AC_CHECK_FUNCS([setegid setregid setresgid setresuid seteuid \
+ setreuid vsyslog])
# Check for POSIX threads support
AX_PTHREAD([],
[AC_MSG_ERROR([POSIX threads support is required, but not available])])
AX_THREAD_NAMES
+AX_CLOSEFROM
# **********************
# Mailutils
@@ -127,8 +112,7 @@ LDADD=$saved_LDADD
# TCP wrappers
# **********************
AC_ARG_WITH(tcp-wrappers,
- AC_HELP_STRING([--with-tcp-wrappers],
- [compile with TCP wrappers support (default)]),
+ AS_HELP_STRING([--with-tcp-wrappers],[compile with TCP wrappers support (default)]),
[status_tcpwrap=${withval}],
[status_tcpwrap=yes])
@@ -146,9 +130,11 @@ fi
# **********************
# Inotify
# **********************
+# Checks for header files.
+AC_CHECK_HEADERS([sys/inotify.h])
+AC_CHECK_FUNCS([inotify_init])
AC_ARG_WITH(inotify,
- AC_HELP_STRING([--with-inotify],
- [compile with inotify(7) support (Linux-specific)]),
+ AS_HELP_STRING([--with-inotify],[compile with inotify(7) support (Linux-specific)]),
[status_inotify=${withval}],
[status_inotify=probe])
if test $status_inotify != no; then
@@ -189,6 +175,15 @@ AM_MISSING_PROG([AUTOM4TE], [autom4te])
IMPRIMATUR_INIT(, [frenchspacing])
# *********************************************************************
+# Preprocessor
+# *********************************************************************
+AC_ARG_VAR([DEFAULT_INCLUDE_PATH],
+ [Include path for configuration preprocessor])
+if test -z "$DEFAULT_INCLUDE_PATH"; then
+ DEFAULT_INCLUDE_PATH='$(pkgdatadir)/include:$(pkgdatadir)/$(VERSION)/include'
+fi
+
+# *********************************************************************
# GPG v2 (for the testsuite)
# The testsuite needs to create GPG keys, which would be prohibitively
# slow without the %transient-key statement, which appeared in GPG 2.1
diff --git a/doc/Makefile.am b/doc/Makefile.am
index c1f3c44..170eeef 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -1,5 +1,5 @@
# This file is part of Wydawca
-# Copyright (C) 2007, 2009-2013, 2017, 2019-2020 Sergey Poznyakoff
+# Copyright (C) 2007, 2009-2013, 2017, 2019-2022 Sergey Poznyakoff