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