diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2010-01-02 13:15:46 +0200 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2010-01-02 13:15:46 +0200 |
commit | c8b326ef70fbfc06483ae249219a1d4ab09c8bfe (patch) | |
tree | a2d9e70949e357426e7c3088e1aa258b3a5dc45a /src/config.c | |
parent | e9ac07640150f7aac1805d1447e6b712464d1b48 (diff) | |
download | wydawca-c8b326ef70fbfc06483ae249219a1d4ab09c8bfe.tar.gz wydawca-c8b326ef70fbfc06483ae249219a1d4ab09c8bfe.tar.bz2 |
Implement distribution tarball checking.
* 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
Diffstat (limited to 'src/config.c')
-rw-r--r-- | src/config.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/config.c b/src/config.c index 51f2865..28734d0 100644 --- a/src/config.c +++ b/src/config.c @@ -150,6 +150,7 @@ static const char *event_args[] = { "bad-ownership", "bad-directive-signature", "bad-detached-signature", + "check-failure", NULL }; @@ -157,7 +158,8 @@ static int event_types[] = { ev_success, ev_bad_ownership, ev_bad_directive_signature, - ev_bad_detached_signature + ev_bad_detached_signature, + ev_check_fail }; ARGMATCH_VERIFY (event_args, event_types); @@ -1180,7 +1182,9 @@ static struct grecs_keyword spool_kw[] = { { "notify-event", NULL, N_("Configure notification"), grecs_type_section, NULL, offsetof(struct spool, notification), cb_notify_event, NULL, notify_event_kw }, - + { "check-script", NULL, N_("A /bin/sh script to verify the tarball"), + grecs_type_string, NULL, offsetof(struct spool, check_script) }, + { NULL } }; @@ -1457,6 +1461,9 @@ static struct grecs_keyword wydawca_kw[] = { grecs_type_section, default_dictionary, 0, cb_dictionary, NULL, dictionary_kw }, + { "check-script", NULL, N_("A /bin/sh script to verify tarballs"), + grecs_type_string, &default_check_script }, + { "spool", N_("tag: string"), N_("Define distribution spool"), grecs_type_section, NULL, 0, cb_spool, NULL, spool_kw }, |