diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2007-09-06 18:51:59 +0000 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2007-09-06 18:51:59 +0000 |
commit | 744d3ba681631fed3d8d06efe1ee3d61e174924e (patch) | |
tree | 3e7fa786ccdfe6dd39ba11ce200be35207291a7e | |
parent | 747e41693d7f2a808b3314cf82b3af38f98daf2d (diff) | |
download | wydawca-744d3ba681631fed3d8d06efe1ee3d61e174924e.tar.gz wydawca-744d3ba681631fed3d8d06efe1ee3d61e174924e.tar.bz2 |
Update
git-svn-id: file:///svnroot/wydawca/trunk@317 6bb4bd81-ecc2-4fd4-a2d4-9571d19c0d33
-rw-r--r-- | Makefile.am | 6 | ||||
-rw-r--r-- | configure.ac | 3 | ||||
-rw-r--r-- | doc/wydawca.texi | 133 | ||||
-rw-r--r-- | etc/Makefile.am | 34 |
4 files changed, 171 insertions, 5 deletions
diff --git a/Makefile.am b/Makefile.am index 0bc2a31..0fffb5a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,4 +1,8 @@ ACLOCAL_AMFLAGS = -I m4 AUTOMAKE_OPTIONS = gnu 1.8.5 -SUBDIRS=gnu lib src doc +SUBDIRS=gnu lib src doc etc + +# We never remove the contents of configuration directory +distuninstallcheck_listfiles = \ + find $(prefix) -type f -not -path '$(sysconfdir)/*' diff --git a/configure.ac b/configure.ac index e92c238..c5ffd1c 100644 --- a/configure.ac +++ b/configure.ac @@ -125,15 +125,16 @@ AH_BOTTOM([ # define __attribute__(x) #endif #ifndef GSC_PRINTFLIKE # define GSC_PRINTFLIKE(fmt,narg) __attribute__ ((__format__ (__printf__, fmt, narg))) #endif ]) AC_CONFIG_FILES([Makefile doc/Makefile gnu/Makefile lib/Makefile - src/Makefile]) + src/Makefile + etc/Makefile]) AC_OUTPUT diff --git a/doc/wydawca.texi b/doc/wydawca.texi index b313e4f..1f7ad70 100644 --- a/doc/wydawca.texi +++ b/doc/wydawca.texi @@ -1112,25 +1112,25 @@ The first argument supplies the identifier of a message template, which should be previously defined by a @code{define-message}. The rest of arguments is a list of statistics keywords as described in @ref{statistics}. The notification will be sent only if statistics counters for at least one of the requested categories are not zero. For example, the following statement requires sending notifications only if there ocurred any errors or access violation attempts, or any bad signature was uploaded: @smallexample mail-admin-stat stat-msg errors access-violations bad-signatures @end smallexample -@kwindex +@kwindex admin-address The recipient address for these notifications is set using @code{admin-address} statement. Its argument is either a single @acronym{RFC} 822 email address, or a comma-separated list of such addresses, e.g.: @smallexample admin-address root@@gnu.org.ua, ftp-adm@@gnu.org.ua @end smallexample @cindex meta-variables in admin notifications The meta-variables available for use in admin notifications are: @@ -1183,47 +1183,174 @@ warning ............................ %@{stat:warnings@} bad signatures ..................... %@{stat:bad_signatures@} access violation attempts .......... %@{stat:access_violations@} Regards, Wydawca end @end smallexample @node user notification @subsection User Notification @UNREVISED{} @cindex mail notification, project admin - Project administrators can be notified via email about any of the -following events: + Project administrators (@dfn{owners}) and/or users may recieve email +notifications about any of the following events: @table @code @kwindex success @item success Successfull upload. @kwindex bad-ownership @item bad-ownership An unauthorized user attempted to upload files for their project. @kwindex bad-directive-signature @item bad-directive-signature The directive signature does not match the public key of the uploader. @kwindex bad-detached-signature @item bad-detached-signature The detached signature does not match the public key of the uploader. @end table +@kwindex notify-event + These notifications are configured using the following statement: + +@smallexample +notify-event @var{event} @var{who} @var{msg-id} +@end smallexample + +@noindent +where @var{event} is one of the events described above, @var{msg-id} +is the identifier of a previously defined message template +(@pxref{templates}), and @var{who} determines who should receive the +notification. The following values for @var{who} are allowed: + +@table @code +@kwindex admin +@item admin +The system administrator. + +@kwindex owner +@item owner +Administrators of the project for which the files where uploaded. + +@kwindex user +@item user +A user who uploaded files. +@end table + + For example, the following two statements instruct @command{wydawca} +to email notifications about @code{bad-directive-signature} event to +project administrators and to the user who did the upload, using two +different templates: + +@smallexample +notify-event bad-directive-signature user user-bad-directive-signature +notify-event bad-directive-signature owner owner-bad-directive-signature +@end smallexample + + The following macro-variables may be used in templates for these +notifications: + +@table @code +@kwindex project +@item project +Project system name. + +@kwindex url +@acronym{URL} of the distribution site. + +@kwindex dir +Directory (relative to the project distribution root) to where the +files where uploaded. + +@kwindex dest-dir +Value of the @code{destination} keyword. + +@kwindex source-dir +Value of the @code{source} keyword. + +@kwindex triplet:full +@item triplet:full +Full listing of the uploaded triplet. It is equivalent to: + +@smallexample +@group +%@{triplet:dist@} +%@{triplet:sig@} +%@{triplet:dir@} +@end group +@end smallexample + +For example: + +@FIXME{example} + +@kwindex triplet:upload +@item triplet:upload +Listing of the uploaded files. + +@FIXME{example} + +@kwindex triplet:dist +@item triplet:dist +Listing of the main distribution file. + +@kwindex triplet:sig +@item triplet:sig +Listing of the detached signature file. + +@kwindex triplet:dir +@item triplet:dir +Listing of the directive file. + +@kwindex user +@kwindex user:name +@item user +@itemx user:name +System name of the user who uploaded the triplet. + +@kwindex user:real-name +@item user:real-name +Real name of the user who uploaded the triplet. + +@kwindex user:email +@item user:email +Email of the user who uploaded the triplet. +@end table + + The following example shows how to configure success notification +for the user: + +@smallexample +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 + +notify-event success user user-success +@end smallexample + @node wydawca.rc, invocation, configuring, Top @chapter @command{Wydawca} configuration file. @cindex configuration statements, reference This chapter contains a concise reference list of all configuration file statements. @deffn {Wydawca Statement} archive @var{type} @var{archive-name} @ [@var{backup-method}] Defines archivation and backup methods for the destination directory. @xref{archivation}, for a detailed discussion. The @var{type} specifies the archivation type: diff --git a/etc/Makefile.am b/etc/Makefile.am new file mode 100644 index 0000000..7fc8238 --- /dev/null +++ b/etc/Makefile.am @@ -0,0 +1,34 @@ +# This file is part of 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, 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/>. + +EXTRA_DIST=wydawca.rc messages.rc + +install-data-local: + @test -d $(DESTDIR)$(sysconfdir) || \ + ${INSTALL} -d $(DESTDIR)$(sysconfdir); \ + conf=$(DESTDIR)$(sysconfdir)/wydawca.rc; \ + if [ -r $$conf ]; then \ + echo $$conf | sed 's,.,=,g'; \ + echo "Warning: The configuration file $$conf already exists"; \ + echo "Make sure it is up to date!"; \ + echo $$conf | sed 's,.,=,g'; \ + else \ + for file in $(EXTRA_DIST); do \ + ${INSTALL} -m 600 $(top_srcdir)/etc/$$file \ + $(DESTDIR)$(sysconfdir)/$$file; \ + done; \ + fi + |