aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2010-01-02 13:22:20 +0200
committerSergey Poznyakoff <gray@gnu.org.ua>2010-01-02 13:22:20 +0200
commita510f517e1aff073e6b37a5fa9e8ed825de836af (patch)
tree426c03127fadf2b4b5c505b8b6af645160120149
parentc8b326ef70fbfc06483ae249219a1d4ab09c8bfe (diff)
downloadwydawca-a510f517e1aff073e6b37a5fa9e8ed825de836af.tar.gz
wydawca-a510f517e1aff073e6b37a5fa9e8ed825de836af.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 * etc/notify.rc: Update. * mailstats.at: Update. * notify-upl.at: Update. * upload-dry.at: Update. * upload.at: Update.
-rw-r--r--tests/etc/notify.rc14
-rw-r--r--tests/mailstats.at1
-rw-r--r--tests/notify-upl.at1
-rw-r--r--tests/upload-dry.at1
-rw-r--r--tests/upload.at1
5 files changed, 11 insertions, 7 deletions
diff --git a/tests/etc/notify.rc b/tests/etc/notify.rc
index ff43f46..528d8f5 100644
--- a/tests/etc/notify.rc
+++ b/tests/etc/notify.rc
@@ -21,13 +21,13 @@ notify-event {
message <<EOT
Subject: Upload of ${project} successful
Upload of ${project} to ${url}/${dir} finished successfully.
Files uploaded:
-${triplet:upload}
+${triplet:ls:upload}
Regards,
Wydawca
The Project Submission Robot
EOT;
}
@@ -39,13 +39,13 @@ notify-event {
message <<EOT
Subject: Upload of ${project} successful
${user:real-name} (${user:email}) successfully uploaded files
for ${project} to ${url}/${dir}. Files uploaded:
-${triplet:upload}
+${triplet:ls:upload}
Regards,
Wydawca
The Project Submission Robot
EOT;
}
@@ -58,13 +58,13 @@ notify-event {
message <<EOT
Subject: Suspicious upload of ${project}
Someone not authorized to make releases for ${project}
has attempted to upload the following files to ${url}/${dir}:
-${triplet:full}
+${triplet:ls:full}
This upload has been ignored and the files removed. The person who attempted
the upload was ${user:real-name}, user name ${user:name}, email ${user:email}.
If you think this is an error and wish this user to be authorized to make
releases for ${project}, please contact <puszcza-hackers@gnu.org.ua>.
Otherwise, let us know so we could undertake appropriate measures.
@@ -87,13 +87,13 @@ notify-event {
Subject: Suspicious upload of ${project}
Someone (apparently you), has tried to make a release for ${project}.
However, the signature of the directive file was wrong, which looks
suspicious. The person uploaded the following files:
-${triplet:full}
+${triplet:ls:full}
This upload has been ignored and the files removed. If it was you who
attempted this upload, please make sure you use the right PGP key and
try again. If not, please let us know as soon as possible, so we can
track down the person trying to make believe he is you.
@@ -112,13 +112,13 @@ notify-event {
Subject: Suspicious upload of ${project}
${user:real-name} (${user:email}) has tried to make a release
for ${project}. However, the signature of the directive file was wrong,
which looks suspicious. The person uploaded the following files:
-${triplet:full}
+${triplet:ls:full}
This upload has been ignored and the files removed.
Regards,
Wydawca
The Project Submission Robot
@@ -137,13 +137,13 @@ notify-event {
Subject: Suspicious upload of ${project}
Someone (apparently you), has tried to make a release for ${project}.
However, the detached signature signature was wrong, which looks
suspicious. The person uploaded the following files:
-${triplet:full}
+${triplet:ls:full}
This upload has been ignored and the files removed. If it was you who
attempted this upload, please make sure you use the right PGP key and
try again. If not, please let us know as soon as possible, so we can
track down the person trying to make believe he is you.
@@ -162,13 +162,13 @@ notify-event {
Subject: Suspicious upload of ${project}
${user:real-name} (${user:email}) has tried to make a release
for ${project}. However, the detached signature file was wrong,
which looks suspicious. The person uploaded the following files:
-${triplet:full}
+${triplet:ls:full}
This upload has been ignored and the files removed.
Regards,
Wydawca
The Project Submission Robot
diff --git a/tests/mailstats.at b/tests/mailstats.at
index 370f1f9..7722bab 100644
--- a/tests/mailstats.at
+++ b/tests/mailstats.at
@@ -29,12 +29,13 @@ wydawca: [[INFO]] bad triplets: 0
wydawca: [[INFO]] expired triplets: 0
wydawca: [[INFO]] triplet successes: 1
wydawca: [[INFO]] files uploaded: 2
wydawca: [[INFO]] files archived: 0
wydawca: [[INFO]] symlinks created: 0
wydawca: [[INFO]] symlinks removed: 0
+wydawca: [[INFO]] check failures: 0
wydawca: [[NOTICE]] AT_PACKAGE_TARNAME (AT_PACKAGE_NAME AT_PACKAGE_VERSION) finished
])
AT_DATA([expout],
[-F wydawca-noreply@localhost root@localhost
=========
diff --git a/tests/notify-upl.at b/tests/notify-upl.at
index 1512ed8..73283cc 100644
--- a/tests/notify-upl.at
+++ b/tests/notify-upl.at
@@ -29,12 +29,13 @@ wydawca: [[INFO]] bad triplets: 0
wydawca: [[INFO]] expired triplets: 0
wydawca: [[INFO]] triplet successes: 1
wydawca: [[INFO]] files uploaded: 2
wydawca: [[INFO]] files archived: 0
wydawca: [[INFO]] symlinks created: 0
wydawca: [[INFO]] symlinks removed: 0
+wydawca: [[INFO]] check failures: 0
wydawca: [[NOTICE]] AT_PACKAGE_TARNAME (AT_PACKAGE_NAME AT_PACKAGE_VERSION) finished
])
AT_DATA([outtmpl],
[-F wydawca-noreply@localhost proj-owner@localhost
=========
diff --git a/tests/upload-dry.at b/tests/upload-dry.at
index d892b00..39772b3 100644
--- a/tests/upload-dry.at
+++ b/tests/upload-dry.at
@@ -41,12 +41,13 @@ wydawca: [[INFO]] bad triplets: 0
wydawca: [[INFO]] expired triplets: 0
wydawca: [[INFO]] triplet successes: 1
wydawca: [[INFO]] files uploaded: 2
wydawca: [[INFO]] files archived: 0
wydawca: [[INFO]] symlinks created: 0
wydawca: [[INFO]] symlinks removed: 0
+wydawca: [[INFO]] check failures: 0
wydawca: [[NOTICE]] AT_PACKAGE_TARNAME (AT_PACKAGE_NAME AT_PACKAGE_VERSION) finished
])
AT_CHECK([
wydawca_init_testdirs
wydawca_config wydawca.rc
diff --git a/tests/upload.at b/tests/upload.at
index 78a2453..4bd9252 100644
--- a/tests/upload.at
+++ b/tests/upload.at
@@ -29,12 +29,13 @@ wydawca: [[INFO]] bad triplets: 0
wydawca: [[INFO]] expired triplets: 0
wydawca: [[INFO]] triplet successes: 1
wydawca: [[INFO]] files uploaded: 2
wydawca: [[INFO]] files archived: 0
wydawca: [[INFO]] symlinks created: 0
wydawca: [[INFO]] symlinks removed: 0
+wydawca: [[INFO]] check failures: 0
wydawca: [[NOTICE]] AT_PACKAGE_TARNAME (AT_PACKAGE_NAME AT_PACKAGE_VERSION) finished
])
AT_CHECK([
wydawca_init_testdirs
wydawca_config wydawca.rc

Return to:

Send suggestions and report system problems to the System administrator.