diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2009-12-21 15:57:21 +0200 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2009-12-21 15:57:57 +0200 |
commit | 43ba0c3da9ff8913f0286a01a82875fa59601dc0 (patch) | |
tree | fac6765cc2fb90ae39f5eb47d2c41abcaf93fb6d | |
parent | 30e1c54062fe7098b9c71601370df1ce27f873d3 (diff) | |
download | wydawca-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.texi | 177 | ||||
-rw-r--r-- | src/Makefile.am | 2 | ||||
-rw-r--r-- | src/builtin.c | 46 | ||||
-rw-r--r-- | src/builtin.h | 12 | ||||
-rw-r--r-- | src/config.c | 104 | ||||
-rw-r--r-- | src/dictionary.c | 228 | ||||
-rw-r--r-- | src/mail.c | 28 | ||||
-rw-r--r-- | src/meta.c | 10 | ||||
-rw-r--r-- | src/method.c | 226 | ||||
-rw-r--r-- | src/process.c | 14 | ||||
-rw-r--r-- | src/sql.c | 44 | ||||
-rw-r--r-- | src/sql.h | 20 | ||||
-rw-r--r-- | src/triplet.c | 8 | ||||
-rw-r--r-- | src/verify.c | 32 | ||||
-rw-r--r-- | src/wydawca.h | 60 | ||||
-rw-r--r-- | tests/etc/wydawca.rcin | 4 |
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 | ||
108 | Access Methods | 108 | Dictionaries |
109 | 109 | ||
110 | * sql type:: | 110 | * sql type:: |
111 | * builtin type:: | 111 | * builtin type:: |
112 | * external type:: | 112 | * external type:: |
113 | 113 | ||
114 | SQL Access Methods | 114 | SQL 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 |
133 | site, like, e.g. @indicateurl{gnu.org}. You have at least two | 133 | site, 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 |
135 | distributes stable versions of the software, and | 135 | distributes 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 |
137 | versions. Now, package maintainers should have a way of uploading | 137 | versions. Now, package maintainers need to have a way of uploading |
138 | their packages to one of these sites. The currently accepted scheme | 138 | their packages to one of these sites. This is done using the |
139 | is 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 |
142 | Uploads, maintain, Information for maintainers of GNU software}. | 142 | Uploads, 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 |
165 | of the stable version @file{foo-1.0.tar.gz}, he first creates a detached | 166 | of the stable version @file{foo-1.0.tar.gz}, he first creates a detached |
166 | signature @file{foo-1.0.tar.gz.sig}. Then he creates a special | 167 | signature @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 |
168 | distributed tarball must be placed, and clear-signs it using his | 169 | distributed 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 |
181 | handle any number of @samp{source/destination} pairs (called | 182 | handle 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 |
183 | mechanism, allowing both package maintainers and site administrators | 184 | notification mechanism, allowing both package maintainers and site |
184 | to be immediately notified about any occurring problems. | 185 | administrators 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 |
187 | described in | 188 | described in |
@@ -224,7 +225,7 @@ that case. | |||
224 | upload and corresponding distribution directories. In | 225 | upload 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} |
227 | directories. The file also supplies all the information | 228 | directories. The configuration file also supplies all the information |
228 | necessary to access user and project databases. | 229 | necessary 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 | |||
235 | placement of the uploaded files. A @dfn{triplet} is a standard | 236 | placement of the uploaded files. A @dfn{triplet} is a standard |
236 | entity, consisting of three files: a clear-signed directive file, a | 237 | entity, consisting of three files: a clear-signed directive file, a |
237 | file to be distributed, and a detached signature of the latter. | 238 | file to be distributed, and a detached signature of the latter. |
238 | In some special cases, a clear-signed directive file alone is valid, | 239 | In some special cases, a clear-signed directive file alone is valid. |
239 | namely when it contains only @dfn{standalone directives}, as described | 240 | This happens when it contains only @dfn{standalone directives}, as |
240 | in | 241 | described in |
241 | @ifnothtml | 242 | @ifnothtml |
242 | @ref{FTP Upload Directive File - v1.1, | 243 | @ref{FTP Upload Directive File - v1.1, |
243 | Standalone directives, Standalone directives, | 244 | Standalone directives, Standalone directives, |
@@ -248,26 +249,38 @@ maintain, Information for maintainers of GNU software}. | |||
248 | Standalone directives}. | 249 | Standalone 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 | ||
252 | necessary files, is then verified by checking if the modification | 257 | necessary files, is then verified by checking if the modification |
253 | date of its oldest file is older than a predefined amount of time | 258 | date 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 |
255 | removed (an @dfn{expired triplet}). This gives users the possibility | 260 | @dfn{expired}, and all its files are removed. This gives users the |
256 | to restart interrupted or otherwise broken uploads later. | 261 | possibility to restart interrupted or otherwise broken uploads later. |
257 | |||
258 | Then, the utility ensures that each of the remaining triplets is | ||
259 | created by a single person. Any triplets that do not are immediately | ||
260 | removed. | ||
261 | 262 | ||
263 | @cindex dictionary | ||
262 | @cindex @acronym{PGP} | 264 | @cindex @acronym{PGP} |
265 | After completing these preliminary stages, @command{wydawca} | ||
266 | analyzes the directive file and extracts the project name | ||
267 | from it. Using this name as a key, it looks up in the @dfn{project | ||
268 | dictionary} a list of users authorized to make uploads for this | ||
269 | project. This list contains user names and their corresponding public | ||
270 | @acronym{PGP} keys. @command{Wydawca} tries to verify the directive | ||
271 | file using each @acronym{PGP} key from this list, until a matching | ||
272 | key is found, or the list in exhausted. In the latter case, the | ||
273 | triplet is rejected. Otherwise, the key and its owner are remembered | ||
274 | for 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 |
266 | signatures (if available) are verified. If they do not match public | 280 | are verified. If they do not match the public key obtained in the |
267 | keys of the user who uploaded the triplet, such a triplet is | 281 | previous step, the triplet is rejected. |
268 | discarded. | ||
269 | 282 | ||
270 | Finally, the directives from each directive file are executed. On | 283 | Finally, directives from the directive file are executed. On |
271 | this stage of the processing, the uploaded files are actually moved to | 284 | this stage of the processing, the uploaded files are actually moved to |
272 | their destination directories, requested symbolic links are created, | 285 | their destination directories, requested symbolic links are created, |
273 | etc. | 286 | etc. |
@@ -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 |
862 | database. It is used by another configuration statements (e.g. by | 875 | database. It is used by another configuration statements (e.g. by |
863 | access methods, see the next section) to refer to this | 876 | dictionaries, see the next section) to refer to this |
864 | database. | 877 | database. |
865 | @end deffn | 878 | @end deffn |
866 | 879 | ||
@@ -904,21 +917,21 @@ sql default @{ | |||
904 | @end group | 917 |