diff options
author | Domen Vrankar <domen.vrankar@gmail.com> | 2016-09-04 19:13:24 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-09-05 13:24:45 (GMT) |
commit | 4ffdd564eb32be6147cb8610bbf6c0b5496fc56a (patch) | |
tree | f15bb299a1e067e7396cdfe33924a85116348a4b /Source/CPack | |
parent | fb357e5fef2e7803f2f745b6aa4cf63935628ed6 (diff) | |
download | CMake-4ffdd564eb32be6147cb8610bbf6c0b5496fc56a.zip CMake-4ffdd564eb32be6147cb8610bbf6c0b5496fc56a.tar.gz CMake-4ffdd564eb32be6147cb8610bbf6c0b5496fc56a.tar.bz2 |
CPack/DEB: Add option to select archive type
Add a `CPACK_DEBIAN_ARCHIVE_TYPE` option that can be used to select an
archive type that supports long file names.
Closes: #14332
Diffstat (limited to 'Source/CPack')
-rw-r--r-- | Source/CPack/cmCPackDebGenerator.cxx | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/Source/CPack/cmCPackDebGenerator.cxx b/Source/CPack/cmCPackDebGenerator.cxx index 1f3ac51..b909598 100644 --- a/Source/CPack/cmCPackDebGenerator.cxx +++ b/Source/CPack/cmCPackDebGenerator.cxx @@ -419,6 +419,12 @@ int cmCPackDebGenerator::createDeb() << debian_compression_type << std::endl); } + const char* debian_archive_type = + this->GetOption("GEN_CPACK_DEBIAN_ARCHIVE_TYPE"); + if (!debian_archive_type) { + debian_archive_type = "paxr"; + } + std::string filename_data_tar = strGenWDIR + "/data.tar" + compression_suffix; @@ -431,7 +437,8 @@ int cmCPackDebGenerator::createDeb() << filename_data_tar << "\" for writing" << std::endl); return 0; } - cmArchiveWrite data_tar(fileStream_data_tar, tar_compression_type, "paxr"); + cmArchiveWrite data_tar(fileStream_data_tar, tar_compression_type, + debian_archive_type); // uid/gid should be the one of the root user, and this root user has // always uid/gid equal to 0. @@ -535,7 +542,8 @@ int cmCPackDebGenerator::createDeb() return 0; } cmArchiveWrite control_tar(fileStream_control_tar, - cmArchiveWrite::CompressGZip, "paxr"); + cmArchiveWrite::CompressGZip, + debian_archive_type); // sets permissions and uid/gid for the files control_tar.SetUIDAndGID(0u, 0u); |