aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)AuthorFiles
2009-02-23Add missing i18n markersSergey Poznyakoff13
2009-02-23Switch to user privileges while processing the tripletSergey Poznyakoff5
2009-02-22Minor fixesSergey Poznyakoff2
2009-02-22Remove sendfile supportSergey Poznyakoff5
2009-02-22Allow to select spools from the command lineSergey Poznyakoff4
2009-02-22Rename directory_pair to spoolSergey Poznyakoff13
2009-02-22Allow to specify UIDs of the users whose uploads are to be processed.Sergey Poznyakoff4
* 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.
2009-02-22BugfixSergey Poznyakoff1
* etc/wydawca.rc: Fix syntax errors. * src/wydawca.c: Remove leftover function.
2009-02-22Minor improvementsSergey Poznyakoff9
* 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-21Implement timers and destination URLs.Sergey Poznyakoff12
* 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.
2009-02-21Remove trailing whitespaceSergey Poznyakoff17
2009-02-21Change definition of archive_file to match this of rmsymlink_fileSergey Poznyakoff3
2009-02-21Implement per-directory notificationsSergey Poznyakoff6
* 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 Poznyakoff5
* 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-18Various fixesSergey Poznyakoff3
2009-02-17Begin rewriting method systemSergey Poznyakoff14
* 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.
2009-02-17Add missing optionsSergey Poznyakoff1
2009-02-16Improve keyword (meta) expansion, add testsuite frameworkSergey Poznyakoff9
* 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
2009-02-16Improve argument parsingSergey Poznyakoff10
* 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.
2009-02-16BugfixesSergey Poznyakoff2
2009-02-16Rewrite configuration parser, drop dependency on GSCSergey Poznyakoff13
* 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-13Move to GitSergey Poznyakoff1
* 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-24BugfixesSergey Poznyakoff1
* 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-23Version 1.2Sergey Poznyakoff6
* 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-17BugfixSergey Poznyakoff1
git-svn-id: file:///svnroot/wydawca/trunk@334 6bb4bd81-ecc2-4fd4-a2d4-9571d19c0d33
2009-01-17Version 1.1Sergey Poznyakoff1
git-svn-id: file:///svnroot/wydawca/trunk@332 6bb4bd81-ecc2-4fd4-a2d4-9571d19c0d33
2009-01-17Fix handling of the symlink directive.Sergey Poznyakoff1
* 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* src/wydawca.c (logstats_): Log detailed statistics only if Sergey Poznyakoff1
at least one counter is not zero. git-svn-id: file:///svnroot/wydawca/trunk@328 6bb4bd81-ecc2-4fd4-a2d4-9571d19c0d33
2008-08-22Normalize use of sendfile(2).Sergey Poznyakoff4
* 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-14* src/wydawca.h (register_message_template): New prototype.Sergey Poznyakoff7
* 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-09-23* src/verify.c: Add a fixme commentSergey Poznyakoff2
* 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-07UpdateSergey Poznyakoff15
git-svn-id: file:///svnroot/wydawca/trunk@319 6bb4bd81-ecc2-4fd4-a2d4-9571d19c0d33
2007-09-06UpdateSergey Poznyakoff2
git-svn-id: file:///svnroot/wydawca/trunk@318 6bb4bd81-ecc2-4fd4-a2d4-9571d19c0d33
2007-09-06Redo mail notificationsSergey Poznyakoff5
git-svn-id: file:///svnroot/wydawca/trunk@316 6bb4bd81-ecc2-4fd4-a2d4-9571d19c0d33
2007-09-05UpdateSergey Poznyakoff1
git-svn-id: file:///svnroot/wydawca/trunk@314 6bb4bd81-ecc2-4fd4-a2d4-9571d19c0d33
2007-09-05UpdateSergey Poznyakoff2
git-svn-id: file:///svnroot/wydawca/trunk@312 6bb4bd81-ecc2-4fd4-a2d4-9571d19c0d33
2007-09-04UpdateSergey Poznyakoff2
git-svn-id: file:///svnroot/wydawca/trunk@311 6bb4bd81-ecc2-4fd4-a2d4-9571d19c0d33
2007-09-04UpdateSergey Poznyakoff2
git-svn-id: file:///svnroot/wydawca/trunk@308 6bb4bd81-ecc2-4fd4-a2d4-9571d19c0d33
2007-09-01Initial move from GSCSergey Poznyakoff13
git-svn-id: file:///svnroot/wydawca/trunk@305 6bb4bd81-ecc2-4fd4-a2d4-9571d19c0d33
2007-08-26* wydawca/wydawca.h (struct file_triplet): New member userSergey Poznyakoff5
(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
2007-08-26Implement project owner notifications.Sergey Poznyakoff14
* 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-25Add copyright headerSergey Poznyakoff1
git-svn-id: file:///svnroot/wydawca/trunk@296 6bb4bd81-ecc2-4fd4-a2d4-9571d19c0d33
2007-08-25* configure.ac: Require mailutils for wydawcaSergey Poznyakoff15
* 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
2007-08-25Check access rights. Improve statisticsSergey Poznyakoff5
git-svn-id: file:///svnroot/wydawca/trunk@294 6bb4bd81-ecc2-4fd4-a2d4-9571d19c0d33
2007-08-24Print debug reporting email at the end of the help outputSergey Poznyakoff1
git-svn-id: file:///svnroot/wydawca/trunk@293 6bb4bd81-ecc2-4fd4-a2d4-9571d19c0d33
2007-08-24* lib/version.c: New fileSergey Poznyakoff2
* 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
2007-08-24Allow to use "archive" outside of "directory"Sergey Poznyakoff1
git-svn-id: file:///svnroot/wydawca/trunk@291 6bb4bd81-ecc2-4fd4-a2d4-9571d19c0d33
2007-08-24UpdateSergey Poznyakoff1
git-svn-id: file:///svnroot/wydawca/trunk@290 6bb4bd81-ecc2-4fd4-a2d4-9571d19c0d33
2007-08-24UpdateSergey Poznyakoff3
git-svn-id: file:///svnroot/wydawca/trunk@289 6bb4bd81-ecc2-4fd4-a2d4-9571d19c0d33

Return to:

Send suggestions and report system problems to the System administrator.