A keks * initial commit
Lars Strojny

Lars Strojny commited on 2006-12-17 11:28:02
Zeige 264 geänderte Dateien mit 16076 Einfügungen und 0 Löschungen.

... ...
@@ -0,0 +1,812 @@
1
+# ChangeLog for app-antivirus/clamav
2
+# Copyright 2002-2006 Gentoo Foundation; Distributed under the GPL v2
3
+# $Header: /var/cvsroot/gentoo-x86/app-antivirus/clamav/ChangeLog,v 1.180 2006/11/27 22:20:07 drizzt Exp $
4
+
5
+  27 Nov 2006; Timothy Redaelli <drizzt@gentoo.org> clamav-0.88.6.ebuild:
6
+  Added ~x86-fbsd keyword.
7
+
8
+  05 Nov 2006; Zac Medico <zmedico@gentoo.org> clamav-0.88.6.ebuild,
9
+  clamav-0.90_rc1.ebuild, clamav-0.90_rc2.ebuild:
10
+  Fix missing ( ) for milter? in DEPEND.
11
+
12
+  05 Nov 2006; Andrej Kacian <ticho@gentoo.org> clamav-0.90_rc1.ebuild,
13
+  clamav-0.90_rc2.ebuild:
14
+  Depend on either libmilter or sendmail also in 0.90 RC ebuilds. Bug #152541
15
+  by Milan Holzäpfel <public at mjh.name>.
16
+
17
+*clamav-0.88.6 (05 Nov 2006)
18
+
19
+  05 Nov 2006; Andrej Kacian <ticho@gentoo.org> -clamav-0.88.2.ebuild,
20
+  -clamav-0.88.3.ebuild, -clamav-0.88.4.ebuild, +clamav-0.88.6.ebuild:
21
+  Version bump. Removed old ebuilds. Depend on either libmilter on sendmail
22
+  when milter USE flag is on. Closes bug #152541, by Milan Holzäpfel <public
23
+  at mjh.name>.
24
+
25
+*clamav-0.90_rc2 (30 Oct 2006)
26
+
27
+  30 Oct 2006; Andrej Kacian <ticho@gentoo.org> +clamav-0.90_rc2.ebuild:
28
+  Version bump for new RC.
29
+
30
+  24 Oct 2006; Patrick McLean <chutzpah@gentoo.org> clamav-0.88.5.ebuild:
31
+  Stable on amd64 (bug #151561).
32
+
33
+  20 Oct 2006; Bryan Østergaard <kloeri@gentoo.org> clamav-0.88.5.ebuild:
34
+  Stable on Alpha + ia64, bug 151561.
35
+
36
+  20 Oct 2006; René Nussbaumer <killerfox@gentoo.org> clamav-0.88.5.ebuild:
37
+  Stable on hppa. See bug #151561.
38
+
39
+  18 Oct 2006; Tobias Scherbaum <dertobi123@gentoo.org>
40
+  clamav-0.88.5.ebuild:
41
+  ppc stable, bug #151561
42
+
43
+  16 Oct 2006; Jason Wever <weeve@gentoo.org> clamav-0.88.5.ebuild:
44
+  Stable on SPARC wrt bug #151561.
45
+
46
+  16 Oct 2006; Markus Rothe <corsair@gentoo.org> clamav-0.88.5.ebuild:
47
+  Stable on ppc64; bug #151561
48
+
49
+  16 Oct 2006; Andrej Kacian <ticho@gentoo.org> clamav-0.88.5.ebuild:
50
+  Stable on x86, security bug #151561.
51
+
52
+*clamav-0.90_rc1 (16 Oct 2006)
53
+
54
+  16 Oct 2006; Andrej Kacian <ticho@gentoo.org> +clamav-0.90_rc1.ebuild:
55
+  Version bump to upstream's 0.90RC1.1. This is a release candidate, and as
56
+  such it is package.masked. Also, use "--enable-experimental", so if someone
57
+  really wants to use a RC, they can help testing the code. You have been
58
+  warned.
59
+
60
+*clamav-0.88.5 (15 Oct 2006)
61
+
62
+  15 Oct 2006; Andrej Kacian <ticho@gentoo.org> +clamav-0.88.5.ebuild:
63
+  Version bump.
64
+
65
+  03 Sep 2006; Bryan Østergaard <kloeri@gentoo.org> clamav-0.88.4.ebuild:
66
+  Stable on ia64.
67
+
68
+  08 Aug 2006; Christel Dahlskjaer <christel@gentoo.org>
69
+  clamav-0.88.4.ebuild:
70
+  Fixing up SRC_URI by request from Ticho.
71
+
72
+  08 Aug 2006; Rene Nussbaumer <killerfox@gentoo.org> clamav-0.88.4.ebuild:
73
+  Stable on hppa. See bug #143093.
74
+
75
+  08 Aug 2006; Markus Rothe <corsair@gentoo.org> clamav-0.88.4.ebuild:
76
+  Stable on ppc64; bug #143093
77
+
78
+  08 Aug 2006; Luca Barbato <lu_zero@gentoo.org> clamav-0.88.4.ebuild:
79
+  Marked ppc
80
+
81
+  08 Aug 2006; Scott Stoddard <deltacow@gentoo.org> clamav-0.88.4.ebuild:
82
+  Stable on amd64 (re bug #143093).
83
+
84
+  08 Aug 2006; Fernando J. Pereda <ferdy@gentoo.org> clamav-0.88.4.ebuild:
85
+  Stable on alpha wrt security bug #143093
86
+
87
+  08 Aug 2006; Jason Wever <weeve@gentoo.org> clamav-0.88.4.ebuild:
88
+  Stable on SPARC wrt security bug #143093.
89
+
90
+  07 Aug 2006; Andrej Kacian <ticho@gentoo.org> clamav-0.88.4.ebuild:
91
+  Stable on x86, security bug #143093.
92
+
93
+*clamav-0.88.4 (07 Aug 2006)
94
+
95
+  07 Aug 2006; Andrej Kacian <ticho@gentoo.org> +clamav-0.88.4.ebuild:
96
+  Version bump. Fixes vulnerability in security bug #143093.
97
+
98
+  06 Aug 2006; Yuta SATOH <nigoro@gentoo.org> clamav-0.88.3.ebuild:
99
+  Stable on ppc64, bug #141539
100
+
101
+  05 Aug 2006; Michael Hanselmann <hansmi@gentoo.org> clamav-0.88.3.ebuild:
102
+  Stable on ppc.
103
+
104
+  03 Aug 2006; Gustavo Zacarias <gustavoz@gentoo.org> clamav-0.88.3.ebuild:
105
+  Stable on hppa wrt #141539
106
+
107
+  02 Aug 2006; Gustavo Zacarias <gustavoz@gentoo.org> clamav-0.88.3.ebuild:
108
+  Stable on sparc wrt #141539
109
+
110
+  01 Aug 2006; Joshua Jackson <tsunam@gentoo.org> clamav-0.88.3.ebuild:
111
+  Stable x86; bug #141539
112
+
113
+*clamav-0.88.3 (02 Jul 2006)
114
+
115
+  02 Jul 2006; Andrej Kacian <ticho@gentoo.org> +clamav-0.88.3.ebuild:
116
+  Version bump.
117
+
118
+  31 May 2006; <solar@gentoo.org> -clamav-0.87.1.ebuild, -clamav-0.87.ebuild,
119
+  -clamav-0.88.1.ebuild, -clamav-0.88.ebuild:
120
+  - security/qa cleanup. flush old/vuln ebuilds
121
+
122
+  31 May 2006; <plasmaroo@gentoo.org> clamav-0.88.2.ebuild:
123
+  Stable on IA64; bug #131791.
124
+
125
+  01 May 2006; Jason Wever <weeve@gentoo.org> clamav-0.88.2.ebuild:
126
+  Stable on SPARC wrt security bug #131791.
127
+
128
+  01 May 2006; Markus Rothe <corsair@gentoo.org> clamav-0.88.2.ebuild:
129
+  Stable on ppc64
130
+
131
+  01 May 2006; Jon Hood <squinky86@gentoo.org> clamav-0.88.2.ebuild:
132
+  Stable on amd64, #131791.
133
+
134
+  01 May 2006; Rene Nussbaumer <killerfox@gentoo.org> clamav-0.88.2.ebuild:
135
+  Stable on hppa. See bug #131791.
136
+
137
+  01 May 2006; Mark Loeser <halcy0n@gentoo.org> clamav-0.88.2.ebuild:
138
+  Stable on x86; bug #131791
139
+
140
+  01 May 2006; Tobias Scherbaum <dertobi123@gentoo.org>
141
+  clamav-0.88.2.ebuild:
142
+  ppc stable, bug #131791
143
+
144
+  01 May 2006; Fernando J. Pereda <ferdy@gentoo.org> clamav-0.88.2.ebuild:
145
+  Stable on Alpha wrt bug #131791
146
+
147
+*clamav-0.88.2 (30 Apr 2006)
148
+
149
+  30 Apr 2006; Andrej Kacian <ticho@gentoo.org> +clamav-0.88.2.ebuild:
150
+  Version bump. Closees bug #129702 reported by Vieri <rentorbuy@yahoo.com>.
151
+
152
+  07 Apr 2006; Mark Loeser <halcy0n@gentoo.org> clamav-0.88.1.ebuild:
153
+  Stable on x86; bug #128963
154
+
155
+  07 Apr 2006; Rene Nussbaumer <killerfox@gentoo.org> clamav-0.88.1.ebuild:
156
+  Stable on hppa. See bug #128963.
157
+
158
+  07 Apr 2006; Simon Stelling <blubb@gentoo.org> clamav-0.88.1.ebuild:
159
+  stable on amd64 wrt bug 128963
160
+
161
+  07 Apr 2006; Gustavo Zacarias <gustavoz@gentoo.org> clamav-0.88.1.ebuild:
162
+  Stable on sparc wrt security #128963
163
+
164
+  06 Apr 2006; Fernando J. Pereda <ferdy@gentoo.org> clamav-0.88.1.ebuild:
165
+  Stable on alpha wrt security bug #128963
166
+
167
+  06 Apr 2006; Markus Rothe <corsair@gentoo.org> clamav-0.88.1.ebuild:
168
+  Stable on ppc64
169
+
170
+  06 Apr 2006; Tobias Scherbaum <dertobi123@gentoo.org>
171
+  clamav-0.88.1.ebuild:
172
+  ppc stable, bug #128963
173
+
174
+*clamav-0.88.1 (06 Apr 2006)
175
+
176
+  06 Apr 2006; Patrick McLean <chutzpah@gentoo.org> +clamav-0.88.1.ebuild:
177
+  Version bump, fixes some security bugs (bug 128963)
178
+
179
+  04 Feb 2006; Aron Griffis <agriffis@gentoo.org> clamav-0.88.ebuild:
180
+  Mark 0.88 stable on ia64
181
+
182
+  22 Jan 2006; Andrej Kacian <ticho@gentoo.org> clamav-0.87.ebuild,
183
+  clamav-0.87.1.ebuild, clamav-0.88.ebuild:
184
+  Removed libidn dependency. Bug #119909.
185
+
186
+  12 Jan 2006; Markus Rothe <corsair@gentoo.org> clamav-0.88.ebuild:
187
+  Stable on ppc64; bug #118459
188
+
189
+  12 Jan 2006; Rene Nussbaumer <killerfox@gentoo.org> clamav-0.88.ebuild:
190
+  Stable on hppa. See bug #118459.
191
+
192
+  12 Jan 2006; Simon Stelling <blubb@gentoo.org> clamav-0.88.ebuild:
193
+  stable on amd64 wrt bug 118459
194
+
195
+  11 Jan 2006; Tobias Scherbaum <dertobi123@gentoo.org> clamav-0.88.ebuild:
196
+  ppc stable, bug #118459
197
+
198
+  10 Jan 2006; Gustavo Zacarias <gustavoz@gentoo.org> clamav-0.88.ebuild:
199
+  Stable on sparc wrt #118459
200
+
201
+  10 Jan 2006; Andrej Kacian <ticho@gentoo.org> clamav-0.88.ebuild:
202
+  Stable on x86, security bug #118459.
203
+
204
+  09 Jan 2006; Fernando J. Pereda <ferdy@gentoo.org> clamav-0.88.ebuild:
205
+  Stable on alpha wrt bug #118459
206
+
207
+*clamav-0.88 (09 Jan 2006)
208
+
209
+  09 Jan 2006; Andrej Kacian <ticho@gentoo.org> +clamav-0.88.ebuild:
210
+  Version bump.
211
+
212
+  09 Nov 2005; Andrej Kacian <ticho@gentoo.org> files/clamd.rc,
213
+  -files/clamd.rc.new, -clamav-0.86.2.ebuild, clamav-0.87.ebuild,
214
+  clamav-0.87.1.ebuild:
215
+  Removed older ebuild.
216
+
217
+  06 Nov 2005; Simon Stelling <blubb@gentoo.org> clamav-0.87.1.ebuild:
218
+  stable on amd64 wrt bug 109213
219
+
220
+  06 Nov 2005; Michael Hanselmann <hansmi@gentoo.org> clamav-0.87.1.ebuild:
221
+  Stable on hppa, ppc. See bug #109213.
222
+
223
+  05 Nov 2005; Jose Luis Rivero <yoswink@gentoo.org> clamav-0.87.1.ebuild:
224
+  Stable on alpha wrt security bug #109213
225
+
226
+  04 Nov 2005; Brent Baude <ranger@gentoo.org> clamav-0.87.1.ebuild:
227
+  Marking clamav-0.87.1 ppc64 stable for security bug 109213
228
+
229
+  04 Nov 2005; Gustavo Zacarias <gustavoz@gentoo.org> clamav-0.87.1.ebuild:
230
+  Stable on sparc wrt #109213
231
+
232
+  03 Nov 2005; Andrej Kacian <ticho@gentoo.org> clamav-0.87.1.ebuild:
233
+  Stable on x86, security bug #109213.
234
+
235
+*clamav-0.87.1 (03 Nov 2005)
236
+
237
+  03 Nov 2005; Andrej Kacian <ticho@gentoo.org> +clamav-0.87.1.ebuild:
238
+  Version bump. Fixes security bug #109213.
239
+
240
+  02 Oct 2005; Aron Griffis <agriffis@gentoo.org> ChangeLog:
241
+  Mark 0.87 stable on ia64
242
+
243
+  29 Sep 2005; Andrej Kacian <ticho@gentoo.org> files/clamd.rc,
244
+  files/clamd.rc.new, clamav-0.86.2.ebuild:
245
+  Improved config parsing from within the initscript, thanks to Georgi
246
+  Georgiev <chutz at gg3.net>, bug #107362.
247
+
248
+  18 Sep 2005; Markus Rothe <corsair@gentoo.org> clamav-0.87.ebuild:
249
+  Stable on ppc64 (bug #106279)
250
+
251
+  18 Sep 2005; Bryan Østergaard <kloeri@gentoo.org> clamav-0.87.ebuild:
252
+  Stable on alpha, bug 106279.
253
+
254
+  18 Sep 2005; Jason Wever <weeve@gentoo.org> clamav-0.87.ebuild:
255
+  Stable on SPARC wrt security bug #106279.
256
+
257
+  17 Sep 2005; Michael Hanselmann <hansmi@gentoo.org> clamav-0.87.ebuild:
258
+  Stable on hppa and ppc.
259
+
260
+  17 Sep 2005; Andrej Kacian <ticho@gentoo.org> clamav-0.87.ebuild:
261
+  Stable on x86 and amd64, security bug #106279.
262
+
263
+*clamav-0.87 (16 Sep 2005)
264
+
265
+  16 Sep 2005; Andrej Kacian <ticho@gentoo.org> +clamav-0.87.ebuild:
266
+  Version bump.
267
+
268
+  16 Sep 2005; Andrea Barisani <lcars@gentoo.org> clamav-0.86.2.ebuild:
269
+  Added timeout to MILTER_OPTS, bug #100980.
270
+
271
+  08 Sep 2005; Andrej Kacian <ticho@gentoo.org> clamav-0.86.2.ebuild:
272
+  Removed call to pwconv. Pointed out by Tobias Hahn <tobhahn at web.de>, bug
273
+  #105278.
274
+
275
+  23 Aug 2005; Andrej Kacian <ticho@gentoo.org> clamav-0.86.2.ebuild:
276
+  Use -1 for shell argument to enewuser. Bug #103421.
277
+
278
+  23 Aug 2005; Aron Griffis <agriffis@gentoo.org> clamav-0.86.2.ebuild:
279
+  stable on ia64
280
+
281
+  26 Jul 2005; Bryan Østergaard <kloeri@gentoo.org> clamav-0.86.2.ebuild:
282
+  Stable on alpha, bug 100178.
283
+
284
+  25 Jul 2005; Andrej Kacian <ticho@gentoo.org> clamav-0.86.2.ebuild:
285
+  Stable on x86. (bug #100178)
286
+
287
+  25 Jul 2005; Markus Rothe <corsair@gentoo.org> clamav-0.86.2.ebuild:
288
+  Stable on ppc64 (bug #100178)
289
+
290
+  25 Jul 2005; Tobias Scherbaum <dertobi123@gentoo.org>
291
+  clamav-0.86.2.ebuild:
292
+  ppc stable, bug #100178
293
+
294
+  25 Jul 2005; Gustavo Zacarias <gustavoz@gentoo.org> clamav-0.86.2.ebuild:
295
+  Stable on sparc wrt #100178
296
+
297
+  25 Jul 2005; Herbie Hopkins <herbs@gentoo.org> clamav-0.86.2.ebuild:
298
+  Stable on amd64 wrt bug #100178.
299
+
300
+  25 Jul 2005; Rene Nussbaumer <killerfox@gentoo.org> clamav-0.86.2.ebuild:
301
+  Stable on hppa. bug #100178
302
+
303
+*clamav-0.86.2 (25 Jul 2005)
304
+
305
+  25 Jul 2005; Andrej Kacian <ticho@gentoo.org> +clamav-0.86.2.ebuild:
306
+  Version bump.
307
+
308
+  24 Jun 2005; Rene Nussbaumer <killerfox@gentoo.org> clamav-0.86.1.ebuild:
309
+  Stable on hppa. bug #96960
310
+
311
+  24 Jun 2005; Bryan Østergaard <kloeri@gentoo.org> clamav-0.86.1.ebuild:
312
+  Stable on alpha, bug 96960.
313
+
314
+  24 Jun 2005; Markus Rothe <corsair@gentoo.org> clamav-0.86.1.ebuild:
315
+  Stable on ppc64 (bug #96960)
316
+
317
+  24 Jun 2005; Herbie Hopkins <herbs@gentoo.org> clamav-0.86.1.ebuild:
318
+  Stable on amd64 wrt bug #96960.
319
+
320
+  24 Jun 2005; Michael Hanselmann <hansmi@gentoo.org> clamav-0.86.1.ebuild:
321
+  Stable on ppc.
322
+
323
+  24 Jun 2005; Gustavo Zacarias <gustavoz@gentoo.org> clamav-0.86.1.ebuild:
324
+  Stable on sparc wrt #96960
325
+
326
+  24 Jun 2005; Andrej Kacian <ticho@gentoo.org> clamav-0.86.1.ebuild:
327
+  Stable on x86, due to security bug #96960.
328
+
329
+*clamav-0.86.1 (23 Jun 2005)
330
+
331
+  23 Jun 2005; Andrej Kacian <ticho@gentoo.org> +clamav-0.86.1.ebuild:
332
+  Version bump.
333
+
334
+*clamav-0.86 (21 Jun 2005)
335
+
336
+  21 Jun 2005; Andrej Kacian <ticho@gentoo.org> -clamav-0.83.ebuild,
337
+  -clamav-0.84.ebuild, clamav-0.85.1-r1.ebuild, -clamav-0.86_rc1.ebuild,
338
+  +clamav-0.86.ebuild:
339
+  Version bump. Backport solution for bug #96373 to 0.85.1-r1. Remove old
340
+  ebuilds.
341
+
342
+  18 Jun 2005; Andrej Kacian <ticho@gentoo.org> clamav-0.86_rc1.ebuild:
343
+  Point clamav to correct sendmail binary if mailwrapper USE flag is enabled.
344
+  Closes bug #96373, by Analyzer <subscribe2k at yandex.ru>. Also fix head
345
+  syntax (fixheadtails.eclass) in configure.
346
+
347
+  18 Jun 2005; Michael Hanselmann <hansmi@gentoo.org>
348
+  clamav-0.85.1-r1.ebuild:
349
+  Stable on ppc.
350
+
351
+  15 Jun 2005; Fernando J. Pereda <ferdy@gentoo.org>
352
+  clamav-0.85.1-r1.ebuild:
353
+  Stable on alpha
354
+
355
+  15 Jun 2005; Markus Rothe <corsair@gentoo.org> clamav-0.85.1-r1.ebuild:
356
+  Stable on ppc64
357
+
358
+  14 Jun 2005; Marcus D. Hanwell <cryos@gentoo.org>
359
+  clamav-0.85.1-r1.ebuild:
360
+  Stable on amd64.
361
+
362
+*clamav-0.86_rc1 (14 Jun 2005)
363
+
364
+  14 Jun 2005; Andrej Kacian <ticho@gentoo.org>
365
+  -files/clamav-0.85.1-cvd-dir-traversal-fix.patch,
366
+  -clamav-0.85.1-r2.ebuild, +clamav-0.86_rc1.ebuild:
367
+  Version bump - a release candidate. Removed 0.85.1-r2, since the directory
368
+  traversal fix is contained in this rc1.
369
+
370
+*clamav-0.85.1-r2 (13 Jun 2005)
371
+
372
+  13 Jun 2005; Andrej Kacian <ticho@gentoo.org>
373
+  +files/clamav-0.85.1-cvd-dir-traversal-fix.patch,
374
+  +clamav-0.85.1-r2.ebuild:
375
+  Revision bump - patch to fix a possible directory traversal.
376
+
377
+  08 Jun 2005; Rene Nussbaumer <killerfox@gentoo.org>
378
+  clamav-0.85.1-r1.ebuild:
379
+  Stable on hppa.
380
+
381
+  08 Jun 2005; Gustavo Zacarias <gustavoz@gentoo.org>
382
+  clamav-0.85.1-r1.ebuild:
383
+  Stable on sparc
384
+
385
+  06 Jun 2005; Andrej Kacian <ticho@gentoo.org> clamav-0.85.1-r1.ebuild:
386
+  Stable on x86. Closes bug #87579 by Robert <gentoo at devrey.homelinux.com>.
387
+
388
+  06 Jun 2005; Markus Rothe <corsair@gentoo.org> clamav-0.85.1.ebuild:
389
+  Stable on ppc64
390
+
391
+  31 May 2005; Rene Nussbaumer <killerfox@gentoo.org> clamav-0.85.1.ebuild:
392
+  Stable on hppa.
393
+
394
+  31 May 2005; Gustavo Zacarias <gustavoz@gentoo.org> clamav-0.85.1.ebuild:
395
+  Stable on sparc
396
+
397
+  30 May 2005; Andrej Kacian <ticho@gentoo.org> clamav-0.85.1.ebuild,
398
+  clamav-0.85.1-r1.ebuild:
399
+  Changed default value of START_MILTER to "yes" in conf.d file. 0.85.1 stable
400
+  on x86.
401
+
402
+*clamav-0.85.1-r1 (24 May 2005)
403
+
404
+  24 May 2005; Andrej Kacian <ticho@gentoo.org>
405
+  files/clamav-milter.README.gentoo, files/clamd.conf, files/clamd.rc.new,
406
+  clamav-0.85.1.ebuild, +clamav-0.85.1-r1.ebuild:
407
+  Improved functionality wrt clamav-milter and updated
408
+  clamav-milter.README.gentoo. Thanks to Andrea Barisani <lcars at gentoo org>.
409
+
410
+*clamav-0.85.1 (16 May 2005)
411
+
412
+  16 May 2005; Andrej Kacian <ticho@gentoo.org> +clamav-0.85.1.ebuild:
413
+  Version bump.
414
+
415
+  16 May 2005; Andrej Kacian <ticho@gentoo.org> files/clamd.rc.new:
416
+  Added "-d" to freshclam start options in the new initscript. Suggested by
417
+  Phil Pennock <pdp at spodhuis demon nl>.
418
+
419
+*clamav-0.85-r1 (14 May 2005)
420
+
421
+  14 May 2005; Andrej Kacian <ticho@gentoo.org> files/clamd.conf,
422
+  +files/clamd.rc.new, +clamav-0.85-r1.ebuild:
423
+  Provide useful out-of-the-box default configuration (bugs #66905, reported
424
+  by Steph L <linux4ibook@free.fr> and #86777, by Eero Volotinen
425
+  <eero@pronics.com>). Change location of clamd socket, pidfiles and logfiles.
426
+  (#70960 by Phil Pennock <gentoo@spodhuis.demon.nl>). Fixed initscript not to
427
+  print error message when freshclam reports database is up-to-date (#58446,
428
+  by Carsten Milkau <chat.noir@arcor.de>). Only use /etc/conf.d/clamd for
429
+  START_* settings (fixes #59911, by caspar-gentoo-bugs@cbothmer.org). Fix
430
+  configure options to use 'id' utility instead of /etc/passwd parsing
431
+  (#72540, by Gudleik Rasch <gudleik@rastamatra.org>).
432
+
433
+*clamav-0.85 (11 May 2005)
434
+
435
+  11 May 2005; Andrej Kacian <ticho@gentoo.org> +clamav-0.85.ebuild:
436
+  Version bump.
437
+
438
+*clamav-0.84 (01 May 2005)
439
+
440
+  01 May 2005; Andrej Kacian <ticho@gentoo.org>
441
+  -files/clamav-0.82-MS05-002-false-positive-fix.patch,
442
+  -clamav-0.75.1.ebuild, -clamav-0.80.ebuild, -clamav-0.81.ebuild,
443
+  -clamav-0.82.ebuild, -clamav-0.82-r1.ebuild, clamav-0.83.ebuild,
444
+  -clamav-0.84_rc1.ebuild, +clamav-0.84.ebuild:
445
+  Version bump. Closes bug #90958, reported by djfunk <djfunk@free.fr>. Old
446
+  ebuild cleanup (yay!). Use newinitd and newconfd in ebuilds.
447
+
448
+  22 Apr 2005; Bryan Østergaard <kloeri@gentoo.org> clamav-0.84_rc1.ebuild:
449
+  Add ~ia64 keyword.
450
+
451
+  08 Apr 2005; Thomas Raschbacher <lordvan@gentoo.org> :
452
+  new Version (release candidate) with some new features (see application
453
+  ChangeLog)
454
+
455
+  08 Apr 2005; Markus Rothe <corsair@gentoo.org> clamav-0.83.ebuild:
456
+  Stable on ppc64
457
+
458
+  31 Mar 2005; <blubb@gentoo.org> clamav-0.83.ebuild:
459
+  stable on amd64
460
+
461
+  27 Mar 2005; Michael Hanselmann <hansmi@gentoo.org> clamav-0.83.ebuild:
462
+  Stable on ppc.
463
+
464
+  20 Mar 2005; Bryan Østergaard <kloeri@gentoo.org> clamav-0.83.ebuild:
465
+  Stable on alpha.
466
+
467
+  13 Mar 2005; Guy Martin <gmsoft@gentoo.org> clamav-0.83.ebuild:
468
+  Stable on hppa. clamav-0.83.ebuild
469
+
470
+  12 Mar 2005; Gustavo Zacarias <gustavoz@gentoo.org> clamav-0.83.ebuild:
471
+  Stable on sparc
472
+
473
+  12 Mar 2005; Andrej Kacian <ticho@gentoo.org> clamav-0.83.ebuild:
474
+  Stable on x86.
475
+
476
+  10 Mar 2005; Andrej Kacian <ticho@gentoo.org> clamav-0.82-r1.ebuild,
477
+  clamav-0.83.ebuild:
478
+  Added dependency on net-dns/libidn. Closes #84700, reported by Travis Snoozy
479
+  <ai2097@yahoo.com>.
480
+
481
+  09 Mar 2005; Marcus D. Hanwell <cryos@gentoo.org> clamav-0.82-r1.ebuild:
482
+  Marked stable on amd64.
483
+
484
+  27 Feb 2005; Andrej Kacian <ticho@gentoo.org> clamav-0.83.ebuild:
485
+  Fixed milter issue - added a conditional depend on mail-mta/sendmail, and a
486
+  check for milter USE flag being enabled for sendmail. Closes #83477,
487
+  reported by Drake Wyrm <bigwyrm@myrealbox.com>, who also suggested the fix.
488
+
489
+  17 Feb 2005; Guy Martin <gmsoft@gentoo.org> clamav-0.82-r1.ebuild:
490
+  Stable on hppa.
491
+
492
+  14 Feb 2005; Gustavo Zacarias <gustavoz@gentoo.org> clamav-0.82-r1.ebuild:
493
+  Stable on sparc wrt #81939
494
+
495
+*clamav-0.83 (14 Feb 2005)
496
+
497
+  14 Feb 2005; Andrej Kacian <ticho@gentoo.org> clamav-0.82-r1.ebuild,
498
+  +clamav-0.83.ebuild:
499
+  Version bump. Closes #81931, reported by Sascha Silbe
500
+  <sascha-gentoo-bugzilla@silbe.org>. Marked 0.82-r1 stable.
501
+
502
+*clamav-0.82-r1 (13 Feb 2005)
503
+
504
+  13 Feb 2005; Andrej Kacian <ticho@gentoo.org>
505
+  +files/clamav-0.82-MS05-002-false-positive-fix.patch,
506
+  +clamav-0.82-r1.ebuild:
507
+  Apply patch to prevent false positives. See bug #81477 for more info.
508
+  Reported by Jakub Moc <jakub.moc@seznam.cz>.
509
+
510
+  08 Feb 2005; Gustavo Zacarias <gustavoz@gentoo.org> clamav-0.82.ebuild:
511
+  Stable on sparc
512
+
513
+  08 Feb 2005; Andrej Kacian <ticho@gentoo.org> clamav-0.82.ebuild:
514
+  Stable on x86.
515
+
516
+*clamav-0.82 (08 Feb 2005)
517
+
518
+  08 Feb 2005; Andrej Kacian <ticho@gentoo.org> +clamav-0.82.ebuild:
519
+  Version bump. Closes #81075, reported by djfunk <djfunk@free.fr>.
520
+
521
+  06 Feb 2005; Markus Rothe <corsair@gentoo.org> clamav-0.80.ebuild:
522
+  Stable on ppc64
523
+
524
+  30 Jan 2005; Bryan Østergaard <kloeri@gentoo.org> clamav-0.81.ebuild:
525
+  Stable on alpha, bug 78656.
526
+
527
+  28 Jan 2005; Michael Hanselmann <hansmi@gentoo.org> clamav-0.81.ebuild:
528
+  Stable on ppc.
529
+
530
+  28 Jan 2005; Jan Brinkmann <luckyduck@gentoo.org> clamav-0.81.ebuild:
531
+  stable on amd64
532
+
533
+  28 Jan 2005; Andrej Kacian <ticho@gentoo.org> -clamav-0.81_rc1.ebuild:
534
+  Pulling rc ebuild out of the tree, because there's a full release already.
535
+
536
+  27 Jan 2005; Gustavo Zacarias <gustavoz@gentoo.org> clamav-0.81.ebuild:
537
+  Stable on sparc wrt #78656
538
+
539
+  27 Jan 2005; Andrej Kacian <ticho@gentoo.org> clamav-0.81.ebuild:
540
+  Stable on x86, wrt #78656. Depend on fixed version of zlib (#61749) and
541
+  curl, according to configure.in.
542
+
543
+*clamav-0.81 (27 Jan 2005)
544
+
545
+  27 Jan 2005; Andrej Kacian <ticho@gentoo.org> files/clamd.rc,
546
+  +clamav-0.81.ebuild:
547
+  Version bump. Added "provide antivirus" to the initscript.
548
+
549
+  26 Jan 2005; petre rodan <kaiowas@gentoo.org> clamav-0.75.1.ebuild,
550
+  clamav-0.80.ebuild, clamav-0.81_rc1.ebuild:
551
+  added selinux RDEPEND
552
+
553
+*clamav-0.81_rc1 (25 Jan 2005)
554
+
555
+  25 Jan 2005; Andrej Kacian <ticho@gentoo.org> +clamav-0.81_rc1.ebuild:
556
+  Version bump. Closes #78796, reported by djfunk <djfunk@free.fr>.
557
+
558
+  25 Jan 2005; Thomas Raschbacher <lordvan@gentoo.org> files/clamd.rc:
559
+  changed init script dependency from 'need net' to 'use net'. fixes bug
560
+  #76022, thanks to Thomas Bettler <bettlertho@sis.unibe.ch> for pointing this
561
+  out
562
+
563
+  19 Jan 2005; Joshua Kinard <kumba@gentoo.org> clamav-0.75.1.ebuild:
564
+  Untested on mips, someone wasn't paying attention when they added the mips
565
+  keyword in the first place. Removing until we get user or some other
566
+  verification that it works.
567
+
568
+  28 Dec 2004; Markus Rothe <corsair@gentoo.org> clamav-0.80.ebuild:
569
+  Added ~ppc64 to KEYWORDS
570
+
571
+  28 Dec 2004; Ciaran McCreesh <ciaranm@gentoo.org> :
572
+  Change encoding to UTF-8 for GLEP 31 compliance
573
+
574
+  11 Dec 2004; Bryan Østergaard <kloeri@gentoo.org> clamav-0.80.ebuild:
575
+  ~alpha keyword.
576
+
577
+  30 Nov 2004; Guy Martin <gmsoft@gentoo.org> clamav-0.80.ebuild:
578
+  Stable on hppa.
579
+
580
+  15 Nov 2004; Gustavo Zacarias <gustavoz@gentoo.org> clamav-0.80.ebuild:
581
+  Stable on sparc
582
+
583
+  13 Nov 2004; Tom Martin <slarti@gentoo.org> clamav-0.80.ebuild:
584
+  Stable on amd64.
585
+
586
+*clamav-0.80_rc3 (13 Nov 2004)
587
+
588
+  13 Nov 2004; Andrej Kacian <ticho@gentoo.org> -clamav-0.80_rc3.ebuild:
589
+  Removed 0.80_rc3.
590
+
591
+  13 Nov 2004; Andrej Kacian <ticho@gentoo.org> clamav-0.80.ebuild:
592
+  Stable on x86.
593
+
594
+  23 Oct 2004; Tom Martin <slarti@gentoo.org> clamav-0.80.ebuild:
595
+  Marked ~amd64, see bug 68633.
596
+
597
+  18 Oct 2004; Gustavo Zacarias <gustavoz@gentoo.org> clamav-0.80.ebuild:
598
+  Keyworded ~sparc wrt #58960
599
+
600
+  18 Oct 2004; Andrej Kacian <ticho@gentoo.org> clamav-0.80.ebuild:
601
+  Added postinstall warning about config file name change.
602
+
603
+*clamav-0.80 (17 Oct 2004)
604
+
605
+  17 Oct 2004; Andrej Kacian <ticho@gentoo.org> +clamav-0.80.ebuild:
606
+  Version bump. Closes #67907, reported by djfunk <djfunk@free.fr>.
607
+
608
+  08 Oct 2004; Thomas Raschbacher <lordvan@gentoo.org> clamav-0.67.ebuild,
609
+  clamav-0.68.1.ebuild, clamav-0.70.ebuild, clamav-0.71.ebuild,
610
+  clamav-0.72.ebuild, clamav-0.73.ebuild, clamav-0.74.ebuild,
611
+  clamav-0.75.ebuild:
612
+  cleaned out old versions and added 0.80_rc3
613
+  Bug #58960 (thanks to all testers)
614
+
615
+  05 Oct 2004; Pieter Van den Abeele <pvdabeel@gentoo.org> clamav-0.75.ebuild:
616
+  Masked clamav-0.75.ebuild stable for ppc
617
+
618
+  09 Aug 2004; Gustavo Zacarias <gustavoz@gentoo.org> clamav-0.75.1.ebuild:
619
+  Stable on sparc wrt #58960
620
+
621
+  09 Aug 2004; Guy Martin <gmsoft@gentoo.org> clamav-0.75.1.ebuild:
622
+  Stable on hppa.
623
+
624
+  07 Aug 2004; <agriffis@gentoo.org> clamav-0.75.1.ebuild:
625
+  stable on alpha and ia64 #58960
626
+
627
+  04 Aug 2004; Jeremy Huddleston <eradicator@gentoo.org> files/clamd.rc:
628
+  Fixed missing { in init script.
629
+
630
+  03 Aug 2004; Tom Martin <slarti@gentoo.org> :
631
+  Marked stable on ~amd64, see bug 58960.
632
+
633
+*clamav-0.75.1 (30 Jul 2004)
634
+
635
+  30 Jul 2004; Thomas Raschbacher <lordvan@gentoo.org> clamav-0.75.1.ebuild, files/clamd.rc:
636
+  fixed bug in clamd.rc (thanks to Pavel Riha <Pavel.Riha@trilogic.cz> )
637
+  new version
638
+  marked 0.75 stable x86
639
+
640
+*clamav-0.75 (23 Jul 2004)
641
+
642
+  23 Jul 2004; Thomas Raschbacher <lordvan@gentoo.org> clamav-0.75.ebuild:
643
+  new version
644
+
645
+*clamav-0.74 (06 Jul 2004)
646
+
647
+  06 Jul 2004; Thomas Raschbacher <lordvan@gentoo.org> +clamav-0.74.ebuild:
648
+  new version
649
+
650
+*clamav-0.73 (14 Jun 2004)
651
+
652
+  14 Jun 2004; Thomas Raschbacher <lordvan@gentoo.org> +clamav-0.73.ebuild:
653
+  new version 0.73 added
654
+
655
+  10 Jun 2004; Thomas Raschbacher <lordvan@gentoo.org> clamav-0.67.ebuild,
656
+  clamav-0.68.1.ebuild, clamav-0.70.ebuild, clamav-0.71.ebuild,
657
+  clamav-0.72.ebuild:
658
+  added warning to pkg_postinst regarding restarting the daemons.
659
+  fixes bug #50772, thanks to Remco Barendse <remco@vaag.nu>
660
+
661
+*clamav-0.72 (03 Jun 2004)
662
+
663
+  03 Jun 2004; Thomas Raschbacher <lordvan@gentoo.org> +clamav-0.72.ebuild:
664
+  version bump
665
+
666
+*clamav-0.71 (29 May 2004)
667
+
668
+  29 May 2004; Robin H. Johnson <robbat2@gentoo.org> clamav-0.67.ebuild,
669
+  clamav-0.68.1.ebuild, clamav-0.70.ebuild, clamav-0.71.ebuild, metadata.xml,
670
+  files/clamav-milter.README.gentoo, files/clamd.conf, files/clamd.rc:
671
+  move net-mail/clamav app-antivirus/clamav
672
+
673
+*clamav-0.71 (19 May 2004)
674
+
675
+  19 May 2004; Thomas Raschbacher <lordvan@gentoo.org> +clamav-0.71.ebuild:
676
+  version bump (see application ChangeLog for changes)
677
+
678
+  10 May 2004; Jeremy Huddleston <eradicator@gentoo.org> files/clamd.rc:
679
+  Fixed socket detection in startup script to properly use -S.
680
+
681
+  04 May 2004; Luca Barbato <lu_zero@gentoo.org> clamav-0.70.ebuild:
682
+  Marked ppc
683
+
684
+  30 Apr 2004; Bryan Østergaard <kloeri@gentoo.org> clamav-0.70.ebuild:
685
+  Stable on alpha.
686
+
687
+  29 Apr 2004; Jason Wever <weeve@gentoo.org> clamav-0.70.ebuild:
688
+  Stable on sparc wrt bug #46264.
689
+
690
+  29 Apr 2004; Thomas Raschbacher <lordvan@gentoo.org> clamav-0.68.ebuild,
691
+  clamav-0.70_rc.ebuild:
692
+  Marked clamav-0.70 stable x86
693
+  Removed clamav-0.68 because of RAR bug
694
+  Removed clamav-0.70_rc
695
+
696
+  29 Apr 2004; Guy Martin <gmsoft@gentoo.org> clamav-0.70.ebuild:
697
+  Marked stable on hppa for bug #46264.
698
+
699
+  21 Apr 2004; Guy Martin <gmsoft@gentoo.org> clamav-0.68.1.ebuild:
700
+  Marked stable on hppa.
701
+
702
+*clamav-0.70 (17 Apr 2004)
703
+
704
+  17 Apr 2004; Thomas Raschbacher <lordvan@gentoo.org> clamav-0.70.ebuild:
705
+  version bump (lots of changes; see the application ChangeLog/Webpage)
706
+
707
+  07 Apr 2004; Seemant Kulleen <seemant@gentoo.org> clamav-0.68.1.ebuild:
708
+  stabled on x86, thanks for testing todd
709
+
710
+  03 Apr 2004; Lars Weiler <pylon@gentoo.org> clamav-0.68.1.ebuild:
711
+  stable on ppc as requested in bug #45357
712
+
713
+  30 Mar 2004; Aron Griffis <agriffis@gentoo.org> clamav-0.68.1.ebuild:
714
+  Stable on alpha and ia64 for bug 45357
715
+
716
+  30 Mar 2004; Thomas Raschbacher <lordvan@gentoo.org> clamav-0.68.1.ebuild,
717
+  clamav-0.68.ebuild, clamav-0.70_rc.ebuild:
718
+  added depend for dev-libs/gmp when crypt is in USE
719
+
720
+*clamav-0.68.1 (29 Mar 2004)
721
+
722
+  29 Mar 2004; Thomas Raschbacher <lordvan@gentoo.org> clamav-0.68.1.ebuild:
723
+  version bump (0.68-1); Bugzilla Bug #45357
724
+	
725
+  26 Mar 2004; Jason Wever <weeve@gentoo.org> clamav-0.68.ebuild:
726
+  Marked stable on sparc wrt bug #45357.
727
+
728
+  26 Mar 2004; Jon Portnoy <avenj@gentoo.org> clamav-0.68.ebuild :
729
+  Stable on AMD64.
730
+
731
+*clamav-0.68 (26 Mar 2004)
732
+
733
+  26 Mar 2004; <solar@gentoo.org> clamav-0.68.ebuild:
734
+  DoS vulnerability with processing of RAR archives. Bugzilla Bug #45357
735
+
736
+*clamav-0.70_rc (21 Mar 2004)
737
+
738
+  21 Mar 2004; Thomas Raschbacher <lordvan@gentoo.org> clamav-0.70_rc.ebuild:
739
+  version bump (~arch)
740
+	
741
+  21 Feb 2004; Hanno Boeck <hanno@gentoo.org> clamav-0.54-r1.ebuild,
742
+  clamav-0.60-r1.ebuild, clamav-0.60.ebuild, clamav-0.65.ebuild:
743
+  Removing all old ebuilds with security bugs.
744
+
745
+  17 Feb 2004; Aron Griffis <agriffis@gentoo.org> clamav-0.67.ebuild:
746
+  stable on alpha and ia64
747
+
748
+  16 Feb 2004; Jason Wever <weeve@gentoo.org> clamav-0.67.ebuild:
749
+  Marked stable on sparc, fixes bug #41248.
750
+
751
+*clamav-0.67 (17 Feb 2004)
752
+
753
+  17 Feb 2004; Hanno Boeck <hanno@gentoo.org> clamav-0.67.ebuild:
754
+  Version bump.
755
+
756
+  22 Jan 2004; Hanno Boeck <hanno@gentoo.org> files/clamd.rc:
757
+  Some fixes to the init.d-script.
758
+
759
+*clamav-0.65 (20 Jan 2004)
760
+
761
+  20 Jan 2004; Hanno Boeck <hanno@gentoo.org> clamav-0.65.ebuild:
762
+  Version bump. Fixed download location and made it FHS-compilant.
763
+
764
+  16 Jan 2004; Bartosch Pixa <darkspecter@gentoo.org> clamav-0.60.ebuild:
765
+  set ppc in keywords
766
+
767
+  14 Dec 2003; <spider@gentoo.org> files/clamd.rc:
768
+  QA: fixing chown user.group to user:group, bug #35127
769
+
770
+*clamav-0.60-r1 (27 Oct 2003)
771
+
772
+  27 Oct 2003; Nick Hadaway <raker@gentoo.org> clamav-0.60-r1.ebuild:
773
+  Added support for the milter use flag which builds clamav-milter.
774
+  Associated docs coming soon.
775
+
776
+  07 Oct 2003; Markus Nigbur <pyrania@gentoo.org> clamav-0.54-r1.ebuild,
777
+  clamav-0.60.ebuild:
778
+  Changed SRC_URI to sourceforge.
779
+
780
+  06 Sep 2003; Jason Wever <weeve@gentoo.org> clamav-0.60.ebuild:
781
+  Marked stable on sparc.
782
+
783
+*clamav-0.60 (19 Apr 2003)
784
+
785
+  27 Jun 2003; Mike Frysinger <vapier@gentoo.org> :
786
+  Filtered out large file support on glibc-2.2.x since it breaks.
787
+
788
+  19 Apr 2003; Preston A. Elder <prez@gentoo.org> clamav-0.60.ebuild,
789
+  files/digest-clamav-0.60:
790
+  Version bump
791
+
792
+*clamav-0.54-r1 (19 Apr 2003)
793
+
794
+  27 Jun 2003; Mike Frysinger <vapier@gentoo.org> :
795
+  Filtered out large file support on glibc-2.2.x since it breaks.
796
+
797
+  24 Apr 2003; Mike Frysinger <vapier@gentoo.org> :
798
+  Redid user/group addition since the last version was wrong
799
+
800
+  19 Apr 2003; Preston A. Elder <prez@gentoo.org> clamav-0.54-r1.ebuild:
801
+  Made ebuild provide virtual/virus
802
+
803
+  19 Apr 2003; Preston A. Elder <prez@gentoo.org> clamav-0.54-r1.ebuild,
804
+  files/digest-clamav-0.54 files/clamd.rc files/clamd.conf:
805
+  Automated user/group adding
806
+
807
+*clamav-0.54 (03 Feb 2003)
808
+
809
+  03 Feb 2003; Nick Hadaway <raker@gentoo.org> clamav-0.54.ebuild,
810
+  files/digest-clamav-0.54 :
811
+  Ebuild suggested by Pavel Tcholakov on bug #14580.  I have a funny
812
+  feeling we are going to need an app-virus category soon.
... ...
@@ -0,0 +1,56 @@
1
+AUX clamav-base64.patch 214 RMD160 b5f0a2e9a64650cce63aca4e9d192c4142de7cb6 SHA1 b2f9337678d87223da975722782e4ebb42968c87 SHA256 f9158412c200fc838e53b547b1c19af4083a08d7494f610cc09e8d9ab95fc8f5
2
+MD5 e928052687d2e0ce2573cc379c33a6c7 files/clamav-base64.patch 214
3
+RMD160 b5f0a2e9a64650cce63aca4e9d192c4142de7cb6 files/clamav-base64.patch 214
4
+SHA256 f9158412c200fc838e53b547b1c19af4083a08d7494f610cc09e8d9ab95fc8f5 files/clamav-base64.patch 214
5
+AUX clamav-milter.README.gentoo 1124 RMD160 4fb1e2d9b444874838bcea1071969ca6862fb15b SHA1 0b9b86a0e7732eaaf7f880859265754f7a4efd3a SHA256 5e7b142b68964bc3463b077e5698fa77cace45ea9612258b1e1849cee944dd11
6
+MD5 08f7b320461c04bbb88555e389c2e544 files/clamav-milter.README.gentoo 1124
7
+RMD160 4fb1e2d9b444874838bcea1071969ca6862fb15b files/clamav-milter.README.gentoo 1124
8
+SHA256 5e7b142b68964bc3463b077e5698fa77cace45ea9612258b1e1849cee944dd11 files/clamav-milter.README.gentoo 1124
9
+AUX clamd.conf 193 RMD160 abebb5e1607e6819859b51e1a41b583c8266c6df SHA1 5b27737aecf3bd90277988fc60526ede7d4be636 SHA256 cd867dc66af694282584fa2cfd40a662ac2a7c25d6f2288b9afdc657a07226e3
10
+MD5 e29ee77ca9bfe28ed18dbf67a9c90e75 files/clamd.conf 193
11
+RMD160 abebb5e1607e6819859b51e1a41b583c8266c6df files/clamd.conf 193
12
+SHA256 cd867dc66af694282584fa2cfd40a662ac2a7c25d6f2288b9afdc657a07226e3 files/clamd.conf 193
13
+AUX clamd.rc 2033 RMD160 aed0e44ce893dad9da77fba3f1ee56001e99adcb SHA1 d2dc3c366cc373d13f7336940b61597fa66f2cef SHA256 6ccae0a0f3f7be2946ed0975ea5093dac605889c44952bd4e02f20e91e606bce
14
+MD5 1906bcd8209370d0a03fb066161f6d59 files/clamd.rc 2033
15
+RMD160 aed0e44ce893dad9da77fba3f1ee56001e99adcb files/clamd.rc 2033
16
+SHA256 6ccae0a0f3f7be2946ed0975ea5093dac605889c44952bd4e02f20e91e606bce files/clamd.rc 2033
17
+DIST clamav-0.88.5.tar.gz 8663193 RMD160 b0e24b90f2a085ded89fcd90f3434d6bc1981caf SHA1 eb4c671d14d43b7079f19da9d9ef37357fa24c83 SHA256 8b807fcb64e2c523d7da8002ca1174c4173526ae48a7deecca41db30f51cee8f
18
+DIST clamav-0.88.6.tar.gz 8929534 RMD160 efa53c600a70a8f808fbf9cde92ebf193b76e574 SHA1 5fe6efa7c7dc9eb157a78e7851392c737d586bb7 SHA256 cc7f90983aa61b3d893c3311e3f832c5faa204467143cff597ad80bf8ad24daa
19
+DIST clamav-0.90RC1.1.tar.gz 8463538 RMD160 d73a44a1ab79d2a99530409c66ca6520a4c5059b SHA1 f408f1aca163a53961d2bf7eee85333e1d7b1afc SHA256 b4a2a4dc88afca53ca1452c4d2a4e6a00386cd935523f883a732464bbd898e96
20
+DIST clamav-0.90rc2.tar.gz 8706141 RMD160 cdf5674da401af070d6da64113d353e0d9cfdadc SHA1 915ccf0fe4a484352d5df67998cee445b3933eb2 SHA256 a74498f08d7817140036203e5247ee0b2ffa11a0be08c594a7c6444d4cb1a02a
21
+EBUILD clamav-0.88.5.ebuild 3405 RMD160 c3f4890abdd20b7d4083e140820fba584094b13c SHA1 025622db9bf842d37b5b4b3c6dcd5b0dbb7e5e4a SHA256 cc045a7974660ea76725bfd31091444473b92a18ccf24b4871dd41b5df810333
22
+MD5 c05549d893b96104e07d2be8ff5bccd7 clamav-0.88.5.ebuild 3405
23
+RMD160 c3f4890abdd20b7d4083e140820fba584094b13c clamav-0.88.5.ebuild 3405
24
+SHA256 cc045a7974660ea76725bfd31091444473b92a18ccf24b4871dd41b5df810333 clamav-0.88.5.ebuild 3405
25
+EBUILD clamav-0.88.6.ebuild 3530 RMD160 1399f6c484ef05cf2778779e6e52a3f824161573 SHA1 f86e0ad4fb5339aa0944f26383d5376eac5bbfe8 SHA256 3b6c8ee600d44b6e56e3ad2b6d466a4d265e9f862b0128392da4074ac278773f
26
+MD5 86cec7bf8cf08f551d2f1c51e9647e58 clamav-0.88.6.ebuild 3530
27
+RMD160 1399f6c484ef05cf2778779e6e52a3f824161573 clamav-0.88.6.ebuild 3530
28
+SHA256 3b6c8ee600d44b6e56e3ad2b6d466a4d265e9f862b0128392da4074ac278773f clamav-0.88.6.ebuild 3530
29
+EBUILD clamav-0.90_rc1.ebuild 3631 RMD160 79e9e374e9d365e4447a4c6b2a760788dd07625b SHA1 03e8d99e580e678b3e0598aaf646cbade7718757 SHA256 9cfe30226755b3b7065976c29a12cbbbd90a25167ea6bf1569d9c463a78c1d22
30
+MD5 b1bb7916ae1160b6d39def34b6d00e89 clamav-0.90_rc1.ebuild 3631
31
+RMD160 79e9e374e9d365e4447a4c6b2a760788dd07625b clamav-0.90_rc1.ebuild 3631
32
+SHA256 9cfe30226755b3b7065976c29a12cbbbd90a25167ea6bf1569d9c463a78c1d22 clamav-0.90_rc1.ebuild 3631
33
+EBUILD clamav-0.90_rc2.ebuild 3703 RMD160 90af1ba2fe13a304aef79fe8ed0b1e2867ce597d SHA1 3d608400d7d4aef806bf30b8b67aed3c9c1d982c SHA256 9bfa2ec7569f921479614c3dab02102b32d46d188360a05e278b044eac3073ed
34
+MD5 7f98ec443dd06e6556b01ce44051fde3 clamav-0.90_rc2.ebuild 3703
35
+RMD160 90af1ba2fe13a304aef79fe8ed0b1e2867ce597d clamav-0.90_rc2.ebuild 3703
36
+SHA256 9bfa2ec7569f921479614c3dab02102b32d46d188360a05e278b044eac3073ed clamav-0.90_rc2.ebuild 3703
37
+MISC ChangeLog 28378 RMD160 cf0d8cfd675e256306c5696b2b35d551934659c7 SHA1 cc2f210eaab1653889b23a8225ea9d126ecf38ae SHA256 ad35a223a8e1a3ee59d39d00b4291b2d76f7233240436ab84eee68e0728b726a
38
+MD5 f75bab549d54512a2639103a48794137 ChangeLog 28378
39
+RMD160 cf0d8cfd675e256306c5696b2b35d551934659c7 ChangeLog 28378
40
+SHA256 ad35a223a8e1a3ee59d39d00b4291b2d76f7233240436ab84eee68e0728b726a ChangeLog 28378
41
+MISC metadata.xml 184 RMD160 c37bff1fc1cd7139c91dae9b0fa5082e1d81f153 SHA1 cc0a188d9ad2411e78747326c62dd046bd5413c8 SHA256 d51011aa837db802ef539a1321a4af0a4a00879d475b92fd58f3c01df7320b58
42
+MD5 7e32edfd72887a57b16ecd73f0f7a1a0 metadata.xml 184
43
+RMD160 c37bff1fc1cd7139c91dae9b0fa5082e1d81f153 metadata.xml 184
44
+SHA256 d51011aa837db802ef539a1321a4af0a4a00879d475b92fd58f3c01df7320b58 metadata.xml 184
45
+MD5 771923a686a6485a06d9bb833dec9872 files/digest-clamav-0.88.5 244
46
+RMD160 cac3e56638adf1fbb9f9d356d0ac724e2c877b7f files/digest-clamav-0.88.5 244
47
+SHA256 9bd80aa793fa0b018d41141f9c7efbde27989b3ecac741723b2ab3e3f641e719 files/digest-clamav-0.88.5 244
48
+MD5 f9759ea151bfa3a383ad5fc55e6cb4bc files/digest-clamav-0.88.6 244
49
+RMD160 673d71e776b5d06aa8d54cd86ea3302ca70b5136 files/digest-clamav-0.88.6 244
50
+SHA256 68ed32f50d9252b826a618a0b2f5d55d8655b480059ae039bddcd5f0e2f37b57 files/digest-clamav-0.88.6 244
51
+MD5 fa7e303f8f99e4693beb43a0a2b0e0b9 files/digest-clamav-0.90_rc1 253
52
+RMD160 ee5645616db2626c6cf87c99f2ea0177f5a4c149 files/digest-clamav-0.90_rc1 253
53
+SHA256 68559c554b8fc8afa9ea0d2b7c3f5db41d19cdf15a8d115d6d83fa27aede0d74 files/digest-clamav-0.90_rc1 253
54
+MD5 9fc9dd79c51ed6e46836c21abe6521e0 files/digest-clamav-0.90_rc2 247
55
+RMD160 d2538b5e59b8246b686bda02443ae560310b5802 files/digest-clamav-0.90_rc2 247
56
+SHA256 c0187965a68f4423a6d8937f911dde49a724751f436f51741c150f4ac5ee16b6 files/digest-clamav-0.90_rc2 247
... ...
@@ -0,0 +1,112 @@
1
+# Copyright 1999-2006 Gentoo Foundation
2
+# Distributed under the terms of the GNU General Public License v2
3
+# $Header: /var/cvsroot/gentoo-x86/app-antivirus/clamav/clamav-0.88.5.ebuild,v 1.8 2006/10/24 14:35:43 chutzpah Exp $
4
+
5
+inherit eutils flag-o-matic fixheadtails
6
+
7
+DESCRIPTION="Clam Anti-Virus Scanner"
8
+HOMEPAGE="http://www.clamav.net/"
9
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
10
+
11
+LICENSE="GPL-2"
12
+SLOT="0"
13
+KEYWORDS="alpha amd64 hppa ia64 ppc ppc64 sparc x86"
14
+IUSE="crypt milter selinux mailwrapper"
15
+
16
+DEPEND="virtual/libc
17
+	crypt? ( >=dev-libs/gmp-4.1.2 )
18
+	milter? ( mail-mta/sendmail )
19
+	>=sys-libs/zlib-1.2.1-r3
20
+	>=net-misc/curl-7.10.0
21
+	>=sys-apps/sed-4"
22
+RDEPEND="${DEPEND}
23
+	selinux? ( sec-policy/selinux-clamav )
24
+	sys-apps/grep"
25
+PROVIDE="virtual/antivirus"
26
+
27
+pkg_setup() {
28
+	if use milter; then
29
+		if [ ! -e /usr/lib/libmilter.a ] ; then
30
+			ewarn "In order to enable milter support, clamav needs sendmail with enabled milter"
31
+			ewarn "USE flag. Either recompile sendmail with milter USE flag enabled, or disable"
32
+			ewarn "this flag for clamav as well to disable milter support."
33
+			die "need milter-enabled sendmail"
34
+		fi
35
+	fi
36
+	enewgroup clamav
37
+	enewuser clamav -1 -1 /dev/null clamav
38
+}
39
+
40
+src_compile() {
41
+	has_version =sys-libs/glibc-2.2* && filter-lfs-flags
42
+
43
+	local myconf
44
+
45
+	# we depend on fixed zlib, so we can disable this check to prevent redundant
46
+	# warning (bug #61749)
47
+	myconf="${myconf} --disable-zlib-vcheck"
48
+	# use id utility instead of /etc/passwd parsing (bug #72540)
49
+	myconf="${myconf} --enable-id-check"
50
+	use milter && {
51
+		myconf="${myconf} --enable-milter"
52
+		use mailwrapper && \
53
+			myconf="${myconf} --with-sendmail=/usr/sbin/sendmail.sendmail"
54
+	}
55
+
56
+	ht_fix_file configure
57
+	econf ${myconf} --with-dbdir=/var/lib/clamav || die
58
+	emake || die
59
+}
60
+
61
+src_install() {
62
+	make DESTDIR=${D} install || die
63
+	dodoc AUTHORS BUGS NEWS README ChangeLog FAQ INSTALL
64
+	newconfd ${FILESDIR}/clamd.conf clamd
65
+	newinitd ${FILESDIR}/clamd.rc clamd
66
+	dodoc ${FILESDIR}/clamav-milter.README.gentoo
67
+
68
+	dodir /var/run/clamav
69
+	keepdir /var/run/clamav
70
+	fowners clamav:clamav /var/run/clamav
71
+	dodir /var/log/clamav
72
+	keepdir /var/log/clamav
73
+	fowners clamav:clamav /var/log/clamav
74
+
75
+	# Change /etc/clamd.conf to be usable out of the box
76
+	sed -i -e "s:^\(Example\):\# \1:" \
77
+		-e "s:.*\(PidFile\) .*:\1 /var/run/clamav/clamd.pid:" \
78
+		-e "s:.*\(LocalSocket\) .*:\1 /var/run/clamav/clamd.sock:" \
79
+		-e "s:.*\(User\) .*:\1 clamav:" \
80
+		-e "s:^\#\(LogFile\) .*:\1 /var/log/clamav/clamd.log:" \
81
+		-e "s:^\#\(LogTime\).*:\1:" \
82
+		${D}/etc/clamd.conf
83
+
84
+	# Do the same for /etc/freshclam.conf
85
+	sed -i -e "s:^\(Example\):\# \1:" \
86
+		-e "s:.*\(PidFile\) .*:\1 /var/run/clamav/freshclam.pid:" \
87
+		-e "s:.*\(DatabaseOwner\) .*:\1 clamav:" \
88
+		-e "s:^\#\(LogFile\) .*:\1 /var/log/freshclam.log:" \
89
+		-e "s:^\#\(LogTime\).*:\1:" \
90
+		${D}/etc/freshclam.conf
91
+
92
+	if use milter ; then
93
+		echo "START_MILTER=no" \
94
+			>> ${D}/etc/conf.d/clamd
95
+		echo "MILTER_SOCKET=\"/var/run/clamav/clmilter.sock\"" \
96
+			>>${D}/etc/conf.d/clamd
97
+		echo "MILTER_OPTS=\"-m 10 --timeout=0\"" \
98
+			>>${D}/etc/conf.d/clamd
99
+	fi
100
+}
101
+
102
+pkg_postinst() {
103
+	echo
104
+	ewarn "Warning: clamd and/or freshclam have not been restarted."
105
+	ewarn "You should restart them with: /etc/init.d/clamd restart"
106
+	echo
107
+	if use milter ; then
108
+		einfo "For simple instructions how to setup the clamav-milter type:"
109
+		echo "  zless /usr/share/doc/${PF}/clamav-milter.README.gentoo.gz"
110
+		echo
111
+	fi
112
+}
... ...
@@ -0,0 +1,118 @@
1
+# Copyright 1999-2006 Gentoo Foundation
2
+# Distributed under the terms of the GNU General Public License v2
3
+# $Header: /var/cvsroot/gentoo-x86/app-antivirus/clamav/clamav-0.88.6.ebuild,v 1.3 2006/11/27 22:20:07 drizzt Exp $
4
+
5
+inherit eutils flag-o-matic fixheadtails
6
+
7
+DESCRIPTION="Clam Anti-Virus Scanner"
8
+HOMEPAGE="http://www.clamav.net/"
9
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
10
+
11
+LICENSE="GPL-2"
12
+SLOT="0"
13
+KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
14
+IUSE="crypt milter selinux mailwrapper"
15
+
16
+DEPEND="virtual/libc
17
+	crypt? ( >=dev-libs/gmp-4.1.2 )
18
+	milter? ( || ( mail-filter/libmilter mail-mta/sendmail ) )
19
+	>=sys-libs/zlib-1.2.1-r3
20
+	>=net-misc/curl-7.10.0
21
+	>=sys-apps/sed-4"
22
+RDEPEND="${DEPEND}
23
+	selinux? ( sec-policy/selinux-clamav )
24
+	sys-apps/grep"
25
+PROVIDE="virtual/antivirus"
26
+
27
+pkg_setup() {
28
+	if use milter; then
29
+		if [ ! -e /usr/lib/libmilter.a ] ; then
30
+			ewarn "In order to enable milter support, clamav needs sendmail with enabled milter"
31
+			ewarn "USE flag. Either recompile sendmail with milter USE flag enabled, or disable"
32
+			ewarn "this flag for clamav as well to disable milter support."
33
+			die "need milter-enabled sendmail"
34
+		fi
35
+	fi
36
+	enewgroup clamav
37
+	enewuser clamav -1 -1 /dev/null clamav
38
+}
39
+
40
+src_unpack() {
41
+	unpack ${A}
42
+	cd ${S}
43
+	epatch ${FILESDIR}/clamav-base64.patch
44
+}
45
+
46
+src_compile() {
47
+	has_version =sys-libs/glibc-2.2* && filter-lfs-flags
48
+
49
+	local myconf
50
+
51
+	# we depend on fixed zlib, so we can disable this check to prevent redundant
52
+	# warning (bug #61749)
53
+	myconf="${myconf} --disable-zlib-vcheck"
54
+	# use id utility instead of /etc/passwd parsing (bug #72540)
55
+	myconf="${myconf} --enable-id-check"
56
+	use milter && {
57
+		myconf="${myconf} --enable-milter"
58
+		use mailwrapper && \
59
+			myconf="${myconf} --with-sendmail=/usr/sbin/sendmail.sendmail"
60
+	}
61
+
62
+	ht_fix_file configure
63
+	econf ${myconf} --with-dbdir=/var/lib/clamav || die
64
+	emake || die
65
+}
66
+
67
+src_install() {
68
+	make DESTDIR=${D} install || die
69
+	dodoc AUTHORS BUGS NEWS README ChangeLog FAQ INSTALL
70
+	newconfd ${FILESDIR}/clamd.conf clamd
71
+	newinitd ${FILESDIR}/clamd.rc clamd
72
+	dodoc ${FILESDIR}/clamav-milter.README.gentoo
73
+
74
+	dodir /var/run/clamav
75
+	keepdir /var/run/clamav
76
+	fowners clamav:clamav /var/run/clamav
77
+	dodir /var/log/clamav
78
+	keepdir /var/log/clamav
79
+	fowners clamav:clamav /var/log/clamav
80
+
81
+	# Change /etc/clamd.conf to be usable out of the box
82
+	sed -i -e "s:^\(Example\):\# \1:" \
83
+		-e "s:.*\(PidFile\) .*:\1 /var/run/clamav/clamd.pid:" \
84
+		-e "s:.*\(LocalSocket\) .*:\1 /var/run/clamav/clamd.sock:" \
85
+		-e "s:.*\(User\) .*:\1 clamav:" \
86
+		-e "s:^\#\(LogFile\) .*:\1 /var/log/clamav/clamd.log:" \
87
+		-e "s:^\#\(LogTime\).*:\1:" \
88
+		${D}/etc/clamd.conf
89
+
90
+	# Do the same for /etc/freshclam.conf
91
+	sed -i -e "s:^\(Example\):\# \1:" \
92
+		-e "s:.*\(PidFile\) .*:\1 /var/run/clamav/freshclam.pid:" \
93
+		-e "s:.*\(DatabaseOwner\) .*:\1 clamav:" \
94
+		-e "s:^\#\(LogFile\) .*:\1 /var/log/freshclam.log:" \
95
+		-e "s:^\#\(LogTime\).*:\1:" \
96
+		${D}/etc/freshclam.conf
97
+
98
+	if use milter ; then
99
+		echo "START_MILTER=no" \
100
+			>> ${D}/etc/conf.d/clamd
101
+		echo "MILTER_SOCKET=\"/var/run/clamav/clmilter.sock\"" \
102
+			>>${D}/etc/conf.d/clamd
103
+		echo "MILTER_OPTS=\"-m 10 --timeout=0\"" \
104
+			>>${D}/etc/conf.d/clamd
105
+	fi
106
+}
107
+
108
+pkg_postinst() {
109
+	echo
110
+	ewarn "Warning: clamd and/or freshclam have not been restarted."
111
+	ewarn "You should restart them with: /etc/init.d/clamd restart"
112
+	echo
113
+	if use milter ; then
114
+		einfo "For simple instructions how to setup the clamav-milter type:"
115
+		echo "  zless /usr/share/doc/${PF}/clamav-milter.README.gentoo.gz"
116
+		echo
117
+	fi
118
+}
... ...
@@ -0,0 +1,120 @@
1
+# Copyright 1999-2006 Gentoo Foundation
2
+# Distributed under the terms of the GNU General Public License v2
3
+# $Header: /var/cvsroot/gentoo-x86/app-antivirus/clamav/clamav-0.90_rc1.ebuild,v 1.4 2006/11/05 21:44:06 zmedico Exp $
4
+
5
+inherit eutils flag-o-matic fixheadtails
6
+
7
+MY_P="${P/_rc1/RC1.1}"
8
+DESCRIPTION="Clam Anti-Virus Scanner"
9
+HOMEPAGE="http://www.clamav.net/"
10
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz"
11
+
12
+LICENSE="GPL-2"
13
+SLOT="0"
14
+KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
15
+IUSE="crypt milter selinux mailwrapper"
16
+
17
+DEPEND="virtual/libc
18
+	crypt? ( >=dev-libs/gmp-4.1.2 )
19
+	milter? ( || ( mail-filter/libmilter mail-mta/sendmail ) )
20
+	>=sys-libs/zlib-1.2.1-r3
21
+	>=net-misc/curl-7.10.0
22
+	>=sys-apps/sed-4"
23
+RDEPEND="${DEPEND}
24
+	selinux? ( sec-policy/selinux-clamav )
25
+	sys-apps/grep"
26
+PROVIDE="virtual/antivirus"
27
+
28
+S="${WORKDIR}/${MY_P}"
29
+
30
+pkg_setup() {
31
+	if use milter; then
32
+		if [ ! -e /usr/lib/libmilter.a ] ; then
33
+			ewarn "In order to enable milter support, clamav needs sendmail with enabled milter"
34
+			ewarn "USE flag. Either recompile sendmail with milter USE flag enabled, or disable"
35
+			ewarn "this flag for clamav as well to disable milter support."
36
+			die "need milter-enabled sendmail"
37
+		fi
38
+	fi
39
+	enewgroup clamav
40
+	enewuser clamav -1 -1 /dev/null clamav
41
+}
42
+
43
+src_compile() {
44
+	has_version =sys-libs/glibc-2.2* && filter-lfs-flags
45
+
46
+	local myconf
47
+
48
+	# we depend on fixed zlib, so we can disable this check to prevent redundant
49
+	# warning (bug #61749)
50
+	myconf="${myconf} --disable-zlib-vcheck"
51
+	# use id utility instead of /etc/passwd parsing (bug #72540)
52
+	myconf="${myconf} --enable-id-check"
53
+	use milter && {
54
+		myconf="${myconf} --enable-milter"
55
+		use mailwrapper && \
56
+			myconf="${myconf} --with-sendmail=/usr/sbin/sendmail.sendmail"
57
+	}
58
+
59
+	ht_fix_file configure
60
+	econf ${myconf} \
61
+		--enable-experimental \
62
+		--with-dbdir=/var/lib/clamav || die
63
+	emake || die
64
+}
65
+
66
+src_install() {
67
+	make DESTDIR=${D} install || die
68
+	dodoc AUTHORS BUGS NEWS README ChangeLog FAQ INSTALL
69
+	newconfd ${FILESDIR}/clamd.conf clamd
70
+	newinitd ${FILESDIR}/clamd.rc clamd
71
+	dodoc ${FILESDIR}/clamav-milter.README.gentoo
72
+
73
+	dodir /var/run/clamav
74
+	keepdir /var/run/clamav
75
+	fowners clamav:clamav /var/run/clamav
76
+	dodir /var/log/clamav
77
+	keepdir /var/log/clamav
78
+	fowners clamav:clamav /var/log/clamav
79
+
80
+	# Change /etc/clamd.conf to be usable out of the box
81
+	sed -i -e "s:^\(Example\):\# \1:" \
82
+		-e "s:.*\(PidFile\) .*:\1 /var/run/clamav/clamd.pid:" \
83
+		-e "s:.*\(LocalSocket\) .*:\1 /var/run/clamav/clamd.sock:" \
84
+		-e "s:.*\(User\) .*:\1 clamav:" \
85
+		-e "s:^\#\(LogFile\) .*:\1 /var/log/clamav/clamd.log:" \
86
+		-e "s:^\#\(LogTime\).*:\1 yes:" \
87
+		${D}/etc/clamd.conf
88
+
89
+	# Do the same for /etc/freshclam.conf
90
+	sed -i -e "s:^\(Example\):\# \1:" \
91
+		-e "s:.*\(PidFile\) .*:\1 /var/run/clamav/freshclam.pid:" \
92
+		-e "s:.*\(DatabaseOwner\) .*:\1 clamav:" \
93
+		-e "s:^\#\(UpdateLogFile\) .*:\1 /var/log/clamav/freshclam.log:" \
94
+		${D}/etc/freshclam.conf
95
+
96
+	if use milter ; then
97
+		echo "START_MILTER=no" \
98
+			>> ${D}/etc/conf.d/clamd
99
+		echo "MILTER_SOCKET=\"/var/run/clamav/clmilter.sock\"" \
100
+			>>${D}/etc/conf.d/clamd
101
+		echo "MILTER_OPTS=\"-m 10 --timeout=0\"" \
102
+			>>${D}/etc/conf.d/clamd
103
+	fi
104
+}
105
+
106
+pkg_postinst() {
107
+	echo
108
+	ewarn "Warning: clamd and/or freshclam have not been restarted."
109
+	ewarn "You should restart them with: /etc/init.d/clamd restart"
110
+	echo
111
+	if use milter ; then
112
+		einfo "For simple instructions how to setup the clamav-milter type:"
113
+		echo "  zless /usr/share/doc/${PF}/clamav-milter.README.gentoo.gz"
114
+		echo
115
+	fi
116
+	ewarn "This is a RELEASE CANDIDATE version, with EXPERIMENTAL code ENABLED."
117
+	ewarn "USE AT YOUR OWN RISK"
118
+	echo
119
+	ebeep 3
120
+}
... ...
@@ -0,0 +1,126 @@
1
+# Copyright 1999-2006 Gentoo Foundation
2
+# Distributed under the terms of the GNU General Public License v2
3
+# $Header: /var/cvsroot/gentoo-x86/app-antivirus/clamav/clamav-0.90_rc2.ebuild,v 1.3 2006/11/05 21:44:06 zmedico Exp $
4
+
5
+inherit eutils flag-o-matic fixheadtails
6
+
7
+MY_P="${P/_/}"
8
+DESCRIPTION="Clam Anti-Virus Scanner"
9
+HOMEPAGE="http://www.clamav.net/"
10
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz"
11
+
12
+LICENSE="GPL-2"
13
+SLOT="0"
14
+KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
15
+IUSE="crypt milter selinux mailwrapper"
16
+
17
+DEPEND="virtual/libc
18
+	crypt? ( >=dev-libs/gmp-4.1.2 )
19
+	milter? ( || ( mail-filter/libmilter mail-mta/sendmail ) )
20
+	>=sys-libs/zlib-1.2.1-r3
21
+	>=net-misc/curl-7.10.0
22
+	>=sys-apps/sed-4"
23
+RDEPEND="${DEPEND}
24
+	selinux? ( sec-policy/selinux-clamav )
25
+	sys-apps/grep"
26
+PROVIDE="virtual/antivirus"
27
+
28
+S="${WORKDIR}/${MY_P}"
29
+
30
+pkg_setup() {
31
+	if use milter; then
32
+		if [ ! -e /usr/lib/libmilter.a ] ; then
33
+			ewarn "In order to enable milter support, clamav needs sendmail with enabled milter"
34
+			ewarn "USE flag. Either recompile sendmail with milter USE flag enabled, or disable"
35
+			ewarn "this flag for clamav as well to disable milter support."
36
+			die "need milter-enabled sendmail"
37
+		fi
38
+	fi
39
+	enewgroup clamav
40
+	enewuser clamav -1 -1 /dev/null clamav
41
+}
42
+
43
+src_unpack() {
44
+	unpack ${A}
45
+	cd ${S}
46
+	epatch ${FILESDIR}/clamav-base64.patch
47
+}
48
+
49
+src_compile() {
50
+	has_version =sys-libs/glibc-2.2* && filter-lfs-flags
51
+
52
+	local myconf
53
+
54
+	# we depend on fixed zlib, so we can disable this check to prevent redundant
55
+	# warning (bug #61749)
56
+	myconf="${myconf} --disable-zlib-vcheck"
57
+	# use id utility instead of /etc/passwd parsing (bug #72540)
58
+	myconf="${myconf} --enable-id-check"
59
+	use milter && {
60
+		myconf="${myconf} --enable-milter"
61
+		use mailwrapper && \
62
+			myconf="${myconf} --with-sendmail=/usr/sbin/sendmail.sendmail"
63
+	}
64
+
65
+	ht_fix_file configure
66
+	econf ${myconf} \
67
+		--enable-experimental \
68
+		--with-dbdir=/var/lib/clamav || die
69
+	emake || die
70
+}
71
+
72
+src_install() {
73
+	make DESTDIR=${D} install || die
74
+	dodoc AUTHORS BUGS NEWS README ChangeLog FAQ INSTALL
75
+	newconfd ${FILESDIR}/clamd.conf clamd
76
+	newinitd ${FILESDIR}/clamd.rc clamd
77
+	dodoc ${FILESDIR}/clamav-milter.README.gentoo
78
+
79
+	dodir /var/run/clamav
80
+	keepdir /var/run/clamav
81
+	fowners clamav:clamav /var/run/clamav
82
+	dodir /var/log/clamav
83
+	keepdir /var/log/clamav
84
+	fowners clamav:clamav /var/log/clamav
85
+
86
+	# Change /etc/clamd.conf to be usable out of the box
87
+	sed -i -e "s:^\(Example\):\# \1:" \
88
+		-e "s:.*\(PidFile\) .*:\1 /var/run/clamav/clamd.pid:" \
89
+		-e "s:.*\(LocalSocket\) .*:\1 /var/run/clamav/clamd.sock:" \
90
+		-e "s:.*\(User\) .*:\1 clamav:" \
91
+		-e "s:^\#\(LogFile\) .*:\1 /var/log/clamav/clamd.log:" \
92
+		-e "s:^\#\(LogTime\).*:\1 yes:" \
93
+		${D}/etc/clamd.conf
94
+
95
+	# Do the same for /etc/freshclam.conf
96
+	sed -i -e "s:^\(Example\):\# \1:" \
97
+		-e "s:.*\(PidFile\) .*:\1 /var/run/clamav/freshclam.pid:" \
98
+		-e "s:.*\(DatabaseOwner\) .*:\1 clamav:" \
99
+		-e "s:^\#\(UpdateLogFile\) .*:\1 /var/log/clamav/freshclam.log:" \
100
+		${D}/etc/freshclam.conf
101
+
102
+	if use milter ; then
103
+		echo "START_MILTER=no" \
104
+			>> ${D}/etc/conf.d/clamd
105
+		echo "MILTER_SOCKET=\"/var/run/clamav/clmilter.sock\"" \
106
+			>>${D}/etc/conf.d/clamd
107
+		echo "MILTER_OPTS=\"-m 10 --timeout=0\"" \
108
+			>>${D}/etc/conf.d/clamd
109
+	fi
110
+}
111
+
112
+pkg_postinst() {
113
+	echo
114
+	ewarn "Warning: clamd and/or freshclam have not been restarted."
115
+	ewarn "You should restart them with: /etc/init.d/clamd restart"
116
+	echo
117
+	if use milter ; then
118
+		einfo "For simple instructions how to setup the clamav-milter type:"
119
+		echo "  zless /usr/share/doc/${PF}/clamav-milter.README.gentoo.gz"
120
+		echo
121
+	fi
122
+	ewarn "This is a RELEASE CANDIDATE version, with EXPERIMENTAL code ENABLED."
123
+	ewarn "USE AT YOUR OWN RISK"
124
+	echo
125
+	ebeep 3
126
+}
... ...
@@ -0,0 +1,10 @@
1
+--- clamav/libclamav/message.c	2006/10/16 00:33:34	1.191
2
++++ clamav/libclamav/message.c	2006/12/07 09:17:30	1.192
3
+@@ -2074,6 +2074,7 @@
4
+ 
5
+ 			for(p1 = s; p1[0] != '\0'; p1++)
6
+ 				p1[0] = p1[1];
7
++			--s;
8
+ 		}
9
+ }
10
+ 
... ...
@@ -0,0 +1,44 @@
1
+Nick Hadaway <raker@gentoo.org>
2
+Updated by Andrea Barisani <lcars@gentoo.org>
3
+18/05/2004
4
+
5
+Setting up clamav-milter on Gentoo Linux
6
+
7
+Step 1 - Configure clamd
8
+
9
+Check /etc/clamd.conf, default values should work out of the box but 
10
+read and understand all the options especially if you are going to
11
+use it on production boxes.
12
+
13
+Step 2 - Tell the init script to start clamd as well as freshclam and the
14
+         milter itself.
15
+
16
+	nano -w /etc/conf.d/clamd
17
+
18
+	START_CLAMD=yes
19
+	START_FRESHCLAM=yes
20
+	START_MILTER=yes
21
+
22
+Step 3 - Edit sendmail.mc
23
+
24
+	Add these lines to sendmail.mc before any any other 
25
+	INPUT_MAIL_FILTER lines and before MAILER(local)
26
+	NOTE: ANY INPUT_MAIL_FILTER definitions put before these lines
27
+	will be discarded due to the use of confINPUT_MAIL_FILTERS
28
+	Make this your first mail filter. :)
29
+
30
+	INPUT_MAIL_FILTER(`clmilter',`S=local:/var/run/clamav/clmilter.sock, F=, T=S:4m;R:4m')dnl
31
+	define(`confINPUT_MAIL_FILTERS', `clmilter')dnl
32
+
33
+Step 4 - Rebuild sendmail.cf
34
+
35
+	cd /etc/mail
36
+	m4 sendmail.mc > sendmail.cf
37
+
38
+Step 5 - Start clamad
39
+
40
+	/etc/init.d/clamd start
41
+
42
+Step 6 - Restart sendmail
43
+
44
+	/etc/init.d/sendmail restart
... ...
@@ -0,0 +1,7 @@
1
+# Config file for /etc/init.d/clamd
2
+
3
+# NOTICE: Since clamav-0.85-r1, only START_CLAMD and START_FRESHCLAM settings
4
+#	  are used, other are silently ignored
5
+
6
+START_CLAMD=yes
7
+START_FRESHCLAM=yes
... ...
@@ -0,0 +1,71 @@
1
+#!/sbin/runscript
2
+# Copyright 1999-2005 Gentoo Foundation
3
+# Distributed under the terms of the GNU General Public License v2
4
+# $Header: /var/cvsroot/gentoo-x86/app-antivirus/clamav/files/clamd.rc,v 1.8 2005/11/09 16:40:05 ticho Exp $
5
+
6
+depend() {
7
+	use net
8
+	provide antivirus
9
+}
10
+
11
+start() {
12
+	local clamd_socket=`awk '$1 == "LocalSocket" { print $2 }' /etc/clamd.conf`
13
+	if [ "${START_CLAMD}" = "yes" ]; then
14
+		if [ -S "${clamd_socket:-/tmp/clamd}" ]; then
15
+			rm -f ${clamd_socket:-/tmp/clamd}
16
+		fi
17
+		ebegin "Starting clamd"
18
+		start-stop-daemon --start --quiet \
19
+			--exec /usr/sbin/clamd
20
+		eend $? "Failed to start clamd"
21
+	fi
22
+	if [ "${START_FRESHCLAM}" = "yes" ]; then
23
+		ebegin "Starting freshclam"
24
+		start-stop-daemon --start --quiet \
25
+			--exec /usr/bin/freshclam -- -d
26
+		retcode=$?
27
+		if [ ${retcode} = 1 ]; then
28
+			eend 0
29
+			einfo "Virus databases are already up to date."
30
+		else
31
+			eend ${retcode} "Failed to start freshclam"
32
+		fi
33
+	fi
34
+	if [ "${START_MILTER}" = "yes" ]; then
35
+		if [ -S "${MILTER_SOCKET}" ]; then
36
+			rm -f ${MILTER_SOCKET}
37
+		fi
38
+
39
+		local logfile=`awk '$1 == "LogFile" { print $2 }' /etc/clamd.conf`
40
+		local clamav_user=`awk '$1 == "User" { print $2 }' /etc/clamd.conf`
41
+		if [[ -n "${logfile}" && -n "${clamav_user}" ]]; then
42
+			if [ ! -f "${logfile}" ]; then
43
+				touch ${logfile}
44
+			fi	
45
+		chown ${clamav_user} ${logfile}
46
+		fi	
47
+
48
+		ebegin "Starting clamav-milter"
49
+		start-stop-daemon --start --quiet \
50
+			--exec /usr/sbin/clamav-milter -- ${MILTER_OPTS} ${MILTER_SOCKET}
51
+		eend $? "Failed to start clamav-milter"
52
+	fi
53
+}
54
+
55
+stop() {
56
+	if [ "${START_CLAMD}" = "yes" ]; then
57
+		ebegin "Stopping clamd"
58
+		start-stop-daemon --stop --quiet --name clamd
59
+		eend $? "Failed to stop clamd"
60
+	fi
61
+	if [ "${START_FRESHCLAM}" = "yes" ]; then
62
+		ebegin "Stopping freshclam"
63
+		start-stop-daemon --stop --quiet --name freshclam
64
+		eend $? "Failed to stop freshclam"
65
+	fi
66
+	if [ "${START_MILTER}" = "yes" ]; then
67
+		ebegin "Stopping clamav-milter"
68
+		start-stop-daemon --stop --quiet --name clamav-milter
69
+		eend $? "Failed to stop clamav-milter"
70
+	fi
71
+}
... ...
@@ -0,0 +1,3 @@
1
+MD5 d62376205647b208eba4191dde821830 clamav-0.88.5.tar.gz 8663193
2
+RMD160 b0e24b90f2a085ded89fcd90f3434d6bc1981caf clamav-0.88.5.tar.gz 8663193
3
+SHA256 8b807fcb64e2c523d7da8002ca1174c4173526ae48a7deecca41db30f51cee8f clamav-0.88.5.tar.gz 8663193
... ...
@@ -0,0 +1,3 @@
1
+MD5 db7f8b947bc21023f36e04bfdd555dd0 clamav-0.88.6.tar.gz 8929534
2
+RMD160 efa53c600a70a8f808fbf9cde92ebf193b76e574 clamav-0.88.6.tar.gz 8929534
3
+SHA256 cc7f90983aa61b3d893c3311e3f832c5faa204467143cff597ad80bf8ad24daa clamav-0.88.6.tar.gz 8929534
... ...
@@ -0,0 +1,3 @@
1
+MD5 14bc0fd4c6f0f6409a37db63cf0d4019 clamav-0.90RC1.1.tar.gz 8463538
2
+RMD160 d73a44a1ab79d2a99530409c66ca6520a4c5059b clamav-0.90RC1.1.tar.gz 8463538
3
+SHA256 b4a2a4dc88afca53ca1452c4d2a4e6a00386cd935523f883a732464bbd898e96 clamav-0.90RC1.1.tar.gz 8463538
... ...
@@ -0,0 +1,3 @@
1
+MD5 91da47456ed28a7cfbfe17b033e15121 clamav-0.90rc2.tar.gz 8706141
2
+RMD160 cdf5674da401af070d6da64113d353e0d9cfdadc clamav-0.90rc2.tar.gz 8706141
3
+SHA256 a74498f08d7817140036203e5247ee0b2ffa11a0be08c594a7c6444d4cb1a02a clamav-0.90rc2.tar.gz 8706141
... ...
@@ -0,0 +1,6 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
3
+<pkgmetadata>
4
+<herd>net-mail</herd>
5
+<herd>antivirus</herd>
6
+</pkgmetadata>
... ...
@@ -0,0 +1,64 @@
1
+# ChangeLog for app-backup/duplicity
2
+# Copyright 2002-2006 Gentoo Foundation; Distributed under the GPL v2
3
+# $Header: /var/cvsroot/gentoo-x86/app-backup/duplicity/ChangeLog,v 1.8 2006/04/30 16:06:59 dertobi123 Exp $
4
+
5
+  30 Apr 2006; Tobias Scherbaum <dertobi123@gentoo.org>
6
+  duplicity-0.4.2.ebuild:
7
+  ppc stable
8
+
9
+  27 Apr 2006; Marien Zwart <marienz@gentoo.org>
10
+  files/digest-duplicity-0.4.1, files/digest-duplicity-0.4.2, Manifest:
11
+  Fixing SHA256 digest for real, pass three...
12
+
13
+  27 Apr 2006; Marien Zwart <marienz@gentoo.org>
14
+  files/digest-duplicity-0.4.1, files/digest-duplicity-0.4.2, Manifest:
15
+  Fixing SHA256 digest, pass two.
16
+
17
+  17 Apr 2006; <ticho@gentoo.org> duplicity-0.4.2.ebuild:
18
+  Stable on x86.
19
+
20
+*duplicity-0.4.2 (12 Mar 2006)
21
+
22
+  12 Mar 2006; <ticho@gentoo.org> +duplicity-0.4.2.ebuild:
23
+  Version bump. Closes bug #125928, reported by Jiri Tyr <jiri.tyr at
24
+  e-learning.vslib.cz>.
25
+
26
+  15 Oct 2005; Joseph Jezak <josejx@gentoo.org> duplicity-0.4.1.ebuild:
27
+  Marked ppc stable for bug #106067.
28
+
29
+  04 Jul 2005; Robin H. Johnson <robbat2@gentoo.org> +metadata.xml,
30
+  +duplicity-0.4.1.ebuild:
31
+  Moved from net-misc/duplicity to app-backup/duplicity.
32
+
33
+  10 May 2005; David Holm <dholm@gentoo.org> duplicity-0.4.1.ebuild:
34
+  Added to ~ppc.
35
+
36
+  16 Nov 2004; Andrej Kacian <ticho@gentoo.org> -duplicity-0.4.0.ebuild:
37
+  Removed 0.4.0 from portage.
38
+
39
+  10 Nov 2004; Andrej Kacian <ticho@gentoo.org> duplicity-0.4.1.ebuild:
40
+  Fixed librsync dependancy. Closes bug #70595, reported by Dave S
41
+  <jk@pusspaws.net>.
42
+
43
+  01 Nov 2004; Andrej Kacian <ticho@gentoo.org> duplicity-0.4.1.ebuild:
44
+  Stable on x86
45
+
46
+  24 Oct 2004; Andrej Kacian <ticho@gentoo.org> +metadata.xml,
47
+  duplicity-0.4.0.ebuild, duplicity-0.4.1.ebuild:
48
+  Revamped DEPEND and RDEPEND. Made 0.4.0 depend on librsync <=0.9.5.1. This
49
+  closes #67940, reported by Dave S <jk@pusspaws.net>. Set myself as
50
+  maintainer (and added missing metadata.xml).
51
+
52
+  01 Jul 2004; Jon Hood <squinky86@gentoo.org> duplicity-0.4.0.ebuild,
53
+  duplicity-0.4.1.ebuild:
54
+  change virtual/glibc to virtual/libc, add IUSE
55
+
56
+*duplicity-0.4.1 (19 Oct 2003)
57
+
58
+  19 Oct 2003; Martin Holzer <mholzer@gentoo.org> duplicity-0.4.1.ebuild:
59
+  Version bumped. Closes #30179.
60
+
61
+*duplicity-0.4.0 (14 May 2003)
62
+
63
+  14 May 2003; Martin Holzer <mholzer@gentoo.org> duplicity-0.4.0.ebuild :
64
+  Initial Version submitted by rob holland <robh@gentoo.org> in #20693
... ...
@@ -0,0 +1,28 @@
1
+AUX duplicity-0.4.2-timeout-fixed-backends.py 21964 RMD160 cb0ba56204b2e7786e40f74f44e4cc3b1d4d7f48 SHA1 10c726c8b030df15169035132abdcc612526a2f8 SHA256 ed9885708025607991c7a7e38194b1dbb7886cda15c1f150616b234e8d17a66f
2
+MD5 61d0b9a78dc5c56f6a91f92621b18bd1 files/duplicity-0.4.2-timeout-fixed-backends.py 21964
3
+RMD160 cb0ba56204b2e7786e40f74f44e4cc3b1d4d7f48 files/duplicity-0.4.2-timeout-fixed-backends.py 21964
4
+SHA256 ed9885708025607991c7a7e38194b1dbb7886cda15c1f150616b234e8d17a66f files/duplicity-0.4.2-timeout-fixed-backends.py 21964
5
+DIST duplicity-0.4.1.tar.gz 101626 RMD160 192ce5111fbe408d5927292ae8b5eb8bc21319bd SHA256 b46ff5fe7c89283c635e2a94294d28ec8a501a9d58c41f5672943fb0e5daa725
6
+DIST duplicity-0.4.2.tar.gz 103183 RMD160 c6c86f397e43b7d5f63965d69f3328daa601d00b SHA1 37e861218800910fab7590f45520e0f1d8b318d4 SHA256 5fdf8aeb32bb4c09e3c9d5c4150245a71d757d31d9bb341524de75e06421e176
7
+EBUILD duplicity-0.4.1.ebuild 703 RMD160 a52bcc6a407764788cb039999284fe7c6cb6370b SHA1 2991533ae94bb5f257ba733d8987af447bcbc3cd SHA256 4053ca1afcfe01cb93467a5682d1edbc855b27dc288f790be28ac65224b37058
8
+MD5 ed7b72a8780e38926badaa0bf866ac8d duplicity-0.4.1.ebuild 703
9
+RMD160 a52bcc6a407764788cb039999284fe7c6cb6370b duplicity-0.4.1.ebuild 703
10
+SHA256 4053ca1afcfe01cb93467a5682d1edbc855b27dc288f790be28ac65224b37058 duplicity-0.4.1.ebuild 703
11
+EBUILD duplicity-0.4.2.ebuild 971 RMD160 4c97979827820363b78c2f2fc42824574d1dca37 SHA1 2f7f6eb94ccf3e6d7174ef2996ee000bb3f0be08 SHA256 e682a7d29e628db56f46a6b1e624189d7146ad741dc6cd82b6db1f9bfbbe76b7
12
+MD5 5725f0dfb95d3a8487d03fa071c06053 duplicity-0.4.2.ebuild 971
13
+RMD160 4c97979827820363b78c2f2fc42824574d1dca37 duplicity-0.4.2.ebuild 971
14
+SHA256 e682a7d29e628db56f46a6b1e624189d7146ad741dc6cd82b6db1f9bfbbe76b7 duplicity-0.4.2.ebuild 971
15
+MISC ChangeLog 2376 RMD160 e07cb927b91de7a24214867724478ae7cd0c72bc SHA1 59d1f6d02f22eb398bd38acb7edd2901b605dff6 SHA256 6871437952da46a60888f349516b959be9da053b8c75b9142216c59166b13fdf
16
+MD5 48cff4f1ce16bc800cc7869e57fb0e53 ChangeLog 2376
17
+RMD160 e07cb927b91de7a24214867724478ae7cd0c72bc ChangeLog 2376
18
+SHA256 6871437952da46a60888f349516b959be9da053b8c75b9142216c59166b13fdf ChangeLog 2376
19
+MISC metadata.xml 250 RMD160 b80f36e207a57583a06b1ddb538793eac15397fe SHA1 7aa5562e71958d16a80076a7cdd0e4002eeb99a0 SHA256 5e1a7d2736303cec3dc620e1951c9a809be04bfe07760d89741f824b7760bfaf
20
+MD5 bd9e210457c22384582e7c1394314d3f metadata.xml 250
21
+RMD160 b80f36e207a57583a06b1ddb538793eac15397fe metadata.xml 250
22
+SHA256 5e1a7d2736303cec3dc620e1951c9a809be04bfe07760d89741f824b7760bfaf metadata.xml 250
23
+MD5 66ccbbbe31ea6d7d887f161ca910c6af files/digest-duplicity-0.4.1 247
24
+RMD160 d3757d5050f0cf4495ab1c6abc051a360c06cee4 files/digest-duplicity-0.4.1 247
25
+SHA256 c547e600067221be62b903f26b628cb244acf5f3ca4c71b3bc8591b585a0c484 files/digest-duplicity-0.4.1 247
26
+MD5 6d9ae5885e91f1ad9c46ecab2e4ae8c8 files/digest-duplicity-0.4.2 247
27
+RMD160 3ff2413e0aa240285377c4c987043995968edca2 files/digest-duplicity-0.4.2 247
28
+SHA256 3abc53cada3b4e46dba6de362adf476af57166107f8055b2aa29c0bebf8008fd files/digest-duplicity-0.4.2 247
... ...
@@ -0,0 +1,26 @@
1
+# Copyright 1999-2005 Gentoo Foundation
2
+# Distributed under the terms of the GNU General Public License v2
3
+# $Header: /var/cvsroot/gentoo-x86/app-backup/duplicity/duplicity-0.4.1.ebuild,v 1.2 2005/10/15 20:37:48 josejx Exp $
4
+
5
+IUSE=""
6
+DESCRIPTION="duplicity is a secure backup system using gnupg to encrypt data"
7
+HOMEPAGE="http://www.nongnu.org/duplicity/"
8
+SRC_URI="http://savannah.nongnu.org/download/${PN}/${P}.tar.gz"
9
+
10
+LICENSE="GPL-2"
11
+SLOT="0"
12
+KEYWORDS="ppc x86"
13
+
14
+DEPEND="virtual/libc
15
+	>=dev-lang/python-2.3
16
+	>=net-libs/librsync-0.9.6"
17
+RDEPEND="${DEPEND}
18
+	app-crypt/gnupg"
19
+
20
+src_compile() {
21
+	python setup.py build || die "compile failed"
22
+}
23
+
24
+src_install() {
25
+	python setup.py install --prefix=${D}/usr
26
+}
... ...
@@ -0,0 +1,43 @@
1
+# Copyright 1999-2006 Gentoo Foundation
2
+# Distributed under the terms of the GNU General Public License v2
3
+# $Header: /var/cvsroot/gentoo-x86/app-backup/duplicity/duplicity-0.4.2.ebuild,v 1.3 2006/04/30 16:06:59 dertobi123 Exp $
4
+
5
+inherit distutils
6
+
7
+IUSE=""
8
+DESCRIPTION="duplicity is a secure backup system using gnupg to encrypt data"
9
+HOMEPAGE="http://www.nongnu.org/duplicity/"
10
+SRC_URI="http://savannah.nongnu.org/download/${PN}/${P}.tar.gz"
11
+
12
+LICENSE="GPL-2"
13
+SLOT="0"
14
+KEYWORDS="ppc x86"
15
+
16
+DEPEND="virtual/libc
17
+	>=dev-lang/python-2.3
18
+	>=net-libs/librsync-0.9.6"
19
+RDEPEND="${DEPEND}
20
+	app-crypt/gnupg"
21
+
22
+src_unpack() {
23
+	unpack ${A}
24
+	cp ${FILESDIR}/duplicity-0.4.2-timeout-fixed-backends.py ${S}/src/backends.py
25
+}
26
+
27
+src_compile() {
28
+	distutils_src_compile
29
+}
30
+
31
+src_install() {
32
+	python setup.py install --prefix=${D}/usr
33
+}
34
+
35
+pkg_postinst() {
36
+	python_version
37
+	python_mod_optimize /usr/lib/python${PYVER}/site-packages/duplicity
38
+}
39
+
40
+pkg_postrm() {
41
+	python_version
42
+	python_mod_cleanup
43
+}
... ...
@@ -0,0 +1,3 @@
1
+MD5 c91933a10f97057b899ba97673ad8a63 duplicity-0.4.1.tar.gz 101626
2
+RMD160 192ce5111fbe408d5927292ae8b5eb8bc21319bd duplicity-0.4.1.tar.gz 101626
3
+SHA256 b46ff5fe7c89283c635e2a94294d28ec8a501a9d58c41f5672943fb0e5daa725 duplicity-0.4.1.tar.gz 101626
... ...
@@ -0,0 +1,3 @@
1
+MD5 a9fd4094f23bb36c82cc1dc2816a5b7d duplicity-0.4.2.tar.gz 103183
2
+RMD160 c6c86f397e43b7d5f63965d69f3328daa601d00b duplicity-0.4.2.tar.gz 103183
3
+SHA256 5fdf8aeb32bb4c09e3c9d5c4150245a71d757d31d9bb341524de75e06421e176 duplicity-0.4.2.tar.gz 103183
... ...
@@ -0,0 +1,624 @@
1
+# Copyright 2002 Ben Escoto
2
+#
3
+# This file is part of duplicity.
4
+#
5
+# Duplicity is free software; you can redistribute it and/or modify it
6
+# under the terms of the GNU General Public License as published by the
7
+# Free Software Foundation; either version 2 of the License, or (at your
8
+# option) any later version.
9
+#
10
+# Duplicity is distributed in the hope that it will be useful, but
11
+# WITHOUT ANY WARRANTY; without even the implied warranty of
12
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13
+# General Public License for more details.
14
+#
15
+# You should have received a copy of the GNU General Public License
16
+# along with duplicity; if not, write to the Free Software Foundation,
17
+# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18
+
19
+"""Provides functions and classes for getting/sending files to destination"""
20
+
21
+import os, types, ftplib, tempfile, time, sys
22
+import log, path, dup_temp, file_naming
23
+import socket
24
+
25
+# TODO: move into globals?
26
+socket.setdefaulttimeout(10)
27
+
28
+class BackendException(Exception): pass
29
+class ParsingException(Exception): pass
30
+
31
+def get_backend(url_string):
32
+	"""Return Backend object from url string, or None if not a url string
33
+
34
+	url strings are like
35
+	scp://foobar:password@hostname.net:124/usr/local.  If a protocol
36
+	is unsupported a fatal error will be raised.
37
+
38
+	"""
39
+	global protocol_class_dict
40
+	try: pu = ParsedUrl(url_string)
41
+	except ParsingException: return None
42
+
43
+	try: backend_class = protocol_class_dict[pu.protocol]
44
+	except KeyError: log.FatalError("Unknown protocol '%s'" % (pu.protocol,))
45
+	return backend_class(pu)
46
+
47
+class ParsedUrl:
48
+	"""Contains information gleaned from a generic url"""
49
+	protocol = None # set to string like "ftp" indicating protocol
50
+	suffix = None # Set to everything after protocol://
51
+
52
+	server = None # First part of suffix (part before '/')
53
+	path = None # Second part of suffix (part after '/')
54
+
55
+	host = None # Set to host, if can be extracted
56
+	user = None # Set to user, as in ftp://user@host/whatever
57
+	port = None # Set to port, like scp://host:port/foo
58
+
59
+	def __init__(self, url_string):
60
+		"""Create ParsedUrl object, process url_string"""
61
+		self.url_string = url_string
62
+		self.set_protocol_suffix()
63
+		self.set_server_path()
64
+		self.set_host_user_port()
65
+
66
+	def bad_url(self, message = None):
67
+		"""Report a bad url, using message if given"""
68
+		if message:
69
+			err_string = "Bad URL string '%s': %s" % (self.url_string, message)
70
+		else: err_string = "Bad URL string '%s'" % (self.url_string,)
71
+		raise ParsingException(err_string)
72
+
73
+	def set_protocol_suffix(self):
74
+		"""Parse self.url_string, setting self.protocol and self.suffix"""
75
+		colon_position = self.url_string.find(":")
76
+		if colon_position < 1: self.bad_url("No colon (:) found")
77
+		self.protocol = self.url_string[:colon_position]
78
+		if self.url_string[colon_position+1:colon_position+3] != '//':
79
+			self.bad_url("first colon not followed by '//'")
80
+		self.suffix = self.url_string[colon_position+3:]
81
+
82
+	def set_server_path(self):
83
+		"""Set self.server and self.path from self.suffix"""
84
+		comps = self.suffix.split('/')
85
+		assert len(comps) > 0
86
+		self.server = comps[0]
87
+		if len(comps) > 1:
88
+			self.path = '/'.join(comps[1:])
89
+
90
+	def set_host_user_port(self):
91
+		"""Set self.host, self.user, and self.port from self.server"""
92
+		if not self.server: return
93
+
94
+		# Extract port
95
+		port_comps = self.server.split(":")
96
+		if len(port_comps) >= 2:
97
+			try: self.port = int(port_comps[-1])
98
+			except ValueError: user_host = self.server
99
+			else: user_host = ":".join(port_comps[:-1])
100
+		else: user_host = self.server
101
+
102
+		# Set user and host
103
+		user_comps = user_host.split("@")
104
+		if len(user_comps) >= 2:
105
+			self.user = user_comps[0]
106
+			self.host = "@".join(user_comps[1:])
107
+		else: self.host = user_host
108
+
109
+
110
+class Backend:
111
+	"""Represent a connection to the destination device/computer
112
+
113
+	Classes that subclass this should implement the put, get, list,
114
+	and delete methods.
115
+
116
+	"""
117
+	def put(self, source_path, remote_filename = None):
118
+		"""Transfer source_path (Path object) to remote_filename (string)
119
+
120
+		If remote_filename is None, get the filename from the last
121
+		path component of pathname.
122
+
123
+		"""
124
+		if not remote_filename: remote_filename = source_path.get_filename()
125
+		pass
126
+
127
+	def get(self, remote_filename, local_path):
128
+		"""Retrieve remote_filename and place in local_path"""
129
+		local_path.setdata()
130
+		pass
131
+
132
+	def list(self):
133
+		"""Return list of filenames (strings) present in backend"""
134
+		pass
135
+
136
+	def delete(self, filename_list):
137
+		"""Delete each filename in filename_list, in order if possible"""
138
+		pass
139
+
140
+	def run_command(self, commandline):
141
+		"""Run given commandline with logging and error detection"""
142
+		log.Log("Running '%s'" % commandline, 5)
143
+		if os.system(commandline):
144
+			raise BackendException("Error running '%s'" % commandline)
145
+
146
+	def popen(self, commandline):
147
+		"""Run command and return stdout results"""
148
+		log.Log("Reading results of '%s'" % commandline, 5)
149
+		fout = os.popen(commandline)
150
+		results = fout.read()
151
+		if fout.close():
152
+			raise BackendException("Error running '%s'" % commandline)
153
+		return results
154
+
155
+	def get_fileobj_read(self, filename, parseresults = None):
156
+		"""Return fileobject opened for reading of filename on backend
157
+
158
+		The file will be downloaded first into a temp file.  When the
159
+		returned fileobj is closed, the temp file will be deleted.
160
+
161
+		"""
162
+		if not parseresults:
163
+			parseresults = file_naming.parse(filename)
164
+			assert parseresults, "Filename not correctly parsed"
165
+		tdp = dup_temp.new_tempduppath(parseresults)
166
+		self.get(filename, tdp)
167
+		tdp.setdata()
168
+		return tdp.filtered_open_with_delete("rb")
169
+
170
+	def get_fileobj_write(self, filename, parseresults = None,
171
+						  sizelist = None):
172
+		"""Return fileobj opened for writing, write to backend on close
173
+
174
+		The file will be encoded as specified in parseresults (or as
175
+		read from the filename), and stored in a temp file until it
176
+		can be copied over and deleted.
177
+
178
+		If sizelist is not None, it should be set to an empty list.
179
+		The number of bytes will be inserted into the list.
180
+
181
+		"""
182
+		if not parseresults:
183
+			parseresults = file_naming.parse(filename)
184
+			assert parseresults, "Filename %s not correctly parsed" % filename
185
+		tdp = dup_temp.new_tempduppath(parseresults)
186
+
187
+		def close_file_hook():
188
+			"""This is called when returned fileobj is closed"""
189
+			self.put(tdp, filename)
190
+			if sizelist is not None:
191
+				tdp.setdata()
192
+				sizelist.append(tdp.getsize())
193
+			tdp.delete()
194
+
195
+		fh = dup_temp.FileobjHooked(tdp.filtered_open("wb"))
196
+		fh.addhook(close_file_hook)
197
+		return fh
198
+
199
+	def get_data(self, filename, parseresults = None):
200
+		"""Retrieve a file from backend, process it, return contents"""
201
+		fin = self.get_fileobj_read(filename, parseresults)
202
+		buf = fin.read()
203
+		assert not fin.close()
204
+		return buf
205
+
206
+	def put_data(self, buffer, filename, parseresults = None):
207
+		"""Put buffer into filename on backend after processing"""
208
+		fout = self.get_fileobj_write(filename, parseresults)
209
+		fout.write(buffer)
210
+		assert not fout.close()
211
+
212
+	def close(self):
213
+		"""This is called when a connection is no longer needed"""
214
+		pass
215
+
216
+
217
+class LocalBackend(Backend):
218
+	"""Use this backend when saving to local disk
219
+
220
+	Urls look like file://testfiles/output.  Relative to root can be
221
+	gotten with extra slash (file:///usr/local).
222
+
223
+	"""
224
+	def __init__(self, parsed_url):
225
+		self.remote_pathdir = path.Path(parsed_url.suffix)
226
+
227
+	def put(self, source_path, remote_filename = None, rename = None):
228
+		"""If rename is set, try that first, copying if doesn't work"""
229
+		if not remote_filename: remote_filename = source_path.get_filename()
230
+		target_path = self.remote_pathdir.append(remote_filename)
231
+		log.Log("Writing %s" % target_path.name, 6)
232
+		if rename:
233
+			try: source_path.rename(target_path)
234
+			except OSError: pass
235
+			else: return
236
+		target_path.writefileobj(source_path.open("rb"))
237
+
238
+	def get(self, filename, local_path):
239
+		"""Get file and put in local_path (Path object)"""
240
+		source_path = self.remote_pathdir.append(filename)
241
+		local_path.writefileobj(source_path.open("rb"))
242
+
243
+	def list(self):
244
+		"""List files in that directory"""
245
+		return self.remote_pathdir.listdir()
246
+
247
+	def delete(self, filename_list):
248
+		"""Delete all files in filename list"""
249
+		assert type(filename_list) is not types.StringType
250
+		try:
251
+			for filename in filename_list:
252
+				self.remote_pathdir.append(filename).delete()
253
+		except OSError, e: raise BackendException(str(e))
254
+
255
+
256
+# The following can be redefined to use different shell commands from
257
+# ssh or scp or to add more arguments.  However, the replacements must
258
+# have the same syntax.  Also these strings will be executed by the
259
+# shell, so shouldn't have strange characters in them.
260
+ssh_command = "ssh"
261
+scp_command = "scp"
262
+sftp_command = "sftp"
263
+
264
+class scpBackend(Backend):
265
+	"""This backend copies files using scp.  List not supported"""
266
+	def __init__(self, parsed_url):
267
+		"""scpBackend initializer"""
268
+		self.host_string = parsed_url.server # of form user@hostname:port
269
+		self.remote_dir = parsed_url.path # can be empty string
270
+		if self.remote_dir: self.remote_prefix = self.remote_dir + "/"
271
+		else: self.remote_prefix = ""
272
+
273
+	def put(self, source_path, remote_filename = None):
274
+		"""Use scp to copy source_dir/filename to remote computer"""
275
+		if not remote_filename: remote_filename = source_path.get_filename()
276
+		commandline = "%s %s %s:%s%s" % \
277
+					  (scp_command, source_path.name, self.host_string,
278
+					   self.remote_prefix, remote_filename)
279
+		self.run_command(commandline)
280
+
281
+	def get(self, remote_filename, local_path):
282
+		"""Use scp to get a remote file"""
283
+		commandline = "%s %s:%s%s %s" % \
284
+					  (scp_command, self.host_string, self.remote_prefix,
285
+					   remote_filename, local_path.name)
286
+		self.run_command(commandline)
287
+		local_path.setdata()
288
+		if not local_path.exists():
289
+			raise BackendException("File %s not found" % local_path.name)
290
+
291
+	def list(self):
292
+		"""List files available for scp
293
+
294
+		Note that this command can get confused when dealing with
295
+		files with newlines in them, as the embedded newlines cannot
296
+		be distinguished from the file boundaries.
297
+
298
+		"""
299
+		commandline = ("echo -e 'cd %s\nls -1' | %s -b - %s" %
300
+					   (self.remote_dir, sftp_command, self.host_string))
301
+		l = self.popen(commandline).split('\n')[2:] # omit sftp prompts
302
+		return filter(lambda x: x, l)
303
+
304
+	def delete(self, filename_list):
305
+		"""Runs ssh rm to delete files.  Files must not require quoting"""
306
+		assert len(filename_list) > 0
307
+		pathlist = map(lambda fn: self.remote_prefix + fn, filename_list)
308
+		del_prefix = "echo 'rm "
309
+		del_postfix = ("' | %s -b - %s 1>/dev/null" %
310
+					   (sftp_command, self.host_string))
311
+		for fn in filename_list:
312
+			commandline = del_prefix + self.remote_prefix + fn + del_postfix
313
+			self.run_command(commandline)
314
+
315
+
316
+class sftpBackend(Backend):
317
+	"""This backend uses sftp to perform file operations"""
318
+	pass # Do this later
319
+
320
+
321
+class ftpBackend(Backend):
322
+	"""Connect to remote store using File Transfer Protocol"""
323
+	RETRY_SLEEP = 10 # time in seconds before reconnecting on errors (gets multiplied with the try counter)
324
+	RETRIES = 15 # number of retries
325
+
326
+	def __init__(self, parsed_url):
327
+		"""Create a new ftp backend object, log in to host"""
328
+		self.parsed_url = parsed_url
329
+		self.connect()
330
+
331
+	def connect(self):
332
+		"""Connect to self.parsed_url"""
333
+		self.ftp = ftplib.FTP()
334
+		self.is_connected = False
335
+		if self.parsed_url.port is None:
336
+			self.error_wrap('connect', self.parsed_url.host)
337
+		else: self.error_wrap('connect', self.parsed_url.host,
338
+							  self.parsed_url.port)
339
+		self.is_connected = True
340
+
341
+		if self.parsed_url.user is not None:
342
+			self.error_wrap('login', self.parsed_url.user, self.get_password())
343
+		else: self.error_wrap('login')
344
+		self.ftp.cwd(self.parsed_url.path)
345
+
346
+	def error_wrap(self, command, *args):
347
+		"""Run self.ftp.command(*args), but raise BackendException on error"""
348
+
349
+		# Log FTP command:
350
+		if command is 'login':
351
+			if log.verbosity > 8:
352
+				# Log full args at level 9:
353
+				log.Log("FTP: %s %s" % (command,args), 9)
354
+			else:
355
+				# replace password with stars:
356
+				log_args = list(args)
357
+				log_args[1] = '*' * len(log_args[1])
358
+				log.Log("FTP: %s %s" % (command,log_args), 5)
359
+		else:
360
+			log.Log("FTP: %s %s" % (command,args), 5)
361
+
362
+		# Execute:
363
+		tries = 0
364
+		while( True ):
365
+			tries = tries+1
366
+			try:
367
+				return ftplib.FTP.__dict__[command](self.ftp, *args)
368
+			except ftplib.all_errors, e:
369
+				if "450" in str(e) and command == 'nlst':
370
+					# 450 on list isn't an error, but indicates an empty dir
371
+					return []
372
+
373
+				if tries > self.RETRIES:
374
+					# Give up:
375
+					log.FatalError("Catched exception %s%s (%d exceptions in total), giving up.." % (sys.exc_info()[0],sys.exc_info()[1],tries,))
376
+					raise BackendException(e)
377
+
378
+				# Sleep and retry (after trying to reconnect, if possible):
379
+				sleep_time = self.RETRY_SLEEP * tries;
380
+				log.Warn("Catched exception %s%s (#%d), sleeping %ds before retry.." % (sys.exc_info()[0],sys.exc_info()[1],tries,sleep_time,))
381
+				time.sleep(sleep_time)
382
+				try:
383
+					if self.is_connected:
384
+						self.connect()
385
+					return ftplib.FTP.__dict__[command](self.ftp, *args)
386
+				except ftplib.all_errors, e:
387
+					continue
388
+			else: break
389
+
390
+	def get_password(self):
391
+		"""Get ftp password using environment if possible"""
392
+		try: return os.environ['FTP_PASSWORD']
393
+		except KeyError:
394
+			log.Log("FTP_PASSWORD not set, using empty ftp password", 3)
395
+			return ''
396
+
397
+	def put(self, source_path, remote_filename = None):
398
+		"""Transfer source_path to remote_filename"""
399
+		if not remote_filename: remote_filename = source_path.get_filename()
400
+		source_file = source_path.open("rb")
401
+		log.Log("Saving %s on FTP server" % (remote_filename,), 5)
402
+		self.error_wrap('storbinary', "STOR "+remote_filename, source_file)
403
+		assert not source_file.close()
404
+
405
+	def get(self, remote_filename, local_path):
406
+		"""Get remote filename, saving it to local_path"""
407
+		target_file = local_path.open("wb")
408
+		log.Log("Retrieving %s from FTP server" % (remote_filename,), 5)
409
+		self.error_wrap('retrbinary', "RETR "+remote_filename,
410
+						target_file.write)
411
+		assert not target_file.close()
412
+		local_path.setdata()
413
+
414
+	def list(self):
415
+		"""List files in directory"""
416
+		log.Log("Listing files on FTP server", 5)
417
+		# Some ftp servers raise error 450 if the directory is empty
418
+		try: return self.error_wrap('nlst')
419
+		except BackendException, e:
420
+			if "450" in str(e) or "500" in str(e) or "550" in str(e):
421
+				return []
422
+			raise
423
+
424
+	def delete(self, filename_list):
425
+		"""Delete files in filename_list"""
426
+		for filename in filename_list:
427
+			log.Log("Deleting %s from FTP server" % (filename,), 5)
428
+			self.error_wrap('delete', filename)
429
+
430
+	def close(self):
431
+		"""Shut down connection"""
432
+		try: self.error_wrap('quit')
433
+		except BackendException, e:
434
+			if "104" in str(e): return
435
+			raise
436
+
437
+
438
+class rsyncBackend(Backend):
439
+	"""Connect to remote store using rsync
440
+
441
+	rsync backend contributed by Sebastian Wilhelmi <seppi@seppi.de>
442
+
443
+	"""
444
+	def __init__(self, parsed_url):
445
+		"""rsyncBackend initializer"""
446
+		self.url_string = parsed_url.url_string
447
+		if self.url_string[-1] != '/':
448
+			self.url_string += '/'
449
+
450
+	def put(self, source_path, remote_filename = None):
451
+		"""Use rsync to copy source_dir/filename to remote computer"""
452
+		if not remote_filename: remote_filename = source_path.get_filename()
453
+		remote_path = os.path.join (self.url_string, remote_filename)
454
+		commandline = "rsync %s %s" % (source_path.name, remote_path)
455
+		self.run_command(commandline)
456
+
457
+	def get(self, remote_filename, local_path):
458
+		"""Use rsync to get a remote file"""
459
+		remote_path = os.path.join (self.url_string, remote_filename)
460
+		commandline = "rsync %s %s" % (remote_path, local_path.name)
461
+		self.run_command(commandline)
462
+		local_path.setdata()
463
+		if not local_path.exists():
464
+			raise BackendException("File %s not found" % local_path.name)
465
+
466
+	def list(self):
467
+		"""List files"""
468
+		def split (str):
469
+			line = str.split ()
470
+			if len (line) > 4 and line[4] != '.':
471
+				return line[4]
472
+			else:
473
+				return None
474
+		commandline = "rsync %s" % self.url_string
475
+		return filter (lambda x: x, map (split, self.popen(commandline).split('\n')))
476
+
477
+	def delete(self, filename_list):
478
+		"""Delete files."""
479
+		delete_list = filename_list
480
+		dont_delete_list = []
481
+		for file in self.list ():
482
+			if file in delete_list:
483
+				delete_list.remove (file)
484
+			else:
485
+				dont_delete_list.append (file)
486
+		if len (delete_list) > 0:
487
+			raise BackendException("Files %s not found" % str (delete_list))
488
+
489
+		dir = tempfile.mktemp ()
490
+		exclude_name = tempfile.mktemp ()
491
+		exclude = open (exclude_name, 'w')
492
+		to_delete = [exclude_name]
493
+		os.mkdir (dir)
494
+		for file in dont_delete_list:
495
+				path = os.path.join (dir, file)
496
+				to_delete.append (path)
497
+				f = open (path, 'w')
498
+				f.close ()
499
+				print >>exclude, file
500
+		exclude.close ()
501
+		commandline = ("rsync --recursive --delete --exclude-from=%s %s/ %s" %
502
+			       (exclude_name, dir, self.url_string))
503
+		self.run_command(commandline)
504
+		for file in to_delete:
505
+			os.unlink (file)
506
+		os.rmdir (dir)
507
+
508
+
509
+class BitBucketBackend(Backend):
510
+        """Backend for accessing Amazon S3 using the bitbucket.py module.
511
+
512
+        This backend supports access to Amazon S3 (http://aws.amazon.com/s3)
513
+        using a mix of environment variables and URL's. The access key and
514
+        secret key are taken from the environment variables S3KEY and S3SECRET
515
+        and the bucket name from the url. For example (in BASH):
516
+
517
+            $ export S3KEY='44CF9590006BF252F707'
518
+            $ export S3SECRET='OtxrzxIsfpFjA7SwPzILwy8Bw21TLhquhboDYROV'
519
+            $ duplicity /home/me s3+http://bucket_name
520
+
521
+        Note: / is disallowed in bucket names in case prefix support is implemented
522
+        in future.
523
+
524
+        TODO:
525
+            - support bucket prefixes with url's like s3+http://bucket_name/prefix
526
+            - bitbucket and amazon s3 are currently not very robust. We provide a
527
+              simplistic way of trying to re-connect and re-try an operation when
528
+              it fails. This is just a band-aid and should be removed if bitbucket
529
+              becomes more robust.
530
+            - Logging of actions.
531
+            - Better error messages for failures.
532
+        """
533
+
534
+        def __init__(self, parsed_url):
535
+                import bitbucket
536
+                self.module = bitbucket
537
+                self.bucket_name = parsed_url.suffix
538
+                if '/' in self.bucket_name:
539
+                    raise NotImplementedError("/ disallowed in bucket names and "
540
+                                              "bucket prefixes not supported.")
541
+                self.access_key = os.environ["S3KEY"]
542
+                self.secret_key = os.environ["S3SECRET"]
543
+                self._connect()
544
+
545
+        def _connect(self):
546
+                self.connection = self.module.connect(access_key=self.access_key,
547
+                                                      secret_key=self.secret_key)
548
+                self.bucket = self.connection.get_bucket(self.bucket_name)
549
+                # populate the bitbucket cache we do it here to be sure that
550
+                # even on re-connect we have a list of all keys on the server
551
+                self.bucket.fetch_all_keys()
552
+
553
+        def _logException(self, message=None):
554
+                # Simply dump the exception onto stderr since formatting it
555
+                # ourselves looks dangerous.
556
+                if message is not None:
557
+                    sys.stderr.write(message)
558
+                sys.excepthook(*sys.exc_info())
559
+
560
+        def put(self, source_path, remote_filename = None):
561
+		"""Transfer source_path (Path object) to remote_filename (string)
562
+
563
+		If remote_filename is None, get the filename from the last
564
+		path component of pathname.
565
+
566
+		"""
567
+		if not remote_filename:
568
+                    remote_filename = source_path.get_filename()
569
+                bits = self.module.Bits(filename=source_path.name)
570
+                try:
571
+                    self.bucket[remote_filename] = bits
572
+                except:
573
+                    self._logException("Error sending file %s, attempting to "
574
+                                       "re-connect.\n Got this Traceback:\n"
575
+                                       % remote_filename)
576
+                    self._connect()
577
+                    self.bucket[remote_filename] = bits
578
+
579
+	def get(self, remote_filename, local_path):
580
+		"""Retrieve remote_filename and place in local_path"""
581
+		local_path.setdata()
582
+                try:
583
+                    bits = self.bucket[remote_filename]
584
+                    bits.to_file(local_path.name)
585
+                except:
586
+                    self._logException("Error getting file %s, attempting to "
587
+                                       "re-connect.\n Got this Traceback:\n"
588
+                                       % remote_filename)
589
+                    self._connect()
590
+                    bits = self.bucket[remote_filename]
591
+                    bits.to_file(local_path.name)
592
+		local_path.setdata()
593
+
594
+	def list(self):
595
+		"""Return list of filenames (strings) present in backend"""
596
+                try:
597
+                    keys = self.bucket.keys()
598
+                except:
599
+                    self._logException("Error getting bucket keys, attempting to "
600
+                                       "re-connect.\n Got this Traceback:\n")
601
+                    self._connect()
602
+                    keys = self.bucket.keys()
603
+                return keys
604
+
605
+	def delete(self, filename_list):
606
+		"""Delete each filename in filename_list, in order if possible"""
607
+                for file in filename_list:
608
+                    try:
609
+                        del self.bucket[file]
610
+                    except:
611
+                        self._logException("Error deleting file %s, attempting to "
612
+                                           "re-connect.\n Got this Traceback:\n"
613
+                                           % file)
614
+                        self._connect()
615
+                        del self.bucket[file]
616
+
617
+# Dictionary relating protocol strings to backend_object classes.
618
+protocol_class_dict = {"scp": scpBackend,
619
+					   "ssh": scpBackend,
620
+					   "file": LocalBackend,
621
+					   "ftp": ftpBackend,
622
+					   "rsync": rsyncBackend,
623
+					   "s3+http": BitBucketBackend}
624
+
... ...
@@ -0,0 +1,9 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
3
+<pkgmetadata>
4
+<herd>no-herd</herd>
5
+<maintainer>
6
+  <email>ticho@gentoo.org</email>
7
+  <name>Andrej Kacian</name>
8
+</maintainer>
9
+</pkgmetadata>
... ...
@@ -0,0 +1,7 @@
1
+# ChangeLog for dev-erl/mysql
2
+# Copyright 2005-2006 BreakMyGentoo.net; Distributed under the GPL v2
3
+# $Header: $
4
+
5
+  07 May 2006; Lars Strojny <lars@strojny.net> ChangeLog:
6
+  Initial commit. Dependency for ejabberd
7
+
... ...
@@ -0,0 +1,31 @@
1
+AUX mysql-5/mysql.erl 26950 RMD160 1e7f78cfc3165270f49e5f9a5b0991abfcd19750 SHA1 a45d087613aa0556cddffcec6ebc97547415eec8 SHA256 56da9d145b8d8fc08bbec5569aaa6ac58c852f2bb163ead1b448cb263edf290c size 26950
2
+MD5 6468ce139782e5afdc174814ef79e3dc files/mysql-5/mysql.erl 26950
3
+RMD160 1e7f78cfc3165270f49e5f9a5b0991abfcd19750 files/mysql-5/mysql.erl 26950
4
+SHA256 56da9d145b8d8fc08bbec5569aaa6ac58c852f2bb163ead1b448cb263edf290c files/mysql-5/mysql.erl 26950
5
+AUX mysql-5/mysql.hrl 105 RMD160 e87df112cee2b8cd8e40f48ebd33cc9ad5824c85 SHA1 5756564c95b85c6913917b715b682f01cf1ae652 SHA256 7913a92afb56c909cef29f9ee57f8483c7acc2de484909c3165dd7abb8951996 size 105
6
+MD5 2a911311bafd83b0b7837de8046b4035 files/mysql-5/mysql.hrl 105
7
+RMD160 e87df112cee2b8cd8e40f48ebd33cc9ad5824c85 files/mysql-5/mysql.hrl 105
8
+SHA256 7913a92afb56c909cef29f9ee57f8483c7acc2de484909c3165dd7abb8951996 files/mysql-5/mysql.hrl 105
9
+AUX mysql-5/mysql_auth.erl 6578 RMD160 91ab61b647c0e671fc47432f66340e262ef42b23 SHA1 3b4094be6995f9438246c204dabecaa8cf82d667 SHA256 ca13c4177a4acb13d4e4eb3fb31e132996477a4a526aa50fc42851fac2288d85 size 6578
10
+MD5 b12048d5b64c0249173d8a0d690dbdd3 files/mysql-5/mysql_auth.erl 6578
11
+RMD160 91ab61b647c0e671fc47432f66340e262ef42b23 files/mysql-5/mysql_auth.erl 6578
12
+SHA256 ca13c4177a4acb13d4e4eb3fb31e132996477a4a526aa50fc42851fac2288d85 files/mysql-5/mysql_auth.erl 6578
13
+AUX mysql-5/mysql_conn.erl 24318 RMD160 5bd5c430553245285b45a8f33bc8a438b2b75f03 SHA1 9ac62dea95ff209dbc27b54c74a74df4868c04c5 SHA256 93b8d6029682e1f9dd5343b78639c209201513ad4da0e6a4e010680c545a027f size 24318
14
+MD5 d62886a6d354e54867c2fa925ecfbf5b files/mysql-5/mysql_conn.erl 24318
15
+RMD160 5bd5c430553245285b45a8f33bc8a438b2b75f03 files/mysql-5/mysql_conn.erl 24318
16
+SHA256 93b8d6029682e1f9dd5343b78639c209201513ad4da0e6a4e010680c545a027f files/mysql-5/mysql_conn.erl 24318
17
+AUX mysql-5/mysql_recv.erl 5969 RMD160 55e05e77eea577cd97f646dbbaa4a59d6170b90d SHA1 b00e10ec0aa0f6686e86a0a33e24fff6e543b5a8 SHA256 22069257ff8230bb2b8f26c7e065a5d6f6c0b5f4f2bf5d505830ffe2b75ce783 size 5969
18
+MD5 c4e1b577553658ec96e1a867a7091d14 files/mysql-5/mysql_recv.erl 5969
19
+RMD160 55e05e77eea577cd97f646dbbaa4a59d6170b90d files/mysql-5/mysql_recv.erl 5969
20
+SHA256 22069257ff8230bb2b8f26c7e065a5d6f6c0b5f4f2bf5d505830ffe2b75ce783 files/mysql-5/mysql_recv.erl 5969
21
+EBUILD mysql-5.ebuild 677 RMD160 4a3c3ef182ed4104587fbbbf0f2f438efac02eee SHA1 e0f02ae13504ebff9ff76818ed15776a742e1d6b SHA256 bcfc02741dad9bab768b61f63399e333bcc5bc28944b9e8a6da6c5411cc86cc4 size 677
22
+MD5 6ac678b1fdfdb88c7d89dca2204019d0 mysql-5.ebuild 677
23
+RMD160 4a3c3ef182ed4104587fbbbf0f2f438efac02eee mysql-5.ebuild 677
24
+SHA256 bcfc02741dad9bab768b61f63399e333bcc5bc28944b9e8a6da6c5411cc86cc4 mysql-5.ebuild 677
25
+MISC ChangeLog 215 RMD160 e0efaa0907544feb0bed5176d09cc613ab5ac6ec SHA1 18c3589897fc9c0a61b67c4c7f94cbe147104ab1 SHA256 fbdc6b0fd128a03a62490ca8db778d8a7c1d255b8819339d291887d40440140a size 215
26
+MD5 b0c339ed8db8a4512f1664a3d7915531 ChangeLog 215
27
+RMD160 e0efaa0907544feb0bed5176d09cc613ab5ac6ec ChangeLog 215
28
+SHA256 fbdc6b0fd128a03a62490ca8db778d8a7c1d255b8819339d291887d40440140a ChangeLog 215
29
+MD5 68b329da9893e34099c7d8ad5cb9c940 files/digest-mysql-5 1
30
+RMD160 c0da025038ed83c687ddc430da9846ecb97f3998 files/digest-mysql-5 1
31
+SHA256 01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b files/digest-mysql-5 1
... ...
@@ -0,0 +1,656 @@
1
+%%%-------------------------------------------------------------------
2
+%%% File    : mysql.erl
3
+%%% Author  : Magnus Ahltorp <ahltorp@nada.kth.se>
4
+%%% Descrip.: MySQL client.
5
+%%%
6
+%%% Created :  4 Aug 2005 by Magnus Ahltorp <ahltorp@nada.kth.se>
7
+%%%
8
+%%% Copyright (c) 2001-2004 Kungliga Tekniska H�gskolan
9
+%%% See the file COPYING
10
+%%%
11
+%%% Usage:
12
+%%%
13
+%%%
14
+%%% Call one of the start-functions before any call to fetch/2
15
+%%%
16
+%%%   start_link(Id, Host, User, Password, Database)
17
+%%%   start_link(Id, Host, Port, User, Password, Database)
18
+%%%   start_link(Id, Host, User, Password, Database, LogFun)
19
+%%%   start_link(Id, Host, Port, User, Password, Database, LogFun)
20
+%%%
21
+%%% Id is a connection group identifier. If you want to have more
22
+%%% than one connection to a server (or a set of MySQL replicas),
23
+%%% add more with
24
+%%%
25
+%%%   connect(Id, Host, Port, User, Password, Database, Reconnect)
26
+%%%
27
+%%% use 'undefined' as Port to get default MySQL port number (3306).
28
+%%% MySQL querys will be sent in a per-Id round-robin fashion.
29
+%%% Set Reconnect to 'true' if you want the dispatcher to try and
30
+%%% open a new connection, should this one die.
31
+%%%
32
+%%% When you have a mysql_dispatcher running, this is how you make a
33
+%%% query :
34
+%%%
35
+%%%   fetch(Id, "select * from hello") -> Result
36
+%%%     Result = {data, MySQLRes} | {updated, MySQLRes} |
37
+%%%              {error, MySQLRes}
38
+%%%
39
+%%% Actual data can be extracted from MySQLRes by calling the following API
40
+%%% functions:
41
+%%%     - on data received:
42
+%%%          FieldInfo = mysql:get_result_field_info(MysqlRes)
43
+%%%          AllRows   = mysql:get_result_rows(MysqlRes)
44
+%%%         with FieldInfo = list() of {Table, Field, Length, Name}
45
+%%%          and AllRows   = list() of list() representing records
46
+%%%     - on update:
47
+%%%          Affected  = mysql:get_result_affected_rows(MysqlRes)
48
+%%%         with Affected  = integer()
49
+%%%     - on error:
50
+%%%          Reason    = mysql:get_result_reason(MysqlRes)
51
+%%%         with Reason    = string()
52
+%%% 
53
+%%% If you just want a single MySQL connection, or want to manage your
54
+%%% connections yourself, you can use the mysql_conn module as a
55
+%%% stand-alone single MySQL connection. See the comment at the top of
56
+%%% mysql_conn.erl.
57
+%%%
58
+%%%-------------------------------------------------------------------
59
+-module(mysql).
60
+
61
+-behaviour(gen_server).
62
+
63
+%%--------------------------------------------------------------------
64
+%% External exports
65
+%%--------------------------------------------------------------------
66
+-export([start_link/5,
67
+	 start_link/6,
68
+	 start_link/7,
69
+
70
+	 fetch/2,
71
+	 fetch/3,
72
+
73
+	 get_result_field_info/1,
74
+	 get_result_rows/1,
75
+	 get_result_affected_rows/1,
76
+	 get_result_reason/1,
77
+
78
+	 quote/1,
79
+	 asciz_binary/2,
80
+
81
+	 connect/7
82
+	]).
83
+
84
+%%--------------------------------------------------------------------
85
+%% Internal exports - just for mysql_* modules
86
+%%--------------------------------------------------------------------
87
+-export([log/3,
88
+	 log/4
89
+	]).
90
+
91
+%%--------------------------------------------------------------------
92
+%% Internal exports - gen_server callbacks
93
+%%--------------------------------------------------------------------
94
+-export([init/1,
95
+	 handle_call/3,
96
+	 handle_cast/2,
97
+	 handle_info/2,
98
+	 terminate/2,
99
+	 code_change/3
100
+	]).
101
+
102
+%%--------------------------------------------------------------------
103
+%% Records
104
+%%--------------------------------------------------------------------
105
+-include("mysql.hrl").
106
+-record(state, {
107
+	  conn_list,	%% list() of mysql_connection record()
108
+	  log_fun	%% undefined | function for logging,
109
+	 }).
110
+
111
+-record(mysql_connection, {
112
+	  id,		%% term(), user of 'mysql' modules id of this socket group
113
+	  conn_pid,	%% pid(), mysql_conn process
114
+	  reconnect,	%% true | false, should mysql_dispatcher try to reconnect if this connection dies?
115
+	  host,		%% undefined | string()
116
+	  port,		%% undefined | integer()
117
+	  user,		%% undefined | string()
118
+	  password,	%% undefined | string()
119
+	  database	%% undefined | string()
120
+	 }).
121
+
122
+%%--------------------------------------------------------------------
123
+%% Macros
124
+%%--------------------------------------------------------------------
125
+-define(SERVER, mysql_dispatcher).
126
+-define(CONNECT_TIMEOUT, 5000).
127
+-define(LOCAL_FILES, 128).
128
+
129
+-define(PORT, 3306).
130
+
131
+
132
+%%====================================================================
133
+%% External functions
134
+%%====================================================================
135
+
136
+%%--------------------------------------------------------------------
137
+%% Function: start_link(Id, Host, User, Password, Database)
138
+%%           start_link(Id, Host, Port, User, Password, Database)
139
+%%           start_link(Id, Host, User, Password, Database, LogFun)
140
+%%           start_link(Id, Host, Port, User, Password, Database,
141
+%%                      LogFun)
142
+%%           Id       = term(), first connection-group Id
143
+%%           Host     = string()
144
+%%           Port     = integer()
145
+%%           User     = string()
146
+%%           Password = string()
147
+%%           Database = string()
148
+%%           LogFun   = undefined | function() of arity 3
149
+%% Descrip.: Starts the MySQL client gen_server process.
150
+%% Returns : {ok, Pid} | ignore | {error, Error}
151
+%%--------------------------------------------------------------------
152
+start_link(Id, Host, User, Password, Database) when is_list(Host), is_list(User), is_list(Password),
153
+						    is_list(Database) ->
154
+    start_link(Id, Host, ?PORT, User, Password, Database, undefined).
155
+
156
+start_link(Id, Host, Port, User, Password, Database) when is_list(Host), is_integer(Port), is_list(User),
157
+							  is_list(Password), is_list(Database) ->
158
+    start_link(Id, Host, Port, User, Password, Database, undefined);
159
+
160
+start_link(Id, Host, User, Password, Database, LogFun) when is_list(Host), is_list(User), is_list(Password),
161
+							    is_list(Database) ->
162
+    start_link(Id, Host, ?PORT, User, Password, Database, LogFun).
163
+
164
+start_link(Id, Host, Port, User, Password, Database, LogFun) when is_list(Host), is_integer(Port), is_list(User),
165
+								  is_list(Password), is_list(Database) ->
166
+    crypto:start(),
167
+    gen_server:start_link({local, ?SERVER}, ?MODULE, [Id, Host, Port, User, Password, Database, LogFun], []).
168
+
169
+%%--------------------------------------------------------------------
170
+%% Function: fetch(Id, Query)
171
+%%           fetch(Id, Query, Timeout)
172
+%%           Id      = term(), connection-group Id
173
+%%           Query   = string(), MySQL query in verbatim
174
+%%           Timeout = integer() | infinity, gen_server timeout value
175
+%% Descrip.: Send a query and wait for the result.
176
+%% Returns : {data, MySQLRes}    |
177
+%%           {updated, MySQLRes} | 
178
+%%           {error, MySQLRes}
179
+%%           MySQLRes = term()
180
+%%--------------------------------------------------------------------
181
+fetch(Id, Query) when is_list(Query) ->
182
+    gen_server:call(?SERVER, {fetch, Id, Query}).
183
+fetch(Id, Query, Timeout) when is_list(Query) ->
184
+    gen_server:call(?SERVER, {fetch, Id, Query}, Timeout).
185
+
186
+%%--------------------------------------------------------------------
187
+%% Function: get_result_field_info(MySQLRes)
188
+%%           MySQLRes = term(), result of fetch function on "data"
189
+%% Descrip.: Extract the FieldInfo from MySQL Result on data received
190
+%% Returns : FieldInfo
191
+%%           FieldInfo = list() of {Table, Field, Length, Name}
192
+%%--------------------------------------------------------------------
193
+get_result_field_info(#mysql_result{fieldinfo = FieldInfo}) ->
194
+    FieldInfo.
195
+
196
+%%--------------------------------------------------------------------
197
+%% Function: get_result_rows(MySQLRes)
198
+%%           MySQLRes = term(), result of fetch function on "data"
199
+%% Descrip.: Extract the Rows from MySQL Result on data received
200
+%% Returns : Rows
201
+%%           Rows = list() of list() representing records
202
+%%--------------------------------------------------------------------
203
+get_result_rows(#mysql_result{rows=AllRows}) ->
204
+    AllRows.
205
+
206
+%%--------------------------------------------------------------------
207
+%% Function: get_result_affected_rows(MySQLRes)
208
+%%           MySQLRes = term(), result of fetch function on "updated"
209
+%% Descrip.: Extract the Rows from MySQL Result on update
210
+%% Returns : AffectedRows
211
+%%           AffectedRows = integer()
212
+%%--------------------------------------------------------------------
213
+get_result_affected_rows(#mysql_result{affectedrows=AffectedRows}) ->
214
+    AffectedRows.
215
+
216
+%%--------------------------------------------------------------------
217
+%% Function: get_result_reason(MySQLRes)
218
+%%           MySQLRes = term(), result of fetch function on "error"
219
+%% Descrip.: Extract the error Reason from MySQL Result on error
220
+%% Returns : Reason
221
+%%           Reason    = string()
222
+%%--------------------------------------------------------------------
223
+get_result_reason(#mysql_result{error=Reason}) ->
224
+    Reason.
225
+
226
+%%--------------------------------------------------------------------
227
+%% Function: quote(String)
228
+%%           String = string()
229
+%% Descrip.: Quote a string so that it can be included safely in a
230
+%%           MySQL query.
231
+%% Returns : Quoted = string()
232
+%%--------------------------------------------------------------------
233
+quote(String) when is_list(String) ->
234
+    [34 | lists:reverse([34 | quote(String, [])])].	%% 34 is $"
235
+
236
+quote([], Acc) ->
237
+    Acc;
238
+quote([0 | Rest], Acc) ->
239
+    quote(Rest, [$0, $\\ | Acc]);
240
+quote([10 | Rest], Acc) ->
241
+    quote(Rest, [$n, $\\ | Acc]);
242
+quote([13 | Rest], Acc) ->
243
+    quote(Rest, [$r, $\\ | Acc]);
244
+quote([$\\ | Rest], Acc) ->
245
+    quote(Rest, [$\\ , $\\ | Acc]);
246
+quote([39 | Rest], Acc) ->		%% 39 is $'
247
+    quote(Rest, [39, $\\ | Acc]);	%% 39 is $'
248
+quote([34 | Rest], Acc) ->		%% 34 is $"
249
+    quote(Rest, [34, $\\ | Acc]);	%% 34 is $"
250
+quote([26 | Rest], Acc) ->
251
+    quote(Rest, [$Z, $\\ | Acc]);
252
+quote([C | Rest], Acc) ->
253
+    quote(Rest, [C | Acc]).
254
+
255
+%%--------------------------------------------------------------------
256
+%% Function: asciz_binary(Data, Acc)
257
+%%           Data = binary()
258
+%%           Acc  = list(), input accumulator
259
+%% Descrip.: Find the first zero-byte in Data and add everything
260
+%%           before it to Acc, as a string.
261
+%% Returns : {NewList, Rest}
262
+%%           NewList = list(), Acc plus what we extracted from Data
263
+%%           Rest    = binary(), whatever was left of Data, not
264
+%%                     including the zero-byte
265
+%%--------------------------------------------------------------------
266
+asciz_binary(<<>>, Acc) ->
267
+    {lists:reverse(Acc), <<>>};
268
+asciz_binary(<<0:8, Rest/binary>>, Acc) ->
269
+    {lists:reverse(Acc), Rest};
270
+asciz_binary(<<C:8, Rest/binary>>, Acc) ->
271
+    asciz_binary(Rest, [C | Acc]).
272
+
273
+%%--------------------------------------------------------------------
274
+%% Function: connect(Id, Host, Port, User, Password, Database,
275
+%%                   Reconnect)
276
+%%           Id        = term(), connection-group Id
277
+%%           Host      = string()
278
+%%           Port      = undefined | integer()
279
+%%           User      = string()
280
+%%           Password  = string()
281
+%%           Database  = string()
282
+%%           Reconnect = true | false
283
+%% Descrip.: Starts a MySQL connection and, if successfull, registers
284
+%%           it with the mysql_dispatcher.
285
+%% Returns : {ok, ConnPid} | {error, Reason}
286
+%%--------------------------------------------------------------------
287
+connect(Id, Host, undefined, User, Password, Database, Reconnect) ->
288
+    connect(Id, Host, ?PORT, User, Password, Database, Reconnect);
289
+connect(Id, Host, Port, User, Password, Database, Reconnect) ->
290
+    {ok, LogFun} = gen_server:call(?SERVER, get_logfun),
291
+    case mysql_conn:start(Host, Port, User, Password, Database, LogFun) of
292
+	{ok, ConnPid} ->
293
+	    MysqlConn =
294
+		case Reconnect of
295
+		    true ->
296
+			#mysql_connection{id        = Id,
297
+					  conn_pid  = ConnPid,
298
+					  reconnect = true,
299
+					  host      = Host,
300
+					  port      = Port,
301
+					  user      = User,
302
+					  password  = Password,
303
+					  database  = Database
304
+					 };
305
+		    false ->
306
+			#mysql_connection{id        = Id,
307
+					  conn_pid  = ConnPid,
308
+					  reconnect = false
309
+					 }
310
+		end,
311
+	    case gen_server:call(?SERVER, {add_mysql_connection, MysqlConn}) of
312
+		ok ->
313
+		    {ok, ConnPid};
314
+		Res ->
315
+		    Res
316
+	    end;
317
+	{error, Reason} ->
318
+	    {error, Reason}
319
+    end.
320
+
321
+%%--------------------------------------------------------------------
322
+%% Function: log(LogFun, Level, Format)
323
+%%           log(LogFun, Level, Format, Arguments)
324
+%%           LogFun    = undefined | function() with arity 3
325
+%%           Level     = debug | normal | error
326
+%%           Format    = string()
327
+%%           Arguments = list() of term()
328
+%% Descrip.: Either call the function LogFun with the Level, Format
329
+%%           and Arguments as parameters or log it to the console if
330
+%%           LogFun is undefined.
331
+%% Returns : void()
332
+%%
333
+%% Note    : Exported only for use by the mysql_* modules.
334
+%%
335
+%%--------------------------------------------------------------------
336
+log(LogFun, Level, Format) ->
337
+    log(LogFun, Level, Format, []).
338
+
339
+log(LogFun, Level, Format, Arguments) when is_function(LogFun) ->
340
+    LogFun(Level, Format, Arguments);
341
+log(undefined, _Level, Format, Arguments) ->
342
+    %% default is to log to console
343
+    io:format(Format, Arguments),
344
+    io:format("~n", []).
345
+
346
+
347
+%%====================================================================
348
+%% gen_server callbacks
349
+%%====================================================================
350
+
351
+%%--------------------------------------------------------------------
352
+%% Function: init(Args) -> {ok, State} |
353
+%%                         {ok, State, Timeout} |
354
+%%                         ignore               |
355
+%%                         {stop, Reason}
356
+%%           Args = [Id, Host, Port, User, Password, Database, LogFun]
357
+%%             Id       = term(), connection-group Id
358
+%%             Host     = string()
359
+%%             Port     = integer()
360
+%%             User     = string()
361
+%%             Password = string()
362
+%%             Database = string()
363
+%%             LogFun   = undefined | function() with arity 3
364
+%% Descrip.: Initiates the gen_server (MySQL dispatcher).
365
+%%--------------------------------------------------------------------
366
+init([Id, Host, Port, User, Password, Database, LogFun]) ->
367
+    case mysql_conn:start(Host, Port, User, Password, Database, LogFun) of
368
+	{ok, ConnPid} ->
369
+	    MysqlConn = #mysql_connection{id        = Id,
370
+					  conn_pid  = ConnPid,
371
+					  reconnect = true,
372
+					  host	    = Host,
373
+					  port      = Port,
374
+					  user      = User,
375
+					  password  = Password,
376
+					  database  = Database
377
+					 },
378
+	    case add_mysql_conn(MysqlConn, []) of
379
+		{ok, ConnList} ->
380
+		    {ok, #state{log_fun    = LogFun,
381
+				conn_list = ConnList
382
+			       }};
383
+		error ->
384
+		    Msg = "mysql: Failed adding first MySQL connection handler to my list, exiting",
385
+		    log(LogFun, error, Msg),
386
+		    {error, Msg}
387
+	    end;
388
+	{error, Reason} ->
389
+	    log(LogFun, error, "mysql: Failed starting first MySQL connection handler, exiting"),
390
+	    {stop, {error, Reason}}
391
+    end.
392
+
393
+%%--------------------------------------------------------------------
394
+%% Function: handle_call(Msg, From, State)
395
+%% Descrip.: Handling call messages.
396
+%% Returns : {reply, Reply, State}          |
397
+%%           {reply, Reply, State, Timeout} |
398
+%%           {noreply, State}               |
399
+%%           {noreply, State, Timeout}      |
400
+%%           {stop, Reason, Reply, State}   | (terminate/2 is called)
401
+%%           {stop, Reason, State}            (terminate/2 is called)
402
+%%--------------------------------------------------------------------
403
+
404
+
405
+%%--------------------------------------------------------------------
406
+%% Function: handle_call({fetch, Id, Query}, From, State)
407
+%%           Id    = term(), connection-group id
408
+%%           Query = string(), MySQL query
409
+%% Descrip.: Make a MySQL query. Use the first connection matching Id
410
+%%           in our connection-list. Don't block the mysql_dispatcher
411
+%%           by returning {noreply, ...} here and let the mysql_conn
412
+%%           do gen_server:reply(...) when it has an answer.
413
+%% Returns : {noreply, NewState}             |
414
+%%           {reply, {error, Reason}, State}
415
+%%           NewState = state record()
416
+%%           Reason   = atom() | string()
417
+%%--------------------------------------------------------------------
418
+handle_call({fetch, Id, Query}, From, State) ->
419
+    log(State#state.log_fun, debug, "mysql: fetch ~p (id ~p)", [Query, Id]),
420
+    case get_next_mysql_connection_for_id(Id, State#state.conn_list) of
421
+	{ok, MysqlConn, RestOfConnList} when is_record(MysqlConn, mysql_connection) ->
422
+	    mysql_conn:fetch(MysqlConn#mysql_connection.conn_pid, Query, From),
423
+	    %% move this mysql socket to the back of the list
424
+	    NewConnList = RestOfConnList ++ [MysqlConn],
425
+	    %% The ConnPid process does a gen_server:reply() when it has an answer
426
+	    {noreply, State#state{conn_list = NewConnList}};
427
+	nomatch ->
428
+	    %% we have no active connection matching Id
429
+	    {reply, {error, no_connection}, State}
430
+    end;
431
+
432
+%%--------------------------------------------------------------------
433
+%% Function: handle_call({add_mysql_connection, Conn}, From, State)
434
+%%           Conn = mysql_connection record()
435
+%% Descrip.: Add Conn to our list of connections.
436
+%% Returns : {reply, Reply, NewState}
437
+%%           Reply = ok | {error, Reason}
438
+%%           NewState = state record()
439
+%%           Reason   = string()
440
+%%--------------------------------------------------------------------
441
+handle_call({add_mysql_connection, Conn}, _From, State) when is_record(Conn, mysql_connection) ->
442
+    case add_mysql_conn(Conn, State#state.conn_list) of
443
+	{ok, NewConnList} ->
444
+	    {Id, ConnPid} = {Conn#mysql_connection.id, Conn#mysql_connection.conn_pid},
445
+	    log(State#state.log_fun, normal, "mysql: Added connection with id '~p' (pid ~p) to my list",
446
+		[Id, ConnPid]),
447
+	    {reply, ok, State#state{conn_list = NewConnList}};
448
+	error ->
449
+	    {reply, {error, "failed adding MySQL connection to my list"}, State}
450
+    end;
451
+
452
+%%--------------------------------------------------------------------
453
+%% Function: handle_call(get_logfun, From, State)
454
+%% Descrip.: Fetch our logfun.
455
+%% Returns : {reply, {ok, LogFun}, State}
456
+%%           LogFun = undefined | function() with arity 3
457
+%%--------------------------------------------------------------------
458
+handle_call(get_logfun, _From, State) ->
459
+    {reply, {ok, State#state.log_fun}, State};
460
+
461
+handle_call(Unknown, _From, State) ->
462
+    log(State#state.log_fun, error, "mysql: Received unknown gen_server call : ~p", [Unknown]),
463
+    {reply, {error, "unknown gen_server call in mysql client"}, State}.
464
+
465
+
466
+%%--------------------------------------------------------------------
467
+%% Function: handle_cast(Msg, State)
468
+%% Descrip.: Handling cast messages
469
+%% Returns : {noreply, State}          |
470
+%%           {noreply, State, Timeout} |
471
+%%           {stop, Reason, State}            (terminate/2 is called)
472
+%%--------------------------------------------------------------------
473
+handle_cast(Unknown, State) ->
474
+    log(State#state.log_fun, error, "mysql: Received unknown gen_server cast : ~p", [Unknown]),
475
+    {noreply, State}.
476
+
477
+
478
+%%--------------------------------------------------------------------
479
+%% Function: handle_info(Msg, State)
480
+%% Descrip.: Handling all non call/cast messages
481
+%% Returns : {noreply, State}          |
482
+%%           {noreply, State, Timeout} |
483
+%%           {stop, Reason, State}            (terminate/2 is called)
484
+%%--------------------------------------------------------------------
485
+
486
+%%--------------------------------------------------------------------
487
+%% Function: handle_info({'DOWN', ...}, State)
488
+%% Descrip.: Handle a message that one of our monitored processes
489
+%%           (mysql_conn processes in our connection list) has exited.
490
+%%           Remove the entry from our list.
491
+%% Returns : {noreply, NewState}   |
492
+%%           {stop, normal, State}
493
+%%           NewState = state record()
494
+%%
495
+%% Note    : For now, we stop if our connection list becomes empty.
496
+%%           We should try to reconnect for a while first, to not
497
+%%           eventually stop the whole OTP application if the MySQL-
498
+%%           server is shut down and the mysql_dispatcher was super-
499
+%%           vised by an OTP supervisor.
500
+%%--------------------------------------------------------------------
501
+handle_info({'DOWN', _MonitorRef, process, Pid, Info}, State) ->
502
+    LogFun = State#state.log_fun,
503
+    case remove_mysql_connection_using_pid(Pid, State#state.conn_list, []) of
504
+	{ok, Conn, NewConnList} ->
505
+	    LogLevel = case Info of
506
+			   normal -> normal;
507
+			   _ -> error
508
+		       end,
509
+	    log(LogFun, LogLevel, "mysql: MySQL connection pid ~p exited : ~p", [Pid, Info]),
510
+	    log(LogFun, normal, "mysql: Removed MySQL connection with pid ~p from list",
511
+		[Pid]),
512
+	    case Conn#mysql_connection.reconnect of
513
+		true ->
514
+		    start_reconnect(Conn, LogFun);
515
+		false ->
516
+		    ok
517
+	    end,
518
+	    {noreply, State#state{conn_list = NewConnList}};
519
+	nomatch ->
520
+	    log(LogFun, error, "mysql: Received 'DOWN' signal from pid ~p not in my list", [Pid]),
521
+	    {noreply, State}
522
+    end;
523
+    
524
+handle_info(Info, State) ->
525
+    log(State#state.log_fun, error, "mysql: Received unknown signal : ~p", [Info]),
526
+    {noreply, State}.
527
+
528
+%%--------------------------------------------------------------------
529
+%% Function: terminate(Reason, State)
530
+%% Descrip.: Shutdown the server
531
+%% Returns : Reason
532
+%%--------------------------------------------------------------------
533
+terminate(Reason, State) ->
534
+    LogFun = State#state.log_fun,
535
+    LogLevel = case Reason of
536
+		   normal -> debug;
537
+		   _ -> error
538
+	       end,
539
+    log(LogFun, LogLevel, "mysql: Terminating with reason : ~p", [Reason]),
540
+    Reason.
541
+
542
+%%--------------------------------------------------------------------
543
+%% Function: code_change(_OldVsn, State, _Extra)
544
+%% Descrip.: Convert process state when code is changed
545
+%% Returns : {ok, State}
546
+%%--------------------------------------------------------------------
547
+code_change(_OldVsn, State, _Extra) ->
548
+    {ok, State}.
549
+
550
+%%====================================================================
551
+%% Internal functions
552
+%%====================================================================
553
+
554
+%%--------------------------------------------------------------------
555
+%% Function: add_mysql_conn(Conn, ConnList)
556
+%%           Conn     = mysql_connection record()
557
+%%           ConnList = list() of mysql_connection record()
558
+%% Descrip.: Set up process monitoring of the mysql_conn process and
559
+%%           then add it (first) to ConnList.
560
+%% Returns : NewConnList = list() of mysql_connection record()
561
+%%--------------------------------------------------------------------
562
+add_mysql_conn(Conn, ConnList) when is_record(Conn, mysql_connection), is_list(ConnList) ->
563
+    erlang:monitor(process, Conn#mysql_connection.conn_pid),
564
+    {ok, [Conn | ConnList]}.
565
+
566
+%%--------------------------------------------------------------------
567
+%% Function: remove_mysql_connection_using_pid(Pid, ConnList)
568
+%%           Pid      = pid()
569
+%%           ConnList = list() of mysql_connection record()
570
+%% Descrip.: Removes the first mysql_connection in ConnList that has
571
+%%           a pid matching Pid.
572
+%% Returns : {ok, Conn, NewConnList} | nomatch
573
+%%           Conn        = mysql_connection record()
574
+%%           NewConnList = list() of mysql_connection record()
575
+%%--------------------------------------------------------------------
576
+remove_mysql_connection_using_pid(Pid, [#mysql_connection{conn_pid = Pid} = H | T], Res) ->
577
+    {ok, H, lists:reverse(Res) ++ T};
578
+remove_mysql_connection_using_pid(Pid, [H | T], Res) when is_record(H, mysql_connection) ->
579
+    remove_mysql_connection_using_pid(Pid, T, [H | Res]);
580
+remove_mysql_connection_using_pid(_Pid, [], _Res) ->
581
+    nomatch.
582
+
583
+%%--------------------------------------------------------------------
584
+%% Function: get_next_mysql_connection_for_id(Id, ConnList)
585
+%%           Id       = term(), connection-group id
586
+%%           ConnList = list() of mysql_connection record()
587
+%% Descrip.: Find the first mysql_connection in ConnList that has an
588
+%%           id matching Id.
589
+%% Returns : {ok, Conn, NewConnList} | nomatch
590
+%%           Conn        = mysql_connection record()
591
+%%           NewConnList = list() of mysql_connection record(), same
592
+%%                         as ConnList but without Conn
593
+%%--------------------------------------------------------------------
594
+get_next_mysql_connection_for_id(Id, ConnList) ->
595
+    get_next_mysql_connection_for_id(Id, ConnList, []).
596
+
597
+get_next_mysql_connection_for_id(Id, [#mysql_connection{id = Id} = H | T], Res) ->
598
+    {ok, H, lists:reverse(Res) ++ T};
599
+get_next_mysql_connection_for_id(Id, [H | T], Res) when is_record(H, mysql_connection) ->
600
+    get_next_mysql_connection_for_id(Id, T, [H | Res]);
601
+get_next_mysql_connection_for_id(_Id, [], _Res) ->
602
+    nomatch.
603
+
604
+%%--------------------------------------------------------------------
605
+%% Function: start_reconnect(Conn, LogFun)
606
+%%           Conn   = mysql_connection record()
607
+%%           LogFun = undefined | function() with arity 3
608
+%% Descrip.: Spawns a process that will try to re-establish a new
609
+%%           connection instead of the one in Conn which has just
610
+%%           died.
611
+%% Returns : ok
612
+%%--------------------------------------------------------------------
613
+start_reconnect(Conn, LogFun) when is_record(Conn, mysql_connection) ->
614
+    Pid = spawn(fun () ->
615
+			reconnect_loop(Conn#mysql_connection{conn_pid = undefined}, LogFun, 0)
616
+		end),
617
+    {Id, Host, Port} = {Conn#mysql_connection.id, Conn#mysql_connection.host, Conn#mysql_connection.port},
618
+    log(LogFun, debug, "mysql: Started pid ~p to try and reconnect to ~p:~s:~p (replacing "
619
+	"connection with pid ~p)", [Pid, Id, Host, Port, Conn#mysql_connection.conn_pid]),
620
+    ok.
621
+
622
+%%--------------------------------------------------------------------
623
+%% Function: reconnect_loop(Conn, LogFun, 0)
624
+%%           Conn   = mysql_connection record()
625
+%%           LogFun = undefined | function() with arity 3
626
+%% Descrip.: Loop indefinately until we are able to reconnect to the
627
+%%           server specified in the now dead connection Conn.
628
+%% Returns : ok
629
+%%--------------------------------------------------------------------
630
+reconnect_loop(Conn, LogFun, N) when is_record(Conn, mysql_connection) ->
631
+    {Id, Host, Port} = {Conn#mysql_connection.id, Conn#mysql_connection.host, Conn#mysql_connection.port},
632
+    case connect(Id,
633
+		 Host,
634
+		 Port,
635
+		 Conn#mysql_connection.user,
636
+		 Conn#mysql_connection.password,
637
+		 Conn#mysql_connection.database,
638
+		 Conn#mysql_connection.reconnect) of
639
+	{ok, ConnPid} ->
640
+	    log(LogFun, debug, "mysql_reconnect: Managed to reconnect to ~p:~s:~p (connection pid ~p)",
641
+		[Id, Host, Port, ConnPid]),
642
+	    ok;
643
+	{error, Reason} ->
644
+	    %% log every once in a while
645
+	    NewN = case N of
646
+		       10 ->
647
+			   log(LogFun, debug, "mysql_reconnect: Still unable to connect to ~p:~s:~p (~p)",
648
+			       [Id, Host, Port, Reason]),
649
+			   0;
650
+		       _ ->
651
+			   N + 1
652
+		   end,
653
+	    %% sleep between every unsuccessfull attempt
654
+	    timer:sleep(20 * 1000),
655
+	    reconnect_loop(Conn, LogFun, NewN)
656
+    end.
... ...
@@ -0,0 +1,6 @@
1
+%% MySQL result record:
2
+-record(mysql_result,
3
+	{fieldinfo=[],
4
+	 rows=[],
5
+	 affectedrows=0,
6
+	 error=""}).
... ...
@@ -0,0 +1,189 @@
1
+%%%-------------------------------------------------------------------
2
+%%% File    : mysql_auth.erl
3
+%%% Author  : Fredrik Thulin <ft@it.su.se>
4
+%%% Descrip.: MySQL client authentication functions.
5
+%%% Created :  4 Aug 2005 by Fredrik Thulin <ft@it.su.se>
6
+%%%
7
+%%% Note    : All MySQL code was written by Magnus Ahltorp, originally
8
+%%%           in the file mysql.erl - I just moved it here.
9
+%%%
10
+%%% Copyright (c) 2001-2004 Kungliga Tekniska H�gskolan
11
+%%% See the file COPYING
12
+%%%
13
+%%%-------------------------------------------------------------------
14
+-module(mysql_auth).
15
+
16
+%%--------------------------------------------------------------------
17
+%% External exports (should only be used by the 'mysql_conn' module)
18
+%%--------------------------------------------------------------------
19
+-export([
20
+	 do_old_auth/7,
21
+	 do_new_auth/8
22
+	]).
23
+
24
+%%--------------------------------------------------------------------
25
+%% Macros
26
+%%--------------------------------------------------------------------
27
+-define(LONG_PASSWORD, 1).
28
+-define(LONG_FLAG, 4).
29
+-define(PROTOCOL_41, 512).
30
+-define(TRANSACTIONS, 8192).
31
+-define(SECURE_CONNECTION, 32768).
32
+-define(CONNECT_WITH_DB, 8).
33
+
34
+-define(MAX_PACKET_SIZE, 1000000).
35
+
36
+%%====================================================================
37
+%% External functions
38
+%%====================================================================
39
+
40
+%%--------------------------------------------------------------------
41
+%% Function: do_old_auth(Sock, RecvPid, SeqNum, User, Password, Salt1,
42
+%%                       LogFun)
43
+%%           Sock     = term(), gen_tcp socket
44
+%%           RecvPid  = pid(), receiver process pid
45
+%%           SeqNum   = integer(), first sequence number we should use
46
+%%           User     = string(), MySQL username
47
+%%           Password = string(), MySQL password
48
+%%           Salt1    = string(), salt 1 from server greeting
49
+%%           LogFun   = undefined | function() of arity 3
50
+%% Descrip.: Perform old-style MySQL authentication.
51
+%% Returns : result of mysql_conn:do_recv/3
52
+%%--------------------------------------------------------------------
53
+do_old_auth(Sock, RecvPid, SeqNum, User, Password, Salt1, LogFun) ->
54
+    Auth = password_old(Password, Salt1),
55
+    Packet2 = make_auth(User, Auth),
56
+    do_send(Sock, Packet2, SeqNum, LogFun),
57
+    mysql_conn:do_recv(LogFun, RecvPid, SeqNum).
58
+
59
+%%--------------------------------------------------------------------
60
+%% Function: do_new_auth(Sock, RecvPid, SeqNum, User, Password, Salt1,
61
+%%                       Salt2, LogFun)
62
+%%           Sock     = term(), gen_tcp socket
63
+%%           RecvPid  = pid(), receiver process pid
64
+%%           SeqNum   = integer(), first sequence number we should use
65
+%%           User     = string(), MySQL username
66
+%%           Password = string(), MySQL password
67
+%%           Salt1    = string(), salt 1 from server greeting
68
+%%           Salt2    = string(), salt 2 from server greeting
69
+%%           LogFun   = undefined | function() of arity 3
70
+%% Descrip.: Perform MySQL authentication.
71
+%% Returns : result of mysql_conn:do_recv/3
72
+%%--------------------------------------------------------------------
73
+do_new_auth(Sock, RecvPid, SeqNum, User, Password, Salt1, Salt2, LogFun) ->
74
+    Auth = password_new(Password, Salt1 ++ Salt2),
75
+    Packet2 = make_new_auth(User, Auth, none),
76
+    do_send(Sock, Packet2, SeqNum, LogFun),
77
+    case mysql_conn:do_recv(LogFun, RecvPid, SeqNum) of
78
+	{ok, Packet3, SeqNum2} ->
79
+	    case Packet3 of
80
+		<<254:8>> ->
81
+		    AuthOld = password_old(Password, Salt1),
82
+		    do_send(Sock, <<AuthOld/binary, 0:8>>, SeqNum2 + 1, LogFun),
83
+		    mysql_conn:do_recv(LogFun, RecvPid, SeqNum2 + 1);
84
+		_ ->
85
+		    {ok, Packet3, SeqNum2}
86
+	    end;
87
+	{error, Reason} ->
88
+	    {error, Reason}
89
+    end.
90
+
91
+%%====================================================================
92
+%% Internal functions
93
+%%====================================================================
94
+
95
+password_old(Password, Salt) ->
96
+    {P1, P2} = hash(Password),
97
+    {S1, S2} = hash(Salt),
98
+    Seed1 = P1 bxor S1,
99
+    Seed2 = P2 bxor S2,
100
+    List = rnd(9, Seed1, Seed2),
101
+    {L, [Extra]} = lists:split(8, List),
102
+    list_to_binary(lists:map(fun (E) ->
103
+				     E bxor (Extra - 64)
104
+			     end, L)).
105
+
106
+%% part of do_old_auth/4, which is part of mysql_init/4
107
+make_auth(User, Password) ->
108
+    Caps = ?LONG_PASSWORD bor ?LONG_FLAG bor ?TRANSACTIONS,
109
+    Maxsize = 0,
110
+    UserB = list_to_binary(User),
111
+    PasswordB = Password,
112
+    <<Caps:16/little, Maxsize:24/little, UserB/binary, 0:8,
113
+    PasswordB/binary>>.
114
+
115
+%% part of do_new_auth/4, which is part of mysql_init/4
116
+make_new_auth(User, Password, Database) ->
117
+    DBCaps = case Database of
118
+		 none ->
119
+		     0;
120
+		 _ ->
121
+		     ?CONNECT_WITH_DB
122
+	     end,
123
+    Caps = ?LONG_PASSWORD bor ?LONG_FLAG bor ?TRANSACTIONS bor
124
+	?PROTOCOL_41 bor ?SECURE_CONNECTION bor DBCaps,
125
+    Maxsize = ?MAX_PACKET_SIZE,
126
+    UserB = list_to_binary(User),
127
+    PasswordL = size(Password),
128
+    DatabaseB = case Database of
129
+		    none ->
130
+			<<>>;
131
+		    _ ->
132
+			list_to_binary(Database)
133
+		end,
134
+    <<Caps:32/little, Maxsize:32/little, 8:8, 0:23/integer-unit:8,
135
+    UserB/binary, 0:8, PasswordL:8, Password/binary, DatabaseB/binary>>.
136
+
137
+hash(S) ->
138
+    hash(S, 1345345333, 305419889, 7).
139
+
140
+hash([C | S], N1, N2, Add) ->
141
+    N1_1 = N1 bxor (((N1 band 63) + Add) * C + N1 * 256),
142
+    N2_1 = N2 + ((N2 * 256) bxor N1_1),
143
+    Add_1 = Add + C,
144
+    hash(S, N1_1, N2_1, Add_1);
145
+hash([], N1, N2, _Add) ->
146
+    Mask = (1 bsl 31) - 1,
147
+    {N1 band Mask , N2 band Mask}.
148
+
149
+rnd(N, Seed1, Seed2) ->
150
+    Mod = (1 bsl 30) - 1,
151
+    rnd(N, [], Seed1 rem Mod, Seed2 rem Mod).
152
+
153
+rnd(0, List, _, _) ->
154
+    lists:reverse(List);
155
+rnd(N, List, Seed1, Seed2) ->
156
+    Mod = (1 bsl 30) - 1,
157
+    NSeed1 = (Seed1 * 3 + Seed2) rem Mod,
158
+    NSeed2 = (NSeed1 + Seed2 + 33) rem Mod,
159
+    Float = (float(NSeed1) / float(Mod))*31,
160
+    Val = trunc(Float)+64,
161
+    rnd(N - 1, [Val | List], NSeed1, NSeed2).
162
+
163
+
164
+
165
+dualmap(_F, [], []) ->
166
+    [];
167
+dualmap(F, [E1 | R1], [E2 | R2]) ->
168
+    [F(E1, E2) | dualmap(F, R1, R2)].
169
+
170
+bxor_binary(B1, B2) ->
171
+    list_to_binary(dualmap(fun (E1, E2) ->
172
+				   E1 bxor E2
173
+			   end, binary_to_list(B1), binary_to_list(B2))).
174
+
175
+password_new(Password, Salt) ->
176
+    Stage1 = crypto:sha(Password),
177
+    Stage2 = crypto:sha(Stage1),
178
+    Res = crypto:sha_final(
179
+	    crypto:sha_update(
180
+	      crypto:sha_update(crypto:sha_init(), Salt),
181
+	      Stage2)
182
+	   ),
183
+    bxor_binary(Res, Stage1).
184
+
185
+
186
+do_send(Sock, Packet, Num, LogFun) ->
187
+    mysql:log(LogFun, debug, "mysql_auth send packet ~p: ~p", [Num, Packet]),
188
+    Data = <<(size(Packet)):24/little, Num:8, Packet/binary>>,
189
+    gen_tcp:send(Sock, Data).
... ...
@@ -0,0 +1,620 @@
1
+%%%-------------------------------------------------------------------
2
+%%% File    : mysql_conn.erl
3
+%%% Author  : Fredrik Thulin <ft@it.su.se>
4
+%%% Descrip.: MySQL connection handler, handles de-framing of messages
5
+%%%           received by the MySQL receiver process.
6
+%%% Created :  5 Aug 2005 by Fredrik Thulin <ft@it.su.se>
7
+%%% Modified: 11 Jan 2006 by Mickael Remond <mickael.remond@process-one.net>
8
+%%%
9
+%%% Note    : All MySQL code was written by Magnus Ahltorp, originally
10
+%%%           in the file mysql.erl - I just moved it here.
11
+%%%
12
+%%% Copyright (c) 2001-2004 Kungliga Tekniska H�gskolan
13
+%%% See the file COPYING
14
+%%%
15
+%%%
16
+%%% This module handles a single connection to a single MySQL server.
17
+%%% You can use it stand-alone, or through the 'mysql' module if you
18
+%%% want to have more than one connection to the server, or
19
+%%% connections to different servers.
20
+%%%
21
+%%% To use it stand-alone, set up the connection with
22
+%%%
23
+%%%   {ok, Pid} = mysql_conn:start(Host, Port, User, Password,
24
+%%%                                Database, LogFun)
25
+%%%
26
+%%%         Host     = string()
27
+%%%         Port     = integer()
28
+%%%         User     = string()
29
+%%%         Password = string()
30
+%%%         Database = string()
31
+%%%         LogFun   = undefined | (gives logging to console)
32
+%%%                    function() of arity 3 (Level, Fmt, Args)
33
+%%%
34
+%%% Note: In stand-alone mode you have to start Erlang crypto application by
35
+%%% yourself with crypto:start()
36
+%%%
37
+%%% and then make MySQL querys with
38
+%%%
39
+%%%   Result = mysql_conn:fetch(Pid, Query, self())
40
+%%%
41
+%%%         Result = {data, MySQLRes}    |
42
+%%%                  {updated, MySQLRes} |
43
+%%%                  {error, MySQLRes}
44
+%%%          Where: MySQLRes = #mysql_result
45
+%%%
46
+%%% Actual data can be extracted from MySQLRes by calling the following API
47
+%%% functions:
48
+%%%     - on data received:
49
+%%%          FieldInfo = mysql:get_result_field_info(MysqlRes)
50
+%%%          AllRows   = mysql:get_result_rows(MysqlRes)
51
+%%%         with FieldInfo = list() of {Table, Field, Length, Name}
52
+%%%          and AllRows = list() of list() representing records
53
+%%%     - on update:
54
+%%%          Affected= mysql:get_result_affected_rows(MysqlRes)
55
+%%%         with Affected = integer()
56
+%%%     - on error:
57
+%%%          Reason    = mysql:get_result_reason(MysqlRes)
58
+%%%         with Reason = string()
59
+%%%-------------------------------------------------------------------
60
+
61
+-module(mysql_conn).
62
+
63
+%%--------------------------------------------------------------------
64
+%% External exports
65
+%%--------------------------------------------------------------------
66
+-export([start/6,
67
+	 start_link/6,
68
+	 fetch/3,
69
+	 fetch/4
70
+	]).
71
+
72
+%%--------------------------------------------------------------------
73
+%% External exports (should only be used by the 'mysql_auth' module)
74
+%%--------------------------------------------------------------------
75
+-export([do_recv/3
76
+	]).
77
+
78
+-include("mysql.hrl").
79
+-record(state, {
80
+	  mysql_version,
81
+	  log_fun,
82
+	  recv_pid,
83
+	  socket,
84
+	  data
85
+	 }).
86
+
87
+-define(SECURE_CONNECTION, 32768).
88
+-define(MYSQL_QUERY_OP, 3).
89
+-define(DEFAULT_STANDALONE_TIMEOUT, 5000).
90
+-define(MYSQL_4_0, 40). %% Support for MySQL 4.0.x
91
+-define(MYSQL_4_1, 41). %% Support for MySQL 4.1.x et 5.0.x
92
+
93
+%%====================================================================
94
+%% External functions
95
+%%====================================================================
96
+
97
+%%--------------------------------------------------------------------
98
+%% Function: start(Host, Port, User, Password, Database, LogFun)
99
+%% Function: start_link(Host, Port, User, Password, Database, LogFun)
100
+%%           Host     = string()
101
+%%           Port     = integer()
102
+%%           User     = string()
103
+%%           Password = string()
104
+%%           Database = string()
105
+%%           LogFun   = undefined | function() of arity 3
106
+%% Descrip.: Starts a mysql_conn process that connects to a MySQL
107
+%%           server, logs in and chooses a database.
108
+%% Returns : {ok, Pid} | {error, Reason}
109
+%%           Pid    = pid()
110
+%%           Reason = string()
111
+%%--------------------------------------------------------------------
112
+start(Host, Port, User, Password, Database, LogFun) when is_list(Host), is_integer(Port), is_list(User),
113
+							 is_list(Password), is_list(Database) ->
114
+    ConnPid = self(),
115
+    Pid = spawn(fun () ->
116
+			init(Host, Port, User, Password, Database, LogFun, ConnPid)
117
+		end),
118
+    post_start(Pid, LogFun).
119
+
120
+start_link(Host, Port, User, Password, Database, LogFun) when is_list(Host), is_integer(Port), is_list(User),
121
+							 is_list(Password), is_list(Database) ->
122
+    ConnPid = self(),
123
+    Pid = spawn_link(fun () ->
124
+			init(Host, Port, User, Password, Database, LogFun, ConnPid)
125
+		end),
126
+    post_start(Pid, LogFun).
127
+
128
+%% part of start/6 or start_link/6:
129
+post_start(Pid, LogFun) ->
130
+    receive
131
+	{mysql_conn, Pid, ok} ->
132
+	    {ok, Pid};
133
+	{mysql_conn, Pid, {error, Reason}} ->
134
+	    {error, Reason};
135
+	Unknown ->
136
+	    mysql:log(LogFun, error, "mysql_conn: Received unknown signal, exiting"),
137
+	    mysql:log(LogFun, debug, "mysql_conn: Unknown signal : ~p", [Unknown]),
138
+	    {error, "unknown signal received"}
139
+    after 5000 ->
140
+	    {error, "timed out"}
141
+    end.
142
+
143
+%%--------------------------------------------------------------------
144
+%% Function: fetch(Pid, Query, From)
145
+%%           fetch(Pid, Query, From, Timeout)
146
+%%           Pid     = pid(), mysql_conn to send fetch-request to
147
+%%           Query   = string(), MySQL query in verbatim
148
+%%           From    = pid() or term(), use a From of self() when
149
+%%                     using this module for a single connection,
150
+%%                     or pass the gen_server:call/3 From argument if
151
+%%                     using a gen_server to do the querys (e.g. the
152
+%%                     mysql_dispatcher)
153
+%%           Timeout = integer() | infinity, gen_server timeout value
154
+%% Descrip.: Send a query and wait for the result if running stand-
155
+%%           alone (From = self()), but don't block the caller if we
156
+%%           are not running stand-alone (From = gen_server From).
157
+%% Returns : ok                        | (non-stand-alone mode)
158
+%%           {data, #mysql_result}     | (stand-alone mode)
159
+%%           {updated, #mysql_result}  | (stand-alone mode)
160
+%%           {error, #mysql_result}      (stand-alone mode)
161
+%%           FieldInfo = term()
162
+%%           Rows      = list() of [string()]
163
+%%           Reason    = term()
164
+%%--------------------------------------------------------------------
165
+fetch(Pid, Query, From) ->
166
+    fetch(Pid, Query, From, ?DEFAULT_STANDALONE_TIMEOUT).
167
+
168
+fetch(Pid, Query, From, Timeout) when is_pid(Pid), is_list(Query) ->
169
+    Self = self(),
170
+    Pid ! {fetch, Query, From},
171
+    case From of
172
+	Self ->
173
+	    %% We are not using a mysql_dispatcher, await the response
174
+	    receive
175
+		{fetch_result, Pid, Result} ->
176
+		    Result
177
+	    after Timeout ->
178
+		    {error, "query timed out"}
179
+	    end;
180
+	_ ->
181
+	    %% From is gen_server From, Pid will do gen_server:reply() when it has an answer
182
+	    ok
183
+    end.
184
+     
185
+%%--------------------------------------------------------------------
186
+%% Function: do_recv(LogFun, RecvPid, SeqNum)
187
+%%           LogFun  = undefined | function() with arity 3
188
+%%           RecvPid = pid(), mysql_recv process
189
+%%           SeqNum  = undefined | integer()
190
+%% Descrip.: Wait for a frame decoded and sent to us by RecvPid.
191
+%%           Either wait for a specific frame if SeqNum is an integer,
192
+%%           or just any frame if SeqNum is undefined.
193
+%% Returns : {ok, Packet, Num} |
194
+%%           {error, Reason}
195
+%%           Reason = term()
196
+%%
197
+%% Note    : Only to be used externally by the 'mysql_auth' module.
198
+%%--------------------------------------------------------------------
199
+do_recv(LogFun, RecvPid, SeqNum) when is_function(LogFun); LogFun == undefined, SeqNum == undefined ->
200
+    receive
201
+        {mysql_recv, RecvPid, data, Packet, Num} ->
202
+            %%mysql:log(LogFun, debug, "mysql_conn: recv packet ~p: ~p", [Num, Packet]),
203
+	    {ok, Packet, Num};
204
+	{mysql_recv, RecvPid, closed, _E} ->
205
+	    {error, "mysql_recv: socket was closed"}
206
+    end;
207
+do_recv(LogFun, RecvPid, SeqNum) when is_function(LogFun); LogFun == undefined, is_integer(SeqNum) ->
208
+    ResponseNum = SeqNum + 1,
209
+    receive
210
+        {mysql_recv, RecvPid, data, Packet, ResponseNum} ->
211
+            %%mysql:log(LogFun, debug, "mysql_conn: recv packet ~p: ~p", [ResponseNum, Packet]),
212
+	    {ok, Packet, ResponseNum};
213
+	{mysql_recv, RecvPid, closed, _E} ->
214
+	    {error, "mysql_recv: socket was closed"}
215
+        end.
216
+
217
+
218
+%%====================================================================
219
+%% Internal functions
220
+%%====================================================================
221
+
222
+%%--------------------------------------------------------------------
223
+%% Function: init(Host, Port, User, Password, Database, LogFun,
224
+%%                Parent)
225
+%%           Host     = string()
226
+%%           Port     = integer()
227
+%%           User     = string()
228
+%%           Password = string()
229
+%%           Database = string()
230
+%%           LogFun   = undefined | function() of arity 3
231
+%%           Parent   = pid() of process starting this mysql_conn
232
+%% Descrip.: Connect to a MySQL server, log in and chooses a database.
233
+%%           Report result of this to Parent, and then enter loop() if
234
+%%           we were successfull.
235
+%% Returns : void() | does not return
236
+%%--------------------------------------------------------------------
237
+init(Host, Port, User, Password, Database, LogFun, Parent) ->
238
+    case mysql_recv:start_link(Host, Port, LogFun, self()) of
239
+	{ok, RecvPid, Sock} ->
240
+	    case mysql_init(Sock, RecvPid, User, Password, LogFun) of
241
+		{ok, Version} ->
242
+		    case do_query(Sock, RecvPid, LogFun, "use " ++ Database, Version) of
243
+			{error, MySQLRes} ->
244
+			    mysql:log(LogFun, error, "mysql_conn: Failed changing to database ~p : ~p",
245
+				      [Database, mysql:get_result_reason(MySQLRes)]),
246
+			    Parent ! {mysql_conn, self(), {error, failed_changing_database}};
247
+			%% ResultType: data | updated
248
+			{_ResultType, _MySQLRes} ->
249
+			    Parent ! {mysql_conn, self(), ok},
250
+			    State = #state{mysql_version=Version,
251
+					   recv_pid = RecvPid,
252
+					   socket   = Sock,
253
+					   log_fun  = LogFun,
254
+					   data     = <<>>
255
+					  },
256
+			    loop(State)
257
+		    end;
258
+		{error, _Reason} ->
259
+		    Parent ! {mysql_conn, self(), {error, login_failed}}
260
+	    end;
261
+	E ->
262
+	    mysql:log(LogFun, error, "mysql_conn: Failed connecting to ~p:~p : ~p",
263
+		      [Host, Port, E]),
264
+	    Parent ! {mysql_conn, self(), {error, connect_failed}}
265
+    end.
266
+
267
+%%--------------------------------------------------------------------
268
+%% Function: loop(State)
269
+%%           State = state record()
270
+%% Descrip.: Wait for signals asking us to perform a MySQL query, or
271
+%%           signals that the socket was closed.
272
+%% Returns : error | does not return
273
+%%--------------------------------------------------------------------
274
+loop(State) ->
275
+    RecvPid = State#state.recv_pid,
276
+    receive
277
+	{fetch, Query, GenSrvFrom} ->
278
+	    %% GenSrvFrom is either a gen_server:call/3 From term(), or a pid if no
279
+	    %% gen_server was used to make the query
280
+	    Res = do_query(State, Query),
281
+	    case is_pid(GenSrvFrom) of
282
+		true ->
283
+		    %% The query was not sent using gen_server mechanisms
284
+		    GenSrvFrom ! {fetch_result, self(), Res};
285
+		false ->
286
+		    gen_server:reply(GenSrvFrom, Res)
287
+	    end,
288
+	    loop(State);
289
+	{mysql_recv, RecvPid, data, Packet, Num} ->
290
+	    mysql:log(State#state.log_fun, error, "mysql_conn: Received MySQL data when not expecting any "
291
+		      "(num ~p) - ignoring it", [Num]),
292
+	    mysql:log(State#state.log_fun, error, "mysql_conn: Unexpected MySQL data (num ~p) :~n~p",
293
+		      [Num, Packet]),
294
+	    loop(State);
295
+        Unknown ->
296
+	    mysql:log(State#state.log_fun, error, "mysql_conn: Received unknown signal, exiting"),
297
+	    mysql:log(State#state.log_fun, debug, "mysql_conn: Unknown signal : ~p", [Unknown]),
298
+	    error
299
+    end.
300
+
301
+%%--------------------------------------------------------------------
302
+%% Function: mysql_init(Sock, RecvPid, User, Password, LogFun)
303
+%%           Sock     = term(), gen_tcp socket
304
+%%           RecvPid  = pid(), mysql_recv process
305
+%%           User     = string()
306
+%%           Password = string()
307
+%%           LogFun   = undefined | function() with arity 3
308
+%% Descrip.: Try to authenticate on our new socket.
309
+%% Returns : ok | {error, Reason}
310
+%%           Reason = string()
311
+%%--------------------------------------------------------------------
312
+mysql_init(Sock, RecvPid, User, Password, LogFun) ->
313
+    case do_recv(LogFun, RecvPid, undefined) of
314
+	{ok, Packet, InitSeqNum} ->
315
+	    {Version, Salt1, Salt2, Caps} = greeting(Packet, LogFun),
316
+	    AuthRes =
317
+		case Caps band ?SECURE_CONNECTION of
318
+		    ?SECURE_CONNECTION ->
319
+			mysql_auth:do_new_auth(Sock, RecvPid, InitSeqNum + 1, User, Password, Salt1, Salt2, LogFun);
320
+		    _ ->
321
+			mysql_auth:do_old_auth(Sock, RecvPid, InitSeqNum + 1, User, Password, Salt1, LogFun)
322
+		end,
323
+	    case AuthRes of
324
+		{ok, <<0:8, _Rest/binary>>, _RecvNum} ->
325
+		    {ok,Version};
326
+		{ok, <<255:8, Code:16/little, Message/binary>>, _RecvNum} ->
327
+		    mysql:log(LogFun, error, "mysql_conn: init error ~p: ~p~n", [Code, binary_to_list(Message)]),
328
+		    {error, binary_to_list(Message)};
329
+		{ok, RecvPacket, _RecvNum} ->
330
+		    mysql:log(LogFun, error, "mysql_conn: init unknown error ~p~n", [binary_to_list(RecvPacket)]),
331
+		    {error, binary_to_list(RecvPacket)};
332
+		{error, Reason} ->
333
+		    mysql:log(LogFun, error, "mysql_conn: init failed receiving data : ~p~n", [Reason]),
334
+		    {error, Reason}
335
+	    end;
336
+	{error, Reason} ->
337
+	    {error, Reason}
338
+    end.
339
+
340
+%% part of mysql_init/4
341
+greeting(Packet, LogFun) ->
342
+    <<Protocol:8, Rest/binary>> = Packet,
343
+    {Version, Rest2} = asciz(Rest),
344
+    <<_TreadID:32/little, Rest3/binary>> = Rest2,
345
+    {Salt, Rest4} = asciz(Rest3),
346
+    <<Caps:16/little, Rest5/binary>> = Rest4,
347
+    <<ServerChar:16/binary-unit:8, Rest6/binary>> = Rest5,
348
+    {Salt2, _Rest7} = asciz(Rest6),
349
+    mysql:log(LogFun, debug, "mysql_conn: greeting version ~p (protocol ~p) salt ~p caps ~p serverchar ~p salt2 ~p",
350
+	      [Version, Protocol, Salt, Caps, ServerChar, Salt2]),
351
+    {normalize_version(Version, LogFun), Salt, Salt2, Caps}.
352
+
353
+%% part of greeting/2
354
+asciz(Data) when binary(Data) ->
355
+    mysql:asciz_binary(Data, []);
356
+asciz(Data) when list(Data) ->
357
+    {String, [0 | Rest]} = lists:splitwith(fun (C) ->
358
+						   C /= 0
359
+					   end, Data),
360
+    {String, Rest}.
361
+
362
+%%--------------------------------------------------------------------
363
+%% Function: get_query_response(LogFun, RecvPid)
364
+%%           LogFun  = undefined | function() with arity 3
365
+%%           RecvPid = pid(), mysql_recv process
366
+%%           Version = integer(), Representing MySQL version used
367
+%% Descrip.: Wait for frames until we have a complete query response.
368
+%% Returns :   {data, #mysql_result}
369
+%%             {updated, #mysql_result}
370
+%%             {error, #mysql_result}
371
+%%           FieldInfo    = list() of term()
372
+%%           Rows         = list() of [string()]
373
+%%           AffectedRows = int()
374
+%%           Reason       = term()
375
+%%--------------------------------------------------------------------
376
+get_query_response(LogFun, RecvPid, Version) ->
377
+    case do_recv(LogFun, RecvPid, undefined) of
378
+	{ok, <<Fieldcount:8, Rest/binary>>, _} ->
379
+	    case Fieldcount of
380
+		0 ->
381
+		    %% No Tabular data
382
+		    <<AffectedRows:8, _Rest2/binary>> = Rest,
383
+		    {updated, #mysql_result{affectedrows=AffectedRows}};
384
+		255 ->
385
+		    <<_Code:16/little, Message/binary>>  = Rest,
386
+		    {error, #mysql_result{error=binary_to_list(Message)}};
387
+		_ ->
388
+		    %% Tabular data received
389
+		    case get_fields(LogFun, RecvPid, [], Version) of
390
+			{ok, Fields} ->
391
+			    case get_rows(Fieldcount, LogFun, RecvPid, []) of
392
+				{ok, Rows} ->
393
+				    {data, #mysql_result{fieldinfo=Fields, rows=Rows}};
394
+				{error, Reason} ->
395
+				    {error, #mysql_result{error=Reason}}
396
+			    end;
397
+			{error, Reason} ->
398
+			    {error, #mysql_result{error=Reason}}
399
+		    end
400
+	    end;
401
+	{error, Reason} ->
402
+	    {error, #mysql_result{error=Reason}}
403
+    end.
404
+
405
+%%--------------------------------------------------------------------
406
+%% Function: get_fields(LogFun, RecvPid, [], Version)
407
+%%           LogFun  = undefined | function() with arity 3
408
+%%           RecvPid = pid(), mysql_recv process
409
+%%           Version = integer(), Representing MySQL version used
410
+%% Descrip.: Received and decode field information.
411
+%% Returns : {ok, FieldInfo} |
412
+%%           {error, Reason}
413
+%%           FieldInfo = list() of term()
414
+%%           Reason    = term()
415
+%%--------------------------------------------------------------------
416
+%% Support for MySQL 4.0.x:
417
+get_fields(LogFun, RecvPid, Res, ?MYSQL_4_0) ->
418
+    case do_recv(LogFun, RecvPid, undefined) of
419
+	{ok, Packet, _Num} ->
420
+	    case Packet of
421
+		<<254:8>> ->
422
+		    {ok, lists:reverse(Res)};
423
+		<<254:8, Rest/binary>> when size(Rest) < 8 ->
424
+		    {ok, lists:reverse(Res)};
425
+		_ ->
426
+		    {Table, Rest} = get_with_length(Packet),
427
+		    {Field, Rest2} = get_with_length(Rest),
428
+		    {LengthB, Rest3} = get_with_length(Rest2),
429
+		    LengthL = size(LengthB) * 8,
430
+		    <<Length:LengthL/little>> = LengthB,
431
+		    {Type, Rest4} = get_with_length(Rest3),
432
+		    {_Flags, _Rest5} = get_with_length(Rest4),
433
+		    This = {binary_to_list(Table),
434
+			    binary_to_list(Field),
435
+			    Length,
436
+			    %% TODO: Check on MySQL 4.0 if types are specified
437
+			    %%       using the same 4.1 formalism and could 
438
+			    %%       be expanded to atoms:
439
+			    binary_to_list(Type)},
440
+		    get_fields(LogFun, RecvPid, [This | Res], ?MYSQL_4_0)
441
+	    end;
442
+	{error, Reason} ->
443
+	    {error, Reason}
444
+    end;
445
+%% Support for MySQL 4.1.x and 5.x:
446
+get_fields(LogFun, RecvPid, Res, ?MYSQL_4_1) ->
447
+    case do_recv(LogFun, RecvPid, undefined) of
448
+	{ok, Packet, _Num} ->
449
+	    case Packet of
450
+		<<254:8>> ->
451
+		    {ok, lists:reverse(Res)};
452
+		<<254:8, Rest/binary>> when size(Rest) < 8 ->
453
+		    {ok, lists:reverse(Res)};
454
+		_ ->
455
+		    {_Catalog, Rest} = get_with_length(Packet),
456
+		    {_Database, Rest2} = get_with_length(Rest),
457
+		    {Table, Rest3} = get_with_length(Rest2),
458
+		    %% OrgTable is the real table name if Table is an alias
459
+		    {_OrgTable, Rest4} = get_with_length(Rest3),
460
+		    {Field, Rest5} = get_with_length(Rest4),
461
+		    %% OrgField is the real field name if Field is an alias
462
+		    {_OrgField, Rest6} = get_with_length(Rest5),
463
+
464
+		    <<_Metadata:8/little, _Charset:16/little,
465
+		     Length:32/little, Type:8/little,
466
+		     _Flags:16/little, _Decimals:8/little,
467
+		     _Rest7/binary>> = Rest6,
468
+		    
469
+		    This = {binary_to_list(Table),
470
+			    binary_to_list(Field),
471
+			    Length,
472
+			    get_field_datatype(Type)},
473
+		    get_fields(LogFun, RecvPid, [This | Res], ?MYSQL_4_1)
474
+	    end;
475
+	{error, Reason} ->
476
+	    {error, Reason}
477
+    end.
478
+
479
+%%--------------------------------------------------------------------
480
+%% Function: get_rows(N, LogFun, RecvPid, [])
481
+%%           N       = integer(), number of rows to get
482
+%%           LogFun  = undefined | function() with arity 3
483
+%%           RecvPid = pid(), mysql_recv process
484
+%% Descrip.: Receive and decode a number of rows.
485
+%% Returns : {ok, Rows} |
486
+%%           {error, Reason}
487
+%%           Rows = list() of [string()]
488
+%%--------------------------------------------------------------------
489
+get_rows(N, LogFun, RecvPid, Res) ->
490
+    case do_recv(LogFun, RecvPid, undefined) of
491
+	{ok, Packet, _Num} ->
492
+	    case Packet of
493
+		<<254:8, Rest/binary>> when size(Rest) < 8 ->
494
+		    {ok, lists:reverse(Res)};
495
+		_ ->
496
+		    {ok, This} = get_row(N, Packet, []),
497
+		    get_rows(N, LogFun, RecvPid, [This | Res])
498
+	    end;
499
+	{error, Reason} ->
500
+	    {error, Reason}
501
+    end.
502
+
503
+%% part of get_rows/4
504
+get_row(0, _Data, Res) ->
505
+    {ok, lists:reverse(Res)};
506
+get_row(N, Data, Res) ->
507
+    {Col, Rest} = get_with_length(Data),
508
+    This = case Col of
509
+	       null ->
510
+		   null;
511
+	       _ ->
512
+		   binary_to_list(Col)
513
+	   end,
514
+    get_row(N - 1, Rest, [This | Res]).
515
+
516
+get_with_length(<<251:8, Rest/binary>>) ->
517
+    {null, Rest};
518
+get_with_length(<<252:8, Length:16/little, Rest/binary>>) ->
519
+    split_binary(Rest, Length);
520
+get_with_length(<<253:8, Length:24/little, Rest/binary>>) ->
521
+    split_binary(Rest, Length);
522
+get_with_length(<<254:8, Length:64/little, Rest/binary>>) ->
523
+    split_binary(Rest, Length);
524
+get_with_length(<<Length:8, Rest/binary>>) when Length < 251 ->
525
+    split_binary(Rest, Length).
526
+
527
+%%--------------------------------------------------------------------
528
+%% Function: do_query(State, Query)
529
+%%           do_query(Sock, RecvPid, LogFun, Query)
530
+%%           Sock    = term(), gen_tcp socket
531
+%%           RecvPid = pid(), mysql_recv process
532
+%%           LogFun  = undefined | function() with arity 3
533
+%%           Query   = string()
534
+%% Descrip.: Send a MySQL query and block awaiting it's response.
535
+%% Returns : result of get_query_response/2 | {error, Reason}
536
+%%--------------------------------------------------------------------
537
+do_query(State, Query) when is_record(State, state) ->
538
+    do_query(State#state.socket,
539
+	     State#state.recv_pid,
540
+	     State#state.log_fun,
541
+	     Query,
542
+	     State#state.mysql_version
543
+	    ).
544
+
545
+do_query(Sock, RecvPid, LogFun, Query, Version) when is_pid(RecvPid),
546
+						     is_list(Query) ->
547
+    Packet = list_to_binary([?MYSQL_QUERY_OP, Query]),
548
+    case do_send(Sock, Packet, 0, LogFun) of
549
+	ok ->
550
+	    get_query_response(LogFun, RecvPid, Version);
551
+	{error, Reason} ->
552
+	    Msg = io_lib:format("Failed sending data on socket : ~p", [Reason]),
553
+	    {error, Msg}
554
+    end.
555
+
556
+%%--------------------------------------------------------------------
557
+%% Function: do_send(Sock, Packet, SeqNum, LogFun)
558
+%%           Sock   = term(), gen_tcp socket
559
+%%           Packet = binary()
560
+%%           SeqNum = integer(), packet sequence number
561
+%%           LogFun = undefined | function() with arity 3
562
+%% Descrip.: Send a packet to the MySQL server.
563
+%% Returns : result of gen_tcp:send/2
564
+%%--------------------------------------------------------------------
565
+do_send(Sock, Packet, SeqNum, _LogFun) when is_binary(Packet), is_integer(SeqNum) ->
566
+    Data = <<(size(Packet)):24/little, SeqNum:8, Packet/binary>>,
567
+    %%mysql:log(LogFun, debug, "mysql_conn: send packet ~p: ~p", [SeqNum, Data]),
568
+    gen_tcp:send(Sock, Data).
569
+
570
+%%--------------------------------------------------------------------
571
+%% Function: normalize_version(Version, LogFun)
572
+%%           Version  = string()
573
+%%           LogFun   = undefined | function() with arity 3
574
+%% Descrip.: Return a flag corresponding to the MySQL version used.
575
+%%           The protocol used depends on this flag.
576
+%% Returns : Version = string()
577
+%%--------------------------------------------------------------------
578
+normalize_version([$4,$.,$0|_T], LogFun) ->
579
+    mysql:log(LogFun, debug, "Switching to MySQL 4.0.x protocol.~n"),
580
+    ?MYSQL_4_0;
581
+normalize_version([$4,$.,$1|_T], _LogFun) ->
582
+    ?MYSQL_4_1;
583
+normalize_version([$5|_T], _LogFun) ->
584
+    %% MySQL version 5.x protocol is compliant with MySQL 4.1.x:
585
+    ?MYSQL_4_1; 
586
+normalize_version(_Other, LogFun) ->
587
+    mysql:log(LogFun, error, "MySQL version not supported: MySQL Erlang module might not work correctly.~n"),
588
+    %% Error, but trying the oldest protocol anyway:
589
+    ?MYSQL_4_0.
590
+
591
+%%--------------------------------------------------------------------
592
+%% Function: get_field_datatype(DataType)
593
+%%           DataType = integer(), MySQL datatype
594
+%% Descrip.: Return MySQL field datatype as description string
595
+%% Returns : String, MySQL datatype
596
+%%--------------------------------------------------------------------
597
+get_field_datatype(0) ->   'DECIMAL';
598
+get_field_datatype(1) ->   'TINY';
599
+get_field_datatype(2) ->   'SHORT';
600
+get_field_datatype(3) ->   'LONG';
601
+get_field_datatype(4) ->   'FLOAT';
602
+get_field_datatype(5) ->   'DOUBLE';
603
+get_field_datatype(6) ->   'NULL';
604
+get_field_datatype(7) ->   'TIMESTAMP';
605
+get_field_datatype(8) ->   'LONGLONG';
606
+get_field_datatype(9) ->   'INT24';
607
+get_field_datatype(10) ->  'DATE';
608
+get_field_datatype(11) ->  'TIME';
609
+get_field_datatype(12) ->  'DATETIME';
610
+get_field_datatype(13) ->  'YEAR';
611
+get_field_datatype(14) ->  'NEWDATE';
612
+get_field_datatype(247) -> 'ENUM';
613
+get_field_datatype(248) -> 'SET';
614
+get_field_datatype(249) -> 'TINYBLOB';
615
+get_field_datatype(250) -> 'MEDIUM_BLOG';
616
+get_field_datatype(251) -> 'LONG_BLOG';
617
+get_field_datatype(252) -> 'BLOB';
618
+get_field_datatype(253) -> 'VAR_STRING';
619
+get_field_datatype(254) -> 'STRING';
620
+get_field_datatype(255) -> 'GEOMETRY'.
... ...
@@ -0,0 +1,161 @@
1
+%%%-------------------------------------------------------------------
2
+%%% File    : mysql_recv.erl
3
+%%% Author  : Fredrik Thulin <ft@it.su.se>
4
+%%% Descrip.: Handles data being received on a MySQL socket. Decodes
5
+%%%           per-row framing and sends each row to parent.
6
+%%%
7
+%%% Created :  4 Aug 2005 by Fredrik Thulin <ft@it.su.se>
8
+%%%
9
+%%% Note    : All MySQL code was written by Magnus Ahltorp, originally
10
+%%%           in the file mysql.erl - I just moved it here.
11
+%%%
12
+%%% Copyright (c) 2001-2004 Kungliga Tekniska H�gskolan
13
+%%% See the file COPYING
14
+%%%
15
+%%%           Signals this receiver process can send to it's parent
16
+%%%             (the parent is a mysql_conn connection handler) :
17
+%%%
18
+%%%             {mysql_recv, self(), data, Packet, Num}
19
+%%%             {mysql_recv, self(), closed, {error, Reason}}
20
+%%%             {mysql_recv, self(), closed, normal}
21
+%%%
22
+%%%           Internally (from inside init/4 to start_link/4) the
23
+%%%           following signals may be sent to the parent process :
24
+%%%
25
+%%%             {mysql_recv, self(), init, {ok, Sock}}
26
+%%%             {mysql_recv, self(), init, {error, E}}
27
+%%%
28
+%%%-------------------------------------------------------------------
29
+-module(mysql_recv).
30
+
31
+%%--------------------------------------------------------------------
32
+%% External exports (should only be used by the 'mysql_conn' module)
33
+%%--------------------------------------------------------------------
34
+-export([start_link/4
35
+	]).
36
+
37
+-record(state, {
38
+	  socket,
39
+	  parent,
40
+	  log_fun,
41
+	  data
42
+	 }).
43
+
44
+-define(SECURE_CONNECTION, 32768).
45
+-define(CONNECT_TIMEOUT, 5000).
46
+
47
+%%====================================================================
48
+%% External functions
49
+%%====================================================================
50
+
51
+%%--------------------------------------------------------------------
52
+%% Function: start_link(Host, Port, LogFun, Parent)
53
+%%           Host = string()
54
+%%           Port = integer()
55
+%%           LogFun = undefined | function() of arity 3
56
+%%           Parent = pid(), process that should get received frames
57
+%% Descrip.: Start a process that connects to Host:Port and waits for
58
+%%           data. When it has received a MySQL frame, it sends it to
59
+%%           Parent and waits for the next frame.
60
+%% Returns : {ok, RecvPid, Socket} |
61
+%%           {error, Reason}
62
+%%           RecvPid = pid(), receiver process pid
63
+%%           Socket  = term(), gen_tcp socket
64
+%%           Reason  = atom() | string()
65
+%%--------------------------------------------------------------------
66
+start_link(Host, Port, LogFun, Parent) when is_list(Host), is_integer(Port) ->
67
+    RecvPid =
68
+	spawn_link(fun () ->
69
+			   init(Host, Port, LogFun, Parent)
70
+		   end),
71
+    %% wait for the socket from the spawned pid
72
+    receive
73
+	{mysql_recv, RecvPid, init, {error, E}} ->
74
+	    {error, E};
75
+	{mysql_recv, RecvPid, init, {ok, Socket}} ->
76
+	    {ok, RecvPid, Socket}
77
+    after ?CONNECT_TIMEOUT ->
78
+	    catch exit(RecvPid, kill),
79
+	    {error, "timeout"}
80
+    end.
81
+
82
+
83
+
84
+%%====================================================================
85
+%% Internal functions
86
+%%====================================================================
87
+
88
+%%--------------------------------------------------------------------
89
+%% Function: init((Host, Port, LogFun, Parent)
90
+%%           Host = string()
91
+%%           Port = integer()
92
+%%           LogFun = undefined | function() of arity 3
93
+%%           Parent = pid(), process that should get received frames
94
+%% Descrip.: Connect to Host:Port and then enter receive-loop.
95
+%% Returns : error | never returns
96
+%%--------------------------------------------------------------------
97
+init(Host, Port, LogFun, Parent) ->
98
+    case gen_tcp:connect(Host, Port, [binary, {packet, 0}]) of
99
+	{ok, Sock} ->
100
+	    Parent ! {mysql_recv, self(), init, {ok, Sock}},
101
+	    State = #state{socket  = Sock,
102
+			   parent  = Parent,
103
+			   log_fun = LogFun,
104
+			   data    = <<>>
105
+			  },
106
+	    loop(State);
107
+	E ->
108
+	    mysql:log(LogFun, error, "mysql_recv: Failed connecting to ~p:~p : ~p",
109
+		      [Host, Port, E]),
110
+	    Msg = lists:flatten(io_lib:format("connect failed : ~p", [E])),
111
+	    Parent ! {mysql_recv, self(), init, {error, Msg}}
112
+    end.
113
+
114
+%%--------------------------------------------------------------------
115
+%% Function: loop(State)
116
+%%           State = state record()
117
+%% Descrip.: The main loop. Wait for data from our TCP socket and act
118
+%%           on received data or signals that our socket was closed.
119
+%% Returns : error | never returns
120
+%%--------------------------------------------------------------------
121
+loop(State) ->
122
+    Sock = State#state.socket,
123
+    receive
124
+	{tcp, Sock, InData} ->
125
+	    NewData = list_to_binary([State#state.data, InData]),
126
+	    %% send data to parent if we have enough data
127
+	    Rest = sendpacket(State#state.parent, NewData),
128
+	    loop(State#state{data = Rest});
129
+	{tcp_error, Sock, Reason} ->
130
+	    mysql:log(State#state.log_fun, error, "mysql_recv: Socket ~p closed : ~p", [Sock, Reason]),
131
+	    State#state.parent ! {mysql_recv, self(), closed, {error, Reason}},
132
+	    error;
133
+	{tcp_closed, Sock} ->
134
+	    mysql:log(State#state.log_fun, debug, "mysql_recv: Socket ~p closed", [Sock]),
135
+	    State#state.parent ! {mysql_recv, self(), closed, normal},
136
+	    error
137
+    end.
138
+
139
+%%--------------------------------------------------------------------
140
+%% Function: sendpacket(Parent, Data)
141
+%%           Parent = pid()
142
+%%           Data   = binary()
143
+%% Descrip.: Check if we have received one or more complete frames by
144
+%%           now, and if so - send them to Parent.
145
+%% Returns : Rest = binary()
146
+%%--------------------------------------------------------------------
147
+%% send data to parent if we have enough data
148
+sendpacket(Parent, Data) ->
149
+    case Data of
150
+	<<Length:24/little, Num:8, D/binary>> ->
151
+	    if
152
+		Length =< size(D) ->
153
+		    {Packet, Rest} = split_binary(D, Length),
154
+		    Parent ! {mysql_recv, self(), data, Packet, Num},
155
+		    sendpacket(Parent, Rest);
156
+		true ->
157
+		    Data
158
+	    end;
159
+	_ ->
160
+	    Data
161
+    end.
... ...
@@ -0,0 +1,38 @@
1
+# Copyright 2004-2006 BreakMyGentoo.net
2
+# Distributed under the terms of the GNU General Public License v2
3
+# $Header: $
4
+
5
+inherit multilib
6
+
7
+DESCRIPTION="Native MySQL driver for OTP/erlang"
8
+HOMEPAGE="http://process-one.net"
9
+SRC_URI=""
10
+
11
+LICENSE=""
12
+SLOT="0"
13
+KEYWORDS="~amd64"
14
+IUSE=""
15
+
16
+DEPEND="dev-lang/erlang"
17
+RDEPEND="${DEPEND}"
18
+S=${WORKDIR}/${P}/
19
+
20
+src_unpack() {
21
+	cp -r ${FILESDIR}/${P} ${WORKDIR}
22
+}
23
+
24
+src_compile() {
25
+	find -name "*.erl" -exec erlc {} \;
26
+}
27
+
28
+src_install() {
29
+	local ERL_LIBDIR=/usr/$(get_libdir)/erlang/lib
30
+	
31
+	dodir ${ERL_LIBDIR}/${P}/ebin
32
+	insinto ${ERL_LIBDIR}/${P}/ebin
33
+	doins *.beam
34
+
35
+	dodir ${ERL_LIBDIR}/${P}/src
36
+	insinto ${ERL_LIBDIR}/${P}/src
37
+	doins *.erl
38
+}
... ...
@@ -0,0 +1,7 @@
1
+# ChangeLog for dev-erl/pgsql-cvs
2
+# Copyright 2005-2006 BreakMyGentoo.net; Distributed under the GPL v2
3
+# $Header: $
4
+
5
+  07 May 2006; Lars Strojny <lars@strojny.net> ChangeLog:
6
+  Initial commit. Dependency for ejabberd 1.1
7
+
... ...
@@ -0,0 +1,11 @@
1
+EBUILD pgsql-cvs-0.0.1.ebuild 690 RMD160 adca1732f0f237192eae192df17f21fd5f27c213 SHA1 f4cd634fda616caa8d1b8e6021e35959a59b8da4 SHA256 6e342262de7dbf75c07c897d7031f11098d1ef7c8c017240f81899080d9b0852 size 690
2
+MD5 308813550b9bb2ac741b468c2899f502 pgsql-cvs-0.0.1.ebuild 690
3
+RMD160 adca1732f0f237192eae192df17f21fd5f27c213 pgsql-cvs-0.0.1.ebuild 690
4
+SHA256 6e342262de7dbf75c07c897d7031f11098d1ef7c8c017240f81899080d9b0852 pgsql-cvs-0.0.1.ebuild 690
5
+MISC ChangeLog 223 RMD160 548f88c0c4d5d1d80f74d02104ee96871a553262 SHA1 743b94fb38da15da1539cbfd096b507605a18ed6 SHA256 29f2090aca255d2fc7e1b31306ec4ae0da1dea08e80e8b655405e153b9022c02 size 223
6
+MD5 2cecc13ec6e75725a01600e3a06040f0 ChangeLog 223
7
+RMD160 548f88c0c4d5d1d80f74d02104ee96871a553262 ChangeLog 223
8
+SHA256 29f2090aca255d2fc7e1b31306ec4ae0da1dea08e80e8b655405e153b9022c02 ChangeLog 223
9
+MD5 68b329da9893e34099c7d8ad5cb9c940 files/digest-pgsql-cvs-0.0.1 1
10
+RMD160 c0da025038ed83c687ddc430da9846ecb97f3998 files/digest-pgsql-cvs-0.0.1 1
11
+SHA256 01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b files/digest-pgsql-cvs-0.0.1 1
... ...
@@ -0,0 +1,41 @@
1
+# Copyright 1999-2006 Gentoo Foundation
2
+# Distributed under the terms of the GNU General Public License v2
3
+# $Header: $
4
+
5
+inherit cvs
6
+
7
+MY_PN=${PN/-cvs/}
8
+MY_P=${MY_PN}-${PV}
9
+
10
+ECVS_SERVER=cvs.sourceforge.net:/cvsroot/jungerl
11
+ECVS_MODULE=jungerl/lib/${MY_PN}
12
+
13
+DESCRIPTION="PostgreSQL driver for OTP/erlang"
14
+HOMEPAGE=""
15
+SRC_URI=""
16
+
17
+LICENSE=""
18
+SLOT="0"
19
+KEYWORDS="~amd64"
20
+IUSE=""
21
+
22
+DEPEND=""
23
+RDEPEND=""
24
+
25
+S=${WORKDIR}/jungerl/lib/${MY_PN}/src
26
+
27
+src_compile() {
28
+	find -name "*.erl" -exec erlc {} \;
29
+}
30
+
31
+src_install() {
32
+	local E_LIBDIR=/usr/$(get_libdir)/erlang/lib/${MY_P}
33
+
34
+	dodir ${E_LIBDIR}/src
35
+	insinto ${E_LIBDIR}/src
36
+	doins *.erl
37
+
38
+	dodir ${E_LIBDIR}/ebin
39
+	insinto ${E_LIBDIR}/ebin
40
+	doins *.beam
41
+}
... ...
@@ -0,0 +1,144 @@
1
+# ChangeLog for dev-lang/erlang
2
+# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2
3
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/erlang/ChangeLog,v 1.30 2006/05/27 04:27:43 mkennedy Exp $
4
+
5
+*erlang-11.2.0 (27 May 2006)
6
+
7
+  27 May 2006; Matthew Kennedy <mkennedy@gentoo.org> +erlang-11.2.0.ebuild:
8
+  New upstream version.
9
+
10
+*erlang-10.2.10 (10 Apr 2006)
11
+
12
+  10 Apr 2006; Matthew Kennedy <mkennedy@gentoo.org>
13
+  +files/glibc-2.4-fix.patch, +erlang-10.2.10.ebuild:
14
+  Include GLIBC 2.4 build fix; Resolves Bug #122383; Please see
15
+  http://www.erlang.org/ml-archive/erlang-questions/200601/msg00500.html for
16
+  more information on the GLIBC build fix.
17
+
18
+  07 Mar 2006; Mike Frysinger <vapier@gentoo.org> erlang-8b.ebuild,
19
+  erlang-9c.ebuild, erlang-9c-r1.ebuild, erlang-9c-r2.ebuild,
20
+  erlang-9c-r3.ebuild, erlang-10.2.0.ebuild, erlang-10.2.5.ebuild,
21
+  erlang-10.2.6.ebuild, erlang-10.2.7.ebuild:
22
+  Add support for modular X #121067.
23
+
24
+  28 Jan 2006; Simon Stelling <blubb@gentoo.org> +files/erlang-9c.patch,
25
+  -files/erlang-9c.patch.gz, erlang-9c-r1.ebuild:
26
+  no need to gzip smallish patches
27
+
28
+  03 Dec 2005; Fernando J. Pereda <ferdy@gentoo.org> erlang-10.2.7.ebuild:
29
+  marked ~alpha wrt bug #91132
30
+
31
+*erlang-10.2.7 (29 Oct 2005)
32
+
33
+  29 Oct 2005; Matthew Kennedy <mkennedy@gentoo.org>
34
+  +files/erlang-10.2.7-export-TARGET.patch,
35
+  +files/10.2.7-manpage-emacs-gentoo.patch, +erlang-10.2.7.ebuild:
36
+  New upstream version; Added epoll support and condition support for
37
+  dev-lang/tk via X USE flag; Resolves Bug #106208.
38
+
39
+  05 Sep 2005; Jason Wever <weeve@gentoo.org> erlang-10.2.5.ebuild:
40
+  Stable on SPARC.
41
+
42
+  03 Sep 2005; Michael Hanselmann <hansmi@gentoo.org> erlang-10.2.5.ebuild:
43
+  Stable on ppc.
44
+
45
+*erlang-10.2.5 (24 Aug 2005)
46
+
47
+  24 Aug 2005; Mike Frysinger <vapier@gentoo.org> +erlang-10.2.5.ebuild:
48
+  Add a version which works with wings #97798.
49
+
50
+  18 Jul 2005; Matthew Kennedy <mkennedy@gentoo.org>
51
+  +files/10.2.6-manpage-emacs-gentoo.patch, files/50erlang-gentoo.el,
52
+  metadata.xml, erlang-10.2.6.ebuild:
53
+  Added Emacs Herd to metadata.xml.
54
+
55
+  18 Jul 2005; Matthew Kennedy <mkennedy@gentoo.org>
56
+  +files/10.2.6-manpage-emacs-gentoo.patch, files/50erlang-gentoo.el,
57
+  erlang-10.2.6.ebuild:
58
+  Support man-page documentation in Emacs erlang-mode; Install Erlang
59
+  man-pages and HTML documentation via "doc" USE flag; Add missing
60
+  dependencies for Java and ODBC support via "odbc" and "java" USE flags;
61
+  Rename Erlang man-pages with "erl" suffix to avoid namespace collision; New
62
+  upstream version.
63
+
64
+*erlang-10.2.6 (02 Jul 2005)
65
+
66
+  02 Jul 2005; Mike Frysinger <vapier@gentoo.org> +erlang-10.2.6.ebuild:
67
+  Version bump.
68
+
69
+  02 Jul 2005; Mike Frysinger <vapier@gentoo.org>
70
+  +files/erlang-10.2.6-export-TARGET.patch, erlang-10.2.0.ebuild:
71
+  Fix host detection #94090 by Matthew Kennedy.
72
+
73
+  30 May 2005; Sven Wegener <swegener@gentoo.org> erlang-9c-r2.ebuild,
74
+  erlang-9c-r3.ebuild, erlang-10.2.0.ebuild:
75
+  Moved from gcc.eclass to toolchain-funcs.eclass, bug #92745.
76
+
77
+  21 Apr 2005; Herbie Hopkins <herbs@gentoo.org> erlang-10.2.0.ebuild:
78
+  Small multilib issue, fixes bug #89938
79
+
80
+  20 Mar 2005; Matthew Kennedy <mkennedy@gentoo.org>
81
+  +files/50erlang-gentoo.el, erlang-10.2.0.ebuild:
82
+  USE support for "emacs"; Resolves Bug #78557
83
+
84
+*erlang-10.2.0 (07 Oct 2004)
85
+
86
+  07 Oct 2004; George Shapovalov <george@gentoo.org> erlang-10.2.0.ebuild :
87
+  new version out, adjusted versioning scheme as was previously discussed 
88
+  (retaining 1st number, then letters A->1, B->2, ... and adding the "revision")
89
+  thus this corresponds to R10B-0
90
+  also adjusted openssl dependency to point to >=0.9.7d
91
+
92
+*erlang-9c-r3 (02 Aug 2004)
93
+
94
+  02 Aug 2004; George Shapovalov <george@gentoo.org> erlang-9c-r3.ebuild :
95
+  fixed some stray ${D}'s in wrappers (#58901), added support for ~amd64
96
+
97
+  30 Mar 2004; Donnie Berkholz <spyderous@gentoo.org>; erlang-8b.ebuild,
98
+  erlang-9c-r1.ebuild, erlang-9c-r2.ebuild, erlang-9c.ebuild:
99
+  Change x11-base/xfree dependency to virtual/x11.
100
+
101
+*erlang-9c-r2 (21 Feb 2004)
102
+
103
+  21 Feb 2004; Mike Frysinger <vapier@gentoo.org> :
104
+  Version bump #26420.
105
+
106
+*erlang-9c-r1 (01 Jul 2003)
107
+
108
+  28 Jul 2003; Mike Frysinger <vapier@gentoo.org> :
109
+  Added 'addpredict' to /dev/pts to fix issues w/emerging in XTerm #25366.
110
+
111
+  03 Jul 2003; George Shapovalov <george@gentoo.org> erlang-9c-r1.ebuild :
112
+  incorporated fix for weird install on some systems from #20625
113
+  Thanks to Claes Wikstrom <klacke@hyber.org> for the patch
114
+
115
+  01 Jul 2003; George Shapovalov <george@gentoo.org> erlang-9c-r1.ebuild :
116
+  incorporated patch to make erlang read nsswitch.conf in 
117
+  addition to host.conf (#22836)
118
+  Thanks to Claes Wikstrom <klacke@hyber.org> for the patch
119
+
120
+*erlang-9c (09 May 2003)
121
+
122
+  19 Jun 2003; Mike Frysinger <vapier@gentoo.org> :
123
+  Cleaned up and made the ebuild more 'portage' like ... changed sed cmds to dosed
124
+
125
+  09 May 2003; George Shapovalov <george@gentoo.org> erlang-9c.ebuild :
126
+  new version (#20625), original versio n is R9B-1, 9c seems to be the only approximation
127
+  that works and is considered newer by portage
128
+  (anyway, 'B' seems to be invariant in upstream naming scheme)
129
+  Thanks to Claes Wikstrom <klacke@hyber.org> for an update.
130
+
131
+*erlang-9b (07 Jan 2003)
132
+
133
+  07 Jan 2003; George Shapovalov <george@gentoo.org> erlang-8b.ebuild, erlang-9b.ebuild :
134
+  new version,
135
+  cleaned up erlang-8b.ebuild and added IUSE
136
+ 
137
+*erlang-8b (01 Nov 2002)
138
+
139
+  19 Jun 2003; Mike Frysinger <vapier@gentoo.org> :
140
+  Cleaned up and made the ebuild more 'portage' like ... changed sed cmds to dosed
141
+
142
+  01 Nov 2002; George Shapovalov <george@gentoo.org> erlang-8b.ebuild :
143
+  Erlang is a programming language, runtime environment and a large collection of
144
+  libraries.  Ebuild submitted by Charlie Mac <charzilla@yahoo.com>
... ...
@@ -0,0 +1,174 @@
1
+AUX 10.2.6-manpage-emacs-gentoo.patch 1348 RMD160 9b71f1253a400a8a8e99db0a1761d10a40e19e7a SHA1 c02e5a195ae42de5e26547e8f9ba13c5bf198b8b SHA256 3c8981e860600447c077a090fbafb2467fbf9da6e15f43825c7f2e9b8702adbb
2
+MD5 34433096e1c6e84b5dbb4a50a4e3c2e8 files/10.2.6-manpage-emacs-gentoo.patch 1348
3
+RMD160 9b71f1253a400a8a8e99db0a1761d10a40e19e7a files/10.2.6-manpage-emacs-gentoo.patch 1348
4
+SHA256 3c8981e860600447c077a090fbafb2467fbf9da6e15f43825c7f2e9b8702adbb files/10.2.6-manpage-emacs-gentoo.patch 1348
5
+AUX 10.2.7-manpage-emacs-gentoo.patch 1348 RMD160 9b71f1253a400a8a8e99db0a1761d10a40e19e7a SHA1 c02e5a195ae42de5e26547e8f9ba13c5bf198b8b SHA256 3c8981e860600447c077a090fbafb2467fbf9da6e15f43825c7f2e9b8702adbb
6
+MD5 34433096e1c6e84b5dbb4a50a4e3c2e8 files/10.2.7-manpage-emacs-gentoo.patch 1348
7
+RMD160 9b71f1253a400a8a8e99db0a1761d10a40e19e7a files/10.2.7-manpage-emacs-gentoo.patch 1348
8
+SHA256 3c8981e860600447c077a090fbafb2467fbf9da6e15f43825c7f2e9b8702adbb files/10.2.7-manpage-emacs-gentoo.patch 1348
9
+AUX 50erlang-gentoo.el 140 RMD160 fd086fc5e1c15e5c8753315cf0a2759e8f3cc666 SHA1 1c63a3fe5e4c348c9357ab1089c067f335488312 SHA256 2f494178e3e64af141398b4deac5d7f148b47d3cbc1cd8ec083229092f4aa3df
10
+MD5 28397dc6ef4a633a8084ce44fbb1c6f3 files/50erlang-gentoo.el 140
11
+RMD160 fd086fc5e1c15e5c8753315cf0a2759e8f3cc666 files/50erlang-gentoo.el 140
12
+SHA256 2f494178e3e64af141398b4deac5d7f148b47d3cbc1cd8ec083229092f4aa3df files/50erlang-gentoo.el 140
13
+AUX 9c.patch 2005 RMD160 be4d3dd5ea72f653d95c517dfdf9275263b009d2 SHA1 6fb3de09cf5293fa449e5e7662eb1bdb45271c9b SHA256 634f9ef95cae47ab27f464802bbc144606ff6e24d318da0cb1276ada5568fd78
14
+MD5 e61c0249e23b7e44ef3629ea5dc5997a files/9c.patch 2005
15
+RMD160 be4d3dd5ea72f653d95c517dfdf9275263b009d2 files/9c.patch 2005
16
+SHA256 634f9ef95cae47ab27f464802bbc144606ff6e24d318da0cb1276ada5568fd78 files/9c.patch 2005
17
+AUX erlang-10.2.6-export-TARGET.patch 242 RMD160 5f8443e482920358c6c13f85b1c554977bfcc950 SHA1 5c1b5d3c0ab48e7845eceba5ac99944847304962 SHA256 8e8ae39cb84c3196fbb773275f0aaaf68fb07fade632682f1866d2185b4dd54b
18
+MD5 b1f610dc1caa7c176d7da4919bcabba9 files/erlang-10.2.6-export-TARGET.patch 242
19
+RMD160 5f8443e482920358c6c13f85b1c554977bfcc950 files/erlang-10.2.6-export-TARGET.patch 242
20
+SHA256 8e8ae39cb84c3196fbb773275f0aaaf68fb07fade632682f1866d2185b4dd54b files/erlang-10.2.6-export-TARGET.patch 242
21
+AUX erlang-10.2.7-export-TARGET.patch 242 RMD160 5f8443e482920358c6c13f85b1c554977bfcc950 SHA1 5c1b5d3c0ab48e7845eceba5ac99944847304962 SHA256 8e8ae39cb84c3196fbb773275f0aaaf68fb07fade632682f1866d2185b4dd54b
22
+MD5 b1f610dc1caa7c176d7da4919bcabba9 files/erlang-10.2.7-export-TARGET.patch 242
23
+RMD160 5f8443e482920358c6c13f85b1c554977bfcc950 files/erlang-10.2.7-export-TARGET.patch 242
24
+SHA256 8e8ae39cb84c3196fbb773275f0aaaf68fb07fade632682f1866d2185b4dd54b files/erlang-10.2.7-export-TARGET.patch 242
25
+AUX erlang-11.2.1-epoll.patch 15000 RMD160 6cbc83d781d108a328cd27d2f86d57fbc5396e54 SHA1 6900220b1c1a570753ec1aa4885e62157284b9da SHA256 969a8d741ab616c1d2e802c165761f2c0ef63cf9af1cab4e83c1594040458a3b
26
+MD5 d104d725d289fc6fc7c1e0e78b7c9bb5 files/erlang-11.2.1-epoll.patch 15000
27
+RMD160 6cbc83d781d108a328cd27d2f86d57fbc5396e54 files/erlang-11.2.1-epoll.patch 15000
28
+SHA256 969a8d741ab616c1d2e802c165761f2c0ef63cf9af1cab4e83c1594040458a3b files/erlang-11.2.1-epoll.patch 15000
29
+AUX erlang-11.2.2-epoll.patch 15000 RMD160 6cbc83d781d108a328cd27d2f86d57fbc5396e54 SHA1 6900220b1c1a570753ec1aa4885e62157284b9da SHA256 969a8d741ab616c1d2e802c165761f2c0ef63cf9af1cab4e83c1594040458a3b
30
+MD5 d104d725d289fc6fc7c1e0e78b7c9bb5 files/erlang-11.2.2-epoll.patch 15000
31
+RMD160 6cbc83d781d108a328cd27d2f86d57fbc5396e54 files/erlang-11.2.2-epoll.patch 15000
32
+SHA256 969a8d741ab616c1d2e802c165761f2c0ef63cf9af1cab4e83c1594040458a3b files/erlang-11.2.2-epoll.patch 15000
33
+AUX erlang-9c.patch 4868 RMD160 7655db2531fdeb393ba34e608cd0eaa4a78da9b5 SHA1 30c81ecd5353f0476fce40bc2d7b01a21b5162da SHA256 8224e0f7d8252e12cf26b545d5f1d32002e2335190a6e038fa06e0d6569fd2df
34
+MD5 162a0f246dd57cae2c3a6908d8446944 files/erlang-9c.patch 4868
35
+RMD160 7655db2531fdeb393ba34e608cd0eaa4a78da9b5 files/erlang-9c.patch 4868
36
+SHA256 8224e0f7d8252e12cf26b545d5f1d32002e2335190a6e038fa06e0d6569fd2df files/erlang-9c.patch 4868
37
+AUX glibc-2.4-fix.patch 452 RMD160 af22ca793fe2f0d025c1eafa75547e4b7093f24c SHA1 a9615310895912a7be3acad23169455fea9e9bcd SHA256 c9d20e483847f580848c75c0d7464af5afce641dba75383b2f3adf6a10b6094b
38
+MD5 734a6808d937b508338553b3ac819cd3 files/glibc-2.4-fix.patch 452
39
+RMD160 af22ca793fe2f0d025c1eafa75547e4b7093f24c files/glibc-2.4-fix.patch 452
40
+SHA256 c9d20e483847f580848c75c0d7464af5afce641dba75383b2f3adf6a10b6094b files/glibc-2.4-fix.patch 452
41
+AUX otp_src_R10B-10_epoll.patch 14980 RMD160 a57b6f4f740b0110fb5560745cd2ea06b7dcd42e SHA1 e33d712fde0ebd5219c260c72faaf4fba4a7eacf SHA256 31575efd5a91bd2a97178e4f2c15e6ae248e96b327d2b6b9c9847229a2e52e62
42
+MD5 c93c2f99b47f2289eee32fe186796fc1 files/otp_src_R10B-10_epoll.patch 14980
43
+RMD160 a57b6f4f740b0110fb5560745cd2ea06b7dcd42e files/otp_src_R10B-10_epoll.patch 14980
44
+SHA256 31575efd5a91bd2a97178e4f2c15e6ae248e96b327d2b6b9c9847229a2e52e62 files/otp_src_R10B-10_epoll.patch 14980
45
+AUX supervisor-dict.patch 3094 RMD160 9f078cc94e2f8f0d216c71543135db98cab33161 SHA1 4417b09d5cf421866216295311b8f98f51de49c3 SHA256 ad1c26ff1012dae094c3f2be0094d71400ebe779e71a6986c066f7be9afd874d
46
+MD5 a914a94dd3897731221c703f5b645293 files/supervisor-dict.patch 3094
47
+RMD160 9f078cc94e2f8f0d216c71543135db98cab33161 files/supervisor-dict.patch 3094
48
+SHA256 ad1c26ff1012dae094c3f2be0094d71400ebe779e71a6986c066f7be9afd874d files/supervisor-dict.patch 3094
49
+DIST otp_doc_html_R10B-10.tar.gz 4655081 RMD160 d11108d871ab7f164c7e4dd1000cd8cdca7cb64d SHA1 3373386714efbc2c1c9f5b849931d55c62d3972d SHA256 2373d6935b44b64a137bf8ba198dca3fb782d0c072735b172ae4420c380a5d9c
50
+DIST otp_doc_html_R10B-5.tar.gz 4591317
51
+DIST otp_doc_html_R10B-6.tar.gz 4602685 RMD160 f9ecb2ed8d6d0583e340d719ec56a3e670e9856b SHA1 1635042dfc0cdef0ed45aa389387d08747336b8b SHA256 50174508e8507c18b1b5e80805f70fdf680db4b9b81cd9bf2cc8e1ac020e910b
52
+DIST otp_doc_html_R10B-7.tar.gz 4601134 RMD160 4cba94ec7162b35696bd471b2c32cf26935f3d6b SHA1 1b3c2f153a6fbecbcec86d0078745332bce6b9b9 SHA256 d69aa07cfe3851da1c4d558cbd7a17cafc7546b396f7ab07c68a18e44cc40e71
53
+DIST otp_doc_html_R11B-0.tar.gz 4662110 RMD160 ec39aa3e693a0b836b8ca9c360c14c2612c1b813 SHA1 263d7941e67b0a8db079251cb938823a5f2da4ba SHA256 68cb74d5979dd2ea75c03e892e7ce1446eff27af37d9bdd4fd9778a433a19f68
54
+DIST otp_doc_html_R11B-1.tar.gz 4717809 RMD160 2a7425f55245b12037a02082ace85411c04c5bb6 SHA1 1c1734482ebce4fab096b24ac8b91d33966a47cd SHA256 225212891e2290d0ea21e489445113d7f79ad51e4b3e3e4f0042f8876383a7bc
55
+DIST otp_doc_html_R11B-2.tar.gz 4739895 RMD160 82a4ab769566705333e059d920861d05be31754b SHA1 44a6006bf5437566ce770a4a3a2bf6c9e015e656 SHA256 588514c6b96b33dbaffd40aa5b51b9c0be65d02b6e81644c53b4c705a866db47
56
+DIST otp_doc_man_R10B-10.tar.gz 594690 RMD160 b56260b7349cd4751ca56ec15fdc5515041b130b SHA1 a59f09e9656979642a2b83cc1e9c3889ecec5031 SHA256 8ecfc9b627200f59c35591a743e03a587258ddcdd39052a0b2cb58b80f6fc20b
57
+DIST otp_doc_man_R10B-5.tar.gz 597252
58
+DIST otp_doc_man_R10B-6.tar.gz 601812 RMD160 82f414e454b3bca56c828e5ddb1bf59f42f945e6 SHA1 42bdf4b603d5b68a600c666e9a8178a7c9d12250 SHA256 639b60c7950724566fd0d7df59b0faa683d678cd5929a138592a6affb9c6b36a
59
+DIST otp_doc_man_R10B-7.tar.gz 601650 RMD160 d5f33c5e35b79222fa5b57cbe736a983fa0d0316 SHA1 70cf18f8bfba75c2e5d96f4ad68af4981cda5de7 SHA256 5bd1ba759245a5c41e7d25121c5e5ab58d0d04935eceb0960a8fb5d0bab3297d
60
+DIST otp_doc_man_R11B-0.tar.gz 624684 RMD160 38d9218391147e192d21c438d436c98d7c0f982a SHA1 b093fc8c9349a744c42b2ac70d00166adb7d2bb0 SHA256 09b93f43b6bb048d3b66296e94bb6379dbac11217e2ffbe074c2492fe777ee39
61
+DIST otp_doc_man_R11B-1.tar.gz 627132 RMD160 666899dedc72f22387d478ffe4a1f313c57bdb01 SHA1 28f1318964946634996f146770cc9a2be0c20953 SHA256 706e7da589cddee06b9d0a24a09e2105ae719bbfb8b6a08fe55ae45d5dbf4bd6
62
+DIST otp_doc_man_R11B-2.tar.gz 632153 RMD160 90b37a71ed29f14ec0d14a520aef47ed7b7ccad0 SHA1 5e09c0dcea2956d8b2cdc2a6ab846d9a922cefe3 SHA256 643fb8210a2059b2c283c17601a0d5893f5cf409f05ed4852fbf2b0607693ac9
63
+DIST otp_src_R10B-0.tar.gz 9296524
64
+DIST otp_src_R10B-10.tar.gz 9445437 RMD160 b0e24e89241a21d5f3304791b505ab133db8fca5 SHA1 b08e93540d0f7b532a27fcb12f832759af07ac29 SHA256 bd87e1b09f1f3d694fc32ef4d27372e25c95ce35b383c7747ab40c27471c28ac
65
+DIST otp_src_R10B-10_epoll.patch 15359 RMD160 40a1282c6223081b4d2d9c06b30bc16163aa495f SHA1 021ed43a2ebb9d0ff13c9c3ffbf0e8f3d9aa81f7 SHA256 7b8bbad71649e9b00f9f8639b0fe06060428aa4015eb6164e78d18a0b2508a5b
66
+DIST otp_src_R10B-5.tar.gz 9996505
67
+DIST otp_src_R10B-6.tar.gz 10037987 RMD160 009dcaa078ee6045e352bc700e581ea222058f4e SHA1 6869b8f57c2f6b0e3b1764891e7c7279e5b6a5f0 SHA256 7c6d02954b8f84e68224677eaa829a234c3aafc26ec94655e574a8028d1d40bf
68
+DIST otp_src_R10B-7.tar.gz 10058423 RMD160 b97700467f855110ff1beb4e7725bb716f6a4b2e SHA1 f1a741a682b2849d5c44103259b2247634c7a1fe SHA256 7b0f96596c031a79b0f975423f0535ddba1a8d86868bb28ac3f5383709c30bf1
69
+DIST otp_src_R10B-7_epoll.patch 14823 RMD160 559303afe1be7c9797146b33490f0bd7c567f804 SHA1 1ac7bf7435c76844ce40c9ed8a7e56e3e40102c0 SHA256 275ac0cd6a20f329b8c32937b08a1aea118b0073536b8910495c806191474c0e
70
+DIST otp_src_R11B-0.tar.gz 10844070 RMD160 cb2c163f9404feea9b56a5adddb3bdd505e0b494 SHA1 83b620810e5eb8440b4b18809558b8c42c9ad5b0 SHA256 1806ea681b72be216e5365b29479dcb5253f0d828c021282711f5eae984c9f11
71
+DIST otp_src_R11B-1.tar.gz 11144896 RMD160 db658f8221c4226f52c88ff56d2f68afbe47bac2 SHA1 5831578f1c189a2cdf23b19b045be19589cd918f SHA256 d5a8530dfee0b2348c4ad0107409fa73ac3233f31e2300ece625a2abd9eb4da7
72
+DIST otp_src_R11B-2.tar.gz 11244153 RMD160 989bab054992ba23666756379950082cd41adb00 SHA1 09885c9b0902caa4570de950d76284943232fb6d SHA256 3dd483ee568c31655361474aa54a28cf11575c3b1b984f0b7a6980e083a8e44b
73
+DIST otp_src_R8B-2.tar.gz 10905100
74
+DIST otp_src_R9B-1.tar.gz 8455643
75
+DIST otp_src_R9C-0.tar.gz 8229056
76
+EBUILD erlang-10.2.0.ebuild 2352 RMD160 cd0ae744aff89f3a7af60e2f8ee0e106c561929f SHA1 3ee96823dad2abd7dd31b3cfd221e1be7b820056 SHA256 e5c62cfa064f03cf0cb7a0a05bd2da37964fdbb1f254345e62671a589024c3d6
77
+MD5 542d1404253f2b21edd106a562bba760 erlang-10.2.0.ebuild 2352
78
+RMD160 cd0ae744aff89f3a7af60e2f8ee0e106c561929f erlang-10.2.0.ebuild 2352
79
+SHA256 e5c62cfa064f03cf0cb7a0a05bd2da37964fdbb1f254345e62671a589024c3d6 erlang-10.2.0.ebuild 2352
80
+EBUILD erlang-10.2.10.ebuild 3519 RMD160 506bd57ab1d8cbeb8b6f51760b2112d3d4e33279 SHA1 eb9a53a6326c40253994869031732b15f05fb95a SHA256 28bc2aaddd2f00f95fdd27d2b90ae9bd455bb73ba64b4ed6d1a632aef26095ca
81
+MD5 bcb00e535032b08fe3b702977231e23d erlang-10.2.10.ebuild 3519
82
+RMD160 506bd57ab1d8cbeb8b6f51760b2112d3d4e33279 erlang-10.2.10.ebuild 3519
83
+SHA256 28bc2aaddd2f00f95fdd27d2b90ae9bd455bb73ba64b4ed6d1a632aef26095ca erlang-10.2.10.ebuild 3519
84
+EBUILD erlang-10.2.5.ebuild 2925 RMD160 88db440410a862002970318029e845f2c99ae355 SHA1 449defaac5382bb338708a526787339c49ebde95 SHA256 27234a1ed6d213a2e2a3e347586f4fe37eae2b570afcd43c4fe035613dc5c83d
85
+MD5 15afcfd348a07f127785257e8c876b8d erlang-10.2.5.ebuild 2925
86
+RMD160 88db440410a862002970318029e845f2c99ae355 erlang-10.2.5.ebuild 2925
87
+SHA256 27234a1ed6d213a2e2a3e347586f4fe37eae2b570afcd43c4fe035613dc5c83d erlang-10.2.5.ebuild 2925
88
+EBUILD erlang-10.2.6.ebuild 3001 RMD160 7e77fa1ebc8614165368d46977378854a4d98f8d SHA1 9db5d8233b546602e2cbbbb440820d262a23db92 SHA256 3bb6d57e339639c02fbc432d1a9356b43b9802e27162e5875f78bd32006e7404
89
+MD5 a1bd577d0e801e8ced64a3a0431f44a4 erlang-10.2.6.ebuild 3001
90
+RMD160 7e77fa1ebc8614165368d46977378854a4d98f8d erlang-10.2.6.ebuild 3001
91
+SHA256 3bb6d57e339639c02fbc432d1a9356b43b9802e27162e5875f78bd32006e7404 erlang-10.2.6.ebuild 3001
92
+EBUILD erlang-10.2.7.ebuild 3124 RMD160 bc44aff74fd8d9471b89f0fb71de31ae5471af94 SHA1 c243758903e1e4dace9711ff47eee4ef863dcaab SHA256 626a4673a6560c4f36e47db591723b90330dcf717f4af7208eaeaf8bfc781346
93
+MD5 1cbc40873f79fdd2c6b856f4581404e0 erlang-10.2.7.ebuild 3124
94
+RMD160 bc44aff74fd8d9471b89f0fb71de31ae5471af94 erlang-10.2.7.ebuild 3124
95
+SHA256 626a4673a6560c4f36e47db591723b90330dcf717f4af7208eaeaf8bfc781346 erlang-10.2.7.ebuild 3124
96
+EBUILD erlang-11.2.0.ebuild 3095 RMD160 4b91d9211da14eb53ddb2daa959fbaac342bf057 SHA1 f49df17344674a86407868a04939db4fb9f57a1b SHA256 7f8d715ad55943f9be1c2e13a8d2fc66bc215c63496e9a47b0758f3147983704
97
+MD5 73648a818a005bca3e299394e5a9f6f1 erlang-11.2.0.ebuild 3095
98
+RMD160 4b91d9211da14eb53ddb2daa959fbaac342bf057 erlang-11.2.0.ebuild 3095
99
+SHA256 7f8d715ad55943f9be1c2e13a8d2fc66bc215c63496e9a47b0758f3147983704 erlang-11.2.0.ebuild 3095
100
+EBUILD erlang-11.2.1.ebuild 4386 RMD160 e6bb63cbc1765618bddbefa3a7121dd5328ed6f6 SHA1 e8912d12b05b3053288de1659d9009c3abe3d532 SHA256 c469d34c7d443ef6c2a6da1a2cb64e275ba6bfb38fe3778b9c62f4c5c9399308
101
+MD5 db457411e4737ec4d9fdad7fc9354cfc erlang-11.2.1.ebuild 4386
102
+RMD160 e6bb63cbc1765618bddbefa3a7121dd5328ed6f6 erlang-11.2.1.ebuild 4386
103
+SHA256 c469d34c7d443ef6c2a6da1a2cb64e275ba6bfb38fe3778b9c62f4c5c9399308 erlang-11.2.1.ebuild 4386
104
+EBUILD erlang-11.2.2.ebuild 4387 RMD160 c752df46206f7fe27f13ca525db1b52eae75b640 SHA1 21b6facc9f297517dd8d2c94957577ca32267506 SHA256 3276790c60d6a398e8573729b9cdac07aee0a1196486811480bb116c15cad077
105
+MD5 22f50e05bfa1508f5bded459efa75eed erlang-11.2.2.ebuild 4387
106
+RMD160 c752df46206f7fe27f13ca525db1b52eae75b640 erlang-11.2.2.ebuild 4387
107
+SHA256 3276790c60d6a398e8573729b9cdac07aee0a1196486811480bb116c15cad077 erlang-11.2.2.ebuild 4387
108
+EBUILD erlang-8b.ebuild 1156 RMD160 855ecd0626e2ff23974ea805c1142c7e2ef692aa SHA1 e8e54f8e2a1e94e08114d4a28a628c03b24197b6 SHA256 04b5d937a3a8d543c36d41c43353c3c75e707350e4a4446de2c8a3c99a712195
109
+MD5 683010b6283d166c1ffcf64bab32e6d2 erlang-8b.ebuild 1156
110
+RMD160 855ecd0626e2ff23974ea805c1142c7e2ef692aa erlang-8b.ebuild 1156
111
+SHA256 04b5d937a3a8d543c36d41c43353c3c75e707350e4a4446de2c8a3c99a712195 erlang-8b.ebuild 1156
112
+EBUILD erlang-9c-r1.ebuild 1661 RMD160 6f681c2ccb1b1d2e90f182661f27a5999f4e50d8 SHA1 3c796022ade7bfa0db1506d4c11b0180c01c457d SHA256 2bf25512b0061ff092e9ec8cb1e8bde825a8588925130c5d4d75e9e45ca41287
113
+MD5 40d7fe2f32b59b83ecabe9eb2aa2ecc3 erlang-9c-r1.ebuild 1661
114
+RMD160 6f681c2ccb1b1d2e90f182661f27a5999f4e50d8 erlang-9c-r1.ebuild 1661
115
+SHA256 2bf25512b0061ff092e9ec8cb1e8bde825a8588925130c5d4d75e9e45ca41287 erlang-9c-r1.ebuild 1661
116
+EBUILD erlang-9c-r2.ebuild 1786 RMD160 cfcd3af93fa8a45da4068303b6bfebad8d076264 SHA1 42672bce4031943e9f7145406be7a83279ce867b SHA256 7f1e9e7f8260d6975d9a58df64cc2c42ac4fddf41e0c93f0cc89e0beb9ed55db
117
+MD5 42753c3aa0334123ff5edc1ad619ca8c erlang-9c-r2.ebuild 1786
118
+RMD160 cfcd3af93fa8a45da4068303b6bfebad8d076264 erlang-9c-r2.ebuild 1786
119
+SHA256 7f1e9e7f8260d6975d9a58df64cc2c42ac4fddf41e0c93f0cc89e0beb9ed55db erlang-9c-r2.ebuild 1786
120
+EBUILD erlang-9c-r3.ebuild 1800 RMD160 debb9e17889fa48c887afe438a170d9e0de77d83 SHA1 c5cc806bd6f09f933d2f70f2248e1465fe206658 SHA256 112af80656ddcccd23198372158126e2dbcca81677d0c75e18bba55a3e6310d3
121
+MD5 7fcfff1a0fb1d70d1e5dae58da82a634 erlang-9c-r3.ebuild 1800
122
+RMD160 debb9e17889fa48c887afe438a170d9e0de77d83 erlang-9c-r3.ebuild 1800
123
+SHA256 112af80656ddcccd23198372158126e2dbcca81677d0c75e18bba55a3e6310d3 erlang-9c-r3.ebuild 1800
124
+EBUILD erlang-9c.ebuild 1483 RMD160 2bbe9f2b29faf2a47774ccc57c09aa556e730ab0 SHA1 419ce5c5c9819b590146594c95915a87a79c864a SHA256 765a1170c983ef37cf1e2199fcc9a28c2d544f20bcb27f0eb29294c584975895
125
+MD5 b782da2a4fc77372e754ee4f55ebd2c5 erlang-9c.ebuild 1483
126
+RMD160 2bbe9f2b29faf2a47774ccc57c09aa556e730ab0 erlang-9c.ebuild 1483
127
+SHA256 765a1170c983ef37cf1e2199fcc9a28c2d544f20bcb27f0eb29294c584975895 erlang-9c.ebuild 1483
128
+MISC ChangeLog 5711 RMD160 28681780418b6c9c4cf793c136d6fd5c71868b2d SHA1 48d629e412d63f72642a1215586f2b39085d0203 SHA256 7ed09af34a15c6c41c0bc460806f413ff15bd7baa826380efdd2e3ae3615f005
129
+MD5 783780d58b49638cbed3ffeee0629d1a ChangeLog 5711
130
+RMD160 28681780418b6c9c4cf793c136d6fd5c71868b2d ChangeLog 5711
131
+SHA256 7ed09af34a15c6c41c0bc460806f413ff15bd7baa826380efdd2e3ae3615f005 ChangeLog 5711
132
+MISC metadata.xml 402 RMD160 3d4e0e7953d95f43de89f62eacb37969caa29336 SHA1 2a45564353e8d0c2b9555294a6a269e56e0b6056 SHA256 c713a207afd5d65ef21d1c1e5fd3b867ce063dd9e46fc53db0734ad19f59ffe7
133
+MD5 aea374917adc11a2d42b0b9d1bba3598 metadata.xml 402
134
+RMD160 3d4e0e7953d95f43de89f62eacb37969caa29336 metadata.xml 402
135
+SHA256 c713a207afd5d65ef21d1c1e5fd3b867ce063dd9e46fc53db0734ad19f59ffe7 metadata.xml 402
136
+MD5 f3de2b6ca821b977f0e1811a1f0a1409 files/digest-erlang-10.2.0 67
137
+RMD160 877faf9cd01c7a7440a297f7b007fb33e4b7f302 files/digest-erlang-10.2.0 67
138
+SHA256 832c2c2b7cd5c257619e0d01729a9ce468b3d29df63b68c7ddcbe70426716364 files/digest-erlang-10.2.0 67
139
+MD5 58cc2440a6ff67f439916c4fe3ccb0bd files/digest-erlang-10.2.10 1033
140
+RMD160 a68ccbb17a0b86b4d58f311a553432e6ddfc0b01 files/digest-erlang-10.2.10 1033
141
+SHA256 4d9f8f7bb59eda00418e74cd3e1cae2dc90af7c6837f1dc699e5c4a5649ff318 files/digest-erlang-10.2.10 1033
142
+MD5 915a9f490e6f58cafe26c3f6f6aeb54d files/digest-erlang-10.2.5 209
143
+RMD160 045e0d32ec7f5516361ca930e8d68462aee1ba26 files/digest-erlang-10.2.5 209
144
+SHA256 7601e79f68cf8dfa93db26685ccb85edae1727a764211f9826aa34bf337235e2 files/digest-erlang-10.2.5 209
145
+MD5 a22d2e1e881a0d4df95b19d9d2a9cf13 files/digest-erlang-10.2.6 768
146
+RMD160 ad4161b8ea9ad8b05ffe3db06961582ae40aa26a files/digest-erlang-10.2.6 768
147
+SHA256 0c38a6330afc282000aaebd1c608c3dc81102a7bb89dad470f6f7a248a9e39ec files/digest-erlang-10.2.6 768
148
+MD5 55b2f80ec276b667beffebf7379472a4 files/digest-erlang-10.2.7 1024
149
+RMD160 88d05c6358e85f42a6dca6782eefb23a25813abd files/digest-erlang-10.2.7 1024
150
+SHA256 fdc9306a98f51ef7ce56e27a02a1d3cd8c731dcb0cf13288bffb69defe4e765d files/digest-erlang-10.2.7 1024
151
+MD5 55f6d7fce64d2a93c7e12cf660fef842 files/digest-erlang-11.2.0 768
152
+RMD160 89cbc1d9eaf296b693e9263b38ad33fcbcdb3e38 files/digest-erlang-11.2.0 768
153
+SHA256 aefeb78184742c0047cf00a4dc2f67accb7d28988a5b8f95d27e1009f4e1ff75 files/digest-erlang-11.2.0 768
154
+MD5 8886bf905361bef7627acee2a1c8bb98 files/digest-erlang-11.2.1 768
155
+RMD160 7483ae4810f0ccdebd46d1a0b7e325df96111976 files/digest-erlang-11.2.1 768
156
+SHA256 3fd426daec26afe9200caae2e6721a80fce6acc5d1c11f85817230dd78949248 files/digest-erlang-11.2.1 768
157
+MD5 5f903efdd3245f02ca8ff7ae339abb1c files/digest-erlang-11.2.2 768
158
+RMD160 7336169350690cbdd0b6971d80e741593134cafb files/digest-erlang-11.2.2 768
159
+SHA256 4f2b1667397c5abd23d28c6b9927ff68d2774a3bb814bc7cd5341c6e48061166 files/digest-erlang-11.2.2 768
160
+MD5 0ef311d4fbeb2b5e16aab201dcf37297 files/digest-erlang-8b 67
161
+RMD160 02584b25d0f2422b143b52c97cb7d9710a59302c files/digest-erlang-8b 67
162
+SHA256 ccef6072b284e0abaf10bc416c61168f2a295c99a49ec27c7277df013cdc2437 files/digest-erlang-8b 67
163
+MD5 9a235de49a6c0988f033448fdac8a0a8 files/digest-erlang-9c 66
164
+RMD160 628f19219fe35bbed12a603f2d6a8ef4006fc500 files/digest-erlang-9c 66
165
+SHA256 0d228671e3832721d333a82cbf11b3e22fea8fab4eedb308c3af20dd59b69a66 files/digest-erlang-9c 66
166
+MD5 9a235de49a6c0988f033448fdac8a0a8 files/digest-erlang-9c-r1 66
167
+RMD160 628f19219fe35bbed12a603f2d6a8ef4006fc500 files/digest-erlang-9c-r1 66
168
+SHA256 0d228671e3832721d333a82cbf11b3e22fea8fab4eedb308c3af20dd59b69a66 files/digest-erlang-9c-r1 66
169
+MD5 ae2205c16664d70f5ea47d249b2e566f files/digest-erlang-9c-r2 66
170
+RMD160 bc09b0c487f2580aba706e7f35f84e0109479325 files/digest-erlang-9c-r2 66
171
+SHA256 1e4ffb97ef49da9eecdb6affebda54e8e22b9c2707a099edeff382531b3b95c1 files/digest-erlang-9c-r2 66
172
+MD5 ae2205c16664d70f5ea47d249b2e566f files/digest-erlang-9c-r3 66
173
+RMD160 bc09b0c487f2580aba706e7f35f84e0109479325 files/digest-erlang-9c-r3 66
174
+SHA256 1e4ffb97ef49da9eecdb6affebda54e8e22b9c2707a099edeff382531b3b95c1 files/digest-erlang-9c-r3 66
... ...
@@ -0,0 +1,87 @@
1
+# Copyright 1999-2006 Gentoo Foundation
2
+# Distributed under the terms of the GNU General Public License v2
3
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/erlang/erlang-10.2.0.ebuild,v 1.8 2006/03/07 23:14:21 vapier Exp $
4
+
5
+inherit eutils toolchain-funcs flag-o-matic elisp-common
6
+
7
+#erlang uses a really weird versioning scheme which caused quite a few problems already
8
+#Thus we do a slight modification converting all letters to digits to make it more sane (see e.g. #26420)
9
+#the next line selects the right source.
10
+MY_P=otp_src_R10B
11
+MyDate="2004-10-05"
12
+#apparently erlang people also started to stamp sources with a release date
13
+DESCRIPTION="Erlang programming language, runtime environment, and large collection of libraries"
14
+HOMEPAGE="http://www.erlang.org/"
15
+SRC_URI="http://www.erlang.org/download/${MY_P}-0.tar.gz"
16
+
17
+LICENSE="EPL"
18
+SLOT="0"
19
+KEYWORDS="~x86 ~ppc ~sparc ~amd64"
20
+IUSE="X ssl emacs"
21
+
22
+DEPEND=">=dev-lang/perl-5.6.1
23
+	ssl? ( >=dev-libs/openssl-0.9.7d )
24
+	emacs? ( virtual/emacs )"
25
+
26
+S=${WORKDIR}/${MY_P}_${MyDate}
27
+
28
+SITEFILE=50erlang-gentoo.el
29
+
30
+src_unpack() {
31
+	unpack ${A}
32
+	cd "${S}"
33
+	epatch "${FILESDIR}"/${PN}-10.2.6-export-TARGET.patch
34
+}
35
+
36
+src_compile() {
37
+	[ "`gcc-fullversion`" == "3.3.2" ] && filter-mfpmath sse
38
+	[ "`gcc-fullversion`" == "3.3.3" ] && filter-mfpmath sse
39
+	addpredict /dev/pty # Bug #25366
40
+
41
+	econf --enable-threads || die
42
+	make || die
43
+
44
+	if use emacs; then
45
+		pushd ${D}/lib/tools/emacs
46
+		elisp-compile *.el
47
+		popd
48
+	fi
49
+}
50
+
51
+src_install() {
52
+	ERL_LIBDIR="/usr/$(get_libdir)/erlang"
53
+
54
+	make INSTALL_PREFIX=${D} install || die
55
+	dodoc AUTHORS EPLICENCE README
56
+
57
+	dosym ${ERL_LIBDIR}/bin/erl /usr/bin/erl
58
+	dosym ${ERL_LIBDIR}/bin/erlc /usr/bin/erlc
59
+	dosym ${ERL_LIBDIR}/bin/ecc /usr/bin/ecc
60
+	dosym ${ERL_LIBDIR}/bin/elink /usr/bin/elink
61
+	dosym ${ERL_LIBDIR}/bin/ear /usr/bin/ear
62
+	dosym ${ERL_LIBDIR}/bin/escript /usr/bin/escript
63
+
64
+	## Remove ${D} from the following files
65
+	dosed ${ERL_LIBDIR}/bin/erl
66
+	dosed ${ERL_LIBDIR}/bin/start
67
+	cd ${ERL_LIBDIR}/erts-*
68
+	grep -rle ${D} ${D}/${ERL_LIBDIR}/erts-* | xargs sed -i -e "s:${D}::g"
69
+
70
+	## Clean up the no longer needed files
71
+	rm ${D}/${ERL_LIBDIR}/Install
72
+
73
+	if use emacs; then
74
+		pushd ${S}
75
+		elisp-install erlang lib/tools/emacs/*.el
76
+		elisp-site-file-install ${FILESDIR}/${SITEFILE}
77
+		popd
78
+	fi
79
+}
80
+
81
+pkg_postinst() {
82
+	use emacs && elisp-site-regen
83
+}
84
+
85
+pkg_postrm() {
86
+	use emacs && elisp-site-regen
87
+}
... ...
@@ -0,0 +1,116 @@
1
+# Copyright 1999-2006 Gentoo Foundation
2
+# Distributed under the terms of the GNU General Public License v2
3
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/erlang/erlang-10.2.10.ebuild,v 1.1 2006/04/10 20:42:54 mkennedy Exp $
4
+
5
+inherit eutils multilib flag-o-matic elisp-common versionator
6
+
7
+#erlang uses a really weird versioning scheme which caused quite a few problems already
8
+#Thus we do a slight modification converting all letters to digits to make it more sane (see e.g. #26420)
9
+#the next line selects the right source.
10
+MY_PV="R$(get_major_version)B-$(get_version_component_range 3)"
11
+# ATTN!! Take care when processing the C, etc version!
12
+MY_P=otp_src_${MY_PV}
13
+DESCRIPTION="Erlang programming language, runtime environment, and large collection of libraries"
14
+HOMEPAGE="http://www.erlang.org/"
15
+SRC_URI="http://www.erlang.org/download/${MY_P}.tar.gz
16
+	doc? ( http://erlang.org/download/otp_doc_man_${MY_PV}.tar.gz
17
+		http://erlang.org/download/otp_doc_html_${MY_PV}.tar.gz )
18
+	http://developer.sipphone.com/ejabberd/erlang_epoll_patch/otp_src_${MY_PV}_epoll.patch"
19
+
20
+LICENSE="EPL"
21
+SLOT="0"
22
+KEYWORDS="~alpha ~amd64 ~ppc ~sparc ~x86"
23
+IUSE="doc emacs java odbc ssl tcltk"
24
+
25
+RDEPEND=">=dev-lang/perl-5.6.1
26
+	ssl? ( >=dev-libs/openssl-0.9.7d )
27
+	emacs? ( virtual/emacs )
28
+	java? ( >=virtual/jdk-1.2 )
29
+	odbc? ( dev-db/unixODBC )"
30
+DEPEND="${RDEPEND}
31
+	tcltk? ( dev-lang/tk )"
32
+
33
+S=${WORKDIR}/${MY_P}
34
+
35
+SITEFILE=50erlang-gentoo.el
36
+
37
+src_unpack() {
38
+	unpack ${A}
39
+	cd "${S}"
40
+	epatch "${FILESDIR}/${PN}-10.2.7-export-TARGET.patch"
41
+	epatch "${FILESDIR}/10.2.7-manpage-emacs-gentoo.patch"
42
+	use odbc || sed -i 's: odbc : :' lib/Makefile
43
+	epatch "${DISTDIR}"/otp_src_${MY_PV}_epoll.patch
44
+	epatch "${FILESDIR}"/supervisor-dict.patch
45
+	# Patch for glibc-2.4 first noted in Bug #128254 -- NOTE this is a
46
+	# compile time fix, runtime still requires testing, see
47
+	# http://www.erlang.org/ml-archive/erlang-questions/200601/msg00500.html
48
+	epatch "${FILESDIR}/glibc-2.4-fix.patch"
49
+}
50
+
51
+src_compile() {
52
+	use java || export JAVAC=false
53
+	econf \
54
+		--enable-threads \
55
+		--enable-kernel-poll \
56
+		$(use_with ssl) \
57
+		|| die
58
+	make || die
59
+
60
+	if use emacs ; then
61
+		pushd lib/tools/emacs
62
+		elisp-compile *.el
63
+		popd
64
+	fi
65
+}
66
+
67
+src_install() {
68
+	local ERL_LIBDIR=/usr/$(get_libdir)/erlang
69
+
70
+	make INSTALL_PREFIX="${D}" install || die
71
+	dodoc AUTHORS EPLICENCE README
72
+
73
+	dosym ${ERL_LIBDIR}/bin/erl /usr/bin/erl
74
+	dosym ${ERL_LIBDIR}/bin/erlc /usr/bin/erlc
75
+	dosym ${ERL_LIBDIR}/bin/ecc /usr/bin/ecc
76
+	dosym ${ERL_LIBDIR}/bin/elink /usr/bin/elink
77
+	dosym ${ERL_LIBDIR}/bin/ear /usr/bin/ear
78
+	dosym ${ERL_LIBDIR}/bin/escript /usr/bin/escript
79
+
80
+	## Remove ${D} from the following files
81
+	dosed ${ERL_LIBDIR}/bin/erl
82
+	dosed ${ERL_LIBDIR}/bin/start
83
+	cd ${ERL_LIBDIR}/erts-*
84
+	grep -rle "${D}" "${D}"/${ERL_LIBDIR}/erts-* | xargs sed -i -e "s:${D}::g"
85
+
86
+	## Clean up the no longer needed files
87
+	rm "${D}"/${ERL_LIBDIR}/Install
88
+
89
+	if use doc ; then
90
+		for file in "${WORKDIR}"/man/man*/*.[1-9]; do
91
+			# Avoid namespace collisions
92
+			local newfile=${file}erl
93
+			cp $file $newfile
94
+			# Man page processing tools expect a capitalized "SEE ALSO" section
95
+			# header
96
+			sed -i -e 's,\.SH See Also,\.SH SEE ALSO,g' $newfile
97
+			doman ${newfile}
98
+		done
99
+		dohtml -A README,erl,hrl,c,h,kwc,info -r "${WORKDIR}"/doc "${WORKDIR}"/lib "${WORKDIR}"/erts-*
100
+	fi
101
+
102
+	if use emacs ; then
103
+		pushd "${S}"
104
+		elisp-install erlang lib/tools/emacs/*.{el,elc}
105
+		elisp-site-file-install "${FILESDIR}"/${SITEFILE}
106
+		popd
107
+	fi
108
+}
109
+
110
+pkg_postinst() {
111
+	use emacs && elisp-site-regen
112
+}
113
+
114
+pkg_postrm() {
115
+	use emacs && elisp-site-regen
116
+}
... ...
@@ -0,0 +1,107 @@
1
+# Copyright 1999-2006 Gentoo Foundation
2
+# Distributed under the terms of the GNU General Public License v2
3
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/erlang/erlang-10.2.5.ebuild,v 1.5 2006/03/07 23:14:21 vapier Exp $
4
+
5
+inherit eutils multilib flag-o-matic elisp-common
6
+
7
+#erlang uses a really weird versioning scheme which caused quite a few problems already
8
+#Thus we do a slight modification converting all letters to digits to make it more sane (see e.g. #26420)
9
+#the next line selects the right source.
10
+MY_PV=R10B-5
11
+MY_P=otp_src_${MY_PV}
12
+DESCRIPTION="Erlang programming language, runtime environment, and large collection of libraries"
13
+HOMEPAGE="http://www.erlang.org/"
14
+SRC_URI="http://www.erlang.org/download/${MY_P}.tar.gz
15
+	doc? ( http://erlang.org/download/otp_doc_man_${MY_PV}.tar.gz
16
+		http://erlang.org/download/otp_doc_html_${MY_PV}.tar.gz )"
17
+
18
+LICENSE="EPL"
19
+SLOT="0"
20
+KEYWORDS="~amd64 ppc sparc x86"
21
+IUSE="doc emacs java odbc ssl X"
22
+
23
+RDEPEND=">=dev-lang/perl-5.6.1
24
+	ssl? ( >=dev-libs/openssl-0.9.7d )
25
+	emacs? ( virtual/emacs )
26
+	java? ( >=virtual/jdk-1.2 )
27
+	odbc? ( dev-db/unixODBC )"
28
+DEPEND="${RDEPEND}
29
+	dev-lang/tk"
30
+
31
+S=${WORKDIR}/${MY_P}
32
+
33
+SITEFILE=50erlang-gentoo.el
34
+
35
+src_unpack() {
36
+	unpack ${A}
37
+	cd "${S}"
38
+	epatch "${FILESDIR}"/${PN}-10.2.6-export-TARGET.patch
39
+	epatch "${FILESDIR}"/10.2.6-manpage-emacs-gentoo.patch
40
+	use odbc || sed -i 's: odbc : :' lib/Makefile
41
+}
42
+
43
+src_compile() {
44
+	use java || export JAVAC=false
45
+	econf \
46
+		--enable-threads \
47
+		$(use_with ssl) \
48
+		|| die
49
+	make || die
50
+
51
+	if use emacs ; then
52
+		pushd lib/tools/emacs
53
+		elisp-compile *.el
54
+		popd
55
+	fi
56
+}
57
+
58
+src_install() {
59
+	local ERL_LIBDIR=/usr/$(get_libdir)/erlang
60
+
61
+	make INSTALL_PREFIX="${D}" install || die
62
+	dodoc AUTHORS EPLICENCE README
63
+
64
+	dosym ${ERL_LIBDIR}/bin/erl /usr/bin/erl
65
+	dosym ${ERL_LIBDIR}/bin/erlc /usr/bin/erlc
66
+	dosym ${ERL_LIBDIR}/bin/ecc /usr/bin/ecc
67
+	dosym ${ERL_LIBDIR}/bin/elink /usr/bin/elink
68
+	dosym ${ERL_LIBDIR}/bin/ear /usr/bin/ear
69
+	dosym ${ERL_LIBDIR}/bin/escript /usr/bin/escript
70
+
71
+	## Remove ${D} from the following files
72
+	dosed ${ERL_LIBDIR}/bin/erl
73
+	dosed ${ERL_LIBDIR}/bin/start
74
+	cd ${ERL_LIBDIR}/erts-*
75
+	grep -rle "${D}" "${D}"/${ERL_LIBDIR}/erts-* | xargs sed -i -e "s:${D}::g"
76
+
77
+	## Clean up the no longer needed files
78
+	rm "${D}"/${ERL_LIBDIR}/Install
79
+
80
+	if use doc ; then
81
+		for file in "${WORKDIR}"/man/man*/*.[1-9]; do
82
+			# Avoid namespace collisions
83
+			local newfile=${file}erl
84
+			cp $file $newfile
85
+			# Man page processing tools expect a capitalized "SEE ALSO" section
86
+			# header
87
+			sed -i -e 's,\.SH See Also,\.SH SEE ALSO,g' $newfile
88
+			doman ${newfile}
89
+		done
90
+		dohtml -A README,erl,hrl,c,h,kwc,info -r "${WORKDIR}"/doc "${WORKDIR}"/lib "${WORKDIR}"/erts-*
91
+	fi
92
+
93
+	if use emacs ; then
94
+		pushd "${S}"
95
+		elisp-install erlang lib/tools/emacs/*.{el,elc}
96
+		elisp-site-file-install "${FILESDIR}"/${SITEFILE}
97
+		popd
98
+	fi
99
+}
100
+
101
+pkg_postinst() {
102
+	use emacs && elisp-site-regen
103
+}
104
+
105
+pkg_postrm() {
106
+	use emacs && elisp-site-regen
107
+}
... ...
@@ -0,0 +1,109 @@
1
+# Copyright 1999-2006 Gentoo Foundation
2
+# Distributed under the terms of the GNU General Public License v2
3
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/erlang/erlang-10.2.6.ebuild,v 1.6 2006/03/07 23:14:21 vapier Exp $
4
+
5
+inherit eutils multilib flag-o-matic elisp-common
6
+
7
+#erlang uses a really weird versioning scheme which caused quite a few problems already
8
+#Thus we do a slight modification converting all letters to digits to make it more sane (see e.g. #26420)
9
+#the next line selects the right source.
10
+MY_PV=R10B-6
11
+MY_P=otp_src_${MY_PV}
12
+DESCRIPTION="Erlang programming language, runtime environment, and large collection of libraries"
13
+HOMEPAGE="http://www.erlang.org/"
14
+SRC_URI="http://www.erlang.org/download/${MY_P}.tar.gz
15
+	doc? ( http://erlang.org/download/otp_doc_man_${MY_PV}.tar.gz
16
+		http://erlang.org/download/otp_doc_html_${MY_PV}.tar.gz )"
17
+
18
+LICENSE="EPL"
19
+SLOT="0"
20
+KEYWORDS="~amd64 ~ppc ~sparc x86"
21
+IUSE="doc emacs java odbc ssl X"
22
+
23
+RDEPEND=">=dev-lang/perl-5.6.1
24
+	ssl? ( >=dev-libs/openssl-0.9.7d )
25
+	emacs? ( virtual/emacs )
26
+	java? ( >=virtual/jdk-1.2 )
27
+	odbc? ( dev-db/unixODBC )"
28
+DEPEND="${RDEPEND}
29
+	"
30
+
31
+S=${WORKDIR}/${MY_P}
32
+
33
+SITEFILE=50erlang-gentoo.el
34
+
35
+src_unpack() {
36
+	unpack ${A}
37
+	cd "${S}"
38
+	epatch "${FILESDIR}"/${P}-export-TARGET.patch
39
+	epatch "${FILESDIR}"/${PV}-manpage-emacs-gentoo.patch
40
+	epatch "${FILESDIR}"/supervisor-dict.patch
41
+	epatch "${DISTDIR}"/otp_src_${MY_PV}_epoll.patch
42
+	use odbc || sed -i 's: odbc : :' lib/Makefile
43
+}
44
+
45
+src_compile() {
46
+	use java || export JAVAC=false
47
+	econf \
48
+		--enable-threads \
49
+		$(use_with ssl) \
50
+		|| die
51
+	make || die
52
+
53
+	if use emacs ; then
54
+		pushd lib/tools/emacs
55
+		elisp-compile *.el
56
+		popd
57
+	fi
58
+}
59
+
60
+src_install() {
61
+	local ERL_LIBDIR=/usr/$(get_libdir)/erlang
62
+
63
+	make INSTALL_PREFIX="${D}" install || die
64
+	dodoc AUTHORS EPLICENCE README
65
+
66
+	dosym ${ERL_LIBDIR}/bin/erl /usr/bin/erl
67
+	dosym ${ERL_LIBDIR}/bin/erlc /usr/bin/erlc
68
+	dosym ${ERL_LIBDIR}/bin/ecc /usr/bin/ecc
69
+	dosym ${ERL_LIBDIR}/bin/elink /usr/bin/elink
70
+	dosym ${ERL_LIBDIR}/bin/ear /usr/bin/ear
71
+	dosym ${ERL_LIBDIR}/bin/escript /usr/bin/escript
72
+
73
+	## Remove ${D} from the following files
74
+	dosed ${ERL_LIBDIR}/bin/erl
75
+	dosed ${ERL_LIBDIR}/bin/start
76
+	cd ${ERL_LIBDIR}/erts-*
77
+	grep -rle "${D}" "${D}"/${ERL_LIBDIR}/erts-* | xargs sed -i -e "s:${D}::g"
78
+
79
+	## Clean up the no longer needed files
80
+	rm "${D}"/${ERL_LIBDIR}/Install
81
+
82
+	if use doc ; then
83
+		for file in "${WORKDIR}"/man/man*/*.[1-9]; do
84
+			# Avoid namespace collisions
85
+			local newfile=${file}erl
86
+			cp $file $newfile
87
+			# Man page processing tools expect a capitalized "SEE ALSO" section
88
+			# header
89
+			sed -i -e 's,\.SH See Also,\.SH SEE ALSO,g' $newfile
90
+			doman ${newfile}
91
+		done
92
+		dohtml -A README,erl,hrl,c,h,kwc,info -r "${WORKDIR}"/doc "${WORKDIR}"/lib "${WORKDIR}"/erts-*
93
+	fi
94
+
95
+	if use emacs ; then
96
+		pushd "${S}"
97
+		elisp-install erlang lib/tools/emacs/*.{el,elc}
98
+		elisp-site-file-install "${FILESDIR}"/${SITEFILE}
99
+		popd
100
+	fi
101
+}
102
+
103
+pkg_postinst() {
104
+	use emacs && elisp-site-regen
105
+}
106
+
107
+pkg_postrm() {
108
+	use emacs && elisp-site-regen
109
+}
... ...
@@ -0,0 +1,110 @@
1
+# Copyright 1999-2006 Gentoo Foundation
2
+# Distributed under the terms of the GNU General Public License v2
3
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/erlang/erlang-10.2.7.ebuild,v 1.3 2006/03/07 23:14:21 vapier Exp $
4
+
5
+inherit eutils multilib flag-o-matic elisp-common
6
+
7
+#erlang uses a really weird versioning scheme which caused quite a few problems already
8
+#Thus we do a slight modification converting all letters to digits to make it more sane (see e.g. #26420)
9
+#the next line selects the right source.
10
+MY_PV=R10B-7
11
+MY_P=otp_src_${MY_PV}
12
+DESCRIPTION="Erlang programming language, runtime environment, and large collection of libraries"
13
+HOMEPAGE="http://www.erlang.org/"
14
+SRC_URI="http://www.erlang.org/download/${MY_P}.tar.gz
15
+	doc? ( http://erlang.org/download/otp_doc_man_${MY_PV}.tar.gz
16
+		http://erlang.org/download/otp_doc_html_${MY_PV}.tar.gz )
17
+	http://developer.sipphone.com/ejabberd/erlang_epoll_patch/otp_src_${MY_PV}_epoll.patch"
18
+
19
+LICENSE="EPL"
20
+SLOT="0"
21
+KEYWORDS="~alpha ~amd64 ~ppc ~sparc ~x86"
22
+IUSE="doc emacs java odbc ssl tcltk"
23
+
24
+RDEPEND=">=dev-lang/perl-5.6.1
25
+	ssl? ( >=dev-libs/openssl-0.9.7d )
26
+	emacs? ( virtual/emacs )
27
+	java? ( >=virtual/jdk-1.2 )
28
+	odbc? ( dev-db/unixODBC )"
29
+DEPEND="${RDEPEND}
30
+	tcltk? ( dev-lang/tk )"
31
+
32
+S=${WORKDIR}/${MY_P}
33
+
34
+SITEFILE=50erlang-gentoo.el
35
+
36
+src_unpack() {
37
+	unpack ${A}
38
+	cd "${S}"
39
+	epatch "${FILESDIR}"/${P}-export-TARGET.patch
40
+	epatch "${FILESDIR}"/${PV}-manpage-emacs-gentoo.patch
41
+#	epatch "${FILESDIR}"/supervisor-dict.patch
42
+	use odbc || sed -i 's: odbc : :' lib/Makefile
43
+	epatch "${DISTDIR}"/otp_src_${MY_PV}_epoll.patch
44
+}
45
+
46
+src_compile() {
47
+	use java || export JAVAC=false
48
+	econf \
49
+		--enable-threads \
50
+		$(use_with ssl) \
51
+		|| die
52
+	make || die
53
+
54
+	if use emacs ; then
55
+		pushd lib/tools/emacs
56
+		elisp-compile *.el
57
+		popd
58
+	fi
59
+}
60
+
61
+src_install() {
62
+	local ERL_LIBDIR=/usr/$(get_libdir)/erlang
63
+
64
+	make INSTALL_PREFIX="${D}" install || die
65
+	dodoc AUTHORS EPLICENCE README
66
+
67
+	dosym ${ERL_LIBDIR}/bin/erl /usr/bin/erl
68
+	dosym ${ERL_LIBDIR}/bin/erlc /usr/bin/erlc
69
+	dosym ${ERL_LIBDIR}/bin/ecc /usr/bin/ecc
70
+	dosym ${ERL_LIBDIR}/bin/elink /usr/bin/elink
71
+	dosym ${ERL_LIBDIR}/bin/ear /usr/bin/ear
72
+	dosym ${ERL_LIBDIR}/bin/escript /usr/bin/escript
73
+
74
+	## Remove ${D} from the following files
75
+	dosed ${ERL_LIBDIR}/bin/erl
76
+	dosed ${ERL_LIBDIR}/bin/start
77
+	cd ${ERL_LIBDIR}/erts-*
78
+	grep -rle "${D}" "${D}"/${ERL_LIBDIR}/erts-* | xargs sed -i -e "s:${D}::g"
79
+
80
+	## Clean up the no longer needed files
81
+	rm "${D}"/${ERL_LIBDIR}/Install
82
+
83
+	if use doc ; then
84
+		for file in "${WORKDIR}"/man/man*/*.[1-9]; do
85
+			# Avoid namespace collisions
86
+			local newfile=${file}erl
87
+			cp $file $newfile
88
+			# Man page processing tools expect a capitalized "SEE ALSO" section
89
+			# header
90
+			sed -i -e 's,\.SH See Also,\.SH SEE ALSO,g' $newfile
91
+			doman ${newfile}
92
+		done
93
+		dohtml -A README,erl,hrl,c,h,kwc,info -r "${WORKDIR}"/doc "${WORKDIR}"/lib "${WORKDIR}"/erts-*
94
+	fi
95
+
96
+	if use emacs ; then
97
+		pushd "${S}"
98
+		elisp-install erlang lib/tools/emacs/*.{el,elc}
99
+		elisp-site-file-install "${FILESDIR}"/${SITEFILE}
100
+		popd
101
+	fi
102
+}
103
+
104
+pkg_postinst() {
105
+	use emacs && elisp-site-regen
106
+}
107
+
108
+pkg_postrm() {
109
+	use emacs && elisp-site-regen
110
+}
... ...
@@ -0,0 +1,109 @@
1
+# Copyright 1999-2006 Gentoo Foundation
2
+# Distributed under the terms of the GNU General Public License v2
3
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/erlang/erlang-11.2.0.ebuild,v 1.1 2006/05/27 04:27:43 mkennedy Exp $
4
+
5
+inherit eutils multilib flag-o-matic elisp-common versionator
6
+
7
+#erlang uses a really weird versioning scheme which caused quite a few problems already
8
+#Thus we do a slight modification converting all letters to digits to make it more sane (see e.g. #26420)
9
+#the next line selects the right source.
10
+MY_PV="R$(get_major_version)B-$(get_version_component_range 3)"
11
+# ATTN!! Take care when processing the C, etc version!
12
+MY_P=otp_src_${MY_PV}
13
+DESCRIPTION="Erlang programming language, runtime environment, and large collection of libraries"
14
+HOMEPAGE="http://www.erlang.org/"
15
+SRC_URI="http://www.erlang.org/download/${MY_P}.tar.gz
16
+	doc? ( http://erlang.org/download/otp_doc_man_${MY_PV}.tar.gz
17
+		http://erlang.org/download/otp_doc_html_${MY_PV}.tar.gz )"
18
+
19
+LICENSE="EPL"
20
+SLOT="0"
21
+KEYWORDS="~alpha ~amd64 ~ppc ~sparc ~x86"
22
+IUSE="doc emacs java odbc ssl tcltk"
23
+
24
+RDEPEND=">=dev-lang/perl-5.6.1
25
+	ssl? ( >=dev-libs/openssl-0.9.7d )
26
+	emacs? ( virtual/emacs )
27
+	java? ( >=virtual/jdk-1.2 )
28
+	odbc? ( dev-db/unixODBC )"
29
+DEPEND="${RDEPEND}
30
+	tcltk? ( dev-lang/tk )"
31
+
32
+S=${WORKDIR}/${MY_P}
33
+
34
+SITEFILE=50erlang-gentoo.el
35
+
36
+src_unpack() {
37
+	unpack ${A}
38
+	cd "${S}"
39
+	epatch "${FILESDIR}/${PN}-10.2.7-export-TARGET.patch"
40
+	epatch "${FILESDIR}/10.2.7-manpage-emacs-gentoo.patch"
41
+	use odbc || sed -i 's: odbc : :' lib/Makefile
42
+}
43
+
44
+src_compile() {
45
+	use java || export JAVAC=false
46
+	econf \
47
+		--enable-threads \
48
+		--enable-kernel-poll \
49
+		$(use_with ssl) \
50
+		|| die
51
+	make || die
52
+
53
+	if use emacs ; then
54
+		pushd lib/tools/emacs
55
+		elisp-compile *.el
56
+		popd
57
+	fi
58
+}
59
+
60
+src_install() {
61
+	local ERL_LIBDIR=/usr/$(get_libdir)/erlang
62
+
63
+	make INSTALL_PREFIX="${D}" install || die
64
+	dodoc AUTHORS EPLICENCE README
65
+
66
+	dosym ${ERL_LIBDIR}/bin/erl /usr/bin/erl
67
+	dosym ${ERL_LIBDIR}/bin/erlc /usr/bin/erlc
68
+	dosym ${ERL_LIBDIR}/bin/ecc /usr/bin/ecc
69
+	dosym ${ERL_LIBDIR}/bin/elink /usr/bin/elink
70
+	dosym ${ERL_LIBDIR}/bin/ear /usr/bin/ear
71
+	dosym ${ERL_LIBDIR}/bin/escript /usr/bin/escript
72
+
73
+	## Remove ${D} from the following files
74
+	dosed ${ERL_LIBDIR}/bin/erl
75
+	dosed ${ERL_LIBDIR}/bin/start
76
+	cd ${ERL_LIBDIR}/erts-*
77
+	grep -rle "${D}" "${D}"/${ERL_LIBDIR}/erts-* | xargs sed -i -e "s:${D}::g"
78
+
79
+	## Clean up the no longer needed files
80
+	rm "${D}"/${ERL_LIBDIR}/Install
81
+
82
+	if use doc ; then
83
+		for file in "${WORKDIR}"/man/man*/*.[1-9]; do
84
+			# Avoid namespace collisions
85
+			local newfile=${file}erl
86
+			cp $file $newfile
87
+			# Man page processing tools expect a capitalized "SEE ALSO" section
88
+			# header
89
+			sed -i -e 's,\.SH See Also,\.SH SEE ALSO,g' $newfile
90
+			doman ${newfile}
91
+		done
92
+		dohtml -A README,erl,hrl,c,h,kwc,info -r "${WORKDIR}"/doc "${WORKDIR}"/lib "${WORKDIR}"/erts-*
93
+	fi
94
+
95
+	if use emacs ; then
96
+		pushd "${S}"
97
+		elisp-install erlang lib/tools/emacs/*.{el,elc}
98
+		elisp-site-file-install "${FILESDIR}"/${SITEFILE}
99
+		popd
100
+	fi
101
+}
102
+
103
+pkg_postinst() {
104
+	use emacs && elisp-site-regen
105
+}
106
+
107
+pkg_postrm() {
108
+	use emacs && elisp-site-regen
109
+}
... ...
@@ -0,0 +1,162 @@
1
+# Copyright 1999-2006 Gentoo Foundation
2
+# Distributed under the terms of the GNU General Public License v2
3
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/erlang/erlang-11.2.0.ebuild,v 1.1 2006/05/27 04:27:43 mkennedy Exp $
4
+
5
+inherit eutils multilib flag-o-matic elisp-common versionator
6
+
7
+#erlang uses a really weird versioning scheme which caused quite a few problems already
8
+#Thus we do a slight modification converting all letters to digits to make it more sane (see e.g. #26420)
9
+#the next line selects the right source.
10
+MY_PV="R$(get_major_version)B-$(get_version_component_range 3)"
11
+# ATTN!! Take care when processing the C, etc version!
12
+MY_P=otp_src_${MY_PV}
13
+DESCRIPTION="Erlang programming language, runtime environment, and large collection of libraries"
14
+HOMEPAGE="http://www.erlang.org/"
15
+SRC_URI="http://www.erlang.org/download/${MY_P}.tar.gz
16
+	doc? ( http://erlang.org/download/otp_doc_man_${MY_PV}.tar.gz
17
+		http://erlang.org/download/otp_doc_html_${MY_PV}.tar.gz )"
18
+
19
+LICENSE="EPL"
20
+SLOT="0"
21
+KEYWORDS="~alpha ~amd64 ~ppc ~sparc ~x86"
22
+IUSE="doc emacs java odbc ssl tcltk smp kernel-poll hipe threads"
23
+
24
+RDEPEND=">=dev-lang/perl-5.6.1
25
+	ssl? ( >=dev-libs/openssl-0.9.7d )
26
+	emacs? ( virtual/emacs )
27
+	java? ( >=virtual/jdk-1.2 )
28
+	odbc? ( dev-db/unixODBC )"
29
+DEPEND="${RDEPEND}
30
+	tcltk? ( dev-lang/tk )"
31
+
32
+S=${WORKDIR}/${MY_P}
33
+
34
+SITEFILE=50erlang-gentoo.el
35
+
36
+src_unpack() {
37
+	unpack ${A}
38
+	cd "${S}"
39
+	epatch "${FILESDIR}/${PN}-10.2.7-export-TARGET.patch"
40
+	epatch "${FILESDIR}/10.2.7-manpage-emacs-gentoo.patch"
41
+	epatch "${FILESDIR}/${PN}-${PV}-epoll.patch"
42
+#	epatch "${FILESDIR}/supervisor-dict.patch"
43
+	use odbc || sed -i 's: odbc : :' lib/Makefile
44
+}
45
+
46
+src_compile() {
47
+	if use java ; then
48
+		ewarn "Enabling  : java"
49
+	else
50
+		ewarn "Disabling : java"
51
+		export JAVAC=false
52
+	fi
53
+
54
+	if use ssl ; then
55
+		ewarn "Enabling  : ssl"
56
+	else
57
+		ewarn "Disabling : ssl"
58
+	fi
59
+
60
+	if use threads ; then
61
+		ewarn "Enabling  : threads"
62
+	else
63
+		ewarn "Disabling : threads"
64
+	fi
65
+
66
+	ECONF_EXTRA=
67
+	if use hipe ; then
68
+		ewarn "Enabling  : hipe"
69
+		ECONF_EXTRA="${ECONF_EXTRA} --enable-hipe"
70
+	else
71
+		ewarn "Disabling : hipe"
72
+		ECONF_EXTRA="${ECONF_EXTRA} --disable-hipe"
73
+	fi
74
+	if use smp ; then
75
+		ewarn "Enabling  : smp-support"
76
+		ECONF_EXTRA="${ECONF_EXTRA} --enable-smp-support --disable-kernel-poll"
77
+#		ECONF_EXTRA="${ECONF_EXTRA} --enable-smp-support"
78
+#		ECONF_EXTRA="${ECONF_EXTRA} --disable-kernel-poll"
79
+		if use kernel-poll ; then
80
+			ewarn
81
+			ewarn "Alert     : Currently you can only compile Erlang using kernel-poll OR smp!"
82
+			ewarn
83
+			ebeep 3
84
+		fi
85
+		ewarn "Disabling : kernel-poll"
86
+	else
87
+		ewarn "Disabling : smp-support"
88
+		ECONF_EXTRA="${ECONF_EXTRA} --disable-smp-support"
89
+		if use kernel-poll ; then
90
+			ewarn "Enabling  : kernel-poll"
91
+			ECONF_EXTRA="${ECONF_EXTRA} --enable-kernel-poll"
92
+		else
93
+			ewarn "Disabling : kernel-poll"
94
+			ECONF_EXTRA="${ECONF_EXTRA} --disable-kernel-poll"
95
+		fi
96
+	fi
97
+
98
+	econf \
99
+		$(use_enable threads) \
100
+		$(use_with ssl) \
101
+		${ECONF_EXTRA} \
102
+		|| die
103
+
104
+	make || die
105
+
106
+	if use emacs ; then
107
+		pushd lib/tools/emacs
108
+		elisp-compile *.el
109
+		popd
110
+	fi
111
+}
112
+
113
+src_install() {
114
+	local ERL_LIBDIR=/usr/$(get_libdir)/erlang
115
+
116
+	make INSTALL_PREFIX="${D}" install || die
117
+	dodoc AUTHORS EPLICENCE README
118
+
119
+	dosym ${ERL_LIBDIR}/bin/erl /usr/bin/erl
120
+	dosym ${ERL_LIBDIR}/bin/erlc /usr/bin/erlc
121
+	dosym ${ERL_LIBDIR}/bin/ecc /usr/bin/ecc
122
+	dosym ${ERL_LIBDIR}/bin/elink /usr/bin/elink
123
+	dosym ${ERL_LIBDIR}/bin/ear /usr/bin/ear
124
+	dosym ${ERL_LIBDIR}/bin/escript /usr/bin/escript
125
+
126
+	## Remove ${D} from the following files
127
+	dosed ${ERL_LIBDIR}/bin/erl
128
+	dosed ${ERL_LIBDIR}/bin/start
129
+	cd ${ERL_LIBDIR}/erts-*
130
+	grep -rle "${D}" "${D}"/${ERL_LIBDIR}/erts-* | xargs sed -i -e "s:${D}::g"
131
+
132
+	## Clean up the no longer needed files
133
+	rm "${D}"/${ERL_LIBDIR}/Install
134
+
135
+	if use doc ; then
136
+		for file in "${WORKDIR}"/man/man*/*.[1-9]; do
137
+			# Avoid namespace collisions
138
+			local newfile=${file}erl
139
+			cp $file $newfile
140
+			# Man page processing tools expect a capitalized "SEE ALSO" section
141
+			# header
142
+			sed -i -e 's,\.SH See Also,\.SH SEE ALSO,g' $newfile
143
+			doman ${newfile}
144
+		done
145
+		dohtml -A README,erl,hrl,c,h,kwc,info -r "${WORKDIR}"/doc "${WORKDIR}"/lib "${WORKDIR}"/erts-*
146
+	fi
147
+
148
+	if use emacs ; then
149
+		pushd "${S}"
150
+		elisp-install erlang lib/tools/emacs/*.{el,elc}
151
+		elisp-site-file-install "${FILESDIR}"/${SITEFILE}
152
+		popd
153
+	fi
154
+}
155
+
156
+pkg_postinst() {
157
+	use emacs && elisp-site-regen
158
+}
159
+
160
+pkg_postrm() {
161
+	use emacs && elisp-site-regen
162
+}
... ...
@@ -0,0 +1,162 @@
1
+# Copyright 1999-2006 Gentoo Foundation
2
+# Distributed under the terms of the GNU General Public License v2
3
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/erlang/erlang-11.2.0.ebuild,v 1.1 2006/05/27 04:27:43 mkennedy Exp $
4
+
5
+inherit eutils multilib flag-o-matic elisp-common versionator
6
+
7
+#erlang uses a really weird versioning scheme which caused quite a few problems already
8
+#Thus we do a slight modification converting all letters to digits to make it more sane (see e.g. #26420)
9
+#the next line selects the right source.
10
+MY_PV="R$(get_major_version)B-$(get_version_component_range 3)"
11
+# ATTN!! Take care when processing the C, etc version!
12
+MY_P=otp_src_${MY_PV}
13
+DESCRIPTION="Erlang programming language, runtime environment, and large collection of libraries"
14
+HOMEPAGE="http://www.erlang.org/"
15
+SRC_URI="http://www.erlang.org/download/${MY_P}.tar.gz
16
+	doc? ( http://erlang.org/download/otp_doc_man_${MY_PV}.tar.gz
17
+		http://erlang.org/download/otp_doc_html_${MY_PV}.tar.gz )"
18
+
19
+LICENSE="EPL"
20
+SLOT="0"
21
+KEYWORDS="~alpha ~amd64 ~ppc ~sparc ~x86"
22
+IUSE="doc emacs java odbc ssl tcltk smp kernel-poll hipe threads"
23
+
24
+RDEPEND=">=dev-lang/perl-5.6.1
25
+	ssl? ( >=dev-libs/openssl-0.9.7d )
26
+	emacs? ( virtual/emacs )
27
+	java? ( >=virtual/jdk-1.2 )
28
+	odbc? ( dev-db/unixODBC )"
29
+DEPEND="${RDEPEND}
30
+	tcltk? ( dev-lang/tk )"
31
+
32
+S=${WORKDIR}/${MY_P}
33
+
34
+SITEFILE=50erlang-gentoo.el
35
+
36
+src_unpack() {
37
+	unpack ${A}
38
+	cd "${S}"
39
+	epatch "${FILESDIR}/${PN}-10.2.7-export-TARGET.patch"
40
+	epatch "${FILESDIR}/10.2.7-manpage-emacs-gentoo.patch"
41
+#	epatch "${FILESDIR}/${PN}-${PV}-epoll.patch"
42
+#	epatch "${FILESDIR}/supervisor-dict.patch"
43
+	use odbc || sed -i 's: odbc : :' lib/Makefile
44
+}
45
+
46
+src_compile() {
47
+	if use java ; then
48
+		ewarn "Enabling  : java"
49
+	else
50
+		ewarn "Disabling : java"
51
+		export JAVAC=false
52
+	fi
53
+
54
+	if use ssl ; then
55
+		ewarn "Enabling  : ssl"
56
+	else
57
+		ewarn "Disabling : ssl"
58
+	fi
59
+
60
+	if use threads ; then
61
+		ewarn "Enabling  : threads"
62
+	else
63
+		ewarn "Disabling : threads"
64
+	fi
65
+
66
+	ECONF_EXTRA=
67
+	if use hipe ; then
68
+		ewarn "Enabling  : hipe"
69
+		ECONF_EXTRA="${ECONF_EXTRA} --enable-hipe"
70
+	else
71
+		ewarn "Disabling : hipe"
72
+		ECONF_EXTRA="${ECONF_EXTRA} --disable-hipe"
73
+	fi
74
+	if use smp ; then
75
+		ewarn "Enabling  : smp-support"
76
+		ECONF_EXTRA="${ECONF_EXTRA} --enable-smp-support --disable-kernel-poll"
77
+#		ECONF_EXTRA="${ECONF_EXTRA} --enable-smp-support"
78
+#		ECONF_EXTRA="${ECONF_EXTRA} --disable-kernel-poll"
79
+		if use kernel-poll ; then
80
+			ewarn
81
+			ewarn "Alert     : Currently you can only compile Erlang using kernel-poll OR smp!"
82
+			ewarn
83
+			ebeep 3
84
+		fi
85
+		ewarn "Disabling : kernel-poll"
86
+	else
87
+		ewarn "Disabling : smp-support"
88
+		ECONF_EXTRA="${ECONF_EXTRA} --disable-smp-support"
89
+		if use kernel-poll ; then
90
+			ewarn "Enabling  : kernel-poll"
91
+			ECONF_EXTRA="${ECONF_EXTRA} --enable-kernel-poll"
92
+		else
93
+			ewarn "Disabling : kernel-poll"
94
+			ECONF_EXTRA="${ECONF_EXTRA} --disable-kernel-poll"
95
+		fi
96
+	fi
97
+
98
+	econf \
99
+		$(use_enable threads) \
100
+		$(use_with ssl) \
101
+		${ECONF_EXTRA} \
102
+		|| die
103
+
104
+	make || die
105
+
106
+	if use emacs ; then
107
+		pushd lib/tools/emacs
108
+		elisp-compile *.el
109
+		popd
110
+	fi
111
+}
112
+
113
+src_install() {
114
+	local ERL_LIBDIR=/usr/$(get_libdir)/erlang
115
+
116
+	make INSTALL_PREFIX="${D}" install || die
117
+	dodoc AUTHORS EPLICENCE README
118
+
119
+	dosym ${ERL_LIBDIR}/bin/erl /usr/bin/erl
120
+	dosym ${ERL_LIBDIR}/bin/erlc /usr/bin/erlc
121
+	dosym ${ERL_LIBDIR}/bin/ecc /usr/bin/ecc
122
+	dosym ${ERL_LIBDIR}/bin/elink /usr/bin/elink
123
+	dosym ${ERL_LIBDIR}/bin/ear /usr/bin/ear
124
+	dosym ${ERL_LIBDIR}/bin/escript /usr/bin/escript
125
+
126
+	## Remove ${D} from the following files
127
+	dosed ${ERL_LIBDIR}/bin/erl
128
+	dosed ${ERL_LIBDIR}/bin/start
129
+	cd ${ERL_LIBDIR}/erts-*
130
+	grep -rle "${D}" "${D}"/${ERL_LIBDIR}/erts-* | xargs sed -i -e "s:${D}::g"
131
+
132
+	## Clean up the no longer needed files
133
+	rm "${D}"/${ERL_LIBDIR}/Install
134
+
135
+	if use doc ; then
136
+		for file in "${WORKDIR}"/man/man*/*.[1-9]; do
137
+			# Avoid namespace collisions
138
+			local newfile=${file}erl
139
+			cp $file $newfile
140
+			# Man page processing tools expect a capitalized "SEE ALSO" section
141
+			# header
142
+			sed -i -e 's,\.SH See Also,\.SH SEE ALSO,g' $newfile
143
+			doman ${newfile}
144
+		done
145
+		dohtml -A README,erl,hrl,c,h,kwc,info -r "${WORKDIR}"/doc "${WORKDIR}"/lib "${WORKDIR}"/erts-*
146
+	fi
147
+
148
+	if use emacs ; then
149
+		pushd "${S}"
150
+		elisp-install erlang lib/tools/emacs/*.{el,elc}
151
+		elisp-site-file-install "${FILESDIR}"/${SITEFILE}
152
+		popd
153
+	fi
154
+}
155
+
156
+pkg_postinst() {
157
+	use emacs && elisp-site-regen
158
+}
159
+
160
+pkg_postrm() {
161
+	use emacs && elisp-site-regen
162
+}
... ...
@@ -0,0 +1,43 @@
1
+# Copyright 1999-2006 Gentoo Foundation
2
+# Distributed under the terms of the GNU General Public License v2
3
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/erlang/erlang-8b.ebuild,v 1.11 2006/03/07 23:14:21 vapier Exp $
4
+
5
+MY_P=otp_src_R8B-2
6
+DESCRIPTION="Erlang programming language, runtime environment, and large collection of libraries"
7
+HOMEPAGE="http://www.erlang.org/"
8
+SRC_URI="http://www.erlang.org/download/${MY_P}.tar.gz"
9
+
10
+LICENSE="EPL"
11
+SLOT="0"
12
+KEYWORDS="x86 ppc sparc"
13
+IUSE="X ssl"
14
+
15
+DEPEND=">=dev-lang/perl-5.6.1
16
+	ssl? ( >=dev-libs/openssl-0.9.6d )"
17
+
18
+S=${WORKDIR}/${MY_P}
19
+
20
+addpredict /dev/pty # Bug #25366
21
+
22
+src_compile() {
23
+	econf --enable-threads || die "./configure failed"
24
+	make || die
25
+}
26
+
27
+src_install() {
28
+	ERL_LIBDIR="/usr/lib/erlang"
29
+
30
+	make INSTALL_PREFIX=${D} install || die
31
+	dodoc AUTHORS EPLICENCE README
32
+
33
+	dosym ${ERL_LIBDIR}/bin/erl /usr/bin/erl
34
+	dosym ${ERL_LIBDIR}/bin/erlc /usr/bin/erlc
35
+	dosym ${ERL_LIBDIR}/erts-5.1.2/bin/epmd ${ERL_LIBDIR}/bin/
36
+
37
+	## Remove ${D} from the /usr/lib/erlang/bin/erl and start script
38
+	dosed ${ERL_LIBDIR}/bin/erl
39
+	dosed ${ERL_LIBDIR}/bin/start
40
+
41
+	## Clean up the no longer needed
42
+	rm ${D}/${ERL_LIBDIR}/Install
43
+}
... ...
@@ -0,0 +1,62 @@
1
+# Copyright 1999-2006 Gentoo Foundation
2
+# Distributed under the terms of the GNU General Public License v2
3
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/erlang/erlang-9c-r1.ebuild,v 1.9 2006/03/07 23:14:21 vapier Exp $
4
+
5
+inherit eutils
6
+
7
+MY_P=otp_src_R9B-1
8
+DESCRIPTION="Erlang programming language, runtime environment, and large collection of libraries"
9
+HOMEPAGE="http://www.erlang.org/"
10
+SRC_URI="http://www.erlang.org/download/${MY_P}.tar.gz"
11
+
12
+LICENSE="EPL"
13
+SLOT="0"
14
+KEYWORDS="x86 ~ppc ~sparc"
15
+IUSE="X ssl"
16
+
17
+DEPEND=">=dev-lang/perl-5.6.1
18
+	ssl? ( >=dev-libs/openssl-0.9.6d )"
19
+
20
+S=${WORKDIR}/${MY_P}
21
+
22
+addpredict /dev/pty # Bug #25366
23
+
24
+src_unpack(){
25
+	unpack ${A}
26
+	cd ${S}
27
+	#combines nsswitch.conf parsing and a fix for strange install behaviour on some systems
28
+	epatch ${FILESDIR}/${P}.patch
29
+}
30
+
31
+src_compile() {
32
+	econf --enable-threads || die "./configure failed"
33
+	make || die
34
+}
35
+
36
+src_install() {
37
+	ERL_LIBDIR="/usr/lib/erlang"
38
+
39
+	make INSTALL_PREFIX=${D} install || die
40
+	dodoc AUTHORS EPLICENCE README
41
+
42
+	dosym ${ERL_LIBDIR}/bin/erl /usr/bin/erl
43
+	dosym ${ERL_LIBDIR}/bin/erlc /usr/bin/erlc
44
+	dosym ${ERL_LIBDIR}/bin/ecc /usr/bin/ecc
45
+	dosym ${ERL_LIBDIR}/bin/elink /usr/bin/elink
46
+	dosym ${ERL_LIBDIR}/bin/ear /usr/bin/ear
47
+	dosym ${ERL_LIBDIR}/bin/escript /usr/bin/escript
48
+
49
+	## Remove ${D} from the following files
50
+	dosed ${ERL_LIBDIR}/bin/erl
51
+	dosed ${ERL_LIBDIR}/bin/start
52
+	dosed ${ERL_LIBDIR}/bin/ecc
53
+	dosed ${ERL_LIBDIR}/bin/ear
54
+	dosed ${ERL_LIBDIR}/bin/elink
55
+	dosed ${ERL_LIBDIR}/bin/escript
56
+	dosed ${ERL_LIBDIR}/bin/esh
57
+	dosed ${ERL_LIBDIR}/erts-*/bin/erl
58
+	dosed ${ERL_LIBDIR}/erts-*/bin/start
59
+
60
+	## Clean up the no longer needed files
61
+	rm ${D}/${ERL_LIBDIR}/Install
62
+}
... ...
@@ -0,0 +1,63 @@
1
+# Copyright 1999-2006 Gentoo Foundation
2
+# Distributed under the terms of the GNU General Public License v2
3
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/erlang/erlang-9c-r2.ebuild,v 1.7 2006/03/07 23:14:21 vapier Exp $
4
+
5
+inherit eutils toolchain-funcs flag-o-matic
6
+
7
+MY_P=otp_src_R9C-0
8
+DESCRIPTION="Erlang programming language, runtime environment, and large collection of libraries"
9
+HOMEPAGE="http://www.erlang.org/"
10
+SRC_URI="http://www.erlang.org/download/${MY_P}.tar.gz"
11
+
12
+LICENSE="EPL"
13
+SLOT="0"
14
+KEYWORDS="x86 ppc sparc"
15
+IUSE="X ssl"
16
+
17
+DEPEND=">=dev-lang/perl-5.6.1
18
+	ssl? ( >=dev-libs/openssl-0.9.6d )"
19
+
20
+S=${WORKDIR}/${MY_P}
21
+
22
+src_unpack(){
23
+	unpack ${A}
24
+	cd ${S}
25
+	# combines nsswit ch.conf parsing and a fix for strange install behaviour on some systems
26
+	epatch ${FILESDIR}/${PV}.patch
27
+}
28
+
29
+src_compile() {
30
+	[ "`gcc-fullversion`" == "3.3.2" ] && filter-mfpmath sse
31
+	[ "`gcc-fullversion`" == "3.3.3" ] && filter-mfpmath sse
32
+	addpredict /dev/pty # Bug #25366
33
+	econf --enable-threads || die
34
+	make || die
35
+}
36
+
37
+src_install() {
38
+	ERL_LIBDIR="/usr/lib/erlang"
39
+
40
+	make INSTALL_PREFIX=${D} install || die
41
+	dodoc AUTHORS EPLICENCE README
42
+
43
+	dosym ${ERL_LIBDIR}/bin/erl /usr/bin/erl
44
+	dosym ${ERL_LIBDIR}/bin/erlc /usr/bin/erlc
45
+	dosym ${ERL_LIBDIR}/bin/ecc /usr/bin/ecc
46
+	dosym ${ERL_LIBDIR}/bin/elink /usr/bin/elink
47
+	dosym ${ERL_LIBDIR}/bin/ear /usr/bin/ear
48
+	dosym ${ERL_LIBDIR}/bin/escript /usr/bin/escript
49
+
50
+	## Remove ${D} from the following files
51
+	dosed ${ERL_LIBDIR}/bin/erl
52
+	dosed ${ERL_LIBDIR}/bin/start
53
+	dosed ${ERL_LIBDIR}/bin/ecc
54
+	dosed ${ERL_LIBDIR}/bin/ear
55
+	dosed ${ERL_LIBDIR}/bin/elink
56
+	dosed ${ERL_LIBDIR}/bin/escript
57
+	dosed ${ERL_LIBDIR}/bin/esh
58
+	dosed ${ERL_LIBDIR}/erts-*/bin/erl
59
+	dosed ${ERL_LIBDIR}/erts-*/bin/start
60
+
61
+	## Clean up the no longer needed files
62
+	rm ${D}/${ERL_LIBDIR}/Install
63
+}
... ...
@@ -0,0 +1,62 @@
1
+# Copyright 1999-2006 Gentoo Foundation
2
+# Distributed under the terms of the GNU General Public License v2
3
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/erlang/erlang-9c-r3.ebuild,v 1.3 2006/03/07 23:14:21 vapier Exp $
4
+
5
+inherit eutils toolchain-funcs flag-o-matic
6
+
7
+MY_P=otp_src_R9C-0
8
+DESCRIPTION="Erlang programming language, runtime environment, and large collection of libraries"
9
+HOMEPAGE="http://www.erlang.org/"
10
+SRC_URI="http://www.erlang.org/download/${MY_P}.tar.gz"
11
+
12
+LICENSE="EPL"
13
+SLOT="0"
14
+KEYWORDS="-*"
15
+#KEYWORDS="~x86 ~ppc ~sparc ~amd64"
16
+IUSE="X ssl"
17
+
18
+DEPEND=">=dev-lang/perl-5.6.1
19
+	ssl? ( >=dev-libs/openssl-0.9.6d )"
20
+
21
+S=${WORKDIR}/${MY_P}
22
+
23
+src_unpack(){
24
+	unpack ${A}
25
+	cd ${S}
26
+	# combines nsswit ch.conf parsing and a fix for strange install behaviour on some systems
27
+	epatch ${FILESDIR}/${PV}.patch
28
+}
29
+
30
+src_compile() {
31
+	[ "`gcc-fullversion`" == "3.3.2" ] && filter-mfpmath sse
32
+	[ "`gcc-fullversion`" == "3.3.3" ] && filter-mfpmath sse
33
+	addpredict /dev/pty # Bug #25366
34
+
35
+	#erlang configure seems to "misdetect" CHOST on amd64
36
+	[ "${ARCH}" = "amd64" ] && CHOST="x86_64-unknown-linux-gnu"
37
+	econf --enable-threads || die
38
+	make || die
39
+}
40
+
41
+src_install() {
42
+	ERL_LIBDIR="/usr/lib/erlang"
43
+
44
+	make INSTALL_PREFIX=${D} install || die
45
+	dodoc AUTHORS EPLICENCE README
46
+
47
+	dosym ${ERL_LIBDIR}/bin/erl /usr/bin/erl
48
+	dosym ${ERL_LIBDIR}/bin/erlc /usr/bin/erlc
49
+	dosym ${ERL_LIBDIR}/bin/ecc /usr/bin/ecc
50
+	dosym ${ERL_LIBDIR}/bin/elink /usr/bin/elink
51
+	dosym ${ERL_LIBDIR}/bin/ear /usr/bin/ear
52
+	dosym ${ERL_LIBDIR}/bin/escript /usr/bin/escript
53
+
54
+	## Remove ${D} from the following files
55
+	dosed ${ERL_LIBDIR}/bin/erl
56
+	dosed ${ERL_LIBDIR}/bin/start
57
+	cd ${ERL_LIBDIR}/erts-*
58
+	grep -rle ${D} ${D}/${ERL_LIBDIR}/erts-* | xargs sed -i -e "s:${D}::g"
59
+
60
+	## Clean up the no longer needed files
61
+	rm ${D}/${ERL_LIBDIR}/Install
62
+}
... ...
@@ -0,0 +1,53 @@
1
+# Copyright 1999-2006 Gentoo Foundation
2
+# Distributed under the terms of the GNU General Public License v2
3
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/erlang/erlang-9c.ebuild,v 1.7 2006/03/07 23:14:21 vapier Exp $
4
+
5
+MY_P=otp_src_R9B-1
6
+DESCRIPTION="Erlang programming language, runtime environment, and large collection of libraries"
7
+HOMEPAGE="http://www.erlang.org/"
8
+SRC_URI="http://www.erlang.org/download/${MY_P}.tar.gz"
9
+
10
+LICENSE="EPL"
11
+SLOT="0"
12
+KEYWORDS="x86 ~ppc ~sparc"
13
+IUSE="X ssl"
14
+
15
+DEPEND=">=dev-lang/perl-5.6.1
16
+	ssl? ( >=dev-libs/openssl-0.9.6d )"
17
+
18
+S=${WORKDIR}/${MY_P}
19
+
20
+addpredict /dev/pty # Bug #25366
21
+
22
+src_compile() {
23
+	econf --enable-threads || die "./configure failed"
24
+	make || die
25
+}
26
+
27
+src_install() {
28
+	ERL_LIBDIR="/usr/lib/erlang"
29
+
30
+	make INSTALL_PREFIX=${D} install || die
31
+	dodoc AUTHORS EPLICENCE README
32
+
33
+	dosym ${ERL_LIBDIR}/bin/erl /usr/bin/erl
34
+	dosym ${ERL_LIBDIR}/bin/erlc /usr/bin/erlc
35
+	dosym ${ERL_LIBDIR}/bin/ecc /usr/bin/ecc
36
+	dosym ${ERL_LIBDIR}/bin/elink /usr/bin/elink
37
+	dosym ${ERL_LIBDIR}/bin/ear /usr/bin/ear
38
+	dosym ${ERL_LIBDIR}/bin/escript /usr/bin/escript
39
+
40
+	## Remove ${D} from the following files
41
+	dosed ${ERL_LIBDIR}/bin/erl
42
+	dosed ${ERL_LIBDIR}/bin/start
43
+	dosed ${ERL_LIBDIR}/bin/ecc
44
+	dosed ${ERL_LIBDIR}/bin/ear
45
+	dosed ${ERL_LIBDIR}/bin/elink
46
+	dosed ${ERL_LIBDIR}/bin/escript
47
+	dosed ${ERL_LIBDIR}/bin/esh
48
+	dosed ${ERL_LIBDIR}/erts-*/bin/erl
49
+	dosed ${ERL_LIBDIR}/erts-*/bin/start
50
+
51
+	## Clean up the no longer needed files
52
+	rm ${D}/${ERL_LIBDIR}/Install
53
+}
... ...
@@ -0,0 +1,31 @@
1
+diff -ur otp_src_R10B-6.orig/lib/tools/emacs/erlang.el otp_src_R10B-6/lib/tools/emacs/erlang.el
2
+--- otp_src_R10B-6.orig/lib/tools/emacs/erlang.el	2004-09-30 02:05:50.000000000 -0500
3
++++ otp_src_R10B-6/lib/tools/emacs/erlang.el	2005-07-18 13:52:13.000000000 -0500
4
+@@ -2518,7 +2518,7 @@
5
+ 
6
+ (defun erlang-man-make-menu-item (file)
7
+   "Create a menu item containing the name of the man page."
8
+-  (and (string-match ".*/\\([^/]+\\)\\.[^.]$" file)
9
++  (and (string-match ".*/\\([^/]+\\)\\.[0-9]erl\\.gz$" file)
10
+        (let ((page (substring file (match-beginning 1) (match-end 1))))
11
+ 	 (list (capitalize page)
12
+ 	       (list 'lambda '()
13
+@@ -2529,7 +2529,7 @@
14
+ 
15
+ (defun erlang-man-get-files (dir)
16
+   "Return files in directory DIR."
17
+-  (directory-files dir t ".*\\.[0-9]\\'"))
18
++  (directory-files dir t ".*\\.[0-9]erl\\.gz\\'"))
19
+ 
20
+ 
21
+ (defun erlang-man-module (&optional module)
22
+@@ -2690,7 +2690,7 @@
23
+     (error nil))
24
+   (if file
25
+       (let ((process-environment (copy-sequence process-environment)))
26
+-	(if (string-match "\\(.*\\)/man[^/]*/\\([^/]+\\)\\.[^.]$" file)
27
++	(if (string-match "\\(.*\\)/man[^/]*/\\([^/]+\\)\\.[0-9]erl.gz$" file)
28
+ 	    (let ((dir (substring file (match-beginning 1) (match-end 1)))
29
+ 		  (page (substring file (match-beginning 2) (match-end 2))))
30
+ 	      (if (fboundp 'setenv)
31
+Only in otp_src_R10B-6/lib/tools/emacs: erlang.el~
... ...
@@ -0,0 +1,31 @@
1
+diff -ur otp_src_R10B-6.orig/lib/tools/emacs/erlang.el otp_src_R10B-6/lib/tools/emacs/erlang.el
2
+--- otp_src_R10B-6.orig/lib/tools/emacs/erlang.el	2004-09-30 02:05:50.000000000 -0500
3
++++ otp_src_R10B-6/lib/tools/emacs/erlang.el	2005-07-18 13:52:13.000000000 -0500
4
+@@ -2518,7 +2518,7 @@
5
+ 
6
+ (defun erlang-man-make-menu-item (file)
7
+   "Create a menu item containing the name of the man page."
8
+-  (and (string-match ".*/\\([^/]+\\)\\.[^.]$" file)
9
++  (and (string-match ".*/\\([^/]+\\)\\.[0-9]erl\\.gz$" file)
10
+        (let ((page (substring file (match-beginning 1) (match-end 1))))
11
+ 	 (list (capitalize page)
12
+ 	       (list 'lambda '()
13
+@@ -2529,7 +2529,7 @@
14
+ 
15
+ (defun erlang-man-get-files (dir)
16
+   "Return files in directory DIR."
17
+-  (directory-files dir t ".*\\.[0-9]\\'"))
18
++  (directory-files dir t ".*\\.[0-9]erl\\.gz\\'"))
19
+ 
20
+ 
21
+ (defun erlang-man-module (&optional module)
22
+@@ -2690,7 +2690,7 @@
23
+     (error nil))
24
+   (if file
25
+       (let ((process-environment (copy-sequence process-environment)))
26
+-	(if (string-match "\\(.*\\)/man[^/]*/\\([^/]+\\)\\.[^.]$" file)
27
++	(if (string-match "\\(.*\\)/man[^/]*/\\([^/]+\\)\\.[0-9]erl.gz$" file)
28
+ 	    (let ((dir (substring file (match-beginning 1) (match-end 1)))
29
+ 		  (page (substring file (match-beginning 2) (match-end 2))))
30
+ 	      (if (fboundp 'setenv)
31
+Only in otp_src_R10B-6/lib/tools/emacs: erlang.el~
... ...
@@ -0,0 +1,5 @@
1
+;;; erlang site-lisp configuration
2
+
3
+(add-to-list 'load-path "@SITELISP@")
4
+(load-library "erlang-start")
5
+(setq erlang-root-dir "/usr/share")
... ...
@@ -0,0 +1,55 @@
1
+diff -ru otp_src_R9B-1-orig/lib/kernel/src/inet_config.erl otp_src_R9B-1/lib/kernel/src/inet_config.erl
2
+--- otp_src_R9B-1-orig/lib/kernel/src/inet_config.erl	2002-10-09 07:39:22.000000000 -0700
3
++++ otp_src_R9B-1/lib/kernel/src/inet_config.erl	2003-07-03 17:43:37.000000000 -0700
4
+@@ -82,8 +82,13 @@
5
+ 		'bsd/os' ->
6
+ 		    load_resolv(filename:join(Etc,"irs.conf"), host_conf_bsdos);
7
+ 		linux ->
8
+-		    load_resolv(filename:join(Etc,"host.conf"),host_conf_linux),
9
+-
10
++		    case load_resolv(filename:join(Etc,"host.conf"),host_conf_linux) of
11
++			ok ->
12
++			    ok;
13
++			_Other ->
14
++			    load_resolv(filename:join(Etc,"nsswitch.conf"), nsswitch_conf)
15
++		    end,
16
++		    
17
+ 		    % It may be the case that the domain name was not set
18
+ 		    % because the hostname was short. But we can now look it
19
+ 		    % up and get the long name and the domain name from it.
20
+@@ -296,10 +301,12 @@
21
+ 	    case apply(inet_parse, Func, [File,{chars,Bin}]) of
22
+ 		{ok, Ls} -> inet_db:add_rc_list(Ls);
23
+ 		{error, Reason} ->
24
+-		    error("parse error in file ~s: ~p", [File, Reason])
25
++		    error("parse error in file ~s: ~p", [File, Reason]),
26
++		    {error, Reason}
27
+ 	    end;
28
+ 	Error ->
29
+-	    warning("file not found ~s~n", [File])
30
++	    warning("file not found ~s~n", [File]),
31
++	    Error
32
+     end.
33
+ 
34
+ %%
35
+diff -ru otp_src_R9B-1-orig/lib/megaco/src/text/Makefile otp_src_R9B-1/lib/megaco/src/text/Makefile
36
+--- otp_src_R9B-1-orig/lib/megaco/src/text/Makefile	2002-11-28 05:50:00.000000000 -0800
37
++++ otp_src_R9B-1/lib/megaco/src/text/Makefile	2003-07-03 17:44:41.000000000 -0700
38
+@@ -48,10 +48,15 @@
39
+ 	$(INTERNAL_YRL_FILES:%.yrl=%.erl)
40
+ 
41
+ BEAM_TARGET_FILES = \
42
+-	$(INTERNAL_YRL_FILES:%.yrl=$(EBIN)/%.$(EMULATOR)) \
43
+ 	$(MODULES:%=$(EBIN)/%.$(EMULATOR))
44
+ 
45
+-TARGET_FILES = $(ERL_TARGET_FILES) $(BEAM_TARGET_FILES)
46
++YRL_BEAM_TARGET_FILES = \
47
++	$(INTERNAL_YRL_FILES:%.yrl=$(EBIN)/%.$(EMULATOR)) 
48
++
49
++
50
++
51
++TARGET_FILES = $(ERL_TARGET_FILES) $(BEAM_TARGET_FILES) $(YRL_BEAM_TARGETS)
52
++
53
+ 
54
+ 
55
+ # ----------------------------------------------------
... ...
@@ -0,0 +1 @@
1
+MD5 e6b776520521d92fe019d116de181ce4 otp_src_R10B-0.tar.gz 9296524
... ...
@@ -0,0 +1,12 @@
1
+MD5 d6e9655ff07af642025b0465c5e7e1a6 otp_doc_html_R10B-10.tar.gz 4655081
2
+RMD160 d11108d871ab7f164c7e4dd1000cd8cdca7cb64d otp_doc_html_R10B-10.tar.gz 4655081
3
+SHA256 2373d6935b44b64a137bf8ba198dca3fb782d0c072735b172ae4420c380a5d9c otp_doc_html_R10B-10.tar.gz 4655081
4
+MD5 207e00bcaf5a9428bd86e3973f9b699f otp_doc_man_R10B-10.tar.gz 594690
5
+RMD160 b56260b7349cd4751ca56ec15fdc5515041b130b otp_doc_man_R10B-10.tar.gz 594690
6
+SHA256 8ecfc9b627200f59c35591a743e03a587258ddcdd39052a0b2cb58b80f6fc20b otp_doc_man_R10B-10.tar.gz 594690
7
+MD5 c1405c885f07d661b7362b822d571586 otp_src_R10B-10.tar.gz 9445437
8
+RMD160 b0e24e89241a21d5f3304791b505ab133db8fca5 otp_src_R10B-10.tar.gz 9445437
9
+SHA256 bd87e1b09f1f3d694fc32ef4d27372e25c95ce35b383c7747ab40c27471c28ac otp_src_R10B-10.tar.gz 9445437
10
+MD5 280f7ff43d4651ff637216800e16e493 otp_src_R10B-10_epoll.patch 15359
11
+RMD160 40a1282c6223081b4d2d9c06b30bc16163aa495f otp_src_R10B-10_epoll.patch 15359
12
+SHA256 7b8bbad71649e9b00f9f8639b0fe06060428aa4015eb6164e78d18a0b2508a5b otp_src_R10B-10_epoll.patch 15359
... ...
@@ -0,0 +1,3 @@
1
+MD5 fa6c4ba8291e1d11ae412e4d6f0fa392 otp_src_R10B-5.tar.gz 9996505
2
+MD5 7615ad16c1f26e4cd8891d968d1168fa otp_doc_html_R10B-5.tar.gz 4591317
3
+MD5 a64d7797ce0f98363f8bd59608a35a58 otp_doc_man_R10B-5.tar.gz 597252
... ...
@@ -0,0 +1,9 @@
1
+MD5 9f50340fd1c25af5d5a6fcf9f14b2e49 otp_doc_html_R10B-6.tar.gz 4602685
2
+RMD160 f9ecb2ed8d6d0583e340d719ec56a3e670e9856b otp_doc_html_R10B-6.tar.gz 4602685
3
+SHA256 50174508e8507c18b1b5e80805f70fdf680db4b9b81cd9bf2cc8e1ac020e910b otp_doc_html_R10B-6.tar.gz 4602685
4
+MD5 0243d2ff01fb2bac03115bcbe2284b20 otp_doc_man_R10B-6.tar.gz 601812
5
+RMD160 82f414e454b3bca56c828e5ddb1bf59f42f945e6 otp_doc_man_R10B-6.tar.gz 601812
6
+SHA256 639b60c7950724566fd0d7df59b0faa683d678cd5929a138592a6affb9c6b36a otp_doc_man_R10B-6.tar.gz 601812
7
+MD5 6463f70b40e2a6c3587e54653add8414 otp_src_R10B-6.tar.gz 10037987
8
+RMD160 009dcaa078ee6045e352bc700e581ea222058f4e otp_src_R10B-6.tar.gz 10037987
9
+SHA256 7c6d02954b8f84e68224677eaa829a234c3aafc26ec94655e574a8028d1d40bf otp_src_R10B-6.tar.gz 10037987
... ...
@@ -0,0 +1,12 @@
1
+MD5 c73010c3d6c929c4474b8b8b38a4925c otp_doc_html_R10B-7.tar.gz 4601134
2
+RMD160 4cba94ec7162b35696bd471b2c32cf26935f3d6b otp_doc_html_R10B-7.tar.gz 4601134
3
+SHA256 d69aa07cfe3851da1c4d558cbd7a17cafc7546b396f7ab07c68a18e44cc40e71 otp_doc_html_R10B-7.tar.gz 4601134
4
+MD5 53b251d1a690d5a97434c6a5b0086921 otp_doc_man_R10B-7.tar.gz 601650
5
+RMD160 d5f33c5e35b79222fa5b57cbe736a983fa0d0316 otp_doc_man_R10B-7.tar.gz 601650
6
+SHA256 5bd1ba759245a5c41e7d25121c5e5ab58d0d04935eceb0960a8fb5d0bab3297d otp_doc_man_R10B-7.tar.gz 601650
7
+MD5 fc039c62862ebae141e27370401aaab0 otp_src_R10B-7.tar.gz 10058423
8
+RMD160 b97700467f855110ff1beb4e7725bb716f6a4b2e otp_src_R10B-7.tar.gz 10058423
9
+SHA256 7b0f96596c031a79b0f975423f0535ddba1a8d86868bb28ac3f5383709c30bf1 otp_src_R10B-7.tar.gz 10058423
10
+MD5 37b6e5972b2cbf536dbbf55fe61c6251 otp_src_R10B-7_epoll.patch 14823
11
+RMD160 559303afe1be7c9797146b33490f0bd7c567f804 otp_src_R10B-7_epoll.patch 14823
12
+SHA256 275ac0cd6a20f329b8c32937b08a1aea118b0073536b8910495c806191474c0e otp_src_R10B-7_epoll.patch 14823
... ...
@@ -0,0 +1,9 @@
1
+MD5 8d163f4d16c98ba2e979688842a55a9f otp_doc_html_R11B-0.tar.gz 4662110
2
+RMD160 ec39aa3e693a0b836b8ca9c360c14c2612c1b813 otp_doc_html_R11B-0.tar.gz 4662110
3
+SHA256 68cb74d5979dd2ea75c03e892e7ce1446eff27af37d9bdd4fd9778a433a19f68 otp_doc_html_R11B-0.tar.gz 4662110
4
+MD5 172591538db42e81b814a77f30da4fa4 otp_doc_man_R11B-0.tar.gz 624684
5
+RMD160 38d9218391147e192d21c438d436c98d7c0f982a otp_doc_man_R11B-0.tar.gz 624684
6
+SHA256 09b93f43b6bb048d3b66296e94bb6379dbac11217e2ffbe074c2492fe777ee39 otp_doc_man_R11B-0.tar.gz 624684
7
+MD5 367d9d3ba979cd278b78d6d0393982ba otp_src_R11B-0.tar.gz 10844070
8
+RMD160 cb2c163f9404feea9b56a5adddb3bdd505e0b494 otp_src_R11B-0.tar.gz 10844070
9
+SHA256 1806ea681b72be216e5365b29479dcb5253f0d828c021282711f5eae984c9f11 otp_src_R11B-0.tar.gz 10844070
... ...
@@ -0,0 +1,9 @@
1
+MD5 f5d3b25821f6d0763defd09f1dd4f51f otp_doc_html_R11B-1.tar.gz 4717809
2
+RMD160 2a7425f55245b12037a02082ace85411c04c5bb6 otp_doc_html_R11B-1.tar.gz 4717809
3
+SHA256 225212891e2290d0ea21e489445113d7f79ad51e4b3e3e4f0042f8876383a7bc otp_doc_html_R11B-1.tar.gz 4717809
4
+MD5 dbd2d3da878fed7474b7a9aa03e13c7d otp_doc_man_R11B-1.tar.gz 627132
5
+RMD160 666899dedc72f22387d478ffe4a1f313c57bdb01 otp_doc_man_R11B-1.tar.gz 627132
6
+SHA256 706e7da589cddee06b9d0a24a09e2105ae719bbfb8b6a08fe55ae45d5dbf4bd6 otp_doc_man_R11B-1.tar.gz 627132
7
+MD5 1fe3707d9bed898bc51444cb529fdd79 otp_src_R11B-1.tar.gz 11144896
8
+RMD160 db658f8221c4226f52c88ff56d2f68afbe47bac2 otp_src_R11B-1.tar.gz 11144896
9
+SHA256 d5a8530dfee0b2348c4ad0107409fa73ac3233f31e2300ece625a2abd9eb4da7 otp_src_R11B-1.tar.gz 11144896
... ...
@@ -0,0 +1,9 @@
1
+MD5 e2c45ced77ec63b9b1dd95c8f5396f7d otp_doc_html_R11B-2.tar.gz 4739895
2
+RMD160 82a4ab769566705333e059d920861d05be31754b otp_doc_html_R11B-2.tar.gz 4739895
3
+SHA256 588514c6b96b33dbaffd40aa5b51b9c0be65d02b6e81644c53b4c705a866db47 otp_doc_html_R11B-2.tar.gz 4739895
4
+MD5 c81023f591c1bace836de3aa874f3c2a otp_doc_man_R11B-2.tar.gz 632153
5
+RMD160 90b37a71ed29f14ec0d14a520aef47ed7b7ccad0 otp_doc_man_R11B-2.tar.gz 632153
6
+SHA256 643fb8210a2059b2c283c17601a0d5893f5cf409f05ed4852fbf2b0607693ac9 otp_doc_man_R11B-2.tar.gz 632153
7
+MD5 7d7cca1d2f392a8a317cb4c0bd904726 otp_src_R11B-2.tar.gz 11244153
8
+RMD160 989bab054992ba23666756379950082cd41adb00 otp_src_R11B-2.tar.gz 11244153
9
+SHA256 3dd483ee568c31655361474aa54a28cf11575c3b1b984f0b7a6980e083a8e44b otp_src_R11B-2.tar.gz 11244153
... ...
@@ -0,0 +1 @@
1
+MD5 c7f06d2a4d7f52655b630d99d301f0a1 otp_src_R8B-2.tar.gz 10905100
... ...
@@ -0,0 +1 @@
1
+MD5 37ac7d5e4e9fa7730775e590f4796bbf otp_src_R9B-1.tar.gz 8455643
... ...
@@ -0,0 +1 @@
1
+MD5 37ac7d5e4e9fa7730775e590f4796bbf otp_src_R9B-1.tar.gz 8455643
... ...
@@ -0,0 +1 @@
1
+MD5 d40842cf79ca65007de5ad54d3c50d18 otp_src_R9C-0.tar.gz 8229056
... ...
@@ -0,0 +1 @@
1
+MD5 d40842cf79ca65007de5ad54d3c50d18 otp_src_R9C-0.tar.gz 8229056
... ...
@@ -0,0 +1,11 @@
1
+--- Makefile.in
2
++++ Makefile.in
3
+@@ -85,7 +85,7 @@
4
+ MAKE    = @MAKE_PROG@
5
+ 
6
+ # This should be set to the target "arch-vendor-os"
7
+-TARGET  = @TARGET@
8
++export TARGET  = @TARGET@
9
+ 
10
+ # A BSD compatible install program
11
+ INSTALL         = @INSTALL@
... ...
@@ -0,0 +1,11 @@
1
+--- Makefile.in
2
++++ Makefile.in
3
+@@ -85,7 +85,7 @@
4
+ MAKE    = @MAKE_PROG@
5
+ 
6
+ # This should be set to the target "arch-vendor-os"
7
+-TARGET  = @TARGET@
8
++export TARGET  = @TARGET@
9
+ 
10
+ # A BSD compatible install program
11
+ INSTALL         = @INSTALL@
... ...
@@ -0,0 +1,423 @@
1
+diff -Nurp erts/acconfig.h erts/acconfig.h
2
+--- erts/acconfig.h	2005-06-21 09:37:40.000000000 -0700
3
++++ erts/acconfig.h	2006-03-10 15:55:12.000000000 -0800
4
+@@ -188,6 +188,9 @@
5
+ /* Define if you have the <linux/kpoll.h> header file. */
6
+ #undef HAVE_LINUX_KPOLL_H
7
+  
8
++/* Define if you have the <linux/epoll.h> header file. */
9
++#undef HAVE_LINUX_EPOLL_H
10
++
11
+ /* Define if you have the <sys/event.h> header file. */
12
+ #undef HAVE_SYS_EVENT_H
13
+ 
14
+@@ -224,7 +227,7 @@
15
+ 
16
+ #if !defined(USE_SELECT)
17
+ #  if defined(ENABLE_KERNEL_POLL)
18
+-#    if defined(HAVE_SYS_DEVPOLL_H) || defined(HAVE_LINUX_KPOLL_H) || defined(HAVE_SYS_EVENT_H)
19
++#    if defined(HAVE_SYS_DEVPOLL_H) || defined(HAVE_LINUX_KPOLL_H) || defined(HAVE_SYS_EVENT_H) || defined(HAVE_LINUX_EPOLL_H)
20
+ #      define USE_KERNEL_POLL
21
+ #    endif
22
+ #  endif
23
+diff -Nurp erts/config.h.in erts/config.h.in
24
+--- erts/config.h.in	2006-03-07 15:02:41.000000000 -0800
25
++++ erts/config.h.in	2006-03-10 15:55:12.000000000 -0800
26
+@@ -175,6 +175,8 @@
27
+ /* Define if you have the <linux/kpoll.h> header file. */
28
+ #undef HAVE_LINUX_KPOLL_H
29
+ 
30
++/* Define if you have the <linux/epoll.h> header file. */
31
++#undef HAVE_LINUX_EPOLL_H
32
+  
33
+ /* Define if you have the <sys/event.h> header file. */
34
+ #undef HAVE_SYS_EVENT_H
35
+@@ -399,7 +401,7 @@
36
+ 
37
+ #if !defined(USE_SELECT)
38
+ #  if defined(ENABLE_KERNEL_POLL)
39
+-#    if defined(HAVE_SYS_DEVPOLL_H) || defined(HAVE_LINUX_KPOLL_H) || defined(HAVE_SYS_EVENT_H)
40
++#    if defined(HAVE_SYS_DEVPOLL_H) || defined(HAVE_LINUX_KPOLL_H) || defined(HAVE_SYS_EVENT_H) || defined(HAVE_LINUX_EPOLL_H)
41
+ #      define USE_KERNEL_POLL
42
+ #    endif
43
+ #  endif
44
+diff -Nurp erts/configure erts/configure
45
+--- erts/configure	2006-03-07 15:02:39.000000000 -0800
46
++++ erts/configure	2006-03-10 15:55:12.000000000 -0800
47
+@@ -3825,6 +3825,151 @@ else
48
+ fi
49
+  
50
+ 
51
++
52
++if test "${ac_cv_header_sys_epoll_h+set}" = set; then
53
++  echo "$as_me:$LINENO: checking for sys/epoll.h" >&5
54
++echo $ECHO_N "checking for sys/epoll.h... $ECHO_C" >&6
55
++if test "${ac_cv_header_sys_epoll_h+set}" = set; then
56
++  echo $ECHO_N "(cached) $ECHO_C" >&6
57
++fi
58
++echo "$as_me:$LINENO: result: $ac_cv_header_sys_epoll_h" >&5
59
++echo "${ECHO_T}$ac_cv_header_sys_epoll_h" >&6
60
++else
61
++  # Is the header compilable?
62
++echo "$as_me:$LINENO: checking sys/epoll.h usability" >&5
63
++echo $ECHO_N "checking sys/epoll.h usability... $ECHO_C" >&6
64
++cat >conftest.$ac_ext <<_ACEOF
65
++/* confdefs.h.  */
66
++_ACEOF
67
++cat confdefs.h >>conftest.$ac_ext
68
++cat >>conftest.$ac_ext <<_ACEOF
69
++/* end confdefs.h.  */
70
++$ac_includes_default
71
++#include <sys/epoll.h>
72
++_ACEOF
73
++rm -f conftest.$ac_objext
74
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
75
++  (eval $ac_compile) 2>conftest.er1
76
++  ac_status=$?
77
++  grep -v '^ *+' conftest.er1 >conftest.err
78
++  rm -f conftest.er1
79
++  cat conftest.err >&5
80
++  echo "$as_me:$LINENO: \$? = $ac_status" >&5
81
++  (exit $ac_status); } &&
82
++	 { ac_try='test -z "$ac_c_werror_flag"
83
++			 || test ! -s conftest.err'
84
++  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
85
++  (eval $ac_try) 2>&5
86
++  ac_status=$?
87
++  echo "$as_me:$LINENO: \$? = $ac_status" >&5
88
++  (exit $ac_status); }; } &&
89
++	 { ac_try='test -s conftest.$ac_objext'
90
++  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
91
++  (eval $ac_try) 2>&5
92
++  ac_status=$?
93
++  echo "$as_me:$LINENO: \$? = $ac_status" >&5
94
++  (exit $ac_status); }; }; then
95
++  ac_header_compiler=yes
96
++else
97
++  echo "$as_me: failed program was:" >&5
98
++sed 's/^/| /' conftest.$ac_ext >&5
99
++
100
++ac_header_compiler=no
101
++fi
102
++rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
103
++echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
104
++echo "${ECHO_T}$ac_header_compiler" >&6
105
++
106
++# Is the header present?
107
++echo "$as_me:$LINENO: checking sys/epoll.h presence" >&5
108
++echo $ECHO_N "checking sys/epoll.h presence... $ECHO_C" >&6
109
++cat >conftest.$ac_ext <<_ACEOF
110
++/* confdefs.h.  */
111
++_ACEOF
112
++cat confdefs.h >>conftest.$ac_ext
113
++cat >>conftest.$ac_ext <<_ACEOF
114
++/* end confdefs.h.  */
115
++#include <sys/epoll.h>
116
++_ACEOF
117
++if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
118
++  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
119
++  ac_status=$?
120
++  grep -v '^ *+' conftest.er1 >conftest.err
121
++  rm -f conftest.er1
122
++  cat conftest.err >&5
123
++  echo "$as_me:$LINENO: \$? = $ac_status" >&5
124
++  (exit $ac_status); } >/dev/null; then
125
++  if test -s conftest.err; then
126
++    ac_cpp_err=$ac_c_preproc_warn_flag
127
++    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
128
++  else
129
++    ac_cpp_err=
130
++  fi
131
++else
132
++  ac_cpp_err=yes
133
++fi
134
++if test -z "$ac_cpp_err"; then
135
++  ac_header_preproc=yes
136
++else
137
++  echo "$as_me: failed program was:" >&5
138
++sed 's/^/| /' conftest.$ac_ext >&5
139
++
140
++  ac_header_preproc=no
141
++fi
142
++rm -f conftest.err conftest.$ac_ext
143
++echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
144
++echo "${ECHO_T}$ac_header_preproc" >&6
145
++
146
++# So?  What about this header?
147
++case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
148
++  yes:no: )
149
++    { echo "$as_me:$LINENO: WARNING: sys/epoll.h: accepted by the compiler, rejected by the preprocessor!" >&5
150
++echo "$as_me: WARNING: sys/epoll.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
151
++    { echo "$as_me:$LINENO: WARNING: sys/epoll.h: proceeding with the compiler's result" >&5
152
++echo "$as_me: WARNING: sys/epoll.h: proceeding with the compiler's result" >&2;}
153
++    ac_header_preproc=yes
154
++    ;;
155
++  no:yes:* )
156
++    { echo "$as_me:$LINENO: WARNING: sys/epoll.h: present but cannot be compiled" >&5
157
++echo "$as_me: WARNING: sys/epoll.h: present but cannot be compiled" >&2;}
158
++    { echo "$as_me:$LINENO: WARNING: sys/epoll.h:     check for missing prerequisite headers?" >&5
159
++echo "$as_me: WARNING: sys/epoll.h:     check for missing prerequisite headers?" >&2;}
160
++    { echo "$as_me:$LINENO: WARNING: sys/epoll.h: see the Autoconf documentation" >&5
161
++echo "$as_me: WARNING: sys/epoll.h: see the Autoconf documentation" >&2;}
162
++    { echo "$as_me:$LINENO: WARNING: sys/epoll.h:     section \"Present But Cannot Be Compiled\"" >&5
163
++echo "$as_me: WARNING: sys/epoll.h:     section \"Present But Cannot Be Compiled\"" >&2;}
164
++    { echo "$as_me:$LINENO: WARNING: sys/epoll.h: proceeding with the preprocessor's result" >&5
165
++echo "$as_me: WARNING: sys/epoll.h: proceeding with the preprocessor's result" >&2;}
166
++    { echo "$as_me:$LINENO: WARNING: sys/epoll.h: in the future, the compiler will take precedence" >&5
167
++echo "$as_me: WARNING: sys/epoll.h: in the future, the compiler will take precedence" >&2;}
168
++    (
169
++      cat <<\_ASBOX
170
++## ------------------------------------------ ##
171
++## Report this to the AC_PACKAGE_NAME lists.  ##
172
++## ------------------------------------------ ##
173
++_ASBOX
174
++    ) |
175
++      sed "s/^/$as_me: WARNING:     /" >&2
176
++    ;;
177
++esac
178
++echo "$as_me:$LINENO: checking for sys/epoll.h" >&5
179
++echo $ECHO_N "checking for sys/epoll.h... $ECHO_C" >&6
180
++if test "${ac_cv_header_sys_epoll_h+set}" = set; then
181
++  echo $ECHO_N "(cached) $ECHO_C" >&6
182
++else
183
++  ac_cv_header_sys_epoll_h=$ac_header_preproc
184
++fi
185
++echo "$as_me:$LINENO: result: $ac_cv_header_sys_epoll_h" >&5
186
++echo "${ECHO_T}$ac_cv_header_sys_epoll_h" >&6
187
++
188
++fi
189
++if test $ac_cv_header_sys_epoll_h = yes; then
190
++  cat >>confdefs.h <<\_ACEOF
191
++#define HAVE_LINUX_EPOLL_H 1
192
++_ACEOF
193
++
194
++fi
195
++
196
+ echo $ac_n "checking for SO_BSDCOMPAT declaration""... $ac_c" 1>&6
197
+ echo "configure:3830: checking for SO_BSDCOMPAT declaration" >&5
198
+ if eval "test \"`echo '$''{'ac_cv_decl_so_bsdcompat'+set}'`\" = set"; then
199
+diff -Nurp erts/configure.in erts/configure.in
200
+--- erts/configure.in	2006-03-07 06:25:41.000000000 -0800
201
++++ erts/configure.in	2006-03-10 15:55:12.000000000 -0800
202
+@@ -664,6 +664,7 @@ dnl Check if we have kernel poll support
203
+ AC_CHECK_HEADER(sys/devpoll.h, AC_DEFINE(HAVE_SYS_DEVPOLL_H))
204
+ AC_CHECK_HEADER(linux/kpoll.h, AC_DEFINE(HAVE_LINUX_KPOLL_H))
205
+ AC_CHECK_HEADER(sys/event.h, AC_DEFINE(HAVE_SYS_EVENT_H))
206
++AC_CHECK_HEADER(sys/epoll.h, AC_DEFINE(HAVE_LINUX_EPOLL_H))
207
+
208
+ HAVE_VALGRIND=no
209
+ AC_CHECK_HEADER(valgrind/valgrind.h, HAVE_VALGRIND=yes)
210
+ AC_SUBST(HAVE_VALGRIND)
211
+diff -Nurp erts/emulator/sys/unix/sys.c erts/emulator/sys/unix/sys.c
212
+--- erts/emulator/sys/unix/sys.c	2006-03-07 06:24:29.000000000 -0800
213
++++ erts/emulator/sys/unix/sys.c	2006-03-10 15:55:12.000000000 -0800
214
+@@ -13,6 +13,12 @@
215
+  * Portions created by Ericsson are Copyright 1999, Ericsson Utvecklings
216
+  * AB. All Rights Reserved.''
217
+  * 
218
++ * 2005-08-31
219
++ * This has been modified by Matthew Reilly of SIPphone Inc. to 
220
++ * enable kernel poll (+K true) support via the epoll mechanism in Linux 2.6
221
++ * Portions created by SIPphone Inc. are Copyright 2005, SIPphone Inc.
222
++ * These modifications are released under the Erlang Public License.
223
++ *
224
+  *     $Id$
225
+  */
226
+ 
227
+@@ -50,6 +56,9 @@
228
+ #      define USE_DEVPOLL
229
+ #      include <sys/devpoll.h>
230
+ #    endif
231
++#    ifdef HAVE_LINUX_EPOLL_H /* Too minimize code changes, we pretend we have HAVE_LINUX_KPOLL_H as well */
232
++#      define HAVE_LINUX_KPOLL_H 1
233
++#    endif
234
+ #    ifdef HAVE_LINUX_KPOLL_H
235
+ #      define USE_DEVPOLL
236
+ #      include <asm/page.h>
237
+@@ -58,7 +67,11 @@
238
+ #      ifndef POLLREMOVE
239
+ #        define POLLREMOVE 0x1000 /* some day it will make it to bits/poll.h ;-) */
240
+ #      endif
241
+-#      include <linux/kpoll.h>
242
++#      ifdef HAVE_LINUX_EPOLL_H
243
++#        include <sys/epoll.h>
244
++#      else
245
++#        include <linux/kpoll.h>
246
++#      endif
247
+ #    endif
248
+ #    ifdef USE_DEVPOLL /* can only use one of them ... */
249
+ #      ifdef USE_KQUEUE
250
+@@ -188,8 +201,17 @@ static int use_kernel_poll = 0;
251
+ 
252
+ static int             dev_poll_fd;   /* fd for /dev/poll */
253
+ #ifdef HAVE_LINUX_KPOLL_H
254
++
255
++#ifdef HAVE_LINUX_EPOLL_H
256
++static struct epoll_event* dev_epoll_map;
257
++/* XXX Implement correct mapping from POLLIN/POLLOUT to/from EPOLLIN/EPOLLOUT */
258
++/* Currenltly POLLIN/POLLOUT == EPOLLIN/EPOLLOUT. So these macros will work */
259
++#define EPOLL_TO_POLL(bit_map) (bit_map)
260
++#define POLL_TO_EPOLL(bit_map) (bit_map & (EPOLLIN|EPOLLOUT))
261
++#else
262
+ static char *          dev_poll_map;  /* mmap'ed area from kernel /dev/kpoll */
263
+ static struct k_poll   dev_poll;      /* control block for /dev/kpoll */
264
++#endif /* HAVE_LINUX_KPOLL_H */
265
+ static int max_poll_idx;              /* highest non /dev/kpoll fd */
266
+ 
267
+ static void kpoll_enable();
268
+@@ -199,7 +221,7 @@ static struct dvpoll   dev_poll;      /*
269
+ static struct pollfd*  dev_poll_rfds = NULL; /* Allocated at startup */
270
+ 
271
+ static void devpoll_init(void);
272
+-static void devpoll_update_pix(int pix);
273
++static void devpoll_update_pix(int pix, int old_events);
274
+ #ifdef HAVE_SYS_DEVPOLL_H
275
+ static void devpoll_clear_pix(int pix);
276
+ #endif /* HAVE_SYS_DEVPOLL_H */
277
+@@ -1967,7 +1989,7 @@ static int driver_select_kp(ErlDrvPort i
278
+ 
279
+ #ifdef USE_DEVPOLL
280
+ 	    if (poll_fds[pix].events != old_events) 
281
+-                devpoll_update_pix(pix);
282
++                devpoll_update_pix(pix, old_events);
283
+ #endif
284
+ #ifdef USE_KQUEUE
285
+ 	    if (poll_fds[pix].events != old_events) 
286
+@@ -2023,7 +2045,7 @@ static int driver_select_kp(ErlDrvPort i
287
+ 	    if ( old_events && (dev_poll_fd != -1) ) {
288
+ 	       /* Tell /dev/[k]poll that we are not interested any more ... */
289
+ 	       poll_fds[pix].events = POLLREMOVE;
290
+-	       devpoll_update_pix(pix);
291
++	       devpoll_update_pix(pix, old_events);
292
+ 	       /* devpoll_update_pix may change the pix */
293
+ 	       pix = fd_data[fd].pix;
294
+ 	       poll_fds[pix].events = 0;
295
+@@ -2080,7 +2102,7 @@ static int driver_select_kp(ErlDrvPort i
296
+ #ifdef HAVE_SYS_DEVPOLL_H
297
+ 	    devpoll_clear_pix(pix);
298
+ #endif /* HAVE_SYS_DEVPOLL_H */
299
+-	    devpoll_update_pix(pix);
300
++	    devpoll_update_pix(pix, old_events);
301
+ 	}
302
+ #endif
303
+ #ifdef USE_KQUEUE
304
+@@ -2638,6 +2660,27 @@ static void check_io_kp(int do_wait)
305
+ 	nof_ready_fds = vr;
306
+ 
307
+ #if HAVE_LINUX_KPOLL_H
308
++#ifdef HAVE_LINUX_EPOLL_H
309
++	if ( do_event_poll ) {
310
++           if ((r = epoll_wait(dev_poll_fd,dev_epoll_map,max_fd_plus_one,0)) > 0) {
311
++	    for (i = 0; (i < r); i++) {
312
++	      short revents = dev_epoll_map[i].events;
313
++
314
++	      if (revents != 0) {
315
++	        int fd = dev_epoll_map[i].data.fd;
316
++		rp->pfd.fd = fd;
317
++		rp->pfd.events = poll_fds[fd_data[fd].pix].events;
318
++		rp->pfd.revents = EPOLL_TO_POLL(revents);
319
++		rp->iport = fd_data[fd].inport;
320
++		rp->oport = fd_data[fd].outport;
321
++		rp++;
322
++	        nof_ready_fds ++;
323
++	      } 
324
++	    }
325
++           }
326
++        }
327
++
328
++#else
329
+ 	if ( do_event_poll ) {
330
+ 	  /* Now do the fast poll */
331
+ 	  dev_poll.kp_timeout = 0;
332
+@@ -2660,6 +2703,7 @@ static void check_io_kp(int do_wait)
333
+ 	    nof_ready_fds += r;
334
+ 	  }
335
+ 	}
336
++#endif /*HAVE_LINUX_EPOLL_H */
337
+ #endif
338
+ 
339
+       } else {
340
+@@ -3531,6 +3575,20 @@ static void kpoll_enable()
341
+     poll_fds[pix].revents = 0;
342
+ }
343
+ 
344
++#ifdef HAVE_LINUX_EPOLL_H
345
++static void epoll_init()
346
++{
347
++    /* max_files is just a hint to the kernel */
348
++    if ( (dev_poll_fd=epoll_create(max_files)) < 0 ) {
349
++        DEBUGF(("Will use poll()\n"));
350
++        dev_poll_fd = -1; /* We will not use ekpoll */
351
++    } else {
352
++        DEBUGF(("Will use epoll\n"));
353
++        dev_epoll_map = (struct epoll_event *) erts_alloc(ERTS_ALC_T_POLL_FDS, (sizeof(struct epoll_event) * max_files));
354
++        erts_smp_atomic_add(&sys_misc_mem_sz, max_files*sizeof(struct epoll_event));
355
++    }
356
++}
357
++#else
358
+ static void kpoll_init()
359
+ {
360
+     if ( (dev_poll_fd=open("/dev/kpoll",O_RDWR)) < 0 ) {
361
+@@ -3552,6 +3610,7 @@ static void kpoll_init()
362
+       dev_poll_rfds =  NULL;
363
+     }
364
+ }
365
++#endif /* HAVE_LINUX_EPOLL_H */
366
+ 
367
+ #endif /* HAVE_LINUX_KPOLL_H */
368
+ 
369
+@@ -3581,7 +3640,11 @@ static void devpoll_init(void) 
370
+     } else {
371
+         /* Determine use of poll vs. /dev/poll at runtime */
372
+ #ifdef HAVE_LINUX_KPOLL_H
373
++#ifdef HAVE_LINUX_EPOLL_H
374
++        epoll_init();
375
++#else
376
+         kpoll_init();
377
++#endif
378
+ #else
379
+ #ifdef HAVE_SYS_DEVPOLL_H
380
+         solaris_devpoll_init();
381
+@@ -3607,7 +3670,7 @@ static int devpoll_write(int fd, void *b
382
+     return count;
383
+ }
384
+ 
385
+-static void devpoll_update_pix(int pix)
386
++static void devpoll_update_pix(int pix, int old_events)
387
+ {
388
+     int res;
389
+ 
390
+@@ -3622,10 +3685,33 @@ static void devpoll_update_pix(int pix)
391
+ 
392
+ #endif
393
+     if ( dev_poll_fd != -1 ) {
394
++#ifdef HAVE_LINUX_EPOLL_H
395
++       int events = poll_fds[pix].events;
396
++       int fd = poll_fds[pix].fd;
397
++       if (old_events && events & POLLREMOVE) {
398
++            /* Delete file descriptor from epoll list */
399
++            res = epoll_ctl(dev_poll_fd,EPOLL_CTL_DEL,fd,NULL);
400
++            /* XXX check return code */
401
++       } else {
402
++            struct epoll_event epoll_ctl_event;
403
++            epoll_ctl_event.data.fd = fd;
404
++            epoll_ctl_event.events = POLL_TO_EPOLL(events);
405
++            if (old_events) {
406
++                /* Modify exiting fd */
407
++                res = epoll_ctl(dev_poll_fd,EPOLL_CTL_MOD,fd,&epoll_ctl_event);
408
++                /* XXX check return code */
409
++            } else {
410
++                /* Add fd to epoll list */
411
++                res = epoll_ctl(dev_poll_fd,EPOLL_CTL_ADD,fd,&epoll_ctl_event);
412
++                /* XXX check return code */
413
++            } 
414
++       }
415
++#else
416
+         if ( (res=devpoll_write(dev_poll_fd,&poll_fds[pix],sizeof(struct pollfd))) != 
417
+              (sizeof(struct pollfd)) ) {
418
+             erl_exit(1,"Can't write to /dev/poll\n");
419
+         }
420
++#endif /* HAVE_LINUX_EPOLL_H */
421
+     }
422
+ #if HAVE_LINUX_KPOLL_H
423
+     } else {
... ...
@@ -0,0 +1,423 @@
1
+diff -Nurp erts/acconfig.h erts/acconfig.h
2
+--- erts/acconfig.h	2005-06-21 09:37:40.000000000 -0700
3
++++ erts/acconfig.h	2006-03-10 15:55:12.000000000 -0800
4
+@@ -188,6 +188,9 @@
5
+ /* Define if you have the <linux/kpoll.h> header file. */
6
+ #undef HAVE_LINUX_KPOLL_H
7
+  
8
++/* Define if you have the <linux/epoll.h> header file. */
9
++#undef HAVE_LINUX_EPOLL_H
10
++
11
+ /* Define if you have the <sys/event.h> header file. */
12
+ #undef HAVE_SYS_EVENT_H
13
+ 
14
+@@ -224,7 +227,7 @@
15
+ 
16
+ #if !defined(USE_SELECT)
17
+ #  if defined(ENABLE_KERNEL_POLL)
18
+-#    if defined(HAVE_SYS_DEVPOLL_H) || defined(HAVE_LINUX_KPOLL_H) || defined(HAVE_SYS_EVENT_H)
19
++#    if defined(HAVE_SYS_DEVPOLL_H) || defined(HAVE_LINUX_KPOLL_H) || defined(HAVE_SYS_EVENT_H) || defined(HAVE_LINUX_EPOLL_H)
20
+ #      define USE_KERNEL_POLL
21
+ #    endif
22
+ #  endif
23
+diff -Nurp erts/config.h.in erts/config.h.in
24
+--- erts/config.h.in	2006-03-07 15:02:41.000000000 -0800
25
++++ erts/config.h.in	2006-03-10 15:55:12.000000000 -0800
26
+@@ -175,6 +175,8 @@
27
+ /* Define if you have the <linux/kpoll.h> header file. */
28
+ #undef HAVE_LINUX_KPOLL_H
29
+ 
30
++/* Define if you have the <linux/epoll.h> header file. */
31
++#undef HAVE_LINUX_EPOLL_H
32
+  
33
+ /* Define if you have the <sys/event.h> header file. */
34
+ #undef HAVE_SYS_EVENT_H
35
+@@ -399,7 +401,7 @@
36
+ 
37
+ #if !defined(USE_SELECT)
38
+ #  if defined(ENABLE_KERNEL_POLL)
39
+-#    if defined(HAVE_SYS_DEVPOLL_H) || defined(HAVE_LINUX_KPOLL_H) || defined(HAVE_SYS_EVENT_H)
40
++#    if defined(HAVE_SYS_DEVPOLL_H) || defined(HAVE_LINUX_KPOLL_H) || defined(HAVE_SYS_EVENT_H) || defined(HAVE_LINUX_EPOLL_H)
41
+ #      define USE_KERNEL_POLL
42
+ #    endif
43
+ #  endif
44
+diff -Nurp erts/configure erts/configure
45
+--- erts/configure	2006-03-07 15:02:39.000000000 -0800
46
++++ erts/configure	2006-03-10 15:55:12.000000000 -0800
47
+@@ -3825,6 +3825,151 @@ else
48
+ fi
49
+  
50
+ 
51
++
52
++if test "${ac_cv_header_sys_epoll_h+set}" = set; then
53
++  echo "$as_me:$LINENO: checking for sys/epoll.h" >&5
54
++echo $ECHO_N "checking for sys/epoll.h... $ECHO_C" >&6
55
++if test "${ac_cv_header_sys_epoll_h+set}" = set; then
56
++  echo $ECHO_N "(cached) $ECHO_C" >&6
57
++fi
58
++echo "$as_me:$LINENO: result: $ac_cv_header_sys_epoll_h" >&5
59
++echo "${ECHO_T}$ac_cv_header_sys_epoll_h" >&6
60
++else
61
++  # Is the header compilable?
62
++echo "$as_me:$LINENO: checking sys/epoll.h usability" >&5
63
++echo $ECHO_N "checking sys/epoll.h usability... $ECHO_C" >&6
64
++cat >conftest.$ac_ext <<_ACEOF
65
++/* confdefs.h.  */
66
++_ACEOF
67
++cat confdefs.h >>conftest.$ac_ext
68
++cat >>conftest.$ac_ext <<_ACEOF
69
++/* end confdefs.h.  */
70
++$ac_includes_default
71
++#include <sys/epoll.h>
72
++_ACEOF
73
++rm -f conftest.$ac_objext
74
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
75
++  (eval $ac_compile) 2>conftest.er1
76
++  ac_status=$?
77
++  grep -v '^ *+' conftest.er1 >conftest.err
78
++  rm -f conftest.er1
79
++  cat conftest.err >&5
80
++  echo "$as_me:$LINENO: \$? = $ac_status" >&5
81
++  (exit $ac_status); } &&
82
++	 { ac_try='test -z "$ac_c_werror_flag"
83
++			 || test ! -s conftest.err'
84
++  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
85
++  (eval $ac_try) 2>&5
86
++  ac_status=$?
87
++  echo "$as_me:$LINENO: \$? = $ac_status" >&5
88
++  (exit $ac_status); }; } &&
89
++	 { ac_try='test -s conftest.$ac_objext'
90
++  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
91
++  (eval $ac_try) 2>&5
92
++  ac_status=$?
93
++  echo "$as_me:$LINENO: \$? = $ac_status" >&5
94
++  (exit $ac_status); }; }; then
95
++  ac_header_compiler=yes
96
++else
97
++  echo "$as_me: failed program was:" >&5
98
++sed 's/^/| /' conftest.$ac_ext >&5
99
++
100
++ac_header_compiler=no
101
++fi
102
++rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
103
++echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
104
++echo "${ECHO_T}$ac_header_compiler" >&6
105
++
106
++# Is the header present?
107
++echo "$as_me:$LINENO: checking sys/epoll.h presence" >&5
108
++echo $ECHO_N "checking sys/epoll.h presence... $ECHO_C" >&6
109
++cat >conftest.$ac_ext <<_ACEOF
110
++/* confdefs.h.  */
111
++_ACEOF
112
++cat confdefs.h >>conftest.$ac_ext
113
++cat >>conftest.$ac_ext <<_ACEOF
114
++/* end confdefs.h.  */
115
++#include <sys/epoll.h>
116
++_ACEOF
117
++if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
118
++  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
119
++  ac_status=$?
120
++  grep -v '^ *+' conftest.er1 >conftest.err
121
++  rm -f conftest.er1
122
++  cat conftest.err >&5
123
++  echo "$as_me:$LINENO: \$? = $ac_status" >&5
124
++  (exit $ac_status); } >/dev/null; then
125
++  if test -s conftest.err; then
126
++    ac_cpp_err=$ac_c_preproc_warn_flag
127
++    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
128
++  else
129
++    ac_cpp_err=
130
++  fi
131
++else
132
++  ac_cpp_err=yes
133
++fi
134
++if test -z "$ac_cpp_err"; then
135
++  ac_header_preproc=yes
136
++else
137
++  echo "$as_me: failed program was:" >&5
138
++sed 's/^/| /' conftest.$ac_ext >&5
139
++
140
++  ac_header_preproc=no
141
++fi
142
++rm -f conftest.err conftest.$ac_ext
143
++echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
144
++echo "${ECHO_T}$ac_header_preproc" >&6
145
++
146
++# So?  What about this header?
147
++case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
148
++  yes:no: )
149
++    { echo "$as_me:$LINENO: WARNING: sys/epoll.h: accepted by the compiler, rejected by the preprocessor!" >&5
150
++echo "$as_me: WARNING: sys/epoll.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
151
++    { echo "$as_me:$LINENO: WARNING: sys/epoll.h: proceeding with the compiler's result" >&5
152
++echo "$as_me: WARNING: sys/epoll.h: proceeding with the compiler's result" >&2;}
153
++    ac_header_preproc=yes
154
++    ;;
155
++  no:yes:* )
156
++    { echo "$as_me:$LINENO: WARNING: sys/epoll.h: present but cannot be compiled" >&5
157
++echo "$as_me: WARNING: sys/epoll.h: present but cannot be compiled" >&2;}
158
++    { echo "$as_me:$LINENO: WARNING: sys/epoll.h:     check for missing prerequisite headers?" >&5
159
++echo "$as_me: WARNING: sys/epoll.h:     check for missing prerequisite headers?" >&2;}
160
++    { echo "$as_me:$LINENO: WARNING: sys/epoll.h: see the Autoconf documentation" >&5
161
++echo "$as_me: WARNING: sys/epoll.h: see the Autoconf documentation" >&2;}
162
++    { echo "$as_me:$LINENO: WARNING: sys/epoll.h:     section \"Present But Cannot Be Compiled\"" >&5
163
++echo "$as_me: WARNING: sys/epoll.h:     section \"Present But Cannot Be Compiled\"" >&2;}
164
++    { echo "$as_me:$LINENO: WARNING: sys/epoll.h: proceeding with the preprocessor's result" >&5
165
++echo "$as_me: WARNING: sys/epoll.h: proceeding with the preprocessor's result" >&2;}
166
++    { echo "$as_me:$LINENO: WARNING: sys/epoll.h: in the future, the compiler will take precedence" >&5
167
++echo "$as_me: WARNING: sys/epoll.h: in the future, the compiler will take precedence" >&2;}
168
++    (
169
++      cat <<\_ASBOX
170
++## ------------------------------------------ ##
171
++## Report this to the AC_PACKAGE_NAME lists.  ##
172
++## ------------------------------------------ ##
173
++_ASBOX
174
++    ) |
175
++      sed "s/^/$as_me: WARNING:     /" >&2
176
++    ;;
177
++esac
178
++echo "$as_me:$LINENO: checking for sys/epoll.h" >&5
179
++echo $ECHO_N "checking for sys/epoll.h... $ECHO_C" >&6
180
++if test "${ac_cv_header_sys_epoll_h+set}" = set; then
181
++  echo $ECHO_N "(cached) $ECHO_C" >&6
182
++else
183
++  ac_cv_header_sys_epoll_h=$ac_header_preproc
184
++fi
185
++echo "$as_me:$LINENO: result: $ac_cv_header_sys_epoll_h" >&5
186
++echo "${ECHO_T}$ac_cv_header_sys_epoll_h" >&6
187
++
188
++fi
189
++if test $ac_cv_header_sys_epoll_h = yes; then
190
++  cat >>confdefs.h <<\_ACEOF
191
++#define HAVE_LINUX_EPOLL_H 1
192
++_ACEOF
193
++
194
++fi
195
++
196
+ echo $ac_n "checking for SO_BSDCOMPAT declaration""... $ac_c" 1>&6
197
+ echo "configure:3830: checking for SO_BSDCOMPAT declaration" >&5
198
+ if eval "test \"`echo '$''{'ac_cv_decl_so_bsdcompat'+set}'`\" = set"; then
199
+diff -Nurp erts/configure.in erts/configure.in
200
+--- erts/configure.in	2006-03-07 06:25:41.000000000 -0800
201
++++ erts/configure.in	2006-03-10 15:55:12.000000000 -0800
202
+@@ -664,6 +664,7 @@ dnl Check if we have kernel poll support
203
+ AC_CHECK_HEADER(sys/devpoll.h, AC_DEFINE(HAVE_SYS_DEVPOLL_H))
204
+ AC_CHECK_HEADER(linux/kpoll.h, AC_DEFINE(HAVE_LINUX_KPOLL_H))
205
+ AC_CHECK_HEADER(sys/event.h, AC_DEFINE(HAVE_SYS_EVENT_H))
206
++AC_CHECK_HEADER(sys/epoll.h, AC_DEFINE(HAVE_LINUX_EPOLL_H))
207
+
208
+ HAVE_VALGRIND=no
209
+ AC_CHECK_HEADER(valgrind/valgrind.h, HAVE_VALGRIND=yes)
210
+ AC_SUBST(HAVE_VALGRIND)
211
+diff -Nurp erts/emulator/sys/unix/sys.c erts/emulator/sys/unix/sys.c
212
+--- erts/emulator/sys/unix/sys.c	2006-03-07 06:24:29.000000000 -0800
213
++++ erts/emulator/sys/unix/sys.c	2006-03-10 15:55:12.000000000 -0800
214
+@@ -13,6 +13,12 @@
215
+  * Portions created by Ericsson are Copyright 1999, Ericsson Utvecklings
216
+  * AB. All Rights Reserved.''
217
+  * 
218
++ * 2005-08-31
219
++ * This has been modified by Matthew Reilly of SIPphone Inc. to 
220
++ * enable kernel poll (+K true) support via the epoll mechanism in Linux 2.6
221
++ * Portions created by SIPphone Inc. are Copyright 2005, SIPphone Inc.
222
++ * These modifications are released under the Erlang Public License.
223
++ *
224
+  *     $Id$
225
+  */
226
+ 
227
+@@ -50,6 +56,9 @@
228
+ #      define USE_DEVPOLL
229
+ #      include <sys/devpoll.h>
230
+ #    endif
231
++#    ifdef HAVE_LINUX_EPOLL_H /* Too minimize code changes, we pretend we have HAVE_LINUX_KPOLL_H as well */
232
++#      define HAVE_LINUX_KPOLL_H 1
233
++#    endif
234
+ #    ifdef HAVE_LINUX_KPOLL_H
235
+ #      define USE_DEVPOLL
236
+ #      include <asm/page.h>
237
+@@ -58,7 +67,11 @@
238
+ #      ifndef POLLREMOVE
239
+ #        define POLLREMOVE 0x1000 /* some day it will make it to bits/poll.h ;-) */
240
+ #      endif
241
+-#      include <linux/kpoll.h>
242
++#      ifdef HAVE_LINUX_EPOLL_H
243
++#        include <sys/epoll.h>
244
++#      else
245
++#        include <linux/kpoll.h>
246
++#      endif
247
+ #    endif
248
+ #    ifdef USE_DEVPOLL /* can only use one of them ... */
249
+ #      ifdef USE_KQUEUE
250
+@@ -188,8 +201,17 @@ static int use_kernel_poll = 0;
251
+ 
252
+ static int             dev_poll_fd;   /* fd for /dev/poll */
253
+ #ifdef HAVE_LINUX_KPOLL_H
254
++
255
++#ifdef HAVE_LINUX_EPOLL_H
256
++static struct epoll_event* dev_epoll_map;
257
++/* XXX Implement correct mapping from POLLIN/POLLOUT to/from EPOLLIN/EPOLLOUT */
258
++/* Currenltly POLLIN/POLLOUT == EPOLLIN/EPOLLOUT. So these macros will work */
259
++#define EPOLL_TO_POLL(bit_map) (bit_map)
260
++#define POLL_TO_EPOLL(bit_map) (bit_map & (EPOLLIN|EPOLLOUT))
261
++#else
262
+ static char *          dev_poll_map;  /* mmap'ed area from kernel /dev/kpoll */
263
+ static struct k_poll   dev_poll;      /* control block for /dev/kpoll */
264
++#endif /* HAVE_LINUX_KPOLL_H */
265
+ static int max_poll_idx;              /* highest non /dev/kpoll fd */
266
+ 
267
+ static void kpoll_enable();
268
+@@ -199,7 +221,7 @@ static struct dvpoll   dev_poll;      /*
269
+ static struct pollfd*  dev_poll_rfds = NULL; /* Allocated at startup */
270
+ 
271
+ static void devpoll_init(void);
272
+-static void devpoll_update_pix(int pix);
273
++static void devpoll_update_pix(int pix, int old_events);
274
+ #ifdef HAVE_SYS_DEVPOLL_H
275
+ static void devpoll_clear_pix(int pix);
276
+ #endif /* HAVE_SYS_DEVPOLL_H */
277
+@@ -1967,7 +1989,7 @@ static int driver_select_kp(ErlDrvPort i
278
+ 
279
+ #ifdef USE_DEVPOLL
280
+ 	    if (poll_fds[pix].events != old_events) 
281
+-                devpoll_update_pix(pix);
282
++                devpoll_update_pix(pix, old_events);
283
+ #endif
284
+ #ifdef USE_KQUEUE
285
+ 	    if (poll_fds[pix].events != old_events) 
286
+@@ -2023,7 +2045,7 @@ static int driver_select_kp(ErlDrvPort i
287
+ 	    if ( old_events && (dev_poll_fd != -1) ) {
288
+ 	       /* Tell /dev/[k]poll that we are not interested any more ... */
289
+ 	       poll_fds[pix].events = POLLREMOVE;
290
+-	       devpoll_update_pix(pix);
291
++	       devpoll_update_pix(pix, old_events);
292
+ 	       /* devpoll_update_pix may change the pix */
293
+ 	       pix = fd_data[fd].pix;
294
+ 	       poll_fds[pix].events = 0;
295
+@@ -2080,7 +2102,7 @@ static int driver_select_kp(ErlDrvPort i
296
+ #ifdef HAVE_SYS_DEVPOLL_H
297
+ 	    devpoll_clear_pix(pix);
298
+ #endif /* HAVE_SYS_DEVPOLL_H */
299
+-	    devpoll_update_pix(pix);
300
++	    devpoll_update_pix(pix, old_events);
301
+ 	}
302
+ #endif
303
+ #ifdef USE_KQUEUE
304
+@@ -2638,6 +2660,27 @@ static void check_io_kp(int do_wait)
305
+ 	nof_ready_fds = vr;
306
+ 
307
+ #if HAVE_LINUX_KPOLL_H
308
++#ifdef HAVE_LINUX_EPOLL_H
309
++	if ( do_event_poll ) {
310
++           if ((r = epoll_wait(dev_poll_fd,dev_epoll_map,max_fd_plus_one,0)) > 0) {
311
++	    for (i = 0; (i < r); i++) {
312
++	      short revents = dev_epoll_map[i].events;
313
++
314
++	      if (revents != 0) {
315
++	        int fd = dev_epoll_map[i].data.fd;
316
++		rp->pfd.fd = fd;
317
++		rp->pfd.events = poll_fds[fd_data[fd].pix].events;
318
++		rp->pfd.revents = EPOLL_TO_POLL(revents);
319
++		rp->iport = fd_data[fd].inport;
320
++		rp->oport = fd_data[fd].outport;
321
++		rp++;
322
++	        nof_ready_fds ++;
323
++	      } 
324
++	    }
325
++           }
326
++        }
327
++
328
++#else
329
+ 	if ( do_event_poll ) {
330
+ 	  /* Now do the fast poll */
331
+ 	  dev_poll.kp_timeout = 0;
332
+@@ -2660,6 +2703,7 @@ static void check_io_kp(int do_wait)
333
+ 	    nof_ready_fds += r;
334
+ 	  }
335
+ 	}
336
++#endif /*HAVE_LINUX_EPOLL_H */
337
+ #endif
338
+ 
339
+       } else {
340
+@@ -3531,6 +3575,20 @@ static void kpoll_enable()
341
+     poll_fds[pix].revents = 0;
342
+ }
343
+ 
344
++#ifdef HAVE_LINUX_EPOLL_H
345
++static void epoll_init()
346
++{
347
++    /* max_files is just a hint to the kernel */
348
++    if ( (dev_poll_fd=epoll_create(max_files)) < 0 ) {
349
++        DEBUGF(("Will use poll()\n"));
350
++        dev_poll_fd = -1; /* We will not use ekpoll */
351
++    } else {
352
++        DEBUGF(("Will use epoll\n"));
353
++        dev_epoll_map = (struct epoll_event *) erts_alloc(ERTS_ALC_T_POLL_FDS, (sizeof(struct epoll_event) * max_files));
354
++        erts_smp_atomic_add(&sys_misc_mem_sz, max_files*sizeof(struct epoll_event));
355
++    }
356
++}
357
++#else
358
+ static void kpoll_init()
359
+ {
360
+     if ( (dev_poll_fd=open("/dev/kpoll",O_RDWR)) < 0 ) {
361
+@@ -3552,6 +3610,7 @@ static void kpoll_init()
362
+       dev_poll_rfds =  NULL;
363
+     }
364
+ }
365
++#endif /* HAVE_LINUX_EPOLL_H */
366
+ 
367
+ #endif /* HAVE_LINUX_KPOLL_H */
368
+ 
369
+@@ -3581,7 +3640,11 @@ static void devpoll_init(void) 
370
+     } else {
371
+         /* Determine use of poll vs. /dev/poll at runtime */
372
+ #ifdef HAVE_LINUX_KPOLL_H
373
++#ifdef HAVE_LINUX_EPOLL_H
374
++        epoll_init();
375
++#else
376
+         kpoll_init();
377
++#endif
378
+ #else
379
+ #ifdef HAVE_SYS_DEVPOLL_H
380
+         solaris_devpoll_init();
381
+@@ -3607,7 +3670,7 @@ static int devpoll_write(int fd, void *b
382
+     return count;
383
+ }
384
+ 
385
+-static void devpoll_update_pix(int pix)
386
++static void devpoll_update_pix(int pix, int old_events)
387
+ {
388
+     int res;
389
+ 
390
+@@ -3622,10 +3685,33 @@ static void devpoll_update_pix(int pix)
391
+ 
392
+ #endif
393
+     if ( dev_poll_fd != -1 ) {
394
++#ifdef HAVE_LINUX_EPOLL_H
395
++       int events = poll_fds[pix].events;
396
++       int fd = poll_fds[pix].fd;
397
++       if (old_events && events & POLLREMOVE) {
398
++            /* Delete file descriptor from epoll list */
399
++            res = epoll_ctl(dev_poll_fd,EPOLL_CTL_DEL,fd,NULL);
400
++            /* XXX check return code */
401
++       } else {
402
++            struct epoll_event epoll_ctl_event;
403
++            epoll_ctl_event.data.fd = fd;
404
++            epoll_ctl_event.events = POLL_TO_EPOLL(events);
405
++            if (old_events) {
406
++                /* Modify exiting fd */
407
++                res = epoll_ctl(dev_poll_fd,EPOLL_CTL_MOD,fd,&epoll_ctl_event);
408
++                /* XXX check return code */
409
++            } else {
410
++                /* Add fd to epoll list */
411
++                res = epoll_ctl(dev_poll_fd,EPOLL_CTL_ADD,fd,&epoll_ctl_event);
412
++                /* XXX check return code */
413
++            } 
414
++       }
415
++#else
416
+         if ( (res=devpoll_write(dev_poll_fd,&poll_fds[pix],sizeof(struct pollfd))) != 
417
+              (sizeof(struct pollfd)) ) {
418
+             erl_exit(1,"Can't write to /dev/poll\n");
419
+         }
420
++#endif /* HAVE_LINUX_EPOLL_H */
421
+     }
422
+ #if HAVE_LINUX_KPOLL_H
423
+     } else {
... ...
@@ -0,0 +1,130 @@
1
+diff -ru otp_src_R9B-1-orig/lib/cosNotification/src/Makefile otp_src_R9B-1/lib/cosNotification/src/Makefile
2
+--- otp_src_R9B-1-orig/lib/cosNotification/src/Makefile	2002-10-02 15:01:31.000000000 -0700
3
++++ otp_src_R9B-1/lib/cosNotification/src/Makefile	2003-07-03 17:44:41.000000000 -0700
4
+@@ -363,7 +363,7 @@
5
+ 	$(INSTALL_DIR) $(RELSYSDIR)/ebin
6
+ 	$(INSTALL_DATA) $(TARGET_FILES) $(APP_TARGET) $(APPUP_TARGET) $(RELSYSDIR)/ebin
7
+ 	$(INSTALL_DIR) $(RELSYSDIR)/src
8
+-	$(INSTALL_DATA) $(GEN_FILES) $(IDL_FILES) $(YECC_FILES) $(GEN_YECC_ERL_FILES) $(GEN_YECC_HRL_FILES) $(RELSYSDIR)/src
9
++	$(INSTALL_DATA) $(GEN_FILES) $(IDL_FILES) $(YECC_FILES)  $(GEN_YECC_HRL_FILES) $(RELSYSDIR)/src
10
+ 	$(INSTALL_DATA) $(ERL_FILES) $(HRL_FILES) $(GEN_ERL_FILES) $(IDL_FILES) $(YECC_FILES) $(RELSYSDIR)/src
11
+ 	$(INSTALL_DIR) $(RELSYSDIR)/include
12
+ 	$(INSTALL_DATA) $(GEN_HRL_FILES) $(RELSYSDIR)/include
13
+diff -ru otp_src_R9B-1-orig/lib/gs/src/Makefile otp_src_R9B-1/lib/gs/src/Makefile
14
+--- otp_src_R9B-1-orig/lib/gs/src/Makefile	2001-10-12 07:18:38.000000000 -0700
15
++++ otp_src_R9B-1/lib/gs/src/Makefile	2003-07-03 17:44:41.000000000 -0700
16
+@@ -114,7 +114,7 @@
17
+ 	$(INSTALL_DATA) $(APP_SRC) $(ERL_FILES) $(HRL_FILES) $(GEN_HRL_FILES) \
18
+ 		$(GSTK_GENERIC) $(RELSYSDIR)/src
19
+ 	$(INSTALL_DIR) $(RELSYSDIR)/ebin
20
+-	$(INSTALL_DATA) $(TARGET_FILES) $(KEEP_AS_IS) $(RELSYSDIR)/ebin
21
++	$(INSTALL_DATA) $(TARGET_FILES)  $(RELSYSDIR)/ebin
22
+ 
23
+ 
24
+ release_docs_spec:
25
+diff -ru otp_src_R9B-1-orig/lib/kernel/src/inet_config.erl otp_src_R9B-1/lib/kernel/src/inet_config.erl
26
+--- otp_src_R9B-1-orig/lib/kernel/src/inet_config.erl	2002-10-09 07:39:22.000000000 -0700
27
++++ otp_src_R9B-1/lib/kernel/src/inet_config.erl	2003-07-03 17:43:37.000000000 -0700
28
+@@ -82,8 +82,13 @@
29
+ 		'bsd/os' ->
30
+ 		    load_resolv(filename:join(Etc,"irs.conf"), host_conf_bsdos);
31
+ 		linux ->
32
+-		    load_resolv(filename:join(Etc,"host.conf"),host_conf_linux),
33
+-
34
++		    case load_resolv(filename:join(Etc,"host.conf"),host_conf_linux) of
35
++			ok ->
36
++			    ok;
37
++			_Other ->
38
++			    load_resolv(filename:join(Etc,"nsswitch.conf"), nsswitch_conf)
39
++		    end,
40
++		    
41
+ 		    % It may be the case that the domain name was not set
42
+ 		    % because the hostname was short. But we can now look it
43
+ 		    % up and get the long name and the domain name from it.
44
+@@ -296,10 +301,12 @@
45
+ 	    case apply(inet_parse, Func, [File,{chars,Bin}]) of
46
+ 		{ok, Ls} -> inet_db:add_rc_list(Ls);
47
+ 		{error, Reason} ->
48
+-		    error("parse error in file ~s: ~p", [File, Reason])
49
++		    error("parse error in file ~s: ~p", [File, Reason]),
50
++		    {error, Reason}
51
+ 	    end;
52
+ 	Error ->
53
+-	    warning("file not found ~s~n", [File])
54
++	    warning("file not found ~s~n", [File]),
55
++	    Error
56
+     end.
57
+ 
58
+ %%
59
+diff -ru otp_src_R9B-1-orig/lib/megaco/src/text/Makefile otp_src_R9B-1/lib/megaco/src/text/Makefile
60
+--- otp_src_R9B-1-orig/lib/megaco/src/text/Makefile	2002-11-28 05:50:00.000000000 -0800
61
++++ otp_src_R9B-1/lib/megaco/src/text/Makefile	2003-07-03 17:44:41.000000000 -0700
62
+@@ -48,10 +48,15 @@
63
+ 	$(INTERNAL_YRL_FILES:%.yrl=%.erl)
64
+ 
65
+ BEAM_TARGET_FILES = \
66
+-	$(INTERNAL_YRL_FILES:%.yrl=$(EBIN)/%.$(EMULATOR)) \
67
+ 	$(MODULES:%=$(EBIN)/%.$(EMULATOR))
68
+ 
69
+-TARGET_FILES = $(ERL_TARGET_FILES) $(BEAM_TARGET_FILES)
70
++YRL_BEAM_TARGET_FILES = \
71
++	$(INTERNAL_YRL_FILES:%.yrl=$(EBIN)/%.$(EMULATOR)) 
72
++
73
++
74
++
75
++TARGET_FILES = $(ERL_TARGET_FILES) $(BEAM_TARGET_FILES) $(YRL_BEAM_TARGETS)
76
++
77
+ 
78
+ 
79
+ # ----------------------------------------------------
80
+@@ -65,6 +70,10 @@
81
+ # ERL_COMPILE_FLAGS += +native
82
+ # endif
83
+ 
84
++# ifeq ($(USE_HIPE),true)
85
++# ERL_COMPILE_FLAGS += +native
86
++# endif
87
++
88
+ ifeq ($(WARN_UNUSED_WARS),true)
89
+ ERL_COMPILE_FLAGS += +warn_unused_vars
90
+ endif
91
+@@ -94,6 +103,8 @@
92
+ 	@echo ""
93
+ 	@echo "INTERNAL_HRL_FILES = $(INTERNAL_HRL_FILES)"
94
+ 	@echo ""
95
++	@echo "BEAM_TARGET_FILES = $(BEAM_TARGET_FILES) "
96
++	@echo ""
97
+ 
98
+ 
99
+ # ----------------------------------------------------
100
+������ � otp_src_R9B-1/lib/megaco/src/text: Makefile.orig
101
+diff -ru otp_src_R9B-1-orig/lib/orber/priv/Makefile otp_src_R9B-1/lib/orber/priv/Makefile
102
+--- otp_src_R9B-1-orig/lib/orber/priv/Makefile	2002-10-02 15:17:29.000000000 -0700
103
++++ otp_src_R9B-1/lib/orber/priv/Makefile	2003-07-03 17:44:41.000000000 -0700
104
+@@ -37,7 +37,6 @@
105
+ 	blank.html \
106
+ 	info_frames.html \
107
+ 	main_frame.html \
108
+-	orber_help.txt \
109
+ 	start_info.html
110
+ 
111
+ #
112
+diff -ru otp_src_R9B-1-orig/lib/snmp/mibs/Makefile otp_src_R9B-1/lib/snmp/mibs/Makefile
113
+--- otp_src_R9B-1-orig/lib/snmp/mibs/Makefile	2002-10-02 14:48:43.000000000 -0700
114
++++ otp_src_R9B-1/lib/snmp/mibs/Makefile	2003-07-03 17:44:41.000000000 -0700
115
+@@ -59,13 +59,9 @@
116
+ FUNCS_FILES = \
117
+ 	STANDARD-MIB.funcs \
118
+ 	SNMPv2-MIB.funcs \
119
+-	SNMP-COMMUNITY-MIB.mib \
120
+-	SNMP-FRAMEWORK-MIB.mib \
121
+-	SNMP-MPD-MIB.mib \
122
+ 	SNMP-NOTIFICATION-MIB.funcs \
123
+-	SNMP-TARGET-MIB.funcs \
124
+-	SNMP-USER-BASED-SM-MIB.mib \
125
+-	SNMP-VIEW-BASED-ACM-MIB.mib
126
++	SNMP-TARGET-MIB.funcs 
127
++
128
+ 
129
+ V1_MIB_FILES= v1/OTP-SNMPEA-MIB.mib.v1
130
+ 
... ...
@@ -0,0 +1,11 @@
1
+--- otp_src_R10B-10/erts/emulator/hipe/hipe_x86_signal.c.orig	2006-03-31 14:49:28.000000000 +0200
2
++++ otp_src_R10B-10/erts/emulator/hipe/hipe_x86_signal.c	2006-03-31 14:49:42.000000000 +0200
3
+@@ -27,7 +27,7 @@
4
+ #include <stdlib.h>
5
+ #include "hipe_signal.h"
6
+ 
7
+-#if __GLIBC__ == 2 && __GLIBC_MINOR__ == 3
8
++#if __GLIBC__ == 2 && __GLIBC_MINOR__ >= 3
9
+ /* See comment below for glibc 2.2. */
10
+ #ifndef __USE_GNU
11
+ #define __USE_GNU		/* to un-hide RTLD_NEXT */
... ...
@@ -0,0 +1,423 @@
1
+diff -Nurp erts/acconfig.h erts/acconfig.h
2
+--- erts/acconfig.h	2005-06-21 09:37:40.000000000 -0700
3
++++ erts/acconfig.h	2006-03-10 15:55:12.000000000 -0800
4
+@@ -188,6 +188,9 @@
5
+ /* Define if you have the <linux/kpoll.h> header file. */
6
+ #undef HAVE_LINUX_KPOLL_H
7
+  
8
++/* Define if you have the <linux/epoll.h> header file. */
9
++#undef HAVE_LINUX_EPOLL_H
10
++
11
+ /* Define if you have the <sys/event.h> header file. */
12
+ #undef HAVE_SYS_EVENT_H
13
+ 
14
+@@ -224,7 +227,7 @@
15
+ 
16
+ #if !defined(USE_SELECT)
17
+ #  if defined(ENABLE_KERNEL_POLL)
18
+-#    if defined(HAVE_SYS_DEVPOLL_H) || defined(HAVE_LINUX_KPOLL_H) || defined(HAVE_SYS_EVENT_H)
19
++#    if defined(HAVE_SYS_DEVPOLL_H) || defined(HAVE_LINUX_KPOLL_H) || defined(HAVE_SYS_EVENT_H) || defined(HAVE_LINUX_KPOLL_H)
20
+ #      define USE_KERNEL_POLL
21
+ #    endif
22
+ #  endif
23
+diff -Nurp erts/config.h.in erts/config.h.in
24
+--- erts/config.h.in	2006-03-07 15:02:41.000000000 -0800
25
++++ erts/config.h.in	2006-03-10 15:55:12.000000000 -0800
26
+@@ -175,6 +175,8 @@
27
+ /* Define if you have the <linux/kpoll.h> header file. */
28
+ #undef HAVE_LINUX_KPOLL_H
29
+ 
30
++/* Define if you have the <linux/epoll.h> header file. */
31
++#undef HAVE_LINUX_EPOLL_H
32
+  
33
+ /* Define if you have the <sys/event.h> header file. */
34
+ #undef HAVE_SYS_EVENT_H
35
+@@ -399,7 +401,7 @@
36
+ 
37
+ #if !defined(USE_SELECT)
38
+ #  if defined(ENABLE_KERNEL_POLL)
39
+-#    if defined(HAVE_SYS_DEVPOLL_H) || defined(HAVE_LINUX_KPOLL_H) || defined(HAVE_SYS_EVENT_H)
40
++#    if defined(HAVE_SYS_DEVPOLL_H) || defined(HAVE_LINUX_KPOLL_H) || defined(HAVE_SYS_EVENT_H) || defined(HAVE_LINUX_EPOLL_H)
41
+ #      define USE_KERNEL_POLL
42
+ #    endif
43
+ #  endif
44
+diff -Nurp erts/configure erts/configure
45
+--- erts/configure	2006-03-07 15:02:39.000000000 -0800
46
++++ erts/configure	2006-03-10 15:55:12.000000000 -0800
47
+@@ -3825,6 +3825,151 @@ else
48
+ fi
49
+  
50
+ 
51
++
52
++if test "${ac_cv_header_sys_epoll_h+set}" = set; then
53
++  echo "$as_me:$LINENO: checking for sys/epoll.h" >&5
54
++echo $ECHO_N "checking for sys/epoll.h... $ECHO_C" >&6
55
++if test "${ac_cv_header_sys_epoll_h+set}" = set; then
56
++  echo $ECHO_N "(cached) $ECHO_C" >&6
57
++fi
58
++echo "$as_me:$LINENO: result: $ac_cv_header_sys_epoll_h" >&5
59
++echo "${ECHO_T}$ac_cv_header_sys_epoll_h" >&6
60
++else
61
++  # Is the header compilable?
62
++echo "$as_me:$LINENO: checking sys/epoll.h usability" >&5
63
++echo $ECHO_N "checking sys/epoll.h usability... $ECHO_C" >&6
64
++cat >conftest.$ac_ext <<_ACEOF
65
++/* confdefs.h.  */
66
++_ACEOF
67
++cat confdefs.h >>conftest.$ac_ext
68
++cat >>conftest.$ac_ext <<_ACEOF
69
++/* end confdefs.h.  */
70
++$ac_includes_default
71
++#include <sys/epoll.h>
72
++_ACEOF
73
++rm -f conftest.$ac_objext
74
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
75
++  (eval $ac_compile) 2>conftest.er1
76
++  ac_status=$?
77
++  grep -v '^ *+' conftest.er1 >conftest.err
78
++  rm -f conftest.er1
79
++  cat conftest.err >&5
80
++  echo "$as_me:$LINENO: \$? = $ac_status" >&5
81
++  (exit $ac_status); } &&
82
++	 { ac_try='test -z "$ac_c_werror_flag"
83
++			 || test ! -s conftest.err'
84
++  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
85
++  (eval $ac_try) 2>&5
86
++  ac_status=$?
87
++  echo "$as_me:$LINENO: \$? = $ac_status" >&5
88
++  (exit $ac_status); }; } &&
89
++	 { ac_try='test -s conftest.$ac_objext'
90
++  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
91
++  (eval $ac_try) 2>&5
92
++  ac_status=$?
93
++  echo "$as_me:$LINENO: \$? = $ac_status" >&5
94
++  (exit $ac_status); }; }; then
95
++  ac_header_compiler=yes
96
++else
97
++  echo "$as_me: failed program was:" >&5
98
++sed 's/^/| /' conftest.$ac_ext >&5
99
++
100
++ac_header_compiler=no
101
++fi
102
++rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
103
++echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
104
++echo "${ECHO_T}$ac_header_compiler" >&6
105
++
106
++# Is the header present?
107
++echo "$as_me:$LINENO: checking sys/epoll.h presence" >&5
108
++echo $ECHO_N "checking sys/epoll.h presence... $ECHO_C" >&6
109
++cat >conftest.$ac_ext <<_ACEOF
110
++/* confdefs.h.  */
111
++_ACEOF
112
++cat confdefs.h >>conftest.$ac_ext
113
++cat >>conftest.$ac_ext <<_ACEOF
114
++/* end confdefs.h.  */
115
++#include <sys/epoll.h>
116
++_ACEOF
117
++if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
118
++  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
119
++  ac_status=$?
120
++  grep -v '^ *+' conftest.er1 >conftest.err
121
++  rm -f conftest.er1
122
++  cat conftest.err >&5
123
++  echo "$as_me:$LINENO: \$? = $ac_status" >&5
124
++  (exit $ac_status); } >/dev/null; then
125
++  if test -s conftest.err; then
126
++    ac_cpp_err=$ac_c_preproc_warn_flag
127
++    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
128
++  else
129
++    ac_cpp_err=
130
++  fi
131
++else
132
++  ac_cpp_err=yes
133
++fi
134
++if test -z "$ac_cpp_err"; then
135
++  ac_header_preproc=yes
136
++else
137
++  echo "$as_me: failed program was:" >&5
138
++sed 's/^/| /' conftest.$ac_ext >&5
139
++
140
++  ac_header_preproc=no
141
++fi
142
++rm -f conftest.err conftest.$ac_ext
143
++echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
144
++echo "${ECHO_T}$ac_header_preproc" >&6
145
++
146
++# So?  What about this header?
147
++case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
148
++  yes:no: )
149
++    { echo "$as_me:$LINENO: WARNING: sys/epoll.h: accepted by the compiler, rejected by the preprocessor!" >&5
150
++echo "$as_me: WARNING: sys/epoll.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
151
++    { echo "$as_me:$LINENO: WARNING: sys/epoll.h: proceeding with the compiler's result" >&5
152
++echo "$as_me: WARNING: sys/epoll.h: proceeding with the compiler's result" >&2;}
153
++    ac_header_preproc=yes
154
++    ;;
155
++  no:yes:* )
156
++    { echo "$as_me:$LINENO: WARNING: sys/epoll.h: present but cannot be compiled" >&5
157
++echo "$as_me: WARNING: sys/epoll.h: present but cannot be compiled" >&2;}
158
++    { echo "$as_me:$LINENO: WARNING: sys/epoll.h:     check for missing prerequisite headers?" >&5
159
++echo "$as_me: WARNING: sys/epoll.h:     check for missing prerequisite headers?" >&2;}
160
++    { echo "$as_me:$LINENO: WARNING: sys/epoll.h: see the Autoconf documentation" >&5
161
++echo "$as_me: WARNING: sys/epoll.h: see the Autoconf documentation" >&2;}
162
++    { echo "$as_me:$LINENO: WARNING: sys/epoll.h:     section \"Present But Cannot Be Compiled\"" >&5
163
++echo "$as_me: WARNING: sys/epoll.h:     section \"Present But Cannot Be Compiled\"" >&2;}
164
++    { echo "$as_me:$LINENO: WARNING: sys/epoll.h: proceeding with the preprocessor's result" >&5
165
++echo "$as_me: WARNING: sys/epoll.h: proceeding with the preprocessor's result" >&2;}
166
++    { echo "$as_me:$LINENO: WARNING: sys/epoll.h: in the future, the compiler will take precedence" >&5
167
++echo "$as_me: WARNING: sys/epoll.h: in the future, the compiler will take precedence" >&2;}
168
++    (
169
++      cat <<\_ASBOX
170
++## ------------------------------------------ ##
171
++## Report this to the AC_PACKAGE_NAME lists.  ##
172
++## ------------------------------------------ ##
173
++_ASBOX
174
++    ) |
175
++      sed "s/^/$as_me: WARNING:     /" >&2
176
++    ;;
177
++esac
178
++echo "$as_me:$LINENO: checking for sys/epoll.h" >&5
179
++echo $ECHO_N "checking for sys/epoll.h... $ECHO_C" >&6
180
++if test "${ac_cv_header_sys_epoll_h+set}" = set; then
181
++  echo $ECHO_N "(cached) $ECHO_C" >&6
182
++else
183
++  ac_cv_header_sys_epoll_h=$ac_header_preproc
184
++fi
185
++echo "$as_me:$LINENO: result: $ac_cv_header_sys_epoll_h" >&5
186
++echo "${ECHO_T}$ac_cv_header_sys_epoll_h" >&6
187
++
188
++fi
189
++if test $ac_cv_header_sys_epoll_h = yes; then
190
++  cat >>confdefs.h <<\_ACEOF
191
++#define HAVE_LINUX_EPOLL_H 1
192
++_ACEOF
193
++
194
++fi
195
++
196
+ echo $ac_n "checking for SO_BSDCOMPAT declaration""... $ac_c" 1>&6
197
+ echo "configure:3830: checking for SO_BSDCOMPAT declaration" >&5
198
+ if eval "test \"`echo '$''{'ac_cv_decl_so_bsdcompat'+set}'`\" = set"; then
199
+diff -Nurp erts/configure.in erts/configure.in
200
+--- erts/configure.in	2006-03-07 06:25:41.000000000 -0800
201
++++ erts/configure.in	2006-03-10 15:55:12.000000000 -0800
202
+@@ -664,6 +664,7 @@ dnl Check if we have kernel poll support
203
+ AC_CHECK_HEADER(sys/devpoll.h, AC_DEFINE(HAVE_SYS_DEVPOLL_H))
204
+ AC_CHECK_HEADER(linux/kpoll.h, AC_DEFINE(HAVE_LINUX_KPOLL_H))
205
+ AC_CHECK_HEADER(sys/event.h, AC_DEFINE(HAVE_SYS_EVENT_H))
206
++AC_CHECK_HEADER(sys/epoll.h, AC_DEFINE(HAVE_LINUX_EPOLL_H))
207
+
208
+ HAVE_VALGRIND=no
209
+ AC_CHECK_HEADER(valgrind/valgrind.h, HAVE_VALGRIND=yes)
210
+ AC_SUBST(HAVE_VALGRIND)
211
+diff -Nurp erts/emulator/sys/unix/sys.c erts/emulator/sys/unix/sys.c
212
+--- erts/emulator/sys/unix/sys.c	2006-03-07 06:24:29.000000000 -0800
213
++++ erts/emulator/sys/unix/sys.c	2006-03-10 15:55:12.000000000 -0800
214
+@@ -13,6 +13,12 @@
215
+  * Portions created by Ericsson are Copyright 1999, Ericsson Utvecklings
216
+  * AB. All Rights Reserved.''
217
+  * 
218
++ * 2005-08-31
219
++ * This has been modified by Matthew Reilly of SIPphone Inc. to 
220
++ * enable kernel poll (+K true) support via the epoll mechanism in Linux 2.6
221
++ * Portions created by SIPphone Inc. are Copyright 2005, SIPphone Inc.
222
++ * These modifications are released under the Erlang Public License.
223
++ *
224
+  *     $Id$
225
+  */
226
+ 
227
+@@ -50,6 +56,9 @@
228
+ #      define USE_DEVPOLL
229
+ #      include <sys/devpoll.h>
230
+ #    endif
231
++#    ifdef HAVE_LINUX_EPOLL_H /* Too minimize code changes, we pretend we have HAVE_LINUX_KPOLL_H as well */
232
++#      define HAVE_LINUX_KPOLL_H 1
233
++#    endif
234
+ #    ifdef HAVE_LINUX_KPOLL_H
235
+ #      define USE_DEVPOLL
236
+ #      include <asm/page.h>
237
+@@ -58,7 +67,11 @@
238
+ #      ifndef POLLREMOVE
239
+ #        define POLLREMOVE 0x1000 /* some day it will make it to bits/poll.h ;-) */
240
+ #      endif
241
+-#      include <linux/kpoll.h>
242
++#      ifdef HAVE_LINUX_EPOLL_H
243
++#        include <sys/epoll.h>
244
++#      else
245
++#        include <linux/kpoll.h>
246
++#      endif
247
+ #    endif
248
+ #    ifdef USE_DEVPOLL /* can only use one of them ... */
249
+ #      ifdef USE_KQUEUE
250
+@@ -188,8 +201,17 @@ static int use_kernel_poll = 0;
251
+ 
252
+ static int             dev_poll_fd;   /* fd for /dev/poll */
253
+ #ifdef HAVE_LINUX_KPOLL_H
254
++
255
++#ifdef HAVE_LINUX_EPOLL_H
256
++static struct epoll_event* dev_epoll_map;
257
++/* XXX Implement correct mapping from POLLIN/POLLOUT to/from EPOLLIN/EPOLLOUT */
258
++/* Currenltly POLLIN/POLLOUT == EPOLLIN/EPOLLOUT. So these macros will work */
259
++#define EPOLL_TO_POLL(bit_map) (bit_map)
260
++#define POLL_TO_EPOLL(bit_map) (bit_map & (EPOLLIN|EPOLLOUT))
261
++#else
262
+ static char *          dev_poll_map;  /* mmap'ed area from kernel /dev/kpoll */
263
+ static struct k_poll   dev_poll;      /* control block for /dev/kpoll */
264
++#endif /* HAVE_LINUX_KPOLL_H */
265
+ static int max_poll_idx;              /* highest non /dev/kpoll fd */
266
+ 
267
+ static void kpoll_enable();
268
+@@ -199,7 +221,7 @@ static struct dvpoll   dev_poll;      /*
269
+ static struct pollfd*  dev_poll_rfds = NULL; /* Allocated at startup */
270
+ 
271
+ static void devpoll_init(void);
272
+-static void devpoll_update_pix(int pix);
273
++static void devpoll_update_pix(int pix, int old_events);
274
+ #ifdef HAVE_SYS_DEVPOLL_H
275
+ static void devpoll_clear_pix(int pix);
276
+ #endif /* HAVE_SYS_DEVPOLL_H */
277
+@@ -1967,7 +1989,7 @@ static int driver_select_kp(ErlDrvPort i
278
+ 
279
+ #ifdef USE_DEVPOLL
280
+ 	    if (poll_fds[pix].events != old_events) 
281
+-                devpoll_update_pix(pix);
282
++                devpoll_update_pix(pix, old_events);
283
+ #endif
284
+ #ifdef USE_KQUEUE
285
+ 	    if (poll_fds[pix].events != old_events) 
286
+@@ -2023,7 +2045,7 @@ static int driver_select_kp(ErlDrvPort i
287
+ 	    if ( old_events && (dev_poll_fd != -1) ) {
288
+ 	       /* Tell /dev/[k]poll that we are not interested any more ... */
289
+ 	       poll_fds[pix].events = POLLREMOVE;
290
+-	       devpoll_update_pix(pix);
291
++	       devpoll_update_pix(pix, old_events);
292
+ 	       /* devpoll_update_pix may change the pix */
293
+ 	       pix = fd_data[fd].pix;
294
+ 	       poll_fds[pix].events = 0;
295
+@@ -2080,7 +2102,7 @@ static int driver_select_kp(ErlDrvPort i
296
+ #ifdef HAVE_SYS_DEVPOLL_H
297
+ 	    devpoll_clear_pix(pix);
298
+ #endif /* HAVE_SYS_DEVPOLL_H */
299
+-	    devpoll_update_pix(pix);
300
++	    devpoll_update_pix(pix, old_events);
301
+ 	}
302
+ #endif
303
+ #ifdef USE_KQUEUE
304
+@@ -2638,6 +2660,27 @@ static void check_io_kp(int do_wait)
305
+ 	nof_ready_fds = vr;
306
+ 
307
+ #if HAVE_LINUX_KPOLL_H
308
++#ifdef HAVE_LINUX_EPOLL_H
309
++	if ( do_event_poll ) {
310
++           if ((r = epoll_wait(dev_poll_fd,dev_epoll_map,max_fd_plus_one,0)) > 0) {
311
++	    for (i = 0; (i < r); i++) {
312
++	      short revents = dev_epoll_map[i].events;
313
++
314
++	      if (revents != 0) {
315
++	        int fd = dev_epoll_map[i].data.fd;
316
++		rp->pfd.fd = fd;
317
++		rp->pfd.events = poll_fds[fd_data[fd].pix].events;
318
++		rp->pfd.revents = EPOLL_TO_POLL(revents);
319
++		rp->iport = fd_data[fd].inport;
320
++		rp->oport = fd_data[fd].outport;
321
++		rp++;
322
++	        nof_ready_fds ++;
323
++	      } 
324
++	    }
325
++           }
326
++        }
327
++
328
++#else
329
+ 	if ( do_event_poll ) {
330
+ 	  /* Now do the fast poll */
331
+ 	  dev_poll.kp_timeout = 0;
332
+@@ -2660,6 +2703,7 @@ static void check_io_kp(int do_wait)
333
+ 	    nof_ready_fds += r;
334
+ 	  }
335
+ 	}
336
++#endif /*HAVE_LINUX_EPOLL_H */
337
+ #endif
338
+ 
339
+       } else {
340
+@@ -3531,6 +3575,20 @@ static void kpoll_enable()
341
+     poll_fds[pix].revents = 0;
342
+ }
343
+ 
344
++#ifdef HAVE_LINUX_EPOLL_H
345
++static void epoll_init()
346
++{
347
++    /* max_files is just a hint to the kernel */
348
++    if ( (dev_poll_fd=epoll_create(max_files)) < 0 ) {
349
++        DEBUGF(("Will use poll()\n"));
350
++        dev_poll_fd = -1; /* We will not use ekpoll */
351
++    } else {
352
++        DEBUGF(("Will use epoll\n"));
353
++        dev_epoll_map = (struct epoll_event *) erts_alloc(ERTS_ALC_T_POLL_FDS, (sizeof(struct epoll_event) * max_files));
354
++	erts_sys_misc_mem_sz += sizeof(struct epoll_event) * max_files;
355
++    }
356
++}
357
++#else
358
+ static void kpoll_init()
359
+ {
360
+     if ( (dev_poll_fd=open("/dev/kpoll",O_RDWR)) < 0 ) {
361
+@@ -3552,6 +3610,7 @@ static void kpoll_init()
362
+       dev_poll_rfds =  NULL;
363
+     }
364
+ }
365
++#endif /* HAVE_LINUX_EPOLL_H */
366
+ 
367
+ #endif /* HAVE_LINUX_KPOLL_H */
368
+ 
369
+@@ -3581,7 +3640,11 @@ static void devpoll_init(void) 
370
+     } else {
371
+         /* Determine use of poll vs. /dev/poll at runtime */
372
+ #ifdef HAVE_LINUX_KPOLL_H
373
++#ifdef HAVE_LINUX_EPOLL_H
374
++        epoll_init();
375
++#else
376
+         kpoll_init();
377
++#endif
378
+ #else
379
+ #ifdef HAVE_SYS_DEVPOLL_H
380
+         solaris_devpoll_init();
381
+@@ -3607,7 +3670,7 @@ static int devpoll_write(int fd, void *b
382
+     return count;
383
+ }
384
+ 
385
+-static void devpoll_update_pix(int pix)
386
++static void devpoll_update_pix(int pix, int old_events)
387
+ {
388
+     int res;
389
+ 
390
+@@ -3622,10 +3685,33 @@ static void devpoll_update_pix(int pix)
391
+ 
392
+ #endif
393
+     if ( dev_poll_fd != -1 ) {
394
++#ifdef HAVE_LINUX_EPOLL_H
395
++       int events = poll_fds[pix].events;
396
++       int fd = poll_fds[pix].fd;
397
++       if (old_events && events & POLLREMOVE) {
398
++            /* Delete file descriptor from epoll list */
399
++            res = epoll_ctl(dev_poll_fd,EPOLL_CTL_DEL,fd,NULL);
400
++            /* XXX check return code */
401
++       } else {
402
++            struct epoll_event epoll_ctl_event;
403
++            epoll_ctl_event.data.fd = fd;
404
++            epoll_ctl_event.events = POLL_TO_EPOLL(events);
405
++            if (old_events) {
406
++                /* Modify exiting fd */
407
++                res = epoll_ctl(dev_poll_fd,EPOLL_CTL_MOD,fd,&epoll_ctl_event);
408
++                /* XXX check return code */
409
++            } else {
410
++                /* Add fd to epoll list */
411
++                res = epoll_ctl(dev_poll_fd,EPOLL_CTL_ADD,fd,&epoll_ctl_event);
412
++                /* XXX check return code */
413
++            } 
414
++       }
415
++#else
416
+         if ( (res=devpoll_write(dev_poll_fd,&poll_fds[pix],sizeof(struct pollfd))) != 
417
+              (sizeof(struct pollfd)) ) {
418
+             erl_exit(1,"Can't write to /dev/poll\n");
419
+         }
420
++#endif /* HAVE_LINUX_EPOLL_H */
421
+     }
422
+ #if HAVE_LINUX_KPOLL_H
423
+     } else {
... ...
@@ -0,0 +1,83 @@
1
+--- ./lib/stdlib/src/supervisor.erl	2005-12-24 22:50:23.000000000 +0200
2
++++ ./lib/stdlib/src/supervisor.erl	2005-12-24 23:03:33.000000000 +0200
3
+@@ -32,10 +32,12 @@
4
+ -export([init/1, handle_call/3, handle_info/2, terminate/2, code_change/3]).
5
+ -export([handle_cast/2]).
6
+ 
7
++-define(DICT, dict).
8
++
9
+ -record(state, {name,
10
+ 		strategy,
11
+ 		children = [],
12
+-		dynamics = [],
13
++		dynamics = ?DICT:new(),
14
+ 		intensity,
15
+ 		period,
16
+ 		restarts = [],
17
+@@ -218,11 +220,11 @@
18
+     case do_start_child_i(M, F, Args) of
19
+ 	{ok, Pid} ->
20
+ 	    NState = State#state{dynamics = 
21
+-				 [{Pid, Args}|State#state.dynamics]},
22
++				 ?DICT:store(Pid, Args, State#state.dynamics)},
23
+ 	    {reply, {ok, Pid}, NState};
24
+ 	{ok, Pid, Extra} ->
25
+ 	    NState = State#state{dynamics = 
26
+-				 [{Pid, Args}|State#state.dynamics]},
27
++				 ?DICT:store(Pid, Args, State#state.dynamics)},
28
+ 	    {reply, {ok, Pid, Extra}, NState};
29
+ 	What ->
30
+ 	    {reply, What, State}
31
+@@ -284,7 +286,7 @@
32
+ handle_call(which_children, _From, State) when ?is_simple(State) ->
33
+     [#child{child_type = CT, modules = Mods}] = State#state.children,
34
+     Reply = lists:map(fun({Pid, _}) -> {undefined, Pid, CT, Mods} end,
35
+-		      State#state.dynamics),
36
++		      ?DICT:to_list(State#state.dynamics)),
37
+     {reply, Reply, State};
38
+ 
39
+ handle_call(which_children, _From, State) ->
40
+@@ -439,14 +441,14 @@
41
+ %%% ---------------------------------------------------
42
+ 
43
+ restart_child(Pid, Reason, State) when ?is_simple(State) ->
44
+-    case lists:keysearch(Pid, 1, State#state.dynamics) of
45
+-	{value, {_Pid, Args}} ->
46
++    case ?DICT:find(Pid, State#state.dynamics) of
47
++	{ok, Args} ->
48
+ 	    [Child] = State#state.children,
49
+ 	    RestartType = Child#child.restart_type,
50
+ 	    {M, F, _} = Child#child.mfa,
51
+ 	    NChild = Child#child{pid = Pid, mfa = {M, F, Args}},
52
+ 	    do_restart(RestartType, Reason, NChild, State);
53
+-	_ ->
54
++	error ->
55
+ 	    {ok, State}
56
+     end;
57
+ restart_child(Pid, Reason, State) ->
58
+@@ -488,13 +490,13 @@
59
+ 
60
+ restart(simple_one_for_one, Child, State) ->
61
+     #child{mfa = {M, F, A}} = Child,
62
+-    Dynamics = lists:keydelete(Child#child.pid,1,State#state.dynamics),
63
++    Dynamics = ?DICT:erase(Child#child.pid, State#state.dynamics),
64
+     case do_start_child_i(M, F, A) of
65
+ 	{ok, Pid} ->
66
+-	    NState = State#state{dynamics = [{Pid, A} | Dynamics]},
67
++	    NState = State#state{dynamics = ?DICT:store(Pid, A, Dynamics)},
68
+ 	    {ok, NState};
69
+ 	{ok, Pid, _Extra} ->
70
+-	    NState = State#state{dynamics = [{Pid, A} | Dynamics]},
71
++	    NState = State#state{dynamics = ?DICT:store(Pid, A, Dynamics)},
72
+ 	    {ok, NState};
73
+ 	{error, Error} ->
74
+ 	    report_error(start_error, Error, Child, State#state.name),
75
+@@ -638,7 +640,7 @@
76
+ %% Child/State manipulating functions.
77
+ %%-----------------------------------------------------------------
78
+ state_del_child(#child{pid = Pid}, State) when ?is_simple(State) ->
79
+-    NDynamics = lists:keydelete(Pid, 1, State#state.dynamics),
80
++    NDynamics = ?DICT:erase(Pid, State#state.dynamics),
81
+     State#state{dynamics = NDynamics};
82
+ state_del_child(Child, State) ->
83
+     NChildren = del_child(Child#child.name, State#state.children),
... ...
@@ -0,0 +1,12 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
3
+<pkgmetadata>
4
+<herd>lang-misc</herd>
5
+<herd>emacs</herd>
6
+<longdescription>
7
+Erlang is a programming language designed at the Ericsson 
8
+Computer Science Laboratory. Open-source Erlang is being 
9
+released to help encourage the spread of Erlang outside 
10
+Ericsson.
11
+</longdescription>
12
+</pkgmetadata>
... ...
@@ -0,0 +1,2 @@
1
+MD5 6baf4defde743ab7d2c1baea74066078 Object-MultiType-0.05.ebuild 631
2
+MD5 31e2172b085e184b2dee2dbb8d5d52c9 files/digest-Object-MultiType-0.05 71
... ...
@@ -0,0 +1,17 @@
1
+# Copyright 1999-2006 Gentoo Foundation
2
+# Distributed under the terms of the GNU General Public License v2
3
+# $Header: /var/cvsroot/gentoo-x86/dev-perl/XML-Simple/XML-Simple-2.09.ebuild,v 1.11 2006/02/13 14:14:44 mcummings Exp $
4
+
5
+inherit perl-module
6
+
7
+IUSE=""
8
+DESCRIPTION="Object::MultiType - Perl Objects as Hash, Array and Scalar at the same time."
9
+SRC_URI="http://www.cpan.org/modules/by-module/Object/${P}.tar.gz"
10
+HOMEPAGE="http://www.cpan.org/modules/by-module/Object/${P}.readme"
11
+SLOT="0"
12
+LICENSE="|| ( Artistic GPL-2 )"
13
+KEYWORDS="x86 amd64 ppc sparc alpha"
14
+
15
+DEPEND="${DEPEND}
16
+	virtual/perl-Storable
17
+	virtual/perl-Test-Simple"
... ...
@@ -0,0 +1 @@
1
+MD5 171ed010dab19fb8b94f22a5fca97814 Object-MultiType-0.05.tar.gz 6629
... ...
@@ -0,0 +1,6 @@
1
+MD5 0a74837b9646765a6b56a6ae8ec26d4a XML-Smart-1.6.ebuild 632
2
+RMD160 4e612515fdfb0059dfec88e9e001b544e1d78f84 XML-Smart-1.6.ebuild 632
3
+SHA256 f25e4b55982a5c13d12b68daec191a090cb131963b026999d7262cd4ada41a17 XML-Smart-1.6.ebuild 632
4
+MD5 6edbb86f952aa96f34e0887c1ad2e2f8 files/digest-XML-Smart-1.6 64
5
+RMD160 7978db78047600ebddd927c28f8ae4cf5ca3e3a3 files/digest-XML-Smart-1.6 64
6
+SHA256 72dae5183e6938b0fd78ffdcaf762a688b08140274fa9e295e406028381465c9 files/digest-XML-Smart-1.6 64
... ...
@@ -0,0 +1,18 @@
1
+# Copyright 1999-2006 Gentoo Foundation
2
+# Distributed under the terms of the GNU General Public License v2
3
+# $Header: /var/cvsroot/gentoo-x86/dev-perl/XML-Simple/XML-Simple-2.09.ebuild,v 1.11 2006/02/13 14:14:44 mcummings Exp $
4
+
5
+inherit perl-module
6
+
7
+IUSE=""
8
+DESCRIPTION="XML::Smart - A Smart, easy and powerful way to access/create XML files/data."
9
+SRC_URI="http://www.cpan.org/modules/by-module/XML/${P}.tar.gz"
10
+HOMEPAGE="http://www.cpan.org/modules/by-module/XML/${P}.readme"
11
+SLOT="0"
12
+LICENSE="|| ( Artistic GPL-2 )"
13
+KEYWORDS="~x86 ~amd64"
14
+
15
+DEPEND="${DEPEND}
16
+	virtual/perl-Storable
17
+	virtual/perl-Test-Simple
18
+	dev-perl/XML-Stream"
... ...
@@ -0,0 +1 @@
1
+MD5 d5f1aa2c72c25dba49e382a9b6578bfa XML-Smart-1.6.tar.gz 36329
... ...
@@ -0,0 +1,7 @@
1
+# ChangeLog for dev-php/PEAR-HTML_AJAX
2
+# Copyright 2005-2006 BreakMyGentoo.net; Distributed under the GPL v2
3
+# $Header: $
4
+
5
+  10 Mar 2006; Hendrik Brandt <heb@gnome-de.org> ChangeLog:
6
+  initial ebuild
7
+
... ...
@@ -0,0 +1,12 @@
1
+DIST HTML_AJAX-0.5.0.tgz 133921 RMD160 cd5be6e5483a37893a43f0b4298b66bb298631dd SHA1 e43b4a270139c5c1a12f082ed6b8f9271d321c97 SHA256 b6efede688b112ad66d8e69ec75567b4fe2c492bc918d922b1fc267c309da68b
2
+EBUILD PEAR-HTML_AJAX-0.5.0.ebuild 269 RMD160 25071017ea75a2021bb5e26b429def8c53ab3a04 SHA1 dc43bbfd6d6fb2853ab4d1df19a7b5fa0159422e SHA256 35c004008b59aee846f05e32420791d30904deafb44dac33201eb2f34ba23f84
3
+MD5 fec1c8b9878c816e400f0aad2e1c19a0 PEAR-HTML_AJAX-0.5.0.ebuild 269
4
+RMD160 25071017ea75a2021bb5e26b429def8c53ab3a04 PEAR-HTML_AJAX-0.5.0.ebuild 269
5
+SHA256 35c004008b59aee846f05e32420791d30904deafb44dac33201eb2f34ba23f84 PEAR-HTML_AJAX-0.5.0.ebuild 269
6
+MISC ChangeLog 201 RMD160 59272bf0d69508423eaab81afd2b058a5d99f92b SHA1 d01ffc85883572727fcd399c9509c20d1c36fd49 SHA256 1e92ff9506702c67f008afc5db0b0d18769c174aa3ed377d10ec842cf1e747ed
7
+MD5 8df9a6e328d4b650a1e9cb9bb04cd1b7 ChangeLog 201
8
+RMD160 59272bf0d69508423eaab81afd2b058a5d99f92b ChangeLog 201
9
+SHA256 1e92ff9506702c67f008afc5db0b0d18769c174aa3ed377d10ec842cf1e747ed ChangeLog 201
10
+MD5 3cfd3d9d3a7ad5e014f550522e3f8cd0 files/digest-PEAR-HTML_AJAX-0.5.0 238
11
+RMD160 0d57cc4e38512397755cadf198c611e504a57484 files/digest-PEAR-HTML_AJAX-0.5.0 238
12
+SHA256 d653216383cc60df0c96881e97355ca0351991dc1c084e19a0b732557dc09c79 files/digest-PEAR-HTML_AJAX-0.5.0 238
... ...
@@ -0,0 +1,11 @@
1
+# Copyright 2006 BreakMyGentoo.net
2
+# Distributed under the terms of the GNU General Public License v2
3
+# $Header: $
4
+
5
+inherit php-pear-r1
6
+
7
+IUSE=""
8
+DESCRIPTION="Provides an interface for creating simple JS scripts within PHP"
9
+LICENSE="PHP"
10
+SLOT="0"
11
+KEYWORDS="~amd64 ~x86"
... ...
@@ -0,0 +1,3 @@
1
+RMD160 1369abee60a62ada16df542f6c840bc9f35c4dfa HTML_AJAX-0.3.4.tgz 112736
2
+SHA256 8467f61b962d18d1b07755cdfd0a2e02557d512903f4461a7b482b8e18e2e819 HTML_AJAX-0.3.4.tgz 112736
3
+MD5 eea532fa777c3c8e3d188e1556960cfc HTML_AJAX-0.3.4.tgz 112736
... ...
@@ -0,0 +1,3 @@
1
+MD5 fc41fcb19a0ee67af07ee99654310627 HTML_AJAX-0.5.0.tgz 133921
2
+RMD160 cd5be6e5483a37893a43f0b4298b66bb298631dd HTML_AJAX-0.5.0.tgz 133921
3
+SHA256 b6efede688b112ad66d8e69ec75567b4fe2c492bc918d922b1fc267c309da68b HTML_AJAX-0.5.0.tgz 133921
... ...
@@ -0,0 +1,9 @@
1
+# ChangeLog for dev-php/PEAR-HTTP_Client
2
+# Copyright 2004-2006 BreakMyGentoo.net; Distributed under the GPL v2
3
+# $Header: $
4
+
5
+  10 Sep 2006; Lars Strojny <lars@strojny.net> PEAR-HTTP_Client-1.1.0.ebuild:
6
+  Version bump.
7
+
8
+  24 Mar 2006; Lars Strojny <lars@strojny.net> ChangeLog:
9
+  Initial commit
... ...
@@ -0,0 +1,12 @@
1
+DIST HTTP_Client-1.1.0.tgz 7966 RMD160 711914229d15abb5af51ac19bb58c11b759c0f72 SHA1 95a14919adb0f4c399cc3b8582531d7972137ce1 SHA256 150987cbd2459a736e8b86e23de008002af338c7ab187ad46df0bbdf6582fddd
2
+EBUILD PEAR-HTTP_Client-1.1.0.ebuild 368 RMD160 983b70936fef12f2248d0a1c780d7343f4c848e5 SHA1 b12555792fa5002cdbca1f13a2e6ac167cc6b66c SHA256 c485c02d8dac478db134ca8642eb6470c162505cfeb2169d61483948b1133da6
3
+MD5 74755044bb092f08e843b49e8094ccb4 PEAR-HTTP_Client-1.1.0.ebuild 368
4
+RMD160 983b70936fef12f2248d0a1c780d7343f4c848e5 PEAR-HTTP_Client-1.1.0.ebuild 368
5
+SHA256 c485c02d8dac478db134ca8642eb6470c162505cfeb2169d61483948b1133da6 PEAR-HTTP_Client-1.1.0.ebuild 368
6
+MISC ChangeLog 295 RMD160 a78bf3d300eb0086f15ceb6350bbf3b656f7da6c SHA1 b002703b42e0af76a542ce120290058ff23fd707 SHA256 66e9e85e0352ad993c0039a232397a3c5ace8173a3c2f1d407820e052e683f1a
7
+MD5 494fd37b6f57736b5be6ce50159e3fee ChangeLog 295
8
+RMD160 a78bf3d300eb0086f15ceb6350bbf3b656f7da6c ChangeLog 295
9
+SHA256 66e9e85e0352ad993c0039a232397a3c5ace8173a3c2f1d407820e052e683f1a ChangeLog 295
10
+MD5 481111a63d217d3a44c232a3772746b5 files/digest-PEAR-HTTP_Client-1.1.0 238
11
+RMD160 85e9af1bf1b84d4a6fc094223936cbbade9cbc1b files/digest-PEAR-HTTP_Client-1.1.0 238
12
+SHA256 8158d925407e2775510134945758ca7caab0e8629d1dc85ea3414126cbaa0404 files/digest-PEAR-HTTP_Client-1.1.0 238
... ...
@@ -0,0 +1,16 @@
1
+# Copyright 2006 BreakMyGentoo.net
2
+# Distributed under the terms of the GNU General Public License v2
3
+# $Header: $
4
+
5
+inherit php-pear-r1
6
+
7
+DESCRIPTION="Provides an easy client to perform HTTP requests"
8
+
9
+LICENSE="PHP"
10
+SLOT="0"
11
+KEYWORDS="~amd64 ~x86"
12
+IUSE=""
13
+
14
+RDEPEND=">=dev-php/PEAR-Net_URL-1.0.14-r1
15
+	>=dev-php/PEAR-Net_Socket-1.0.6-r1
16
+	>=dev-php/PEAR-HTTP_Request-1.0"
... ...
@@ -0,0 +1,3 @@
1
+MD5 2067402dfaf521a3ae2e3fa7acf79186 HTTP_Client-1.1.0.tgz 7966
2
+RMD160 711914229d15abb5af51ac19bb58c11b759c0f72 HTTP_Client-1.1.0.tgz 7966
3
+SHA256 150987cbd2459a736e8b86e23de008002af338c7ab187ad46df0bbdf6582fddd HTTP_Client-1.1.0.tgz 7966
... ...
@@ -0,0 +1,7 @@
1
+# ChangeLog for dev-php/PEAR-Services_JSON
2
+# Copyright 2005-2006 BreakMyGentoo.net; Distributed under the GPL v2
3
+# $Header: $
4
+
5
+  24 Mar 2006; Lars Strojny <lars@strojny.net> ChangeLog:
6
+  Initial commit
7
+
... ...
@@ -0,0 +1,9 @@
1
+MD5 ee50f74d3d7012c8bcb933ac75cd6ea5 ChangeLog 203
2
+RMD160 bcfe3d8469f77520ef326df366ed91581f2f8093 ChangeLog 203
3
+SHA256 4223e7a21dae7003dd00d73b90e3f69ee8df9ad033ec0ee252b7ba4a609e45d4 ChangeLog 203
4
+MD5 f3356c71e8207e60bf1e491f68be918b PEAR-Services_JSON-0.0.1.ebuild 618
5
+RMD160 140447d040cdbc477e7bd02f74d6e4281db563e7 PEAR-Services_JSON-0.0.1.ebuild 618
6
+SHA256 a5c56d7d3ff770cc654c561e12ea12288f8570188ebe8c992acb99d535c9bdf1 PEAR-Services_JSON-0.0.1.ebuild 618
7
+MD5 176b77f0493e0cf673faea0bc634f81d files/digest-PEAR-Services_JSON-0.0.1 271
8
+RMD160 91e35f82c76507e9ac36c174ce6e610415d9f945 files/digest-PEAR-Services_JSON-0.0.1 271
9
+SHA256 8cd3ccabd87a922d9e054ad51cb4360418cfefed002b4aa073c2f1abe85354c9 files/digest-PEAR-Services_JSON-0.0.1 271
... ...
@@ -0,0 +1,27 @@
1
+# Copyright 2006 BreakMyGentoo.net
2
+# Distributed under the terms of the GNU General Public License v2
3
+# $Header: $
4
+
5
+DESCRIPTION="PEAR (proposed!) module for JSON (JavaScript Object Notation)"
6
+HOMEPAGE=""
7
+SRC_URI="http://svn.breakmygentoo.net/distfiles/${P}.tar.gz"
8
+
9
+LICENSE="BSD"
10
+SLOT="0"
11
+KEYWORDS="~amd64 ~x86"
12
+IUSE="doc"
13
+RESTRICT="nomirror"
14
+
15
+DEPEND=""
16
+RDEPEND=">=dev-php/PEAR-HTTP_Request-1.2.4-r1
17
+	>=dev-php/PEAR-XML_Serializer-0.15.0-r1
18
+	dev-php/PEAR-Cache"
19
+S="${WORKDIR}"
20
+
21
+src_install() {
22
+	insinto /usr/share/php/Services
23
+	doins JSON.php
24
+	dodoc LICENSE
25
+	insinto /usr/share/php/docs/${PN/PEAR-/}
26
+	doins -r doc/*
27
+}
... ...
@@ -0,0 +1,3 @@
1
+MD5 e9f431b8ae8f4cb19af6c6a2a69f26f1 PEAR-Services_JSON-0.0.1.tar.gz 23936
2
+RMD160 66e63b38a803501107e9e945c383f37c0c6b7a62 PEAR-Services_JSON-0.0.1.tar.gz 23936
3
+SHA256 e0e08d64c605d101d4855b171e1d5b6e446fe3ece5753dcfdc4f6941aa2a7bb0 PEAR-Services_JSON-0.0.1.tar.gz 23936
... ...
@@ -0,0 +1,8 @@
1
+DIST xcache-1.1-rc2.tar.gz 86640 RMD160 a0c8236540b33aafefd2e30de0557fb45444f561 SHA1 5686d99c8186e576f9dc5e113e80d480cbceda8e SHA256 890c9b8a99ff0e2792bdde46107af3ef84d65172f9f81098aa9b512b5579f33f
2
+EBUILD xcache-1.1_rc2.ebuild 2719 RMD160 f810d27a3a8ac88c60b9eafd384623e6df546011 SHA1 c3a3dc7e969146b60f6bf59a47ed05c7079f480e SHA256 294f3fa828735a49f50ea2cc094da692a7d7076ba6558dc5321949b9fb045dcd
3
+MD5 cd5708e84832800507b321427b55d1e5 xcache-1.1_rc2.ebuild 2719
4
+RMD160 f810d27a3a8ac88c60b9eafd384623e6df546011 xcache-1.1_rc2.ebuild 2719
5
+SHA256 294f3fa828735a49f50ea2cc094da692a7d7076ba6558dc5321949b9fb045dcd xcache-1.1_rc2.ebuild 2719
6
+MD5 0ce0fa16e08830f4616002f071c9cb8b files/digest-xcache-1.1_rc2 241
7
+RMD160 20cf2186ee95303da73efad31b47773eab0a3f9f files/digest-xcache-1.1_rc2 241
8
+SHA256 88a3ec953b7998c2ae2e3a6be934d30fb68eeed3bd585158f0290a60666a43d0 files/digest-xcache-1.1_rc2 241
... ...
@@ -0,0 +1,2 @@
1
+Bitte hier liegen lasse.
2
+ -- Lars
... ...
@@ -0,0 +1,3 @@
1
+MD5 4027f88a7eba694956b59c1922c52428 xcache-1.1-rc2.tar.gz 86640
2
+RMD160 a0c8236540b33aafefd2e30de0557fb45444f561 xcache-1.1-rc2.tar.gz 86640
3
+SHA256 890c9b8a99ff0e2792bdde46107af3ef84d65172f9f81098aa9b512b5579f33f xcache-1.1-rc2.tar.gz 86640
... ...
@@ -0,0 +1,94 @@
1
+# Copyright 1999-2006 Gentoo Foundation
2
+# Distributed under the terms of the GNU General Public License v2
3
+
4
+PHP_EXT_NAME="xcache"
5
+PHP_EXT_INI="yes"
6
+PHP_EXT_ZENDEXT="yes"
7
+
8
+
9
+inherit php-ext-source-r1 confutils
10
+
11
+KEYWORDS="~amd64"
12
+DESCRIPTION="Another PHP opcode cache and encoder"
13
+HOMEPAGE="http://trac.lighttpd.net/xcache/"
14
+
15
+MY_PV=${PV/_rc/-rc}
16
+SRC_URI="http://210.51.190.228/pub/XCache/rc/${MY_PV}/${PN}-${MY_PV}.tar.gz"
17
+LICENSE="BSD"
18
+SLOT="0"
19
+IUSE="test"
20
+DEPEND="${DEPEND}
21
+                !dev-php5/pecl-apc
22
+		!dev-php5/eaccelerator"
23
+S="${WORKDIR}/${PN}"
24
+
25
+need_php_by_category
26
+
27
+pkg_setup() {
28
+	has_php
29
+	require_php_sapi_from cgi apache apache2
30
+}
31
+
32
+src_unpack() {
33
+	unpack ${A}
34
+	cd ${S}
35
+	has_hardenedphp && epatch "${FILESDIR}"/${P}-hardening-0.4.11.patch
36
+}
37
+
38
+src_compile() {
39
+	has_php
40
+
41
+	my_conf="--enable-xcache=shared  \
42
+		--enable-xcache-constant     \
43
+		--enable-xcache-optimizer    \
44
+		--enable-xcache-coverager    \
45
+		--enable-xcache-assembler    \
46
+		--enable-xcache-encoder      \
47
+		--enable-xcache-decoder      \
48
+		$(use_enable test xcache-test)"
49
+	
50
+	einfo ${my_conf}
51
+
52
+	enable_extension_with_built_with =${PHP_PKG} apache2 apxs2 /usr/sbin/apxs2 "optimisation for apache2"
53
+	enable_extension_with_built_with =${PHP_PKG} apache apxs /usr/sbin/apxs "optimisation for apache1"
54
+
55
+	php-ext-source-r1_src_compile
56
+}
57
+
58
+src_install() {
59
+	php-ext-source-r1_src_install
60
+	dodoc-php AUTHORS CHANGELOG INSTALL COPYING
61
+	php-ext-base-r1_addtoinifiles "auto_globals_jit" '"0"'
62
+	php-ext-base-r1_addtoinifiles "xcache.cacher" '"1"'
63
+	php-ext-base-r1_addtoinifiles "xcache.size" '"10M"'
64
+	php-ext-base-r1_addtoinifiles "xcache.count" '"1"'
65
+	php-ext-base-r1_addtoinifiles "xcache.slots" '"8k"'
66
+	php-ext-base-r1_addtoinifiles "xcache.var_size" '"0"'
67
+	php-ext-base-r1_addtoinifiles "xcache.var_count" '"1"'
68
+	php-ext-base-r1_addtoinifiles "xcache.readonly_protection" '"0"'
69
+	php-ext-base-r1_addtoinifiles "xcache.mmap_path" '"/dev/zero"'
70
+	php-ext-base-r1_addtoinifiles "xcache.optimizer" '"1"'
71
+	php-ext-base-r1_addtoinifiles "xcache.coveragedump_directory" '"/tmp/xcache-coverage-data"'
72
+	php-ext-base-r1_addtoinifiles "xcache.coveragedumper" '"1"'
73
+
74
+	
75
+	dodir "${PHP_EXT_SHARED_DIR}"
76
+	insinto "${PHP_EXT_SHARED_DIR}"
77
+	doins Decompiler.class.php
78
+	insinto "${PHP_EXT_SHARED_DIR}/admin"
79
+	doins admin/*
80
+}
81
+
82
+pkg_postinst() {
83
+	einfo "Decompiler.class.php and the admin/ directory shipped with this"
84
+	einfo "release were installed into /usr/share/php5/xcache/."
85
+	echo
86
+
87
+	if built_with_use =${PHP_PKG} apache || built_with_use =${PHP_PKG} apache2 ; then
88
+		einfo "You need to restart your Apache webserver to activate xcache."
89
+		echo
90
+	fi
91
+
92
+	einfo "See http://trac.lighttpd.net/xcache/wiki/XcacheApi for a list"
93
+	einfo "of PHP functions available trough xcache"
94
+}
... ...
@@ -0,0 +1,12 @@
1
+AUX x64-fix.patch 448 RMD160 bd53f58baeb993a408f161805383be162d60f409 SHA1 ba85d42a7783bfaebd66c970ebc0d4b07256dfbf SHA256 83ba1e742414df8deb6906d2f2c01a5ad00af2e69bdc47a7e35ad44c159d5a81
2
+MD5 ecd394e5d7e5aa9e0a91c305b3a1b8c8 files/x64-fix.patch 448
3
+RMD160 bd53f58baeb993a408f161805383be162d60f409 files/x64-fix.patch 448
4
+SHA256 83ba1e742414df8deb6906d2f2c01a5ad00af2e69bdc47a7e35ad44c159d5a81 files/x64-fix.patch 448
5
+DIST crack-0.4.tgz 25524 RMD160 335b1cecb0ccd958fa01c499a636e0e22a5a46ea SHA1 aa1554747ef2d1c96e4a47fdb0057828661a918a SHA256 00a5250a6c82b39c1aefcb6e1ce0980da5df49c9bfc6ade9a8e867d89e87f560
6
+EBUILD pecl-crack-0.4.ebuild 528 RMD160 c7e11ae04fc1da6b2543d4a344b4ba8bc2667e31 SHA1 1f9e07c3e539c0418ab8267baa877155c425d496 SHA256 ed0c750aacf67a3e492b16f4983d82745b06bf513c512f6d53021a130b874703
7
+MD5 a2711bf27bdf0da265e64b668eb1268b pecl-crack-0.4.ebuild 528
8
+RMD160 c7e11ae04fc1da6b2543d4a344b4ba8bc2667e31 pecl-crack-0.4.ebuild 528
9
+SHA256 ed0c750aacf67a3e492b16f4983d82745b06bf513c512f6d53021a130b874703 pecl-crack-0.4.ebuild 528
10
+MD5 bce2d91a8a689e145aa3655721e525db files/digest-pecl-crack-0.4 217
11
+RMD160 69f7b8f5edc24d118af3a96d44cd4451d417a619 files/digest-pecl-crack-0.4 217
12
+SHA256 23496a5eaff76efb6ad04a1e45943a935bcac061306db6504577d7066ed244a4 files/digest-pecl-crack-0.4 217
... ...
@@ -0,0 +1,3 @@
1
+MD5 7cfe9df99f546cf6bd55b535d71e3b1f crack-0.4.tgz 25524
2
+RMD160 335b1cecb0ccd958fa01c499a636e0e22a5a46ea crack-0.4.tgz 25524
3
+SHA256 00a5250a6c82b39c1aefcb6e1ce0980da5df49c9bfc6ade9a8e867d89e87f560 crack-0.4.tgz 25524
... ...
@@ -0,0 +1,12 @@
1
+diff -ru crack-0.4/libcrack/src/cracklib.h crack-0.4-new/libcrack/src/cracklib.h
2
+--- crack-0.4/libcrack/src/cracklib.h	2005-09-21 11:00:06.000000000 +0200
3
++++ crack-0.4-new/libcrack/src/cracklib.h	2006-10-08 20:44:00.618783250 +0200
4
+@@ -46,7 +46,7 @@
5
+ 
6
+ typedef unsigned char int8;
7
+ typedef unsigned short int int16;
8
+-typedef unsigned long int int32;
9
++typedef unsigned int int32;
10
+ 
11
+ #ifndef NUMWORDS
12
+ # define NUMWORDS                           16
... ...
@@ -0,0 +1,22 @@
1
+# Copyright 1999-2006 Gentoo Foundation
2
+# Distributed under the terms of the GNU General Public License v2
3
+# $Header: /var/cvsroot/gentoo-x86/dev-php5/pecl-crack/pecl-crack-0.4.ebuild,v 1.1 2006/09/29 07:17:33 sebastian Exp $
4
+
5
+PHP_EXT_NAME="crack"
6
+PHP_EXT_INI="yes"
7
+PHP_EXT_ZENDEXT="no"
8
+
9
+inherit php-ext-pecl-r1
10
+
11
+KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86"
12
+DESCRIPTION="PHP interface to the cracklib libraries."
13
+LICENSE="PHP"
14
+SLOT="0"
15
+IUSE=""
16
+
17
+src_unpack() {
18
+	unpack ${A}
19
+	epatch ${FILESDIR}/x64-fix.patch
20
+}
21
+
22
+need_php_by_category
... ...
@@ -0,0 +1,16 @@
1
+AUX config-sed.patch 490 RMD160 6672ed8210d1b19301cb1bf7b653dbfbcfc6c17b SHA1 f6df68846dc0931ffcfa40857595c8cc229371fd SHA256 796f61b3156a17269f3dc3ec3044a8b547c57b8bfc1c470171764c0bcfc40200
2
+MD5 3056c682a94fb76a1c8adeb30bf69c6b files/config-sed.patch 490
3
+RMD160 6672ed8210d1b19301cb1bf7b653dbfbcfc6c17b files/config-sed.patch 490
4
+SHA256 796f61b3156a17269f3dc3ec3044a8b547c57b8bfc1c470171764c0bcfc40200 files/config-sed.patch 490
5
+AUX pecl-pdo_mysql-readmycnf.patch 949 RMD160 052232e62b3c51ff62a8875c7d0901c115264ea2 SHA1 aebacc2ae1d95861d6a40b81d04a5d028d51a74f SHA256 0357637b43cf4096039a77c6018928e7cc308333cbe825cad07257fe87176831
6
+MD5 782fcb1dbe361a624309096cad87cc83 files/pecl-pdo_mysql-readmycnf.patch 949
7
+RMD160 052232e62b3c51ff62a8875c7d0901c115264ea2 files/pecl-pdo_mysql-readmycnf.patch 949
8
+SHA256 0357637b43cf4096039a77c6018928e7cc308333cbe825cad07257fe87176831 files/pecl-pdo_mysql-readmycnf.patch 949
9
+DIST runkit-0.9.tgz 49807 RMD160 59bdbae5599efdc54423d60e02762f5b63122199 SHA1 9cedff758e27274d855944d20f08796e6d1eeada SHA256 f0b4113c767225099741ef7eef38163a14929138e6143375d42d9b16082369af
10
+EBUILD pecl-runkit-0.9.ebuild 547 RMD160 3162c3f6610e43a4f2046acb21584a972619b14e SHA1 eaf4f719ee0aa37e06fa22db3469415508400254 SHA256 ed1a1e92cb7752935e03fc75bd5eb78112a22dd24da916e6eb9b476360c7f5ce
11
+MD5 7f045257feda09e255374799d6a6d431 pecl-runkit-0.9.ebuild 547
12
+RMD160 3162c3f6610e43a4f2046acb21584a972619b14e pecl-runkit-0.9.ebuild 547
13
+SHA256 ed1a1e92cb7752935e03fc75bd5eb78112a22dd24da916e6eb9b476360c7f5ce pecl-runkit-0.9.ebuild 547
14
+MD5 fbf434bfa22866473fc597ac313994d8 files/digest-pecl-runkit-0.9 220
15
+RMD160 bb49b381f01b6f91ff18e34a359b20c4653dfbb8 files/digest-pecl-runkit-0.9 220
16
+SHA256 aca08186e09b25ed7f269887db35ea9099559fad4f88f4d95727644cc086cf31 files/digest-pecl-runkit-0.9 220
... ...
@@ -0,0 +1,12 @@
1
+--- config.m4	2005-12-18 22:18:10.000000000 +0100
2
++++ config.m4	2005-12-18 22:18:52.000000000 +0100
3
+@@ -50,6 +50,9 @@
4
+ 
5
+   if test -n "$PDO_MYSQL_CONFIG" && test -x "$PDO_MYSQL_CONFIG" ; then
6
+     AC_MSG_RESULT($PDO_MYSQL_CONFIG)
7
++    if test "x$SED" = "x"; then
8
++      AC_PATH_PROG(SED, sed)
9
++    fi
10
+     PDO_MYSQL_INCLUDE=`$PDO_MYSQL_CONFIG --cflags | $SED -e "s/'//g"`
11
+     PDO_MYSQL_LIBS=`$PDO_MYSQL_CONFIG --libs | $SED -e "s/'//g"`
12
+     PDO_MYSQL_SOCKET=`$PDO_MYSQL_CONFIG --socket` 
... ...
@@ -0,0 +1,3 @@
1
+MD5 cfa8e0c6cfe8df78b31842d9757bd3d7 PDO_MYSQL-1.0.1.tgz 13002
2
+RMD160 b7f09c74696cf293c971186fd1dcc5ab0de5681e PDO_MYSQL-1.0.1.tgz 13002
3
+SHA256 20fe26e0f3761902fbecf95992a27a886c847b4528cc7fe4b681e6c8ad12a991 PDO_MYSQL-1.0.1.tgz 13002
... ...
@@ -0,0 +1,3 @@
1
+MD5 cfa8e0c6cfe8df78b31842d9757bd3d7 PDO_MYSQL-1.0.1.tgz 13002
2
+RMD160 b7f09c74696cf293c971186fd1dcc5ab0de5681e PDO_MYSQL-1.0.1.tgz 13002
3
+SHA256 20fe26e0f3761902fbecf95992a27a886c847b4528cc7fe4b681e6c8ad12a991 PDO_MYSQL-1.0.1.tgz 13002
... ...
@@ -0,0 +1,3 @@
1
+MD5 855786f79a3803972b04e44c32cece8d runkit-0.9.tgz 49807
2
+RMD160 59bdbae5599efdc54423d60e02762f5b63122199 runkit-0.9.tgz 49807
3
+SHA256 f0b4113c767225099741ef7eef38163a14929138e6143375d42d9b16082369af runkit-0.9.tgz 49807
... ...
@@ -0,0 +1,33 @@
1
+--- mysql_driver.c	2006-04-13 19:39:36.000000000 +0200
2
++++ mysql_driver.c	2006-04-13 19:42:30.000000000 +0200
3
+@@ -32,7 +32,7 @@
4
+ #include "php_pdo_mysql_int.h"
5
+ #include <mysqld_error.h>
6
+ #include "zend_exceptions.h"
7
+-
8
++#include "SAPI.h"
9
+ 
10
+ const char *pdo_mysql_get_sqlstate(unsigned int my_errno) {
11
+ 	switch (my_errno) {
12
+@@ -390,7 +390,7 @@
13
+ {
14
+ 	pdo_mysql_db_handle *H;
15
+ 	int i, ret = 0;
16
+-	char *host = NULL, *unix_socket = NULL;
17
++	char *host = NULL, *unix_socket = NULL, *option_section = NULL;
18
+ 	unsigned int port = 3306;
19
+ 	char *dbname;
20
+ 	struct pdo_data_src_parser vars[] = {
21
+@@ -475,6 +475,12 @@
22
+ 		}
23
+ 	}
24
+ 
25
++	/* Read settings from my.cnf */
26
++	option_section = emalloc(strlen("php-%s") + strlen(sapi_module.name));
27
++	sprintf(option_section, "php-%s", sapi_module.name);
28
++	mysql_options(H->server, MYSQL_READ_DEFAULT_GROUP, option_section);
29
++	efree(option_section);
30
++
31
+ 	dbname = vars[1].optval;
32
+ 	host = vars[2].optval;	
33
+ 	if(vars[3].optval) {
... ...
@@ -0,0 +1,18 @@
1
+# Copyright 1999-2006 Gentoo Foundation
2
+# Distributed under the terms of the GNU General Public License v2
3
+# $Header: /var/cvsroot/gentoo-x86/dev-php5/pecl-pdo-mysql/pecl-pdo-mysql-1.0.1-r1.ebuild,v 1.1 2006/04/14 11:49:43 chtekk Exp $
4
+
5
+#PHP_EXT_NAME="runkit"
6
+#PHP_EXT_PECL_PKG="PDO_MYSQL"
7
+#PHP_EXT_INI="yes"
8
+#PHP_EXT_ZENDEXT="no"
9
+
10
+inherit php-ext-pecl-r1
11
+
12
+KEYWORDS="~alpha amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
13
+DESCRIPTION="PHP Data Objects (PDO) Driver For MySQL Server."
14
+LICENSE="PHP"
15
+SLOT="0"
16
+IUSE=""
17
+
18
+need_php_by_category
... ...
@@ -0,0 +1,8 @@
1
+DIST CherryPy-3.0.0beta2.tar.gz 236869 RMD160 26330e86c479f4f1e6d867a6cbd48887e1bd81be SHA1 36d41609b9427c6eb6ee3c384aeddc4de562aa7e SHA256 d737bcc52f4e4fb39b4f1c948930fadd79d4d3dc770944d286be80b2a3697343
2
+EBUILD cherrypy-3.0.0_beta2.ebuild 938 RMD160 0845081ce5c7d9746d5dff389fcf01a732b8fb2b SHA1 b19f545a59a6b40846cfc7cf568b83996ccd9c39 SHA256 029b2442cbe6a36a8c19a3d22b41c98e42a2e9b71b335e8d218ca68c8c074dc4
3
+MD5 7bdde2f820f7509fda673380cfa4b863 cherrypy-3.0.0_beta2.ebuild 938
4
+RMD160 0845081ce5c7d9746d5dff389fcf01a732b8fb2b cherrypy-3.0.0_beta2.ebuild 938
5
+SHA256 029b2442cbe6a36a8c19a3d22b41c98e42a2e9b71b335e8d218ca68c8c074dc4 cherrypy-3.0.0_beta2.ebuild 938
6
+MD5 7d145e22f59d3a2e70872b87d9ef61d7 files/digest-cherrypy-3.0.0_beta2 259
7
+RMD160 1af1e8460212f2942587d1dd443bbc39c9fb8c96 files/digest-cherrypy-3.0.0_beta2 259
8
+SHA256 fc5725de409249973c4968e67d0326cc30d3fd72c21213538f56d3e5eacddc9a files/digest-cherrypy-3.0.0_beta2 259
... ...
@@ -0,0 +1,39 @@
1
+# Copyright 1999-2006 Gentoo Foundation
2
+# Distributed under the terms of the GNU General Public License v2
3
+# $Header: /var/cvsroot/gentoo-x86/dev-python/cherrypy/cherrypy-2.2.1.ebuild,v 1.1 2006/04/26 01:42:09 pythonhead Exp $
4
+
5
+inherit distutils eutils
6
+
7
+MY_P=${PN/cherrypy/CherryPy}-${PV/_/}
8
+
9
+DESCRIPTION="CherryPy is a pythonic, object-oriented web development framework."
10
+SRC_URI="mirror://sourceforge/cherrypy/${MY_P}.tar.gz"
11
+HOMEPAGE="http://www.cherrypy.org/"
12
+DEPEND=">=dev-lang/python-2.3"
13
+IUSE=""
14
+SLOT="0"
15
+KEYWORDS="~amd64 ~ia64 ~ppc ~x86"
16
+LICENSE="BSD"
17
+S=${WORKDIR}/${MY_P}
18
+
19
+DOCS="CHANGELOG.txt CHERRYPYTEAM.txt"
20
+
21
+#src_unpack() {
22
+#	unpack ${A} || die
23
+#	cd ${S}
24
+#	epatch ${FILESDIR}/${P}-test-gentoo.patch
25
+#}
26
+
27
+src_install() {
28
+	distutils_src_install
29
+	insinto /usr/share/doc/${P}
30
+	doins -r cherrypy/tutorial
31
+	insinto /usr/share/${PN}
32
+	doins -r cherrypy/test
33
+}
34
+
35
+src_test() {
36
+	cd cherrypy/test
37
+	python test.py || die "Test failed."
38
+}
39
+
... ...
@@ -0,0 +1,3 @@
1
+MD5 865d69e897e551ec30d2775f8d108c64 CherryPy-3.0.0beta2.tar.gz 236869
2
+RMD160 26330e86c479f4f1e6d867a6cbd48887e1bd81be CherryPy-3.0.0beta2.tar.gz 236869
3
+SHA256 d737bcc52f4e4fb39b4f1c948930fadd79d4d3dc770944d286be80b2a3697343 CherryPy-3.0.0beta2.tar.gz 236869
... ...
@@ -0,0 +1,8 @@
1
+DIST htmlentities-3.0.1.gem 8704 RMD160 b8c83930ab083f1696ec7f7dd95c05492790b66c SHA1 c92a8225e0dc2ef2025a1eadb2eb72f3b067b970 SHA256 33cc144fa5771274384ae8663b0eed904b6a5a3e950ca738c8314c52ad2a945a
2
+EBUILD htmlentities-3.0.1.ebuild 401 RMD160 a0f93f4e6b54c710dbe00b1bc40c51a4b74497b4 SHA1 af73650e72193ef282f5c67c1babcf280a706d8c SHA256 dbfcaca954668f67c8a12ddfb6582afac324703f5877d852c265001e52ffb09f
3
+MD5 ee17b1a5b0568651b480447fcc859aa0 htmlentities-3.0.1.ebuild 401
4
+RMD160 a0f93f4e6b54c710dbe00b1bc40c51a4b74497b4 htmlentities-3.0.1.ebuild 401
5
+SHA256 dbfcaca954668f67c8a12ddfb6582afac324703f5877d852c265001e52ffb09f htmlentities-3.0.1.ebuild 401
6
+MD5 927fff9221c6600923aa88f71f7aa7c7 files/digest-htmlentities-3.0.1 241
7
+RMD160 7d6b254d8a7f8e98245f12d716c8e527578c8ddc files/digest-htmlentities-3.0.1 241
8
+SHA256 35e060bafefc18444cdc28d0e2754f813c1eb8fe62a07255ec4986455ecf1aaa files/digest-htmlentities-3.0.1 241
... ...
@@ -0,0 +1,3 @@
1
+MD5 c9eb03cb193a44702de961f688c5f39a htmlentities-3.0.1.gem 8704
2
+RMD160 b8c83930ab083f1696ec7f7dd95c05492790b66c htmlentities-3.0.1.gem 8704
3
+SHA256 33cc144fa5771274384ae8663b0eed904b6a5a3e950ca738c8314c52ad2a945a htmlentities-3.0.1.gem 8704
... ...
@@ -0,0 +1,17 @@
1
+# Copyright 1999-2006 BreakMyGentoo.net
2
+# Distributed under the terms of the GNU General Public License v2
3
+# $Header: $
4
+
5
+inherit ruby gems
6
+
7
+DESCRIPTION="A library to decode/encode HTML-entities"
8
+HOMEPAGE="http://htmlentities.rubyforge.org/"
9
+SRC_URI="http://rubyforge.org/frs/download.php/9643/${P}.gem"
10
+
11
+LICENSE="MIT"
12
+SLOT="0"
13
+KEYWORDS="~amd64"
14
+IUSE=""
15
+
16
+USE_RUBY="ruby18 ruby19"
17
+DEPEND="virtual/ruby"
... ...
@@ -0,0 +1,8 @@
1
+DIST ruby-inifile_2.0.0.tar.gz 15975
2
+EBUILD ruby-inifile-2.0.0.ebuild 411 RMD160 5d430336b3e0ee4e345baeea171d77347fe9ce95 SHA1 273fb1ce2a74d9f6fae6768bc49ad2e9491bf85e SHA256 e61cb651908fada5b77a521f591aaee9d9b63fd0a2e966d8361db1c4686d79cd
3
+MD5 9ba683b691facffca07c272aa586cdfb ruby-inifile-2.0.0.ebuild 411
4
+RMD160 5d430336b3e0ee4e345baeea171d77347fe9ce95 ruby-inifile-2.0.0.ebuild 411
5
+SHA256 e61cb651908fada5b77a521f591aaee9d9b63fd0a2e966d8361db1c4686d79cd ruby-inifile-2.0.0.ebuild 411
6
+MD5 5b14059c628c0d374a126c5876672bc0 files/digest-ruby-inifile-2.0.0 69
7
+RMD160 3a3c1e81b433acc5bc261c0759c4607324d54eeb files/digest-ruby-inifile-2.0.0 69
8
+SHA256 0c22e34ea4db03b9e3aac04d6f531e67e22c63e66059c1bcdc37520523b6513e files/digest-ruby-inifile-2.0.0 69
... ...
@@ -0,0 +1 @@
1
+MD5 bfa88808b99ea9031b15413c6989d6cf ruby-inifile_2.0.0.tar.gz 15975
... ...
@@ -0,0 +1,18 @@
1
+# Copyright 1999-2006 BreakMyGentoo.net
2
+# Distributed under the terms of the GNU General Public License v2
3
+# $Header: $
4
+
5
+inherit ruby
6
+
7
+IUSE=""
8
+
9
+DESCRIPTION="Small library to parse INI-files in Ruby"
10
+HOMEPAGE="http://raa.ruby-lang.org/project/ruby-inifile/"
11
+SRC_URI="http://gregoire.lejeune.free.fr/${PN}_${PV}.tar.gz"
12
+
13
+SLOT="0"
14
+USE_RUBY="ruby16 ruby18"
15
+LICENSE="Ruby"
16
+KEYWORDS="~x86 ~amd64"
17
+S=${WORKDIR}/${PN}
18
+
... ...
@@ -0,0 +1,50 @@
1
+# ChangeLog for dev-ruby/ruby-postgres
2
+# Copyright 2000-2006 Gentoo Foundation; Distributed under the GPL v2
3
+# $Header: /var/cvsroot/gentoo-x86/dev-ruby/ruby-postgres/ChangeLog,v 1.12 2006/11/01 18:00:53 flameeyes Exp $
4
+
5
+*ruby-postgres-0.7.1.20051221-r1 (01 Nov 2006)
6
+
7
+  01 Nov 2006; Diego Pettenò <flameeyes@gentoo.org>
8
+  ruby-postgres-0.7.1.ebuild, -ruby-postgres-0.7.1.20051221.ebuild,
9
+  +ruby-postgres-0.7.1.20051221-r1.ebuild:
10
+  Revbump the snapshot, and let it depend on rubygems 0.9.0-r1 so to fix bug
11
+  #143974 for everyone. Also change dependency on libpq rather than full blown
12
+  postgresql, thanks to Matt Michalowski in bug #153642.
13
+
14
+*ruby-postgres-0.7.1.20051221 (07 Aug 2006)
15
+
16
+  07 Aug 2006; Caleb Tennis <caleb@gentoo.org>
17
+  +ruby-postgres-0.7.1.20051221.ebuild:
18
+  Version bump, move to Gem format
19
+
20
+  06 Jun 2006; Simon Stelling <blubb@gentoo.org> ruby-postgres-0.7.1.ebuild:
21
+  stable on amd64
22
+
23
+  17 Apr 2006; Diego Pettenò <flameeyes@gentoo.org>
24
+  ruby-postgres-0.7.1.ebuild:
25
+  Add ~x86-fbsd keyword.
26
+
27
+  09 Apr 2006; Caleb Tennis <caleb@gentoo.org> ruby-postgres-0.7.1.ebuild:
28
+  Change homepage and inherit ruby from bug #129271
29
+
30
+  31 Jan 2006; Aron Griffis <agriffis@gentoo.org>
31
+  ruby-postgres-0.7.1.ebuild:
32
+  Mark 0.7.1 stable on ia64
33
+
34
+  20 Dec 2005; <dang@gentoo.org> ruby-postgres-0.7.1.ebuild:
35
+  Marked ~amd64 Per bug #114693
36
+
37
+  11 Dec 2005; Caleb Tennis <caleb@gentoo.org> ruby-postgres-0.7.1.ebuild:
38
+  Change einstall to make DESTDIR install.  Closes bug #114692
39
+
40
+  03 Oct 2005; Aron Griffis <agriffis@gentoo.org>
41
+  ruby-postgres-0.7.1.ebuild:
42
+  Mark 0.7.1 ~ia64
43
+
44
+*ruby-postgres-0.7.1 (09 May 2003)
45
+
46
+  13 May 2003; Tom Payne <twp@gentoo.org> ruby-postgres-0.7.1.ebuild :
47
+  Marked stable on all ARCHes.
48
+
49
+  09 May 2003; Tom Payne <twp@gentoo.org> ruby-postgres-0.7.1.ebuild :
50
+  Initial import. Ebuild submitted by Jeremy James. Bug # 20664.
... ...
@@ -0,0 +1,34 @@
1
+-----BEGIN PGP SIGNED MESSAGE-----
2
+Hash: SHA1
3
+
4
+DIST ruby-postgres-0.7.1.2005.12.21.gem 45568 RMD160 dcc4c1c8580fa27476e662c791456679e9435ae5 SHA1 785e76f30542dd4457150051b6331b50b3c74b52 SHA256 a4dff24a1a2ebb0c34a935e6377cf826a61da03329c8c79a3ea509200759ec7a
5
+DIST ruby-postgres-0.7.1.tar.gz 29256 RMD160 9ec82ec6755f1ccd38582faeba239474fcb53ec9 SHA1 ba3b872511b525f6b5979031ee62bfa265697e9a SHA256 78b875f6632dd89ecaab22c264e4c99f7742c8ca6100b380b01e2f65221b80d1
6
+EBUILD ruby-postgres-0.7.1.20051221-r1.ebuild 668 RMD160 2fd58ec2f70752d055d2a4178925738babc48bc8 SHA1 549d70fd58702f04e1de307b9bea82ba421eab98 SHA256 44e2c30634ad52807699b331d2fd4da7e83c873e2172608ad134671ff9096dc6
7
+MD5 1ac0fa487ce463a8eb8f4aa1c1f5d089 ruby-postgres-0.7.1.20051221-r1.ebuild 668
8
+RMD160 2fd58ec2f70752d055d2a4178925738babc48bc8 ruby-postgres-0.7.1.20051221-r1.ebuild 668
9
+SHA256 44e2c30634ad52807699b331d2fd4da7e83c873e2172608ad134671ff9096dc6 ruby-postgres-0.7.1.20051221-r1.ebuild 668
10
+EBUILD ruby-postgres-0.7.1.ebuild 576 RMD160 548211e306bd291cacc15e8841aec1ded196fd0c SHA1 eeaf09a5fd309aa86e76381077fbe7a35b221445 SHA256 5da184251e0585548e988de89a9e2cfde88a160e1fd318bf60a2d2f0d142e901
11
+MD5 4ff423f621c9e43e14784408c4c9941a ruby-postgres-0.7.1.ebuild 576
12
+RMD160 548211e306bd291cacc15e8841aec1ded196fd0c ruby-postgres-0.7.1.ebuild 576
13
+SHA256 5da184251e0585548e988de89a9e2cfde88a160e1fd318bf60a2d2f0d142e901 ruby-postgres-0.7.1.ebuild 576
14
+MISC ChangeLog 1865 RMD160 20556052f2f84a9d66309524602cb3a075ebd355 SHA1 6a20ce7e63e73b4072c0bb70ebf34debd505e8f9 SHA256 e4293b29b136df10b2ab865dec4d4225416fade059208cdac754373c3dbfa539
15
+MD5 729e8f35b9cdb158b962d200e497c50b ChangeLog 1865
16
+RMD160 20556052f2f84a9d66309524602cb3a075ebd355 ChangeLog 1865
17
+SHA256 e4293b29b136df10b2ab865dec4d4225416fade059208cdac754373c3dbfa539 ChangeLog 1865
18
+MISC metadata.xml 157 RMD160 5d9e2c7ecba96ffebd936d38acedf859cdea84e1 SHA1 8ce15dcc608eeb5616aeec610dc695cbe6f93e02 SHA256 11fba03a217e2d996f5cd8895493a5692ece8ddac2c1a2dfc71d0e830555121c
19
+MD5 3eec9f3fe48b51f49dbc1f171a3b026f metadata.xml 157
20
+RMD160 5d9e2c7ecba96ffebd936d38acedf859cdea84e1 metadata.xml 157
21
+SHA256 11fba03a217e2d996f5cd8895493a5692ece8ddac2c1a2dfc71d0e830555121c metadata.xml 157
22
+MD5 89569b9ff1cdd82d778f55e66ec9a706 files/digest-ruby-postgres-0.7.1 256
23
+RMD160 fa8b36ce06f7efc27b4301eeedeb1db6e08085c7 files/digest-ruby-postgres-0.7.1 256
24
+SHA256 4e3ec25340d5243f11425cc4e1cf5824926f714000a4044fa052d5d93acb705f files/digest-ruby-postgres-0.7.1 256
25
+MD5 8312d6ded35392b02b89d130215b81b3 files/digest-ruby-postgres-0.7.1.20051221-r1 280
26
+RMD160 01a9fe3a33b2e81f94086b768847956a6326e2f8 files/digest-ruby-postgres-0.7.1.20051221-r1 280
27
+SHA256 29efececd6bb1000efad4c9d309227a12ae3ccf6ffe7fdcb6ab3c558422b80f0 files/digest-ruby-postgres-0.7.1.20051221-r1 280
28
+-----BEGIN PGP SIGNATURE-----
29
+Version: GnuPG v1.4.5 (GNU/Linux)
30
+
31
+iD8DBQFFSN3qAiZjviIA2XgRAifHAKDYyW6Az7S7gUc//AhCxeSW1O1P7wCfYoDs
32
+mWCfosXGDgFJBNNmhwzeNaY=
33
+=xi80
34
+-----END PGP SIGNATURE-----
... ...
@@ -0,0 +1,3 @@
1
+MD5 8ef67b3f4b089248f0420baeb0e3b3c8 ruby-postgres-0.7.1.tar.gz 29256
2
+RMD160 9ec82ec6755f1ccd38582faeba239474fcb53ec9 ruby-postgres-0.7.1.tar.gz 29256
3
+SHA256 78b875f6632dd89ecaab22c264e4c99f7742c8ca6100b380b01e2f65221b80d1 ruby-postgres-0.7.1.tar.gz 29256
... ...
@@ -0,0 +1,3 @@
1
+MD5 5b53d6baf4c6a73377f1169fbcf7ab54 ruby-postgres-0.7.1.2005.12.21.gem 45568
2
+RMD160 dcc4c1c8580fa27476e662c791456679e9435ae5 ruby-postgres-0.7.1.2005.12.21.gem 45568
3
+SHA256 a4dff24a1a2ebb0c34a935e6377cf826a61da03329c8c79a3ea509200759ec7a ruby-postgres-0.7.1.2005.12.21.gem 45568
... ...
@@ -0,0 +1,5 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
3
+<pkgmetadata>
4
+<herd>ruby</herd>
5
+</pkgmetadata>
... ...
@@ -0,0 +1,20 @@
1
+# Copyright 1999-2006 Gentoo Foundation
2
+# Distributed under the terms of the GNU General Public License v2
3
+# $Header: /var/cvsroot/gentoo-x86/dev-ruby/ruby-postgres/ruby-postgres-0.7.1.20051221-r1.ebuild,v 1.1 2006/11/01 18:00:53 flameeyes Exp $
4
+
5
+inherit ruby gems
6
+
7
+MY_P=ruby-postgres-0.7.1.2005.12.21.gem
8
+
9
+DESCRIPTION="An extension library to access a PostgreSQL database from Ruby"
10
+HOMEPAGE="http://ruby.scripting.ca/postgres"
11
+SRC_URI="http://ruby.scripting.ca/postgres/archive/$MY_P"
12
+LICENSE="Ruby"
13
+SLOT="0"
14
+KEYWORDS="~amd64 ~ia64 ~ppc ~sparc ~x86 ~x86-fbsd"
15
+IUSE=""
16
+USE_RUBY="ruby18"
17
+
18
+RDEPEND=">=dev-db/libpq-6.4"
19
+DEPEND="${RDEPEND}
20
+	>=dev-ruby/rubygems-0.9.0-r1"
... ...
@@ -0,0 +1,15 @@
1
+# Copyright 1999-2006 Gentoo Foundation
2
+# Distributed under the terms of the GNU General Public License v2
3
+# $Header: /var/cvsroot/gentoo-x86/dev-ruby/ruby-postgres/ruby-postgres-0.7.1.ebuild,v 1.13 2006/11/01 18:00:53 flameeyes Exp $
4
+
5
+inherit ruby
6
+
7
+DESCRIPTION="An extension library to access a PostgreSQL database from Ruby"
8
+HOMEPAGE="http://ruby.scripting.ca/postgres"
9
+SRC_URI="http://ruby.scripting.ca/postgres/archive/${P}.tar.gz"
10
+LICENSE="Ruby"
11
+SLOT="0"
12
+KEYWORDS="alpha amd64 hppa ia64 mips ppc sparc x86 ~x86-fbsd"
13
+IUSE=""
14
+USE_RUBY="ruby18"
15
+DEPEND=">=dev-db/libpq-6.4"
... ...
@@ -0,0 +1,15 @@
1
+# Copyright 1999-2006 Gentoo Foundation
2
+# Distributed under the terms of the GNU General Public License v2
3
+# $Header: /var/cvsroot/gentoo-x86/dev-ruby/ruby-postgres/ruby-postgres-0.7.1.ebuild,v 1.13 2006/11/01 18:00:53 flameeyes Exp $
4
+
5
+inherit ruby
6
+
7
+DESCRIPTION="An extension library to access a PostgreSQL database from Ruby"
8
+HOMEPAGE="http://ruby.scripting.ca/postgres"
9
+SRC_URI="http://ruby.scripting.ca/postgres/archive/${P}.tar.gz"
10
+LICENSE="Ruby"
11
+SLOT="0"
12
+KEYWORDS="alpha amd64 hppa ia64 mips ppc sparc x86 ~x86-fbsd"
13
+IUSE=""
14
+USE_RUBY="ruby18"
15
+DEPEND=">=dev-db/libpq-6.4"
... ...
@@ -0,0 +1,8 @@
1
+DIST ruby-python-0.3.3.tar.gz 36148 RMD160 feeacffe5eee6f951ba87e91a10919380b118f6c SHA1 a64dd0f74afe751314c8a056259fb4fc142a6865 SHA256 c32f7925d96289b26ba1cda5dce7018e88dfa1c75b839dff524396be9d0ce15e
2
+EBUILD ruby-python-0.3.3.ebuild 517 RMD160 eadb1fef7094feedfa749811401774c15224e9cc SHA1 2a2c6f426992b070f1539c29121d15aab2fa302c SHA256 46d39ca4ba2dd042239e3b92978165f8ffc88da25ed108ab7d67ad8d8b873061
3
+MD5 399f962073f9ec43e59b828bb911cb28 ruby-python-0.3.3.ebuild 517
4
+RMD160 eadb1fef7094feedfa749811401774c15224e9cc ruby-python-0.3.3.ebuild 517
5
+SHA256 46d39ca4ba2dd042239e3b92978165f8ffc88da25ed108ab7d67ad8d8b873061 ruby-python-0.3.3.ebuild 517
6
+MD5 34a8c4f08c1dd4f19355c0d9cd745003 files/digest-ruby-python-0.3.3 250
7
+RMD160 5192770a43b0934407207c4e8e1d943d4d10f248 files/digest-ruby-python-0.3.3 250
8
+SHA256 7a204c13e37938f034d1c72b60f88d0ec4b2f5573fa9451efcbeda9ca9c4f2a6 files/digest-ruby-python-0.3.3 250
... ...
@@ -0,0 +1,3 @@
1
+MD5 f2a736494718e00147ef69dfe0c74807 ruby-python-0.3.3.tar.gz 36148
2
+RMD160 feeacffe5eee6f951ba87e91a10919380b118f6c ruby-python-0.3.3.tar.gz 36148
3
+SHA256 c32f7925d96289b26ba1cda5dce7018e88dfa1c75b839dff524396be9d0ce15e ruby-python-0.3.3.tar.gz 36148
... ...
@@ -0,0 +1,25 @@
1
+# Copyright 1999-2006 Gentoo Foundation
2
+# Distributed under the terms of the GNU General Public License v2
3
+# $Header: $
4
+
5
+inherit ruby
6
+
7
+DESCRIPTION="Ruby/Python extendsion library"
8
+HOMEPAGE="http://www.goto.info.waseda.ac.jp/~fukusima/ruby/python-e.html"
9
+SRC_URI="http://www.goto.info.waseda.ac.jp/~fukusima/ruby/${P}.tar.gz"
10
+
11
+LICENSE=""
12
+SLOT="0"
13
+KEYWORDS="amd64"
14
+IUSE=""
15
+
16
+DEPEND=""
17
+RDEPEND=""
18
+
19
+S=${WORKDIR}/python
20
+#RUBY_ECONF="--with-python-dir=/usr/"
21
+
22
+src_unpack() {
23
+	ruby_src_unpack
24
+	sed -e "s:1\.5:2.4:g" -i *.*
25
+}
... ...
@@ -0,0 +1,8 @@
1
+DIST simple-rss-1.1.gem 35840 RMD160 90c4d324e10daba59555ac7b4074bc2ca600f34d SHA1 a2a7ed12040c446fc9bc1d8070e7c8e9949ca01b SHA256 5a2b14de77caad2585dd571550fec48af6b1c040fc8167ecb9724010d749f801
2
+EBUILD simple-rss-1.1.ebuild 396 RMD160 01dde456c3cbe7d0d4f8d3958583d705219f6c51 SHA1 fe544787ca9ea928752f5e2963fa0528dd5a9642 SHA256 6fc572d12d682cba909dadb00712c3dca468df7f094f1be72938edda07b4a240
3
+MD5 4c61c6d0f2938f86c8710e9475864a50 simple-rss-1.1.ebuild 396
4
+RMD160 01dde456c3cbe7d0d4f8d3958583d705219f6c51 simple-rss-1.1.ebuild 396
5
+SHA256 6fc572d12d682cba909dadb00712c3dca468df7f094f1be72938edda07b4a240 simple-rss-1.1.ebuild 396
6
+MD5 d56c21bef9db4028b92862ea86f4d4b0 files/digest-simple-rss-1.1 232
7
+RMD160 12945d2fc19a39e391f0c91f0e9b2a5991a473f1 files/digest-simple-rss-1.1 232
8
+SHA256 6ca1f31002349f14d2e76988efe8af14bc466cc6c61c6d8c44c9850030259a86 files/digest-simple-rss-1.1 232
... ...
@@ -0,0 +1,3 @@
1
+MD5 47802ba63200ca1e82d6b06140453248 simple-rss-1.1.gem 35840
2
+RMD160 90c4d324e10daba59555ac7b4074bc2ca600f34d simple-rss-1.1.gem 35840
3
+SHA256 5a2b14de77caad2585dd571550fec48af6b1c040fc8167ecb9724010d749f801 simple-rss-1.1.gem 35840
... ...
@@ -0,0 +1,17 @@
1
+# Copyright 1999-2006 BreakMyGentoo.net
2
+# Distributed under the terms of the GNU General Public License v2
3
+# $Header: $
4
+
5
+inherit ruby gems
6
+
7
+DESCRIPTION="A liberal RSS/Atom parser"
8
+HOMEPAGE="http://rubyforge.org/projects/simple-rss"
9
+SRC_URI="http://rubyforge.org/frs/download.php/8343/${P}.gem"
10
+
11
+LICENSE="BSD"
12
+SLOT="0"
13
+KEYWORDS="~x86 amd64"
14
+IUSE=""
15
+
16
+USE_RUBY="ruby18 ruby19"
17
+DEPEND="virtual/ruby"
... ...
@@ -0,0 +1,8 @@
1
+DIST sys-admin-1.3.1.gem 13824 RMD160 ea959ba60f89268a8a73a9c90ef28ce3b6f890b9 SHA1 b0f84791e0346e965029ee77bd057699bb4d64b7 SHA256 eeed868343479ae8f9176465aad68403569c5f2ca1a3c1f77d8456a58dcb9957
2
+EBUILD sys-admin-1.3.1.ebuild 304 RMD160 7f6e32783ab484a72cf8d5d2c7703c4112d68b39 SHA1 91b7e5d89f6d76d1b1cde0407b8ed4ca5ada8329 SHA256 c3e9fe17df82b9e1caf16b95f7073140a4c5cf319e86e7709c75b55d26ce4846
3
+MD5 0dfb8fffd2ff92098e2511e73be11070 sys-admin-1.3.1.ebuild 304
4
+RMD160 7f6e32783ab484a72cf8d5d2c7703c4112d68b39 sys-admin-1.3.1.ebuild 304
5
+SHA256 c3e9fe17df82b9e1caf16b95f7073140a4c5cf319e86e7709c75b55d26ce4846 sys-admin-1.3.1.ebuild 304
6
+MD5 cac5546539885d2d6296f83d2def9850 files/digest-sys-admin-1.3.1 235
7
+RMD160 0539e87d1d1f1dae105f791f231034d3d7f3d242 files/digest-sys-admin-1.3.1 235
8
+SHA256 976daf565d338df6602022c2da8d05995894541fda6460ae8d2bf0306ffec89c files/digest-sys-admin-1.3.1 235
... ...
@@ -0,0 +1,3 @@
1
+MD5 864854e3cd99cc13ce58db167f6d89be sys-admin-1.3.1.gem 13824
2
+RMD160 ea959ba60f89268a8a73a9c90ef28ce3b6f890b9 sys-admin-1.3.1.gem 13824
3
+SHA256 eeed868343479ae8f9176465aad68403569c5f2ca1a3c1f77d8456a58dcb9957 sys-admin-1.3.1.gem 13824
... ...
@@ -0,0 +1,17 @@
1
+# Copyright 1999-2006 Gentoo Foundation
2
+# Distributed under the terms of the GNU General Public License v2
3
+# $Header: $
4
+
5
+inherit ruby gems 
6
+DESCRIPTION=""
7
+HOMEPAGE=""
8
+SRC_URI="http://rubyforge.org/frs/download.php/12083/${P}.gem"
9
+
10
+LICENSE="Ruby"
11
+SLOT="0"
12
+KEYWORDS="~amd64"
13
+IUSE=""
14
+
15
+DEPEND=""
16
+RDEPEND=""
17
+
... ...
@@ -0,0 +1,8 @@
1
+DIST sys-cpu-0.5.4.gem 13312 RMD160 84356271b177aa8f416c619dc84314268f71c5ca SHA1 c305e53ee23394e2d5b7f114a44172a60a11c43e SHA256 6b44d570b13466df9f0ab9829b810bc38713b79460d69f90a4913cca263d2c99
2
+EBUILD sys-cpu-0.5.4.ebuild 385 RMD160 490f67f35f0cf03f2bef374435696cd87f1522ed SHA1 cf46e79f6c221c3bdacca3bb811683d9d61eafc7 SHA256 39cf7a11cab9be86481b03e2c1258bf264658cab3b4da73c7e2258d7a5792204
3
+MD5 159be07ecbdc4855547ef2c15f14a878 sys-cpu-0.5.4.ebuild 385
4
+RMD160 490f67f35f0cf03f2bef374435696cd87f1522ed sys-cpu-0.5.4.ebuild 385
5
+SHA256 39cf7a11cab9be86481b03e2c1258bf264658cab3b4da73c7e2258d7a5792204 sys-cpu-0.5.4.ebuild 385
6
+MD5 9e3f82f76fedf77227ab3eb362966384 files/digest-sys-cpu-0.5.4 229
7
+RMD160 f370f815c424451872a9e5abe82fca2d64869b4d files/digest-sys-cpu-0.5.4 229
8
+SHA256 6da342ba7af82922420a22a390965107a9abc0d3d46ae246d73e9d9b116d4ad8 files/digest-sys-cpu-0.5.4 229
... ...
@@ -0,0 +1,3 @@
1
+MD5 a585f391c1e7c7712071b389aa891ac6 sys-cpu-0.5.4.gem 13312
2
+RMD160 84356271b177aa8f416c619dc84314268f71c5ca sys-cpu-0.5.4.gem 13312
3
+SHA256 6b44d570b13466df9f0ab9829b810bc38713b79460d69f90a4913cca263d2c99 sys-cpu-0.5.4.gem 13312
... ...
@@ -0,0 +1,16 @@
1
+# Copyright 1999-2006 Gentoo Foundation
2
+# Distributed under the terms of the GNU General Public License v2
3
+# $Header: $
4
+
5
+inherit ruby gems
6
+DESCRIPTION="Ruby library for CPU information"
7
+HOMEPAGE="http://rubyforge.org/projects/sysutils"
8
+SRC_URI="http://rubyforge.org/frs/download.php/11582/${P}.gem"
9
+
10
+LICENSE="Ruby"
11
+SLOT="0"
12
+KEYWORDS="~amd64"
13
+IUSE=""
14
+
15
+DEPEND="dev-lang/ruby"
16
+RDEPEND=""
... ...
@@ -0,0 +1,8 @@
1
+# ChangeLog for dev-ruby/xmpp4r-svn
2
+# Copyright 2005-2006 BreakMyGentoo.net; Distributed under the GPL v2
3
+# $Header: $
4
+
5
+  28 Feb 2006; Lars Strojny <lars@strojny.net> ChangeLog:
6
+  Initial commit. There is currently no release but nevertheless important
7
+  development in repos
8
+
... ...
@@ -0,0 +1,12 @@
1
+MD5 3fb8198e6c0db6ded476383bc071a7b8 ChangeLog 277
2
+RMD160 578a7f78d9205f7de4f6fe7a8f5851f19d903d0f ChangeLog 277
3
+SHA256 23b88d591c991cee2fe2b3789493098a3b60fb8e7066498b91a4fb28c98882cb ChangeLog 277
4
+MD5 d41d8cd98f00b204e9800998ecf8427e files/digest-xmpp4r-svn-0.3 0
5
+RMD160 9c1185a5c5e9fc54612808977ee8f548b2258d31 files/digest-xmpp4r-svn-0.3 0
6
+SHA256 e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 files/digest-xmpp4r-svn-0.3 0
7
+MD5 ac05d640c050f189329f1837e2e05d1d metadata.xml 333
8
+RMD160 93dee8b6cc39b3ddd5472fb1757132602f68d176 metadata.xml 333
9
+SHA256 faeb05bf394ca97fbb4a8cd578c106dc41f70de1f3c725061e64ca4fd2e88481 metadata.xml 333
10
+MD5 8b6c1de3c0ed5346406c743fd5a0bcc0 xmpp4r-svn-0.3.ebuild 454
11
+RMD160 03e62e94de769f16f099bec700b1fc086e5c6ddc xmpp4r-svn-0.3.ebuild 454
12
+SHA256 cc416a57f4be5de5f24cb952c314ab31c31d016ef6a6ebc072a976201a3e544c xmpp4r-svn-0.3.ebuild 454
... ...
@@ -0,0 +1,11 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
3
+
4
+<pkgmetadata>
5
+<herd>dev-ruby</herd>
6
+<maintainer>
7
+  <email>lars@breakmygentoo.net</email>
8
+</maintainer>
9
+<longdescription>Ruby library aims to fully support Jabber (compiled from
10
+subversion)</longdescription>
11
+</pkgmetadata>
... ...
@@ -0,0 +1,22 @@
1
+# Copyright 2005-2006 BreakMyGentoo.net
2
+# Distributed under the terms of the GNU General Public License v2
3
+# $Header: $
4
+
5
+inherit subversion ruby
6
+ESVN_REPO_URI="svn://svn.gna.org/svn/xmpp4r/trunk/xmpp4r"
7
+ESVN_PROJECT="xmpp4r"
8
+
9
+IUSE=""
10
+DESCRIPTION="Using Jabber with Ruby"
11
+HOMEPAGE="http://home.gna.org/xmpp4r/"
12
+SRC_URI=""
13
+
14
+SLOT="0"
15
+USE_RUBY="ruby18"
16
+LICENSE="Ruby"
17
+KEYWORDS="~x86 ~amd64"
18
+DEPEND="!dev-ruby/xmpp4r"
19
+
20
+src_unpack() {
21
+	subversion_src_unpack
22
+}
... ...
@@ -0,0 +1,16 @@
1
+# ChangeLog for dev-ruby/xmpp4r
2
+# Copyright 2005-2006 BreakMyGentoo.net; Distributed under the GPL v2
3
+# $Header: $
4
+  
5
+  02 Aug 2006; Lars Strojny <lars@strojny.net> xmpp4r-0.3.ebuild:
6
+  Version bump.
7
+
8
+  27 Apr 2006; Lars Strojny <lars@breakmygentoo.net> ChangeLog:
9
+  Added ~amd64
10
+
11
+  28 Feb 2006; Lars Strojny <lars@strojny.net> xmpp4r-0.2.ebuild:
12
+  Making it ready for dev-ruby/xmpp4r-svn
13
+
14
+  16 Feb 2006; Lars Strojny <lars@breakmygentoo.net> ChangeLog:
15
+  Initial commit
16
+
... ...
@@ -0,0 +1,12 @@
1
+DIST xmpp4r-0.3.tgz 120547 RMD160 fcf83ba58c202e75931518a62cf8a594759c73f8 SHA1 4281089e0dac8f234bc37e4eba07b806718ce3ee SHA256 187a26fc5ad3e3de4aa6a21548f1d70ad1634ec16ee8e6126c38e7554c6a7720
2
+EBUILD xmpp4r-0.3.ebuild 373 RMD160 c94b00bfb9b5152d84edaee6d29cb986ce57563f SHA1 95ac34ba0d314bae45cd3158113de90724529776 SHA256 e0836e8f0330f587fbdfcd5371b885f13800c6becb033ced0950a757dbc83729
3
+MD5 86eb605ab50f3451ee431e691ecf5471 xmpp4r-0.3.ebuild 373
4
+RMD160 c94b00bfb9b5152d84edaee6d29cb986ce57563f xmpp4r-0.3.ebuild 373
5
+SHA256 e0836e8f0330f587fbdfcd5371b885f13800c6becb033ced0950a757dbc83729 xmpp4r-0.3.ebuild 373
6
+MISC ChangeLog 472 RMD160 55020366ff33bec7d10779fad9605bfe811e053d SHA1 acae68c3b6067ad0c601c9a560e9d101d14e4f38 SHA256 10f683181b1f5b81ed50fd8d0949ade91f29503ce637a2b45ee8f7a35cdeb062
7
+MD5 b3f455de2eeda7a59c960c7132f21453 ChangeLog 472
8
+RMD160 55020366ff33bec7d10779fad9605bfe811e053d ChangeLog 472
9
+SHA256 10f683181b1f5b81ed50fd8d0949ade91f29503ce637a2b45ee8f7a35cdeb062 ChangeLog 472
10
+MD5 a31eccdf32948ad5911c9203f700974b files/digest-xmpp4r-0.3 223
11
+RMD160 4b8be047bedf7ffccaab8575c6ea76d681339352 files/digest-xmpp4r-0.3 223
12
+SHA256 49fc793e58d41c98459b0e5c533966afd40adc688ac164d154307b53ca17ce8a files/digest-xmpp4r-0.3 223
... ...
@@ -0,0 +1,3 @@
1
+MD5 0287d0a59b400ca84d4c12eaa4068f7f xmpp4r-0.3.tgz 120547
2
+RMD160 fcf83ba58c202e75931518a62cf8a594759c73f8 xmpp4r-0.3.tgz 120547
3
+SHA256 187a26fc5ad3e3de4aa6a21548f1d70ad1634ec16ee8e6126c38e7554c6a7720 xmpp4r-0.3.tgz 120547
... ...
@@ -0,0 +1,17 @@
1
+# Copyright 1999-2006 BreakMyGentoo.net
2
+# Distributed under the terms of the GNU General Public License v2
3
+# $Header: $
4
+
5
+inherit ruby
6
+
7
+IUSE=""
8
+
9
+DESCRIPTION="Using Jabber with Ruby"
10
+HOMEPAGE="http://home.gna.org/xmpp4r/"
11
+SRC_URI="http://download.gna.org/xmpp4r/${P}.tgz"
12
+
13
+SLOT="0"
14
+USE_RUBY="ruby16 ruby18"
15
+LICENSE="Ruby"
16
+KEYWORDS="~amd64 ~x86"
17
+DEPEND="!dev-ruby/xmpp4r-svn"
... ...
@@ -0,0 +1,8 @@
1
+DIST courier-pythonfilter-0.9.tar.gz 27084 RMD160 409cfef3a34930812128c02c6f4b23ce5ae9b150 SHA1 23ff143dc139e92786abf9a890bde93131caa40d SHA256 6840d63817ccae143f2c889d31e91f73a05966db350a7c5472e4859b278c84b3
2
+EBUILD courier-pythonfilter-0.9.ebuild 665 RMD160 1a1061f67a8f0df4ce745c91aa779acbd30cbd4c SHA1 4e23ea57e0dc4798a691df739c6efa65b8c157aa SHA256 ef3b29ccf94510a2fb1681e544134d9d3e43679711d89ff9cc96f786888c9aba
3
+MD5 364e593313cca6149061e993abe18c76 courier-pythonfilter-0.9.ebuild 665
4
+RMD160 1a1061f67a8f0df4ce745c91aa779acbd30cbd4c courier-pythonfilter-0.9.ebuild 665
5
+SHA256 ef3b29ccf94510a2fb1681e544134d9d3e43679711d89ff9cc96f786888c9aba courier-pythonfilter-0.9.ebuild 665
6
+MD5 24cf8e4e79dea2748bfce66613e7bbd2 files/digest-courier-pythonfilter-0.9 271
7
+RMD160 ce3d2314e6beb536dae83fb224298cf3cfa2dafe files/digest-courier-pythonfilter-0.9 271
8
+SHA256 b7eb143308d967c63cde5f7d3bd0b9340e50024613122bc1729c1168215f9842 files/digest-courier-pythonfilter-0.9 271
... ...
@@ -0,0 +1,29 @@
1
+# Copyright 1999-2006 Gentoo Foundation
2
+# Distributed under the terms of the GNU General Public License v2
3
+# $Header: $
4
+
5
+DESCRIPTION="Python-framework for Courier-MTA's courierfilter"
6
+HOMEPAGE="http://phantom.dragonsdawn.net/~gordon/courier-patches/courier-pythonfilter/"
7
+SRC_URI="http://phantom.dragonsdawn.net/~gordon/courier-patches/courier-pythonfilter/${P}.tar.gz"
8
+
9
+LICENSE="GPL-2"
10
+SLOT="0"
11
+KEYWORDS="~amd64"
12
+IUSE=""
13
+
14
+DEPEND=""
15
+RDEPEND=""
16
+
17
+inherit distutils
18
+
19
+
20
+src_install() {
21
+	distutils_src_install
22
+
23
+	mkdir -p ${D}/var/state/pythonfilter
24
+	chown daemon:daemon ${D}/var/state/pythonfilter
25
+	
26
+	dosym /usr/bin/pythonfilter /usr/lib/courier/filters/pythonfilter
27
+}
28
+
29
+
... ...
@@ -0,0 +1,3 @@
1
+MD5 06d2c901ba6b700298da1c649d2788b9 courier-pythonfilter-0.9.tar.gz 27084
2
+RMD160 409cfef3a34930812128c02c6f4b23ce5ae9b150 courier-pythonfilter-0.9.tar.gz 27084
3
+SHA256 6840d63817ccae143f2c889d31e91f73a05966db350a7c5472e4859b278c84b3 courier-pythonfilter-0.9.tar.gz 27084
... ...
@@ -0,0 +1,8 @@
1
+# ChangeLog for net-im/aspsms-t
2
+# Copyright 2005-2006 BreakMyGentoo.net; Distributed under the GPL v2
3
+# $Header: $
4
+ 
5
+*aspsms-t-1.0.1.ebuild (21 May 2005)
6
+  21 May 2006; Lars Strojny <lars@strojny.net> ChangeLog:
7
+	Initial commit
8
+
... ...
@@ -0,0 +1,16 @@
1
+AUX aspsms-t-1.0.1.initd 439 RMD160 5253b09a40788491c29755c530791c763a189443 SHA1 e1bb0285c87bf72aa3c9802d4b5eeaadfb884ef8 SHA256 30022911b231e0a475add11946f1d8793b0586b4805bd6c6ed1f607d5dd45d8c
2
+MD5 ad9b79cad6b85d34f1ad14dadc8a79e5 files/aspsms-t-1.0.1.initd 439
3
+RMD160 5253b09a40788491c29755c530791c763a189443 files/aspsms-t-1.0.1.initd 439
4
+SHA256 30022911b231e0a475add11946f1d8793b0586b4805bd6c6ed1f607d5dd45d8c files/aspsms-t-1.0.1.initd 439
5
+DIST aspsms-t-1.0.1.tar.gz 608924 RMD160 0409b7e9e6a69e85f4d4c6d68ab9d20d4b42a8ad SHA1 9c8e3a1b5b82a56cb02b03724563951f73e62cec SHA256 04f0cc234c31f52fc19212fba7476c1c14f58778c128b24496592f67fe161b98
6
+EBUILD aspsms-t-1.0.1.ebuild 1435 RMD160 994fddc9f20aed696891d518e9ba0d6a8a72213c SHA1 ae15ee9cf51b96a7820d8e0d5d4bf1ed43d97894 SHA256 8c4f5176109cb9bd7ee8048c70884e9fd0897d6a91adcd81f8d0d45938d76066
7
+MD5 e4ada843cdc7d828017331c98ed5d789 aspsms-t-1.0.1.ebuild 1435
8
+RMD160 994fddc9f20aed696891d518e9ba0d6a8a72213c aspsms-t-1.0.1.ebuild 1435
9
+SHA256 8c4f5176109cb9bd7ee8048c70884e9fd0897d6a91adcd81f8d0d45938d76066 aspsms-t-1.0.1.ebuild 1435
10
+MISC ChangeLog 229 RMD160 456790cd357923010f26f8a3362c5085a6ebd1a3 SHA1 5f7df21675d216c4ece28278fa8f5003beae6135 SHA256 e7f5a6578ca3d522ea62005c68ea48d4a2b565215d9ddeb978febbb67ccc01b8
11
+MD5 d536229e595a9bb06fff764c6a9d5efd ChangeLog 229
12
+RMD160 456790cd357923010f26f8a3362c5085a6ebd1a3 ChangeLog 229
13
+SHA256 e7f5a6578ca3d522ea62005c68ea48d4a2b565215d9ddeb978febbb67ccc01b8 ChangeLog 229
14
+MD5 8fd627237fd7ec3b99ec47693e76b77f files/digest-aspsms-t-1.0.1 244
15
+RMD160 bee54d1493e860ea42a6ed17becd0e5fc4a62826 files/digest-aspsms-t-1.0.1 244
16
+SHA256 0fd2a26edff9bc444d3fc0449b13f6425822bdbfddc1bf1c93541623bb7cc629 files/digest-aspsms-t-1.0.1 244
... ...
@@ -0,0 +1,56 @@
1
+# Copyright 1999-2006 Gentoo Foundation
2
+# Distributed under the terms of the GNU General Public License v2
3
+# $Header: $
4
+
5
+
6
+DESCRIPTION="Jabber2SMS-gateway via aspsms.com"
7
+HOMEPAGE="http://www.micressor.ch/content/projects/aspsms-t"
8
+SRC_URI="http://www.micressor.ch/content/download/aspsms-t/${P}.tar.gz"
9
+
10
+LICENSE="GPL-2"
11
+SLOT="0"
12
+KEYWORDS="~x86 ~amd64"
13
+IUSE="doc"
14
+
15
+DEPEND="dev-lang/perl
16
+	net-im/jabber-base"
17
+
18
+RDEPEND="dev-perl/Object-MultiType
19
+	dev-perl/Authen-SASL
20
+	dev-perl/Digest-SHA1
21
+	dev-perl/XML-Parser
22
+	dev-perl/XML-Smart
23
+	dev-perl/Net-Jabber"
24
+S="${WORKDIR}"
25
+
26
+
27
+src_install() {
28
+	dodoc AUTHORS INSTALL COPYING ChangeLog 
29
+	insinto /usr/doc/${PF}
30
+	doins aspsms-t.exec.pl aspsms.notification.pl
31
+	use doc && dodoc -r docs
32
+
33
+	insinto /usr/lib/${PN}
34
+	doins -r ASPSMS config.pm Presence.pm Iq.pm aspsms-t.pl
35
+	dosed "s:^use lib \"\./\";$:use lib \"/usr/lib/${PN}\";:" \
36
+		/usr/lib/${PN}/${PN}.pl
37
+
38
+	exeinto /usr/bin
39
+	echo "#! /bin/bash
40
+perl /usr/lib/${PN}/${PN}.pl -c /etc/jabber/${PN}.xml >/dev/null" > ${PN}
41
+	doexe ${PN}
42
+	
43
+	insinto /etc/jabber
44
+	newins aspsms.xml.dist ${PN}.xml
45
+	fperms 600 /etc/jabber/${PN}.xml
46
+	fowners jabber:jabber /etc/jabber/${PN}.xml
47
+	dosed "s:<spooldir>[^\<]*</spooldir>:<spooldir>/var/spool/jabber/sms.YOURHOST</spooldir>:" \
48
+		/etc/jabber/${PN}.xml
49
+
50
+	newinitd ${FILESDIR}/${P}.initd ${PN}
51
+}
52
+
53
+pkg_postinst() {
54
+	einfo "Move /usr/doc/${P}/${PN/-t/}.notification.pl in your webroot"
55
+	einfo "and make it executable"
56
+}
... ...
@@ -0,0 +1,24 @@
1
+#!/sbin/runscript
2
+# Copyright 1999-2006 BreakMyGentoo.net
3
+# Distributed under the terms of the GNU General Public License v2
4
+# $Header: $
5
+
6
+depend() {
7
+	need net
8
+	use jabber-server
9
+}
10
+
11
+start() {
12
+	ebegin "Starting SMS Jabber Transport"
13
+	start-stop-daemon --start \
14
+		--background --name "aspsms-t" --exec \
15
+		--chuid jabber:jabber \
16
+		/usr/bin/aspsms-t
17
+	eend $?
18
+}
19
+
20
+stop() {
21
+	ebegin "Stopping SMS Jabber Transport"
22
+	killall aspsms-t
23
+	eend $?
24
+}
... ...
@@ -0,0 +1,3 @@
1
+MD5 12b4b3e90cbabaf6097c1464f807fd31 aspsms-t-1.0.1.tar.gz 608924
2
+RMD160 0409b7e9e6a69e85f4d4c6d68ab9d20d4b42a8ad aspsms-t-1.0.1.tar.gz 608924
3
+SHA256 04f0cc234c31f52fc19212fba7476c1c14f58778c128b24496592f67fe161b98 aspsms-t-1.0.1.tar.gz 608924
... ...
@@ -0,0 +1,28 @@
1
+AUX centericq-4.21.0-icq-short-read.diff 459 RMD160 a45875406445eb6cfa797ba484b1fae99118264d SHA1 b8c12de350300c1d11d4cbbdf1ad846ed72623a5 SHA256 e47d5cbffebb5575136d223ec30e3237449c9805ccfdf1a52bde7a7e54ad1f41
2
+MD5 30d1cc077b8d5330e45cb1051c0df8a3 files/centericq-4.21.0-icq-short-read.diff 459
3
+RMD160 a45875406445eb6cfa797ba484b1fae99118264d files/centericq-4.21.0-icq-short-read.diff 459
4
+SHA256 e47d5cbffebb5575136d223ec30e3237449c9805ccfdf1a52bde7a7e54ad1f41 files/centericq-4.21.0-icq-short-read.diff 459
5
+AUX centericq-4.21.0-ktools.diff 522 RMD160 c745d3f630195c4ca03c6878bf864deee9e2030a SHA1 8d3c7ea5402ecb3d71368c13b5f7ab948f81ce0c SHA256 75bd0133bf7c2ac00211a16b0707d64f3f208ddd4d4e6c631ad3f29b78fe251b
6
+MD5 acab6602a58439dd5688812e6fcf6cec files/centericq-4.21.0-ktools.diff 522
7
+RMD160 c745d3f630195c4ca03c6878bf864deee9e2030a files/centericq-4.21.0-ktools.diff 522
8
+SHA256 75bd0133bf7c2ac00211a16b0707d64f3f208ddd4d4e6c631ad3f29b78fe251b files/centericq-4.21.0-ktools.diff 522
9
+AUX centericq-4.21.0-memory-handling.diff 730 RMD160 8fd3702d398a3615de0a46b7ecfd366170e4880d SHA1 b9a41c62e70af9d4d342cb98bf02e451a1382d0b SHA256 6fcd30911fee7cc346ec8944e5e8846291a204ba7cf1a836d82805e7d7be0443
10
+MD5 d1bd933bc9df19a29bc4c12db36fedbc files/centericq-4.21.0-memory-handling.diff 730
11
+RMD160 8fd3702d398a3615de0a46b7ecfd366170e4880d files/centericq-4.21.0-memory-handling.diff 730
12
+SHA256 6fcd30911fee7cc346ec8944e5e8846291a204ba7cf1a836d82805e7d7be0443 files/centericq-4.21.0-memory-handling.diff 730
13
+AUX centericq-4.21.0-sha-amd64.diff 482 RMD160 1ab3f5409eb6b03c7ff4d9b0fced6363178dec5c SHA1 a6f963e46a2e2e604250a18405b6a98cf8edbc31 SHA256 bca387e153f6b8c7dbfccfebdb0437185b21f68ef653d6041a70131947a5332a
14
+MD5 d511972bac3c3088304c94feb7216c73 files/centericq-4.21.0-sha-amd64.diff 482
15
+RMD160 1ab3f5409eb6b03c7ff4d9b0fced6363178dec5c files/centericq-4.21.0-sha-amd64.diff 482
16
+SHA256 bca387e153f6b8c7dbfccfebdb0437185b21f68ef653d6041a70131947a5332a files/centericq-4.21.0-sha-amd64.diff 482
17
+AUX centericq-amd64.patch 6291 RMD160 fe948ba7c308945bf58c59209a3679fe7c402385 SHA1 4e9837ce2b7d628766dc5353231e295a74975390 SHA256 69443a8b6840e9ac44730ffb1feaff31659355e4116ea6574015138f528e99e4
18
+MD5 0f60514eff0a237cf8fbdd13fd88293e files/centericq-amd64.patch 6291
19
+RMD160 fe948ba7c308945bf58c59209a3679fe7c402385 files/centericq-amd64.patch 6291
20
+SHA256 69443a8b6840e9ac44730ffb1feaff31659355e4116ea6574015138f528e99e4 files/centericq-amd64.patch 6291
21
+DIST centericq-4.21.0.tar.bz2 1422126 RMD160 69207fcaf5c90b9ae4609221526b839659c5ccfc SHA1 26b07c4bdcbe8c6888ceab98140b33007bec8554 SHA256 fc8d7e95f54c153b7004448b33118477e52831d071e930e21b473ad6b724fd76
22
+EBUILD centericq-4.21.0-r2.ebuild 1939 RMD160 6d0e112ad514d8d49714fd9f86e4cd89de77e694 SHA1 c0499c92f193c5fd60930311f1b9a235d8c35682 SHA256 cfa54413a39a7061f3940d9eb02730a33907b0269bd267487810f4c84af20caa
23
+MD5 914141ef286547529785fe72a321114a centericq-4.21.0-r2.ebuild 1939
24
+RMD160 6d0e112ad514d8d49714fd9f86e4cd89de77e694 centericq-4.21.0-r2.ebuild 1939
25
+SHA256 cfa54413a39a7061f3940d9eb02730a33907b0269bd267487810f4c84af20caa centericq-4.21.0-r2.ebuild 1939
26
+MD5 ceb4acbc002e486ff733f41fa7b5b724 files/digest-centericq-4.21.0-r2 256
27
+RMD160 1d6ac8a46fbf20b1da4816dbbae2ce6780955062 files/digest-centericq-4.21.0-r2 256
28
+SHA256 6083a2f03d33142eaa8c10fff4d8f76e063848f69ac8c0a0996533c4878a52e7 files/digest-centericq-4.21.0-r2 256
... ...
@@ -0,0 +1,75 @@
1
+# Copyright 1999-2006 Gentoo Foundation
2
+# Distributed under the terms of the GNU General Public License v2
3
+# $Header: /var/cvsroot/gentoo-x86/net-im/centericq/centericq-4.21.0-r2.ebuild,v 1.7 2006/02/17 16:38:52 blubb Exp $
4
+
5
+inherit eutils autotools
6
+
7
+IUSE="bidi nls ssl crypt icq jabber aim msn yahoo irc rss lj"
8
+
9
+DESCRIPTION="A ncurses ICQ/Yahoo!/AIM/IRC/MSN/Jabber/GaduGadu/RSS/LiveJournal Client"
10
+SRC_URI="http://thekonst.net/download/${P}.tar.bz2"
11
+HOMEPAGE="http://thekonst.net/en/centericq"
12
+SLOT="0"
13
+LICENSE="GPL-2"
14
+KEYWORDS="amd64 hppa ppc ~ppc64 sparc x86"
15
+
16
+DEPEND="virtual/libc
17
+	>=sys-libs/ncurses-5.2
18
+	bidi? ( dev-libs/fribidi )
19
+	jabber? ( crypt? ( >=app-crypt/gpgme-1.0.2 ) )
20
+	ssl? ( >=dev-libs/openssl-0.9.6g )
21
+	msn? ( net-misc/curl )"
22
+
23
+RDEPEND="${DEPEND}
24
+	nls? ( sys-devel/gettext )"
25
+
26
+src_unpack() {
27
+	unpack ${A}
28
+	cd ${S}
29
+
30
+	use amd64 && epatch ${FILESDIR}/${PN}-amd64.patch
31
+
32
+	# fix bug #100519
33
+	epatch ${FILESDIR}/${P}-icq-short-read.diff
34
+	epatch ${FILESDIR}/${P}-memory-handling.diff
35
+
36
+	# fix bug #114038
37
+	epatch ${FILESDIR}/${P}-ktools.diff
38
+	epatch ${FILESDIR}/${P}-sha-amd64.diff
39
+}
40
+
41
+src_compile() {
42
+	if use msn && ! use ssl; then
43
+		eerror "USE-flag collision"
44
+		eerror "------------------"
45
+		eerror "The \"msn\" USE-flag is set but the \"ssl\" USE-flag is"
46
+		eerror "missing. Please set the USE-flag \"ssl\" or deactivate "
47
+		eerror "\"msn\"."
48
+	fi
49
+	local myopts="--disable-konst\
50
+	$(use_with ssl) \
51
+	$(use_with bidi fribidi) \
52
+	$(use_enable icq) \
53
+	$(use_with crypt gpgme) \
54
+	$(use_enable aim) \
55
+	$(use_enable msn) \
56
+	$(use_enable jabber) \
57
+	$(use_enable yahoo) \
58
+	$(use_enable irc) \
59
+	$(use_enable rss) \
60
+	$(use_enable lj)"
61
+	
62
+	for afile in */configure.in
63
+	do
64
+		pushd $(dirname ${afile})
65
+		eautoconf || die
66
+		popd
67
+	done
68
+	econf ${myopts} || die "Configure failed"
69
+	emake || die "Compilation failed"
70
+}
71
+
72
+src_install () {
73
+	einstall || die "Installation failed"
74
+	dodoc ABOUT-NLS AUTHORS ChangeLog COPYING FAQ README THANKS TODO
75
+}
... ...
@@ -0,0 +1,10 @@
1
+--- centericq-4.21.0.orig/libicq2000-0.1/src/DirectClient.cpp
2
++++ centericq-4.21.0/libicq2000-0.1/src/DirectClient.cpp
3
+@@ -162,6 +162,7 @@
4
+ 
5
+       m_recv.setLittleEndian();
6
+       m_recv >> length;
7
++      if (length == 0) return; // short read, toss it back (nothing to do)
8
+       if (length > Incoming_Packet_Limit) throw ParseException("Received too long incoming packet");
9
+       if (m_recv.remains() < length) return; // waiting for more of the packet
10
+ 
... ...
@@ -0,0 +1,12 @@
1
+diff -ruN centericq-4.21.0.orig/kkstrtext-0.1/kkstrtext.h centericq-4.21.0/kkstrtext-0.1/kkstrtext.h
2
+--- centericq-4.21.0.orig/kkstrtext-0.1/kkstrtext.h	2004-11-17 23:00:38.000000000 +0000
3
++++ centericq-4.21.0/kkstrtext-0.1/kkstrtext.h	2005-12-13 18:34:56.308723728 +0000
4
+@@ -87,7 +87,7 @@
5
+     { \
6
+ 	va_list vgs__ap; char vgs__buf[1024]; \
7
+ 	va_start(vgs__ap, fmt); \
8
+-	vsprintf(vgs__buf, fmt, vgs__ap); c = vgs__buf; \
9
++	vsnprintf(vgs__buf, sizeof(vgs__buf), fmt, vgs__ap); c = vgs__buf; \
10
+ 	va_end(vgs__ap); \
11
+     }
12
+ 
... ...
@@ -0,0 +1,26 @@
1
+--- centericq-4.21.0.orig/src/icqface.cc
2
++++ centericq-4.21.0/src/icqface.cc
3
+@@ -2003,7 +2003,7 @@
4
+ 	    mvaddchnstr(i-1, sizeWArea.x1+1, logline, sizeWArea.x2-sizeWArea.x1);
5
+ 	}
6
+ 
7
+-	delete logline;
8
++	delete[] logline;
9
+ 
10
+ 	if(text.size() > sizeWArea.x2-sizeWArea.x1-2) text.resize(sizeWArea.x2-sizeWArea.x1-2);
11
+ 	mvhline(LINES-3, sizeWArea.x1+2, ' ', sizeWArea.x2-sizeWArea.x1-2);
12
+only in patch2:
13
+unchanged:
14
+--- centericq-4.21.0.orig/kkstrtext-0.1/kkstrtext.cc
15
++++ centericq-4.21.0/kkstrtext-0.1/kkstrtext.cc
16
+@@ -907,8 +907,8 @@
17
+ 	    r += soutbuf;
18
+ 	    text.erase(0, text.size()-inleft);
19
+ 
20
+-	    delete soutbuf;
21
+-	    delete sinbuf;
22
++	    delete[] soutbuf;
23
++	    free(sinbuf);
24
+ 
25
+ 	    if(res == -1 && errno != EILSEQ)
26
+ 		break;
... ...
@@ -0,0 +1,17 @@
1
+diff -ru centericq-4.21.0/libjabber-0.1/libxode.h centericq-4.21.0-lars/libjabber-0.1/libxode.h
2
+--- centericq-4.21.0/libjabber-0.1/libxode.h	2005-02-10 01:36:26.000000000 +0100
3
++++ centericq-4.21.0-lars/libjabber-0.1/libxode.h	2006-04-22 20:26:47.314265250 +0200
4
+@@ -424,10 +424,10 @@
5
+  */
6
+ 
7
+ typedef struct {
8
+-  unsigned long H[5];
9
+-  unsigned long W[80];
10
++  uint32_t H[5];
11
++  uint32_t W[80];
12
+   int lenW;
13
+-  unsigned long sizeHi,sizeLo;
14
++  uint32_t sizeHi,sizeLo;
15
+ } SHA_CTX;
16
+ 
17
+ 
... ...
@@ -0,0 +1,151 @@
1
+diff -urpN src.orig/icqdialogs.cc src/icqdialogs.cc
2
+--- src.orig/icqdialogs.cc	2005-01-21 20:37:33.797082840 +0100
3
++++ src/icqdialogs.cc	2005-01-21 20:37:48.351870176 +0100
4
+@@ -100,7 +100,7 @@ bool icqface::sprofmanager(string &name,
5
+ 	conf.getcolor(cp_dialog_selected)));
6
+ 
7
+     db.setbar(new horizontalbar(conf.getcolor(cp_dialog_text),
8
+-	conf.getcolor(cp_dialog_selected), _("Remove"), _("Load"), 0));
9
++	conf.getcolor(cp_dialog_selected), _("Remove"), _("Load"), (char*)0));
10
+ 
11
+     db.addkey(KEY_DC, 0);
12
+ 
13
+@@ -209,17 +209,17 @@ bool icqface::finddialog(imsearchparams 
14
+     switch(subj) {
15
+ 	case fsuser:
16
+ 	    db.setbar(new horizontalbar(conf.getcolor(cp_dialog_text), conf.getcolor(cp_dialog_selected),
17
+-		_("lOad"), _("sAve"), _("cLear"), _("Change"), _("Search/Add"), 0));
18
++		_("lOad"), _("sAve"), _("cLear"), _("Change"), _("Search/Add"), (char*)0));
19
+ 	    break;
20
+ 
21
+ 	case fschannel:
22
+ 	    db.setbar(new horizontalbar(conf.getcolor(cp_dialog_text), conf.getcolor(cp_dialog_selected),
23
+-		_("cLear"), _("Change"), _("Join/Create"), 0));
24
++		_("cLear"), _("Change"), _("Join/Create"), (char*)0));
25
+ 	    break;
26
+ 
27
+ 	case fsrss:
28
+ 	    db.setbar(new horizontalbar(conf.getcolor(cp_dialog_text), conf.getcolor(cp_dialog_selected),
29
+-		_("cLear"), _("Change"), _("lInk"), 0));
30
++		_("cLear"), _("Change"), _("lInk"), (char*)0));
31
+ 	    break;
32
+     }
33
+ 
34
+@@ -726,7 +726,7 @@ bool icqface::updatedetails(icqcontact *
35
+ 	conf.getcolor(cp_dialog_text)));
36
+ 
37
+     db.setbar(new horizontalbar(conf.getcolor(cp_dialog_text),
38
+-	conf.getcolor(cp_dialog_selected), _("Change"), _("Done"), 0));
39
++	conf.getcolor(cp_dialog_selected), _("Change"), _("Done"), (char*)0));
40
+ 
41
+     db.idle = &detailsidle;
42
+     db.addautokeys();
43
+@@ -1025,7 +1025,7 @@ bool icqface::sendfiles(const imcontact 
44
+ 
45
+     db.setbar(new horizontalbar(conf.getcolor(cp_dialog_text),
46
+ 	conf.getcolor(cp_dialog_selected),
47
+-	_("Add"), _("Remove"), _("Comment"), _("Send"), 0));
48
++	_("Add"), _("Remove"), _("Comment"), _("Send"), (char*)0));
49
+ 
50
+     db.addkey(KEY_IC, 0);
51
+     db.addkey(KEY_DC, 1);
52
+@@ -1162,7 +1162,7 @@ bool icqface::updateconf(icqconf::regsou
53
+ 	conf.getcolor(cp_dialog_text)));
54
+ 
55
+     db.setbar(new horizontalbar(conf.getcolor(cp_dialog_text),
56
+-	conf.getcolor(cp_dialog_selected), _("Change"), _("Done"), 0));
57
++	conf.getcolor(cp_dialog_selected), _("Change"), _("Done"), (char*)0));
58
+ 
59
+     db.idle = &dialogidle;
60
+     db.addautokeys();
61
+@@ -1553,7 +1553,7 @@ int icqface::groupmanager(const string &
62
+     db.setbar(new horizontalbar(conf.getcolor(cp_dialog_text),
63
+ 	conf.getcolor(cp_dialog_selected),
64
+ 	_("Add"), _("Rename"), _("rEmove"), _("move Up"), _("move Down"),
65
+-	sel ? _("Select") : _("Done"), 0));
66
++	sel ? _("Select") : _("Done"), (char*)0));
67
+ 
68
+     db.addautokeys();
69
+     db.getbar()->item = 5;
70
+@@ -1674,7 +1674,7 @@ void icqface::transfermonitor() {
71
+ 	conf.getcolor(cp_dialog_text)));
72
+ 
73
+     db.setbar(new horizontalbar(conf.getcolor(cp_dialog_text),
74
+-	conf.getcolor(cp_dialog_selected), _("Cancel"), _("Remove"), 0));
75
++	conf.getcolor(cp_dialog_selected), _("Cancel"), _("Remove"), (char*)0));
76
+ 
77
+     db.getbar()->item = 1;
78
+     db.addautokeys();
79
+@@ -1886,7 +1886,7 @@ bool icqface::setljparams(imxmlevent *ev
80
+ 	conf.getcolor(cp_dialog_text)));
81
+ 
82
+     db.setbar(new horizontalbar(conf.getcolor(cp_dialog_text), conf.getcolor(cp_dialog_selected),
83
+-	_("Change"), _("Detect music"), _("Post"), _("cAncel"), 0));
84
++	_("Change"), _("Detect music"), _("Post"), _("cAncel"), (char*)0));
85
+ 
86
+     db.addautokeys();
87
+     db.idle = &dialogidle;
88
+diff -urpN src.orig/icqface.cc src/icqface.cc
89
+--- src.orig/icqface.cc	2005-01-21 20:37:33.799082536 +0100
90
++++ src/icqface.cc	2005-01-21 20:37:51.575380128 +0100
91
+@@ -742,11 +742,11 @@ bool icqface::findresults(const imsearch
92
+     if(!h.getCapabs().count(hookcapab::nochat)) {
93
+ 	db.setbar(new horizontalbar(conf.getcolor(cp_main_highlight),
94
+ 	    conf.getcolor(cp_main_selected), _("Details"), _("Message"),
95
+-	    _("Add"), fauto ? 0 : _("New search"), 0));
96
++	    _("Add"), fauto ? 0 : _("New search"), (char*)0));
97
+     } else {
98
+ 	db.setbar(new horizontalbar(conf.getcolor(cp_main_highlight),
99
+ 	    conf.getcolor(cp_main_selected), _("Details"), _("Add"),
100
+-	    fauto ? 0 : _("New search"), 0));
101
++	    fauto ? 0 : _("New search"), (char*)0));
102
+     }
103
+ 
104
+     db.addautokeys();
105
+@@ -1215,24 +1215,24 @@ void icqface::userinfo(const imcontact &
106
+ 	if(c->inlist() && realinfo != contactroot) {
107
+ 	    db.setbar(new horizontalbar(sizeWArea.x1+2, sizeWArea.y2-1,
108
+ 		conf.getcolor(cp_main_highlight), conf.getcolor(cp_main_selected),
109
+-		_("Info"), _("About"), _("Check"), _("Edit"), islivejournal(c) ? _("LJ") : 0, 0));
110
++		_("Info"), _("About"), _("Check"), _("Edit"), islivejournal(c) ? _("LJ") : 0, (char*)0));
111
+ 	} else {
112
+ 	    db.setbar(new horizontalbar(sizeWArea.x1+2, sizeWArea.y2-1,
113
+ 		conf.getcolor(cp_main_highlight), conf.getcolor(cp_main_selected),
114
+-		_("Info"), _("About"), _("Retreive"), 0));
115
++		_("Info"), _("About"), _("Retreive"), (char*)0));
116
+ 	}
117
+ 
118
+     } else if(cinfo.pname == livejournal) {
119
+ 	db.setbar(new horizontalbar(sizeWArea.x1+2, sizeWArea.y2-1,
120
+ 	    conf.getcolor(cp_main_highlight), conf.getcolor(cp_main_selected),
121
+-	    _("Info"), _("Friend of"), 0));
122
++	    _("Info"), _("Friend of"), (char*)0));
123
+ 
124
+ 
125
+     } else {
126
+ 	db.setbar(new horizontalbar(sizeWArea.x1+2, sizeWArea.y2-1,
127
+ 	    conf.getcolor(cp_main_highlight), conf.getcolor(cp_main_selected),
128
+ 	    _("Info"), _("Home"), _("Work"), _("More"), _("About"),
129
+-	    cinfo.pname != infocard ? _("Retrieve") : _("Edit"), 0));
130
++	    cinfo.pname != infocard ? _("Retrieve") : _("Edit"), (char*)0));
131
+ 
132
+     }
133
+ 
134
+@@ -1664,7 +1664,7 @@ void icqface::modelist(contactstatus cs)
135
+ 
136
+     db.setbar(new horizontalbar(conf.getcolor(cp_main_highlight),
137
+ 	conf.getcolor(cp_main_selected),
138
+-	_("Details"), _("Add"), _("Remove"), _("Move to contacts"), 0));
139
++	_("Details"), _("Add"), _("Remove"), _("Move to contacts"), (char*)0));
140
+ 
141
+     db.addautokeys();
142
+     db.idle = &dialogidle;
143
+@@ -2350,7 +2350,7 @@ bool icqface::eventedit(imevent &ev) {
144
+ 	    conf.getcolor(cp_main_selected)));
145
+ 	db.setbar(new horizontalbar(conf.getcolor(cp_main_highlight),
146
+ 	    conf.getcolor(cp_main_selected),
147
+-	    _("Add"), _("Remove"), _("Send"), 0));
148
++	    _("Add"), _("Remove"), _("Send"), (char*)0));
149
+ 
150
+ 	db.addkey(KEY_IC, 0);
151
+ 	db.addkey(KEY_DC, 1);
... ...
@@ -0,0 +1,3 @@
1
+MD5 82e426f2b4f6f2ab799c28807f36ade6 centericq-4.21.0.tar.bz2 1422126
2
+RMD160 69207fcaf5c90b9ae4609221526b839659c5ccfc centericq-4.21.0.tar.bz2 1422126
3
+SHA256 fc8d7e95f54c153b7004448b33118477e52831d071e930e21b473ad6b724fd76 centericq-4.21.0.tar.bz2 1422126
... ...
@@ -0,0 +1,42 @@
1
+# ChangeLog for net-im/ejabberd
2
+# Copyright 2005-2006 BreakMyGentoo.net; Distributed under the GPL v2
3
+# $Header: $
4
+
5
+*ejabberd-1.1.2-r5.ebuild (21 Nov 2006)
6
+	21 Nov 2006; Lars Strojny <lars@strojny.net> ejabberd-1.1.2-r5.ebuild:
7
+	Bumping
8
+
9
+*ejabberd-1.1.1.ebuild (07 May 2006)
10
+  02 Sep 2006; Lars Strojny <lars@strojny.net> ejabberd-1.1.1.ebuild,
11
+  files/ejabberd-1.1.1-http_binding.patch, files/ejabberd-1.1.1-proxy65.patch:
12
+  Added USE-flag httpbind and proxy for HTTP-binding (JEP-0124) implementation
13
+  by Stefan Strigler <zeank@jwchat.org> in order of Mabber (http://mabber.com) 
14
+  and a Socks bytestream-implementation (JEP-0065) which is currently
15
+  experimental and supplied via bugtracker
16
+  (http://www.jabber.ru/bugzilla/show_bug.cgi?id=25) by Sander Devrieze
17
+  <s.devrieze@pandora.be>.
18
+
19
+  08 May 2006; Lars Strojny <lars@strojny.net> ejabberd-1.1.1.ebuild:
20
+  Used --enable-odbc instead of the custom make
21
+  
22
+  07 May 2006; Lars Strojny <lars@strojny.net> ejabberd-1.1.1.ebuild:
23
+  Fixed buggy myconf
24
+
25
+  07 May 2006; Lars Strojny <lars@strojny.net> ejabberd-1.1.1.ebuild:
26
+  Added fix by Max Loparyev <max@city.veganet.ru> for "SET NAMES 
27
+  'utf8'" during MySQL-connect. Did some cleaning.
28
+
29
+  07 May 2006; Lars Strojny <lars@strojny.net> ejabberd-1.1.1.ebuild:
30
+  Version bump
31
+
32
+*ejabberd-1.0-r1.ebuild
33
+  02 Mar 2006; Hendrik Brandt <heb@gnome-de.org> ChangeLog:
34
+  add missing digest file
35
+
36
+  26 Feb 2006; Lars Strojny <lars@breakmygentoo.net> ejabberd-1.0.0-r1.ebuild:
37
+  Added fix for DNS-SRV connections
38
+
39
+  16 Feb 2006; Lars Strojny <lars@breakmygentoo.net> ChangeLog:
40
+  Initial commit. This is a typical "just works" ebuild. Needs some love to
41
+  become more elegant.
42
+
... ...
@@ -0,0 +1,72 @@
1
+AUX ejabberd-1.1.1-http_binding.patch 27120 RMD160 33a486a0070317755217d2513f38e1fc51436cd8 SHA1 9b5079ed7134c9ec6b101e79921f9978de820475 SHA256 9edbe0257b9e3fb547bcdb4f4325627e279199adfd6753622665b762eb675ed0
2
+MD5 98f2370cd26723c02ae57ae780221663 files/ejabberd-1.1.1-http_binding.patch 27120
3
+RMD160 33a486a0070317755217d2513f38e1fc51436cd8 files/ejabberd-1.1.1-http_binding.patch 27120
4
+SHA256 9edbe0257b9e3fb547bcdb4f4325627e279199adfd6753622665b762eb675ed0 files/ejabberd-1.1.1-http_binding.patch 27120
5
+AUX ejabberd-1.1.1-mysql-connect-utf8.patch 622 RMD160 36bf34ba4a584ed19a4f93f709df0cfeb7d0ad7b SHA1 3fd01b6d6782bea7feeb3f784f393c04a7b7022c SHA256 747fbd494d6ebb75d5b73d407be10b0dba10f59a4a46561509c788d72a30ff08
6
+MD5 2b686065c6f72505ae252cdb5c7bebe8 files/ejabberd-1.1.1-mysql-connect-utf8.patch 622
7
+RMD160 36bf34ba4a584ed19a4f93f709df0cfeb7d0ad7b files/ejabberd-1.1.1-mysql-connect-utf8.patch 622
8
+SHA256 747fbd494d6ebb75d5b73d407be10b0dba10f59a4a46561509c788d72a30ff08 files/ejabberd-1.1.1-mysql-connect-utf8.patch 622
9
+AUX ejabberd-1.1.1-proxy65.patch 13293 RMD160 cdd06d4ca07773349ad4d97d854cff8b5547c8e2 SHA1 a6d9000a8b751efb1045830544a9e9a89e8122da SHA256 ade6a713cdb57c74ee29063104e4cf44476bb7fb5e63b3ea9f1353c20e9813aa
10
+MD5 6284b9ed2a52690a62fbdca052c5a571 files/ejabberd-1.1.1-proxy65.patch 13293
11
+RMD160 cdd06d4ca07773349ad4d97d854cff8b5547c8e2 files/ejabberd-1.1.1-proxy65.patch 13293
12
+SHA256 ade6a713cdb57c74ee29063104e4cf44476bb7fb5e63b3ea9f1353c20e9813aa files/ejabberd-1.1.1-proxy65.patch 13293
13
+AUX ejabberd-1.1.1.confd 671 RMD160 e727a01c6e0418468bd785447b85d349a536f3ea SHA1 e40c4e24ed1976a781b9557d8ba186fb0fd5cda2 SHA256 fb8f66daaa4bf9063867b80ac6e677be7f6739d3c245bf389467df2ea687887d
14
+MD5 03cdfdbfb294de6eccffda248d349040 files/ejabberd-1.1.1.confd 671
15
+RMD160 e727a01c6e0418468bd785447b85d349a536f3ea files/ejabberd-1.1.1.confd 671
16
+SHA256 fb8f66daaa4bf9063867b80ac6e677be7f6739d3c245bf389467df2ea687887d files/ejabberd-1.1.1.confd 671
17
+AUX ejabberd-1.1.1.initd 1260 RMD160 0565503966512228f21079213a8587d7ada7a823 SHA1 09d2ca4ab1a371fe2a987f649c6761742531c658 SHA256 cd06a6efdefda36993eb82fb6617a9a7e65228941f4deac42d583e96b1d6dfc9
18
+MD5 608e482a70b1cd9a1a78d721edc8d42d files/ejabberd-1.1.1.initd 1260
19
+RMD160 0565503966512228f21079213a8587d7ada7a823 files/ejabberd-1.1.1.initd 1260
20
+SHA256 cd06a6efdefda36993eb82fb6617a9a7e65228941f4deac42d583e96b1d6dfc9 files/ejabberd-1.1.1.initd 1260
21
+AUX ejabberd-1.1.2-http_binding.patch 29551 RMD160 6c1c9bc7516a5d4a13220be5d7508348aca1128a SHA1 d65a1fdf14c74154b25778e495568aeec6dcad77 SHA256 c55992c2b6e9ca36d9687237b990c27c47511bbe025d746d2380f122fecbda32
22
+MD5 8e25a0686567a645914aa51440e7d521 files/ejabberd-1.1.2-http_binding.patch 29551
23
+RMD160 6c1c9bc7516a5d4a13220be5d7508348aca1128a files/ejabberd-1.1.2-http_binding.patch 29551
24
+SHA256 c55992c2b6e9ca36d9687237b990c27c47511bbe025d746d2380f122fecbda32 files/ejabberd-1.1.2-http_binding.patch 29551
25
+AUX ejabberd-1.1.2-mod_irc-utf-8.patch 369 RMD160 11b3a06b4f8af77c6c368aeacfe8943eace50da5 SHA1 123a95c4535102aaa076435c464025e40f9fb889 SHA256 a3884a97f9e4239df643ac327c48baf78f77c9cffbd5d67f39f018a811dcdc9f
26
+MD5 3ca38149e85443cac4dfc58ca8bf1c08 files/ejabberd-1.1.2-mod_irc-utf-8.patch 369
27
+RMD160 11b3a06b4f8af77c6c368aeacfe8943eace50da5 files/ejabberd-1.1.2-mod_irc-utf-8.patch 369
28
+SHA256 a3884a97f9e4239df643ac327c48baf78f77c9cffbd5d67f39f018a811dcdc9f files/ejabberd-1.1.2-mod_irc-utf-8.patch 369
29
+AUX ejabberd-1.1.2-mysql-connect-utf8.patch 622 RMD160 36bf34ba4a584ed19a4f93f709df0cfeb7d0ad7b SHA1 3fd01b6d6782bea7feeb3f784f393c04a7b7022c SHA256 747fbd494d6ebb75d5b73d407be10b0dba10f59a4a46561509c788d72a30ff08
30
+MD5 2b686065c6f72505ae252cdb5c7bebe8 files/ejabberd-1.1.2-mysql-connect-utf8.patch 622
31
+RMD160 36bf34ba4a584ed19a4f93f709df0cfeb7d0ad7b files/ejabberd-1.1.2-mysql-connect-utf8.patch 622
32
+SHA256 747fbd494d6ebb75d5b73d407be10b0dba10f59a4a46561509c788d72a30ff08 files/ejabberd-1.1.2-mysql-connect-utf8.patch 622
33
+AUX ejabberd-1.1.2-proxy65.patch 13293 RMD160 cdd06d4ca07773349ad4d97d854cff8b5547c8e2 SHA1 a6d9000a8b751efb1045830544a9e9a89e8122da SHA256 ade6a713cdb57c74ee29063104e4cf44476bb7fb5e63b3ea9f1353c20e9813aa
34
+MD5 6284b9ed2a52690a62fbdca052c5a571 files/ejabberd-1.1.2-proxy65.patch 13293
35
+RMD160 cdd06d4ca07773349ad4d97d854cff8b5547c8e2 files/ejabberd-1.1.2-proxy65.patch 13293
36
+SHA256 ade6a713cdb57c74ee29063104e4cf44476bb7fb5e63b3ea9f1353c20e9813aa files/ejabberd-1.1.2-proxy65.patch 13293
37
+AUX ejabberd-1.1.2.confd 671 RMD160 e727a01c6e0418468bd785447b85d349a536f3ea SHA1 e40c4e24ed1976a781b9557d8ba186fb0fd5cda2 SHA256 fb8f66daaa4bf9063867b80ac6e677be7f6739d3c245bf389467df2ea687887d
38
+MD5 03cdfdbfb294de6eccffda248d349040 files/ejabberd-1.1.2.confd 671
39
+RMD160 e727a01c6e0418468bd785447b85d349a536f3ea files/ejabberd-1.1.2.confd 671
40
+SHA256 fb8f66daaa4bf9063867b80ac6e677be7f6739d3c245bf389467df2ea687887d files/ejabberd-1.1.2.confd 671
41
+AUX ejabberd-1.1.2.initd 1260 RMD160 0565503966512228f21079213a8587d7ada7a823 SHA1 09d2ca4ab1a371fe2a987f649c6761742531c658 SHA256 cd06a6efdefda36993eb82fb6617a9a7e65228941f4deac42d583e96b1d6dfc9
42
+MD5 608e482a70b1cd9a1a78d721edc8d42d files/ejabberd-1.1.2.initd 1260
43
+RMD160 0565503966512228f21079213a8587d7ada7a823 files/ejabberd-1.1.2.initd 1260
44
+SHA256 cd06a6efdefda36993eb82fb6617a9a7e65228941f4deac42d583e96b1d6dfc9 files/ejabberd-1.1.2.initd 1260
45
+AUX inetrc 36 RMD160 4b79020864689ede547969610fde18fe490f5810 SHA1 1e0bae0f7251e2ae3b62ba9d3e5cc86bb5dd271e SHA256 0f383befc4c46134d88ce14d3bd06c404ef6575391f4ac0b5e8c28ba383b28fc
46
+MD5 e088cd52d4316efddc54195dc939cd24 files/inetrc 36
47
+RMD160 4b79020864689ede547969610fde18fe490f5810 files/inetrc 36
48
+SHA256 0f383befc4c46134d88ce14d3bd06c404ef6575391f4ac0b5e8c28ba383b28fc files/inetrc 36
49
+DIST ejabberd-1.1.1.tar.gz 803278 RMD160 b9c0b7ab3fe1f1b2dce52e1460bba04b313ea534 SHA1 4f23d787afe75c7c866decdff6f539195449776e SHA256 52a97275537073066bd352f5718954f6994b272d1efa51187e17edf0c9b11082
50
+DIST ejabberd-1.1.2.tar.gz 836240 RMD160 e763752e6c5fb46c51b71e265ab2ceda6d043a0d SHA1 9e94bdbc10fee5b781405daf43a0b4abc4dee6c1 SHA256 029129a6bcb5d15dbccc5aa756f61c52692eb6882ec7aad0193aa940b6a20bb6
51
+EBUILD ejabberd-1.1.1.ebuild 5044 RMD160 3c0213f2cd39fdb54505cc0b394b70477b10fbb4 SHA1 491cbd3d3ab8dde27a5280fdbf2783131da4fa7b SHA256 9346b48122eb7812e6beba93e223d0c1d027719877ef7307415edac56b1a1d06
52
+MD5 2d16ab0045996aa62fdc6867e8c62edb ejabberd-1.1.1.ebuild 5044
53
+RMD160 3c0213f2cd39fdb54505cc0b394b70477b10fbb4 ejabberd-1.1.1.ebuild 5044
54
+SHA256 9346b48122eb7812e6beba93e223d0c1d027719877ef7307415edac56b1a1d06 ejabberd-1.1.1.ebuild 5044
55
+EBUILD ejabberd-1.1.2-r5.ebuild 5070 RMD160 81251f4089f5489a80aae24df07fc5d3229b7121 SHA1 d2d30f92242eab59119b93d2d64951bf796bfcb1 SHA256 103e56d7c532126d7dc746473b81ee75dac4ae9e29fa3210639d3b49553d6a5a
56
+MD5 5e30031f8c3d768b9c6e23416ea1f2ab ejabberd-1.1.2-r5.ebuild 5070
57
+RMD160 81251f4089f5489a80aae24df07fc5d3229b7121 ejabberd-1.1.2-r5.ebuild 5070
58
+SHA256 103e56d7c532126d7dc746473b81ee75dac4ae9e29fa3210639d3b49553d6a5a ejabberd-1.1.2-r5.ebuild 5070
59
+MISC ChangeLog 1674 RMD160 a7cde836a8d747863d148edef3a9d1b7cf781af2 SHA1 529722882cfb1e1135eda10c99d0aa8e753704a3 SHA256 c37aa58a182a91857395f0c53c3299d19cfe4960d5240673c7606f18199d3681
60
+MD5 678fcb919ef8ac4a080934c500537f8d ChangeLog 1674
61
+RMD160 a7cde836a8d747863d148edef3a9d1b7cf781af2 ChangeLog 1674
62
+SHA256 c37aa58a182a91857395f0c53c3299d19cfe4960d5240673c7606f18199d3681 ChangeLog 1674
63
+MISC metadata.xml 386 RMD160 6851cac865de77f0052aa55b91845f98ba984bf2 SHA1 f3a72217775da32822787455f53a6168b4ce2acb SHA256 8fdc368bc07695d9ee0b988f09ef41799619a86f33faf839360c046f46ce8aa5
64
+MD5 de765f4e50f58226d0035d84531cf752 metadata.xml 386
65
+RMD160 6851cac865de77f0052aa55b91845f98ba984bf2 metadata.xml 386
66
+SHA256 8fdc368bc07695d9ee0b988f09ef41799619a86f33faf839360c046f46ce8aa5 metadata.xml 386
67
+MD5 87c80474a3cbcdf51830a748a411f0f4 files/digest-ejabberd-1.1.1 244
68
+RMD160 bdb61a1e0dd65fa91775a5f3b7c7516dc65bd8ff files/digest-ejabberd-1.1.1 244
69
+SHA256 d3659c3dbc43cf807fb7309da84ba62393e9257a7a16a3305621ee60f97378a6 files/digest-ejabberd-1.1.1 244
70
+MD5 a38033cd51c7bb84bc09310952063222 files/digest-ejabberd-1.1.2-r5 244
71
+RMD160 d8117ebc19953eb40137b4ebca37d7577ff9e5b6 files/digest-ejabberd-1.1.2-r5 244
72
+SHA256 e1ff34ed81425e1b009e60d29d7f6b9bdeff7cdba4407372cfdb8e40ca00efcb files/digest-ejabberd-1.1.2-r5 244
... ...
@@ -0,0 +1,197 @@
1
+# Copyright 2005-2006 BreakMyGentoo.net
2
+# Distributed under the terms of the GNU General Public License v2
3
+# $Header: $
4
+
5
+inherit eutils multilib ssl-cert versionator
6
+
7
+JABBER_ETC="/etc/jabber"
8
+JABBER_RUN="/var/run/jabber"
9
+JABBER_SPOOL="/var/spool/jabber"
10
+JABBER_LOG="/var/log/jabber"
11
+
12
+E_MYSQL_V="5"
13
+E_MYSQL_N="mysql"
14
+E_MYSQL=${E_MYSQL_N}-${E_MYSQL_V}
15
+
16
+E_PGSQL_V="0.0.1"
17
+E_PGSQL_N="pgsql-cvs"
18
+E_PGSQL=${E_PGSQL_N}-${E_PGSQL_V}
19
+
20
+DESCRIPTION="The Erlang Jabber Daemon"
21
+HOMEPAGE="http://ejabberd.jabber.ru/"
22
+SRC_URI="http://process-one.net/en/projects/ejabberd/download/${PV}/${P}.tar.gz"
23
+LICENSE="GPL-2"
24
+SLOT="0"
25
+KEYWORDS="~x86 ~amd64"
26
+IUSE="${IUSE} irc ldap muc odbc postgres pubsub web mysql httpbind proxy"
27
+
28
+DEPEND="${RDEPEND}
29
+		>=net-im/jabber-base-0.00
30
+		>=dev-libs/expat-1.95
31
+		>=dev-lang/erlang-10.2.0
32
+		odbc? ( dev-db/unixODBC )
33
+		ldap? ( =net-nds/openldap-2* )
34
+		postgres? ( =dev-erl/${E_PGSQL} )
35
+		mysql? ( =dev-erl/${E_MYSQL} )"
36
+
37
+RDEPEND="postgres? ( dev-db/postgresql )
38
+		mysql? ( dev-db/mysql )"
39
+
40
+PROVIDE="virtual/jabber-server"
41
+S=${WORKDIR}/${P}/src
42
+
43
+src_unpack() {
44
+	unpack ${A}
45
+	MYSQL_P=$(best_version dev-db/mysql)
46
+	MYSQL_PV=${MYSQL_P/dev-db\/mysql-/}
47
+
48
+	#
49
+	# If we have to work with MySQL 4.1 or greater, ejabberd's native
50
+	# MySQL-driver has to be patched to query "SET NAMES 'utf8'" on connecting
51
+	# the database.
52
+	#
53
+	if use mysql &&                                                          \
54
+	((                                                                       \
55
+		[ $(get_major_version ${MYSQL_PV}) -eq 4 ] &&                        \
56
+		[ $(get_major_version $(get_after_major_version ${MYSQL_PV})) -ge 1] \
57
+	)                                                                        \
58
+	||                                                                       \
59
+		[ $(get_major_version ${MYSQL_PV}) -ge 5 ]                           \
60
+	); then
61
+		epatch ${FILESDIR}/${P}-mysql-connect-utf8.patch
62
+	fi
63
+
64
+	cd ${S}
65
+	if use httpbind; then
66
+		epatch ${FILESDIR}/${P}-http_binding.patch
67
+	fi
68
+
69
+	if use proxy; then
70
+		epatch ${FILESDIR}/${P}-proxy65.patch
71
+	fi
72
+
73
+	epatch ${FILESDIR}/${P}-mod_irc-charset.patch
74
+}
75
+
76
+
77
+src_compile() {
78
+	local myconf
79
+
80
+	if ! use mysql && ! use postgres && ! use odbc; then
81
+		myconf="--disable-odbc"
82
+	else
83
+		myconf="--enable-odbc"
84
+	fi
85
+	
86
+	#
87
+	# configure ejabberd
88
+	#
89
+	econf ${myconf}                          \
90
+		--enable-roster-gateway-workaround   \
91
+		$(use_enable irc mod_irc)            \
92
+		$(use_enable ldap eldap)             \
93
+		$(use_enable muc mod_muc)            \
94
+		$(use_enable pubsub mod_pubsub)      \
95
+		$(use_enable ssl tls)                \
96
+		$(use_enable web web)                \
97
+		|| die "econf failed"
98
+	
99
+	#
100
+	# Build ejabberd core
101
+	#
102
+	emake || die "compiling ejabberd core failed"
103
+}
104
+
105
+src_install() {
106
+	#
107
+	# Install ejabberd
108
+	#
109
+	make                                                   \
110
+		DESTDIR=${D}                                       \
111
+		EJABBERDDIR=${D}/usr/$(get_libdir)/erlang/lib/${P} \
112
+		ETCDIR=${D}${JABBER_ETC}                           \
113
+		LOGDIR=${D}${JABBER_LOG}                           \
114
+	    install \
115
+	    || die "install failed"
116
+
117
+
118
+	insinto /usr/share/doc/${PF}
119
+	use postgres && doins odbc/pg.sql
120
+	use mysql && doins odbc/mysql.sql
121
+	dodoc doc/release_notes_${PV}.txt
122
+	dohtml doc/*.{html,png}
123
+
124
+
125
+	use postgres && {
126
+		pa="-pa /usr/$(get_libdir)/erlang/lib/${E_PGSQL}/ebin"
127
+	}
128
+
129
+	use mysql && {
130
+		pa=${pa}" -pa /usr/$(get_libdir)/erlang/lib/${E_MYSQL}/ebin"
131
+	}
132
+
133
+	#
134
+	# Create /usr/bin/ejabberd
135
+	#
136
+	cat <<EOF > ${T}/ejabberd
137
+#!/bin/bash
138
+
139
+erl -pa /usr/$(get_libdir)/erlang/lib/${P}/ebin \\
140
+	${pa} \\
141
+	-sname ejabberd \\
142
+	-s ejabberd \\
143
+	-ejabberd config \"${JABBER_ETC}/ejabberd.cfg\" \\
144
+	log_path \"${JABBER_LOG}/ejabberd.log\" \\
145
+	-kernel inetrc \"${JABBER_ETC}/inetrc\" \\
146
+	-sasl sasl_error_logger \{file,\"${JABBER_LOG}/sasl.log\"\} \\
147
+	-mnesia dir \"${JABBER_SPOOL}\" \\
148
+	\$@
149
+EOF
150
+
151
+	#
152
+	# Create /usr/bin/ejabberdctl
153
+	#
154
+	cat <<EOF > ${T}/ejabberdctl
155
+#!/bin/sh
156
+
157
+exec env HOME=${JABBER_RUN} \\
158
+	erl -pa /usr/$(get_libdir)/erlang/lib/${P}/ebin \\
159
+		${pa} \\
160
+		-noinput \\
161
+		-sname ejabberdctl \\
162
+		-s ejabberd_ctl \\
163
+		-extra \$@
164
+EOF
165
+	
166
+	dobin ${T}/ejabberdctl
167
+	dobin ${T}/ejabberd
168
+
169
+	newinitd ${FILESDIR}/${P}.initd ${PN}
170
+	newconfd ${FILESDIR}/${P}.confd ${PN}
171
+
172
+	insinto ${JABBER_ETC}
173
+	if use ssl; then
174
+		docert ssl
175
+		rm -f ${D}${JABBER_ETC}/ssl.{crt,csr,key}
176
+		fowners jabber:jabber ${JABBER_ETC}/ssl.pem
177
+	fi
178
+	doins ${FILESDIR}/inetrc
179
+}
180
+
181
+pkg_postinst() {
182
+	if [ ! -e ${JABBER_ETC}/ejabberd.cfg ]
183
+	then
184
+		einfo "Configuration file has been installed in ${JABBER_ETC}/ejabberd.cfg."
185
+		einfo "Edit it according to your needs. For configuration instructions,"
186
+		einfo "please see /usr/share/doc/${PF}/html/guide.html"
187
+	fi
188
+	if use ssl ; then
189
+		einfo "A script to generate a ssl key has been installed in"
190
+		einfo "${JABBER_ETC}/self-cert.sh . Use it and change the config file to"
191
+		einfo "point to the full path"
192
+	fi
193
+	if ! use web ; then
194
+		einfo "The web USE flag is off, this will disable the web admin interface,"
195
+		einfo "if this was not the intention then add web to your USE flags."
196
+	fi
197
+}
... ...
@@ -0,0 +1,197 @@
1
+# Copyright 2005-2006 BreakMyGentoo.net
2
+# Distributed under the terms of the GNU General Public License v2
3
+# $Header: $
4
+
5
+inherit eutils multilib ssl-cert versionator
6
+
7
+JABBER_ETC="/etc/jabber"
8
+JABBER_RUN="/var/run/jabber"
9
+JABBER_SPOOL="/var/spool/jabber"
10
+JABBER_LOG="/var/log/jabber"
11
+
12
+E_MYSQL_V="5"
13
+E_MYSQL_N="mysql"
14
+E_MYSQL=${E_MYSQL_N}-${E_MYSQL_V}
15
+
16
+E_PGSQL_V="0.0.1"
17
+E_PGSQL_N="pgsql-cvs"
18
+E_PGSQL=${E_PGSQL_N}-${E_PGSQL_V}
19
+
20
+DESCRIPTION="The Erlang Jabber Daemon"
21
+HOMEPAGE="http://ejabberd.jabber.ru/"
22
+SRC_URI="http://process-one.net/en/projects/ejabberd/download/${PV}/${P}.tar.gz"
23
+LICENSE="GPL-2"
24
+SLOT="0"
25
+KEYWORDS="~x86 amd64"
26
+IUSE="${IUSE} irc ldap muc odbc postgres pubsub web mysql httpbind proxy"
27
+
28
+DEPEND="${RDEPEND}
29
+		>=net-im/jabber-base-0.00
30
+		>=dev-libs/expat-1.95
31
+		>=dev-lang/erlang-10.2.0
32
+		odbc? ( dev-db/unixODBC )
33
+		ldap? ( =net-nds/openldap-2* )
34
+		postgres? ( =dev-erl/${E_PGSQL} )
35
+		mysql? ( =dev-erl/${E_MYSQL} )"
36
+
37
+RDEPEND="postgres? ( dev-db/postgresql )
38
+		mysql? ( dev-db/mysql )"
39
+
40
+PROVIDE="virtual/jabber-server"
41
+S=${WORKDIR}/${P}/src
42
+
43
+src_unpack() {
44
+	unpack ${A}
45
+	MYSQL_P=$(best_version dev-db/mysql)
46
+	MYSQL_PV=${MYSQL_P/dev-db\/mysql-/}
47
+
48
+	#
49
+	# If we have to work with MySQL 4.1 or greater, ejabberd's native
50
+	# MySQL-driver has to be patched to query "SET NAMES 'utf8'" on connecting
51
+	# the database.
52
+	#
53
+	if use mysql &&                                                          \
54
+	((                                                                       \
55
+		[ $(get_major_version ${MYSQL_PV}) -eq 4 ] &&                        \
56
+		[ $(get_major_version $(get_after_major_version ${MYSQL_PV})) -ge 1] \
57
+	)                                                                        \
58
+	||                                                                       \
59
+		[ $(get_major_version ${MYSQL_PV}) -ge 5 ]                           \
60
+	); then
61
+		epatch ${FILESDIR}/${P}-mysql-connect-utf8.patch || die
62
+	fi
63
+
64
+	cd ${S}
65
+	if use httpbind; then
66
+		epatch ${FILESDIR}/${P}-http_binding.patch || die
67
+	fi
68
+
69
+	if use proxy; then
70
+		epatch ${FILESDIR}/${P}-proxy65.patch || die 
71
+	fi
72
+
73
+	epatch ${FILESDIR}/${P}-mod_irc-utf-8.patch || die
74
+}
75
+
76
+
77
+src_compile() {
78
+	local myconf
79
+
80
+	if ! use mysql && ! use postgres && ! use odbc; then
81
+		myconf="--disable-odbc"
82
+	else
83
+		myconf="--enable-odbc"
84
+	fi
85
+	
86
+	#
87
+	# configure ejabberd
88
+	#
89
+	econf ${myconf}                          \
90
+		--enable-roster-gateway-workaround   \
91
+		$(use_enable irc mod_irc)            \
92
+		$(use_enable ldap eldap)             \
93
+		$(use_enable muc mod_muc)            \
94
+		$(use_enable pubsub mod_pubsub)      \
95
+		$(use_enable ssl tls)                \
96
+		$(use_enable web web)                \
97
+		|| die "econf failed"
98
+	
99
+	#
100
+	# Build ejabberd core
101
+	#
102
+	emake || die "compiling ejabberd core failed"
103
+}
104
+
105
+src_install() {
106
+	#
107
+	# Install ejabberd
108
+	#
109
+	make                                                   \
110
+		DESTDIR=${D}                                       \
111
+		EJABBERDDIR=${D}/usr/$(get_libdir)/erlang/lib/${P} \
112
+		ETCDIR=${D}${JABBER_ETC}                           \
113
+		LOGDIR=${D}${JABBER_LOG}                           \
114
+	    install \
115
+	    || die "install failed"
116
+
117
+
118
+	insinto /usr/share/doc/${PF}
119
+	use postgres && doins odbc/pg.sql
120
+	use mysql && doins odbc/mysql.sql
121
+	dodoc doc/release_notes_${PV}.txt
122
+	dohtml doc/*.{html,png}
123
+
124
+
125
+	use postgres && {
126
+		pa="-pa /usr/$(get_libdir)/erlang/lib/${E_PGSQL}/ebin"
127
+	}
128
+
129
+	use mysql && {
130
+		pa=${pa}" -pa /usr/$(get_libdir)/erlang/lib/${E_MYSQL}/ebin"
131
+	}
132
+
133
+	#
134
+	# Create /usr/bin/ejabberd
135
+	#
136
+	cat <<EOF > ${T}/ejabberd
137
+#!/bin/bash
138
+
139
+erl -pa /usr/$(get_libdir)/erlang/lib/${P}/ebin \\
140
+	${pa} \\
141
+	-sname ejabberd \\
142
+	-s ejabberd \\
143
+	-ejabberd config \"${JABBER_ETC}/ejabberd.cfg\" \\
144
+	log_path \"${JABBER_LOG}/ejabberd.log\" \\
145
+	-kernel inetrc \"${JABBER_ETC}/inetrc\" \\
146
+	-sasl sasl_error_logger \{file,\"${JABBER_LOG}/sasl.log\"\} \\
147
+	-mnesia dir \"${JABBER_SPOOL}\" \\
148
+	\$@
149
+EOF
150
+
151
+	#
152
+	# Create /usr/bin/ejabberdctl
153
+	#
154
+	cat <<EOF > ${T}/ejabberdctl
155
+#!/bin/sh
156
+
157
+exec env HOME=${JABBER_RUN} \\
158
+	erl -pa /usr/$(get_libdir)/erlang/lib/${P}/ebin \\
159
+		${pa} \\
160
+		-noinput \\
161
+		-sname ejabberdctl \\
162
+		-s ejabberd_ctl \\
163
+		-extra \$@
164
+EOF
165
+	
166
+	dobin ${T}/ejabberdctl
167
+	dobin ${T}/ejabberd
168
+
169
+	newinitd ${FILESDIR}/${P}.initd ${PN}
170
+	newconfd ${FILESDIR}/${P}.confd ${PN}
171
+
172
+	insinto ${JABBER_ETC}
173
+	if use ssl; then
174
+		docert ssl
175
+		rm -f ${D}${JABBER_ETC}/ssl.{crt,csr,key}
176
+		fowners jabber:jabber ${JABBER_ETC}/ssl.pem
177
+	fi
178
+	doins ${FILESDIR}/inetrc
179
+}
180
+
181
+pkg_postinst() {
182
+	if [ ! -e ${JABBER_ETC}/ejabberd.cfg ]
183
+	then
184
+		einfo "Configuration file has been installed in ${JABBER_ETC}/ejabberd.cfg."
185
+		einfo "Edit it according to your needs. For configuration instructions,"
186
+		einfo "please see /usr/share/doc/${PF}/html/guide.html"
187
+	fi
188
+	if use ssl ; then
189
+		einfo "A script to generate a ssl key has been installed in"
190
+		einfo "${JABBER_ETC}/self-cert.sh . Use it and change the config file to"
191
+		einfo "point to the full path"
192
+	fi
193
+	if ! use web ; then
194
+		einfo "The web USE flag is off, this will disable the web admin interface,"
195
+		einfo "if this was not the intention then add web to your USE flags."
196
+	fi
197
+}
... ...
@@ -0,0 +1,3 @@
1
+MD5 ef6fae4a3f9c7f807f21e9cd3dae195b ejabberd-1.1.1.tar.gz 803278
2
+RMD160 b9c0b7ab3fe1f1b2dce52e1460bba04b313ea534 ejabberd-1.1.1.tar.gz 803278
3
+SHA256 52a97275537073066bd352f5718954f6994b272d1efa51187e17edf0c9b11082 ejabberd-1.1.1.tar.gz 803278
... ...
@@ -0,0 +1,3 @@
1
+MD5 5b947e19e18a6b554bf31d1c95176eb6 ejabberd-1.1.2.tar.gz 836240
2
+RMD160 e763752e6c5fb46c51b71e265ab2ceda6d043a0d ejabberd-1.1.2.tar.gz 836240
3
+SHA256 029129a6bcb5d15dbccc5aa756f61c52692eb6882ec7aad0193aa940b6a20bb6 ejabberd-1.1.2.tar.gz 836240
... ...
@@ -0,0 +1,855 @@
1
+Index: src/ejabberd.cfg.example
2
+===================================================================
3
+--- src/ejabberd.cfg.example	(Revision 565)
4
++++ src/ejabberd.cfg.example	(Arbeitskopie)
5
+@@ -124,7 +124,7 @@
6
+   {5269, ejabberd_s2s_in,  [{shaper, s2s_shaper},
7
+ 			    {max_stanza_size, 131072}
8
+ 			   ]},
9
+-  {5280, ejabberd_http,    [http_poll, web_admin]},
10
++  {5280, ejabberd_http,    [http_poll, http_bind, web_admin]},
11
+   {8888, ejabberd_service, [{access, all},
12
+ 			    {hosts, ["icq.localhost", "sms.localhost"],
13
+ 			     [{password, "secret"}]}]}
14
+Index: src/web/Makefile.in
15
+===================================================================
16
+--- src/web/Makefile.in	(Revision 565)
17
++++ src/web/Makefile.in	(Arbeitskopie)
18
+@@ -15,7 +15,8 @@
19
+ 	$(OUTDIR)/ejabberd_http.beam \
20
+ 	$(OUTDIR)/ejabberd_web.beam  \
21
+ 	$(OUTDIR)/ejabberd_web_admin.beam  \
22
+-	$(OUTDIR)/ejabberd_http_poll.beam
23
++	$(OUTDIR)/ejabberd_http_poll.beam \
24
++	$(OUTDIR)/ejabberd_http_bind.beam
25
+ 
26
+ all:    $(OBJS)
27
+ 
28
+Index: src/web/ejabberd_http_bind.erl
29
+===================================================================
30
+--- src/web/ejabberd_http_bind.erl	(Revision 0)
31
++++ src/web/ejabberd_http_bind.erl	(Revision 0)
32
+@@ -0,0 +1,654 @@
33
++%%%----------------------------------------------------------------------
34
++%%% File    : ejabberd_http_bind.erl
35
++%%% Author  : Stefan Strigler <steve@zeank.in-berlin.de>
36
++%%% Purpose : HTTP Binding support (JEP-0124)
37
++%%% Created : 21 Sep 2005 by Stefan Strigler <steve@zeank.in-berlin.de>
38
++%%% Id      : $Id: ejabberd_http_bind.erl,v 1.2 2006/01/16 10:47:50 zeank Exp $
39
++%%%----------------------------------------------------------------------
40
++
41
++-module(ejabberd_http_bind).
42
++-author('steve@zeank.in-berlin.de').
43
++-vsn('$Revision: 1.2 $ ').
44
++
45
++-behaviour(gen_fsm).
46
++
47
++%% External exports
48
++-export([start_link/2,
49
++	 init/1,
50
++	 handle_event/3,
51
++	 handle_sync_event/4,
52
++	 code_change/4,
53
++	 handle_info/3,
54
++	 terminate/3,
55
++	 send/2,
56
++	 setopts/2,
57
++	 controlling_process/2,
58
++	 close/1,
59
++	 process_request/1]).
60
++
61
++%-define(ejabberd_debug, true).
62
++
63
++-include("ejabberd.hrl").
64
++-include("jlib.hrl").
65
++-include("ejabberd_http.hrl").
66
++
67
++-record(http_bind, {id, pid, hold, wait}).
68
++
69
++%% http binding request
70
++-record(hbr, {rid,
71
++	      key,
72
++	      in,
73
++	      out}).
74
++
75
++-record(state, {id,
76
++		rid = error,
77
++		key,
78
++		output = "",
79
++		input = "",
80
++		waiting_input = false,
81
++		last_receiver,
82
++		last_poll,
83
++		ctime = 0,
84
++		timer,
85
++		req_list = [] % list of requests
86
++	       }).
87
++
88
++
89
++%-define(DBGFSM, true).
90
++
91
++-ifdef(DBGFSM).
92
++-define(FSMOPTS, [{debug, [trace]}]).
93
++-else.
94
++-define(FSMOPTS, []).
95
++-endif.
96
++
97
++-define(MAX_REQUESTS, 2).  % number of simultaneous requests
98
++-define(MIN_POLLING, "2"). % don't poll faster than that or we will shoot you
99
++-define(MAX_WAIT, 60).     % max num of secs to keep a request on hold
100
++-define(MAX_INACTIVITY, 30000). % msecs to wait before terminating idle sessions
101
++-define(CT, {"Content-Type", "text/xml; charset=utf-8"}).
102
++-define(BAD_REQUEST, ?CT).
103
++
104
++
105
++%%%----------------------------------------------------------------------
106
++%%% API
107
++%%%----------------------------------------------------------------------
108
++start(ID, Key) ->
109
++    mnesia:create_table(http_bind,
110
++        		[{ram_copies, [node()]},
111
++        		 {attributes, record_info(fields, http_bind)}]),
112
++    supervisor:start_child(ejabberd_http_bind_sup, [ID, Key]).
113
++
114
++start_link(ID, Key) ->
115
++    gen_fsm:start_link(?MODULE, [ID, Key], ?FSMOPTS).
116
++
117
++send({http_bind, FsmRef}, Packet) ->
118
++    gen_fsm:sync_send_all_state_event(FsmRef, {send, Packet}).
119
++
120
++setopts({http_bind, FsmRef}, Opts) ->
121
++    case lists:member({active, once}, Opts) of
122
++	true ->
123
++	    gen_fsm:sync_send_all_state_event(FsmRef, activate);
124
++	_ ->
125
++	    ok
126
++    end.
127
++
128
++controlling_process(_Socket, _Pid) ->
129
++    ok.
130
++
131
++close({http_bind, FsmRef}) ->
132
++    catch gen_fsm:sync_send_all_state_event(FsmRef, close).
133
++
134
++
135
++process_request(#request{path = [],
136
++			 data = Data}) ->
137
++    case catch parse_request(Data) of
138
++	{ok, ID1, RID, Key, NewKey, Attrs, Packet} ->
139
++	    XmppDomain = xml:get_attr_s("to",Attrs),
140
++	    if 
141
++		(ID1 == "") and (XmppDomain == "") ->
142
++		    {200, [?CT], "<body type='terminate' condition='improper-addressing' xmlns='http://jabber.org/protocol/httpbind'/>"};
143
++		true ->
144
++	    ID = if
145
++		     (ID1 == "") ->
146
++			 %% create new session
147
++			 NewID = sha:sha(term_to_binary({now(), make_ref()})),
148
++			 {ok, Pid} = start(NewID, Key),
149
++			 Wait = case
150
++				    string:to_integer(xml:get_attr_s("wait",Attrs))
151
++				    of
152
++				    {error, _} ->
153
++					?MAX_WAIT;
154
++				    {CWait, _} ->
155
++					if 
156
++					    (CWait > ?MAX_WAIT) ->
157
++						?MAX_WAIT;
158
++					    true ->
159
++						CWait
160
++					end
161
++				end,
162
++			 Hold = case
163
++				    string:to_integer(xml:get_attr_s("hold",Attrs))
164
++				    of
165
++				    {error, _} ->
166
++					(?MAX_REQUESTS - 1);
167
++				    {CHold, _} ->
168
++					if 
169
++					    (CHold > (?MAX_REQUESTS - 1)) ->
170
++						(?MAX_REQUESTS - 1);
171
++					    true ->
172
++						CHold
173
++					end
174
++				end,
175
++			 mnesia:transaction(
176
++			   fun() ->
177
++				   mnesia:write(#http_bind{id = NewID,
178
++							   pid = Pid,
179
++							   wait = Wait,
180
++							   hold = Hold})
181
++			   end),
182
++			 InPacket =  if 
183
++					(XmppDomain /= "") ->
184
++					    ["<stream:stream to='",
185
++					     XmppDomain, 
186
++					     "' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>"];
187
++					true ->
188
++					    ""
189
++				    end,
190
++			 NewID;
191
++		     true ->
192
++			 %% old session
193
++			 Type = xml:get_attr_s("type",Attrs),
194
++			 Wait = ?MAX_WAIT,
195
++			 Hold = (?MAX_REQUESTS - 1),
196
++			 if 
197
++			     (Type == "terminate") ->
198
++				 %% terminate session
199
++				 InPacket = Packet ++ "</stream:stream>";
200
++			     true ->
201
++				 InPacket = Packet
202
++			 end,
203
++			 ID1
204
++		 end,
205
++		    ?DEBUG("~n InPacket: ~s ~n", [InPacket]),
206
++	    case http_put(ID, RID, Key, NewKey, Hold, InPacket) of
207
++		{error, not_exists} ->
208
++		    {404, [?BAD_REQUEST], ""};
209
++		{error, bad_key} ->
210
++		    case mnesia:dirty_read({http_bind, ID}) of
211
++			[] ->
212
++			    {404, [?BAD_REQUEST], ""};
213
++			[#http_bind{pid = FsmRef}] ->
214
++			    gen_fsm:sync_send_all_state_event(FsmRef,stop),
215
++			    {404, [?BAD_REQUEST], ""}		    
216
++		    end;
217
++		{error, polling_too_frequently} ->
218
++		    case mnesia:dirty_read({http_bind, ID}) of
219
++			[] -> %% unlikely! (?)
220
++			    {404, [?BAD_REQUEST], ""};
221
++			[#http_bind{pid = FsmRef}] ->
222
++			    gen_fsm:sync_send_all_state_event(FsmRef,stop),
223
++			    {403, [?BAD_REQUEST], ""}		    
224
++		    end;
225
++		{repeat, OutPacket} ->
226
++		    ?DEBUG("http_put said 'repeat!' ...", []),
227
++		    send_outpacket(ID, OutPacket);
228
++		ok ->
229
++		    receive_loop(ID,ID1,RID,Wait,Hold,Attrs)
230
++	    end
231
++	    end;
232
++	_ ->
233
++	    {400, [?BAD_REQUEST], ""}
234
++    end;
235
++process_request(_Request) ->
236
++    {400, [], {xmlelement, "h1", [],
237
++	       [{xmlcdata, "400 Bad Request"}]}}.
238
++
239
++receive_loop(ID,ID1,RID,Wait,Hold,Attrs) ->
240
++    receive
241
++	after 100 -> ok
242
++	end,
243
++    prepare_response(ID,ID1,RID,Wait,Hold,Attrs).
244
++
245
++prepare_response(ID,ID1,RID,Wait,Hold,Attrs) ->
246
++    case http_get(ID,RID) of
247
++	{error, not_exists} ->
248
++	    {404, [?BAD_REQUEST], ""};
249
++	{ok, keep_on_hold} ->
250
++	    receive_loop(ID,ID1,RID,Wait,Hold,Attrs);
251
++	{ok, OutPacket} ->
252
++	    if
253
++		ID == ID1 ->
254
++		    send_outpacket(ID, OutPacket);
255
++		true ->
256
++		    To = xml:get_attr_s("to",Attrs),
257
++		    case xml_stream:parse_element(OutPacket++"</stream:stream>") of
258
++			El when element(1, El) == xmlelement ->
259
++			    {xmlelement, _, OutAttrs, _} = El,
260
++			    AuthID = xml:get_attr_s("id", OutAttrs),
261
++			    StreamError = false;
262
++			{error, _} ->
263
++			    AuthID = "",
264
++			    StreamError = true
265
++		    end,
266
++		    if
267
++			To == "" ->
268
++			    {200, [?CT], "<body type='terminate' condition='improper-addressing' xmlns='http://jabber.org/protocol/httpbind'/>"};
269
++			StreamError == true ->
270
++			    {200, [?CT], "<body type='terminate' condition='host-unknown' xmlns='http://jabber.org/protocol/httpbind'/>"};
271
++			true ->
272
++			    {200, [?CT],
273
++			     xml:element_to_string(
274
++			       {xmlelement,"body",
275
++				[{"xmlns",
276
++				  "http://jabber.org/protocol/httpbind"},
277
++				 {"sid",ID},
278
++				 {"wait", integer_to_list(Wait)},
279
++				 {"requests", integer_to_list(Hold+1)},
280
++				 {"inactivity", integer_to_list(trunc(?MAX_INACTIVITY/1000))},
281
++				 {"polling", ?MIN_POLLING},
282
++				 {"authid", AuthID}
283
++				],[]})}
284
++		    end
285
++	    end
286
++    end.
287
++    
288
++send_outpacket(ID, OutPacket) ->
289
++    case OutPacket of
290
++	"" ->
291
++	    {200, [?CT], "<body xmlns='http://jabber.org/protocol/httpbind'/>"};
292
++	"</stream:stream>" ->
293
++	    case mnesia:dirty_read({http_bind, ID}) of
294
++		[#http_bind{pid = FsmRef}] ->
295
++		    gen_fsm:sync_send_all_state_event(FsmRef,stop)
296
++	    end,
297
++	    {200, [?CT], "<body xmlns='http://jabber.org/protocol/httpbind'/>"};
298
++	_ ->
299
++	    case xml_stream:parse_element("<body>" 
300
++					  ++ OutPacket
301
++					  ++ "</body>") 
302
++		of
303
++		El when element(1, El) == xmlelement ->
304
++		    {xmlelement, _, _, OEls} = El,
305
++		    TypedEls = [xml:replace_tag_attr("xmlns","jabber:client",OEl) || 
306
++				   OEl <- OEls],
307
++		    ?DEBUG(" --- outgoing data --- ~n~s~n --- outgoing data END --- ~n",
308
++			   [xml:element_to_string(
309
++			      {xmlelement,"body",
310
++			       [{"xmlns",
311
++				 "http://jabber.org/protocol/httpbind"}],
312
++			       TypedEls})]
313
++			  ),
314
++		    {200, [?CT],
315
++		     xml:element_to_string(
316
++		       {xmlelement,"body",
317
++			[{"xmlns",
318
++			  "http://jabber.org/protocol/httpbind"}],
319
++			TypedEls})};
320
++		{error, _} ->
321
++		    case mnesia:dirty_read({http_bind, ID}) of
322
++			[#http_bind{pid = FsmRef}] ->
323
++			    gen_fsm:sync_send_all_state_event(FsmRef,stop)
324
++		    end,
325
++		    {200, [?CT],
326
++		     "<body type='terminate' condition='internal-server-error' xmlns='http://jabber.org/protocol/httpbind'/>"}
327
++	    end
328
++    end.
329
++
330
++%%%----------------------------------------------------------------------
331
++%%% Callback functions from gen_fsm
332
++%%%----------------------------------------------------------------------
333
++
334
++%%----------------------------------------------------------------------
335
++%% Func: init/1
336
++%% Returns: {ok, StateName, StateData}          |
337
++%%          {ok, StateName, StateData, Timeout} |
338
++%%          ignore                              |
339
++%%          {stop, StopReason}                   
340
++%%----------------------------------------------------------------------
341
++init([ID, Key]) ->
342
++    ?INFO_MSG("started: ~p", [{ID, Key}]),
343
++    Opts = [], % TODO
344
++    {ok, C2SPid} = ejabberd_c2s:start({?MODULE, {http_bind, self()}}, Opts),
345
++    ejabberd_c2s:become_controller(C2SPid),
346
++    Timer = erlang:start_timer(?MAX_INACTIVITY, self(), []),
347
++    {ok, loop, #state{id = ID,
348
++		      key = Key,
349
++		      timer = Timer}}.
350
++
351
++%%----------------------------------------------------------------------
352
++%% Func: StateName/2
353
++%% Returns: {next_state, NextStateName, NextStateData}          |
354
++%%          {next_state, NextStateName, NextStateData, Timeout} |
355
++%%          {stop, Reason, NewStateData}                         
356
++%%----------------------------------------------------------------------
357
++
358
++
359
++%%----------------------------------------------------------------------
360
++%% Func: StateName/3
361
++%% Returns: {next_state, NextStateName, NextStateData}            |
362
++%%          {next_state, NextStateName, NextStateData, Timeout}   |
363
++%%          {reply, Reply, NextStateName, NextStateData}          |
364
++%%          {reply, Reply, NextStateName, NextStateData, Timeout} |
365
++%%          {stop, Reason, NewStateData}                          |
366
++%%          {stop, Reason, Reply, NewStateData}                    
367
++%%----------------------------------------------------------------------
368
++%state_name(Event, From, StateData) ->
369
++%    Reply = ok,
370
++%    {reply, Reply, state_name, StateData}.
371
++
372
++%%----------------------------------------------------------------------
373
++%% Func: handle_event/3
374
++%% Returns: {next_state, NextStateName, NextStateData}          |
375
++%%          {next_state, NextStateName, NextStateData, Timeout} |
376
++%%          {stop, Reason, NewStateData}                         
377
++%%----------------------------------------------------------------------
378
++handle_event(_Event, StateName, StateData) ->
379
++    {next_state, StateName, StateData}.
380
++
381
++%%----------------------------------------------------------------------
382
++%% Func: handle_sync_event/4
383
++%% Returns: {next_state, NextStateName, NextStateData}            |
384
++%%          {next_state, NextStateName, NextStateData, Timeout}   |
385
++%%          {reply, Reply, NextStateName, NextStateData}          |
386
++%%          {reply, Reply, NextStateName, NextStateData, Timeout} |
387
++%%          {stop, Reason, NewStateData}                          |
388
++%%          {stop, Reason, Reply, NewStateData}                    
389
++%%----------------------------------------------------------------------
390
++handle_sync_event({send, Packet}, _From, StateName, StateData) ->
391
++    Output = [StateData#state.output | Packet],
392
++    Reply = ok,
393
++    {reply, Reply, StateName, StateData#state{output = Output}};
394
++
395
++handle_sync_event(activate, From, StateName, StateData) ->
396
++    case StateData#state.input of
397
++	"" ->
398
++	    {reply, ok, StateName, StateData#state{waiting_input = From}};
399
++	Input ->
400
++	    From ! {tcp, {http_bind, self()}, list_to_binary(Input)},
401
++	    {reply, ok, StateName, StateData#state{input = "",
402
++						   waiting_input = false,
403
++						  last_receiver = From}}
404
++    end;
405
++
406
++handle_sync_event(stop, _From, _StateName, StateData) ->
407
++    Reply = ok,
408
++    {stop, normal, Reply, StateData};
409
++
410
++handle_sync_event({http_put, RID, Key, NewKey, Hold, Packet},
411
++		  _From, StateName, StateData) ->
412
++    %% check if RID valid
413
++    RidAllow = case RID of
414
++		   error -> 
415
++		       false;
416
++		   _ ->
417
++		       case StateData#state.rid of
418
++			   error -> 
419
++			       %% first request - nothing saved so far
420
++			       true;
421
++			   OldRID ->
422
++			       ?DEBUG("state.rid/cur rid: ~p/~p", [OldRID, RID]),
423
++			       if 
424
++				   (OldRID < RID) and (RID =< (OldRID + Hold + 1)) ->
425
++				       true;
426
++				   (RID =< OldRID) and (RID > OldRID - Hold - 1) ->
427
++				       repeat;
428
++				   true ->
429
++				       false
430
++			       end
431
++		       end
432
++	       end,
433
++    %% check if key valid
434
++    KeyAllow = case RidAllow of
435
++		   repeat -> 
436
++		       true;
437
++		   false ->
438
++		       false;
439
++		   true ->
440
++		       case StateData#state.key of
441
++			   "" ->
442
++			       true;
443
++			   OldKey ->
444
++			       NextKey = httpd_util:to_lower(hex(
445
++							       binary_to_list(crypto:sha(Key)))),
446
++			       ?DEBUG("Key/OldKey/NextKey: ~s/~s/~s", [Key, OldKey, NextKey]),
447
++			       if
448
++				   OldKey == NextKey ->
449
++				       true;
450
++				   true ->
451
++				       ?DEBUG("wrong key: ~s",[Key]),
452
++				       false
453
++			       end
454
++		       end
455
++	       end,
456
++    {_,TSec,TMSec} = now(),
457
++    TNow = TSec*1000*1000 + TMSec,
458
++    LastPoll = if 
459
++		   Packet == "" ->
460
++		       TNow;
461
++		   true ->
462
++		       StateData#state.last_poll
463
++	       end,
464
++    {MinPoll, _} = string:to_integer(?MIN_POLLING),
465
++    if
466
++	(Packet == "") and (TNow - StateData#state.last_poll < MinPoll*1000*1000) ->
467
++	    Reply = {error, polling_too_frequently},
468
++	    {reply, Reply, StateName, StateData};
469
++	KeyAllow ->
470
++	    case RidAllow of
471
++		false ->
472
++		    Reply = {error, not_exists},
473
++		    {reply, Reply, StateName, StateData};
474
++		repeat ->
475
++		    ?DEBUG("repeating ~p", [RID]),
476
++		    [Out | _XS] = [El#hbr.out || El <- StateData#state.req_list, El#hbr.rid == RID],
477
++		    case Out of 
478
++			[[] | OutPacket] ->
479
++			    Reply = {repeat, OutPacket};
480
++			_ ->
481
++			    Reply = {repeat, Out}
482
++		    end,
483
++		    {reply, Reply, StateName, StateData#state{last_poll = LastPoll}};
484
++		true ->
485
++		    SaveKey = if 
486
++				  NewKey == "" ->
487
++				      Key;
488
++				  true ->
489
++				      NewKey
490
++			      end,
491
++		    ?DEBUG(" -- SaveKey: ~s~n", [SaveKey]),
492
++
493
++		    %% save request
494
++		    ReqList = [#hbr{rid=RID,
495
++				    key=StateData#state.key,
496
++				    in=StateData#state.input,
497
++				    out=StateData#state.output
498
++				   } | 
499
++			       [El || El <- StateData#state.req_list, 
500
++				      El#hbr.rid < RID, El#hbr.rid > (RID - 1 - Hold) ] 
501
++			      ],
502
++
503
++		    ?DEBUG("reqlist: ~p", [ReqList]),
504
++		    
505
++		    case StateData#state.waiting_input of
506
++			false ->
507
++			    cancel_timer(StateData#state.timer),
508
++			    Timer = erlang:start_timer(?MAX_INACTIVITY, self(), []),
509
++			    Input = Packet ++ [StateData#state.input],
510
++			    Reply = ok,
511
++			    {reply, Reply, StateName, 
512
++			     StateData#state{input = Input,
513
++					     rid = RID,
514
++					     key = SaveKey,
515
++					     ctime = TNow,
516
++					     timer = Timer,
517
++					     last_poll = LastPoll,
518
++					     req_list = ReqList
519
++					    }};
520
++			{Receiver, _Tag} ->
521
++			    Receiver ! {tcp, {http_bind, self()},
522
++					list_to_binary(Packet)},
523
++			    cancel_timer(StateData#state.timer),
524
++			    Timer = erlang:start_timer(?MAX_INACTIVITY, self(), []),
525
++			    Reply = ok,
526
++			    {reply, Reply, StateName,
527
++			     StateData#state{waiting_input = false,
528
++					     last_receiver = Receiver,
529
++					     input = "",
530
++					     rid = RID,
531
++					     key = SaveKey,
532
++					     ctime = TNow,
533
++					     timer = Timer,
534
++					     last_poll = LastPoll,
535
++					     req_list = ReqList
536
++					    }}
537
++		    end
538
++	    end;
539
++	true ->
540
++	    Reply = {error, bad_key},
541
++	    {reply, Reply, StateName, StateData}
542
++    end;
543
++
544
++handle_sync_event({http_get, RID, Wait, Hold}, _From, StateName, StateData) ->
545
++    {_,TSec,TMSec} = now(),
546
++    TNow = TSec*1000*1000 + TMSec,
547
++%%     ?DEBUG("Wait/Hold/cTime/Now: ~p/~p/~p/~p", [Wait, Hold, StateData#state.ctime,TNow]),
548
++    cancel_timer(StateData#state.timer),
549
++    Timer = erlang:start_timer(?MAX_INACTIVITY, self(), []),
550
++    if 
551
++	(Hold > 0) and 
552
++	(StateData#state.output == "") and 
553
++	((TNow - StateData#state.ctime) < (Wait*1000*1000)) and 
554
++	(StateData#state.rid == RID) ->
555
++	    Output = StateData#state.output,
556
++	    ReqList = StateData#state.req_list,
557
++	    Reply = {ok, keep_on_hold};
558
++	true ->
559
++	    case StateData#state.output of
560
++		[[]| OutPacket] ->
561
++		    Reply = {ok, OutPacket};
562
++		_ ->
563
++		    Reply = {ok, StateData#state.output}
564
++	    end,
565
++	    %% save request
566
++	    ReqList = [#hbr{rid=RID,
567
++			    key=StateData#state.key,
568
++			    in=StateData#state.input,
569
++			    out=StateData#state.output
570
++			   } | 
571
++		       [El || El <- StateData#state.req_list, 
572
++			      El#hbr.rid /= RID ] 
573
++		      ],
574
++	    Output = ""
575
++    end,
576
++    {reply, Reply, StateName, StateData#state{output = Output, 
577
++					      timer = Timer,
578
++					      req_list = ReqList}};
579
++
580
++handle_sync_event(_Event, _From, StateName, StateData) ->
581
++    Reply = ok,
582
++    {reply, Reply, StateName, StateData}.
583
++
584
++code_change(_OldVsn, StateName, StateData, _Extra) ->
585
++    {ok, StateName, StateData}.
586
++
587
++%%----------------------------------------------------------------------
588
++%% Func: handle_info/3
589
++%% Returns: {next_state, NextStateName, NextStateData}          |
590
++%%          {next_state, NextStateName, NextStateData, Timeout} |
591
++%%          {stop, Reason, NewStateData}                         
592
++%%----------------------------------------------------------------------
593
++handle_info({timeout, Timer, _}, _StateName,
594
++	    #state{timer = Timer} = StateData) ->
595
++    ?DEBUG("ding dong", []),
596
++    {stop, normal, StateData};
597
++
598
++handle_info(_, StateName, StateData) ->
599
++    {next_state, StateName, StateData}.
600
++
601
++%%----------------------------------------------------------------------
602
++%% Func: terminate/3
603
++%% Purpose: Shutdown the fsm
604
++%% Returns: any
605
++%%----------------------------------------------------------------------
606
++terminate(_Reason, _StateName, StateData) ->
607
++    ?DEBUG("terminate: deleting session ~s", [StateData#state.id]),
608
++    mnesia:transaction(
609
++      fun() ->
610
++	      mnesia:delete({http_bind, StateData#state.id})
611
++      end),
612
++    case StateData#state.waiting_input of
613
++	false ->
614
++	    case StateData#state.last_receiver of
615
++		undefined -> ok;
616
++		Receiver -> Receiver ! {tcp_closed, {http_bind, self()}}
617
++	    end;
618
++	{Receiver, _Tag} -> Receiver ! {tcp_closed, {http_bind, self()}}
619
++    end,
620
++    ok.
621
++
622
++%%%----------------------------------------------------------------------
623
++%%% Internal functions
624
++%%%----------------------------------------------------------------------
625
++
626
++
627
++http_put(ID, RID, Key, NewKey, Hold, Packet) ->
628
++    case mnesia:dirty_read({http_bind, ID}) of
629
++	[] ->
630
++	    {error, not_exists};
631
++	[#http_bind{pid = FsmRef}] ->
632
++	    gen_fsm:sync_send_all_state_event(
633
++	      FsmRef, {http_put, RID, Key, NewKey, Hold, Packet})
634
++    end.
635
++
636
++http_get(ID,RID) ->
637
++    case mnesia:dirty_read({http_bind, ID}) of
638
++	[] ->
639
++	    {error, not_exists};
640
++	[#http_bind{pid = FsmRef, wait = Wait, hold = Hold}] ->
641
++	    gen_fsm:sync_send_all_state_event(FsmRef, {http_get, RID, Wait, Hold})
642
++    end.
643
++
644
++
645
++parse_request(Data) ->
646
++    ?DEBUG("--- incoming data --- ~n~s~n --- END incoming data END --- ",[Data]),
647
++    case xml_stream:parse_element(Data) of
648
++	El when element(1, El) == xmlelement ->
649
++	    {xmlelement, Name, Attrs, Els} = El,
650
++	    ID = xml:get_attr_s("sid",Attrs),
651
++	    {RID,_X} = string:to_integer(xml:get_attr_s("rid",Attrs)),
652
++	    Key = xml:get_attr_s("key",Attrs),
653
++	    NewKey = xml:get_attr_s("newkey",Attrs),
654
++	    Xmlns = xml:get_attr_s("xmlns",Attrs),
655
++	    Packet = [xml:element_to_string(xml:remove_tag_attr("xmlns",E)) || E <- Els],
656
++	    ?DEBUG(" --- incoming packet --- ~n~s~n --- END incoming packet END --- ", [Packet]),
657
++	    if 
658
++		Name /= "body" -> 
659
++		    {error, bad_request};
660
++		Xmlns /= "http://jabber.org/protocol/httpbind" ->
661
++		    {error, bad_request};
662
++		true ->
663
++		    {ok, ID, RID, Key, NewKey, Attrs, Packet}
664
++	    end;
665
++	{error, _Reason} ->
666
++	    {error, bad_request}
667
++    end.
668
++
669
++cancel_timer(Timer) ->
670
++    erlang:cancel_timer(Timer),
671
++    receive
672
++	{timeout, Timer, _} ->
673
++	    ok
674
++    after 0 ->
675
++	    ok
676
++    end.
677
++
678
++hex(Bin) when binary(Bin) -> hex(binary_to_list(Bin));
679
++hex([]) -> "";
680
++hex([H|T]) -> 
681
++	[A,B] = if 
682
++		H == 0 -> "00";
683
++		H < 16 -> [$0,element(H,{$1,$2,$3,$4,$5,$6,$7,$8,$9,$a,$b,$c,$d,$e,$f})];
684
++		true   -> erlang:integer_to_list(H,16)
685
++	end,
686
++	[A,B|hex(T)].
687
+Index: src/web/ejabberd_web.erl
688
+===================================================================
689
+--- src/web/ejabberd_web.erl	(Revision 565)
690
++++ src/web/ejabberd_web.erl	(Arbeitskopie)
691
+@@ -49,7 +49,7 @@
692
+ 		      {"value", Value}])).
693
+ 
694
+ 
695
+-process_get({_, true},
696
++process_get({_, _, true},
697
+ 	    #request{auth = Auth,
698
+ 		     path = ["admin", "server", SHost | RPath],
699
+ 		     q = Query,
700
+@@ -94,7 +94,7 @@
701
+ 	    {404, [], make_xhtml([?XC("h1", "Not found")])}
702
+     end;
703
+ 
704
+-process_get({_, true},
705
++process_get({_, _, true},
706
+ 	    #request{auth = Auth,
707
+ 		     path = ["admin" | RPath],
708
+ 		     q = Query,
709
+@@ -133,12 +133,19 @@
710
+ 				       [{xmlcdata, "401 Unauthorized"}]}])}
711
+     end;
712
+ 
713
+-process_get({true, _},
714
++process_get({true, _, _},
715
+ 	    #request{path = ["http-poll" | RPath],
716
+ 		     q = _Query,
717
+ 		     lang = _Lang} = Request) ->
718
+     ejabberd_http_poll:process_request(Request#request{path = RPath});
719
+ 
720
++process_get({_, true, _},
721
++	    #request{us = _US,
722
++		     path = ["http-bind" | RPath],
723
++		     q = _Query,
724
++		     lang = _Lang} = Request) ->
725
++    ejabberd_http_bind:process_request(Request#request{path = RPath});
726
++
727
+ process_get(_, _Request) ->
728
+     {404, [], make_xhtml([?XC("h1", "Not found")])}.
729
+ 
730
+Index: src/web/ejabberd_http.erl
731
+===================================================================
732
+--- src/web/ejabberd_http.erl	(Revision 565)
733
++++ src/web/ejabberd_http.erl	(Arbeitskopie)
734
+@@ -30,6 +30,7 @@
735
+ 		request_keepalive,
736
+ 		request_content_length,
737
+ 		request_lang = "en",
738
++		use_http_bind = false,
739
+ 		use_http_poll = false,
740
+ 		use_web_admin = false,
741
+ 		end_of_request = false,
742
+@@ -70,15 +71,17 @@
743
+ 	_ ->
744
+ 	    ok
745
+     end,
746
++    UseHTTPBind = lists:member(http_bind, Opts),
747
+     UseHTTPPoll = lists:member(http_poll, Opts),
748
+     UseWebAdmin = lists:member(web_admin, Opts),
749
+-    ?DEBUG("S: ~p~n", [{UseHTTPPoll, UseWebAdmin}]),
750
++    ?DEBUG("S: ~p~n", [{UseHTTPPoll, UseHTTPBind, UseWebAdmin}]),
751
+     ?INFO_MSG("started: ~p", [{SockMod1, Socket1}]),
752
+     {ok, proc_lib:spawn_link(ejabberd_http,
753
+ 			     receive_headers,
754
+ 			     [#state{sockmod = SockMod1,
755
+ 				     socket = Socket1,
756
+ 				     use_http_poll = UseHTTPPoll,
757
++				     use_http_bind = UseHTTPBind,
758
+ 				     use_web_admin = UseWebAdmin}])}.
759
+ 
760
+ 
761
+@@ -185,6 +188,7 @@
762
+ 		    #state{sockmod = SockMod,
763
+ 			   socket = Socket,
764
+ 			   use_http_poll = State#state.use_http_poll,
765
++			   use_http_bind = State#state.use_http_bind,
766
+ 			   use_web_admin = State#state.use_web_admin};
767
+ 		_ ->
768
+ 		    #state{end_of_request = true}
769
+@@ -200,6 +204,7 @@
770
+ 		       request_auth = Auth,
771
+ 		       request_lang = Lang,
772
+ 		       use_http_poll = UseHTTPPoll,
773
++		       use_http_bind = UseHTTPBind,
774
+ 		       use_web_admin = UseWebAdmin} = State) ->
775
+     case (catch url_decode_q_split(Path)) of
776
+ 	{'EXIT', _} ->
777
+@@ -217,7 +222,7 @@
778
+ 			       q = LQuery,
779
+ 			       auth = Auth,
780
+ 			       lang = Lang},
781
+-	    case ejabberd_web:process_get({UseHTTPPoll, UseWebAdmin},
782
++	    case ejabberd_web:process_get({UseHTTPPoll, UseHTTPBind, UseWebAdmin},
783
+ 					  Request) of
784
+ 		El when element(1, El) == xmlelement ->
785
+ 		    make_xhtml_output(State, 200, [], El);
786
+@@ -240,6 +245,7 @@
787
+ 		       sockmod = SockMod,
788
+ 		       socket = Socket,
789
+ 		       use_http_poll = UseHTTPPoll,
790
++		       use_http_bind = UseHTTPBind,
791
+ 		       use_web_admin = UseWebAdmin} = State)
792
+   when is_integer(Len) ->
793
+     case SockMod of
794
+@@ -267,7 +273,7 @@
795
+ 			       auth = Auth,
796
+ 			       data = Data,
797
+ 			       lang = Lang},
798
+-	    case ejabberd_web:process_get({UseHTTPPoll, UseWebAdmin},
799
++	    case ejabberd_web:process_get({UseHTTPPoll, UseHTTPBind, UseWebAdmin},
800
+ 					  Request) of
801
+ 		El when element(1, El) == xmlelement ->
802
+ 		    make_xhtml_output(State, 200, [], El);
803
+Index: src/xml.erl
804
+===================================================================
805
+--- src/xml.erl	(Revision 565)
806
++++ src/xml.erl	(Arbeitskopie)
807
+@@ -18,6 +18,7 @@
808
+ 	 get_tag_attr/2, get_tag_attr_s/2,
809
+ 	 get_subtag/2,
810
+ 	 get_path_s/2,
811
++	 remove_tag_attr/2,
812
+ 	 replace_tag_attr/3]).
813
+ 
814
+ %element_to_string(El) ->
815
+@@ -224,6 +225,14 @@
816
+ get_path_s(El, [cdata]) ->
817
+     get_tag_cdata(El).
818
+ 
819
++remove_tag_attr(Attr, El) ->
820
++    case El of
821
++        {xmlelement, Name, Attrs, Els} ->
822
++            Attrs1 = lists:keydelete(Attr, 1, Attrs),
823
++            {xmlelement, Name, Attrs1, Els};
824
++        _ ->
825
++            El
826
++    end.
827
+ 
828
+ replace_tag_attr(Attr, Value, {xmlelement, Name, Attrs, Els}) ->
829
+     Attrs1 = lists:keydelete(Attr, 1, Attrs),
830
+Index: src/ejabberd_sup.erl
831
+===================================================================
832
+--- src/ejabberd_sup.erl	(Revision 565)
833
++++ src/ejabberd_sup.erl	(Arbeitskopie)
834
+@@ -123,6 +123,14 @@
835
+ 	 infinity,
836
+ 	 supervisor,
837
+ 	 [ejabberd_tmp_sup]},
838
++    HTTPBindSupervisor =
839
++	{ejabberd_http_bind_sup,
840
++	 {ejabberd_tmp_sup, start_link,
841
++	  [ejabberd_http_bind_sup, ejabberd_http_bind]},
842
++	 permanent,
843
++	 infinity,
844
++	 supervisor,
845
++	 [ejabberd_tmp_sup]},
846
+     IQSupervisor =
847
+ 	{ejabberd_iq_sup,
848
+ 	 {ejabberd_tmp_sup, start_link,
849
+@@ -145,6 +153,7 @@
850
+ 	   ServiceSupervisor,
851
+ 	   HTTPSupervisor,
852
+ 	   HTTPPollSupervisor,
853
++	   HTTPBindSupervisor,
854
+ 	   IQSupervisor,
855
+ 	   Listener]}}.
... ...
@@ -0,0 +1,11 @@
1
+diff -Naur ejabberd-1.1.1.orig/src/odbc/ejabberd_odbc.erl ejabberd-1.1.1/src/odbc/ejabberd_odbc.erl
2
+--- ejabberd-1.1.1.orig/src/odbc/ejabberd_odbc.erl	2006-05-07 19:05:12.549917750 +0400
3
++++ ejabberd-1.1.1/src/odbc/ejabberd_odbc.erl	2006-05-07 19:06:11.337591750 +0400
4
+@@ -281,6 +281,7 @@
5
+     case mysql_conn:start(Server, ?MYSQL_PORT, Username, Password, DB, NoLogFun) of
6
+ 	{ok, Ref} ->
7
+ 	    erlang:monitor(process, Ref),
8
++	    catch mysql_conn:fetch(Ref, "SET NAMES 'utf8';", self()),
9
+ 	    {ok, #state{db_ref = Ref, db_type = mysql}};
10
+ 	{error, Reason} ->
11
+ 	    ?ERROR_MSG("MySQL connection failed: ~p~n", [Reason]),
... ...
@@ -0,0 +1,406 @@
1
+* modified files
2
+
3
+
4
+--- jlib.hrl
5
++++ jlib.hrl
6
+@@ -34,6 +34,7 @@
7
+ -define(NS_PUBSUB_OWNER, "http://jabber.org/protocol/pubsub#owner").
8
+ -define(NS_PUBSUB_NMI,   "http://jabber.org/protocol/pubsub#node-meta-info").
9
+ -define(NS_COMMANDS,     "http://jabber.org/protocol/commands").
10
++-define(NS_BYTESTREAMS,  "http://jabber.org/protocol/bytestreams").
11
+ 
12
+ -define(NS_EJABBERD_CONFIG, "ejabberd:config").
13
+ 
14
+
15
+
16
+
17
+* added files
18
+
19
+--- /dev/null
20
++++ mod_proxy65.erl
21
+@@ -0,0 +1,189 @@
22
++%%%----------------------------------------------------------------------
23
++%%% File    : mod_proxy65.erl
24
++%%% Author  : Magnus Henoch <henoch@dtek.chalmers.se>
25
++%%% Purpose : Handle Jabber communications for JEP-0065 proxy
26
++%%% Created : 27 Dec 2005 by Magnus Henoch <henoch@dtek.chalmers.se>
27
++%%% Id      : $Id: ejabberd_c2s.erl 440 2005-11-22 18:00:56Z alexey $
28
++%%%----------------------------------------------------------------------
29
++
30
++-module(mod_proxy65).
31
++-author('henoch@dtek.chalmers.se').
32
++-vsn('$Revision$ ').
33
++
34
++-behaviour(gen_mod).
35
++
36
++-export([start/2,
37
++	 init/1,
38
++	 stop/1]).
39
++
40
++-include("ejabberd.hrl").
41
++-include("jlib.hrl").
42
++
43
++-record(proxy65_connection, {cookie, firstpid = none, secondpid = none}).
44
++
45
++-record(proxy65_options, {host, access, streamhosts}).
46
++
47
++-define(PROCNAME, ejabberd_mod_proxy65).
48
++
49
++start(Host, Opts) ->
50
++    mnesia:create_table(proxy65_connection,
51
++			[{ram_copies, [node()]},
52
++			 {attributes, record_info(fields, proxy65_connection)}]),
53
++    MyHost = gen_mod:get_opt(host, Opts, "proxy." ++ Host),
54
++    Access = gen_mod:get_opt(access, Opts, all),
55
++    Streamhosts = gen_mod:get_opt(streamhosts, Opts, [{Host, 7777}]),
56
++    
57
++    register(gen_mod:get_module_proc(Host, ?PROCNAME),
58
++	     spawn(?MODULE, init, [#proxy65_options{host = MyHost, access = Access,
59
++						    streamhosts = Streamhosts}])).
60
++
61
++
62
++stop(Host) ->
63
++    Proc = gen_mod:get_module_proc(Host, ?PROCNAME),
64
++    Proc ! stop,
65
++    {wait, Proc}.
66
++
67
++init(#proxy65_options{host = Host} = Opts) ->
68
++    ejabberd_router:register_route(Host),
69
++    loop(Opts).
70
++
71
++loop(#proxy65_options{host = Host} = Opts) ->
72
++    receive
73
++	{route, From, To, Packet} ->
74
++	    case catch do_route(Opts, From, To, Packet) of
75
++		{'EXIT', Reason} ->
76
++		    ?ERROR_MSG("~p", [Reason]);
77
++		_ ->
78
++		    ok
79
++	    end,
80
++	    loop(Opts);
81
++	stop ->
82
++	    ejabberd_router:unregister_route(Host),
83
++	    ok;
84
++	_ ->
85
++	    loop(Opts)
86
++    end.
87
++
88
++do_route(#proxy65_options{host = Host, access = Access} = Opts,
89
++	 From, To, Packet) ->
90
++    case acl:match_rule(Host, Access, From) of
91
++	allow ->
92
++	    do_route1(Opts, From, To, Packet);
93
++	_ ->
94
++	    {xmlelement, _Name, Attrs, _Els} = Packet,
95
++	    Lang = xml:get_attr_s("xml:lang", Attrs),
96
++	    ErrText = "Access denied by service policy",
97
++	    Err = jlib:make_error_reply(Packet,
98
++					?ERRT_FORBIDDEN(Lang, ErrText)),
99
++	    ejabberd_router:route(To, From, Err)
100
++    end.
101
++
102
++do_route1(#proxy65_options{host = Host, streamhosts = Streamhosts}, From, To, Packet) ->
103
++    {xmlelement, Name, _Attrs, _Els} = Packet,
104
++    case Name of
105
++	"iq" ->
106
++	    case jlib:iq_query_info(Packet) of
107
++		#iq{type = get, xmlns = ?NS_DISCO_INFO = XMLNS,
108
++		    lang = Lang, sub_el = SubEl} = IQ ->
109
++		    Node = xml:get_tag_attr_s("node", SubEl),
110
++		    if Node == [] ->
111
++			    Res = IQ#iq{type = result,
112
++					sub_el = [{xmlelement, "query",
113
++						   [{"xmlns", XMLNS}],
114
++						   [{xmlelement, "identity",
115
++						     [{"category", "proxy"},
116
++						      {"type", "bytestreams"},
117
++						      {"name", translate:translate(Lang, "SOCKS5 bytestreams proxy")}],
118
++						     []},
119
++						    {xmlelement, "feature",
120
++						     [{"var", ?NS_BYTESTREAMS}], []}]}]};
121
++		       true ->
122
++			    Res = jlib:make_error_reply(Packet, ?ERR_ITEM_NOT_FOUND)
123
++		    end;
124
++		#iq{type = get, xmlns = ?NS_DISCO_ITEMS = XMLNS} = IQ ->
125
++		    Res = IQ#iq{type = result,
126
++				sub_el = [{xmlelement, "query",
127
++					   [{"xmlns", XMLNS}], []}]};
128
++		#iq{type = get, xmlns = ?NS_VERSION} = IQ ->
129
++		    OSType = case os:type() of
130
++				 {Osfamily, Osname} ->
131
++				     atom_to_list(Osfamily) ++ "/" ++
132
++					 atom_to_list(Osname);
133
++				 Osfamily ->
134
++				     atom_to_list(Osfamily)
135
++			     end,
136
++		    OSVersion = case os:version() of
137
++				    {Major, Minor, Release} ->
138
++					lists:flatten(
139
++					  io_lib:format("~w.~w.~w",
140
++							[Major, Minor, Release]));
141
++				    VersionString ->
142
++					VersionString
143
++				end,
144
++		    OS = OSType ++ " " ++ OSVersion,
145
++		    Res = IQ#iq{type = result,
146
++				sub_el = [{xmlelement, "query",
147
++					   [{"xmlns", ?NS_VERSION}],
148
++					   [{xmlelement, "name", [],
149
++					     [{xmlcdata, "ejabberd mod_proxy65 (unofficial)"}]},
150
++					    {xmlelement, "version", [],
151
++					     [{xmlcdata, "0.1"}]},
152
++					    {xmlelement, "os", [],
153
++					     [{xmlcdata, OS}]}
154
++					   ]}]};
155
++		#iq{type = get, xmlns = ?NS_BYTESTREAMS = XMLNS} = IQ ->
156
++		    Res = IQ#iq{type = result,
157
++				sub_el = [{xmlelement, "query",
158
++					   [{"xmlns", XMLNS}],
159
++					   return_streamhosts(Host, Streamhosts)}]};
160
++		#iq{type = set, xmlns = ?NS_BYTESTREAMS} = IQ ->
161
++		    Res = activate(Packet, From, To, IQ);
162
++		_ ->
163
++		    Res = jlib:make_error_reply(Packet, ?ERR_FEATURE_NOT_IMPLEMENTED)
164
++	    end,
165
++	    case Res of
166
++		#iq{} ->
167
++		    ejabberd_router:route(To, From, jlib:iq_to_xml(Res));
168
++		_ ->
169
++		    ejabberd_router:route(To, From, Res)
170
++	    end;
171
++	_ ->
172
++	    ejabberd_router:route(To, From, jlib:make_error_reply(Packet, ?ERR_FEATURE_NOT_IMPLEMENTED))
173
++    end.
174
++
175
++return_streamhosts(_JID, []) ->
176
++    [];
177
++return_streamhosts(JID, [{Host, Port} | Streamhosts]) ->
178
++    %% This is not tail-recursive, but it doesn't matter.
179
++    [{xmlelement, "streamhost",
180
++      [{"jid", JID},
181
++       {"host", Host},
182
++       {"port", integer_to_list(Port)}],
183
++      []} | return_streamhosts(JID, Streamhosts)].
184
++
185
++activate(Packet, From, _To, #iq{sub_el = SubEl} = IQ) ->
186
++    case SubEl of
187
++	{xmlelement, "query", Attrs, _SubEls} ->
188
++	    Sid = xml:get_attr_s("sid", Attrs),
189
++	    ActivateTag = xml:get_subtag(SubEl, "activate"),
190
++	    if ActivateTag /= false ->
191
++		    TargetJID = jlib:string_to_jid(xml:get_tag_cdata(ActivateTag));
192
++	       true ->
193
++		    TargetJID = false
194
++	    end,
195
++	    
196
++	    if Sid /= [], TargetJID /= false, TargetJID /= error ->
197
++		    case proxy65_listener:activate(From, TargetJID, Sid) of
198
++			ok ->
199
++			    ?INFO_MSG("Activated connection between ~s and ~s",
200
++				      [jlib:jid_to_string(From), TargetJID]),
201
++			    IQ#iq{type = result, sub_el = []};
202
++			_ ->
203
++			    jlib:make_error_reply(Packet, ?ERR_INTERNAL_SERVER_ERROR)
204
++		    end;
205
++	       true ->
206
++		    jlib:make_error_reply(Packet, ?ERR_BAD_REQUEST)
207
++	    end;
208
++	_ ->
209
++	    jlib:make_error_reply(Packet, ?ERR_BAD_REQUEST)
210
++    end.
211
+--- /dev/null
212
++++ proxy65_listener.erl
213
+@@ -0,0 +1,192 @@
214
++%%%----------------------------------------------------------------------
215
++%%% File    : proxy65_listener.erl
216
++%%% Author  : Magnus Henoch <henoch@dtek.chalmers.se>
217
++%%% Purpose : Handle SOCKS5 connections for JEP-0065 proxy
218
++%%% Created : 27 Dec 2005 by Magnus Henoch <henoch@dtek.chalmers.se>
219
++%%% Id      : $Id: ejabberd_c2s.erl 440 2005-11-22 18:00:56Z alexey $
220
++%%%----------------------------------------------------------------------
221
++
222
++-module(proxy65_listener).
223
++-author('henoch@dtek.chalmers.se').
224
++-vsn('$Revision$ ').
225
++
226
++-export([start/2, handle_connection/2, activate/3]).
227
++
228
++-include("ejabberd.hrl").
229
++-include("jlib.hrl").
230
++
231
++-record(proxy65_connection, {cookie, firstpid = none, secondpid = none}).
232
++
233
++start({SockMod, Socket}, Opts) ->
234
++    {ok, proc_lib:spawn(?MODULE, handle_connection, [{SockMod, Socket}, Opts])}.
235
++
236
++read_bytes(_SockOpts, 0, Data) ->
237
++    lists:flatten(Data);
238
++read_bytes({SockMod, Socket} = SockOpts, N, Data) ->
239
++    Timeout = 1000,
240
++    case SockMod:recv(Socket, N, Timeout) of
241
++	{error, closed} ->
242
++	    %% On closed connection, return everything we have,
243
++	    %% but not if we have nothing.
244
++	    if Data == [] ->
245
++		    erlang:error(closed);
246
++	       true ->
247
++		    lists:flatten(Data)
248
++	    end;
249
++	{ok, MoreData} ->
250
++	    ?DEBUG("read ~p", [MoreData]),
251
++	    DataList = binary_to_list(MoreData),
252
++	    read_bytes(SockOpts, N - length(DataList), [Data, DataList])
253
++    end.
254
++
255
++handle_connection({SockMod, Socket}, Opts) ->
256
++    ?DEBUG("in handle_connection", []),
257
++    case catch handle_auth({SockMod, Socket}, Opts) of
258
++	{'EXIT', Reason} ->
259
++	    ?ERROR_MSG("~p abnormal termination:~n\t~p~n",
260
++		       [?MODULE, Reason]),
261
++	    SockMod:close(Socket);
262
++	_ ->
263
++	    ok
264
++    end.
265
++
266
++handle_auth({SockMod, Socket} = SockOpts, Opts) ->
267
++    ?DEBUG("in handle_auth", []),
268
++    %% SOCKS protocol stuff...
269
++    [5, NAuthMethods] = read_bytes(SockOpts, 2, []),
270
++    AuthMethods = read_bytes(SockOpts, NAuthMethods, []),
271
++    SupportsNoAuth = lists:member(0, AuthMethods),
272
++
273
++    %% Must support no authentication, otherwise crash
274
++    true = SupportsNoAuth,
275
++
276
++    SockMod:send(Socket, [5, 0]),
277
++
278
++    %% And done.
279
++    handle_connect(SockOpts, Opts).
280
++
281
++handle_connect({SockMod, Socket} = SockOpts, Opts) ->
282
++    ?DEBUG("in handle_connect", []),
283
++    %% Expect a CONNECT command and nothing else
284
++    [5, 1, _, 3, AddressLength] = read_bytes(SockOpts, 5, []),
285
++    Cookie = read_bytes(SockOpts, AddressLength, []),
286
++    [0, 0] = read_bytes(SockOpts, 2, []),
287
++
288
++    %% Make sure no more than two connections claim the same cookie.
289
++    F = fun() ->
290
++		case mnesia:read({proxy65_connection, Cookie}) of
291
++		    [] ->
292
++			mnesia:write(#proxy65_connection{cookie = Cookie,
293
++							 firstpid = self()}),
294
++			ok;
295
++		    [#proxy65_connection{secondpid = none} = C] ->
296
++			mnesia:write(C#proxy65_connection{secondpid = self()}),
297
++			ok
298
++		end
299
++	end,
300
++
301
++    case mnesia:transaction(F) of
302
++	{atomic, ok} ->
303
++	    SockMod:send(Socket, [5, 0, 0, 3, AddressLength, Cookie, 0, 0]),
304
++	    wait_for_activation(SockOpts, Opts);
305
++	Error ->
306
++	    %% conflict.  send "general SOCKS server failure".
307
++	    SockMod:send(Socket, [5, 1, 0, 3, AddressLength, Cookie, 0, 0]),
308
++	    erlang:error({badconnect, Error})
309
++    end.
310
++
311
++wait_for_activation(SockOpts, Opts) ->
312
++    ?DEBUG("in wait_for_activation", []),
313
++    receive
314
++	{get_socket, ReplyTo} ->
315
++	    ReplyTo ! SockOpts,
316
++	    wait_for_activation(SockOpts, Opts);
317
++	{activate, TargetSocket, Initiator, Target} ->
318
++	    ?DEBUG("activated", []),
319
++
320
++	    %% We have no way of knowing which connection belongs to
321
++	    %% which participant, so give both the maximum traffic
322
++	    %% allowed to either.
323
++	    Shapers = case lists:keysearch(shaper, 1, Opts) of
324
++			  {value, {_, S}} -> S;
325
++			  _ -> none
326
++		      end,
327
++	    ?DEBUG("we have shapers: ~p", [Shapers]),
328
++	    Shaper1 = acl:match_rule(global, Shapers, jlib:string_to_jid(Initiator)),
329
++	    Shaper2 = acl:match_rule(global, Shapers, jlib:string_to_jid(Target)),
330
++	    if Shaper1 == none; Shaper2 == none ->
331
++		    MaxShaper = none;
332
++	       true ->
333
++		    ShaperValue1 = ejabberd_config:get_global_option({shaper, Shaper1}),
334
++		    ShaperValue2 = ejabberd_config:get_global_option({shaper, Shaper2}),
335
++
336
++		    if ShaperValue1 > ShaperValue2 ->
337
++			    MaxShaper = Shaper1;
338
++		       true ->
339
++			    MaxShaper = Shaper2
340
++		    end,
341
++		    ?DEBUG("shapers have values ~p and ~p~nusing ~p", [ShaperValue1, ShaperValue2, MaxShaper]),
342
++		    ok
343
++	    end,
344
++
345
++	    transfer_data(SockOpts, TargetSocket, shaper:new(MaxShaper))
346
++    end.
347
++
348
++transfer_data({SockMod, Socket} = SockOpts, {TargetSockMod, TargetSocket} = TargetSockOpts,
349
++	      Shaper) ->
350
++    case SockMod:recv(Socket, 0, infinity) of
351
++	{ok, Data} ->
352
++	    if Data /= <<>> ->
353
++		    NewShaper = case Shaper of
354
++				    none -> none;
355
++				    _ ->
356
++					shaper:update(Shaper, size(Data))
357
++				end,
358
++		    ok = TargetSockMod:send(TargetSocket, Data);
359
++	       true ->
360
++		    NewShaper = Shaper
361
++	    end,
362
++	    transfer_data(SockOpts, TargetSockOpts, NewShaper);
363
++	{error, _} ->
364
++	    TargetSockMod:shutdown(TargetSocket, read_write)
365
++    end.
366
++
367
++get_socket(PID) ->
368
++    PID ! {get_socket, self()},
369
++    receive
370
++	{_SockMod, _Socket} = SockOpts ->
371
++	    SockOpts
372
++    end.
373
++
374
++%% If any argument is a jid record, convert it to normalized string form...
375
++activate(#jid{} = Initiator, Target, SessionID) ->
376
++    NormalizedInitiator = jlib:jid_to_string(jlib:make_jid(jlib:jid_tolower(Initiator))),
377
++    activate(NormalizedInitiator, Target, SessionID);
378
++activate(Initiator, #jid{} = Target, SessionID) ->
379
++    NormalizedTarget = jlib:jid_to_string(jlib:make_jid(jlib:jid_tolower(Target))),
380
++    activate(Initiator, NormalizedTarget, SessionID);
381
++%% ...and get on with the activation.
382
++activate(Initiator, Target, SessionID) ->
383
++    Cookie = sha:sha(SessionID ++ Initiator ++ Target),
384
++    F = fun() ->
385
++		case mnesia:read({proxy65_connection, Cookie}) of
386
++		    [#proxy65_connection{firstpid = FirstPID,
387
++					 secondpid = SecondPID}]
388
++		    when is_pid(FirstPID), is_pid(SecondPID) ->
389
++			mnesia:delete({proxy65_connection, Cookie}),
390
++			{FirstPID, SecondPID};
391
++		    _ ->
392
++			error
393
++		end
394
++	end,
395
++    case mnesia:transaction(F) of
396
++	{atomic, {FirstPID, SecondPID}} ->
397
++	    FirstSocket = get_socket(FirstPID),
398
++	    SecondSocket = get_socket(SecondPID),
399
++	    FirstPID ! {activate, SecondSocket, Initiator, Target},
400
++	    SecondPID ! {activate, FirstSocket, Initiator, Target},
401
++	    ok;
402
++	Error ->
403
++	    ?ERROR_MSG("Proxy activation failed: ~p", [Error]),
404
++	    error
405
++    end.
406
+
... ...
@@ -0,0 +1,17 @@
1
+# Copyright 1999-2005 Gentoo Foundation
2
+# Distributed under the terms of the GNU General Public License v2
3
+# $Header: $
4
+
5
+# Name of your ejabberd node. Used by ejabberdctl to determine which
6
+# node to communicate with. Default is "ejabberd@`hostname -s`".
7
+#EJABBERD_NODE="ejabberd@`hostname -s`"
8
+
9
+# Max number of open network connections. Default is 1024. Increasing
10
+# this will slightly increase memory usage.
11
+#ERL_MAX_PORTS=1024
12
+
13
+# Return memory to the system after using it, instead of keeping it
14
+# allocated for future use. Decreases the memory required by ejabberd,
15
+# but makes it run slower.  Default is unset, set to any value to
16
+# activate.
17
+#ERL_FULLSWEEP_AFTER=0
... ...
@@ -0,0 +1,60 @@
1
+#!/sbin/runscript
2
+# Copyright 1999-2005 Gentoo Foundation
3
+# Distributed under the terms of the GNU General Public License v2
4
+# $Header: $
5
+
6
+opts="${opts} reload"
7
+
8
+depend() {
9
+	use dns
10
+	need net
11
+	provide jabber-server
12
+}
13
+
14
+checkconfig() {
15
+	if [ ! -e /etc/jabber/ejabberd.cfg ] ; then
16
+		eerror "You need an /etc/jabber/ejabberd.cfg file to run ejabberd"
17
+		return 1
18
+	fi
19
+}
20
+
21
+start() {
22
+	checkconfig || return 1
23
+	ebegin "Starting eJabberd"
24
+	start-stop-daemon --start --quiet --chuid jabber:jabber \
25
+		--exec /usr/bin/env HOME=/var/run/jabber /usr/bin/ejabberd -- -noshell -detached
26
+	eend $?
27
+}
28
+
29
+stop() {
30
+	ebegin "Stopping eJabberd"
31
+	if [ -z "$EJABBERD_NODE" ];
32
+	then
33
+		EJABBERD_NODE="ejabberd@`hostname -s`"
34
+	fi
35
+	/usr/bin/ejabberdctl $EJABBERD_NODE stop
36
+	eend $?
37
+}
38
+
39
+# Work around a bug in /sbin/runscript.sh - it won't run our custom
40
+# restart() unless it finds these two strings in the file.
41
+# svc_start svc_stop
42
+restart() {
43
+	ebegin "Restarting eJabberd"
44
+	if [ -z "$EJABBERD_NODE" ];
45
+	then
46
+		EJABBERD_NODE="ejabberd@`hostname -s`"
47
+	fi
48
+	/usr/bin/ejabberdctl $EJABBERD_NODE restart
49
+	eend $?
50
+}
51
+
52
+reload() {
53
+	ebegin "Reloading eJabberd"
54
+	if [ -z "$EJABBERD_NODE" ];
55
+	then
56
+		EJABBERD_NODE="ejabberd@`hostname -s`"
57
+	fi
58
+	/usr/bin/ejabberdctl $EJABBERD_NODE reopen-log
59
+	eend $?
60
+}
... ...
@@ -0,0 +1,934 @@
1
+Index: src/ejabberd.cfg.example
2
+===================================================================
3
+--- src/ejabberd.cfg.example	(Revision 565)
4
++++ src/ejabberd.cfg.example	(Arbeitskopie)
5
+@@ -124,7 +124,7 @@
6
+   {5269, ejabberd_s2s_in,  [{shaper, s2s_shaper},
7
+ 			    {max_stanza_size, 131072}
8
+ 			   ]},
9
+-  {5280, ejabberd_http,    [http_poll, web_admin]},
10
++  {5280, ejabberd_http,    [http_poll, http_bind, web_admin]},
11
+   {8888, ejabberd_service, [{access, all},
12
+ 			    {hosts, ["icq.localhost", "sms.localhost"],
13
+ 			     [{password, "secret"}]}]}
14
+Index: src/web/Makefile.in
15
+===================================================================
16
+--- src/web/Makefile.in	(Revision 565)
17
++++ src/web/Makefile.in	(Arbeitskopie)
18
+@@ -15,7 +15,8 @@
19
+ 	$(OUTDIR)/ejabberd_http.beam \
20
+ 	$(OUTDIR)/ejabberd_web.beam  \
21
+ 	$(OUTDIR)/ejabberd_web_admin.beam  \
22
+-	$(OUTDIR)/ejabberd_http_poll.beam
23
++	$(OUTDIR)/ejabberd_http_poll.beam \
24
++	$(OUTDIR)/ejabberd_http_bind.beam
25
+ 
26
+ all:    $(OBJS)
27
+ 
28
+Index: src/web/ejabberd_http_bind.erl
29
+===================================================================
30
+--- src/web/ejabberd_http_bind.erl	(Revision 0)
31
++++ src/web/ejabberd_http_bind.erl	(Revision 0)
32
+@@ -0,0 +1,731 @@
33
++%%%----------------------------------------------------------------------
34
++%%% File    : ejabberd_http_bind.erl
35
++%%% Author  : Stefan Strigler <steve@zeank.in-berlin.de>
36
++%%% Purpose : HTTP Binding support (JEP-0124)
37
++%%% Created : 21 Sep 2005 by Stefan Strigler <steve@zeank.in-berlin.de>
38
++%%% Id      : $Id: ejabberd_http_bind.erl,v 1.2 2006/01/16 10:47:50 zeank Exp $
39
++%%%----------------------------------------------------------------------
40
++
41
++-module(ejabberd_http_bind).
42
++-author('steve@zeank.in-berlin.de').
43
++-vsn('Revision: 1.3').
44
++
45
++-behaviour(gen_fsm).
46
++
47
++%% External exports
48
++-export([start_link/2,
49
++	 init/1,
50
++	 handle_event/3,
51
++	 handle_sync_event/4,
52
++	 code_change/4,
53
++	 handle_info/3,
54
++	 terminate/3,
55
++	 send/2,
56
++	 setopts/2,
57
++	 controlling_process/2,
58
++	 close/1,
59
++	 process_request/1]).
60
++
61
++%%-define(ejabberd_debug, true).
62
++
63
++-include("ejabberd.hrl").
64
++-include("jlib.hrl").
65
++-include("ejabberd_http.hrl").
66
++
67
++-record(http_bind, {id, pid, hold, wait}).
68
++
69
++%% http binding request
70
++-record(hbr, {rid,
71
++	      key,
72
++	      in,
73
++	      out}).
74
++
75
++-record(state, {id,
76
++		rid = error,
77
++		key,
78
++		output = "",
79
++		input = "",
80
++		waiting_input = false,
81
++		last_receiver,
82
++		last_poll,
83
++		ctime = 0,
84
++		timer,
85
++		req_list = [] % list of requests
86
++	       }).
87
++
88
++
89
++%-define(DBGFSM, true).
90
++
91
++-ifdef(DBGFSM).
92
++-define(FSMOPTS, [{debug, [trace]}]).
93
++-else.
94
++-define(FSMOPTS, []).
95
++-endif.
96
++
97
++-define(MAX_REQUESTS, 2).  % number of simultaneous requests
98
++-define(MIN_POLLING, "2"). % don't poll faster than that or we will shoot you
99
++-define(MAX_WAIT, 60).     % max num of secs to keep a request on hold
100
++-define(MAX_INACTIVITY, 30000). % msecs to wait before terminating idle sessions
101
++-define(CT, {"Content-Type", "text/xml; charset=utf-8"}).
102
++-define(BAD_REQUEST, ?CT).
103
++
104
++
105
++%%%----------------------------------------------------------------------
106
++%%% API
107
++%%%----------------------------------------------------------------------
108
++start(ID, Key) ->
109
++    mnesia:create_table(http_bind,
110
++        		[{ram_copies, [node()]},
111
++        		 {attributes, record_info(fields, http_bind)}]),
112
++    supervisor:start_child(ejabberd_http_bind_sup, [ID, Key]).
113
++
114
++start_link(ID, Key) ->
115
++    gen_fsm:start_link(?MODULE, [ID, Key], ?FSMOPTS).
116
++
117
++send({http_bind, FsmRef}, Packet) ->
118
++    gen_fsm:sync_send_all_state_event(FsmRef, {send, Packet}).
119
++
120
++setopts({http_bind, FsmRef}, Opts) ->
121
++    case lists:member({active, once}, Opts) of
122
++	true ->
123
++	    gen_fsm:sync_send_all_state_event(FsmRef, activate);
124
++	_ ->
125
++	    ok
126
++    end.
127
++
128
++controlling_process(_Socket, _Pid) ->
129
++    ok.
130
++
131
++close({http_bind, FsmRef}) ->
132
++    catch gen_fsm:sync_send_all_state_event(FsmRef, close).
133
++
134
++
135
++process_request(#request{path = [],
136
++			 data = Data}) ->
137
++    case catch parse_request(Data) of
138
++	{ok, ID1, RID, Key, NewKey, Attrs, Packet} ->
139
++	    XmppDomain = xml:get_attr_s("to",Attrs),
140
++	    if 
141
++		(ID1 == "") and (XmppDomain == "") ->
142
++		    {200, [?CT], "<body type='terminate' "
143
++		     "condition='improper-addressing' "
144
++		     "xmlns='http://jabber.org/protocol/httpbind'/>"};
145
++		true ->
146
++	    ID = if
147
++		     (ID1 == "") ->
148
++			 %% create new session
149
++			 NewID = sha:sha(term_to_binary({now(), make_ref()})),
150
++			 {ok, Pid} = start(NewID, Key),
151
++			 Wait = case
152
++				    string:to_integer(xml:get_attr_s("wait",Attrs))
153
++				    of
154
++				    {error, _} ->
155
++					?MAX_WAIT;
156
++				    {CWait, _} ->
157
++					if 
158
++					    (CWait > ?MAX_WAIT) ->
159
++						?MAX_WAIT;
160
++					    true ->
161
++						CWait
162
++					end
163
++				end,
164
++			 Hold = case
165
++				    string:to_integer(
166
++				      xml:get_attr_s("hold",Attrs))
167
++				    of
168
++				    {error, _} ->
169
++					(?MAX_REQUESTS - 1);
170
++				    {CHold, _} ->
171
++					if 
172
++					    (CHold > (?MAX_REQUESTS - 1)) ->
173
++						(?MAX_REQUESTS - 1);
174
++					    true ->
175
++						CHold
176
++					end
177
++				end,
178
++			 mnesia:transaction(
179
++			   fun() ->
180
++				   mnesia:write(#http_bind{id = NewID,
181
++							   pid = Pid,
182
++							   wait = Wait,
183
++							   hold = Hold})
184
++			   end),
185
++			 InPacket = if
186
++					(XmppDomain /= "") ->
187
++					    ["<stream:stream to='",
188
++					     XmppDomain, 
189
++					     "' xmlns='jabber:client' "
190
++					     "xmlns:stream='http://etherx.jabber.org/streams'>"];
191
++					true ->
192
++					    ""
193
++				    end,
194
++			 NewID;
195
++		     true ->
196
++			 %% old session
197
++			 Type = xml:get_attr_s("type",Attrs),
198
++			 Wait = ?MAX_WAIT,
199
++			 Hold = (?MAX_REQUESTS - 1),
200
++			 if 
201
++			     (Type == "terminate") ->
202
++				 %% terminate session
203
++				 InPacket = Packet ++ "</stream:stream>";
204
++			     true ->
205
++				 InPacket = Packet
206
++			 end,
207
++			 ID1
208
++		 end,
209
++%%		    ?DEBUG("~n InPacket: ~s ~n", [InPacket]),
210
++	    case http_put(ID, RID, Key, NewKey, Hold, InPacket) of
211
++		{error, not_exists} ->
212
++		    ?DEBUG("no session associated with sid: ~p", [ID]),
213
++		    {404, [?BAD_REQUEST], ""};
214
++		{error, bad_key} ->
215
++		    ?DEBUG("bad key: ~s", Key),
216
++		    case mnesia:dirty_read({http_bind, ID}) of
217
++			[] ->
218
++			    {404, [?BAD_REQUEST], ""};
219
++			[#http_bind{pid = FsmRef}] ->
220
++			    gen_fsm:sync_send_all_state_event(FsmRef,stop),
221
++			    {404, [?BAD_REQUEST], ""}		    
222
++		    end;
223
++		{error, polling_too_frequently} ->
224
++		    ?DEBUG("polling too frequently: ~p", [ID]),
225
++		    case mnesia:dirty_read({http_bind, ID}) of
226
++			[] -> %% unlikely! (?)
227
++			    {404, [?BAD_REQUEST], ""};
228
++			[#http_bind{pid = FsmRef}] ->
229
++			    gen_fsm:sync_send_all_state_event(FsmRef,stop),
230
++			    {403, [?BAD_REQUEST], ""}		    
231
++		    end;
232
++		{repeat, OutPacket} ->
233
++		    ?DEBUG("http_put said 'repeat!' ...~nOutPacket: ~p", 
234
++			   [OutPacket]),
235
++		    send_outpacket(ID, OutPacket);
236
++		ok ->
237
++		    receive_loop(ID,ID1,RID,Wait,Hold,Attrs)
238
++	    end
239
++	    end;
240
++	_ ->
241
++	    {400, [?BAD_REQUEST], ""}
242
++    end;
243
++process_request(_Request) ->
244
++    {400, [], {xmlelement, "h1", [],
245
++	       [{xmlcdata, "400 Bad Request"}]}}.
246
++
247
++receive_loop(ID,ID1,RID,Wait,Hold,Attrs) ->
248
++    receive
249
++	after 100 -> ok
250
++	end,
251
++    prepare_response(ID,ID1,RID,Wait,Hold,Attrs).
252
++
253
++prepare_response(ID,ID1,RID,Wait,Hold,Attrs) ->
254
++    case http_get(ID,RID) of
255
++	{error, not_exists} ->
256
++            ?DEBUG("no session associated with sid: ~s", ID),
257
++	    {404, [?BAD_REQUEST], ""};
258
++	{ok, keep_on_hold} ->
259
++	    receive_loop(ID,ID1,RID,Wait,Hold,Attrs);
260
++	{ok, cancel} ->
261
++	    %% actually it would be better if we could completely
262
++	    %% cancel this request, but then we would have to hack
263
++	    %% ejabberd_http and I'm too lazy now
264
++	    {404, [?BAD_REQUEST], ""}; 
265
++	{ok, OutPacket} ->
266
++            ?DEBUG("OutPacket: ~s", [OutPacket]),
267
++	    if
268
++		ID == ID1 ->
269
++		    send_outpacket(ID, OutPacket);
270
++		true ->
271
++		    To = xml:get_attr_s("to",Attrs),
272
++		    case xml_stream:parse_element(
273
++			   OutPacket++"</stream:stream>") of
274
++			El when element(1, El) == xmlelement ->
275
++			    {xmlelement, _, OutAttrs, _} = El,
276
++			    AuthID = xml:get_attr_s("id", OutAttrs),
277
++			    StreamError = false;
278
++			{error, _} ->
279
++			    AuthID = "",
280
++			    StreamError = true
281
++		    end,
282
++		    if
283
++			To == "" ->
284
++			    {200, [?CT], "<body type='terminate' "
285
++			     "condition='improper-addressing' "
286
++			     "xmlns='http://jabber.org/protocol/httpbind'/>"};
287
++			StreamError == true ->
288
++			    {200, [?CT], "<body type='terminate' "
289
++			     "condition='host-unknown' "
290
++			     "xmlns='http://jabber.org/protocol/httpbind'/>"};
291
++			true ->
292
++			    {200, [?CT],
293
++			     xml:element_to_string(
294
++			       {xmlelement,"body",
295
++				[{"xmlns",
296
++				  "http://jabber.org/protocol/httpbind"},
297
++				 {"sid",ID},
298
++				 {"wait", integer_to_list(Wait)},
299
++				 {"requests", integer_to_list(Hold+1)},
300
++				 {"inactivity", 
301
++				  integer_to_list(trunc(?MAX_INACTIVITY/1000))},
302
++				 {"polling", ?MIN_POLLING},
303
++				 {"authid", AuthID}
304
++				],[]})}
305
++		    end
306
++	    end
307
++    end.
308
++    
309
++send_outpacket(ID, OutPacket) ->
310
++    case OutPacket of
311
++	"" ->
312
++	    {200, [?CT], "<body xmlns='http://jabber.org/protocol/httpbind'/>"};
313
++	"</stream:stream>" ->
314
++	    case mnesia:dirty_read({http_bind, ID}) of
315
++		[#http_bind{pid = FsmRef}] ->
316
++		    gen_fsm:sync_send_all_state_event(FsmRef,stop)
317
++	    end,
318
++	    {200, [?CT], "<body xmlns='http://jabber.org/protocol/httpbind'/>"};
319
++	_ ->
320
++	    case xml_stream:parse_element("<body>" 
321
++					  ++ OutPacket
322
++					  ++ "</body>") 
323
++		of
324
++		El when element(1, El) == xmlelement ->
325
++		    {xmlelement, _, _, OEls} = El,
326
++		    TypedEls = [xml:replace_tag_attr("xmlns",
327
++						     "jabber:client",OEl) ||
328
++				   OEl <- OEls],
329
++		    ?DEBUG(" --- outgoing data --- ~n~s~n --- END --- ~n",
330
++			   [xml:element_to_string(
331
++			      {xmlelement,"body",
332
++			       [{"xmlns",
333
++				 "http://jabber.org/protocol/httpbind"}],
334
++			       TypedEls})]
335
++			  ),
336
++		    {200, [?CT],
337
++		     xml:element_to_string(
338
++		       {xmlelement,"body",
339
++			[{"xmlns",
340
++			  "http://jabber.org/protocol/httpbind"}],
341
++			TypedEls})};
342
++		{error, _E} ->
343
++                    ?DEBUG("parse error: ~p", [_E]),
344
++                    StreamErrCond = case xml_stream:parse_element(
345
++					   "<stream:stream>"++OutPacket) of
346
++                                        El when element(1, El) == xmlelement ->
347
++                                            {xmlelement, _Tag, _Attr, Els} = El,
348
++                                            [{xmlelement, SE, _, Cond} | _] = Els,
349
++                                            if 
350
++                                                SE == "stream:error" ->
351
++                                                    Cond;
352
++                                                true ->
353
++                                                    null
354
++                                            end;
355
++                                        {error, _E} ->
356
++                                            null
357
++                                    end,
358
++		    case mnesia:dirty_read({http_bind, ID}) of
359
++			[#http_bind{pid = FsmRef}] ->
360
++			    gen_fsm:sync_send_all_state_event(FsmRef,stop);
361
++                        _ ->
362
++                            err %% hu?
363
++		    end,
364
++                    case StreamErrCond of
365
++                        null ->
366
++                            {200, [?CT],
367
++                             "<body type='terminate' "
368
++			     "condition='internal-server-error' "
369
++			     "xmlns='http://jabber.org/protocol/httpbind'/>"};
370
++                        _ ->
371
++                            {200, [?CT],
372
++                             "<body type='terminate' "
373
++                             "condition='remote-stream-error' "
374
++                             "xmlns='http://jabber.org/protocol/httpbind'>" ++
375
++                             elements_to_string(StreamErrCond) ++
376
++                             "</body>"}
377
++                    end
378
++	    end
379
++    end.
380
++
381
++%%%----------------------------------------------------------------------
382
++%%% Callback functions from gen_fsm
383
++%%%----------------------------------------------------------------------
384
++
385
++%%----------------------------------------------------------------------
386
++%% Func: init/1
387
++%% Returns: {ok, StateName, StateData}          |
388
++%%          {ok, StateName, StateData, Timeout} |
389
++%%          ignore                              |
390
++%%          {stop, StopReason}                   
391
++%%----------------------------------------------------------------------
392
++init([ID, Key]) ->
393
++    ?INFO_MSG("started: ~p", [{ID, Key}]),
394
++    Opts = [], % TODO
395
++    {ok, C2SPid} = ejabberd_c2s:start({?MODULE, {http_bind, self()}}, Opts),
396
++    ejabberd_c2s:become_controller(C2SPid),
397
++    Timer = erlang:start_timer(?MAX_INACTIVITY, self(), []),
398
++    {ok, loop, #state{id = ID,
399
++		      key = Key,
400
++		      timer = Timer}}.
401
++
402
++%%----------------------------------------------------------------------
403
++%% Func: StateName/2
404
++%% Returns: {next_state, NextStateName, NextStateData}          |
405
++%%          {next_state, NextStateName, NextStateData, Timeout} |
406
++%%          {stop, Reason, NewStateData}                         
407
++%%----------------------------------------------------------------------
408
++
409
++
410
++%%----------------------------------------------------------------------
411
++%% Func: StateName/3
412
++%% Returns: {next_state, NextStateName, NextStateData}            |
413
++%%          {next_state, NextStateName, NextStateData, Timeout}   |
414
++%%          {reply, Reply, NextStateName, NextStateData}          |
415
++%%          {reply, Reply, NextStateName, NextStateData, Timeout} |
416
++%%          {stop, Reason, NewStateData}                          |
417
++%%          {stop, Reason, Reply, NewStateData}                    
418
++%%----------------------------------------------------------------------
419
++%state_name(Event, From, StateData) ->
420
++%    Reply = ok,
421
++%    {reply, Reply, state_name, StateData}.
422
++
423
++%%----------------------------------------------------------------------
424
++%% Func: handle_event/3
425
++%% Returns: {next_state, NextStateName, NextStateData}          |
426
++%%          {next_state, NextStateName, NextStateData, Timeout} |
427
++%%          {stop, Reason, NewStateData}                         
428
++%%----------------------------------------------------------------------
429
++handle_event(_Event, StateName, StateData) ->
430
++    {next_state, StateName, StateData}.
431
++
432
++%%----------------------------------------------------------------------
433
++%% Func: handle_sync_event/4
434
++%% Returns: {next_state, NextStateName, NextStateData}            |
435
++%%          {next_state, NextStateName, NextStateData, Timeout}   |
436
++%%          {reply, Reply, NextStateName, NextStateData}          |
437
++%%          {reply, Reply, NextStateName, NextStateData, Timeout} |
438
++%%          {stop, Reason, NewStateData}                          |
439
++%%          {stop, Reason, Reply, NewStateData}                    
440
++%%----------------------------------------------------------------------
441
++handle_sync_event({send, Packet}, _From, StateName, StateData) ->
442
++    Output = [StateData#state.output | Packet],
443
++    Reply = ok,
444
++    {reply, Reply, StateName, StateData#state{output = Output}};
445
++
446
++handle_sync_event(activate, From, StateName, StateData) ->
447
++    case StateData#state.input of
448
++	"" ->
449
++	    {reply, ok, StateName, StateData#state{
450
++				     waiting_input = From}};
451
++	Input ->
452
++	    From ! {tcp, {http_bind, self()}, list_to_binary(Input)},
453
++	    {reply, ok, StateName, StateData#state{
454
++				     input = "",
455
++				     waiting_input = false,
456
++				     last_receiver = From}}
457
++    end;
458
++
459
++handle_sync_event(stop, _From, _StateName, StateData) ->
460
++    Reply = ok,
461
++    {stop, normal, Reply, StateData};
462
++
463
++handle_sync_event({http_put, RID, Key, NewKey, Hold, Packet},
464
++		  _From, StateName, StateData) ->
465
++    %% check if RID valid
466
++    RidAllow = case RID of
467
++		   error -> 
468
++		       false;
469
++		   _ ->
470
++		       case StateData#state.rid of
471
++			   error -> 
472
++			       %% first request - nothing saved so far
473
++			       true;
474
++			   OldRID ->
475
++			       ?DEBUG("state.rid/cur rid: ~p/~p", 
476
++				      [OldRID, RID]),
477
++			       if 
478
++				   (OldRID < RID) and 
479
++				   (RID =< (OldRID + Hold + 1)) ->
480
++				       true;
481
++				   (RID =< OldRID) and 
482
++				   (RID > OldRID - Hold - 1) ->
483
++				       repeat;
484
++				   true ->
485
++				       false
486
++			       end
487
++		       end
488
++	       end,
489
++    %% check if key valid
490
++    KeyAllow = case RidAllow of
491
++		   repeat -> 
492
++		       true;
493
++		   false ->
494
++		       false;
495
++		   true ->
496
++		       case StateData#state.key of
497
++			   "" ->
498
++			       true;
499
++			   OldKey ->
500
++			       NextKey = httpd_util:to_lower(
501
++					   hex(binary_to_list(
502
++						 crypto:sha(Key)))),
503
++			       ?DEBUG("Key/OldKey/NextKey: ~s/~s/~s", 
504
++				      [Key, OldKey, NextKey]),
505
++			       if
506
++				   OldKey == NextKey ->
507
++				       true;
508
++				   true ->
509
++				       ?DEBUG("wrong key: ~s",[Key]),
510
++				       false
511
++			       end
512
++		       end
513
++	       end,
514
++    {_,TSec,TMSec} = now(),
515
++    TNow = TSec*1000*1000 + TMSec,
516
++    LastPoll = if 
517
++		   Packet == "" ->
518
++		       TNow;
519
++		   true ->
520
++		       0
521
++	       end,
522
++    {MinPoll, _} = string:to_integer(?MIN_POLLING),
523
++    if
524
++	(Packet == "") and 
525
++	(TNow - StateData#state.last_poll < MinPoll*1000*1000) ->
526
++	    Reply = {error, polling_too_frequently},
527
++	    {reply, Reply, StateName, StateData};
528
++	KeyAllow ->
529
++	    case RidAllow of
530
++		false ->
531
++		    Reply = {error, not_exists},
532
++		    {reply, Reply, StateName, StateData};
533
++		repeat ->
534
++		    ?DEBUG("REPEATING ~p", [RID]),
535
++		    [Out | _XS] = [El#hbr.out || 
536
++				      El <- StateData#state.req_list, 
537
++				      El#hbr.rid == RID],
538
++		    case Out of 
539
++			[[] | OutPacket] ->
540
++			    Reply = {repeat, OutPacket};
541
++			_ ->
542
++			    Reply = {repeat, Out}
543
++		    end,
544
++		    {reply, Reply, StateName, 
545
++		     StateData#state{input = "cancel", last_poll = LastPoll}};
546
++		true ->
547
++		    SaveKey = if 
548
++				  NewKey == "" ->
549
++				      Key;
550
++				  true ->
551
++				      NewKey
552
++			      end,
553
++		    ?DEBUG(" -- SaveKey: ~s~n", [SaveKey]),
554
++
555
++		    %% save request
556
++		    ReqList = [#hbr{rid=RID,
557
++				    key=StateData#state.key,
558
++				    in=StateData#state.input,
559
++				    out=StateData#state.output
560
++				   } | 
561
++			       [El || El <- StateData#state.req_list, 
562
++				      El#hbr.rid < RID, 
563
++				      El#hbr.rid > (RID - 1 - Hold)]
564
++			      ],
565
++%%		    ?DEBUG("reqlist: ~p", [ReqList]),
566
++		    case StateData#state.waiting_input of
567
++			false ->
568
++			    cancel_timer(StateData#state.timer),
569
++			    Timer = erlang:start_timer(
570
++				      ?MAX_INACTIVITY, self(), []),
571
++			    Input = Packet ++ [StateData#state.input],
572
++			    Reply = ok,
573
++			    {reply, Reply, StateName, 
574
++			     StateData#state{input = Input,
575
++					     rid = RID,
576
++					     key = SaveKey,
577
++					     ctime = TNow,
578
++					     timer = Timer,
579
++					     last_poll = LastPoll,
580
++					     req_list = ReqList
581
++					    }};
582
++			{Receiver, _Tag} ->
583
++			    Receiver ! {tcp, {http_bind, self()},
584
++					list_to_binary(Packet)},
585
++			    cancel_timer(StateData#state.timer),
586
++			    Timer = erlang:start_timer(
587
++				      ?MAX_INACTIVITY, self(), []),
588
++			    Reply = ok,
589
++			    {reply, Reply, StateName,
590
++			     StateData#state{waiting_input = false,
591
++					     last_receiver = Receiver,
592
++					     input = "",
593
++					     rid = RID,
594
++					     key = SaveKey,
595
++					     ctime = TNow,
596
++					     timer = Timer,
597
++					     last_poll = LastPoll,
598
++					     req_list = ReqList
599
++					    }}
600
++		    end
601
++	    end;
602
++	true ->
603
++	    Reply = {error, bad_key},
604
++	    {reply, Reply, StateName, StateData}
605
++    end;
606
++
607
++handle_sync_event({http_get, RID, Wait, Hold}, _From, StateName, StateData) ->
608
++    {_,TSec,TMSec} = now(),
609
++    TNow = TSec*1000*1000 + TMSec,
610
++    cancel_timer(StateData#state.timer),
611
++    Timer = erlang:start_timer(?MAX_INACTIVITY, self(), []),
612
++    if 
613
++	(Hold > 0) and 
614
++	(StateData#state.output == "") and 
615
++	((TNow - StateData#state.ctime) < (Wait*1000*1000)) and 
616
++	(StateData#state.rid == RID) and 
617
++	(StateData#state.input /= "cancel") ->
618
++	    Output = StateData#state.output,
619
++	    ReqList = StateData#state.req_list,
620
++	    Reply = {ok, keep_on_hold};
621
++	(StateData#state.input == "cancel") ->
622
++	    Output = StateData#state.output,
623
++	    ReqList = StateData#state.req_list,
624
++	    Reply = {ok, cancel};
625
++	true ->
626
++	    case StateData#state.output of
627
++		[[]| OutPacket] ->
628
++		    Reply = {ok, OutPacket};
629
++		_ ->
630
++		    Reply = {ok, StateData#state.output}
631
++	    end,
632
++	    %% save request
633
++	    ReqList = [#hbr{rid=RID,
634
++			    key=StateData#state.key,
635
++			    in=StateData#state.input,
636
++			    out=StateData#state.output
637
++			   } | 
638
++		       [El || El <- StateData#state.req_list, 
639
++			      El#hbr.rid /= RID ] 
640
++		      ],
641
++	    Output = ""
642
++    end,
643
++    {reply, Reply, StateName, StateData#state{
644
++				input = "",
645
++				output = Output, 
646
++				timer = Timer,
647
++				req_list = ReqList}};
648
++
649
++handle_sync_event(_Event, _From, StateName, StateData) ->
650
++    Reply = ok,
651
++    {reply, Reply, StateName, StateData}.
652
++
653
++code_change(_OldVsn, StateName, StateData, _Extra) ->
654
++    {ok, StateName, StateData}.
655
++
656
++%%----------------------------------------------------------------------
657
++%% Func: handle_info/3
658
++%% Returns: {next_state, NextStateName, NextStateData}          |
659
++%%          {next_state, NextStateName, NextStateData, Timeout} |
660
++%%          {stop, Reason, NewStateData}                         
661
++%%----------------------------------------------------------------------
662
++handle_info({timeout, Timer, _}, _StateName,
663
++	    #state{timer = Timer} = StateData) ->
664
++    ?DEBUG("ding dong", []),
665
++    {stop, normal, StateData};
666
++
667
++handle_info(_, StateName, StateData) ->
668
++    {next_state, StateName, StateData}.
669
++
670
++%%----------------------------------------------------------------------
671
++%% Func: terminate/3
672
++%% Purpose: Shutdown the fsm
673
++%% Returns: any
674
++%%----------------------------------------------------------------------
675
++terminate(_Reason, _StateName, StateData) ->
676
++    ?DEBUG("terminate: deleting session ~s", [StateData#state.id]),
677
++    mnesia:transaction(
678
++      fun() ->
679
++	      mnesia:delete({http_bind, StateData#state.id})
680
++      end),
681
++    case StateData#state.waiting_input of
682
++	false ->
683
++	    case StateData#state.last_receiver of
684
++		undefined -> ok;
685
++		Receiver -> Receiver ! {tcp_closed, {http_bind, self()}}
686
++	    end;
687
++	{Receiver, _Tag} -> Receiver ! {tcp_closed, {http_bind, self()}}
688
++    end,
689
++    ok.
690
++
691
++%%%----------------------------------------------------------------------
692
++%%% Internal functions
693
++%%%----------------------------------------------------------------------
694
++
695
++
696
++http_put(ID, RID, Key, NewKey, Hold, Packet) ->
697
++    case mnesia:dirty_read({http_bind, ID}) of
698
++	[] ->
699
++	    {error, not_exists};
700
++	[#http_bind{pid = FsmRef}] ->
701
++	    gen_fsm:sync_send_all_state_event(
702
++	      FsmRef, {http_put, RID, Key, NewKey, Hold, Packet})
703
++    end.
704
++
705
++http_get(ID,RID) ->
706
++    case mnesia:dirty_read({http_bind, ID}) of
707
++	[] ->
708
++	    {error, not_exists};
709
++	[#http_bind{pid = FsmRef, wait = Wait, hold = Hold}] ->
710
++	    gen_fsm:sync_send_all_state_event(FsmRef, 
711
++					      {http_get, RID, Wait, Hold})
712
++    end.
713
++
714
++
715
++parse_request(Data) ->
716
++    ?DEBUG("--- incoming data --- ~n~s~n --- END --- ",
717
++	   [Data]),
718
++    case xml_stream:parse_element(Data) of
719
++	El when element(1, El) == xmlelement ->
720
++	    {xmlelement, Name, Attrs, Els} = El,
721
++	    ID = xml:get_attr_s("sid",Attrs),
722
++	    {RID,_X} = string:to_integer(xml:get_attr_s("rid",Attrs)),
723
++	    Key = xml:get_attr_s("key",Attrs),
724
++	    NewKey = xml:get_attr_s("newkey",Attrs),
725
++	    Xmlns = xml:get_attr_s("xmlns",Attrs),
726
++	    Packet = [xml:element_to_string(
727
++			xml:remove_tag_attr("xmlns",E)) || 
728
++			 E <- Els],
729
++	    if 
730
++		Name /= "body" -> 
731
++		    {error, bad_request};
732
++		Xmlns /= "http://jabber.org/protocol/httpbind" ->
733
++		    {error, bad_request};
734
++		true ->
735
++		    {ok, ID, RID, Key, NewKey, Attrs, Packet}
736
++	    end;
737
++	{error, _Reason} ->
738
++	    {error, bad_request}
739
++    end.
740
++
741
++cancel_timer(Timer) ->
742
++    erlang:cancel_timer(Timer),
743
++    receive
744
++	{timeout, Timer, _} ->
745
++	    ok
746
++    after 0 ->
747
++	    ok
748
++    end.
749
++
750
++hex(Bin) when binary(Bin) -> hex(binary_to_list(Bin));
751
++hex([]) -> "";
752
++hex([H|T]) -> 
753
++	[A,B] = if 
754
++		H == 0 -> "00";
755
++		H < 16 -> [$0,element(H,{$1,$2,$3,$4,$5,$6,$7,$8,$9,$a,$b,$c,$d,$e,$f})];
756
++		true   -> erlang:integer_to_list(H,16)
757
++	end,
758
++	[A,B|hex(T)].
759
++
760
++elements_to_string([]) ->
761
++    [];
762
++elements_to_string([El | Els]) ->
763
++    xml:element_to_string(El) ++ elements_to_string(Els).
764
+Index: src/web/ejabberd_web.erl
765
+===================================================================
766
+--- src/web/ejabberd_web.erl	(Revision 565)
767
++++ src/web/ejabberd_web.erl	(Arbeitskopie)
768
+@@ -49,7 +49,7 @@
769
+ 		      {"value", Value}])).
770
+ 
771
+ 
772
+-process_get({_, true},
773
++process_get({_, _, true},
774
+ 	    #request{auth = Auth,
775
+ 		     path = ["admin", "server", SHost | RPath],
776
+ 		     q = Query,
777
+@@ -94,7 +94,7 @@
778
+ 	    {404, [], make_xhtml([?XC("h1", "Not found")])}
779
+     end;
780
+ 
781
+-process_get({_, true},
782
++process_get({_, _, true},
783
+ 	    #request{auth = Auth,
784
+ 		     path = ["admin" | RPath],
785
+ 		     q = Query,
786
+@@ -133,12 +133,19 @@
787
+ 				       [{xmlcdata, "401 Unauthorized"}]}])}
788
+     end;
789
+ 
790
+-process_get({true, _},
791
++process_get({true, _, _},
792
+ 	    #request{path = ["http-poll" | RPath],
793
+ 		     q = _Query,
794
+ 		     lang = _Lang} = Request) ->
795
+     ejabberd_http_poll:process_request(Request#request{path = RPath});
796
+ 
797
++process_get({_, true, _},
798
++	    #request{us = _US,
799
++		     path = ["http-bind" | RPath],
800
++		     q = _Query,
801
++		     lang = _Lang} = Request) ->
802
++    ejabberd_http_bind:process_request(Request#request{path = RPath});
803
++
804
+ process_get(_, _Request) ->
805
+     {404, [], make_xhtml([?XC("h1", "Not found")])}.
806
+ 
807
+Index: src/web/ejabberd_http.erl
808
+===================================================================
809
+--- src/web/ejabberd_http.erl	(Revision 565)
810
++++ src/web/ejabberd_http.erl	(Arbeitskopie)
811
+@@ -30,6 +30,7 @@
812
+ 		request_keepalive,
813
+ 		request_content_length,
814
+ 		request_lang = "en",
815
++		use_http_bind = false,
816
+ 		use_http_poll = false,
817
+ 		use_web_admin = false,
818
+ 		end_of_request = false,
819
+@@ -70,15 +71,17 @@
820
+ 	_ ->
821
+ 	    ok
822
+     end,
823
++    UseHTTPBind = lists:member(http_bind, Opts),
824
+     UseHTTPPoll = lists:member(http_poll, Opts),
825
+     UseWebAdmin = lists:member(web_admin, Opts),
826
+-    ?DEBUG("S: ~p~n", [{UseHTTPPoll, UseWebAdmin}]),
827
++    ?DEBUG("S: ~p~n", [{UseHTTPPoll, UseHTTPBind, UseWebAdmin}]),
828
+     ?INFO_MSG("started: ~p", [{SockMod1, Socket1}]),
829
+     {ok, proc_lib:spawn_link(ejabberd_http,
830
+ 			     receive_headers,
831
+ 			     [#state{sockmod = SockMod1,
832
+ 				     socket = Socket1,
833
+ 				     use_http_poll = UseHTTPPoll,
834
++				     use_http_bind = UseHTTPBind,
835
+ 				     use_web_admin = UseWebAdmin}])}.
836
+ 
837
+ 
838
+@@ -185,6 +188,7 @@
839
+ 		    #state{sockmod = SockMod,
840
+ 			   socket = Socket,
841
+ 			   use_http_poll = State#state.use_http_poll,
842
++			   use_http_bind = State#state.use_http_bind,
843
+ 			   use_web_admin = State#state.use_web_admin};
844
+ 		_ ->
845
+ 		    #state{end_of_request = true}
846
+@@ -200,6 +204,7 @@
847
+ 		       request_auth = Auth,
848
+ 		       request_lang = Lang,
849
+ 		       use_http_poll = UseHTTPPoll,
850
++		       use_http_bind = UseHTTPBind,
851
+ 		       use_web_admin = UseWebAdmin} = State) ->
852
+     case (catch url_decode_q_split(Path)) of
853
+ 	{'EXIT', _} ->
854
+@@ -217,7 +222,7 @@
855
+ 			       q = LQuery,
856
+ 			       auth = Auth,
857
+ 			       lang = Lang},
858
+-	    case ejabberd_web:process_get({UseHTTPPoll, UseWebAdmin},
859
++	    case ejabberd_web:process_get({UseHTTPPoll, UseHTTPBind, UseWebAdmin},
860
+ 					  Request) of
861
+ 		El when element(1, El) == xmlelement ->
862
+ 		    make_xhtml_output(State, 200, [], El);
863
+@@ -240,6 +245,7 @@
864
+ 		       sockmod = SockMod,
865
+ 		       socket = Socket,
866
+ 		       use_http_poll = UseHTTPPoll,
867
++		       use_http_bind = UseHTTPBind,
868
+ 		       use_web_admin = UseWebAdmin} = State)
869
+   when is_integer(Len) ->
870
+     case SockMod of
871
+@@ -267,7 +273,7 @@
872
+ 			       auth = Auth,
873
+ 			       data = Data,
874
+ 			       lang = Lang},
875
+-	    case ejabberd_web:process_get({UseHTTPPoll, UseWebAdmin},
876
++	    case ejabberd_web:process_get({UseHTTPPoll, UseHTTPBind, UseWebAdmin},
877
+ 					  Request) of
878
+ 		El when element(1, El) == xmlelement ->
879
+ 		    make_xhtml_output(State, 200, [], El);
880
+Index: src/xml.erl
881
+===================================================================
882
+--- src/xml.erl	(Revision 565)
883
++++ src/xml.erl	(Arbeitskopie)
884
+@@ -18,6 +18,7 @@
885
+ 	 get_tag_attr/2, get_tag_attr_s/2,
886
+ 	 get_subtag/2,
887
+ 	 get_path_s/2,
888
++	 remove_tag_attr/2,
889
+ 	 replace_tag_attr/3]).
890
+ 
891
+ %element_to_string(El) ->
892
+@@ -224,6 +225,14 @@
893
+ get_path_s(El, [cdata]) ->
894
+     get_tag_cdata(El).
895
+ 
896
++remove_tag_attr(Attr, El) ->
897
++    case El of
898
++        {xmlelement, Name, Attrs, Els} ->
899
++            Attrs1 = lists:keydelete(Attr, 1, Attrs),
900
++            {xmlelement, Name, Attrs1, Els};
901
++        _ ->
902
++            El
903
++    end.
904
+ 
905
+ replace_tag_attr(Attr, Value, {xmlelement, Name, Attrs, Els}) ->
906
+     Attrs1 = lists:keydelete(Attr, 1, Attrs),
907
+ 
908
+Index: src/ejabberd_sup.erl
909
+===================================================================
910
+--- src/ejabberd_sup.erl	(Revision 565)
911
++++ src/ejabberd_sup.erl	(Arbeitskopie)
912
+@@ -123,6 +123,14 @@
913
+ 	 infinity,
914
+ 	 supervisor,
915
+ 	 [ejabberd_tmp_sup]},
916
++    HTTPBindSupervisor =
917
++	{ejabberd_http_bind_sup,
918
++	 {ejabberd_tmp_sup, start_link,
919
++	  [ejabberd_http_bind_sup, ejabberd_http_bind]},
920
++	 permanent,
921
++	 infinity,
922
++	 supervisor,
923
++	 [ejabberd_tmp_sup]},
924
+     IQSupervisor =
925
+ 	{ejabberd_iq_sup,
926
+ 	 {ejabberd_tmp_sup, start_link,
927
+@@ -145,6 +153,7 @@
928
+ 	   ServiceSupervisor,
929
+ 	   HTTPSupervisor,
930
+ 	   HTTPPollSupervisor,
931
++	   HTTPBindSupervisor,
932
+ 	   IQSupervisor,
933
+ 	   Listener]}}.
934
+ 
... ...
@@ -0,0 +1,11 @@
1
+--- mod_irc/mod_irc.erl.orig	2006-11-19 14:40:02.463429250 +0100
2
++++ mod_irc/mod_irc.erl	2006-11-19 14:40:25.888893250 +0100
3
+@@ -27,7 +27,7 @@
4
+ -include("ejabberd.hrl").
5
+ -include("jlib.hrl").
6
+ 
7
+--define(DEFAULT_IRC_ENCODING, "koi8-r").
8
++-define(DEFAULT_IRC_ENCODING, "utf-8").
9
+ 
10
+ -record(irc_connection, {jid_server_host, pid}).
11
+ -record(irc_custom, {us_host, data}).
... ...
@@ -0,0 +1,11 @@
1
+diff -Naur ejabberd-1.1.1.orig/src/odbc/ejabberd_odbc.erl ejabberd-1.1.1/src/odbc/ejabberd_odbc.erl
2
+--- ejabberd-1.1.1.orig/src/odbc/ejabberd_odbc.erl	2006-05-07 19:05:12.549917750 +0400
3
++++ ejabberd-1.1.1/src/odbc/ejabberd_odbc.erl	2006-05-07 19:06:11.337591750 +0400
4
+@@ -281,6 +281,7 @@
5
+     case mysql_conn:start(Server, ?MYSQL_PORT, Username, Password, DB, NoLogFun) of
6
+ 	{ok, Ref} ->
7
+ 	    erlang:monitor(process, Ref),
8
++	    catch mysql_conn:fetch(Ref, "SET NAMES 'utf8';", self()),
9
+ 	    {ok, #state{db_ref = Ref, db_type = mysql}};
10
+ 	{error, Reason} ->
11
+ 	    ?ERROR_MSG("MySQL connection failed: ~p~n", [Reason]),
... ...
@@ -0,0 +1,406 @@
1
+* modified files
2
+
3
+
4
+--- jlib.hrl
5
++++ jlib.hrl
6
+@@ -34,6 +34,7 @@
7
+ -define(NS_PUBSUB_OWNER, "http://jabber.org/protocol/pubsub#owner").
8
+ -define(NS_PUBSUB_NMI,   "http://jabber.org/protocol/pubsub#node-meta-info").
9
+ -define(NS_COMMANDS,     "http://jabber.org/protocol/commands").
10
++-define(NS_BYTESTREAMS,  "http://jabber.org/protocol/bytestreams").
11
+ 
12
+ -define(NS_EJABBERD_CONFIG, "ejabberd:config").
13
+ 
14
+
15
+
16
+
17
+* added files
18
+
19
+--- /dev/null
20
++++ mod_proxy65.erl
21
+@@ -0,0 +1,189 @@
22
++%%%----------------------------------------------------------------------
23
++%%% File    : mod_proxy65.erl
24
++%%% Author  : Magnus Henoch <henoch@dtek.chalmers.se>
25
++%%% Purpose : Handle Jabber communications for JEP-0065 proxy
26
++%%% Created : 27 Dec 2005 by Magnus Henoch <henoch@dtek.chalmers.se>
27
++%%% Id      : $Id: ejabberd_c2s.erl 440 2005-11-22 18:00:56Z alexey $
28
++%%%----------------------------------------------------------------------
29
++
30
++-module(mod_proxy65).
31
++-author('henoch@dtek.chalmers.se').
32
++-vsn('$Revision$ ').
33
++
34
++-behaviour(gen_mod).
35
++
36
++-export([start/2,
37
++	 init/1,
38
++	 stop/1]).
39
++
40
++-include("ejabberd.hrl").
41
++-include("jlib.hrl").
42
++
43
++-record(proxy65_connection, {cookie, firstpid = none, secondpid = none}).
44
++
45
++-record(proxy65_options, {host, access, streamhosts}).
46
++
47
++-define(PROCNAME, ejabberd_mod_proxy65).
48
++
49
++start(Host, Opts) ->
50
++    mnesia:create_table(proxy65_connection,
51
++			[{ram_copies, [node()]},
52
++			 {attributes, record_info(fields, proxy65_connection)}]),
53
++    MyHost = gen_mod:get_opt(host, Opts, "proxy." ++ Host),
54
++    Access = gen_mod:get_opt(access, Opts, all),
55
++    Streamhosts = gen_mod:get_opt(streamhosts, Opts, [{Host, 7777}]),
56
++    
57
++    register(gen_mod:get_module_proc(Host, ?PROCNAME),
58
++	     spawn(?MODULE, init, [#proxy65_options{host = MyHost, access = Access,
59
++						    streamhosts = Streamhosts}])).
60
++
61
++
62
++stop(Host) ->
63
++    Proc = gen_mod:get_module_proc(Host, ?PROCNAME),
64
++    Proc ! stop,
65
++    {wait, Proc}.
66
++
67
++init(#proxy65_options{host = Host} = Opts) ->
68
++    ejabberd_router:register_route(Host),
69
++    loop(Opts).
70
++
71
++loop(#proxy65_options{host = Host} = Opts) ->
72
++    receive
73
++	{route, From, To, Packet} ->
74
++	    case catch do_route(Opts, From, To, Packet) of
75
++		{'EXIT', Reason} ->
76
++		    ?ERROR_MSG("~p", [Reason]);
77
++		_ ->
78
++		    ok
79
++	    end,
80
++	    loop(Opts);
81
++	stop ->
82
++	    ejabberd_router:unregister_route(Host),
83
++	    ok;
84
++	_ ->
85
++	    loop(Opts)
86
++    end.
87
++
88
++do_route(#proxy65_options{host = Host, access = Access} = Opts,
89
++	 From, To, Packet) ->
90
++    case acl:match_rule(Host, Access, From) of
91
++	allow ->
92
++	    do_route1(Opts, From, To, Packet);
93
++	_ ->
94
++	    {xmlelement, _Name, Attrs, _Els} = Packet,
95
++	    Lang = xml:get_attr_s("xml:lang", Attrs),
96
++	    ErrText = "Access denied by service policy",
97
++	    Err = jlib:make_error_reply(Packet,
98
++					?ERRT_FORBIDDEN(Lang, ErrText)),
99
++	    ejabberd_router:route(To, From, Err)
100
++    end.
101
++
102
++do_route1(#proxy65_options{host = Host, streamhosts = Streamhosts}, From, To, Packet) ->
103
++    {xmlelement, Name, _Attrs, _Els} = Packet,
104
++    case Name of
105
++	"iq" ->
106
++	    case jlib:iq_query_info(Packet) of
107
++		#iq{type = get, xmlns = ?NS_DISCO_INFO = XMLNS,
108
++		    lang = Lang, sub_el = SubEl} = IQ ->
109
++		    Node = xml:get_tag_attr_s("node", SubEl),
110
++		    if Node == [] ->
111
++			    Res = IQ#iq{type = result,
112
++					sub_el = [{xmlelement, "query",
113
++						   [{"xmlns", XMLNS}],
114
++						   [{xmlelement, "identity",
115
++						     [{"category", "proxy"},
116
++						      {"type", "bytestreams"},
117
++						      {"name", translate:translate(Lang, "SOCKS5 bytestreams proxy")}],
118
++						     []},
119
++						    {xmlelement, "feature",
120
++						     [{"var", ?NS_BYTESTREAMS}], []}]}]};
121
++		       true ->
122
++			    Res = jlib:make_error_reply(Packet, ?ERR_ITEM_NOT_FOUND)
123
++		    end;
124
++		#iq{type = get, xmlns = ?NS_DISCO_ITEMS = XMLNS} = IQ ->
125
++		    Res = IQ#iq{type = result,
126
++				sub_el = [{xmlelement, "query",
127
++					   [{"xmlns", XMLNS}], []}]};
128
++		#iq{type = get, xmlns = ?NS_VERSION} = IQ ->
129
++		    OSType = case os:type() of
130
++				 {Osfamily, Osname} ->
131
++				     atom_to_list(Osfamily) ++ "/" ++
132
++					 atom_to_list(Osname);
133
++				 Osfamily ->
134
++				     atom_to_list(Osfamily)
135
++			     end,
136
++		    OSVersion = case os:version() of
137
++				    {Major, Minor, Release} ->
138
++					lists:flatten(
139
++					  io_lib:format("~w.~w.~w",
140
++							[Major, Minor, Release]));
141
++				    VersionString ->
142
++					VersionString
143
++				end,
144
++		    OS = OSType ++ " " ++ OSVersion,
145
++		    Res = IQ#iq{type = result,
146
++				sub_el = [{xmlelement, "query",
147
++					   [{"xmlns", ?NS_VERSION}],
148
++					   [{xmlelement, "name", [],
149
++					     [{xmlcdata, "ejabberd mod_proxy65 (unofficial)"}]},
150
++					    {xmlelement, "version", [],
151
++					     [{xmlcdata, "0.1"}]},
152
++					    {xmlelement, "os", [],
153
++					     [{xmlcdata, OS}]}
154
++					   ]}]};
155
++		#iq{type = get, xmlns = ?NS_BYTESTREAMS = XMLNS} = IQ ->
156
++		    Res = IQ#iq{type = result,
157
++				sub_el = [{xmlelement, "query",
158
++					   [{"xmlns", XMLNS}],
159
++					   return_streamhosts(Host, Streamhosts)}]};
160
++		#iq{type = set, xmlns = ?NS_BYTESTREAMS} = IQ ->
161
++		    Res = activate(Packet, From, To, IQ);
162
++		_ ->
163
++		    Res = jlib:make_error_reply(Packet, ?ERR_FEATURE_NOT_IMPLEMENTED)
164
++	    end,
165
++	    case Res of
166
++		#iq{} ->
167
++		    ejabberd_router:route(To, From, jlib:iq_to_xml(Res));
168
++		_ ->
169
++		    ejabberd_router:route(To, From, Res)
170
++	    end;
171
++	_ ->
172
++	    ejabberd_router:route(To, From, jlib:make_error_reply(Packet, ?ERR_FEATURE_NOT_IMPLEMENTED))
173
++    end.
174
++
175
++return_streamhosts(_JID, []) ->
176
++    [];
177
++return_streamhosts(JID, [{Host, Port} | Streamhosts]) ->
178
++    %% This is not tail-recursive, but it doesn't matter.
179
++    [{xmlelement, "streamhost",
180
++      [{"jid", JID},
181
++       {"host", Host},
182
++       {"port", integer_to_list(Port)}],
183
++      []} | return_streamhosts(JID, Streamhosts)].
184
++
185
++activate(Packet, From, _To, #iq{sub_el = SubEl} = IQ) ->
186
++    case SubEl of
187
++	{xmlelement, "query", Attrs, _SubEls} ->
188
++	    Sid = xml:get_attr_s("sid", Attrs),
189
++	    ActivateTag = xml:get_subtag(SubEl, "activate"),
190
++	    if ActivateTag /= false ->
191
++		    TargetJID = jlib:string_to_jid(xml:get_tag_cdata(ActivateTag));
192
++	       true ->
193
++		    TargetJID = false
194
++	    end,
195
++	    
196
++	    if Sid /= [], TargetJID /= false, TargetJID /= error ->
197
++		    case proxy65_listener:activate(From, TargetJID, Sid) of
198
++			ok ->
199
++			    ?INFO_MSG("Activated connection between ~s and ~s",
200
++				      [jlib:jid_to_string(From), TargetJID]),
201
++			    IQ#iq{type = result, sub_el = []};
202
++			_ ->
203
++			    jlib:make_error_reply(Packet, ?ERR_INTERNAL_SERVER_ERROR)
204
++		    end;
205
++	       true ->
206
++		    jlib:make_error_reply(Packet, ?ERR_BAD_REQUEST)
207
++	    end;
208
++	_ ->
209
++	    jlib:make_error_reply(Packet, ?ERR_BAD_REQUEST)
210
++    end.
211
+--- /dev/null
212
++++ proxy65_listener.erl
213
+@@ -0,0 +1,192 @@
214
++%%%----------------------------------------------------------------------
215
++%%% File    : proxy65_listener.erl
216
++%%% Author  : Magnus Henoch <henoch@dtek.chalmers.se>
217
++%%% Purpose : Handle SOCKS5 connections for JEP-0065 proxy
218
++%%% Created : 27 Dec 2005 by Magnus Henoch <henoch@dtek.chalmers.se>
219
++%%% Id      : $Id: ejabberd_c2s.erl 440 2005-11-22 18:00:56Z alexey $
220
++%%%----------------------------------------------------------------------
221
++
222
++-module(proxy65_listener).
223
++-author('henoch@dtek.chalmers.se').
224
++-vsn('$Revision$ ').
225
++
226
++-export([start/2, handle_connection/2, activate/3]).
227
++
228
++-include("ejabberd.hrl").
229
++-include("jlib.hrl").
230
++
231
++-record(proxy65_connection, {cookie, firstpid = none, secondpid = none}).
232
++
233
++start({SockMod, Socket}, Opts) ->
234
++    {ok, proc_lib:spawn(?MODULE, handle_connection, [{SockMod, Socket}, Opts])}.
235
++
236
++read_bytes(_SockOpts, 0, Data) ->
237
++    lists:flatten(Data);
238
++read_bytes({SockMod, Socket} = SockOpts, N, Data) ->
239
++    Timeout = 1000,
240
++    case SockMod:recv(Socket, N, Timeout) of
241
++	{error, closed} ->
242
++	    %% On closed connection, return everything we have,
243
++	    %% but not if we have nothing.
244
++	    if Data == [] ->
245
++		    erlang:error(closed);
246
++	       true ->
247
++		    lists:flatten(Data)
248
++	    end;
249
++	{ok, MoreData} ->
250
++	    ?DEBUG("read ~p", [MoreData]),
251
++	    DataList = binary_to_list(MoreData),
252
++	    read_bytes(SockOpts, N - length(DataList), [Data, DataList])
253
++    end.
254
++
255
++handle_connection({SockMod, Socket}, Opts) ->
256
++    ?DEBUG("in handle_connection", []),
257
++    case catch handle_auth({SockMod, Socket}, Opts) of
258
++	{'EXIT', Reason} ->
259
++	    ?ERROR_MSG("~p abnormal termination:~n\t~p~n",
260
++		       [?MODULE, Reason]),
261
++	    SockMod:close(Socket);
262
++	_ ->
263
++	    ok
264
++    end.
265
++
266
++handle_auth({SockMod, Socket} = SockOpts, Opts) ->
267
++    ?DEBUG("in handle_auth", []),
268
++    %% SOCKS protocol stuff...
269
++    [5, NAuthMethods] = read_bytes(SockOpts, 2, []),
270
++    AuthMethods = read_bytes(SockOpts, NAuthMethods, []),
271
++    SupportsNoAuth = lists:member(0, AuthMethods),
272
++
273
++    %% Must support no authentication, otherwise crash
274
++    true = SupportsNoAuth,
275
++
276
++    SockMod:send(Socket, [5, 0]),
277
++
278
++    %% And done.
279
++    handle_connect(SockOpts, Opts).
280
++
281
++handle_connect({SockMod, Socket} = SockOpts, Opts) ->
282
++    ?DEBUG("in handle_connect", []),
283
++    %% Expect a CONNECT command and nothing else
284
++    [5, 1, _, 3, AddressLength] = read_bytes(SockOpts, 5, []),
285
++    Cookie = read_bytes(SockOpts, AddressLength, []),
286
++    [0, 0] = read_bytes(SockOpts, 2, []),
287
++
288
++    %% Make sure no more than two connections claim the same cookie.
289
++    F = fun() ->
290
++		case mnesia:read({proxy65_connection, Cookie}) of
291
++		    [] ->
292
++			mnesia:write(#proxy65_connection{cookie = Cookie,
293
++							 firstpid = self()}),
294
++			ok;
295
++		    [#proxy65_connection{secondpid = none} = C] ->
296
++			mnesia:write(C#proxy65_connection{secondpid = self()}),
297
++			ok
298
++		end
299
++	end,
300
++
301
++    case mnesia:transaction(F) of
302
++	{atomic, ok} ->
303
++	    SockMod:send(Socket, [5, 0, 0, 3, AddressLength, Cookie, 0, 0]),
304
++	    wait_for_activation(SockOpts, Opts);
305
++	Error ->
306
++	    %% conflict.  send "general SOCKS server failure".
307
++	    SockMod:send(Socket, [5, 1, 0, 3, AddressLength, Cookie, 0, 0]),
308
++	    erlang:error({badconnect, Error})
309
++    end.
310
++
311
++wait_for_activation(SockOpts, Opts) ->
312
++    ?DEBUG("in wait_for_activation", []),
313
++    receive
314
++	{get_socket, ReplyTo} ->
315
++	    ReplyTo ! SockOpts,
316
++	    wait_for_activation(SockOpts, Opts);
317
++	{activate, TargetSocket, Initiator, Target} ->
318
++	    ?DEBUG("activated", []),
319
++
320
++	    %% We have no way of knowing which connection belongs to
321
++	    %% which participant, so give both the maximum traffic
322
++	    %% allowed to either.
323
++	    Shapers = case lists:keysearch(shaper, 1, Opts) of
324
++			  {value, {_, S}} -> S;
325
++			  _ -> none
326
++		      end,
327
++	    ?DEBUG("we have shapers: ~p", [Shapers]),
328
++	    Shaper1 = acl:match_rule(global, Shapers, jlib:string_to_jid(Initiator)),
329
++	    Shaper2 = acl:match_rule(global, Shapers, jlib:string_to_jid(Target)),
330
++	    if Shaper1 == none; Shaper2 == none ->
331
++		    MaxShaper = none;
332
++	       true ->
333
++		    ShaperValue1 = ejabberd_config:get_global_option({shaper, Shaper1}),
334
++		    ShaperValue2 = ejabberd_config:get_global_option({shaper, Shaper2}),
335
++
336
++		    if ShaperValue1 > ShaperValue2 ->
337
++			    MaxShaper = Shaper1;
338
++		       true ->
339
++			    MaxShaper = Shaper2
340
++		    end,
341
++		    ?DEBUG("shapers have values ~p and ~p~nusing ~p", [ShaperValue1, ShaperValue2, MaxShaper]),
342
++		    ok
343
++	    end,
344
++
345
++	    transfer_data(SockOpts, TargetSocket, shaper:new(MaxShaper))
346
++    end.
347
++
348
++transfer_data({SockMod, Socket} = SockOpts, {TargetSockMod, TargetSocket} = TargetSockOpts,
349
++	      Shaper) ->
350
++    case SockMod:recv(Socket, 0, infinity) of
351
++	{ok, Data} ->
352
++	    if Data /= <<>> ->
353
++		    NewShaper = case Shaper of
354
++				    none -> none;
355
++				    _ ->
356
++					shaper:update(Shaper, size(Data))
357
++				end,
358
++		    ok = TargetSockMod:send(TargetSocket, Data);
359
++	       true ->
360
++		    NewShaper = Shaper
361
++	    end,
362
++	    transfer_data(SockOpts, TargetSockOpts, NewShaper);
363
++	{error, _} ->
364
++	    TargetSockMod:shutdown(TargetSocket, read_write)
365
++    end.
366
++
367
++get_socket(PID) ->
368
++    PID ! {get_socket, self()},
369
++    receive
370
++	{_SockMod, _Socket} = SockOpts ->
371
++	    SockOpts
372
++    end.
373
++
374
++%% If any argument is a jid record, convert it to normalized string form...
375
++activate(#jid{} = Initiator, Target, SessionID) ->
376
++    NormalizedInitiator = jlib:jid_to_string(jlib:make_jid(jlib:jid_tolower(Initiator))),
377
++    activate(NormalizedInitiator, Target, SessionID);
378
++activate(Initiator, #jid{} = Target, SessionID) ->
379
++    NormalizedTarget = jlib:jid_to_string(jlib:make_jid(jlib:jid_tolower(Target))),
380
++    activate(Initiator, NormalizedTarget, SessionID);
381
++%% ...and get on with the activation.
382
++activate(Initiator, Target, SessionID) ->
383
++    Cookie = sha:sha(SessionID ++ Initiator ++ Target),
384
++    F = fun() ->
385
++		case mnesia:read({proxy65_connection, Cookie}) of
386
++		    [#proxy65_connection{firstpid = FirstPID,
387
++					 secondpid = SecondPID}]
388
++		    when is_pid(FirstPID), is_pid(SecondPID) ->
389
++			mnesia:delete({proxy65_connection, Cookie}),
390
++			{FirstPID, SecondPID};
391
++		    _ ->
392
++			error
393
++		end
394
++	end,
395
++    case mnesia:transaction(F) of
396
++	{atomic, {FirstPID, SecondPID}} ->
397
++	    FirstSocket = get_socket(FirstPID),
398
++	    SecondSocket = get_socket(SecondPID),
399
++	    FirstPID ! {activate, SecondSocket, Initiator, Target},
400
++	    SecondPID ! {activate, FirstSocket, Initiator, Target},
401
++	    ok;
402
++	Error ->
403
++	    ?ERROR_MSG("Proxy activation failed: ~p", [Error]),
404
++	    error
405
++    end.
406
+
... ...
@@ -0,0 +1,17 @@
1
+# Copyright 1999-2005 Gentoo Foundation
2
+# Distributed under the terms of the GNU General Public License v2
3
+# $Header: $
4
+
5
+# Name of your ejabberd node. Used by ejabberdctl to determine which
6
+# node to communicate with. Default is "ejabberd@`hostname -s`".
7
+#EJABBERD_NODE="ejabberd@`hostname -s`"
8
+
9
+# Max number of open network connections. Default is 1024. Increasing
10
+# this will slightly increase memory usage.
11
+#ERL_MAX_PORTS=1024
12
+
13
+# Return memory to the system after using it, instead of keeping it
14
+# allocated for future use. Decreases the memory required by ejabberd,
15
+# but makes it run slower.  Default is unset, set to any value to
16
+# activate.
17
+#ERL_FULLSWEEP_AFTER=0
... ...
@@ -0,0 +1,60 @@
1
+#!/sbin/runscript
2
+# Copyright 1999-2005 Gentoo Foundation
3
+# Distributed under the terms of the GNU General Public License v2
4
+# $Header: $
5
+
6
+opts="${opts} reload"
7
+
8
+depend() {
9
+	use dns
10
+	need net
11
+	provide jabber-server
12
+}
13
+
14
+checkconfig() {
15
+	if [ ! -e /etc/jabber/ejabberd.cfg ] ; then
16
+		eerror "You need an /etc/jabber/ejabberd.cfg file to run ejabberd"
17
+		return 1
18
+	fi
19
+}
20
+
21
+start() {
22
+	checkconfig || return 1
23
+	ebegin "Starting eJabberd"
24
+	start-stop-daemon --start --quiet --chuid jabber:jabber \
25
+		--exec /usr/bin/env HOME=/var/run/jabber /usr/bin/ejabberd -- -noshell -detached
26
+	eend $?
27
+}
28
+
29
+stop() {
30
+	ebegin "Stopping eJabberd"
31
+	if [ -z "$EJABBERD_NODE" ];
32
+	then
33
+		EJABBERD_NODE="ejabberd@`hostname -s`"
34
+	fi
35
+	/usr/bin/ejabberdctl $EJABBERD_NODE stop
36
+	eend $?
37
+}
38
+
39
+# Work around a bug in /sbin/runscript.sh - it won't run our custom
40
+# restart() unless it finds these two strings in the file.
41
+# svc_start svc_stop
42
+restart() {
43
+	ebegin "Restarting eJabberd"
44
+	if [ -z "$EJABBERD_NODE" ];
45
+	then
46
+		EJABBERD_NODE="ejabberd@`hostname -s`"
47
+	fi
48
+	/usr/bin/ejabberdctl $EJABBERD_NODE restart
49
+	eend $?
50
+}
51
+
52
+reload() {
53
+	ebegin "Reloading eJabberd"
54
+	if [ -z "$EJABBERD_NODE" ];
55
+	then
56
+		EJABBERD_NODE="ejabberd@`hostname -s`"
57
+	fi
58
+	/usr/bin/ejabberdctl $EJABBERD_NODE reopen-log
59
+	eend $?
60
+}
... ...
@@ -0,0 +1 @@
1
+{file, resolv, "/etc/resolv.conf"}.
... ...
@@ -0,0 +1,10 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
3
+
4
+<pkgmetadata>
5
+<herd>net-im</herd>
6
+<maintainer>
7
+  <email>lars@breakmygentoo.net</email>
8
+</maintainer>
9
+<longdescription> Free and Open Source distributed fault-tolerant Jabber server. It's mostly written in Erlang, and works on many platforms.</longdescription>
10
+</pkgmetadata>
... ...
@@ -0,0 +1,74 @@
1
+AUX README.Gentoo 984 RMD160 cbaac3ea99a614c2155baad18a0a364a33d01ca1 SHA1 9a8c71a0499ccf46aa80d4b54b3e16066dd74caa SHA256 cb495c86769e5de3d070b98ba379f3a1d83936c3c509263bca34f2fdd78f3726
2
+MD5 1a325b6068e591bc222376a7d70f6e17 files/README.Gentoo 984
3
+RMD160 cbaac3ea99a614c2155baad18a0a364a33d01ca1 files/README.Gentoo 984
4
+SHA256 cb495c86769e5de3d070b98ba379f3a1d83936c3c509263bca34f2fdd78f3726 files/README.Gentoo 984
5
+AUX jabber-conf.d 525 RMD160 0a1a0afdaf445d8202b86d009d02752ce07a8111 SHA1 85c3d9970bbd3594b436a751928633549b4e1568 SHA256 63d86ba061bee5bd8777b6b5f5c558dc70af03999b10ca45b583cbc69eb68a0a
6
+MD5 3a5219d7870e60f5b16d6aefb1c63a0e files/jabber-conf.d 525
7
+RMD160 0a1a0afdaf445d8202b86d009d02752ce07a8111 files/jabber-conf.d 525
8
+SHA256 63d86ba061bee5bd8777b6b5f5c558dc70af03999b10ca45b583cbc69eb68a0a files/jabber-conf.d 525
9
+AUX jabber.init.bundled 626 RMD160 fcb220de2879550fa91cb3cfce7b45e818e2972b SHA1 ff3003732af409e44b21f80defa3a2a939c8ad4d SHA256 55cbd339b6c4112aeade836b363d62abe1f5e99f70bfc2d8dbc9dcc944378d61
10
+MD5 3d8c2953acd251416c2fdb9a721b9e52 files/jabber.init.bundled 626
11
+RMD160 fcb220de2879550fa91cb3cfce7b45e818e2972b files/jabber.init.bundled 626
12
+SHA256 55cbd339b6c4112aeade836b363d62abe1f5e99f70bfc2d8dbc9dcc944378d61 files/jabber.init.bundled 626
13
+AUX jabber.init.gentoo 2118 RMD160 c363c6cccd9671d6fb8484aebb4659665e51f138 SHA1 2c63fd57aab7039da188052772d2eec4035a0980 SHA256 636e1432955b6a09f2f6ceba8cd4a223a8e1840b4082e3615424cfeca4c93e51
14
+MD5 1813a30dabb60fa0a15ee3ed3aaad28d files/jabber.init.gentoo 2118
15
+RMD160 c363c6cccd9671d6fb8484aebb4659665e51f138 files/jabber.init.gentoo 2118
16
+SHA256 636e1432955b6a09f2f6ceba8cd4a223a8e1840b4082e3615424cfeca4c93e51 files/jabber.init.gentoo 2118
17
+AUX jabber.rc6-r5 874 RMD160 a5cc38b73d707f4cc6a74f6658d93987471ce2e9 SHA1 7d77b306d6eed609bd78357a1687b32f8658477e SHA256 2a5b6f0e0045e1b0a179f45acf6dfdda3eafb07e9626c59ab9694091ad0059be
18
+MD5 8d4ca5fb6338d837674ab33c8f969273 files/jabber.rc6-r5 874
19
+RMD160 a5cc38b73d707f4cc6a74f6658d93987471ce2e9 files/jabber.rc6-r5 874
20
+SHA256 2a5b6f0e0045e1b0a179f45acf6dfdda3eafb07e9626c59ab9694091ad0059be files/jabber.rc6-r5 874
21
+AUX jabber.rc6-r6 953 RMD160 2165b3119893f51e777b27972bc755c6390ac58f SHA1 0a2f2867683b3b42e205b9dc8452888620000508 SHA256 03301c94ee862ffa7c31a9995ef9e3557f415fb299fad8a398f0d27588780712
22
+MD5 6912454f1d1d480cbb711f715292e3cc files/jabber.rc6-r6 953
23
+RMD160 2165b3119893f51e777b27972bc755c6390ac58f files/jabber.rc6-r6 953
24
+SHA256 03301c94ee862ffa7c31a9995ef9e3557f415fb299fad8a398f0d27588780712 files/jabber.rc6-r6 953
25
+AUX jabber.rc6-r7 1842 RMD160 115b8e998e8cbab50a35e6450cde9ffee2d84077 SHA1 130c989bb57c8c8f7d1531142ddd998e449440ad SHA256 d3fabcb90f65271a2fb5afc7384e6bbc45d55d17a0e208a011e682feeb00a624
26
+MD5 4ea516e4527dd2de19281709704238ee files/jabber.rc6-r7 1842
27
+RMD160 115b8e998e8cbab50a35e6450cde9ffee2d84077 files/jabber.rc6-r7 1842
28
+SHA256 d3fabcb90f65271a2fb5afc7384e6bbc45d55d17a0e208a011e682feeb00a624 files/jabber.rc6-r7 1842
29
+AUX jabber.rc6-r8 800 RMD160 99fe1b8af7a4293af04b08c4b32b77173a46c7f1 SHA1 fe427cf1df5cc93e7f7b7d5792b841d54fac2ec2 SHA256 1ee99a10af00a518cfd74fa0279fcb7937d00f4d24633b67ea6974a19e2a505a
30
+MD5 078528dc08a082b7a0534d4f6c5c5f5e files/jabber.rc6-r8 800
31
+RMD160 99fe1b8af7a4293af04b08c4b32b77173a46c7f1 files/jabber.rc6-r8 800
32
+SHA256 1ee99a10af00a518cfd74fa0279fcb7937d00f4d24633b67ea6974a19e2a505a files/jabber.rc6-r8 800
33
+AUX multiple-xml-patch-00 5934 RMD160 89554e2f3f3354ecc248324bcb2a8b9151ebc67d SHA1 27f0aab6b2ec468dd9a1d3b7633555db83ade23f SHA256 43287b8265631498e0e82dfd0b362ec2513ffc4f3ea4daf112a52f3be49795c7
34
+MD5 5aeafd17644a405b363de0ea1eb22d8b files/multiple-xml-patch-00 5934
35
+RMD160 89554e2f3f3354ecc248324bcb2a8b9151ebc67d files/multiple-xml-patch-00 5934
36
+SHA256 43287b8265631498e0e82dfd0b362ec2513ffc4f3ea4daf112a52f3be49795c7 files/multiple-xml-patch-00 5934
37
+AUX multiple-xml-patch-01 303 RMD160 94a3d484e157f59f04ac2c7e5edf1d92eecd9edd SHA1 6db80faa5a9ea9dea767665866baa3c6d27b4b9d SHA256 9354ea516986fff0de1a1745a33323d5717753a1ef6a19a166da251faa2532a5
38
+MD5 0067018951674e703063f0f4337c5a2c files/multiple-xml-patch-01 303
39
+RMD160 94a3d484e157f59f04ac2c7e5edf1d92eecd9edd files/multiple-xml-patch-01 303
40
+SHA256 9354ea516986fff0de1a1745a33323d5717753a1ef6a19a166da251faa2532a5 files/multiple-xml-patch-01 303
41
+AUX multiple.xml 15387 RMD160 c2eb6c555adb1560426dc2f407b4044735a19ee8 SHA1 848fe2149daf363fd1c142fbde6fb7f625de9700 SHA256 4dc1cd47d7fd8157680cb67d5b0265f41dc225cf5717cd556d755d2ecab0ed9e
42
+MD5 73c38af347fdcf7d7cb6dd3490344bfa files/multiple.xml 15387
43
+RMD160 c2eb6c555adb1560426dc2f407b4044735a19ee8 files/multiple.xml 15387
44
+SHA256 4dc1cd47d7fd8157680cb67d5b0265f41dc225cf5717cd556d755d2ecab0ed9e files/multiple.xml 15387
45
+AUX patch-c2s-buffers 12112 RMD160 53b67e0c890d4939e92ea929d2daa589d0af4985 SHA1 bc66b98f81d23d2314b5515cf2191be38985afaf SHA256 c9a2bfb0874aa335044ec79e5d1c1ae7ad929c6889e780976e114de223f2ecab
46
+MD5 40ed7d521eda61aa9f67390099e5b693 files/patch-c2s-buffers 12112
47
+RMD160 53b67e0c890d4939e92ea929d2daa589d0af4985 files/patch-c2s-buffers 12112
48
+SHA256 c9a2bfb0874aa335044ec79e5d1c1ae7ad929c6889e780976e114de223f2ecab files/patch-c2s-buffers 12112
49
+AUX self-cert.jabberd-2.sh 688 RMD160 bdf07df3eac44c121947a2b53797bf38002aac2c SHA1 00422b0720f09a42bc92fac18f9eb022c8e86e2d SHA256 2b7bd52854a4dabc0ff08ac0c72c3f0c0355bf84d751fe2a266d3e987890089d
50
+MD5 1d08c47f5fe30ced5227f28bac65f6fd files/self-cert.jabberd-2.sh 688
51
+RMD160 bdf07df3eac44c121947a2b53797bf38002aac2c files/self-cert.jabberd-2.sh 688
52
+SHA256 2b7bd52854a4dabc0ff08ac0c72c3f0c0355bf84d751fe2a266d3e987890089d files/self-cert.jabberd-2.sh 688
53
+AUX self-cert.sh 494 RMD160 f9af6ce9cf396b6ae2697f66120060433514051a SHA1 6fd88c8368291d293dd8fb901305ae8cfae7dde0 SHA256 060756f5e3660d9e5c37f4c34e895b88a371c76fc1095ab49853e151c190e9b4
54
+MD5 6ec1c588cf732d89e8bc7b5864842ab9 files/self-cert.sh 494
55
+RMD160 f9af6ce9cf396b6ae2697f66120060433514051a files/self-cert.sh 494
56
+SHA256 060756f5e3660d9e5c37f4c34e895b88a371c76fc1095ab49853e151c190e9b4 files/self-cert.sh 494
57
+AUX xdb-ldap.xml 985 RMD160 1fef53144712c90a1a8331f2dd33dde67e96d4da SHA1 0da96bd4d285e225714470ba254be44025fdde5e SHA256 b120ded22102e2f21f557c6da7914ca4174272a51b9ae48e9fb950bb529c4e32
58
+MD5 92ba69168d2fb8c1384e8e13e03dcbc2 files/xdb-ldap.xml 985
59
+RMD160 1fef53144712c90a1a8331f2dd33dde67e96d4da files/xdb-ldap.xml 985
60
+SHA256 b120ded22102e2f21f557c6da7914ca4174272a51b9ae48e9fb950bb529c4e32 files/xdb-ldap.xml 985
61
+AUX xml-stream-patch-00 726 RMD160 52bd65c728666be7f6ad48508748d1a4f0b47f3a SHA1 ec391341dd818bbdc9bc7f9c72e5d77934565b96 SHA256 c6b447658281c5136b63cc2bdcd1d38463dae57a0dc701b7d90fecacc409f0c4
62
+MD5 a8408aaabc3453cfd3cbe3df1a65f67e files/xml-stream-patch-00 726
63
+RMD160 52bd65c728666be7f6ad48508748d1a4f0b47f3a files/xml-stream-patch-00 726
64
+SHA256 c6b447658281c5136b63cc2bdcd1d38463dae57a0dc701b7d90fecacc409f0c4 files/xml-stream-patch-00 726
65
+DIST jabberd-1.4.3-extexpat.diff 309514 RMD160 93000ff5aa882a48ac55d45dc51d01405d7cafdc SHA1 d06d53032634cc6a508e51e92a8943fab177e67c SHA256 436a1b7b11b157794027940fd9ae474474ebdf0d6ba16b799016a689682650b7
66
+DIST jabberd-1.4.3.tar.gz 258016 RMD160 a87bede7d76d6601d8b2986dca8d882401ba1a85 SHA1 cf968017c8a4f2d0dc3c139c712846a722d9bbed SHA256 aad60b39ebe9121a857e51ea226964ad5a21babff8ccb99cb25d6a45e96e1f57
67
+DIST xdb_ldap-1.0.tar.gz 112204 RMD160 2b8722d8990944105dacd4a73bc45c24a72ccdfa SHA1 e2f8110b77031a2ce751ffa300768794c36d91fb SHA256 fdcdc9b65a40aff8ca38ad27fad701d7692f0976eb6344f5deae317d00d0c5bd
68
+EBUILD jabberd-1.4.3-r5.ebuild 5585 RMD160 bc32a63f8e1f852000e2fa98ec0a5dbe44526f12 SHA1 89a4cf8220bbc444299614ab4b286b7b95b75247 SHA256 879a603945b764612682dfc73525a8d2db5d05109902f48f8ebdf867c92b6f93
69
+MD5 fd3ce7d740d8450e25a42372fae1ded5 jabberd-1.4.3-r5.ebuild 5585
70
+RMD160 bc32a63f8e1f852000e2fa98ec0a5dbe44526f12 jabberd-1.4.3-r5.ebuild 5585
71
+SHA256 879a603945b764612682dfc73525a8d2db5d05109902f48f8ebdf867c92b6f93 jabberd-1.4.3-r5.ebuild 5585
72
+MD5 9e3234e4f869fa8ac1e504bd23c4c9ce files/digest-jabberd-1.4.3-r5 741
73
+RMD160 faa064a50b8c611bb985a5211b4098c89aad67eb files/digest-jabberd-1.4.3-r5 741
74
+SHA256 4eb60913cb6143f37c2c3c2f7536e97876c8f786e48943a5cc6fb97fd2016198 files/digest-jabberd-1.4.3-r5 741
... ...
@@ -0,0 +1,26 @@
1
+This instructions are valid if you are using jabberd14 as the main server. If
2
+you are going to use jabberd2 you must edit /etc/confd/jabberd and change 
3
+jabberd14 to jabberd2.
4
+
5
+This is a small help to get you started with Jabber in Gentoo.
6
+Edit /etc/jabber/multiple.xml . This is the main jabber server config file.
7
+There change all references to localhost with the FQDN (Fully Qualified Domain 
8
+Name) for your server.
9
+If you are going to use SSL you must change the line:
10
+ <ssl port="5223"/> <!-- 10.1.2.3</ssl> -->
11
+To:
12
+<ssl port="5223">10.1.2.3</ssl>
13
+Where 10.1.2.3 is your machines IP (not name, IP here).
14
+Also, edit:
15
+<ssl>
16
+      <key ip="10.1.2.3">/etc/jabber/gentoo.pem</key>
17
+</ssl>
18
+
19
+at the end of the file to your IP.
20
+
21
+You can now test your setup with the command:
22
+jabberd -c /etc/jabber/multiple.xml -D
23
+
24
+And try to connect to your new server with a jabber client. If all goes well
25
+kill your jabber server (control-c) and if you have installed transports go
26
+configure them now.
... ...
@@ -0,0 +1,9 @@
1
+MD5 293c77245963b21e73f17fbde4aec200 jabberd-1.4.3-extexpat.diff 309514
2
+RMD160 93000ff5aa882a48ac55d45dc51d01405d7cafdc jabberd-1.4.3-extexpat.diff 309514
3
+SHA256 436a1b7b11b157794027940fd9ae474474ebdf0d6ba16b799016a689682650b7 jabberd-1.4.3-extexpat.diff 309514
4
+MD5 a3e964d6fa07b5d850302ae0512f94c6 jabberd-1.4.3.tar.gz 258016
5
+RMD160 a87bede7d76d6601d8b2986dca8d882401ba1a85 jabberd-1.4.3.tar.gz 258016
6
+SHA256 aad60b39ebe9121a857e51ea226964ad5a21babff8ccb99cb25d6a45e96e1f57 jabberd-1.4.3.tar.gz 258016
7
+MD5 373f0f780c725cc06c824e322fc694ff xdb_ldap-1.0.tar.gz 112204
8
+RMD160 2b8722d8990944105dacd4a73bc45c24a72ccdfa xdb_ldap-1.0.tar.gz 112204
9
+SHA256 fdcdc9b65a40aff8ca38ad27fad701d7692f0976eb6344f5deae317d00d0c5bd xdb_ldap-1.0.tar.gz 112204
... ...
@@ -0,0 +1,12 @@
1
+# Copyright 1999-2004 Gentoo Foundation
2
+# Distributed under the terms of the GNU General Public License, v2 or later
3
+# $Header: /var/cvsroot/gentoo-x86/net-im/jabberd/files/jabber-conf.d,v 1.4 2004/07/14 23:45:05 agriffis Exp $
4
+
5
+# Configure which is the default jabberd server. Any value that is not
6
+# jabberd14 and jabberd2 will be started
7
+
8
+JABBERD="jabberd14"
9
+
10
+#Right now this is only used by the init script, but i would like to find a way
11
+#for jabberd to include this in the conf
12
+JPIDFILE="/var/log/jabber/jabberd14.pid"
... ...
@@ -0,0 +1,24 @@
1
+#!/sbin/runscript
2
+# Copyright 1999-2005 Gentoo Foundation
3
+# Distributed under the terms of the GNU General Public License v2
4
+# $Header: /var/cvsroot/gentoo-x86/net-im/jabberd/files/jabber.init.bundled,v 1.1 2005/01/31 23:05:41 humpback Exp $
5
+
6
+depend() {
7
+	need net
8
+	use mysql postgresql slapd
9
+	provide jabber-server
10
+}
11
+
12
+start() {
13
+	ebegin "Starting Jabber Server"
14
+	start-stop-daemon --start -c jabber:jabber \
15
+		-b --make-pidfile --pidfile /var/jabberd/pid/jabberd.pid \
16
+		-q -x /usr/bin/jabberd
17
+	eend $?
18
+}
19
+
20
+stop() {
21
+	ebegin "Stopping Jabber Server"
22
+	start-stop-daemon --stop -q --pidfile /var/jabberd/pid/jabberd.pid
23
+	eend $?
24
+}
... ...
@@ -0,0 +1,91 @@
1
+#!/sbin/runscript
2
+# Copyright 1999-2005 Gentoo Foundation
3
+# Distributed under the terms of the GNU General Public License v2
4
+# $Header: /var/cvsroot/gentoo-x86/net-im/jabberd/files/jabber.init.gentoo,v 1.1 2005/01/31 23:05:41 humpback Exp $
5
+
6
+depend() {
7
+	need net
8
+	use mysql postgresql slapd
9
+	provide jabber-server
10
+}
11
+
12
+components="router resolver sm c2s s2s"
13
+
14
+my_start() {
15
+	ebegin "-> Starting ${i}"
16
+	component=${i}
17
+#	pidfile=/var/jabberd/pid/${component}.pid
18
+#	## remove components pidfile
19
+#	rm -f "${pidfile}" >/dev/null 2>&1
20
+	## start component
21
+	start-stop-daemon --start -c jabber:jabber -b \
22
+		-q -x /usr/bin/${component} >/dev/null 2>&1
23
+#	## check if pidfile exists
24
+#	if [ ! -f "${pidfile}" ]; then
25
+#		false
26
+#	## check if pidfile contains the pid of a running process
27
+#	elif ! ps -p "$(< ${pidfile})" -o pid= >/dev/null 2>&1; then
28
+#		false
29
+#	fi
30
+	eend $?
31
+}
32
+
33
+my_stop() {
34
+	ebegin "-> Stopping ${i}"
35
+	component=${i}
36
+	pidfile=/var/jabberd/pid/${component}.pid
37
+	start-stop-daemon --stop -q --pidfile ${pidfile} >/dev/null 2>&1
38
+#	if [ -f "${pidfile}" ] && ps -p "$(< ${pidfile})" -o pid= >/dev/null 2>&1; then
39
+#		false
40
+#	fi
41
+#	## remove components pidfile
42
+#	rm -f "${pidfile}" >/dev/null 2>&1
43
+	eend $?
44
+}
45
+
46
+start() {
47
+	ebegin "Starting Jabber Server"
48
+	local started=''
49
+	local failed=''
50
+	for i in ${components}; do
51
+		if ! my_start ${i}; then
52
+			failed="${failed:+${failed} }${i}"
53
+		else
54
+			started="${started:+${started} }${i}"
55
+		fi
56
+	done
57
+	if [ -n "${failed}" ]; then
58
+		eerror
59
+		eerror "The following components failed to start:"
60
+		eerror "-> ${failed}"
61
+		eerror
62
+		eerror "Trying to stop started components"
63
+		for i in ${started}; do
64
+			my_stop ${i}
65
+		done
66
+		false
67
+	fi
68
+	eend $?
69
+}
70
+
71
+stop() {
72
+	ebegin "Stopping Jabber Server"
73
+	local failed=''
74
+	for i in ${components}; do
75
+		if ! my_stop ${i}; then
76
+			failed="${failed:+${failed} }${i}"
77
+		fi
78
+	done
79
+	if [ -n "${failed}" ]; then
80
+		eerror
81
+		eerror "The following components failed to stop:"
82
+		eerror "-> ${failed}"
83
+		eerror
84
+		eerror "Please kill the processes manually and reset"
85
+		eerror "this service to a stopped state using"
86
+		eerror "-> ${0} zap"
87
+		eerror
88
+		false
89
+	fi
90
+	eend $?
91
+}
... ...
@@ -0,0 +1,39 @@
1
+#!/sbin/runscript
2
+# Copyright 1999-2004 Gentoo Foundation
3
+# Distributed under the terms of the GNU General Public License v2
4
+# $Header: /var/cvsroot/gentoo-x86/net-im/jabberd/files/jabber.rc6-r5,v 1.4 2004/07/14 23:45:05 agriffis Exp $
5
+
6
+depend() {
7
+	need net
8
+}
9
+
10
+start() {
11
+	ebegin "Starting Jabber Server"
12
+
13
+	jabberd -B -c /etc/jabber/multiple.xml >/dev/null 2>&1
14
+	for addon in /etc/jabber/*.xml; do
15
+		if [ "$addon" == "/etc/jabber/jit.xml" ]; then
16
+			jit-wpjabber -d -c $addon >/dev/null 2>&1
17
+		else	
18
+		if [ "$addon" != "/etc/jabber/multiple.xml" ]; then
19
+			jabberd -B -c $addon >/dev/null 2>&1
20
+		fi
21
+		fi
22
+	done
23
+
24
+	eend $?
25
+}
26
+
27
+stop() {
28
+	ebegin "Stopping Jabber Server"
29
+	killall jabberd
30
+	if [ "$addon" == "/etc/jabber/jit.xml" ]; then
31
+		killall jit-wpjabber
32
+	fi
33
+	sleep 2
34
+	killall -9 jabberd
35
+	if [ "$addon" == "/etc/jabber/jit.xml" ]; then
36
+		killall -9 jit-wpjabber
37
+	fi
38
+	eend $?
39
+}
... ...
@@ -0,0 +1,45 @@
1
+#!/sbin/runscript
2
+# Copyright 1999-2004 Gentoo Foundation
3
+# Distributed under the terms of the GNU General Public License v2
4
+# $Header: /var/cvsroot/gentoo-x86/net-im/jabberd/files/jabber.rc6-r6,v 1.3 2004/07/14 23:45:05 agriffis Exp $
5
+
6
+depend() {
7
+	need net
8
+}
9
+
10
+start() {
11
+	ebegin "Starting Jabber Server"
12
+
13
+	jabberd -B -c /etc/jabber/multiple.xml >/dev/null 2>&1
14
+	for addon in /etc/jabber/*.xml; do
15
+		if [ "$addon" == "/etc/jabber/jit.xml" ]; then
16
+			jit-wpjabber -d -c $addon >/dev/null 2>&1
17
+		else	
18
+			if [ "$addon" != "/etc/jabber/multiple.xml" ]; then
19
+				jabberd -B -c $addon >/dev/null 2>&1
20
+			fi
21
+		fi
22
+	done
23
+
24
+	eend $?
25
+}
26
+
27
+stop() {
28
+	ebegin "Stopping Jabber Server"
29
+		
30
+	killall jabberd
31
+	sleep 2
32
+	if (( `ps -e | grep jabberd | wc -l`>0 )); then 
33
+		killall -9 jabberd
34
+	fi
35
+				
36
+	if [ -e /etc/jabber/jit.xml ]; then
37
+		killall jit-wpjabber
38
+		sleep 2
39
+		if (( `ps -e | grep jit-wpjabber | wc -l`>0 )); then
40
+			killall -9 jit-wpjabber
41
+		fi
42
+	fi
43
+				
44
+	eend $?
45
+}
... ...
@@ -0,0 +1,71 @@
1
+#!/sbin/runscript
2
+# Copyright 1999-2004 Gentoo Foundation
3
+# Distributed under the terms of the GNU General Public License v2
4
+# $Header: /var/cvsroot/gentoo-x86/net-im/jabberd/files/jabber.rc6-r7,v 1.7 2004/07/14 23:45:05 agriffis Exp $
5
+
6
+depend() {
7
+	need net
8
+	provide jabber-server
9
+}
10
+
11
+start() {
12
+	ebegin "Starting main Jabber Component"
13
+	if [ "${JABBERD}" = "jabberd14" ]
14
+	then
15
+		if [ -f ${JPIDFILE} ]; then
16
+			if [ -z $(ps ax | grep `cat ${JPIDFILE}` | grep -v grep ) ]
17
+			then
18
+				rm -f ${JPIDFILE}
19
+			fi
20
+		fi
21
+		jabberd -B -c /etc/jabber/multiple.xml >/dev/null 2>&1
22
+	else
23
+		ebegin "   Router"
24
+			start-stop-daemon --start -b -q -x /usr/bin/router
25
+		eend $?
26
+		ebegin "   Resolver"
27
+			start-stop-daemon --start -b -q -x /usr/bin/resolver
28
+		eend $?
29
+		ebegin "   Session Manager"
30
+			start-stop-daemon --start -b -q -x /usr/bin/sm
31
+		eend $?
32
+		ebegin "   Client to Server Component"
33
+			start-stop-daemon --start -b -q -x /usr/bin/c2s
34
+		eend $?
35
+		ebegin "   Server to Server Component"
36
+			start-stop-daemon --start -b -q -x /usr/bin/s2s
37
+		eend $?	
38
+	fi
39
+	
40
+	eend $?
41
+}
42
+
43
+stop() {
44
+	ebegin "Stopping main Jabber Component"
45
+	if [ "${JABBERD}" = "jabberd14" ]
46
+	then
47
+		kill `cat ${JPIDFILE}`
48
+		sleep 2
49
+        	if [ -f ${JPIDFILE} ]; then
50
+			kill -9 `cat ${JPIDFILE}`
51
+			rm -f ${JPIDFILE}
52
+		fi
53
+	else
54
+		ebegin "   Router"
55
+			start-stop-daemon --stop -q --pidfile /var/jabberd/pid/router.pid
56
+		eend $?
57
+		ebegin "   Resolver"
58
+			start-stop-daemon --stop -q --pidfile /var/jabberd/pid/resolver.pid
59
+		eend $?
60
+		ebegin "   Session Manager"
61
+			start-stop-daemon --stop -q --pidfile /var/jabberd/pid/sm.pid
62
+		eend $?
63
+		ebegin "   Client to Server Component"
64
+			start-stop-daemon --stop -q --pidfile /var/jabberd/pid/c2s.pid
65
+		eend $?
66
+		ebegin "   Server to Server Component"
67
+			start-stop-daemon --stop -q --pidfile /var/jabberd/pid/s2s.pid
68
+		eend $?
69
+	fi
70
+	eend $?
71
+}
... ...
@@ -0,0 +1,34 @@
1
+#!/sbin/runscript
2
+# Copyright 1999-2005 Gentoo Foundation
3
+# Distributed under the terms of the GNU General Public License v2
4
+# $Header: /var/cvsroot/gentoo-x86/net-im/jabberd/files/jabber.rc6-r8,v 1.1 2005/05/21 18:35:51 humpback Exp $
5
+
6
+depend() {
7
+	need net
8
+	provide jabber-server
9
+}
10
+
11
+start() {
12
+	ebegin "Starting Jabber Server"
13
+	if [ -f ${JPIDFILE} ]; then
14
+		if [ -z $(ps ax | grep `cat ${JPIDFILE}` | grep -v grep ) ]
15
+		then
16
+			rm -f ${JPIDFILE}
17
+		fi
18
+	fi
19
+	start-stop-daemon --start  -c jabber:jabber \
20
+		-x /usr/sbin/jabberd -- -B -c /etc/jabber/multiple.xml 
21
+	eend $?
22
+}
23
+
24
+stop() {
25
+	ebegin "Stopping Jabber Server"
26
+	start-stop-daemon --stop  -x /usr/sbin/jabberd
27
+	kill `cat ${JPIDFILE}`
28
+	sleep 2
29
+	if [ -f ${JPIDFILE} ]; then
30
+		kill -9 `cat ${JPIDFILE}`
31
+		rm -f ${JPIDFILE}
32
+	fi												 
33
+	eend $?
34
+}
... ...
@@ -0,0 +1,170 @@
1
+--- jabber.xml	2004-02-13 01:57:46.144389448 +0000
2
++++ jabber.xml2	2004-02-13 01:57:01.725142200 +0000
3
+@@ -133,13 +133,13 @@
4
+       a message after each valid registration if the notify
5
+       attribute is present.
6
+       -->
7
+-
8
++	<!-- commented out so no one can register!!!
9
+       <register notify="yes">
10
+         <instructions>Choose a username and password to register with this server.</instructions>
11
+         <name/>
12
+         <email/>
13
+       </register>
14
+-
15
++	-->
16
+       <!-- 
17
+       A welcome note that is sent to every new user who registers 
18
+       with your server. Comment it out to disable this function.
19
+@@ -178,7 +178,7 @@
20
+       sent in response to any admin messages.
21
+       -->
22
+ 
23
+-      <!--
24
++      
25
+       <admin>
26
+         <read>support@localhost</read>
27
+         <write>admin@localhost</write>
28
+@@ -187,7 +187,7 @@
29
+           <body>This is a special administrative address.  Your message was received and forwarded to server administrators.</body>
30
+         </reply>
31
+       </admin>
32
+-      -->
33
++      
34
+ 
35
+       <!--
36
+       This enables the server to automatically update the 
37
+@@ -295,21 +295,21 @@
38
+     -->
39
+ 
40
+     <load main="jsm">
41
+-      <jsm>./jsm/jsm.so</jsm>
42
+-      <mod_echo>./jsm/jsm.so</mod_echo>
43
+-      <mod_roster>./jsm/jsm.so</mod_roster>
44
+-      <mod_time>./jsm/jsm.so</mod_time>
45
+-      <mod_vcard>./jsm/jsm.so</mod_vcard>
46
+-      <mod_last>./jsm/jsm.so</mod_last>
47
+-      <mod_version>./jsm/jsm.so</mod_version>
48
+-      <mod_announce>./jsm/jsm.so</mod_announce>
49
+-      <mod_agents>./jsm/jsm.so</mod_agents>
50
+-      <mod_browse>./jsm/jsm.so</mod_browse>
51
+-      <mod_disco>./jsm/jsm.so</mod_disco>
52
+-      <mod_admin>./jsm/jsm.so</mod_admin>
53
+-      <mod_filter>./jsm/jsm.so</mod_filter>
54
+-      <mod_offline>./jsm/jsm.so</mod_offline>
55
+-      <mod_presence>./jsm/jsm.so</mod_presence>
56
++      <jsm>/usr/lib/jabberd/jsm.so</jsm>
57
++      <mod_echo>/usr/lib/jabberd/jsm.so</mod_echo>
58
++      <mod_roster>/usr/lib/jabberd/jsm.so</mod_roster>
59
++      <mod_time>/usr/lib/jabberd/jsm.so</mod_time>
60
++      <mod_vcard>/usr/lib/jabberd/jsm.so</mod_vcard>
61
++      <mod_last>/usr/lib/jabberd/jsm.so</mod_last>
62
++      <mod_version>/usr/lib/jabberd/jsm.so</mod_version>
63
++      <mod_announce>/usr/lib/jabberd/jsm.so</mod_announce>
64
++      <mod_agents>/usr/lib/jabberd/jsm.so</mod_agents>
65
++      <mod_browse>/usr/lib/jabberd/jsm.so</mod_browse>
66
++      <mod_disco>/usr/lib/jabberd/jsm.so</mod_disco>
67
++      <mod_admin>/usr/lib/jabberd/jsm.so</mod_admin>
68
++      <mod_filter>/usr/lib/jabberd/jsm.so</mod_filter>
69
++      <mod_offline>/usr/lib/jabberd/jsm.so</mod_offline>
70
++      <mod_presence>/usr/lib/jabberd/jsm.so</mod_presence>
71
+ 
72
+       <!--
73
+       Authentication
74
+@@ -325,19 +325,21 @@
75
+       -->
76
+       <!-- mod_auth_digest: Password in clear text in storage,
77
+            encrypted/hashed on the wire -->
78
+-      <mod_auth_digest>./jsm/jsm.so</mod_auth_digest>
79
++      <mod_auth_digest>/usr/lib/jabberd/jsm.so</mod_auth_digest>
80
+       <!-- mod_auth_plain: Password in clear text in storage
81
+            and on the wire. Disable this if you do not use clients
82
+            that need plaintext auth -->
83
+-      <mod_auth_plain>./jsm/jsm.so</mod_auth_plain>
84
++      <mod_auth_plain>/usr/lib/jabberd/jsm.so</mod_auth_plain>
85
+       <!-- mod_auth_crypt: Password encrypted/hashed in storage,
86
+            clear text on the wire. Disabled as this only makes
87
+            sense when used exclusively and with SSL mandatory
88
+-      <mod_auth_crypt>./jsm/jsm.so</mod_auth_crypt> -->
89
++      <mod_auth_crypt>/usr/lib/jabberd/jsm.so</mod_auth_crypt> -->
90
+ 
91
+-      <mod_log>./jsm/jsm.so</mod_log>
92
+-      <mod_register>./jsm/jsm.so</mod_register>
93
+-      <mod_xml>./jsm/jsm.so</mod_xml>
94
++      <mod_log>/usr/lib/jabberd/jsm.so</mod_log>
95
++      <!-- commented out so no one can register!!!
96
++      <mod_register>/usr/lib/jabberd/jsm.so</mod_register>
97
++      -->
98
++      <mod_xml>/usr/lib/jabberd/jsm.so</mod_xml>
99
+     </load>
100
+ 
101
+   </service>
102
+@@ -353,10 +355,10 @@
103
+   <xdb id="xdb">
104
+     <host/>
105
+     <load>
106
+-      <xdb_file>./xdb_file/xdb_file.so</xdb_file>
107
++      <xdb_file>/usr/lib/jabberd/xdb_file.so</xdb_file>
108
+     </load>
109
+     <xdb_file xmlns="jabber:config:xdb_file">
110
+-      <spool><jabberd:cmdline flag='s'>./spool</jabberd:cmdline></spool>
111
++      <spool><jabberd:cmdline flag='s'>/var/spool/jabber</jabberd:cmdline></spool>
112
+     </xdb_file>
113
+   </xdb>
114
+ 
115
+@@ -387,7 +389,7 @@
116
+ 
117
+   <service id="c2s">
118
+     <load>
119
+-      <pthsock_client>./pthsock/pthsock_client.so</pthsock_client>
120
++      <pthsock_client>/usr/lib/jabberd/pthsock_client.so</pthsock_client>
121
+     </load>
122
+     <pthcsock xmlns='jabber:config:pth-csock'>
123
+       <authtime/>
124
+@@ -430,7 +432,7 @@
125
+     <host/>
126
+     <logtype/>
127
+     <format>%d: [%t] (%h): %s</format>
128
+-    <file>error.log</file>
129
++    <file>/var/log/jabber/error.log</file>
130
+     <stderr/>
131
+   </log>
132
+ 
133
+@@ -443,7 +445,7 @@
134
+     <host/>
135
+     <logtype>record</logtype>
136
+     <format>%d %h %s</format>
137
+-    <file>record.log</file>
138
++    <file>/var/log/jabber/record.log</file>
139
+   </log>
140
+ 
141
+   <!-- The following two services are for handling server-to-server traffic. -->
142
+@@ -453,7 +455,7 @@
143
+   <service id="dnsrv">
144
+     <host/>
145
+     <load>
146
+-      <dnsrv>./dnsrv/dnsrv.so</dnsrv>
147
++      <dnsrv>/usr/lib/jabberd/dnsrv.so</dnsrv>
148
+     </load>
149
+     <dnsrv xmlns="jabber:config:dnsrv">
150
+     	<resend service="_xmpp-server._tcp">s2s</resend> <!-- for supporting XMPP compliant SRV records -->
151
+@@ -473,7 +475,7 @@
152
+ 
153
+   <service id="s2s">
154
+     <load>
155
+-      <dialback>./dialback/dialback.so</dialback>
156
++      <dialback>/usr/lib/jabberd/dialback.so</dialback>
157
+     </load>
158
+     <dialback xmlns='jabber:config:dialback'>
159
+       <legacy/>
160
+@@ -641,8 +643,8 @@
161
+     -->
162
+     <!--
163
+     <ssl>
164
+-      <key ip='192.168.1.1'>/path/to/cert_and_key.pem</key>
165
+-      <key ip='192.168.1.100'>/path/to/other/cert_and_key.pem</key>
166
++      <key ip='192.168.1.1'>/etc/jabber/gentoo.pem</key>
167
++      <key ip='192.168.1.100'>/etc/jabber/gentoo.pem</key>
168
+     </ssl>
169
+     -->
170
+ 
... ...
@@ -0,0 +1,11 @@
1
+--- jabber.xml	2004-03-28 17:41:06.867787280 +0100
2
++++ jabber2.xml	2004-03-28 17:40:49.470432080 +0100
3
+@@ -670,7 +670,7 @@
4
+   <!--
5
+   This specifies the file to store the pid of the process in.
6
+   -->
7
+-  <pidfile>./jabber.pid</pidfile>
8
++  <pidfile>/var/log/jabber/jabberd14.pid</pidfile>
9
+ 
10
+ 
11
+ </jabber>
... ...
@@ -0,0 +1,465 @@
1
+<jabber>
2
+  <!--
3
+  This is the Jabber server configuration file. The file is
4
+  broken into different sections based on the services being 
5
+  managed by jabberd, the server daemon. Most of the important 
6
+  sections have comments and are easy to modify.
7
+
8
+  At http://jabberd.jabberstudio.org/1.4/ you find further
9
+  instructions including an annotated version of this con-
10
+  figuration file and an installation guide.
11
+  
12
+  Note that when you see a tag like "jabberd:cmdline", it's
13
+  automatically replaced on startup with the command line flag
14
+  passed in to jabberd. This enables you to override para-
15
+  meters set in this configuration file if necessary or de-
16
+  sired. Also note as you comment things in and out that
17
+  jabberd does not like comments within comments, so be care-
18
+  ful with your XML. :)
19
+  -->
20
+ 
21
+ 
22
+ <!-- 
23
+  The following <service/> section is for the session manager, 
24
+  the most important component within the server. This section
25
+  contains the following types of information: 
26
+
27
+    * the server's hostname
28
+    * other basic server information
29
+    * the location of the session log file
30
+    * email addresses for server administrators 
31
+    * registration instructions for new users
32
+    * a welcome message for new users
33
+    * a list of agents with which users can register
34
+    * load rules for the modules within the session manager
35
+
36
+  -->
37
+
38
+  <service id="sessions">
39
+    <!-- 
40
+    Replace all occurrences of "localhost" in this file by
41
+    the hostname of your Jabber server. Be aware changing
42
+    the server's name is all but impossible once users start
43
+    to use the server. So choose a name that is permanent
44
+    (especially no Intranet hostnames or IP addresses).
45
+
46
+    Multiple <host/> entries are allowed - each one is for a 
47
+    separate virtual server. Note that each host entry must 
48
+    be on one line, the server doesn't like it otherwise! :)
49
+    Use lowercase for the hostname.
50
+    -->
51
+
52
+    <host><jabberd:cmdline flag="h">localhost</jabberd:cmdline></host>
53
+    
54
+    <!-- 
55
+    This is the custom configuration section for the 
56
+    Jabber session manager, a.k.a. "JSM". 
57
+    -->
58
+
59
+    <jsm xmlns="jabber:config:jsm">
60
+
61
+      <filter>
62
+          <default/>
63
+          <max_size>100</max_size>
64
+          <allow>
65
+              <conditions>
66
+                  <ns/>
67
+                  <unavailable/>
68
+                  <from/>
69
+                  <resource/>
70
+                  <subject/>
71
+                  <body/>
72
+                  <show/>
73
+                  <type/>
74
+                  <roster/>
75
+                  <group/>
76
+              </conditions>
77
+              <actions>
78
+                  <error/>
79
+                  <offline/>
80
+                  <forward/>
81
+                  <reply/>
82
+                  <continue/>
83
+                  <settype/>
84
+              </actions>
85
+          </allow>
86
+      </filter>
87
+	<!-- The server vCard -->
88
+      <vCard>
89
+        <FN>localhost</FN>
90
+        <DESC>localhost</DESC>
91
+        <URL>http://localhost/</URL>
92
+      </vCard>
93
+
94
+      <!-- commented out so no one can register!!! 
95
+      <register notify="yes">
96
+        <instructions>Choose a username and password to register with this server.</instructions>
97
+        <name/>
98
+        <email/>
99
+      </register>
100
+      -->
101
+
102
+      <!-- 
103
+      A welcome note that is sent to every new user who registers 
104
+      with your server. Comment it out to disable this function.
105
+      -->
106
+
107
+      <welcome>
108
+        <subject>Welcome!</subject>
109
+        <body>Welcome to the Private Jabber server at localhost -- we hope you enjoy this service! For Questions and Remarks, please contact Foo Bar [ foobar@localhost ]. </body>
110
+      </welcome>
111
+
112
+      <!-- 
113
+      IDs with admin access - these people will receive admin 
114
+      messages (any message to="yourhostname" is an admin
115
+      message).  These addresses must be local ids, they cannot
116
+      be remote addresses.
117
+
118
+      Note that they can also send announcements to all
119
+      users of the server, or to all online users. To use
120
+      the announcement feature, you need to send raw xml and be
121
+      logged in as one of the admin users. Here is the syntax 
122
+      for sending an announcement to online users:
123
+
124
+        <message to="yourhostname/announce/online">
125
+          <body>announcement here</body>
126
+        </message>
127
+
128
+        <message to="yourhostname/announce/motd">
129
+          <body>message (of the day) that is sent only once to all users that are logged in and additionally to new ones as they log in</body>
130
+        </message>
131
+
132
+      Sending to /announce/motd/delete will remove any existing
133
+      motd, and to /announce/motd/update will only update the motd
134
+      without re-announcing to all logged in users.
135
+
136
+      The <reply> will be the message that is automatically
137
+      sent in response to any admin messages.
138
+      -->
139
+
140
+      <admin>
141
+        <read>foobar@localhost</read>
142
+        <write>foobar@localhost</write>
143
+        <reply>
144
+          <subject>Auto Reply</subject>
145
+          <body>This is a special administrative address.  Your message was received and forwarded to server administrators.</body>
146
+        </reply>
147
+      </admin>
148
+
149
+
150
+      <vcard2jud/>
151
+	<browse>
152
+
153
+<!-- Place to "advertise" your transports -->
154
+<!--
155
+      The <browse/> section identifies the transports and other
156
+      services that are available from this server. Note that each
157
+      entity identified here must exist elsewhere or be further 
158
+      defined in its own <service/> section below. These services 
159
+      will appear in the user interface of Jabber clients that
160
+      connect to your server.
161
+      The <browse/> section is also used by mod_disco (see below)
162
+      for building the disco#items reply.
163
+      -->
164
+<!-- An example that would setup a Jabber User Directory could be:
165
+
166
+<service type="jud" jid="jud.localhost" name="Jabber User Directory">
167
+        <ns>jabber:iq:search</ns>
168
+        <ns>jabber:iq:register</ns>
169
+</service>
170
+
171
+-->
172
+	</browse>
173
+	</jsm>
174
+
175
+    <load main="jsm">
176
+      <jsm>/usr/lib/jabberd/jsm.so</jsm>
177
+      <mod_echo>/usr/lib/jabberd/jsm.so</mod_echo>
178
+      <mod_roster>/usr/lib/jabberd/jsm.so</mod_roster>
179
+      <mod_time>/usr/lib/jabberd/jsm.so</mod_time>
180
+      <mod_vcard>/usr/lib/jabberd/jsm.so</mod_vcard>
181
+      <mod_last>/usr/lib/jabberd/jsm.so</mod_last>
182
+      <mod_version>/usr/lib/jabberd/jsm.so</mod_version>
183
+      <mod_announce>/usr/lib/jabberd/jsm.so</mod_announce>
184
+      <mod_agents>/usr/lib/jabberd/jsm.so</mod_agents>
185
+      <mod_browse>/usr/lib/jabberd/jsm.so</mod_browse>
186
+      <mod_admin>/usr/lib/jabberd/jsm.so</mod_admin>
187
+      <mod_filter>/usr/lib/jabberd/jsm.so</mod_filter>
188
+      <mod_offline>/usr/lib/jabberd/jsm.so</mod_offline>
189
+      <mod_presence>/usr/lib/jabberd/jsm.so</mod_presence>
190
+      <mod_auth_plain>/usr/lib/jabberd/jsm.so</mod_auth_plain>
191
+      <mod_auth_digest>/usr/lib/jabberd/jsm.so</mod_auth_digest>
192
+      <mod_log>/usr/lib/jabberd/jsm.so</mod_log>
193
+<!-- commented out so no one can register!!!
194
+      <mod_register>/usr/lib/jabberd/jsm.so</mod_register>
195
+-->
196
+      <mod_xml>/usr/lib/jabberd/jsm.so</mod_xml>
197
+    </load>
198
+
199
+  </service>
200
+ <!--
201
+  The <xdb/> component handles all data storage, using the filesystem.
202
+  Make sure the spool directory defined here exists and has proper
203
+  permissions.
204
+  -->
205
+
206
+  <xdb id="xdb">
207
+    <host/>
208
+    <load>
209
+      <xdb_file>/usr/lib/jabberd/xdb_file.so</xdb_file>
210
+    </load>
211
+    <xdb_file xmlns="jabber:config:xdb_file">
212
+      <spool><jabberd:cmdline flag='s'>/var/spool/jabber</jabberd:cmdline></spool>
213
+    </xdb_file>
214
+  </xdb>
215
+
216
+  <!--
217
+  The following service manages incoming client socket connections.
218
+  There are several items you can set here to optimize performance:
219
+
220
+    * authtime - default is unlimited, but you can set this to
221
+      limit the amount of time allowed for authentication to be
222
+      completed, e.g., <authtime>10</authtime> for 10 seconds
223
+
224
+    * heartbeat - default is to not send out heartbeat packets
225
+      to the clients.  This option allows you to specify that
226
+      you want heartbeats to happen every x seconds.  This is
227
+      useful if you have a lot of dial-up or laptop users who
228
+      may drop their connection without logging off of jabber.
229
+      Otherwise the server won't notice that they are offline until
230
+      someone tries to send a packet to them (and the message is
231
+      lost).  Example: <heartbeat>60</heartbeat>
232
+
233
+    * karma - this is an input/output rate limiting system that
234
+      the Jabber team came up with to prevent bandwidth hogging.
235
+      For details about karma, read the io section at the bottom.
236
+      These are the low settings and apply per connection/socket
237
+      and can be changed as desired.
238
+      To disable rate limiting just delete the <karma/> section.
239
+  -->
240
+
241
+
242
+  <service id="c2s">
243
+    <load>
244
+      <pthsock_client>/usr/lib/jabberd/pthsock_client.so</pthsock_client>
245
+    </load>
246
+    <pthcsock xmlns='jabber:config:pth-csock'>
247
+      <authtime/>
248
+      <karma>
249
+        <init>10</init>
250
+        <max>10</max>
251
+        <inc>1</inc>
252
+        <dec>1</dec>
253
+	<heartbeat>60</heartbeat>
254
+        <penalty>-6</penalty>
255
+        <restore>10</restore>
256
+      </karma>
257
+
258
+        <!-- 
259
+      Use these to listen on particular addresses and/or ports.
260
+      Example: <ip port="5222">127.0.0.1</ip>
261
+      Default is to listen on port 5222 on every interface.
262
+      Remove the <ip/> section to disable non-ssl client connections.
263
+      -->
264
+      <ip port="5222"/>
265
+
266
+      <!--
267
+      The <ssl/> tag acts pretty much like the <ip/> tag,
268
+      except it defines that SSL is to be used on the 
269
+      ports and IP addresses specified. You must specify
270
+      an IP address here, or the connections will fail.
271
+      <ssl port='5223'>127.0.0.1</ssl>
272
+      <ssl port='5224'>192.168.1.100</ssl>
273
+      -->
274
+
275
+	
276
+	</pthcsock>
277
+  </service>
278
+  
279
+  <!-- 
280
+  This is the default server error logging component, 
281
+  which copies to a file and to STDERR. 
282
+  -->
283
+
284
+  <log id='elogger'>
285
+    <host/>
286
+    <logtype/>
287
+    <format>%d: [%t] (%h): %s</format>
288
+    <file>/var/log/jabber/error.log</file>
289
+    <stderr/>
290
+  </log>
291
+
292
+  <log id='rlogger'>
293
+    <host/>
294
+    <logtype>record</logtype>
295
+    <format>%d %h %s</format>
296
+    <file>/var/log/jabber/record.log</file>
297
+  </log>
298
+
299
+  <service id="dnsrv">
300
+    <host/>
301
+    <load>
302
+      <dnsrv>/usr/lib/jabberd/dnsrv.so</dnsrv>
303
+    </load>
304
+    <dnsrv xmlns="jabber:config:dnsrv">
305
+    	<resend service="_jabber._tcp">s2s</resend> <!-- for supporting SRV records -->
306
+    	<resend>s2s</resend>
307
+    </dnsrv>
308
+  </service>
309
+  
310
+  <!--
311
+  The following 's2s' config handles server connections and 
312
+  dialback hostname verification.  The <legacy/> element is 
313
+  here to enable communication with old 1.0 servers. The 
314
+  karma settings are a little higher here to handle the 
315
+  higher traffic of server-to-server connections (read
316
+  the io section below for more details, medium settings).
317
+  -->
318
+  <service id="s2s">
319
+    <load>
320
+      <dialback>/usr/lib/jabberd/dialback.so</dialback>
321
+    </load>
322
+    <dialback xmlns='jabber:config:dialback'>
323
+      <legacy/>
324
+      <ip port="5269"/>
325
+      <karma>
326
+        <init>50</init>
327
+        <max>50</max>
328
+        <inc>4</inc>
329
+        <dec>1</dec>
330
+        <penalty>-5</penalty>
331
+        <restore>50</restore>
332
+      </karma>
333
+    </dialback>
334
+  </service>
335
+
336
+ <!--
337
+  update.jabber.org is long dead but some clients still
338
+  request update information. In order to avoid errors
339
+  in the logs, just drop packages for update.jabber.org.
340
+  -->
341
+  <service id="update.jabber.org">
342
+    <host>update.jabber.org</host>
343
+    <null/>
344
+  </service>
345
+
346
+  <!-- 
347
+  If you identified additional agents in the main <service/> 
348
+  section (see examples above), you'll need to define each 
349
+  of them here using a separate <service/> section for each 
350
+  <agent/> you identified. Note that the <agent/> sections
351
+  determine what gets shown to clients that connect to your
352
+  server, whereas the following <service/> sections define
353
+  these services within the server itself. The following are
354
+  examples only, you will need to create/modify them to get 
355
+  them working on your Jabber server. See the README files 
356
+  for each agent and/or the server howto for further 
357
+  information/instructions. 
358
+  -->
359
+
360
+  <!-- we're commenting these out, of course :)
361
+<service id="jud">
362
+  <host>jud.localhost</host>
363
+  <load><jud>/usr/lib/jabberd/jud.so</jud></load>
364
+  <jud xmlns="jabber:config:jud">
365
+    <vCard>
366
+      <FN>Local User Directory</FN>
367
+      <DESC>This service provides a simple user directory service.</DESC>
368
+      <URL>http://jud.jabberstudio.org/</URL>
369
+    </vCard>
370
+  </jud>
371
+</service>
372
+	-->
373
+
374
+  <io>
375
+    <!-- Set the default karma for *all* sockets -->
376
+    <!-- definition of terms:
377
+
378
+      * Avg. Throughput - The number of bytes you can
379
+        send every second without incuring any penalty.
380
+
381
+      * Burst Allowed - The maximum number of bytes you
382
+        can send in 2 seconds without incurring any penalty.
383
+
384
+      * Max Sustained Rate - If you send data as fast as 
385
+        you can, you will hit penalty, and will not be 
386
+        able to send for 10 seconds; the max sustained 
387
+        rate is the average rate you can dump data when 
388
+        you are dumping as much data as you can, as fast 
389
+        as you can.
390
+
391
+      * Seconds to Recover from Burst - The amount of time 
392
+        it will take to reach Avg. Throughput capability 
393
+        after sending a max burst of data.
394
+
395
+      * Penalty Length - The length of your penalty is
396
+        determined according to this formula:
397
+              abs(penalty) * Heartbeat seconds
398
+        E.g., a penalty of -5 and heartbeat of 2 will 
399
+        cause your penalty length to be 10 seconds. 
400
+   Note that a penalty CANNOT be less than -100, 
401
+        otherwise strange things might happen.
402
+
403
+    -->
404
+     <!-- Example of Low Karma Limits 
405
+        Avg. Throughput: 1k-2k/s 
406
+        Burst Allowed To: 5.5k/s 
407
+        Max Sustained Rate: 485b/s
408
+        Seconds to Recover from Burst: 20
409
+        Penalty Length: 12 seconds
410
+    <karma>
411
+      <heartbeat>2</heartbeat>
412
+      <init>10</init>
413
+      <max>10</max>
414
+      <inc>1</inc>
415
+      <dec>1</dec>
416
+      <penalty>-6</penalty>
417
+      <restore>10</restore>
418
+    </karma>
419
+    -->
420
+
421
+       <!-- 
422
+    Set rate limits to monitor the number of connection
423
+    attempts from a single IP, any more than [points]
424
+    within [time] will engage the limit.  This setting
425
+    applies to all incoming connections to any service,
426
+    unless otherwise overridden by that service.
427
+    -->
428
+    
429
+    <rate points="5" time="25"/>
430
+
431
+        <!-- 
432
+    The following section initializes SSL for top-level I/O.
433
+    This works only when the server is compiled with openssl!
434
+    Use IPs here or connections will fail.
435
+    -->
436
+
437
+    <ssl>
438
+      <key ip="64.57.168.155">/etc/jabber/gentoo.pem</key>
439
+    </ssl>
440
+  <!-- 
441
+    The following section is used to allow or deny 
442
+    communications from specified IP networks or 
443
+    addressses. If there is no <allow/> section, 
444
+    then *all* IPs will be allowed to connect. If 
445
+    you allow one block, then only that block may 
446
+    connect. Note that <allow/> is checked before
447
+    <deny/>, so if a specific address is allowed 
448
+    but the network for that address is denied, 
449
+    then that address will still be denied.
450
+    -->
451
+    <!--
452
+    <allow><ip>127.0.0.0</ip><mask>255.255.255.0</mask></allow>
453
+    <allow><ip>12.34.56.78</ip></allow>
454
+    <deny><ip>22.11.44.0</ip><mask>255.255.255.0</mask></deny>
455
+    -->
456
+
457
+  </io>
458
+
459
+  <!--
460
+  This specifies the file to store the pid of the process in.
461
+  -->
462
+
463
+  <pidfile>/var/run/jabber.pid</pidfile>
464
+
465
+</jabber>
... ...
@@ -0,0 +1,260 @@
1
+diff -ru c2sorig/authreg.c c2s/authreg.c
2
+--- c2sorig/authreg.c	Mon Nov 22 15:53:34 2004
3
++++ c2s/authreg.c	Mon Nov 22 20:06:25 2004
4
+@@ -623,7 +623,7 @@
5
+         log_write(c2s->log, LOG_NOTICE, "[%d] created user: user=%s; realm=%s", sess->s->tag, username, sess->realm);
6
+ 
7
+     /* extract the password */
8
+-    snprintf(password, 1024, "%.*s", NAD_CDATA_L(nad, elem), NAD_CDATA(nad, elem));
9
++    snprintf(password, 257, "%.*s", NAD_CDATA_L(nad, elem), NAD_CDATA(nad, elem));
10
+ 
11
+     /* change it */
12
+     if((c2s->ar->set_password)(c2s->ar, username, sess->realm, password) != 0)
13
+diff -ru c2sorig/authreg_mysql.c c2s/authreg_mysql.c
14
+--- c2sorig/authreg_mysql.c	Mon Nov 22 15:53:34 2004
15
++++ c2s/authreg_mysql.c	Mon Nov 22 16:55:37 2004
16
+@@ -24,6 +24,10 @@
17
+ 
18
+ #ifdef STORAGE_MYSQL
19
+ 
20
++#define MYSQL_LU  1024   /* maximum length of username - should correspond to field length */
21
++#define MYSQL_LR   256   /* maximum length of realm - should correspond to field length */
22
++#define MYSQL_LP   256   /* maximum length of password - should correspond to field length */
23
++
24
+ #include <mysql.h>
25
+ 
26
+ typedef struct mysqlcontext_st {
27
+@@ -42,7 +46,8 @@
28
+ static MYSQL_RES *_ar_mysql_get_user_tuple(authreg_t ar, char *username, char *realm) {
29
+     mysqlcontext_t ctx = (mysqlcontext_t) ar->private;
30
+     MYSQL *conn = ctx->conn;
31
+-    char euser[2049], erealm[2049], sql[5121];  /* query(1024) + euser(2048) + erealm(2048) + \0(1) */
32
++    char iuser[MYSQL_LU+1], irealm[MYSQL_LR+1];
33
++    char euser[MYSQL_LU*2+1], erealm[MYSQL_LR*2+1], sql[1024 + MYSQL_LU*2 + MYSQL_LR*2 + 1];  /* query(1024) + euser + erealm + \0(1) */
34
+     MYSQL_RES *res;
35
+     
36
+     if(mysql_ping(conn) != 0) {
37
+@@ -50,8 +55,11 @@
38
+         return NULL;
39
+     }
40
+ 
41
+-    mysql_real_escape_string(conn, euser, username, strlen(username));
42
+-    mysql_real_escape_string(conn, erealm, realm, strlen(realm));
43
++    snprintf(iuser, MYSQL_LU+1, "%s", username);
44
++    snprintf(irealm, MYSQL_LR+1, "%s", realm);
45
++
46
++    mysql_real_escape_string(conn, euser, iuser, strlen(iuser));
47
++    mysql_real_escape_string(conn, erealm, irealm, strlen(irealm));
48
+ 
49
+     sprintf(sql, ctx->sql_select, euser, erealm);
50
+ 
51
+@@ -127,15 +135,21 @@
52
+ static int _ar_mysql_set_password(authreg_t ar, char *username, char *realm, char password[257]) {
53
+     mysqlcontext_t ctx = (mysqlcontext_t) ar->private;
54
+     MYSQL *conn = ctx->conn;
55
+-    char euser[2049], erealm[2049], epass[513], sql[5633];  /* query(1024) + euser(2048) + erealm(2048) + epass(512) + \0(1) */
56
++    char iuser[MYSQL_LU+1], irealm[MYSQL_LR+1];
57
++    char euser[MYSQL_LU*2+1], erealm[MYSQL_LR*2+1], epass[513], sql[1024+MYSQL_LU*2+MYSQL_LR*2+512+1];  /* query(1024) + euser + erealm + epass(512) + \0(1) */
58
+ 
59
+     if(mysql_ping(conn) != 0) {
60
+         log_write(ar->c2s->log, LOG_ERR, "mysql: connection to database lost");
61
+         return 1;
62
+     }
63
+ 
64
+-    mysql_real_escape_string(conn, euser, username, strlen(username));
65
+-    mysql_real_escape_string(conn, erealm, realm, strlen(realm));
66
++    snprintf(iuser, MYSQL_LU+1, "%s", username);
67
++    snprintf(irealm, MYSQL_LR+1, "%s", realm);
68
++
69
++    password[256]= '\0';
70
++
71
++    mysql_real_escape_string(conn, euser, iuser, strlen(iuser));
72
++    mysql_real_escape_string(conn, erealm, irealm, strlen(irealm));
73
+     mysql_real_escape_string(conn, epass, password, strlen(password));
74
+ 
75
+     sprintf(sql, ctx->sql_setpassword, epass, euser, erealm);
76
+@@ -195,15 +209,19 @@
77
+ static int _ar_mysql_set_zerok(authreg_t ar, char *username, char *realm, char hash[41], char token[11], int sequence) {
78
+     mysqlcontext_t ctx = (mysqlcontext_t) ar->private;
79
+     MYSQL *conn = ctx->conn;
80
+-    char euser[2049], erealm[2049], ehash[81], etoken[21], sql[5233]; /* query(1024) + euser(2048) + erealm(2048) + ehash(80) + etoken(20) + sequence(12) + \0(1) */
81
++    char iuser[MYSQL_LU+1], irealm[MYSQL_LR+1];
82
++    char euser[MYSQL_LU*2+1], erealm[MYSQL_LR*2+1], ehash[81], etoken[21], sql[1024+MYSQL_LU*2+MYSQL_LR*2+80+20+12+1]; /* query(1024) + euser + erealm + ehash(80) + etoken(20) + sequence(12) + \0(1) */
83
+ 
84
+     if(mysql_ping(conn) != 0) {
85
+         log_write(ar->c2s->log, LOG_ERR, "mysql: connection to database lost");
86
+         return 1;
87
+     }
88
+ 
89
+-    mysql_real_escape_string(conn, euser, username, strlen(username));
90
+-    mysql_real_escape_string(conn, erealm, realm, strlen(realm));
91
++    snprintf(iuser, MYSQL_LU+1, "%s", username);
92
++    snprintf(irealm, MYSQL_LR+1, "%s", realm);
93
++
94
++    mysql_real_escape_string(conn, euser, iuser, strlen(iuser));
95
++    mysql_real_escape_string(conn, erealm, irealm, strlen(irealm));
96
+     mysql_real_escape_string(conn, ehash, hash, strlen(hash));
97
+     mysql_real_escape_string(conn, etoken, token, strlen(token));
98
+ 
99
+@@ -222,7 +240,8 @@
100
+ static int _ar_mysql_create_user(authreg_t ar, char *username, char *realm) {
101
+     mysqlcontext_t ctx = (mysqlcontext_t) ar->private;
102
+     MYSQL *conn = ctx->conn;
103
+-    char euser[2049], erealm[2049], sql[5121];    /* query(1024) + euser(2048) + erealm(2048) + \0(1) */
104
++    char iuser[MYSQL_LU+1], irealm[MYSQL_LR+1];
105
++    char euser[MYSQL_LU*2+1], erealm[MYSQL_LR*2+1], sql[1024+MYSQL_LU*2+MYSQL_LR*2+1];    /* query(1024) + euser + erealm + \0(1) */
106
+     MYSQL_RES *res = _ar_mysql_get_user_tuple(ar, username, realm);
107
+ 
108
+     if(res != NULL) {
109
+@@ -237,8 +256,11 @@
110
+         return 1;
111
+     }
112
+ 
113
+-    mysql_real_escape_string(conn, euser, username, strlen(username));
114
+-    mysql_real_escape_string(conn, erealm, realm, strlen(realm));
115
++    snprintf(iuser, MYSQL_LU+1, "%s", username);
116
++    snprintf(irealm, MYSQL_LR+1, "%s", realm);
117
++
118
++    mysql_real_escape_string(conn, euser, iuser, strlen(iuser));
119
++    mysql_real_escape_string(conn, erealm, irealm, strlen(irealm));
120
+ 
121
+     sprintf(sql, ctx->sql_create, euser, erealm);
122
+ 
123
+@@ -255,15 +277,19 @@
124
+ static int _ar_mysql_delete_user(authreg_t ar, char *username, char *realm) {
125
+     mysqlcontext_t ctx = (mysqlcontext_t) ar->private;
126
+     MYSQL *conn = ctx->conn;
127
+-    char euser[2049], erealm[2049], sql[5121];    /* query(1024) + euser(2048) + erealm(2048) + \0(1) */
128
++    char iuser[MYSQL_LU+1], irealm[MYSQL_LR+1];
129
++    char euser[MYSQL_LU*2+1], erealm[MYSQL_LR*2+1], sql[1024+MYSQL_LU*2+MYSQL_LR*2+1];    /* query(1024) + euser + erealm + \0(1) */
130
+ 
131
+     if(mysql_ping(conn) != 0) {
132
+         log_write(ar->c2s->log, LOG_ERR, "mysql: connection to database lost");
133
+         return 1;
134
+     }
135
+ 
136
+-    mysql_real_escape_string(conn, euser, username, strlen(username));
137
+-    mysql_real_escape_string(conn, erealm, realm, strlen(realm));
138
++    snprintf(iuser, MYSQL_LU+1, "%s", username);
139
++    snprintf(irealm, MYSQL_LR+1, "%s", realm);
140
++
141
++    mysql_real_escape_string(conn, euser, iuser, strlen(iuser));
142
++    mysql_real_escape_string(conn, erealm, irealm, strlen(irealm));
143
+ 
144
+     sprintf(sql, ctx->sql_delete, euser, erealm);
145
+ 
146
+diff -ru c2sorig/authreg_pgsql.c c2s/authreg_pgsql.c
147
+--- c2sorig/authreg_pgsql.c	Mon Nov 22 15:53:34 2004
148
++++ c2s/authreg_pgsql.c	Mon Nov 22 16:52:20 2004
149
+@@ -26,6 +26,10 @@
150
+ 
151
+ #include <libpq-fe.h>
152
+ 
153
++#define PGSQL_LU  1024   /* maximum length of username - should correspond to field length */
154
++#define PGSQL_LR   256   /* maximum length of realm - should correspond to field length */
155
++#define PGSQL_LP   256   /* maximum length of password - should correspond to field length */
156
++
157
+ typedef struct pgsqlcontext_st {
158
+   PGconn * conn;
159
+   char * sql_create;
160
+@@ -42,11 +46,16 @@
161
+ static PGresult *_ar_pgsql_get_user_tuple(authreg_t ar, char *username, char *realm) {
162
+     pgsqlcontext_t ctx = (pgsqlcontext_t) ar->private;
163
+     PGconn *conn = ctx->conn;
164
+-    char euser[2049], erealm[2049], sql[5121];  /* query(1024) + euser(2048) + erealm(2048) + \0(1) */
165
++
166
++    char iuser[PGSQL_LU+1], irealm[PGSQL_LR+1];
167
++    char euser[PGSQL_LU*2+1], erealm[PGSQL_LR*2+1], sql[1024+PGSQL_LU*2+PGSQL_LR*2+1];  /* query(1024) + euser + erealm + \0(1) */
168
+     PGresult *res;
169
+ 
170
+-    PQescapeString(euser, username, strlen(username));
171
+-    PQescapeString(erealm, realm, strlen(realm));
172
++    snprintf(iuser, PGSQL_LU+1, "%s", username);
173
++    snprintf(irealm, PGSQL_LR+1, "%s", realm);
174
++
175
++    PQescapeString(euser, iuser, strlen(iuser));
176
++    PQescapeString(erealm, irealm, strlen(irealm));
177
+ 
178
+     sprintf(sql, ctx->sql_select, euser, erealm);
179
+ 
180
+@@ -114,11 +123,15 @@
181
+ static int _ar_pgsql_set_password(authreg_t ar, char *username, char *realm, char password[257]) {
182
+     pgsqlcontext_t ctx = (pgsqlcontext_t) ar->private;
183
+     PGconn *conn = ctx->conn;
184
+-    char euser[2049], erealm[2049], epass[513], sql[5633];  /* query(1024) + euser(2048) + erealm(2048) + epass(512) + \0(1) */
185
++    char iuser[PGSQL_LU+1], irealm[PGSQL_LR+1];
186
++    char euser[PGSQL_LU*2+1], erealm[PGSQL_LR*2+1], epass[513], sql[1024+PGSQL_LU*2+PGSQL_LR*2+512+1];  /* query(1024) + euser + erealm + epass(512) + \0(1) */
187
+     PGresult *res;
188
+ 
189
+-    PQescapeString(euser, username, strlen(username));
190
+-    PQescapeString(erealm, realm, strlen(realm));
191
++    snprintf(iuser, PGSQL_LU+1, "%s", username);
192
++    snprintf(irealm, PGSQL_LR+1, "%s", realm);
193
++
194
++    PQescapeString(euser, iuser, strlen(iuser));
195
++    PQescapeString(erealm, irealm, strlen(irealm));
196
+     PQescapeString(epass, password, strlen(password));
197
+ 
198
+     sprintf(sql, ctx->sql_setpassword, epass, euser, erealm);
199
+@@ -177,11 +190,15 @@
200
+ static int _ar_pgsql_set_zerok(authreg_t ar, char *username, char *realm, char hash[41], char token[11], int sequence) {
201
+     pgsqlcontext_t ctx = (pgsqlcontext_t) ar->private;
202
+     PGconn *conn = ctx->conn;
203
+-    char euser[2049], erealm[2049], ehash[81], etoken[21], sql[5233]; /* query(1024) + euser(2048) + erealm(2048) + ehash(80) + etoken(20) + sequence(12) + \0(1) */
204
++    char iuser[PGSQL_LU+1], irealm[PGSQL_LR+1];
205
++    char euser[PGSQL_LU*2+1], erealm[PGSQL_LR*2+1], ehash[81], etoken[21], sql[1024 + PGSQL_LU*2 + PGSQL_LR*2 + 80 + 20 + 12 + 1]; /* query(1024) + euser + erealm + ehash(80) + etoken(20) + sequence(12) + \0(1) */
206
+     PGresult *res;
207
+ 
208
+-    PQescapeString(euser, username, strlen(username));
209
+-    PQescapeString(erealm, realm, strlen(realm));
210
++    snprintf(iuser, PGSQL_LU+1, "%s", username);
211
++    snprintf(irealm, PGSQL_LR+1, "%s", realm);
212
++
213
++    PQescapeString(euser, iuser, strlen(iuser));
214
++    PQescapeString(erealm, irealm, strlen(irealm));
215
+     PQescapeString(ehash, hash, strlen(hash));
216
+     PQescapeString(etoken, token, strlen(token));
217
+ 
218
+@@ -210,7 +227,8 @@
219
+ static int _ar_pgsql_create_user(authreg_t ar, char *username, char *realm) {
220
+     pgsqlcontext_t ctx = (pgsqlcontext_t) ar->private;
221
+     PGconn *conn = ctx->conn;
222
+-    char euser[2049], erealm[2049], sql[5121];    /* query(1024) + euser(2048) + erealm(2048) + \0(1) */
223
++    char iuser[PGSQL_LU+1], irealm[PGSQL_LR+1];
224
++    char euser[PGSQL_LU*2+1], erealm[PGSQL_LR*2+1], sql[1024+PGSQL_LU*2+PGSQL_LR*2+1];  /* query(1024) + euser + erealm + \0(1) */
225
+     PGresult *res;
226
+ 
227
+     res = _ar_pgsql_get_user_tuple(ar, username, realm);
228
+@@ -221,8 +239,11 @@
229
+ 
230
+     PQclear(res);
231
+ 
232
+-    PQescapeString(euser, username, strlen(username));
233
+-    PQescapeString(erealm, realm, strlen(realm));
234
++    snprintf(iuser, PGSQL_LU+1, "%s", username);
235
++    snprintf(irealm, PGSQL_LR+1, "%s", realm);
236
++
237
++    PQescapeString(euser, iuser, strlen(iuser));
238
++    PQescapeString(erealm, irealm, strlen(irealm));
239
+ 
240
+     sprintf(sql, ctx->sql_create, euser, erealm);
241
+ 
242
+@@ -249,11 +270,15 @@
243
+ static int _ar_pgsql_delete_user(authreg_t ar, char *username, char *realm) {
244
+     pgsqlcontext_t ctx = (pgsqlcontext_t) ar->private;
245
+     PGconn *conn = ctx->conn;
246
+-    char euser[2049], erealm[2049], sql[5121];    /* query(1024) + euser(2048) + erealm(2048) + \0(1) */
247
++    char iuser[PGSQL_LU+1], irealm[PGSQL_LR+1];
248
++    char euser[PGSQL_LU*2+1], erealm[PGSQL_LR*2+1], sql[1024+PGSQL_LU*2+PGSQL_LR*2+1];    /* query(1024) + euser + erealm + \0(1) */
249
+     PGresult *res;
250
+ 
251
+-    PQescapeString(euser, username, strlen(username));
252
+-    PQescapeString(erealm, realm, strlen(realm));
253
++    snprintf(iuser, PGSQL_LU+1, "%s", username);
254
++    snprintf(irealm, PGSQL_LR+1, "%s", realm);
255
++
256
++    PQescapeString(euser, iuser, strlen(iuser));
257
++    PQescapeString(erealm, irealm, strlen(irealm));
258
+ 
259
+     sprintf(sql, ctx->sql_delete, euser, erealm);
260
+ 
... ...
@@ -0,0 +1,25 @@
1
+#!/bin/bash
2
+
3
+######
4
+#
5
+# Generate a certificate and key with no passphrase.
6
+#
7
+######
8
+
9
+OPENSSL=/usr/bin/openssl
10
+
11
+## Remove existing temporary private key
12
+test -f /tmp/privkey.pem && rm -f /tmp/privkey.pem
13
+## Remove existing private key
14
+test -f /etc/jabberd/gentoo.pem && rm -f /etc/jabberd/gentoo.pem
15
+## This generates the cert and key
16
+$OPENSSL req -new -x509 -newkey rsa:2048 -keyout /tmp/privkey.pem -out /etc/jabberd/gentoo.pem
17
+## This will remove the passphrase
18
+$OPENSSL rsa -in /tmp/privkey.pem -out /tmp/privkey.pem
19
+## Put it all together
20
+cat /tmp/privkey.pem >> /etc/jabberd/gentoo.pem
21
+## Cleanup
22
+rm -f /tmp/privkey.pem
23
+echo ""
24
+echo "Your new key is /etc/jabberd/gentoo.pem"
25
+echo ""
... ...
@@ -0,0 +1,21 @@
1
+#!/bin/bash
2
+
3
+######
4
+#
5
+# Generate a certificate and key with no passphrase.
6
+#
7
+######
8
+
9
+OPENSSL=/usr/bin/openssl
10
+
11
+## This generates the cert and key
12
+$OPENSSL req -new -x509 -newkey rsa:1024 -keyout /tmp/privkey.pem -out /etc/jabber/gentoo.pem
13
+## This will remove the passphrase
14
+$OPENSSL rsa -in /tmp/privkey.pem -out /tmp/privkey.pem
15
+## Put it all together
16
+cat /tmp/privkey.pem >> /etc/jabber/gentoo.pem
17
+## Cleanup
18
+rm /tmp/privkey.pem
19
+echo ""
20
+echo "Your new key is /etc/jabber/gentoo.pem"
21
+echo ""
... ...
@@ -0,0 +1,35 @@
1
+<xdb id="xdb_ldap">
2
+  <ns>jabber:iq:auth:0k</ns>
3
+  <ns>jabber:iq:auth</ns>
4
+  <ns>vcard-temp</ns>
5
+  <ns>jabber:jud:users</ns>
6
+  <host/>
7
+  <load>
8
+    <xdb_ldap>/usr/lib/jabberd/xdb_ldap.so</xdb_ldap>
9
+  </load>
10
+  <xdb_ldap xmlns="jabberd:xdb_ldap:config">
11
+    <connection>
12
+      <host>localhost</host>
13
+      <port></port>
14
+      <rootdn>o=idx-jabber,c=fr</rootdn>
15
+      <uniqattr>cn</uniqattr>
16
+      <binddn>cn=jabberadmin, o=idx-jabber, c=fr</binddn>
17
+      <bindpw>secret</bindpw>
18
+    </connection>
19
+    <spool><jabberd:cmdline flag='s'>/var/spool/jabber</jabberd:cmdline></spool>
20
+  </xdb_ldap>
21
+</xdb>
22
+<xdb id="xdb_other">
23
+  <ns>jabber:iq:roster</ns>
24
+  <ns>jabber:iq:private</ns>
25
+  <ns>jabber:iq:register</ns>
26
+  <ns>jabber:iq:filter</ns>
27
+  <ns>jabber:x:offline</ns>
28
+  <host/>
29
+  <load>
30
+    <xdb_file>./xdb_file/xdb_file.so</xdb_file>
31
+  </load>
32
+  <xdb_file xmlns="jabber:config:xdb_file">
33
+    <spool><jabberd:cmdline flag='s'>/var/spool/jabber</jabberd:cmdline></spool>
34
+  </xdb_file>
35
+</xdb>
... ...
@@ -0,0 +1,17 @@
1
+--- error.c.old	2004-03-20 14:39:57.985636816 +0100
2
++++ error.c	2004-03-20 14:40:42.025941672 +0100
3
+@@ -71,7 +71,13 @@
4
+         len += sprintf(&(buf->data[len]), "<stream:error xmlns:stream='" uri_STREAMS "'><%s xmlns='" uri_STREAM_ERR "'/><text xmlns='" uri_STREAM_ERR "'>%s</text></stream:error>", _stream_errors[err], text);
5
+ 
6
+     if(s->state < state_STREAM)
7
+-        len += sprintf(&(buf->data[len]), "</stream:stream>");
8
++	{
9
++	 char *streamend= "</stream:stream>";
10
++	 printf ("About to write %d bytes\n", strlen (streamend)); 
11
++	 // len += sprintf(&(buf->data[len]), "</stream:stream>");
12
++	 memcpy (&(buf->data[len]), streamend, strlen (streamend)); 
13
++	 len += strlen (streamend); 
14
++	}
15
+ 
16
+     assert(len == buf->len);
17
+ 
... ...
@@ -0,0 +1,183 @@
1
+# Copyright 1999-2005 Gentoo Foundation
2
+# Distributed under the terms of the GNU General Public License v2
3
+# $Header: /var/cvsroot/gentoo-x86/net-im/jabberd/jabberd-1.4.3-r5.ebuild,v 1.5 2005/11/24 16:50:10 blubb Exp $
4
+
5
+inherit eutils multilib
6
+
7
+S="${WORKDIR}/jabberd-${PV}"
8
+DESCRIPTION="Open Source Jabber Server"
9
+HOMEPAGE="http://www.jabber.org"
10
+SRC_URI="http://jabberd.jabberstudio.org/1.4/dist/jabberd-${PV}.tar.gz
11
+	http://www.gentoo-pt.org/~humpback/jabberd-1.4.3-extexpat.diff
12
+	ldap? ( http://www.jabberstudio.org/files/xdb_ldap/xdb_ldap-1.0.tar.gz )"
13
+
14
+SLOT="0"
15
+LICENSE="GPL-2"
16
+KEYWORDS="x86 ~amd64"
17
+IUSE="ssl ldap ipv6"
18
+
19
+DEPEND="!net-im/jabber-server
20
+	>=dev-libs/pth-1.4.0
21
+	dev-libs/expat
22
+	ssl? ( >=dev-libs/openssl-0.9.6i )
23
+	ldap? ( =net-nds/openldap-2* )
24
+	>=net-im/jabber-base-0.0"
25
+
26
+
27
+pkg_setup() {
28
+
29
+	if use ipv6 ; then
30
+		ewarn "You are about to build with ipv6 support, if your system is not using ipv6"
31
+		ewarn "do control-c now and emerge with \"USE=-ipv6\" "
32
+		epause 5
33
+	fi
34
+}
35
+
36
+src_unpack() {
37
+	unpack jabberd-${PV}.tar.gz
38
+	cd ${S}
39
+	use ldap && unpack xdb_ldap-1.0.tar.gz
40
+	epatch ${FILESDIR}/multiple-xml-patch-00
41
+	epatch ${FILESDIR}/multiple-xml-patch-01
42
+	#Patch for extexpat DoS http://www.jabber.org/pipermail/jadmin/2004-September/018046.html
43
+	epatch ${DISTDIR}/jabberd-1.4.3-extexpat.diff
44
+	mv jabber.xml multiple.xml
45
+}
46
+
47
+src_compile() {
48
+	use amd64 && LDFLAGS='-Wl,-z,now' emerge jabberd
49
+	# These can cause problems with certain configure scripts used...
50
+	unset LC_ALL LC_CTYPE
51
+
52
+
53
+	local myconf
54
+	cd ${S}
55
+	use ssl && myconf="--enable-ssl"
56
+	use ipv6 && myconf="${myconf} --enable-ipv6"
57
+
58
+	dosed 's:pstrdup(jabberd__runtime,HOME):"/var/spool/jabber":' jabberd/jabberd.c
59
+	econf ${myconf} || die
60
+	emake || die
61
+
62
+	if use ldap; then
63
+		cd ${S}/xdb_ldap/src
64
+		make all || die
65
+	fi
66
+}
67
+
68
+src_install() {
69
+	insinto /etc/conf.d ; newins ${FILESDIR}/jabber-conf.d jabber
70
+	exeinto /etc/init.d ; newexe ${FILESDIR}/jabber.rc6-r8 jabber
71
+	dodir /usr/sbin /etc/jabber /usr/$(get_libdir)/jabberd /var/log/jabber /usr/include/jabberd
72
+	touch ${D}/var/log/jabber/error.log
73
+	touch ${D}/var/log/jabber/record.log
74
+	dodir /var/spool/jabber
75
+	dodir /var/run
76
+
77
+	exeinto /usr/sbin
78
+	doexe jabberd/jabberd
79
+	insinto /usr/$(get_libdir)/jabberd
80
+	doins platform-settings
81
+	doins jsm/jsm.so
82
+	doins xdb_file/xdb_file.so
83
+	doins pthsock/pthsock_client.so
84
+	doins dnsrv/dnsrv.so
85
+	doins dialback/dialback.so
86
+	if use ldap; then
87
+		insinto /etc/jabber
88
+		doins xdb_ldap/jabber.schema
89
+		doins xdb_ldap/slapd.conf
90
+		doins config/xdb-ldap.xml
91
+		insinto /usr/$(get_libdir)/jabberd
92
+		doins xdb_ldap/src/xdb_ldap.so
93
+	fi
94
+	insinto /etc/jabber
95
+	doins multiple.xml
96
+	exeinto /etc/jabber
97
+	doexe ${FILESDIR}/self-cert.sh
98
+
99
+	local test_group=`grep ^jabber: /etc/group | cut -d: -f1`
100
+	if [ -z $test_group ]
101
+	then
102
+		enewgroup jabber
103
+	fi
104
+
105
+	local test_user=`grep ^jabber: /etc/passwd | cut -d: -f1`
106
+	if [ -z $test_user ]
107
+	then
108
+		enewuser jabber -1 -1 /var/spool/jabber jabber
109
+	fi
110
+
111
+	dodoc README UPGRADE ${FILESDIR}/README.Gentoo
112
+
113
+	fowners jabber:jabber /etc/jabber
114
+	fowners jabber:jabber /usr/sbin/jabberd
115
+	fowners jabber:jabber /var/log/jabber
116
+	fowners jabber:jabber /var/log/jabber/error.log
117
+	fowners jabber:jabber /var/log/jabber/record.log
118
+	fowners jabber:jabber /var/spool/jabber
119
+
120
+	fperms o-rwx /etc/jabber
121
+	fperms o-rwx /usr/sbin/jabberd
122
+	fperms o-rwx /var/log/jabber
123
+	fperms o-rwx /var/log/jabber/error.log
124
+	fperms o-rwx /var/log/jabber/record.log
125
+	fperms o-rwx /var/spool/jabber
126
+	fperms u+rwx /usr/sbin/jabberd
127
+
128
+	fperms g-x /etc/jabber
129
+	fperms g-x /usr/sbin/jabberd
130
+	fperms g-x /var/log/jabber
131
+	fperms g-x /var/log/jabber/error.log
132
+	fperms g-x /var/log/jabber/record.log
133
+	fperms g-x /var/spool/jabber
134
+
135
+	fperms g+rw /etc/jabber
136
+	fperms g+rw /usr/sbin/jabberd
137
+	fperms g+rw /var/log/jabber
138
+	fperms g+rw /var/log/jabber/error.log
139
+	fperms g+rw /var/log/jabber/record.log
140
+	fperms g+rw /var/spool/jabber
141
+	fperms u+xs /usr/sbin/jabberd
142
+
143
+	#Install header files for transports to use
144
+	cd ${S}/jabberd
145
+	tar cf - `find . -name \*.h` | (cd ${D}/usr/include/jabberd ; tar xvf -)
146
+	assert "Failed to install header files to /usr/include/jabberd"
147
+}
148
+
149
+pkg_postinst() {
150
+
151
+	einfo
152
+	einfo "Change 'localhost' to your server's domainname in the"
153
+	einfo "/etc/jabber/*.xml configs first"
154
+	einfo "Server admins should be added to the "jabber" group"
155
+	if use ssl; then
156
+		einfo
157
+		einfo "To enable SSL connections, execute /etc/jabber/self-cert.sh"
158
+	fi
159
+	if use ldap; then
160
+		einfo
161
+		einfo "In order to use the ldap backend, you need to copy"
162
+		einfo "the file /etc/jabber/jabber.schema into the /etc/openldap/schemas"
163
+		einfo "directory on your ldap server. You will also need to"
164
+		einfo "include the schema in your slapd.conf file and retsart openldap."
165
+		einfo "An example slapd.conf file is included in /etc/jabber."
166
+		einfo "The xdb_ldap backend expects your ldap server to handle"
167
+		einfo "StartTLS or run in ldaps mode."
168
+	fi
169
+	einfo
170
+	einfo "The various IM transports for jabber are now separate packages,"
171
+	einfo "which you will need to install separately if you want them:"
172
+	einfo "net-im/jit - ICQ transport (You can use aim-transport for icq but JIT is better)"
173
+	einfo "net-im/msn-transport - MSN transport (USE=msn)"
174
+	einfo "net-im/jud - Jabber User Directory"
175
+	einfo "net-im/yahoo-transport - Yahoo IM system (USE=yahoo)"
176
+	einfo "net-im/aim-transport - AOL transport (USE=oscar)"
177
+	einfo "net-im/mu-conference - Jabber multi user conference"
178
+	einfo
179
+	einfo "Please read /usr/share/doc/${PF}/README.Gentoo.gz"
180
+	einfo
181
+	ewarn "If upgrading from older version please stop jabberd BEFORE updating the init.d"
182
+	ewarn "script, or you will end with a \"dead\" server."
183
+}
... ...
@@ -0,0 +1,13 @@
1
+# ChangeLog for net-im/pyaim-t
2
+# Copyright 2005-2006 BreakMyGentoo.net; Distributed under the GPL v2
3
+# $Header: $
4
+
5
+  31 May 2006; Hendrik Brandt <heb@gnome-de.org> ChangeLog:
6
+  bump
7
+
8
+  07 Mar 2006; Lars Strojny <lars@strojny.net> ChangeLog:
9
+  Version bump. Moved from patching to seding example config.
10
+
11
+  01 Mar 2006; Lars Strojny <lars@breakmygentoo.net> ChangeLog:
12
+  Initial commit
13
+
... ...
@@ -0,0 +1,28 @@
1
+AUX pyaim-t-0.7c.initd 610 RMD160 19d5238863dffd4cac502b54cfe5b7ccbf2f5abf SHA1 8a00a24168e76cacbdc085022005137478cef81f SHA256 edf3630b8944feba78b0603eb8907742b0c8b72f3a9842dae5fb1b016075a851
2
+MD5 a308935591bfd29800459acd996c3e18 files/pyaim-t-0.7c.initd 610
3
+RMD160 19d5238863dffd4cac502b54cfe5b7ccbf2f5abf files/pyaim-t-0.7c.initd 610
4
+SHA256 edf3630b8944feba78b0603eb8907742b0c8b72f3a9842dae5fb1b016075a851 files/pyaim-t-0.7c.initd 610
5
+DIST pyaim-t-0.7c.tar.gz 145664
6
+DIST pyaim-t-0.7d.tar.gz 144842 RMD160 5cd249c4855ae22df48a2b17242e79fea85f6716 SHA1 e357815cdd55efbc6c6283a4e6653545253de647 SHA256 768b038f51548ce9f87932d74d98f4cd68f9412775e3b1a4345775857592d122
7
+EBUILD pyaim-t-0.7c.ebuild 1521 RMD160 d4571e817711efa4bcc54be287d3c23d0dca6f28 SHA1 c2e1f6e78fc4e2b01bee987a58a240d19065fccc SHA256 c57b84e574f4d6a2b7602c27ec9cc6b3432c1b306eb0c1b72dab6a4da01412ca
8
+MD5 c4d65e1205e19494785b61da6c4c0881 pyaim-t-0.7c.ebuild 1521
9
+RMD160 d4571e817711efa4bcc54be287d3c23d0dca6f28 pyaim-t-0.7c.ebuild 1521
10
+SHA256 c57b84e574f4d6a2b7602c27ec9cc6b3432c1b306eb0c1b72dab6a4da01412ca pyaim-t-0.7c.ebuild 1521
11
+EBUILD pyaim-t-0.7d.ebuild 1536 RMD160 9957040d28ec97a0511db4d9ed4618ea438b2816 SHA1 0a57c5a03017ee6f08f48bb74bc3b3176747f823 SHA256 b451bbd747065bf14e960ad7ce79579aae68e9bc85d79181dfa736678bfa4577
12
+MD5 68add7554723f5361f756ea673c17b9b pyaim-t-0.7d.ebuild 1536
13
+RMD160 9957040d28ec97a0511db4d9ed4618ea438b2816 pyaim-t-0.7d.ebuild 1536
14
+SHA256 b451bbd747065bf14e960ad7ce79579aae68e9bc85d79181dfa736678bfa4577 pyaim-t-0.7d.ebuild 1536
15
+MISC ChangeLog 386 RMD160 10719f33a5e60ca2401122a50770d7fa6c44368b SHA1 db0e52ae0299963c7738a6ad0260791935747424 SHA256 fedf1935ba7b84a862597844dd31bcd7987b12cce16065b6328565095488cff0
16
+MD5 f08fda208a969c415d605218a29d92db ChangeLog 386
17
+RMD160 10719f33a5e60ca2401122a50770d7fa6c44368b ChangeLog 386
18
+SHA256 fedf1935ba7b84a862597844dd31bcd7987b12cce16065b6328565095488cff0 ChangeLog 386
19
+MISC metadata.xml 298 RMD160 a93963efa1b085e191779c00f8c6e08b82a914aa SHA1 8cddb397d895e92a6e16a6eaaa1af8e1df2e349c SHA256 0e02776f9ecf0cdeffd70ce3c5d467cc7650feb903c436dd9709e95f1120170c
20
+MD5 d0747aad420f9941ed6e164fee541a5e metadata.xml 298
21
+RMD160 a93963efa1b085e191779c00f8c6e08b82a914aa metadata.xml 298
22
+SHA256 0e02776f9ecf0cdeffd70ce3c5d467cc7650feb903c436dd9709e95f1120170c metadata.xml 298
23
+MD5 d471039c514496bf5c1fff021bc8b04e files/digest-pyaim-t-0.7c 64
24
+RMD160 29a70b65ec90fce0774b2097384f8b08cf9ef26a files/digest-pyaim-t-0.7c 64
25
+SHA256 32bac12ed9386081bf3d13e5db8860ed4d50f31f9d6aec5756a0f14ec9b5ffcc files/digest-pyaim-t-0.7c 64
26
+MD5 e234364d1acb7d6756f11919f3028604 files/digest-pyaim-t-0.7d 238
27
+RMD160 bcaa3c970f2273d4296f0688987ed6a8eb696146 files/digest-pyaim-t-0.7d 238
28
+SHA256 8078fefb7ae87257ecd44ae9151685da8b25316fdbb488ff7c8283b711ff9ee7 files/digest-pyaim-t-0.7d 238
... ...
@@ -0,0 +1 @@
1
+MD5 6e7be2bcbc18a5e72e36248fbcedaa13 pyaim-t-0.7c.tar.gz 145664
... ...
@@ -0,0 +1,3 @@
1
+MD5 99b593a2a1dc7cc6281dad4a4d8fb5e1 pyaim-t-0.7d.tar.gz 144842
2
+RMD160 5cd249c4855ae22df48a2b17242e79fea85f6716 pyaim-t-0.7d.tar.gz 144842
3
+SHA256 768b038f51548ce9f87932d74d98f4cd68f9412775e3b1a4345775857592d122 pyaim-t-0.7d.tar.gz 144842
... ...
@@ -0,0 +1,25 @@
1
+#!/sbin/runscript
2
+# Copyright 1999-2006 BreakMyGentoo.net
3
+# Distributed under the terms of the GNU General Public License v2
4
+# $Header: $
5
+
6
+depend() {
7
+	need net
8
+	use jabber-server
9
+}
10
+
11
+start() {
12
+	ebegin "Starting AIM Jabber Transport"
13
+	start-stop-daemon --start --quiet --background --name "pyaim-t" --chuid jabber:jabber \
14
+		--exec /usr/bin/python \
15
+		/usr/lib/PATH/site-packages/pyaim-t/pyaim-t.py -- \
16
+		-c /etc/jabber/pyaim-t.xml \
17
+		-l /var/log/jabber/pyaim-t.log
18
+	eend $?
19
+}
20
+
21
+stop() {
22
+	ebegin "Stopping AIM Jabber Transport"
23
+	start-stop-daemon --stop --quiet --pidfile /var/run/jabber/pyaim-t.pid
24
+	eend $?
25
+}
... ...
@@ -0,0 +1,9 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
3
+<pkgmetadata>
4
+<herd>net-im</herd>
5
+<maintainer>
6
+  <email>lars@strojny.net</email>
7
+</maintainer>
8
+	<longdescription>New Python based jabber transport for AIM</longdescription>
9
+</pkgmetadata>
... ...
@@ -0,0 +1,53 @@
1
+# Copyright 1999-2006 BreakMyGentoo.net
2
+# Distributed under the terms of the GNU General Public License v2
3
+# $Header: $
4
+
5
+inherit eutils python
6
+
7
+DESCRIPTION="New Python based jabber transport for AIM"
8
+HOMEPAGE="http://pyaim-t.blathersource.org/"
9
+SRC_URI="http://www.blathersource.org/download.php/${PN}/${P}.tar.gz"
10
+LICENSE="GPL-2"
11
+SLOT="0"
12
+KEYWORDS="~x86"
13
+
14
+
15
+DEPEND=">=net-im/jabber-base-0.0
16
+	>=dev-lang/python-2.3"
17
+	
18
+RDEPEND=">=dev-python/twisted-1.3.0
19
+	>=dev-python/twisted-words-0.1.0
20
+	>=dev-python/twisted-xish-0.1.0
21
+	>=dev-python/twisted-web-0.5.0
22
+	>=dev-python/nevow-0.4.1
23
+	>=dev-python/imaging-1.1"
24
+IUSE=""
25
+
26
+src_install() {
27
+	python_version
28
+	insinto /usr/lib/python${PYVER}/site-packages/${PN}/
29
+	doins -r tools src data
30
+	newins PyAIMt.py ${PN}.py
31
+
32
+	insinto /etc/jabber
33
+	newins config_example.xml ${PN}.xml
34
+	fperms 600 /etc/jabber/${PN}.xml
35
+	fowners jabber:jabber /etc/jabber/${PN}.xml
36
+	dosed \
37
+		"s:<spooldir>[^\<]*</spooldir>:<spooldir>/var/spool/jabber/</spooldir>:" \
38
+		/etc/jabber/${PN}.xml
39
+	dosed \
40
+		"s:<pid>[^\<]*</pid>:<pid>/var/run/jabber/${PN}.pid</pid>:" \
41
+		/etc/jabber/${PN}.xml
42
+
43
+	exeinto /etc/init.d
44
+	newexe ${FILESDIR}/${P}.initd ${PN}
45
+	dosed "s/PATH/python${PYVER}/" /etc/init.d/${PN}
46
+}
47
+
48
+pkg_postinst() {
49
+	einfo "A sample configuration file has been installed in /etc/jabber/${PN}.xml."
50
+	einfo "Please edit it, and the configuration of you Jabber server to match."
51
+	einfo "You also need to create a directory aim.yourjabberhostname.tld in"
52
+	einfo "/var/spool/jabber and chown it to jabber:jabber."
53
+}
... ...
@@ -0,0 +1,53 @@
1
+# Copyright 1999-2006 BreakMyGentoo.net
2
+# Distributed under the terms of the GNU General Public License v2
3
+# $Header: $
4
+
5
+inherit eutils python
6
+
7
+DESCRIPTION="New Python based jabber transport for AIM"
8
+HOMEPAGE="http://pyaim-t.blathersource.org/"
9
+SRC_URI="http://www.blathersource.org/download.php/${PN}/${P}.tar.gz"
10
+LICENSE="GPL-2"
11
+SLOT="0"
12
+KEYWORDS="-* ~x86 ~ppc ~amd64"
13
+
14
+
15
+DEPEND=">=net-im/jabber-base-0.0
16
+	>=dev-lang/python-2.3"
17
+	
18
+RDEPEND=">=dev-python/twisted-1.3.0
19
+	>=dev-python/twisted-words-0.1.0
20
+	>=dev-python/twisted-xish-0.1.0
21
+	>=dev-python/twisted-web-0.5.0
22
+	>=dev-python/nevow-0.4.1
23
+	>=dev-python/imaging-1.1"
24
+IUSE=""
25
+
26
+src_install() {
27
+	python_version
28
+	insinto /usr/lib/python${PYVER}/site-packages/${PN}/
29
+	doins -r tools src data
30
+	newins PyAIMt.py ${PN}.py
31
+
32
+	insinto /etc/jabber
33
+	newins config_example.xml ${PN}.xml
34
+	fperms 600 /etc/jabber/${PN}.xml
35
+	fowners jabber:jabber /etc/jabber/${PN}.xml
36
+	dosed \
37
+		"s:<spooldir>[^\<]*</spooldir>:<spooldir>/var/spool/jabber/</spooldir>:" \
38
+		/etc/jabber/${PN}.xml
39
+	dosed \
40
+		"s:<pid>[^\<]*</pid>:<pid>/var/run/jabber/${PN}.pid</pid>:" \
41
+		/etc/jabber/${PN}.xml
42
+
43
+	exeinto /etc/init.d
44
+	newexe ${FILESDIR}/${P}.initd ${PN}
45
+	dosed "s/PATH/python${PYVER}/" /etc/init.d/${PN}
46
+}
47
+
48
+pkg_postinst() {
49
+	einfo "A sample configuration file has been installed in /etc/jabber/${PN}.xml."
50
+	einfo "Please edit it, and the configuration of you Jabber server to match."
51
+	einfo "You also need to create a directory aim.yourjabberhostname.tld in"
52
+	einfo "/var/spool/jabber and chown it to jabber:jabber."
53
+}
... ...
@@ -0,0 +1,15 @@
1
+AUX pyicq-t-svn-0.8.initd 651 RMD160 6fa9a9205c490770d888f69af9c1e64bde55ecbf SHA1 abb8589351737389ae7dbc2f23b482fd547c2ebc SHA256 fef146a0edcc0150b49bc1a97bfd6dc95aeabfbfc6b4b95096dae90146b7dd75
2
+MD5 e6a1d659fe2e1733a18653294735f12f files/pyicq-t-svn-0.8.initd 651
3
+RMD160 6fa9a9205c490770d888f69af9c1e64bde55ecbf files/pyicq-t-svn-0.8.initd 651
4
+SHA256 fef146a0edcc0150b49bc1a97bfd6dc95aeabfbfc6b4b95096dae90146b7dd75 files/pyicq-t-svn-0.8.initd 651
5
+EBUILD pyicq-t-svn-0.8.ebuild 1572 RMD160 9d70bc49d74f891a0d5639fde4fee0bac0be9b50 SHA1 cd74a5b9394bb8b98f51ef7a3c04ff9b3e57854c SHA256 2499ae8e5175f23528e07d18cf48ca9473b2c44cc41fa0531ec4986d09294ac7
6
+MD5 557d62130af05c70cbe478e4710ff6ba pyicq-t-svn-0.8.ebuild 1572
7
+RMD160 9d70bc49d74f891a0d5639fde4fee0bac0be9b50 pyicq-t-svn-0.8.ebuild 1572
8
+SHA256 2499ae8e5175f23528e07d18cf48ca9473b2c44cc41fa0531ec4986d09294ac7 pyicq-t-svn-0.8.ebuild 1572
9
+MISC metadata.xml 298 RMD160 666d6893bdcfaaaf8f5bab8f0675c2d070b8de58 SHA1 01a81ff31aefcbc2d7a63aba28760e8d21f8bd07 SHA256 31355dfddbcb89e8082ed7f17be6b7f49215228385223470e3ed5ea59cb84640
10
+MD5 508ad196f8fa94f919bf37b68d2f3a74 metadata.xml 298
11
+RMD160 666d6893bdcfaaaf8f5bab8f0675c2d070b8de58 metadata.xml 298
12
+SHA256 31355dfddbcb89e8082ed7f17be6b7f49215228385223470e3ed5ea59cb84640 metadata.xml 298
13
+MD5 68b329da9893e34099c7d8ad5cb9c940 files/digest-pyicq-t-svn-0.8 1
14
+RMD160 c0da025038ed83c687ddc430da9846ecb97f3998 files/digest-pyicq-t-svn-0.8 1
15
+SHA256 01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b files/digest-pyicq-t-svn-0.8 1
... ...
@@ -0,0 +1,25 @@
1
+#!/sbin/runscript
2
+# Copyright 1999-2006 BreakMyGentoo.net
3
+# Distributed under the terms of the GNU General Public License v2
4
+# $Header: $
5
+
6
+depend() {
7
+	need net
8
+	use jabber-server
9
+}
10
+
11
+start() {
12
+	ebegin "Starting ICQ Jabber Transport (SVN)"
13
+	start-stop-daemon --start --quiet --background --name "pyicq-t-svn" --chuid jabber:jabber \
14
+		--exec /usr/bin/python /usr/lib/PATH/site-packages/pyicq-t-svn/pyicq-t-svn.py -- \
15
+		-c /etc/jabber/pyicq-t-svn.xml \
16
+		-l /var/log/jabber/pyicq-t-svn.log
17
+	eend $?
18
+}
19
+
20
+stop() {
21
+	ebegin "Stopping ICQ Jabber Transport (SVN)"
22
+	start-stop-daemon --stop --quiet --pidfile /var/run/jabber/pyicq-t-svn.pid
23
+	sleep 3
24
+	eend $?
25
+}
... ...
@@ -0,0 +1,9 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
3
+<pkgmetadata>
4
+<herd>net-im</herd>
5
+<maintainer>
6
+  <email>lars@strojny.net</email>
7
+</maintainer>
8
+	<longdescription>New Python based jabber transport for ICQ</longdescription>
9
+</pkgmetadata>
... ...
@@ -0,0 +1,56 @@
1
+# Copyright 1999-2006 BreakMyGentoo.net
2
+# Distributed under the terms of the GNU General Public License v2
3
+# $Header: $
4
+
5
+inherit eutils python subversion
6
+
7
+ESVN_REPO_URI="svn://svn.blathersource.org/pyicq-t/trunk"
8
+#ESVN_PROJECT="pyicq-t"
9
+
10
+DESCRIPTION="New Python based jabber transport for ICQ"
11
+HOMEPAGE="http://pyicq-t.blathersource.org/"
12
+LICENSE="GPL-2"
13
+SLOT="0"
14
+KEYWORDS="~x86 ~amd64"
15
+
16
+DEPEND=">=net-im/jabber-base-0.0
17
+	>=dev-lang/python-2.3"
18
+	
19
+RDEPEND=">=dev-python/twisted-1.3.0
20
+	>=dev-python/twisted-words-0.1.0
21
+	>=dev-python/twisted-xish-0.1.0
22
+	>=dev-python/twisted-web-0.5.0
23
+	>=dev-python/nevow-0.4.1
24
+	>=dev-python/imaging-1.1"
25
+IUSE=""
26
+
27
+S=${WORKDIR}/${PN}/
28
+
29
+src_install() {
30
+	python_version
31
+	insinto /usr/lib/python${PYVER}/site-packages/${PN}/
32
+	doins -r tools data src
33
+	newins PyICQt.py ${PN}.py
34
+
35
+	insinto /etc/jabber
36
+	newins config_example.xml ${PN}.xml
37
+	fperms 600 /etc/jabber/${PN}.xml
38
+	fowners jabber:jabber /etc/jabber/${PN}.xml
39
+	dosed \
40
+		"s:<spooldir>[^\<]*</spooldir>:<spooldir>/var/spool/jabber/</spooldir>:" \
41
+		/etc/jabber/${PN}.xml
42
+	dosed \
43
+		"s:<pid>[^\<]*</pid>:<pid>/var/run/jabber/${PN}.pid</pid>:" \
44
+		/etc/jabber/${PN}.xml
45
+
46
+	exeinto /etc/init.d
47
+	newexe ${FILESDIR}/${P}.initd ${PN}
48
+	dosed "s/PATH/python${PYVER}/" /etc/init.d/${PN}
49
+}
50
+
51
+pkg_postinst() {
52
+	einfo "A sample configuration file has been installed in /etc/jabber/${PN}.xml."
53
+	einfo "Please edit it, and the configuration of you Jabber server to match."
54
+	einfo "You also need to create a directory icq.yourjabberhostname.tld in"
55
+	einfo "/var/spool/jabber and chown it to jabber:jabber."
56
+}
... ...
@@ -0,0 +1,13 @@
1
+# ChangeLog for net-im/pyicq-t
2
+# Copyright 2005-2006 BreakMyGentoo.net; Distributed under the GPL v2
3
+# $Header: $
4
+
5
+  31 May 2006; Hendrik Brandt <heb@gnome-de.org> ChangeLog:
6
+  bump
7
+
8
+  07 Mar 2006; Lars Strojny <lars@strojny.net> ChangeLog:
9
+  Version bump. Replaced patch for valid config example with some sed magic.
10
+
11
+  27 Feb 2006; Lars Strojny <lars@strojny.net> ChangeLog, pyicq-t-0.7.ebuild:
12
+  Ebuild completely rewritten. Initial commit.
13
+
... ...
@@ -0,0 +1,28 @@
1
+AUX pyicq-t-0.7a.initd 615 RMD160 b5a7832ff3e25934b63c3d18279df63223edd6f1 SHA1 1bf81ffd65ead3758e80075397ac35edda4a0325 SHA256 1720adf29e1e087590fa566ffd3dcb34c3cbfa374d6a27089464a027ec49f0b6
2
+MD5 2101c5b4b392bb31c87b97cd442be2a9 files/pyicq-t-0.7a.initd 615
3
+RMD160 b5a7832ff3e25934b63c3d18279df63223edd6f1 files/pyicq-t-0.7a.initd 615
4
+SHA256 1720adf29e1e087590fa566ffd3dcb34c3cbfa374d6a27089464a027ec49f0b6 files/pyicq-t-0.7a.initd 615
5
+DIST pyicq-t-0.7a.tar.gz 140340
6
+DIST pyicq-t-0.7b.tar.gz 139959 RMD160 a20db2f92130bd0630301a4cabb104e77cc956ab SHA1 a41be6d1918a462e8c5939cf63721accad1a1720 SHA256 abb0827d4711d361fdbba64181e21ceb2325d336ce95c5c67e3b1b5bec3b4dd2
7
+EBUILD pyicq-t-0.7a.ebuild 1520 RMD160 4a51b4d4cfab09fad187a72f96e90951693ee7a6 SHA1 475a03c1716189a27280e6ee016b04dda944708b SHA256 422d3eb95a3f1adc41061dc67d59990d368a70d836ad9413f347e7e1806b703c
8
+MD5 8ae20cb190b878daa95b0b211e698173 pyicq-t-0.7a.ebuild 1520
9
+RMD160 4a51b4d4cfab09fad187a72f96e90951693ee7a6 pyicq-t-0.7a.ebuild 1520
10
+SHA256 422d3eb95a3f1adc41061dc67d59990d368a70d836ad9413f347e7e1806b703c pyicq-t-0.7a.ebuild 1520
11
+EBUILD pyicq-t-0.7b.ebuild 1535 RMD160 e6856fd7bc7c7dc995821b07bb6e521a35d742de SHA1 06ae43c43ee24a33b384090df15ec115b4778e8c SHA256 2785341a48179767546396b512765a54748c7ba9d3e24b1b4c492532b975266f
12
+MD5 bdb111ecac05dbbc8a50055b6082c849 pyicq-t-0.7b.ebuild 1535
13
+RMD160 e6856fd7bc7c7dc995821b07bb6e521a35d742de pyicq-t-0.7b.ebuild 1535
14
+SHA256 2785341a48179767546396b512765a54748c7ba9d3e24b1b4c492532b975266f pyicq-t-0.7b.ebuild 1535
15
+MISC ChangeLog 445 RMD160 e8b6858c237af6fa561d8cee9c2e7e9aa5c6de7f SHA1 f48a6bc03024b2a54bc50dd65317db3dcda6a597 SHA256 61eb783cdefa9b2c24a855879a35b3e1b6661a69a9152add1c924e30c117125f
16
+MD5 aad8d76d25a0d8f5604ec25fb1f063ff ChangeLog 445
17
+RMD160 e8b6858c237af6fa561d8cee9c2e7e9aa5c6de7f ChangeLog 445
18
+SHA256 61eb783cdefa9b2c24a855879a35b3e1b6661a69a9152add1c924e30c117125f ChangeLog 445
19
+MISC metadata.xml 298 RMD160 666d6893bdcfaaaf8f5bab8f0675c2d070b8de58 SHA1 01a81ff31aefcbc2d7a63aba28760e8d21f8bd07 SHA256 31355dfddbcb89e8082ed7f17be6b7f49215228385223470e3ed5ea59cb84640
20
+MD5 508ad196f8fa94f919bf37b68d2f3a74 metadata.xml 298
21
+RMD160 666d6893bdcfaaaf8f5bab8f0675c2d070b8de58 metadata.xml 298
22
+SHA256 31355dfddbcb89e8082ed7f17be6b7f49215228385223470e3ed5ea59cb84640 metadata.xml 298
23
+MD5 57701b02196486d34a6738509cc95f14 files/digest-pyicq-t-0.7a 64
24
+RMD160 1fc063724087b15e5c726de1ff2c7e983430d839 files/digest-pyicq-t-0.7a 64
25
+SHA256 e6913c8bc69a732202b96a3b3eed66a7532c541de0f32da483e898c01034f460 files/digest-pyicq-t-0.7a 64
26
+MD5 d0eabdbe02340dbd85c0f981aba907d7 files/digest-pyicq-t-0.7b 238
27
+RMD160 4468dbb82f3e1c73e967b211dec96a36a96731e1 files/digest-pyicq-t-0.7b 238
28
+SHA256 640243c5345761d0ace881f6741c37dc03351d289308be93a29b8230bbfbea83 files/digest-pyicq-t-0.7b 238
... ...
@@ -0,0 +1 @@
1
+MD5 3a712b152b80e9b2d060548292f56274 pyicq-t-0.7a.tar.gz 140340
... ...
@@ -0,0 +1,3 @@
1
+MD5 7de0df9311eb6923e6f59fdd914bb6ab pyicq-t-0.7b.tar.gz 139959
2
+RMD160 a20db2f92130bd0630301a4cabb104e77cc956ab pyicq-t-0.7b.tar.gz 139959
3
+SHA256 abb0827d4711d361fdbba64181e21ceb2325d336ce95c5c67e3b1b5bec3b4dd2 pyicq-t-0.7b.tar.gz 139959
... ...
@@ -0,0 +1,25 @@
1
+#!/sbin/runscript
2
+# Copyright 1999-2006 BreakMyGentoo.net
3
+# Distributed under the terms of the GNU General Public License v2
4
+# $Header: $
5
+
6
+depend() {
7
+	need net
8
+	use jabber-server
9
+}
10
+
11
+start() {
12
+	ebegin "Starting ICQ Jabber Transport"
13
+	start-stop-daemon --start --quiet --background --name "pyicq-t" --chuid jabber:jabber \
14
+		--exec /usr/bin/python /usr/lib/PATH/site-packages/pyicq-t/pyicq-t.py -- \
15
+		-c /etc/jabber/pyicq-t.xml \
16
+		-l /var/log/jabber/pyicq-t.log
17
+	eend $?
18
+}
19
+
20
+stop() {
21
+	ebegin "Stopping ICQ Jabber Transport"
22
+	start-stop-daemon --stop --quiet --pidfile /var/run/jabber/pyicq-t.pid
23
+	sleep 3
24
+	eend $?
25
+}
... ...
@@ -0,0 +1,9 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
3
+<pkgmetadata>
4
+<herd>net-im</herd>
5
+<maintainer>
6
+  <email>lars@strojny.net</email>
7
+</maintainer>
8
+	<longdescription>New Python based jabber transport for ICQ</longdescription>
9
+</pkgmetadata>
... ...
@@ -0,0 +1,52 @@
1
+# Copyright 1999-2006 BreakMyGentoo.net
2
+# Distributed under the terms of the GNU General Public License v2
3
+# $Header: $
4
+
5
+inherit eutils python
6
+
7
+DESCRIPTION="New Python based jabber transport for ICQ"
8
+HOMEPAGE="http://pyicq-t.blathersource.org/"
9
+SRC_URI="http://www.blathersource.org/download.php/${PN}/${P}.tar.gz"
10
+LICENSE="GPL-2"
11
+SLOT="0"
12
+KEYWORDS="~x86"
13
+
14
+DEPEND=">=net-im/jabber-base-0.0
15
+	>=dev-lang/python-2.3"
16
+	
17
+RDEPEND=">=dev-python/twisted-1.3.0
18
+	>=dev-python/twisted-words-0.1.0
19
+	>=dev-python/twisted-xish-0.1.0
20
+	>=dev-python/twisted-web-0.5.0
21
+	>=dev-python/nevow-0.4.1
22
+	>=dev-python/imaging-1.1"
23
+IUSE=""
24
+
25
+src_install() {
26
+	python_version
27
+	insinto /usr/lib/python${PYVER}/site-packages/${PN}/
28
+	doins -r tools data src
29
+	newins PyICQt.py ${PN}.py
30
+
31
+	insinto /etc/jabber
32
+	newins config_example.xml ${PN}.xml
33
+	fperms 600 /etc/jabber/${PN}.xml
34
+	fowners jabber:jabber /etc/jabber/${PN}.xml
35
+	dosed \
36
+		"s:<spooldir>[^\<]*</spooldir>:<spooldir>/var/spool/jabber/</spooldir>:" \
37
+		/etc/jabber/${PN}.xml
38
+	dosed \
39
+		"s:<pid>[^\<]*</pid>:<pid>/var/run/jabber/${PN}.pid</pid>:" \
40
+		/etc/jabber/${PN}.xml
41
+
42
+	exeinto /etc/init.d
43
+	newexe ${FILESDIR}/${P}.initd ${PN}
44
+	dosed "s/PATH/python${PYVER}/" /etc/init.d/${PN}
45
+}
46
+
47
+pkg_postinst() {
48
+	einfo "A sample configuration file has been installed in /etc/jabber/${PN}.xml."
49
+	einfo "Please edit it, and the configuration of you Jabber server to match."
50
+	einfo "You also need to create a directory icq.yourjabberhostname.tld in"
51
+	einfo "/var/spool/jabber and chown it to jabber:jabber."
52
+}
... ...
@@ -0,0 +1,52 @@
1
+# Copyright 1999-2006 BreakMyGentoo.net
2
+# Distributed under the terms of the GNU General Public License v2
3
+# $Header: $
4
+
5
+inherit eutils python
6
+
7
+DESCRIPTION="New Python based jabber transport for ICQ"
8
+HOMEPAGE="http://pyicq-t.blathersource.org/"
9
+SRC_URI="http://www.blathersource.org/download.php/${PN}/${P}.tar.gz"
10
+LICENSE="GPL-2"
11
+SLOT="0"
12
+KEYWORDS="-* ~x86 ~ppc ~amd64"
13
+
14
+DEPEND=">=net-im/jabber-base-0.0
15
+	>=dev-lang/python-2.3"
16
+	
17
+RDEPEND=">=dev-python/twisted-1.3.0
18
+	>=dev-python/twisted-words-0.1.0
19
+	>=dev-python/twisted-xish-0.1.0
20
+	>=dev-python/twisted-web-0.5.0
21
+	>=dev-python/nevow-0.4.1
22
+	>=dev-python/imaging-1.1"
23
+IUSE=""
24
+
25
+src_install() {
26
+	python_version
27
+	insinto /usr/lib/python${PYVER}/site-packages/${PN}/
28
+	doins -r tools data src
29
+	newins PyICQt.py ${PN}.py
30
+
31
+	insinto /etc/jabber
32
+	newins config_example.xml ${PN}.xml
33
+	fperms 600 /etc/jabber/${PN}.xml
34
+	fowners jabber:jabber /etc/jabber/${PN}.xml
35
+	dosed \
36
+		"s:<spooldir>[^\<]*</spooldir>:<spooldir>/var/spool/jabber/</spooldir>:" \
37
+		/etc/jabber/${PN}.xml
38
+	dosed \
39
+		"s:<pid>[^\<]*</pid>:<pid>/var/run/jabber/${PN}.pid</pid>:" \
40
+		/etc/jabber/${PN}.xml
41
+
42
+	exeinto /etc/init.d
43
+	newexe ${FILESDIR}/${P}.initd ${PN}
44
+	dosed "s/PATH/python${PYVER}/" /etc/init.d/${PN}
45
+}
46
+
47
+pkg_postinst() {
48
+	einfo "A sample configuration file has been installed in /etc/jabber/${PN}.xml."
49
+	einfo "Please edit it, and the configuration of you Jabber server to match."
50
+	einfo "You also need to create a directory icq.yourjabberhostname.tld in"
51
+	einfo "/var/spool/jabber and chown it to jabber:jabber."
52
+}
... ...
@@ -0,0 +1,11 @@
1
+AUX pymsn-t-svn.initd 733 RMD160 2e8d6ea418b4f2c2319d3c479b8755a2fa607b99 SHA1 ac2f64862b8a7bda714d57abca62932fa6514450 SHA256 0062c6adc17633d238b638d25946a4fed7a829eae24eeb99f460f6702f87b859
2
+MD5 b35c0259d4a9a9f5723f7040d2aff780 files/pymsn-t-svn.initd 733
3
+RMD160 2e8d6ea418b4f2c2319d3c479b8755a2fa607b99 files/pymsn-t-svn.initd 733
4
+SHA256 0062c6adc17633d238b638d25946a4fed7a829eae24eeb99f460f6702f87b859 files/pymsn-t-svn.initd 733
5
+EBUILD pymsn-t-svn-0.12.ebuild 1850 RMD160 3b64f4d160ac6a2bdbdfcdf5b5b76e2e32d622a6 SHA1 877c6e8672fc78c8f5d5712bcfb72f3e4e753cf4 SHA256 4e1415a90600a1344f853effbb0ac3fe7d0e31c3d93fc72c55f4ae84b0efc87e
6
+MD5 a0016848fd52dfbde0c6d11cbae9a973 pymsn-t-svn-0.12.ebuild 1850
7
+RMD160 3b64f4d160ac6a2bdbdfcdf5b5b76e2e32d622a6 pymsn-t-svn-0.12.ebuild 1850
8
+SHA256 4e1415a90600a1344f853effbb0ac3fe7d0e31c3d93fc72c55f4ae84b0efc87e pymsn-t-svn-0.12.ebuild 1850
9
+MD5 68b329da9893e34099c7d8ad5cb9c940 files/digest-pymsn-t-svn-0.12 1
10
+RMD160 c0da025038ed83c687ddc430da9846ecb97f3998 files/digest-pymsn-t-svn-0.12 1
11
+SHA256 01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b files/digest-pymsn-t-svn-0.12 1
... ...
@@ -0,0 +1,24 @@
1
+#!/sbin/runscript
2
+# Copyright 1999-2006 Gentoo Foundation
3
+# Distributed under the terms of the GNU General Public License v2
4
+# $Header: /var/cvsroot/gentoo-x86/net-im/pymsn-t/files/pymsn-t.initd,v 1.5 2006/03/08 16:49:33 humpback Exp $
5
+
6
+depend() {
7
+	need net
8
+	use jabber-server
9
+}
10
+
11
+start() {
12
+	ebegin "Starting MSN Jabber Transport (SVN)"
13
+	start-stop-daemon --start --name "pymsn-t" --background --chuid jabber:jabber \
14
+		--exec /usr/bin/python /usr/lib/PATH/site-packages/pymsn-t-svn/pymsn-t-svn.py -- \
15
+		-c /etc/jabber/pymsn-t-svn.xml -l /var/log/jabber/pymsn-t-svn.log
16
+	eend $?
17
+}
18
+
19
+stop() {
20
+	ebegin "Stopping MSN Jabber Transport (SVN)"
21
+	start-stop-daemon --stop --quiet --pidfile /var/run/jabber/pymsn-t-svn.pid
22
+	sleep 3
23
+	eend $?
24
+}
... ...
@@ -0,0 +1,63 @@
1
+# Copyright 1999-2006 Gentoo Foundation
2
+# Distributed under the terms of the GNU General Public License v2
3
+# $Header: /var/cvsroot/gentoo-x86/net-im/pymsn-t/pymsn-t-0.11a-r4.ebuild,v 1.3 2006/04/06 19:53:18 swegener Exp $
4
+
5
+inherit eutils python subversion
6
+
7
+ESVN_REPO_URI="http://delx.cjb.net/svn/pymsnt/trunk"
8
+
9
+
10
+MY_PN="pymsnt"
11
+S=${WORKDIR}/${MY_PN}-${PV/a/}
12
+DESCRIPTION="New Python based jabber transport for MSN"
13
+HOMEPAGE="http://msn-transport.jabberstudio.org/"
14
+LICENSE="GPL-2"
15
+SLOT="0"
16
+KEYWORDS="~amd64 ~x86"
17
+
18
+DEPEND=">=net-im/jabber-base-0.0
19
+	>=dev-lang/python-2.3"
20
+
21
+RDEPEND=">=dev-python/twisted-1.3.0
22
+	>=dev-python/twisted-words-0.1.0
23
+	>=dev-python/twisted-xish-0.1.0
24
+	>=dev-python/twisted-web-0.5.0
25
+	>=dev-python/nevow-0.4.1
26
+	>=dev-python/imaging-1.1"
27
+IUSE=""
28
+
29
+src_install() {
30
+	python_version
31
+	einfo ${PWD}
32
+	insinto /usr/lib/python${PYVER}/site-packages/${PN}
33
+	doins -r data src
34
+	newins PyMSNt.py ${PN}.py
35
+
36
+	insinto /etc/jabber
37
+	newins config-example.xml ${PN}.xml
38
+	fperms 600 /etc/jabber/${PN}.xml
39
+	fowners jabber:jabber /etc/jabber/${PN}.xml
40
+	dosed \
41
+		"s:<spooldir>[^\<]*</spooldir>:<spooldir>/var/spool/jabber/</spooldir>:" \
42
+		/etc/jabber/${PN}.xml
43
+	dosed \
44
+		"s:<pid>[^\<]*</pid>:<pid>/var/run/jabber/${PN}.pid</pid>:" \
45
+		/etc/jabber/${PN}.xml
46
+	dosed \
47
+		"s:<host>[^\<]*</host>:<host>example.org</host>:" \
48
+		/etc/jabber/${PN}.xml
49
+	dosed \
50
+		"s:<jid>[^\<]*</jid>:<jid>msn.example.org</jid>:" \
51
+		/etc/jabber/${PN}.xml
52
+
53
+	exeinto /etc/init.d
54
+	newexe ${FILESDIR}/${PN}.initd ${PN}
55
+	dosed "s/PATH/python${PYVER}/" /etc/init.d/${PN}
56
+}
57
+
58
+pkg_postinst() {
59
+	einfo "A sample configuration file has been installed in /etc/jabber/${PN}.xml."
60
+	einfo "Please edit it, and the configuration of you Jabber server to match."
61
+	einfo "You also need to create a directory msn.yourdomain.com in"
62
+	einfo "/var/spool/jabber/ and chown it to jabber:jabber."
63
+}
... ...
@@ -0,0 +1,7 @@
1
+# ChangeLog for net-im/xmpppy-yahoo
2
+# Copyright 2005-2006 BreakMyGentoo.net; Distributed under the GPL v2
3
+# $Header: $
4
+
5
+  01 Apr 2006; Lars Strojny <lars@strojny.net> ChangeLog:
6
+  Initial commit.
7
+
... ...
@@ -0,0 +1,15 @@
1
+MD5 2e5d2734d08128a5f85288671fd1836f ChangeLog 197
2
+RMD160 4f54d70217af7cff87bc12fc5d00f6d40fb18712 ChangeLog 197
3
+SHA256 398ffa904069c45c4ab77f6a352bcb1312085be9dfae66048d43fb0fc015ef9d ChangeLog 197
4
+MD5 62f007c94a28ffc04c09cd3d57e3d34d files/config.ini 275
5
+RMD160 1ddf6a42e3ad2965d7b4bd5050a05365cb31d22f files/config.ini 275
6
+SHA256 cc8f5cb64a9baa4d10f32353f83d6f3023270d9cbb48d4563c9420150ef190e1 files/config.ini 275
7
+MD5 999e489ea47a36cf6ac8ace0100947f8 files/digest-xmpppy-yahoo-0.3 256
8
+RMD160 8ec0d87660d4ec3aa23c5a3632486aeb0eecfef8 files/digest-xmpppy-yahoo-0.3 256
9
+SHA256 819e6f8393ef695746eb8033d23292b3dcde3b0f21077bfa89ad015c5970ecf3 files/digest-xmpppy-yahoo-0.3 256
10
+MD5 da296ff0c4ad7e07b4fe73f24bbf3d16 files/xmpppy-yahoo.initd 530
11
+RMD160 ab1572469014ae529f192c499c82afbc94ad3797 files/xmpppy-yahoo.initd 530
12
+SHA256 808e860f52bf2a6d0b65b078a25f8bee4a370c2802c9f112a74f4845a8a4d233 files/xmpppy-yahoo.initd 530
13
+MD5 db0a1e54d4e0a78d086932f142653810 xmpppy-yahoo-0.3.ebuild 1163
14
+RMD160 ee48f33209928d4bec7658697188d7fc15e86f3b xmpppy-yahoo-0.3.ebuild 1163
15
+SHA256 ec6c83642d79a126c9b2c860d8b39e8cc33835d84517eb7635f3e5148d827def xmpppy-yahoo-0.3.ebuild 1163
... ...
@@ -0,0 +1,10 @@
1
+[yahoo]
2
+Server = 127.0.0.1
3
+Hostname = yahoo.localhost
4
+Port = 9001
5
+Secret = secret
6
+;ServerUser = username ;For jabberd2 connection
7
+UserFile = /var/spool/jabber/yahoo.localhost/user.dbm
8
+LocalAddress = host.example.net
9
+LogFile = /var/log/jabber/pyyahoo-t.log
10
+FatalErrors = true
... ...
@@ -0,0 +1,3 @@
1
+MD5 e00d0e9362820551243fe990787d3fec yahoo-transport-0.3.tar.gz 84448
2
+RMD160 a3305e6a2d2d2f440cef0ac7c361d7e72780708f yahoo-transport-0.3.tar.gz 84448
3
+SHA256 f763fad54ace3c72dc8bd049df3c7b96a53909813764d0b2d455c754026142c6 yahoo-transport-0.3.tar.gz 84448
... ...
@@ -0,0 +1,22 @@
1
+#!/sbin/runscript
2
+# Copyright 2004-2006 BreakMyGentoo.net
3
+# Distributed under the terms of the GNU General Public License v2
4
+# $Header: $
5
+
6
+depend() {
7
+	need jabber-server
8
+}
9
+
10
+start() {
11
+	einfo "Starting Yahoo Jabber-transport"
12
+	start-stop-daemon --start --chuid jabber:jabber --background \
13
+		--name="xmpppy-yahoo" --exec /usr/bin/PATH \
14
+		/usr/lib/PATH/site-packages/xmpppy-yahoo/yahoo.py
15
+	eend $?
16
+}
17
+
18
+stop() {
19
+	einfo "Stopping Yahoo Jabber-transport"
20
+	kill $(ps uax | grep ^jabber | grep yahoo | awk -F " " '{print $2}')
21
+	eend $?
22
+}
... ...
@@ -0,0 +1,50 @@
1
+# Copyright 1999-2006 Gentoo Foundation
2
+# Distributed under the terms of the GNU General Public License v2
3
+# $Header: $
4
+
5
+
6
+inherit python
7
+
8
+MY_PN="yahoo-transport"
9
+MY_P=${MY_PN}-${PV}
10
+MY_LIB=${PN/-yahoo/}
11
+
12
+DESCRIPTION="An xmpppy based version of a jabber-transport for the Yahoo's IM-network"
13
+HOMEPAGE="http://xmpppy.sourceforge.net/"
14
+
15
+SRC_URI="mirror://sourceforge/${MY_LIB}/${MY_P}.tar.gz"
16
+
17
+LICENSE=""
18
+SLOT="0"
19
+KEYWORDS="~x86 ~amd64"
20
+IUSE=""
21
+
22
+DEPEND=">=dev-lang/python-2.3
23
+	net-im/jabber-base
24
+	dev-python/dnspython"
25
+RDEPEND=">=dev-python/xmpppy-0.3"
26
+RESTRICT="nomirror"
27
+
28
+S=${WORKDIR}/${MY_P}
29
+
30
+src_unpack() {
31
+	unpack ${A}
32
+	find -name "CVS" -type d -exec rm -rf {} \; 2> /dev/null
33
+}
34
+
35
+src_install() {
36
+	python_version
37
+	insinto /usr/lib/python${PYVER}/site-packages/${PN}/
38
+	doins -r curphoo 
39
+	doins *.py
40
+	dosed "s:/etc/jabber/jabber-yahoo.conf:/etc/jabber/xmpppy-yahoo.ini:" \
41
+		/usr/lib/python${PYVER}/site-packages/${PN}/yahoo.py
42
+
43
+	insinto /etc/jabber
44
+	newins ${FILESDIR}/config.ini ${PN}.ini
45
+	fperms 600 /etc/jabber/${PN}.ini
46
+	fowners jabber:jabber /etc/jabber/${PN}.ini
47
+
48
+	newinitd ${FILESDIR}/${PN}.initd ${PN}
49
+	dosed "s/PATH/python${PYVER}/g" /etc/init.d/${PN}
50
+}
... ...
@@ -0,0 +1,16 @@
1
+
2
+* courierpasswd-1.1.0-RC1
3
+
4
+   Removed old ebuilds and created new one for latest courierpasswd
5
+   version.
6
+
7
+   The courierpasswd binary moved from /bin/ to /sbin/. Please check
8
+   all programs that might have hard linked the binary (eg. squirrelmail
9
+   plugin, qmail-smtp, ...)
10
+
11
+
12
+* courierpasswd-1.0.1-r1
13
+
14
+   missing flag in IUSE
15
+
16
+
... ...
@@ -0,0 +1,15 @@
1
+MD5 a8137cd06b939de6d9698dc61f174ba8 Changelog 333
2
+RMD160 f79292a85d3696043aa25571c7c858cc6b184275 Changelog 333
3
+SHA256 437abd4ecb33202134ebdaef319de6e560d53260adaa623241ffd1d829dccead Changelog 333
4
+MD5 ac0ba9f512ac110ead8b7ca6faa73a17 courierpasswd-1.1.0.ebuild 1738
5
+RMD160 24237fb5f8ff53440d8a4e5007cc0d9aa88c61d7 courierpasswd-1.1.0.ebuild 1738
6
+SHA256 768b1c445fdd01b06992ecd82b07b1c46cfbbee07731ce69ad739ea579cea599 courierpasswd-1.1.0.ebuild 1738
7
+MD5 9880422ac7dfccbff357d4d84d8d8613 files/digest-courierpasswd-1.1.0 259
8
+RMD160 08dffaea1a146e2f6683207ab4a276353c26fbbe files/digest-courierpasswd-1.1.0 259
9
+SHA256 3ff0ebe12d04089fccc1e88cd7f2e26a22391d0dd95188c1c4b52df6be8eed30 files/digest-courierpasswd-1.1.0 259
10
+MD5 ae0902fdd083c770d9bf78e0a5d6400f files/digest-courierpasswd-1.1.0_rc1 75
11
+RMD160 9e2126ca7a185379af0aa8da7715be6f27a48dac files/digest-courierpasswd-1.1.0_rc1 75
12
+SHA256 0bd7418c825c0d50d0530ffa2f9ba52ad39f7bdb13ebf76843cb497d98de92d8 files/digest-courierpasswd-1.1.0_rc1 75
13
+MD5 214f2981b21f074f79b19ef02f438bf7 files/mailpasswd 1996
14
+RMD160 ef824c844f7fd3eb4394f9f7fbd7a714db63b307 files/mailpasswd 1996
15
+SHA256 6369913428b852b12ab60531eafdbedc38ce94e1b91a7b7f2e6801c64b921753 files/mailpasswd 1996
... ...
@@ -0,0 +1,64 @@
1
+
2
+inherit eutils
3
+
4
+MY_P="${P/_rc/-RC}"
5
+DESCRIPTION="A password checking interface that works with the courier-imap authdaemon"
6
+HOMEPAGE="http://www.arda.homeunix.net/store/"
7
+SRC_URI="http://www.arda.homeunix.net/store/${MY_P}.tar.gz"
8
+
9
+S="${WORKDIR}/${MY_P}"
10
+
11
+LICENSE="GPL-2"
12
+SLOT="0"
13
+KEYWORDS="x86 amd64"
14
+IUSE=""
15
+
16
+DEPEND=">=net-libs/courier-authlib-0.57"
17
+
18
+
19
+src_unpack() {
20
+	unpack ${A}
21
+	cd ${S}
22
+}
23
+
24
+src_compile() {
25
+
26
+    CFLAGS="$CFLAGS -Wl,-z,now"
27
+    econf  || die "Error in configure"
28
+	emake || die "Error in make"
29
+
30
+}
31
+
32
+src_install() {
33
+	into /
34
+    einfo Installing courierpasswd setuid root.
35
+	dosbin courierpasswd || die "Cannot install courierpasswd"
36
+
37
+    # chown root $(sbindir)/courierpasswd
38
+    fperms 4511 /sbin/courierpasswd
39
+
40
+
41
+    dobin ${FILESDIR}/mailpasswd
42
+
43
+    doman courierpasswd.8
44
+	dodoc AUTHORS INSTALL COPYING NEWS README ChangeLog
45
+}
46
+
47
+warning() {
48
+
49
+  ewarn "courierpasswd has been installed setuid root. Otherwise the authdeamon"
50
+  ewarn "wouldn't allow courierpasswd to connect."
51
+
52
+  einfo "To use courierpasswd for qmail AUTH you have to modify
53
+  einfo "/var/qmail/control/conf-smtpd and set "QMAIL_SMTP_CHECKPASSWORD=\"/sbin/courierpasswd\"."
54
+
55
+  einfo "You can use courierpasswd to change you e-mail password by executing"
56
+  einfo "mailpasswd or courierpasswd directly (see manpage). There is a"
57
+  einfo "courierchange_pass is a courierchange_pass available for Squirrelmail"
58
+  einfo "as well."
59
+
60
+  ewarn "The courierpasswd binary moved from /bin/ to /sbin/. Please check"
61
+  ewarn "all programs that might have hard linked the binary (eg. squirrelmail"
62
+  ewarn "plugin, qmail-smtp, ...)"
63
+
64
+}
... ...
@@ -0,0 +1,3 @@
1
+MD5 6bc4d2ad23a58bc6d41edee6d75a7dca courierpasswd-1.1.0.tar.gz 288625
2
+RMD160 f00c6621dd971633a94c0ed7287930ba827db728 courierpasswd-1.1.0.tar.gz 288625
3
+SHA256 6b7ad5e3bcb575a0ad0cb8c2f7a139a370799d632989a7bfb6818cb74d21ff8d courierpasswd-1.1.0.tar.gz 288625
... ...
@@ -0,0 +1 @@
1
+MD5 cd6e24794eec546413b2588f7cfcd71f courierpasswd-1.1.0-RC1.tar.gz 288605
... ...
@@ -0,0 +1,79 @@
1
+#!/bin/bash
2
+#
3
+# /usr/bin/mailpasswd
4
+#
5
+#               Shell script wrapper for courierpasswd to change passwords
6
+#               for courier-imapd via authdaemon.
7
+#
8
+#               Originally written for the Gentoo Linux distribution
9
+#
10
+# Copyright     (c) 1999-2005 Gentoo Technologies, Inc
11
+#               Released under v2 of the GNU GPL
12
+#
13
+# Author(s)     Christoph Probst <chris-sw-ccp@netzpunkt.org>
14
+#
15
+# Notes         - to change passwords you need to emerge courierpasswd.
16
+#               - If you don't want the password-change dialog then rather use
17
+#                 checkpasswd directly.
18
+#               - there is a plugin courierchang_pass available for squirrelmail
19
+#                 that uses courierpasswd INSTEAD of courierpassd or poppassd.
20
+#
21
+# Todo          - convert this script to python
22
+#
23
+# Version       0.1
24
+#
25
+# ========================================================================
26
+
27
+if [ "${1}x" == "x" ] ; then
28
+
29
+  echo "mailpasswd - Interface to change the password for an e-mail user."
30
+  echo "Syntax: mailpasswd e-mail-username"
31
+
32
+  exit 2
33
+
34
+fi
35
+
36
+username=${1}
37
+echo "Changing password for e-mail user ${username}"
38
+
39
+
40
+echo -n "(current) E-Mail password: "
41
+read -s oldpassword
42
+echo 
43
+
44
+
45
+echo -n "New E-Mail password: "
46
+read -s newpassword
47
+echo
48
+
49
+if [ "${newpassword}x" == "x" ] ; then
50
+  echo "New password is empty, that is not allowed! Password NOT changed."
51
+  exit 3
52
+fi
53
+
54
+
55
+echo -n "Retype new E-Mail password: "
56
+read -s newpassword2
57
+echo
58
+
59
+if [ "${newpassword}x" == "${newpassword2}x" ] ; then
60
+
61
+  # don't use echo (see courierpasswd manpage)
62
+  python -c "print \"%s\0%s\0%s\0\" % (\"${username}\",\"${oldpassword}\",\"${newpassword}\")" \
63
+       | courierpasswd --changepwd --stdin
64
+  errcode=$?
65
+
66
+  if [ $errcode == 0 ] ; then
67
+    echo "Password successfully changed for e-mail user ${username}."
68
+    exit 0
69
+  else
70
+    echo "Wrong username or password. Password NOT changed."
71
+    exit ${errcode}
72
+  fi
73
+
74
+else
75
+  echo "New passwords don't match. Password NOT changed."
76
+  exit 4
77
+fi
78
+
79
+
... ...
@@ -0,0 +1,316 @@
1
+# ChangeLog for net-mail/mailman
2
+# Copyright 2002-2006 Gentoo Foundation; Distributed under the GPL v2
3
+# $Header: /var/cvsroot/gentoo-x86/net-mail/mailman/ChangeLog,v 1.85 2006/09/11 14:24:36 tcort Exp $
4
+
5
+  11 Sep 2006; Thomas Cort <tcort@gentoo.org> mailman-2.1.9_rc1.ebuild:
6
+  Stable on amd64 wrt security Bug #139976.
7
+
8
+  10 Sep 2006; Jason Wever <weeve@gentoo.org> mailman-2.1.9_rc1.ebuild:
9
+  Stable on SPARC wrt security bug #139976.
10
+
11
+  08 Sep 2006; Joshua Jackson <tsunam@gentoo.org> mailman-2.1.9_rc1.ebuild:
12
+  Stable x86; bug #139976
13
+
14
+  07 Sep 2006; Tobias Scherbaum <dertobi123@gentoo.org>
15
+  mailman-2.1.9_rc1.ebuild:
16
+  ppc stable, bug #139976
17
+
18
+*mailman-2.1.9_rc1 (07 Sep 2006)
19
+
20
+  07 Sep 2006; Hanno Boeck <hanno@gentoo.org> +mailman-2.1.9_rc1.ebuild:
21
+  Version bump, contains security fixes.
22
+
23
+  21 Jul 2006; Hanno Boeck <hanno@gentoo.org> mailman-2.1.8_rc1.ebuild:
24
+  Fix GID for qmail (bug #137254).
25
+
26
+  21 Jul 2006; Hanno Boeck <hanno@gentoo.org> mailman-2.1.5-r4.ebuild,
27
+  mailman-2.1.5-r5.ebuild, mailman-2.1.6_rc4.ebuild, mailman-2.1.6.ebuild,
28
+  mailman-2.1.7.ebuild, mailman-2.1.8_rc1.ebuild:
29
+  Fix Slot from O (the letter) to 0 (zero).
30
+
31
+  08 May 2006; Hanno Boeck <hanno@gentoo.org> metadata.xml,
32
+  mailman-2.1.8_rc1.ebuild:
33
+  Make ebuild fully support INSTALLDIR (bug #84708) and add myself as maintainer.
34
+
35
+  29 Apr 2006; Luis Medinas <metalgod@gentoo.org> mailman-2.1.8_rc1.ebuild:
36
+  Stable on amd64. For security bug #129136.
37
+
38
+  17 Apr 2006; Mark Loeser <halcy0n@gentoo.org> mailman-2.1.8_rc1.ebuild:
39
+  Stable on x86; bug #129136
40
+
41
+  16 Apr 2006; Jason Wever <weeve@gentoo.org> mailman-2.1.8_rc1.ebuild:
42
+  Stable on SPARC wrt security bug #129136.
43
+
44
+  15 Apr 2006; Tobias Scherbaum <dertobi123@gentoo.org>
45
+  mailman-2.1.8_rc1.ebuild:
46
+  ppc stable, bug #129136
47
+
48
+*mailman-2.1.8_rc1 (14 Apr 2006)
49
+
50
+  14 Apr 2006; Martin Holzer <mholzer@gentoo.org>
51
+  +files/mailman-2.1.8_rc1-directory-check.patch, +mailman-2.1.8_rc1.ebuild:
52
+  Security bump. see bug #129136
53
+
54
+  13 Feb 2006; Jason Wever <weeve@gentoo.org> mailman-2.1.7.ebuild:
55
+  Stable on SPARC wrt security bug #119313.
56
+
57
+  08 Feb 2006; Chris Gianelloni <wolf31o2@gentoo.org> mailman-2.1.7.ebuild:
58
+  Marking stable on x86 wrt bug #119313.
59
+
60
+  07 Feb 2006; Simon Stelling <blubb@gentoo.org> mailman-2.1.7.ebuild:
61
+  stable on amd64 wrt bug 119313
62
+
63
+*mailman-2.1.7 (03 Jan 2006)
64
+
65
+  03 Jan 2006; Martin Holzer <mholzer@gentoo.org>
66
+  +files/mailman-2.1.7-directory-check.patch, +mailman-2.1.7.ebuild:
67
+  Version bumped.
68
+
69
+  03 Jan 2006; Martin Holzer <mholzer@gentoo.org> mailman-2.1.6_rc4.ebuild,
70
+  mailman-2.1.6.ebuild:
71
+  changing postfix mailgid. closes #106403
72
+
73
+  23 Aug 2005; Andrej Kacian <ticho@gentoo.org> mailman-2.1.5-r2.ebuild,
74
+  mailman-2.1.5-r3.ebuild, mailman-2.1.5-r4.ebuild, mailman-2.1.5-r5.ebuild,
75
+  mailman-2.1.6_beta1.ebuild, mailman-2.1.6_beta1-r1.ebuild,
76
+  mailman-2.1.6_rc4.ebuild, mailman-2.1.6.ebuild:
77
+  Use -1 for shell argument to enewuser. Bug #103421.
78
+
79
+*mailman-2.1.6 (06 Jul 2005)
80
+
81
+  06 Jul 2005; Martin Holzer <mholzer@gentoo.org>
82
+  +files/mailman-2.1.6-directory-check.patch, +mailman-2.1.6.ebuild:
83
+  Version bumped.
84
+
85
+*mailman-2.1.6_rc4 (24 May 2005)
86
+
87
+  24 May 2005; Martin Holzer <mholzer@gentoo.org>
88
+  +files/mailman-2.1.6_rc4-directory-check.patch, +mailman-2.1.6_rc4.ebuild:
89
+  Version bumped. MTA now configured with USE flag
90
+
91
+*mailman-2.1.6_beta1-r1 (01 Mar 2005)
92
+
93
+  01 Mar 2005; Elfyn McBratney <beu@gentoo.org> +files/50_mailman.conf,
94
+  +mailman-2.1.5-r5.ebuild, +mailman-2.1.6_beta1-r1.ebuild:
95
+  Rev bumps.  Update to use the new apache paths.  Closes #77916.
96
+
97
+  16 Feb 2005; Elfyn McBratney <beu@gentoo.org> mailman-2.1.5-r2.ebuild,
98
+  mailman-2.1.5-r3.ebuild, mailman-2.1.5-r4.ebuild,
99
+  mailman-2.1.6_beta1.ebuild:
100
+  Add slash after ${ROOT} in pkg_config.
101
+
102
+*mailman-2.1.6_beta1 (12 Feb 2005)
103
+
104
+  12 Feb 2005; Tuấn Văn <langthang@gentoo.org>
105
+  +files/mailman-2.1.6_beta1-directory-check.patch,
106
+  +mailman-2.1.6_beta1.ebuild:
107
+  New version. New directory-check.patch, thanks to Brian Harring <ferringb@gentoo.org>
108
+
109
+  10 Feb 2005; Jan Brinkmann <luckyduck@gentoo.org> mailman-2.1.5-r4.ebuild:
110
+  stable on amd64. see #81109
111
+
112
+  09 Feb 2005; Gustavo Zacarias <gustavoz@gentoo.org> mailman-2.1.5-r4.ebuild:
113
+  Stable on sparc wrt #81109
114
+
115
+  09 Feb 2005; Olivier Crête <tester@gentoo.org> mailman-2.1.5-r4.ebuild:
116
+  Stable on x86, bug #81109
117
+
118
+  09 Feb 2005; Tuấn Văn <langthang@gentoo.org>
119
+  +files/mailman-2.1.5-true_path.patch:
120
+  revision bump with true_path patch.
121
+
122
+  19 Jan 2005; Karol Wojtaszek <sekretarz@gentoo.org>
123
+  mailman-2.1.5-r3.ebuild:
124
+  Stable on amd64, bug #77524
125
+
126
+  16 Jan 2005; Tuấn Văn <langthang@gentoo.org> mailman-2.1.5-r3.ebuild:
127
+  stable on x86.
128
+
129
+  16 Jan 2005; Jason Wever <weeve@gentoo.org> mailman-2.1.5-r3.ebuild:
130
+  Stable on sparc wrt security bug #77524.
131
+
132
+*mailman-2.1.5-r3 (15 Jan 2005)
133
+
134
+  15 Jan 2005; Tuấn Văn <langthang@gentoo.org>
135
+  +files/mailman-2.1.5-driver.cvs.patch, +mailman-2.1.5-r3.ebuild:
136
+  revision bump to resolve bug #77524.
137
+
138
+  11 Nov 2004; Tuan Van <langthang@gentoo.org> mailman-2.1.5-r2.ebuild:
139
+  QA: illegal einfo/ewarn. Bug #70848.
140
+
141
+  08 Aug 2004; Jason Wever <weeve@gentoo.org> mailman-2.1.5-r2.ebuild:
142
+  Stable on sparc wrt bug #58918.
143
+
144
+  08 Aug 2004; Tom Martin <slarti@gentoo.org> mailman-2.1.5-r2.ebuild:
145
+  Stable on amd64 for bug 58918.
146
+
147
+  07 Aug 2004; Tuan Van <langthang@gentoo.org> mailman-2.1.5-r2.ebuild:
148
+  Do not run `check_perms_grsecurity.py -f` on regular system.
149
+
150
+  07 Aug 2004; Tuan Van <langthang@gentoo.org> mailman-2.1.5-r2.ebuild:
151
+  fix to get check_perms_grsecurity.py run.
152
+
153
+*mailman-2.1.5-r2 (28 Jul 2004)
154
+
155
+  28 Jul 2004; Tuan Van <langthang@gentoo.org> +mailman-2.1.5-r2.ebuild:
156
+  fix bug #58644. Revision bump.
157
+
158
+  27 Jul 2004; Tuan Van <langthang@gentoo.org> mailman-2.1.5-r1.ebuild:
159
+  switch to enew{group,user}.
160
+  add enew{group/user} to pkg_postinst wrt bug #58526.
161
+
162
+  22 Jul 2004; Tuan Van <langthang@gentoo.org> mailman-2.1.5-r1.ebuild:
163
+  stable on x86.
164
+
165
+*mailman-2.1.5-r1 (21 Jul 2004)
166
+
167
+  21 Jul 2004; Tuan Van <langthang@gentoo.org>
168
+  +files/mailman-2.1.5-directory-check.patch, +mailman-2.1.5-r1.ebuild:
169
+  Revision bump to resolve bug #53533, #56250. Thanks to Jim Ramsay
170
+  <i.am@jimramsay.com> and Brian Harring <ferringb@gentoo.org>.
171
+
172
+  10 Jul 2004; Danny van Dyk <kugelfang@gentoo.org> mailman-2.1.5.ebuild:
173
+  Marked ~amd64.
174
+
175
+  11 Jun 2004; Aron Griffis <agriffis@gentoo.org> mailman-2.1.4.ebuild,
176
+  mailman-2.1.5.ebuild:
177
+  Fix use invocation
178
+
179
+  09 Jun 2004; Martin Holzer <mholzer@gentoo.org> mailman-2.1.5.ebuild:
180
+  marking x86 stable.
181
+
182
+  01 Jun 2004; Jason Wever <weeve@gentoo.org> mailman-2.1.5.ebuild:
183
+  Marked stable on sparc wrt bug #51671.
184
+
185
+  01 Jun 2004; Martin Holzer <mholzer@gentoo.org> mailman-2.1.5.ebuild:
186
+  added more keepdir and removed sed.
187
+
188
+*mailman-2.1.5 (31 May 2004)
189
+
190
+  31 May 2004; <plasmaroo@gentoo.org> +mailman-2.1.5.ebuild:
191
+  Version bump for a security vulnerability; closes bug #52043.
192
+
193
+  14 May 2004; Luca Barbato <lu_zero@gentoo.org> mailman-2.1.4.ebuild:
194
+  Marked ~ppc
195
+
196
+  12 Mar 2004; Martin Holzer <mholzer@gentoo.org> mailman-2.1.4.ebuild:
197
+  Correcting version in einfo. Closes bug #44464.
198
+
199
+  23 Feb 2004; Sven Blumenstein <bazik@gentoo.org> mailman-2.1.4.ebuild:
200
+  Stable on sparc. Thanks to Josh Grebe <josh@brokedown.net> for testing!
201
+
202
+  31 Jan 2004; Martin Holzer <mholzer@gentoo.org> files/mailman.rc:
203
+  adding -s option to start. Closes 34278.
204
+
205
+  10 Jan 2004; Martin Holzer <mholzer@gentoo.org> mailman-2.1.4.ebuild:
206
+  typo in config_protection. doing needed keepdir to work
207
+
208
+  09 Jan 2004; Martin Holzer <mholzer@gentoo.org> mailman-2.1.4.ebuild:
209
+  disabling python languages. Closes 34727
210
+
211
+  08 Jan 2004; Martin Holzer <mholzer@gentoo.org> files/README.gentoo:
212
+  updating readme. Closes 36725
213
+
214
+  06 Jan 2004; Martin Holzer <mholzer@gentoo.org> mailman-2.1.4.ebuild:
215
+  adding locks dir
216
+
217
+*mailman-2.1.4 (04 Jan 2004)
218
+
219
+  04 Jan 2004; Martin Holzer <mholzer@gentoo.org> mailman-2.1.4.ebuild:
220
+  Version bumped. Closes 37208
221
+
222
+  04 Jan 2004; Martin Holzer <mholzer@gentoo.org> mailman-2.1.2-r1.ebuild,
223
+  mailman-2.1.2.ebuild, mailman-2.1.3.ebuild:
224
+  mailman has now home, but config_protect was not included. Closes 35536
225
+
226
+  14 Dec 2003; <spider@gentoo.org> mailman-2.1.1-r2.ebuild,
227
+  mailman-2.1.1-r3.ebuild, mailman-2.1.2-r1.ebuild, mailman-2.1.2.ebuild,
228
+  mailman-2.1.3.ebuild:
229
+  QA: fixing chown user.group to user:group, bug #35127
230
+
231
+*mailman-2.1.3 (21 Nov 2003)
232
+
233
+  21 Nov 2003; Martin Holzer <mholzer@gentoo.org> mailman-2.1.3.ebuild:
234
+  Version bumped.
235
+
236
+  20 Nov 2003; Martin Holzer <mholzer@gentoo.org> mailman-2.1.2-r1.ebuild,
237
+  mailman-2.1.2.ebuild:
238
+  adding spam dir. Closes #31920
239
+
240
+*mailman-2.1.2-r1 (30 Jul 2003)
241
+
242
+  30 Jul 2003; Nick Hadaway <raker@gentoo.org> mailman-2.1.2-r1.ebuild,
243
+  files/README.gentoo:
244
+  Reworked the apache configuration steps in the readme and in the 
245
+  ebuild.  Revision bumped as there have been lots of changes since
246
+  2.1.2 was initially added to portage.
247
+
248
+  26 Jul 2003; Nick Hadaway <raker@gentoo.org> mailman-2.1.2.ebuild:
249
+  Removed invalid apache use flag and adjusted routines accordingly.
250
+
251
+  16 Jul 2003; Nick Hadaway <raker@gentoo.org> mailman-2.1.2.ebuild:
252
+  Added apache and apache2 to IUSE and made pkg_config procedure
253
+  compatible with both installations types.
254
+
255
+  09 Jul 2003; Nick Hadaway <raker@gentoo.org> files/README.gentoo:
256
+  Updated the readme to be a little more explicit and complete.
257
+
258
+  08 Jun 2003; Todd Berman <tberman@gentoo.org> mailman-2.1.1-r2.ebuild,
259
+  mailman-2.1.1-r3.ebuild, mailman-2.1.2.ebuild:
260
+  Fixed IUSE. (thanks again rac)
261
+
262
+  22 May 2003; Todd Berman <tberman@gentoo.org> mailman-2.1.2.ebuild:
263
+  Added INSTALL to documentation. Closed bug #18351
264
+
265
+*mailman-2.1.2 (19 May 2003)
266
+
267
+  19 May 2003; Todd Berman <tberman@gentoo.org> mailman-2.1.1-r2.ebuild,
268
+  mailman-2.1.1-r3.ebuild, mailman-2.1.2.ebuild, files/README.gentoo,
269
+  files/mailman.2.1.1-r2.conf, files/mailman.2.1.1-r3.conf,
270
+  files/mailman.conf:
271
+  Version bump. Hopefully fixed install location issues. Hopefully fixed misc
272
+  issues with mailman install. (new install location is /usr/local/)
273
+
274
+*mailman-2.1.1-r3 (13 May 2003)
275
+
276
+  13 May 2003; Todd Berman <tberman@gentoo.org> mailman-2.1.1-r3.ebuild:
277
+  Changed install dir to /home/ instead of /var/. bumped r#
278
+
279
+*mailman-2.1.1-r2 (29 Apr 2003)
280
+
281
+  29 Apr 2003; Todd Berman <tberman@gentoo.org> mailman-2.1.1-r2.ebuild:
282
+  Changed mailman's gid to daemon to fix bug #19257.
283
+
284
+*mailman-2.1.1-r1 (18 Apr 2003)
285
+
286
+  18 Apr 2003; Martin Holzer <mholzer@gentoo.org> Manifest,
287
+  mailman-2.1.1-r1.ebuild:
288
+  Adding contrib stuff. Closes #18425.
289
+
290
+*mailman-2.1.1 (17 Feb 2003)
291
+
292
+  Daniel Ahlberg <aliz@gentoo.org> :
293
+  Security update.
294
+
295
+*mailman-2.1 (21 Jan 2003)
296
+
297
+  03 Feb 2003; Nick Hadaway <raker@gentoo.org> mailman-2.1.ebuild,
298
+  files/sendmail.rc :
299
+  Added an rc file.
300
+
301
+  21 Jan 2003; Nick Hadaway <raker@gentoo.org> mailman-2.1.ebuild,
302
+  files/digest-mailman-2.1 :
303
+  Version bump.  Added some logic to keep the old mm_cfg.py as requested
304
+  in bug #12589
305
+
306
+*mailman-2.0.12 (16 Jul 2002)
307
+
308
+  04 Jan 2002; Martin Holzer <mholzer@gentoo.org> mailman-2.0.1.2.ebuild ChangeLog :
309
+  Fixed einfo text. This closes #13078.
310
+
311
+  16 Jul 2002; Ben Lutgens <lamer@gentoo.org> mailman-2.0.1.2.ebuild,
312
+  ChangeLog, files/digest-mailman-2.0.2.1, files/mailman.conf,
313
+  files/README.gentoo :
314
+
315
+  Brand new package, based on submission by Joby Walker
316
+
... ...
@@ -0,0 +1,44 @@
1
+AUX 50_mailman.conf 429 RMD160 54104453464b725adc18e5fb66bee265089013f6 SHA1 7b002917ae358587fc121f8c06c54c76dd0d9934 SHA256 8a93c5f9b2012122c6e85445620d5eb388e1bc38cb2102158bb62681cb61d3ec
2
+MD5 165ec3889c73f334f7b524c654977066 files/50_mailman.conf 429
3
+RMD160 54104453464b725adc18e5fb66bee265089013f6 files/50_mailman.conf 429
4
+SHA256 8a93c5f9b2012122c6e85445620d5eb388e1bc38cb2102158bb62681cb61d3ec files/50_mailman.conf 429
5
+AUX README.gentoo 5505 RMD160 aeb5fb5564ac798f6ceed74d01792e68fdaa1eef SHA1 4bf472e3f8f1fdd575e5829282e515b0935ed4bf SHA256 ecc50efcb4cc2cd5d33aca6cba20339d2a932b7c7227375da651cdc9590f0bd5
6
+MD5 6732260cb65d8402899cce3e06ff4140 files/README.gentoo 5505
7
+RMD160 aeb5fb5564ac798f6ceed74d01792e68fdaa1eef files/README.gentoo 5505
8
+SHA256 ecc50efcb4cc2cd5d33aca6cba20339d2a932b7c7227375da651cdc9590f0bd5 files/README.gentoo 5505
9
+AUX mailman-2.1.6-directory-check.patch 1287 RMD160 3bf6d1216a79a32d68340cb0df5db9b5f44a3931 SHA1 ad2b689ce7911b509f999cd849d0402c36ded97c SHA256 2d31eda834429a55edad1fea3c379ecb3e8f05c03fac82f172989caeab85314d
10
+MD5 130b235f32a50d11f76a88b979fb4245 files/mailman-2.1.6-directory-check.patch 1287
11
+RMD160 3bf6d1216a79a32d68340cb0df5db9b5f44a3931 files/mailman-2.1.6-directory-check.patch 1287
12
+SHA256 2d31eda834429a55edad1fea3c379ecb3e8f05c03fac82f172989caeab85314d files/mailman-2.1.6-directory-check.patch 1287
13
+AUX mailman-2.1.7-directory-check.patch 1287 RMD160 3bf6d1216a79a32d68340cb0df5db9b5f44a3931 SHA1 ad2b689ce7911b509f999cd849d0402c36ded97c SHA256 2d31eda834429a55edad1fea3c379ecb3e8f05c03fac82f172989caeab85314d
14
+MD5 130b235f32a50d11f76a88b979fb4245 files/mailman-2.1.7-directory-check.patch 1287
15
+RMD160 3bf6d1216a79a32d68340cb0df5db9b5f44a3931 files/mailman-2.1.7-directory-check.patch 1287
16
+SHA256 2d31eda834429a55edad1fea3c379ecb3e8f05c03fac82f172989caeab85314d files/mailman-2.1.7-directory-check.patch 1287
17
+AUX mailman-2.1.8_rc1-directory-check.patch 1287 RMD160 3bf6d1216a79a32d68340cb0df5db9b5f44a3931 SHA1 ad2b689ce7911b509f999cd849d0402c36ded97c SHA256 2d31eda834429a55edad1fea3c379ecb3e8f05c03fac82f172989caeab85314d
18
+MD5 130b235f32a50d11f76a88b979fb4245 files/mailman-2.1.8_rc1-directory-check.patch 1287
19
+RMD160 3bf6d1216a79a32d68340cb0df5db9b5f44a3931 files/mailman-2.1.8_rc1-directory-check.patch 1287
20
+SHA256 2d31eda834429a55edad1fea3c379ecb3e8f05c03fac82f172989caeab85314d files/mailman-2.1.8_rc1-directory-check.patch 1287
21
+AUX mailman.conf 385 RMD160 bec3c71140385fa88078ffb38be14bfd8ec068c6 SHA1 64e15fce12231bac8e9a5dd831d9c4f134df77a1 SHA256 fdd86c4a72318ade5dfe0f075ce62470979f93d8a4c862993dc32e7bdb422eab
22
+MD5 3089c1f0f8d91abdd612997b085959eb files/mailman.conf 385
23
+RMD160 bec3c71140385fa88078ffb38be14bfd8ec068c6 files/mailman.conf 385
24
+SHA256 fdd86c4a72318ade5dfe0f075ce62470979f93d8a4c862993dc32e7bdb422eab files/mailman.conf 385
25
+AUX mailman.rc 597 RMD160 be0a574298a1d8d547a4ca76f864dd5fee9b897d SHA1 f464f5ba7310934d300a9af7c614fdf7498f7d2b SHA256 ef4f5482cf68ba44a0fbb83acde29295bd8dcb6512d259d14387dfc29beeb625
26
+MD5 ce6d06f51e3da34e92048369e9fe14d2 files/mailman.rc 597
27
+RMD160 be0a574298a1d8d547a4ca76f864dd5fee9b897d files/mailman.rc 597
28
+SHA256 ef4f5482cf68ba44a0fbb83acde29295bd8dcb6512d259d14387dfc29beeb625 files/mailman.rc 597
29
+DIST mailman-2.1.9.tgz 7829201 RMD160 135f94eeecca1f562f98dfe98c1a367bed229372 SHA1 e9f6f55e2551c3e576460749383da20599412d42 SHA256 1b7a2c853c21bfd22205167dc3678c634a3f981721d95d1cd923ca84967cc986
30
+EBUILD mailman-2.1.9.ebuild 3821 RMD160 d4476bdd561c27020007bb05a5295696c6489546 SHA1 32eb961541eab4af0618118853ca6cd2f97cd975 SHA256 1d8ac29353ec00cd89d97ac1a07c22b62b97781f951e2d785eea0c129338562d
31
+MD5 f497d12980d25eaa1a16647557740bf6 mailman-2.1.9.ebuild 3821
32
+RMD160 d4476bdd561c27020007bb05a5295696c6489546 mailman-2.1.9.ebuild 3821
33
+SHA256 1d8ac29353ec00cd89d97ac1a07c22b62b97781f951e2d785eea0c129338562d mailman-2.1.9.ebuild 3821
34
+MISC ChangeLog 11319 RMD160 4f590471f01a9fd83d50ddf9fb1782b607f55e8d SHA1 af952b64a3113918ad7c38344ed8a894ebbef035 SHA256 a6b1043c6a5551344e2cf8ed5b1f584e25410ea3a162bb398aff440bb06c7602
35
+MD5 86712eff6883d76e24790eb04ec564b8 ChangeLog 11319
36
+RMD160 4f590471f01a9fd83d50ddf9fb1782b607f55e8d ChangeLog 11319
37
+SHA256 a6b1043c6a5551344e2cf8ed5b1f584e25410ea3a162bb398aff440bb06c7602 ChangeLog 11319
38
+MISC metadata.xml 218 RMD160 30759d93f0209fdd74f29393ae54999fe6b2bdff SHA1 486b307ff1dae10aef7d18472460a21bc2decdfb SHA256 09421ca1b9299683d07f68ddbbd3ed97251dac613121b420841a3251da7fcb89
39
+MD5 45b42e062b70460f0304d1ebe48d82ab metadata.xml 218
40
+RMD160 30759d93f0209fdd74f29393ae54999fe6b2bdff metadata.xml 218
41
+SHA256 09421ca1b9299683d07f68ddbbd3ed97251dac613121b420841a3251da7fcb89 metadata.xml 218
42
+MD5 087c16dcdc844a887c4c0ccaf21904bf files/digest-mailman-2.1.9 235
43
+RMD160 a59a209ae835d7942f248044ebb2f5fa08aa802e files/digest-mailman-2.1.9 235
44
+SHA256 7fdbc00422a55956c8b091193599ffd51a1042885148a22a246fcab0d1aa74f7 files/digest-mailman-2.1.9 235
... ...
@@ -0,0 +1,18 @@
1
+<IfDefine MAILMAN>
2
+	ScriptAlias /mailman/ "/usr/local/mailman/cgi-bin/"
3
+
4
+	<Directory "/usr/local/mailman/cgi-bin/">
5
+		AllowOverride None
6
+		Options None
7
+		Order allow,deny
8
+		Allow from all
9
+	</Directory>
10
+
11
+	Alias /pipermail/ "/usr/local/mailman/archives/public/"
12
+	<Directory "/usr/local/mailman/archives/public/">
13
+		AllowOverride None
14
+		Options ExecCGI FollowSymLinks
15
+		Order allow,deny  
16
+		Allow from all
17
+	</Directory>
18
+</IfDefine>
... ...
@@ -0,0 +1,147 @@
1
+# Copyright 1999-2004 Gentoo Foundation
2
+# Distributed under the terms of the GNU General Public License v2
3
+# $Header: /var/cvsroot/gentoo-x86/net-mail/mailman/files/README.gentoo,v 1.9 2004/07/07 15:57:02 mholzer Exp $
4
+
5
+Follow these instructions to finish setting up mailman. This file and the
6
+original ebuild were tweaked by me <lamer@gentoo.org> but were graciously
7
+submitted by Joby Walker (YOU RULE!) 
8
+2003 Jul 09: updated by Jesus Perez and re-tweaked by me <raker@gentoo.org>
9
+for 2.1.x.
10
+
11
+Please view the documentation on Mailman at: http://www.list.org/
12
+
13
+I have configured Mailman to install in /usr/local/mailman by default, to change
14
+this you will need to modify the INSTALLDIR variable in the ebuild and the
15
+locations in the mailman.conf file.
16
+
17
+1) If this is your first time installing mailman, after your "emerge mailman",
18
+you need to add -D MAILMAN to /etc/conf.d/apache or /etc/conf.d/apache2 and restart
19
+apache.
20
+
21
+2) In your /etc/conf.d/apache (for apache 1.x)
22
+	or /etc/conf.d/apache2 (for apache 2.x) 
23
+	file add the additional option:
24
+
25
+	-D MAILMAN
26
+
27
+3) Make sure mailman is a part of the cron group
28
+
29
+4) This must be done as user mailman:
30
+
31
+	su - mailman
32
+
33
+Add the cron jobs:
34
+
35
+	cd cron
36
+	crontab crontab.in
37
+	cd ..
38
+
39
+Create the site password:
40
+
41
+	bin/mmsitepass
42
+
43
+and main list:
44
+
45
+	bin/newlist mailman
46
+
47
+
48
+5) Change back to root:
49
+
50
+	exit
51
+
52
+Add this to /etc/mail/aliases (and see point 9 for notes):
53
+     mailman:              "|/usr/local/mailman/mail/mailman post mailman"
54
+     mailman-admin:        "|/usr/local/mailman/mail/mailman admin mailman"
55
+     mailman-bounces:      "|/usr/local/mailman/mail/mailman bounces mailman"
56
+     mailman-confirm:      "|/usr/local/mailman/mail/mailman confirm mailman"
57
+     mailman-join:         "|/usr/local/mailman/mail/mailman join mailman"
58
+     mailman-leave:        "|/usr/local/mailman/mail/mailman leave mailman"
59
+     mailman-owner:        "|/usr/local/mailman/mail/mailman owner mailman"
60
+     mailman-request:      "|/usr/local/mailman/mail/mailman request mailman"
61
+     mailman-subscribe:    "|/usr/local/mailman/mail/mailman subscribe mailman"
62
+     mailman-unsubscribe:  "|/usr/local/mailman/mail/mailman unsubscribe mailman"
63
+
64
+For courier, the aliases have to go to /etc/courier/aliases and you have to skip
65
+the quotes.
66
+
67
+Run newaliases (only if you use sendmail).
68
+
69
+	newaliases
70
+    
71
+Copy the web icons:
72
+     cp /usr/local/mailman/icons/* /var/www/localhost/icons
73
+
74
+6) Start the mailman daemon:
75
+
76
+	/etc/init.d/mailman start
77
+
78
+and add it to default runlevel (optional but recommended):
79
+
80
+	rc-update add mailman default
81
+
82
+7) For each list created (either with web interface or with bin/newlist) 
83
+this must be added to /etc/mail/aliases (see smrsh notes below)
84
+replace <list-name> with the name of the list:
85
+
86
+	<list-name>: "|/usr/local/mailman/mail/mailman post <list-name>"
87
+	<list-name>-admin: "|/usr/local/mailman/mail/mailman admin <list-name>"
88
+	<list-name>-bounces: "|/usr/local/mailman/mail/mailman bounces <list-name>"
89
+     	<list-name>-confirm: "|/usr/local/mailman/mail/mailman confirm <list-name>"
90
+     	<list-name>-join: "|/usr/local/mailman/mail/mailman join <list-name>"
91
+	<list-name>-leave: "|/usr/local/mailman/mail/mailman leave <list-name>"
92
+	<list-name>-owner: "|/usr/local/mailman/mail/mailman owner <list-name>"
93
+	<list-name>-request: "|/usr/local/mailman/mail/mailman request <list-name>"
94
+     	<list-name>-subscribe: "|/usr/local/mailman/mail/mailman subscribe <list-name>"
95
+	<list-name>-unsubscribe: "|/usr/local/mailman/mail/mailman unsubscribe <list-name>"
96
+
97
+For courier, the aliases have to go to /etc/courier/aliases and you have to skip
98
+the quotes.
99
+
100
+Run newaliases:
101
+
102
+	newaliases
103
+
104
+smrsh notes
105
+-----------
106
+(if you use sendmail, you are surely using srmsh) you must note that 
107
+sendmail won't run any program outside of EBINDIR. I tried to change 
108
+EBINDIR using,define(`confEBINDIR', `/usr/local/mailman/mail')dnl in 
109
+sendmail.mc but it didn't work, so mailman must be placed in EBINDIR, 
110
+which in Gentoo is /usr/adm/sm.bin, so you must run as root:
111
+
112
+     ln -s /usr/local/mailman/mail/mailman /usr/adm/sm.bin/mailman
113
+
114
+And the lines in /etc/mail/aliases which refer to 
115
+/usr/local/mailman/mail/mailman must be changed to mailman:
116
+
117
+     <list-name>:              "|mailman post <list-name>"
118
+     <list-name>-admin:        "|mailman admin <list-name>"
119
+     <list-name>-bounces:      "|mailman bounces <list-name>"
120
+     <list-name>-confirm:      "|mailman confirm <list-name>"
121
+     <list-name>-join:         "|mailman join <list-name>"
122
+     <list-name>-leave:        "|mailman leave <list-name>"
123
+     <list-name>-owner:        "|mailman owner <list-name>"
124
+     <list-name>-request:      "|mailman request <list-name>"
125
+     <list-name>-subscribe:    "|mailman subscribe <list-name>"
126
+     <list-name>-unsubscribe:  "|mailman unsubscribe <list-name>"
127
+
128
+
129
+Other Helpful things to know...
130
+-------------------------------
131
+run "bin/check_perms -f" from the root mailman directory
132
+(/usr/local/mailman) to check and fix permission problems.
133
+
134
+The INSTALL file is located in /usr/share/doc/mailman-$VERSION/ 
135
+
136
+Postfix notes
137
+-------------
138
+If you're using Postfix, don't manually change your /etc/mail/aliases
139
+file, as described above. Instead, follow these instructions:
140
+
141
+http://list.org/mailman-install/node13.html
142
+
143
+This will set up Mailman and Postfix to automatically generate the new
144
+aliases when you create new lists. It will also make sure that Postfix
145
+uses the correct group ID when it's talking to Mailman, otherwise you
146
+will get security errors from Mailman.
147
+
... ...
@@ -0,0 +1,3 @@
1
+MD5 dd51472470f9eafb04f64da372444835 mailman-2.1.9.tgz 7829201
2
+RMD160 135f94eeecca1f562f98dfe98c1a367bed229372 mailman-2.1.9.tgz 7829201
3
+SHA256 1b7a2c853c21bfd22205167dc3678c634a3f981721d95d1cd923ca84967cc986 mailman-2.1.9.tgz 7829201
... ...
@@ -0,0 +1,30 @@
1
+--- bin/check_perms.org	2005-05-25 00:04:15.000000000 +0200
2
++++ bin/check_perms	2005-05-25 00:04:35.000000000 +0200
3
+@@ -331,6 +331,8 @@
4
+         print _('checking permissions on list data')
5
+     # BAW: This needs to be converted to the Site module abstraction
6
+     for dir in os.listdir(mm_cfg.LIST_DATA_DIR):
7
++        if not S_ISDIR(statmode(os.path.join(mm_cfg.LIST_DATA_DIR,dir))):
8
++            continue
9
+         for file in checkfiles:
10
+             path = os.path.join(mm_cfg.LIST_DATA_DIR, dir, file)
11
+             if STATE.VERBOSE:
12
+--- bin/update.org	2005-05-25 00:04:30.000000000 +0200
13
++++ bin/update	2005-05-25 00:04:35.000000000 +0200
14
+@@ -34,6 +34,7 @@
15
+ """
16
+ 
17
+ import os
18
++import stat
19
+ import md5
20
+ import sys
21
+ import time
22
+@@ -425,7 +426,7 @@
23
+     # Now update for the Mailman 2.1.5 qfile format.  For every filebase in
24
+     # the qfiles/* directories that has both a .pck and a .db file, pull the
25
+     # data out and re-queue them.
26
+-    for dirname in os.listdir(mm_cfg.QUEUE_DIR):
27
++    for dirname in [x for x in os.listdir(mm_cfg.QUEUE_DIR) if stat.S_ISDIR(os.stat(os.path.join(mm_cfg.QUEUE_DIR,x)).st_mode)]:
28
+         dirpath = os.path.join(mm_cfg.QUEUE_DIR, dirname)
29
+         if dirpath == mm_cfg.BADQUEUE_DIR:
30
+             # The files in qfiles/bad can't possibly be pickles
... ...
@@ -0,0 +1,30 @@
1
+--- bin/check_perms.org	2005-05-25 00:04:15.000000000 +0200
2
++++ bin/check_perms	2005-05-25 00:04:35.000000000 +0200
3
+@@ -331,6 +331,8 @@
4
+         print _('checking permissions on list data')
5
+     # BAW: This needs to be converted to the Site module abstraction
6
+     for dir in os.listdir(mm_cfg.LIST_DATA_DIR):
7
++        if not S_ISDIR(statmode(os.path.join(mm_cfg.LIST_DATA_DIR,dir))):
8
++            continue
9
+         for file in checkfiles:
10
+             path = os.path.join(mm_cfg.LIST_DATA_DIR, dir, file)
11
+             if STATE.VERBOSE:
12
+--- bin/update.org	2005-05-25 00:04:30.000000000 +0200
13
++++ bin/update	2005-05-25 00:04:35.000000000 +0200
14
+@@ -34,6 +34,7 @@
15
+ """
16
+ 
17
+ import os
18
++import stat
19
+ import md5
20
+ import sys
21
+ import time
22
+@@ -425,7 +426,7 @@
23
+     # Now update for the Mailman 2.1.5 qfile format.  For every filebase in
24
+     # the qfiles/* directories that has both a .pck and a .db file, pull the
25
+     # data out and re-queue them.
26
+-    for dirname in os.listdir(mm_cfg.QUEUE_DIR):
27
++    for dirname in [x for x in os.listdir(mm_cfg.QUEUE_DIR) if stat.S_ISDIR(os.stat(os.path.join(mm_cfg.QUEUE_DIR,x)).st_mode)]:
28
+         dirpath = os.path.join(mm_cfg.QUEUE_DIR, dirname)
29
+         if dirpath == mm_cfg.BADQUEUE_DIR:
30
+             # The files in qfiles/bad can't possibly be pickles
... ...
@@ -0,0 +1,30 @@
1
+--- bin/check_perms.org	2005-05-25 00:04:15.000000000 +0200
2
++++ bin/check_perms	2005-05-25 00:04:35.000000000 +0200
3
+@@ -331,6 +331,8 @@
4
+         print _('checking permissions on list data')
5
+     # BAW: This needs to be converted to the Site module abstraction
6
+     for dir in os.listdir(mm_cfg.LIST_DATA_DIR):
7
++        if not S_ISDIR(statmode(os.path.join(mm_cfg.LIST_DATA_DIR,dir))):
8
++            continue
9
+         for file in checkfiles:
10
+             path = os.path.join(mm_cfg.LIST_DATA_DIR, dir, file)
11
+             if STATE.VERBOSE:
12
+--- bin/update.org	2005-05-25 00:04:30.000000000 +0200
13
++++ bin/update	2005-05-25 00:04:35.000000000 +0200
14
+@@ -34,6 +34,7 @@
15
+ """
16
+ 
17
+ import os
18
++import stat
19
+ import md5
20
+ import sys
21
+ import time
22
+@@ -425,7 +426,7 @@
23
+     # Now update for the Mailman 2.1.5 qfile format.  For every filebase in
24
+     # the qfiles/* directories that has both a .pck and a .db file, pull the
25
+     # data out and re-queue them.
26
+-    for dirname in os.listdir(mm_cfg.QUEUE_DIR):
27
++    for dirname in [x for x in os.listdir(mm_cfg.QUEUE_DIR) if stat.S_ISDIR(os.stat(os.path.join(mm_cfg.QUEUE_DIR,x)).st_mode)]:
28
+         dirpath = os.path.join(mm_cfg.QUEUE_DIR, dirname)
29
+         if dirpath == mm_cfg.BADQUEUE_DIR:
30
+             # The files in qfiles/bad can't possibly be pickles
... ...
@@ -0,0 +1,17 @@
1
+ScriptAlias /mailman/ "/usr/local/mailman/cgi-bin/"
2
+
3
+<Directory "/usr/local/mailman/cgi-bin/">
4
+	AllowOverride None
5
+	Options None
6
+	Order allow,deny
7
+	Allow from all
8
+</Directory>
9
+
10
+Alias /pipermail/ "/usr/local/mailman/archives/public/"
11
+
12
+<Directory "/usr/local/mailman/archives/public/">
13
+	AllowOverride None
14
+	Options ExecCGI FollowSymLinks
15
+	Order allow,deny  
16
+	Allow from all
17
+</Directory>
... ...
@@ -0,0 +1,27 @@
1
+#!/sbin/runscript
2
+# Copyright 1999-2004 Gentoo Foundation
3
+# Distributed under the terms of the GNU General Public License v2
4
+# $Header: /var/cvsroot/gentoo-x86/net-mail/mailman/files/mailman.rc,v 1.5 2004/07/14 23:50:52 agriffis Exp $
5
+
6
+depend() {
7
+	need net
8
+	use logger
9
+}
10
+
11
+start() {
12
+	ebegin "Starting mailman"
13
+	su - mailman -c 'bin/mailmanctl -s start' >/dev/null 2>&1
14
+	eend $?
15
+}
16
+
17
+stop() {
18
+	ebegin "Stopping mailman"
19
+	su - mailman -c 'bin/mailmanctl stop' >/dev/null 2>&1
20
+	eend $?
21
+}
22
+
23
+svc_restart() {
24
+	ebegin "Restarting mailman"
25
+	su - mailman -c 'bin/mailmanctl restart' >/dev/null 2>&1
26
+	eend $?
27
+}
... ...
@@ -0,0 +1,141 @@
1
+# Copyright 1999-2006 Gentoo Foundation
2
+# Distributed under the terms of the GNU General Public License v2
3
+# $Header: /var/cvsroot/gentoo-x86/net-mail/mailman/mailman-2.1.9_rc1.ebuild,v 1.5 2006/09/11 14:24:36 tcort Exp $
4
+
5
+inherit eutils depend.apache
6
+IUSE="apache2 postfix sendmail qmail courier exim xmail"
7
+
8
+DESCRIPTION="A python-based mailing list server with an extensive web interface"
9
+SRC_URI="mirror://sourceforge/${PN}/${P}.tgz"
10
+HOMEPAGE="http://www.list.org/"
11
+
12
+SLOT="0"
13
+LICENSE="GPL-2"
14
+KEYWORDS="amd64 ~ppc ~sparc ~x86"
15
+
16
+DEPEND=">=dev-lang/python-2.3
17
+	virtual/mta
18
+	|| ( net-www/apache www-servers/lighttpd )"
19
+
20
+INSTALLDIR="/home/.internal/mailman"
21
+APACHEGID="1280"
22
+
23
+if use postfix; then
24
+	MAILGID="1280"
25
+elif use sendmail; then
26
+	MAILGID=daemon
27
+elif use qmail; then
28
+	MAILGID="1280"
29
+elif use courier; then
30
+	MAILGID=mail
31
+elif use exim; then
32
+	MAILGID=mail
33
+elif use xmail; then
34
+	MAILGID=xmail
35
+else
36
+	MAILGID="1280"
37
+fi
38
+
39
+S=${WORKDIR}/${P}
40
+
41
+pkg_setup() {
42
+	# Bug #58526: switch to enew{group,user}.
43
+	# need to add mailman here for compile process.
44
+	# Duplicated at pkg_postinst() for binary install.
45
+	enewgroup mailman 1280
46
+	enewuser mailman 1280 /bin/bash ${INSTALLDIR} mailman -G cron -c mailman
47
+	mkdir -p ${INSTALLDIR}
48
+	chown mailman:mailman ${INSTALLDIR}
49
+	chmod 2775 ${INSTALLDIR}
50
+}
51
+
52
+src_unpack() {
53
+	unpack ${A}
54
+	cd ${S}
55
+	epatch ${FILESDIR}/${PN}-2.1.8_rc1-directory-check.patch || die "patch failed."
56
+}
57
+
58
+src_compile() {
59
+	econf \
60
+		--prefix=${INSTALLDIR} \
61
+		--with-mail-gid=${MAILGID} \
62
+		--with-cgi-gid=${APACHEGID} \
63
+		--with-var-prefix=/srv/mailman \
64
+		--with-cgi-ext=.cgi \
65
+		--with-mailhost=lists.schokokeks.org \
66
+		--with-urlhost=lists.schokokeks.org \
67
+	|| die "configure failed"
68
+
69
+	make || die "make failed"
70
+}
71
+
72
+src_install () {
73
+	ID=${D}${INSTALLDIR}
74
+
75
+	make prefix=${ID} var_prefix=${ID} doinstall || die
76
+
77
+	keepdir ${INSTALLDIR}/logs
78
+	keepdir ${INSTALLDIR}/locks
79
+	keepdir ${INSTALLDIR}/spam
80
+	keepdir ${INSTALLDIR}/archives/public
81
+	keepdir ${INSTALLDIR}/archives/private
82
+	keepdir ${INSTALLDIR}/lists
83
+	keepdir ${INSTALLDIR}/qfiles
84
+
85
+	if use apache2; then
86
+		insinto ${APACHE2_MODULES_CONFDIR}
87
+	else
88
+		insinto ${APACHE1_MODULES_CONFDIR}
89
+	fi
90
+	doins ${FILESDIR}/50_mailman.conf
91
+
92
+	dodoc ${FILESDIR}/README.gentoo
93
+	dodoc ACK* BUGS FAQ NEWS README* TODO UPGRADING INSTALL
94
+	dodoc contrib/README.check_perms_grsecurity contrib/mm-handler.readme
95
+	dodoc contrib/virtusertable contrib/mailman.mc
96
+
97
+	cp build/contrib/*.py contrib/majordomo2mailman.pl contrib/auto \
98
+		contrib/mm-handler* ${ID}/bin
99
+
100
+	# Save the old config into the new package as CONFIG_PROTECT
101
+	# doesn't work for this package.
102
+	for i in ${ROOT}/var/mailman ${ROOT}/home/mailman \
103
+		${ROOT}/usr/local/mailman ${INSTALLDIR}
104
+	do
105
+		if [ -f ${i}/Mailman/mm_cfg.py ]; then
106
+			cp ${i}/Mailman/mm_cfg.py \
107
+				${ID}/Mailman/mm_cfg.py
108
+			einfo "Your old config has been saved as mm_cfg.py"
109
+			einfo "A new config has been installed as mm_cfg.dist"
110
+		fi
111
+	done
112
+
113
+	exeinto /etc/init.d
114
+	newexe ${FILESDIR}/mailman.rc mailman
115
+
116
+	chown -R mailman:mailman ${ID}
117
+	chmod 2775 ${ID}
118
+}
119
+
120
+pkg_postinst() {
121
+	enewgroup mailman 1280
122
+	enewuser mailman 1280 -1 ${INSTALLDIR} mailman -G cron -c "mailman"
123
+	cd ${INSTALLDIR}
124
+	bin/update
125
+	einfo "Running \`${INSTALLDIR}/bin/check_perms -f\` *"
126
+	bin/check_perms -f
127
+	einfo ""
128
+	einfo "Please read /usr/share/doc/${PF}/README.gentoo.gz for additional"
129
+	einfo "Setup information, mailman will NOT run unless you follow"
130
+	einfo "those instructions!"
131
+	einfo ""
132
+
133
+	einfo "An example Mailman configuration file for Apache has been installed into:"
134
+	use apache2 && einfo "  ${APACHE2_MODULES_CONFDIR}/50_mailman.conf"
135
+	use apache2 || einfo "  ${APACHE1_MODULES_CONFDIR}/50_mailman.conf"
136
+	einfo ""
137
+	einfo "To enable, you will need to add \"-D MAILMAN\" to"
138
+	use apache2 && einfo "/etc/conf.d/apache2."
139
+	use apache2 || einfo "/etc/conf.d/apache."
140
+	einfo ""
141
+}
... ...
@@ -0,0 +1,6 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
3
+<pkgmetadata>
4
+<herd>net-mail</herd>
5
+<maintainer><email>hanno@gentoo.org</email></maintainer>
6
+</pkgmetadata>
... ...
@@ -0,0 +1,316 @@
1
+# ChangeLog for net-mail/mailman
2
+# Copyright 2002-2006 Gentoo Foundation; Distributed under the GPL v2
3
+# $Header: /var/cvsroot/gentoo-x86/net-mail/mailman/ChangeLog,v 1.85 2006/09/11 14:24:36 tcort Exp $
4
+
5
+  11 Sep 2006; Thomas Cort <tcort@gentoo.org> mailman-2.1.9_rc1.ebuild:
6
+  Stable on amd64 wrt security Bug #139976.
7
+
8
+  10 Sep 2006; Jason Wever <weeve@gentoo.org> mailman-2.1.9_rc1.ebuild:
9
+  Stable on SPARC wrt security bug #139976.
10
+
11
+  08 Sep 2006; Joshua Jackson <tsunam@gentoo.org> mailman-2.1.9_rc1.ebuild:
12
+  Stable x86; bug #139976
13
+
14
+  07 Sep 2006; Tobias Scherbaum <dertobi123@gentoo.org>
15
+  mailman-2.1.9_rc1.ebuild:
16
+  ppc stable, bug #139976
17
+
18
+*mailman-2.1.9_rc1 (07 Sep 2006)
19
+
20
+  07 Sep 2006; Hanno Boeck <hanno@gentoo.org> +mailman-2.1.9_rc1.ebuild:
21
+  Version bump, contains security fixes.
22
+
23
+  21 Jul 2006; Hanno Boeck <hanno@gentoo.org> mailman-2.1.8_rc1.ebuild:
24
+  Fix GID for qmail (bug #137254).
25
+
26
+  21 Jul 2006; Hanno Boeck <hanno@gentoo.org> mailman-2.1.5-r4.ebuild,
27
+  mailman-2.1.5-r5.ebuild, mailman-2.1.6_rc4.ebuild, mailman-2.1.6.ebuild,
28
+  mailman-2.1.7.ebuild, mailman-2.1.8_rc1.ebuild:
29
+  Fix Slot from O (the letter) to 0 (zero).
30
+
31
+  08 May 2006; Hanno Boeck <hanno@gentoo.org> metadata.xml,
32
+  mailman-2.1.8_rc1.ebuild:
33
+  Make ebuild fully support INSTALLDIR (bug #84708) and add myself as maintainer.
34
+
35
+  29 Apr 2006; Luis Medinas <metalgod@gentoo.org> mailman-2.1.8_rc1.ebuild:
36
+  Stable on amd64. For security bug #129136.
37
+
38
+  17 Apr 2006; Mark Loeser <halcy0n@gentoo.org> mailman-2.1.8_rc1.ebuild:
39
+  Stable on x86; bug #129136
40
+
41
+  16 Apr 2006; Jason Wever <weeve@gentoo.org> mailman-2.1.8_rc1.ebuild:
42
+  Stable on SPARC wrt security bug #129136.
43
+
44
+  15 Apr 2006; Tobias Scherbaum <dertobi123@gentoo.org>
45
+  mailman-2.1.8_rc1.ebuild:
46
+  ppc stable, bug #129136
47
+
48
+*mailman-2.1.8_rc1 (14 Apr 2006)
49
+
50
+  14 Apr 2006; Martin Holzer <mholzer@gentoo.org>
51
+  +files/mailman-2.1.8_rc1-directory-check.patch, +mailman-2.1.8_rc1.ebuild:
52
+  Security bump. see bug #129136
53
+
54
+  13 Feb 2006; Jason Wever <weeve@gentoo.org> mailman-2.1.7.ebuild:
55
+  Stable on SPARC wrt security bug #119313.
56
+
57
+  08 Feb 2006; Chris Gianelloni <wolf31o2@gentoo.org> mailman-2.1.7.ebuild:
58
+  Marking stable on x86 wrt bug #119313.
59
+
60
+  07 Feb 2006; Simon Stelling <blubb@gentoo.org> mailman-2.1.7.ebuild:
61
+  stable on amd64 wrt bug 119313
62
+
63
+*mailman-2.1.7 (03 Jan 2006)
64
+
65
+  03 Jan 2006; Martin Holzer <mholzer@gentoo.org>
66
+  +files/mailman-2.1.7-directory-check.patch, +mailman-2.1.7.ebuild:
67
+  Version bumped.
68
+
69
+  03 Jan 2006; Martin Holzer <mholzer@gentoo.org> mailman-2.1.6_rc4.ebuild,
70
+  mailman-2.1.6.ebuild:
71
+  changing postfix mailgid. closes #106403
72
+
73
+  23 Aug 2005; Andrej Kacian <ticho@gentoo.org> mailman-2.1.5-r2.ebuild,
74
+  mailman-2.1.5-r3.ebuild, mailman-2.1.5-r4.ebuild, mailman-2.1.5-r5.ebuild,
75
+  mailman-2.1.6_beta1.ebuild, mailman-2.1.6_beta1-r1.ebuild,
76
+  mailman-2.1.6_rc4.ebuild, mailman-2.1.6.ebuild:
77
+  Use -1 for shell argument to enewuser. Bug #103421.
78
+
79
+*mailman-2.1.6 (06 Jul 2005)
80
+
81
+  06 Jul 2005; Martin Holzer <mholzer@gentoo.org>
82
+  +files/mailman-2.1.6-directory-check.patch, +mailman-2.1.6.ebuild:
83
+  Version bumped.
84
+
85
+*mailman-2.1.6_rc4 (24 May 2005)
86
+
87
+  24 May 2005; Martin Holzer <mholzer@gentoo.org>
88
+  +files/mailman-2.1.6_rc4-directory-check.patch, +mailman-2.1.6_rc4.ebuild:
89
+  Version bumped. MTA now configured with USE flag
90
+
91
+*mailman-2.1.6_beta1-r1 (01 Mar 2005)
92
+
93
+  01 Mar 2005; Elfyn McBratney <beu@gentoo.org> +files/50_mailman.conf,
94
+  +mailman-2.1.5-r5.ebuild, +mailman-2.1.6_beta1-r1.ebuild:
95
+  Rev bumps.  Update to use the new apache paths.  Closes #77916.
96
+
97
+  16 Feb 2005; Elfyn McBratney <beu@gentoo.org> mailman-2.1.5-r2.ebuild,
98
+  mailman-2.1.5-r3.ebuild, mailman-2.1.5-r4.ebuild,
99
+  mailman-2.1.6_beta1.ebuild:
100
+  Add slash after ${ROOT} in pkg_config.
101
+
102
+*mailman-2.1.6_beta1 (12 Feb 2005)
103
+
104
+  12 Feb 2005; Tuấn Văn <langthang@gentoo.org>
105
+  +files/mailman-2.1.6_beta1-directory-check.patch,
106
+  +mailman-2.1.6_beta1.ebuild:
107
+  New version. New directory-check.patch, thanks to Brian Harring <ferringb@gentoo.org>
108
+
109
+  10 Feb 2005; Jan Brinkmann <luckyduck@gentoo.org> mailman-2.1.5-r4.ebuild:
110
+  stable on amd64. see #81109
111
+
112
+  09 Feb 2005; Gustavo Zacarias <gustavoz@gentoo.org> mailman-2.1.5-r4.ebuild:
113
+  Stable on sparc wrt #81109
114
+
115
+  09 Feb 2005; Olivier Crête <tester@gentoo.org> mailman-2.1.5-r4.ebuild:
116
+  Stable on x86, bug #81109
117
+
118
+  09 Feb 2005; Tuấn Văn <langthang@gentoo.org>
119
+  +files/mailman-2.1.5-true_path.patch:
120
+  revision bump with true_path patch.
121
+
122
+  19 Jan 2005; Karol Wojtaszek <sekretarz@gentoo.org>
123
+  mailman-2.1.5-r3.ebuild:
124
+  Stable on amd64, bug #77524
125
+
126
+  16 Jan 2005; Tuấn Văn <langthang@gentoo.org> mailman-2.1.5-r3.ebuild:
127
+  stable on x86.
128
+
129
+  16 Jan 2005; Jason Wever <weeve@gentoo.org> mailman-2.1.5-r3.ebuild:
130
+  Stable on sparc wrt security bug #77524.
131
+
132
+*mailman-2.1.5-r3 (15 Jan 2005)
133
+
134
+  15 Jan 2005; Tuấn Văn <langthang@gentoo.org>
135
+  +files/mailman-2.1.5-driver.cvs.patch, +mailman-2.1.5-r3.ebuild:
136
+  revision bump to resolve bug #77524.
137
+
138
+  11 Nov 2004; Tuan Van <langthang@gentoo.org> mailman-2.1.5-r2.ebuild:
139
+  QA: illegal einfo/ewarn. Bug #70848.
140
+
141
+  08 Aug 2004; Jason Wever <weeve@gentoo.org> mailman-2.1.5-r2.ebuild:
142
+  Stable on sparc wrt bug #58918.
143
+
144
+  08 Aug 2004; Tom Martin <slarti@gentoo.org> mailman-2.1.5-r2.ebuild:
145
+  Stable on amd64 for bug 58918.
146
+
147
+  07 Aug 2004; Tuan Van <langthang@gentoo.org> mailman-2.1.5-r2.ebuild:
148
+  Do not run `check_perms_grsecurity.py -f` on regular system.
149
+
150
+  07 Aug 2004; Tuan Van <langthang@gentoo.org> mailman-2.1.5-r2.ebuild:
151
+  fix to get check_perms_grsecurity.py run.
152
+
153
+*mailman-2.1.5-r2 (28 Jul 2004)
154
+
155
+  28 Jul 2004; Tuan Van <langthang@gentoo.org> +mailman-2.1.5-r2.ebuild:
156
+  fix bug #58644. Revision bump.
157
+
158
+  27 Jul 2004; Tuan Van <langthang@gentoo.org> mailman-2.1.5-r1.ebuild:
159
+  switch to enew{group,user}.
160
+  add enew{group/user} to pkg_postinst wrt bug #58526.
161
+
162
+  22 Jul 2004; Tuan Van <langthang@gentoo.org> mailman-2.1.5-r1.ebuild:
163
+  stable on x86.
164
+
165
+*mailman-2.1.5-r1 (21 Jul 2004)
166
+
167
+  21 Jul 2004; Tuan Van <langthang@gentoo.org>
168
+  +files/mailman-2.1.5-directory-check.patch, +mailman-2.1.5-r1.ebuild:
169
+  Revision bump to resolve bug #53533, #56250. Thanks to Jim Ramsay
170
+  <i.am@jimramsay.com> and Brian Harring <ferringb@gentoo.org>.
171
+
172
+  10 Jul 2004; Danny van Dyk <kugelfang@gentoo.org> mailman-2.1.5.ebuild:
173
+  Marked ~amd64.
174
+
175
+  11 Jun 2004; Aron Griffis <agriffis@gentoo.org> mailman-2.1.4.ebuild,
176
+  mailman-2.1.5.ebuild:
177
+  Fix use invocation
178
+
179
+  09 Jun 2004; Martin Holzer <mholzer@gentoo.org> mailman-2.1.5.ebuild:
180
+  marking x86 stable.
181
+
182
+  01 Jun 2004; Jason Wever <weeve@gentoo.org> mailman-2.1.5.ebuild:
183
+  Marked stable on sparc wrt bug #51671.
184
+
185
+  01 Jun 2004; Martin Holzer <mholzer@gentoo.org> mailman-2.1.5.ebuild:
186
+  added more keepdir and removed sed.
187
+
188
+*mailman-2.1.5 (31 May 2004)
189
+
190
+  31 May 2004; <plasmaroo@gentoo.org> +mailman-2.1.5.ebuild:
191
+  Version bump for a security vulnerability; closes bug #52043.
192
+
193
+  14 May 2004; Luca Barbato <lu_zero@gentoo.org> mailman-2.1.4.ebuild:
194
+  Marked ~ppc
195
+
196
+  12 Mar 2004; Martin Holzer <mholzer@gentoo.org> mailman-2.1.4.ebuild:
197
+  Correcting version in einfo. Closes bug #44464.
198
+
199
+  23 Feb 2004; Sven Blumenstein <bazik@gentoo.org> mailman-2.1.4.ebuild:
200
+  Stable on sparc. Thanks to Josh Grebe <josh@brokedown.net> for testing!
201
+
202
+  31 Jan 2004; Martin Holzer <mholzer@gentoo.org> files/mailman.rc:
203
+  adding -s option to start. Closes 34278.
204
+
205
+  10 Jan 2004; Martin Holzer <mholzer@gentoo.org> mailman-2.1.4.ebuild:
206
+  typo in config_protection. doing needed keepdir to work
207
+
208
+  09 Jan 2004; Martin Holzer <mholzer@gentoo.org> mailman-2.1.4.ebuild:
209
+  disabling python languages. Closes 34727
210
+
211
+  08 Jan 2004; Martin Holzer <mholzer@gentoo.org> files/README.gentoo:
212
+  updating readme. Closes 36725
213
+
214
+  06 Jan 2004; Martin Holzer <mholzer@gentoo.org> mailman-2.1.4.ebuild:
215
+  adding locks dir
216
+
217
+*mailman-2.1.4 (04 Jan 2004)
218
+
219
+  04 Jan 2004; Martin Holzer <mholzer@gentoo.org> mailman-2.1.4.ebuild:
220
+  Version bumped. Closes 37208
221
+
222
+  04 Jan 2004; Martin Holzer <mholzer@gentoo.org> mailman-2.1.2-r1.ebuild,
223
+  mailman-2.1.2.ebuild, mailman-2.1.3.ebuild:
224
+  mailman has now home, but config_protect was not included. Closes 35536
225
+
226
+  14 Dec 2003; <spider@gentoo.org> mailman-2.1.1-r2.ebuild,
227
+  mailman-2.1.1-r3.ebuild, mailman-2.1.2-r1.ebuild, mailman-2.1.2.ebuild,
228
+  mailman-2.1.3.ebuild:
229
+  QA: fixing chown user.group to user:group, bug #35127
230
+
231
+*mailman-2.1.3 (21 Nov 2003)
232
+
233
+  21 Nov 2003; Martin Holzer <mholzer@gentoo.org> mailman-2.1.3.ebuild:
234
+  Version bumped.
235
+
236
+  20 Nov 2003; Martin Holzer <mholzer@gentoo.org> mailman-2.1.2-r1.ebuild,
237
+  mailman-2.1.2.ebuild:
238
+  adding spam dir. Closes #31920
239
+
240
+*mailman-2.1.2-r1 (30 Jul 2003)
241
+
242
+  30 Jul 2003; Nick Hadaway <raker@gentoo.org> mailman-2.1.2-r1.ebuild,
243
+  files/README.gentoo:
244
+  Reworked the apache configuration steps in the readme and in the 
245
+  ebuild.  Revision bumped as there have been lots of changes since
246
+  2.1.2 was initially added to portage.
247
+
248
+  26 Jul 2003; Nick Hadaway <raker@gentoo.org> mailman-2.1.2.ebuild:
249
+  Removed invalid apache use flag and adjusted routines accordingly.
250
+
251
+  16 Jul 2003; Nick Hadaway <raker@gentoo.org> mailman-2.1.2.ebuild:
252
+  Added apache and apache2 to IUSE and made pkg_config procedure
253
+  compatible with both installations types.
254
+
255
+  09 Jul 2003; Nick Hadaway <raker@gentoo.org> files/README.gentoo:
256
+  Updated the readme to be a little more explicit and complete.
257
+
258
+  08 Jun 2003; Todd Berman <tberman@gentoo.org> mailman-2.1.1-r2.ebuild,
259
+  mailman-2.1.1-r3.ebuild, mailman-2.1.2.ebuild:
260
+  Fixed IUSE. (thanks again rac)
261
+
262
+  22 May 2003; Todd Berman <tberman@gentoo.org> mailman-2.1.2.ebuild:
263
+  Added INSTALL to documentation. Closed bug #18351
264
+
265
+*mailman-2.1.2 (19 May 2003)
266
+
267
+  19 May 2003; Todd Berman <tberman@gentoo.org> mailman-2.1.1-r2.ebuild,
268
+  mailman-2.1.1-r3.ebuild, mailman-2.1.2.ebuild, files/README.gentoo,
269
+  files/mailman.2.1.1-r2.conf, files/mailman.2.1.1-r3.conf,
270
+  files/mailman.conf:
271
+  Version bump. Hopefully fixed install location issues. Hopefully fixed misc
272
+  issues with mailman install. (new install location is /usr/local/)
273
+
274
+*mailman-2.1.1-r3 (13 May 2003)
275
+
276
+  13 May 2003; Todd Berman <tberman@gentoo.org> mailman-2.1.1-r3.ebuild:
277
+  Changed install dir to /home/ instead of /var/. bumped r#
278
+
279
+*mailman-2.1.1-r2 (29 Apr 2003)
280
+
281
+  29 Apr 2003; Todd Berman <tberman@gentoo.org> mailman-2.1.1-r2.ebuild:
282
+  Changed mailman's gid to daemon to fix bug #19257.
283
+
284
+*mailman-2.1.1-r1 (18 Apr 2003)
285
+
286
+  18 Apr 2003; Martin Holzer <mholzer@gentoo.org> Manifest,
287
+  mailman-2.1.1-r1.ebuild:
288
+  Adding contrib stuff. Closes #18425.
289
+
290
+*mailman-2.1.1 (17 Feb 2003)
291
+
292
+  Daniel Ahlberg <aliz@gentoo.org> :
293
+  Security update.
294
+
295
+*mailman-2.1 (21 Jan 2003)
296
+
297
+  03 Feb 2003; Nick Hadaway <raker@gentoo.org> mailman-2.1.ebuild,
298
+  files/sendmail.rc :
299
+  Added an rc file.
300
+
301
+  21 Jan 2003; Nick Hadaway <raker@gentoo.org> mailman-2.1.ebuild,
302
+  files/digest-mailman-2.1 :
303
+  Version bump.  Added some logic to keep the old mm_cfg.py as requested
304
+  in bug #12589
305
+
306
+*mailman-2.0.12 (16 Jul 2002)
307
+
308
+  04 Jan 2002; Martin Holzer <mholzer@gentoo.org> mailman-2.0.1.2.ebuild ChangeLog :
309
+  Fixed einfo text. This closes #13078.
310
+
311
+  16 Jul 2002; Ben Lutgens <lamer@gentoo.org> mailman-2.0.1.2.ebuild,
312
+  ChangeLog, files/digest-mailman-2.0.2.1, files/mailman.conf,
313
+  files/README.gentoo :
314
+
315
+  Brand new package, based on submission by Joby Walker
316
+
... ...
@@ -0,0 +1,44 @@
1
+AUX 50_mailman.conf 429 RMD160 54104453464b725adc18e5fb66bee265089013f6 SHA1 7b002917ae358587fc121f8c06c54c76dd0d9934 SHA256 8a93c5f9b2012122c6e85445620d5eb388e1bc38cb2102158bb62681cb61d3ec
2
+MD5 165ec3889c73f334f7b524c654977066 files/50_mailman.conf 429
3
+RMD160 54104453464b725adc18e5fb66bee265089013f6 files/50_mailman.conf 429
4
+SHA256 8a93c5f9b2012122c6e85445620d5eb388e1bc38cb2102158bb62681cb61d3ec files/50_mailman.conf 429
5
+AUX README.gentoo 4963 RMD160 13ffe8aeb91ed2a2ff8e7a2b060c7697e19e280e SHA1 664bfd5cb3850d2b8f7acaebced29292b7383e0a SHA256 1c16bc84fa18b94884277f57f9ab535a80bee4c4e72783a78d0b109c1532c6c3
6
+MD5 ea0c850a55a563d90a520ab52809112f files/README.gentoo 4963
7
+RMD160 13ffe8aeb91ed2a2ff8e7a2b060c7697e19e280e files/README.gentoo 4963
8
+SHA256 1c16bc84fa18b94884277f57f9ab535a80bee4c4e72783a78d0b109c1532c6c3 files/README.gentoo 4963
9
+AUX mailman-2.1.6-directory-check.patch 1287 RMD160 3bf6d1216a79a32d68340cb0df5db9b5f44a3931 SHA1 ad2b689ce7911b509f999cd849d0402c36ded97c SHA256 2d31eda834429a55edad1fea3c379ecb3e8f05c03fac82f172989caeab85314d
10
+MD5 130b235f32a50d11f76a88b979fb4245 files/mailman-2.1.6-directory-check.patch 1287
11
+RMD160 3bf6d1216a79a32d68340cb0df5db9b5f44a3931 files/mailman-2.1.6-directory-check.patch 1287
12
+SHA256 2d31eda834429a55edad1fea3c379ecb3e8f05c03fac82f172989caeab85314d files/mailman-2.1.6-directory-check.patch 1287
13
+AUX mailman-2.1.7-directory-check.patch 1287 RMD160 3bf6d1216a79a32d68340cb0df5db9b5f44a3931 SHA1 ad2b689ce7911b509f999cd849d0402c36ded97c SHA256 2d31eda834429a55edad1fea3c379ecb3e8f05c03fac82f172989caeab85314d
14
+MD5 130b235f32a50d11f76a88b979fb4245 files/mailman-2.1.7-directory-check.patch 1287
15
+RMD160 3bf6d1216a79a32d68340cb0df5db9b5f44a3931 files/mailman-2.1.7-directory-check.patch 1287
16
+SHA256 2d31eda834429a55edad1fea3c379ecb3e8f05c03fac82f172989caeab85314d files/mailman-2.1.7-directory-check.patch 1287
17
+AUX mailman-2.1.8_rc1-directory-check.patch 1287 RMD160 3bf6d1216a79a32d68340cb0df5db9b5f44a3931 SHA1 ad2b689ce7911b509f999cd849d0402c36ded97c SHA256 2d31eda834429a55edad1fea3c379ecb3e8f05c03fac82f172989caeab85314d
18
+MD5 130b235f32a50d11f76a88b979fb4245 files/mailman-2.1.8_rc1-directory-check.patch 1287
19
+RMD160 3bf6d1216a79a32d68340cb0df5db9b5f44a3931 files/mailman-2.1.8_rc1-directory-check.patch 1287
20
+SHA256 2d31eda834429a55edad1fea3c379ecb3e8f05c03fac82f172989caeab85314d files/mailman-2.1.8_rc1-directory-check.patch 1287
21
+AUX mailman.conf 385 RMD160 bec3c71140385fa88078ffb38be14bfd8ec068c6 SHA1 64e15fce12231bac8e9a5dd831d9c4f134df77a1 SHA256 fdd86c4a72318ade5dfe0f075ce62470979f93d8a4c862993dc32e7bdb422eab
22
+MD5 3089c1f0f8d91abdd612997b085959eb files/mailman.conf 385
23
+RMD160 bec3c71140385fa88078ffb38be14bfd8ec068c6 files/mailman.conf 385
24
+SHA256 fdd86c4a72318ade5dfe0f075ce62470979f93d8a4c862993dc32e7bdb422eab files/mailman.conf 385
25
+AUX mailman.rc 597 RMD160 be0a574298a1d8d547a4ca76f864dd5fee9b897d SHA1 f464f5ba7310934d300a9af7c614fdf7498f7d2b SHA256 ef4f5482cf68ba44a0fbb83acde29295bd8dcb6512d259d14387dfc29beeb625
26
+MD5 ce6d06f51e3da34e92048369e9fe14d2 files/mailman.rc 597
27
+RMD160 be0a574298a1d8d547a4ca76f864dd5fee9b897d files/mailman.rc 597
28
+SHA256 ef4f5482cf68ba44a0fbb83acde29295bd8dcb6512d259d14387dfc29beeb625 files/mailman.rc 597
29
+DIST mailman-2.1.9.tgz 7829201 RMD160 135f94eeecca1f562f98dfe98c1a367bed229372 SHA1 e9f6f55e2551c3e576460749383da20599412d42 SHA256 1b7a2c853c21bfd22205167dc3678c634a3f981721d95d1cd923ca84967cc986
30
+EBUILD mailman-2.1.9.ebuild 3831 RMD160 7a93a89248dec9fd7bf7e5c6b13edf28f568360d SHA1 43a949e057301b14926f2d980f7e3a76f129bb75 SHA256 d6376677d6c34ec1c16d84d62ac833a8adbbc8cff195e1be652821c0f317be11
31
+MD5 138490fd8c9899dd620aeb4ef71c4331 mailman-2.1.9.ebuild 3831
32
+RMD160 7a93a89248dec9fd7bf7e5c6b13edf28f568360d mailman-2.1.9.ebuild 3831
33
+SHA256 d6376677d6c34ec1c16d84d62ac833a8adbbc8cff195e1be652821c0f317be11 mailman-2.1.9.ebuild 3831
34
+MISC ChangeLog 11319 RMD160 4f590471f01a9fd83d50ddf9fb1782b607f55e8d SHA1 af952b64a3113918ad7c38344ed8a894ebbef035 SHA256 a6b1043c6a5551344e2cf8ed5b1f584e25410ea3a162bb398aff440bb06c7602
35
+MD5 86712eff6883d76e24790eb04ec564b8 ChangeLog 11319
36
+RMD160 4f590471f01a9fd83d50ddf9fb1782b607f55e8d ChangeLog 11319
37
+SHA256 a6b1043c6a5551344e2cf8ed5b1f584e25410ea3a162bb398aff440bb06c7602 ChangeLog 11319
38
+MISC metadata.xml 218 RMD160 30759d93f0209fdd74f29393ae54999fe6b2bdff SHA1 486b307ff1dae10aef7d18472460a21bc2decdfb SHA256 09421ca1b9299683d07f68ddbbd3ed97251dac613121b420841a3251da7fcb89
39
+MD5 45b42e062b70460f0304d1ebe48d82ab metadata.xml 218
40
+RMD160 30759d93f0209fdd74f29393ae54999fe6b2bdff metadata.xml 218
41
+SHA256 09421ca1b9299683d07f68ddbbd3ed97251dac613121b420841a3251da7fcb89 metadata.xml 218
42
+MD5 087c16dcdc844a887c4c0ccaf21904bf files/digest-mailman-2.1.9 235
43
+RMD160 a59a209ae835d7942f248044ebb2f5fa08aa802e files/digest-mailman-2.1.9 235
44
+SHA256 7fdbc00422a55956c8b091193599ffd51a1042885148a22a246fcab0d1aa74f7 files/digest-mailman-2.1.9 235
... ...
@@ -0,0 +1,18 @@
1
+<IfDefine MAILMAN>
2
+	ScriptAlias /mailman/ "/usr/local/mailman/cgi-bin/"
3
+
4
+	<Directory "/usr/local/mailman/cgi-bin/">
5
+		AllowOverride None
6
+		Options None
7
+		Order allow,deny
8
+		Allow from all
9
+	</Directory>
10
+
11
+	Alias /pipermail/ "/usr/local/mailman/archives/public/"
12
+	<Directory "/usr/local/mailman/archives/public/">
13
+		AllowOverride None
14
+		Options ExecCGI FollowSymLinks
15
+		Order allow,deny  
16
+		Allow from all
17
+	</Directory>
18
+</IfDefine>
... ...
@@ -0,0 +1,131 @@
1
+# Copyright 1999-2004 Gentoo Foundation
2
+# Distributed under the terms of the GNU General Public License v2
3
+# $Header: /var/cvsroot/gentoo-x86/net-mail/mailman/files/README.gentoo,v 1.9 2004/07/07 15:57:02 mholzer Exp $
4
+
5
+Follow these instructions to finish setting up mailman. This file and the
6
+original ebuild were tweaked by me <lamer@gentoo.org> but were graciously
7
+submitted by Joby Walker (YOU RULE!) 
8
+2003 Jul 09: updated by Jesus Perez and re-tweaked by me <raker@gentoo.org>
9
+for 2.1.x.
10
+
11
+Please view the documentation on Mailman at: http://www.list.org/
12
+
13
+I have configured Mailman to install in /usr/local/mailman by default, to change
14
+this you will need to modify the INSTALLDIR variable in the ebuild and the
15
+locations in the mailman.conf file.
16
+
17
+1) If this is your first time installing mailman, after your "emerge mailman",
18
+**and you are using apache 1.x**, you will need to run:
19
+
20
+ebuild /var/db/pkg/net-mail/mailman-$VERSION/mailman-$VERSION.ebuild config
21
+
22
+This will add an Include in your apache.conf to mailman.conf
23
+
24
+2) In your /etc/conf.d/apache (for apache 1.x)
25
+	or /etc/conf.d/apache2 (for apache 2.x) 
26
+	file add the additional option:
27
+
28
+	-D MAILMAN
29
+
30
+3) Make sure mailman is a part of the cron group
31
+
32
+4) This must be done as user mailman:
33
+
34
+	su - mailman
35
+
36
+Add the cron jobs:
37
+
38
+	cd cron
39
+	crontab crontab.in
40
+	cd ..
41
+
42
+Create the site password:
43
+
44
+	bin/mmsitepass
45
+
46
+and main list:
47
+
48
+	bin/newlist mailman
49
+
50
+
51
+5) Change back to root:
52
+
53
+	exit
54
+
55
+Add this to /etc/mail/aliases (and see point 9 for notes):
56
+     mailman:              "|/usr/local/mailman/mail/mailman post mailman"
57
+     mailman-admin:        "|/usr/local/mailman/mail/mailman admin mailman"
58
+     mailman-bounces:      "|/usr/local/mailman/mail/mailman bounces mailman"
59
+     mailman-confirm:      "|/usr/local/mailman/mail/mailman confirm mailman"
60
+     mailman-join:         "|/usr/local/mailman/mail/mailman join mailman"
61
+     mailman-leave:        "|/usr/local/mailman/mail/mailman leave mailman"
62
+     mailman-owner:        "|/usr/local/mailman/mail/mailman owner mailman"
63
+     mailman-request:      "|/usr/local/mailman/mail/mailman request mailman"
64
+     mailman-subscribe:    "|/usr/local/mailman/mail/mailman subscribe mailman"
65
+     mailman-unsubscribe:  "|/usr/local/mailman/mail/mailman unsubscribe mailman"
66
+  
67
+Run newaliases (only if you use sendmail).
68
+
69
+	newaliases
70
+    
71
+Copy the web icons:
72
+     cp /usr/local/mailman/icons/* /var/www/localhost/icons
73
+
74
+6) Start the mailman daemon:
75
+
76
+	/etc/init.d/mailman start
77
+
78
+and add it to default runlevel (optional but recommended):
79
+
80
+	rc-update add mailman default
81
+
82
+7) For each list created (either with web interface or with bin/newlist) 
83
+this must be added to /etc/mail/aliases (see smrsh notes below)
84
+replace <list-name> with the name of the list:
85
+
86
+	<list-name>: "|/usr/local/mailman/mail/mailman post <list-name>"
87
+	<list-name>-admin: "|/usr/local/mailman/mail/mailman admin <list-name>"
88
+	<list-name>-bounces: "|/usr/local/mailman/mail/mailman bounces <list-name>"
89
+     	<list-name>-confirm: "|/usr/local/mailman/mail/mailman confirm <list-name>"
90
+     	<list-name>-join: "|/usr/local/mailman/mail/mailman join <list-name>"
91
+	<list-name>-leave: "|/usr/local/mailman/mail/mailman leave <list-name>"
92
+	<list-name>-owner: "|/usr/local/mailman/mail/mailman owner <list-name>"
93
+	<list-name>-request: "|/usr/local/mailman/mail/mailman request <list-name>"
94
+     	<list-name>-subscribe: "|/usr/local/mailman/mail/mailman subscribe <list-name>"
95
+	<list-name>-unsubscribe: "|/usr/local/mailman/mail/mailman unsubscribe <list-name>"
96
+
97
+Run newaliases:
98
+
99
+	newaliases
100
+
101
+smrsh notes
102
+-----------
103
+(if you use sendmail, you are surely using srmsh) you must note that 
104
+sendmail won't run any program outside of EBINDIR. I tried to change 
105
+EBINDIR using,define(`confEBINDIR', `/usr/local/mailman/mail')dnl in 
106
+sendmail.mc but it didn't work, so mailman must be placed in EBINDIR, 
107
+which in Gentoo is /usr/adm/sm.bin, so you must run as root:
108
+
109
+     ln -s /usr/local/mailman/mail/mailman /usr/adm/sm.bin/mailman
110
+
111
+And the lines in /etc/mail/aliases which refer to 
112
+/usr/local/mailman/mail/mailman must be changed to mailman:
113
+
114
+     <list-name>:              "|mailman post <list-name>"
115
+     <list-name>-admin:        "|mailman admin <list-name>"
116
+     <list-name>-bounces:      "|mailman bounces <list-name>"
117
+     <list-name>-confirm:      "|mailman confirm <list-name>"
118
+     <list-name>-join:         "|mailman join <list-name>"
119
+     <list-name>-leave:        "|mailman leave <list-name>"
120
+     <list-name>-owner:        "|mailman owner <list-name>"
121
+     <list-name>-request:      "|mailman request <list-name>"
122
+     <list-name>-subscribe:    "|mailman subscribe <list-name>"
123
+     <list-name>-unsubscribe:  "|mailman unsubscribe <list-name>"
124
+
125
+
126
+Other Helpful things to know...
127
+-------------------------------
128
+run "bin/check_perms -f" from the root mailman directory
129
+(/usr/local/mailman) to check and fix permission problems.
130
+
131
+The INSTALL file is located in /usr/share/doc/mailman-$VERSION/ 
... ...
@@ -0,0 +1,3 @@
1
+MD5 dd51472470f9eafb04f64da372444835 mailman-2.1.9.tgz 7829201
2
+RMD160 135f94eeecca1f562f98dfe98c1a367bed229372 mailman-2.1.9.tgz 7829201
3
+SHA256 1b7a2c853c21bfd22205167dc3678c634a3f981721d95d1cd923ca84967cc986 mailman-2.1.9.tgz 7829201
... ...
@@ -0,0 +1,30 @@
1
+--- bin/check_perms.org	2005-05-25 00:04:15.000000000 +0200
2
++++ bin/check_perms	2005-05-25 00:04:35.000000000 +0200
3
+@@ -331,6 +331,8 @@
4
+         print _('checking permissions on list data')
5
+     # BAW: This needs to be converted to the Site module abstraction
6
+     for dir in os.listdir(mm_cfg.LIST_DATA_DIR):
7
++        if not S_ISDIR(statmode(os.path.join(mm_cfg.LIST_DATA_DIR,dir))):
8
++            continue
9
+         for file in checkfiles:
10
+             path = os.path.join(mm_cfg.LIST_DATA_DIR, dir, file)
11
+             if STATE.VERBOSE:
12
+--- bin/update.org	2005-05-25 00:04:30.000000000 +0200
13
++++ bin/update	2005-05-25 00:04:35.000000000 +0200
14
+@@ -34,6 +34,7 @@
15
+ """
16
+ 
17
+ import os
18
++import stat
19
+ import md5
20
+ import sys
21
+ import time
22
+@@ -425,7 +426,7 @@
23
+     # Now update for the Mailman 2.1.5 qfile format.  For every filebase in
24
+     # the qfiles/* directories that has both a .pck and a .db file, pull the
25
+     # data out and re-queue them.
26
+-    for dirname in os.listdir(mm_cfg.QUEUE_DIR):
27
++    for dirname in [x for x in os.listdir(mm_cfg.QUEUE_DIR) if stat.S_ISDIR(os.stat(os.path.join(mm_cfg.QUEUE_DIR,x)).st_mode)]:
28
+         dirpath = os.path.join(mm_cfg.QUEUE_DIR, dirname)
29
+         if dirpath == mm_cfg.BADQUEUE_DIR:
30
+             # The files in qfiles/bad can't possibly be pickles
... ...
@@ -0,0 +1,30 @@
1
+--- bin/check_perms.org	2005-05-25 00:04:15.000000000 +0200
2
++++ bin/check_perms	2005-05-25 00:04:35.000000000 +0200
3
+@@ -331,6 +331,8 @@
4
+         print _('checking permissions on list data')
5
+     # BAW: This needs to be converted to the Site module abstraction
6
+     for dir in os.listdir(mm_cfg.LIST_DATA_DIR):
7
++        if not S_ISDIR(statmode(os.path.join(mm_cfg.LIST_DATA_DIR,dir))):
8
++            continue
9
+         for file in checkfiles:
10
+             path = os.path.join(mm_cfg.LIST_DATA_DIR, dir, file)
11
+             if STATE.VERBOSE:
12
+--- bin/update.org	2005-05-25 00:04:30.000000000 +0200
13
++++ bin/update	2005-05-25 00:04:35.000000000 +0200
14
+@@ -34,6 +34,7 @@
15
+ """
16
+ 
17
+ import os
18
++import stat
19
+ import md5
20
+ import sys
21
+ import time
22
+@@ -425,7 +426,7 @@
23
+     # Now update for the Mailman 2.1.5 qfile format.  For every filebase in
24
+     # the qfiles/* directories that has both a .pck and a .db file, pull the
25
+     # data out and re-queue them.
26
+-    for dirname in os.listdir(mm_cfg.QUEUE_DIR):
27
++    for dirname in [x for x in os.listdir(mm_cfg.QUEUE_DIR) if stat.S_ISDIR(os.stat(os.path.join(mm_cfg.QUEUE_DIR,x)).st_mode)]:
28
+         dirpath = os.path.join(mm_cfg.QUEUE_DIR, dirname)
29
+         if dirpath == mm_cfg.BADQUEUE_DIR:
30
+             # The files in qfiles/bad can't possibly be pickles
... ...
@@ -0,0 +1,30 @@
1
+--- bin/check_perms.org	2005-05-25 00:04:15.000000000 +0200
2
++++ bin/check_perms	2005-05-25 00:04:35.000000000 +0200
3
+@@ -331,6 +331,8 @@
4
+         print _('checking permissions on list data')
5
+     # BAW: This needs to be converted to the Site module abstraction
6
+     for dir in os.listdir(mm_cfg.LIST_DATA_DIR):
7
++        if not S_ISDIR(statmode(os.path.join(mm_cfg.LIST_DATA_DIR,dir))):
8
++            continue
9
+         for file in checkfiles:
10
+             path = os.path.join(mm_cfg.LIST_DATA_DIR, dir, file)
11
+             if STATE.VERBOSE:
12
+--- bin/update.org	2005-05-25 00:04:30.000000000 +0200
13
++++ bin/update	2005-05-25 00:04:35.000000000 +0200
14
+@@ -34,6 +34,7 @@
15
+ """
16
+ 
17
+ import os
18
++import stat
19
+ import md5
20
+ import sys
21
+ import time
22
+@@ -425,7 +426,7 @@
23
+     # Now update for the Mailman 2.1.5 qfile format.  For every filebase in
24
+     # the qfiles/* directories that has both a .pck and a .db file, pull the
25
+     # data out and re-queue them.
26
+-    for dirname in os.listdir(mm_cfg.QUEUE_DIR):
27
++    for dirname in [x for x in os.listdir(mm_cfg.QUEUE_DIR) if stat.S_ISDIR(os.stat(os.path.join(mm_cfg.QUEUE_DIR,x)).st_mode)]:
28
+         dirpath = os.path.join(mm_cfg.QUEUE_DIR, dirname)
29
+         if dirpath == mm_cfg.BADQUEUE_DIR:
30
+             # The files in qfiles/bad can't possibly be pickles
... ...
@@ -0,0 +1,17 @@
1
+ScriptAlias /mailman/ "/usr/local/mailman/cgi-bin/"
2
+
3
+<Directory "/usr/local/mailman/cgi-bin/">
4
+	AllowOverride None
5
+	Options None
6
+	Order allow,deny
7
+	Allow from all
8
+</Directory>
9
+
10
+Alias /pipermail/ "/usr/local/mailman/archives/public/"
11
+
12
+<Directory "/usr/local/mailman/archives/public/">
13
+	AllowOverride None
14
+	Options ExecCGI FollowSymLinks
15
+	Order allow,deny  
16
+	Allow from all
17
+</Directory>
... ...
@@ -0,0 +1,27 @@
1
+#!/sbin/runscript
2
+# Copyright 1999-2004 Gentoo Foundation
3
+# Distributed under the terms of the GNU General Public License v2
4
+# $Header: /var/cvsroot/gentoo-x86/net-mail/mailman/files/mailman.rc,v 1.5 2004/07/14 23:50:52 agriffis Exp $
5
+
6
+depend() {
7
+	need net
8
+	use logger
9
+}
10
+
11
+start() {
12
+	ebegin "Starting mailman"
13
+	su - mailman -c 'bin/mailmanctl -s start' >/dev/null 2>&1
14
+	eend $?
15
+}
16
+
17
+stop() {
18
+	ebegin "Stopping mailman"
19
+	su - mailman -c 'bin/mailmanctl stop' >/dev/null 2>&1
20
+	eend $?
21
+}
22
+
23
+svc_restart() {
24
+	ebegin "Restarting mailman"
25
+	su - mailman -c 'bin/mailmanctl restart' >/dev/null 2>&1
26
+	eend $?
27
+}
... ...
@@ -0,0 +1,142 @@
1
+# Copyright 1999-2006 Gentoo Foundation
2
+# Distributed under the terms of the GNU General Public License v2
3
+# $Header: /var/cvsroot/gentoo-x86/net-mail/mailman/mailman-2.1.8_rc1.ebuild,v 1.7 2006/05/08 12:28:49 hanno Exp $
4
+
5
+inherit eutils depend.apache
6
+IUSE="apache2 postfix sendmail qmail courier exim xmail"
7
+
8
+MY_PV=${PV/_rc/rc}
9
+
10
+DESCRIPTION="A python-based mailing list server with an extensive web interface"
11
+SRC_URI="mirror://sourceforge/${PN}/${PN}-${MY_PV}.tgz"
12
+HOMEPAGE="http://www.list.org/"
13
+
14
+SLOT="O"
15
+LICENSE="GPL-2"
16
+KEYWORDS="amd64 ppc sparc x86"
17
+
18
+DEPEND=">=dev-lang/python-2.3
19
+	virtual/mta
20
+	net-www/apache"
21
+
22
+INSTALLDIR="/home/.internal/mailman"
23
+APACHEGID="1280"
24
+
25
+if use postfix; then
26
+	MAILGID="1280"
27
+elif use sendmail; then
28
+	MAILGID=daemon
29
+elif use qmail; then
30
+	MAILGID=qmail
31
+elif use courier; then
32
+	MAILGID=mail
33
+elif use exim; then
34
+	MAILGID=mail
35
+elif use xmail; then
36
+	MAILGID=xmail
37
+else
38
+	MAILGID="1280"
39
+fi
40
+
41
+S=${WORKDIR}/${PN}-${MY_PV}
42
+
43
+pkg_setup() {
44
+	# Bug #58526: switch to enew{group,user}.
45
+	# need to add mailman here for compile process.
46
+	# Duplicated at pkg_postinst() for binary install.
47
+	enewgroup mailman 1280
48
+	enewuser mailman 1280 /bin/bash ${INSTALLDIR} mailman -G cron -c mailman
49
+	mkdir -p ${INSTALLDIR}
50
+	chown mailman:mailman ${INSTALLDIR}
51
+	chmod 2775 ${INSTALLDIR}
52
+}
53
+
54
+src_unpack() {
55
+	unpack ${A} && cd "${S}"
56
+	epatch ${FILESDIR}/${PN}-2.1.8_rc1-directory-check.patch || die
57
+}
58
+
59
+src_compile() {
60
+	econf \
61
+		--prefix=${INSTALLDIR} \
62
+		--with-mail-gid=${MAILGID} \
63
+		--with-cgi-gid=${APACHEGID} \
64
+		--with-var-prefix=/srv/mailman \
65
+		--with-cgi-ext=.cgi \
66
+		--with-mailhost=lists.schokokeks.org \
67
+		--with-urlhost=lists.schokokeks.org \
68
+	|| die "configure failed"
69
+
70
+	make || die "make failed"
71
+}
72
+
73
+src_install () {
74
+	ID=${D}${INSTALLDIR}
75
+
76
+	make prefix=${ID} var_prefix=${ID} doinstall || die
77
+
78
+	keepdir ${INSTALLDIR}/logs
79
+	keepdir ${INSTALLDIR}/locks
80
+	keepdir ${INSTALLDIR}/spam
81
+	keepdir ${INSTALLDIR}/archives/public
82
+	keepdir ${INSTALLDIR}/archives/private
83
+	keepdir ${INSTALLDIR}/lists
84
+	keepdir ${INSTALLDIR}/qfiles
85
+
86
+	if use apache2; then
87
+		insinto ${APACHE2_MODULES_CONFDIR}
88
+	else
89
+		insinto ${APACHE1_MODULES_CONFDIR}
90
+	fi
91
+	newins ${FILESDIR}/mailman.conf 50_mailman.conf
92
+
93
+	dodoc ${FILESDIR}/README.gentoo
94
+	dodoc ACK* BUGS FAQ NEWS README* TODO UPGRADING INSTALL
95
+	dodoc contrib/README.check_perms_grsecurity contrib/mm-handler.readme
96
+	dodoc contrib/virtusertable contrib/mailman.mc
97
+
98
+	cp build/contrib/*.py contrib/majordomo2mailman.pl contrib/auto \
99
+		contrib/mm-handler* ${ID}/bin
100
+
101
+	# Save the old config into the new package as CONFIG_PROTECT
102
+	# doesn't work for this package.
103
+	for i in ${ROOT}/var/mailman ${ROOT}/home/mailman \
104
+		${ROOT}/usr/local/mailman ${INSTALLDIR}
105
+	do
106
+		if [ -f ${i}/Mailman/mm_cfg.py ]; then
107
+			cp ${i}/Mailman/mm_cfg.py \
108
+				${ID}/Mailman/mm_cfg.py
109
+			einfo "Your old config has been saved as mm_cfg.py"
110
+			einfo "A new config has been installed as mm_cfg.dist"
111
+		fi
112
+	done
113
+
114
+	exeinto /etc/init.d
115
+	newexe ${FILESDIR}/mailman.rc mailman
116
+
117
+	chown -R mailman:mailman ${ID}
118
+	chmod 2775 ${ID}
119
+}
120
+
121
+pkg_postinst() {
122
+	enewgroup mailman 1280
123
+	enewuser mailman 1280 -1 ${INSTALLDIR} mailman -G cron -c "mailman"
124
+	cd ${INSTALLDIR}
125
+	bin/update
126
+	einfo "Running \`${INSTALLDIR}/bin/check_perms -f\` *"
127
+	bin/check_perms -f
128
+	einfo ""
129
+	einfo "Please read /usr/share/doc/${PF}/README.gentoo.gz for additional"
130
+	einfo "Setup information, mailman will NOT run unless you follow"
131
+	einfo "those instructions!"
132
+	einfo ""
133
+
134
+	einfo "An example Mailman configuration file for Apache has been installed into:"
135
+	use apache2 && einfo "  ${APACHE2_MODULES_CONFDIR}/50_mailman.conf"
136
+	use apache2 || einfo "  ${APACHE1_MODULES_CONFDIR}/50_mailman.conf"
137
+	einfo ""
138
+	einfo "To enable, you will need to add \"-D MAILMAN\" to"
139
+	use apache2 && einfo "/etc/conf.d/apache2."
140
+	use apache2 || einfo "/etc/conf.d/apache."
141
+	einfo ""
142
+}
... ...
@@ -0,0 +1,6 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
3
+<pkgmetadata>
4
+<herd>net-mail</herd>
5
+<maintainer><email>hanno@gentoo.org</email></maintainer>
6
+</pkgmetadata>
0 7