1ORIGTARGZ(1) ORIGTARGZ(1)
2
3
4
6 origtargz - fetch the orig tarball of a Debian package from various
7 sources, and unpack it
8
10 origtargz [OPTIONS] [--unpack[=no|once|yes]]
11 origtargz --help
12
14 origtargz downloads the orig tarball of a Debian package, and also
15 unpacks it into the current directory, if it just contains a debian
16 directory. The main use for origtargz is with debian-dir-only
17 repository checkouts, but it is useful as a general tarball download
18 wrapper. The version number for the tarball to be downloaded is
19 determined from debian/changelog. It should be invoked from the top
20 level directory of an unpacked Debian source package.
21
22 Various download locations are tried:
23
24 · First, an existing file is looked for.
25
26 · Directories given with --path are searched.
27
28 · pristine-tar is tried.
29
30 · apt-get source is tried when apt-cache showsrc reports a matching
31 version.
32
33 · Finally, uscan --download --download-current-version is tried.
34
35 When asked to unpack the orig tarball, origtargz will remove all files
36 and directories from the current directory, except the debian
37 directory, and the VCS repository directories. Note that this will drop
38 all non-committed changes for the patch system in use (e.g. source
39 format "3.0 (quilt)"), and will even remove all patches from the
40 package when no patch system is in use (the original "1.0" source
41 format). Some VCS control files outside debian/ preserved
42 (.bzr-builddeb, .bzr-ignore, .gitignore, .hgignore), if stored in VCS.
43
44 The default behavior is to unpack the orig tarball if the current
45 directory is empty except for a debian directory and the VCS files
46 mentioned above.
47
49 Despite origtargz being called "targz", it will work with any
50 compression scheme used for the tarball.
51
52 A similar tool to unpack orig tarballs is uupdate(1). uupdate creates a
53 new working directory, unpacks the tarball, and applies the Debian
54 .diff.gz changes. In contrast, origtargz uses the current directory,
55 keeping VCS metadata.
56
57 For Debian package repositories that keep the full upstream source,
58 other tools should be used to upgrade the repository from the new
59 tarball. See gbp-import-orig(1) and svn-upgrade(1) for examples.
60 origtargz is still useful for downloading the current tarball.
61
63 -p, --path directory
64 Add directory to the list of locations to search for an existing
65 tarball. When found, a hardlink is created if possible, otherwise
66 a symlink.
67
68 -u, --unpack[=no|once|yes]
69 Unpack the downloaded orig tarball to the current directory,
70 replacing everything except the debian directory. Existing files
71 are removed, except for debian/ and VCS files. Preserved are: .bzr,
72 .bzrignore, .bzr-builddeb, .git, .gitignore, .hg, .hgignore, _darcs
73 and .svn.
74
75 no Do not unpack the orig tarball.
76
77 once (default when --unpack is not used)
78 If the current directory contains only a debian directory (and
79 possibly some dotfiles), unpack the orig tarball. This is the
80 default behavior.
81
82 yes (default for --unpack without argument)
83 Always unpack the orig tarball.
84
85 -d, --download-only
86 Alias for --unpack=no.
87
88 -t, --tar-only
89 When using apt-get source, pass --tar-only to it. The default is to
90 download the full source package including .dsc and .diff.gz or
91 .debian.tar.gz components so debdiff can be used to diff the last
92 upload to the next one. With --tar-only, only download the
93 .orig.tar.* file.
94
95 --clean
96 Remove existing files as with --unpack. Note that like --unpack,
97 this will remove upstream files even if they are stored in VCS.
98
100 debcheckout(1), gbp-import-orig(1), pristine-tar(1), svn-upgrade(1),
101 uupdate(1)
102
104 origtargz and this manpage have been written by Christoph Berg
105 <myon@debian.org>.
106
107
108
109Debian Utilities 2020-07-27 ORIGTARGZ(1)