MK-ORIGTARGZ(1)
π MK-ORIGTARGZ π
okay bestie, welcome to mk-origtargz(1) β the girl whose whole job is renaming your upstream tarball so dpkg-buildpackage doesn't side-eye you. she can also β¨change the compressionβ¨ and β¨yeet unwanted filesβ¨, no cap.
β¨ SYNOPSIS β¨
mk-origtargz [options] foo-1.0.tar.gz
mk-origtargz --help
π¦ DESCRIPTION π¦
So here's the vibe: mk-origtargz takes the file you hand her and renames it to match whatever dpkg-buildpackage is expecting, based on the source package name and version she finds in debian/changelog. Iconic behavior, honestly.
She can do a whole glow-up on your archive:
- convert
ziptotarπ - optionally switch up the compression scheme
- remove files according to
Files-ExcludedandFiles-Excluded-componentindebian/copyright
And where does the resulting file go? Into debian/../... π
Little side note on the debian/copyright situation, because it's giving specific: the Files-Excluded and Files-Excluded-component stanzas are part of the first paragraph, and there's a blank line before the following paragraphs, which contain Files and other stanzas. Also, the Files-Included stanza can be used to ignore parts of subdirectories specified by the Files-Excluded stanza. Go read uscan(1), section "COPYRIGHT FILE EXAMPLE", iykyk.
Now, the archive type for zip gets detected by running the file --dereference --brief --mime-type command. So literally any zip-type archive β jar, xpi, the whole squad β gets treated the same way. π«Ά
One more thing: if the package name comes in via the --package option, then nothing gets read from debian/, and the result file just chills in the current directory. Simple.
Oh and btw, mk-origtargz is commonly called through uscan, which is the one that goes and fetches the upstream tarball first. She's basically the second act. π
β OPTIONS β
πΈ Metadata options πΈ
These options extend or replace information taken from debian/. Like, they either add to it or override it, depending on the vibe.
--package packageβ Use package as the name of the Debian source package, and do not require or use adebian/directory. This option can only be used together with--version. The default is to use the package name of the first entry indebian/changelog.-v,--version versionβ Use version as the version of the package. Heads up: this needs to be the upstream version portion of a full Debian version, meaning no Debian revision and no epoch. Periodt. The default is to use the upstream portion of the version of the first entry indebian/changelog.--exclude-file globβ Remove files matching the given glob from the tarball, as if it was listed inFiles-Excluded.--include-file globβ Include previously excluded files matching the given glob in the tarball, as if it was listed inFiles-Included. (yes she can un-exclude things, she contains multitudes π)--copyright-file filenameβ Remove files matching the patterns found in filename, which should have the format of a Debian copyright file (to be precise:Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/). Errors parsing that file are silently ignored, exactly as is the case withdebian/copyright. Unmatched patterns will emit a warning so the user can verify whether it is correct. If there are multiple patterns which match a file, only the last one will count as being matched. π
Also important: the--exclude-file,--include-fileand--copyright-fileoptions amend the list of patterns found indebian/copyright. So if you do not want to read that file, you will have to use--package.
--signature signature-modeβ Set signature-mode:0for no signature1for normal detached signature2for signature on decompressed3for self signature
--signature-file signature-fileβ Use signature-file as the signature file corresponding to the Debian source package, to create adpkg-source(post-stretch) compatible signature file. (optional) π
π₯ Action options π₯
These options specify what exactly mk-origtargz should do. The options --copy, --rename and --symlink are mutually exclusive β pick one, bestie, you cannot have all three.
--symlinkβ Make the resulting file a symlink to the given original file. (This is the default behaviour.) π
If the file has to be modified (because it is a zip, xpi or zst file, because of --repack or Files-Excluded), this option behaves like --copy.
--copyβ Make the resulting file a copy of the original file (unless it has to be modified, of course).--renameβ Rename the original file. If the file has to be modified (because it is azip,xpi,zstfile, because of--repackorFiles-Excluded), this implies that the original file is deleted afterwards. π so like, be aware.--repackβ If the given file is not compressed using the desired format (see--compression), recompress it.-S,--repack-suffix suffixβ If the file has to be modified, because ofFiles-Excluded, append suffix to the upstream version.--force-repackβ Recompress even if the file is compressed using the desired format and no files were deleted. She's doing it because she wants to. π-c,--component componentnameβ Use<componentname>as the component name for the secondary upstream tarball. Set componentname as the component name. This is used only for the secondary upstream tarball of the Debian source package. Thenpackagename_version.orig-componentname.tar.gzis created. β¨--compression [ gzip | bzip2 | lzma | xz | default ]β The default method isxz. Whenmk-origtargzis launched in a debian source repository which format is"1.0"or undefined, the method switches togzip.-C,--directory directoryβ Put the resulting file in the given directory.--unzipopt optionsβ Add the extra options to use with theunzipcommand such as-a,-aa, and-b.
π SEE ALSO π
π AUTHOR π
mk-origtargz and this manpage have been written by Joachim Breitner <nomeata@debian.org>. absolute legend, we love to see it. π«Ά
okay that's the whole page bestie, go rename some tarballs and slay πβ¨ this one's from Debian Utilities, dated 2026-09-21 β mwah, catch you on the next manpage ππ¦πΈ
π¦ where this page comes from
- ubuntu stonking: devscripts 2.26.11ubuntu1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms