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