summaryrefslogtreecommitdiffabout
path: root/tests/etc
authorSergey Poznyakoff <gray@gnu.org.ua>2009-02-19 00:33:23 (GMT)
committer Sergey Poznyakoff <gray@gnu.org.ua>2009-02-19 00:33:23 (GMT)
commit288ad3a8baf196011e791988b3251bbedb5f6cc2 (patch) (side-by-side diff)
tree5215a3a561eec921df9a68c978f56fd0eb9f51ac /tests/etc
parent8c4ab07dbf003ba07bec6e77fd803b9c54b91e52 (diff)
downloadwydawca-288ad3a8baf196011e791988b3251bbedb5f6cc2.tar.gz
wydawca-288ad3a8baf196011e791988b3251bbedb5f6cc2.tar.bz2
Lots of bugfixes + new testsuite
* 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.
Diffstat (limited to 'tests/etc') (more/less context) (ignore whitespace changes)
-rw-r--r--tests/etc/.gitignore1
-rw-r--r--tests/etc/Makefile.am2
-rw-r--r--tests/etc/notify.rc160
-rwxr-xr-xtests/etc/nullmail11
-rw-r--r--tests/etc/wydawca.rcin71
5 files changed, 244 insertions, 1 deletions
diff --git a/tests/etc/.gitignore b/tests/etc/.gitignore
index 8f61f97..fd62865 100644
--- a/tests/etc/.gitignore
+++ b/tests/etc/.gitignore
@@ -1,2 +1,3 @@
*.gpg
random_seed
+wydawca.rc
diff --git a/tests/etc/Makefile.am b/tests/etc/Makefile.am
index af7b28e..267beef 100644
--- a/tests/etc/Makefile.am
+++ b/tests/etc/Makefile.am
@@ -17,7 +17,7 @@
GPGFILES = secring.gpg pubring.gpg
noinst_DATA = @WYDAWCA_GPGFILES@
-EXTRA_DIST = pubring.asc secring.asc
+EXTRA_DIST = pubring.asc secring.asc wydawca.rcin
GPG_FLAGS = --quiet --no-permission-warning --homedir .
pubring.gpg secring.gpg: $(srcdir)/pubring.asc $(srcdir)/secring.asc
diff --git a/tests/etc/notify.rc b/tests/etc/notify.rc
new file mode 100644
index 0000000..00c6bda
--- a/dev/null
+++ b/tests/etc/notify.rc
@@ -0,0 +1,160 @@
+# Notify the user about successful uploads
+notify-event {
+ event success;
+ recipient user;
+ message <<EOT
+Subject: Upload of ${project} successful
+
+Upload of ${project} to ${url}/${dir} finished successfully.
+Files uploaded:
+
+${triplet:upload}
+
+Regards,
+Wydawca
+The Project Submission Robot
+EOT;
+}
+
+# Notify project admin about a successful upload.
+notify-event {
+ event success;
+ recipient owner;
+ message <<EOT
+Subject: Upload of ${project} successful
+
+${user:real-name} (${user:email}) successfully uploaded files
+for ${project} to ${url}/${dir}. Files uploaded:
+
+${triplet:upload}
+
+Regards,
+Wydawca
+The Project Submission Robot
+EOT;
+}
+
+# Notify project admin, if someone non authorized attempted to upload some
+# files for the project they run.
+notify-event {
+ event bad-ownership;
+ recipient owner;
+ 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}
+
+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.
+
+Regards,
+Wydawca
+The Project Submission Robot
+EOT;
+}
+
+# Notify the user (submitter), if the directive signature does not match
+# his record.
+# It may be a good idea not to notify users about such events, just to
+# stay on a safe side. Notifying project admins (see below) should be quite
+# enough.
+notify-event {
+ event bad-directive-signature;
+ recipient user;
+ message <<EOT
+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}
+
+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.
+
+Regards,
+Wydawca
+The Project Submission Robot
+EOT;
+}
+
+# Notify the project admin, if submitted directive signature did not match
+# submitter record.
+notify-event {
+ event bad-directive-signature;
+ recipient owner;
+ message <<EOT
+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}
+
+This upload has been ignored and the files removed.
+
+Regards,
+Wydawca
+The Project Submission Robot
+EOT;
+}
+
+# Notify the user (submitter), if the detached signature does not match
+# his record.
+# It may be a good idea not to notify users about such events, just to
+# stay on a safe side. Notifying project admins (see below) should be quite
+# enough.
+notify-event {
+ event bad-detached-signature;
+ recipient user;
+ message <<EOT
+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}
+
+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.
+
+Regards,
+Wydawca
+The Project Submission Robot
+EOT;
+}
+
+# Notify the project admin, if submitted detached signature did not match
+# submitter record.
+notify-event {
+ event bad-detached-signature;
+ recipient owner;
+ message <<EOT
+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}
+
+This upload has been ignored and the files removed.
+
+Regards,
+Wydawca
+The Project Submission Robot
+EOT;
+}
diff --git a/tests/etc/nullmail b/tests/etc/nullmail
new file mode 100755
index 0000000..55220a6
--- a/dev/null
+++ b/tests/etc/nullmail
@@ -0,0 +1,11 @@
+#! /bin/sh
+
+out=${1:-/dev/null}
+shift
+
+echo $* >> $out
+echo "=========" >> $out
+cat - >> $out
+echo "========="
+echo ""
+exit 0 \ No newline at end of file
diff --git a/tests/etc/wydawca.rcin b/tests/etc/wydawca.rcin
new file mode 100644
index 0000000..f8a8ce4
--- a/dev/null
+++ b/tests/etc/wydawca.rcin
@@ -0,0 +1,71 @@
+statistics all;
+
+umask 022;
+
+access-method project-owner {
+ type builtin;
+ query "${project}";
+ params ("/exact",
+ "proj", "proj-owner@localhost", "Project Admin");
+}
+
+access-method user-data {
+ type builtin;
+ query "${user}";
+ params ("/exact",
+ "@USER@", "@USER@@localhost", "Wydawca Test User");
+}
+
+access-method verify-user {
+ type builtin;
+ query "${user}";
+ params ("/exact",
+ "@USER@", "@USER@");
+}
+
+access-method gpg-key {
+ type builtin;
+ query "${user}";
+ params ("/exact",
+ "@USER@",
+"-----BEGIN PGP PUBLIC KEY BLOCK-----\n"
+"Version: GnuPG v1.4.7 (GNU/Linux)\n"
+"\n"
+"mQGhBEmZcTERBAD9sD9d3xhVHURwbLcHUHIK6LGSHAlFzKv4MSOk+6nJhdvbQfIV\n"
+"YAe6VZ8fTX8EX7f0Vw53or1mlBOZpMNeEHp/IejFwnT3pAF3xiHTwbmwJg+0RuKo\n"
+"dwfN0vO9xECj3/ZsBvSYbYty8Vmy2e8osrNdXAXd+8Z3xJ3reAWOujGj9wCg1qg5\n"
+"1LJgEIbPdZm0Iv43Pvdzbi8EAMlW6oZuBFuQXf0e2NceZKrZvGjFDWLgIgHvLmXb\n"
+"0d+7kmLgCwJ2J7byOAnKQ8eu/1+V3WYvYd6Scut3809J8Cx5KhEbwuZLx/V4yUUW\n"
+"S2SjFV4i+5qqvPwrgGezd5Cus5qxkOabXitG8EccQe0k8lh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n"
+"P2O3QX5lg75nEzdUmHyP+yTlSjHTPf7qaRx9UPpnf7r9t/IcjkXAMu6Y2LMgfbTA\n"
+"qVoOxiH7h8CeNXaVg8QF2cHGdwGLDvZ3X+Vtck/LjjdmHxiiiEkEGBECAAkFAkmZ\n"
+"cTECGwwACgkQCZA3/2YT9iOTCwCeNckYjNiatFHHlOqph3N5hYmix6MAnRPeCkG4\n"
+"BBXnlxcgH/vqaSpx7Fgr\n"
+"=gYgX\n"
+"-----END PGP PUBLIC KEY BLOCK-----\n");
+}
+
+directory ftp://wydawca.test {
+ source "@WD_SRC@";
+ destination "@WD_DST@";
+ archive none;
+}
+
+from-address "wydawca-noreply@localhost";
+
+mailer "| @WD_CONFSRC@/nullmail @WD_DST@/mail.out -F ${sender} ${rcpt}"; \ No newline at end of file

Return to:

Send suggestions and report system problems to the System administrator.