Age | Commit message (Collapse) | Author | Files |
|
given one.
|
|
|
|
* src/cmdline.opt: New option -l (--max-severity).
* src/verify.c (fill_project_name): Check directive file format
here.
* src/wydawca.c (wy_log_max_severity): New global.
(wy_vlog): Don't log the message if its severity is greater than
wy_log_max_severity.
* src/wydawca.h (wy_log_max_severity): New extern.
* src/directive.c (verify_directive_format): Rewrite.
Process the replace directive here.
* tests/Makefile.am: Add new file.
* tests/testsuite.at: Include new file.
* tests/atlocal.in (wy_create_directive): New option -c: create
initially empty file.
* tests/dry_run01.at: Update expected text.
* tests/upload01.at: Likewise.
* tests/upload04.at: Test whether replace directory works no
matter what its position relative to filename directive.
* tests/verify.at: New file.
* NEWS: Update.
* grecs: Update.
|
|
* NEWS: Document changes.
* configure.ac: Raise patchlevel number.
* src/directive.c (run_check_script): Remove improperly used static
qualifier.
* src/triplet.c: Fix indenting.
|
|
|
|
The temporary directory is removed when the script terminates.
* src/directive.c (run_check_script): Create a separate temporary
directory to run the script in.
* src/gpg.c (wy_rmdir_r, wy_tempdir): New functions.
* src/wydawca.h (wy_rmdir_r, wy_tempdir): New protos.
|
|
|
|
|
|
* 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.
|
|
|
|
* src/directive.c (directive_parse): Optimize two sequential directives
referring for filename and filename.sig
|
|
* 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.
|
|
* 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.
|
|
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.
|
|
|
|
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.
|
|
* 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.
|
|
|
|
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.
|
|
* 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.
|
|
|
|
|
|
* 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.
|
|
* 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.
|
|
Use grecs_txtacc.
|
|
|
|
|
|
* 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
|
|
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.
|
|
|
|
|
|
|
|
* 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.
|
|
* 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/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.
|
|
* 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.
|
|
* src/directive.c (run_check_script): Close stdin.
Call shell as "sh".
|
|
* 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.
|
|
* 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
|
|
Updated year in copyright statements.
|
|
* 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.
|
|
* 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.
|
|
|
|
* 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.
|
|
* 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.
|