aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--Makefile.am2
-rw-r--r--NEWS204
-rw-r--r--README3
-rw-r--r--README-hacking2
-rw-r--r--am/gcc.m42
-rw-r--r--am/proctitle.m422
-rwxr-xr-xbootstrap1624
-rw-r--r--bootstrap.conf8
-rw-r--r--configure.ac116
-rw-r--r--doc/.gitignore4
-rw-r--r--doc/Makefile.am17
-rw-r--r--doc/ctl.texi442
-rw-r--r--doc/gendocs.pl480
-rwxr-xr-xdoc/gendocs.sh490
-rw-r--r--doc/gendocs_template79
-rw-r--r--doc/html.init164
-rw-r--r--doc/htmlxref.cnf15
-rw-r--r--doc/inetd.texi2
-rw-r--r--doc/otherdoc.texi.in9
-rw-r--r--doc/pies.texi979
-rw-r--r--doc/usr-acl.texi2
-rw-r--r--doc/webdoc.init8
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.am7
-rw-r--r--lib/addrfmt.c2
-rw-r--r--lib/arraymember.c2
-rw-r--r--lib/closefds.c131
-rw-r--r--lib/envop.c47
-rw-r--r--lib/envop.h3
-rw-r--r--lib/grecsasrt.c2
-rw-r--r--lib/grecsasrt.h2
-rw-r--r--lib/libpies.h6
-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.in5
-rw-r--r--src/Makefile.am30
-rw-r--r--src/acl.c2
-rw-r--r--src/acl.h2
-rw-r--r--src/cmdline.opt56
-rw-r--r--src/comp.c203
-rw-r--r--src/ctl.c296
-rw-r--r--src/depmap.c406
-rw-r--r--src/diag.c18
-rw-r--r--src/inetd-bi.c2
-rw-r--r--src/inetd.c10
-rw-r--r--src/inetd.in2
-rw-r--r--src/limits.c2
-rw-r--r--src/meta1parse.c5
-rw-r--r--src/pies.c540
-rw-r--r--src/pies.h73
-rw-r--r--src/pies_syslog.h37
-rw-r--r--src/piesctl-cl.opt33
-rw-r--r--src/piesctl.c103
-rw-r--r--src/pp-setup106
-rw-r--r--src/prog.h20
-rw-r--r--src/progman.c692
-rw-r--r--src/socket.c15
-rw-r--r--src/sysdep.c2
-rw-r--r--src/syslog.c547
-rw-r--r--src/sysvinit.c70
-rw-r--r--src/telinit.opt2
-rw-r--r--src/userprivs.c2
-rw-r--r--src/utmp.c43
-rw-r--r--tests/.gitignore1
-rw-r--r--tests/Makefile.am11
-rw-r--r--tests/accept.at10
-rw-r--r--tests/atlocal.in2
-rwxr-xr-xtests/aux/in.test2
-rw-r--r--tests/builtin.at20
-rw-r--r--tests/chargen.c2
-rw-r--r--tests/control.at8
-rw-r--r--tests/cyclic.at39
-rw-r--r--tests/env.at23
-rw-r--r--tests/envglobal.at86
-rw-r--r--tests/envop.at15
-rw-r--r--tests/envtest.c2
-rw-r--r--tests/expandenv.at50
-rw-r--r--tests/inet.at8
-rw-r--r--tests/iobuf.h2
-rw-r--r--tests/lines.c3
-rw-r--r--tests/maxinst.at16
-rw-r--r--tests/nt.c2
-rw-r--r--tests/passfd.at10
-rw-r--r--tests/readtime.c2
-rw-r--r--tests/recvfd.c2
-rw-r--r--tests/redirect.at6
-rw-r--r--tests/respawn.at8
-rw-r--r--tests/ret-exec.at6
-rw-r--r--tests/ret-notify.at6
-rw-r--r--tests/shdnseq.at82
-rw-r--r--tests/shell.at8
-rw-r--r--tests/shutdown.at10
-rw-r--r--tests/sigterm.at49
-rw-r--r--tests/sigwait.c75
-rw-r--r--tests/startup.at8
-rw-r--r--tests/testsuite.at13
-rw-r--r--tests/to.c2
-rw-r--r--tests/version.at6
117 files changed, 6212 insertions, 2701 deletions
diff --git a/.gitignore b/.gitignore
index 11f9326..c307c8e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -29,3 +29,4 @@ core
gnu
m4
stamp-h1
+/tmp
diff --git a/Makefile.am b/Makefile.am
index 6488251..8a4338c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,5 +1,5 @@
# This file is part of GNU Pies.
-# Copyright (C) 2008-2019 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 f4afcd4..265ca26 100644
--- a/NEWS
+++ b/NEWS
@@ -1,10 +1,204 @@
-GNU Pies NEWS -- history of user-visible changes. 2019-06-12
+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> or
-<bug-pies@gnu.org.ua>
+Please send Pies bug reports to <bug-pies@gnu.org>.
-Version 1.3.92 (git)
+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.
+
+Two command line options are provided to select the preprocessor to
+use instead of the default m4. The --preprocessor=COMMAND option
+instructs pies to use COMMAND as preprocessor. The --no-preprocessor
+option disables the use of the external preprocessor.
+
+The new command line options are available both in pies and in the
+client program piesctl.
+
+* piesctl: fix order in which configuration files are examined
+
+As stated in the documentation, program-specific configuration
+file piesctl.conf takes precedence over pies.conf.
+
+* Fix reloading of the configuration files.
+
+* Fix compilation with --disable-sysvinit
+
+Version 1.5, 2020-12-14
+
+* Detect if pies is started from docker
+
+This makes the --no-init option unnecessary.
+
+* When running with PID 1, install SIGCHLD handler early
+
+This is to make sure the exited preprocessor command is cleaned up
+properly.
+
+* Fix cyclic dependency detection
+
+* New component flag: expandenv
+
+The "expandenv" flag instructs pies to parse the command line
+and to expand any references to environment variables within it
+as the Bourne shell would have done it. This allows for expanding
+the environment variables without the overhead of actually running
+the shell.
+
+This flag is incompatible with the "shell" flag. When both are used,
+the preference is given to "shell" and a warning message to that
+effect is issued.
+
+* Component standard stream redirection rewritten from scratch
+
+In particular, redirecting stdout/stderr to syslog no longer requires
+starting an auxiliar process.
+
+* The component.facility configuration statement is withdrawn
+
+To specify a particular facility, use the fully qualified
+facility.priority argument to the stdout or stderr statement, e.g.:
+
+ stderr syslog local1.err;
+
+* New configuration statement syslog.dev
+
+The statement configures the socket to communicate with the syslog
+daemon. Its argument is either the file name of the local socket
+or the IP[:PORT] specification, e.g.
+
+ syslog {
+ dev 172.31.255.252;
+ }
+
+* Global env section
+
+The "env" section appearing in global context modifies the environment
+for the main pies process. This modified environment will be
+inherited by all processes started by pies in the course of its normal
+operation.
+
+* New control endpoint /alive
+
+HTTP response to GET /alive/PROG reflects the current state of the
+component PROG: 200 if it is running, 503 if not, and 404 if there's
+no such component.
+
+
+Version 1.4, 2019-07-02
* New option --no-init
@@ -203,7 +397,7 @@ part of Mailfromd (http://mailfromd.software.gnu.org.ua).
=========================================================================
Copyright information:
-Copyright (C) 2009-2019 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 b801c35..b6157d5 100644
--- a/README
+++ b/README
@@ -1,5 +1,4 @@
GNU Pies README
-Copyright (C) 2009-2019 Sergey Poznyakoff
See the end of file for copying conditions.
* Introduction
@@ -73,7 +72,7 @@ Send bug reports to <bug-pies@gnu.org.ua>.
* Copyright information:
-Copyright (C) 2009-2016 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 e601105..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-2019 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 e2966bd..411db13 100644
--- a/am/gcc.m4
+++ b/am/gcc.m4
@@ -1,5 +1,5 @@
# This file is part of Mailfromd. -*- autoconf -*-
-# Copyright (C) 2009-2019 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 47aca9a..73afd87 100644
--- a/