1dpkg-source(1)                    dpkg suite                    dpkg-source(1)
2
3
4

NAME

6       dpkg-source - Debian source package (.dsc) manipulation tool
7

SYNOPSIS

9       dpkg-source [option...] command
10

DESCRIPTION

12       dpkg-source packs and unpacks Debian source archives.
13
14       None of these commands allow multiple options to be combined into one,
15       and they do not allow the value for an option to be specified in a
16       separate argument.
17

COMMANDS

19       -x, --extract filename.dsc [output-directory]
20           Extract a source package (--extract since dpkg 1.17.14).  One non-
21           option argument must be supplied, the name of the Debian source
22           control file (.dsc).  An optional second non-option argument may be
23           supplied to specify the directory to extract the source package to,
24           this must not exist. If no output directory is specified, the
25           source package is extracted into a directory named source-version
26           under the current working directory.
27
28           dpkg-source will read the names of the other file(s) making up the
29           source package from the control file; they are assumed to be in the
30           same directory as the .dsc.
31
32           The files in the extracted package will have their permissions and
33           ownerships set to those which would have been expected if the files
34           and directories had simply been created - directories and
35           executable files will be 0777 and plain files will be 0666, both
36           modified by the extractors' umask; if the parent directory is
37           setgid then the extracted directories will be too, and all the
38           files and directories will inherit its group ownership.
39
40           If the source package uses a non-standard format (currently this
41           means all formats except “1.0”), its name will be stored in
42           debian/source/format so that the following builds of the source
43           package use the same format by default.
44
45       -b, --build directory [format-specific-parameters]
46           Build a source package (--build since dpkg 1.17.14).  The first
47           non-option argument is taken as the name of the directory
48           containing the debianized source tree (i.e. with a debian sub-
49           directory and maybe changes to the original files).  Depending on
50           the source package format used to build the package, additional
51           parameters might be accepted.
52
53           dpkg-source will build the source package with the first format
54           found in this ordered list: the format indicated with the --format
55           command line option, the format indicated in debian/source/format,
56           “1.0”.  The fallback to “1.0” is deprecated and will be removed at
57           some point in the future, you should always document the desired
58           source format in debian/source/format. See section SOURCE PACKAGE
59           FORMATS for an extensive description of the various source package
60           formats.
61
62       --print-format directory
63           Print the source format that would be used to build the source
64           package if dpkg-source --build directory was called (in the same
65           conditions and with the same parameters; since dpkg 1.15.5).
66
67       --before-build directory
68           Run the corresponding hook of the source package format (since dpkg
69           1.15.8).  This hook is called before any build of the package
70           (dpkg-buildpackage calls it very early even before debian/rules
71           clean). This command is idempotent and can be called multiple
72           times. Not all source formats implement something in this hook, and
73           those that do usually prepare the source tree for the build for
74           example by ensuring that the Debian patches are applied.
75
76       --after-build directory
77           Run the corresponding hook of the source package format (since dpkg
78           1.15.8).  This hook is called after any build of the package (dpkg-
79           buildpackage calls it last). This command is idempotent and can be
80           called multiple times. Not all source formats implement something
81           in this hook, and those that do usually use it to undo what
82           --before-build has done.
83
84       --commit [directory] ...
85           Record changes in the source tree unpacked in directory (since dpkg
86           1.16.1).  This command can take supplementary parameters depending
87           on the source format.  It will error out for formats where this
88           operation doesn't mean anything.
89
90       -?, --help
91           Show the usage message and exit.  The format specific build and
92           extract options can be shown by using the --format option.
93
94       --version
95           Show the version and exit.
96

OPTIONS

98   Generic build options
99       -ccontrol-file
100           Specifies the main source control file to read information from.
101           The default is debian/control.  If given with relative pathname
102           this is interpreted starting at the source tree's top level
103           directory.
104
105       -lchangelog-file
106           Specifies the changelog file to read information from. The default
107           is debian/changelog.  If given with relative pathname this is
108           interpreted starting at the source tree's top level directory.
109
110       -Fchangelog-format
111           Specifies the format of the changelog. See dpkg-parsechangelog(1)
112           for information about alternative formats.
113
114       --format=value
115           Use the given format for building the source package (since dpkg
116           1.14.17).  It does override any format given in
117           debian/source/format.
118
119       -Vname=value
120           Set an output substitution variable.  See deb-substvars(5) for a
121           discussion of output substitution.
122
123       -Tsubstvars-file
124           Read substitution variables in substvars-file; the default is to
125           not read any file. This option can be used multiple times to read
126           substitution variables from multiple files (since dpkg 1.15.6).
127
128       -Dfield=value
129           Override or add an output control file field.
130
131       -Ufield
132           Remove an output control file field.
133
134       -Zcompression, --compression=compression
135           Specify the compression to use for created tarballs and diff files
136           (--compression since dpkg 1.15.5).  Note that this option will not
137           cause existing tarballs to be recompressed, it only affects new
138           files. Supported values are: gzip, bzip2, lzma and xz.  The default
139           is xz for formats 2.0 and newer, and gzip for format 1.0. xz is
140           only supported since dpkg 1.15.5.
141
142       -zlevel, --compression-level=level
143           Compression level to use (--compression-level since dpkg 1.15.5).
144           As with -Z it only affects newly created files. Supported values
145           are: 1 to 9, best, and fast.  The default is 9 for gzip and bzip2,
146           6 for xz and lzma.
147
148       -i[regex], --diff-ignore[=regex]
149           You may specify a perl regular expression to match files you want
150           filtered out of the list of files for the diff (--diff-ignore since
151           dpkg 1.15.6).  (This list is generated by a find command.) (If the
152           source package is being built as a version 3 source package using a
153           VCS, this can be used to ignore uncommitted changes on specific
154           files. Using -i.* will ignore all of them.)
155
156           The -i option by itself enables this setting with a default regex
157           (preserving any modification to the default regex done by a
158           previous use of --extend-diff-ignore) that will filter out control
159           files and directories of the most common revision control systems,
160           backup and swap files and Libtool build output directories. There
161           can only be one active regex, of multiple -i options only the last
162           one will take effect.
163
164           This is very helpful in cutting out extraneous files that get
165           included in the diff, for example if you maintain your source in a
166           revision control system and want to use a checkout to build a
167           source package without including the additional files and
168           directories that it will usually contain (e.g. CVS/, .cvsignore,
169           .svn/). The default regex is already very exhaustive, but if you
170           need to replace it, please note that by default it can match any
171           part of a path, so if you want to match the begin of a filename or
172           only full filenames, you will need to provide the necessary anchors
173           (e.g. ‘(^|/)’, ‘($|/)’) yourself.
174
175       --extend-diff-ignore=regex
176           The perl regular expression specified will extend the default value
177           used by --diff-ignore and its current value, if set (since dpkg
178           1.15.6).  It does this by concatenating “|regex” to the existing
179           value.  This option is convenient to use in debian/source/options
180           to exclude some auto-generated files from the automatic patch
181           generation.
182
183       -I[file-pattern], --tar-ignore[=file-pattern]
184           If this option is specified, the pattern will be passed to tar(1)'s
185           --exclude option when it is called to generate a .orig.tar or .tar
186           file (--tar-ignore since dpkg 1.15.6).  For example, -ICVS will
187           make tar skip over CVS directories when generating a .tar.gz file.
188           The option may be repeated multiple times to list multiple patterns
189           to exclude.
190
191           -I by itself adds default --exclude options that will filter out
192           control files and directories of the most common revision control
193           systems, backup and swap files and Libtool build output
194           directories.
195
196       Note: While they have similar purposes, -i and -I have very different
197       syntax and semantics. -i can only be specified once and takes a perl
198       compatible regular expression which is matched against the full
199       relative path of each file. -I can specified multiple times and takes a
200       filename pattern with shell wildcards.  The pattern is applied to the
201       full relative path but also to each part of the path individually. The
202       exact semantic of tar's --exclude option is somewhat complicated, see
203       <https://www.gnu.org/software/tar/manual/tar.html#wildcards> for a full
204       documentation.
205
206       The default regex and patterns for both options can be seen in the
207       output of the --help command.
208
209   Generic extract options
210       --no-copy
211           Do not copy original tarballs near the extracted source package
212           (since dpkg 1.14.17).
213
214       --no-check
215           Do not check signatures and checksums before unpacking (since dpkg
216           1.14.17).
217
218       --no-overwrite-dir
219           Do not overwrite the extraction directory if it already exists
220           (since dpkg 1.18.8).
221
222       --require-valid-signature
223           Refuse to unpack the source package if it doesn't contain an
224           OpenPGP signature that can be verified (since dpkg 1.15.0) either
225           with the user's trustedkeys.gpg keyring, one of the vendor-specific
226           keyrings, or one of the official Debian keyrings
227           (/usr/share/keyrings/debian-keyring.gpg,
228           /usr/share/keyrings/debian-nonupload.gpg and
229           /usr/share/keyrings/debian-maintainers.gpg).
230
231       --require-strong-checksums
232           Refuse to unpack the source package if it does not contain any
233           strong checksums (since dpkg 1.18.7).  Currently the only known
234           checksum considered strong is SHA-256.
235
236       --ignore-bad-version
237           Turns the bad source package version check into a non-fatal warning
238           (since dpkg 1.17.7).  This option should only be necessary when
239           extracting ancient source packages with broken versions, just for
240           backwards compatibility.
241
242   Generic general options
243       --threads-max=threads
244           Sets the maximum number of threads allowed for compressors that
245           support multi-threaded operations (since dpkg 1.21.14).
246
247       -q  Sets quiet mode to suppress warnings.
248

SOURCE PACKAGE FORMATS

250       If you don't know what source format to use, you should probably pick
251       either “3.0 (quilt)” or “3.0 (native)”.  See
252       <https://wiki.debian.org/Projects/DebSrc3.0> for information on the
253       deployment of those formats within Debian.
254
255   Format: 1.0
256       A source package in this format consists either of a .orig.tar.gz
257       associated to a .diff.gz or a single .tar.gz (in that case the package
258       is said to be native).  Optionally the original tarball might be
259       accompanied by a detached upstream signature .orig.tar.gz.asc,
260       extraction supported since dpkg 1.18.5.
261
262       Extracting
263
264       Extracting a native package is a simple extraction of the single
265       tarball in the target directory. Extracting a non-native package is
266       done by first unpacking the .orig.tar.gz and then applying the patch
267       contained in the .diff.gz file. The timestamp of all patched files is
268       reset to the extraction time of the source package (this avoids
269       timestamp skews leading to problems when autogenerated files are
270       patched). The diff can create new files (the whole debian directory is
271       created that way) but cannot remove files (empty files will be left
272       over) and cannot create or change symlinks.
273
274       Building
275
276       Building a native package is just creating a single tarball with the
277       source directory. Building a non-native package involves extracting the
278       original tarball in a separate “.orig” directory and regenerating the
279       .diff.gz by comparing the source package directory with the .orig
280       directory.
281
282       Build options (with --build):
283
284       If a second non-option argument is supplied it should be the name of
285       the original source directory or tarfile or the empty string if the
286       package is a Debian-specific one and so has no debianization diffs. If
287       no second argument is supplied then dpkg-source will look for the
288       original source tarfile package_upstream-version.orig.tar.gz or the
289       original source directory directory.orig depending on the -sX
290       arguments.
291
292       -sa, -sp, -sk, -su and -sr will not overwrite existing tarfiles or
293       directories. If this is desired then -sA, -sP, -sK, -sU and -sR should
294       be used instead.
295
296       -sk Specifies to expect the original source as a tarfile, by default
297           package_upstream-version.orig.tar.extension.  It will leave this
298           original source in place as a tarfile, or copy it to the current
299           directory if it isn't already there. The tarball will be unpacked
300           into directory.orig for the generation of the diff.
301
302       -sp Like -sk but will remove the directory again afterwards.
303
304       -su Specifies that the original source is expected as a directory, by
305           default package-upstream-version.orig and dpkg-source will create a
306           new original source archive from it.
307
308       -sr Like -su but will remove that directory after it has been used.
309
310       -ss Specifies that the original source is available both as a directory
311           and as a tarfile. dpkg-source will use the directory to create the
312           diff, but the tarfile to create the .dsc.  This option must be used
313           with care - if the directory and tarfile do not match a bad source
314           archive will be generated.
315
316       -sn Specifies to not look for any original source, and to not generate
317           a diff.  The second argument, if supplied, must be the empty
318           string. This is used for Debian-specific packages which do not have
319           a separate upstream source and therefore have no debianization
320           diffs.
321
322       -sa or -sA
323           Specifies to look for the original source archive as a tarfile or
324           as a directory - the second argument, if any, may be either, or the
325           empty string (this is equivalent to using -sn).  If a tarfile is
326           found it will unpack it to create the diff and remove it afterwards
327           (this is equivalent to -sp); if a directory is found it will pack
328           it to create the original source and remove it afterwards (this is
329           equivalent to -sr); if neither is found it will assume that the
330           package has no debianization diffs, only a straightforward source
331           archive (this is equivalent to -sn).  If both are found then dpkg-
332           source will ignore the directory, overwriting it, if -sA was
333           specified (this is equivalent to -sP) or raise an error if -sa was
334           specified.  -sa is the default.
335
336       --abort-on-upstream-changes
337           The process fails if the generated diff contains changes to files
338           outside of the debian sub-directory (since dpkg 1.15.8).  This
339           option is not allowed in debian/source/options but can be used in
340           debian/source/local-options.
341
342       Extract options (with --extract):
343
344       In all cases any existing original source tree will be removed.
345
346       -sp Used when extracting then the original source (if any) will be left
347           as a tarfile. If it is not already located in the current directory
348           or if an existing but different file is there it will be copied
349           there.  (This is the default).
350
351       -su Unpacks the original source tree.
352
353       -sn Ensures that the original source is neither copied to the current
354           directory nor unpacked. Any original source tree that was in the
355           current directory is still removed.
356
357       All the -sX options are mutually exclusive. If you specify more than
358       one only the last one will be used.
359
360       --skip-debianization
361           Skips application of the debian diff on top of the upstream sources
362           (since dpkg 1.15.1).
363
364   Format: 2.0
365       Extraction supported since dpkg 1.13.9, building supported since dpkg
366       1.14.8.  Also known as wig&pen. This format is not recommended for
367       wide-spread usage, the format “3.0 (quilt)” replaces it.  Wig&pen was
368       the first specification of a new-generation source package format.
369
370       The behaviour of this format is the same as the “3.0 (quilt)” format
371       except that it doesn't use an explicit list of patches. All files in
372       debian/patches/ matching the perl regular expression [\w-]+ must be
373       valid patches: they are applied at extraction time.
374
375       When building a new source package, any change to the upstream source
376       is stored in a patch named zz_debian-diff-auto.
377
378   Format: 3.0 (native)
379       Supported since dpkg 1.14.17.  This format is an extension of the
380       native package format as defined in the 1.0 format. It supports all
381       compression methods and will ignore by default any VCS specific files
382       and directories as well as many temporary files (see default value
383       associated to -I option in the --help output).
384
385   Format: 3.0 (quilt)
386       Supported since dpkg 1.14.17.  A source package in this format contains
387       at least an original tarball (.orig.tar.ext where ext can be gz, bz2,
388       lzma and xz) and a debian tarball (.debian.tar.ext). It can also
389       contain additional original tarballs (.orig-component.tar.ext).
390       component can only contain alphanumeric (‘a-zA-Z0-9’) characters and
391       hyphens (‘-’).  Optionally each original tarball can be accompanied by
392       a detached upstream signature (.orig.tar.ext.asc and
393       .orig-component.tar.ext.asc), extraction supported since dpkg 1.17.20,
394       building supported since dpkg 1.18.5.
395
396       Extracting
397
398       The main original tarball is extracted first, then all additional
399       original tarballs are extracted in subdirectories named after the
400       component part of their filename (any pre-existing directory is
401       replaced). The debian tarball is extracted on top of the source
402       directory after prior removal of any pre-existing debian directory.
403       Note that the debian tarball must contain a debian sub-directory but it
404       can also contain binary files outside of that directory (see
405       --include-binaries option).
406
407       All patches listed in debian/patches/vendor.series or
408       debian/patches/series are then applied, where vendor will be the
409       lowercase name of the current vendor, or debian if there is no vendor
410       defined.  If the former file is used and the latter one doesn't exist
411       (or is a symlink), then the latter is replaced with a symlink to the
412       former.  This is meant to simplify usage of quilt to manage the set of
413       patches.  Vendor-specific series files are intended to make it possible
414       to serialize multiple development branches based on the vendor, in a
415       declarative way, in preference to open-coding this handling in
416       debian/rules.  This is particularly useful when the source would need
417       to be patched conditionally because the affected files do not have
418       built-in conditional occlusion support.  Note however that while dpkg-
419       source parses correctly series files with explicit options used for
420       patch application (stored on each line after the patch filename and one
421       or more spaces), it does ignore those options and always expects
422       patches that can be applied with the -p1 option of patch. It will thus
423       emit a warning when it encounters such options, and the build is likely
424       to fail.
425
426       Note that lintian(1) will emit unconditional warnings when using vendor
427       series due to a controversial Debian specific ruling, which should not
428       affect any external usage; to silence these, the dpkg lintian profile
429       can be used by passing «--profile dpkg» to lintian(1).
430
431       The timestamp of all patched files is reset to the extraction time of
432       the source package (this avoids timestamp skews leading to problems
433       when autogenerated files are patched).
434
435       Contrary to quilt's default behaviour, patches are expected to apply
436       without any fuzz. When that is not the case, you should refresh such
437       patches with quilt, or dpkg-source will error out while trying to apply
438       them.
439
440       Similarly to quilt's default behaviour, the patches can remove files
441       too.
442
443       The file .pc/applied-patches is created if some patches have been
444       applied during the extraction.
445
446       Building
447
448       All original tarballs found in the current directory are extracted in a
449       temporary directory by following the same logic as for the unpack, the
450       debian directory is copied over in the temporary directory, and all
451       patches except the automatic patch (debian-changes-version or debian-
452       changes, depending on --single-debian-patch) are applied. The temporary
453       directory is compared to the source package directory. When the diff is
454       non-empty, the build fails unless --single-debian-patch or
455       --auto-commit has been used, in which case the diff is stored in the
456       automatic patch.  If the automatic patch is created/deleted, it's
457       added/removed from the series file and from the quilt metadata.
458
459       Any change on a binary file is not representable in a diff and will
460       thus lead to a failure unless the maintainer deliberately decided to
461       include that modified binary file in the debian tarball (by listing it
462       in debian/source/include-binaries). The build will also fail if it
463       finds binary files in the debian sub-directory unless they have been
464       allowed through debian/source/include-binaries.
465
466       The updated debian directory and the list of modified binaries is then
467       used to generate the debian tarball.
468
469       The automatically generated diff doesn't include changes on VCS
470       specific files as well as many temporary files (see default value
471       associated to -i option in the --help output). In particular, the .pc
472       directory used by quilt is ignored during generation of the automatic
473       patch.
474
475       Note: dpkg-source --before-build (and --build) will ensure that all
476       patches listed in the series file are applied so that a package build
477       always has all patches applied. It does this by finding unapplied
478       patches (they are listed in the series file but not in
479       .pc/applied-patches), and if the first patch in that set can be applied
480       without errors, it will apply them all. The option --no-preparation can
481       be used to disable this behavior.
482
483       Recording changes
484
485       --commit [directory] [patch-name] [patch-file]
486           Generates a patch corresponding to the local changes that are not
487           managed by the quilt patch system and integrates it in the patch
488           system under the name patch-name. If the name is missing, it will
489           be asked interactively. If patch-file is given, it is used as the
490           patch corresponding to the local changes to integrate. Once
491           integrated, an editor is launched so that you can edit the meta-
492           information in the patch header.
493
494           Passing patch-file is mainly useful after a build failure that pre-
495           generated this file, and on this ground the given file is removed
496           after integration. Note also that the changes contained in the
497           patch file must already be applied on the tree and that the files
498           modified by the patch must not have supplementary unrecorded
499           changes.
500
501           If the patch generation detects modified binary files, they will be
502           automatically added to debian/source/include-binaries so that they
503           end up in the debian tarball (exactly like dpkg-source
504           --include-binaries --build would do).
505
506       Build options
507
508       --allow-version-of-quilt-db=version
509           Allow dpkg-source to build the source package if the version of the
510           quilt metadata is the one specified, even if dpkg-source doesn't
511           know about it (since dpkg 1.15.5.4).  Effectively this says that
512           the given version of the quilt metadata is compatible with the
513           version 2 that dpkg-source currently supports. The version of the
514           quilt metadata is stored in .pc/.version.
515
516       --include-removal
517           Do not ignore removed files and include them in the automatically
518           generated patch.
519
520       --include-timestamp
521           Include timestamp in the automatically generated patch.
522
523       --include-binaries
524           Add all modified binaries in the debian tarball. Also add them to
525           debian/source/include-binaries: they will be added by default in
526           subsequent builds and this option is thus no more needed.
527
528       --no-preparation
529           Do not try to prepare the build tree by applying patches which are
530           apparently unapplied (since dpkg 1.14.18).
531
532       --single-debian-patch
533           Use debian/patches/debian-changes instead of
534           debian/patches/debian-changes-version for the name of the automatic
535           patch generated during build (since dpkg 1.15.5.4).  This option is
536           particularly useful when the package is maintained in a VCS and a
537           patch set can't reliably be generated. Instead the current diff
538           with upstream should be stored in a single patch. The option would
539           be put in debian/source/local-options and would be accompanied by a
540           debian/source/local-patch-header file explaining how the Debian
541           changes can be best reviewed, for example in the VCS that is used.
542
543       --create-empty-orig
544           Automatically create the main original tarball as empty if it's
545           missing and if there are supplementary original tarballs (since
546           dpkg 1.15.6).  This option is meant to be used when the source
547           package is just a bundle of multiple upstream software and where
548           there's no “main” software.
549
550       --no-unapply-patches, --unapply-patches
551           By default, dpkg-source will automatically unapply the patches in
552           the --after-build hook if it did apply them during --before-build
553           (--unapply-patches since dpkg 1.15.8, --no-unapply-patches since
554           dpkg 1.16.5).  Those options allow you to forcefully disable or
555           enable the patch unapplication process. Those options are only
556           allowed in debian/source/local-options so that all generated source
557           packages have the same behavior by default.
558
559       --abort-on-upstream-changes
560           The process fails if an automatic patch has been generated (since
561           dpkg 1.15.8).  This option can be used to ensure that all changes
562           were properly recorded in separate quilt patches prior to the
563           source package build. This option is not allowed in
564           debian/source/options but can be used in
565           debian/source/local-options.
566
567       --auto-commit
568           The process doesn't fail if an automatic patch has been generated,
569           instead it's immediately recorded in the quilt series.
570
571       Extract options
572
573       --skip-debianization
574           Skips extraction of the debian tarball on top of the upstream
575           sources (since dpkg 1.15.1).
576
577       --skip-patches
578           Do not apply patches at the end of the extraction (since dpkg
579           1.14.18).
580
581   Format: 3.0 (custom)
582       Supported since dpkg 1.14.17.  This format is special.  It doesn't
583       represent a real source package format but can be used to create source
584       packages with arbitrary files.
585
586       Build options
587
588       All non-option arguments are taken as files to integrate in the
589       generated source package. They must exist and are preferably in the
590       current directory. At least one file must be given.
591
592       --target-format=value
593           Required. Defines the real format of the generated source package.
594           The generated .dsc file will contain this value in its Format field
595           and not “3.0 (custom)”.
596
597   Format: 3.0 (git)
598       Supported since dpkg 1.14.17.  This format is experimental.
599
600       A source package in this format consists of a single bundle of a git
601       repository .git to hold the source of a package.  There may also be a
602       .gitshallow file listing revisions for a shallow git clone.
603
604       Extracting
605
606       The bundle is cloned as a git repository to the target directory.  If
607       there is a gitshallow file, it is installed as .git/shallow inside the
608       cloned git repository.
609
610       Note that by default the new repository will have the same branch
611       checked out that was checked out in the original source.  (Typically
612       “main”, but it could be anything.)  Any other branches will be
613       available under remotes/origin/.
614
615       Building
616
617       Before going any further, some checks are done to ensure that we don't
618       have any non-ignored uncommitted changes.
619
620       git-bundle(1) is used to generate a bundle of the git repository.  By
621       default, all branches and tags in the repository are included in the
622       bundle.
623
624       Build options
625
626       --git-ref=ref
627           Allows specifying a git ref to include in the git bundle. Use
628           disables the default behavior of including all branches and tags.
629           May be specified multiple times. The ref can be the name of a
630           branch or tag to include. It may also be any parameter that can be
631           passed to git-rev-list(1). For example, to include only the main
632           branch, use --git-ref=main. To include all tags and branches,
633           except for the private branch, use --git-ref=--all
634           --git-ref=^private
635
636       --git-depth=number
637           Creates a shallow clone with a history truncated to the specified
638           number of revisions.
639
640   Format: 3.0 (bzr)
641       Supported since dpkg 1.14.17.  This format is experimental.  It
642       generates a single tarball containing the bzr repository.
643
644       Extracting
645
646       The tarball is unpacked and then bzr is used to checkout the current
647       branch.
648
649       Building
650
651       Before going any further, some checks are done to ensure that we don't
652       have any non-ignored uncommitted changes.
653
654       Then the VCS specific part of the source directory is copied over to a
655       temporary directory. Before this temporary directory is packed in a
656       tarball, various cleanup are done to save space.
657

DIAGNOSTICS

659   no source format specified in debian/source/format
660       The file debian/source/format should always exist and indicate the
661       desired source format. For backwards compatibility, format “1.0” is
662       assumed when the file doesn't exist but you should not rely on this: at
663       some point in the future dpkg-source will be modified to fail when that
664       file doesn't exist.
665
666       The rationale is that format “1.0” is no longer the recommended format,
667       you should usually pick one of the newer formats (“3.0 (quilt)”, “3.0
668       (native)”) but dpkg-source will not do this automatically for you.  If
669       you want to continue using the old format, you should be explicit about
670       it and put “1.0” in debian/source/format.
671
672   the diff modifies the following upstream files
673       When using source format “1.0” it is usually a bad idea to modify
674       upstream files directly as the changes end up hidden and mostly
675       undocumented in the .diff.gz file. Instead you should store your
676       changes as patches in the debian directory and apply them at build-
677       time. To avoid this complexity you can also use the format “3.0
678       (quilt)” that offers this natively.
679
680   cannot represent change to file
681       Changes to upstream sources are usually stored with patch files, but
682       not all changes can be represented with patches: they can only alter
683       the content of plain text files. If you try replacing a file with
684       something of a different type (for example replacing a plain file with
685       a symlink or a directory), you will get this error message.
686
687   newly created empty file file will not be represented in diff
688       Empty files can't be created with patch files. Thus this change is not
689       recorded in the source package and you are warned about it.
690
691   executable mode perms of file will not be represented in diff
692       Patch files do not record permissions of files and thus executable
693       permissions are not stored in the source package. This warning reminds
694       you of that fact.
695
696   special mode perms of file will not be represented in diff
697       Patch files do not record permissions of files and thus modified
698       permissions are not stored in the source package. This warning reminds
699       you of that fact.
700

ENVIRONMENT

702       DPKG_COLORS
703           Sets the color mode (since dpkg 1.18.5).  The currently accepted
704           values are: auto (default), always and never.
705
706       DPKG_NLS
707           If set, it will be used to decide whether to activate Native
708           Language Support, also known as internationalization (or i18n)
709           support (since dpkg 1.19.0).  The accepted values are: 0 and 1
710           (default).
711
712       SOURCE_DATE_EPOCH
713           If set, it will be used as the timestamp (as seconds since the
714           epoch) to clamp the mtime in the tar(5) file entries.
715
716       VISUAL
717       EDITOR
718           Used by the “2.0” and “3.0 (quilt)” source format modules.
719
720       GIT_DIR
721       GIT_INDEX_FILE
722       GIT_OBJECT_DIRECTORY
723       GIT_ALTERNATE_OBJECT_DIRECTORIES
724       GIT_WORK_TREE
725           Used by the “3.0 (git)” source format modules.
726

FILES

728   debian/source/format
729       This file contains on a single line the format that should be used to
730       build the source package (possible formats are described above). No
731       leading or trailing spaces are allowed.
732
733   debian/source/include-binaries
734       This file contains a list of pathnames of binary files (one per line)
735       relative to the source root directory that should be included in the
736       debian tarball.  Leading and trailing spaces are stripped.  Lines
737       starting with ‘#’ are comments and are skipped.  Empty lines are
738       ignored.
739
740   debian/source/options
741       This file contains a list of long options that should be automatically
742       prepended to the set of command line options of a dpkg-source --build
743       or dpkg-source --print-format call. Options like --compression and
744       --compression-level are well suited for this file.
745
746       Each option should be put on a separate line. Empty lines and lines
747       starting with ‘#’ are ignored.  The leading ‘--’ should be stripped and
748       short options are not allowed.  Optional spaces are allowed around the
749=’ symbol and optional quotes are allowed around the value.  Here's an
750       example of such a file:
751
752        # let dpkg-source create a debian.tar.bz2 with maximal compression
753        compression = "bzip2"
754        compression-level = 9
755        # use debian/patches/debian-changes as automatic patch
756        single-debian-patch
757        # ignore changes on config.{sub,guess}
758        extend-diff-ignore = "(^|/)(config.sub|config.guess)$"
759
760       Note: format options are not accepted in this file, you should use
761       debian/source/format instead.
762
763   debian/source/local-options
764       Exactly like debian/source/options except that the file is not included
765       in the generated source package. It can be useful to store a preference
766       tied to the maintainer or to the VCS repository where the source
767       package is maintained.
768
769   debian/source/local-patch-header
770   debian/source/patch-header
771       Free form text that is put on top of the automatic patch generated in
772       formats “2.0” or “3.0 (quilt)”. local-patch-header is not included in
773       the generated source package while patch-header is.
774
775   debian/patches/vendor.series
776   debian/patches/series
777       This file lists all patches that have to be applied (in the given
778       order) on top of the upstream source package. Leading and trailing
779       spaces are stripped.  The vendor will be the lowercase name of the
780       current vendor, or debian if there is no vendor defined.  If the
781       vendor-specific series file does not exist, the vendor-less series file
782       will be used.  Lines starting with ‘#’ are comments and are skipped.
783       Empty lines are ignored.  Remaining lines start with a patch filename
784       (relative to the debian/patches/ directory) up to the first space
785       character or the end of line. Optional quilt options can follow up to
786       the end of line or the first ‘#’ preceded by one or more spaces (which
787       marks the start of a comment up to the end of line).
788

BUGS

790       The point at which field overriding occurs compared to certain standard
791       output field settings is rather confused.
792

SEE ALSO

794       deb-src-control(5), deb-changelog(5), deb-substvars(5), dsc(5).
795
796
797
7981.21.21                           2023-02-25                    dpkg-source(1)
Impressum