summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2018-07-03 14:47:54 (GMT)
committerKitware Robot <kwrobot@kitware.com>2018-07-03 14:48:03 (GMT)
commit83db42fa9997318da5ae5daf17f29c8e6068edbf (patch)
tree1417536208263a56394c4a7760f53ad4cc5cd48f
parent3017e501f356f0c87a6c4976dbf4678667f68eeb (diff)
parent277425910007d524f14451296876b02f9683af0e (diff)
downloadCMake-83db42fa9997318da5ae5daf17f29c8e6068edbf.zip
CMake-83db42fa9997318da5ae5daf17f29c8e6068edbf.tar.gz
CMake-83db42fa9997318da5ae5daf17f29c8e6068edbf.tar.bz2
Merge topic 'cpack-fix-deb-packaging'
2774259100 CPack/Deb: Restore setting of root as the owner of files Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2178
-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 50499aa..c53dd32 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())) {