summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Help/command/cmake_minimum_required.rst4
-rw-r--r--Help/command/cmake_policy.rst5
-rw-r--r--Help/release/3.12.rst3
-rw-r--r--Source/CPack/cmCPackDebGenerator.cxx6
4 files changed, 16 insertions, 2 deletions
diff --git a/Help/command/cmake_minimum_required.rst b/Help/command/cmake_minimum_required.rst
index 7c02190..2f1ab60 100644
--- a/Help/command/cmake_minimum_required.rst
+++ b/Help/command/cmake_minimum_required.rst
@@ -13,6 +13,10 @@ If the running version of CMake is lower than the ``<min>`` required
version it will stop processing the project and report an error.
The optional ``<max>`` version, if specified, must be at least the
``<min>`` version and affects policy settings as described below.
+If the running version of CMake is older than 3.12, the extra ``...``
+dots will be seen as version component separators, resulting in the
+``...<max>`` part being ignored and preserving the pre-3.12 behavior
+of basing policies on ``<min>``.
The ``FATAL_ERROR`` option is accepted but ignored by CMake 2.6 and
higher. It should be specified so CMake versions 2.4 and lower fail
diff --git a/Help/command/cmake_policy.rst b/Help/command/cmake_policy.rst
index 6a8dd62..c3f7cfb 100644
--- a/Help/command/cmake_policy.rst
+++ b/Help/command/cmake_policy.rst
@@ -30,7 +30,10 @@ encourage projects to set policies based on CMake versions::
``major.minor[.patch[.tweak]]``, and the ``...`` is literal. The ``<min>``
version must be at least ``2.4`` and at most the running version of CMake.
The ``<max>`` version, if specified, must be at least the ``<min>`` version
-but may exceed the running version of CMake.
+but may exceed the running version of CMake. If the running version of
+CMake is older than 3.12, the extra ``...`` dots will be seen as version
+component separators, resulting in the ``...<max>`` part being ignored and
+preserving the pre-3.12 behavior of basing policies on ``<min>``.
This specifies that the current CMake code is written for the given
range of CMake versions. All policies known to the running version of CMake
diff --git a/Help/release/3.12.rst b/Help/release/3.12.rst
index 4d1135e..79ebc8e 100644
--- a/Help/release/3.12.rst
+++ b/Help/release/3.12.rst
@@ -34,7 +34,8 @@ Commands
* The :command:`cmake_minimum_required` and :command:`cmake_policy(VERSION)`
commands now accept a version range using the form ``<min>[...<max>]``.
The ``<min>`` version is required but policies are set based on the
- ``<max>`` version. This allows projects to specify a range of versions
+ older of the running CMake version and the version specified by
+ ``<max>``. This allows projects to specify a range of versions
for which they have been updated and avoid explicit policy settings.
* The :command:`file(GLOB)` and :command:`file(GLOB_RECURSE)` commands
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())) {