1MK-ORIGTARGZ(1) MK-ORIGTARGZ(1)
2
3
4
6 mk-origtargz - rename upstream tarball, optionally changing the
7 compression and removing unwanted files
8
10 mk-origtargz [options] foo-1.0.tar.gz
11 mk-origtargz --help
12
14 mk-origtargz renames the given file to match what is expected by dpkg-
15 buildpackage, based on the source package name and version in
16 debian/changelog. It can convert zip to tar, optionally change the
17 compression scheme and remove files according to Files-Excluded and
18 Files-Excluded-component in debian/copyright. The resulting file is
19 placed in debian/../... (In debian/copyright, the Files-Excluded and
20 Files-Excluded-component stanzas are a part of the first paragraph and
21 there is a blank line before the following paragraphs which contain
22 Files and other stanzas. The Files-Included stanza may be used to
23 ignore parts of subdirectories specified by the Files-Excluded stanza
24 See uscan(1) "COPYRIGHT FILE EXAMPLE".)
25
26 The archive type for zip is detected by "file --dereference --brief
27 --mime-type" command. So any zip type archives such as jar are treated
28 in the same way. The xpi archive is detected by its extension and is
29 handled properly using the xpi-unpack command.
30
31 If the package name is given via the --package option, no information
32 is read from debian/, and the result file is placed in the current
33 directory.
34
35 mk-origtargz is commonly called via uscan, which first obtains the
36 upstream tarball.
37
39 Metadata options
40 The following options extend or replace information taken from debian/.
41
42 --package package
43 Use package as the name of the Debian source package, and do not
44 require or use a debian/ directory. This option can only be used
45 together with --version.
46
47 The default is to use the package name of the first entry in
48 debian/changelog.
49
50 -v, --version version
51 Use version as the version of the package. This needs to be the
52 upstream version portion of a full Debian version, i.e. no Debian
53 revision, no epoch.
54
55 The default is to use the upstream portion of the version of the
56 first entry in debian/changelog.
57
58 --exclude-file glob
59 Remove files matching the given glob from the tarball, as if it was
60 listed in Files-Excluded.
61
62 --copyright-file filename
63 Remove files matching the patterns found in filename, which should
64 have the format of a Debian copyright file (Format:
65 https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
66 to be precise). Errors parsing that file are silently ignored,
67 exactly as is the case with debian/copyright.
68
69 Unmatched patterns will emit a warning so the user can verify
70 whether it is correct. If there are multiple patterns which match
71 a file, only the last one will count as being matched.
72
73 Both the --exclude-file and --copyright-file options amend the list
74 of patterns found in debian/copyright. If you do not want to read
75 that file, you will have to use --package.
76
77 --signature signature-mode
78 Set signature-mode:
79
80 0 for no signature
81 1 for normal detached signature
82 2 for signature on decompressed
83 3 for self signature
84 --signature-file signature-file
85 Use signature-file as the signature file corresponding to the
86 Debian source package to create a dpkg-source (post-stretch)
87 compatible signature file. (optional)
88
89 Action options
90 These options specify what exactly mk-origtargz should do. The options
91 --copy, --rename and --symlink are mutually exclusive.
92
93 --symlink
94 Make the resulting file a symlink to the given original file. (This
95 is the default behaviour.)
96
97 If the file has to be modified (because it is a zip, or xpi file,
98 because of --repack or Files-Excluded), this option behaves like
99 --copy.
100
101 --copy
102 Make the resulting file a copy of the original file (unless it has
103 to be modified, of course).
104
105 --rename
106 Rename the original file.
107
108 If the file has to be modified (because it is a zip, or xpi file,
109 because of --repack or Files-Excluded), this implies that the
110 original file is deleted afterwards.
111
112 --repack
113 If the given file is not compressed using the desired format (see
114 --compression), recompress it.
115
116 -S, --repack-suffix suffix
117 If the file has to be modified, because of Files-Excluded, append
118 suffix to the upstream version.
119
120 --force-repack
121 Recompress even if file is compressed using the desired format and
122 no files were deleted.
123
124 -c, --component componentname
125 Use <componentname> as the component name for the secondary
126 upstream tarball. Set componentname as the component name. This
127 is used only for the secondary upstream tarball of the Debian
128 source package. Then packagename_version.orig-componentname.tar.gz
129 is created.
130
131 --compression [ gzip | bzip2 | lzma | xz | default ]
132 The default method is xz. When mk-origtargz is launched in a debian
133 source repository which format is "1.0" or undefined, the method
134 switches to gzip.
135
136 -C, --directory directory
137 Put the resulting file in the given directory.
138
139 --unzipopt options
140 Add the extra options to use with the unzip command such as -a,
141 -aa, and -b.
142
144 uscan(1), uupdate(1)
145
147 mk-origtargz and this manpage have been written by Joachim Breitner
148 <nomeata@debian.org>.
149
150
151
152Debian Utilities 2021-08-19 MK-ORIGTARGZ(1)