Debian Codegraph @

doc/design.txt

raw
1 Here are some design Ideas for debmirror V2.0
2 =============================================
3
4 Files to Mirror:
5
6 - debs: /dists/sid/main/binary-alpha/Packages
7 - source: /dists/sid/main/binary-alpha/Packages
8 - D-I: /dists/sid/main/source/Sources
9 - disks: /dists/woody/main/disks-alpha/* (Any Release files there?)
10 - experimental: /project/experimental/main/binary-alpha/Packages
11 /project/experimental/main/sources/Sources
12 - extras: doc, indices, project, tools, ls-lR
13 - trace: /project/trace
14
15
16 Source:
17
18 1) Central management core
19 - parse config (apt sources.list format?)
20 - read options
21 - start modules (as needed or let them autostart when queues fill up?)
22 - fetch Release.gpg files
23 - check Release files and reget as needed
24 - check Packages/Sources files and reget as needed
25 - check other files
26 - finalize cleanup module
27 - get other files as needed
28 - collect summaries
29 - use trace files
30
31 + checking a file registers it with the cleanup module too
32 + files leaving a download object are fed into a Signature object
33 and retried a few times
34 + when waiting periodically probe modules for stats and display
35
36 2) Modules
37
38 - Modules run as threads
39 - One queue for files to be processed (in)
40 - One queue for files finished processing (out)
41 - Some status vars [files/bytes queued, files/byte getting,
42 speed(1,5,15m ?)...] (out)
43 - args function to get additional args (run() argument?)
44 - help function to display help
45 - finalize function (close in queue)
46 - pause/continue to suspend the thread
47 - wait_finalize (wait for finalize to finish and return summary, die)
48
49 3) Clean Module
50
51 - gather a list of files present
52 - gather a list of all files that should be there (in queue, from
53 checking file)
54 - cleanup files on finalize
55
56 + limit IO/s
57 + limit number of files / bytes to be deleted (prevent a mirror wipe)
58
59 4) Signature Modules
60 - MD5sum
61 - SHA1
62 - GPG
63
64 + limit IO/s
65 + limit throughput
66
67 5) Download Modules
68 - ftp
69 - hftp (ftp via http://user:pass@proxy:port/)
70 - http
71 - https
72 - rsync
73 - wget (wget-ftp)
74 - print (output what should be done)
75
76 + limit IO/s
77 + limit bandwith
78 + limit traffic