summaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorAustin S. Hemmelgarn <austin@netdata.cloud>2023-06-07 16:59:26 -0400
committerGitHub <noreply@github.com>2023-06-07 16:59:26 -0400
commit4d5a1945d4e613757dbbd2ecfa105856bf0af0d7 (patch)
tree8676dc48fcf2cdebf974c2e5c7d2eed4674e61e2 /contrib
parent66c85460199dbf65aad09cdfcdbae25c6bde265b (diff)
Make plugin packages hard dependencies. (#15160)
* Make plugin packages hard dependencies. May (hopefully) be reverted eventually, but for now this should resolve most if not all, of the current problems with native packages. * Fix typo in Debian control file. * Fix package test script. * Fix dependency ordering for DEB plugin packages. * Fix CUPS RPM dependency. * Fix package test script again. * Fix RPM nfacct plugin deps. * Split out user and group handling for DEB packages. This is needed to make the plugin package dependencies work correctly. * Final fix for package test script. * Fix permissions handling for RPM package. * Fix typo in spec file. * Fix another typo in RPM spec file.
Diffstat (limited to 'contrib')
-rw-r--r--contrib/debian/control90
-rw-r--r--contrib/debian/netdata-base.postinst30
-rw-r--r--contrib/debian/netdata.postinst19
3 files changed, 79 insertions, 60 deletions
diff --git a/contrib/debian/control b/contrib/debian/control
index e88928605b..d41d301447 100644
--- a/contrib/debian/control
+++ b/contrib/debian/control
@@ -32,27 +32,24 @@ Homepage: https://netdata.cloud
Package: netdata
Architecture: any
-Depends: adduser,
- libcap2-bin (>= 1:2.0),
- lsb-base (>= 3.1-23.2),
- openssl,
+Depends: openssl,
${misc:Depends},
- ${shlibs:Depends}
+ ${shlibs:Depends},
+ netdata-plugin-ebpf,
+ netdata-plugin-apps,
+ netdata-plugin-pythond,
+ netdata-plugin-go,
+ netdata-plugin-debugfs,
+ netdata-plugin-nfacct,
+ netdata-plugin-chartsd,
+ netdata-plugin-slabinfo,
+ netdata-plugin-perf
Conflicts: netdata-core,
netdata-plugins-bash,
netdata-plugins-python,
netdata-web
-Recommends: netdata-plugin-ebpf,
- netdata-plugin-apps,
- netdata-plugin-pythond,
- netdata-plugin-go,
- netdata-plugin-debugfs
Suggests: netdata-plugin-cups,
- netdata-plugin-freeipmi,
- netdata-plugin-nfacct,
- netdata-plugin-chartsd,
- netdata-plugin-slabinfo,
- netdata-plugin-perf
+ netdata-plugin-freeipmi
Pre-Depends: dpkg (>= 1.17.14)
Description: real-time charts for system monitoring
Netdata is a daemon that collects data in realtime (per second)
@@ -60,11 +57,21 @@ Description: real-time charts for system monitoring
is also real-time and full of interactive charts that precisely
render all collected values.
+Package: netdata-base
+Architecture: all
+Pre-Depends: adduser,
+ dpkg (>= 1.17.14),
+ libcap2-bin (>=1:2.0),
+ lsb-base (>= 3.1-23.2),
+ ${misc:Depends},
+Description: Base system configuration for Netdata packages
+ This package handles setup of users and groups for Netdata and it’s plugins.
+
Package: netdata-plugin-cups
Architecture: any
Depends: cups,
${shlibs:Depends},
- netdata (= ${source:Version})
+Pre-Depends: netdata-base (= ${source:Version})
Description: The CUPS metrics collection plugin for the Netdata Agent
This plugin allows the Netdata Agent to collect metrics from the Common
UNIX Printing System.
@@ -72,16 +79,16 @@ Description: The CUPS metrics collection plugin for the Netdata Agent
Package: netdata-plugin-freeipmi
Architecture: any
Depends: freeipmi,
- ${shlibs:Depends},
- netdata (= ${source:Version})
+ ${shlibs:Depends}
+Pre-Depends: netdata-base (= ${source:Version})
Description: The FreeIPMI metrics collection plugin for the Netdata Agent
This plugin allows the Netdata Agent to collect metrics from hardware
using FreeIPMI.
Package: netdata-plugin-nfacct
Architecture: any
-Depends: ${shlibs:Depends},
- netdata (= ${source:Version})
+Depends: ${shlibs:Depends}
+Pre-Depends: netdata-base (= ${source:Version})
Conflicts: netdata (<< ${source:Version})
Description: The NFACCT metrics collection plugin for the Netdata Agent
This plugin allows the Netdata Agent to collect metrics from the firewall
@@ -89,8 +96,8 @@ Description: The NFACCT metrics collection plugin for the Netdata Agent
Package: netdata-plugin-chartsd
Architecture: all
-Depends: bash,
- netdata (= ${source:Version})
+Depends: bash
+Pre-Depends: netdata-base (= ${source:Version})
Conflicts: netdata (<< ${source:Version})
Suggests: apcupsd, nut, iw, sudo
Description: The charts.d metrics collection plugin for the Netdata Agent
@@ -100,8 +107,8 @@ Description: The charts.d metrics collection plugin for the Netdata Agent
Package: netdata-plugin-ebpf
Architecture: amd64
-Depends: ${shlibs:Depends},
- netdata (= ${source:Version})
+Depends: ${shlibs:Depends}
+Pre-Depends: netdata-base (= ${source:Version})
Recommends: netdata-ebpf-code-legacy (= ${source:Version}),
netdata-plugin-apps (= ${source:Version})
Conflicts: netdata (<< ${source:Version})
@@ -111,6 +118,7 @@ Description: The eBPF metrics collection plugin for the Netdata Agent
Package: netdata-ebpf-code-legacy
Architecture: amd64
+Pre-Depends: netdata-base (= ${source:Version})
Depends: netdata-plugin-ebpf (= ${source:Version})
Conflicts: netdata (<< ${source:Version})
Description: Compiled eBPF legacy code for the Netdata eBPF plugin
@@ -121,8 +129,8 @@ Description: Compiled eBPF legacy code for the Netdata eBPF plugin
Package: netdata-plugin-pythond
Architecture: all
-Depends: ${shlibs:Depends},
- netdata (= ${source:Version})
+Depends: ${shlibs:Depends}
+Pre-Depends: netdata-base (= ${source:Version})
Suggests: sudo
Conflicts: netdata (<< ${source:Version})
Description: The python.d metrics collection plugin for the Netdata Agent
@@ -132,9 +140,9 @@ Description: The python.d metrics collection plugin for the Netdata Agent
Package: netdata-plugin-go
Architecture: any
-Depends: ${shlibs:Depends},
- libcap2-bin,
- netdata (= ${source:Version})
+Depends: ${shlibs:Depends}
+Pre-Depends: libcap2-bin,
+ netdata-base (= ${source:Version})
Suggests: nvme-cli, sudo
Conflicts: netdata (<< ${source:Version})
Description: The go.d metrics collection plugin for the Netdata Agent
@@ -145,9 +153,9 @@ Description: The go.d metrics collection plugin for the Netdata Agent
Package: netdata-plugin-apps
Architecture: any
-Depends: ${shlibs:Depends},
- libcap2-bin,
- netdata (= ${source:Version})
+Depends: ${shlibs:Depends}
+Pre-Depends: libcap2-bin,
+ netdata-base (= ${source:Version})
Conflicts: netdata (<< ${source:Version})
Description: The per-application metrics collection plugin for the Netdata Agent
This plugin allows the Netdata Agent to collect per-application and
@@ -155,9 +163,9 @@ Description: The per-application metrics collection plugin for the Netdata Agent
Package: netdata-plugin-slabinfo
Architecture: any
-Depends: ${shlibs:Depends},
- libcap2-bin,
- netdata (= ${source:Version})
+Depends: ${shlibs:Depends}
+Pre-Depends: libcap2-bin,
+ netdata-base (= ${source:Version})
Conflicts: netdata (<< ${source:Version})
Description: The slabinfo metrics collector for the Netdata Agent
This plugin allows the Netdata Agent to collect perfromance and
@@ -165,9 +173,9 @@ Description: The slabinfo metrics collector for the Netdata Agent
Package: netdata-plugin-perf
Architecture: any
-Depends: ${shlibs:Depends},
- libcap2-bin,
- netdata (= ${source:Version})
+Depends: ${shlibs:Depends}
+Pre-Depends: libcap2-bin,
+ netdata-base (= ${source:Version})
Conflicts: netdata (<< ${source:Version})
Description: The perf metrics collector for the Netdata Agent
This plugin allows the Netdata to collect metrics from the Linux perf
@@ -175,9 +183,9 @@ Description: The perf metrics collector for the Netdata Agent
Package: netdata-plugin-debugfs
Architecture: any
-Depends: ${shlibs:Debends},
- libcap2-bin,
- netdata (= ${source:Version})
+Depends: ${shlibs:Debends}
+Pre-Depends: libcap2-bin,
+ netdata-base (= ${source:Version})
Conflicts: netdata (<< ${source:Version})
Description: The debugfs metrics collector for the Netdata Agent
This plugin allows the Netdata Agent to collect Linux kernel metrics
diff --git a/contrib/debian/netdata-base.postinst b/contrib/debian/netdata-base.postinst
new file mode 100644
index 0000000000..70927b1ca1
--- /dev/null
+++ b/contrib/debian/netdata-base.postinst
@@ -0,0 +1,30 @@
+#!/bin/sh
+
+set -e
+
+case "$1" in
+ configure|reconfigure)
+ if ! getent group netdata > /dev/null; then
+ addgroup --quiet --system netdata
+ fi
+
+ if ! getent passwd netdata > /dev/null; then
+ adduser --quiet --system --ingroup netdata --home /var/lib/netdata --no-create-home netdata
+ fi
+
+ for item in docker nginx varnish haproxy adm nsd proxy squid ceph nobody I2C; do
+ if getent group $item > /dev/null 2>&1; then
+ usermod -a -G $item netdata
+ fi
+ done
+ # Netdata must be able to read /etc/pve/qemu-server/* and /etc/pve/lxc/*
+ # for reading VMs/containers names, CPU and memory limits on Proxmox.
+ if [ -d "/etc/pve" ] && getent group "www-data" > /dev/null 2>&1; then
+ usermod -a -G www-data netdata
+ fi
+ ;;
+esac
+
+##DEBHELPER##
+
+exit 0
diff --git a/contrib/debian/netdata.postinst b/contrib/debian/netdata.postinst
index d1909a67b3..0b9e98b9cb 100644
--- a/contrib/debian/netdata.postinst
+++ b/contrib/debian/netdata.postinst
@@ -17,25 +17,6 @@ dpkg-maintscript-helper dir_to_symlink \
case "$1" in
configure|reconfigure)
- if ! getent group netdata > /dev/null; then
- addgroup --quiet --system netdata
- fi
-
- if ! getent passwd netdata > /dev/null; then
- adduser --quiet --system --ingroup netdata --home /var/lib/netdata --no-create-home netdata
- fi
-
- for item in docker nginx varnish haproxy adm nsd proxy squid ceph nobody I2C; do
- if getent group $item > /dev/null 2>&1; then
- usermod -a -G $item netdata
- fi
- done
- # Netdata must be able to read /etc/pve/qemu-server/* and /etc/pve/lxc/*
- # for reading VMs/containers names, CPU and memory limits on Proxmox.
- if [ -d "/etc/pve" ] && getent group "www-data" > /dev/null 2>&1; then
- usermod -a -G www-data netdata
- fi
-
if ! dpkg-statoverride --list /var/lib/netdata > /dev/null 2>&1; then
dpkg-statoverride --update --add netdata netdata 0755 /var/lib/netdata
fi