]>
Commit | Line | Data |
---|---|---|
1 | <?xml version="1.0" encoding="utf-8" standalone="no"?> | |
2 | <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" | |
3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ | |
4 | <!ENTITY % aptent SYSTEM "apt.ent"> %aptent; | |
5 | <!ENTITY % aptverbatiment SYSTEM "apt-verbatim.ent"> %aptverbatiment; | |
6 | <!ENTITY % aptvendor SYSTEM "apt-vendor.ent"> %aptvendor; | |
7 | ]> | |
8 | ||
9 | <refentry> | |
10 | ||
11 | <refentryinfo> | |
12 | &apt-author.jgunthorpe; | |
13 | &apt-author.team; | |
14 | &apt-email; | |
15 | &apt-product; | |
16 | <!-- The last update date --> | |
17 | <date>2016-11-25T00:00:00Z</date> | |
18 | </refentryinfo> | |
19 | ||
20 | <refmeta> | |
21 | <refentrytitle>apt-ftparchive</refentrytitle> | |
22 | <manvolnum>1</manvolnum> | |
23 | <refmiscinfo class="manual">APT</refmiscinfo> | |
24 | </refmeta> | |
25 | ||
26 | <!-- Man page title --> | |
27 | <refnamediv> | |
28 | <refname>apt-ftparchive</refname> | |
29 | <refpurpose>Utility to generate index files</refpurpose> | |
30 | </refnamediv> | |
31 | ||
32 | &synopsis-command-apt-ftparchive; | |
33 | ||
34 | <refsect1><title>Description</title> | |
35 | <para><command>apt-ftparchive</command> is the command line tool that generates the index | |
36 | files that APT uses to access a distribution source. The index files should | |
37 | be generated on the origin site based on the content of that site.</para> | |
38 | ||
39 | <para><command>apt-ftparchive</command> is a superset of the &dpkg-scanpackages; program, | |
40 | incorporating its entire functionality via the <literal>packages</literal> command. | |
41 | It also contains a contents file generator, <literal>contents</literal>, and an | |
42 | elaborate means to 'script' the generation process for a complete | |
43 | archive.</para> | |
44 | ||
45 | <para>Internally <command>apt-ftparchive</command> can make use of binary databases to | |
46 | cache the contents of a .deb file and it does not rely on any external | |
47 | programs aside from &gzip;. When doing a full generate it automatically | |
48 | performs file-change checks and builds the desired compressed output files.</para> | |
49 | ||
50 | <para>Unless the <option>-h</option>, or <option>--help</option> option is given, | |
51 | one of the commands below must be present.</para> | |
52 | ||
53 | <variablelist> | |
54 | <varlistentry><term><option>packages</option></term> | |
55 | <listitem><para> | |
56 | The packages command generates a package file from a directory tree. It | |
57 | takes the given directory and recursively searches it for .deb files, | |
58 | emitting a package record to stdout for each. This command is | |
59 | approximately equivalent to &dpkg-scanpackages;.</para> | |
60 | ||
61 | <para>The option <option>--db</option> can be used to specify a binary caching DB.</para></listitem> | |
62 | </varlistentry> | |
63 | ||
64 | <varlistentry><term><option>sources</option></term> | |
65 | <listitem><para> | |
66 | The <literal>sources</literal> command generates a source index file from a directory tree. | |
67 | It takes the given directory and recursively searches it for .dsc files, | |
68 | emitting a source record to stdout for each. This command is approximately | |
69 | equivalent to &dpkg-scansources;.</para> | |
70 | <para> | |
71 | If an override file is specified then a source override file will be | |
72 | looked for with an extension of .src. The --source-override option can be | |
73 | used to change the source override file that will be used.</para></listitem> | |
74 | </varlistentry> | |
75 | ||
76 | <varlistentry><term><option>contents</option></term> | |
77 | <listitem><para> | |
78 | The <literal>contents</literal> command generates a contents file from a directory tree. It | |
79 | takes the given directory and recursively searches it for .deb files, | |
80 | and reads the file list from each file. It then sorts and writes to stdout | |
81 | the list of files matched to packages. Directories are not written to | |
82 | the output. If multiple packages own the same file then each package is | |
83 | separated by a comma in the output.</para> | |
84 | <para> | |
85 | The option <option>--db</option> can be used to specify a binary caching DB.</para></listitem> | |
86 | </varlistentry> | |
87 | ||
88 | <varlistentry><term><option>release</option></term> | |
89 | <listitem><para> | |
90 | The <literal>release</literal> command generates a Release file from a | |
91 | directory tree. It recursively searches the given directory for | |
92 | uncompressed and compressed <filename>Packages</filename>, | |
93 | <filename>Sources</filename>, <filename>Contents</filename>, | |
94 | <filename>Components</filename> and <filename>icons</filename> files as | |
95 | well as <filename>Release</filename>, <filename>Index</filename> and | |
96 | <filename>md5sum.txt</filename> files by default | |
97 | (<literal>APT::FTPArchive::Release::Default-Patterns</literal>). | |
98 | Additional filename patterns can be added by listing them in | |
99 | <literal>APT::FTPArchive::Release::Patterns</literal>. It then writes to | |
100 | stdout a <filename>Release</filename> file containing (by default) an MD5, | |
101 | SHA1, SHA256 and SHA512 digest for each file.</para> | |
102 | <para> | |
103 | Values for the additional metadata fields in the Release file are | |
104 | taken from the corresponding variables under | |
105 | <literal>APT::FTPArchive::Release</literal>, | |
106 | e.g. <literal>APT::FTPArchive::Release::Origin</literal>. The supported fields | |
107 | are <literal>Origin</literal>, <literal>Label</literal>, <literal>Suite</literal>, | |
108 | <literal>Version</literal>, <literal>Codename</literal>, <literal>Date</literal>, | |
109 | <literal>NotAutomatic</literal>, <literal>ButAutomaticUpgrades</literal>, | |
110 | <literal>Acquire-By-Hash</literal>, <literal>Valid-Until</literal>, | |
111 | <literal>Signed-By</literal>, <literal>Architectures</literal>, | |
112 | <literal>Components</literal> and <literal>Description</literal>.</para></listitem> | |
113 | ||
114 | </varlistentry> | |
115 | ||
116 | <varlistentry><term><option>generate</option></term> | |
117 | <listitem><para> | |
118 | The <literal>generate</literal> command is designed to be runnable from a cron script and | |
119 | builds indexes according to the given config file. The config language | |
120 | provides a flexible means of specifying which index files are built from | |
121 | which directories, as well as providing a simple means of maintaining the | |
122 | required settings.</para></listitem> | |
123 | </varlistentry> | |
124 | ||
125 | <varlistentry><term><option>clean</option></term> | |
126 | <listitem><para> | |
127 | The <literal>clean</literal> command tidies the databases used by the given | |
128 | configuration file by removing any records that are no longer necessary.</para></listitem> | |
129 | </varlistentry> | |
130 | </variablelist> | |
131 | </refsect1> | |
132 | ||
133 | <refsect1><title>The Generate Configuration</title> | |
134 | <para> | |
135 | The <literal>generate</literal> command uses a configuration file to describe the | |
136 | archives that are going to be generated. It follows the typical ISC | |
137 | configuration format as seen in ISC tools like bind 8 and dhcpd. | |
138 | &apt-conf; contains a description of the syntax. Note that the generate | |
139 | configuration is parsed in sectional manner, but &apt-conf; is parsed in a | |
140 | tree manner. This only effects how the scope tag is handled.</para> | |
141 | ||
142 | <para> | |
143 | The generate configuration has four separate sections, each described below.</para> | |
144 | ||
145 | <refsect2><title><literal>Dir</literal> Section</title> | |
146 | <para> | |
147 | The <literal>Dir</literal> section defines the standard directories needed to | |
148 | locate the files required during the generation process. These | |
149 | directories are prepended certain relative paths defined in later | |
150 | sections to produce a complete an absolute path.</para> | |
151 | <variablelist> | |
152 | <varlistentry><term><option>ArchiveDir</option></term> | |
153 | <listitem><para> | |
154 | Specifies the root of the FTP archive, in a standard | |
155 | Debian configuration this is the directory that contains the | |
156 | <filename>ls-LR</filename> and dist nodes.</para></listitem> | |
157 | </varlistentry> | |
158 | ||
159 | <varlistentry><term><option>OverrideDir</option></term> | |
160 | <listitem><para> | |
161 | Specifies the location of the override files.</para></listitem> | |
162 | </varlistentry> | |
163 | ||
164 | <varlistentry><term><option>CacheDir</option></term> | |
165 | <listitem><para> | |
166 | Specifies the location of the cache files.</para></listitem> | |
167 | </varlistentry> | |
168 | ||
169 | <varlistentry><term><option>FileListDir</option></term> | |
170 | <listitem><para> | |
171 | Specifies the location of the file list files, | |
172 | if the <literal>FileList</literal> setting is used below.</para></listitem> | |
173 | </varlistentry> | |
174 | </variablelist> | |
175 | </refsect2> | |
176 | ||
177 | <refsect2><title><literal>Default</literal> Section</title> | |
178 | <para> | |
179 | The <literal>Default</literal> section specifies default values, and settings | |
180 | that control the operation of the generator. Other sections may override | |
181 | these defaults with a per-section setting.</para> | |
182 | <variablelist> | |
183 | <varlistentry><term><option>Packages::Compress</option></term> | |
184 | <listitem><para> | |
185 | Sets the default compression schemes to use | |
186 | for the package index files. It is a string that contains a space | |
187 | separated list of at least one of the compressors configured via the | |
188 | <option>APT::Compressor</option> configuration scope. | |
189 | The default for all compression schemes is '. gzip'.</para></listitem> | |
190 | </varlistentry> | |
191 | ||
192 | <varlistentry><term><option>Packages::Extensions</option></term> | |
193 | <listitem><para> | |
194 | Sets the default list of file extensions that are package files. | |
195 | This defaults to '.deb'.</para></listitem> | |
196 | </varlistentry> | |
197 | ||
198 | <varlistentry><term><option>Sources::Compress</option></term> | |
199 | <listitem><para> | |
200 | This is similar to <literal>Packages::Compress</literal> | |
201 | except that it controls the compression for the Sources files.</para></listitem> | |
202 | </varlistentry> | |
203 | ||
204 | <varlistentry><term><option>Sources::Extensions</option></term> | |
205 | <listitem><para> | |
206 | Sets the default list of file extensions that are source files. | |
207 | This defaults to '.dsc'.</para></listitem> | |
208 | </varlistentry> | |
209 | ||
210 | <varlistentry><term><option>Contents::Compress</option></term> | |
211 | <listitem><para> | |
212 | This is similar to <literal>Packages::Compress</literal> | |
213 | except that it controls the compression for the Contents files.</para></listitem> | |
214 | </varlistentry> | |
215 | ||
216 | <varlistentry><term><option>Translation::Compress</option></term> | |
217 | <listitem><para> | |
218 | This is similar to <literal>Packages::Compress</literal> | |
219 | except that it controls the compression for the Translation-en master file.</para></listitem> | |
220 | </varlistentry> | |
221 | ||
222 | <varlistentry><term><option>DeLinkLimit</option></term> | |
223 | <listitem><para> | |
224 | Specifies the number of kilobytes to delink (and | |
225 | replace with hard links) per run. This is used in conjunction with the | |
226 | per-section <literal>External-Links</literal> setting.</para></listitem> | |
227 | </varlistentry> | |
228 | ||
229 | <varlistentry><term><option>FileMode</option></term> | |
230 | <listitem><para> | |
231 | Specifies the mode of all created index files. It | |
232 | defaults to 0644. All index files are set to this mode with no regard | |
233 | to the umask.</para></listitem> | |
234 | </varlistentry> | |
235 | ||
236 | <varlistentry><term><option>LongDescription</option></term> | |
237 | <listitem><para> | |
238 | Specifies whether long descriptions should be included in the <filename>Packages</filename> file or split | |
239 | out into a master <filename>Translation-en</filename> file.</para></listitem> | |
240 | </varlistentry> | |
241 | </variablelist> | |
242 | </refsect2> | |
243 | ||
244 | <refsect2><title><literal>TreeDefault</literal> Section</title> | |
245 | <para> | |
246 | Sets defaults specific to <literal>Tree</literal> sections. All of these | |
247 | variables are substitution variables and have the strings $(DIST), | |
248 | $(SECTION) and $(ARCH) replaced with their respective values.</para> | |
249 | ||
250 | <variablelist> | |
251 | <varlistentry><term><option>MaxContentsChange</option></term> | |
252 | <listitem><para> | |
253 | Sets the number of kilobytes of contents | |
254 | files that are generated each day. The contents files are round-robined | |
255 | so that over several days they will all be rebuilt.</para></listitem> | |
256 | </varlistentry> | |
257 | ||
258 | <varlistentry><term><option>ContentsAge</option></term> | |
259 | <listitem><para> | |
260 | Controls the number of days a contents file is allowed | |
261 | to be checked without changing. If this limit is passed the mtime of the | |
262 | contents file is updated. This case can occur if the package file is | |
263 | changed in such a way that does not result in a new contents file | |
264 | [override edit for instance]. A hold off is allowed in hopes that new | |
265 | .debs will be installed, requiring a new file anyhow. The default is 10, | |
266 | the units are in days.</para></listitem> | |
267 | </varlistentry> | |
268 | ||
269 | <varlistentry><term><option>Directory</option></term> | |
270 | <listitem><para> | |
271 | Sets the top of the .deb directory tree. Defaults to | |
272 | <filename>$(DIST)/$(SECTION)/binary-$(ARCH)/</filename></para></listitem> | |
273 | </varlistentry> | |
274 | ||
275 | <varlistentry><term><option>SrcDirectory</option></term> | |
276 | <listitem><para> | |
277 | Sets the top of the source package directory tree. Defaults to | |
278 | <filename>$(DIST)/$(SECTION)/source/</filename></para></listitem> | |
279 | </varlistentry> | |
280 | ||
281 | <varlistentry><term><option>Packages</option></term> | |
282 | <listitem><para> | |
283 | Sets the output Packages file. Defaults to | |
284 | <filename>$(DIST)/$(SECTION)/binary-$(ARCH)/Packages</filename></para></listitem> | |
285 | </varlistentry> | |
286 | ||
287 | <varlistentry><term><option>Sources</option></term> | |
288 | <listitem><para> | |
289 | Sets the output Sources file. Defaults to | |
290 | <filename>$(DIST)/$(SECTION)/source/Sources</filename></para></listitem> | |
291 | </varlistentry> | |
292 | ||
293 | <varlistentry><term><option>Translation</option></term> | |
294 | <listitem><para> | |
295 | Sets the output Translation-en master file with the long descriptions if they | |
296 | should be not included in the Packages file. Defaults to | |
297 | <filename>$(DIST)/$(SECTION)/i18n/Translation-en</filename></para></listitem> | |
298 | </varlistentry> | |
299 | ||
300 | <varlistentry><term><option>InternalPrefix</option></term> | |
301 | <listitem><para> | |
302 | Sets the path prefix that causes a symlink to be | |
303 | considered an internal link instead of an external link. Defaults to | |
304 | <filename>$(DIST)/$(SECTION)/</filename></para></listitem> | |
305 | </varlistentry> | |
306 | ||
307 | <varlistentry><term><option>Contents</option></term> | |
308 | <listitem><para> | |
309 | Sets the output Contents file. Defaults to | |
310 | <filename>$(DIST)/$(SECTION)/Contents-$(ARCH)</filename>. If this setting causes multiple | |
311 | Packages files to map onto a single Contents file (as is the default) | |
312 | then <command>apt-ftparchive</command> will integrate those package files | |
313 | together automatically.</para></listitem> | |
314 | </varlistentry> | |
315 | ||
316 | <varlistentry><term><option>Contents::Header</option></term> | |
317 | <listitem><para> | |
318 | Sets header file to prepend to the contents output.</para></listitem> | |
319 | </varlistentry> | |
320 | ||
321 | <varlistentry><term><option>BinCacheDB</option></term> | |
322 | <listitem><para> | |
323 | Sets the binary cache database to use for this | |
324 | section. Multiple sections can share the same database.</para></listitem> | |
325 | </varlistentry> | |
326 | ||
327 | <varlistentry><term><option>FileList</option></term> | |
328 | <listitem><para> | |
329 | Specifies that instead of walking the directory tree, | |
330 | <command>apt-ftparchive</command> should read the list of files from the given | |
331 | file. Relative files names are prefixed with the archive directory.</para></listitem> | |
332 | </varlistentry> | |
333 | ||
334 | <varlistentry><term><option>SourceFileList</option></term> | |
335 | <listitem><para> | |
336 | Specifies that instead of walking the directory tree, | |
337 | <command>apt-ftparchive</command> should read the list of files from the given | |
338 | file. Relative files names are prefixed with the archive directory. | |
339 | This is used when processing source indexes.</para></listitem> | |
340 | </varlistentry> | |
341 | </variablelist> | |
342 | </refsect2> | |
343 | ||
344 | <refsect2><title><literal>Tree</literal> Section</title> | |
345 | <para> | |
346 | The <literal>Tree</literal> section defines a standard Debian file tree which | |
347 | consists of a base directory, then multiple sections in that base | |
348 | directory and finally multiple Architectures in each section. The exact | |
349 | pathing used is defined by the <literal>Directory</literal> substitution variable.</para> | |
350 | <para> | |
351 | The <literal>Tree</literal> section takes a scope tag which sets the | |
352 | <literal>$(DIST)</literal> variable and defines the root of the tree | |
353 | (the path is prefixed by <literal>ArchiveDir</literal>). | |
354 | Typically this is a setting such as <filename>dists/&debian-stable-codename;</filename>.</para> | |
355 | <para> | |
356 | All of the settings defined in the <literal>TreeDefault</literal> section can be | |
357 | used in a <literal>Tree</literal> section as well as three new variables.</para> | |
358 | <para> | |
359 | When processing a <literal>Tree</literal> section <command>apt-ftparchive</command> | |
360 | performs an operation similar to: | |
361 | <programlisting> | |
362 | for i in Sections do | |
363 | for j in Architectures do | |
364 | Generate for DIST=scope SECTION=i ARCH=j | |
365 | </programlisting></para> | |
366 | ||
367 | <variablelist> | |
368 | <varlistentry><term><option>Sections</option></term> | |
369 | <listitem><para> | |
370 | This is a space separated list of sections which appear | |
371 | under the distribution; typically this is something like | |
372 | <literal>main contrib non-free</literal></para></listitem> | |
373 | </varlistentry> | |
374 | ||
375 | <varlistentry><term><option>Architectures</option></term> | |
376 | <listitem><para> | |
377 | This is a space separated list of all the architectures that appear under | |
378 | search section. The special architecture 'source' is used to indicate | |
379 | that this tree has a source archive. The architecture 'all' signals that | |
380 | architecture specific files like <filename>Packages</filename> should not | |
381 | include information about architecture <literal>all</literal> packages in | |
382 | all files as they will be available in a dedicated file. | |
383 | </para></listitem> | |
384 | </varlistentry> | |
385 | ||
386 | <varlistentry><term><option>LongDescription</option></term> | |
387 | <listitem><para> | |
388 | Specifies whether long descriptions should be included in the <filename>Packages</filename> file or split | |
389 | out into a master <filename>Translation-en</filename> file.</para></listitem> | |
390 | </varlistentry> | |
391 | ||
392 | <varlistentry><term><option>BinOverride</option></term> | |
393 | <listitem><para> | |
394 | Sets the binary override file. The override file | |
395 | contains section, priority and maintainer address information.</para></listitem> | |
396 | </varlistentry> | |
397 | ||
398 | <varlistentry><term><option>SrcOverride</option></term> | |
399 | <listitem><para> | |
400 | Sets the source override file. The override file | |
401 | contains section information.</para></listitem> | |
402 | </varlistentry> | |
403 | ||
404 | <varlistentry><term><option>ExtraOverride</option></term> | |
405 | <listitem><para> | |
406 | Sets the binary extra override file.</para></listitem> | |
407 | </varlistentry> | |
408 | ||
409 | <varlistentry><term><option>SrcExtraOverride</option></term> | |
410 | <listitem><para> | |
411 | Sets the source extra override file.</para></listitem> | |
412 | </varlistentry> | |
413 | </variablelist> | |
414 | </refsect2> | |
415 | ||
416 | <refsect2><title><literal>BinDirectory</literal> Section</title> | |
417 | <para> | |
418 | The <literal>bindirectory</literal> section defines a binary directory tree | |
419 | with no special structure. The scope tag specifies the location of | |
420 | the binary directory and the settings are similar to the <literal>Tree</literal> | |
421 | section with no substitution variables or | |
422 | <literal>Section</literal><literal>Architecture</literal> settings.</para> | |
423 | <variablelist> | |
424 | <varlistentry><term><option>Packages</option></term> | |
425 | <listitem><para> | |
426 | Sets the Packages file output.</para></listitem> | |
427 | </varlistentry> | |
428 | ||
429 | <varlistentry><term><option>Sources</option></term> | |
430 | <listitem><para> | |
431 | Sets the Sources file output. At least one of | |
432 | <literal>Packages</literal> or <literal>Sources</literal> is required.</para></listitem> | |
433 | </varlistentry> | |
434 | ||
435 | <varlistentry><term><option>Contents</option></term> | |
436 | <listitem><para> | |
437 | Sets the Contents file output (optional).</para></listitem> | |
438 | </varlistentry> | |
439 | ||
440 | <varlistentry><term><option>BinOverride</option></term> | |
441 | <listitem><para> | |
442 | Sets the binary override file.</para></listitem> | |
443 | </varlistentry> | |
444 | ||
445 | <varlistentry><term><option>SrcOverride</option></term> | |
446 | <listitem><para> | |
447 | Sets the source override file.</para></listitem> | |
448 | </varlistentry> | |
449 | ||
450 | <varlistentry><term><option>ExtraOverride</option></term> | |
451 | <listitem><para> | |
452 | Sets the binary extra override file.</para></listitem> | |
453 | </varlistentry> | |
454 | ||
455 | <varlistentry><term><option>SrcExtraOverride</option></term> | |
456 | <listitem><para> | |
457 | Sets the source extra override file.</para></listitem> | |
458 | </varlistentry> | |
459 | ||
460 | <varlistentry><term><option>BinCacheDB</option></term> | |
461 | <listitem><para> | |
462 | Sets the cache DB.</para></listitem> | |
463 | </varlistentry> | |
464 | ||
465 | <varlistentry><term><option>PathPrefix</option></term> | |
466 | <listitem><para> | |
467 | Appends a path to all the output paths.</para></listitem> | |
468 | </varlistentry> | |
469 | ||
470 | <varlistentry><term><option>FileList</option></term><term><option>SourceFileList</option></term> | |
471 | <listitem><para> | |
472 | Specifies the file list file.</para></listitem> | |
473 | </varlistentry> | |
474 | </variablelist> | |
475 | </refsect2> | |
476 | </refsect1> | |
477 | ||
478 | ||
479 | <refsect1><title>The Binary Override File</title> | |
480 | <para>The binary override file is fully compatible with &dpkg-scanpackages;. It | |
481 | contains four fields separated by spaces. The first field is the package name, | |
482 | the second is the priority to force that package to, the third is | |
483 | the section to force that package to and the final field is the maintainer | |
484 | permutation field.</para> | |
485 | <para>The general form of the maintainer field is: | |
486 | <literallayout>old [// oldn]* => new</literallayout> | |
487 | or simply, | |
488 | <literallayout>new</literallayout> | |
489 | The first form allows a double-slash separated list of old email addresses | |
490 | to be specified. If any of those are found then new is substituted for the | |
491 | maintainer field. The second form unconditionally substitutes the | |
492 | maintainer field.</para> | |
493 | </refsect1> | |
494 | ||
495 | ||
496 | <refsect1><title>The Source Override File</title> | |
497 | <para> | |
498 | The source override file is fully compatible with &dpkg-scansources;. It | |
499 | contains two fields separated by spaces. The first field is the source | |
500 | package name, the second is the section to assign it.</para> | |
501 | </refsect1> | |
502 | ||
503 | <refsect1><title>The Extra Override File</title> | |
504 | <para> | |
505 | The extra override file allows any arbitrary tag to be added or replaced | |
506 | in the output. It has three columns, the first is the package, the second is | |
507 | the tag and the remainder of the line is the new value.</para> | |
508 | </refsect1> | |
509 | ||
510 | <refsect1><title>options</title> | |
511 | &apt-cmdblurb; | |
512 | ||
513 | <variablelist> | |
514 | <varlistentry> | |
515 | <term><option>--md5</option></term> | |
516 | <term><option>--sha1</option></term> | |
517 | <term><option>--sha256</option></term> | |
518 | <term><option>--sha512</option></term> | |
519 | <listitem><para> | |
520 | Generate the given checksum. These options default to on, when turned off the generated | |
521 | index files will not have the checksum fields where possible. | |
522 | Configuration Items: <literal>APT::FTPArchive::<replaceable>Checksum</replaceable></literal> and | |
523 | <literal>APT::FTPArchive::<replaceable>Index</replaceable>::<replaceable>Checksum</replaceable></literal> where | |
524 | <literal><replaceable>Index</replaceable></literal> can be <literal>Packages</literal>, <literal>Sources</literal> or | |
525 | <literal>Release</literal> and <literal><replaceable>Checksum</replaceable></literal> can be <literal>MD5</literal>, | |
526 | <literal>SHA1</literal>, <literal>SHA256</literal> or <literal>SHA512</literal>.</para></listitem> | |
527 | </varlistentry> | |
528 | ||
529 | <varlistentry><term><option>-d</option></term><term><option>--db</option></term> | |
530 | <listitem><para> | |
531 | Use a binary caching DB. This has no effect on the generate command. | |
532 | Configuration Item: <literal>APT::FTPArchive::DB</literal>.</para></listitem> | |
533 | </varlistentry> | |
534 | ||
535 | <varlistentry><term><option>-q</option></term><term><option>--quiet</option></term> | |
536 | <listitem><para> | |
537 | Quiet; produces output suitable for logging, omitting progress indicators. | |
538 | More q's will produce more quiet up to a maximum of 2. You can also use | |
539 | <option>-q=#</option> to set the quiet level, overriding the configuration file. | |
540 | Configuration Item: <literal>quiet</literal>.</para></listitem> | |
541 | </varlistentry> | |
542 | ||
543 | <varlistentry><term><option>--delink</option></term> | |
544 | <listitem><para> | |
545 | Perform Delinking. If the <literal>External-Links</literal> setting is used then | |
546 | this option actually enables delinking of the files. It defaults to on and | |
547 | can be turned off with <option>--no-delink</option>. | |
548 | Configuration Item: <literal>APT::FTPArchive::DeLinkAct</literal>.</para></listitem> | |
549 | </varlistentry> | |
550 | ||
551 | <varlistentry><term><option>--contents</option></term> | |
552 | <listitem><para> | |
553 | Perform contents generation. When this option is set and package indexes | |
554 | are being generated with a cache DB then the file listing will also be | |
555 | extracted and stored in the DB for later use. When using the generate | |
556 | command this option also allows the creation of any Contents files. The | |
557 | default is on. | |
558 | Configuration Item: <literal>APT::FTPArchive::Contents</literal>.</para></listitem> | |
559 | </varlistentry> | |
560 | ||
561 | <varlistentry><term><option>-s</option></term><term><option>--source-override</option></term> | |
562 | <listitem><para> | |
563 | Select the source override file to use with the <literal>sources</literal> command. | |
564 | Configuration Item: <literal>APT::FTPArchive::SourceOverride</literal>.</para></listitem> | |
565 | </varlistentry> | |
566 | ||
567 | <varlistentry><term><option>--readonly</option></term> | |
568 | <listitem><para> | |
569 | Make the caching databases read only. | |
570 | Configuration Item: <literal>APT::FTPArchive::ReadOnlyDB</literal>.</para></listitem> | |
571 | </varlistentry> | |
572 | ||
573 | <varlistentry><term><option>-a</option></term><term><option>--arch</option></term> | |
574 | <listitem><para>Accept in the <literal>packages</literal> and <literal>contents</literal> | |
575 | commands only package files matching <literal>*_arch.deb</literal> or | |
576 | <literal>*_all.deb</literal> instead of all package files in the given path. | |
577 | Configuration Item: <literal>APT::FTPArchive::Architecture</literal>.</para></listitem> | |
578 | </varlistentry> | |
579 | ||
580 | <varlistentry><term><option>APT::FTPArchive::AlwaysStat</option></term> | |
581 | <listitem><para> | |
582 | &apt-ftparchive; caches as much as possible of metadata in a cachedb. If packages | |
583 | are recompiled and/or republished with the same version again, this will lead to problems | |
584 | as the now outdated cached metadata like size and checksums will be used. With this option | |
585 | enabled this will no longer happen as it will be checked if the file was changed. | |
586 | Note that this option is set to "<literal>false</literal>" by default as it is not recommend | |
587 | to upload multiply versions/builds of a package with the same versionnumber, so in theory | |
588 | nobody will have these problems and therefore all these extra checks are useless. | |
589 | </para></listitem> | |
590 | </varlistentry> | |
591 | ||
592 | <varlistentry><term><option>APT::FTPArchive::LongDescription</option></term> | |
593 | <listitem><para> | |
594 | This configuration option defaults to "<literal>true</literal>" and should only be set to | |
595 | <literal>"false"</literal> if the Archive generated with &apt-ftparchive; also provides | |
596 | <filename>Translation</filename> files. Note that the <filename>Translation-en</filename> | |
597 | master file can only be created in the generate command. | |
598 | </para></listitem> | |
599 | </varlistentry> | |
600 | ||
601 | &apt-commonoptions; | |
602 | ||
603 | </variablelist> | |
604 | </refsect1> | |
605 | ||
606 | <refsect1><title>Examples</title> | |
607 | ||
608 | <para>To create a compressed Packages file for a directory containing | |
609 | binary packages (.deb): | |
610 | ||
611 | <programlisting> | |
612 | <command>apt-ftparchive</command> packages <replaceable>directory</replaceable> | <command>gzip</command> > <filename>Packages.gz</filename> | |
613 | </programlisting></para> | |
614 | ||
615 | </refsect1> | |
616 | ||
617 | <refsect1><title>See Also</title> | |
618 | <para>&apt-conf;</para> | |
619 | </refsect1> | |
620 | ||
621 | <refsect1><title>Diagnostics</title> | |
622 | <para><command>apt-ftparchive</command> returns zero on normal operation, decimal 100 on error.</para> | |
623 | </refsect1> | |
624 | ||
625 | &manbugs; | |
626 | ||
627 | </refentry> |