From 11ca4da04e39599b36c3c2edbefd5d20f8ceef25 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 25 Nov 2024 17:55:05 +0100 Subject: Folding netdata-core into netdata itself. Signed-off-by: Daniel Baumann --- debian/control | 69 +++++++++++++++++------------------ debian/netdata-core.README.Debian | 54 --------------------------- debian/netdata-core.dirs | 6 --- debian/netdata-core.docs | 1 - debian/netdata-core.install | 16 -------- debian/netdata-core.lintian-overrides | 10 ----- debian/netdata-core.manpages | 1 - debian/netdata-core.netdata.logrotate | 13 ------- debian/netdata-core.netdata.service | 56 ---------------------------- debian/netdata-core.postinst | 56 ---------------------------- debian/netdata-core.postrm | 44 ---------------------- debian/netdata.README.Debian | 54 +++++++++++++++++++++++++++ debian/netdata.dirs | 6 +++ debian/netdata.docs | 1 + debian/netdata.install | 16 ++++++++ debian/netdata.lintian-overrides | 10 +++++ debian/netdata.logrotate | 13 +++++++ debian/netdata.manpages | 1 + debian/netdata.postinst | 56 ++++++++++++++++++++++++++++ debian/netdata.postrm | 44 ++++++++++++++++++++++ debian/netdata.service | 56 ++++++++++++++++++++++++++++ debian/rules | 22 +++++------ 22 files changed, 301 insertions(+), 304 deletions(-) delete mode 100644 debian/netdata-core.README.Debian delete mode 100644 debian/netdata-core.dirs delete mode 100644 debian/netdata-core.docs delete mode 100644 debian/netdata-core.install delete mode 100644 debian/netdata-core.lintian-overrides delete mode 100644 debian/netdata-core.manpages delete mode 100644 debian/netdata-core.netdata.logrotate delete mode 100644 debian/netdata-core.netdata.service delete mode 100755 debian/netdata-core.postinst delete mode 100755 debian/netdata-core.postrm create mode 100644 debian/netdata.README.Debian create mode 100644 debian/netdata.dirs create mode 100644 debian/netdata.docs create mode 100644 debian/netdata.install create mode 100644 debian/netdata.lintian-overrides create mode 100644 debian/netdata.logrotate create mode 100644 debian/netdata.manpages create mode 100755 debian/netdata.postinst create mode 100755 debian/netdata.postrm create mode 100644 debian/netdata.service diff --git a/debian/control b/debian/control index 503e6e92d..3af0e3514 100644 --- a/debian/control +++ b/debian/control @@ -37,32 +37,6 @@ Vcs-Git: https://git.progress-linux.org/users/daniel.baumann/debian/packages/net Package: netdata Section: net -Architecture: all -Depends: - netdata-core, - netdata-plugins-bash, - ${misc:Depends}, -Recommends: - netdata-plugins-python, -Breaks: - netdata-apache2, - netdata-web, -Replaces: - netdata-apache2, - netdata-web, -Description: real-time performance monitoring (metapackage) - Netdata is distributed, real-time, performance and health monitoring for - systems and applications. It provides insights of everything happening on the - systems it runs using interactive web dashboards. - . - It can run autonomously without any third party components or it can be - integrated to existing monitoring tool chains (Prometheus, Graphite, - OpenTSDB, Kafka, Grafana, etc). - . - This package is a metapackage depending on the typical netdata components. - -Package: netdata-core -Section: net Architecture: linux-any Pre-Depends: ${misc:Pre-Depends}, @@ -75,6 +49,8 @@ Depends: ${shlibs:Depends}, Recommends: curl, + netdata-plugins-bash, + netdata-plugins-python, Suggests: apcupsd, iproute2, @@ -82,16 +58,37 @@ Suggests: lm-sensors, nc, Breaks: - netdata-core-no-sse (<< 1.44), + netdata-apache2, + netdata-core (<< 2), + netdata-core-no-sse (<< 2), + netdata-web, Replaces: + netdata-apache2, + netdata-core, netdata-core-no-sse, -Description: real-time performance monitoring (core) + netdata-web, +Description: real-time performance monitoring Netdata is distributed, real-time, performance and health monitoring for systems and applications. It provides insights of everything happening on the systems it runs using interactive web dashboards. . - This package contains the minimal core build with SSE2 optimizations for - current systems. + It can run autonomously without any third party components or it can be + integrated to existing monitoring tool chains (Prometheus, Graphite, + OpenTSDB, Kafka, Grafana, etc). + +Package: netdata-core +Section: net +Architecture: all +Pre-Depends: + ${misc:Pre-Depends}, +Depends: + ${misc:Depends}, +Description: real-time performance monitoring (transitional package) + Package to ease upgrading from older netdata-core package to the new + netdata package. + . + This package can be purged at anytime once the netdata package has been + installed. Package: netdata-core-no-sse Section: net @@ -102,9 +99,9 @@ Depends: ${misc:Depends}, Description: real-time performance monitoring (transitional package) Package to ease upgrading from older netdata-core-no-sse package to the new - netdata-core package. + netdata package. . - This package can be purged at anytime once the netdata-core package has been + This package can be purged at anytime once the netdata package has been installed. Package: netdata-plugins-bash @@ -112,14 +109,14 @@ Section: net Architecture: all Multi-Arch: foreign Depends: - netdata-core (>= ${source:Version}), + netdata (>= ${source:Version}), ${misc:Depends}, Suggests: fping, Provides: netdata-plugins, Enhances: - netdata-core, + netdata, Description: real-time performance monitoring (bash plugins) Netdata is distributed, real-time, performance and health monitoring for systems and applications. It provides insights of everything happening on the @@ -132,7 +129,7 @@ Section: net Architecture: all Multi-Arch: foreign Depends: - netdata-core (>= ${source:Version}), + netdata (>= ${source:Version}), python3, python3-monotonic, python3-urllib3 (>= 1.22), @@ -145,7 +142,7 @@ Suggests: Provides: netdata-plugins, Enhances: - netdata-core, + netdata, Description: real-time performance monitoring (python plugins) Netdata is distributed, real-time, performance and health monitoring for systems and applications. It provides insights of everything happening on the diff --git a/debian/netdata-core.README.Debian b/debian/netdata-core.README.Debian deleted file mode 100644 index 6cded5c63..000000000 --- a/debian/netdata-core.README.Debian +++ /dev/null @@ -1,54 +0,0 @@ -netdata for Debian -================== - -1. Web UI ---------- - -If you install netdata-web, the web UI will be available by default on -http://localhost:19999 - - -2. Plugins ----------- - -netdata has a lot of plugins. Some of them need extra configuration on the -host system to work. Here are some notes for that... - -2.1 mysql/mariadb ------------------ - -netdata by default tries to read /etc/mysql/debian.cnf and use the -debian-sys-maint credentials to access the database. - -For Debian 10 and older, you *could* (but shouldn't, see below) grant netdata -access to debian.cnf by setting the group ownership to netdata. - -For Debian 11 and newer, the debian.cnf is no longer used. - -Instead (and preferably also for Debian 10 and older), a dedicated read-only -database user should be created: - - $ sudo mariadb -u root - MariaDB > create user 'netdata'@'localhost'; - MariaDB > grant usage on *.* to 'netdata'@'localhost'; - MariaDB > flush privileges; - MariaDB > exit - -Note that this will allow the netdata to connect to mariadb but *not* read -any data (which it does not need to). - -Naming the user 'netdata' saves you from configuring anything in netdata itself -and it will automatically pick it up once the user has been created. - -2.2 Bug: netdata doesn't start ------------------------------- - -If netdata does not start, there could be an upgrade issue from a previous version -leading to a corrupted internal database of the cached values in /var/cache/netdata. - -Try purging the package reinstalling netdata: - - $ sudo apt purge netdata-core - $ sudo apt install netdata-core - - -- Daniel Baumann Tue, 09 Feb 2021 11:03:31 +0100 diff --git a/debian/netdata-core.dirs b/debian/netdata-core.dirs deleted file mode 100644 index 6cda555ff..000000000 --- a/debian/netdata-core.dirs +++ /dev/null @@ -1,6 +0,0 @@ -etc/netdata -usr/share/netdata/web -var/cache/netdata -var/lib/netdata -var/log/netdata -var/run diff --git a/debian/netdata-core.docs b/debian/netdata-core.docs deleted file mode 100644 index b43bf86b5..000000000 --- a/debian/netdata-core.docs +++ /dev/null @@ -1 +0,0 @@ -README.md diff --git a/debian/netdata-core.install b/debian/netdata-core.install deleted file mode 100644 index 59811f683..000000000 --- a/debian/netdata-core.install +++ /dev/null @@ -1,16 +0,0 @@ -etc/logrotate.d -etc/netdata/edit-config -etc/netdata/health.d -etc/netdata/statsd.d -usr/lib/netdata/conf.d/apps_groups.conf -usr/lib/netdata/conf.d/exporting.conf -usr/lib/netdata/conf.d/health.d -usr/lib/netdata/conf.d/health_alarm_notify.conf -usr/lib/netdata/conf.d/health_email_recipients.conf -usr/lib/netdata/conf.d/log2journal.d -usr/lib/netdata/conf.d/netdata.conf -usr/lib/netdata/conf.d/schema.d -usr/lib/netdata/conf.d/statsd.d -usr/lib/netdata/conf.d/stream.conf -usr/lib/netdata/conf.d/vnodes* -usr/sbin diff --git a/debian/netdata-core.lintian-overrides b/debian/netdata-core.lintian-overrides deleted file mode 100644 index 279afa30d..000000000 --- a/debian/netdata-core.lintian-overrides +++ /dev/null @@ -1,10 +0,0 @@ -# See Debian policy 10.9. apps.plugin has extra capabilities, so don't let -# normal users run it. -netdata-core: non-standard-executable-perm usr/libexec/netdata/plugins.d/apps.plugin 0754 != 0755 - -# user created during install -netdata-core: maintainer-script-should-not-use-recursive-chown-or-chmod - -# plugins that require root access -netdata-core: setuid-binary usr/libexec/netdata/plugins.d/freeipmi.plugin 4754 root/root -netdata-core: setuid-binary usr/libexec/netdata/plugins.d/perf.plugin 4754 root/root diff --git a/debian/netdata-core.manpages b/debian/netdata-core.manpages deleted file mode 100644 index 2fb19fbd8..000000000 --- a/debian/netdata-core.manpages +++ /dev/null @@ -1 +0,0 @@ -debian/manpages/* diff --git a/debian/netdata-core.netdata.logrotate b/debian/netdata-core.netdata.logrotate deleted file mode 100644 index 7ede4fcb0..000000000 --- a/debian/netdata-core.netdata.logrotate +++ /dev/null @@ -1,13 +0,0 @@ -/var/log/netdata/*log { - compress - create 0640 netdata adm - weekly - delaycompress - missingok - notifempty - rotate 14 - sharedscripts - postrotate - /bin/kill -HUP `pidof netdata 2>/dev/null` 2>/dev/null || true - endscript -} diff --git a/debian/netdata-core.netdata.service b/debian/netdata-core.netdata.service deleted file mode 100644 index fb62d0772..000000000 --- a/debian/netdata-core.netdata.service +++ /dev/null @@ -1,56 +0,0 @@ -# netdata systemd target - -[Unit] -Description=netdata - Real-time performance monitoring -Documentation=man:netdata -Documentation=file:///usr/share/doc/netdata/html/index.html -Documentation=https://github.com/netdata/netdata -After=network-online.target httpd.service squid.service nfs-server.service mysqld.service named.service postfix.service -ConditionPathExists=/etc/netdata/netdata.conf - -[Service] -Type=simple -Environment="netdata_LOG_LOCATION=/var/log/netdata/log" -ExecStart=/usr/sbin/netdata -D -TimeoutStopSec=10 -KillMode=mixed -KillSignal=SIGTERM -OOMScoreAdjust=-900 - -User=netdata -Group=netdata -Restart=on-abnormal -RestartSec=2s -LimitNOFILE=65536 - -WorkingDirectory=/tmp - -# Hardening - -NoNewPrivileges=false -PermissionsStartOnly=true -# CAP_SETGID is required for setgroups() -# CAP_NET_RAW is needed by fping, see #864370 -CapabilityBoundingSet=CAP_DAC_READ_SEARCH CAP_SYS_PTRACE CAP_SETGID CAP_SETUID CAP_NET_RAW CAP_AUDIT_WRITE -PrivateTmp=true -ProtectHome=read-only -ProtectSystem=full - -ReadOnlyDirectories=/ -ReadWriteDirectories=/dev -ReadWriteDirectories=/proc/self -ReadWriteDirectories=/var/cache/netdata -ReadWriteDirectories=/var/lib/netdata -ReadWriteDirectories=/var/log -ReadWriteDirectories=/var/spool -ReadWriteDirectories=/run - -RuntimeDirectory=netdata - -# Access to devices and kernel modules and tunables is required -PrivateDevices=no -ProtectKernelModules=no -ProtectKernelTunables=no - -[Install] -WantedBy=multi-user.target diff --git a/debian/netdata-core.postinst b/debian/netdata-core.postinst deleted file mode 100755 index 56aeafc7d..000000000 --- a/debian/netdata-core.postinst +++ /dev/null @@ -1,56 +0,0 @@ -#!/bin/sh - -set -e - -case "${1}" in - configure) - # creating group - if ! getent group netdata > /dev/null 2>&1 - then - groupadd --system netdata - fi - - # creating user - if ! getent passwd netdata > /dev/null 2>&1 - then - useradd --system -g netdata --home-dir /var/lib/netdata --no-create-home netdata - mkdir -p /var/lib/netdata - fi - - # some netdata plugins must be able to read logfiles - usermod -G adm netdata - - # creating directory overrides - for DIRECTORY in /var/cache/netdata /var/lib/netdata - do - mkdir -p "${DIRECTORY}" - - if ! dpkg-statoverride --list "${DIRECTORY}" > /dev/null 2>&1 - then - dpkg-statoverride --update --add netdata netdata 0755 "${DIRECTORY}" - fi - done - - # handling plugin capabilities (or setuid as fallback) - 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 || \ - chmod 4754 /usr/libexec/netdata/plugins.d/apps.plugin - - # handling log owner and permissions - chown netdata:adm /var/log/netdata - chmod 2750 /var/log/netdata - ;; - - abort-upgrade|abort-remove|abort-deconfigure) - - ;; - - *) - echo "postinst called with unknown argument \`${1}'" >&2 - exit 1 - ;; -esac - -#DEBHELPER# - -exit 0 diff --git a/debian/netdata-core.postrm b/debian/netdata-core.postrm deleted file mode 100755 index 358b2a773..000000000 --- a/debian/netdata-core.postrm +++ /dev/null @@ -1,44 +0,0 @@ -#!/bin/sh - -set -e - -case "${1}" in - purge) - # removing directory overrides - for DIRECTORY in /var/cache/netdata /var/lib/netdata - do - if dpkg-statoverride --list | grep -qw "${DIRECTORY}" - then - dpkg-statoverride --remove "${DIRECTORY}" - fi - done - - # removing user - if getent passwd netdata > /dev/null 2>&1 - then - userdel netdata || echo "Unable to remove netdata user" - fi - - # removing group - if getent group netdata > /dev/null 2>&1 - then - groupdel netdata || echo "Unable to remove netdata group" - fi - - # removing directories - rm -rf /var/cache/netdata /var/lib/netdata /var/log/netdata - ;; - - remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) - - ;; - - *) - echo "postrm called with unknown argument \`${1}'" >&2 - exit 1 - ;; -esac - -#DEBHELPER# - -exit 0 diff --git a/debian/netdata.README.Debian b/debian/netdata.README.Debian new file mode 100644 index 000000000..f228abb6a --- /dev/null +++ b/debian/netdata.README.Debian @@ -0,0 +1,54 @@ +netdata for Debian +================== + +1. Web UI +--------- + +If you install netdata-web, the web UI will be available by default on +http://localhost:19999 + + +2. Plugins +---------- + +netdata has a lot of plugins. Some of them need extra configuration on the +host system to work. Here are some notes for that... + +2.1 mysql/mariadb +----------------- + +netdata by default tries to read /etc/mysql/debian.cnf and use the +debian-sys-maint credentials to access the database. + +For Debian 10 and older, you *could* (but shouldn't, see below) grant netdata +access to debian.cnf by setting the group ownership to netdata. + +For Debian 11 and newer, the debian.cnf is no longer used. + +Instead (and preferably also for Debian 10 and older), a dedicated read-only +database user should be created: + + $ sudo mariadb -u root + MariaDB > create user 'netdata'@'localhost'; + MariaDB > grant usage on *.* to 'netdata'@'localhost'; + MariaDB > flush privileges; + MariaDB > exit + +Note that this will allow the netdata to connect to mariadb but *not* read +any data (which it does not need to). + +Naming the user 'netdata' saves you from configuring anything in netdata itself +and it will automatically pick it up once the user has been created. + +2.2 Bug: netdata doesn't start +------------------------------ + +If netdata does not start, there could be an upgrade issue from a previous version +leading to a corrupted internal database of the cached values in /var/cache/netdata. + +Try purging the package reinstalling netdata: + + $ sudo apt purge netdata + $ sudo apt install netdata + + -- Daniel Baumann Tue, 09 Feb 2021 11:03:31 +0100 diff --git a/debian/netdata.dirs b/debian/netdata.dirs new file mode 100644 index 000000000..6cda555ff --- /dev/null +++ b/debian/netdata.dirs @@ -0,0 +1,6 @@ +etc/netdata +usr/share/netdata/web +var/cache/netdata +var/lib/netdata +var/log/netdata +var/run diff --git a/debian/netdata.docs b/debian/netdata.docs new file mode 100644 index 000000000..b43bf86b5 --- /dev/null +++ b/debian/netdata.docs @@ -0,0 +1 @@ +README.md diff --git a/debian/netdata.install b/debian/netdata.install new file mode 100644 index 000000000..59811f683 --- /dev/null +++ b/debian/netdata.install @@ -0,0 +1,16 @@ +etc/logrotate.d +etc/netdata/edit-config +etc/netdata/health.d +etc/netdata/statsd.d +usr/lib/netdata/conf.d/apps_groups.conf +usr/lib/netdata/conf.d/exporting.conf +usr/lib/netdata/conf.d/health.d +usr/lib/netdata/conf.d/health_alarm_notify.conf +usr/lib/netdata/conf.d/health_email_recipients.conf +usr/lib/netdata/conf.d/log2journal.d +usr/lib/netdata/conf.d/netdata.conf +usr/lib/netdata/conf.d/schema.d +usr/lib/netdata/conf.d/statsd.d +usr/lib/netdata/conf.d/stream.conf +usr/lib/netdata/conf.d/vnodes* +usr/sbin diff --git a/debian/netdata.lintian-overrides b/debian/netdata.lintian-overrides new file mode 100644 index 000000000..1570ac6e4 --- /dev/null +++ b/debian/netdata.lintian-overrides @@ -0,0 +1,10 @@ +# See Debian policy 10.9. apps.plugin has extra capabilities, so don't let +# normal users run it. +netdata: non-standard-executable-perm usr/libexec/netdata/plugins.d/apps.plugin 0754 != 0755 + +# user created during install +netdata: maintainer-script-should-not-use-recursive-chown-or-chmod + +# plugins that require root access +netdata: setuid-binary usr/libexec/netdata/plugins.d/freeipmi.plugin 4754 root/root +netdata: setuid-binary usr/libexec/netdata/plugins.d/perf.plugin 4754 root/root diff --git a/debian/netdata.logrotate b/debian/netdata.logrotate new file mode 100644 index 000000000..7ede4fcb0 --- /dev/null +++ b/debian/netdata.logrotate @@ -0,0 +1,13 @@ +/var/log/netdata/*log { + compress + create 0640 netdata adm + weekly + delaycompress + missingok + notifempty + rotate 14 + sharedscripts + postrotate + /bin/kill -HUP `pidof netdata 2>/dev/null` 2>/dev/null || true + endscript +} diff --git a/debian/netdata.manpages b/debian/netdata.manpages new file mode 100644 index 000000000..2fb19fbd8 --- /dev/null +++ b/debian/netdata.manpages @@ -0,0 +1 @@ +debian/manpages/* diff --git a/debian/netdata.postinst b/debian/netdata.postinst new file mode 100755 index 000000000..56aeafc7d --- /dev/null +++ b/debian/netdata.postinst @@ -0,0 +1,56 @@ +#!/bin/sh + +set -e + +case "${1}" in + configure) + # creating group + if ! getent group netdata > /dev/null 2>&1 + then + groupadd --system netdata + fi + + # creating user + if ! getent passwd netdata > /dev/null 2>&1 + then + useradd --system -g netdata --home-dir /var/lib/netdata --no-create-home netdata + mkdir -p /var/lib/netdata + fi + + # some netdata plugins must be able to read logfiles + usermod -G adm netdata + + # creating directory overrides + for DIRECTORY in /var/cache/netdata /var/lib/netdata + do + mkdir -p "${DIRECTORY}" + + if ! dpkg-statoverride --list "${DIRECTORY}" > /dev/null 2>&1 + then + dpkg-statoverride --update --add netdata netdata 0755 "${DIRECTORY}" + fi + done + + # handling plugin capabilities (or setuid as fallback) + 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 || \ + chmod 4754 /usr/libexec/netdata/plugins.d/apps.plugin + + # handling log owner and permissions + chown netdata:adm /var/log/netdata + chmod 2750 /var/log/netdata + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + + ;; + + *) + echo "postinst called with unknown argument \`${1}'" >&2 + exit 1 + ;; +esac + +#DEBHELPER# + +exit 0 diff --git a/debian/netdata.postrm b/debian/netdata.postrm new file mode 100755 index 000000000..358b2a773 --- /dev/null +++ b/debian/netdata.postrm @@ -0,0 +1,44 @@ +#!/bin/sh + +set -e + +case "${1}" in + purge) + # removing directory overrides + for DIRECTORY in /var/cache/netdata /var/lib/netdata + do + if dpkg-statoverride --list | grep -qw "${DIRECTORY}" + then + dpkg-statoverride --remove "${DIRECTORY}" + fi + done + + # removing user + if getent passwd netdata > /dev/null 2>&1 + then + userdel netdata || echo "Unable to remove netdata user" + fi + + # removing group + if getent group netdata > /dev/null 2>&1 + then + groupdel netdata || echo "Unable to remove netdata group" + fi + + # removing directories + rm -rf /var/cache/netdata /var/lib/netdata /var/log/netdata + ;; + + remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + + ;; + + *) + echo "postrm called with unknown argument \`${1}'" >&2 + exit 1 + ;; +esac + +#DEBHELPER# + +exit 0 diff --git a/debian/netdata.service b/debian/netdata.service new file mode 100644 index 000000000..fb62d0772 --- /dev/null +++ b/debian/netdata.service @@ -0,0 +1,56 @@ +# netdata systemd target + +[Unit] +Description=netdata - Real-time performance monitoring +Documentation=man:netdata +Documentation=file:///usr/share/doc/netdata/html/index.html +Documentation=https://github.com/netdata/netdata +After=network-online.target httpd.service squid.service nfs-server.service mysqld.service named.service postfix.service +ConditionPathExists=/etc/netdata/netdata.conf + +[Service] +Type=simple +Environment="netdata_LOG_LOCATION=/var/log/netdata/log" +ExecStart=/usr/sbin/netdata -D +TimeoutStopSec=10 +KillMode=mixed +KillSignal=SIGTERM +OOMScoreAdjust=-900 + +User=netdata +Group=netdata +Restart=on-abnormal +RestartSec=2s +LimitNOFILE=65536 + +WorkingDirectory=/tmp + +# Hardening + +NoNewPrivileges=false +PermissionsStartOnly=true +# CAP_SETGID is required for setgroups() +# CAP_NET_RAW is needed by fping, see #864370 +CapabilityBoundingSet=CAP_DAC_READ_SEARCH CAP_SYS_PTRACE CAP_SETGID CAP_SETUID CAP_NET_RAW CAP_AUDIT_WRITE +PrivateTmp=true +ProtectHome=read-only +ProtectSystem=full + +ReadOnlyDirectories=/ +ReadWriteDirectories=/dev +ReadWriteDirectories=/proc/self +ReadWriteDirectories=/var/cache/netdata +ReadWriteDirectories=/var/lib/netdata +ReadWriteDirectories=/var/log +ReadWriteDirectories=/var/spool +ReadWriteDirectories=/run + +RuntimeDirectory=netdata + +# Access to devices and kernel modules and tunables is required +PrivateDevices=no +ProtectKernelModules=no +ProtectKernelTunables=no + +[Install] +WantedBy=multi-user.target diff --git a/debian/rules b/debian/rules index 589a2a11a..409dcc147 100755 --- a/debian/rules +++ b/debian/rules @@ -49,15 +49,15 @@ override_dh_install-arch: find debian/tmp -name .keep -delete # Copy architecture dependent plugins - mkdir -p debian/netdata-core/etc/netdata - cp debian/local/netdata/netdata.conf debian/netdata-core/etc/netdata - touch debian/netdata-core/etc/netdata/.opt-out-from-anonymous-statistics + mkdir -p debian/netdata/etc/netdata + cp debian/local/netdata/netdata.conf debian/netdata/etc/netdata + touch debian/netdata/etc/netdata/.opt-out-from-anonymous-statistics - mkdir -p debian/netdata-core/usr/libexec/netdata/plugins.d + mkdir -p debian/netdata/usr/libexec/netdata/plugins.d for plugin in cgroup-network apps.plugin nfacct.plugin perf.plugin slabinfo.plugin; \ do \ cp debian/tmp/usr/libexec/netdata/plugins.d/$${plugin} \ - debian/netdata-core/usr/libexec/netdata/plugins.d; \ + debian/netdata/usr/libexec/netdata/plugins.d; \ done dh_install -a @@ -68,11 +68,11 @@ override_dh_install-indep: dh_install -i # Move architecture dependent plugins - mkdir -p debian/netdata-core/usr/libexec/netdata/plugins.d + mkdir -p debian/netdata/usr/libexec/netdata/plugins.d for plugin in cgroup-network apps.plugin nfacct.plugin perf.plugin slabinfo.plugin; \ do \ mv -f debian/netdata-plugins-bash/usr/libexec/netdata/plugins.d/$${plugin} \ - debian/netdata-core/usr/libexec/netdata/plugins.d; \ + debian/netdata/usr/libexec/netdata/plugins.d; \ done mkdir -p debian/netdata-plugins-python/usr/libexec/netdata/plugins.d @@ -83,11 +83,11 @@ override_dh_install-indep: done override_dh_installsystemd: - dh_installsystemd -p netdata-core --name=netdata + dh_installsystemd -p netdata --name=netdata dh_installsystemd --remaining-packages override_dh_installlogrotate: - dh_installlogrotate -p netdata-core --name=netdata + dh_installlogrotate -p netdata --name=netdata dh_installlogrotate --remaining-packages override_dh_fixperms-arch: @@ -95,8 +95,8 @@ override_dh_fixperms-arch: # apps.plugin should only be runnable by the netdata user. It will be # given extra capabilities in the postinst script. - chmod 0754 debian/netdata-core/usr/libexec/netdata/plugins.d/apps.plugin - chmod 4754 debian/netdata-core/usr/libexec/netdata/plugins.d/perf.plugin + chmod 0754 debian/netdata/usr/libexec/netdata/plugins.d/apps.plugin + chmod 4754 debian/netdata/usr/libexec/netdata/plugins.d/perf.plugin override_dh_fixperms-indep: dh_fixperms -i -- cgit v1.2.3