2020-04-30  Sergey Poznyakoff  <gray@gnu.org>

	Change replace handling

	* src/wydawca.h (struct wy_triplet): New member: replace_allowed
	* src/directive.c (process_directives): Set trp->replace_allowed
	depending on the directive file version and the "replace" directive.
	* src/diskio.c (backup_copy): Use trp->replace_allowed
	* tests/Makefile.am: Add new tests.
	* tests/testsuite.at: Include new tests.
	* tests/upload03.at: New test.
	* tests/upload04.at: New test.
	* tests/upload05.at: New test.

2020-04-29  Sergey Poznyakoff  <gray@gnu.org>

	Minor change

	Proof-read the docs

	Minor changes.

	* src/config.c (config_init): Place the user include directory before
	the version-specific include directory.
	* src/triplet.c (expand_relative_dir): Use trp->relative_dir).

	Skip tests if running as a privileged user

	Change the default log facility to daemon

	Improve statistic reporter scheduling.

	Use crontab format specification to define the frequency of
	statistic report generation.

	* src/wydawca.h (stat_report_schedule): New variable.  Replaces
	stat_report_interval.
	* configure.ac: Check for struct tm.tm_gmtoff.
	* src/config.c: New keyword: stat-report-schedule.
	* src/micron.c: New file.
	* src/micron.h: New file.
	* src/Makefile.am: Add new files.
	* src/timer.c (wy_thr_stat): Use micron scheduler.
	* doc/wydawca.texi: Document stat-report-schedule.
	* NEWS: Document stat-report-schedule.

2020-04-27  Sergey Poznyakoff  <gray@gnu.org>

	Replace the "finish" event with "statistics".

	Use BSD queue macros to implement queues and linked lists.

	Minor improvement

	* src/directive.c (directive_parse): Optimize two sequential directives
	referring for filename and filename.sig

2020-04-26  Sergey Poznyakoff  <gray@gnu.org>

	Support both new and legacy usage of -d

	Add missing descriptions to the test programs

	Minor changes

	* doc/wydawca.texi: Fix documentation of ${timer:wydawca}
	* etc/wydawca.rc: Rename to etc/wydawca.conf.  Edit.
	* src/triplet.c: The "wydawca" timer is synonymous to "spool".
	* src/wydawca.h (WY_TIMER_WYDAWCA): Remove.

2020-04-25  Sergey Poznyakoff  <gray@gnu.org>

	Keep statistic items in global array. Use special thread for periodic reporting

	* src/config.c: New configuration statement stat-report-interval
	* src/directive.c
	* src/timer.c: Rewrite statistic counters and functions
	(wydawca_stat_log,wydawca_stat_init,wydawca_stat_update)
	(wydawca_stat_notify,wydawca_stat_add): New functions.
	(wy_thr_stat): New thread (statistics reporter.
	* src/triplet.c: Remove per-thread statistic counters.
	* src/wydawca.c (wy_main): Use new statistic calls.  Force
	statistic logging at the end of the run.
	* src/wydawca.h (DEFAULT_STAT_REPORT_INTERVAL): New constant.
	(stat_report_interval): New extern.
	(wy_get_stat_array, wy_get_stat_slot)
	(wy_get_stat_counter): Remove.
	(wydawca_stat_log,wydawca_stat_init,wydawca_stat_update)
	(wydawca_stat_notify,wydawca_stat_add)
	(wydawca_stat_incr): New protos.
	(stat_mask_p,logstats,wydawca_stats_export)
	(wydawca_stats_update): Remove protos.

	Fix string expansion.

	* modules/mailutils/mod_mailutils.c (mail_stats): Handle NULL value.
	* src/triplet.c (try_timer_var): Don't exit on errors. Handle
	timer:spool:X:Y properly.
	(wy_expand_string): Don't exit on errors. Improve error reporting.
	* src/wydawca.c (wy_stat_expansion): Return after successful expansion.

	Fix eventual simultaneous access to the triplet.

	The triplet could have been modified by the triplet_remove_file function
	invoked from the watcher on file delete or moved_from event, triggered
	by the normal install procedure.

	* src/wydawca.h (struct wy_triplet): Replace the destroying member with
	in_processing.
	* src/triplet.c (triplet_enqueue): Set the "in_processing" member.
	(remove_triplet_unlocked): Remove the "destroying" flag.
	(triplet_remove_file): If in_processing is set, don't touch the triplet.
	* src/directive.c (process_directives): Remove the "destroying" flag.
	* src/timer.c (timer_stop): Use timer_get to ensure timing is computed.
	* src/watcher.c: Remove unused structure member.

2020-04-24  Sergey Poznyakoff  <gray@gnu.org>

	Adjust thread names

	Set thread names (and fix previos incomplete commit.

	* Makefile.am: Restore ACLOCAL_AMFLAGS
	* configure.ac: Restore AC_CONFIG_MACRO_DIR.
	Call AC_USE_SYSTEM_EXTENSIONS and AX_THREAD_NAMES
	* am/ax_thread_names.m4: New file.
	* src/thread_name.c: New file.
	* src/Makefile.am: Add thread_name.c
	* src/wydawca.h (wy_set_cur_thread_name): New proto.
	* src/net.c: Set thread names.
	* src/triplet.c: Likewise.
	* src/wydawca.c: Likewise.

	Use AX_PTHREAD to detect posix thread support

	Fix the gpg2 version requirement.  Document changes to the testsuite

2020-04-23  Sergey Poznyakoff  <gray@gnu.org>

	Add test case

	Remove a left-over global variable

	Rewrite the testsuite.

	Use gpg2 to create the keys, and sign files as necessary.

	* NEWS: Update.
	* doc/wydawca.texi: Update.
	* configure.ac: Detect the presence of GPG version 2.
	* src/cmdline.opt (--single-process): Remove.
	* src/config.c: Remove the "single-process" statement.
	* src/triplet.c (triplet_enqueue): Fix eventual NULL dereference.
	(wy_triplet_wait): Update the WY_STAT_INCOMPLETE_TRIPLETS counter.
	* src/wydawca.c (single_process_option): Remove global.
	* src/wydawca.h (single_process): Remove global.
	* tests/.gitignore: Update.
	* tests/Makefile.am: Update.
	* tests/atlocal.in: Rewrite.
	* tests/chargen.c: New auxiliary tool

	* tests/dist/file: Remove.
	* tests/dist/file.directive.asc: Remove.
	* tests/dist/file.sig: Remove.
	* tests/dist/file12f.directive.asc: Remove.
	* tests/dist/file12t.directive.asc: Reemove.
	* tests/dist/rmsymlink.directive.asc: Remove.
	* tests/dist/symlink.directive.asc: Remove.
	* tests/etc/notify.cfin: Rename to tests/etc/notify.cf

	* tests/etc/Makefile.am: Update.
	* tests/etc/dbgen.sh: New file.
	* tests/etc/keygen.sh: New file.
	* tests/etc/project: New file.
	* tests/etc/pubring.asc: Remove.
	* tests/etc/secring.asc: Remove.
	* tests/etc/wydawca.cfin: Remove.

	* tests/*.at: Rewrite.

	Fix make distcheck

	* tests/unp01.at: Fix GNUPGHOME to point to the directory in the build tree.
	* tests/etc/Makefile.am: Augment DISTCLEANFILES

2020-04-22  Sergey Poznyakoff  <gray@gnu.org>

	Avoid double-checking of the directive files.  Fix triplet expiration.

	* doc/wydawca.texi: Document the default value for file-sweep-time.
	* src/config.c (parse_single_statmask): Remove the invert pointer.
	(parse_statmask): Reflect the above.
	(config_finish): Ensure safe value for file_sweep_time.
	* src/triplet.c (register_file): Initialize the directive_verified
	member.
	(triplet_expired_p): No special handling for ttl==0.
	* src/verify.c (verify_directive_file): Cache the result in
	trp->directive_verified.
	* src/wydawca.c (file_sweep_time): Initialize to DEFAULT_FILE_SWEEP_TIME.
	* src/wydawca.h (DEFAULT_FILE_SWEEP_TIME): New constant.
	(DIRECTIVE_UNCHECKED,DIRECTIVE_GOOD)
	(DIRECTIVE_BAD): New constants.
	(struct wy_triplet): New member: directive_verified.
	* tests/cwdrepl.c: Fix a prematurely closed comment.

2020-04-20  Sergey Poznyakoff  <gray@gnu.org>

	Add missing copyright statements

	Add tests for legacy upload notification interface

	* src/net.c (handle_connection): Ignore user/comment.
	* tests/.gitignore: Add wyclt.
	* tests/wyclt.c: New file.
	* tests/Makefile.am (TESTSUITE_AT): Add new tests.
	* tests/unp-idle.at: New test.
	* tests/unp00.at: New test.
	* tests/unp01.at: New test.
	* tests/testsuite.at (AT_WYDAWCA_DAEMON): Change arguments.
	(AT_WYDAWCA_INOTIFY_DAEMON): New macro.
	Include new tests.

	Minor fixes in the docs

	Rewrite the timer support.

	Timers are kept in a thread-specific array variable.  Spool timers are
	referenced in expansion strings by their fully qualified names, e.g.
	${timer:spool:release:system}.

	* NEWS: Update.
	* doc/wydawca.texi: Document new syntax for the spool timer variables.
	* src/directive.c
	* src/wydawca.h (struct spool): New member: timer_id.
	* tests/upload-dry.at: Filter out certain messages, that can appear
	* src/process.c (spool_count): New global.
	(register_spool): Build spool list in the same order as listed in the
	configuration file.
	(spool_timer_id): New function.
	* src/timer.c: Rewrite using array of struct timer_slot, instead of the
	hash table.
	* src/triplet.c (try_timer_var): Rewrite.
	* src/wydawca.c (stderr_printer): Protect stderr by a mutex.
	in unpredictable order.

2020-04-18  Sergey Poznyakoff  <gray@gnu.org>

	Modify pidfile functions

	Fix statistics gathering.  Display stats at the end of the run in cron mode.

	* src/directive.c (process_directives): Raise the 'destroying' flag
	prior to removing the directive file, in order to avoid the removal
	being caught by the watcher thread.
	* src/timer.c (wydawca_stats_export, wydawca_stats_update): New
	functions.
	* src/triplet.c (triplet_list_lock,triplet_list_unlock): Check for
	NULL pointer.
	(remove_triplet_unlocked): Set the 'destroying' flag.
	(triplet_remove_file): Do nothing if the 'destroying' flag is set.
	(wy_thr_triplet): Call logstats only in the daemon mode. Otherwise
	call wydawca_stats_update.
	* src/wydawca.c (wy_main): Call wydawca_stats_export at the beginning.
	Call logstats before exiting, unless in daemon mode.
	* src/wydawca.h (struct wy_triplet): New member: destroying.
	(wydawca_stats_export,wydawca_stats_update): New protos.

	* tests/check-fail.at: Update.
	* tests/check-notify.at: Update.
	* tests/upl12f.at: Update.

	Remove spool locking

	* NEWS: Document changes.
	* doc/wydawca.texi: Document changes.
	* src/Makefile.am: Remove lock.c
	* src/lock.c: Delete.
	* src/config.c: Remove the locking statement.
	* tests/etc/wydawca.cfin: Likewise.
	* src/wydawca.c: Check pidfile before startup, unless in dry-run mode.

	* src/wydawca.h: Remove prototypes of locking functions
	* src/process.c (scan_spool_unlocked): Merge into
	scan_spool.
	* src/timer.c (struct timer_slot): Use reference counter instead
	of timer state

	Minor fixes.

	* src/timer.c (struct timer_slot): New member: state.
	(timer_start,timer_stop): Keep track of the timer state.
	* src/triplet.c: Remove unneeded function.

2020-04-17  Sergey Poznyakoff  <gray@gnu.org>

	Improve configure.ac

	* configure.ac: Check for librt and gpgme_set_offline.

	Update the docs

	Limit number of simultaneous tcpmux connections. Impose idle connection timeouts.

	* src/config.c: New statements: max-connections and idle-timeout
	* src/net.c (max_connections,idle_timeout): New globals.
	(handle_connection): Take single FILE* as argument.
	(connection_start,connection_stop): New functions.
	(wy_thr_tcpmux,wy_thr_connection_watcher): New functions.
	(wy_thr_listen): Start wy_thr_connection_watcher thread if tcpmux
	listener is enabled.
	Start a separate thread to process each incoming connection.
	* src/wydawca.h (max_connections,idle_timeout): New externs.
	(wy_thr_tcpmux,wy_thr_connection_watcher): New protos.

	Minor changes

2020-04-16  Sergey Poznyakoff  <gray@gnu.org>

	Rewrite as a multi-threaded program.

	* NEWS: Update.
	* configure.ac: Version 3.1.95
	* src/Makefile.am (wydawca_SOURCES): Remove job.c
	(LDADD): Link with libpthread.
	* src/job.c: Remove.
	* src/config.c: Remove the wakeup-interval statement.
	* src/net.c (wydawca_listener): Rewrite as a thread function
	wy_thr_listen.
	* src/timer.c (timer_get): Use thread-specific storage.
	(timer_get_count): Remove.
	* src/triplet.c: Rewrite using multi-thread model.
	* src/wydawca.c: Likewise.
	* src/wydawca.h: Update.
	* tests/check-fail.at: Update expected output.
	* tests/check-notify.at: Likewise.
	* tests/inotify-ok.at: Likewise.
	* tests/inotify-rmsymlink.at: Likewise.
	* tests/inotify-symlink.at: Likewise.
	* tests/inotify-unatt00.at: Likewise.
	* tests/inotify-unatt01.at: Likewise.
	* tests/upl12f.at: Likewise.
	* tests/upload-dry.at: Likewise.
	`

2020-04-15  Sergey Poznyakoff  <gray@gnu.org>

	Use job scheduler when processing all spools.

	* src/job.c (job_printable): Improve job identification.
	(wydawca_scanner): Don't log statistics in single process mode.
	(job_queue_wait): New function.
	* src/net.c (wydawca_listener): Move the call to job_init to main.
	* src/process.c (scan_spool_unlocked): Enqueue the triplet.
	Don't call spool_commit_triplets
	* src/triplet.c (remove_triplet): Omit checks in dry-run mode.
	(triplet_processor,spool_commit_triplets)
	(count_collected_triplets): Remove.
	* src/wydawca.c (main): Call job_queue_wait if not daemon.
	* tests/inotify-unatt01.at: Update expected output.
	* tests/upload-dry.at: Likewise.

	Update the manual

	Rewrite GPGME support

	* src/Makefile.am: Remove pushd.c
	* src/gpg.c: Rewrite.
	* src/pushd.c: Remove.
	* src/triplet.c (remove_triplet): Release the gpgme context.
	* src/wydawca.h: Include gpgme.h
	(struct wy_triplet): New member: gpgme_ctx;
	(triplet_gpgme_ctx_release): New proto.

	* tests/pushck.c: Remove.
	* tests/pushdir.at: Remove.
	* tests/Makefile.am: Remove pushck
	* tests/.gitignore: Likewise.
	* tests/testsuite.at: Remove pushdir test.

	Replace UPDATE_STATS macro with inline function increase_stat_counter

	When processing spool requests, handle each completed triplet in spool.

	Previously wydawca used to take optional second parameter - a list of
	submitter UIDs.  If given this list, it would process only those triplets
	that had been uploaded by one of these UIDs.  This proved to be
	unnecessary.

	The same change is applied to the notification protocol.  Only the spool
	name is required.  The second word in the request (user name) is now
	silently ignored.

	* src/wydawca.h (struct wy_triplet): Remove const qualifier from the
	spool member.  Remove jq_prev and jq_next pointers.
	(struct job_spool_id): Remove.
	(job_schedule_spool): Change signature.
	* src/job.c (struct job): Replace job_spool with a pointer to
	spool.
	(triplet_jq_unlink,jq_clear): Remove.
	(job_printable): Change formatting of JOB_SPOOL jobs.
	(job_locate): Update.
	(wydawca_scanner): Update.
	* src/net.c (handle_connection): Ignore second word in the request.
	* src/process.c (spool_add_new_file): Change signature.  UIDs are
	no longer needed.
	Return a pointer to the affected triplet.
	(scan_spool): Change signature.
	* src/triplet.c (register_file): Return pointer to the affected triplet.
	(check_triplet_state): Remove the noauth parameter.
	(triplet_enqueue): New function.
	(triplet_commit): New function.
	(spool_commit_triplets): Remove the tplist parameter.  Process all
	complete triplets in the spool.
	(link_processable_triplets): Remove.
	* src/verify.c (verify_directive_file): Remove the noauth parameter.
	* src/watcher.c (process_event): Enqueue created triplets.
	* src/wydawca.c (main): Don't take any UID arguments.
	* tests/inotify-ok.at: The version statement is printed once. Update
	the expected output.
	* tests/inotify-rmsymlink.at: Likewise.
	* tests/inotify-symlink.at: Likewise.
	* tests/inotify-unatt01.at: Likewise.

2020-04-14  Sergey Poznyakoff  <gray@gnu.org.ua>

	testsuite: pass exactly 1 argument to the readlink utility

2020-04-14  Sergey Poznyakoff  <gray@gnu.org>

	testsuite: test whether unattended uploads are processed at daemon start up

2020-04-13  Sergey Poznyakoff  <gray@gnu.org>

	Rewrite diskio function so as not to assume any particular cwd

	* src/backup.c (get_backup_suffix)
	(find_backup_file_name): Get directory descriptor as first argument.
	* src/diskio.c: Rewrite using *at() functions.
	* src/gpg.c (rmdir_r): Silently skip ENOENT.
	(verify_detached_signature): push_dir/pop_dir.
	* src/triplet.c: Don't change to spool->source_dir.  Underlying
	functions don't assume any specific cwd.
	* src/wydawca.h (find_backup_file_name)
	(create_hierarchy): Change signatures. All uses changed.

	* tests/Makefile.am: Add new tests.
	* tests/testsuite.at: Likewise.
	(AT_WYDAWCA_DAEMON): Take additional argument.
	* tests/inotify-rmsymlink.at: New test.
	* tests/inotify-symlink.at: New test.
	* tests/rmsymlink00.at: New test.
	* tests/symlink00.at: New test.
	* tests/symlink01.at: New test.
	* tests/dist/rmsymlink.directive.asc: New directive file.
	* tests/dist/symlink.directive.asc: New directive file.

	Fix triplet processing in daemon mode.

	* src/watcher.c (fopenat_ro): New function.
	* src/verify.c (fill_project_name): Use fopenat_ro.
	* src/gpg.c (recursive_rmdir): return silently if the directory
	does not exist.
	(verify_directive_signature): Use fopenat_ro.
	* src/job.c: Change state definitions from bitmask to enum.
	* src/triplet.c (triplet_processor): A pointer to the spool is passed
	in proc_data.  Process only triplets with this spool.
	(triplet_processor): Modify accordingly.

	Facilitate writing tests for daemon mode.

	* src/wydawca.c (cron_option,daemon_mode): Remove.
	(wy_mode, wy_mode_option): New variables.
	(main): Use wy_mode to determine operating mode.
	* src/wydawca.h (daemon_mode): Remove extern.
	(wy_mode): New extern.
	* src/cmdline.opt: New option --daemon.
	* src/config.c: Change handling of the "daemon" statement.
	* src/net.c: Test hook: if WYDAWCA_NOTIFY_PARENT=1 send SIGUSR1
	to parent after setting up the listener.
	* doc/wydawca.texi: Describe the --daemon option.

	Testsuite:

	  1. Place source and destination directories in the working directory
	     for each particular test.  Thus the spool cleanup function becomes
	     unnecessary.
	  2. Add tests for wydawca daemon mode (inotify).

	* configure.ac (WY_INOTIFY): New substitution variable for use in
	testsuite.
	* tests/wyasync.c: New source.  Auxiliary program to test wydawca
	daemon mode.
	* tests/wyinit.c: New source. Extract source and destination directory
	names from the wydawca configuration file and create missing directories.
	* tests/Makefile.am: Build wyasync and wyinit.
	(TESTSUITE_AT): Add inotify-ok.at
	* tests/atlocal.in (WY_INOTIFY): New variable.
	(wydawca_init_testdirs): Remove.
	(wydawca_clean_testdirs): Remove.
	(wydawca_config): Call wyinit to initialize spools and
	destinatiuon directories.
	(wydawca_upload): Change source directory.
	* tests/etc/mailstats.cfin: Put mail.out in CWD.
	* tests/etc/notify.cfin: Likewise.
	* tests/etc/wydawca.cfin: Add pidfile statement in case wydawca
	is run as daemon.
	Place all source and destination directories in CWD.
	* tests/testsuite.at (AT_WYDAWCA_DAEMON): New macro.
	* tests/inotify-ok.at: New test.
	* tests/check-fail.at: Update.
	* tests/check-notify.at: Update.
	* tests/check-ok.at: Update.
	* tests/mailstats.at: Update.
	* tests/notify-upl.at: Update.
	* tests/upl11.at: Update.
	* tests/upl12f.at: Update.
	* tests/upl12t.at: Update.
	* tests/upload-dry.at: Update.
	* tests/upload.at: Update.

2020-04-10  Sergey Poznyakoff  <gray@gnu.org>

	Change indentation to improve readability.

	Avoid unnecessary directory changes.

	* src/config.c (cb_spool): Initialize spool->source_fd.
	* src/process.c (spool_add_new_file): Remove.
	(spool_cwd_add_new_file): Rename to spool_add_new_file.
	Use fstatat instead of stat.
	(scan_spool_unlocked): Don't change to spool->source_dir.
	* src/triplet.c (remove_triplet): Don't change cwd.
	Use fstatat to check for existence and unlinkat to remove
	the file.
	(spool_commit_triplets): Change to the spool source directory here.
	* src/wydawca.h: Define O_SEARCH to 0 if not defined.
	(struct spool): New member source_fd.

	* tests/check-fail.at: Update expected output.
	* tests/check-notify.at: Likewise.
	* tests/upl12f.at: Likewise.

	Scan configured spools before entering daemon loop.

	This ensures that eventual submissions that may have occurred
	during daemon restarts will be duly processed.

	* src/wydawca.h (fake_spool, inotify_spool): Remove pseudo-spools.
	(dictionaries_close): New proto.
	(job_schedule): New proto.
	(job_schedule_all, job_schedule_triplet)
	(job_schedule_spool): New inline functions.
	* src/job.c (struct job): New member "type".
	Move spool and uid to union v.  Each job can have
	either triplet list or (spool,uid) pair, but not both.
	(fake_spool, inotify_spool): Remove.
	New member "printable".
	(job_locate): Rewrite.
	(wydawca_scanner): Rewrite.
	(job_destroy): New function.
	(schedule_job): Remove.
	(job_schedule): New function.
	(job_printable): New function.
	(all functions): Use job_printable to identify jobs in diagnostic
	messages.
	* src/net.c (handle_connection): Use job_schedule_spool or
	job_schedule_all depending on the request.
	* src/process.c (dictionaries_close): New function.
	(scan_all_spools): Don't close dictionaries.
	* src/watcher.c (process_event): Initiate the job using
	job_schedule_triplet().
	* src/wydawca.c (main): Don't allow extra arguments in daemon mode.
	Call scan_all_spools before entering wydawca_daemon to register
	existing files.
	Close dictionaries before closing modules.

2020-04-09  Sergey Poznyakoff  <gray@gnu.org>

	Minor documentation change

	Change configuration file name to wydawca.conf

	Configuration files in the testsuite use the ".cf" suffix.

2020-04-09  Sergey Poznyakoff  <gray@gnu.org.ua>

	Bugfixes.

	* src/triplet.c (triplet_list_unlink): Avoid accidentally clearing
	the list.
	(hash_triplet_compare): Fix return value.
	(register_file): Don't attempt to unlink a newly installed file.
	(remove_triplet): Change to the spool source directory.

2020-03-13  Sergey Poznyakoff  <gray@gnu.org>

	Minor change

	Version 3.1

	Fix .gitignore files

	Bugfixes

	* Makefile.am (ACLOCAL_AMFLAGS): Remove am
	* am/mailutils.m4: Remove.
	* src/gpg.c (recursive_rmdir): Don't bail out on ENOENT.

2020-03-13  Sergey Poznyakoff  <gray@gnu.org.ua>

	Fix the push/pop dir test.

	The test failed on machines where $(pwd -P) != $(pwd -L).

	* tests/Makefile.am: Add cwdrepl.c
	* tests/cwdrepl.c: New file.
	* tests/pushdir.at: Use cwdrepl to filter the output.

2019-07-24  Sergey Poznyakoff  <gray@gnu.org>

	Use wordsplit to expand variables in strings.

	* NEWS: Raise version number.
	* configure.ac: Link wydawca.h to include/wydawca
	Raise version number
	* doc/wydawca.texi: Document changes.
	* etc/wydawca.rc: Fix the syntax.
	* grecs: Upgrace.
	* include/wydawca/wydawca.h (wy_vlog): New proto.
	(wy_log, wy_dbg): Format is const char *.
	(wy_triplet_t): Change typedef.
	(wy_metadef): Remove struct.
	(wy_vardef): New struct.
	(wy_triplet_expand_param)
	(wy_expand_copy): New protos.
	* modules/logstat/mod_logstat.c: Update.
	* modules/mailutils/Makefile.am (AM_CPPFLAGS): Modify,
	* modules/mailutils/mod_mailutils.c: Update.
	* src/Makefile.am (wydawca_SOURCES): Remove meta.c
	* src/dictionary.c: Fix comment.
	* src/directive.c (directive_get_value): Triplet pointer is const.
	* src/meta.c: Remove.
	* src/timer.c: (timer_fill_meta)
	(timer_free_meta): Remove.
	* src/triplet.c: Use wordsplit for expansions.
	* src/wydawca.c (wy_vlog): New function.
	(wy_stat_expansion): New function.
	* src/wydawca.h: Remove metadef protos.
	* tests/etc/notify.rcin: Update variable reference syntax.

2019-07-22  Sergey Poznyakoff  <gray@gnu.org>

	Update copyright years in version output (better late, than never)

	Verion 3.0

	Install default pp-setup file from grecs

	Document directory setup statements.

	See commits f338532e, dd9d9c12, and af538cc2.

	Finish mod_logstat implementation. Document it.

	* doc/wydawca.texi: Document mod_logstat.
	* include/wydawca/wydawca.h (wy_ev_statistics): Rename to
	wy_ev_finish. All uses changed.
	(wydawca_stat): New enum (from src/wydawca.h)
	(WY_STAT_MASK,WY_STAT_MASK_NONE)
	(WY_STAT_MASK_ALL): New macros.
	All uses changed.
	* modules/logstat/mod_logstat.c (stat_mask): Default to WY_STAT_MASK_ALL.
	(wy_notify): Provide default output.

	Document the module subsystem

2019-07-20  Sergey Poznyakoff  <gray@gnu.org>

	Bugfix

	* src/diskio.c (dir_test_url): Allow for ENOENT.

	Create backup storage directories.

	Any spool directories are actually created only if

	 create-directories yes;

	appears in the configuration file.  The global
	directory-mode and directory-owner statements provide
	global defaults for the directory metadata.

	These two keywords can also appear within a spool.archive
	block.

	* src/backup.c (split_filename): Change to extern.
	* src/config.c: Global directory-mode and directory-owner
	statements.
	New global statement create-directories.
	spool.archive.directory-mode and directory-owner statements.
	(cb_user,cb_supp_groups): Set wydawca_runas.
	(create_spool_dir): Don't mkdir unless create-directories was
	set. Honor wy_dry_run. Don't bail out on EPERM wheb uid is not 0.
	(create_spool_dirs): Compute effective metadata. Create archive
	directories.
	* src/diskio.c (create_hierarchy): Fix stack overflow if baselen==0.
	* src/wydawca.c (wydawca_runas): New global.
	(main): Intitialize wydawca_uid and wydawca_gid to current values.
	Run wydawca_userprivs only if wydawca_runas is set.
	* src/wydawca.h (archive_descr) <metadata>: New member.
	(wydawca_runas): New extern.
	* tests/etc/wydawca.rcin: Add create-directories statement.
	* tests/upload-dry.at: Fix expected output.

2019-07-19  Sergey Poznyakoff  <gray@gnu.org>

	Create destination directories if necessary

	* src/config.c (spool_kw): New statements: destination-mode and
	destination-owner.  See the description of the similar source-*
	statements in the previous commit.
	* src/diskio.c (create_hierarchy): First argument is const.
	* src/vtab.c (wy_url) <local>: New member.
	(wy_url_is_local): New function.
	* src/wydawca.h (spool) <dest_metadata>: New member.
	(create_hierarchy): Change signature.

	Create source directories if necessary

	Missing source directories are created if at least one of the
	source-mode or source-owner statements are present.  If the directory
	already exists, wydawca makes sure its ownership and mode matches those
	requested by these statements.  The syntax of the two new statements
	is:

	   source-mode OCTAL;
	   source-owner USER GROUP;

	USER and GROUP can be either symbolic user and group names or numeric
	UID and GID.  In the latter case, the number can be preceded by a
	plus sign.

2019-07-18  Sergey Poznyakoff  <gray@gnu.org>

	Fix unnecessary code duplication

	Use grecs_txtacc.

2019-07-16  Sergey Poznyakoff  <gray@gnu.org>

	Bugfix

	* src/config.c: Case-insensitive comparison for syslog facility
	and priority names.

	Bugfix

	* src/config.c: Use GRECS_CONST with string types.

	Upgrade grecs

	Fix testsuite when run as root

	More fixes in testsuite

	* tests/atlocal.in (wydawca_expandmeta): Use -e option.

	Follow-up to the previous commit

	* tests/notify-upl.at: Replace a left-over usage of @USER@.

	Testsuite fixes

	* tests/check-notify.at: Uploader name is fixed. Remove erroneous
	use of @USER@.
	* tests/notify-upl.at: Likewise.

	Bugfix

	* src/wydawca.c (main): logging to stderr does not depend on whether
	stdin is a tty or not.

2019-07-15  Sergey Poznyakoff  <gray@gnu.org>

	Switch to grecs eb66a000

	Fix version number in NEWS

	Version 2.99.92

2017-11-11  Sergey Poznyakoff  <gray@gnu.org>

	Fix build with mailutils 3.4

	* Makefile.am (ACLOCAL_AMFLAGS): Add am.
	* NEWS: Update.
	* am/mailutils.m4: New file. A fixed version of upstream mailutils.m4
	* configure.ac: Require mailutils 3.3. Raise patchlevel.

	* tests/nullmail.c: New file.
	* tests/.gitignore: Add nullmail
	* tests/Makefile.am: Build nullmail

	* tests/etc/nullmail: Remove
	* tests/etc/Makefile.am: Remove nullmail script.

	* tests/atlocal.in (WY_TESTDIR): New variable.
	* tests/check-notify.at: Use new nullmail tool. Update expected
	output.
	* tests/mailstats.at: Likewise.
	* tests/notify-upl.at: Likewise.
	* tests/etc/mailstats.rcin: Fix mailer command line.
	* tests/etc/notify.rcin: Likewise.

2017-11-10  Sergey Poznyakoff  <gray@gnu.org>

	Minor fixes

2017-01-02  Sergey Poznyakoff  <gray@gnu.org>

	Happy GNU Year

2015-04-23  Sergey Poznyakoff  <gray@gnu.org.ua>

	Fix doc generation.

	Default Config file applied to all output formats, which is wrong.
	Use a dedicated configuration file for html output formats, and
	defaults for the rest.

	* doc/Makefile.am (GENDOCS): Add html-specific configuration file.
	* doc/Config: Rename to doc/html.init (with changes).
	* doc/wydawca.texi: Fix cross-reference.

2015-03-01  Sergey Poznyakoff  <gray@gnu.org>

	Switch to Texinfo 5.0

	* doc/Config: Rewrite.
	* doc/Makefile.am: Use Makeinfo 5 instead of texi2htm
	* doc/gendocs_template: Ps is not built
	* grecs: Upgrade.
	* imprimatur: Upgrade.

2014-06-13  Sergey Poznyakoff  <gray@gnu.org.ua>

	Bugfixes.

	* modules/mailutils/mod_mailutils.c (wy_config): Initialize allocated
	struct mailevt with 0s.
	* src/module.c (conf_notification_modules): Avoid coredump if
	np->modnode == NULL.

	* grecs: Upgrade.
	* tests/notify-upl.at: Add a unique keyword.

2014-06-13  Sergey Poznyakoff  <gray@gnu.org>

	Bugfixes.

	* configure.ac: Use subdir-objects Automake option.
	* doc/Config: Put search form into the menu.
	* doc/Makefile.am (check-sub-config): Fix sed expression.

2013-12-17  Sergey Poznyakoff  <gray@gnu.org>

	Upgrade grecs

2013-03-13  Sergey Poznyakoff  <gray@gnu.org.ua>

	Bugfixes. Add a stub for new module.

	* include/wydawca/wydawca.h (WY_EXPORT): Add an internal
	prefix. That's a stupid lossage: having not found the
	composed name (modname_LTX_sym), libtool tries to look up
	sym itself, which makes it impossible to use names like
	"open", etc.
	* src/module.c (resolve_sym): Reflect the above. Take an
	extra argument specifying whether the symbol is mandatory.
	(modules_load): Configure modules used in default_notification
	list.
	* src/config (cb_load_path): New callback to ensure that
	multiple module-path* statements accumulate.

	* modules/logstat/mod_logstat.c: New file.
	* modules/logstat/Makefile: New file.
	* configure.ac: Build modules/logstat/Makefile.
	* modules/Makefile.am (SUBDIRS): Add logstat.

2013-03-12  Sergey Poznyakoff  <gray@gnu.org.ua>

	Namespace normalization (3)

	Use WY_ prefix for configuration macros & variables.

	Minor change.

	* doc/wydawca.texi: Document the use of -d together with -t.
	* src/update-2.0.awk: Remove.
	* src/Makefile.am: Update.

	Upgrade grecs.

	New informative options.

	* modules/mailutils/mod_mailutils.c (wy_help): Implement
	module help.
	* src/wydawca.c (main): Using -t and -d options together produces a
	print out of the configuration parse tree. Additional -d
	option includes source file locations.
	* src/module.c (module_help): New function.
	* src/module.h (module_help): New proto.

	Raise version number to 2.99.90

	Namespace normalization (2).  Provide installable headers.

	* Makefile.am (SUBDIRS): Add include.
	* configure.ac: Build include/*/Makefile
	Set-up grecs as a shared convenience library. Install
	its headers.
	* include/Makefile.am: New file.
	* include/wydawca/Makefile.am: New file.
	* include/wydawca/cfg.h: New file.
	* include/wydawca/wydawca.h: New file.
	* modules/mailutils/Makefile.am (AM_CPPFLAGS): Add include/
	* src/Makefile.am (LDADD): Use @GRECS_LDADD@
	(AM_CPPFLAGS): Add include/.
	* tests/Makefile.am: Likewise.
	* src/wydawca.h: Include wydawca/wydawca.h.
	(__cat2__, __cat3__): Move to installable header and rename.
	(struct wy_user): Move to installable header.
	(struct file_triplet): Rename to wy_triplet. All uses changed.
	(enum notification_event): Rename to wy_event and move to
	installable header.
	(struct metadef): Rename to wy_metadef and move to
	installable header.
	(dry_run_mode): Rename to wy_dry_run and move to
	installable header.
	(wydawca_gpg_homedir): Rename to wy_gpg_homedir and move to
	installable header.
	(wy_version, wy_debug_level, wy_log_to_stderr)
	(wy_log_facility, wy_syslog_tag)
	(wy_log,wy_dbg): Move to installable header.

	* modules/mailutils/mod_mailutils.c: Update.
	* src/cmdline.opt
	* src/config.c
	* src/directive.c
	* src/diskio.c
	* src/event.c
	* src/gpg.c
	* src/job.c
	* src/meta.c
	* src/module.c
	* src/null.c
	* src/timer.c
	* src/triplet.c
	* src/verify.c
	* src/vtab.c
	* src/watcher.c
	* src/wydawca.c

	Improve triplet API.

	* src/wydawca.h (uploader_info): Rename to wy_user.
	(file_triplet) <uploader_count>: Remove.
	<admin_list>: New member.
	(triplet_get_uploaders,triplet_get_uploader)
	(triplet_get_admins): New protos.
	* src/triplet.c (wy_user_create)
	(wy_userlist_free): New static functions.
	(hash_triplet_free): Use wy_userlist_free.
	(triplet_get_uploaders,triplet_get_uploader)
	(triplet_get_admins): New functions.
	* src/verify.c (verify_directive_file): Rewrite using
	triplet_get_uploaders.
	* src/gpg.c (verify_directive_signature): Call triplet_get_uploaders
	to initialize the uploaders list.

	* modules/mailutils/mod_mailutils.c (get_recipient): Remove.
	(get_owner_address): New function. All callers updated.
	Remove useless const qualifiers.

	Enable notification tests conditionally.

	The tests are enabled only if the mailutils module is built.

	* configure.ac (WD_MAILUTILS): New subst variable.
	* tests/atlocal.in (WD_MAILUTILS): New variable.
	* tests/testsuite.at (AT_MAILUTILS_PREREQ): New macro.
	* tests/check-notify.at: Skip the test if mailutils is not configured.
	* tests/mailstats.at: Likewise.
	* tests/notify-upl.at: Likewise.

	* modules/mailutils/mod_mailutils.c (get_uploader_email): Simplify
	the signature.
	(expand_email_admin,expand_email_owner): Make static.
	* src/wydawca.h (expand_email_admin,expand_email_owner): Remove protos.

2013-03-11  Sergey Poznyakoff  <gray@gnu.org.ua>

	Follow up to 87602f54.

	Fix minor bugs.  Update the testsuite.  All tests pass now.

	* modules/mailutils/mod_mailutils.c (cb_statistics): Remove. Use
	wy_cb_statistics.
	(expand_email_admin, expand_email_owner): Add missing functions.
	* src/config.c (wy_cb_statistics): New function.
	(wydawca_kw): Restore "statistics" statement.
	* src/dictionary.c (dictionary_lookup): Fix debug levels.
	* src/wydawca.h (wy_cb_statistics): New proto.
	* tests/atlocal.in (wydawca_expandmeta): Expand @WD_MODDIR@
	* tests/check-notify.at: Create notify.rc from notify.rcin
	* tests/notify-upl.at: Likewise.
	* tests/mailstats.at: Likewise.
	* tests/upload-dry.at: Fix the expected output.

	* tests/etc/mailstats.rc: Rename to tests/etc/mailstats.rcin.
	* tests/etc/notify.rc: Rename to tests/etc/notify.rcin.
	* tests/etc/Makefile.am: Update.
	* tests/etc/wydawca.rcin: Update to the new syntax.

	Namespace normalization (1).

	syslog_tag -> wy_syslog_tag
	log_facility -> wy_log_facility
	log_to_stderr -> wy_log_to_stderr

	Put back admin and owner address expansions.

	* src/meta.c (metadef_join): New function.
	* src/triplet.c (triplet_expand_param): Extra argument supplies
	an additional metadef to use together with triplet_meta.
	* src/wydawca.h (triplet_expand_param): Change signature.
	* modules/mailutils/mod_mailutils.c (t_notify): Provide
	extra metadef for admin and owner addresses.

2013-03-10  Sergey Poznyakoff  <gray@gnu.org.ua>

	Provide a convenient debugging macro.

	Rename logmsg to wy_log.

	Replace mail notification with module event notification framework.

	The new framework is to be general-purpose; the mail notification
	is implemented as a module.

	Althoug the program is operational, the change is not completed yet.
	In particular, the docs are out of date and the tests will mostly
	fail.

	* .gitignore: Update.
	* Makefile.am (SUBDIRS): Add modules.
	* configure.ac: Mailutils is now optional (though highly
	recommended).
	(AC_CONFIG_FILES): Build modules/Makefile and modules/mailutils/Makefile.
	* modules/Makefile.am: New file.
	* modules/mailutils/Makefile.am: New file.
	* modules/mailutils/mod_mailutils.c: New file.
	* src/mail.c: Remove.
	* src/mail.h: Remove.
	* src/event.c: New file.
	* src/Makefile.am (wydawca_SOURCES): Update.
	(LDADD): Remove MAILUTILS_LIBS.
	* src/config.c: Remove mail-related configuration statements.
	Add module-related ones instead.
	* src/wydawca.h (notification_event) <ev_statistics>: New event.
	(notification_target): Remove.
	(notification) <tgt,sign_keys,msg>: Remove.
	<statmask>: New member.
	(register_message_template): Remove.
	(notify_stats,notify_flush): New protos.
	(notification_target_str): Remove.
	(format_fn): Remove.
	(module) <next,modinit,open>
	<flush,close>: New members.
	<notify>: Change signature.
	(modules_close, module_set_init)
	(module_flush): New protos.
	(debug_level): Rename to wy_debug_level. All uses changed.
	(wy_version): New extern.
	(admin_stat_message,admin_stat_sign_key): Remove.
	(default_notification): New global.
	(triplet_expand_param,triplet_expand_dictionary_query): The
	file_triplet argument is const pointer.
	(assert_string_arg): Rename to wy_assert_string_arg.
	* src/wydawca.c (debug_level): Rename to wy_debug_level.
	(wy_version): New global.
	(logstats): Call notify_stats.
	(main): Call modules_close.
	* src/module.c: Keep modules in a singly-linked list instead
	of a symtab.
	Provide new functions.
	* src/net.c: Update.
	* src/dictionary.c: Update.
	* src/directive.c: Update.
	* src/diskio.c: Update.
	* src/exec.c: Update.
	* src/gpg.c: Update.
	* src/job.c (wydawca_scanner): Call notify_flush.
	* src/null.c: Update.
	* src/process.c: Update.
	* src/sql.c: Update.
	* src/tcpwrap.c: Update.
	* src/triplet.c: Update.
	* src/verify.c: Update.
	* src/watcher.c: Update.

2013-03-06  Sergey Poznyakoff  <gray@gnu.org.ua>

	Replace mu_url_t with a custom URL.

2013-02-26  Sergey Poznyakoff  <gray@gnu.org.ua>

	Introduce loadable modules.

	* .gitignore: Update.
	* configure.ac: Require libtool
	Require Grecs tree-api.
	* Makefile.am: Incorporate libtool
	* bootstrap: Create m4 if it does not exist.
	* doc/Makefile.am: Use texi2html
	* grecs: Upgrade
	* src/module.c: New file.
	* src/Makefile.am (wydawca_SOURCES): Add module.c
	* src/config.c: Switch callbacks to tree-api.
	Add statements for working with modules:
	module-load-path, module-prepend-load-path and
	module in the global scope and module and
	module-config in notify-event blocks.
	* src/mail.c (do_notify): Call module_notify if a module
	is configured.
	* src/tcpwrap.c: Switch callbacks to tree-api.
	* src/wydawca.c (main): Load modules.
	* src/wydawca.h (notification) <modname>
	<modcfg,modnode>: New members.
	(module): New struct.
	(cb_module,modules_load,module_notify): New functions.
	(module_load_path)
	(module_prepend_load_path): New globals.

2013-02-04  Sergey Poznyakoff  <gray@gnu.org.ua>

	Avoid reusing already freed data.

	* src/job.c (procspool): Take a pointer to the triplet pointer
	as a closure data. Return immediately if it is NULL.
	(wydawca_scanner): Pass a pointer in the second argument in
	call to for_each_spool.

2013-01-01  Sergey Poznyakoff  <gray@gnu.org.ua>

	Avoid processing same triplet twice.

	* src/wydawca.h (file_triplet) <jq_prev,jq_next,job>: New members.
	(spool_commit_triplets,schedule_job): Update signature.
	(count_processable_triplets): Remove.
	(link_processable_triplets): New proto.
	(remove_triplet): New proto.
	(triplet_jq_unlink): New proto.

	* src/job.c (job) <triplet_list>: New member.
	(triplet_jq_unlink,jq_clear): New functions.
	(procspool): Create and stop spool timers.
	(wydawca_scanner): Call spool_create_timers.
	(schedule_job): Additional argument specifies triplets
	to process.
	Initialize job->triplet_list;
	(job_queue_runner): Call jq_clear.
	* src/net.c (handle_connection): Update call to
	schedule_job.
	* src/process.c (spool_cwd_add_new_file): Update call to
	spool_commit_triplets.
	* src/triplet.c (remove_triplet): Now extern. Takes two args.
	All uses updated.
	(spool_commit_triplets): Additional argument specifies triplets
	to process.
	(count_processable_triplets): Remove.
	(link_processable_triplets): New function.
	* src/watcher.c: Use link_processable_triplets to obtain a
	doubly-linked list of triplets to process. Pass it to
	schedule_job.

	Version 2.2. Happy GNU Year.

	Minor changes.

	Update copyright years. Switch to a familiar style.

2012-12-30  Sergey Poznyakoff  <gray@gnu.org.ua>

	Upgrade grecs.

	Check returns from pipe, dup2 and chmod. Don't use obsolete MU functions.

2012-12-29  Sergey Poznyakoff  <gray@gnu.org.ua>

	Remove unnecessary virtual function.

	The source_dir of a spool always refers to a directory on a file system,
	so the get_path method is unnecessary and is removed.

	Document the inotify support.

	Use AM_CPPFLAGS instead of the INCLUDES in Makefiles.

2012-12-24  Sergey Poznyakoff  <gray@gnu.org.ua>

	Improve triplet queue handling.

	Remove the expired and invalid triplets in the master process.

	* src/job.c (job_queue_runner): Take estimated minimal
	interval as an argument. Set timer even if no wake-up
	is scheduled.
	* src/net.c: Call triplet_sweep to sweep off expired
	triplets and estimate minimal timeout for job_queue_runner.
	* src/triplet.c: Link all registered triplets into a doubly-
	linked list ordered by the triplet age, in descending order.
	Use that list to estimate minimal timeout.
	(triplet_list): New variable.
	(triplet_timestamp, triplet_ttl)
	(triplet_list_unlink,triplet_list_insert_before)
	(triplet_list_ordered_insert): New static functions.
	(register_file): Insert triplet into the list.
	(triplet_expired_p): Take one argument. Obtain the ttl
	from the associated spool. Fix condition.
	(remove_triplet): Remove triplet from the list and symtab.
	(triplet_sweep): New function.
	(triplet_counter): Remove bad and expired triplets.
	(triplet_remove_file): Call remove_triplet.
	* src/wydawca.h (file_triplet) <next,prev>: New members.
	(triplet_sweep): New proto.
	(job_queue_runner): Change signature.

2012-12-23  Sergey Poznyakoff  <gray@gnu.org.ua>

	Fix memory leaks, provide config statements for disabling inotify.

	* src/config.c: New statement "inotify" (global and
	spool-specific).
	* src/gpg.c (gpg_verify_signature): Free key when
	no longer needed.
	(verify_directive_signature): Fix memory leak.
	* src/job.c (job_queue_runner): Free the unlinked job.
	* src/triplet.c (triplet_lookup): Free key.name.
	* src/verify.c (fill_project_name): Return immediately if
	trp->blurb is not null.
	* src/watcher.c (create_watcher): Ignore spool if its
	inotify_enable is false.
	(watcher_init): Return immediately if inotify_enable is
	false.
	* src/wydawca.c (inotify_enable): New global.
	* src/wydawca.h: Likewise.

2012-12-22  Sergey Poznyakoff  <gray@gnu.org.ua>

	Implement inotify support.

	* configure.ac: New option --with-inotify.
	Bye default, use inotify if it is present.
	* src/watcher.c: New file. Implements inotify watcher.
	* src/Makefile.am [COND_INOTIFY] (wydawca_SOURCES): Add watcher.c
	* src/diskio.c (dir_get_path): New function.
	* src/job.c (job) <spool>: Remove const qualifier. All uses changed.
	(inotify_spool): New pseudo-spool.
	(fake_spool): Remove static qualifier.
	(wydawca_scanner): Support for inotify spools.
	* src/net.c (open_listener): Don't exit if the listener
	address is not set.
	(wydawca_listener): Listen on the listener socket and
	on the inotify descriptor. If none is set, bail out.
	* src/process.c (for_each_spool)
	(file_info_cleanup)
	(spool_cwd_add_new_file,spool_add_new_file): New functions.
	(scan_spool_unlocked): Use spool_cwd_add_new_file.
	Don't initialize dictionaries here: it will be done in
	spool_commit_triplets.
	(spool_open_dictionaries): New function.
	(close_dictionaries): Rename to spool_close_dictionaries.
	Clear dict_inited.
	* src/triplet.c (hash_triplet_compare): Compare spools as well.
	(register_file): Likewise.
	(triplet_lookup): New function.
	(check_triplet_state): New argument: noauth. All uses updated.
	(enumerate_triplets): Rename to spool_commit_triplets.
	Call spool_open_dictionaries.
	(count_processable_triplets,triplet_remove_file): New functions.
	* src/verify.c (verify_directive_file): New argument: noauth.
	All uses updated.
	* src/vtab.c (reg): Initialize get_path member.
	(get_path): New function.
	* src/wydawca.c (main): Set print_version_hook.
	* src/wydawca.h (virt_tab) <get_path>: New method.
	(spool) <dict_inited>: New member.
	(fake_spool, inotify_spool): New externs.
	(spool_add_new_file, spool_cwd_add_new_file)
	(spool_open_dictionaries, spool_close_dictionaries)
	(for_each_spool, count_processable_triplets)
	(triplet_remove_file, get_path): New protos.
	(enumerate_triplets): Rename to spool_commit_triplets.
	(verify_directive_file): Take two arguments.

2012-07-15  Sergey Poznyakoff  <gray@gnu.org.ua>

	Upgrade imprimatur.

2012-05-27  Sergey Poznyakoff  <gray@gnu.org.ua>

	Bugfix in testsuite.

	* tests/testsuite.at (AT_SORT_PREREQ): New macro.
	* tests/upload-dry.at: Avoid dependency on the sort order.

	Implement upload directives version 1.2

	* NEWS: Update.
	* README: Update.
	* doc/wydawca.texi: Document changes.
	* src/cmdline.opt: Update copyright years.
	* src/config.c: Update for new grecs version.
	New keywords: min-version and max-version.
	* src/directive.c (directive_unpack_version): New function.
	(directive_version_in_range_p): Set trp->version and print it.
	(directive) <replace_dir>: New directive.
	(directive_table): New directive "replace".
	(verify_directive_format): Use globals min_directive_version
	and max_directive_version.
	(process_directives): Handle replace_dir
	* src/diskio.c (dir_move_file): Use the "replace"
	directive to act on existing files.
	* src/wydawca.c (min_directive_version)
	(max_directive_version): New globals.
	(main): Loosen gpgme requirement: version 1.1.0 is Ok.
	* src/wydawca.h (MAX_DIRECTIVE_VERSION): Set to 102
	(file_triplet) <version>: New member.
	(min_directive_version)
	(max_directive_version): New globals.
	(directive_unpack_version): New proto.
	* tests/upl11.at: New file.
	* tests/upl12f.at: New file.
	* tests/upl12t.at: New file.
	* tests/Makefile.am (TESTSUITE_AT): Add new files.
	* tests/atlocal.in (wydawca_upload): Change invocation. All uses updated.
	(wydawca_cmparc): New function.
	* tests/check-fail.at: Update.
	* tests/check-notify.at: Update.
	* tests/check-ok.at: Update.
	* tests/dist/file12f.directive.asc: New file.
	* tests/dist/file12t.directive.asc: New file.
	* tests/etc/wydawca.rcin (test): Define "archive" clause.
	* tests/mailstats.at: Update.
	* tests/notify-upl.at: Update.
	* tests/testsuite.at: Include new files.
	* tests/upload-dry.at: Update.
	* tests/upload.at: Update.

2012-04-23  Sergey Poznyakoff  <gray@gnu.org.ua>

	Bugfixes.

	* configure.ac: Use AC_SYS_LARGEFILE.
	* grecs: Upgrade.
	* src/wydawca.c (main): Check GPGME version.

2011-10-02  Sergey Poznyakoff  <gray@gnu.org.ua>

	Use Imprimatur for documentation development and maintenance.

2011-07-05  Sergey Poznyakoff  <gray@gnu.org.ua>

	Update for MU 5e1d982e.

2011-06-27  Sergey Poznyakoff  <gray@gnu.org.ua>

	Update grecs.

2011-06-23  Sergey Poznyakoff  <gray@gnu.org.ua>

	Bugfixes.

	* grecs: Update.
	* src/config.c (config_help): Use grecs_print_* functions.
	* src/diskio.c (copy_file): Fix diagnostic message.
	* tests/backup00.at: Forgotten to commit :(

2011-05-13  Sergey Poznyakoff  <gray@gnu.org.ua>

	Minor change.

	* src/wydawca.c: Setup MU streams properly.

	Update copyright years

	Drop gnulib.

	* bootstrap: Rewrite.
	* bootstrap.conf: Remove.
	* configure.ac: Remove gl_EARLY/gl_INIT
	* src/backup.c: New file.
	* src/txtacc.c (txtacc_finish): Make sure a new entry is
	appended only once to the list.
	* (all sources): Use grecs memory allocation functions.
	* src/wydawca.h" Include fnmatch.h and regex.h
	(backup_type): New enum.
	(simple_backup_suffix): New extern.
	(find_backup_file_name): New proto.
	* tests/bkupname.c: New file.
	* tests/backup00.at: New file.
	* tests/backup01.at: New file.
	* tests/backup02.at: New file.
	* tests/backup03.at: New file.
	* tests/Makefile.am: Add new tests.
	* tests/testsuite.at: Add new tests.

	* grecs: Update.

2011-05-12  Sergey Poznyakoff  <gray@gnu.org.ua>

	Improve the txtacc interface.

2011-05-11  Sergey Poznyakoff  <gray@gnu.org.ua>

	Remove obstack.

	* src/txtacc.c: New file.
	* gnulib.modules: Remove obstack.
	* src/wydawca.h (txtacc_create, txtacc_free)
	(txtacc_free_string, txtacc_grow)
	(txtacc_finish): New functions.
	(txtacc_1grow): New macro.

	Remove save-cwd.

	* src/pushd.c: New file.
	* src/Makefile.am: Add pushd.c
	* src/wydawca.h (push_dir, pop_dir): New functions.
	* src/diskio.c: Use push_dir/pop_dir.
	* src/exec.c: Likewise.
	* src/gpg.c: Likewise.
	* gnulib.modules: Remove save-cwd.
	* tests/pushck.c: New file.
	* tests/pushdir.at: New file.
	* tests/testsuite.at: Add pushdir.at
	* tests/Makefile.am: Likewise.
	* tests/.gitignore: Add pushck.

2011-05-10  Sergey Poznyakoff  <gray@gnu.org.ua>

	Drop dependencies on argmatch and xgethostname.

	Remove strerror and sysexits

	Remove c-ctype module.

	Remove progname module.

	Remove inttostr module.

	Remove vasprintf module.

	Update grecs

	Update grecs.

	* Makefile.am (ChangeLog): Use git2chg.awk.
	* bootstrap.conf (gnulib_modules): Don't access grecs/gnulib.modules.
	* configure.ac (GRECS_SETUP): Add options.
	* gnulib.modules (getopt,gitlog-to-changelog)
	(hash,error,version-etc): Remove.
	* src/Makefile.am: Remove getopt.m4, use one from grecs.
	* src/getopt.m4: Remove.
	* src/cmdline.opt: Rewrite.
	* src/config.c: Update.

	* src/wydawca.h (spool) <aliases>: Change data type.
	(all_spool_aliases): Change data type.
	(config_finish): New proto.

	* src/wydawca.c: Use grecs functions.
	* src/dictionary.c: Likewise.
	* src/net.c: Likewise.
	* src/process.c: Likewise.

	* src/mail.c: Use grecs_symtab.
	* src/timer.c: Likewise.
	* src/triplet.c: Likewise.

2010-12-29  Sergey Poznyakoff  <gray@gnu.org.ua>

	Switch to Mailutils 3.x

2010-01-06  Sergey Poznyakoff  <gray@gnu.org.ua>

	Minor change

	* doc/wydawca.texi: Provide a @ifhtml branch for references to
	the MySQL documentation.
	n#

	Version 2.1 "KMB"

	Improve SQL configuration.

	* src/config.c (sql_kw): New statements: config-file and
	config-group.
	* src/sql.c (sql_init_dictionary): Handle config-file and
	config-group. Set CLIENT_MULTI_RESULTS option.
	* src/sql.h (struct sqlconn):  New members: config_file and
	config_group.
	* NEWS, doc/wydawca.texi: Update.

2010-01-03  Sergey Poznyakoff  <gray@gnu.org.ua>

	Improve memory management and optimize function signatures.

	* src/wydawca.h (file_triplet): New members: relative_dir, obstk.
	(virt_tab): Remove spool and reldir from argument lists.
	(triplet_strdup): New prototype.
	(move_file, archive_file, symlink_file)
	(rmsymlink_file, dir_move_file, dir_archive_file)
	(dir_symlink_file, dir_rmsymlink_file)
	(null_move_file, null_archive_file)
	(null_symlink_file, null_rmsymlink_file): Remove spool and reldir
	from argument lists.

	* src/directive.c (run_check_script): Use trp->obstk to
	store the program output.
	(process_directives): Update calls to vtab interfaces.
	* src/diskio.c (dir_move_file)
	(dir_archive_file, dir_symlink_file)
	(dir_rmsymlink_file): Remove spool and reldir
	arguments. Use the corresponding members of
	the struct file_triplet.
	* src/null.c (null_move_file, null_archive_file)
	(null_symlink_file, null_rmsymlink_file): Likewise.
	* src/vtab.c (move_file, archive_file)
	(symlink_file, rmsymlink_file): Likewise.

	* src/triplet.c (hash_triplet_free): Free obstack and uploader_list.
	(triplet_strdup): New function.
	(register_file): Initialize trp->obstck.
	(fill_project_name): Fill relative_dir as well.
	(verify_directive_file): Use triplet_strdup to
	keep string values.

	Update docs.

	* etc/wydawca.rc: Update.
	* doc/wydawca.texi: Update.

	Do not pass spool as a separate parameter, register it early in the triplet.

	* src/directive.c (process_directives): Remove spool parameter.
	* src/gpg.c (verify_directive_signature)
	(verify_detached_signature): Remove spool parameter.
	* src/process.c (scan_spool_unlocked): Update call to register_file.
	* src/triplet.c (register_file): Take spool ptr as second argument.
	(triplet_processor): Ignore proc_data.
	(enumerate_triplets): Pass NULL as proc_data.
	* src/verify.c (verify_directive_file): Remove spool parameter.
	* src/wydawca.h (ASGN_SPOOL): New macro.
	(register_file, verify_directive_file)
	(verify_directive_signature, verify_detached_signature)
	(process_directives): Remove spool parameter.

	* src/getopt.m4 (print_help): Minor fix.

2010-01-02  Sergey Poznyakoff  <gray@gnu.org.ua>

	Minor fixes

	* src/wydawca.c (stat_kwname): New keyword stat:check-failures.
	* doc/wydawca.texi: Document stat:check-failures counter
	* tests/check-fail.at, tests/check-notify.at: Update.

	Bugfixes.

	* src/directive.c (run_check_script): Close stdin.
	Call shell as "sh".

	New email-related meta-variables.

	These variables make it possible to avoid setting
	`recipient' statement in `notify' blocks, instead
	specifying recipients directly in the message
	headers and using the default recipient setting, which
	is `read'.

	* src/mail.c (expand_email_admin)
	(expand_email_owner): New functions.
	* src/triplet.c (triplet_processor): Remove the
	triplet if process_directives returns !0.
	(expand_email_user): New function.
	(triplet_meta): New keywords email:user (not to
	be confused with user:email), email:admin and
	email:owner.
	* src/wydawca.h (expand_email_admin)
	(expand_email_owner): New functions.

	* NEWS, doc/wydawca.texi: Updated.

	$- construct (similar to m4's dnl).

	* src/meta.c: Special construct $- removes the character immediately
	following it.
	* doc/wydawca.texi: Document the use of $- construct.
	* src/triplet.c (expand_triplet_ls_full)
	(expand_triplet_ls_upload): Keep trailing newline in the expansion.
	* tests/etc/notify.rc: Update.

	Add testcases for distribution tarball checking.

	* src/directive.c (run_check_script): Reword diagnostic messages.
	* tests/check-fail.at: New testcase.
	* tests/check-notify.at: New testcase.
	* tests/check-ok.at: New testcase.
	* tests/Makefile.am: Add new files.
	* tests/testsuite.at: Include new tests.
	* tests/atlocal.in (wydawca_init_testdirs): Create three
	source subdirectories.
	(wydawca_upload): Treat first argument as the name of a
	source subdirectory.
	* tests/etc/notify.rc: Add check-failure notification.
	* tests/etc/wydawca.rcin (ckfail, ckok): New spools.
	* tests/mailstats.at, tests/notify-upl.at, tests/upload.at: Update.
	* tests/upload-dry.at: Update output template.

	Implement distribution tarball checking.

	* src/config.c (event_args): New event "check-failure"
	(event_types): New event type ev_check_fail.
	(spool_kw,wydawca_kw): New keyword check-script.
	* src/directive.c (save_script)
	(stderr_redirector,run_check_script): New functions.
	(external_check): New function.
	(process_directives): Call external_check before actually
	moving the files.
	* src/gpg.c (homedir): Rename to temp_homedir, now global.
	* src/net.c (trim_crlf): Remove static qualifier.
	* src/triplet.c (hash_triplet_free): Free check_diag.
	(expand_triplet_full,expand_triplet_upload)
	(expand_triplet_sig,expand_triplet_directive): Rename to
	expand_triplet_ls_full,expand_triplet_ls_upload,
	expand_triplet_ls_sig,expand_triplet_ls_directive, correspondigly.
	(expand_check_diagn,expand_check_result)
	(expand_triplet_dist,expand_triplet_sig)
	(expand_triplet_dir): New functions.
	(triplet_meta): Renames:
	   triplet:full         => triplet:ls:full
	   triplet:upload       => triplet:ls:upload
	   triplet:dist         => triplet:ls:dist
	   triplet:sig          => triplet:ls:sig
	   triplet:dir          => triplet:ls:dir
	New keywords: triplet:dist, triplet:sig, triplet:dir,
	check:result, check:diagn.
	* src/wydawca.c (default_check_script): New global.
	(stat_name): New statistics counter "check failures".
	* src/wydawca.h (struct file_triplet): New members
	check_result, check_diag.
	(struct spool): New member check_script.
	(wydawca_stat): New value STAT_CHECK_FAIL.
	(notification_event): New value ev_check_fail.
	(default_check_script, temp_homedir): New externs.
	(concat_dir, copy_file, trim_crlf): New protos.

	* doc/wydawca.texi: Update.
	* configure.ac, NEWS: Version 2.0.90

	* etc/notify.rc: Update.
	* mailstats.at: Update.
	* notify-upl.at: Update.
	* upload-dry.at: Update.
	* upload.at: Update.

	Implement distribution tarball checking.

	* src/config.c (event_args): New event "check-failure"
	(event_types): New event type ev_check_fail.
	(spool_kw,wydawca_kw): New keyword check-script.
	* src/directive.c (save_script)
	(stderr_redirector,run_check_script): New functions.
	(external_check): New function.
	(process_directives): Call external_check before actually
	moving the files.
	* src/gpg.c (homedir): Rename to temp_homedir, now global.
	* src/net.c (trim_crlf): Remove static qualifier.
	* src/triplet.c (hash_triplet_free): Free check_diag.
	(expand_triplet_full,expand_triplet_upload)
	(expand_triplet_sig,expand_triplet_directive): Rename to
	expand_triplet_ls_full,expand_triplet_ls_upload,
	expand_triplet_ls_sig,expand_triplet_ls_directive, correspondigly.
	(expand_check_diagn,expand_check_result)
	(expand_triplet_dist,expand_triplet_sig)
	(expand_triplet_dir): New functions.
	(triplet_meta): Renames:
	   triplet:full         => triplet:ls:full
	   triplet:upload       => triplet:ls:upload
	   triplet:dist         => triplet:ls:dist
	   triplet:sig          => triplet:ls:sig
	   triplet:dir          => triplet:ls:dir
	New keywords: triplet:dist, triplet:sig, triplet:dir,
	check:result, check:diagn.
	* src/wydawca.c (default_check_script): New global.
	(stat_name): New statistics counter "check failures".
	* src/wydawca.h (struct file_triplet): New members
	check_result, check_diag.
	(struct spool): New member check_script.
	(wydawca_stat): New value STAT_CHECK_FAIL.
	(notification_event): New value ev_check_fail.
	(default_check_script, temp_homedir): New externs.
	(concat_dir, copy_file, trim_crlf): New protos.

	* doc/wydawca.texi: Update.
	* configure.ac, NEWS: Version 2.0.90

2010-01-01  Sergey Poznyakoff  <gray@gnu.org.ua>

	Happy new year!

	Updated year in copyright statements.

2009-12-23  Sergey Poznyakoff  <gray@gnu.org.ua>

	Minor bug fixes.

	* src/mail.c (gpg_sign): Verify sign result.
	(sign_message): Likewise. Free temporary
	message on errors.
	* src/null.c (null_move_file): Do not remove
	file in dry-run mode.
	* doc/wydawca.texi: Update.

2009-12-22  Sergey Poznyakoff  <gray@gnu.org.ua>

	Version 2.0

	* NEWS: Update.
	* configure.ac: Update.
	* doc/wydawca.texi: Minor change.
	* etc/wydawca.rc: Update.
	* src/config.c (notification_event_str)
	(notification_target_str): Use ARGMATCH_TO_ARGUMENT.
	* src/mail.c (get_uploader_email): Avoid segfault
	on info==NULL.

	Version 2.0

	* NEWS: Update.
	* configure.ac: Update.
	* doc/wydawca.texi: Minor change.

	Finish documentation

	* doc/Makefile.am (manual.tar.bz2)
	(man-tar): New rules.
	* doc/gendocs_template: Rewrite.
	* doc/wydawca.texi: Update.
	* doc/Config: New file.

	Fix documentation + minor changes.

	* bootstrap.conf: Unconditionally update submodules.
	* configure.ac: Fix wording of an error message.
	* doc/Makefile.am (check-config)
	(check-sub-config): Fix regexps.
	* doc/wydawca.texi: Update.

	* src/cmdline.opt (selected_spools): New function,
	* src/config.c (spool_kw): Move "archive-signatures" to
	wydawca_kw.
	* src/wydawca.c (main): selected_spools implies
	cron_option.
	* src/wydawca.h (selected_spools): New proto.

2009-12-21  Sergey Poznyakoff  <gray@gnu.org.ua>

	Update grecs.

	Namespace cleanup.

	Rename "access method" to "dictionary".
	All sources affected.

	* src/method.c: renamed to...
	* src/dictionary.c: ... this.

2009-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>

	Update grecs.

2009-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>

	Improve docs + bugfix.

	* doc/Makefile.am (check-options): Fix sed expression.
	* doc/wydawca.texi: Update.
	* src/job.c (job_start): Don't fork if single_process is set.

2009-12-08  Sergey Poznyakoff  <gray@gnu.org.ua>

	Minor changes.

	* doc/Makefile.am (check-config)
	(check-sub-config): New rules.
	(all-check-docs): Depend on check-config
	and check-sub-config.
	* doc/wydawca.texi: Fix configuration statement
	markers for use with check-config and check-sub-config
	rules.

	Implement GPG signing of the outgoing notifications.

	* src/config.c (mail_statistics_kw): New keyword gpg-sign.
	(notify_event_kw): Likewise.
	(wydawca_kw): New keyword gpg-homedir.
	* src/gpg.c (wydawca_gpg_homedir): Rename to
	create_gpg_homedir. Make static.
	All uses updated.
	* src/mail.c (admin_stat_sign_key): New global.
	(mu_stream_data_read_cb)
	(gpg_sign, sign_message): New functions.
	(mail_send_message): Take 3rd argument: ID of
	the PGP key to sign the message with.
	All callers updated.
	(do_notify): Rewrite.
	* src/wydawca.c (wydawca_gpg_homedir): New variable.
	* src/wydawca.h (struct notification): New member
	sign_keys.
	(admin_stat_sign_key): New extern.
	(wydawca_gpg_homedir): New extern.

2009-12-06  Sergey Poznyakoff  <gray@gnu.org.ua>

	Comment expansion.

	* src/triplet.c: New keyword "comment".

	Allow to specify arbitrary notification recipients.

	* src/wydawca.h (enum notification_target): New value notify_read,
	meaning "read recipient addresses from the message headers".
	* src/config.c (target_args): New values: "read" and "message".
	(target_types): New value 'notify_read'.
	* src/mail.c (mail_send_message): Handle NULL rcpt.
	(do_notify): Handle notify_read.

2009-12-02  Sergey Poznyakoff  <gray@gnu.org.ua>

	Initial implementation of mysql over SSL.

	* src/config.c (sql_kw): New keyword `ssl-ca'.
	* src/sql.c (sql_init_method): Initialize SSL, if
	required.
	* src/sql.h (struct sqlconn): New member `cacert'.

2009-12-01  Sergey Poznyakoff  <gray@gnu.org.ua>

	Vershion 1.9.92

	* Makefile.am (AUTOMAKE_OPTION): Remove.
	* configure.ac: Version 1.9.92
	(AM_INIT_AUTOMAKE): Specify parameters.
	Enable silent rules.
	* NEWS: Update.
	* THANKS: New file.
	* tests/mailstats.at: update
	* tests/notify-upl.at: update

	Fix locking. Improve mail formatting.

	* src/config.c (locking_kw): Remove retry-attempts and
	retry-interval.
	New keyword: timeout.
	* src/job.c (job_queue_runner): Use lock_timeout.
	* src/lock.c (lock_retry_attempts, lock_retry_interval): Remove.
	(lock_timeout): New variable.
	(wydawca_lock): Rewrite lock acquisition loop.
	* src/wydawca.h (lock_retry_attempts, lock_retry_interval): Remove.
	(lock_timeout): New extern.
	* src/process.c (scan_spool): Analyze return from wydawca_lock.
	* src/mail.c (mail_send_message): Set From header, unless
	it is already present.

	Minor fix.

	* src/job.c (wydawca_scanner): Close mailer after logstats.

2009-11-30  Sergey Poznyakoff  <gray@gnu.org.ua>

	Do not require uploaders to be present in the system passwd database.

	* src/wydawca.h (access_method_id): Remove verify_method,
	gpg_key_method and user_data_method. Add project_uploader_method.
	(uploader_info): New structure.
	(struct file_triplet): Remove gid and user data fields.
	Add uploader_count, uploader_list and uploader.
	(TRIPLET_GID): Change definition.
	(verify_directive_signature): Change signature.
	(uploader_find_frp): New proto.

	* src/verify.c (extract_plaintext): New function.
	(fill_project_name): Rewrite. Parse directive file.
	(uploader_find_frp): New function.
	(check_access_rights): Remove.
	(verify_directive_file): Rewrite.

	* src/config.c (string_to_access_method_id): Reflect changes to the
	access method system.
	* src/builtin.c (default_ncol): Reflect changes to the
	access method system.
	* src/gpg.c (gpg_sig_ok_p): Remove.
	(gpg_verify_signature): New function, based on
	gpg_sig_ok_p.
	(verify_directive_signature): Remove `pubkey' argument.
	Register all public keys from the uploader list.
	Do not call directive_parse, as the directive file must
	already be parsed by the time the function is called.
	* src/mail.c (get_uploader_email): New function.
	(do_notify): Use get_uploader_email for notifying
	users.
	* src/triplet.c (hash_triplet_free): Reflect changes to
	the triplet structure.
	(format_file_data): Get user name from the system passwd database.
	(fill_user_data): Remove.
	(expand_user_real_name, expand_user_email): Reflect changes to
	struct file_triplet.

	* tests/etc/wydawca.rcin: Rewrite to reflect new access method
	system.
	* tests/mailstats.at, tests/notify-upl.at,
	tests/upload-dry.at, tests/upload.at: Update.

	Minor fixes.

	* tests/wsbatch.c: Fix diagnostics.

	Upgrade grecs

2009-10-27  Sergey Poznyakoff  <gray@gnu.org.ua>

	Switch to grecs master.

	* grecs: Switch to master.
	* src/config.c: Upgrade (rename GCONF_* to GRECS_*)

2009-04-21  Sergey Poznyakoff  <gray@gnu.org.ua>

	Switch to grecs master

	Switch to grecs master

	Merge branch 'master' of ssh://git.gnu.org.ua/gitroot/wydawca

2009-04-20  Sergey Poznyakoff  <gray@gnu.org.ua>

	Switch to the Grecs submodule.

	* gconf: Remove
	* Makefile.am (ACLOCAL_AMFLAGS): Add -I grecs/am.
	(SUBDIRS): Replace gconf with grecs
	(make-ChangeLog): Remove spurious rule.
	* bootstrap.conf: Init submodules.
	* configure.ac: Call GRECS_SETUP
	(AC_CONFIG_FILES): Add grecs/Makefile, grecs/src/Makefile.
	* src/wydawca.h: Include grecs.h
	* src/Makefile.am (LDADD,INCLUDES): Refer to grecs.
	* tests/Makefile.am: Likewise.
	* src/cmdline.opt, src/config.c,
	src/diskio.c, src/tcpwrap.c, src/wydawca.c: Use grecs.
	* README-hacking: Update

	Minor fix

2009-03-12  Sergey Poznyakoff  <gray@gnu.org.ua>

	Bugfix

	* src/triplet.c (check_triplet_state): Verify the directive file only if
	it already exists.

2009-03-11  Sergey Poznyakoff  <gray@gnu.org.ua>

	Minor fixes

	Start writing wordsplit.

	* doc/wydawca.texi: Update.

	* gconf/argcv.h, gconf/argcv.c: Remove.
	* gconf/wordsplit.c, gconf/wordsplit.h: New files.
	* gconf/Makefile.am (libgconf_a_SOURCES): Remove argcv, add wordsplit
	* gconf/gconf-lex.l, gconf/gconf-preproc.c: Use wordsplit, instead of
	argcv_get
	* src/directive.c, src/method.c: Likewise.
	* src/wydawca.h: Likewise.

	* tests/wordsplit.at: New file.
	* tests/wstest.c, tests/wsbatch.c: New files.
	* tests/Makefile.am (TESTSUITE_AT): Add wordsplit.at
	Build wstest and wsbatch.
	* tests/testsuite.at: Add wordsplit.at.

2009-03-05  Sergey Poznyakoff  <gray@gnu.org.ua>

	Merge branch 'master' of ssh://git.gnu.org.ua/gitroot/wydawca

	Improve locking.

	* gconf/gconf-gram.y (string_convert): Rename to gconf_string_convert, make
	extern. All uses updated.
	* gconf/gconf.h (gconf_string_convert): New proto.
	(wydawca_kw): `locking' block statement.
	* src/job.c: Introduce a delay before restarting a tempfailed job.
	Do not trigger error reporting on tempfail
	* src/lock.c: Retry locking attempts, according to configuration.
	* src/wydawca.h (lock_retry_attempts, lock_retry_interval): New declarations.

2009-02-28  Sergey Poznyakoff  <gray@gnu.org.ua>

	Various fixes

	* doc/Makefile.am: Improve checking and final rules.
	* doc/fdl.texi, doc/rendition.texi: Use single-space sentence separators.
	* doc/wydawca.texi: Update.
	* src/config.c (cb_email_address): Accept a list of addresses.
	* src/meta.c (meta_expand_string): Take two additional arguments. Quote
	expansions if they are provided.
	* src/triplet.c (triplet_expand_method_query): New function.
	* src/mail.c, src/verify.c: Use triplet_expand_method_query
	* src/wydawca.h: Update.
	* src/meta.c (meta_escape): Remove.

2009-02-26  Sergey Poznyakoff  <gray@gnu.org.ua>

	Minor fixes

	listen defaults to service "wydawca"

	Minor fixes

	Switch to non-privileged UID/GID before startup.

	* src/userprivs.c: New file.
	* src/Makefile.am (wydawca_SOURCES): Add userprivs.c
	* src/config.c (cb_access_method_params): Add missing gl_list_iterator_free.
	(cb_user, cb_supp_groups): New callbacks.
	(wydawca_kw): New keywords: user and group.

	* src/wydawca.c (wydawca_uid, wydawca_gid)
	(wydawca_supp_groupc, wydawca_supp_groups): New variables.
	(wydawca_set_uid, wydawca_set_gid, wydawca_set_privs)
	(wydawca_set_triplet_privs, wydawca_set_root_privs): Remove.
	(main): --dry-run implies --cron.
	Switch to non-privileged UID/GID before startup.
	* src/wydawca.h (wydawca_uid, wydawca_gid)
	(wydawca_supp_groupc, wydawca_supp_groups): New declarations.

	* src/mail.c (do_notify): Duplicate admin_address, it gets freed in do_notify.

	* src/directive.c, src/diskio.c, src/lock.c, src/triplet.c: Update.

2009-02-25  Sergey Poznyakoff  <gray@gnu.org.ua>

	Fix testsuite

	Fix privilege selection

	Check incoming connections using libwrap; various bugfixes.

	* configure.ac: Check for libwrap.
	* src/tcpwrap.c: New file.
	* src/Makefile.am (wydawca_SOURCES): Add tcpwrap.c
	* src/builtin.c, src/job.c, src/pidfile.c: Minor fixes.
	* src/config.c (assert_string_arg): Change to extern.
	(wydawca_kw): New block statement "tcp-wrapper"
	* src/net.c (wydawca_listener): Check fd using libwrap.
	* src/triplet.c (DECL_EXPAND_TIMER): Add missing return statement.

2009-02-24  Sergey Poznyakoff  <gray@gnu.org.ua>

	Implement locking

	* src/lock.c: New file.
	* gnulib.modules (sysexits, xgethostname): New modules.
	* src/lock.c: New file.
	* src/Makefile.am: Add lock.c
	* src/config.c: Locking keywords.
	* src/job.c: Requeue jobs if locking fails.
	* src/wydawca.c (wydawca_uid): Rename to wydawca_set_uid
	(main): Implement restart.
	* src/process.c (scan_spool, scan_all_spools): Use locking, if configured.
	* src/directive.c, src/diskio.c, src/triplet.c: Rename
	wydawca_uid
	* src/exec.c, src/getopt.m4, src/net.c,
	src/pidfile.c: Use standard error codes from sysexits.h
	* tests/etc/wydawca.rcin: Disable locking.

	Improve daemon mode.

	* gconf/gconf-gram.y: Provide created lists with appropriate equal tests.
	Special handling for lists of strings.
	* src/cmdline.opt: Minor fix.
	* src/config.c: New keyword all-spools.
	* src/job.c: Hanlde "all spools" requests.
	* src/net.c: Likewise.
	* src/process.c (spool_check_alias): Rewrite using gl_list_search
	(scan_directories): Rename to scan_all_spools.
	(spool_create_timers): New function.
	* src/wydawca.c (all_spool_aliases): New global.
	(initstats): New function.
	* src/wydawca.h: Add new declarations.

	Sync example config

	Initial implementation of daemon mode.

	* gconf/gconf-gram.y (string_to_sockaddr_: Take struct gconf_sockaddr as the
	first argument.
	* gconf/gconf.h (struct gconf_sockaddr): New data type.
	* src/job.c, src/net.c, src/pidfile.c: New files.
	* src/Makefile.am (wydawca_SOURCES): Add job.c, net.c, pidfile.c
	* src/cmdline.opt: New options: --cron (change semantics), --force,
	--foreground, --single-process, --spool
	* src/wydawca.c: New daemon mode.
	* src/config.c: New statements: spool.alias, daemon, foreground,
	single-process, wakeup-interval, pidfile, listen
	* src/directive.c, src/diskio.c, src/gpg.c, src/mail.c, src/null.c,
	src/process.c, src/triplet.c, src/verify.c, src/vtab.c, src/wydawca.h: use
	static struct spool wherever feasible.
	* src/triplet.c: New meta-variable "spool"
	* tests/etc/wydawca.rcin: Update.
	* tests/upload-dry.at: Update.

2009-02-23  Sergey Poznyakoff  <gray@gnu.org.ua>

	Add missing i18n markers

	Switch to user privileges while processing the triplet

2009-02-22  Sergey Poznyakoff  <gray@gnu.org.ua>

	Minor fixes

	Remove sendfile support

	Allow to select spools from the command line

	Rename directory_pair to spool

	Allow to specify UIDs of the users whose uploads are to be processed.

	* src/process.c (scan_directory_pair): Ignore files with non-matching owner
	UIDs.
	* src/wydawca.c: Treat non-option arguments as a list of owner names or UIDs.
	* src/cmdline.opt: Update.

	Bugfix

	* etc/wydawca.rc: Fix syntax errors.
	* src/wydawca.c: Remove leftover function.

	Minor improvements

	* src/report.c: New file
	* src/Makefile.am (wydawca_SOURCES): Add report.c
	* src/cmdline.opt: Group options.
	New option -D (--define).
	* src/directive.c (process_directives): Call report_init before processing
	and report_finish afterwards.
	* src/triplet.c: New meta-variable `report'.
	* src/vtab.c (move_file, archive_file, symlink_file, rmsymlink_file): Update
	report stack.
	* src/wydawca.h: Include obstack.h
	(report_init, report_add, report_finish): New protos.
	(report_string): New declaration.
	* src/builtin.c, src/meta.c: Remove obstack inclusion.

2009-02-21  Sergey Poznyakoff  <gray@gnu.org.ua>

	Implement timers and destination URLs.

	* gconf/gconf-gram.y (stmt_end): Make sure end callback is called in the
	same environment as the begin one.
	* src/vtab.c, src/null.c, src/timer.c: New files.
	* src/Makefile.am (wydawca_SOURCES): Add new files.
	* src/config.c (cb_mailer): Remove useless check.
	(cb_destination_url): New function.
	(directory_kw): Change handling of the destination keyword.
	(cb_directory): Rewrite final checks.
	* src/directive.c, /src/process.c, src/triplet.c: Add timers.
	* src/diskio.c (move_file, archive_file, symlink_file, rmsymlink_file): Prefix
	with dir_.
	* src/mail.c (mail_stats): Add timer meta-variables.
	* src/wydawca.c (make_stat_expansion): Change definition.
	* src/wydawca.h (struct virt_tab): New data type.
	(struct directory_pair.dest_url): New member.
	* tests/upload-dry.at: Update expected output.

	Remove trailing whitespace

	Change definition of archive_file to match this of rmsymlink_file

	Implement per-directory notifications

	* src/config.c (default_notification): New static.
	(cb_notify_event): Explicitly link new notification to the chain.
	(directory_kw): New keyword "notify-event".
	(cb_directory): Use previously defined global notifications.
	* src/mail.c (register_notification): Remove.
	(notify): Tak a list of notifications to run as an argument.
	* src/directive.c, src/gpg.c, src/verify.c: Update calls to notify.
	* src/wydawca.h (struct directory_pair.notification): New member.
	* tests/notify-upl.at: Define notifications before the directory pair in
	the configuration file.

2009-02-19  Sergey Poznyakoff  <gray@gnu.org.ua>

	Improve testsuite

	* src/mail.c (mail_send_message): Fix diagnostics.
	(mail_stats): Bail out if admin_address is not defined.
	* tests/mailstats.at: New file.
	* tests/Makefile.am (TESTSUITE_AT): Add mailstats.at
	* tests/testsuite.at: Add mailstats.at
	* tests/etc/mailstats.rc: New file.
	* tests/etc/Makefile.am (EXTRA_DIST): Add missing files.
	* tests/etc/wydawca.rcin: Define admin-address, enforce newline at EOF.
	* tests/notify-upl.at, tests/upload-dry.at, tests/upload.at: Fix descriptions.

	Lots of bugfixes + new testsuite

	* configure.ac: Disable sendfile by default.
	* src/builtin.c (builtin_run): Fix value returned of failure.
	* src/config.c (target_args): Fix ordering
	* src/meta.c (meta_expand_string): Fix handling of unexpanded macros.
	* src/triplet.c (fill_user_data): Fix conditional.
	* src/verify.c (make_default_meta): Fix trailing null.

	* tests/.gitignore: Add source and dest
	* tests/Makefile.am (EXTRA_DIST): Add dist.
	(TESTSUITE_AT): Add new tests.
	* tests/atlocal.in: Update.
	* etc/.gitignore: Add wydawca.rc
	* tests/etc/Makefile.am: Add wydawca.rcin
	* tests/testsuite.at: Add new tests

	* tests/dist/file: New file.
	* tests/dist/file.directive.asc: New file.
	* tests/dist/file.sig: New file.
	* tests/etc/notify.rc: New file.
	* tests/etc/nullmail: New file.
	* tests/etc/wydawca.rcin: New file.
	* tests/notify-upl.at: New file.
	* tests/upload-dry.at: New file.
	* tests/upload.at: New file.

2009-02-18  Sergey Poznyakoff  <gray@gnu.org.ua>

	Various fixes

2009-02-17  Sergey Poznyakoff  <gray@gnu.org.ua>

	Begin rewriting method system

	* src/builtin.c, src/builtin.h: New files.
	* src/Makefile.am (wydawca_SOURCES): Add builtin.c and builtin.h
	* src/config.c: New keyword access-method.query
	* src/update-2.0.awk: Update.
	* src/meta.c: Remove quote_string (replaced by method_quote_string).
	(meta_escape): Add `handle' argument.
	* src/method.c (struct method_descr): New methods: open, close, quote.
	Updated methods: free, run, get. All callers updated.
	(method_quote_string): New function.
	* src/process.c (scan_directory_pair): Init all access methods at once.
	* src/sql.c: Take name of the SQL connection from method->parmv[0].
	Adapt to changes to the method subsystem.
	* src/sql.h: Likewise.
	* src/wydawca.h (struct access_method): New members id, parmc, parmv,
	storage.
	Remove union v.
	(meta_escape): Take 3 arguments.
	(method_new): Take 2 arguments.
	(method_open, method_close, method_quote_string): New proto.
	(method_run, method_result): Change signature.
	* src/mail.c, src/triplet.c, src/verify.c
	* etc/wydawca.rc: Update.

	Merge branch 'master' of ssh://git.gnu.org.ua/gitroot/wydawca

	Fix library autodetection

	Add missing options

2009-02-16  Sergey Poznyakoff  <gray@gnu.org.ua>

	Improve keyword (meta) expansion, add testsuite framework

	* src/meta.c: New file.
	* src/Makefile.am (wydawca_SOURCES): Add meta.c.
	* Makefile.am (SUBDIRS): Add tests.
	* configure.ac: Initialize testsuite.
	* src/cmdline.opt: Add preprocessor-related options: --[no-]preprocessor,
	-E

	* src/mail.c, src/triplet.c, src/verify.c, src/wydawca.c, src/wydawca.h: Use
	new expansion functions.
	* src/update-2.0.awk: Replace % markup with $.

	* etc/wydawca.rc: Switch to new meta-variable syntax.
	* gnulib.modules: Add c-ctype.

	* doc/Makefile.am (check-options): Rewrite.
	* doc/wydawca.texi: Mark unrevised/obsolete material.

	* tests/: New directory

	Update etc/wydawca.rc to the new format

	Improve argument parsing

	* src/cmdline.opt, src/getopt.m4: New files.
	* src/wydawca.c: Switch to new way of command line parsing.
	* src/wydawca.h (gettext): Define.
	* bootstrap.conf: Add formatting flags for gconf_warning and gconf_error
	* gconf-preproc.c (pp_list_find): Minor change.
	* gconf/gconf.h (gconf_warning,gconf_error): Mark as printflike.
	* src/.gitignore: Add cmdline.h
	* src/Makefile.am (wydawca_SOURCES): Add cmdline.h.
	(.opt.h): New rule.
	* src/config.c (cb_archive): Archive is now a block statement (unless type
	"none" is declared).
	(all functions): Tighten input checking
	* src/update-2.0.awk: Reflect the above change.
	* src/directive.c (process_directives): Minor change.
	* src/diskio.c (symlink_file): Minor change.

	Bugfixes

	Rewrite configuration parser, drop dependency on GSC

	* bootstrap: Replaced with a modified version from gnulib.
	* configure.ac: Bump version to 1.9.90
	(--without-preprocessor): New option
	Require Mailutils 2.0
	(AC_CONFIG_FILES): Remove lib, add gconf

	* gconf/: New directory. Contains general-purpose configuration file
	parser, distilled from Dico and Mailutils.

	* src/Makefile.am (wydawca_SOURCES): Add interval.c
	* src/pp-setup, src/update-2.0.awk: New files.
	* src/config.c: Full rewrite.
	* src/exec.c (start_prog): Use getdtablesize unconditionally.
	* src/mail.c: Keep templates in a hash table.
	Template references begin with a single @
	* src/process.c, src/triplet.c, src/verify.c: Reflect changes to struct
	directory_pair

	* src/wydawca.c: Change configuration parsing.
	* src/wydawca.h (enum access_method_id): New constants
	(struct directory_pair): Replace four access methods with an array.

	* Makefile.am (SUBDIRS): Remove lib, add gconf
	* .gitignore, NEWS, doc/.gitignore, src/.gitignore

2009-02-13  Sergey Poznyakoff  <gray@gnu.org.ua>

	Move to Git

	* COPYING, .gitignore, doc/.gitignore, src/.gitignore: New files.
	* ChangeLog: rename to ChangeLog.svn
	* Makefile.am: Add rules for creating ChangeLog.
	* bootstrap: Add gitlog-to-changelog

2009-01-24  Sergey Poznyakoff  <gray@gnu.org.ua>

	Bugfixes

	* src/diskio.c (archive_single_file): Fix errno value (ENOENT
	instead of EACCESS).
	Do not update STAT_ARCHIVES.
	(make_signame): New function.
	(archive_file): Use make_signame.
	(do_rmsymlink_file): Take 2nd argument, specifying whether to
	emit warning on errno==ENOENT.
	Update STAT_RMSYMLINKS.
	(rmsymlink_file): Attempt to remove .sig as well, if
	archive_signatures is set.
	Do not update STAT_RMSYMLINKS.

	git-svn-id: file:///svnroot/wydawca/trunk@339 6bb4bd81-ecc2-4fd4-a2d4-9571d19c0d33

2009-01-23  Sergey Poznyakoff  <gray@gnu.org.ua>

	Version 1.2

	* configure.ac, NEWS: Version 1.2
	* doc/wydawca.texi: Document new features.
	* src/wydawca.c (archive_signatures): New variable.
	* src/wydawca.h (SUF_SIG,SUF_SIG_LEN,SUF_DIR,SUF_DIR_LEN): New
	macros.
	(archive_signatures): New variable.
	* src/config.c: New configuration file statement
	archive-signatures.
	* src/process.c (SUF_SIG,SUF_DIR): Move to src/wydawca.
	* src/diskio.c (backup_file): Do not update statistics.
	(do_archive_file): Unlink the file after archivation.
	(archive_single_file): New function.
	(archive_file): Implicitly archive .sig file, if
	archive_signatures is set.
	* src/triplet.c (check_triplet_state): Call
	verify_directive_file.
	(triplet_processor): Remove call to verify_directive_file.

	git-svn-id: file:///svnroot/wydawca/trunk@337 6bb4bd81-ecc2-4fd4-a2d4-9571d19c0d33

2009-01-17  Sergey Poznyakoff  <gray@gnu.org.ua>

	Bugfix

	git-svn-id: file:///svnroot/wydawca/trunk@334 6bb4bd81-ecc2-4fd4-a2d4-9571d19c0d33

	Version 1.1

	git-svn-id: file:///svnroot/wydawca/trunk@332 6bb4bd81-ecc2-4fd4-a2d4-9571d19c0d33

	Fix handling of the symlink directive.

	* src/diskio.c (symlink_file): Silently remove existing symlink
	target.
	* NEWS: Update.

	git-svn-id: file:///svnroot/wydawca/trunk@331 6bb4bd81-ecc2-4fd4-a2d4-9571d19c0d33

2008-09-03  Sergey Poznyakoff  <gray@gnu.org.ua>

	* configure.ac, NEWS: Version 1.0.90 * doc/wydawca.texi: Mention changes in detailed statistics logging. * etc/wydawca.rc: Remove gray's email

	git-svn-id: file:///svnroot/wydawca/trunk@330 6bb4bd81-ecc2-4fd4-a2d4-9571d19c0d33

	Fix typo

	git-svn-id: file:///svnroot/wydawca/trunk@329 6bb4bd81-ecc2-4fd4-a2d4-9571d19c0d33

	* src/wydawca.c (logstats_): Log detailed statistics only if at least one counter is not zero.

	git-svn-id: file:///svnroot/wydawca/trunk@328 6bb4bd81-ecc2-4fd4-a2d4-9571d19c0d33

2008-08-23  Sergey Poznyakoff  <gray@gnu.org.ua>

	Release 1.0

	git-svn-id: file:///svnroot/wydawca/trunk@326 6bb4bd81-ecc2-4fd4-a2d4-9571d19c0d33

	Remake master menu

	git-svn-id: file:///svnroot/wydawca/trunk@325 6bb4bd81-ecc2-4fd4-a2d4-9571d19c0d33

	Normalize use of sendfile(2). * src/wydawca.c (enable_sendfile): New global. * src/wydawca.h: Likewise. * src/config.c (enable-sendfile): New statement. * src/diskio.c (copy_file): Use enable_sendfile to decide whether to use sendfile. * doc/wydawca.texi: Document enable-sendfile.

	git-svn-id: file:///svnroot/wydawca/trunk@324 6bb4bd81-ecc2-4fd4-a2d4-9571d19c0d33

2008-07-15  Sergey Poznyakoff  <gray@gnu.org.ua>

	* src/wydawca.h (register_message_template): New prototype. * src/verify.c (fill_project_name): Fix return value. * src/config.c (_cfg_raw_read): Remove unused variables. * src/directive.c (directive_version_in_range_p): Version is unsigned. * src/mail.c (do_notify): Remove unused variable. * src/diskio.c (copy_file): Fall back to user-space copying if sendile fails with EINVAL.  Always remove destination file on failure. * src/triplet.c (expand_triplet_upload): Initialize exp->value.

	git-svn-id: file:///svnroot/wydawca/trunk@323 6bb4bd81-ecc2-4fd4-a2d4-9571d19c0d33

2007-11-19  Sergey Poznyakoff  <gray@gnu.org.ua>

	* configure.ac: Use AM_GNU_MAILUTILS * README-hacking: Note mailutils.

	git-svn-id: file:///svnroot/wydawca/trunk@322 6bb4bd81-ecc2-4fd4-a2d4-9571d19c0d33

2007-09-23  Sergey Poznyakoff  <gray@gnu.org.ua>

	* src/verify.c: Add a fixme comment * src/triplet.c (triplet_processor): First check the state of a triplet. Call verify_directive file only if it is triplet_directive or triplet_complete (expand_triplet_full,expand_triplet_upload): Fix coredump if one of components is missing.

	git-svn-id: file:///svnroot/wydawca/trunk@321 6bb4bd81-ecc2-4fd4-a2d4-9571d19c0d33

2007-09-07  Sergey Poznyakoff  <gray@gnu.org.ua>

	Prepare for the release

	git-svn-id: file:///svnroot/wydawca/trunk@320 6bb4bd81-ecc2-4fd4-a2d4-9571d19c0d33

	Update

	git-svn-id: file:///svnroot/wydawca/trunk@319 6bb4bd81-ecc2-4fd4-a2d4-9571d19c0d33

2007-09-06  Sergey Poznyakoff  <gray@gnu.org.ua>

	Update

	git-svn-id: file:///svnroot/wydawca/trunk@318 6bb4bd81-ecc2-4fd4-a2d4-9571d19c0d33

	Update

	git-svn-id: file:///svnroot/wydawca/trunk@317 6bb4bd81-ecc2-4fd4-a2d4-9571d19c0d33

	Redo mail notifications

	git-svn-id: file:///svnroot/wydawca/trunk@316 6bb4bd81-ecc2-4fd4-a2d4-9571d19c0d33

	Update

	git-svn-id: file:///svnroot/wydawca/trunk@315 6bb4bd81-ecc2-4fd4-a2d4-9571d19c0d33

2007-09-05  Sergey Poznyakoff  <gray@gnu.org.ua>

	Update

	git-svn-id: file:///svnroot/wydawca/trunk@314 6bb4bd81-ecc2-4fd4-a2d4-9571d19c0d33

	Update ignore prop

	git-svn-id: file:///svnroot/wydawca/trunk@313 6bb4bd81-ecc2-4fd4-a2d4-9571d19c0d33

	Update

	git-svn-id: file:///svnroot/wydawca/trunk@312 6bb4bd81-ecc2-4fd4-a2d4-9571d19c0d33

2007-09-04  Sergey Poznyakoff  <gray@gnu.org.ua>

	Update

	git-svn-id: file:///svnroot/wydawca/trunk@311 6bb4bd81-ecc2-4fd4-a2d4-9571d19c0d33

	Bugfix

	git-svn-id: file:///svnroot/wydawca/trunk@310 6bb4bd81-ecc2-4fd4-a2d4-9571d19c0d33

	Update

	git-svn-id: file:///svnroot/wydawca/trunk@309 6bb4bd81-ecc2-4fd4-a2d4-9571d19c0d33

	Update

	git-svn-id: file:///svnroot/wydawca/trunk@308 6bb4bd81-ecc2-4fd4-a2d4-9571d19c0d33

2007-09-02  Sergey Poznyakoff  <gray@gnu.org.ua>

	Set up documentation framework

	git-svn-id: file:///svnroot/wydawca/trunk@307 6bb4bd81-ecc2-4fd4-a2d4-9571d19c0d33

2007-09-01  Sergey Poznyakoff  <gray@gnu.org.ua>

	Update

	git-svn-id: file:///svnroot/wydawca/trunk@306 6bb4bd81-ecc2-4fd4-a2d4-9571d19c0d33

	Initial move from GSC

	git-svn-id: file:///svnroot/wydawca/trunk@305 6bb4bd81-ecc2-4fd4-a2d4-9571d19c0d33

2007-08-26  Sergey Poznyakoff  <gray@gnu.org.ua>

	* wydawca/wydawca.h (struct file_triplet): New member user (fill_project_name): New function * wydawca/verify.c (get_project_name): Rename to fill_project_name, remove static qualifier. * wydawca/wydawca.rc: Update * wydawca/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 * wydawca/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.

	git-svn-id: file:///svnroot/wydawca/trunk@298 6bb4bd81-ecc2-4fd4-a2d4-9571d19c0d33

	Implement project owner notifications.

	* wydawca/wydawca.c (syslog_printer): Reduce the number of memory
	reallocations
	(make_stat_expansion): Update
	* wydawca/method.c: Implement a new framework: methods may return
	2-dimensional arrays of strings.
	* wydawca/sql.c, wydawca/sql.h: Implement the new method framework.
	* wydawca/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
	* wydawca/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
	* wydawca/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
	* wydawca/gpg.c (verify_directive_signature): Expand directives
	even if the signature does not match. Useful for notifications.
	Add notifications.
	* wydawca/process.c: Add notifications.
	* wydawca/directive.c: Add notifications
	* wydawca/wydawca.rc: Update
	* wydawca/mail.c, wydawca/mail.h: Implement project owner
	notifications 
	* wydawca/triplet.c (triplet_expand_param): New function

	* lib/cfg.c (read_cont_line): Fix counting of input lines.

	git-svn-id: file:///svnroot/wydawca/trunk@297 6bb4bd81-ecc2-4fd4-a2d4-9571d19c0d33

2007-08-25  Sergey Poznyakoff  <gray@gnu.org.ua>

	Add copyright header

	git-svn-id: file:///svnroot/wydawca/trunk@296 6bb4bd81-ecc2-4fd4-a2d4-9571d19c0d33

	* configure.ac: Require mailutils for wydawca * bootstrap: Require inttostr and strftime * wydawca/mail.h: New file * wydawca/mail.c: New file * wydawca/Makefile.am: Add mail.c and mail.h * wydawca/wydawca.c: Include mail.h (stat_mask_p, make_stat_expansion): New functions (logstats): Call mail_stats (main): Call initialize mailer subsystem

	* wydawca/sql.c, wydawca/sql.h: Keep usage reference count. Do not
	deinitialize unless it falls to 0. Do not initialize if it is > 0.

	* wydawca/verify.c (expand_param): Rewrite to allow long keywords
	All callers updated.
	* wydawca/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
	* wydawca/config.c: reimplement  verify-user and gpg-key
	New keywords mailer, admin-address, from-address, mail-admin-stat
	and admin-stat-message
	* wydawca/process.c: Close methods only when their reference count
	is 0.
	* wydawca/method.c: Likewise.
	(method_new): New function
	* wydawca/wydawca.rc: Update
	* wydawca/diskio.c: Minor changes
	* wydawca/triplet.c (count_collected_triplets): New function
	* jabberd/main.c: Minor change

	git-svn-id: file:///svnroot/wydawca/trunk@295 6bb4bd81-ecc2-4fd4-a2d4-9571d19c0d33

	Check access rights. Improve statistics

	git-svn-id: file:///svnroot/wydawca/trunk@294 6bb4bd81-ecc2-4fd4-a2d4-9571d19c0d33

2007-08-24  Sergey Poznyakoff  <gray@gnu.org.ua>

	Print debug reporting email at the end of the help output

	git-svn-id: file:///svnroot/wydawca/trunk@293 6bb4bd81-ecc2-4fd4-a2d4-9571d19c0d33

	* lib/version.c: New file * lib/gsc.h (gsc_version): New function * cvs/Makefile.am, ckaliases/Makefile.am, wydawca/Makefile.am, lib/Makefile.am, jabberd/Makefile.am: Fix include dirs * ckaliases/ckaliases.c, ckaliases/lex.l, ckaliases/ckaliases.h, ckaliases/gram.y: Use long options. Implement --version * wydawca/wydawca.c, jabberd/main.c: Use gsc_version to display program version. * doc/gsc.texi: Update * bootstrap: Add vasprintf

	git-svn-id: file:///svnroot/wydawca/trunk@292 6bb4bd81-ecc2-4fd4-a2d4-9571d19c0d33

	Allow to use "archive" outside of "directory"

	git-svn-id: file:///svnroot/wydawca/trunk@291 6bb4bd81-ecc2-4fd4-a2d4-9571d19c0d33

	Update

	git-svn-id: file:///svnroot/wydawca/trunk@290 6bb4bd81-ecc2-4fd4-a2d4-9571d19c0d33

	Update

	git-svn-id: file:///svnroot/wydawca/trunk@289 6bb4bd81-ecc2-4fd4-a2d4-9571d19c0d33

	Log final statistics

	git-svn-id: file:///svnroot/wydawca/trunk@288 6bb4bd81-ecc2-4fd4-a2d4-9571d19c0d33

2007-08-23  Sergey Poznyakoff  <gray@gnu.org.ua>

	Update

	git-svn-id: file:///svnroot/wydawca/trunk@287 6bb4bd81-ecc2-4fd4-a2d4-9571d19c0d33

	Improve safety checks; implement symlink/rmsymlink/archive directives; Fix directive signature verification.

	git-svn-id: file:///svnroot/wydawca/trunk@286 6bb4bd81-ecc2-4fd4-a2d4-9571d19c0d33

2007-08-22  Sergey Poznyakoff  <gray@gnu.org.ua>

	Update

	git-svn-id: file:///svnroot/wydawca/trunk@285 6bb4bd81-ecc2-4fd4-a2d4-9571d19c0d33

	Implement all directives

	git-svn-id: file:///svnroot/wydawca/trunk@284 6bb4bd81-ecc2-4fd4-a2d4-9571d19c0d33

2007-08-21  Sergey Poznyakoff  <gray@gnu.org.ua>

	Implement archiving and backups

	git-svn-id: file:///svnroot/wydawca/trunk@282 6bb4bd81-ecc2-4fd4-a2d4-9571d19c0d33

2007-08-20  Sergey Poznyakoff  <gray@gnu.org.ua>

	* jabberd/Makefile.am, cvs/Makefile.am, ckaliases/Makefile.am, acinclude.m4, Makefile.am: Add copyright statements * wydawca/sql.c (trim_length): Move to verify.c * wydawca/verify.c (trim_length, trim) (check_access_rights): New functions (expand_param): Export (verify_triplet): Call verify_directive_format and check_access_rights * wydawca/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 * wydawca/gpg.c (wydawca_gpg_homedir): Return a meaningful value (verify_directive_signature): Call directive_parse * wydawca/process.c (parse_file_name): Return void * wydawca/directive.c: New file * wydawca/diskio.c: New file * wydawca/triplet.c (triplet_processor): Call process_directives (enumerate_triplets): Arg is not const * wydawca/Makefile.am: Add new sources * configure.ac: Check for sendfile

	git-svn-id: file:///svnroot/wydawca/trunk@281 6bb4bd81-ecc2-4fd4-a2d4-9571d19c0d33

	* jabberd/jabberd.h (getmaxfd): moved to gsc.h * jabberd/main.c (stderr_printer): Minor fix * wydawca/triplet.c (triplet_processor): Minor fix * wydawca/verify.c (verify_triplet): Save owner gid in reg. Call verify_detached_signature * wydawca/wydawca.h (struct file_register): New member gid. (verify_detached_signature): New function * wydawca/gpg.c (verify_detached_signature): New function * lib/Makefile.am: Add userprivs.c * lib/userprivs.c: New file

	git-svn-id: file:///svnroot/wydawca/trunk@280 6bb4bd81-ecc2-4fd4-a2d4-9571d19c0d33

2007-08-19  Sergey Poznyakoff  <gray@gnu.org.ua>

	New module: wydawca

	git-svn-id: file:///svnroot/wydawca/trunk@279 6bb4bd81-ecc2-4fd4-a2d4-9571d19c0d33

2007-09-01  Sergey Poznyakoff  <gray@gnu.org.ua>

	 "default layout"

	git-svn-id: file:///svnroot/wydawca/trunk@1 6bb4bd81-ecc2-4fd4-a2d4-9571d19c0d33

Local Variables:
mode: change-log
version-control: never
buffer-read-only: t
End:
