summaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-03-21 17:19:04 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-03-21 17:19:04 +0000
commit310edf444908b09ea6d00c03baceb7925f3bb7a2 (patch)
tree7064577c7fa7a851e2e930beb606ea8237b0bbd2 /contrib
parentReleasing debian version 1.44.3-2. (diff)
downloadnetdata-310edf444908b09ea6d00c03baceb7925f3bb7a2.tar.xz
netdata-310edf444908b09ea6d00c03baceb7925f3bb7a2.zip
Merging upstream version 1.45.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'contrib')
-rw-r--r--contrib/debian/control65
-rw-r--r--contrib/debian/netdata-plugin-cups.postinst13
-rw-r--r--contrib/debian/netdata-plugin-cups.preinst13
-rw-r--r--contrib/debian/netdata-plugin-ebpf.postinst2
-rw-r--r--contrib/debian/netdata-plugin-go.postinst2
-rw-r--r--contrib/debian/netdata-plugin-logs-management.postinst2
-rw-r--r--contrib/debian/netdata-plugin-network-viewer.postinst17
-rw-r--r--contrib/debian/netdata-plugin-network-viewer.preinst13
-rw-r--r--contrib/debian/netdata-plugin-xenstat.postinst14
-rw-r--r--contrib/debian/netdata-plugin-xenstat.preinst13
-rw-r--r--contrib/debian/netdata.lintian-overrides16
-rw-r--r--contrib/debian/netdata.postinst29
-rw-r--r--contrib/debian/netdata.postrm17
-rw-r--r--contrib/debian/netdata.preinst13
-rwxr-xr-xcontrib/debian/rules136
-rwxr-xr-xcontrib/rhel/build-netdata-rpm.sh56
16 files changed, 246 insertions, 175 deletions
diff --git a/contrib/debian/control b/contrib/debian/control
index 4163aa1d..6061b2e6 100644
--- a/contrib/debian/control
+++ b/contrib/debian/control
@@ -1,34 +1,32 @@
Source: netdata
-Build-Depends: debhelper (>= 9.20160709),
- dh-autoreconf,
+Build-Depends: debhelper (>= 10),
dpkg-dev (>= 1.13.19),
- zlib1g-dev,
- uuid-dev,
+ bison,
+ cmake,
+ curl,
+ flex,
+ golang (>= 1.21),
+ libcups2-dev,
libcurl4-openssl-dev,
libelf-dev,
- libuv1-dev,
+ libipmimonitoring-dev,
+ libjson-c-dev,
liblz4-dev,
- libssl-dev,
libmnl-dev,
- libjson-c-dev,
- libyaml-dev,
- libcups2-dev,
- libipmimonitoring-dev,
+ libmongoc-dev,
libnetfilter-acct-dev,
- libsnappy-dev,
libpcre2-dev,
libprotobuf-dev,
libprotoc-dev,
+ libsnappy-dev,
+ libssl-dev,
libsystemd-dev,
- cmake,
- autogen,
- autoconf,
- automake,
+ libuv1-dev,
+ libyaml-dev,
pkg-config,
- curl,
protobuf-compiler,
- bison,
- flex
+ uuid-dev,
+ zlib1g-dev
Section: net
Priority: optional
Maintainer: Netdata Builder <bot@netdata.cloud>
@@ -60,7 +58,8 @@ Conflicts: netdata-core,
Suggests: netdata-plugin-cups (= ${source:Version}),
netdata-plugin-freeipmi (= ${source:Version})
Recommends: netdata-plugin-systemd-journal (= ${source:Version}),
- netdata-plugin-logs-management (= ${source:Version})
+ netdata-plugin-logs-management (= ${source:Version}),
+ netdata-plugin-network-viewer (= ${source:Version})
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
@@ -103,10 +102,10 @@ Depends: bash,
netdata (= ${source:Version})
Pre-Depends: adduser
Conflicts: netdata (<< ${source:Version})
-Suggests: apcupsd, nut, iw, sudo
+Suggests: apcupsd, 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,
+ script to the Netdata Agent. It includes collectors for APCUPSD,
LibreSWAN, OpenSIPS, and Wireless access point statistics.
Package: netdata-plugin-ebpf
@@ -134,8 +133,7 @@ Description: Compiled eBPF legacy code for the Netdata eBPF plugin
Package: netdata-plugin-pythond
Architecture: all
-Depends: ${shlibs:Depends},
- netdata (= ${source:Version})
+Depends: netdata (= ${source:Version})
Pre-Depends: adduser
Suggests: sudo
Conflicts: netdata (<< ${source:Version})
@@ -207,6 +205,16 @@ Description: The systemd-journal collector for the Netdata Agent
This plugin allows the Netdata Agent to present logs from the systemd
journal on Netdata Cloud or the local Agent dashboard.
+Package: netdata-plugin-xenstat
+Architecture: amd64 arm64
+Depends: ${shlibs:Depends},
+ netdata (= ${source:Version})
+Pre-Depends: adduser
+Conflicts: netdata (<< ${source:Version})
+Description: The xenstat plugin for the Netdata Agent
+ This plugin allows the Netdata Agent to collect metrics from the Xen
+ Hypervisor.
+
Package: netdata-plugin-logs-management
Architecture: any
Depends: ${shlibs:Depends},
@@ -216,3 +224,14 @@ Conflicts: netdata (<< ${source:Version})
Description: The logs-management plugin for the Netdata Agent
This plugin allows the Netdata Agent to collect logs from the system
and parse them to extract metrics.
+
+Package: netdata-plugin-network-viewer
+Architecture: any
+Depends: ${shlibs:Depends},
+ netdata (= ${source:Version})
+Pre-Depends: libcap2-bin, adduser
+Recommends: netdata-plugin-ebpf (= ${source:Version}) [amd64]
+Conflicts: netdata (<< ${source:Version})
+Description: The network viewer plugin for the Netdata Agent
+ This plugin allows the Netdata Agent to provide network connection
+ mapping functionality for use in netdata Cloud.
diff --git a/contrib/debian/netdata-plugin-cups.postinst b/contrib/debian/netdata-plugin-cups.postinst
new file mode 100644
index 00000000..df89ea38
--- /dev/null
+++ b/contrib/debian/netdata-plugin-cups.postinst
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+set -e
+
+case "$1" in
+ configure|reconfigure)
+ chown root:netdata /usr/libexec/netdata/plugins.d/cups.plugin
+ ;;
+esac
+
+#DEBHELPER#
+
+exit 0
diff --git a/contrib/debian/netdata-plugin-cups.preinst b/contrib/debian/netdata-plugin-cups.preinst
new file mode 100644
index 00000000..b93fbc12
--- /dev/null
+++ b/contrib/debian/netdata-plugin-cups.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# \ No newline at end of file
diff --git a/contrib/debian/netdata-plugin-ebpf.postinst b/contrib/debian/netdata-plugin-ebpf.postinst
index 2458d6d6..3076d404 100644
--- a/contrib/debian/netdata-plugin-ebpf.postinst
+++ b/contrib/debian/netdata-plugin-ebpf.postinst
@@ -4,7 +4,7 @@ set -e
case "$1" in
configure|reconfigure)
- chown root:netdata /usr/libexec/netdata/plugins.d/ebpf.plugin
+ grep /usr/libexec/netdata /var/lib/dpkg/info/netdata-plugin-ebpf.list | xargs -n 30 chown root:netdata
chmod -f 4750 /usr/libexec/netdata/plugins.d/ebpf.plugin
;;
esac
diff --git a/contrib/debian/netdata-plugin-go.postinst b/contrib/debian/netdata-plugin-go.postinst
index 70d67aaa..e8604929 100644
--- a/contrib/debian/netdata-plugin-go.postinst
+++ b/contrib/debian/netdata-plugin-go.postinst
@@ -6,7 +6,7 @@ case "$1" in
configure|reconfigure)
chown root:netdata /usr/libexec/netdata/plugins.d/go.d.plugin
chmod 0750 /usr/libexec/netdata/plugins.d/go.d.plugin
- if ! setcap "cap_net_admin=eip cap_net_raw=eip" /usr/libexec/netdata/plugins.d/go.d.plugin; then
+ if ! setcap "cap_dac_read_search+epi cap_net_admin=eip cap_net_raw=eip" /usr/libexec/netdata/plugins.d/go.d.plugin; then
chmod -f 4750 /usr/libexec/netdata/plugins.d/go.d.plugin
fi
;;
diff --git a/contrib/debian/netdata-plugin-logs-management.postinst b/contrib/debian/netdata-plugin-logs-management.postinst
index 0565b54e..d589310c 100644
--- a/contrib/debian/netdata-plugin-logs-management.postinst
+++ b/contrib/debian/netdata-plugin-logs-management.postinst
@@ -4,7 +4,7 @@ set -e
case "$1" in
configure|reconfigure)
- chown root:netdata /usr/libexec/netdata/plugins.d/logs-management.plugin
+ grep /usr/libexec/netdata /var/lib/dpkg/info/netdata-plugin-logs-management.list | xargs -n 30 chown root:netdata
chmod 0750 /usr/libexec/netdata/plugins.d/logs-management.plugin
if ! setcap "cap_dac_read_search=eip cap_syslog=eip" /usr/libexec/netdata/plugins.d/logs-management.plugin; then
chmod -f 4750 /usr/libexec/netdata/plugins.d/logs-management.plugin
diff --git a/contrib/debian/netdata-plugin-network-viewer.postinst b/contrib/debian/netdata-plugin-network-viewer.postinst
new file mode 100644
index 00000000..6f2289e4
--- /dev/null
+++ b/contrib/debian/netdata-plugin-network-viewer.postinst
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+set -e
+
+case "$1" in
+ configure|reconfigure)
+ chown root:netdata /usr/libexec/netdata/plugins.d/network-viewer.plugin
+ chmod 0750 /usr/libexec/netdata/plugins.d/network-viewer.plugin
+ if ! setcap "cap_dac_read_search,cap_sys_admin,cap_sys_ptrace=eip" /usr/libexec/netdata/plugins.d/network-viewer.plugin; then
+ chmod -f 4750 /usr/libexec/netdata/plugins.d/network-viewer.plugin
+ fi
+ ;;
+esac
+
+#DEBHELPER#
+
+exit 0
diff --git a/contrib/debian/netdata-plugin-network-viewer.preinst b/contrib/debian/netdata-plugin-network-viewer.preinst
new file mode 100644
index 00000000..fcabb415
--- /dev/null
+++ b/contrib/debian/netdata-plugin-network-viewer.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-xenstat.postinst b/contrib/debian/netdata-plugin-xenstat.postinst
new file mode 100644
index 00000000..5da553ff
--- /dev/null
+++ b/contrib/debian/netdata-plugin-xenstat.postinst
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+set -e
+
+case "$1" in
+ configure|reconfigure)
+ chown root:netdata /usr/libexec/netdata/plugins.d/xenstat.plugin
+ chmod -f 4750 /usr/libexec/netdata/plugins.d/xenstat.plugin
+ ;;
+esac
+
+#DEBHELPER#
+
+exit 0
diff --git a/contrib/debian/netdata-plugin-xenstat.preinst b/contrib/debian/netdata-plugin-xenstat.preinst
new file mode 100644
index 00000000..fcabb415
--- /dev/null
+++ b/contrib/debian/netdata-plugin-xenstat.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.lintian-overrides b/contrib/debian/netdata.lintian-overrides
deleted file mode 100644
index 45b2d868..00000000
--- a/contrib/debian/netdata.lintian-overrides
+++ /dev/null
@@ -1,16 +0,0 @@
-
-# See Debian policy 10.9. apps.plugin has extra capabilities, so don't let
-# normal users run it.
-netdata: non-standard-executable-perm usr/lib/*/netdata/plugins.d/apps.plugin 0754 != 0755
-
-
-# FontAwesome is at least in the fonts-font-awesome package, but this is
-# not available in wheezy. glyphicons-halflings-regular isn't currently in
-# a Debian package. Therefore don't complain about shipping them with netdata
-# for the time being.
-netdata: duplicate-font-file usr/share/netdata/fonts/*
-netdata: font-in-non-font-package usr/share/netdata/fonts/*
-
-# Files here are marked as conffiles so that local updates to the html files
-# isn't clobbered on upgrade.
-netdata: non-etc-file-marked-as-conffile var/lib/netdata/www/*
diff --git a/contrib/debian/netdata.postinst b/contrib/debian/netdata.postinst
index 1da46cc8..844b3c36 100644
--- a/contrib/debian/netdata.postinst
+++ b/contrib/debian/netdata.postinst
@@ -2,29 +2,12 @@
set -e
-dpkg-maintscript-helper dir_to_symlink \
- /var/lib/netdata/www/.well-known /usr/share/netdata/www/.well-known 1.18.1~ netdata -- "$@"
-dpkg-maintscript-helper dir_to_symlink \
- /var/lib/netdata/www/css /usr/share/netdata/www/css 1.18.1~ netdata -- "$@"
-dpkg-maintscript-helper dir_to_symlink \
- /var/lib/netdata/www/fonts /usr/share/netdata/www/fonts 1.18.1~ netdata -- "$@"
-dpkg-maintscript-helper dir_to_symlink \
- /var/lib/netdata/www/images /usr/share/netdata/www/images 1.18.1~ netdata -- "$@"
-dpkg-maintscript-helper dir_to_symlink \
- /var/lib/netdata/www/lib /usr/share/netdata/www/lib 1.18.1~ netdata -- "$@"
-dpkg-maintscript-helper dir_to_symlink \
- /var/lib/netdata/www/static /usr/share/netdata/www/static 1.18.1~ netdata -- "$@"
-
case "$1" in
configure|reconfigure)
if ! dpkg-statoverride --list /var/lib/netdata > /dev/null 2>&1; then
dpkg-statoverride --update --add netdata netdata 0755 /var/lib/netdata
fi
- if ! dpkg-statoverride --list /var/lib/netdata/www > /dev/null 2>&1; then
- dpkg-statoverride --update --add root netdata 0755 /var/lib/netdata/www
- fi
-
if ! dpkg-statoverride --list /var/cache/netdata > /dev/null 2>&1; then
dpkg-statoverride --update --add netdata netdata 0755 /var/cache/netdata
fi
@@ -37,15 +20,17 @@ case "$1" in
dpkg-statoverride --update --add netdata adm 02750 /var/log/netdata
fi
+ if ! dpkg-statoverride --list /usr/share/netdata/www > /dev/null 2>&1; then
+ dpkg-statoverride --update --add root netdata 0755 /usr/share/netdata/www
+ fi
+
dpkg-statoverride --force --update --add root netdata 0775 /var/lib/netdata/registry > /dev/null 2>&1
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/local-listeners
-
- # Workaround for other plugins not installed directly by this package
- chmod -f 4750 /usr/libexec/netdata/plugins.d/ioping || true
+ for f in ndsudo cgroup-network local-listeners ioping.plugin; do
+ chmod 4750 "/usr/libexec/netdata/plugins.d/${f}" || true
+ done
;;
esac
diff --git a/contrib/debian/netdata.postrm b/contrib/debian/netdata.postrm
index 5644e22a..3a68dea7 100644
--- a/contrib/debian/netdata.postrm
+++ b/contrib/debian/netdata.postrm
@@ -2,19 +2,6 @@
set -e
-dpkg-maintscript-helper dir_to_symlink \
- /var/lib/netdata/www/.well-known /usr/share/netdata/www/.well-known 1.18.1~ netdata -- "$@"
-dpkg-maintscript-helper dir_to_symlink \
- /var/lib/netdata/www/css /usr/share/netdata/www/css 1.18.1~ netdata -- "$@"
-dpkg-maintscript-helper dir_to_symlink \
- /var/lib/netdata/www/fonts /usr/share/netdata/www/fonts 1.18.1~ netdata -- "$@"
-dpkg-maintscript-helper dir_to_symlink \
- /var/lib/netdata/www/images /usr/share/netdata/www/images 1.18.1~ netdata -- "$@"
-dpkg-maintscript-helper dir_to_symlink \
- /var/lib/netdata/www/lib /usr/share/netdata/www/lib 1.18.1~ netdata -- "$@"
-dpkg-maintscript-helper dir_to_symlink \
- /var/lib/netdata/www/static /usr/share/netdata/www/static 1.18.1~ netdata -- "$@"
-
case "$1" in
remove) ;;
@@ -27,6 +14,10 @@ case "$1" in
dpkg-statoverride --remove /var/lib/netdata/www
fi
+ if dpkg-statoverride --list | grep -qw /usr/share/netdata/www; then
+ dpkg-statoverride --remove /usr/share/netdata/www
+ fi
+
if dpkg-statoverride --list | grep -qw /var/lib/netdata/registry; then
dpkg-statoverride --remove /var/lib/netdata/registry
fi
diff --git a/contrib/debian/netdata.preinst b/contrib/debian/netdata.preinst
index a5dc9107..7f559599 100644
--- a/contrib/debian/netdata.preinst
+++ b/contrib/debian/netdata.preinst
@@ -2,19 +2,6 @@
set -e
-dpkg-maintscript-helper dir_to_symlink \
- /var/lib/netdata/www/.well-known /usr/share/netdata/www/.well-known 1.18.1~ netdata -- "$@"
-dpkg-maintscript-helper dir_to_symlink \
- /var/lib/netdata/www/css /usr/share/netdata/www/css 1.18.1~ netdata -- "$@"
-dpkg-maintscript-helper dir_to_symlink \
- /var/lib/netdata/www/fonts /usr/share/netdata/www/fonts 1.18.1~ netdata -- "$@"
-dpkg-maintscript-helper dir_to_symlink \
- /var/lib/netdata/www/images /usr/share/netdata/www/images 1.18.1~ netdata -- "$@"
-dpkg-maintscript-helper dir_to_symlink \
- /var/lib/netdata/www/lib /usr/share/netdata/www/lib 1.18.1~ netdata -- "$@"
-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
diff --git a/contrib/debian/rules b/contrib/debian/rules
index d0aa3539..e9231cdc 100755
--- a/contrib/debian/rules
+++ b/contrib/debian/rules
@@ -2,28 +2,58 @@
# Find the arch we are building for, as this determines
# the location of plugins in /usr/lib
+SRC_DIR = /usr/src/netdata
TOP = $(CURDIR)/debian/netdata
TEMPTOP = $(CURDIR)/debian/tmp
+BUILDDIR = $(CURDIR)/debian/build
BASE_CONFIG = system/netdata.conf
SYSTEMD_VERSION = $(shell /bin/sh -c "systemd --version 2>&1 | head -n 1 | cut -f 2 -d ' '")
-ifeq ($(shell test $(SYSTEMD_VERSION) -ge 235 && echo "1"), 1)
-SYSTEMD_UNIT = system/systemd/netdata.service.v235
+ifeq ($(shell test $(SYSTEMD_VERSION) -gt 235 && echo "1"), 1)
+SYSTEMD_UNIT = $(BUILDDIR)/system/systemd/netdata.service
else
-SYSTEMD_UNIT = system/systemd/netdata.service
+SYSTEMD_UNIT = $(BUILDDIR)/system/systemd/netdata.service.v235
endif
ifeq ($(shell test ${DEB_TARGET_ARCH} != "amd64" && echo "1"), 1)
HAVE_EBPF = 0
-EBPF_CONFIG = --disable-ebpf
+EBPF_CONFIG = -DENABLE_PLUGIN_EBPF=Off
else
HAVE_EBPF = 1
+EBPF_CONFIG = -DENABLE_PLUGIN_EBPF=On
endif
+ifeq ($(shell test ${DEB_TARGET_ARCH} != "amd64" && echo "1"), 1)
+ifeq ($(shell test ${DEB_TARGET_ARCH} != "arm64" && echo "1"), 1)
+HAVE_XENSTAT = 0
+XENSTAT_CONFIG = -DENABLE_PLUGIN_XENSTAT=Off
+else
+HAVE_XENSTAT = 1
+XENSTAT_CONFIG = -DENABLE_PLUGIN_XENSTAT=On
+endif
+else
+HAVE_XENSTAT = 1
+XENSTAT_CONFIG = -DENABLE_PLUGIN_XENSTAT=On
+endif
+
+ifeq ($(ENABLE_SENTRY),true)
+ RELEASE_PIPELINE ?= Unknown
+ VERSION ?= Unknown
+ BUILD_DESTINATION ?= Unknown
+ SENTRY_CONFIG := -DENABLE_SENTRY=On \
+ -DNETDATA_SENTRY_ENVIRONMENT=$(RELEASE_PIPELINE) \
+ -DNETDATA_SENTRY_RELEASE=$(VERSION) \
+ -DNETDATA_SENTRY_DIST=$(BUILD_DESTINATION) \
+ -DNETDATA_SENTRY_DSN=$(SENTRY_DSN)
+else
+ SENTRY_CONFIG := -DENABLE_SENTRY=Off
+endif
+
+
%:
- dh $@
+ dh $@ --builddirectory=$(BUILDDIR)
override_dh_installinit:
echo "SystemD Version: $(SYSTEMD_VERSION)"
@@ -38,10 +68,44 @@ override_dh_auto_configure:
packaging/bundle-libbpf.sh . ${TOP}/usr/libexec/netdata/plugins.d; \
packaging/bundle-ebpf-co-re.sh . ${TOP}/usr/libexec/netdata/plugins.d; \
fi
- autoreconf -ivf
- dh_auto_configure -- --prefix=/usr --sysconfdir=/etc --localstatedir=/var --libdir=/usr/lib \
- --libexecdir=/usr/libexec --with-user=netdata --with-math --with-zlib --with-webdir=/var/lib/netdata/www \
- --disable-dependency-tracking $(EBPF_CONFIG)
+ dh_auto_configure -- -G Ninja \
+ -DCMAKE_BUILD_TYPE=RelWithDebInfo \
+ -DCMAKE_INSTALL_PREFIX=/ \
+ -DWEB_DIR=/var/lib/netdata/www \
+ -DCMAKE_C_FLAGS='-ffile-prefix-map=${SRC_DIR}=${SRC_DIR}' \
+ -DENABLE_ACLK=On \
+ -DENABLE_CLOUD=On \
+ -DENABLE_DBENGINE=On \
+ -DENABLE_H2O=On \
+ -DENABLE_ML=On \
+ -DENABLE_PLUGIN_APPS=On \
+ -DENABLE_PLUGIN_CGROUP_NETWORK=On \
+ -DENABLE_PLUGIN_DEBUGFS=On \
+ $(EBPF_CONFIG) \
+ -DENABLE_PLUGIN_FREEIPMI=On \
+ -DENABLE_PLUGIN_GO=On \
+ -DENABLE_PLUGIN_LOCAL_LISTENERS=On \
+ -DENABLE_PLUGIN_LOGS_MANAGEMENT=On \
+ -DENABLE_PLUGIN_NFACCT=On \
+ -DENABLE_PLUGIN_PERF=On \
+ -DENABLE_PLUGIN_SLABINFO=On \
+ -DENABLE_PLUGIN_SYSTEMD_JOURNAL=On \
+ $(XENSTAT_CONFIG) \
+ -DENABLE_EXPORTER_PROMETHEUS_REMOTE_WRITE=On \
+ -DENABLE_EXPORTER_MONGODB=On \
+ -DENABLE_BUNDLED_PROTOBUF=Off \
+ -DENABLE_BUNDLED_JSONC=Off \
+ ${SENTRY_CONFIG} \
+ -DENABLE_BUNDLED_YAML=Off
+
+override_dh_auto_test:
+ true
+
+override_dh_strip:
+ if [ "${ENABLE_SENTRY}" = "true" ] && [ "${UPLOAD_SENTRY}" = "true" ]; then \
+ sentry-cli debug-files upload -o netdata-inc -p netdata-agent --force-foreground --log-level=debug --wait --include-sources /usr/src/netdata/debian/netdata/usr/sbin/netdata; \
+ fi
+ dh_strip
override_dh_install:
cp -v $(BASE_CONFIG) debian/netdata.conf
@@ -60,7 +124,7 @@ 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
+ # Add NFACCT plugin install rules
#
mkdir -p $(TOP)-plugin-nfacct/usr/libexec/netdata/plugins.d
mv -f $(TEMPTOP)/usr/libexec/netdata/plugins.d/nfacct.plugin \
@@ -140,6 +204,29 @@ override_dh_install:
mv -f $(TEMPTOP)/usr/lib/netdata/conf.d/logsmanagement.d/ \
$(TOP)-plugin-logs-management/usr/lib/netdata/conf.d/logsmanagement.d/
+ # Add xenstat plugin install rules
+ if [ $(HAVE_XENSTAT) -eq 1 ]; then \
+ mkdir -p $(TOP)-plugin-xenstat/usr/libexec/netdata/plugins.d/ ; \
+ mv -f $(TEMPTOP)/usr/libexec/netdata/plugins.d/xenstat.plugin \
+ $(TOP)-plugin-xenstat/usr/libexec/netdata/plugins.d/xenstat.plugin; \
+ fi
+
+ # Install go to it's own package directory
+ #
+ mkdir -p $(TOP)-plugin-go/usr/libexec/netdata/plugins.d
+ mv -f $(TEMPTOP)/usr/libexec/netdata/plugins.d/go.d.plugin \
+ $(TOP)-plugin-go/usr/libexec/netdata/plugins.d/go.d.plugin
+ mkdir -p $(TOP)-plugin-go/usr/lib/netdata/conf.d
+ mv -f $(TEMPTOP)/usr/lib/netdata/conf.d/go.d.conf \
+ $(TOP)-plugin-go/usr/lib/netdata/conf.d/go.d.conf
+ mv -f $(TEMPTOP)/usr/lib/netdata/conf.d/go.d \
+ $(TOP)-plugin-go/usr/lib/netdata/conf.d/go.d
+
+ # Add network-viewer plugin install rules
+ mkdir -p $(TOP)-plugin-network-viewer/usr/libexec/netdata/plugins.d/
+ mv -f $(TEMPTOP)/usr/libexec/netdata/plugins.d/network-viewer.plugin \
+ $(TOP)-plugin-network-viewer/usr/libexec/netdata/plugins.d/network-viewer.plugin
+
# Set the rest of the software in the main package
#
cp -rp $(TEMPTOP)/usr $(TOP)
@@ -153,15 +240,6 @@ override_dh_install:
#
cp -v packaging/installer/netdata-updater.sh $(TOP)/usr/libexec/netdata/netdata-updater.sh
- # Move files that local user shouldn't be editing to /usr/share/netdata
- #
- mkdir -p "$(TOP)/usr/share/netdata/www"
- for D in $$(find "$(TOP)/var/lib/netdata/www/" -maxdepth 1 -type d -printf '%f '); do \
- echo Relocating $$D; \
- mv "$(TOP)/var/lib/netdata/www/$$D" "$(TOP)/usr/share/netdata/www/$$D"; \
- ln -s "/usr/share/netdata/www/$$D" "$(TOP)/var/lib/netdata/www/$$D"; \
- done
-
# Handle eBPF code
#
if [ $(HAVE_EBPF) -eq 1 ]; then \
@@ -169,13 +247,6 @@ override_dh_install:
packaging/bundle-ebpf.sh . ${TOP}-ebpf-code-legacy/usr/libexec/netdata/plugins.d/ force; \
fi
- # Install go to it's own package directory
- #
- 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
@@ -201,7 +272,6 @@ override_dh_fixperms:
# apps.plugin should only be runnable by the netdata user. It will be
# given extra capabilities in the postinst script.
- #
chmod 0750 $(TOP)-plugin-apps/usr/libexec/netdata/plugins.d/apps.plugin
# slabinfo package
@@ -228,14 +298,22 @@ override_dh_fixperms:
# local-listeners
chmod 4750 $(TOP)/usr/libexec/netdata/plugins.d/local-listeners
+ # network-viewer
+ chmod 4750 $(TOP)-plugin-network-viewer/usr/libexec/netdata/plugins.d/network-viewer.plugin
+
# systemd-journal
chmod 4750 $(TOP)-plugin-systemd-journal/usr/libexec/netdata/plugins.d/systemd-journal.plugin
- # systemd-journal
+ # xenstat
+ if [ $(HAVE_XENSTAT) -eq 1 ]; then \
+ chmod 4750 $(TOP)-plugin-xenstat/usr/libexec/netdata/plugins.d/xenstat.plugin; \
+ fi
+
+ # logs-management
chmod 4750 $(TOP)-plugin-logs-management/usr/libexec/netdata/plugins.d/logs-management.plugin
override_dh_installlogrotate:
- cp system/logrotate/netdata debian/netdata.logrotate
+ cp $(BUILDDIR)/system/logrotate/netdata debian/netdata.logrotate
dh_installlogrotate
override_dh_installdeb:
diff --git a/contrib/rhel/build-netdata-rpm.sh b/contrib/rhel/build-netdata-rpm.sh
deleted file mode 100755
index e48c3c17..00000000
--- a/contrib/rhel/build-netdata-rpm.sh
+++ /dev/null
@@ -1,56 +0,0 @@
-#!/usr/bin/env bash
-
-# docker run -it --rm centos:6.9 /bin/sh
-# yum -y install rpm-build redhat-rpm-config yum-utils autoconf automake curl gcc git libmnl-devel libuuid-devel make pkgconfig zlib-devel
-
-cd "$(dirname "$0")/../../" || exit 1
-# shellcheck disable=SC1091
-source "packaging/installer/functions.sh" || exit 1
-
-set -e
-
-run autoreconf -ivf
-run ./configure --enable-maintainer-mode
-run make dist
-
-typeset version="$(grep PACKAGE_VERSION < config.h | cut -d '"' -f 2)"
-if [[ -z "${version}" ]]; then
- run_failed "Cannot find netdata version."
- exit 1
-fi
-
-if [[ "${version//-/}" != "$version" ]]; then
- # Remove all -* and _* suffixes to be as close as netdata release
- typeset versionfix="${version%%-*}"; versionfix="${versionfix%%_*}"
- # Append the current datetime fox a 'unique' build
- versionfix+="_$(date '+%m%d%H%M%S')"
- # And issue hints & details on why this failed, and how to fix it
- run_failed "Current version contains '-' which is forbidden by rpm. You must create a git annotated tag and rerun this script. Example:"
- run_failed " git tag -a $versionfix -m 'Release by $(id -nu) on $(uname -n)' && $0"
- exit 1
-fi
-
-
-typeset tgz="netdata-${version}.tar.gz"
-if [[ ! -f "${tgz}" ]]; then
- run_failed "Cannot find the generated tar.gz file '${tgz}'"
- exit 1
-fi
-
-typeset srpm="$(run rpmbuild -ts "${tgz}" | cut -d ' ' -f 2)"
-if [[ -z "${srpm}" ]] || ! [[ -f "${srpm}" ]]; then
- run_failed "Cannot find the generated SRPM file '${srpm}'"
- exit 1
-fi
-
-#if which yum-builddep 2>/dev/null
-#then
-# run yum-builddep "${srpm}"
-#elif which dnf 2>/dev/null
-#then
-# [ "${UID}" = 0 ] && run dnf builddep "${srpm}"
-#fi
-
-run rpmbuild --rebuild "${srpm}"
-
-run_ok "All done! Packages created in '$(rpm -E '%_rpmdir/%_arch')'"