Age | Commit message (Collapse) | Author | Files |
|
|
|
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.
|
|
* doc/Config: Rewrite.
* doc/Makefile.am: Use Makeinfo 5 instead of texi2htm
* doc/gendocs_template: Ps is not built
* grecs: Upgrade.
* imprimatur: Upgrade.
|
|
* 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.
|
|
* configure.ac: Use subdir-objects Automake option.
* doc/Config: Put search form into the menu.
* doc/Makefile.am (check-sub-config): Fix sed expression.
|
|
|
|
* 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.
|
|
Use WY_ prefix for configuration macros & variables.
|
|
* doc/wydawca.texi: Document the use of -d together with -t.
* src/update-2.0.awk: Remove.
* src/Makefile.am: Update.
|
|
|
|
* 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.
|
|
|
|
* 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
|
|
* 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.
|
|
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.
|
|
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.
|
|
syslog_tag -> wy_syslog_tag
log_facility -> wy_log_facility
log_to_stderr -> wy_log_to_stderr
|
|
* 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.
|
|
Rename logmsg to wy_log.
|
|
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.
|
|
|
|
* .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.
|
|
* 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.
|
|
* 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.
|
|
|
|
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
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.
|
|
* 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.
|
|
* 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.
|
|
|
|
* tests/testsuite.at (AT_SORT_PREREQ): New macro.
* tests/upload-dry.at: Avoid dependency on the sort order.
|
|
* 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.
|
|
* configure.ac: Use AC_SYS_LARGEFILE.
* grecs: Upgrade.
* src/wydawca.c (main): Check GPGME version.
|
|
|
|
|
|
|
|
* 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 :(
|
|
* src/wydawca.c: Setup MU streams properly.
|
|
|
|
* 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.
|
|
|
|
* 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.
|
|
* 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.
|
|
|