summaryrefslogtreecommitdiffstats
path: root/Source/CPack
diff options
context:
space:
mode:
authorAndrew Fuller <afuller@teradici.com>2018-06-29 21:14:22 (GMT)
committerBrad King <brad.king@kitware.com>2018-07-02 17:17:43 (GMT)
commit277425910007d524f14451296876b02f9683af0e (patch)
tree67d4708259fe57311bc3bd46fc88a6f343b33c2c /Source/CPack
parent51e7d4150756a01d51da38acfd0a469b138e1fde (diff)
downloadCMake-277425910007d524f14451296876b02f9683af0e.zip
CMake-277425910007d524f14451296876b02f9683af0e.tar.gz
CMake-277425910007d524f14451296876b02f9683af0e.tar.bz2
CPack/Deb: Restore setting of root as the owner of files
Refactoring in commit v3.10.0-rc1~220^2 (cmCPackDebGenerator: Use libarchive to create .deb file) accidentally broke this for the top-level archive.
Diffstat (limited to 'Source/CPack')
-rw-r--r--Source/CPack/cmCPackDebGenerator.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/CPack/cmCPackDebGenerator.cxx b/Source/CPack/cmCPackDebGenerator.cxx
index 93cdf41..8a4c004 100644
--- a/Source/CPack/cmCPackDebGenerator.cxx
+++ b/Source/CPack/cmCPackDebGenerator.cxx
@@ -664,6 +664,12 @@ int cmCPackDebGenerator::createDeb()
cmGeneratedFileStream debStream;
debStream.Open(outputPath.c_str(), false, true);
cmArchiveWrite deb(debStream, cmArchiveWrite::CompressNone, "arbsd");
+
+ // uid/gid should be the one of the root user, and this root user has
+ // always uid/gid equal to 0.
+ deb.SetUIDAndGID(0u, 0u);
+ deb.SetUNAMEAndGNAME("root", "root");
+
if (!deb.Add(tlDir + "debian-binary", tlDir.length()) ||
!deb.Add(tlDir + "control.tar.gz", tlDir.length()) ||
!deb.Add(tlDir + "data.tar" + compression_suffix, tlDir.length())) {