/[d-i]/trunk/installer/doc/retriever.txt
ViewVC logotype

Contents of /trunk/installer/doc/retriever.txt

Parent Directory Parent Directory | Revision Log Revision Log


Revision 11648 - (show annotations) (download)
Mon Mar 22 00:37:46 2004 UTC (9 years, 3 months ago) by joeyh
File MIME type: text/plain
File size: 6545 byte(s)
patch together a new source package that will include both the images and
the manual
1 Retrievers
2 ----------
3
4 Retrievers are modules that can download or otherwise retrieve files[1],
5 including other modules and Packages files. It is expected that at least the
6 following types will eventually be implemented:
7
8 - cd retriever
9 Ensures an install cd is mounted, and finds files on it. No real
10 retrieving done.
11 - floppy retriever
12 May or may not need to deal with files split across multiple
13 floppies. In any case, pulls files off floppies.
14 - hard disk retriever
15 Gets a file from a local hard disk (dos, linux, etc).
16 - http retriever
17 Downloads a file from a remote http mirror.
18 - ftp retriever (needed?)
19 Downloads a file from a remote ftp mirror.
20 - nfs retriever
21 Gets a file via nfs.
22
23 A retriever must be able to do the following:
24
25 - Provides: retriever
26 - Set itself up so it can access the cdrom, mirror, or whatever.
27 - Get a list of the modules that are available. This will be done by
28 retrieving a standard Packages file.
29 - Retrieve a file.
30
31 A separate module will take care of parsing the Packages files, and
32 checking md5sums of downloaded modules, and a separate program
33 (udpkg) will handle actually installing modules.
34
35 Since retrievers are debian packages, they can have a postinst that is
36 run to set them up. During setup, they may need to prompt the user for
37 information (using debconf). For example, a nfs retriever will probably
38 need to prompt the user for a nfs server name.
39
40 Retrievers may also need to depend on additional modules. For example the
41 http/ftp/nfs retrievers will need to depend on a module to set up networking,
42 while the cdrom retriever may need to depend on module(s) that include kernel
43 modules for the iso9660 filesystem and cd drivers.
44
45 Retrievers may also need to interact with the user when they are retrieving
46 a file. For example, the floppy retriever will need to prompt for disks.
47 This interaction will also be accomplished via debconf.
48
49 Retriever interface
50 -------------------
51
52 All retrievers should support the following interface.
53
54 [ This interface is preliminary and depends on the filesystem layout and
55 ramdisk allocation scheme used by the installer, and so the locations may
56 change. ]
57
58 /usr/lib/debian-installer/retriever/<retriever name> is an executable (the
59 name of the exectable must be the same as the name of the module that
60 contains it). It is run with the following parameters:
61
62 retriever [command] [args]
63
64 Currently, there are four commands:
65
66 retriever config
67 Perform retriever-specific configuration. This may include creating
68 a /var/cache/anna/include file that contains a list of udebs to be
69 installed automatically.
70
71 retriever retrieve [source-filename] [dest-filename]
72 Download the specified file to the specified destination.
73 The source-filename is the Filename field of a Packages file.
74
75 retriever packages [dest-filename]
76 Download a Packages file, or a Packages-like file. The fields used by
77 anna are:
78 - Package
79 - Version
80 - Filename
81 Whether other fields are needed is currently undecided. A retriever
82 now must support this command, because it is supposed to download and
83 parse a Release file if appropriate. This means that the result of
84 this command can (and often will be) a concatenation of several
85 Packages files from the install medium.
86
87 In the step the retreiver can also retreive udeb_includes and
88 udeb_excludes files.
89
90 retriever cleanup
91 Clean up after a retriever round. This is used by e.g. the floppy
92 retriever to unmount the floppy.
93
94 If the destination file already exists, the retriever may optionally attempt
95 to continue a download.
96
97 Once run, retrievers are free to prompt the user, or do whatever else is
98 necessary to retrieve the file[2].
99
100 Note that this simple interface requires that retrievers know the location
101 of the base directory of the archive. This will not be a problem for many
102 -- the cdrom retriever simply uses whatever is available, in a hard-coded
103 location. Other retrievers may require more configuration. For example, the
104 http retriever will need to know what version of Debian is being installed,
105 what site to install from, and probably what version of the debian-installer
106 is being used as well. The user will likely have to be prompted for some of
107 this data during retriever setup.
108
109 Retriever controller (anna)
110 ---------------------------
111
112 This is another module, that makes use of the retrievers. It doesn't
113 actually depend on any though. What it does is, when it is picked from the
114 menu, it builds a list of all available retrievers, and has the user pick
115 one from the list. That retriever is then configured, and is used to
116 retrieve whatever seems appropriate. Thus, the menu item can be picked
117 multiple times, using a different retriever every time. And if a retriever
118 downloads a second retriever, it will show up in future displays of the
119 retrievers menu.
120
121 The default retriever (if more than one is available, and it's the first
122 time the question is asked) will be, in turn and if they exist:
123 1. net-retriever (if you've got connectivity you probably want to use it)
124 2. cdrom-retriever (using a CD is also very common)
125 3. floppy-retriever (we usually don't have to use the floppy)
126 (4. file-retriever? not currently used, but if resurrected, should
127 probably have lower priority than the floppy
128 retriever)
129
130 As that is sometimes not flexible enough, it's also possible to create
131 udebs that provide menu items that only use a specific retreiver. They do
132 do by calling anna, passing it the name of the retreiver to use.
133
134 Which modules are needed is an interesting question. Our current
135 implementation takes all modules, except those of extra priority.
136 Dependencies are taken into account, and there is a special hack to avoid
137 loading mismatched kernel packages too. If the retreiver provides them in
138 /var/cache/anna/, files udeb_include and udeb_exclude can be used to fine
139 tune what packages are installed by default. All packages listed in the
140 udebs_include will be installed, but none from udebs_exclude.
141
142 The controller also needs to verify md5sums of downloaded files.
143
144 Footnotes
145 ---------
146
147 [1] Conceptually, rather similar to apt's methods, although the interface
148 is a lot more simplistic and we don't need to support things like
149 pipelining multiple downloads.
150 [2] Some retrievers may want to show progress displays while downloading.
151 Support for this may need to be added to debconf, via a new data type.
152 It's rather hard to do in the context of debconf -- details to be
153 determined.

  ViewVC Help
Powered by ViewVC 1.1.5