summaryrefslogtreecommitdiffabout
authorSergey Poznyakoff <gray@gnu.org.ua>2009-02-16 11:43:49 (GMT)
committer Sergey Poznyakoff <gray@gnu.org.ua>2009-02-16 11:43:49 (GMT)
commit98ca4bb1bc96cc95bdd141cb653b17029957de38 (patch) (side-by-side diff)
treecca982b4a53adff9f5e410e779a88741032ccfb4
parentb0f10ec7274144b4e048953b11f2a4d98e055810 (diff)
downloadwydawca-98ca4bb1bc96cc95bdd141cb653b17029957de38.tar.gz
wydawca-98ca4bb1bc96cc95bdd141cb653b17029957de38.tar.bz2
Update etc/wydawca.rc to the new format
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--etc/Makefile.am4
-rw-r--r--etc/messages.rc212
-rw-r--r--etc/wydawca.rc328
3 files changed, 260 insertions, 284 deletions
diff --git a/etc/Makefile.am b/etc/Makefile.am
index 7fc8238..2e6ac3e 100644
--- a/etc/Makefile.am
+++ b/etc/Makefile.am
@@ -1,5 +1,5 @@
# This file is part of Wydawca
-# Copyright (C) 2007 Sergey Poznyakoff
+# Copyright (C) 2007, 2009 Sergey Poznyakoff
#
# Wydawca is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -14,7 +14,7 @@
# You should have received a copy of the GNU General Public License
# along with Wydawca. If not, see <http://www.gnu.org/licenses/>.
-EXTRA_DIST=wydawca.rc messages.rc
+EXTRA_DIST=wydawca.rc
install-data-local:
@test -d $(DESTDIR)$(sysconfdir) || \
diff --git a/etc/messages.rc b/etc/messages.rc
deleted file mode 100644
index ee43499..0000000
--- a/etc/messages.rc
+++ b/dev/null
@@ -1,212 +0,0 @@
-# Configurable email notifications for Wydawca.
-# Copyright (C) 2007 Sergey Poznyakoff
-#
-# Wydawca is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the Free
-# Software Foundation; either version 3 of the License, or (at your option)
-# any later version.
-#
-# Wydawca is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with wydawca. If not, see <http://www.gnu.org/licenses/>.
-
-# An identifier following each `define-message' keyword is used to
-# refer to that message template from the main configuration file
-# (see `notify-event' and `mail-admin-stat' statements in wydawca.rc
-#
-# See `info wydawca templates', for more information.
-
-
-#############################################################################
-# A template for statistic reports
-#############################################################################
-
-define-message admin-stat
-Subject: Wydawca stats
-
-This is to notify you that the run of wydawca on %{date}
-caused the following results:
-
-errors ............................. %{stat:errors}
-warning ............................ %{stat:warnings}
-bad signatures ..................... %{stat:bad_signatures}
-access violation attempts .......... %{stat:access_violations}
-complete triplets .................. %{stat:complete_triplets}
-incomplete triplets ................ %{stat:incomplete_triplets}
-bad triplets ....................... %{stat:bad_triplets}
-expired triplets ................... %{stat:expired_triplets}
-triplet successes .................. %{stat:triplet_success}
-files uploaded ..................... %{stat:uploads}
-files archived ..................... %{stat:archives}
-symlinks created ................... %{stat:symlinks}
-symlinks removed ................... %{stat:rmsymlinks}
-
-Regards,
-Wydawca
-end
-
-
-#############################################################################
-# A template for user success notification
-#############################################################################
-
-define-message user-success
-Subject: Upload of %{project} successful
-
-Upload of %{project} to %{dir} finished successfully. Files uploaded:
-
-%{triplet:upload}
-
-Regards,
-Wydawca
-The Project Submission Robot
-end
-
-
-#############################################################################
-# A template for project admin success notification.
-#############################################################################
-
-define-message owner-success
-Subject: Upload of %{project} successful
-
-%{user:real-name} (%{user:email}) successfully uploaded files
-for %{project} to %{dir}. Files uploaded:
-
-%{triplet:upload}
-
-Regards,
-Wydawca
-The Project Submission Robot
-end
-
-
-#############################################################################
-# A template for bad-ownership notification. It is send to the project
-# admins, if someone non authorized attempted to upload some files for
-# the project they run.
-#############################################################################
-
-define-message bad-ownership
-Subject: Suspicious upload of %{project}
-
-Someone not authorized to make releases for %{project}
-has attempted to upload the following files to %{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
-end
-
-
-#############################################################################
-# Notification about a bad directive signature. To be sent to the user.
-# It may be a good idea not to notify users about such events, just to
-# stay on a safe side. Notifying project admins will be quite enough.
-#############################################################################
-
-define-message user-bad-directive-signature
-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
-end
-
-
-#############################################################################
-# Notification about a bad directive signature. To be sent to the project
-# admins.
-# See the previous comment
-#############################################################################
-
-define-message owner-bad-directive-signature
-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
-end
-
-
-#############################################################################
-# Notification about a bad detached signature. To be sent to the user.
-# It may be a good idea not to notify users about such events, just to
-# stay on a safe side. Notifying project admins will be quite enough.
-#############################################################################
-
-define-message user-bad-detached-signature
-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
-end
-
-
-#############################################################################
-# Notification about a bad detached signature. To be sent to the project
-# admins.
-# See the previous comment
-#############################################################################
-
-define-message owner-bad-detached-signature
-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
-end
-
-# End of file
-
diff --git a/etc/wydawca.rc b/etc/wydawca.rc
index 22adf9e..c722fa6 100644
--- a/etc/wydawca.rc
+++ b/etc/wydawca.rc
@@ -1,76 +1,90 @@
-# A sample configuration file for Wydawca
-# Copyright (C) 2007 Sergey Poznyakoff
-#
-# Wydawca is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the Free
-# Software Foundation; either version 3 of the License, or (at your option)
-# any later version.
-#
-# Wydawca is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with wydawca. If not, see <http://www.gnu.org/licenses/>.
+/* A sample configuration file for Wydawca
+ Copyright (C) 2007, 2009 Sergey Poznyakoff
+
+ Wydawca is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation; either version 3 of the License, or (at your option)
+ any later version.
+
+ Wydawca is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with wydawca. If not, see <http://www.gnu.org/licenses/>. */
# Configure logging via syslog.
-# Fror more info, run `info wydawca syslog'.
-syslog-facility local1
-syslog-tag wydawca
-syslog-print-priority yes
+# For more info, run `info wydawca syslog'.
+syslog {
+ facility local1;
+ tag wydawca;
+ print-priority yes;
+}
# Enable statistics output at the end of the run.
-# Fror more info, run `info wydawca statistics'.
-statistics all
+# For more info, run `info wydawca statistics'.
+statistics all;
-# Remove any stray file that is more than an hour old.
-file-sweep-time 1 hour
+# Remove any stray files that are more than an hour old.
+file-sweep-time "1 hour";
# Set default umask
-umask 022
+umask 022;
+
# Set the name of the tar binary. This is optional.
# See `info wydawca archivation', for more info.
-tar-program /bin/tar
+tar-program "/bin/tar";
# Configure SQL databases.
# See `info wydawca sql'.
-sql default
- host localhost:/tmp/mysql.sock
- database savane
- user savane
- password guessme
-end
-
-
+sql default {
+ host "localhost:/tmp/mysql.sock";
+ database "savane";
+ user "savane";
+ password "guessme";
+}
+
#############################################################################
# Configure access methods.
# Run `info wydawca access', for the detailed description of these.
# The provided ones use Savane database structure.
#############################################################################
-project-owner sql default SELECT user.email, user.realname \
- FROM user,user_group,groups \
- WHERE user_group.user_id=user.user_id \
- AND user_group.group_id=groups.group_id \
- AND user_group.admin_flags = 'A' \
- AND groups.unix_group_name='%p'
+access-method project-owner {
+ type sql;
+ params (default,
+ "SELECT user.email, user.realname "
+ "FROM user,user_group,groups "
+ "WHERE user_group.user_id=user.user_id "
+ "AND user_group.group_id=groups.group_id "
+ "AND user_group.admin_flags = 'A' "
+ "AND groups.unix_group_name='%p'");
+}
-user-data sql default SELECT email, realname \
- FROM user \
- WHERE user_name='%{user}'
+access-method user-data {
+ type sql;
+ params (default,
+ "SELECT email, realname FROM user WHERE user_name='%{user}'");
+}
-verify-user sql default SELECT user.user_name \
- FROM user,user_group,groups \
- WHERE user_group.user_id=user.user_id \
- AND user_group.group_id=groups.group_id \
- AND user_group.admin_flags = 'A' \
- AND groups.unix_group_name='%p' \
- AND user.user_name='%u'
+access-method verify-user {
+ type sql;
+ params (default,
+ "SELECT user.user_name "
+ "FROM user,user_group, groups "
+ "WHERE user_group.user_id=user.user_id "
+ "AND user_group.group_id=groups.group_id "
+ "AND user_group.admin_flags = 'A' "
+ "AND groups.unix_group_name='%p' AND user.user_name='%u'");
+}
-gpg-key sql default SELECT gpg_key FROM user WHERE user_name='%u'
+access-method gpg-key {
+ type sql;
+ params (default,
+ "SELECT gpg_key FROM user WHERE user_name='%u'");
+}
-
#############################################################################
# Configure your directory pairs.
# A directory pair defines where to look for input triplets, and where to
@@ -79,37 +93,211 @@ gpg-key sql default SELECT gpg_key FROM user WHERE user_name='%u'
# See `info wydawca directory', for a detailed explanation.
#############################################################################
-directory
- source /home/ftp/incoming/ftp
- destination /home/ftp/gnu
- archive directory /var/spool/archive numbered
-end
+directory ftp://your.domain.net {
+ source "/home/ftp/incoming/ftp";
+ destination "/home/ftp/gnu";
+ archive directory {
+ name "/var/spool/archive";
+ backup numbered;
+ }
+}
-
#############################################################################
# Configure email notifications
# See `info wydawca notification', for an explanation.
#############################################################################
-# Include statement is described in `info wydawca include'.
-include messages.rc
-
-admin-address root@localhost
-from-address wydawca@localhost
+admin-address "root@localhost";
+from-address "wydawca@localhost";
# See `info wydawca statreports'.
-mail-admin-stat admin-stat all
+mail-statistics {
+ statistics all;
+ message <<EOT
+Subject: Wydawca stats
+
+This is to notify you that the run of wydawca on %{date}
+caused the following results:
+
+errors ............................. %{stat:errors}
+warning ............................ %{stat:warnings}
+bad signatures ..................... %{stat:bad_signatures}
+access violation attempts .......... %{stat:access_violations}
+complete triplets .................. %{stat:complete_triplets}
+incomplete triplets ................ %{stat:incomplete_triplets}
+bad triplets ....................... %{stat:bad_triplets}
+expired triplets ................... %{stat:expired_triplets}
+triplet successes .................. %{stat:triplet_success}
+files uploaded ..................... %{stat:uploads}
+files archived ..................... %{stat:archives}
+symlinks created ................... %{stat:symlinks}
+symlinks removed ................... %{stat:rmsymlinks}
+
+Regards,
+Wydawca
+EOT;
+}
# See `info wydawca event'.
-notify-event success user user-success
-notify-event success owner owner-success
-notify-event bad-ownership owner bad-ownership
+# Notify the user about successful uploads
+notify-event {
+ event success;
+ recipient user;
+ message <<EOT
+Subject: Upload of %{project} successful
+
+Upload of %{project} to %{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 %{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 %{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}
-notify-event bad-directive-signature user user-bad-directive-signature
-notify-event bad-directive-signature owner owner-bad-directive-signature
+This upload has been ignored and the files removed.
-notify-event bad-detached-signature user user-bad-detached-signature
-notify-event bad-detached-signature owner owner-bad-detached-signature
+Regards,
+Wydawca
+The Project Submission Robot
+EOT;
+}
# End of configuration file

Return to:

Send suggestions and report system problems to the System administrator.