Packaging.cmake 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516
  1. #
  2. # CPack options
  3. #
  4. if(NETDATA_VERSION_DESCR STREQUAL "N/A")
  5. set(CPACK_PACKAGE_VERSION ${NETDATA_VERSION_MAJOR}.${NETDATA_VERSION_MINOR}.${NETDATA_VERSION_PATCH})
  6. else()
  7. set(CPACK_PACKAGE_VERSION ${NETDATA_VERSION_MAJOR}.${NETDATA_VERSION_MINOR}.${NETDATA_VERSION_PATCH}-${NETDATA_VERSION_TWEAK}-${NETDATA_VERSION_DESCR})
  8. endif()
  9. set(CPACK_THREADS 0)
  10. set(CPACK_STRIP_FILES NO)
  11. set(CPACK_DEBIAN_DEBUGINFO_PACKAGE NO)
  12. set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS YES)
  13. set(CPACK_PACKAGING_INSTALL_PREFIX "/")
  14. set(CPACK_PACKAGE_VENDOR "Netdata Inc.")
  15. set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE")
  16. set(CPACK_RESOURCE_FILE_README "${CMAKE_SOURCE_DIR}/README.md")
  17. set(CPACK_PACKAGE_INSTALL_DIRECTORY "netdata")
  18. set(CPACK_PACKAGE_DIRECTORY "${CMAKE_BINARY_DIR}/packages")
  19. # to silence lintian
  20. set(CPACK_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS
  21. OWNER_READ OWNER_WRITE OWNER_EXECUTE
  22. GROUP_READ GROUP_EXECUTE
  23. WORLD_READ WORLD_EXECUTE)
  24. #
  25. # Debian options
  26. #
  27. set(CPACK_DEB_COMPONENT_INSTALL YES)
  28. set(CPACK_DEBIAN_ENABLE_COMPONENT_DEPENDS YES)
  29. set(CPACK_DEBIAN_FILE_NAME DEB-DEFAULT)
  30. set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Netdata Builder <bot@netdata.cloud>")
  31. #
  32. # netdata
  33. #
  34. set(CPACK_COMPONENT_NETDATA_DESCRIPTION
  35. "real-time charts for system monitoring
  36. Netdata is a daemon that collects data in realtime (per second)
  37. and presents a web site to view and analyze them. The presentation
  38. is also real-time and full of interactive charts that precisely
  39. render all collected values.")
  40. set(CPACK_DEBIAN_NETDATA_PACKAGE_NAME "netdata")
  41. set(CPACK_DEBIAN_NETDATA_PACKAGE_SECTION "net")
  42. set(CPACK_DEBIAN_NETDATA_PACKAGE_PREDEPENDS "adduser, libcap2-bin")
  43. set(CPACK_DEBIAN_NETDATA_PACKAGE_SUGGESTS
  44. "netdata-plugin-cups, netdata-plugin-freeipmi")
  45. set(CPACK_DEBIAN_NETDATA_PACKAGE_RECOMMENDS
  46. "netdata-plugin-systemd-journal, \
  47. netdata-plugin-network-viewer")
  48. set(CPACK_DEBIAN_NETDATA_PACKAGE_CONFLICTS
  49. "netdata-core, netdata-plugins-bash, netdata-plugins-python, netdata-web")
  50. if(ENABLE_DASHBOARD)
  51. list(APPEND _main_deps "netdata-dashboard")
  52. endif()
  53. if(ENABLE_PLUGIN_CHARTS)
  54. list(APPEND _main_deps "netdata-plugin-chartsd")
  55. endif()
  56. if(ENABLE_PLUGIN_PYTHON)
  57. list(APPEND _main_deps "netdata-plugin-pythond")
  58. endif()
  59. if(ENABLE_PLUGIN_APPS)
  60. list(APPEND _main_deps "netdata-plugin-apps")
  61. endif()
  62. if(ENABLE_PLUGIN_GO)
  63. list(APPEND _main_deps "netdata-plugin-go")
  64. endif()
  65. if(ENABLE_PLUGIN_DEBUGFS)
  66. list(APPEND _main_deps "netdata-plugin-debugfs")
  67. endif()
  68. if(ENABLE_PLUGIN_NFACCT)
  69. list(APPEND _main_deps "netdata-plugin-nfacct")
  70. endif()
  71. if(ENABLE_PLUGIN_SLABINFO)
  72. list(APPEND _main_deps "netdata-plugin-slabinfo")
  73. endif()
  74. if(ENABLE_PLUGIN_PERF)
  75. list(APPEND _main_deps "netdata-plugin-perf")
  76. endif()
  77. if(ENABLE_PLUGIN_EBPF)
  78. list(APPEND _main_deps "netdata-plugin-ebpf")
  79. endif()
  80. list(JOIN _main_deps ", " CPACK_DEBIAN_NETDATA_PACKAGE_DEPENDS)
  81. set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA
  82. "${PKG_FILES_PATH}/deb/netdata/conffiles;"
  83. "${PKG_FILES_PATH}/deb/netdata/preinst"
  84. "${PKG_FILES_PATH}/deb/netdata/postinst"
  85. "${PKG_FILES_PATH}/deb/netdata/postrm")
  86. set(CPACK_DEBIAN_NETDATA_DEBUGINFO_PACKAGE On)
  87. #
  88. # dashboard
  89. #
  90. set(CPACK_COMPONENT_DASHBOARD_DEPENDS "netdata")
  91. set(CPACK_COMPONENT_DASHBOARD_DESCRIPTION
  92. "The local dashboard for the Netdata Agent.
  93. This allows access to the dashboard on the local node without internet access.")
  94. set(CPACK_DEBIAN_DASHBOARD_PACKAGE_NAME "netdata-dashboard")
  95. set(CPACK_DEBIAN_DASHBOARD_PACKAGE_SECTION "net")
  96. set(CPACK_DEBIAN_DASHBOARD_PACKAGE_CONFLICTS "netdata (<< ${CPACK_PACKAGE_VERSION})")
  97. set(CPACK_DEBIAN_DASHBOARD_PACKAGE_PREDEPENDS "adduser")
  98. set(CPACK_DEBIAN_DASHBOARD_PACKAGE_CONTROL_EXTRA
  99. "${PKG_FILES_PATH}/deb/plugin-apps/preinst"
  100. "${PKG_FILES_PATH}/deb/plugin-apps/postinst"
  101. "${PKG_FILES_PATH}/deb/plugin-apps/postrm")
  102. set(CPACK_DEBIAN_DASHBOARD_DEBUGINFO_PACKAGE Off)
  103. #
  104. # apps.plugin
  105. #
  106. set(CPACK_COMPONENT_PLUGIN-APPS_DEPENDS "netdata")
  107. set(CPACK_COMPONENT_PLUGIN-APPS_DESCRIPTION
  108. "The per-application metrics collector plugin for the Netdata Agent
  109. This plugin allows the Netdata Agent to collect per-application and
  110. per-user metrics without using cgroups.")
  111. set(CPACK_DEBIAN_PLUGIN-APPS_PACKAGE_NAME "netdata-plugin-apps")
  112. set(CPACK_DEBIAN_PLUGIN-APPS_PACKAGE_SECTION "net")
  113. set(CPACK_DEBIAN_PLUGIN-APPS_PACKAGE_CONFLICTS "netdata (<< 1.40)")
  114. set(CPACK_DEBIAN_PLUGIN-APPS_PACKAGE_PREDEPENDS "libcap2-bin, adduser")
  115. set(CPACK_DEBIAN_PLUGIN-APPS_PACKAGE_CONTROL_EXTRA
  116. "${PKG_FILES_PATH}/deb/plugin-apps/preinst;"
  117. "${PKG_FILES_PATH}/deb/plugin-apps/postinst")
  118. set(CPACK_DEBIAN_PLUGIN-APPS_DEBUGINFO_PACKAGE On)
  119. #
  120. # charts.d.plugin
  121. #
  122. set(CPACK_COMPONENT_PLUGIN-CHARTSD_DEPENDS "netdata")
  123. set(CPACK_COMPONENT_PLUGIN-CHARTSD_DESCRIPTION
  124. "The charts.d metrics collection plugin for the Netdata Agent
  125. This plugin adds a selection of additional collectors written in shell
  126. script to the Netdata Agent. It includes collectors for APCUPSD,
  127. LibreSWAN, OpenSIPS, and Wireless access point statistics.")
  128. set(CPACK_DEBIAN_PLUGIN-CHARTSD_PACKAGE_NAME "netdata-plugin-chartsd")
  129. set(CPACK_DEBIAN_PLUGIN-CHARTSD_PACKAGE_SECTION "net")
  130. set(CPACK_DEBIAN_PLUGIN-CHARTSD_PACKAGE_CONFLICTS "netdata (<< 1.40)")
  131. set(CPACK_DEBIAN_PLUGIN-CHARTSD_PACKAGE_PREDEPENDS "adduser")
  132. set(CPACK_DEBIAN_PLUGIN-CHARTSD_PACKAGE_DEPENDS "bash")
  133. set(CPACK_DEBIAN_PLUGIN-CHARTSD_PACKAGE_ARCHITECTURE "all")
  134. set(CPACK_DEBIAN_PLUGIN-CHARTSD_PACKAGE_SUGGESTS "apcupsd, iw, sudo")
  135. set(CPACK_DEBIAN_PLUGIN-CHARTSD_PACKAGE_CONTROL_EXTRA
  136. "${PKG_FILES_PATH}/deb/plugin-chartsd/preinst;"
  137. "${PKG_FILES_PATH}/deb/plugin-chartsd/postinst")
  138. set(CPACK_DEBIAN_PLUGIN-CHARTSD_DEBUGINFO_PACKAGE Off)
  139. #
  140. # cups.plugin
  141. #
  142. set(CPACK_COMPONENT_PLUGIN-CUPS_DEPENDS "netdata")
  143. set(CPACK_COMPONENT_PLUGIN-CUPS_DESCRIPTION
  144. "The CUPS metrics collection plugin for the Netdata Agent
  145. This plugin allows the Netdata Agent to collect metrics from the Common UNIX Printing System.")
  146. set(CPACK_DEBIAN_PLUGIN-CUPS_PACKAGE_NAME "netdata-plugin-cups")
  147. set(CPACK_DEBIAN_PLUGIN-CUPS_PACKAGE_SECTION "net")
  148. set(CPACK_DEBIAN_PLUGIN-CUPS_PACKAGE_PREDEPENDS "adduser")
  149. set(CPACK_DEBIAN_PLUGIN-CUPS_PACKAGE_CONTROL_EXTRA
  150. "${PKG_FILES_PATH}/deb/plugin-cups/preinst;"
  151. "${PKG_FILES_PATH}/deb/plugin-cups/postinst")
  152. set(CPACK_DEBIAN_PLUGIN-CUPS_DEBUGINFO_PACKAGE On)
  153. #
  154. # debugfs.plugin
  155. #
  156. set(CPACK_COMPONENT_PLUGIN-DEBUGFS_DEPENDS "netdata")
  157. set(CPACK_COMPONENT_PLUGIN-DEBUGFS_DESCRIPTION
  158. "The debugfs metrics collector for the Netdata Agent
  159. This plugin allows the Netdata Agent to collect Linux kernel metrics
  160. exposed through debugfs.")
  161. set(CPACK_DEBIAN_PLUGIN-DEBUGFS_PACKAGE_NAME "netdata-plugin-debugfs")
  162. set(CPACK_DEBIAN_PLUGIN-DEBUGFS_PACKAGE_SECTION "net")
  163. set(CPACK_DEBIAN_PLUGIN-DEBUGFS_PACKAGE_CONFLICTS "netdata (<< 1.40)")
  164. set(CPACK_DEBIAN_PLUGIN-DEBUGFS_PACKAGE_PREDEPENDS "libcap2-bin, adduser")
  165. set(CPACK_DEBIAN_PLUGIN-DEBUGFS_PACKAGE_CONTROL_EXTRA
  166. "${PKG_FILES_PATH}/deb/plugin-debugfs/preinst;"
  167. "${PKG_FILES_PATH}/deb/plugin-debugfs/postinst")
  168. set(CPACK_DEBIAN_PLUGIN-DEBUGFS_DEBUGINFO_PACKAGE On)
  169. #
  170. # ebpf.plugin
  171. #
  172. set(CPACK_COMPONENT_PLUGIN-EBPF_DEPENDS "netdata")
  173. set(CPACK_COMPONENT_PLUGIN-EBPF_DESCRIPTION
  174. "The eBPF metrics collection plugin for the Netdata Agent
  175. This plugin allows the Netdata Agent to use eBPF code to collect more
  176. detailed kernel-level metrics for the system.")
  177. set(CPACK_DEBIAN_PLUGIN-EBPF_PACKAGE_NAME "netdata-plugin-ebpf")
  178. set(CPACK_DEBIAN_PLUGIN-EBPF_PACKAGE_SECTION "net")
  179. set(CPACK_DEBIAN_PLUGIN-EBPF_PACKAGE_CONFLICTS "netdata (<< 1.40)")
  180. set(CPACK_DEBIAN_PLUGIN-EBPF_PACKAGE_PREDEPENDS "adduser")
  181. set(CPACK_DEBIAN_PLUGIN-EBPF_PACKAGE_RECOMMENDS "netdata-plugin-apps (= ${CPACK_PACKAGE_VERSION}), netdata-ebpf-code-legacy (= ${CPACK_PACKAGE_VERSION})")
  182. set(CPACK_DEBIAN_PLUGIN-EBPF_PACKAGE_CONTROL_EXTRA
  183. "${PKG_FILES_PATH}/deb/plugin-ebpf/preinst;"
  184. "${PKG_FILES_PATH}/deb/plugin-ebpf/postinst")
  185. set(CPACK_DEBIAN_PLUGIN-EBPF_DEBUGINFO_PACKAGE On)
  186. #
  187. # ebpf-code-legacy
  188. #
  189. set(CPACK_COMPONENT_EBPF-CODE-LEGACY_DEPENDS "netdata")
  190. set(CPACK_COMPONENT_EBPF-CODE-LEGACY_DESCRIPTION
  191. "Compiled eBPF legacy code for the Netdata eBPF plugin
  192. This package provides the pre-compiled eBPF legacy code for use by
  193. the Netdata eBPF plugin. This code is only needed when using the eBPF
  194. plugin with kernel that do not include BTF support (mostly kernel
  195. versions lower than 5.10).")
  196. set(CPACK_DEBIAN_EBPF-CODE-LEGACY_PACKAGE_NAME "netdata-ebpf-code-legacy")
  197. set(CPACK_DEBIAN_EBPF-CODE-LEGACY_PACKAGE_SECTION "net")
  198. set(CPACK_DEBIAN_EBPF-CODE-LEGACY_PACKAGE_CONFLICTS "netdata (<< 1.40)")
  199. set(CPACK_DEBIAN_EBPF-CODE-LEGACY_PACKAGE_PREDEPENDS "adduser")
  200. set(CPACK_DEBIAN_EBPF-CODE-LEGACY_PACKAGE_RECOMMENDS "netdata-plugin-ebpf (= ${CPACK_PACKAGE_VERSION})")
  201. set(CPACK_DEBIAN_EBPF-CODE-LEGACY_PACKAGE_CONTROL_EXTRA
  202. "${PKG_FILES_PATH}/deb/ebpf-code-legacy/preinst;"
  203. "${PKG_FILES_PATH}/deb/ebpf-code-legacy/postinst")
  204. set(CPACK_DEBIAN_EBPF-CODE-LEGACY_DEBUGINFO_PACKAGE Off)
  205. #
  206. # freeipmi.plugin
  207. #
  208. set(CPACK_COMPONENT_PLUGIN-FREEIPMI_DEPENDS "netdata")
  209. set(CPACK_COMPONENT_PLUGIN-FREEIPMI_DESCRIPTION
  210. "The FreeIPMI metrics collection plugin for the Netdata Agent
  211. This plugin allows the Netdata Agent to collect metrics from hardware
  212. using FreeIPMI.")
  213. set(CPACK_DEBIAN_PLUGIN-FREEIPMI_PACKAGE_NAME "netdata-plugin-freeipmi")
  214. set(CPACK_DEBIAN_PLUGIN-FREEIPMI_PACKAGE_SECTION "net")
  215. set(CPACK_DEBIAN_PLUGIN-FREEIPMI_PACKAGE_PREDEPENDS "adduser")
  216. set(CPACK_DEBIAN_PLUGIN-FREEIPMI_PACKAGE_CONTROL_EXTRA
  217. "${PKG_FILES_PATH}/deb/plugin-freeipmi/preinst;"
  218. "${PKG_FILES_PATH}/deb/plugin-freeipmi/postinst")
  219. set(CPACK_DEBIAN_PLUGIN-FREEIPMI_DEBUGINFO_PACKAGE On)
  220. #
  221. # go.plugin
  222. #
  223. set(CPACK_COMPONENT_PLUGIN-GO_DEPENDS "netdata")
  224. set(CPACK_COMPONENT_PLUGIN-GO_DESCRIPTION
  225. "The go.d metrics collection plugin for the Netdata Agent
  226. This plugin adds a selection of additional collectors written in Go to
  227. the Netdata Agent. A significant percentage of the application specific
  228. collectors provided by Netdata are part of this plugin, so most users
  229. will want it installed.")
  230. set(CPACK_DEBIAN_PLUGIN-GO_PACKAGE_NAME "netdata-plugin-go")
  231. set(CPACK_DEBIAN_PLUGIN-GO_PACKAGE_SECTION "net")
  232. set(CPACK_DEBIAN_PLUGIN-GO_PACKAGE_CONFLICTS "netdata (<< 1.40)")
  233. set(CPACK_DEBIAN_PLUGIN-GO_PACKAGE_PREDEPENDS "libcap2-bin, adduser")
  234. set(CPACK_DEBIAN_PLUGIN-GO_PACKAGE_SUGGESTS "nvme-cli")
  235. set(CPACK_DEBIAN_PLUGIN-GO_PACKAGE_CONTROL_EXTRA
  236. "${PKG_FILES_PATH}/deb/plugin-go/preinst;"
  237. "${PKG_FILES_PATH}/deb/plugin-go/postinst")
  238. set(CPACK_DEBIAN_PLUGIN-GO_DEBUGINFO_PACKAGE Off)
  239. #
  240. # network-viewer.plugin
  241. #
  242. # TODO: recommends netdata-plugin-ebpf
  243. set(CPACK_COMPONENT_PLUGIN-NETWORK-VIEWER_DEPENDS "netdata")
  244. set(CPACK_COMPONENT_PLUGIN-NETWORK-VIEWER_DESCRIPTION
  245. "The network viewer plugin for the Netdata Agent
  246. This plugin allows the Netdata Agent to provide network connection
  247. mapping functionality for use in Netdata Cloud.")
  248. set(CPACK_DEBIAN_PLUGIN-NETWORK_VIEWER_PACKAGE_NAME "netdata-plugin-network-viewer")
  249. set(CPACK_DEBIAN_PLUGIN-NETWORK-VIEWER_PACKAGE_SECTION "net")
  250. set(CPACK_DEBIAN_PLUGIN-NETWORK-VIEWER_PACKAGE_PREDEPENDS "libcap2-bin, adduser")
  251. set(CPACK_DEBIAN_PLUGIN-NETWORK-VIEWER_PACKAGE_RECOMMENDS "netdata-plugin-ebpf (= ${CPACK_PACKAGE_VERSION})")
  252. set(CPACK_DEBIAN_PLUGIN-NETWORK-VIEWER_PACKAGE_CONTROL_EXTRA
  253. "${PKG_FILES_PATH}/deb/plugin-network-viewer/preinst;"
  254. "${PKG_FILES_PATH}/deb/plugin-network-viewer/postinst")
  255. set(CPACK_DEBIAN_PLUGIN-NETWORK-VIEWER_DEBUGINFO_PACKAGE On)
  256. #
  257. # nfacct.plugin
  258. #
  259. set(CPACK_COMPONENT_PLUGIN-NFACCT_DEPENDS "netdata")
  260. set(CPACK_COMPONENT_PLUGIN-NFACCT_DESCRIPTION
  261. "The NFACCT metrics collection plugin for the Netdata Agent
  262. This plugin allows the Netdata Agent to collect metrics from the firewall
  263. using NFACCT objects.")
  264. set(CPACK_DEBIAN_PLUGIN-NFACCT_PACKAGE_NAME "netdata-plugin-nfacct")
  265. set(CPACK_DEBIAN_PLUGIN-NFACCT_PACKAGE_SECTION "net")
  266. set(CPACK_DEBIAN_PLUGIN-NFACCT_PACKAGE_CONFLICTS "netdata (<< 1.40)")
  267. set(CPACK_DEBIAN_PLUGIN-NFACCT_PACKAGE_PREDEPENDS "adduser")
  268. set(CPACK_DEBIAN_PLUGIN-NFACCT_PACKAGE_CONTROL_EXTRA
  269. "${PKG_FILES_PATH}/deb/plugin-nfacct/preinst;"
  270. "${PKG_FILES_PATH}/deb/plugin-nfacct/postinst")
  271. set(CPACK_DEBIAN_PLUGIN-NFACCT_DEBUGINFO_PACKAGE On)
  272. #
  273. # perf.plugin
  274. #
  275. set(CPACK_COMPONENT_PLUGIN-PERF_DEPENDS "netdata")
  276. set(CPACK_COMPONENT_PLUGIN-PERF_DESCRIPTION
  277. "The perf metrics collector for the Netdata Agent
  278. This plugin allows the Netdata to collect metrics from the Linux perf
  279. subsystem.")
  280. set(CPACK_DEBIAN_PLUGIN-PERF_PACKAGE_NAME "netdata-plugin-perf")
  281. set(CPACK_DEBIAN_PLUGIN-PERF_PACKAGE_SECTION "net")
  282. set(CPACK_DEBIAN_PLUGIN-PERF_PACKAGE_CONFLICTS "netdata (<< 1.40)")
  283. set(CPACK_DEBIAN_PLUGIN-PERF_PACKAGE_PREDEPENDS "libcap2-bin, adduser")
  284. set(CPACK_DEBIAN_PLUGIN-PERF_PACKAGE_CONTROL_EXTRA
  285. "${PKG_FILES_PATH}/deb/plugin-perf/preinst;"
  286. "${PKG_FILES_PATH}/deb/plugin-perf/postinst")
  287. set(CPACK_DEBIAN_PLUGIN-PERF_DEBUGINFO_PACKAGE On)
  288. #
  289. # pythond.plugin
  290. #
  291. set(CPACK_COMPONENT_PLUGIN-PYTHOND_DEPENDS "netdata")
  292. set(CPACK_COMPONENT_PLUGIN-PYTHOND_DESCRIPTION
  293. "The python.d metrics collection plugin for the Netdata Agent
  294. Many of the collectors provided by this package are also available
  295. in netdata-plugin-god. In msot cases, you probably want to use those
  296. versions instead of the Python versions.")
  297. set(CPACK_DEBIAN_PLUGIN-PYTHOND_PACKAGE_NAME "netdata-plugin-pythond")
  298. set(CPACK_DEBIAN_PLUGIN-PYTHOND_PACKAGE_SECTION "net")
  299. set(CPACK_DEBIAN_PLUGIN-PYTHOND_PACKAGE_CONFLICTS "netdata (<< 1.40)")
  300. set(CPACK_DEBIAN_PLUGIN-PYTHOND_PACKAGE_PREDEPENDS "adduser")
  301. set(CPACK_DEBIAN_PLUGIN-PYTHOND_PACKAGE_SUGGESTS "sudo")
  302. set(CPACK_DEBIAN_PLUGIN-PYTHOND_PACHAGE_DEPENDS "python3")
  303. set(CPACK_DEBIAN_PLUGIN-PYTHOND_PACKAGE_ARCHITECTURE "all")
  304. set(CPACK_DEBIAN_PLUGIN-PYTHOND_PACKAGE_CONTROL_EXTRA
  305. "${PKG_FILES_PATH}/deb/plugin-pythond/preinst;"
  306. "${PKG_FILES_PATH}/deb/plugin-pythond/postinst")
  307. set(CPACK_DEBIAN_PLUGIN-PYTHOND_DEBUGINFO_PACKAGE Off)
  308. #
  309. # slabinfo.plugin
  310. #
  311. set(CPACK_COMPONENT_PLUGIN-SLABINFO_DEPENDS "netdata")
  312. set(CPACK_COMPONENT_PLUGIN-SLABINFO_DESCRIPTION
  313. "The slabinfo metrics collector for the Netdata Agent
  314. This plugin allows the Netdata Agent to collect perfromance and
  315. utilization metrics for the Linux kernel’s SLAB allocator.")
  316. set(CPACK_DEBIAN_PLUGIN-SLABINFO_PACKAGE_NAME "netdata-plugin-slabinfo")
  317. set(CPACK_DEBIAN_PLUGIN-SLABINFO_PACKAGE_SECTION "net")
  318. set(CPACK_DEBIAN_PLUGIN-SLABINFO_PACKAGE_CONFLICTS "netdata (<< 1.40)")
  319. set(CPACK_DEBIAN_PLUGIN-SLABINFO_PACKAGE_PREDEPENDS "libcap2-bin, adduser")
  320. set(CPACK_DEBIAN_PLUGIN-SLABINFO_PACKAGE_CONTROL_EXTRA
  321. "${PKG_FILES_PATH}/deb/plugin-slabinfo/preinst;"
  322. "${PKG_FILES_PATH}/deb/plugin-slabinfo/postinst")
  323. set(CPACK_DEBIAN_PLUGIN-SLABINFO_DEBUGINFO_PACKAGE On)
  324. #
  325. # systemd-journal.plugin
  326. #
  327. set(CPACK_COMPONENT_PLUGIN-SYSTEMD-JOURNAL_DEPENDS "netdata")
  328. set(CPACK_COMPONENT_PLUGIN-SYSTEMD-JOURNAL_DESCRIPTION
  329. "The systemd-journal collector for the Netdata Agent
  330. This plugin allows the Netdata Agent to present logs from the systemd
  331. journal on Netdata Cloud or the local Agent dashboard.")
  332. set(CPACK_DEBIAN_PLUGIN-SYSTEMD-JOURNAL_PACKAGE_NAME "netdata-plugin-systemd-journal")
  333. set(CPACK_DEBIAN_PLUGIN-SYSTEMD-JOURNAL_PACKAGE_SECTION "net")
  334. set(CPACK_DEBIAN_PLUGIN-SYSTEMD-JOURNAL_PACKAGE_PREDEPENDS "libcap2-bin, adduser")
  335. set(CPACK_DEBIAN_PLUGIN-SYSTEMD-JOURNAL_PACKAGE_CONTROL_EXTRA
  336. "${PKG_FILES_PATH}/deb/plugin-systemd-journal/preinst;"
  337. "${PKG_FILES_PATH}/deb/plugin-systemd-journal/postinst")
  338. set(CPACK_DEBIAN_PLUGIN-SYSTEMD_JOURNAL_DEBUGINFO_PACKAGE On)
  339. #
  340. # xenstat.plugin
  341. #
  342. set(CPACK_COMPONENT_PLUGIN-XENSTAT_DEPENDS "netdata")
  343. set(CPACK_COMPONENT_PLUGIN-XENSTAT_DESCRIPTION
  344. "The xenstat plugin for the Netdata Agent
  345. This plugin allows the Netdata Agent to collect metrics from the Xen
  346. Hypervisor.")
  347. set(CPACK_DEBIAN_PLUGIN-XENSTAT_PACKAGE_NAME "netdata-plugin-xenstat")
  348. set(CPACK_DEBIAN_PLUGIN-XENSTAT_PACKAGE_SECTION "net")
  349. set(CPACK_DEBIAN_PLUGIN-XENSTAT_PACKAGE_CONFLICTS "netdata (<< 1.40)")
  350. set(CPACK_DEBIAN_PLUGIN-XENSTAT_PACKAGE_PREDEPENDS "adduser")
  351. set(CPACK_DEBIAN_PLUGIN-XENSTAT_PACKAGE_CONTROL_EXTRA
  352. "${PKG_FILES_PATH}/deb/plugin-xenstat/preinst;"
  353. "${PKG_FILES_PATH}/deb/plugin-xenstat/postinst")
  354. set(CPACK_DEBIAN_PLUGIN-XENSTAT_DEBUGINFO_PACKAGE On)
  355. #
  356. # CPack components
  357. #
  358. list(APPEND CPACK_COMPONENTS_ALL "netdata")
  359. if(ENABLE_DASHBOARD)
  360. list(APPEND CPACK_COMPONENTS_ALL "dashboard")
  361. endif()
  362. if(ENABLE_PLUGIN_APPS)
  363. list(APPEND CPACK_COMPONENTS_ALL "plugin-apps")
  364. endif()
  365. if(ENABLE_PLUGIN_CHARTS)
  366. list(APPEND CPACK_COMPONENTS_ALL "plugin-chartsd")
  367. endif()
  368. if(ENABLE_PLUGIN_CUPS)
  369. list(APPEND CPACK_COMPONENTS_ALL "plugin-cups")
  370. endif()
  371. if(ENABLE_PLUGIN_DEBUGFS)
  372. list(APPEND CPACK_COMPONENTS_ALL "plugin-debugfs")
  373. endif()
  374. if(ENABLE_PLUGIN_EBPF)
  375. list(APPEND CPACK_COMPONENTS_ALL "plugin-ebpf")
  376. endif()
  377. if(ENABLE_EBPF_LEGACY_PROGRAMS)
  378. list(APPEND CPACK_COMPONENTS_ALL "ebpf-code-legacy")
  379. endif()
  380. if(ENABLE_PLUGIN_FREEIPMI)
  381. list(APPEND CPACK_COMPONENTS_ALL "plugin-freeipmi")
  382. endif()
  383. if(ENABLE_PLUGIN_GO)
  384. list(APPEND CPACK_COMPONENTS_ALL "plugin-go")
  385. endif()
  386. if(ENABLE_PLUGIN_NETWORK_VIEWER)
  387. list(APPEND CPACK_COMPONENTS_ALL "plugin-network-viewer")
  388. endif()
  389. if(ENABLE_PLUGIN_NFACCT)
  390. list(APPEND CPACK_COMPONENTS_ALL "plugin-nfacct")
  391. endif()
  392. if(ENABLE_PLUGIN_PERF)
  393. list(APPEND CPACK_COMPONENTS_ALL "plugin-perf")
  394. endif()
  395. if(ENABLE_PLUGIN_PYTHON)
  396. list(APPEND CPACK_COMPONENTS_ALL "plugin-pythond")
  397. endif()
  398. if(ENABLE_PLUGIN_SLABINFO)
  399. list(APPEND CPACK_COMPONENTS_ALL "plugin-slabinfo")
  400. endif()
  401. if(ENABLE_PLUGIN_SYSTEMD_JOURNAL)
  402. list(APPEND CPACK_COMPONENTS_ALL "plugin-systemd-journal")
  403. endif()
  404. if(ENABLE_PLUGIN_XENSTAT)
  405. list(APPEND CPACK_COMPONENTS_ALL "plugin-xenstat")
  406. endif()
  407. include(CPack)