aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.am2
-rw-r--r--NEWS117
-rw-r--r--README2
-rw-r--r--README-hacking2
-rw-r--r--am/gcc.m42
-rw-r--r--am/proctitle.m422
-rwxr-xr-xbootstrap1624
-rw-r--r--bootstrap.conf2
-rw-r--r--configure.ac64
-rw-r--r--doc/.gitignore1
-rw-r--r--doc/Makefile.am3
-rw-r--r--doc/ctl.texi2
-rw-r--r--doc/gendocs.pl2
-rw-r--r--doc/htmlxref.cnf15
-rw-r--r--doc/inetd.texi2
-rw-r--r--doc/pies.texi315
-rw-r--r--doc/usr-acl.texi2
m---------gnulib0
-rw-r--r--gnulib.modules2
m---------grecs0
-rw-r--r--ident/Makefile.am2
-rw-r--r--ident/ident.c2
-rw-r--r--ident/ident.h2
-rw-r--r--ident/identity.h2
-rw-r--r--ident/pam.c2
-rw-r--r--ident/provider.c2
-rw-r--r--ident/system.c2
-rw-r--r--lib/Makefile.am6
-rw-r--r--lib/addrfmt.c2
-rw-r--r--lib/arraymember.c2
-rw-r--r--lib/closefds.c2
-rw-r--r--lib/envop.c9
-rw-r--r--lib/envop.h2
-rw-r--r--lib/grecsasrt.c2
-rw-r--r--lib/grecsasrt.h2
-rw-r--r--lib/libpies.h3
-rw-r--r--lib/mkfilename.c2
-rw-r--r--lib/netrc.c2
-rw-r--r--lib/parsetime.c2
-rw-r--r--lib/pp.c81
-rw-r--r--lib/proctitle.c2
-rw-r--r--lib/safe_strcmp.c2
-rw-r--r--lib/split3.c2
-rw-r--r--lib/strtotok.c2
-rw-r--r--lib/url.c2
-rw-r--r--lib/urlconn.c2
-rw-r--r--lib/wildmatch.c2
-rw-r--r--po/POTFILES.in3
-rw-r--r--src/Makefile.am13
-rw-r--r--src/acl.c2
-rw-r--r--src/acl.h2
-rw-r--r--src/cmdline.opt35
-rw-r--r--src/comp.c101
-rw-r--r--src/ctl.c45
-rw-r--r--src/depmap.c2
-rw-r--r--src/diag.c2
-rw-r--r--src/inetd-bi.c2
-rw-r--r--src/inetd.c8
-rw-r--r--src/inetd.in2
-rw-r--r--src/limits.c2
-rw-r--r--src/meta1parse.c5
-rw-r--r--src/pies.c199
-rw-r--r--src/pies.h28
-rw-r--r--src/pies_syslog.h2
-rw-r--r--src/piesctl-cl.opt19
-rw-r--r--src/piesctl.c85
-rw-r--r--src/pp-setup106
-rw-r--r--src/prog.h8
-rw-r--r--src/progman.c248
-rw-r--r--src/socket.c2
-rw-r--r--src/sysdep.c2
-rw-r--r--src/syslog.c81
-rw-r--r--src/sysvinit.c2
-rw-r--r--src/telinit.opt2
-rw-r--r--src/userprivs.c2
-rw-r--r--src/utmp.c2
-rw-r--r--tests/.gitignore1
-rw-r--r--tests/Makefile.am6
-rw-r--r--tests/accept.at2
-rw-r--r--tests/atlocal.in2
-rwxr-xr-xtests/aux/in.test2
-rw-r--r--tests/builtin.at8
-rw-r--r--tests/chargen.c2
-rw-r--r--tests/control.at4
-rw-r--r--tests/cyclic.at2
-rw-r--r--tests/env.at6
-rw-r--r--tests/envglobal.at4
-rw-r--r--tests/envop.at2
-rw-r--r--tests/envtest.c2
-rw-r--r--tests/expandenv.at4
-rw-r--r--tests/inet.at2
-rw-r--r--tests/iobuf.h2
-rw-r--r--tests/lines.c3
-rw-r--r--tests/maxinst.at4
-rw-r--r--tests/nt.c2
-rw-r--r--tests/passfd.at2
-rw-r--r--tests/readtime.c2
-rw-r--r--tests/recvfd.c2
-rw-r--r--tests/redirect.at2
-rw-r--r--tests/respawn.at4
-rw-r--r--tests/ret-exec.at2
-rw-r--r--tests/ret-notify.at2
-rw-r--r--tests/shdnseq.at82
-rw-r--r--tests/shell.at4
-rw-r--r--tests/shutdown.at6
-rw-r--r--tests/sigterm.at49
-rw-r--r--tests/sigwait.c75
-rw-r--r--tests/startup.at4
-rw-r--r--tests/testsuite.at7
-rw-r--r--tests/to.c2
-rw-r--r--tests/version.at2
111 files changed, 2401 insertions, 1244 deletions
diff --git a/Makefile.am b/Makefile.am
index d7afea8..8a4338c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,5 +1,5 @@
# This file is part of GNU Pies.
-# Copyright (C) 2008-2021 Sergey Poznyakoff
+# Copyright (C) 2008-2023 Sergey Poznyakoff
#
# GNU Pies 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/NEWS b/NEWS
index 093ca35..265ca26 100644
--- a/NEWS
+++ b/NEWS
@@ -1,8 +1,121 @@
-GNU Pies NEWS -- history of user-visible changes. 2021-07-07
+GNU Pies NEWS -- history of user-visible changes. 2023-07-30
See the end of file for copying conditions.
Please send Pies bug reports to <bug-pies@gnu.org>.
+Version 1.8.90 (git)
+
+* return-code statement accepts negations
+
+Negated status codes or signal numbers can appear in the argument
+list to the "return-code" command. The syntax is:
+
+ !0 any status code except 0
+ !EX_OK same as above
+ !SIGQUIT any signal except SIGQUIT
+ !SIG+10 any signal except 10
+
+For example, the following statement:
+
+ return-code (!0, !SIGHUP, !SIGQUIT) {
+ notify root;
+ }
+
+will notify root user if the program exits with any status, except 0
+or gets terminated with any signal, except SIGHUP and SIGQUIT.
+
+
+Version 1.8, 2022-08-13
+
+* New configuration keywords
+
+** sigterm SIG
+
+Available for use in "component" sections. This statement defines
+signal which pies should send to the running component instance in
+order to terminate it. Defaults to SIGTERM.
+
+* Fix the component shutdown sequence
+
+The shutdown sequence is determined taking into account dependencies
+between components, so that all dependent components are stopped
+before their prerequisite components.
+
+* Fallback log file
+
+Fallback log file is a place where pies writes out of band log messages,
+i.e. messages about not being able to open syslog socket or send logs
+to it. Regular log messages are diverted to this file if syslog was
+requested, but cannot be used because of a permanent error.
+
+* Bugfixes
+
+** Fix piesctl config reload
+
+** Fix configuration preprocessing.
+
+** Varios fixes in REST API server.
+
+Version 1.7, 2022-01-02
+
+* Changes in configuration preprocessing
+
+** Each included file is preprocessed separately.
+
+The built-in preprocessor is removed. The #include and #include_once
+statements are now regular configuration statements. Any files
+included as a result of #include or #include_once are preprocessed
+separately. This differs from prior versions, were all includes were
+expanded first, the obtained material passed to the m4 and the
+resulting output was then parsed.
+
+This means that:
+
+1. The mess with two preprocessors (built-in and external) is now
+gone.
+
+2. Macros defined in a source file don't pollute the namespace of
+another sources.
+
+3. Error locations can be accurately determined.
+
+4. Preprocessor can emit forceful diagnostics (see below) to properly
+identify erroneous or otherwise suspicious constructs.
+
+** The `pp-setup' file is gone.
+
+By default, the preprocessor is started as `m4 -s -P' with additional
+set of -I options and eventual -D or -U options if these are used in
+the command line of pies. Apart from this, no additional set up is
+performed.
+
+** The precedence of -I options is fixed
+
+The -I options are placed in the m4 command line before the options
+that configure the default search path.
+
+* New forceful diagnostics statements
+
+** #warning "TEXT"
+
+Emits warning.
+
+** #error "TEXT"
+
+Emits error message. Further parsing continues, but will end with
+failure.
+
+** #abend "TEXT"
+
+Emits error message and stops further processing immediately.
+
+If `#error' or `#abend' is encountered, the effect is the same
+as if syntax error has been detected. If it occurs at pies
+startup, the program will terminate abnormally. If it occurs as
+part of the reload sequence in a running instance of pies, the
+configuration file will be rejected and old configuration will remain
+in effect.
+
Version 1.6, 2021-07-07
* Selecting preprocessor from the command line.
@@ -284,7 +397,7 @@ part of Mailfromd (http://mailfromd.software.gnu.org.ua).
=========================================================================
Copyright information:
-Copyright (C) 2009-2021 Sergey Poznyakoff
+Copyright (C) 2009-2023 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 bba85c6..b6157d5 100644
--- a/README
+++ b/README
@@ -72,7 +72,7 @@ Send bug reports to <bug-pies@gnu.org.ua>.
* Copyright information:
-Copyright (C) 2009-2021 Sergey Poznyakoff
+Copyright (C) 2009-2023 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 83a7de8..2871ed1 100644
--- a/README-hacking
+++ b/README-hacking
@@ -55,7 +55,7 @@ For more information about `bootstrap', run `bootstrap --help'.
* Copyright information
-Copyright (C) 2008-2021 Sergey Poznyakoff
+Copyright (C) 2008-2023 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/gcc.m4 b/am/gcc.m4
index 4087099..411db13 100644
--- a/am/gcc.m4
+++ b/am/gcc.m4
@@ -1,5 +1,5 @@
# This file is part of Mailfromd. -*- autoconf -*-
-# Copyright (C) 2009-2021 Sergey Poznyakoff
+# Copyright (C) 2009-2023 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/am/proctitle.m4 b/am/proctitle.m4
index 7506bb5..73afd87 100644
--- a/am/proctitle.m4
+++ b/am/proctitle.m4
@@ -1,5 +1,5 @@
dnl This file is part of Mailfromd.
-dnl Copyright (C) 2008-2021 Sergey Poznyakoff
+dnl Copyright (C) 2008-2023 Sergey Poznyakoff
dnl
dnl This program is free software; you can redistribute it and/or modify
dnl it under the terms of the GNU General Public License as published by
@@ -23,12 +23,12 @@ AC_DEFUN([MF_PROCTITLE],[
#define MF_PROCTITLE_PSTAT 3
#define MF_PROCTITLE_PSSTRINGS 4
])
- AC_SUBST(MF_PROCTITLE_LIBS)
+ AC_SUBST([MF_PROCTITLE_LIBS])
- AC_TRY_LINK([extern char *__progname, *__progname_full;],
- [__progname = "foo"; __progname_full = "foo bar";],
- [AC_DEFINE(HAVE___PROGNAME, 1,
- [Define to 1 if libc has __progname])])
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM([[extern char *__progname, *__progname_full;]],
+ [[__progname = "foo"; __progname_full = "foo bar";]])],
+ [AC_DEFINE(HAVE___PROGNAME, 1, [Define to 1 if libc has __progname])])
mf_proctitle_type=no
AC_CHECK_FUNC(setproctitle,
@@ -44,9 +44,10 @@ AC_DEFUN([MF_PROCTITLE],[
[mf_proctitle_type=MF_PROCTITLE_PSTAT],
[mf_proctitle_type=MF_PROCTITLE_REWRITE_ARGV])])
if test "$mf_proctitle_type" = no; then
- AC_TRY_COMPILE([#include <machine/vmparam.h>
- #include <sys/exec.h>],
- [
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[#include <machine/vmparam.h>
+ #include <sys/exec.h>]],
+ [[
#include <sys/types.h>
#include <sys/proc.h>
#include <vm/pmap.h>
@@ -54,11 +55,12 @@ AC_DEFUN([MF_PROCTITLE],[
#include <machine/vmparam.h>
#include <sys/exec.h>
+int
main()
{
int i = PS_STRINGS;
}
-],
+]])],
[mf_proctitle_type=MF_PROCTITLE_PSSTRINGS])
if test "$mf_proctitle_type" = no; then
diff --git a/bootstrap b/bootstrap
index e72894c..979b3af 100755
--- a/bootstrap
+++ b/bootstrap
@@ -1,34 +1,67 @@
#! /bin/sh
-# Print a version string.
-scriptversion=2014-12-08.12; # UTC
+# DO NOT EDIT! GENERATED AUTOMATICALLY!
# Bootstrap this package from checked-out sources.
-# Copyright (C) 2003-2015 Free Software Foundation, Inc.
+scriptversion=2023-08-29.21; # UTC
+# Copyright (C) 2003-2023 Free Software Foundation, Inc.
+#
# 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
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
-
+#
# This program 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 this program. If not, see <https://www.gnu.org/licenses/>.
+
+# Originally written by Paul Eggert. The canonical version of this
+# script is maintained as top/bootstrap in gnulib. However, to be
+# useful to your package, you should place a copy of it under version
+# control in the top-level directory of your package. The intent is
+# that all customization can be done with a bootstrap.conf file also
+# maintained in your version control; gnulib comes with a template
+# build-aux/bootstrap.conf to get you started.
+
+# Please report bugs or propose patches to bug-gnulib@gnu.org.
+me="$0"
+medir=`dirname "$me"`
+
+# Read the function library and the configuration.
+
+# A library of shell functions for autopull.sh, autogen.sh, and bootstrap.
+
+scriptlibversion=2023-08-28.18; # UTC
+
+# Copyright (C) 2003-2023 Free Software Foundation, Inc.
+#
+# 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
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
# Originally written by Paul Eggert. The canonical version of this
-# script is maintained as build-aux/bootstrap in gnulib, however, to
-# be useful to your project, you should place a copy of it under</