summaryrefslogtreecommitdiffstats
path: root/Modules/CPackDeb.cmake
diff options
context:
space:
mode:
authorDomen Vrankar <domen.vrankar@gmail.com>2017-10-10 21:09:27 (GMT)
committerDomen Vrankar <domen.vrankar@gmail.com>2017-10-10 22:10:10 (GMT)
commitc5db2f9a0f62756e931d8dcfe0678a9d5bbe99a0 (patch)
treeca9b0365e96b8a93d3ec1981d891eca5b907f026 /Modules/CPackDeb.cmake
parent529729d6e7ba84e359fc533b35b1ab29ba7e2f79 (diff)
downloadCMake-c5db2f9a0f62756e931d8dcfe0678a9d5bbe99a0.zip
CMake-c5db2f9a0f62756e931d8dcfe0678a9d5bbe99a0.tar.gz
CMake-c5db2f9a0f62756e931d8dcfe0678a9d5bbe99a0.tar.bz2
CPack/Deb: fix for regex passing even if invalid characters are present
Regex [+-~] passes all characters between + and ~ and not only +, - and ~
Diffstat (limited to 'Modules/CPackDeb.cmake')
-rw-r--r--Modules/CPackDeb.cmake4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/CPackDeb.cmake b/Modules/CPackDeb.cmake
index 3e6d0a8..1879827 100644
--- a/Modules/CPackDeb.cmake
+++ b/Modules/CPackDeb.cmake
@@ -764,9 +764,9 @@ function(cpack_deb_prepare_package_vars)
if(DEFINED CPACK_DEBIAN_PACKAGE_RELEASE OR DEFINED CPACK_DEBIAN_PACKAGE_EPOCH)
# only test the version format if CPACK_DEBIAN_PACKAGE_RELEASE or
# CPACK_DEBIAN_PACKAGE_EPOCH is set
- if(NOT CPACK_DEBIAN_PACKAGE_VERSION MATCHES "^[0-9][A-Za-z0-9.+-~]*$")
+ if(NOT CPACK_DEBIAN_PACKAGE_VERSION MATCHES "^[0-9][A-Za-z0-9.+~-]*$")
message(FATAL_ERROR
- "CPackDeb: Debian package version must confirm to \"^[0-9][A-Za-z0-9.+-~]*$\" regex!")
+ "CPackDeb: Debian package version must confirm to \"^[0-9][A-Za-z0-9.+~-]*$\" regex!")
endif()
else()
# before CMake 3.10 version format was not tested so only warn to preserve