path: root/tests
AgeCommit message (Collapse)AuthorFiles
2019-07-24Use wordsplit to expand variables in strings.HEADmasterSergey Poznyakoff1
* NEWS: Raise version number. * 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/ (AM_CPPFLAGS): Modify, * modules/mailutils/mod_mailutils.c: Update. * src/ (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-22Finish mod_logstat implementation. Document it.Sergey Poznyakoff1
* 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.
2019-07-20Create backup storage directories.Sergey Poznyakoff2
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. 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/ Fix expected output.
2019-07-16Fix testsuite when run as rootSergey Poznyakoff11
2019-07-16More fixes in testsuiteSergey Poznyakoff1
* tests/ (wydawca_expandmeta): Use -e option.
2019-07-16Follow-up to the previous commitSergey Poznyakoff1
* tests/ Replace a left-over usage of @USER@.
2019-07-16Testsuite fixesSergey Poznyakoff2
* tests/ Uploader name is fixed. Remove erroneous use of @USER@. * tests/ Likewise.
2019-07-15Switch to grecs eb66a000Sergey Poznyakoff6
2019-07-15Version 2.99.92Sergey Poznyakoff29
2017-11-11Fix build with mailutils 3.4Sergey Poznyakoff11
* (ACLOCAL_AMFLAGS): Add am. * NEWS: Update. * am/mailutils.m4: New file. A fixed version of upstream mailutils.m4 * Require mailutils 3.3. Raise patchlevel. * tests/nullmail.c: New file. * tests/.gitignore: Add nullmail * tests/ Build nullmail * tests/etc/nullmail: Remove * tests/etc/ Remove nullmail script. * tests/ (WY_TESTDIR): New variable. * tests/ Use new nullmail tool. Update expected output. * tests/ Likewise. * tests/ Likewise. * tests/etc/mailstats.rcin: Fix mailer command line. * tests/etc/notify.rcin: Likewise.
2017-01-02Happy GNU YearSergey Poznyakoff27
2014-06-13Bugfixes.Sergey Poznyakoff1
* 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/ Add a unique keyword.
2013-03-12Namespace normalization (3)Sergey Poznyakoff12
Use WY_ prefix for configuration macros & variables.
2013-03-12Raise version number to 2.99.90Sergey Poznyakoff1
2013-03-12Namespace normalization (2). Provide installable headers.Sergey Poznyakoff1
* (SUBDIRS): Add include. * Build include/*/Makefile Set-up grecs as a shared convenience library. Install its headers. * include/ New file. * include/wydawca/ New file. * include/wydawca/cfg.h: New file. * include/wydawca/wydawca.h: New file. * modules/mailutils/ (AM_CPPFLAGS): Add include/ * src/ (LDADD): Use @GRECS_LDADD@ (AM_CPPFLAGS): Add include/. * tests/ 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
2013-03-12Enable notification tests conditionally.Sergey Poznyakoff5
The tests are enabled only if the mailutils module is built. * (WD_MAILUTILS): New subst variable. * tests/ (WD_MAILUTILS): New variable. * tests/ (AT_MAILUTILS_PREREQ): New macro. * tests/ Skip the test if mailutils is not configured. * tests/ Likewise. * tests/ 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-11Follow up to 87602f54.Sergey Poznyakoff9
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/ (wydawca_expandmeta): Expand @WD_MODDIR@ * tests/ Create notify.rc from notify.rcin * tests/ Likewise. * tests/ Likewise. * tests/ 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/ Update. * tests/etc/wydawca.rcin: Update to the new syntax.
2013-02-26Introduce loadable modules.Sergey Poznyakoff1
* .gitignore: Update. * Require libtool Require Grecs tree-api. * Incorporate libtool * bootstrap: Create m4 if it does not exist. * doc/ Use texi2html * grecs: Upgrade * src/module.c: New file. * src/ (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.
2012-12-29Use AM_CPPFLAGS instead of the INCLUDES in Makefiles.Sergey Poznyakoff1
2012-05-27Bugfix in testsuite.Sergey Poznyakoff2
* tests/ (AT_SORT_PREREQ): New macro. * tests/ Avoid dependency on the sort order.
2012-05-27Implement upload directives version 1.2Sergey Poznyakoff16
* 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/ New file. * tests/ New file. * tests/ New file. * tests/ (TESTSUITE_AT): Add new files. * tests/ (wydawca_upload): Change invocation. All uses updated. (wydawca_cmparc): New function. * tests/ Update. * tests/ Update. * tests/ Update. * tests/dist/file12f.directive.asc: New file. * tests/dist/file12t.directive.asc: New file. * tests/etc/wydawca.rcin (test): Define "archive" clause. * tests/ Update. * tests/ Update. * tests/ Include new files. * tests/ Update. * tests/ Update.
2011-06-23Bugfixes.Sergey Poznyakoff1
* grecs: Update. * src/config.c (config_help): Use grecs_print_* functions. * src/diskio.c (copy_file): Fix diagnostic message. * tests/ Forgotten to commit :(
2011-05-13Update copyright yearsSergey Poznyakoff22
2011-05-13Drop gnulib.Sergey Poznyakoff7
* bootstrap: Rewrite. * bootstrap.conf: Remove. * 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/ New file. * tests/ New file. * tests/ New file. * tests/ New file. * tests/ Add new tests. * tests/ Add new tests. * grecs: Update.
2011-05-10Remove save-cwd.Sergey Poznyakoff5
* src/pushd.c: New file. * src/ 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/ New file. * tests/ Add * tests/ Likewise. * tests/.gitignore: Add pushck.
2010-01-02Minor fixesSergey Poznyakoff2
* src/wydawca.c (stat_kwname): New keyword stat:check-failures. * doc/wydawca.texi: Document stat:check-failures counter * tests/, tests/ Update.
2010-01-02$- construct (similar to m4's dnl).Sergey Poznyakoff1
* 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.
2010-01-02Add testcases for distribution tarball checking.Sergey Poznyakoff12
* src/directive.c (run_check_script): Reword diagnostic messages. * tests/ New testcase. * tests/ New testcase. * tests/ New testcase. * tests/ Add new files. * tests/ Include new tests. * tests/ (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/, tests/, tests/ Update. * tests/ Update output template.
2010-01-02Implement distribution tarball checking.Sergey Poznyakoff5
* 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. *, NEWS: Version 2.0.90 * etc/notify.rc: Update. * Update. * Update. * Update. * Update.
2010-01-01Happy new year!Sergey Poznyakoff15
Updated year in copyright statements.
2009-12-21Namespace cleanup.Sergey Poznyakoff1
Rename "access method" to "dictionary". All sources affected. * src/method.c: renamed to... * src/dictionary.c: ... this.
2009-12-01Vershion 1.9.92Sergey Poznyakoff2
* (AUTOMAKE_OPTION): Remove. * Version 1.9.92 (AM_INIT_AUTOMAKE): Specify parameters. Enable silent rules. * NEWS: Update. * THANKS: New file. * tests/ update * tests/ update
2009-11-30Do not require uploaders to be present in the system passwd database.Sergey Poznyakoff5
* 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/, tests/, tests/, tests/ Update.
2009-11-30Minor fixes.Sergey Poznyakoff1
* tests/wsbatch.c: Fix diagnostics.
2009-04-20Switch to the Grecs submodule.Sergey Poznyakoff1
* gconf: Remove * (ACLOCAL_AMFLAGS): Add -I grecs/am. (SUBDIRS): Replace gconf with grecs (make-ChangeLog): Remove spurious rule. * bootstrap.conf: Init submodules. * Call GRECS_SETUP (AC_CONFIG_FILES): Add grecs/Makefile, grecs/src/Makefile. * src/wydawca.h: Include grecs.h * src/ (LDADD,INCLUDES): Refer to grecs. * tests/ Likewise. * src/cmdline.opt, src/config.c, src/diskio.c, src/tcpwrap.c, src/wydawca.c: Use grecs. * README-hacking: Update
2009-03-11Start writing wordsplit.Sergey Poznyakoff6
* doc/wydawca.texi: Update. * gconf/argcv.h, gconf/argcv.c: Remove. * gconf/wordsplit.c, gconf/wordsplit.h: New files. * gconf/ (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/ New file. * tests/wstest.c, tests/wsbatch.c: New files. * tests/ (TESTSUITE_AT): Add Build wstest and wsbatch. * tests/ Add
2009-02-25Fix testsuiteSergey Poznyakoff4
2009-02-24Implement lockingSergey Poznyakoff1
* src/lock.c: New file. * gnulib.modules (sysexits, xgethostname): New modules. * src/lock.c: New file. * src/ 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.
2009-02-23Initial implementation of daemon mode.Sergey Poznyakoff5
* 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/ (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/ Update.
2009-02-23Add missing i18n markersSergey Poznyakoff1
2009-02-22Rename directory_pair to spoolSergey Poznyakoff1
2009-02-21Implement timers and destination URLs.Sergey Poznyakoff1
* 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/ (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/ Update expected output.
2009-02-21Remove trailing whitespaceSergey Poznyakoff3
2009-02-21Implement per-directory notificationsSergey Poznyakoff1
* 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/ Define notifications before the directory pair in the configuration file.
2009-02-19Improve testsuiteSergey Poznyakoff10
* src/mail.c (mail_send_message): Fix diagnostics. (mail_stats): Bail out if admin_address is not defined. * tests/ New file. * tests/ (TESTSUITE_AT): Add * tests/ Add * tests/etc/mailstats.rc: New file. * tests/etc/ (EXTRA_DIST): Add missing files. * tests/etc/wydawca.rcin: Define admin-address, enforce newline at EOF. * tests/, tests/, tests/ Fix descriptions.
2009-02-19Lots of bugfixes + new testsuiteSergey Poznyakoff15
* 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/ (EXTRA_DIST): Add dist. (TESTSUITE_AT): Add new tests. * tests/ Update. * etc/.gitignore: Add wydawca.rc * tests/etc/ Add wydawca.rcin * tests/ 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/ New file. * tests/ New file. * tests/ New file.
2009-02-16Improve keyword (meta) expansion, add testsuite frameworkSergey Poznyakoff9
* src/meta.c: New file. * src/ (wydawca_SOURCES): Add meta.c. * (SUBDIRS): Add tests. * 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/ (check-options): Rewrite. * doc/wydawca.texi: Mark unrevised/obsolete material. * tests/: New directory

Return to:

Send suggestions and report system problems to the System administrator.