reference.sgml 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977
  1. <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook V3.1//EN" [
  2. <!ENTITY debian "<productname>Debian</productname>">
  3. <!ENTITY dpkg "<command>dpkg</command>">
  4. <!ENTITY dselect "<command>dselect</command>">
  5. <!ENTITY deb "<filename>.deb</filename>">
  6. ]>
  7. <book id="reference">
  8. <bookinfo>
  9. <title>dpkg reference Manual</title>
  10. <edition>draft</edition>
  11. <authorgroup>
  12. <author>
  13. <firstname>Wichert</firstname>
  14. <surname>Akkerman</surname>
  15. <affiliation>
  16. <address>
  17. <email>wichert@deephackmode.org</email>
  18. </address>
  19. </affiliation>
  20. </author>
  21. </authorgroup>
  22. <copyright>
  23. <year>2001</year>
  24. <year>2002</year>
  25. <holder>Wichert Akkerman</holder>
  26. </copyright>
  27. <legalnotice>
  28. <para>
  29. Permission is granted to copy, distribute and/or modify this document
  30. under the terms of the GNU Free Documentation License, Version 1.1 or any
  31. later version published by the Free Software Foundation. There are
  32. no invariant sections. A copy of the license is included in the section
  33. entitled "GNU Free Documentation License".
  34. </para>
  35. </legalnotice>
  36. </bookinfo>
  37. <preface>
  38. <title>Preface</title>
  39. <para>
  40. This manual is a reference to the &debian; package management system.
  41. </para>
  42. <para>
  43. This manual is currently being written based on the previous packaging
  44. manual and as such is a work in progress.
  45. </para>
  46. </preface>
  47. <chapter id="intro">
  48. <title>Introduction</title>
  49. <para>
  50. The Debian package management system is build up from various seperate
  51. tools that work together form a comprehensive system to manage your
  52. system.
  53. </para>
  54. <para>
  55. This document describes all the tools that used to handle and produce
  56. them as well as the file formats used.
  57. </para>
  58. </chapter>
  59. <chapter id="versions">
  60. <title>Version numbers</title>
  61. <para>
  62. It is essential for a packaging system to have a documented method to
  63. compare version numbers. Unfortunately there are different ways of
  64. dealing with them, each with their own good and bad sides. This chapter
  65. describes how &dpkg; compares version numbers.
  66. </para>
  67. <para>
  68. Version numbers are ASCII strings made up from alphanumeric characters
  69. (letters and digits) and the hyphen (<keycap>-</keycap>), dot
  70. (<keycap>.</keycap>), plus (<keycap>+</keycap>), minus
  71. (<keycap>-</keycap>) and colon (<keycap>:</keycap>) characters.
  72. </para>
  73. <para>
  74. A version number consists of two parts: the upstream version, and
  75. optionally the package revision, which are seperated by a hyphen.
  76. If there is no seperate package revision then the upstream version is
  77. not allowed to contain a hyphen.
  78. </para>
  79. <para>
  80. Comparing version numbers is done by breaking them into pieces and
  81. comparing those from left to right. Pieces are seperated by a
  82. transition from numbers to letters and by non-alphanumeric
  83. characters. Starting from &dpkg; 1.10 numbers of unlimited length may
  84. be used. Olders versions converted numbers to integers before comparing
  85. them and as a result can not handle numbers that do not fit into the C
  86. type int (2^31-1 on 32bit architectures and 2^63-1 on 64bit
  87. architectures).
  88. </para>
  89. </chapter>
  90. <chapter id="diversions">
  91. <title>Managing diversions</title>
  92. <para>
  93. Diversions are a method to instruct &dpkg; to use a different filename
  94. when installing a file. This can be useful to prevent conflicts between
  95. related packages or when a system administator wants to replace a file
  96. with another version.
  97. </para>
  98. <para>
  99. Diversions are specific to either a package or the local system. A
  100. package specific diversion will only divert a file if it does not
  101. belongs to a specific package that was given when the diversion was
  102. created. This allow a package to divert a file from other packages and
  103. replacing them with its own copy. Local diversions are applied to all
  104. packages and can be used by the system administrator.
  105. </para>
  106. <section>
  107. <title>Managing diversions with dpkg-divert</title>
  108. <tip>
  109. <para>
  110. The official documentation for <command>dpkg-divert</command> can always
  111. be found online in the
  112. <citerefentry><refentrytitle>dpkg-divert</refentrytitle>
  113. <manvolnum>8</manvolnum></citerefentry> manual page.
  114. </para>
  115. </tip>
  116. <section>
  117. <title>Adding new diversions</title>
  118. <para>New options can be added using the <emphasis>--add</emphasis>
  119. option for <command>dpkg-divert</command>. Its syntax is:
  120. </para>
  121. </section>
  122. </section>
  123. </chapter>
  124. <chapter id="permissions">
  125. <title>Managing file permissions / ownership</title>
  126. <para>
  127. When you install a package &dpkg; will use the ownership and permissions
  128. that are used inside the package. In some situations you might not agree
  129. with those defaults and would like to use other settings. To support this
  130. a feature called statoverrides was introduced in &dpkg; 1.8.0, and an
  131. accompanying tool called <command>dpkg-statoverride</command>.
  132. </para>
  133. <note>
  134. <para>
  135. Even though we use the word file here, this applies to all filesystem
  136. objects that &dpkg; handles, including directories,
  137. devices, etc.
  138. </para>
  139. </note>
  140. <caution>
  141. <para>
  142. If you look at the &dpkg; changelog you will see that statoverrides
  143. were actually added in version 1.7.0. However that version had
  144. some problems both in <command>dpkg-statoverrides</command> which
  145. broke adding and removing of overrides and in &dpkg; itself which
  146. made it only apply overrides to normal files. Both problems
  147. were fixed in version 1.8.0.
  148. </para>
  149. </caution>
  150. <section>
  151. <title>How permissions and ownership are applied</title>
  152. <para>
  153. &dpkg; uses the following logic to determine the ownership and
  154. permissions to use when installing a file:
  155. </para>
  156. <orderedlist>
  157. <listitem><para>Check if there is a statoverride registered for this file
  158. </para></listitem>
  159. <listitem><para>If an override is present use the ownership and permission
  160. specified in the override.</para></listitem>
  161. <listitem><para>If no override is present:</para>
  162. <orderedlist>
  163. <listitem><para>Check if there is a system account with the same name
  164. as the owner used inside the archive. If so use that as owner,
  165. otherwise use the uid as used in the package.
  166. </para></listitem>
  167. <listitem><para>Check if there is a system group with the same name
  168. as the group used inside the archive. If so use that as group,
  169. otherwise use the gid as used in the package.
  170. </para></listitem>
  171. <listitem><para>Use the permissions as used in the package.
  172. </para></listitem>
  173. </orderedlist>
  174. </listitem>
  175. </orderedlist>
  176. <para>
  177. The exact method that &dpkg; uses to set the ownership and permissions
  178. depends on the type of file that is being created:
  179. </para>
  180. <variablelist>
  181. <varlistentry>
  182. <term>regular files</term>
  183. <listitem><para>Created with owner and group set to
  184. <filename>root</filename> and with mode 0. After the data has
  185. been written to the file the ownership and mode are set to their
  186. final values.
  187. </para></listitem>
  188. </varlistentry>
  189. <varlistentry>
  190. <term>FIFOs</term>
  191. <term>character and block devices</term>
  192. <term>directories</term>
  193. <listitem><para>Created with owner and group set to
  194. <filename>root</filename> and with mode 0, and then updated
  195. to set the ownership and mode to their final values.
  196. </para></listitem>
  197. </varlistentry>
  198. <varlistentry>
  199. <term>Hardlinks</term>
  200. <listitem><para>After the link has been made its ownership and
  201. permissions are setup. <emphasis>This means the original file
  202. will also be changed!</emphasis>
  203. </para></listitem>
  204. </varlistentry>
  205. </variablelist>
  206. </section>
  207. <section>
  208. <title>Managing overrides with dpkg-statoverride</title>
  209. <tip>
  210. <para>
  211. The official documentation for <command>dpkg-statoverride</command> can
  212. always be found online in the
  213. <citerefentry><refentrytitle>dpkg-statoverride</refentrytitle>
  214. <manvolnum>8</manvolnum></citerefentry> manual page.
  215. </para>
  216. </tip>
  217. <section>
  218. <title>Listing overrides</title>
  219. <para>
  220. You can get a list of all overrides present in the database by using the
  221. <option>--list</option> option:
  222. </para>
  223. <blockquote><para>
  224. <synopsis><command>dpkg-statoverride</command> <option>--list</option> <parameter>&lt;glob&gt;</parameter></synopsis>
  225. </para></blockquote>
  226. <para>
  227. There is an optional glob option that restricts the output from
  228. <option>--list</option> to overrides for files that match the glob
  229. expression.
  230. <para>
  231. <footnote>
  232. <para>
  233. Please see the <citerefentry><refentrytitle>sh</refentrytitle>
  234. <manvolnum>1</manvolnum></citerefentry> or
  235. <citerefentry><refentrytitle>glob</refentrytitle><manvolnum>7</manvolnum>
  236. </citerefentry> for a description of glob syntax.
  237. </para>
  238. </footnote>
  239. <example>
  240. <title>Listing overrides</title>
  241. <programlisting>
  242. [fog;~]-1# dpkg-statoverride --list
  243. root root 0755 /bin/mount
  244. root root 0755 /bin/ping
  245. [fog;~]-2# dpkg-statoverride --list '*mount*'
  246. root root 0755 /bin/mount
  247. </programlisting>
  248. </example>
  249. </section>
  250. <section>
  251. <title>Adding new overrides</title>
  252. <para>
  253. New options can be added using the <option>--add</option> option
  254. for <command>dpkg-statoverride</command>. Its syntax is:
  255. </para>
  256. <blockquote><para>
  257. <synopsis><command>dpkg-statoverride</command> <option>--add</option> <parameter>&lt;user&gt;</parameter> <parameter>&lt;group&gt;</parameter> <parameter>&lt;mode&gt;</parameter> <parameter>&lt;file&gt;</parameter>
  258. </synopsis></para></blockquote>
  259. <para>
  260. This will add an override for <filename>&lt;file&gt;</filename> by
  261. telling &dpkg; to use the user, group and mode given to
  262. <command>dpkg-statoverride</command>. The user and group can be
  263. specified in two ways: either by using the name as found in the
  264. system account database (ie <filename>/etc/passwd</filename>, NIS or
  265. another source configured in
  266. <filename>/etc/nsswitch.conf</filename>), or by using a number
  267. prefixed with <computeroutput>#</computeroutput>.
  268. </para>
  269. <example>
  270. <title>Adding an override</title>
  271. <programlisting>
  272. [fog;~]-1# ls -l /bin/mount
  273. -rwsr-xr-x 1 root root 56284 Nov 23 06:14 /bin/mount
  274. [fog;~]-2# dpkg-statoverride --add root root 0755 /bin/mount
  275. [fog;~]-3# ls -l /bin/mount
  276. -rwsr-xr-x 1 root root 56284 Nov 23 06:14 /bin/mount
  277. </programlisting>
  278. </example>
  279. <para>
  280. Adding an override does not update the file on the filesystem, unless
  281. you also specify the <option>--update</option> option.
  282. </para>
  283. <example>
  284. <title>Adding an override using --update</title>
  285. <programlisting>
  286. [fog;~]-1# ls -l /bin/mount
  287. -rwsr-xr-x 1 root root 56284 Nov 23 06:14 /bin/mount
  288. [fog;~]-2# dpkg-statoverride --update --add root root 0755 /bin/mount
  289. [fog;~]-3# ls -l /bin/mount
  290. -rwxr-xr-x 1 root root 56284 Nov 23 06:14 /bin/mount
  291. </programlisting>
  292. </example>
  293. <para>
  294. If an override already exists and you want to replace it you can
  295. use the <option>--force</option> to force <command>dpkg-statoverride
  296. </command> to replace the existing override.
  297. </para>
  298. <example>
  299. <title>Replacing an existing override</title>
  300. <programlisting>
  301. [fog;~/sources/play/pkg-manual]-1# dpkg-statoverride --add root root 0755 /bin/mount
  302. An override for "/bin/mount" already exists, aborting
  303. [fog;~]-2# dpkg-statoverride --force --add root root 0755 /bin/mount
  304. An override for "/bin/mount" already exists, but --force specified so lets ignore it.
  305. [fog;~]-3# dpkg-statoverride --list /bin/mount
  306. root root 0755 /bin/mount
  307. </programlisting>
  308. </example>
  309. </section>
  310. <section>
  311. <title>Removing overrides</title>
  312. <para>
  313. Overrides can be removed using the <option>--remove</option> option,
  314. which takes a single filename as argument:
  315. </para>
  316. <blockquote><para>
  317. <synopsis><command>dpkg-statoverride</command> <option>--remove</option> <parameter>&lt;file&gt;</parameter></synopsis>
  318. </para></blockquote>
  319. <para>
  320. This will remove the override for <filename>&lt;file&gt;</filename>
  321. from the database.
  322. </para>
  323. <note>
  324. <para>When an override for a file is removed its ownership and permission
  325. are <emphasis>not</emphasis> restored to the original value.
  326. </para>
  327. </note>
  328. <example>
  329. <title>Removing an override</title>
  330. <programlisting>
  331. [fog;~]-1# dpkg-statoverride --list
  332. root root 0755 /bin/mount
  333. [fog;~]-2# dpkg-statoverride --remove /bin/mount
  334. [fog;~]-3# dpkg-statoverride --list
  335. [fog;~]-4#
  336. </programlisting>
  337. </example>
  338. </section>
  339. </section>
  340. </chapter>
  341. <chapter id="formats">
  342. <title>File formats</title>
  343. <para>
  344. This chapter describes all the file formats used by the package tools.
  345. All files are text files which you can view and modify using any normal
  346. text editor if needed.
  347. </para>
  348. <para>
  349. Most file formats are based on the RFC822 format, which is best known
  350. as the format used in e-mail headers.
  351. </para>
  352. <para>
  353. Each format has a version number which indicates the revision of the
  354. format being used. This version is always of the form "X.Y". The
  355. first number (X) is the major version. Within a major version the only
  356. allowed changes in format are the addition of new fields. This guarantees
  357. that tools will always be fully backwards and upwards compatible within
  358. a major version.
  359. </para>
  360. <section>
  361. <title>RFC822</title>
  362. <para>
  363. A RFC822 style messages consists of one or more blocks, seperated by
  364. null lines (an empty line). Each block is made up of fields. Fields
  365. can be folded over multiple lines by inserting a 'newline whitespace'
  366. pair. This combination is interpreted as a single whitespace.
  367. </para>
  368. <para>
  369. Each fiels is a single line consisting of a field-name and a
  370. field-body, seperated by a colon (:). The field-name is made up
  371. from printable ASCII characters minus the colon. The field-body
  372. may be composed of all ASCII characters except CR or LF (they
  373. are automatically removed when unfolding lines).
  374. </para>
  375. <example>
  376. <title>RFC822 style file</title>
  377. <programlisting>
  378. Header: value
  379. Description: this is an example of an RFC822 style message
  380. Section: new
  381. Name: body
  382. Description: this is block 2 of the example
  383. X-Fortune:
  384. To be excellent when engaged in administration is to be like the North
  385. Star. As it remains in its one position, all the other stars surround it.
  386. -- Confucius
  387. </programlisting>
  388. </example>
  389. </section>
  390. <section>
  391. <title>changes file</title>
  392. <para>
  393. The <filename>.changse</filename> file is used to describe a set of
  394. files that is going to be installed in an archive. All files have to
  395. belong to the same source package. The data in a
  396. <filename>changes</filename> include the changes made since the
  397. previous revision, version and architecture information and the list
  398. of files that form the change set along with a checksum
  399. </para>
  400. <para>
  401. Just like other dpkg datafiles this file is formated using RFC822
  402. syntax. In addition the file can signed as an OpenPGP ASCII armored
  403. message (see RFC2440). The table below lists the allowed fields
  404. in a <filename>.dsc</filename> file. The order used is not important,
  405. although <command>dpkg-genchanges</command> will output the fields using
  406. the ordering used in the table.
  407. </para>
  408. <table>
  409. <title>Fields in a <filename>.changes</filename> file</title>
  410. <tgroup cols="2">
  411. <thead>
  412. <row>
  413. <entry>Field</entry>
  414. <entry>Description</entry>
  415. </row>
  416. </thead>
  417. <tbody>
  418. <row>
  419. <entry>Format</entry>
  420. <entry>
  421. Version of the file format used. Currently 1.7.
  422. </entry>
  423. </row>
  424. <row>
  425. <entry>Date</entry>
  426. <entry>
  427. The date (in RFC822 format) when the change set was build.
  428. </entry>
  429. </row>
  430. <row>
  431. <entry>Source</entry>
  432. <entry>
  433. The name of the source package from which the changes were
  434. build.
  435. </entry>
  436. </row>
  437. <row>
  438. <entry>Binary</entry>
  439. <entry>
  440. The binary packages (ie &deb; files) that are part of the
  441. change set.
  442. </entry>
  443. </row>
  444. <row>
  445. <entry>Architecture</entry>
  446. <entry>
  447. A space seperate list of architectures for which files are
  448. included in the set.
  449. </entry>
  450. </row>
  451. <row>
  452. <entry>Version</entry>
  453. <entry>
  454. Version number of the source from which the files were built.
  455. </entry>
  456. </row>
  457. <row>
  458. <entry>Distribution</entry>
  459. <entry>
  460. Distribution in which the changes should be installed, as taken from
  461. <filename>debian/changelog</filename>.
  462. </entry>
  463. </row>
  464. <row>
  465. <entry>Urgency</entry>
  466. <entry>
  467. Urgency of the changes, as taken from
  468. <filename>debian/changelog</filename>.
  469. </entry>
  470. </row>
  471. <row>
  472. <entry>Maintainer</entry>
  473. <entry>
  474. The maintainer of the package, as listed in
  475. <filename>debian/control</filename>.
  476. </entry>
  477. </row>
  478. <row>
  479. <entry>Changed-By</entry>
  480. <entry>
  481. The person who made the last changes to the sources, as
  482. listed in <filename>debian/changelog</filename>.
  483. </entry>
  484. </row>
  485. <row>
  486. <entry>Description</entry>
  487. <entry>
  488. Multi-line field describing the &deb; files in the package.
  489. Each line describes a single package in the format
  490. "packagename - short description".
  491. </entry>
  492. </row>
  493. <row>
  494. <entry>Closes</entry>
  495. <entry>
  496. Space seperate list of bugreports which are closed by this
  497. change set. (Optional)
  498. </entry>
  499. </row>
  500. <row>
  501. <entry>Changes</entry>
  502. <entry>
  503. Multi-line field with the changes made since the previous
  504. version, as taken from <filename>debian/changelog</filename>.
  505. Can possibly mention changes for multiple versions.
  506. </entry>
  507. </row>
  508. <row>
  509. <entry>Files</entry>
  510. <entry>
  511. Multi-line field with the list of files in the change set.
  512. Each line describes a single file in the format "MD5 filesize
  513. filename".
  514. </entry>
  515. </row>
  516. </tbody>
  517. </tgroup>
  518. </table>
  519. </section>
  520. <section>
  521. <title>dsc file</title>
  522. <para>
  523. The <filename>.dsc</filename> file describes the source for a Debian
  524. package: it contains general information over the source such as the
  525. name of the package and which binary package it produces as well as
  526. the files that contain the sourcecode.
  527. </para>
  528. <para>
  529. Just like other dpkg datafiles this file is formated using RFC822
  530. syntax. In addition the file can signed as an OpenPGP ASCII armored
  531. message (see RFC2440). The table below lists the allowed fields
  532. in a <filename>.dsc</filename> file. The order used is not important,
  533. although <command>dpkg-source</command> will output the fields using
  534. the ordering used in the table.
  535. </para>
  536. <table>
  537. <title>Fields in a <filename>.dsc</filename> file</title>
  538. <tgroup cols="2">
  539. <thead>
  540. <row><entry>Field</entry><entry>Description</entry></row>
  541. </thead>
  542. <tbody>
  543. <row><entry>Format</entry>
  544. <entry>Version of the file format used. Currently 1.0.
  545. </entry></row>
  546. <row><entry>Source</entry>
  547. <entry>Name of the source package</entry></row>
  548. <row><entry>Version</entry>
  549. <entry>Version number of the source</entry></row>
  550. <row><entry>Binary</entry>
  551. <entry>comma seperated list of binary packages build from this
  552. source</entry></row>
  553. <row><entry>Origin</entry>
  554. <entry>Name of the organization that procuded this package
  555. </entry></row>
  556. <row><entry>Maintainer</entry>
  557. <entry>Maintainer of this package</entry></row>
  558. <row><entry>Uploaders</entry>
  559. <entry>Multi-line field with list of people authorized to make
  560. uploads of a package (optional)</entry>
  561. <row><entry>Architecture</entry>
  562. <entry>Space seperated list of architectures for which package
  563. are build from this source</entry></row>
  564. <row><entry>Standards-Version</entry>
  565. <entry>Version of &debian; policy this package is complient
  566. with</entry></row>
  567. <row><entry>Files</entry>
  568. <entry>Multi-line field with list of files with the actual source
  569. code</entry></row>
  570. </tbody>
  571. </tgroup>
  572. </table>
  573. <para>
  574. The Files field contains one line for each file that is
  575. contains source for this package (only 2 files are supported: a
  576. <filename>.tar.gz</filename> file with the (original) source, and
  577. an optional <filename>.diff.gz</filename> with Debian changes to the
  578. source). Each file description consists of 3 items, seperated by
  579. a single space:
  580. <orderedlist>
  581. <listitem><para>A MD5 checksum of the file</para></listitem>
  582. <listitem><para>The filesize in bytes</para></listitem>
  583. <listitem><para>The filename</para></listitem>
  584. </orderedlist>
  585. </para>
  586. <example>
  587. <title>modutils .dsc file</title>
  588. <programlisting>
  589. -----BEGIN PGP SIGNED MESSAGE-----
  590. Hash: SHA1
  591. Format: 1.0
  592. Source: modutils
  593. Version: 2.4.1-1
  594. Binary: modutils
  595. Origin: debian
  596. Maintainer: Wichert Akkerman &lt;wakkerma@debian.org&gt;
  597. Architecture: any
  598. Standards-Version: 3.2.0
  599. Files:
  600. 6d69ff476c964e703659d950999e411c 246022 modutils_2.4.1.orig.tar.gz
  601. 3de7100460662472404f8a83cccde6da 17219 modutils_2.4.1-1.diff.gz
  602. -----BEGIN PGP SIGNATURE-----
  603. Version: GnuPG v1.0.4 (GNU/Linux)
  604. Comment: For info see http://www.gnupg.org
  605. iEYEARECAAYFAjpbNIAACgkQPLiSUC+jvC1CFQCePvKBH6qT7/BKXVHCamKXZvZq
  606. Be8An1QDPcyDFtMddYJw/BwTVphbwzU6
  607. =Zl3g
  608. -----END PGP SIGNATURE-----
  609. </programlisting>
  610. </example>
  611. </section>
  612. <section>
  613. <title>control</title>
  614. <table>
  615. <title>Fields in the source section of the <filename>control</filename>
  616. file</title>
  617. <tgroup cols="2">
  618. <thead>
  619. <row><entry>Field</entry>
  620. <entry>required</entry>
  621. <entry>Description</entry>
  622. </row>
  623. </thead>
  624. <tbody>
  625. <row><entry>Source</entry><entry>yes</entry>
  626. <entry>Name of the source package</entry></row>
  627. <row><entry>Section</entry><entry>no</entry>
  628. <entry>Package category for this package, used by frontends.
  629. </entry></row>
  630. <row><entry>Priority</entry><entry>no</entry>
  631. <entry>Indication of package importance. Legal values are
  632. extra, important, optional, required and standard.
  633. </entry></row>
  634. <row><entry>Maintainer</entry><entry>yes</entry>
  635. <entry>Name of the source package</entry></row>
  636. <row><entry>Standards-Version</entry><entry>no</entry>
  637. <entry>Version of &debian; policy this package is complient
  638. with</entry></row>
  639. <row><entry>Build-Depends, Build-Conflicts,
  640. Build-Depends-Indep, Build-Conflicts-Indep</entry><entry>no</entry>
  641. <entry>Specify demands on the build environment</entry></row>
  642. <row><entry>Bugs</entry><entry>no</entry>
  643. <entry>Name of the source package</entry></row>
  644. <row><entry>Origin</entry><entry>no</entry>
  645. <entry>Name of the source package</entry></row>
  646. </tbody>
  647. </tgroup>
  648. </table>
  649. <table>
  650. <title>Fields in the package section of the <filename>control</filename>
  651. file</title>
  652. <tgroup cols="2">
  653. <thead>
  654. <row><entry>Field</entry>
  655. <entry>required</entry>
  656. <entry>Description</entry>
  657. </row>
  658. </thead>
  659. <tbody>
  660. <row><entry>Package</entry><entry>yes</entry>
  661. <entry>Name of the package</entry></row>
  662. <row><entry>Architecture</entry><entry>yes</entry>
  663. <entry>Space seperated list of architectures for which package
  664. are build from this source</entry></row>
  665. <row><entry>Essential</entry><entry>no</entry>
  666. <entry>Indicates if a package is essential to the system
  667. </entry></row>
  668. <row><entry>Pre-Depends, Depends, Recommends, Suggests, Replaces,
  669. Conflicts</entry><entry>no</entry>
  670. <entry>Specify relations to other packages</entry></row>
  671. <row><entry>Description</entry><entry>yes</entry>
  672. <entry>Description of the package</entry></row>
  673. </tbody>
  674. </tgroup>
  675. </table>
  676. </section>
  677. <section>
  678. <title>diversions</title>
  679. <para>
  680. The <filename>diversions</filename> file contains all the alternatives
  681. defined on this system. It is located in the &dpkg; admin directory.
  682. </para>
  683. <note>
  684. <para>
  685. This is an internal &dpkg; file: do not edit it by hand unless really
  686. needed, but use the <command>dpkg-divert</command> tool instead.
  687. </para>
  688. </note>
  689. <para>
  690. For each diversion there are 3 lines in the diversions file:
  691. <orderedlist>
  692. <listitem><para>
  693. The name of the file that will be diverted.
  694. </para></listitem>
  695. <listitem><para>
  696. The filename that the diverted file will be diverted to.
  697. </para></listitem>
  698. <listitem><para>
  699. The name of the package that made this diversion. If it is a
  700. local (ie user) diversion the magic packagename `:' is used
  701. instead.
  702. </para></listitem>
  703. </orderedlist>
  704. </para>
  705. <example>
  706. <title>Example <filename>diversions</filename> file</title>
  707. <programlisting>
  708. /sbin/modprobe
  709. /sbin/modprobe.orig
  710. :
  711. /usr/bin/locate
  712. /usr/bin/locate.notslocate
  713. slocate
  714. </programlisting>
  715. </example>
  716. </section>
  717. <section>
  718. <title>statoverrides</title>
  719. <para>
  720. This file contains the list of all statoverrides that &dpkg; uses
  721. when unpacking packages. It is located in the &dpkg; admin
  722. directory. Each line in the file represents one override, and
  723. comments are not allowed.
  724. </para>
  725. <note>
  726. <para>
  727. This is an internal &dpkg; file: do not edit it by hand unless really
  728. needed, but use the <command>dpkg-statoverride</command> tool instead.
  729. </para>
  730. </note>
  731. <para>
  732. Each line contains 4 items, seperated by whitespace:
  733. <orderedlist>
  734. <listitem><para>
  735. The owner to use. This can be either an accountname that must
  736. be present on the system, or a numerical uid. Uids are prefixed
  737. with a <computeroutput>#</computeroutput>.
  738. </para></listitem>
  739. <listitem><para>
  740. The group to use. This can be either a group that must be present on
  741. the system, or a numerical gid. Gids are prefixed
  742. with a <computeroutput>#</computeroutput>.
  743. </para></listitem>
  744. <listitem><para>
  745. Mode to use for this file. This is an octal number.
  746. </para></listitem>
  747. <listitem><para>
  748. The filesystem object (file, directory, device, FIFO or link)
  749. to which this override should be applied. Since this is the
  750. last item on a line it may contain whitespace.
  751. </para></listitem>
  752. </orderedlist>
  753. </para>
  754. <example>
  755. <title>Example <filename>statoverride</filename> file</title>
  756. <programlisting>
  757. root wheel 04750 /bin/su
  758. root adm 0750 /var/log/apache
  759. </programlisting>
  760. <para>
  761. This will tell &dpkg; to do the following:
  762. </para>
  763. <itemizedlist>
  764. <listitem><para><filename>/bin/su</filename> is installed owned by
  765. user <computeroutput>root</computeroutput> and group
  766. <computeroutput>wheel</computeroutput> with mode 04750. This means
  767. that only people in the <computeroutput>wheel</computeroutput>
  768. group are allowed to run <command>su</command>.
  769. </para></listitem>
  770. <listitem><para><filename>/var/log/apache</filename> is installed
  771. owned by user <computeroutput>root</computeroutput> and group
  772. <computeroutput>adm</computeroutput> with mode 0750. This
  773. restricts the ability to view the
  774. <productname>apache</productname> to people in the
  775. <computeroutput>adm</computeroutput> group by disallowing others
  776. to access the <filename>/var/log/apache</filename> directory.
  777. </para></listitem>
  778. </itemizedlist>
  779. </example>
  780. </section>
  781. <section>
  782. <title>alternatives</title>
  783. <para>
  784. The configuration for alternatives is spread over two places: the
  785. symlink to the selected alternative is stored in /etc/alternatives
  786. and the list of available alternatives is kept in a series of files
  787. in <filename>/var/lib/dpkg/alternatives/</filename>.
  788. </para>
  789. <para>
  790. For each alternative there is a single file in
  791. <filename>/var/lib/dpkg/alternatives/</filename> named after the
  792. the alternative it describes. The file is a normal text file:
  793. </para>
  794. <itemizedlist>
  795. <listitem>
  796. <para>
  797. The first line lists the state of the alternative, either
  798. `manual' or `auto'.
  799. </para>
  800. </listitem>
  801. <listitem>
  802. <para>
  803. The second line is the filename that the alternative will
  804. provide.
  805. </para>
  806. </listitem>
  807. <listitem>
  808. <para>
  809. A list of zero or more slave links. For each slave there are
  810. two lines: the first contains the name of the slave and the
  811. second contains the filename.
  812. </para>
  813. </listitem>
  814. <listitem>
  815. <para>
  816. An empty line
  817. </para>
  818. </listitem>
  819. <listitem>
  820. <para>
  821. A list of one or more alternatives. Each alternative is made up
  822. as follows:
  823. </para>
  824. <itemizedlist>
  825. <listitem>
  826. <para>
  827. The filename of the file providing the alternative.
  828. </para>
  829. </listitem>
  830. <listitem>
  831. <para>
  832. The priority
  833. </para>
  834. </listitem>
  835. <listitem>
  836. <para>
  837. For each slave link a single line with the file providing
  838. the link. An empty line can be used to indicate an
  839. alternative does not provide a slave.
  840. </para>
  841. </listitem>
  842. </itemizedlist>
  843. </listitem>
  844. </itemizedlist>
  845. </section>
  846. </chapter>
  847. </book>
  848. <!-- vi: sw=2 tw=75
  849. -->