diff options
-rw-r--r-- | NEWS | 54 | ||||
-rw-r--r-- | configure.ac | 4 | ||||
-rw-r--r-- | doc/pies.texi | 28 | ||||
-rw-r--r-- | src/.gitignore | 2 | ||||
-rw-r--r-- | src/Makefile.am | 25 | ||||
-rw-r--r-- | src/pies.c | 34 |
6 files changed, 101 insertions, 46 deletions
@@ -1,2 +1,2 @@ -GNU Pies NEWS -- history of user-visible changes. 2009-10-26 +GNU Pies NEWS -- history of user-visible changes. 2009-12-11 Copyright (C) 2009 Sergey Poznyakoff @@ -4,8 +4,54 @@ See the end of file for copying conditions. -Please send Pies bug reports to <bug-pies@gnu.org.ua> +Please send Pies bug reports to <bug-pies@gnu.org> or +<bug-pies@gnu.org.ua> -Version 1.1.90 (Git) +Version 1.2, 2009-12-11 -Pies dubbed a GNU package. +* First release as a GNU package. + +* Full inetd support + +The program supports all types of services (including built-in +ones) and all types of protocols offered by the traditional `inetd' +utility. + +The `inetd.conf' configuration file format is supported. The +`inetd' configuration file may be supplied either from the command +line (see below), or via the `include-inetd' configuration statement. + +* Inetd replacement + +A replacement script for inetd(8) is provided. It is fully +compatible with the traditional inetd command line, but offers +the flexibility and new features of pies. + +* Configuration file handling + +Several configuration files, eventually of different types, +can be specified in the command line. New command line +option `--syntax' declares the syntax of configuration +files that follow it, e.g.: + +pies --config-file /etc/pies.conf \ + --syntax=inetd --config-file /etc/inetd.conf \ + --syntax=meta1 --config-file /etc/meta1/meta1.conf + +* New keywords. + +Component keywords: flags, service, socket-type, +max-instances, max-rate, qotd-file. +Global keywords: state-directory, include-inetd. + +* New option --instance + +The `--instance' option allows you to run several instances +of pies, each of them using separate configuration and +state files. + +* New option --rate + +For compatibility with inetd. + +* Improved status output. diff --git a/configure.ac b/configure.ac index 15c2835..3e138cf 100644 --- a/configure.ac +++ b/configure.ac @@ -17,3 +17,3 @@ AC_PREREQ([2.63]) -AC_INIT([GNU Pies], [1.1.90], [bug-pies@gnu.org.ua]) +AC_INIT([GNU Pies], [1.2], [bug-pies@gnu.org.ua]) AC_CONFIG_SRCDIR([src/pies.h]) @@ -73,3 +73,3 @@ AC_ARG_ENABLE([inetd], [case $enableval in - yes) AC_SUBST([INETD_SH], [inetd.sh]);; + yes) AC_SUBST([INETD], [inetd]);; no) ;; diff --git a/doc/pies.texi b/doc/pies.texi index 04c85a4..b6f2c91 100644 --- a/doc/pies.texi +++ b/doc/pies.texi @@ -279,5 +279,5 @@ in a single command line, e.g.: @group -pies /etc/pies.conf \ - --syntax=inetd --config-file /etc/inetd.conf \ - --syntax=meta1 --config-file /etc/meta1/meta1.conf +pies --config-file /etc/pies.conf \ + --syntax=inetd --config-file /etc/inetd.conf \ + --syntax=meta1 --config-file /etc/meta1/meta1.conf @end group @@ -2053,7 +2053,14 @@ start @command{jabberd} components: @cindex state files - Pies uses several files to keep its state information. These files -are kept in local state directory (usually @file{/var/run/pies}, or -@file{/usr/local/var/run/pies}). The table below describes these -files. The @var{instance} in this table stands for the @command{pies} -instance name (@pxref{instances}). Usually, it is @samp{pies}. + Pies uses several files to keep its state information. The +directory which hosts these files is called @dfn{state directory}, it +is usually @file{/var/pies} or @file{/usr/local/var/pies}). The state +directory can be configured at run time: + +@deffn {Config} state-directory @var{dir} +Set the program state directory. +@end deffn + +The table below describes the files kept in the state directory. The +@var{instance} in this table stands for the @command{pies} instance +name (@pxref{instances}). Usually, it is @samp{pies}. @@ -2078,4 +2085,5 @@ built-in service (@pxref{qotd}). The following statements allow to redefine state file names. -Use them only if the defaults does not suit your needs, and the -@option{--instance} option does not help: +Use them only if the defaults do not suit your needs, and niether +the @code{state-directory} statement nor the @option{--instance} +can help: diff --git a/src/.gitignore b/src/.gitignore index fe9c6fe..18a7111 100644 --- a/src/.gitignore +++ b/src/.gitignore @@ -1,2 +1,2 @@ -inetd.sh +inetd meta1gram.c diff --git a/src/Makefile.am b/src/Makefile.am index 98815b0..856efe8 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -59,2 +59,4 @@ LDADD = \ +pkgstatedir=$(localstatedir)/pies + AM_CPPFLAGS=\ @@ -62,3 +64,4 @@ AM_CPPFLAGS=\ -DDEFAULT_VERSION_INCLUDE_DIR=\"$(incdir)\"\ - -DDEFAULT_INCLUDE_DIR=\"$(pkgdatadir)/include\" + -DDEFAULT_INCLUDE_DIR=\"$(pkgdatadir)/include\"\ + -DDEFAULT_STATE_DIR=\"$(pkgstatedir)\" @@ -67,18 +70,10 @@ AM_LFLAGS=-dvp -Pmeta1 -olex.yy.c -SUFFIXES = .in .sh EXTRA_SCRIPTS = inetd.in -sbin_SCRIPTS = @INETD_SH@ -inetd.sh: inetd.in +sbin_SCRIPTS = @INETD@ -.in.sh: - $(AM_V_GEN)sed 's|_SBINDIR_|$(sbindir)|' $< > $@ +inetd: inetd.in + $(AM_V_GEN)sed 's|_SBINDIR_|$(sbindir)|' \ + $(top_srcdir)/src/inetd.in > $(top_builddir)/src/inetd -install-exec-hook: - if test -n "@INETD_SH@" && \ - test -f $(DESTDIR)$(sbindir)/@INETD_SH@; then \ - test -f $(DESTDIR)$(sbindir)/inetd$(EXEEXT) && \ - cd $(DESTDIR)$(sbindir) && \ - mv -f inetd$(EXEEXT) inetd$(EXEEXT)~; \ - cd $(DESTDIR)$(sbindir) && \ - mv @INETD_SH@ inetd$(EXEEXT); \ - fi +install-data-hook: + test -d $(DESTDIR)$(pkgstatedir) || $(MKDIR_P) $(pkgstatedir) @@ -29,2 +29,3 @@ int foreground; int command; +char *statedir = DEFAULT_STATE_DIR; char *instance; @@ -1423,2 +1424,6 @@ struct grecs_keyword pies_keywords[] = { grecs_type_bool, &source_info_option, 0, NULL}, + {"state-directory", + NULL, + N_("Full file name of the program state directory."), + grecs_type_string, &statedir, 0, NULL}, {"pidfile", @@ -2172,10 +2177,5 @@ mkfilename (const char *dir, const char *name, const char *suf) -void -set_file_names (const char *base) +static void +set_conf_file_names (const char *base) { - const char *p; - - p = strrchr (base, '/'); - if (p) - base = p + 1; if (!conf_head) @@ -2186,10 +2186,15 @@ set_file_names (const char *base) } +} + +static void +set_state_file_names (const char *base) +{ if (!pidfile) - pidfile = mkfilename (LOCALSTATEDIR, base, ".pid"); + pidfile = mkfilename (statedir, base, ".pid"); if (!ctlfile) - ctlfile = mkfilename (LOCALSTATEDIR, base, ".ctl"); + ctlfile = mkfilename (statedir, base, ".ctl"); if (!statfile) - statfile = mkfilename (LOCALSTATEDIR, base, ".stat"); + statfile = mkfilename (statedir, base, ".stat"); if (!qotdfile) - qotdfile = mkfilename (LOCALSTATEDIR, base, ".qotd"); + qotdfile = mkfilename (statedir, base, ".qotd"); } @@ -2231,6 +2236,6 @@ main (int argc, char **argv) } - else - log_tag = instance; - set_file_names (instance); + log_tag = instance; + + set_conf_file_names (instance); @@ -2276,2 +2281,3 @@ main (int argc, char **argv) + set_state_file_names (instance); set_mailer_argcv (); |