apt-ftparchive.1.xml 27 KB

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