Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b16ea4c

Browse files
committed
Fix injection of install hooks on non-packaging builds.
1 parent b615228 commit b16ea4c

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

packaging/cmake/Modules/NetdataPermissions.cmake

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -313,9 +313,14 @@ function(netdata_install_extra_permissions)
313313
set(completed_items)
314314
set(user_components)
315315
set(nd_homedir [[${CMAKE_INSTALL_PREFIX}/var/lib/netdata]])
316-
set(NORMAL_BUILDS "none" "docker")
316+
set(NORMAL_BUILDS "docker")
317+
if(PACKAGE_TYPE IN_LIST NORMAL_BUILDS OR NOT BUILD_FOR_PACKAGING)
318+
set(NORMAL_BUILD On)
319+
else()
320+
set(NORMAL_BUILD Off)
321+
endif()
317322

318-
if(CREATE_USER AND PACKAGE_TYPE IN_LIST NORMAL_BUILDS)
323+
if(CREATE_USER AND NORMAL_BUILD)
319324
_nd_add_install_hook("${CMAKE_SOURCE_DIR}/packaging/cmake/install-user-hook.sh ${NETDATA_USER} ${NETDATA_GROUP} ${nd_homedir}" netdata)
320325
list(APPEND user_components "netdata")
321326
endif()
@@ -330,7 +335,7 @@ function(netdata_install_extra_permissions)
330335
list(APPEND completed_items "${entry_path}")
331336
endif()
332337

333-
if(PACKAGE_TYPE IN_LIST NORMAL_BUILDS)
338+
if(NORMAL_BUILD)
334339
_nd_extract_component(entry_component "${entry}")
335340
_nd_extract_permissions(entry_perms "${entry}")
336341

0 commit comments

Comments
 (0)