summaryrefslogtreecommitdiffstats
path: root/netdata.spec.in
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-03-09 13:19:48 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-03-09 13:20:02 +0000
commit58daab21cd043e1dc37024a7f99b396788372918 (patch)
tree96771e43bb69f7c1c2b0b4f7374cb74d7866d0cb /netdata.spec.in
parentReleasing debian version 1.43.2-1. (diff)
downloadnetdata-58daab21cd043e1dc37024a7f99b396788372918.tar.xz
netdata-58daab21cd043e1dc37024a7f99b396788372918.zip
Merging upstream version 1.44.3.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'netdata.spec.in')
-rw-r--r--netdata.spec.in61
1 files changed, 60 insertions, 1 deletions
diff --git a/netdata.spec.in b/netdata.spec.in
index b4e16ad62..7ebe5e276 100644
--- a/netdata.spec.in
+++ b/netdata.spec.in
@@ -20,6 +20,7 @@ AutoReqProv: yes
%global _lto_cflags %nil
# Disable go.d.plugin build on outdated golang distros
+%if 0
%if 0%{?centos_ver:1}
%if 0%{?centos_ver} >= 10 && 0%{?almalinux_ver:1} && 0%{?rocky_ver:1}
%global _golang_build 1
@@ -28,6 +29,7 @@ AutoReqProv: yes
%global _missing_build_ids_terminate_build 0
%endif
%endif
+%endif
# Disable eBPF for architectures other than x86
%ifarch x86_64 i386
@@ -104,6 +106,12 @@ BuildRequires: zlib-devel
BuildRequires: libuuid-devel
BuildRequires: libuv-devel >= 1
BuildRequires: openssl-devel
+BuildRequires: libcurl-devel
+%if 0%{?suse_version}
+# log2journal is not available on these systems
+%else
+BuildRequires: pcre2-devel
+%endif
%if 0%{?suse_version}
BuildRequires: protobuf-devel
BuildRequires: libprotobuf-c-devel
@@ -162,9 +170,12 @@ Requires: %{name}-plugin-nfacct = %{version}
%if 0%{?_have_freeipmi} && 0%{?centos_ver} != 6 && 0%{?centos_ver} != 7 && 0%{?amazon_linux} != 2
Suggests: %{name}-plugin-freeipmi = %{version}
%endif
-%if 0%{?centos_ver} != 6 && 0%{?centos_ver} != 7 && 0%{?amazon_linux} != 2
+%if 0%{?centos_ver} != 7 && 0%{?amazon_linux} != 2
Suggests: %{name}-plugin-cups = %{version}
Recommends: %{name}-plugin-systemd-journal = %{version}
+Recommends: %{name}-plugin-logs-management = %{version}
+%else
+Requires: %{name}-plugin-systemd-journal = %{version}
%endif
@@ -204,11 +215,13 @@ BuildRequires: cups-devel >= 1.7
# end - cups plugin dependencies
# go.d.plugin dependencies
+%if 0%{?_golang_build}
%if 0%{?suse_version}
BuildRequires: go
%else
BuildRequires: golang
%endif
+%endif
# end - go.d.plugin plugin dependencies
# systemd-journal dependencies
@@ -219,6 +232,11 @@ BuildRequires: systemd-devel
BuildRequires: snappy-devel
# end - prometheus remote write dependencies
+# logs-management dependencies
+BuildRequires: bison
+BuildRequires: flex
+# end - logs-management dependencies
+
# #####################################################################
# End of dependency management configuration
# #####################################################################
@@ -342,6 +360,10 @@ install -m 0750 -p debugfs.plugin "${RPM_BUILD_ROOT}%{_libexecdir}/%{name}/plugi
install -m 4750 -p systemd-journal.plugin "${RPM_BUILD_ROOT}%{_libexecdir}/%{name}/plugins.d/systemd-journal.plugin"
# ###########################################################
+# Install logs-management.plugin
+#install -m 4750 -p logs-management.plugin "${RPM_BUILD_ROOT}%{_libexecdir}/%{name}/plugins.d/logs-management.plugin"
+
+# ###########################################################
# Install perf.plugin
install -m 4750 -p perf.plugin "${RPM_BUILD_ROOT}%{_libexecdir}/%{name}/plugins.d/perf.plugin"
@@ -550,6 +572,12 @@ rm -rf "${RPM_BUILD_ROOT}"
%{_libdir}/%{name}
%{_sbindir}/%{name}
%{_sbindir}/netdatacli
+%if 0%{?suse_version}
+# log2journal is not available on these systems
+%else
+%{_sbindir}/log2journal
+%endif
+%{_sbindir}/systemd-cat-native
%{_sbindir}/%{name}-claim.sh
%{_unitdir}/%{name}.service
@@ -649,6 +677,11 @@ rm -rf "${RPM_BUILD_ROOT}"
# systemd-journal belongs to a different sub-package
%exclude %{_libexecdir}/%{name}/plugins.d/systemd-journal.plugin
+# logs management belongs to a different sub-package
+%exclude %{_libexecdir}/%{name}/plugins.d/logs-management.plugin
+%exclude %{_libdir}/%{name}/conf.d/logsmanagement.d.conf
+%exclude %{_libdir}/%{name}/conf.d/logsmanagement.d
+
# CUPS belongs to a different sub package
%if 0%{?centos_ver} != 6 && 0%{?centos_ver} != 7
%exclude %{_libexecdir}/%{name}/plugins.d/cups.plugin
@@ -967,7 +1000,33 @@ fi
# CAP_DAC_READ_SEARCH required for data collection.
%caps(cap_dac_read_search=ep) %attr(0750,root,netdata) %{_libexecdir}/%{name}/plugins.d/systemd-journal.plugin
+%package plugin-logs-management
+Summary: The logs-management plugin for the Netdata Agent
+Group: Applications/System
+Requires: %{name} = %{version}
+Conflicts: %{name} < %{version}
+
+%description plugin-logs-management
+ This plugin allows the Netdata Agent to collect logs from the system
+ and parse them to extract metrics.
+
+%pre plugin-logs-management
+
+if ! getent group %{name} > /dev/null; then
+ groupadd --system %{name}
+fi
+
+%files plugin-logs-management
+%defattr(0644,root,netdata,0755)
+%{_libdir}/%{name}/conf.d/logsmanagement.d.conf
+%{_libdir}/%{name}/conf.d/logsmanagement.d
+%defattr(0750,root,netdata,0750)
+# CAP_DAC_READ_SEARCH and CAP_SYSLOG needed for data collection.
+%caps(cap_dac_read_search,cap_syslog=ep) %attr(0750,root,netdata) %{_libexecdir}/%{name}/plugins.d/logs-management.plugin
+
%changelog
+* Thu Oct 26 2023 Austin Hemmelgarn <austin@netdata.cloud> 0.0.0-24
+- Add package for logs-management plugin
* Mon Aug 28 2023 Konstantin Shalygin <k0ste@k0ste.ru> 0.0.0-23
- Build go.d.plugin natively for CentOS Stream distro
* Mon Aug 21 2023 Austin Hemmelgarn <austin@netdata.cloud> 0.0.0-22