summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2016-08-25 16:25:00 +0200
committerJulian Andres Klode <jak@debian.org>2016-08-26 22:24:25 +0200
commit6f1f3c9afdb6ade6a7be110b90c8fc9e603254cf (patch)
tree6a65c6a299b69aae7ba51b17e541d1a90f9914d5 /CMakeLists.txt
parent757ec4e1ef633f9867928559df82adf3d0ac7b78 (diff)
Make root group configurable via ROOT_GROUP
This is needed on BSD where root's default group is wheel, not root.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt6
1 files changed, 6 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 916090866..24c58a0f8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -170,6 +170,12 @@ if (NOT DEFINED COMMON_ARCH)
execute_process(COMMAND dpkg-architecture -qDEB_HOST_ARCH
OUTPUT_VARIABLE COMMON_ARCH OUTPUT_STRIP_TRAILING_WHITESPACE)
endif()
+if (NOT DEFINED ROOT_GROUP)
+ execute_process(COMMAND id -gn root
+ OUTPUT_VARIABLE ROOT_GROUP OUTPUT_STRIP_TRAILING_WHITESPACE)
+ message(STATUS "Found root group: ${ROOT_GROUP}")
+endif()
+set(ROOT_GROUP "${ROOT_GROUP}" CACHE STRING "Group of root (e.g.: wheel or root)")
# Set various directories
set(STATE_DIR "${CMAKE_INSTALL_FULL_LOCALSTATEDIR}/lib/apt" CACHE PATH "Your /var/lib/apt")