You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

628 lines
28 KiB

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