From d6fe9fcb4c3ca8a6d825590bf513bae6d0a81e1f Mon Sep 17 00:00:00 2001 From: Sergey Poznyakoff Date: Sat, 1 Sep 2007 12:46:05 +0000 Subject: Initial move from GSC git-svn-id: file:///svnroot/wydawca/trunk@305 6bb4bd81-ecc2-4fd4-a2d4-9571d19c0d33 --- AUTHORS | 1 + ChangeLog | 210 +++++++++++++ Makefile.am | 4 + NEWS | 36 +++ README | 52 +++ README-alpha | 61 ++++ README-hacking | 59 ++++ acinclude.m4 | 57 ++++ configure.ac | 139 ++++++++ doc/Makefile.am | 42 +++ doc/fdl.texi | 450 ++++++++++++++++++++++++++ doc/gendocs_template | 105 +++++++ doc/rendition.texi | 85 +++++ doc/wydawca.texi | 871 +++++++++++++++++++++++++++++++++++++++++++++++++++ src/Makefile.am | 11 +- src/config.c | 6 +- src/directive.c | 6 +- src/diskio.c | 6 +- src/exec.c | 6 +- src/gpg.c | 6 +- src/mail.c | 6 +- src/method.c | 6 +- src/process.c | 6 +- src/sql.c | 6 +- src/triplet.c | 6 +- src/verify.c | 6 +- src/wydawca.c | 6 +- 27 files changed, 2213 insertions(+), 42 deletions(-) create mode 100644 AUTHORS create mode 100644 ChangeLog create mode 100644 Makefile.am create mode 100644 NEWS create mode 100644 README create mode 100644 README-alpha create mode 100644 README-hacking create mode 100644 acinclude.m4 create mode 100644 configure.ac create mode 100644 doc/Makefile.am create mode 100644 doc/fdl.texi create mode 100755 doc/gendocs_template create mode 100644 doc/rendition.texi create mode 100644 doc/wydawca.texi diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 0000000..ca6ccd1 --- /dev/null +++ b/AUTHORS @@ -0,0 +1 @@ +Sergey Poznyakoff diff --git a/ChangeLog b/ChangeLog new file mode 100644 index 0000000..360b0ef --- /dev/null +++ b/ChangeLog @@ -0,0 +1,210 @@ +2007-09-01 Sergey Poznyakoff + + Moved to a separate repository. + + +2007-08-26 Sergey Poznyakoff + + * src/wydawca.h (struct file_triplet): New member user + (fill_project_name): New function + * src/verify.c (get_project_name): Rename to + fill_project_name, remove static qualifier. + * src/wydawca.rc: Update + * src/mail.c (notify_owner): Notify only the submitter on + ev_success, ev_bad_directive_signature and + ev_bad_detached_signature (should it be made configurable?) + (notify): Call fill_project_name + * src/triplet.c (hash_triplet_free): Free trp->user + (expand_user_real_name, expand_user_email): Change data indices to + match those of project_owner_method. + + Implement project owner notifications. + + * src/wydawca.c (syslog_printer): Reduce the number of memory + reallocations + (make_stat_expansion): Update + * src/method.c: Implement a new framework: methods may return + 2-dimensional arrays of strings. + * src/sql.c, src/sql.h: Implement the new method framework. + * src/verify.c (expand_param): kw_expansion may provide + expansion functions. An additional argument supplies user-defined + data for expansions. + (escape_kwexp): Extern + (free_kwexp): Improve + (get_project_name): New function + (make_default_kwexp): New function + (check_access_rights): Call get_project_name. Use + make_default_kwexp to initialize expansions + (verify_directive_file): Use make_default_kwexp to initialize + expansions + * src/wydawca.h (NITEMS): New macro + (enum access_method_type): New members: ncol, nrow + (struct directory_pair): New members url,project_owner_method, + user_data_method + (struct file_info): Replace mtime, uid with struct stat sb + (struct file_triplet): New members project, dpair, user_data + (TRIPLET_UID): Take into account the changes to struct file_info + (enum notification_event): New data type + (notify_project_owner, notify_admin, notify): New functions + (struct kw_expansion): New members static_p, expand and data. + (escape_kwexp,make_default_kwexp): New proto + (expand_param): Change signature + (triplet_expand_param): New function + (method_result): Change prototype + (method_num_rows,method_num_cols): New functions + * src/config.c: New statements project-owner, user-data, + admin-address, mail-user, user-message + directory can take an optional argument specifying base URL for + notification messages + * src/gpg.c (verify_directive_signature): Expand directives + even if the signature does not match. Useful for notifications. + Add notifications. + * src/process.c: Add notifications. + * src/directive.c: Add notifications + * src/wydawca.rc: Update + * src/mail.c, src/mail.h: Implement project owner + notifications + * src/triplet.c (triplet_expand_param): New function + +2007-08-25 Sergey Poznyakoff + + * configure.ac: Require mailutils for wydawca + * bootstrap: Require inttostr and strftime + * src/mail.h: New file + * src/mail.c: New file + * src/Makefile.am: Add mail.c and mail.h + * src/wydawca.c: Include mail.h + (stat_mask_p, make_stat_expansion): New functions + (logstats): Call mail_stats + (main): Call initialize mailer subsystem + + * src/sql.c, src/sql.h: Keep usage reference count. Do not + deinitialize unless it falls to 0. Do not initialize if it is > 0. + + * src/verify.c (expand_param): Rewrite to allow long keywords + All callers updated. + * src/wydawca.h (struct access_method): Keep reference count + (struct directory_pair): verify_method and gpg_key_method are + pointers to structs. + (struct kw_expansion): kw is char* + (count_collected_triplets): New function + (method_new): New function + * src/config.c: reimplement verify-user and gpg-key + New keywords mailer, admin-address, from-address, mail-admin-stat + and admin-stat-message + * src/process.c: Close methods only when their reference count + is 0. + * src/method.c: Likewise. + (method_new): New function + * src/wydawca.rc: Update + * src/diskio.c: Minor changes + * src/triplet.c (count_collected_triplets): New function + + * src/wydawca.c, src/config.c, src/gpg.c: New stat + types STAT_ACCESS_VIOLATIONS and STAT_BAD_SIGNATURES. + * src/wydawca.h (expand_param): New function + (struct kw_expansion): New data type + * src/verify.c (expand_param): Rewrite. + (verify_directive_file): Call check_access_rights. + +2007-08-24 Sergey Poznyakoff + + * src/Makefile.am, + lib/Makefile.am, jabberd/Makefile.am: Fix include dirs + * src/wydawca.c: Use gsc_version to display + program version. + * doc/gsc.texi: Update + * bootstrap: Add vasprintf + + Implement final statistics. + + * src/wydawca.c (log_to_stderr): Init to -1 (autodetect) + (wydawca_stat,syslog_include_prio,print_stats): New variables + (version): Update + (main): New options --cron, --syslog + Autodetect log_to_stderr value, unless set explicitly + (syslog_printer): Output priority string if requested by + syslog_include_prio + Print final statistics + (logmsg): Update statistics + (logstats): New function + * src/wydawca.h (enum wydawca_stat): New type + (STAT_MASK, STAT_MASK_NONE, STAT_MASK_ALL, UPDATE_STATS): New defines + (syslog_include_prio,wydawca_stat,print_stats): New globals + * src/config.c: New statements "syslog-print-priority" and + "statistics" + (get_backup_version): Fix handling of ARGMATCH result. + * src/directive.c: Update statistics + * src/diskio.c: Likewise + * src/triplet.c: Likewise + * src/wydawca.rc: Update + +2007-08-23 Sergey Poznyakoff + + Improve safety checks; implement symlink/rmsymlink/archive + directives; Fix directive signature verification. + +2007-08-22 Sergey Poznyakoff + + * src/exec.c: New file + * src/diskio.c, src/directive.c: Implement all directives + +2007-08-21 Sergey Poznyakoff + + * src/wydawca.c (usage): Update + New option --lint + (tar_command_name): New variable + * src/wydawca.h: include backupfile.h + (enum archive_type,struct archive_descr): New data types + (struct directory_pair.archive): New member + (safe_file_name): New function + (move_file): Redo prototype + (start_prog,log_output): New declarations + * src/config.c: Include argmatch.h + (safe_file_name): New function + (archive,umask,tar-program): New configuration file statemenst + * src/gpg.c (start_prog,log_output): Remove static qualifiers + * src/directive.c (process_directives): Update + * src/wydawca.rc: Update + * src/diskio.c (move_file): Implement archiving and backups + +2007-08-20 Sergey Poznyakoff + + * src/sql.c (trim_length): Move to verify.c + * src/verify.c (trim_length, trim) + (check_access_rights): New functions + (expand_param): Export + (verify_triplet): Call verify_directive_format and + check_access_rights + * src/wydawca.h (trim_length, trim, directive_parse) + (directive_get_value, directive_pack_version) + (directive_version_in_range_p, verify_directive_format) + (directive_first, directive_next, process_directives) + (create_directory, move_file): New functions + (MIN_DIRECTIVE_VERSION,MAX_DIRECTIVE_VERSION) + (MKDIR_PERMISSIONS,CREAT_PERMISSIONS): New defines + * src/gpg.c (wydawca_gpg_homedir): Return a meaningful value + (verify_directive_signature): Call directive_parse + * src/process.c (parse_file_name): Return void + * src/directive.c: New file + * src/diskio.c: New file + * src/triplet.c (triplet_processor): Call process_directives + (enumerate_triplets): Arg is not const + * src/Makefile.am: Add new sources + + * src/triplet.c (triplet_processor): Minor fix + * src/verify.c (verify_triplet): Save owner gid in reg. + Call verify_detached_signature + * src/wydawca.h (struct file_register): New member gid. + (verify_detached_signature): New function + * src/gpg.c (verify_detached_signature): New function + +2007-08-19 Sergey Poznyakoff + + * wydawca: New module + + +Local Variables: +mode: change-log +version-control: never +End: diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000..0bc2a31 --- /dev/null +++ b/Makefile.am @@ -0,0 +1,4 @@ +ACLOCAL_AMFLAGS = -I m4 +AUTOMAKE_OPTIONS = gnu 1.8.5 + +SUBDIRS=gnu lib src doc diff --git a/NEWS b/NEWS new file mode 100644 index 0000000..63fcd01 --- /dev/null +++ b/NEWS @@ -0,0 +1,36 @@ +Wydawca NEWS -- history of user-visible changes. 2007-09-01 +Copyright (C) 2007 Sergey Poznyakoff +See the end of file for copying conditions. + +Please send gsc bug reports to . + +Version 1.0 (SVN) + + First release. + + + +---------------------------------------------------------------------- +Copyright information: + +Copyright (C) 2007 Sergey Poznyakoff + + Permission is granted to anyone to make or distribute verbatim copies + of this document as received, in any medium, provided that the + copyright notice and this permission notice are preserved, + thus giving the recipient permission to redistribute in turn. + + Permission is granted to distribute modified versions + of this document, or of portions of it, + under the above conditions, provided also that they + carry prominent notices stating who last changed them. + +Local variables: +mode: outline +paragraph-separate: "[ ]*$" +eval: (add-hook 'write-file-hooks 'time-stamp) +time-stamp-start: "changes. " +time-stamp-format: "%:y-%02m-%02d" +time-stamp-end: "\n" +end: + diff --git a/README b/README new file mode 100644 index 0000000..52184b2 --- /dev/null +++ b/README @@ -0,0 +1,52 @@ +Wydawca README +Copyright (C) 2007 Sergey Poznyakoff +See the end of file for copying conditions. + +* Introduction + +Wydawca is a daemon for automatic project upload. + +* Installation + +Configure and make: + + ./configure [OPTIONS] + make + make install + +See the file INSTALL for the description of ./configure and its +generic options. The options and variables specific to Wydawca are +described below: + +--enable-sendfile + Attempt to use sendfile(2) when possible + +* Documentation + + Full documentation is shipped in doc subdirectory + +* Bug reporting. + +Send bug reports to . + + +* Copyright information: + +Copyright (C) 2007 Sergey Poznyakoff + + Permission is granted to anyone to make or distribute verbatim copies + of this document as received, in any medium, provided that the + copyright notice and this permission notice are preserved, + thus giving the recipient permission to redistribute in turn. + + Permission is granted to distribute modified versions + of this document, or of portions of it, + under the above conditions, provided also that they + carry prominent notices stating who last changed them. + + +Local Variables: +mode: outline +paragraph-separate: "[ ]*$" +version-control: never +End: diff --git a/README-alpha b/README-alpha new file mode 100644 index 0000000..bae3397 --- /dev/null +++ b/README-alpha @@ -0,0 +1,61 @@ +This file is part of Wydawca. +This document describes the actions needed to build the pre-release +or alpha version of the package. See end of file for copying conditions. + +* Introduction + +This is a *pre-release* version, and not ready for production +use yet. Please send comments and problem reports to . + +* Building + +Run the following commands in this order: + +1. ./configure [OPTIONS] + +See README and INSTALL for the available OPTIONS + +2. make + +3. make install + +This usually must be done with root privileges. + +* Checking Out the Sources + +The following instructions apply if you wish to obtain sources from +the SVN repository. + +To checkout the source tree from SVN, issue the following command: + + svn checkout http://svn.gnu.org.ua/sources/wydawca/trunk wydawca + +This will give you read-only access. If you think you need write access, +contact the mailing list. + +Read the file README-hacking for the instructions on bootstrapping the +SVN version. + + +* Copyright information + + Copyright (C) 2007 Sergey Poznyakoff + + Permission is granted to anyone to make or distribute verbatim copies + of this document as received, in any medium, provided that the + copyright notice and this permission notice are preserved, + thus giving the recipient permission to redistribute in turn. + + Permission is granted to distribute modified versions of this + document, or of portions of it, under the above conditions, provided + also that they carry prominent notices stating who last changed + them. + + +Local Variables: +mode: outline +paragraph-separate: "[ ]*$" +version-control: never +End: + + diff --git a/README-hacking b/README-hacking new file mode 100644 index 0000000..a7e251e --- /dev/null +++ b/README-hacking @@ -0,0 +1,59 @@ +These notes intend to help people working on the SVN version of +this package. See end of this file for the copying conditions. + +* Requirements + +You need the following packages to build the SVN version of Wydawca. I do +not make any efforts to accommodate older versions of these packages, +so please make sure that you have the latest stable version. + +- Automake +- Autoconf +- Bison +- Gnulib +- Flex +- M4 +- Subversion +- Texinfo + +* Bootstrapping + +Obviously, if you are reading these notes, you did manage to check out +the source tree from SVN. The next step is to create the configuration +framework: + +1. Change to the source tree directory + + $ cd wydawca + +2. Run `bootstrap' pointing the --gnulib-srcdir option to the location +of the local directory where gnulib sources reside, e.g.: + + ./bootstrap --gnulib-srcdir=/usr/src/gnulib + +Once done, proceed as described in the file README (section +`Installation'). + + +* Copyright information + + Copyright (C) 2007 Sergey Poznyakoff + + Permission is granted to anyone to make or distribute verbatim copies + of this document as received, in any medium, provided that the + copyright notice and this permission notice are preserved, + thus giving the recipient permission to redistribute in turn. + + Permission is granted to distribute modified versions + of this document, or of portions of it, + under the above conditions, provided also that they + carry prominent notices stating who last changed them. + +^L +Local Variables: +mode: outline +paragraph-separate: "[ ^L]*$" +version-control: never +End: + + diff --git a/acinclude.m4 b/acinclude.m4 new file mode 100644 index 0000000..eb82717 --- /dev/null +++ b/acinclude.m4 @@ -0,0 +1,57 @@ +dnl This file is part of GSC +dnl Copyright (C) 2007 Sergey Poznyakoff +dnl +dnl GSC is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 3, or (at your option) +dnl any later version. +dnl +dnl GSC is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with GSC. If not, see . + +dnl MU_RESULT_ACTIONS -- generate shell code for the result of a test +dnl $1 -- CVAR -- cache variable to check +dnl $2 -- NAME -- if not empty, used to generate a default value TRUE: +dnl `AC_DEFINE(HAVE_NAME)' +dnl $2 -- TRUE -- what to do if the CVAR is not `no' +dnl $3 -- FALSE -- what to do otherwise; defaults to `:' +dnl +AC_DEFUN([MU_RESULT_ACTIONS], [ +[if test "$$1" != "" -a "$$1" != no; then + ]ifelse([$3], , + [AC_DEFINE(HAVE_]translit($2, [a-z ./<>], [A-Z___])[,1,[FIXME])], + [$3])[ +else + ]ifelse([$4], , [:], [$4])[ +fi]])dnl + +dnl Arguments: +dnl $1 -- Library to look for +dnl $2 -- Function to check in the library +dnl $3 -- Any additional libraries that might be needed +dnl $4 -- Action to be taken when test succeeds +dnl $5 -- Action to be taken when test fails +dnl $6 -- Directories where the library may reside +AC_DEFUN([MU_CHECK_LIB], +[ + save_LIBS=$LIBS + AC_CACHE_CHECK([for -l$1], mu_cv_lib_$1, + [ + for path in $6 + do + LIBS="$save_LIBS -L$path" + unset ac_cv_lib_$1_$2 + AC_CHECK_LIB($1, $2, + [mu_cv_lib_$1="$3 -L$path -l$1" + break], + [mu_cv_lib_$1=no],$3) + done + ]) + MU_RESULT_ACTIONS([mu_cv_lib_$1],[LIB$1],[$4],[$5]) + LIBS=$save_LIBS +]) diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..e92c238 --- /dev/null +++ b/configure.ac @@ -0,0 +1,139 @@ +# This file is part of Wydawca +# Copyright (C) 2007 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 . + +AC_PREREQ(2.59) +AC_INIT([wydawca], 1.0, [gray@gnu.org.ua]) +AC_CONFIG_SRCDIR([src/wydawca.c]) +AC_CONFIG_AUX_DIR([build-aux]) +AC_CONFIG_HEADER([config.h]) +AM_INIT_AUTOMAKE + +# Checks for programs. +AC_PROG_CC +gl_EARLY +AC_PROG_LEX +AC_PROG_YACC +AC_PROG_RANLIB + +# Checks for libraries. + +# Checks for header files. +AC_HEADER_STDC +AC_HEADER_SYS_WAIT +AC_CHECK_HEADERS([stdlib.h string.h sys/file.h unistd.h sys/sendfile.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 +AC_HEADER_STDBOOL + +# Checks for library functions. +gl_INIT +AC_FUNC_FORK +AC_FUNC_MALLOC +AC_FUNC_MEMCMP +AC_FUNC_STAT +AC_FUNC_VPRINTF +AC_CHECK_FUNCS([memset strchr strdup strerror strrchr setegid setregid setresgid seteuid setreuid vsyslog sysconf getdtablesize]) + +# *********************************** +# Sendfile +# *********************************** +AC_ARG_ENABLE([sendfile], + [AC_HELP_STRING([--enable-sendfile], + [Attempt to use sendfile(2) when possible])], + [case $enableval in + yes) USE_SENDFILE=1;; + no) USE_SENDFILE=0;; + *) AC_MSG_FAILURE([Invalid argument for --enable-sendfile]) + esac], + [USE_SENDFILE=1]) + +if test "$USE_SENDFILE" = 1; then + case $host in + *-linux-*) AC_DEFINE_UNQUOTED([USE_SENDFILE], 1, + [Define to 1 to use sendfile(2) on GNU/Linux]);; + esac +fi + +# ********************** +# Mailutils +# ********************** +status_mailutils=no + +AC_PATH_PROG(MU_CONFIG, mailutils-config, none, $PATH) +if test "$MU_CONFIG" != "none"; then + status_mailutils=yes + AC_SUBST(MAILUTILS_VERSION, `$MU_CONFIG --info version|sed s/.*=//`) + AC_SUBST(MAILUTILS_INCLUDES, `$MU_CONFIG --compile`) + AC_SUBST(MAILUTILS_LIBS, `$MU_CONFIG --link mailer`) +else + AC_MSG_FAILURE([The requested library libmailutils is not found]) +fi + +# ********************** +# MySQL +# ********************** +status_mysql=no + +AC_SUBST(SQLLIB) +AH_TEMPLATE(HAVE_MYSQL,[Define if you have libmysql]) + +MU_CHECK_LIB(mysqlclient, + mysql_real_connect, + [-lm], + [ AC_DEFINE(HAVE_MYSQL) + SQLLIB="$mu_cv_lib_mysqlclient" + status_mysql=yes ], + [ AC_MSG_FAILURE([The requested library libmysqlclient is not found or is unusable])], + [/usr/lib/mysql /usr/local/lib/mysql]) + +# ********************** +# GPGME +# ********************** + +status_gpgme=no +AC_SUBST(GPGMELIB) +AH_TEMPLATE(HAVE_GPGME,[Define if you have gpgme]) + +AC_CHECK_HEADERS(gpgme.h) +MU_CHECK_LIB([gpgme],[main],[], + [GPGMELIB="$mu_cv_lib_gpgme" + AC_DEFINE(HAVE_GPGME) + status_gpgme=yes ], + [ AC_MSG_FAILURE([The requested library libgpgme is not found or is unusable])], + [/usr/pkg/lib /opt/lib /sw/lib]) + +AH_BOTTOM([ +#if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7) +# define __attribute__(x) +#endif + +#ifndef GSC_PRINTFLIKE +# define GSC_PRINTFLIKE(fmt,narg) __attribute__ ((__format__ (__printf__, fmt, narg))) +#endif +]) + +AC_CONFIG_FILES([Makefile + doc/Makefile + gnu/Makefile + lib/Makefile + src/Makefile]) + +AC_OUTPUT diff --git a/doc/Makefile.am b/doc/Makefile.am new file mode 100644 index 0000000..a06751b --- /dev/null +++ b/doc/Makefile.am @@ -0,0 +1,42 @@ +# This file is part of Wydawca +# Copyright (C) 2007 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 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 . + +info_TEXINFOS=wydawca.texi +wydawca_TEXINFOS=fdl.texi rendition.texi + +EXTRA_DIST = gendocs_template + +clean-local: + rm -rf manual + +# The rendering level is one of PUBLISH, DISTRIB or PROOF. +# Just call `make RENDITION=PROOF [target]' if you want PROOF rendition. +RENDITION = DISTRIB + +MAKEINFOFLAGS=-D$(RENDITION) + +GENDOCS=gendocs.sh + +TEXI2DVI=texi2dvi -t '@set $(RENDITION)' -E + +# Make sure you set TEXINPUTS. +# TEXINPUTS=/usr/share/texmf/pdftex/plain/misc/ is ok for most distributions +manual: + TEXINPUTS=$(srcdir):$(top_srcdir)/build-aux:$(TEXINPUTS) \ + MAKEINFO="$(MAKEINFO) $(MAKEINFOFLAGS)" \ + TEXI2DVI="$(TEXI2DVI) -t @finalout" \ + $(GENDOCS) $(PACKAGE) '$(PACKAGE_NAME) manual' + diff --git a/doc/fdl.texi b/doc/fdl.texi new file mode 100644 index 0000000..f13635b --- /dev/null +++ b/doc/fdl.texi @@ -0,0 +1,450 @@ +@setfilename fdl.info +@appendix GNU Free Documentation License +@cindex FDL, GNU Free Documentation License +@center Version 1.2, November 2002 + +@display +Copyright @copyright{} 2000,2001,2002 Free Software Foundation, Inc. +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + +Everyone is permitted to copy and distribute verbatim copies +of this license document, but changing it is not allowed. +@end display + +@enumerate 0 +@item +PREAMBLE + +The purpose of this License is to make a manual, textbook, or other +functional and useful document @dfn{free} in the sense of freedom: to +assure everyone the effective freedom to copy and redistribute it, +with or without modifying it, either commercially or noncommercially. +Secondarily, this License preserves for the author and publisher a way +to get credit for their work, while not being considered responsible +for modifications made by others. + +This License is a kind of ``copyleft'', which means that derivative +works of the document must themselves be free in the same sense. It +complements the GNU General Public License, which is a copyleft +license designed for free software. + +We have designed this License in order to use it for manuals for free +software, because free software needs free documentation: a free +program should come with manuals providing the same freedoms that the +software does. But this License is not limited to software manuals; +it can be used for any textual work, regardless of subject matter or +whether it is published as a printed book. We recommend this License +principally for works whose purpose is instruction or reference. + +@item +APPLICABILITY AND DEFINITIONS + +This License applies to any manual or other work, in any medium, that +contains a notice placed by the copyright holder saying it can be +distributed under the terms of this License. Such a notice grants a +world-wide, royalty-free license, unlimited in duration, to use that +work under the conditions stated herein. The ``Document'', below, +refers to any such manual or work. Any member of the public is a +licensee, and is addressed as ``you''. You accept the license if you +copy, modify or distribute the work in a way requiring permission +under copyright law. + +A ``Modified Version'' of the Document means any work containing the +Document or a portion of it, either copied verbatim, or with +modifications and/or translated into another language. + +A ``Secondary Section'' is a named appendix or a front-matter section +of the Document that deals exclusively with the relationship of the +publishers or authors of the Document to the Document's overall +subject (or to related matters) and contains nothing that could fall +directly within that overall subject. (Thus, if the Document is in +part a textbook of mathematics, a Secondary Section may not explain +any mathematics.) The relationship could be a matter of historical +connection with the subject or with related matters, or of legal, +commercial, philosophical, ethical or political position regarding +them. + +The ``Invariant Sections'' are certain Secondary Sections whose titles +are designated, as being those of Invariant Sections, in the notice +that says that the Document is released under this License. If a +section does not fit the above definition of Secondary then it is not +allowed to be designated as Invariant. The Document may contain zero +Invariant Sections. If the Document does not identify any Invariant +Sections then there are none. + +The ``Cover Texts'' are certain short passages of text that are listed, +as Front-Cover Texts or Back-Cover Texts, in the notice that says that +the Document is released under this License. A Front-Cover Text may +be at most 5 words, and a Back-Cover Text may be at most 25 words. + +A ``Transparent'' copy of the Document means a machine-readable copy, +represented in a format whose specification is available to the +general public, that is suitable for revising the document +straightforwardly with generic text editors or (for images composed of +pixels) generic paint programs or (for drawings) some widely available +drawing editor, and that is suitable for input to text formatters or +for automatic translation to a variety of formats suitable for input +to text formatters. A copy made in an otherwise Transparent file +format whose markup, or absence of markup, has been arranged to thwart +or discourage subsequent modification by readers is not Transparent. +An image format is not Transparent if used for any substantial amount +of text. A copy that is not ``Transparent'' is called ``Opaque''. + +Examples of suitable formats for Transparent copies include plain +@sc{ascii} without markup, Texinfo input format, La@TeX{} input +format, @acronym{SGML} or @acronym{XML} using a publicly available +@acronym{DTD}, and standard-conforming simple @acronym{HTML}, +PostScript or @acronym{PDF} designed for human modification. Examples +of transparent image formats include @acronym{PNG}, @acronym{XCF} and +@acronym{JPG}. Opaque formats include proprietary formats that can be +read and edited only by proprietary word processors, @acronym{SGML} or +@acronym{XML} for which the @acronym{DTD} and/or processing tools are +not generally available, and the machine-generated @acronym{HTML}, +PostScript or @acronym{PDF} produced by some word processors for +output purposes only. + +The ``Title Page'' means, for a printed book, the title page itself, +plus such following pages as are needed to hold, legibly, the material +this License requires to appear in the title page. For works in +formats which do not have any title page as such, ``Title Page'' means +the text near the most prominent appearance of the work's title, +preceding the beginning of the body of the text. + +A section ``Entitled XYZ'' means a named subunit of the Document whose +title either is precisely XYZ or contains XYZ in parentheses following +text that translates XYZ in another language. (Here XYZ stands for a +specific section name mentioned below, such as ``Acknowledgements'', +``Dedications'', ``Endorsements'', or ``History''.) To ``Preserve the Title'' +of such a section when you modify the Document means that it remains a +section ``Entitled XYZ'' according to this definition. + +The Document may include Warranty Disclaimers next to the notice which +states that this License applies to the Document. These Warranty +Disclaimers are considered to be included by reference in this +License, but only as regards disclaiming warranties: any other +implication that these Warranty Disclaimers may have is void and has +no effect on the meaning of this License. + +@item +VERBATIM COPYING + +You may copy and distribute the Document in any medium, either +commercially or noncommercially, provided that this License, the +copyright notices, and the license notice saying this License applies +to the Document are reproduced in all copies, and that you add no other +conditions whatsoever to those of this License. You may not use +technical measures to obstruct or control the reading or further +copying of the copies you make or distribute. However, you may accept +compensation in exchange for copies. If you distribute a large enough +number of copies you must also follow the conditions in section 3. + +You may also lend copies, under the same conditions stated above, and +you may publicly display copies. + +@item +COPYING IN QUANTITY + +If you publish printed copies (or copies in media that commonly have +printed covers) of the Document, numbering more than 100, and the +Document's license notice requires Cover Texts, you must enclose the +copies in covers that carry, clearly and legibly, all these Cover +Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on +the back cover. Both covers must also clearly and legibly identify +you as the publisher of these copies. The front cover must present +the full title with all words of the title equally prominent and +visible. You may add other material on the covers in addition. +Copying with changes limited to the covers, as long as they preserve +the title of the Document and satisfy these conditions, can be treated +as verbatim copying in other respects. + +If the required texts for either cover are too voluminous to fit +legibly, you should put the first ones listed (as many as fit +reasonably) on the actual cover, and continue the rest onto adjacent +pages. + +If you publish or distribute Opaque copies of the Document numbering +more than 100, you must either include a machine-readable Transparent +copy along with each Opaque copy, or state in or with each Opaque copy +a computer-network location from which the general network-using +public has access to download using public-standard network protocols +a complete Transparent copy of the Document, free of added material. +If you use the latter option, you must take reasonably prudent steps, +when you begin distribution of Opaque copies in quantity, to ensure +that this Transparent copy will remain thus accessible at the stated +location until at least one year after the last time you distribute an +Opaque copy (directly or through your agents or retailers) of that +edition to the public. + +It is requested, but not required, that you contact the authors of the +Document well before redistributing any large number of copies, to give +them a chance to provide you with an updated version of the Document. + +@item +MODIFICATIONS + +You may copy and distribute a Modified Version of the Document under +the conditions of sections 2 and 3 above, provided that you release +the Modified Version under precisely this License, with the Modified +Version filling the role of the Document, thus licensing distribution +and modification of the Modified Version to whoever possesses a copy +of it. In addition, you must do these things in the Modified Version: + +@enumerate A +@item +Use in the Title Page (and on the covers, if any) a title distinct +from that of the Document, and from those of previous versions +(which should, if there were any, be listed in the History section +of the Document). You may use the same title as a previous version +if the original publisher of that version gives permission. + +@item +List on the Title Page, as authors, one or more persons or entities +responsible for authorship of the modifications in the Modified +Version, together with at least five of the principal authors of the +Document (all of its principal authors, if it has fewer than five), +unless they release you from this requirement. + +@item +State on the Title page the name of the publisher of the +Modified Version, as the publisher. + +@item +Preserve all the copyright notices of the Document. + +@item +Add an appropriate copyright notice for your modifications +adjacent to the other copyright notices. + +@item +Include, immediately after the copyright notices, a license notice +giving the public permission to use the Modified Version under the +terms of this License, in the form shown in the Addendum below. + +@item +Preserve in that license notice the full lists of Invariant Sections +and required Cover Texts given in the Document's license notice. + +@item +Include an unaltered copy of this License. + +@item +Preserve the section Entitled ``History'', Preserve its Title, and add +to it an item stating at least the title, year, new authors, and +publisher of the Modified Version as given on the Title Page. If +there is no section Entitled ``History'' in the Document, create one +stating the title, year, authors, and publisher of the Document as +given on its Title Page, then add an item describing the Modified +Version as stated in the previous sentence. + +@item +Preserve the network location, if any, given in the Document for +public access to a Transparent copy of the Document, and likewise +the network locations given in the Document for previous versions +it was based on. These may be placed in the ``History'' section. +You may omit a network location for a work that was published at +least four years before the Document itself, or if the original +publisher of the version it refers to gives permission. + +@item +For any section Entitled ``Acknowledgements'' or ``Dedications'', Preserve +the Title of the section, and preserve in the section all the +substance and tone of each of the contributor acknowledgements and/or +dedications given therein. + +@item +Preserve all the Invariant Sections of the Document, +unaltered in their text and in their titles. Section numbers +or the equivalent are not considered part of the section titles. + +@item +Delete any section Entitled ``Endorsements''. Such a section +may not be included in the Modified Version. + +@item +Do not retitle any existing section to be Entitled ``Endorsements'' or +to conflict in title with any Invariant Section. + +@item +Preserve any Warranty Disclaimers. +@end enumerate + +If the Modified Version includes new front-matter sections or +appendices that qualify as Secondary Sections and contain no material +copied from the Document, you may at your option designate some or all +of these sections as invariant. To do this, add their titles to the +list of Invariant Sections in the Modified Version's license notice. +These titles must be distinct from any other section titles. + +You may add a section Entitled ``Endorsements'', provided it contains +nothing but endorsements of your Modified Version by various +parties---for example, statements of peer review or that the text has +been approved by an organization as the authoritative definition of a +standard. + +You may add a passage of up to five words as a Front-Cover Text, and a +passage of up to 25 words as a Back-Cover Text, to the end of the list +of Cover Texts in the Modified Version. Only one passage of +Front-Cover Text and one of Back-Cover Text may be added by (or +through arrangements made by) any one entity. If the Document already +includes a cover text for the same cover, previously added by you or +by arrangement made by the same entity you are acting on behalf of, +you may not add another; but you may replace the old one, on explicit +permission from the previous publisher that added the old one. + +The author(s) and publisher(s) of the Document do not by this License +give permission to use their names for publicity for or to assert or +imply endorsement of any Modified Version. + +@item +COMBINING DOCUMENTS + +You may combine the Document with other documents released under this +License, under the terms defined in section 4 above for modified +versions, provided that you include in the combination all of the +Invariant Sections of all of the original documents, unmodified, and +list them all as Invariant Sections of your combined work in its +license notice, and that you preserve all their Warranty Disclaimers. + +The combined work need only contain one copy of this License, and +multiple identical Invariant Sections may be replaced with a single +copy. If there are multiple Invariant Sections with the same name but +different contents, make the title of each such section unique by +adding at the end of it, in parentheses, the name of the original +author or publisher of that section if known, or else a unique number. +Make the same adjustment to the section titles in the list of +Invariant Sections in the license notice of the combined work. + +In the combination, you must combine any sections Entitled ``History'' +in the various original documents, forming one section Entitled +``History''; likewise combine any sections Entitled ``Acknowledgements'', +and any sections Entitled ``Dedications''. You must delete all +sections Entitled ``Endorsements.'' + +@item +COLLECTIONS OF DOCUMENTS + +You may make a collection consisting of the Document and other documents +released under this License, and replace the individual copies of this +License in the various documents with a single copy that is included in +the collection, provided that you follow the rules of this License for +verbatim copying of each of the documents in all other respects. + +You may extract a single document from such a collection, and distribute +it individually under this License, provided you insert a copy of this +License into the extracted document, and follow this License in all +other respects regarding verbatim copying of that document. + +@item +AGGREGATION WITH INDEPENDENT WORKS + +A compilation of the Document or its derivatives with other separate +and independent documents or works, in or on a volume of a storage or +distribution medium, is called an ``aggregate'' if the copyright +resulting from the compilation is not used to limit the legal rights +of the compilation's users beyond what the individual works permit. +When the Document is included an aggregate, this License does not +apply to the other works in the aggregate which are not themselves +derivative works of the Document. + +If the Cover Text requirement of section 3 is applicable to these +copies of the Document, then if the Document is less than one half of +the entire aggregate, the Document's Cover Texts may be placed on +covers that bracket the Document within the aggregate, or the +electronic equivalent of covers if the Document is in electronic form. +Otherwise they must appear on printed covers that bracket the whole +aggregate. + +@item +TRANSLATION + +Translation is considered a kind of modification, so you may +distribute translations of the Document under the terms of section 4. +Replacing Invariant Sections with translations requires special +permission from their copyright holders, but you may include +translations of some or all Invariant Sections in addition to the +original versions of these Invariant Sections. You may include a +translation of this License, and all the license notices in the +Document, and any Warranty Disclaimers, provided that you also include +the original English version of this License and the original versions +of those notices and disclaimers. In case of a disagreement between +the translation and the original version of this License or a notice +or disclaimer, the original version will prevail. + +If a section in the Document is Entitled ``Acknowledgements'', +``Dedications'', or ``History'', the requirement (section 4) to Preserve +its Title (section 1) will typically require changing the actual +title. + +@item +TERMINATION + +You may not copy, modify, sublicense, or distribute the Document except +as expressly provided for under this License. Any other attempt to +copy, modify, sublicense or distribute the Document is void, and will +automatically terminate your rights under this License. However, +parties who have received copies, or rights, from you under this +License will not have their licenses terminated so long as such +parties remain in full compliance. + +@item +FUTURE REVISIONS OF THIS LICENSE + +The Free Software Foundation may publish new, revised versions +of the GNU Free Documentation License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. See +@uref{http://www.gnu.org/copyleft/}. + +Each version of the License is given a distinguishing version number. +If the Document specifies that a particular numbered version of this +License ``or any later version'' applies to it, you have the option of +following the terms and conditions either of that specified version or +of any later version that has been published (not as a draft) by the +Free Software Foundation. If the Document does not specify a version +number of this License, you may choose any version ever published (not +as a draft) by the Free Software Foundation. +@end enumerate + +@page +@appendixsec ADDENDUM: How to use this License for your documents + +To use this License in a document you have written, include a copy of +the License in the document and put the following copyright and +license notices just after the title page: + +@smallexample +@group + Copyright (C) @var{year} @var{your name}. + Permission is granted to copy, distribute and/or modify this document + under the terms of the GNU Free Documentation License, Version 1.2 + or any later version published by the Free Software Foundation; + with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. + A copy of the license is included in the section entitled ``GNU + Free Documentation License''. +@end group +@end smallexample + +If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, +replace the ``with...Texts.'' line with this: + +@smallexample +@group + with the Invariant Sections being @var{list their titles}, with + the Front-Cover Texts being @var{list}, and with the Back-Cover Texts + being @var{list}. +@end group +@end smallexample + +If you have Invariant Sections without Cover Texts, or some other +combination of the three, merge those two alternatives to suit the +situation. + +If your document contains nontrivial examples of program code, we +recommend releasing these examples in parallel under your choice of +free software license, such as the GNU General Public License, +to permit their use in free software. + +@c Local Variables: +@c ispell-local-pdict: "ispell-dict" +@c End: + diff --git a/doc/gendocs_template b/doc/gendocs_template new file mode 100755 index 0000000..83a33d9 --- /dev/null +++ b/doc/gendocs_template @@ -0,0 +1,105 @@ + + + + + + +%%TITLE%% - Free Software - puszcza.gnu.org.ua + + + + + + + + + + + + + + +

%%TITLE%%

+ +
Sergey Poznyakoff
+
last updated %%DATE%%
+

+ +  [image of the head of a GNU] + + +

+
+ +

The manual for %%PACKAGE%% is available in the following formats:

+ + + +

(This page generated by the %%SCRIPTNAME%% script.) +

+ +

+Valid XHTML 1.0! +

+ + + + + diff --git a/doc/rendition.texi b/doc/rendition.texi new file mode 100644 index 0000000..016583d --- /dev/null +++ b/doc/rendition.texi @@ -0,0 +1,85 @@ +@c Let's use the concept of 'renditions' by Fra@,{c}ois Pinard +@c I extended it by adding a FIXME_FOOTNOTE variable, which controls +@c whether FIXME information should be placed in footnotes or +@c inlined. + +@c ====================================================================== +@c This document has three levels of rendition: PUBLISH, DISTRIB or PROOF, +@c as decided by @set symbols. The PUBLISH rendition does not show +@c notes or marks asking for revision. Most users will prefer having more +@c information, even if this information is not fully revised for adequacy, +@c so DISTRIB is the default for distributions. The PROOF rendition +@c show all marks to the point of ugliness, but is nevertheless useful to +@c those working on the manual itself. +@c ====================================================================== + +@c Set this symbol if you wish FIXMEs to appear in footnotes, instead +@c of being inserted into the text. +@c @set PROOF_FOOTNOTED + +@ifclear PUBLISH +@ifclear DISTRIB +@ifclear PROOF +@set DISTRIB +@end ifclear +@end ifclear +@end ifclear + +@ifset PUBLISH +@set RENDITION The book, version +@end ifset + +@ifset DISTRIB +@set RENDITION FTP release, version +@end ifset + +@ifset PROOF +@set RENDITION Proof reading version +@end ifset + +@c Output marks for nodes needing revision, but not in PUBLISH rendition. + +@macro UNREVISED +@ifclear PUBLISH +@quotation +@emph{(This message will disappear, once this node revised.)} +@end quotation +@end ifclear +@end macro + +@c Output various FIXME information only in PROOF rendition. + +@macro FIXME{string} +@ifset PROOF +@ifset PROOF_FOOTNOTED +@footnote{@strong{FIXME:} \string\} +@end ifset +@ifclear PROOF_FOOTNOTED +@cartouche +@strong{} \string\ @strong{} +@end cartouche +@end ifclear +@end ifset + +@end macro + +@macro FIXME-ref{string} +@ifset PROOF +@strong{} \string\ @strong{} +@end ifset + +@end macro + +@macro FIXME-pxref{string} +@ifset PROOF +@strong{} \string\ @strong{} +@end ifset + +@end macro + +@macro FIXME-xref{string} +@ifset PROOF +@strong{} \string\ @strong{} +@end ifset + +@end macro diff --git a/doc/wydawca.texi b/doc/wydawca.texi new file mode 100644 index 0000000..713e015 --- /dev/null +++ b/doc/wydawca.texi @@ -0,0 +1,871 @@ +\input texinfo @c -*-texinfo-*- +@smallbook +@c %**start of header +@setfilename wydawca.info +@settitle Wydawca +@c %**end of header +@setchapternewpage odd + +@syncodeindex fn cp +@syncodeindex vr cp +@syncodeindex ky cp +@syncodeindex pg cp +@syncodeindex tp cp + +@include version.texi +@include rendition.texi + +@ifinfo +@direntry +* wydawca: (wydawca). Automatic project upload daemon. +@end direntry +@end ifinfo + +@copying +Published by the Free Software Foundation, +51 Franklin Street, Fifth Floor +Boston, MA 02110-1301, USA + +Copyright @copyright{} 2007 Sergey Poznyakoff + +Permission is granted to copy, distribute and/or modify this document +under the terms of the GNU Free Documentation License, Version 1.2 or +any later version published by the Free Software Foundation; with no +Invariant Sections, with the Front-Cover texts being ``A GNU Manual'', +and with the Back-Cover Texts as in (a) below. A copy of the license +is included in the section entitled ``GNU Free Documentation License''. + +(a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify +this GNU Manual, like GNU software. Copies published by the Free +Software Foundation raise funds for GNU development.'' +@end copying + +@titlepage +@title Wydawca Manual +@subtitle version @value{VERSION}, @value{UPDATED} +@author Sergey Poznyakoff. +@page +@vskip 0pt plus 1filll +@insertcopying +@end titlepage + +@page +@summarycontents +@page +@contents + +@node Top, Intro, (dir), (dir) + +@ifinfo +@chapter Wydawca +This edition of the @cite{Wydawca Manual}, last updated @value{UPDATED}, +documents Wydawca Version @value{VERSION}. +@end ifinfo + +@menu +* Intro:: What is Wydawca + +* starting:: How to Invoke @command{wydawca}. +* configuring:: How to Configure @command{wydawca}. +* wydawca.rc:: @command{Wydawca} configuration file. +* invocation:: @command{Wydawca} invocation summary. + +* Reporting Bugs:: How to Report a Bug. + +Appendices + +* Copying This Manual:: The GNU Free Documentation License. +* Concept Index:: Index of Concepts. + +Here are some other nodes which are really inferiors of the ones +already listed, mentioned here so you can get to them in one step: + +@detailmenu +@end detailmenu +@end menu + +@node Intro, starting, Top, Top +@chapter Introduction to Wydawca +@UNREVISED{} + Let's begin with a short synopsis. Suppose you run a developer's +site, like, e.g. @indicateurl{gnu.org}. You have at least two +@dfn{distribution @acronym{URL}s}: @indicateurl{ftp.gnu.org}, which +distributes stable versions of the software, and +@indicateurl{alpha.gnu.org}, which distributes alpha and pre-test +versions. Now, package maintainers should have a way of uploading +their packages to one of these sites. The currently accepted scheme +is described in +@ifnothtml +@ref{Automated FTP Uploads, Automated FTP Uploads, Automated FTP +Uploads, maintain, Information for maintainers of GNU software}. +@end ifnothtml +@ifhtml +@uref{http://www.gnu.org/prep/maintain/html_node/Automated-Upload-Procedure.html, +Automated Upload Procedure}. +@end ifhtml +The following is a short summary of it: there is an @acronym{FTP} +@dfn{upload site}, which has two @dfn{source directories}, each one +corresponding to a certain distribution @acronym{URL}. For example, + +@multitable @columnfractions 0.4 0.4 +@headitem Source Directory @tab Distribution Site +@item @file{/incoming/ftp} @tab @indicateurl{ftp.gnu.org} +@item @file{/incoming/alpha} @tab @indicateurl{alpha.gnu.org} +@end multitable + + Now, if the maintainer of the project @samp{foo} wishes to make a release +of the stable version @file{foo-1.0.tar.gz}, he creates a detached +signature @file{foo-1.0.tar.gz.sig}, using his PGP key, the creates a +special @dfn{directive} file, that contain some information needed bt +the server, and clearsigns it, obtaining this way the file +@file{foo-1.0.tar.gz.directive.asc}. Then he uploads these three files +(a @dfn{triplet}) to the upload site, storing them into the directory +@file{/incoming/ftp}. + + From now on it is the responsibility of an @dfn{automated upload +daemon}, to scan the source directories, to gather the triplets, +verify them, and to move the files to distribution sites, if they had +passed the verification successfully. + + @command{Wydawca} is such an automated upload daemon. It is able to +handle any number of @samp{source/destination} pairs, offers an +extensible logging and mail notification mechanism, allowing both +package maintainers and site administrators to be immediately notified +about any occurring problems. + + The program is written entirely in @acronym{C}, is highly +effective and consumes little resources. + +@node starting, configuring, Intro, Top +@chapter How to invoke @command{wydawca}. +@UNREVISED{} + +@anchor{wydawca--config-file} +@cindex @option{--config-file}, @command{wydawca} option +@cindex @option{-c}, @command{wydawca} option + @command{Wydawca} gets all information it needs from its +@dfn{configuration file} (@pxref{wydawca.rc}). The default +configuration file is @file{@var{sysconfdir}/wydawca.rc}, but if it is +located elsewhere, you can specify its new location with the +@option{--config-file} (@option{-c}) command line option. + +@anchor{wydawca--lint} +@cindex @option{--lint}, @command{wydawca} option +@cindex @option{-t}, @command{wydawca} option + If you wish to check your configuration file for syntax errors, use +@option{--lint} (@option{-t}) command line option. When given this +option, @command{wydawca} prints all diagnostics on its standard +error and exits with code 0 if the file is OK, or 1 otherwise. + +@anchor{wydawca--stderr} +@cindex @option{--stderr}, @command{wydawca} option +@cindex @option{-e}, @command{wydawca} option +@cindex @option{--syslog}, @command{wydawca} option + Normally, @command{wydawca} attempts to detect automatically whether +it is run from an interactive console, and if so it prints it +diagnostics to the standard error. Otherwise, the diagnostics is +directed to the @command{syslog}, and the facility to use is gotten from the +@code{syslog-facility} configuration file statement +(@FIXME-pxref{}). Two options are provided if you wish to disable this +autodetection: the option @option{--syslog} instructs the program to print +all diagnostics using @command{syslog}, and the option +@option{--stderr} (or @option{-e}) instructs it to print everything on +the standard error. + +@cindex @option{--cron}, @command{wydawca} option + Usually you will run @command{wydawca} as a cron job. In that case, +it seldom needs any additional arguments, but we suggest to use +@option{--cron} command line option anyway. Currently, its effect is +the same as @option{--syslog}, but it may change in the future. + +@anchor{wydawca--debug} +@cindex @option{--debug}, @command{wydawca} option +@cindex @option{-d}, @command{wydawca} option + The @option{--debug} (@option{-d}) tells the program to inrease its +debugging level by 1. The @dfn{debugging level} determines the amount +of information the program reports when it runs. By default it is 0, +meaning to report only errors and other critical conditions. Raising +it may be necessary when debugging new configurations. Each +@option{-d} option raises the level by one, so you can say +@command{wydawca -dd} to obtain level 2, for example. The maximum +debugging level currently is 4, which prints impractically many +information and is useful primarily for @command{wydawca} developers. + +@anchor{wydawca--dry-run} +@cindex @option{--dry-run}, @command{wydawca} option +@cindex @option{-n}, @command{wydawca} option + Yet another debugging facility is the @option{--dry-run} +(@option{-n}) option. It instructs @command{wydawca} no to do any +modifications to the disk contents, but to verbosely print them. It +set the debugging level to 1 and directs the diagnostics output to the +standard error, as if @option{--debug --stderr} options have been +given. You can raise debugging level further by supplying additional +@option{--debug} options. The @option{--dry-run} option is useful when +testing new configurations, for example: + +@smallexample +$ wydawca -c new.cfg --dry-run +@end smallexample + +@cindex @option{--help}, @command{wydawca} option +@cindex @option{-h}, @command{wydawca} option +@cindex @option{--version}, @command{wydawca} option +@cindex @option{-v}, @command{wydawca} option + Two usual informational options are available as well: +@option{--help} (@option{-h}) prints a short usage summary, and +@option{--version} (@option{-v}) prints program version number. + +@node configuring, wydawca.rc, starting, Top +@chapter How to Configure @command{wydawca}. +@UNREVISED{} + The @command{wydawca} configuration file has a simple line-oriented +syntax. Empty lines are ignored. Comments are introduced by a pound +sign (@samp{#}), everything starting from the first occurrence of +@samp{#} up to the end of line is ignored. Non-empty non-comment lines +contain configuration statements. + + A @dfn{configuration statement} consists of a @dfn{command word} +optionally followed by one or more @dfn{arguments}, separated by any +amount of whitespace. There are @samp{simple} and @samp{compound} +configuration statements. @dfn{Simple statements} occupy a single +line, for example: + +@smallexample +syslog-print-priority yes +@end smallexample + +If a simple statement is so long that it is inconvenient to keep it on +a single line, it can be split to several lines by ending each line +with a backslash character (@samp{\}). Notice, that the backslash +character must immediately precede the terminating newline. For +example, this is a single statement split over several lines: + +@smallexample +@group +user-data sql default SELECT realname, email \ + FROM user \ + WHERE user_name='%@{user@}' +@end group +@end smallexample + + +@dfn{Compound statements} begin with a simple statement, occupy +several lines, and end with @code{end} statement, appearing on a line +by itself. Each line of a compound statement is itself a simple +statement. + + This subsection will guide you through the @command{wydawca} +configuration on step-by-step basis. + +@menu +* syslog:: +* access methods:: +* archivation:: +* directory pairs:: +* notification:: +@end menu + +@node syslog +@section Syslog Configuration Directives +@UNREVISED{} + Syslog is the default diagnostics channel for @command{wydawca}. By +default, the program uses facility @samp{local1}. To change this, use +@code{syslog-facility} statement: + +@smallexample +syslog-facility local2 +@end smallexample + + It takes a single argument, denoting the facility to use. Allowed +values are: @samp{auth}, @samp{authpriv}, @samp{cron}, @samp{daemon}, +@samp{ftp}, @samp{local0} through @samp{local7}, and +@samp{mail}. These names are case-insensitive and may be optionally +prefixed with @samp{LOG_}. The default is @samp{local1}. + + Another thing you may wish to tune is @dfn{syslog tag}, a string +identifying each message issued by the program. By default it is a +string @samp{wydawca}. To change it, use @code{syslog-tag} statement: + +@smallexample +syslog-tag wydawca +@end smallexample + + In addition to priority segregation, provided by @command{syslog}, +you can instruct @command{wydawca} to prefix each syslog message with +its priority. To do so, set: + +@smallexample +syslog-print-priority yes +@end smallexample + + At the end of each run, the program can pring detailed summary of +executed actions, which looks like that: + +@smallexample +errors: 0 +warnings: 2 +bad signatures: 0 +access violation attempts: 0 +complete triplets: 6 +incomplete triplets: 2 +bad triplets: 0 +expired triplets: 0 +triplet successes: 6 +files uploaded: 12 +files archived: 2 +symlinks created: 0 +symlinks removed: 0 +@end smallexample + + You can nofigure the information displayed, using @code{statistics} +statement. It takes arbitrary number of arguments, each one specifying +which part of the above statistics to display. For example, given the +following statement: + +@smallexample +statistics errors warnings +@end smallexample + +@noindent +the above output will be reduced to + +@smallexample +errors: 0 +warnings: 2 +@end smallexample + + The special keyword @samp{none} can be used to suppress this output +altogether (which is the default), as in + +@smallexample +statistics no +@end smallexample + + Another special keyword is @samp{all}, that enables all statistics +output. This keyword may also be followed by any number of usual +arguments, which are in this case @emph{subtracted}. For example, to +output all statistics, except errors and warnings one would set: + +@smallexample +statistics all errors warnings +@end smallexample + + The following table summarizes all the keywords, available for +@code