summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvkalintiris <vasilis@netdata.cloud>2024-04-30 14:45:23 +0300
committerGitHub <noreply@github.com>2024-04-30 07:45:23 -0400
commit5973417027606bacf044b3ead40a882931ce773f (patch)
tree7666777a7fe9bc9cf4e32b2054982b9b4f25b85b
parent4c76a141ad330f422d31a837ebeb23b9b7b443f8 (diff)
Use CPack to generate Debian packages (#17475)
* CPack * Add script to build all artifacts. * Add infrastructure to run package builds via CPack in CI. * Fix typos in distro config. * Fix permissions on package-build script. * Control files for netdata package * pre/post inst files for debugfs. * Fix directory name handling for package build. * pre/post inst scripts for cups * pre/post inst scripts for xenstat * pre/post inst scripts for slabinfo * pre/post inst scripts for apps * pre/post inst scripts for network-viewer * pre/post inst script for nfacct * pre/post inst scripts for freeipmi * pre/post inst scripts for logs-management * pre/post inst perf * pre/post inst scripts for systemd-journal * pre/post init scripts for go.d * pre/post inst scripts for ebpf * pre/post init files for charts.d & python.d * Skip eBPF in packaging. * Fix most of the package names * Add copyright * etc/default/netdata * Bump * Enable all packages except for ebpf. * Add log2journal to netdata component. * Produce pretty-much the same RFS. - No README.md docs - /var/run/netdat missing on CPack's side - No ebpf - No changelogs * Enable ebpf plugin * Fix runtime path * Build debug symbol packages * Update package directory * Fix eBPF and Xenstat conditionals. * Fixes for package build process. * Package version for cpack * Add ebpf-code-legacy package * Update extraction logic * Fix control info for netdata package * Fix control file for chartsd plugin package * Fix typos in package build script. * Update dependencies * Add python3 * Fix verbose option to cpack * Add whitespace in package description field. * SKip adding files that might break rpm packages * Final fixups to package handling. * Fix architecture matching for package build options. * Fix dependency handling. * Remove top-level scripts --------- Co-authored-by: Austin S. Hemmelgarn <austin@netdata.cloud>
-rw-r--r--.github/data/distros.yml10
-rwxr-xr-x.github/scripts/gen-matrix-packaging.py1
-rw-r--r--.github/workflows/packaging.yml4
-rw-r--r--CMakeLists.txt424
-rwxr-xr-xpackaging/build-package.sh81
-rw-r--r--packaging/cmake/Modules/Packaging.cmake511
-rwxr-xr-xpackaging/cmake/control/apps/postinst15
-rwxr-xr-xpackaging/cmake/control/apps/preinst11
-rwxr-xr-xpackaging/cmake/control/charts.d/postinst11
-rwxr-xr-xpackaging/cmake/control/charts.d/preinst11
-rw-r--r--packaging/cmake/control/copyright10
-rwxr-xr-xpackaging/cmake/control/cups/postinst11
-rwxr-xr-xpackaging/cmake/control/cups/preinst11
-rwxr-xr-xpackaging/cmake/control/debugfs/postinst15
-rwxr-xr-xpackaging/cmake/control/debugfs/preinst11
-rwxr-xr-xpackaging/cmake/control/ebpf-code-legacy/postinst11
-rwxr-xr-xpackaging/cmake/control/ebpf-code-legacy/preinst11
-rwxr-xr-xpackaging/cmake/control/ebpf.d/postinst12
-rwxr-xr-xpackaging/cmake/control/ebpf.d/preinst11
-rwxr-xr-xpackaging/cmake/control/freeipmi/postinst12
-rwxr-xr-xpackaging/cmake/control/freeipmi/preinst11
-rwxr-xr-xpackaging/cmake/control/go.d/postinst15
-rwxr-xr-xpackaging/cmake/control/go.d/preinst11
-rwxr-xr-xpackaging/cmake/control/logs-management/postinst15
-rwxr-xr-xpackaging/cmake/control/logs-management/preinst11
-rw-r--r--packaging/cmake/control/netdata/conffiles5
-rw-r--r--packaging/cmake/control/netdata/etc/default/netdata3
-rwxr-xr-xpackaging/cmake/control/netdata/etc/init.d/netdata56
-rwxr-xr-xpackaging/cmake/control/netdata/postinst49
-rwxr-xr-xpackaging/cmake/control/netdata/postrm55
-rwxr-xr-xpackaging/cmake/control/netdata/preinst26
-rwxr-xr-xpackaging/cmake/control/network-viewer/postinst15
-rwxr-xr-xpackaging/cmake/control/network-viewer/preinst11
-rwxr-xr-xpackaging/cmake/control/nfacct/postinst12
-rwxr-xr-xpackaging/cmake/control/nfacct/preinst11
-rwxr-xr-xpackaging/cmake/control/perf/postinst18
-rwxr-xr-xpackaging/cmake/control/perf/preinst11
-rwxr-xr-xpackaging/cmake/control/python.d/postinst11
-rwxr-xr-xpackaging/cmake/control/python.d/preinst11
-rwxr-xr-xpackaging/cmake/control/slabinfo/postinst15
-rwxr-xr-xpackaging/cmake/control/slabinfo/preinst11
-rwxr-xr-xpackaging/cmake/control/systemd-journal/postinst15
-rwxr-xr-xpackaging/cmake/control/systemd-journal/preinst11
-rwxr-xr-xpackaging/cmake/control/xenstat/postinst12
-rwxr-xr-xpackaging/cmake/control/xenstat/preinst11
-rwxr-xr-xsrc/web/gui/bundle_dashboard_v1.py18
-rwxr-xr-xsrc/web/gui/bundle_dashboard_v2.py16
-rw-r--r--src/web/gui/v1/dashboard_v1.cmake18
48 files changed, 1539 insertions, 139 deletions
diff --git a/.github/data/distros.yml b/.github/data/distros.yml
index 73c026f7cb..67e036e8ef 100644
--- a/.github/data/distros.yml
+++ b/.github/data/distros.yml
@@ -24,6 +24,7 @@ default_sentry: &default_sentry # Default configuration for Sentry usage
armhfp: false
arm64: false
aarch64: false
+default_builder_rev: &def_builder_rev v1
include:
- &alpine
distro: alpine
@@ -80,6 +81,7 @@ include:
packages: &amzn_packages
type: rpm
repo_distro: amazonlinux/2
+ builder_rev: *def_builder_rev
arches:
- x86_64
- aarch64
@@ -104,6 +106,7 @@ include:
packages:
type: rpm
repo_distro: el/7
+ builder_rev: *def_builder_rev
alt_links:
- el/7Server
- el/7Client
@@ -126,6 +129,7 @@ include:
packages: &cs_packages
type: rpm
repo_distro: el/c9s
+ builder_rev: *def_builder_rev
arches:
- x86_64
- aarch64
@@ -155,6 +159,7 @@ include:
packages: &debian_packages
type: deb
repo_distro: debian/bookworm
+ builder_rev: v2
arches:
- i386
- amd64
@@ -192,6 +197,7 @@ include:
packages: &fedora_packages
type: rpm
repo_distro: fedora/40
+ builder_rev: *def_builder_rev
arches:
- x86_64
- aarch64
@@ -225,6 +231,7 @@ include:
packages: &opensuse_packages
type: rpm
repo_distro: opensuse/15.5
+ builder_rev: *def_builder_rev
arches:
- x86_64
- aarch64
@@ -243,6 +250,7 @@ include:
packages: &oracle_packages
type: rpm
repo_distro: ol/8
+ builder_rev: *def_builder_rev
arches:
- x86_64
- aarch64
@@ -266,6 +274,7 @@ include:
packages: &rocky_packages
type: rpm
repo_distro: el/9
+ builder_rev: *def_builder_rev
alt_links:
- el/9Server
- el/9Client
@@ -301,6 +310,7 @@ include:
packages: &ubuntu_packages
type: deb
repo_distro: ubuntu/noble
+ builder_rev: v2
arches:
- amd64
- armhf
diff --git a/.github/scripts/gen-matrix-packaging.py b/.github/scripts/gen-matrix-packaging.py
index be2a941a2a..c00ff3181d 100755
--- a/.github/scripts/gen-matrix-packaging.py
+++ b/.github/scripts/gen-matrix-packaging.py
@@ -27,6 +27,7 @@ for i, v in enumerate(data['include']):
'repo_distro': data['include'][i]['packages']['repo_distro'],
'format': data['include'][i]['packages']['type'],
'base_image': data['include'][i]['base_image'] if 'base_image' in data['include'][i] else ':'.join([data['include'][i]['distro'], data['include'][i]['version']]),
+ 'builder_rev': data['include'][i]['packages']['builder_rev'],
'platform': data['platform_map'][arch],
'bundle_sentry': data['include'][i]['bundle_sentry'][arch],
'arch': arch
diff --git a/.github/workflows/packaging.yml b/.github/workflows/packaging.yml
index afc3196adf..1b0ee8affb 100644
--- a/.github/workflows/packaging.yml
+++ b/.github/workflows/packaging.yml
@@ -249,7 +249,7 @@ jobs:
timeout_seconds: 900
command: |
docker pull --platform ${{ matrix.platform }} ${{ matrix.base_image }}
- docker pull --platform ${{ matrix.platform }} netdata/package-builders:${{ matrix.distro }}${{ matrix.version }}-v1
+ docker pull --platform ${{ matrix.platform }} netdata/package-builders:${{ matrix.distro }}${{ matrix.version }}-${{ matrix.builder_rev }}
- name: Build Packages
id: build
if: needs.file-check.outputs.run == 'true'
@@ -259,7 +259,7 @@ jobs:
-e ENABLE_SENTRY=${{ matrix.bundle_sentry }} -e RELEASE_PIPELINE=${{ env.RELEASE_PIPELINE }} \
-e BUILD_DESTINATION=${{ matrix.distro }}${{ matrix.version }}_${{ matrix.arch }} -e UPLOAD_SENTRY=${{ env.UPLOAD_SENTRY }} \
-e SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_CLI_TOKEN }} -e NETDATA_SENTRY_DSN=${{ secrets.SENTRY_DSN }} \
- --platform=${{ matrix.platform }} -v "$PWD":/netdata netdata/package-builders:${{ matrix.distro }}${{ matrix.version }}-v1
+ --platform=${{ matrix.platform }} -v "$PWD":/netdata netdata/package-builders:${{ matrix.distro }}${{ matrix.version }}-${{ matrix.builder_rev }}
- name: Save Packages
id: artifacts
if: needs.file-check.outputs.run == 'true'
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a3bb1a3400..8214e392e5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -55,7 +55,6 @@ set(NETDATA_VERSION ${FIELD_MAJOR}.${FIELD_MINOR}.${FIELD_PATCH}.${FIELD_TWEAK})
project(netdata
VERSION ${NETDATA_VERSION}
- DESCRIPTION "Netdata real-time monitoring"
HOMEPAGE_URL "https://www.netdata.cloud"
LANGUAGES C CXX)
list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/packaging/cmake/Modules")
@@ -65,6 +64,7 @@ find_package(PkgConfig REQUIRED)
set(CMAKE_C_STANDARD 11)
set(CMAKE_CXX_STANDARD 14)
+set(CMAKE_INSTALL_DEFAULT_COMPONENT_NAME "netdata")
option(USE_CXX_11 "Use C++11 instead of C++14 (should only be used on legacy systems that cannot support C++14, may disable some features)" False)
mark_as_advanced(USE_CXX_11)
@@ -150,6 +150,9 @@ mark_as_advanced(ENABLE_H2O)
option(ENABLE_SENTRY "Build with Sentry Native crash reporting" False)
mark_as_advanced(ENABLE_SENTRY)
+option(BUILD_FOR_PACKAGING "Include component files for native packages" False)
+mark_as_advanced(BUILD_FOR_PACKAGING)
+
cmake_dependent_option(FORCE_LEGACY_LIBBPF "Force usage of libbpf 0.0.9 instead of the latest version." False "ENABLE_PLUGIN_LIBBPF" False)
mark_as_advanced(FORCE_LEGACY_LIBBPF)
@@ -1685,8 +1688,15 @@ if(ENABLE_PLUGIN_DEBUGFS)
target_compile_options(debugfs.plugin PRIVATE ${CAP_CFLAGS_OTHER})
install(TARGETS debugfs.plugin
- COMPONENT debugfs_plugin
+ COMPONENT plugin-debugfs
DESTINATION usr/libexec/netdata/plugins.d)
+
+ if(BUILD_FOR_PACKAGING)
+ install(FILES
+ packaging/cmake/control/copyright
+ COMPONENT plugin-debugfs
+ DESTINATION usr/share/doc/netdata-plugin-debugfs)
+ endif()
endif()
if(ENABLE_PLUGIN_APPS)
@@ -1716,11 +1726,19 @@ if(ENABLE_PLUGIN_APPS)
target_compile_options(apps.plugin PRIVATE ${CAP_CFLAGS_OTHER})
install(TARGETS apps.plugin
- COMPONENT apps_plugin
+ COMPONENT plugin-apps
DESTINATION usr/libexec/netdata/plugins.d)
+
install(FILES src/collectors/apps.plugin/apps_groups.conf
- COMPONENT apps_plugin
+ COMPONENT plugin-apps
DESTINATION usr/lib/netdata/conf.d)
+
+ if(BUILD_FOR_PACKAGING)
+ install(FILES
+ packaging/cmake/control/copyright
+ COMPONENT plugin-apps
+ DESTINATION usr/share/doc/netdata-plugin-apps)
+ endif()
endif()
if(CAP_FOUND)
@@ -1738,8 +1756,15 @@ if(ENABLE_PLUGIN_FREEIPMI)
target_compile_options(freeipmi.plugin PRIVATE ${IPMI_CFLAGS_OTHER})
install(TARGETS freeipmi.plugin
- COMPONENT freeipmi_plugin
+ COMPONENT plugin-freeipmi
DESTINATION usr/libexec/netdata/plugins.d)
+
+ if(BUILD_FOR_PACKAGING)
+ install(FILES
+ packaging/cmake/control/copyright
+ COMPONENT plugin-freeipmi
+ DESTINATION usr/share/doc/netdata-plugin-freeipmi)
+ endif()
endif()
if(ENABLE_PLUGIN_NFACCT)
@@ -1757,8 +1782,15 @@ if(ENABLE_PLUGIN_NFACCT)
target_compile_options(nfacct.plugin PRIVATE ${MNL_CFLAGS_OTHER} ${NFACCT_CFLAGS_OTHER})
install(TARGETS nfacct.plugin
- COMPONENT nfacct_plugin
+ COMPONENT plugin-nfacct
DESTINATION usr/libexec/netdata/plugins.d)
+
+ if(BUILD_FOR_PACKAGING)
+ install(FILES
+ packaging/cmake/control/copyright
+ COMPONENT plugin-nfacct
+ DESTINATION usr/share/doc/netdata-plugin-nfacct)
+ endif()
endif()
if(ENABLE_PLUGIN_XENSTAT)
@@ -1773,8 +1805,15 @@ if(ENABLE_PLUGIN_XENSTAT)
target_compile_options(xenstat.plugin PRIVATE ${XENLIGHT_CFLAGS_OTHER} ${XENSTAT_CFLAGS_OTHER})
install(TARGETS xenstat.plugin
- COMPONENT xenstat_plugin
+ COMPONENT plugin-xenstat
DESTINATION usr/libexec/netdata/plugins.d)
+
+ if(BUILD_FOR_PACKAGING)
+ install(FILES
+ packaging/cmake/control/copyright
+ COMPONENT plugin-xenstat
+ DESTINATION usr/share/doc/netdata-plugin-xenstat)
+ endif()
endif()
if(ENABLE_PLUGIN_PERF)
@@ -1784,8 +1823,15 @@ if(ENABLE_PLUGIN_PERF)
target_link_libraries(perf.plugin libnetdata)
install(TARGETS perf.plugin
- COMPONENT perf_plugin
+ COMPONENT plugin-perf
DESTINATION usr/libexec/netdata/plugins.d)
+
+ if(BUILD_FOR_PACKAGING)
+ install(FILES
+ packaging/cmake/control/copyright
+ COMPONENT plugin-perf
+ DESTINATION usr/share/doc/netdata-plugin-perf)
+ endif()
endif()
if(ENABLE_PLUGIN_SLABINFO)
@@ -1795,8 +1841,15 @@ if(ENABLE_PLUGIN_SLABINFO)
target_link_libraries(slabinfo.plugin libnetdata)
install(TARGETS slabinfo.plugin
- COMPONENT slabinfo_plugin
+ COMPONENT plugin-slabinfo
DESTINATION usr/libexec/netdata/plugins.d)
+
+ if(BUILD_FOR_PACKAGING)
+ install(FILES
+ packaging/cmake/control/copyright
+ COMPONENT plugin-slabinfo
+ DESTINATION usr/share/doc/netdata-plugin-slabinfo)
+ endif()
endif()
if(ENABLE_PLUGIN_LOGS_MANAGEMENT)
@@ -1812,14 +1865,31 @@ if(ENABLE_PLUGIN_LOGS_MANAGEMENT)
target_link_libraries(logs-management.plugin libnetdata)
install(TARGETS logs-management.plugin
- COMPONENT logs_management_plugin
+ COMPONENT plugin-logs-management
DESTINATION usr/libexec/netdata/plugins.d)
install(DIRECTORY src/logsmanagement/stock_conf/logsmanagement.d
- COMPONENT logs_management_plugin
+ COMPONENT plugin-logs-management
DESTINATION usr/lib/netdata/conf.d)
- install(DIRECTORY DESTINATION etc/netdata/logsmanagement.d)
+ install(DIRECTORY
+ COMPONENT plugin-logs-management
+ DESTINATION etc/netdata/logsmanagement.d)
+
+ configure_file(src/logsmanagement/stock_conf/logsmanagement.d.conf.in
+ src/logsmanagement/stock_conf/logsmanagement.d.conf
+ @ONLY)
+
+ install(FILES ${CMAKE_BINARY_DIR}/src/logsmanagement/stock_conf/logsmanagement.d.conf
+ COMPONENT plugin-logs-management
+ DESTINATION usr/lib/netdata/conf.d)
+
+ if(BUILD_FOR_PACKAGING)
+ install(FILES
+ packaging/cmake/control/copyright
+ COMPONENT plugin-logs-management
+ DESTINATION usr/share/doc/netdata-plugin-logs-management)
+ endif()
endif()
if(ENABLE_PLUGIN_CUPS)
@@ -1850,8 +1920,15 @@ if(ENABLE_PLUGIN_CUPS)
target_compile_options(cups.plugin PRIVATE ${CUPS_CFLAGS_OTHER})
install(TARGETS cups.plugin
- COMPONENT cups_plugin
+ COMPONENT plugin-cups
DESTINATION usr/libexec/netdata/plugins.d)
+
+ if(BUILD_FOR_PACKAGING)
+ install(FILES
+ packaging/cmake/control/copyright
+ COMPONENT plugin-cups
+ DESTINATION usr/share/doc/netdata-plugin-cups)
+ endif()
endif()
endif()
@@ -1860,7 +1937,7 @@ set(NDSUDO_FILES src/collectors/plugins.d/ndsudo.c)
add_executable(ndsudo ${NDSUDO_FILES})
install(TARGETS ndsudo
- COMPONENT ndsudo
+ COMPONENT netdata
DESTINATION usr/libexec/netdata/plugins.d)
if(ENABLE_PLUGIN_CGROUP_NETWORK)
@@ -1870,7 +1947,7 @@ if(ENABLE_PLUGIN_CGROUP_NETWORK)
target_link_libraries(cgroup-network libnetdata)
install(TARGETS cgroup-network
- COMPONENT cgroup_network_plugin
+ COMPONENT netdata
DESTINATION usr/libexec/netdata/plugins.d)
endif()
@@ -1883,8 +1960,15 @@ if(ENABLE_PLUGIN_SYSTEMD_JOURNAL)
target_link_libraries(systemd-journal.plugin libnetdata)
install(TARGETS systemd-journal.plugin
- COMPONENT systemd_journal_plugin
+ COMPONENT plugin-systemd-journal
DESTINATION usr/libexec/netdata/plugins.d)
+
+ if(BUILD_FOR_PACKAGING)
+ install(FILES
+ packaging/cmake/control/copyright
+ COMPONENT plugin-systemd-journal
+ DESTINATION usr/share/doc/netdata-plugin-systemd-journal)
+ endif()
endif()
if(ENABLE_PLUGIN_EBPF)
@@ -1939,9 +2023,42 @@ if(ENABLE_PLUGIN_EBPF)
netdata_add_ebpf_co_re_to_target(ebpf.plugin)
install(TARGETS ebpf.plugin
- COMPONENT ebpf_plugin
+ COMPONENT plugin-ebpf
DESTINATION usr/libexec/netdata/plugins.d)
+ install(FILES
+ src/collectors/ebpf.plugin/ebpf.d.conf
+ COMPONENT plugin-ebpf
+ DESTINATION usr/lib/netdata/conf.d)
+
+ install(FILES
+ src/collectors/ebpf.plugin/ebpf.d/cachestat.conf
+ src/collectors/ebpf.plugin/ebpf.d/dcstat.conf
+ src/collectors/ebpf.plugin/ebpf.d/disk.conf
+ src/collectors/ebpf.plugin/ebpf.d/ebpf_kernel_reject_list.txt
+ src/collectors/ebpf.plugin/ebpf.d/fd.conf
+ src/collectors/ebpf.plugin/ebpf.d/filesystem.conf
+ src/collectors/ebpf.plugin/ebpf.d/hardirq.conf
+ src/collectors/ebpf.plugin/ebpf.d/mdflush.conf
+ src/collectors/ebpf.plugin/ebpf.d/mount.conf
+ src/collectors/ebpf.plugin/ebpf.d/network.conf
+ src/collectors/ebpf.plugin/ebpf.d/oomkill.conf
+ src/collectors/ebpf.plugin/ebpf.d/process.conf
+ src/collectors/ebpf.plugin/ebpf.d/shm.conf
+ src/collectors/ebpf.plugin/ebpf.d/softirq.conf
+ src/collectors/ebpf.plugin/ebpf.d/swap.conf
+ src/collectors/ebpf.plugin/ebpf.d/sync.conf
+ src/collectors/ebpf.plugin/ebpf.d/vfs.conf
+ COMPONENT plugin-ebpf
+ DESTINATION usr/lib/netdata/conf.d/ebpf.d)
+
+ if(BUILD_FOR_PACKAGING)
+ install(FILES
+ packaging/cmake/control/copyright
+ COMPONENT plugin-ebpf
+ DESTINATION usr/share/doc/netdata-plugin-ebpf)
+ endif()
+
if(ENABLE_LEGACY_EBPF_PROGRAMS)
netdata_install_legacy_ebpf_code()
endif()
@@ -1963,7 +2080,7 @@ if(ENABLE_PLUGIN_LOCAL_LISTENERS)
"$<$<BOOL:${MNL_FOUND}>:${MNL_LIBRARIES}>")
install(TARGETS local-listeners
- COMPONENT local_listeners
+ COMPONENT netdata
DESTINATION usr/libexec/netdata/plugins.d)
endif()
@@ -1983,10 +2100,16 @@ if(ENABLE_PLUGIN_NETWORK_VIEWER)
target_link_libraries(network-viewer.plugin libnetdata
"$<$<BOOL:${MNL_FOUND}>:${MNL_LIBRARIES}>")
-
install(TARGETS network-viewer.plugin
- COMPONENT network_viewer_plugin
+ COMPONENT plugin-network-viewer
DESTINATION usr/libexec/netdata/plugins.d)
+
+ if(BUILD_FOR_PACKAGING)
+ install(FILES
+ packaging/cmake/control/copyright
+ COMPONENT plugin-network-viewer
+ DESTINATION usr/share/doc/netdata-plugin-network-viewer)
+ endif()
endif()
#
@@ -2082,7 +2205,7 @@ add_executable(systemd-cat-native ${SYSTEMD_CAT_NATIVE_FILES})
target_link_libraries(systemd-cat-native libnetdata)
install(TARGETS systemd-cat-native
- COMPONENT systemd-cat-native
+ COMPONENT netdata
DESTINATION usr/sbin)
#
@@ -2117,11 +2240,11 @@ if(PCRE2_FOUND)
netdata_add_libyaml_to_target(log2journal)
install(TARGETS log2journal
- COMPONENT log2journal
+ COMPONENT netdata
DESTINATION usr/sbin)
install(DIRECTORY src/collectors/log2journal/log2journal.d
- COMPONENT log2journal
+ COMPONENT netdata
DESTINATION usr/lib/netdata/conf.d)
endif()
@@ -2140,7 +2263,7 @@ add_executable(netdatacli ${NETDATACLI_FILES})
target_link_libraries(netdatacli libnetdata)
install(TARGETS netdatacli
- COMPONENT netdatacli
+ COMPONENT netdata
DESTINATION usr/sbin)
#
@@ -2151,7 +2274,7 @@ if(ENABLE_PLUGIN_GO)
add_go_target(go-plugin go.d.plugin src/go/collectors/go.d.plugin cmd/godplugin)
install(PROGRAMS ${CMAKE_BINARY_DIR}/go.d.plugin
- COMPONENT go.d.plugin
+ COMPONENT plugin-go
DESTINATION usr/libexec/netdata/plugins.d)
endif()
@@ -2192,26 +2315,24 @@ configure_file(packaging/cmake/config.cmake.h.in config.h)
# install
#
-install(TARGETS netdata DESTINATION usr/sbin)
-
-install(DIRECTORY DESTINATION var/cache/netdata)
-install(DIRECTORY DESTINATION var/log/netdata)
-install(DIRECTORY DESTINATION var/lib/netdata/registry)
-install(DIRECTORY DESTINATION var/lib/netdata/cloud.d)
-install(DIRECTORY DESTINATION var/run)
-install(DIRECTORY DESTINATION etc/netdata)
-install(DIRECTORY DESTINATION etc/netdata/charts.d)
-install(DIRECTORY DESTINATION etc/netdata/custom-plugins.d)
-install(DIRECTORY DESTINATION etc/netdata/ebpf.d)
-install(DIRECTORY DESTINATION etc/netdata/go.d)
-install(DIRECTORY DESTINATION etc/netdata/health.d)
-install(DIRECTORY DESTINATION etc/netdata/python.d)
-install(DIRECTORY DESTINATION etc/netdata/ssl)
-install(DIRECTORY DESTINATION etc/netdata/statsd.d)
-install(DIRECTORY DESTINATION usr/lib/netdata/conf.d)
-install(DIRECTORY DESTINATION usr/lib/netdata/conf.d/schema.d)
-install(DIRECTORY DESTINATION usr/libexec/netdata/plugins.d)
-install(DIRECTORY DESTINATION ${WEB_DEST})
+install(TARGETS netdata COMPONENT netdata DESTINATION usr/sbin)
+
+install(DIRECTORY COMPONENT netdata DESTINATION var/cache/netdata)
+install(DIRECTORY COMPONENT netdata DESTINATION var/log/netdata)
+install(DIRECTORY COMPONENT netdata DESTINATION var/lib/netdata/registry)
+install(DIRECTORY COMPONENT netdata DESTINATION var/lib/netdata/cloud.d)
+install(DIRECTORY COMPONENT netdata DESTINATION var/run/netdata)
+install(DIRECTORY COMPONENT netdata DESTINATION etc/netdata)
+install(DIRECTORY COMPONENT netdata DESTINATION etc/netdata/custom-plugins.d)
+install(DIRECTORY COMPONENT netdata DESTINATION etc/netdata/go.d)
+install(DIRECTORY COMPONENT netdata DESTINATION etc/netdata/health.d)
+install(DIRECTORY COMPONENT netdata DESTINATION etc/netdata/python.d)
+install(DIRECTORY COMPONENT netdata DESTINATION etc/netdata/ssl)
+install(DIRECTORY COMPONENT netdata DESTINATION etc/netdata/statsd.d)
+install(DIRECTORY COMPONENT netdata DESTINATION usr/lib/netdata/conf.d)
+install(DIRECTORY COMPONENT netdata DESTINATION usr/lib/netdata/conf.d/schema.d)
+install(DIRECTORY COMPONENT netdata DESTINATION usr/libexec/netdata/plugins.d)
+install(DIRECTORY COMPONENT netdata DESTINATION ${WEB_DEST})
set(libsysdir_POST "${CMAKE_INSTALL_PREFIX}/usr/lib/netdata/system")
set(pkglibexecdir_POST "${CMAKE_INSTALL_PREFIX}/usr/libexec/netdata")
@@ -2240,6 +2361,7 @@ endif()
configure_file(src/claim/netdata-claim.sh.in src/claim/netdata-claim.sh @ONLY)
install(PROGRAMS
${CMAKE_BINARY_DIR}/src/claim/netdata-claim.sh
+ COMPONENT netdata
DESTINATION usr/sbin)
#
@@ -2250,13 +2372,14 @@ configure_file(src/collectors/cgroups.plugin/cgroup-network-helper.sh.in
src/collectors/cgroups.plugin/cgroup-network-helper.sh @ONLY)
install(PROGRAMS
${CMAKE_BINARY_DIR}/src/collectors/cgroups.plugin/cgroup-network-helper.sh
- COMPONENT cgroup_network_plugin
+ COMPONENT netdata
DESTINATION usr/libexec/netdata/plugins.d)
configure_file(src/collectors/cgroups.plugin/cgroup-name.sh.in
src/collectors/cgroups.plugin/cgroup-name.sh @ONLY)
install(PROGRAMS
${CMAKE_BINARY_DIR}/src/collectors/cgroups.plugin/cgroup-name.sh
+ COMPONENT netdata
DESTINATION usr/libexec/netdata/plugins.d)
#
@@ -2266,6 +2389,7 @@ install(FILES
src/collectors/statsd.plugin/asterisk.conf
src/collectors/statsd.plugin/example.conf
src/collectors/statsd.plugin/k6.conf
+ COMPONENT netdata
DESTINATION usr/lib/netdata/conf.d/statsd.d)
#
@@ -2273,6 +2397,7 @@ install(FILES
#
install(FILES
src/exporting/exporting.conf
+ COMPONENT netdata
DESTINATION usr/lib/netdata/conf.d)
#
@@ -2280,6 +2405,7 @@ install(FILES
#
install(FILES
src/collectors/ioping.plugin/ioping.conf
+ COMPONENT netdata
DESTINATION usr/lib/netdata/conf.d)
#
@@ -2287,6 +2413,7 @@ install(FILES
#