dpkg-source.1 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820
  1. .\" Authors: Ian Jackson
  2. .TH DPKG\-SOURCE 1 "January 2000" "Debian Project" "dpkg utilities"
  3. .SH NAME
  4. dpkg\-source, dpkg\-gencontrol, dpkg\-shlibdeps, dpkg\-genchanges,
  5. dpkg\-buildpackage, dpkg\-distaddfile, dpkg\-parsechangelog
  6. \- Debian source package tools
  7. .SH SYNOPSIS
  8. .B dpkg\-source
  9. .BI "\-x " filename .dsc
  10. .br
  11. .B dpkg\-source \-b
  12. .RI [ options "] " directory " [" orig-directory |'']
  13. .br
  14. .B dpkg\-gencontrol
  15. .RI [ options ]
  16. .br
  17. .B dpkg\-shlibdeps
  18. .IR options
  19. .br
  20. .B dpkg\-genchanges
  21. .RI [ options ]
  22. .br
  23. .B dpkg\-buildpackage
  24. .RI [ options ]
  25. .br
  26. .B dpkg\-distaddfile
  27. .RI [ options ] " filename section priority"
  28. .br
  29. .B dpkg\-parsechangelog
  30. .RI [ options ]
  31. .SH DESCRIPTION
  32. .B dpkg\-source
  33. packs and unpacks Debian source archives.
  34. .B dpkg\-gencontrol
  35. reads information from an unpacked Debian source tree and generates a
  36. binary package control file (which defaults to debian/tmp/DEBIAN/control);
  37. it also adds an entry for the binary package to
  38. .BR debian/files .
  39. .B dpkg\-shlibdeps
  40. calculates shared library dependencies for executables named in its
  41. arguments. The dependencies are added to the substitution
  42. variables file
  43. .B debian/substvars
  44. as variable names
  45. .BI shlibs: dependencyfield
  46. where
  47. .I dependencyfield
  48. is a dependency field name. Any other variables starting
  49. .I shlibs:
  50. are removed from the file.
  51. .B dpkg\-shlibdeps
  52. will read shared library dependency information from
  53. .BR debian/shlibs.local ,
  54. .BR /etc/dpkg/shlibs.override ,
  55. the
  56. .B shlibs
  57. control area file of the package containing the file which
  58. .B objdump
  59. reports as satisfying the library dependency, or
  60. .BR /etc/dpkg/shlibs.default .
  61. The first match will be used. See the
  62. .I Debian packaging manual
  63. for details of the format of shared library dependency files.
  64. .B dpkg\-genchanges
  65. reads information from an unpacked and built Debian source tree and
  66. from the files it has generated and generates a Debian upload control
  67. file
  68. .RB ( .changes " file)."
  69. .B dpkg\-buildpackage
  70. is a control script which can be used to help automate the building of
  71. a package.
  72. .B dpkg\-distaddfile
  73. adds an entry for a named file to
  74. .BR debian/files .
  75. .B dpkg\-parsechangelog
  76. reads and parses the changelog of an unpacked Debian source tree and
  77. outputs the information in it to standard output in a machine-readable
  78. form.
  79. None of these commands allow multiple options to be combined into one,
  80. and they do not allow the value for an option to be specified in a
  81. separate argument.
  82. .SH COMMON OPTIONS
  83. Many of these programs share options; these are described here,
  84. together with the programs that accept them.
  85. .TP
  86. .BI \-h
  87. Display the particular program's version and usage message, including
  88. a synopsis of the options it understands. This option is understood
  89. by all the source package tools.
  90. .TP
  91. .BI \-v version
  92. In
  93. .BR dpkg\-buildpackage ", " dpkg\-genchanges " and " dpkg\-parsechangelog
  94. this causes changelog information from all versions strictly later
  95. than
  96. .I version
  97. to be used.
  98. In
  99. .BR dpkg\-gencontrol
  100. it sets the version number of the binary package which will be
  101. generated.
  102. .TP
  103. .BI \-C changesdescription
  104. Read the description of the changes from the file
  105. .I changesdescription
  106. rather than using the information from the source tree's changelog
  107. file. This is understood by
  108. .BR dpkg\-buildpackage " and " dpkg\-genchanges .
  109. .TP
  110. .BI \-m maintaineraddress
  111. Use
  112. .I maintaineraddress
  113. as the name and email address of the maintainer for this package,
  114. rather than using the information from the source tree's control.
  115. This is understood by
  116. .BR dpkg\-buildpackage " and " dpkg\-genchanges .
  117. .TP
  118. .BI \-e maintaineraddress
  119. Use
  120. .I maintaineraddress
  121. as the name and email address of the maintainer for this upload,
  122. rather than using the information from the source tree's changelog.
  123. This is understood by
  124. .BR dpkg\-buildpackage " and " dpkg\-genchanges .
  125. .TP
  126. .BR \-si ", " \-sa ", " \-sd
  127. These options control whether the original source archive is included
  128. in the upload generated by
  129. .BR dpkg\-buildpackage " and " dpkg\-genchanges
  130. if any source is being generated (ie,
  131. .BR \-b " or " \-B
  132. haven't been used).
  133. By default, or if
  134. .B \-si
  135. is specified, the original source will be included if the version
  136. number ends in
  137. .BR \-0 " or " \-1 ,
  138. ie if the Debian revision part of the version number is
  139. .BR 0 " or " 1 .
  140. .B \-sa
  141. forces the inclusion of the original source;
  142. .B \-sd
  143. forces its exclusion and includes only the diff.
  144. .TP
  145. .BI \-V name = value
  146. Set an output substitution variable.
  147. This option is understood by
  148. .BR dpkg\-source ", " dpkg\-gencontrol " and " dpkg\-genchanges .
  149. See below for a discussion of output substitution.
  150. .TP
  151. .BI \-T substvarsfile
  152. Read (or, for
  153. .BR dpkg\-shlibdeps ,
  154. write) substitution variables in
  155. .IR substvarsfile ;
  156. the default is
  157. .BR debian/substvars .
  158. This option is understood by
  159. .BR dpkg\-source ", " dpkg\-gencontrol ", " dpkg\-shlibdeps " and " dpkg\-genchanges .
  160. .TP
  161. .BI \-D field = value
  162. Override or add an output control file field.
  163. This option is understood by
  164. .BR dpkg\-source ", " dpkg\-gencontrol " and " dpkg\-genchanges .
  165. .TP
  166. .BI \-U field
  167. Remove an output control file field.
  168. This option is understood by
  169. .BR dpkg\-source ", " dpkg\-gencontrol " and " dpkg\-genchanges .
  170. .TP
  171. .BR \-b | \-B | \-S
  172. For
  173. .BR dpkg\-genchanges " and " dpkg\-buildpackage
  174. .BR \-b " and " \-B
  175. specify that a binary-only build is taking place.
  176. .B \-b
  177. indicates that no source files are to be built and/or distributed, and
  178. .B \-B
  179. that no architecture-independent binary package files are to be
  180. distributed either.
  181. .B \-S
  182. specifies that only the source should be uploaded and no binary packages
  183. need to be made. The distinction between
  184. .BR \-b " and " \-B
  185. is only used by
  186. .BR dpkg\-buildpackage ;
  187. .B dpkg\-genchanges
  188. just produces a
  189. .B .changes
  190. file for whatever files were produced by the
  191. .B binary\-*
  192. target(s) of the package being built.
  193. .B \-b
  194. tells
  195. .B dpkg\-source
  196. to build a source package (rather than to extract one) - see below.
  197. .TP
  198. .BI \-c controlfile
  199. Specifies the main source control file to read information from. The
  200. default is
  201. .BR debian/control .
  202. This option is understood by
  203. .BR dpkg\-source ", " dpkg\-gencontrol " and " dpkg\-genchanges .
  204. .TP
  205. .BI \-l changelogfile
  206. Specifies the change log file to read information from. The
  207. default is
  208. .BR debian/changelog .
  209. This option is understood by
  210. .BR dpkg\-source ", " dpkg\-gencontrol " and " dpkg\-genchanges .
  211. .TP
  212. .BI \-f fileslistfile
  213. Read or write the list of files to be uploaded here, rather than using
  214. .BR debian/files .
  215. This option is understood by
  216. .BR dpkg\-gencontrol ", " dpkg\-genchanges " and " dpkg\-distaddfile .
  217. .TP
  218. .BI \-F changelogformat
  219. Specifies the format of the changelog. By default the format is read
  220. from a special line near the bottom of the changelog (see the
  221. Debian packaging manual) or failing that defaults to
  222. .BR debian ,
  223. the standard format described in the
  224. .IR "Debian packaging manual" .
  225. This option is understood by
  226. .BR dpkg\-source ", " dpkg\-gencontrol " and " dpkg\-genchanges .
  227. .TP
  228. .BI \-W
  229. This option turns certain errors into warnings. Only dpkg\-source uses
  230. this, but
  231. .BR dpkg\-buildpackage
  232. recognizes it, and passes it thru to
  233. .BR dpkg\-source "."
  234. .TP
  235. .BI \-E
  236. This option negates a previously set
  237. .BR \-W "."
  238. It is currently only understood by
  239. .BR dpkg\-buildpackage " and " dpkg\-source "."
  240. .SH dpkg\-SOURCE OPTIONS
  241. When the common options
  242. .BR \-c " and " \-l
  243. are given with relative pathnames these are interpreted starting at
  244. the source tree's top level directory.
  245. .TP
  246. .B \-x
  247. Extract a source package. One non-option argument should be supplied,
  248. the name of the Debian source control file
  249. .RB ( .dsc ).
  250. No options are useful with
  251. .BR "dpkg\-source \-x" .
  252. .B dpkg\-source
  253. will read the names of the other file(s) making up the source package
  254. from the control file; they are assumed to be in the same directory as
  255. the
  256. .BR .dsc .
  257. The files in the extracted package will have their permissions and
  258. ownerships set to those which would have been expected if the files
  259. and directories had simply been created - directories and executable
  260. files will be 0777 and plain files will be 0666, both modified by the
  261. extractors' umask; if the parent directory is setgid then the
  262. extracted directories will be too, and all the files and directories
  263. will inherit its group ownership.
  264. .TP
  265. .B \-b
  266. Build: pack up a source tree. One or two non-option arguments should
  267. be supplied. The first is taken as the name of the directory
  268. containing the unpacked source tree. If a second argument is supplied
  269. it should be the name of the original source directory or tarfile or
  270. the empty string if the package is a Debian-specific one and so has no
  271. Debianisation diffs. If no second argument is supplied then
  272. .B dpkg\-source
  273. will look for the original source tarfile
  274. .IB package _ upstream-version .orig.tar.gz
  275. or the original source directory
  276. .IB directory .orig
  277. or the empty string (no original source, and so no diff) depending on
  278. the arguments.
  279. .TP
  280. .B \-i[<regexp>]
  281. You may specify a perl regular expression to match files you want
  282. filtered out of the list of files for the diff. (This list is
  283. generated by a find command.) \fB\-i\fR by itself enables the option,
  284. with a default that will filter out control files and directories of the
  285. most common revision control systems, backup and swap files and Libtool
  286. build output directories.
  287. This is very helpful in cutting out extraneous files that get included
  288. in the .diff.gz, (eg: "debian/BUGS_TODO/*" or "debian/RCS/*,v"). For
  289. instance, if you maintain a package that you track via remote CVS,
  290. where you don't have access permissions for commiting the debian
  291. control files and making tags for \fIcvs\-buildpackage(1)\fR, it is
  292. necessary to perform an extra checkout/update into a directory you
  293. keep pristine, to generate the .orig.tar.gz from. That directory will
  294. have CVS/Entries files in it that will contain timestamps that differ
  295. from the ones in your working directory, thus causing them to be
  296. unnecessarily included in every .diff.gz, unless you use the \fB\-i\fR
  297. switch.
  298. .TP
  299. .B \-I<filename>
  300. If this option is specified, the filename will be passed to tar's \-\-exclude
  301. option when it is called to generate a .orig.tar.gz or .tar.gz file. For
  302. example, \-ICVS will make tar skip over CVS directories when generating
  303. a .tar.gz file. The option may be repeated multiple times to list multiple
  304. filenames to exclude.
  305. .TP
  306. .BR \-sa , \-sp , \-su , \-sk , \-sA , \-sP , \-sU , \-sK , \-ss " with " \-b
  307. If
  308. .BR \-sk " or " \-sp
  309. is specified
  310. .B dpkg\-source
  311. expects the original source as a tarfile, by default
  312. .IB package _ upstream-version .orig.tar.gz\fR.
  313. It will leave this original source in place as a tarfile, or copy it
  314. to the current directory if it isn't already there
  315. If
  316. .B \-sp
  317. is used rather than
  318. .B \-sk
  319. it will remove it again afterwards.
  320. If
  321. .BR \-su " or " \-sr
  322. is specified the original source is expected as a directory, by
  323. default
  324. .IB package - upstream-version .orig
  325. and
  326. .B dpkg\-source
  327. will create a new original source archive from it. If
  328. .B \-sr
  329. is used
  330. .B dpkg\-source will remove that directory after it has been used.
  331. If
  332. .B \-ss
  333. is specified
  334. .B dpkg\-source
  335. will expect that the original source is available both as a directory
  336. and as a tarfile. If will use the directory to create the diff, but
  337. the tarfile to create the
  338. .BR .dsc .
  339. This option must be used with care - if the directory and tarfile do
  340. not match a bad source archive will be generated.
  341. If
  342. .B \-sn
  343. is specified
  344. .B dpkg\-source
  345. will not look for any original source, and will not generate a diff.
  346. The second argument, if supplied, must be the empty string. This is
  347. used for Debian-specific packages which do not have a separate
  348. upstream source and therefore have no debianisation diffs.
  349. If
  350. .BR \-sa " or " \-sA
  351. is specified
  352. .B dpkg\-source
  353. will look for the original source archive as a tarfile or as a
  354. directory - the second argument, if any, may be either, or the empty
  355. string (this is equivalent to using
  356. .BR \-sn ).
  357. If a tarfile is found it will unpack it to create the diff and remove
  358. it afterwards (this is equivalent to
  359. .BR \-sp );
  360. if a directory is found it will pack it to create the original source
  361. and remove it afterwards (this is equivalent to
  362. .BR \-sr );
  363. if neither is found it will assume that the package has no
  364. debianisation diffs, only a straightforward source archive (this is
  365. equivalent to
  366. .BR \-sn ).
  367. If both are found then dpkg\-source will ignore the directory,
  368. overwriting it, if
  369. .B \-sA
  370. was specified (this is equivalent to
  371. .BR \-sP )
  372. or raise an error if
  373. .B \-sa
  374. was specified.
  375. .B \-sA
  376. is the default.
  377. .BR \-sa ", " \-sp ", " \-sk ", " \-su " and " \-sr
  378. will not overwrite existing tarfiles or directories. If this is
  379. desired then
  380. .BR \-sA ", " \-sP ", " \-sK ", " \-sU " and " \-sR
  381. should be used instead.
  382. .TP
  383. .BR \-sp , \-su , \-sn " with " \-x
  384. In all cases any existing original source tree will be removed.
  385. If
  386. .B \-sp
  387. is used when extracting then the original source (if any) will be left
  388. as a tarfile. If it is not already located in the current directory
  389. or if an existing but different file is there it will be copied there.
  390. This is the default.
  391. .B \-su
  392. unpacks the original source tree.
  393. .B \-sn
  394. ensures that the original source is neither copied to the current
  395. directory nor unpacked. Any original source tree that was in the
  396. current directory is still removed.
  397. .SH dpkg\-GENCONTROL OPTIONS
  398. .B dpkg\-gencontrol
  399. does not take any non-option arguments.
  400. .TP
  401. .BI \-p package
  402. Generate information for the binary package
  403. .IR package .
  404. If the source control file lists only one binary package then this
  405. option may be omitted; otherwise it is essential to select which
  406. binary package's information to generate.
  407. .TP
  408. .BI \-n filename
  409. Assume the filename of the package will be
  410. .I filename
  411. instead of the normal package_version_arch.deb filename.
  412. .TP
  413. .BR \-is ", " \-ip ", " \-isp
  414. Include the
  415. .BR Section " and " Priority
  416. fields for this package from the main source control file in the
  417. binary package control file being generated. Usually this information
  418. is not included here, but only in the
  419. .B .changes
  420. file.
  421. .B \-isp
  422. includes both fields,
  423. .BR \-is " only the " Section " and " \-ip " only the " Priority .
  424. .TP
  425. .BI \-P packagebuilddir
  426. Tells
  427. .B dpkg\-source
  428. that the package is being built in
  429. .I packagebuilddir
  430. instead of
  431. .BR debian/tmp .
  432. This value is used to find the default value of the
  433. .B Installed\-Size
  434. substitution variable and control file field (using
  435. .BR du ),
  436. and for the default location of the output file.
  437. .TP
  438. .B \-O
  439. Causes the control file to be printed to standard output, rather than
  440. to
  441. .B debian/tmp/DEBIAN/control
  442. (or
  443. .IB packagebuilddir /DEBIAN/control
  444. if
  445. .B \-P
  446. was used).
  447. .SH dpkg\-SHLIBDEPS OPTIONS
  448. .B dpkg\-shlibdeps
  449. interprets non-option arguments as executable names, just as if they'd
  450. been supplied as
  451. .BI \-e executable\fR.
  452. .TP
  453. .BI \-e executable
  454. Include dependencies appropriate for the shared libraries required by
  455. .IR executable .
  456. .TP
  457. .BI \-d dependencyfield
  458. Add dependencies to be added to the control file dependency field
  459. .IR dependencyfield .
  460. (The dependencies for this field are placed in the variable
  461. .BI shlibs: dependencyfield\fR.)
  462. The
  463. .BI \-d dependencyfield
  464. option takes effect for all executables after the option, until the
  465. next
  466. .BI \-d dependencyfield\fR.
  467. The default
  468. .I dependencyfield
  469. is
  470. .BR Depends .
  471. If the same dependency entry (or set of alternatives) appears in more
  472. than one of the recognised dependency field names
  473. .BR Pre\-Depends ", " Depends ", " Recommends ", " Enhances " or " Suggests
  474. then
  475. .B dpkg\-shlibdeps
  476. will automatically remove the dependency from all fields except the
  477. one representing the most important dependencies.
  478. .TP
  479. .BI \-p varnameprefix
  480. Causes substitution variables to start with
  481. .IB varnameprefix :
  482. instead of
  483. .BR shlibs: .
  484. Likewise, any existing substitution variables starting with
  485. .IB varnameprefix :
  486. (rather than
  487. .BR shlibs: )
  488. are removed from the the substitution variables file.
  489. .TP
  490. .BI \-L localshlibsfile
  491. Causes
  492. .B dpkg\-shlibs
  493. to read overriding shared library dependency information from
  494. .I localshlibsfile
  495. instead of
  496. .BR debian/shlibs.local .
  497. .TP
  498. .B \-O
  499. Causes the substitution variable settings to be printed to standard
  500. output, rather than being added to the substitution variables file
  501. .RB ( debian/substvars
  502. by default).
  503. .SH dpkg\-GENCHANGES OPTIONS
  504. .B dpkg\-genchanges
  505. does not take any non-option arguments.
  506. .TP
  507. .BI \-u uploadfilesdir
  508. Look for the files to be uploaded in
  509. .I uploadfilesdir
  510. rather than
  511. .B ..
  512. .RB ( dpkg\-genchanges
  513. needs to find these files so that it can include their sizes and
  514. checksums in the
  515. .B .changes
  516. file).
  517. .TP
  518. .B \-q
  519. Usually
  520. .B dpkg\-genchanges
  521. will produce informative messages on standard error, for example about
  522. how many of the package's source files are being uploaded.
  523. .B \-q
  524. suppresses these messages.
  525. .SH dpkg\-BUILDPACKAGE OPTIONS
  526. .B dpkg\-buildpackage
  527. does not take any non-option arguments.
  528. .TP
  529. .BI \-k key-id
  530. Specify a key-ID to use when signing packages.
  531. .TP
  532. .BI \-r gain-root-command
  533. When
  534. .B dpkg\-buildpackage
  535. needs to execute part of the build process as root, it prefixes the
  536. command it executes with
  537. .I gain-root-command
  538. if one has been specified.
  539. .I gain-root-command
  540. should be the name of a program on the
  541. .B PATH
  542. and will get as arguments the name of the real command to run and the
  543. arguments it should take.
  544. .I gain-root-command
  545. should not contain spaces or any other shell metacharacters.
  546. .\" what happens, if it contains spaces? (hs)
  547. .I gain-root-command
  548. might typically be
  549. .BR fakeroot ", " sudo ", " super " or " really .
  550. .B su
  551. is not suitable, since it requires a
  552. .B \-c
  553. option to run a command and even then it can only invoke the user's
  554. shell with
  555. .B \-c
  556. instead of passing arguments individually to the command to be run.
  557. .TP
  558. .BI \-p sign-command
  559. When
  560. .B dpkg\-buildpackage
  561. needs to execute GPG or PGP to sign a source control
  562. .RB ( .dsc )
  563. file or a
  564. .B .changes
  565. file it will run
  566. .I sign-command
  567. (searching the
  568. .B PATH
  569. if necessary) instead of
  570. .BR pgp .
  571. .I sign-command
  572. will get all the arguments that
  573. .B pgp
  574. would have gotten. If
  575. .I sign-command
  576. takes its arguments in GPG rather than PGP style, you should give
  577. the
  578. .B \-sgpg
  579. option.
  580. .I sign-command
  581. should not contain spaces or any other shell metacharacters.
  582. .TP
  583. .B \-tc
  584. Clean the source tree (using
  585. .I gain-root-command
  586. .BR "debian/rules clean" )
  587. after the package has been built.
  588. .TP
  589. .BR \-us ", " \-uc
  590. Do not sign the source package or the .changes file, respectively.
  591. .TP
  592. .BI \-a architecture
  593. Specify the Debian architecture we build for. The architecture of the
  594. machine we build on is determined automatically, and is also the default
  595. for the host machine.
  596. .TP
  597. .B \-i[<regexp>]
  598. Passed unchanged to
  599. .BR dpkg\-source .
  600. .TP
  601. .B \-I<filename>
  602. Passed unchanged to
  603. .BR dpkg\-source .
  604. May be repeated multiple times.
  605. .TP
  606. .B \-D
  607. Check build dependencies and conflicts; abort if unsatisfied.
  608. .TP
  609. .B \-d
  610. Do not check build dependencies and conflicts.
  611. .TP
  612. .B \-nc
  613. Do not clean the source tree(implies \-b).
  614. .SH dpkg\-DISTADDFILE ARGUMENTS
  615. .B dpkg\-distaddfile
  616. does not take any non-common options. It takes three non-option
  617. arguments, the filename and the section and priority for the
  618. .B .changes
  619. file.
  620. The filename should be specified relative to the directory where
  621. .B dpkg\-genchanges
  622. will expect to find the files, usually
  623. .BR .. ,
  624. rather than being a pathname relative to the current directory when
  625. .B dpkg\-distaddfile
  626. is run.
  627. .SH dpkg\-PARSECHANGELOG ARGUMENTS
  628. .B dpkg\-parsechangelog
  629. does not take any non-common options or non-option arguments.
  630. .SH VARIABLE SUBSTITUTION
  631. Before
  632. .BR dpkg\-source ", " dpkg\-gencontrol " and " dpkg\-genchanges
  633. write their control information (to the source control file
  634. .B .dsc
  635. for
  636. .B dpkg\-source
  637. and to standard output for
  638. .BR dpkg\-gencontrol " and " dpkg\-genchanges )
  639. they perform some variable substitutions on the output file.
  640. A variable substitution has the form
  641. .BI ${ variable-name }\fR.
  642. Variable names consist of alphanumerics, hyphens and colons and start
  643. with an alphanumeric. Variable substitutions are performed repeatedly
  644. until none are left; the full text of the field after the substitution
  645. is rescanned to look for more substitutions.
  646. After all the substitutions have been done each occurence of the
  647. string
  648. .B ${}
  649. (which is not a legal substitution) is replaced with a
  650. .B $
  651. sign.
  652. Variables can be set using the
  653. .B \-V
  654. common option. They can be also specified in the file
  655. .B debian/substvars
  656. (or whatever other file is specified using the
  657. .B \-T
  658. option). This file consists of lines of the form
  659. .IB name = value\fR.
  660. Trailing whitespace on each line, blank lines, and
  661. lines starting with a
  662. .B #
  663. symbol (comments) are ignored.
  664. Additionally, the following standard variables are available:
  665. .TP
  666. .BI Arch
  667. The current build architecture (from
  668. .BR "dpkg \-\-print\-architecture" ).
  669. .TP
  670. .B Source\-Version
  671. The source package version (from the changelog file).
  672. .TP
  673. .B Installed\-Size
  674. The total size of the package's installed files. This value is copied
  675. into the corresponding control file field; setting it will modify the
  676. value of that field. If this variable isn't set
  677. .B dpkg\-gencontrol
  678. will use
  679. .B du \-k debian/tmp
  680. to find the default value.
  681. .TP
  682. .B Extra\-Size
  683. Additional disk space used when the package is installed. If this
  684. variable is set its value is added to that of the
  685. .B Installed\-Size
  686. variable (whether set explicitly or using the default value) before it
  687. is copied into the
  688. .B Installed\-Size
  689. control file field.
  690. .TP
  691. .BI F: fieldname
  692. The value of the output field
  693. .IR fieldname
  694. (which must be given in the canonical capitalisation). Setting these
  695. variables has no effect other than on places where they are expanded
  696. explicitly.
  697. .TP
  698. .B Format
  699. The
  700. .B .changes
  701. file format version generated by this version of the source packaging
  702. scripts. If you set this variable the contents of the
  703. .B Format
  704. field in the
  705. .B .changes
  706. file will change too.
  707. .TP
  708. .BR Newline ", " Space ", " Tab
  709. These variables each hold the corresponding character.
  710. .TP
  711. .BI shlibs: dependencyfield
  712. Variable settings with names of this form are generated by
  713. .B dpkg\-shlibdeps
  714. - see above.
  715. .LP
  716. If a variable is referred to but not defined it generates a warning
  717. and an empty value is assumed.
  718. .SH FILES
  719. .TP
  720. .B debian/control
  721. The main source control information file, giving version-independent
  722. information about the source package and the binary packages it can
  723. produce.
  724. .TP
  725. .B debian/changelog
  726. The changelog file, used to obtain version-dependent information about
  727. the source package, such as the urgency and distribution of an upload,
  728. the changes made since a particular release, and the source version
  729. number itself.
  730. .TP
  731. .B debian/files
  732. The list of generated files which are part of the upload being
  733. prepared.
  734. .B dpkg\-gencontrol
  735. adds the presumed filenames of binary packages whose control files it
  736. generates here;
  737. .B dpkg\-distaddfile
  738. can be used to add additional files.
  739. .B dpkg\-genchanges
  740. reads the data here when producing a
  741. .B .changes
  742. file.
  743. .TP
  744. .B debian/substvars
  745. List of substitution variables and values.
  746. .TP
  747. .B debian/shlibs.local
  748. Package-local overriding shared library dependency information.
  749. .TP
  750. .B /etc/dpkg/shlibs.override
  751. Per-system overriding shared library dependency information.
  752. .TP
  753. .B /etc/dpkg/shlibs.default
  754. Per-system default shared library dependency information.
  755. .SH BUGS
  756. The point at which field overriding occurs compared to certain
  757. standard output field settings is rather confused.
  758. The binary package entries in the
  759. .B debian/files
  760. file will be passed through variable substitution twice. This should
  761. not matter, since
  762. .BR $ ", " { " and " }
  763. are not legal in package names or version numbers.
  764. It should be possible to specify spaces and shell metacharacters in
  765. and initial arguments for
  766. .IR gain-root-command " and " sign-command .
  767. .SH SEE ALSO
  768. .IR "Debian packaging manual" ,
  769. .br
  770. .IR "Debian policy manual" ,
  771. .br
  772. .BR dpkg\-deb (1),
  773. .BR dpkg (8),
  774. .BR dselect (8),
  775. .BR gpg (1),
  776. .BR pgp (1).
  777. .SH AUTHOR
  778. The utilities and this manpage were written by Ian Jackson.
  779. .SH COPYRIGHT
  780. Copyright (C) 1995-1996 Ian Jackson
  781. .br
  782. Copyright (C) 2000 Wichert Akkerman
  783. .br
  784. This is free software; see the GNU General Public Licence version 2 or later
  785. for copying conditions. There is NO WARRANTY. See
  786. .B /usr/share/doc/dpkg/copyright
  787. and
  788. .B /usr/share/common\-licenses/GPL
  789. for details.