Rationale:
* mode_t is not defined on all platforms
* bitmasking (operator &) promotes the value to an int anyway
* libarchive uses int in the public api starting with version 4
Run the `Utilities/Scripts/clang-format.bash` script to update
all our C++ code to a new style defined by `.clang-format`.
Use `clang-format` version 3.8.
* If you reached this commit for a line in `git blame`, re-run the blame
operation starting at the parent of this commit to see older history
for the content.
* See the parent commit for instructions to rebase a change across this
style transition commit.
Sparse files in tars are a GNU extension that libarchive will use if it
detects holes in the input file, even when using the standard pax/paxr
formats. Not all tar implementations can handle sparse files; in particular,
the internal implementation dpkg uses to extract packages can't. To
maximize archive portability, turn this feature off by clearing the
sparseness information from archive entries.
Add an option to set the mtime of entries in a tarball so that one can
create a tarball with a consistent content hash (e.g. MD5) for a given
set of files regardless of their current timestamps on disk. This will
be useful for submission of tarballs to CDash, which tracks content
hashes to avoid duplication.
Inspired-by: Bill Hoffman <bill.hoffman@kitware.com>
This is not needed but it does not cost much to do it for all
potentially supported format in libarchive. XZ and LZMA are not
builtin libarchive and require external lib but if
CMAKE_USE_SYSTEM_LIBARCHIVE is ON then we may get it for free.
This will be needed to use cmArchiveWrire in cmCPackArchiveGenerator
with the same feature set as before. Note that adding zip
support to libarchive-wrapper would also makes it easy to add
a new -E zip command to cmake commands.