aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2009-12-21 15:57:21 +0200
committerSergey Poznyakoff <gray@gnu.org.ua>2009-12-21 15:57:57 +0200
commit43ba0c3da9ff8913f0286a01a82875fa59601dc0 (patch)
treefac6765cc2fb90ae39f5eb47d2c41abcaf93fb6d
parent30e1c54062fe7098b9c71601370df1ce27f873d3 (diff)
downloadwydawca-43ba0c3da9ff8913f0286a01a82875fa59601dc0.tar.gz
wydawca-43ba0c3da9ff8913f0286a01a82875fa59601dc0.tar.bz2
Namespace cleanup.
Rename "access method" to "dictionary". All sources affected. * src/method.c: renamed to... * src/dictionary.c: ... this.
-rw-r--r--doc/wydawca.texi177
-rw-r--r--src/Makefile.am2
-rw-r--r--src/builtin.c46
-rw-r--r--src/builtin.h12
-rw-r--r--src/config.c104
-rw-r--r--src/dictionary.c228
-rw-r--r--src/mail.c28
-rw-r--r--src/meta.c10
-rw-r--r--src/method.c226
-rw-r--r--src/process.c14
-rw-r--r--src/sql.c44
-rw-r--r--src/sql.h20
-rw-r--r--src/triplet.c8
-rw-r--r--src/verify.c32
-rw-r--r--src/wydawca.h60
-rw-r--r--tests/etc/wydawca.rcin4
16 files changed, 514 insertions, 501 deletions
diff --git a/doc/wydawca.texi b/doc/wydawca.texi
index a136fd6..04b599f 100644
--- a/doc/wydawca.texi
+++ b/doc/wydawca.texi
@@ -92,7 +92,7 @@ How to Configure @command{wydawca}.
92* Syntax:: Configuration file syntax. 92* Syntax:: Configuration file syntax.
93* syslog:: 93* syslog::
94* sql:: 94* sql::
95* access methods:: 95* dictionaries::
96* archivation:: 96* archivation::
97* spool:: 97* spool::
98* statistics:: 98* statistics::
@@ -105,13 +105,13 @@ Configuration file syntax
105* Statements:: 105* Statements::
106* Preprocessor:: 106* Preprocessor::
107 107
108Access Methods 108Dictionaries
109 109
110* sql type:: 110* sql type::
111* builtin type:: 111* builtin type::
112* external type:: 112* external type::
113 113
114SQL Access Methods 114SQL Dictionary
115 115
116* project-owner-sql:: 116* project-owner-sql::
117* project-uploader-sql:: 117* project-uploader-sql::
@@ -130,13 +130,13 @@ Mail Notification
130@chapter Introduction to Wydawca 130@chapter Introduction to Wydawca
131@cindex introduction 131@cindex introduction
132 Let's begin with a short synopsis. Suppose you run a developer's 132 Let's begin with a short synopsis. Suppose you run a developer's
133site, like, e.g. @indicateurl{gnu.org}. You have at least two 133site, like, e.g. @indicateurl{gnu.org}. You have two
134@dfn{distribution @acronym{URL}s}: @indicateurl{ftp.gnu.org}, which 134@dfn{distribution @acronym{URL}s}: @indicateurl{ftp.gnu.org}, which
135distributes stable versions of the software, and 135distributes stable versions of the software, and
136@indicateurl{alpha.gnu.org}, which distributes alpha and pre-test 136@indicateurl{alpha.gnu.org}, which distributes alpha and pre-test
137versions. Now, package maintainers should have a way of uploading 137versions. Now, package maintainers need to have a way of uploading
138their packages to one of these sites. The currently accepted scheme 138their packages to one of these sites. This is done using the
139is described in 139@dfn{Automated FTP Upload} method, as described in
140@ifnothtml 140@ifnothtml
141@ref{Automated FTP Uploads, Automated FTP Uploads, Automated FTP 141@ref{Automated FTP Uploads, Automated FTP Uploads, Automated FTP
142Uploads, maintain, Information for maintainers of GNU software}. 142Uploads, maintain, Information for maintainers of GNU software}.
@@ -157,16 +157,17 @@ corresponding to a certain distribution @acronym{URL}. For example,
157@item @file{/incoming/ftp} @tab @indicateurl{ftp.gnu.org} 157@item @file{/incoming/ftp} @tab @indicateurl{ftp.gnu.org}
158@item @file{/incoming/alpha} @tab @indicateurl{alpha.gnu.org} 158@item @file{/incoming/alpha} @tab @indicateurl{alpha.gnu.org}
159@end multitable 159@end multitable
160@*
160 161
161@cindex @acronym{PGP} 162@cindex @acronym{PGP}
162@cindex detached signature 163@cindex detached signature
163@cindex signature, detached 164@cindex signature, detached
164 Now, if the maintainer of the project @samp{foo} wishes to make a release 165 Now, if maintainer of the project @samp{foo} wishes to make a release
165of the stable version @file{foo-1.0.tar.gz}, he first creates a detached 166of the stable version @file{foo-1.0.tar.gz}, he first creates a detached
166signature @file{foo-1.0.tar.gz.sig}. Then he creates a special 167signature @file{foo-1.0.tar.gz.sig}. Then he creates a special
167@dfn{directive} file, that contains information about where the 168@dfn{directive} file, which contains information about where the
168distributed tarball must be placed, and clear-signs it using his 169distributed tarball must be placed, and clear-signs it using his
169@acronym{PGP} key, thus obtaining file 170@acronym{PGP} key, thus obtaining the file
170@file{foo-1.0.tar.gz.directive.asc}. Finally, he uploads these three files 171@file{foo-1.0.tar.gz.directive.asc}. Finally, he uploads these three files
171(a @dfn{triplet}) to the upload site, storing them into the directory 172(a @dfn{triplet}) to the upload site, storing them into the directory
172@file{/incoming/ftp}. 173@file{/incoming/ftp}.
@@ -179,9 +180,9 @@ their distribution sites.
179 180
180 @command{Wydawca} is such a release submission daemon. It is able to 181 @command{Wydawca} is such a release submission daemon. It is able to
181handle any number of @samp{source/destination} pairs (called 182handle any number of @samp{source/destination} pairs (called
182@dfn{spools}, offers an extensible logging and mail notification 183@dfn{spools}) in real time, and offers an extensible logging and mail
183mechanism, allowing both package maintainers and site administrators 184notification mechanism, allowing both package maintainers and site
184to be immediately notified about any occurring problems. 185administrators to be immediately notified about any occurring problems.
185 186
186 @command{Wydawca} supports version 1.1 of directory file, as 187 @command{Wydawca} supports version 1.1 of directory file, as
187described in 188described in
@@ -224,7 +225,7 @@ that case.
224upload and corresponding distribution directories. In 225upload and corresponding distribution directories. In
225@command{wydawca} terminology, upload directories are also called 226@command{wydawca} terminology, upload directories are also called
226@dfn{source}, and distribution directories -- @dfn{destination} 227@dfn{source}, and distribution directories -- @dfn{destination}
227directories. The file also supplies all the information 228directories. The configuration file also supplies all the information
228necessary to access user and project databases. 229necessary to access user and project databases.
229 230
230 When started, @command{wydawca} scans each source directory and 231 When started, @command{wydawca} scans each source directory and
@@ -235,9 +236,9 @@ supplied with each upload and that contains directive regarding the
235placement of the uploaded files. A @dfn{triplet} is a standard 236placement of the uploaded files. A @dfn{triplet} is a standard
236entity, consisting of three files: a clear-signed directive file, a 237entity, consisting of three files: a clear-signed directive file, a
237file to be distributed, and a detached signature of the latter. 238file to be distributed, and a detached signature of the latter.
238In some special cases, a clear-signed directive file alone is valid, 239In some special cases, a clear-signed directive file alone is valid.
239namely when it contains only @dfn{standalone directives}, as described 240This happens when it contains only @dfn{standalone directives}, as
240in 241described in
241@ifnothtml 242@ifnothtml
242@ref{FTP Upload Directive File - v1.1, 243@ref{FTP Upload Directive File - v1.1,
243Standalone directives, Standalone directives, 244Standalone directives, Standalone directives,
@@ -248,26 +249,38 @@ maintain, Information for maintainers of GNU software}.
248Standalone directives}. 249Standalone directives}.
249@end ifhtml 250@end ifhtml
250 251
251 Each @dfn{incomplete} triplet, i.e. such that misses one or more 252@cindex triplet, incomplete
253@cindex incomplete triplet
254@cindex triplet, expired
255@cindex expired triplet
256 Each @dfn{incomplete} triplet, i.e. a triplet missing one or more
252necessary files, is then verified by checking if the modification 257necessary files, is then verified by checking if the modification
253date of its oldest file is older than a predefined amount of time 258date of its oldest file is older than a predefined amount of time
254(@FIXME-pxref{file-sweep-time}), and if so, all files from this triplet are 259(@FIXME-pxref{file-sweep-time}). If so, the triplet is considered
255removed (an @dfn{expired triplet}). This gives users the possibility 260@dfn{expired}, and all its files are removed. This gives users the
256to restart interrupted or otherwise broken uploads later. 261possibility to restart interrupted or otherwise broken uploads later.
257
258 Then, the utility ensures that each of the remaining triplets is
259created by a single person. Any triplets that do not are immediately
260removed.
261 262
263@cindex dictionary
262@cindex @acronym{PGP} 264@cindex @acronym{PGP}
265 After completing these preliminary stages, @command{wydawca}
266analyzes the directive file and extracts the project name
267from it. Using this name as a key, it looks up in the @dfn{project
268dictionary} a list of users authorized to make uploads for this
269project. This list contains user names and their corresponding public
270@acronym{PGP} keys. @command{Wydawca} tries to verify the directive
271file using each @acronym{PGP} key from this list, until a matching
272key is found, or the list in exhausted. In the latter case, the
273triplet is rejected. Otherwise, the key and its owner are remembered
274for the next step.
275
276@cindex detached signature
263@cindex detached signature 277@cindex detached signature
264@cindex signature, detached 278@cindex signature, detached
265 Then, @acronym{PGP} signatures of directive files and any detached 279 In this step, the uploaded file and its detached signature
266signatures (if available) are verified. If they do not match public 280are verified. If they do not match the public key obtained in the
267keys of the user who uploaded the triplet, such a triplet is 281previous step, the triplet is rejected.
268discarded.
269 282
270 Finally, the directives from each directive file are executed. On 283 Finally, directives from the directive file are executed. On
271this stage of the processing, the uploaded files are actually moved to 284this stage of the processing, the uploaded files are actually moved to
272their destination directories, requested symbolic links are created, 285their destination directories, requested symbolic links are created,
273etc. 286etc.
@@ -387,7 +400,7 @@ directives any time by running @command{wydawca --config-help}.
387* Syntax:: Configuration file syntax. 400* Syntax:: Configuration file syntax.
388* syslog:: 401* syslog::
389* sql:: 402* sql::
390* access methods:: 403* dictionaries::
391* archivation:: 404* archivation::
392* spool:: 405* spool::
393* statistics:: 406* statistics::
@@ -860,7 +873,7 @@ sql @var{id} @{
860 873
861 Here, @var{id} is a string uniquely identifying this 874 Here, @var{id} is a string uniquely identifying this
862database. It is used by another configuration statements (e.g. by 875database. It is used by another configuration statements (e.g. by
863access methods, see the next section) to refer to this 876dictionaries, see the next section) to refer to this
864database. 877database.
865@end deffn 878@end deffn
866 879
@@ -904,21 +917,21 @@ sql default @{
904@end group 917