(Check a dist tarball for completeness)


check-dist [-hv] tarball [source-directory]


Perl 5.006 or later and the Archive::Tar module, which is included with Perl as of 5.10 or is available separately from CPAN. Under most circumstances, the tarball will be compressed with gzip, which will additionally requires the IO::Zlib module, also included in Perl as of 5.10 or available separately from CPAN.


With Automake make dist, all of the files to include in the distribution that aren't installed or source files have to be explicitly listed. It's easy to miss documentation or parts of test cases. This script compares a source directory to the unpacked distribution tarball to see if everything was included. Any files found in the source directory but not in the tarball are reported except for those excluded by the configuration at the top of this script. Normally, one wants to run make distclean or the equivalent in the source directory before running this script.

Having something present in the distribution that isn't in the build tree is fine; that can happen if one is comparing with a fresh checkout.

If the source tree isn't given on the command line, the current directory is used.

.git and tests/config and anything beneath them are ignored when looking for files not present in the distribution.


-h, --help

Print out this documentation (which is done simply by feeding the script to perldoc -t).

-v, --version

Print out the version of check-dist and exit.


The current version of this script is available from Russ Allbery's script page at <>.


Russ Allbery <>


Copyright 2009, 2011 The Board of Trustees of the Leland Stanford Junior University.

This program is free software; you may redistribute it and/or modify it under the same terms as Perl itself.

Last modified and spun 2015-04-27