summaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-06-14 19:20:33 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-06-14 19:20:33 +0000
commit6cf8f2d5174a53f582e61d715edbb88d6e3367cc (patch)
tree78cec0fd8d09c4a6a052461d42f4b2be3af6d396 /contrib
parentAdding upstream version 1.39.1. (diff)
downloadnetdata-upstream/1.40.0.tar.xz
netdata-upstream/1.40.0.zip
Adding upstream version 1.40.0.upstream/1.40.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'contrib')
-rw-r--r--contrib/debian/control148
-rw-r--r--contrib/debian/netdata-ebpf-code-legacy.postinst13
-rw-r--r--contrib/debian/netdata-ebpf-code-legacy.preinst13
-rw-r--r--contrib/debian/netdata-plugin-apps.postinst14
-rw-r--r--contrib/debian/netdata-plugin-apps.preinst13
-rw-r--r--contrib/debian/netdata-plugin-chartsd.postinst13
-rw-r--r--contrib/debian/netdata-plugin-chartsd.preinst13
-rw-r--r--contrib/debian/netdata-plugin-debugfs.postinst14
-rw-r--r--contrib/debian/netdata-plugin-debugfs.preinst13
-rw-r--r--contrib/debian/netdata-plugin-ebpf.postinst14
-rw-r--r--contrib/debian/netdata-plugin-ebpf.preinst13
-rw-r--r--contrib/debian/netdata-plugin-freeipmi.postinst14
-rw-r--r--contrib/debian/netdata-plugin-freeipmi.preinst13
-rw-r--r--contrib/debian/netdata-plugin-go.postinst14
-rw-r--r--contrib/debian/netdata-plugin-go.preinst13
-rw-r--r--contrib/debian/netdata-plugin-nfacct.postinst14
-rw-r--r--contrib/debian/netdata-plugin-nfacct.preinst13
-rw-r--r--contrib/debian/netdata-plugin-perf.postinst18
-rw-r--r--contrib/debian/netdata-plugin-perf.preinst13
-rw-r--r--contrib/debian/netdata-plugin-pythond.postinst13
-rw-r--r--contrib/debian/netdata-plugin-pythond.preinst13
-rw-r--r--contrib/debian/netdata-plugin-slabinfo.postinst14
-rw-r--r--contrib/debian/netdata-plugin-slabinfo.preinst13
-rw-r--r--contrib/debian/netdata.postinst38
-rw-r--r--contrib/debian/netdata.preinst23
-rwxr-xr-xcontrib/debian/rules104
26 files changed, 552 insertions, 59 deletions
diff --git a/contrib/debian/control b/contrib/debian/control
index eeeb8d25c..f326c4b90 100644
--- a/contrib/debian/control
+++ b/contrib/debian/control
@@ -32,17 +32,28 @@ 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 [amd64],
+ netdata-plugin-apps,
+ netdata-plugin-pythond,
+ netdata-plugin-go,
+ netdata-plugin-debugfs,
+ netdata-plugin-nfacct,
+ netdata-plugin-chartsd,
+ netdata-plugin-slabinfo,
+ netdata-plugin-perf
+Pre-Depends: adduser,
+ dpkg (>= 1.17.14),
+ libcap2-bin (>=1:2.0),
+ lsb-base (>= 3.1-23.2)
Conflicts: netdata-core,
netdata-plugins-bash,
netdata-plugins-python,
netdata-web
-Pre-Depends: dpkg (>= 1.17.14)
+Suggests: netdata-plugin-cups,
+ netdata-plugin-freeipmi
Description: real-time charts for system monitoring
Netdata is a daemon that collects data in realtime (per second)
and presents a web site to view and analyze them. The presentation
@@ -53,15 +64,128 @@ Package: netdata-plugin-cups
Architecture: any
Depends: cups,
${shlibs:Depends},
- netdata (>= ${source:Version})
-Description: The Common Unix Printing System plugin for metrics collection from cupsd
+ netdata (= ${source:Version})
+Pre-Depends: adduser
+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.
Package: netdata-plugin-freeipmi
Architecture: any
Depends: freeipmi,
${shlibs:Depends},
netdata (= ${source:Version})
-Description: FreeIPMI - The Intelligent Platform Management System.
- The IPMI specification defines a set of interfaces for platform management.
- It is implemented by a number vendors for system management. The features of IPMI that most users will be interested in
- are sensor monitoring, system event monitoring, power control, and serial-over-LAN (SOL).
+Pre-Depends: adduser
+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})
+Pre-Depends: adduser
+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
+ using NFACCT objects.
+
+Package: netdata-plugin-chartsd
+Architecture: all
+Depends: bash,
+ netdata (= ${source:Version})
+Pre-Depends: adduser
+Conflicts: netdata (<< ${source:Version})
+Suggests: apcupsd, nut, iw, sudo
+Description: The charts.d metrics collection plugin for the Netdata Agent
+ This plugin adds a selection of additional collectors written in shell
+ script to the Netdata Agent. It includes collectors for NUT, APCUPSD,
+ LibreSWAN, OpenSIPS, and Wireless access point statistics.
+
+Package: netdata-plugin-ebpf
+Architecture: amd64
+Depends: ${shlibs:Depends},
+ netdata (= ${source:Version}),
+ netdata-ebpf-code-legacy (= ${source:Version})
+Pre-Depends: adduser
+Recommends: netdata-plugin-apps (= ${source:Version})
+Conflicts: netdata (<< ${source:Version})
+Description: The eBPF metrics collection plugin for the Netdata Agent
+ This plugin allows the Netdata Agent to use eBPF code to collect more
+ detailed kernel-level metrics for the system.
+
+Package: netdata-ebpf-code-legacy
+Architecture: amd64
+Depends: netdata-plugin-ebpf (= ${source:Version})
+Pre-Depends: adduser
+Conflicts: netdata (<< ${source:Version})
+Description: Compiled eBPF legacy code for the Netdata eBPF plugin
+ This package provides the pre-compiled eBPF legacy code for use by
+ the Netdata eBPF plugin. This code is only needed when using the eBPF
+ plugin with kernel that do not include BTF support (mostly kernel
+ versions lower than 5.10)..
+
+Package: netdata-plugin-pythond
+Architecture: all
+Depends: ${shlibs:Depends},
+ netdata (= ${source:Version})
+Pre-Depends: adduser
+Suggests: sudo
+Conflicts: netdata (<< ${source:Version})
+Description: The python.d metrics collection plugin for the Netdata Agent
+ Many of the collectors provided by this package are also available
+ in netdata-plugin-god. In msot cases, you probably want to use those
+ versions instead of the Python versions.
+
+Package: netdata-plugin-go
+Architecture: any
+Depends: ${shlibs:Depends},
+ netdata (= ${source:Version})
+Pre-Depends: libcap2-bin, adduser
+Suggests: nvme-cli, sudo
+Conflicts: netdata (<< ${source:Version})
+Description: The go.d metrics collection plugin for the Netdata Agent
+ This plugin adds a selection of additional collectors written in Go to
+ the Netdata Agent. A significant percentage of the application specific
+ collectors provided by Netdata are part of this plugin, so most users
+ will want it installed.
+
+Package: netdata-plugin-apps
+Architecture: any
+Depends: ${shlibs:Depends},
+ netdata (= ${source:Version})
+Pre-Depends: libcap2-bin, adduser
+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
+ per-user metrics without using cgroups.
+
+Package: netdata-plugin-slabinfo
+Architecture: any
+Depends: ${shlibs:Depends},
+ netdata (= ${source:Version})
+Pre-Depends: libcap2-bin, adduser
+Conflicts: netdata (<< ${source:Version})
+Description: The slabinfo metrics collector for the Netdata Agent
+ This plugin allows the Netdata Agent to collect perfromance and
+ utilization metrics for the Linux kernel’s SLAB allocator.
+
+Package: netdata-plugin-perf
+Architecture: any
+Depends: ${shlibs:Depends},
+ netdata (= ${source:Version})
+Pre-Depends: libcap2-bin, adduser
+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
+ subsystem.
+
+Package: netdata-plugin-debugfs
+Architecture: any
+Depends: ${shlibs:Debends},
+ netdata (= ${source:Version})
+Pre-Depends: libcap2-bin, adduser
+Conflicts: netdata (<< ${source:Version})
+Description: The debugfs metrics collector for the Netdata Agent
+ This plugin allows the Netdata Agent to collect Linux kernel metrics
+ exposed through debugfs.
diff --git a/contrib/debian/netdata-ebpf-code-legacy.postinst b/contrib/debian/netdata-ebpf-code-legacy.postinst
new file mode 100644
index 000000000..b82532286
--- /dev/null
+++ b/contrib/debian/netdata-ebpf-code-legacy.postinst
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+set -e
+
+case "$1" in
+ configure|reconfigure)
+ grep /usr/libexec/netdata /var/lib/dpkg/info/netdata-ebpf-code-legacy.list | xargs -n 30 chown root:netdata
+ ;;
+esac
+
+#DEBHELPER#
+
+exit 0
diff --git a/contrib/debian/netdata-ebpf-code-legacy.preinst b/contrib/debian/netdata-ebpf-code-legacy.preinst
new file mode 100644
index 000000000..fcabb415a
--- /dev/null
+++ b/contrib/debian/netdata-ebpf-code-legacy.preinst
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+set -e
+
+case "$1" in
+ install)
+ if ! getent group netdata > /dev/null; then
+ addgroup --quiet --system netdata
+ fi
+ ;;
+esac
+
+#DEBHELPER#
diff --git a/contrib/debian/netdata-plugin-apps.postinst b/contrib/debian/netdata-plugin-apps.postinst
new file mode 100644
index 000000000..04f914538
--- /dev/null
+++ b/contrib/debian/netdata-plugin-apps.postinst
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+set -e
+
+case "$1" in
+ configure|reconfigure)
+ chown root:netdata /usr/libexec/netdata/plugins.d/apps.plugin
+ setcap "cap_dac_read_search=eip cap_sys_ptrace=eip" /usr/libexec/netdata/plugins.d/apps.plugin
+ ;;
+esac
+
+#DEBHELPER#
+
+exit 0
diff --git a/contrib/debian/netdata-plugin-apps.preinst b/contrib/debian/netdata-plugin-apps.preinst
new file mode 100644
index 000000000..fcabb415a
--- /dev/null
+++ b/contrib/debian/netdata-plugin-apps.preinst
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+set -e
+
+case "$1" in
+ install)
+ if ! getent group netdata > /dev/null; then
+ addgroup --quiet --system netdata
+ fi
+ ;;
+esac
+
+#DEBHELPER#
diff --git a/contrib/debian/netdata-plugin-chartsd.postinst b/contrib/debian/netdata-plugin-chartsd.postinst
new file mode 100644
index 000000000..1871bfef6
--- /dev/null
+++ b/contrib/debian/netdata-plugin-chartsd.postinst
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+set -e
+
+case "$1" in
+ configure|reconfigure)
+ grep /usr/libexec/netdata /var/lib/dpkg/info/netdata-plugin-chartsd.list | xargs -n 30 chown root:netdata
+ ;;
+esac
+
+#DEBHELPER#
+
+exit 0
diff --git a/contrib/debian/netdata-plugin-chartsd.preinst b/contrib/debian/netdata-plugin-chartsd.preinst
new file mode 100644
index 000000000..fcabb415a
--- /dev/null
+++ b/contrib/debian/netdata-plugin-chartsd.preinst
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+set -e
+
+case "$1" in
+ install)
+ if ! getent group netdata > /dev/null; then
+ addgroup --quiet --system netdata
+ fi
+ ;;
+esac
+
+#DEBHELPER#
diff --git a/contrib/debian/netdata-plugin-debugfs.postinst b/contrib/debian/netdata-plugin-debugfs.postinst
new file mode 100644
index 000000000..75d08fd17
--- /dev/null
+++ b/contrib/debian/netdata-plugin-debugfs.postinst
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+set -e
+
+case "$1" in
+ configure|reconfigure)
+ chown root:netdata /usr/libexec/netdata/plugins.d/debugfs.plugin
+ setcap "cap_dac_read_search=eip" /usr/libexec/netdata/plugins.d/debugfs.plugin
+ ;;
+esac
+
+#DEBHELPER#
+
+exit 0
diff --git a/contrib/debian/netdata-plugin-debugfs.preinst b/contrib/debian/netdata-plugin-debugfs.preinst
new file mode 100644
index 000000000..fcabb415a
--- /dev/null
+++ b/contrib/debian/netdata-plugin-debugfs.preinst
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+set -e
+
+case "$1" in
+ install)
+ if ! getent group netdata > /dev/null; then
+ addgroup --quiet --system netdata
+ fi
+ ;;
+esac
+
+#DEBHELPER#
diff --git a/contrib/debian/netdata-plugin-ebpf.postinst b/contrib/debian/netdata-plugin-ebpf.postinst
new file mode 100644
index 000000000..2458d6d6c
--- /dev/null
+++ b/contrib/debian/netdata-plugin-ebpf.postinst
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+set -e
+
+case "$1" in
+ configure|reconfigure)
+ chown root:netdata /usr/libexec/netdata/plugins.d/ebpf.plugin
+ chmod -f 4750 /usr/libexec/netdata/plugins.d/ebpf.plugin
+ ;;
+esac
+
+#DEBHELPER#
+
+exit 0
diff --git a/contrib/debian/netdata-plugin-ebpf.preinst b/contrib/debian/netdata-plugin-ebpf.preinst
new file mode 100644
index 000000000..fcabb415a
--- /dev/null
+++ b/contrib/debian/netdata-plugin-ebpf.preinst
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+set -e
+
+case "$1" in
+ install)
+ if ! getent group netdata > /dev/null; then
+ addgroup --quiet --system netdata
+ fi
+ ;;
+esac
+
+#DEBHELPER#
diff --git a/contrib/debian/netdata-plugin-freeipmi.postinst b/contrib/debian/netdata-plugin-freeipmi.postinst
new file mode 100644
index 000000000..9e88d406a
--- /dev/null
+++ b/contrib/debian/netdata-plugin-freeipmi.postinst
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+set -e
+
+case "$1" in
+ configure|reconfigure)
+ chown root:netdata /usr/libexec/netdata/plugins.d/freeipmi.plugin
+ chmod -f 4750 /usr/libexec/netdata/plugins.d/freeipmi.plugin
+ ;;
+esac
+
+#DEBHELPER#
+
+exit 0
diff --git a/contrib/debian/netdata-plugin-freeipmi.preinst b/contrib/debian/netdata-plugin-freeipmi.preinst
new file mode 100644
index 000000000..fcabb415a
--- /dev/null
+++ b/contrib/debian/netdata-plugin-freeipmi.preinst
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+set -e
+
+case "$1" in
+ install)
+ if ! getent group netdata > /dev/null; then
+ addgroup --quiet --system netdata
+ fi
+ ;;
+esac
+
+#DEBHELPER#
diff --git a/contrib/debian/netdata-plugin-go.postinst b/contrib/debian/netdata-plugin-go.postinst
new file mode 100644
index 000000000..9cfce16f6
--- /dev/null
+++ b/contrib/debian/netdata-plugin-go.postinst
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+set -e
+
+case "$1" in
+ configure|reconfigure)
+ chown root:netdata /usr/libexec/netdata/plugins.d/go.d.plugin
+ setcap "cap_net_admin=eip cap_net_raw=eip" /usr/libexec/netdata/plugins.d/go.d.plugin
+ ;;
+esac
+
+#DEBHELPER#
+
+exit 0
diff --git a/contrib/debian/netdata-plugin-go.preinst b/contrib/debian/netdata-plugin-go.preinst
new file mode 100644
index 000000000..fcabb415a
--- /dev/null
+++ b/contrib/debian/netdata-plugin-go.preinst
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+set -e
+
+case "$1" in
+ install)
+ if ! getent group netdata > /dev/null; then
+ addgroup --quiet --system netdata
+ fi
+ ;;
+esac
+
+#DEBHELPER#
diff --git a/contrib/debian/netdata-plugin-nfacct.postinst b/contrib/debian/netdata-plugin-nfacct.postinst
new file mode 100644
index 000000000..3fa37641f
--- /dev/null
+++ b/contrib/debian/netdata-plugin-nfacct.postinst
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+set -e
+
+case "$1" in
+ configure|reconfigure)
+ chown root:netdata /usr/libexec/netdata/plugins.d/nfacct.plugin
+ chmod -f 4750 /usr/libexec/netdata/plugins.d/nfacct.plugin
+ ;;
+esac
+
+#DEBHELPER#
+
+exit 0
diff --git a/contrib/debian/netdata-plugin-nfacct.preinst b/contrib/debian/netdata-plugin-nfacct.preinst
new file mode 100644
index 000000000..fcabb415a
--- /dev/null
+++ b/contrib/debian/netdata-plugin-nfacct.preinst
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+set -e
+
+case "$1" in
+ install)
+ if ! getent group netdata > /dev/null; then
+ addgroup --quiet --system netdata
+ fi
+ ;;
+esac
+
+#DEBHELPER#
diff --git a/contrib/debian/netdata-plugin-perf.postinst b/contrib/debian/netdata-plugin-perf.postinst
new file mode 100644
index 000000000..5250275cc
--- /dev/null
+++ b/contrib/debian/netdata-plugin-perf.postinst
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+set -e
+
+case "$1" in
+ configure|reconfigure)
+ chown root:netdata /usr/libexec/netdata/plugins.d/perf.plugin
+ if capsh --supports=cap_perfmon 2>/dev/null; then
+ setcap cap_perfmon+ep /usr/libexec/netdata/plugins.d/perf.plugin
+ else
+ setcap cap_sys_admin+ep /usr/libexec/netdata/plugins.d/perf.plugin
+ fi
+ ;;
+esac
+
+#DEBHELPER#
+
+exit 0
diff --git a/contrib/debian/netdata-plugin-perf.preinst b/contrib/debian/netdata-plugin-perf.preinst
new file mode 100644
index 000000000..fcabb415a
--- /dev/null
+++ b/contrib/debian/netdata-plugin-perf.preinst
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+set -e
+
+case "$1" in
+ install)
+ if ! getent group netdata > /dev/null; then
+ addgroup --quiet --system netdata
+ fi
+ ;;
+esac
+
+#DEBHELPER#
diff --git a/contrib/debian/netdata-plugin-pythond.postinst b/contrib/debian/netdata-plugin-pythond.postinst
new file mode 100644
index 000000000..fc4ac504e
--- /dev/null
+++ b/contrib/debian/netdata-plugin-pythond.postinst
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+set -e
+
+case "$1" in
+ configure|reconfigure)
+ grep /usr/libexec/netdata /var/lib/dpkg/info/netdata-plugin-pythond.list | xargs -n 30 chown root:netdata
+ ;;
+esac
+
+#DEBHELPER#
+
+exit 0
diff --git a/contrib/debian/netdata-plugin-pythond.preinst b/contrib/debian/netdata-plugin-pythond.preinst
new file mode 100644
index 000000000..fcabb415a
--- /dev/null
+++ b/contrib/debian/netdata-plugin-pythond.preinst
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+set -e
+
+case "$1" in
+ install)
+ if ! getent group netdata > /dev/null; then
+ addgroup --quiet --system netdata
+ fi
+ ;;
+esac
+
+#DEBHELPER#
diff --git a/contrib/debian/netdata-plugin-slabinfo.postinst b/contrib/debian/netdata-plugin-slabinfo.postinst
new file mode 100644
index 000000000..b697e724e
--- /dev/null
+++ b/contrib/debian/netdata-plugin-slabinfo.postinst
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+set -e
+
+case "$1" in
+ configure|reconfigure)
+ chown root:netdata /usr/libexec/netdata/plugins.d/slabinfo.plugin
+ setcap "cap_dac_read_search=eip" /usr/libexec/netdata/plugins.d/slabinfo.plugin
+ ;;
+esac
+
+#DEBHELPER#
+
+exit 0
diff --git a/contrib/debian/netdata-plugin-slabinfo.preinst b/contrib/debian/netdata-plugin-slabinfo.preinst
new file mode 100644
index 000000000..fcabb415a
--- /dev/null
+++ b/contrib/debian/netdata-plugin-slabinfo.preinst
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+set -e
+
+case "$1" in
+ install)
+ if ! getent group netdata > /dev/null; then
+ addgroup --quiet --system netdata
+ fi
+ ;;
+esac
+
+#DEBHELPER#
diff --git a/contrib/debian/netdata.postinst b/contrib/debian/netdata.postinst
index 5cce2c3d1..15ffeaf7b 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
@@ -58,28 +39,11 @@ case "$1" in
dpkg-statoverride --force --update --add root netdata 0775 /var/lib/netdata/registry > /dev/null 2>&1
- chown -R root:netdata /usr/libexec/netdata/plugins.d
- setcap cap_dac_read_search,cap_sys_ptrace+ep /usr/libexec/netdata/plugins.d/apps.plugin
- setcap cap_dac_read_search+ep /usr/libexec/netdata/plugins.d/slabinfo.plugin
-
- if capsh --supports=cap_perfmon 2>/dev/null; then
- setcap cap_perfmon+ep /usr/libexec/netdata/plugins.d/perf.plugin
- else
- setcap cap_sys_admin+ep /usr/libexec/netdata/plugins.d/perf.plugin
- fi
-
- if [ -f "/usr/libexec/netdata/plugins.d/go.d.plugin" ]; then
- setcap "cap_net_admin+epi cap_net_raw=eip" /usr/libexec/netdata/plugins.d/go.d.plugin
- fi
+ grep /usr/libexec/netdata /var/lib/dpkg/info/netdata.list | xargs -n 30 chown root:netdata
chmod 4750 /usr/libexec/netdata/plugins.d/cgroup-network
- chmod 4750 /usr/libexec/netdata/plugins.d/nfacct.plugin
-
- # Workaround if system does not have ebpf.plugin
- chmod -f 4750 /usr/libexec/netdata/plugins.d/ebpf.plugin || true
# Workaround for other plugins not installed directly by this package
- chmod -f 4750 /usr/libexec/netdata/plugins.d/freeipmi.plugin || true
chmod -f 4750 /usr/libexec/netdata/plugins.d/ioping || true
;;
diff --git a/contrib/debian/netdata.preinst b/contrib/debian/netdata.preinst
index 3bbdea0b3..a5dc9107e 100644
--- a/contrib/debian/netdata.preinst
+++ b/contrib/debian/netdata.preinst
@@ -15,4 +15,27 @@ dpkg-maintscript-helper dir_to_symlink \
dpkg-maintscript-helper dir_to_symlink \
/var/lib/netdata/www/static /usr/share/netdata/www/static 1.18.1~ netdata -- "$@"
+case "$1" in
+ install)
+ 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#
diff --git a/contrib/debian/rules b/contrib/debian/rules
index 149b19ec7..314424fcb 100755
--- a/contrib/debian/rules
+++ b/contrib/debian/rules
@@ -15,7 +15,7 @@ else
SYSTEMD_UNIT = system/systemd/netdata.service
endif
-ifeq ($(shell test `uname -m` != "x86_64" && echo "1"), 1)
+ifeq ($(shell test ${DEB_TARGET_ARCH} != "amd64" && echo "1"), 1)
HAVE_EBPF = 0
EBPF_CONFIG = --disable-ebpf
else
@@ -60,6 +60,71 @@ override_dh_install:
mv -f $(TEMPTOP)/usr/libexec/netdata/plugins.d/freeipmi.plugin \
$(TOP)-plugin-freeipmi/usr/libexec/netdata/plugins.d/freeipmi.plugin
+ # Add free IPMI plugin install rules
+ #
+ mkdir -p $(TOP)-plugin-nfacct/usr/libexec/netdata/plugins.d
+ mv -f $(TEMPTOP)/usr/libexec/netdata/plugins.d/nfacct.plugin \
+ $(TOP)-plugin-nfacct/usr/libexec/netdata/plugins.d/nfacct.plugin
+
+ # Add charts.d plugin install rules
+ #
+ mkdir -p $(TOP)-plugin-chartsd/usr/libexec/netdata/plugins.d/
+ mkdir -p $(TOP)-plugin-chartsd/usr/lib/netdata/conf.d/
+ mv -f $(TEMPTOP)/usr/libexec/netdata/plugins.d/charts.d.plugin \
+ $(TOP)-plugin-chartsd/usr/libexec/netdata/plugins.d/charts.d.plugin
+ mv -f $(TEMPTOP)/usr/libexec/netdata/plugins.d/charts.d.dryrun-helper.sh \
+ $(TOP)-plugin-chartsd/usr/libexec/netdata/plugins.d/charts.d.dryrun-helper.sh
+ mv -f $(TEMPTOP)/usr/libexec/netdata/charts.d \
+ $(TOP)-plugin-chartsd/usr/libexec/netdata/charts.d
+ mv -f $(TEMPTOP)/usr/lib/netdata/conf.d/charts.d.conf \
+ $(TOP)-plugin-chartsd/usr/lib/netdata/conf.d/charts.d.conf
+ mv -f $(TEMPTOP)/usr/lib/netdata/conf.d/charts.d \
+ $(TOP)-plugin-chartsd/usr/lib/netdata/conf.d/charts.d
+
+ # Add ebpf plugin install rules
+ if [ $(HAVE_EBPF) -eq 1 ]; then \
+ mkdir -p $(TOP)-plugin-ebpf/usr/libexec/netdata/plugins.d/; \
+ mkdir -p $(TOP)-plugin-ebpf/usr/lib/netdata/conf.d/; \
+ mv -f $(TEMPTOP)/usr/libexec/netdata/plugins.d/ebpf.plugin $(TOP)-plugin-ebpf/usr/libexec/netdata/plugins.d/ebpf.plugin; \
+ mv -f $(TEMPTOP)/usr/lib/netdata/conf.d/ebpf.d.conf $(TOP)-plugin-ebpf/usr/lib/netdata/conf.d/ebpf.d.conf; \
+ mv -f $(TEMPTOP)/usr/lib/netdata/conf.d/ebpf.d $(TOP)-plugin-ebpf/usr/lib/netdata/conf.d/ebpf.d; \
+ fi
+
+ # Add python plugin install rules
+ mkdir -p $(TOP)-plugin-pythond/usr/libexec/netdata/plugins.d/
+ mkdir -p $(TOP)-plugin-pythond/usr/lib/netdata/conf.d/
+ mv -f $(TEMPTOP)/usr/libexec/netdata/plugins.d/python.d.plugin \
+ $(TOP)-plugin-pythond/usr/libexec/netdata/plugins.d/python.d.plugin
+ mv -f $(TEMPTOP)/usr/libexec/netdata/python.d \
+ $(TOP)-plugin-pythond/usr/libexec/netdata/python.d
+ mv -f $(TEMPTOP)/usr/lib/netdata/conf.d/python.d.conf \
+ $(TOP)-plugin-pythond/usr/lib/netdata/conf.d/python.d.conf
+ mv -f $(TEMPTOP)/usr/lib/netdata/conf.d/python.d \
+ $(TOP)-plugin-pythond/usr/lib/netdata/conf.d/python.d
+
+ # Add apps plugin install rules
+ mkdir -p $(TOP)-plugin-apps/usr/libexec/netdata/plugins.d/
+ mkdir -p $(TOP)-plugin-apps/usr/lib/netdata/conf.d/
+ mv -f $(TEMPTOP)/usr/libexec/netdata/plugins.d/apps.plugin \
+ $(TOP)-plugin-apps/usr/libexec/netdata/plugins.d/apps.plugin
+ mv -f $(TEMPTOP)/usr/lib/netdata/conf.d/apps_groups.conf \
+ $(TOP)-plugin-apps/usr/lib/netdata/conf.d/apps_groups.conf
+
+ # Add slabinfo plugin install rules
+ mkdir -p $(TOP)-plugin-slabinfo/usr/libexec/netdata/plugins.d/
+ mv -f $(TEMPTOP)/usr/libexec/netdata/plugins.d/slabinfo.plugin \
+ $(TOP)-plugin-slabinfo/usr/libexec/netdata/plugins.d/slabinfo.plugin
+
+ # Add perf plugin install rules
+ mkdir -p $(TOP)-plugin-perf/usr/libexec/netdata/plugins.d/
+ mv -f $(TEMPTOP)/usr/libexec/netdata/plugins.d/perf.plugin \
+ $(TOP)-plugin-perf/usr/libexec/netdata/plugins.d/perf.plugin
+
+ # Add debugfs plugin install rules
+ mkdir -p $(TOP)-plugin-debugfs/usr/libexec/netdata/plugins.d/
+ mv -f $(TEMPTOP)/usr/libexec/netdata/plugins.d/debugfs.plugin \
+ $(TOP)-plugin-debugfs/usr/libexec/netdata/plugins.d/debugfs.plugin
+
# Set the rest of the software in the main package
#
cp -rp $(TEMPTOP)/usr $(TOP)
@@ -82,13 +147,20 @@ override_dh_install:
ln -s "/usr/share/netdata/www/$$D" "$(TOP)/var/lib/netdata/www/$$D"; \
done
+ # Handle eBPF code
+ #
if [ $(HAVE_EBPF) -eq 1 ]; then \
- packaging/bundle-ebpf.sh . ${TOP}/usr/libexec/netdata/plugins.d; \
+ mkdir -p $(TOP)-ebpf-code-legacy/usr/libexec/netdata/plugins.d/; \
+ packaging/bundle-ebpf.sh . ${TOP}-ebpf-code-legacy/usr/libexec/netdata/plugins.d/ force; \
fi
- # Install go
+ # Install go to it's own package directory
#
- debian/install_go.sh $$(cat ${CURDIR}/packaging/go.d.version) $(TOP)/usr/lib/netdata $(TOP)/usr/libexec/netdata
+ mkdir -p $(TOP)-plugin-go/usr/lib/netdata/conf.d
+ mkdir -p $(TOP)-plugin-go/usr/libexec/netdata/plugins.d
+ debian/install_go.sh $$(cat ${CURDIR}/packaging/go.d.version) \
+ $(TOP)-plugin-go/usr/lib/netdata \
+ $(TOP)-plugin-go/usr/libexec/netdata
override_dh_installdocs:
dh_installdocs
@@ -109,13 +181,22 @@ override_dh_fixperms:
#
chmod 0755 $(TOP)/usr/libexec/netdata/netdata-updater.sh
+ # debugfs plugin
+ chmod 0750 $(TOP)-plugin-debugfs/usr/libexec/netdata/plugins.d/debugfs.plugin
+
# apps.plugin should only be runnable by the netdata user. It will be
# given extra capabilities in the postinst script.
#
- chmod 0750 $(TOP)/usr/libexec/netdata/plugins.d/apps.plugin
- chmod 0750 $(TOP)/usr/libexec/netdata/plugins.d/perf.plugin
- chmod 0750 $(TOP)/usr/libexec/netdata/plugins.d/slabinfo.plugin
- chmod 0750 $(TOP)/usr/libexec/netdata/plugins.d/go.d.plugin
+ chmod 0750 $(TOP)-plugin-apps/usr/libexec/netdata/plugins.d/apps.plugin
+
+ # slabinfo package
+ chmod 0750 $(TOP)-plugin-slabinfo/usr/libexec/netdata/plugins.d/slabinfo.plugin
+
+ # perf package
+ chmod 0750 $(TOP)-plugin-perf/usr/libexec/netdata/plugins.d/perf.plugin
+
+ # Go plugin package
+ chmod 0750 $(TOP)-plugin-go/usr/libexec/netdata/plugins.d/go.d.plugin
# CUPS plugin package
chmod 0750 $(TOP)-plugin-cups/usr/libexec/netdata/plugins.d/cups.plugin
@@ -123,6 +204,9 @@ override_dh_fixperms:
# freeIPMI plugin package
chmod 4750 $(TOP)-plugin-freeipmi/usr/libexec/netdata/plugins.d/freeipmi.plugin
+ # NFACCT plugin package
+ chmod 4750 $(TOP)-plugin-nfacct/usr/libexec/netdata/plugins.d/nfacct.plugin
+
override_dh_installlogrotate:
cp system/logrotate/netdata debian/netdata.logrotate
dh_installlogrotate
@@ -137,5 +221,5 @@ override_dh_clean:
# Tidy up copied/generated files
#
- -[ -r $(CURDIR)/debian/netdata.logrotate ] && rm $(CURDIR)/debian/netdata.logrotate
- -[ -r $(CURDIR)/debian/netdata.conffiles ] && rm $(CURDIR)/debian/netdata.conffiles
+ [ -r $(CURDIR)/debian/netdata.logrotate ] && rm $(CURDIR)/debian/netdata.logrotate ; true
+ [ -r $(CURDIR)/debian/netdata.conffiles ] && rm $(CURDIR)/debian/netdata.conffiles ; true