Differences between revisions 53 and 54
Revision 53 as of 2016-02-04 23:59:52
Size: 1828
Editor: MichaelBanck
Comment: Mention mk-origtargz
Revision 54 as of 2016-03-20 13:59:59
Size: 1944
Editor: JulianTaylor
Deletions are marked like this. Additions are marked like this.
Line 22: Line 22:
In order to retain the repacking suffix on the tarball the ''repacksuffix'' opts must be used in `debian/watch`.

Unifying the process to strip files with problematic copyright from upstream tarballs

The following features of uscan since devscripts version 2.14.2 are helpful to deal with upstream tarballs you need to tweak.

Deleting Files using Files-Excluded field in debian/copyright

By using the field Files-Excluded:

Files-Excluded: foo/bar.js

in the header paragraph of debian/copyright, you can exclude files from an upstream tarball (see man uscan).

This field accepts a whitespace-separated list of patterns like Files. Example:

Files-Excluded: */Makefile.in aclocal.m4 config.h.in configure

Currently, this feature is not yet documented in debian/copyright file format specification, but there is an open bug about this (685506).

The mk-origtargz tool (also from devscripts) can repack the original tarball even if no debian/watch file is present.

In order to retain the repacking suffix on the tarball the repacksuffix opts must be used in debian/watch.

Specifying better compression method

You can specify a more reasonable compression method using uscan --repack --compression <compression>. You can use xz, bz2, gz, or lzma here. (see man uscan)

Not yet implemented but potentially helpful

When repacking, tar --exclude-vcs is used. Usually there is no point in having VCS metainformation in upstream tarballs. It should be debated in a separate thread whether this option should be used unconditionally, but the current implementation is that way. So, in the example above, the specification of .git is redundant because it will be left out anyway. The feature to exclude VCS information from upstream tarballs will be subject of a future bug report.