aboutsummaryrefslogtreecommitdiff
path: root/tests/notify-upl.at
AgeCommit message (Collapse)AuthorFiles
2020-04-23Rewrite the testsuite.Sergey Poznyakoff1
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.
2020-04-13Fix triplet processing in daemon mode.Sergey Poznyakoff1
* 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-09Change configuration file name to wydawca.confSergey Poznyakoff1
Configuration files in the testsuite use the ".cf" suffix.
2020-03-13Version 3.1release-3.1Sergey Poznyakoff1
2019-07-16Fix testsuite when run as rootSergey Poznyakoff1
2019-07-16Follow-up to the previous commitSergey Poznyakoff1
* tests/notify-upl.at: Replace a left-over usage of @USER@.
2019-07-16Testsuite fixesSergey Poznyakoff1
* tests/check-notify.at: Uploader name is fixed. Remove erroneous use of @USER@. * tests/notify-upl.at: Likewise.
2019-07-15Version 2.99.92Sergey Poznyakoff1
2017-11-11Fix build with mailutils 3.4Sergey Poznyakoff1
* 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-01-02Happy GNU YearSergey Poznyakoff1
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/notify-upl.at: Add a unique keyword.
2013-03-12Namespace normalization (3)Sergey Poznyakoff1
Use WY_ prefix for configuration macros & variables.
2013-03-12Enable notification tests conditionally.Sergey Poznyakoff1
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-11Follow up to 87602f54.Sergey Poznyakoff1
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.
2012-05-27Implement upload directives version 1.2Sergey Poznyakoff1
* 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.
2011-05-13Update copyright yearsSergey Poznyakoff1
2010-01-02Add testcases for distribution tarball checking.Sergey Poznyakoff1
* 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.
2010-01-02Implement distribution tarball checking.Sergey Poznyakoff1
* 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.
2010-01-01Happy new year!Sergey Poznyakoff1
Updated year in copyright statements.
2009-12-01Vershion 1.9.92Sergey Poznyakoff1
* 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
2009-11-30Do not require uploaders to be present in the system passwd database.Sergey Poznyakoff1
* 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.
2009-02-25Fix testsuiteSergey Poznyakoff1
2009-02-24Initial implementation of daemon mode.Sergey Poznyakoff1
* 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-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/notify-upl.at: Define notifications before the directory pair in the configuration file.
2009-02-19Improve testsuiteSergey Poznyakoff1
* 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.
2009-02-19Lots of bugfixes + new testsuiteSergey Poznyakoff1
* 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.

Return to:

Send suggestions and report system problems to the System administrator.