apt-ftparchive.1.xml 28 KB

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