dpkg-source.1 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405
  1. .\" Hey, Emacs! This is an -*- nroff -*- source file.
  2. .\" Authors: Ian Jackson
  3. .TH DPKG\-SOURCE 1 "7th Auguest" "Debian Project" "Debian GNU/Linux manual"
  4. .SH NAME
  5. dpkg\-source, dpkg\-gencontrol, dpkg\-genchanges,
  6. dpkg\-buildpackage, dpkg\-distaddfile, dpkg\-parsechangelog
  7. \- Debian source package tools
  8. .SH SYNOPSIS
  9. .B dpkg-source
  10. .BI "-x " filename .dsc
  11. .br
  12. .B dpkg-source -b
  13. .RI [ options "] " directory " [" orig-directory |'']
  14. .br
  15. .B dpkg-gencontrol
  16. .RI [ options ]
  17. .br
  18. .B dpkg-genchanges
  19. .RI [ options ]
  20. .br
  21. .B dpkg-buildpackage
  22. .RI [ options ]
  23. .br
  24. .B dpkg-distaddfile
  25. .RI [ options ] " filename section priority"
  26. .br
  27. .B dpkg-parsechangelog
  28. .RI [ options ]
  29. .SH DESCRIPTION
  30. .B dpkg-source
  31. packs and unpacks Debian source archives.
  32. .B dpkg-gencontrol
  33. reads information from an unpacked Debian source tree and generates a
  34. binary package control file on standard output; it also adds an entry
  35. for the binary package to
  36. .BR debian/files .
  37. .B dpkg-genchanges
  38. reads information from an unpacked and built Debian source tree and
  39. from the files it has generated and generates a Debian upload control
  40. file
  41. .RB ( .changes " file)."
  42. .B dpkg-buildpackage
  43. Is a control script which can be used to help automate the building of
  44. a package.
  45. .B dpkg-distaddfile
  46. adds an entry for a named file to
  47. .BR debian/files .
  48. .B dpkg-parsechangelog
  49. reads and parses the changelog of an unpacked Debian source tree and
  50. outputs the information in it to standard output in a machine-readable
  51. form.
  52. None of these commands allow multiple options to be combined into one,
  53. and they do not allow the value for an option to be specified in a
  54. separate argument.
  55. .SH COMMON OPTIONS
  56. Many of these programs share options; these are described here,
  57. together with the programs that accept them.
  58. .TP
  59. .BI -h
  60. Display the particular program's version and usage message, including
  61. a synopsis of the options it understands. This option is understood
  62. by all the source package tools.
  63. .TP
  64. .BI -v version
  65. In
  66. .BR dpkg-genchanges " and " dpkg-parsechangelog
  67. this causes changelog information from all versions strictly later
  68. than
  69. .I version
  70. (which must appear in the changelog file) to be used.
  71. In
  72. .BR dpkg-gencontrol
  73. it sets the version number of the binary package which will be
  74. generated.
  75. .TP
  76. .BI -V name = value
  77. Set an output substitution variable.
  78. This option is understood by
  79. .BR dpkg-source ", " dpkg-gencontrol " and " dpkg-genchanges .
  80. See below for a discussion of output substitution.
  81. .TP
  82. .BI -T substvarsfile
  83. Read substitution variables from
  84. .IR substvarsfile ;
  85. the default is
  86. .BR debian/substvars .
  87. This option is understood by
  88. .BR dpkg-source ", " dpkg-gencontrol " and " dpkg-genchanges .
  89. .TP
  90. .BI -D field = value
  91. Override or add an output control file field.
  92. This option is understood by
  93. .BR dpkg-source ", " dpkg-gencontrol " and " dpkg-genchanges .
  94. .TP
  95. .BI -U field
  96. Remove an output control file field.
  97. This option is understood by
  98. .BR dpkg-source ", " dpkg-gencontrol " and " dpkg-genchanges .
  99. .TP
  100. .BR -b | -B
  101. For
  102. .BR dpkg-genchanges " and " dpkg-buildpackage
  103. this specifies that a binary-only build is taking place.
  104. .B -b
  105. indicates that no source files are to be built and/or distributed, and
  106. .B -B
  107. that no architecture-independent binary package files are to be
  108. distributed either.
  109. .B -b
  110. tells
  111. .B dpkg-source
  112. to build a source package (rather than to extract one) - see below.
  113. .TP
  114. .BI -c controlfile
  115. Specifies the main source control file to read information from. The
  116. default is
  117. .BR debian/control .
  118. This option is understood by
  119. .BR dpkg-source ", " dpkg-gencontrol " and " dpkg-genchanges .
  120. .TP
  121. .BI -l changelogfile
  122. Specifies the change log file to read information from. The
  123. default is
  124. .BR debian/changelog .
  125. This option is understood by
  126. .BR dpkg-source ", " dpkg-gencontrol " and " dpkg-genchanges .
  127. .TP
  128. .BI -f fileslistfile
  129. Read or write the list of files to be uploaded here, rather than using
  130. .BR debian/files .
  131. This option is understood by
  132. .BR dpkg-gencontrol ", " dpkg-genchanges " and " dpkg-distaddfile .
  133. .TP
  134. .BI -F changelogformat
  135. Specifies the format of the changelog. By default the format is read
  136. from a special line near the bottom of the changelog (see the
  137. programmers' manual) or failing that defaults to
  138. .BR debian ,
  139. the standard format described in the
  140. .IR "dpkg programmers' manual" .
  141. This option is understood by
  142. .BR dpkg-source ", " dpkg-gencontrol " and " dpkg-genchanges .
  143. .SH DPKG-SOURCE OPTIONS
  144. .TP
  145. .B -x
  146. Extract a source package. One non-option argument should be supplied,
  147. the name of the Debian source control file
  148. .RB ( .dsc ).
  149. No options are useful with
  150. .BR "dpkg-source -x" .
  151. .B dpkg-source
  152. will read the names of the other file(s) making up the source package
  153. from the control file; they are assumed to be in the same directory as
  154. the
  155. .BR .dsc .
  156. .TP
  157. .B -b
  158. Build: pack up a source tree. One or two non-option arguments should
  159. be supplied. The first is taken as the name of the directory
  160. containing the unpacked source tree. If a second argument is supplied
  161. it should either be the name of the original source directory or the
  162. empty string if the package is a Debian-specific one and so has no
  163. Debianisation diffs. If no second argument is supplied then
  164. .B dpkg-source
  165. will assume the directory
  166. .IB directory .orig
  167. if exists or the empty string (no original source, and so no diff) if
  168. it doesn't.
  169. .SH DPKG-GENCONTROL OPTIONS
  170. .B dpkg-gencontrol
  171. does not take any non-option arguments.
  172. .TP
  173. .BI -p package
  174. Generate information for the binary package
  175. .IR package .
  176. If the source control file lists several binary packages then this
  177. option may be omitted; otherwise it is essential to select which
  178. binary package's information to generate.
  179. .TP
  180. .BR -is ", " -ip ", " -isp
  181. Include the
  182. .BR Section " and " Priority
  183. fields for this package from the main source control file in the
  184. binary package control file being generated. Usually this information
  185. is not included here, but only in the
  186. .B .changes
  187. file.
  188. .B -isp
  189. includes both fields,
  190. .BR -is " only the " Section " and " -ip " only the " Priority .
  191. .SH DPKG-GENCHANGES OPTIONS
  192. .B dpkg-gencontrol
  193. does not take any non-option arguments.
  194. .TP
  195. .BI -d changesdescription
  196. Read the description of the changes from the file
  197. .I changesdescription
  198. rather than using the information from the source tree's changelog
  199. file.
  200. .TP
  201. .BI -m maintaineraddress
  202. Use
  203. .I maintaineraddress
  204. as the name and email address of the maintainer for this upload,
  205. rather than using the information from the source tree's changelog.
  206. .TP
  207. .BI -u uploadfilesdir
  208. Look for the files to be uploaded in
  209. .I uploadfilesdir
  210. rather than
  211. .B ..
  212. .RB ( dpkg-genchanges
  213. needs to find these files so that it can include their sizes and
  214. checksums in the
  215. .B .changes
  216. file).
  217. .SH DPKG-BUILDPACKAGE OPTIONS
  218. .B dpkg-buildpackage
  219. does not take any non-option arguments.
  220. .TP
  221. .BI -r gain-root-command
  222. When
  223. .B dpkg-buildpackage
  224. needs to execute part of the build process as root, it prefixes the
  225. command it executes with
  226. .I gain-root-command
  227. if one has been specified.
  228. .I gain-root-command
  229. should be the name of a program on the
  230. .B PATH
  231. and will get as arguments the name of the real command to run and the
  232. arguments it should take.
  233. .I gain-root-command
  234. should not contain spaces or any other shell metacharacters.
  235. .TP
  236. .BI -p pgp-command
  237. When
  238. .B dpkg-buildpackage
  239. needs to execute PGP to sign a source control
  240. .RB ( .dsc )
  241. file or a
  242. .B .changes
  243. file it will run
  244. .I pgp-command
  245. (searching the
  246. .B PATH
  247. if necessary) instead of
  248. .BR pgp .
  249. .I pgp-command
  250. will get all the arguments that
  251. .B pgp
  252. would have done.
  253. .I pgp-command
  254. should not contain spaces or any other shell metacharacters.
  255. .TP
  256. .BR -us ", " -uc
  257. Do not PGP-sign the source package or the changelog, respectively.
  258. .SH DPKG-DISTADDFILE ARGUMENTS
  259. .B dpkg-distaddfile
  260. does not take any non-common options. It takes three non-option
  261. arguments, the filename and the section and priority for the
  262. .B .changes
  263. file.
  264. The filename should be specified relative to the directory where
  265. .B dpkg-genchanges
  266. will expect to find the files, usually
  267. .BR .. ,
  268. rather than being a pathname relative to the current directory when
  269. .B dpkg-distaddfile
  270. is run.
  271. .SH DPKG-PARSECHANGELOG ARGUMENTS
  272. .B dpkg-parsechangelog
  273. does not take any non-common options or non-option arguments.
  274. .SH VARIABLE SUBSTITUTION
  275. Before
  276. .BR dpkg-source ", " dpkg-gencontrol " and " dpkg-genchanges
  277. write their control information (to the source control file
  278. .B .dsc
  279. for
  280. .B dpkg-source
  281. and to standard output for
  282. .BR dpkg-gencontrol " and " dpkg-genchanges )
  283. they perform some variable substitutions on the output file.
  284. A variable substitution has the form
  285. .BI ${ variable-name }\fR.
  286. Variable substitutions are performed repeatedly until none are left;
  287. the full text of the field after the substitution is rescanned to look
  288. for more substitutions.
  289. After all the substitutions have been done each occurence of the
  290. string
  291. .B ${}
  292. (which is not a legal substitution) is replaced with a
  293. .B $
  294. sign.
  295. Variables whose names consist entirely of alphanumerics can be set
  296. using the
  297. .B -V
  298. common option.
  299. They can be also specified in the file
  300. .B debian/substvars
  301. (or whatever other file is specified using the
  302. .B -T
  303. option). This file consists of lines of the form
  304. .IB name = value
  305. (where
  306. .B name
  307. is a string of alphanumerics). Trailing whitespace on each line,
  308. blank lines, and lines starting with a
  309. .B #
  310. symbol (comments) are ignored.
  311. Additionally, the following standard variables are available:
  312. .TP
  313. .BI arch
  314. The current build architecture (from
  315. .BR "dpkg \-\-print-architecture" ).
  316. .TP
  317. .B sourceversion
  318. The source package version (from the changelog file).
  319. .TP
  320. .BI f: fieldname
  321. The value of the output field
  322. .IR fieldname .
  323. .TP
  324. .B Format
  325. The
  326. .B .changes
  327. file format version generated by this version of the source packaging
  328. scripts. If you set this variable the contents of the
  329. .B Format
  330. field in the
  331. .B .changes
  332. file will change too.
  333. .TP
  334. .BR newline ", " space ", " tab
  335. These variables each hold the corresponding character.
  336. If a variable is referred to but not defined it generates a warning
  337. and an empty value is assumed.
  338. .SH FILES
  339. .TP
  340. .B debian/control
  341. The main source control information file, giving version-independent
  342. information about the source package and the binary packages it can
  343. produce.
  344. .TP
  345. .B debian/changelog
  346. The changelog file, used to obtain version-dependent information about
  347. the source package, such as the urgency and distribution of an upload,
  348. the changes made since a particular release, and the source version
  349. number itself.
  350. .TP
  351. .B debian/files
  352. The list of generated files which are part of the upload being
  353. prepared.
  354. .B dpkg-gencontrol
  355. adds the presumed filenames of binary packages whose control files it
  356. generates here;
  357. .B dpkg-distaddfile
  358. can be used to add additional files.
  359. .B dpkg-genchanges
  360. reads the data here when producing a
  361. .B .changes
  362. file.
  363. .TP
  364. .B debian/substvars
  365. List of substitution variables and values.
  366. .SH BUGS
  367. The point at which field overriding occurs compared to certain
  368. standard output field settings is rather confused.
  369. The binary package entries in the
  370. .B debian/files
  371. file will be passed through variable substitution twice. This should
  372. not matter, since
  373. .BR $ ", " { " and " }
  374. are not legal in package names or version numbers.
  375. .SH SEE ALSO
  376. .IR "dpkg programmers' manual" ,
  377. .IR "Debian policy manual" ,
  378. .BR dpkg\-deb (8),
  379. .BR dpkg (8),
  380. .BR dselect (8).
  381. .SH AUTHOR
  382. The utilities and this manpage were written by Ian Jackson. They are
  383. Copyright (C)1995-1996 by him and released under the GNU General
  384. Public Licence; there is NO WARRANTY. See
  385. .B /usr/doc/copyright/dpkg
  386. and
  387. .B /usr/doc/copyright/GPL
  388. for details.