@cryptotaxi247 / netdata-1 / commits / e704b912d

Clean up DEB package dependencies. (#17680)

* Clean up DEB package dependencies. - dpkg is an implicit dependency for all DEB packages by virtue of them being DEB packages, and we do not support any platforms that have an old enough version to be an issue, so we don’t need a versioned dependency on it either, so simply drop the explicit dependency on dpkg. - We also don’t support any platforms that ship an old enough version of libcap2-bin to cause us problems, so remove the version constraint on that as well. - The lsb-base predepend is only needed if the user is using a non-systemd init system. We don’t fully support this setup with our native packages, and it’s a non-default configuration for Debian and completely unsupported on Ubuntu, so it’s safe to assume that the user knows what they are doing if they need it and not explicitly require this. - The apps plugin was missed in #17584, so fix it’s conflicts line here. - The chartsd plugin _requires_ bash to function correctly, so actually depend on it instead of recommending it (this will be a no-op on a vast majority of systems, but is still useful insurance against users doing stupid things). - The CUPS and FreeIPMI plugins both pull in all the things they actually need via automatic dependency generation, so there is no reason for us to pull in full installs of CUPS or FreeIPMI as dependencies. - Everything in the Go plugin that was using `sudo` has been converted to use `ndsudo` instead, so we don’t need to ask for `sudo` at all for it anymore. - The Python plguin _requires_ Python to function correctly, so actually depend on it instead of recommending it. * Fix typo.

Austin S. Hemmelgarn committed May 22, 2024 at 11:15 UTC e704b912dacb3a954f5d026475834c218513468c
1 file changed +5 -8
packaging/cmake/Modules/Packaging.cmake
+5 -8
@@ -48,8 +48,7 @@ set(CPACK_COMPONENT_NETDATA_DESCRIPTION
48
49 set(CPACK_DEBIAN_NETDATA_PACKAGE_NAME "netdata")
50 set(CPACK_DEBIAN_NETDATA_PACKAGE_SECTION "net")
51 -set(CPACK_DEBIAN_NETDATA_PACKAGE_PREDEPENDS
52 - "adduser, dpkg (>= 1.17.14), libcap2-bin (>=1:2.0), lsb-base (>= 3.1-23.2)")
51 +set(CPACK_DEBIAN_NETDATA_PACKAGE_PREDEPENDS "adduser, libcap2-bin")
52 set(CPACK_DEBIAN_NETDATA_PACKAGE_SUGGESTS
53 "netdata-plugin-cups (= ${CPACK_PACKAGE_VERSION}), netdata-plugin-freeipmi (= ${CPACK_PACKAGE_VERSION})")
54 set(CPACK_DEBIAN_NETDATA_PACKAGE_RECOMMENDS
@@ -112,7 +111,7 @@ set(CPACK_COMPONENT_PLUGIN-APPS_DESCRIPTION
111
112 set(CPACK_DEBIAN_PLUGIN-APPS_PACKAGE_NAME "netdata-plugin-apps")
113 set(CPACK_DEBIAN_PLUGIN-APPS_PACKAGE_SECTION "net")
115 -set(CPACK_DEBIAN_PLUGIN-APPS_PACKAGE_CONFLICTS "netdata (<< ${CPACK_PACKAGE_VERSION})")
114 +set(CPACK_DEBIAN_PLUGIN-APPS_PACKAGE_CONFLICTS "netdata (<< 1.40)")
115 set(CPACK_DEBIAN_PLUGIN-APPS_PACKAGE_PREDEPENDS "libcap2-bin, adduser")
116
117 set(CPACK_DEBIAN_PLUGIN-APPS_PACKAGE_CONTROL_EXTRA
@@ -136,7 +135,7 @@ set(CPACK_DEBIAN_PLUGIN-CHARTSD_PACKAGE_NAME "netdata-plugin-chartsd")
135 set(CPACK_DEBIAN_PLUGIN-CHARTSD_PACKAGE_SECTION "net")
136 set(CPACK_DEBIAN_PLUGIN-CHARTSD_PACKAGE_CONFLICTS "netdata (<< 1.40)")
137 set(CPACK_DEBIAN_PLUGIN-CHARTSD_PACKAGE_PREDEPENDS "adduser")
139 -set(CPACK_DEBIAN_PLUGIN-CHARTSD_PACKAGE_RECOMMENDS "bash")
138 +set(CPACK_DEBIAN_PLUGIN-CHARTSD_PACKAGE_DEPENDS "bash")
139 set(CPACK_DEBIAN_PLUGIN-CHARTSD_PACKAGE_ARCHITECTURE "all")
140 set(CPACK_DEBIAN_PLUGIN-CHARTSD_PACKAGE_SUGGESTS "apcupsd, iw, sudo")
141
@@ -157,7 +156,6 @@ set(CPACK_COMPONENT_PLUGIN-CUPS_DESCRIPTION
156
157 set(CPACK_DEBIAN_PLUGIN-CUPS_PACKAGE_NAME "netdata-plugin-cups")
158 set(CPACK_DEBIAN_PLUGIN-CUPS_PACKAGE_SECTION "net")
160 -set(CPACK_DEBIAN_PLUGIN-CUPS_PACKAGE_DEPENDS "cups")
159 set(CPACK_DEBIAN_PLUGIN-CUPS_PACKAGE_PREDEPENDS "adduser")
160 set(CPACK_DEBIAN_PLUGIN-CUPS_PACKAGE_CONTROL_EXTRA
161 "${CMAKE_SOURCE_DIR}/packaging/cmake/control/cups/preinst;"
@@ -243,7 +241,6 @@ set(CPACK_COMPONENT_PLUGIN-FREEIPMI_DESCRIPTION
241
242 set(CPACK_DEBIAN_PLUGIN-FREEIPMI_PACKAGE_NAME "netdata-plugin-freeipmi")
243 set(CPACK_DEBIAN_PLUGIN-FREEIPMI_PACKAGE_SECTION "net")
246 -set(CPACK_DEBIAN_PLUGIN-FREEIPMI_PACKAGE_DEPENDS "freeipmi")
244 set(CPACK_DEBIAN_PLUGIN-FREEIPMI_PACKAGE_PREDEPENDS "adduser")
245
246 set(CPACK_DEBIAN_PLUGIN-FREEIPMI_PACKAGE_CONTROL_EXTRA
@@ -268,7 +265,7 @@ set(CPACK_DEBIAN_PLUGIN-GO_PACKAGE_NAME "netdata-plugin-go")
265 set(CPACK_DEBIAN_PLUGIN-GO_PACKAGE_SECTION "net")
266 set(CPACK_DEBIAN_PLUGIN-GO_PACKAGE_CONFLICTS "netdata (<< 1.40)")
267 set(CPACK_DEBIAN_PLUGIN-GO_PACKAGE_PREDEPENDS "libcap2-bin, adduser")
271 -set(CPACK_DEBIAN_PLUGIN-GO_PACKAGE_SUGGESTS "nvme-cli, sudo")
268 +set(CPACK_DEBIAN_PLUGIN-GO_PACKAGE_SUGGESTS "nvme-cli")
269
270 set(CPACK_DEBIAN_PLUGIN-GO_PACKAGE_CONTROL_EXTRA
271 "${CMAKE_SOURCE_DIR}/packaging/cmake/control/go.d/preinst;"
@@ -376,7 +373,7 @@ set(CPACK_DEBIAN_PLUGIN-PYTHOND_PACKAGE_SECTION "net")
373 set(CPACK_DEBIAN_PLUGIN-PYTHOND_PACKAGE_CONFLICTS "netdata (<< 1.40)")
374 set(CPACK_DEBIAN_PLUGIN-PYTHOND_PACKAGE_PREDEPENDS "adduser")
375 set(CPACK_DEBIAN_PLUGIN-PYTHOND_PACKAGE_SUGGESTS "sudo")
379 -set(CPACK_DEBIAN_PLUGIN-PYTHOND_PACHAGE_RECOMMENDS "python3")
376 +set(CPACK_DEBIAN_PLUGIN-PYTHOND_PACHAGE_DEPENDS "python3")
377 set(CPACK_DEBIAN_PLUGIN-PYTHOND_PACKAGE_ARCHITECTURE "all")
378
379 set(CPACK_DEBIAN_PLUGIN-PYTHOND_PACKAGE_CONTROL_EXTRA