diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2019-04-04 18:03:21 (GMT) |
---|---|---|
committer | Ben Boeckel <ben.boeckel@kitware.com> | 2020-03-31 15:08:32 (GMT) |
commit | b9c17de023ea50e7be358519141971aa136858ca (patch) | |
tree | 348ecb16aa8ac6193f0a837b3255d4c933b77c68 /Source/CPack/cmCPackDebGenerator.cxx | |
parent | 206a65c3b8156acc0677a9adb2ab149021f25c20 (diff) | |
download | CMake-b9c17de023ea50e7be358519141971aa136858ca.zip CMake-b9c17de023ea50e7be358519141971aa136858ca.tar.gz CMake-b9c17de023ea50e7be358519141971aa136858ca.tar.bz2 |
cmArchiveWrite: split out opening the file
This allows options to be set before the "header" phase of libarchive's
API.
Diffstat (limited to 'Source/CPack/cmCPackDebGenerator.cxx')
-rw-r--r-- | Source/CPack/cmCPackDebGenerator.cxx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Source/CPack/cmCPackDebGenerator.cxx b/Source/CPack/cmCPackDebGenerator.cxx index 5b7d8fb..c30a57a 100644 --- a/Source/CPack/cmCPackDebGenerator.cxx +++ b/Source/CPack/cmCPackDebGenerator.cxx @@ -173,6 +173,7 @@ bool DebGenerator::generateDataTar() const } cmArchiveWrite data_tar(fileStream_data_tar, TarCompressionType, DebianArchiveType); + data_tar.Open(); // uid/gid should be the one of the root user, and this root user has // always uid/gid equal to 0. @@ -291,6 +292,7 @@ bool DebGenerator::generateControlTar(std::string const& md5Filename) const } cmArchiveWrite control_tar(fileStream_control_tar, cmArchiveWrite::CompressGZip, DebianArchiveType); + control_tar.Open(); // sets permissions and uid/gid for the files control_tar.SetUIDAndGID(0u, 0u); @@ -410,6 +412,7 @@ bool DebGenerator::generateDeb() const cmGeneratedFileStream debStream; debStream.Open(outputPath, false, true); cmArchiveWrite deb(debStream, cmArchiveWrite::CompressNone, "arbsd"); + deb.Open(); // uid/gid should be the one of the root user, and this root user has // always uid/gid equal to 0. |