= Unifying the process to strip files with problematic copyright from upstream tarballs = Also see https://wiki.debian.org/Javascript/Repacking ! 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 stanza of `debian/copyright`, you can exclude files from an upstream tarball (see `man uscan`). This field accepts a whitespace-separated list of patterns like [[https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/#files-field|Files]]. Example: {{{ Files-Excluded: */Makefile.in aclocal.m4 config.h.in configure }}} Currently, this feature is not yet documented in `debian/copyright` file format [[https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/|specification]], but there is an open bug about this (DebianBug: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`. Note that [[https://lintian.debian.org|Lintian]] will warn for files specified in the {{{Files-Excluded}}} field that exist in the source tree in the [[https://lintian.debian.org/tags/source-includes-file-in-files-excluded.html|source-includes-file-in-files-excluded]] tag. == Specifying better compression method == You can specify a more reasonable compression method using `uscan --repack --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.