1 .\" Title: apt\-ftparchive
2 .\" Author: Jason Gunthorpe
3 .\" Generator: DocBook XSL Stylesheets v1.71.0 <http://docbook.sf.net/>
4 .\" Date: 29 February 2004
8 .TH "APT\-FTPARCHIVE" "1" "29 February 2004" "Linux" ""
9 .\" disable hyphenation
11 .\" disable justification (adjust text to left margin only)
14 apt\-ftparchive \- Utility to generate index files
17 \fBapt\-ftparchive\fR [\fB\-hvdsq\fR] [\fB\-\-md5\fR] [\fB\-\-delink\fR] [\fB\-\-readonly\fR] [\fB\-\-contents\fR] [\fB\-o=\fR\fB\fIconfig\ string\fR\fR] [\fB\-c=\fR\fB\fIfile\fR\fR] {[packages\ \fIpath\fR...\ [\fIoverride\fR\ [\fIpathprefix\fR]]] | [sources\ \fIpath\fR...\ [\fIoverride\fR\ [\fIpathprefix\fR]]] | [contents\ \fIpath\fR] | [release\ \fIpath\fR] | [generate\ \fIconfig\-file\fR\ \fIsection\fR...] | [clean\ \fIconfig\-file\fR]}
21 is the command line tool that generates the index files that APT uses to access a distribution source. The index files should be generated on the origin site based on the content of that site.
25 \fBdpkg\-scanpackages\fR(8)
26 program, incorporating its entire functionality via the
28 command. It also contains a contents file generator,
29 contents, and an elaborate means to 'script' the generation process for a complete archive.
33 can make use of binary databases to cache the contents of a .deb file and it does not rely on any external programs aside from
34 \fBgzip\fR(1). When doing a full generate it automatically performs file\-change checks and builds the desired compressed output files.
39 option is given one of the commands below must be present.
43 The packages command generates a package file from a directory tree. It takes the given directory and recursively searches it for .deb files, emitting a package record to stdout for each. This command is approximately equivalent to
44 \fBdpkg\-scanpackages\fR(8).
48 can be used to specify a binary caching DB.
55 command generates a source index file from a directory tree. It takes the given directory and recursively searches it for .dsc files, emitting a source record to stdout for each. This command is approximately equivalent to
56 \fBdpkg\-scansources\fR(8).
58 If an override file is specified then a source override file will be looked for with an extension of .src. The \-\-source\-override option can be used to change the source override file that will be used.
65 command generates a contents file from a directory tree. It takes the given directory and recursively searches it for .deb files, and reads the file list from each file. It then sorts and writes to stdout the list of files matched to packages. Directories are not written to the output. If multiple packages own the same file then each package is separated by a comma in the output.
69 can be used to specify a binary caching DB.
76 command generates a Release file from a directory tree. It recursively searches the given directory for Packages, Packages.gz, Packages.bz2, Sources, Sources.gz, Sources.bz2, Release and md5sum.txt files. It then writes to stdout a Release file containing an MD5 digest and SHA1 digest for each file.
78 Values for the additional metadata fields in the Release file are taken from the corresponding variables under
79 APT::FTPArchive::Release, e.g.
80 APT::FTPArchive::Release::Origin. The supported fields are:
96 command is designed to be runnable from a cron script and builds indexes according to the given config file. The config language provides a flexible means of specifying which index files are built from which directories, as well as providing a simple means of maintaining the required settings.
103 command tidies the databases used by the given configuration file by removing any records that are no longer necessary.
105 .SH "THE GENERATE CONFIGURATION"
109 command uses a configuration file to describe the archives that are going to be generated. It follows the typical ISC configuration format as seen in ISC tools like bind 8 and dhcpd.
111 contains a description of the syntax. Note that the generate configuration is parsed in sectional manner, but
113 is parsed in a tree manner. This only effects how the scope tag is handled.
115 The generate configuration has 4 separate sections, each described below.
120 section defines the standard directories needed to locate the files required during the generation process. These directories are prepended to certain relative paths defined in later sections to produce a complete an absolute path.
124 Specifies the root of the FTP archive, in a standard Debian configuration this is the directory that contains the
131 Specifies the location of the override files.
136 Specifies the location of the cache files
141 Specifies the location of the file list files, if the
143 setting is used below.
145 .SS "Default Section"
149 section specifies default values, and settings that control the operation of the generator. Other sections may override these defaults with a per\-section setting.
153 Sets the default compression schemes to use for the Package index files. It is a string that contains a space separated list of at least one of: '.' (no compression), 'gzip' and 'bzip2'. The default for all compression schemes is '. gzip'.
158 Sets the default list of file extensions that are package files. This defaults to '.deb'.
165 except that it controls the compression for the Sources files.
170 Sets the default list of file extensions that are source files. This defaults to '.dsc'.
177 except that it controls the compression for the Contents files.
182 Specifies the number of kilobytes to delink (and replace with hard links) per run. This is used in conjunction with the per\-section
189 Specifies the mode of all created index files. It defaults to 0644. All index files are set to this mode with no regard to the umask.
191 .SS "TreeDefault Section"
193 Sets defaults specific to
195 sections. All of these variables are substitution variables and have the strings $(DIST), $(SECTION) and $(ARCH) replaced with their respective values.
199 Sets the number of kilobytes of contents files that are generated each day. The contents files are round\-robined so that over several days they will all be rebuilt.
204 Controls the number of days a contents file is allowed to be checked without changing. If this limit is passed the mtime of the contents file is updated. This case can occur if the package file is changed in such a way that does not result in a new contents file [override edit for instance]. A hold off is allowed in hopes that new .debs will be installed, requiring a new file anyhow. The default is 10, the units are in days.
209 Sets the top of the .deb directory tree. Defaults to
210 \fI$(DIST)/$(SECTION)/binary\-$(ARCH)/\fR
215 Sets the top of the source package directory tree. Defaults to
216 \fI$(DIST)/$(SECTION)/source/\fR
221 Sets the output Packages file. Defaults to
222 \fI$(DIST)/$(SECTION)/binary\-$(ARCH)/Packages\fR
227 Sets the output Packages file. Defaults to
228 \fI$(DIST)/$(SECTION)/source/Sources\fR
233 Sets the path prefix that causes a symlink to be considered an internal link instead of an external link. Defaults to
234 \fI$(DIST)/$(SECTION)/\fR
239 Sets the output Contents file. Defaults to
240 \fI$(DIST)/Contents\-$(ARCH)\fR. If this setting causes multiple Packages files to map onto a single Contents file (such as the default) then
241 \fBapt\-ftparchive\fR
242 will integrate those package files together automatically.
247 Sets header file to prepend to the contents output.
252 Sets the binary cache database to use for this section. Multiple sections can share the same database.
257 Specifies that instead of walking the directory tree,
258 \fBapt\-ftparchive\fR
259 should read the list of files from the given file. Relative files names are prefixed with the archive directory.
264 Specifies that instead of walking the directory tree,
265 \fBapt\-ftparchive\fR
266 should read the list of files from the given file. Relative files names are prefixed with the archive directory. This is used when processing source indexs.
272 section defines a standard Debian file tree which consists of a base directory, then multiple sections in that base directory and finally multiple Architectures in each section. The exact pathing used is defined by the
274 substitution variable.
278 section takes a scope tag which sets the
280 variable and defines the root of the tree (the path is prefixed by
281 ArchiveDir). Typically this is a setting such as
284 All of the settings defined in the
286 section can be use in a
288 section as well as three new variables.
293 \fBapt\-ftparchive\fR
294 performs an operation similar to:
295 .sp .RS 3n .nf for i in Sections do for j in Architectures do Generate for DIST=scope SECTION=i ARCH=j .fi .RE
299 This is a space separated list of sections which appear under the distribution, typically this is something like
300 main contrib non\-free
305 This is a space separated list of all the architectures that appear under search section. The special architecture 'source' is used to indicate that this tree has a source archive.
310 Sets the binary override file. The override file contains section, priority and maintainer address information.
315 Sets the source override file. The override file contains section information.
320 Sets the binary extra override file.
325 Sets the source extra override file.
327 .SS "BinDirectory Section"
331 section defines a binary directory tree with no special structure. The scope tag specifies the location of the binary directory and the settings are similar to the
333 section with no substitution variables or
339 Sets the Packages file output.
344 Sets the Sources file output. At least one of
353 Sets the Contents file output. (optional)
358 Sets the binary override file.
363 Sets the source override file.
368 Sets the binary extra override file.
373 Sets the source extra override file.
383 Appends a path to all the output paths.
386 FileList, SourceFileList
388 Specifies the file list file.
390 .SH "THE BINARY OVERRIDE FILE"
392 The binary override file is fully compatible with
393 \fBdpkg\-scanpackages\fR(8). It contains 4 fields separated by spaces. The first field is the package name, the second is the priority to force that package to, the third is the the section to force that package to and the final field is the maintainer permutation field.
395 The general form of the maintainer field is:
399 old [// oldn]* => new
411 The first form allows a double\-slash separated list of old email addresses to be specified. If any of those are found then new is substituted for the maintainer field. The second form unconditionally substitutes the maintainer field.
412 .SH "THE SOURCE OVERRIDE FILE"
414 The source override file is fully compatible with
415 \fBdpkg\-scansources\fR(8). It contains 2 fields separated by spaces. The first fields is the source package name, the second is the section to assign it.
416 .SH "THE EXTRA OVERRIDE FILE"
418 The extra override file allows any arbitrary tag to be added or replaced in the output. It has 3 columns, the first is the package, the second is the tag and the remainder of the line is the new value.
421 All command line options may be set using the configuration file, the descriptions indicate the configuration option to set. For boolean options you can override the config file by using something like
422 \fB\-f\-\fR,\fB\-\-no\-f\fR,
424 or several other variations.
428 Generate MD5 sums. This defaults to on, when turned off the generated index files will not have MD5Sum fields where possible. Configuration Item:
432 \fB\-d\fR, \fB\-\-db\fR
434 Use a binary caching DB. This has no effect on the generate command. Configuration Item:
438 \fB\-q\fR, \fB\-\-quiet\fR
440 Quiet; produces output suitable for logging, omitting progress indicators. More q's will produce more quiet up to a maximum of 2. You can also use
442 to set the quiet level, overriding the configuration file. Configuration Item:
448 Perform Delinking. If the
450 setting is used then this option actually enables delinking of the files. It defaults to on and can be turned off with
451 \fB\-\-no\-delink\fR. Configuration Item:
452 APT::FTPArchive::DeLinkAct.
457 Perform contents generation. When this option is set and package indexes are being generated with a cache DB then the file listing will also be extracted and stored in the DB for later use. When using the generate command this option also allows the creation of any Contents files. The default is on. Configuration Item:
458 APT::FTPArchive::Contents.
461 \fB\-s\fR, \fB\-\-source\-override\fR
463 Select the source override file to use with the
465 command. Configuration Item:
466 APT::FTPArchive::SourceOverride.
471 Make the caching databases read only. Configuration Item:
472 APT::FTPArchive::ReadOnlyDB.
475 \fB\-h\fR, \fB\-\-help\fR
477 Show a short usage summary.
480 \fB\-v\fR, \fB\-\-version\fR
482 Show the program version.
485 \fB\-c\fR, \fB\-\-config\-file\fR
487 Configuration File; Specify a configuration file to use. The program will read the default configuration file and then this configuration file. See
489 for syntax information.
492 \fB\-o\fR, \fB\-\-option\fR
494 Set a Configuration Option; This will set an arbitary configuration option. The syntax is
495 \fB\-o Foo::Bar=bar\fR.
499 To create a compressed Packages file for a directory containing binary packages (.deb):
503 \fBapt\-ftparchive\fR packages \fIdirectory\fR | \fBgzip\fR > \fIPackages.gz\fR
511 \fBapt\-ftparchive\fR
512 returns zero on normal operation, decimal 100 on error.
515 [1]\&\fIAPT bug page\fR. If you wish to report a bug in APT, please see
516 \fI/usr/share/doc/debian/bug\-reporting.txt\fR
522 \fBJason Gunthorpe\fR
534 \%http://bugs.debian.org/src:apt