SHA256
1
0
forked from pool/collectd

Accepting request 1062318 from home:trenn:branches:server:monitoring

- Update to version 5.12.0.130.g2f3c12e:
  * Fix formatting in mdadm events table
  * Add new exec-borg script to contrib/
  * ChangeLog: v5.12 milestone: Fix issue #3127
  * use derive_t instead of int inside ovs_stats_get_port_stat_value
  * In macOS 12, `IOMasterPort` is deprecated in favor of `IOMainPort`
  * - allow alertmanager correlation and resolve - fix meta names with ':'
  * fix drop probability
  * add config option to write metadata
- Fix build issue if net-snmp has NETSNMP_DISABLE_MD5 set:
A Fix-compile-issue-if-net-snmp-has-NETSNMP_DISABLE_MD5-set.patch
- Use autosetup and adopt patches from -p0 to -p1:
M    collectd-fix-config.patch
M    collectd-fix_spamassassin_doc.patch
- Use obs_scm and others in _service file:
A    _service
A    _servicedata
A    collectd.obsinfo

OBS-URL: https://build.opensuse.org/request/show/1062318
OBS-URL: https://build.opensuse.org/package/show/server:monitoring/collectd?expand=0&rev=178
This commit is contained in:
Thomas Renninger 2023-01-31 17:55:50 +00:00 committed by Git OBS Bridge
parent 7ee3a40c09
commit 930b12b681
11 changed files with 129 additions and 75 deletions

View File

@ -0,0 +1,29 @@
From: Thomas Renninger <trenn@suse.com>
Subject: Fix compile issue if net-snmp has NETSNMP_DISABLE_MD5 set
References:
Patch-Mainline:
Git-commit: be1a9d5975e4568774a46711d1366086978e9347
Git-repo: git@github.com:watologo1/collectd.git.git
Otherwise one gets:
src/snmp.c: In function 'csnmp_config_add_host_auth_protocol':
src/snmp.c:678:25: error: 'usmHMACMD5AuthProtocol' undeclared (first use in this function); did you mean 'usmHMACSHA1AuthProtocol'?
678 | hd->auth_protocol = usmHMACMD5AuthProtocol;
| ^~~~~~~~~~~~~~~~~~~~~~
| usmHMACSHA1AuthProtocol
Signed-off-by: <trenn@suse.com>
diff --git a/src/snmp.c b/src/snmp.c
index 827d62eb..078ef3ee 100644
--- a/src/snmp.c
+++ b/src/snmp.c
@@ -677,7 +677,7 @@ static int csnmp_config_add_host_auth_protocol(host_definition_t *hd,
if (status != 0)
return status;
-#ifdef NETSNMP_USMAUTH_HMACMD5
+#ifndef NETSNMP_DISABLE_MD5
if (strcasecmp("MD5", buffer) == 0) {
hd->auth_protocol = usmHMACMD5AuthProtocol;
hd->auth_protocol_len = sizeof(usmHMACMD5AuthProtocol) / sizeof(oid);

17
_service Normal file
View File

@ -0,0 +1,17 @@
<services>
<service name="obs_scm" mode="localonly">
<param name="scm">git</param>
<param name="url">https://github.com/collectd/collectd.git</param>
<param name="revision">HEAD</param>
<param name="versionrewrite-pattern">collectd-(.*)</param>
<param name="versionformat">@PARENT_TAG@.@TAG_OFFSET@.g%h</param>
<param name="changesgenerate">enable</param>
<param name="submodules">disable</param>
</service>
<service name="set_version" mode="localonly"/>
<service name="tar" mode="buildtime"/>
<service name="recompress" mode="buildtime">
<param name="file">*.tar</param>
<param name="compression">bz2</param>
</service>
</services>

4
_servicedata Normal file
View File

@ -0,0 +1,4 @@
<servicedata>
<service name="tar_scm">
<param name="url">https://github.com/collectd/collectd.git</param>
<param name="changesrevision">2f3c12ea57eb74c4d7c5e13aca6c50ca0dd75ba8</param></service></servicedata>

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:1a4da41ee65d0e02969a8eb8911e38fccc4001271953cdeab26305180dc8f023
size 7818253

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:5bae043042c19c31f77eb8464e56a01a5454e0b39fa07cf7ad0f1bfc9c3a09d6
size 1902756

View File

@ -1,7 +1,7 @@
Index: src/collectd.conf.in Index: src/collectd.conf.in
=================================================================== ===================================================================
--- src/collectd.conf.in.orig --- a/src/collectd.conf.in.orig
+++ src/collectd.conf.in +++ b/src/collectd.conf.in
@@ -272,7 +272,7 @@ @@ -272,7 +272,7 @@
#<Plugin apache> #<Plugin apache>
# <Instance "local"> # <Instance "local">

View File

@ -1,7 +1,7 @@
Index: contrib/SpamAssassin/Collectd.pm Index: contrib/SpamAssassin/Collectd.pm
=================================================================== ===================================================================
--- contrib/SpamAssassin/Collectd.pm.orig --- a/contrib/SpamAssassin/Collectd.pm.orig
+++ contrib/SpamAssassin/Collectd.pm +++ b/contrib/SpamAssassin/Collectd.pm
@@ -4,12 +4,6 @@ @@ -4,12 +4,6 @@
Collectd - plugin for filling collectd with stats Collectd - plugin for filling collectd with stats

View File

@ -1,12 +1,5 @@
addFilter('perl5-naming-policy-not-applied')
addFilter('non-etc-or-var-file-marked-as-conffile .*/spamassassin/99_collectd.cf') addFilter('non-etc-or-var-file-marked-as-conffile .*/spamassassin/99_collectd.cf')
addFilter('non-etc-or-var-file-marked-as-conffile .*/collectd/postgresql_default.conf') addFilter('non-etc-or-var-file-marked-as-conffile .*/collectd/postgresql_default.conf')
addFilter('macro-in-comment') addFilter('macro-in-comment')
#There no fsf address in that file
addFilter('incorrect-fsf-address /usr/share/doc/packages/collectd/contrib/network-proxy.py')
# Can't delete this file in the post section
addFilter('suse-filelist-forbidden-backup-file')

View File

@ -1,3 +1,25 @@
-------------------------------------------------------------------
Tue Jan 31 13:51:08 UTC 2023 - trenn@suse.de
- Update to version 5.12.0.130.g2f3c12e:
* Fix formatting in mdadm events table
* Add new exec-borg script to contrib/
* ChangeLog: v5.12 milestone: Fix issue #3127
* use derive_t instead of int inside ovs_stats_get_port_stat_value
* In macOS 12, `IOMasterPort` is deprecated in favor of `IOMainPort`
* - allow alertmanager correlation and resolve - fix meta names with ':'
* fix drop probability
* add config option to write metadata
- Fix build issue if net-snmp has NETSNMP_DISABLE_MD5 set:
A Fix-compile-issue-if-net-snmp-has-NETSNMP_DISABLE_MD5-set.patch
- Use autosetup and adopt patches from -p0 to -p1:
M collectd-fix-config.patch
M collectd-fix_spamassassin_doc.patch
- Use obs_scm and others in _service file:
A _service
A _servicedata
A collectd.obsinfo
------------------------------------------------------------------- -------------------------------------------------------------------
Wed Feb 16 20:11:55 UTC 2022 - Thomas Renninger <trenn@suse.de> Wed Feb 16 20:11:55 UTC 2022 - Thomas Renninger <trenn@suse.de>

4
collectd.obsinfo Normal file
View File

@ -0,0 +1,4 @@
name: collectd
version: 5.12.0.130.g2f3c12e
mtime: 1674807698
commit: 2f3c12ea57eb74c4d7c5e13aca6c50ca0dd75ba8

View File

@ -1,7 +1,7 @@
# #
# spec file for package collectd # spec file for package collectd
# #
# Copyright (c) 2022 SUSE LLC # Copyright (c) 2023 SUSE LLC
# Copyright (c) 2005-2013 Pascal Bleser <pascal.bleser@opensuse.org> # Copyright (c) 2005-2013 Pascal Bleser <pascal.bleser@opensuse.org>
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
@ -24,7 +24,7 @@
infiniband %{expand:%{rdt_plugin}} interface ipc iptables ipvs irq \\\ infiniband %{expand:%{rdt_plugin}} interface ipc iptables ipvs irq \\\
load logfile log_logstash \\\ load logfile log_logstash \\\
madwifi match_empty_counter match_hashed match_regex match_timediff match_value \\\ madwifi match_empty_counter match_hashed match_regex match_timediff match_value \\\
mdevents mbmon md memcached memory multimeter \\\ mdevents mbmon md memcached memory mmc multimeter \\\
netlink network nfs nginx notify_nagios ntpd numa olsrd openvpn \\\ netlink network nfs nginx notify_nagios ntpd numa olsrd openvpn \\\
perl ping protocols powerdns processes \\\ perl ping protocols powerdns processes \\\
rrdcached rrdtool %{expand:%{sensors_plugin}} serial statsd swap syslog \\\ rrdcached rrdtool %{expand:%{sensors_plugin}} serial statsd swap syslog \\\
@ -33,7 +33,6 @@
unixsock uptime users uuid vmem vserver \\\ unixsock uptime users uuid vmem vserver \\\
wireless write_graphite write_http write_log write_sensu write_tsdb \\\ wireless write_graphite write_http write_log write_sensu write_tsdb \\\
write_prometheus zfs_arc zookeeper write_prometheus zfs_arc zookeeper
%ifnarch s390 s390x %ifnarch s390 s390x
%define sensors 1 %define sensors 1
%define sensors_plugin sensors %define sensors_plugin sensors
@ -41,14 +40,12 @@
%define sensors 0 %define sensors 0
%define sensors_plugin %{nil} %define sensors_plugin %{nil}
%endif %endif
# dpdk exclusive build arch requirements copied: # dpdk exclusive build arch requirements copied:
%ifarch aarch64 x86_64 ppc64le %ifarch aarch64 x86_64 ppc64le
%define dpdk 1 %define dpdk 1
%else %else
%define dpdk 0 %define dpdk 0
%endif %endif
%ifarch x86_64 %{ix86} %ifarch x86_64 %{ix86}
%define intel_rdt 1 %define intel_rdt 1
%define rdt_plugin intel_rdt %define rdt_plugin intel_rdt
@ -56,15 +53,15 @@
%define intel_rdt 0 %define intel_rdt 0
%define rdt_plugin %{nil} %define rdt_plugin %{nil}
%endif %endif
Name: collectd Name: collectd
Version: 5.12.0 Version: 5.12.0.130.g2f3c12e
Release: 0 Release: 0
Summary: Statistics Collection Daemon for filling RRD Files Summary: Statistics Collection Daemon for filling RRD Files
License: GPL-2.0-only AND MIT License: GPL-2.0-only AND MIT
Group: System/Monitoring Group: System/Monitoring
URL: http://collectd.org/ URL: http://collectd.org/
Source: http://collectd.org/files/collectd-%{version}.tar.bz2 # Source: http://collectd.org/files/collectd-%%{version}.tar.bz2
Source: collectd-%{version}.tar.bz2
Source1: collectd.suse.init Source1: collectd.suse.init
Source2: collectd.apache2.conf Source2: collectd.apache2.conf
Source3: collectd-js.apache2.conf Source3: collectd-js.apache2.conf
@ -81,24 +78,17 @@ Patch8: 9e36cd85a2bb_sigrok_Update_to_support_libsigrok_0_4.patch
# PATCH-FIX-OPENSUSE avoid-pg-config.patch avoid pg_config if possible # PATCH-FIX-OPENSUSE avoid-pg-config.patch avoid pg_config if possible
Patch11: avoid-pg-config.patch Patch11: avoid-pg-config.patch
Patch12: harden_collectd.service.patch Patch12: harden_collectd.service.patch
Patch13: Fix-compile-issue-if-net-snmp-has-NETSNMP_DISABLE_MD5-set.patch
# for /etc/apache2/... ownership (rpmlint): # for /etc/apache2/... ownership (rpmlint):
BuildRequires: apache2 BuildRequires: apache2
BuildRequires: autoconf BuildRequires: autoconf
BuildRequires: automake BuildRequires: automake
BuildRequires: bison BuildRequires: bison
%if %{dpdk}
BuildRequires: dpdk-devel >= 19.08
%endif
BuildRequires: flex BuildRequires: flex
BuildRequires: gcc BuildRequires: gcc
BuildRequires: gdbm-devel BuildRequires: gdbm-devel
BuildRequires: gettext-devel BuildRequires: gettext-devel
BuildRequires: intltool BuildRequires: intltool
# intel_rdt -> pqos.h
# intel-cmt-cat exclusive build arch requirements copied:
%if %{intel_rdt}
BuildRequires: libpqos-devel
%endif
BuildRequires: java-devel BuildRequires: java-devel
BuildRequires: libesmtp-devel BuildRequires: libesmtp-devel
BuildRequires: libgcrypt-devel BuildRequires: libgcrypt-devel
@ -122,31 +112,17 @@ BuildRequires: systemd-rpm-macros
BuildRequires: xfsprogs-devel BuildRequires: xfsprogs-devel
BuildRequires: pkgconfig(OpenIPMI) BuildRequires: pkgconfig(OpenIPMI)
BuildRequires: pkgconfig(OpenIPMIpthread) BuildRequires: pkgconfig(OpenIPMIpthread)
%if 0%{?sle_version} < 150000 || 0%{?is_opensuse}
BuildRequires: pkgconfig(Qgpsmm)
BuildRequires: pkgconfig(libgps)
BuildRequires: pkgconfig(libsigrok)
%endif
BuildRequires: pkgconfig(dbi) BuildRequires: pkgconfig(dbi)
BuildRequires: pkgconfig(libatasmart) BuildRequires: pkgconfig(libatasmart)
BuildRequires: pkgconfig(libcurl) BuildRequires: pkgconfig(libcurl)
BuildRequires: pkgconfig(libevent)
BuildRequires: pkgconfig(libiptc) BuildRequires: pkgconfig(libiptc)
BuildRequires: pkgconfig(libmemcached) BuildRequires: pkgconfig(libmemcached)
BuildRequires: pkgconfig(libmicrohttpd) BuildRequires: pkgconfig(libmicrohttpd)
BuildRequires: pkgconfig(libmnl) BuildRequires: pkgconfig(libmnl)
%if 0%{?suse_version} > 1500 || 0%{?sle_version} >= 150400
BuildRequires: pkgconfig(libmodbus)
%endif
%if 0%{?is_opensuse}
BuildRequires: pkgconfig(libmosquitto)
%endif
BuildRequires: pkgconfig(libevent)
BuildRequires: pkgconfig(libnotify) BuildRequires: pkgconfig(libnotify)
BuildRequires: pkgconfig(liboping) BuildRequires: pkgconfig(liboping)
BuildRequires: pkgconfig(libpq) BuildRequires: pkgconfig(libpq)
%if 0%{?suse_version} > 1500 || 0%{?sle_version} >= 150300
BuildRequires: pkgconfig(librabbitmq)
%endif
BuildRequires: pkgconfig(librrd) BuildRequires: pkgconfig(librrd)
BuildRequires: pkgconfig(libudev) BuildRequires: pkgconfig(libudev)
BuildRequires: pkgconfig(libupsclient) BuildRequires: pkgconfig(libupsclient)
@ -162,6 +138,28 @@ Requires(post): %fillup_prereq
Obsoletes: collectd-beta < %{version} Obsoletes: collectd-beta < %{version}
Provides: collectd-beta = %{version}-%{release} Provides: collectd-beta = %{version}-%{release}
%{?systemd_requires} %{?systemd_requires}
%if %{dpdk}
BuildRequires: dpdk-devel >= 19.08
%endif
# intel_rdt -> pqos.h
# intel-cmt-cat exclusive build arch requirements copied:
%if %{intel_rdt}
BuildRequires: libpqos-devel
%endif
%if 0%{?sle_version} < 150000 || 0%{?is_opensuse}
BuildRequires: pkgconfig(Qgpsmm)
BuildRequires: pkgconfig(libgps)
BuildRequires: pkgconfig(libsigrok)
%endif
%if 0%{?suse_version} > 1500 || 0%{?sle_version} >= 150400
BuildRequires: pkgconfig(libmodbus)
%endif
%if 0%{?is_opensuse}
BuildRequires: pkgconfig(libmosquitto)
%endif
%if 0%{?suse_version} > 1500 || 0%{?sle_version} >= 150300
BuildRequires: pkgconfig(librabbitmq)
%endif
%if 0%{?suse_version} >= 1330 %if 0%{?suse_version} >= 1330
BuildRequires: pkgconfig(libnutclient) BuildRequires: pkgconfig(libnutclient)
%endif %endif
@ -497,7 +495,7 @@ Requires: %{name} = %{version}-%{release}
Optional %{name} plugin for filtering and parsing logs. Optional %{name} plugin for filtering and parsing logs.
%package plugin-ubi %package plugin-ubi
Summary: ubifs plugin for %{name} Summary: UBIFS plugin for %{name}
Group: System/Monitoring Group: System/Monitoring
Requires: %{name} = %{version}-%{release} Requires: %{name} = %{version}-%{release}
@ -516,27 +514,15 @@ Optional %{name} plugin to send values to InfluxDB using line protocol via udp
Summary: All Monitoring Plugins for %{name} Summary: All Monitoring Plugins for %{name}
Group: System/Monitoring Group: System/Monitoring
Requires: %{name} = %{version}-%{release} Requires: %{name} = %{version}-%{release}
%if 0%{?suse_version} > 1500 || 0%{?sle_version} >= 150300
Requires: %{name}-plugin-amqp = %{version}-%{release}
%endif
Requires: %{name}-plugin-buddyinfo = %{version}-%{release} Requires: %{name}-plugin-buddyinfo = %{version}-%{release}
Requires: %{name}-plugin-connectivity = %{version}-%{release} Requires: %{name}-plugin-connectivity = %{version}-%{release}
Requires: %{name}-plugin-dbi = %{version}-%{release} Requires: %{name}-plugin-dbi = %{version}-%{release}
%if 0%{?sle_version} < 150000 || 0%{?is_opensuse}
Requires: %{name}-plugin-gps = %{version}-%{release}
%endif
Requires: %{name}-plugin-ipmi = %{version}-%{release} Requires: %{name}-plugin-ipmi = %{version}-%{release}
Requires: %{name}-plugin-java = %{version}-%{release} Requires: %{name}-plugin-java = %{version}-%{release}
Requires: %{name}-plugin-logparser = %{version}-%{release} Requires: %{name}-plugin-logparser = %{version}-%{release}
Requires: %{name}-plugin-lua = %{version}-%{release} Requires: %{name}-plugin-lua = %{version}-%{release}
Requires: %{name}-plugin-mcelog = %{version}-%{release} Requires: %{name}-plugin-mcelog = %{version}-%{release}
Requires: %{name}-plugin-memcachec = %{version}-%{release} Requires: %{name}-plugin-memcachec = %{version}-%{release}
%if 0%{?suse_version} > 1500 || 0%{?sle_version} >= 150400
Requires: %{name}-plugin-modbus = %{version}-%{release}
%endif
%if 0%{?is_opensuse}
Requires: %{name}-plugin-mqtt = %{version}-%{release}
%endif
Requires: %{name}-plugin-mysql = %{version}-%{release} Requires: %{name}-plugin-mysql = %{version}-%{release}
Requires: %{name}-plugin-notify-desktop = %{version}-%{release} Requires: %{name}-plugin-notify-desktop = %{version}-%{release}
Requires: %{name}-plugin-openldap = %{version}-%{release} Requires: %{name}-plugin-openldap = %{version}-%{release}
@ -546,9 +532,6 @@ Requires: %{name}-plugin-pinba = %{version}-%{release}
Requires: %{name}-plugin-postgresql = %{version}-%{release} Requires: %{name}-plugin-postgresql = %{version}-%{release}
Requires: %{name}-plugin-procevent = %{version}-%{release} Requires: %{name}-plugin-procevent = %{version}-%{release}
Requires: %{name}-plugin-python3 = %{version}-%{release} Requires: %{name}-plugin-python3 = %{version}-%{release}
%if 0%{?sle_version} < 150000 || 0%{?is_opensuse}
Requires: %{name}-plugin-sigrok = %{version}-%{release}
%endif
Requires: %{name}-plugin-smart = %{version}-%{release} Requires: %{name}-plugin-smart = %{version}-%{release}
Requires: %{name}-plugin-snmp = %{version}-%{release} Requires: %{name}-plugin-snmp = %{version}-%{release}
Requires: %{name}-plugin-synproxy = %{version}-%{release} Requires: %{name}-plugin-synproxy = %{version}-%{release}
@ -561,6 +544,21 @@ Requires: %{name}-plugin-write_stackdriver = %{version}-%{release}
Requires: %{name}-plugin-write_syslog = %{version}-%{release} Requires: %{name}-plugin-write_syslog = %{version}-%{release}
Requires: %{name}-web = %{version}-%{release} Requires: %{name}-web = %{version}-%{release}
Requires: %{name}-web-js = %{version}-%{release} Requires: %{name}-web-js = %{version}-%{release}
%if 0%{?suse_version} > 1500 || 0%{?sle_version} >= 150300
Requires: %{name}-plugin-amqp = %{version}-%{release}
%endif
%if 0%{?sle_version} < 150000 || 0%{?is_opensuse}
Requires: %{name}-plugin-gps = %{version}-%{release}
%endif
%if 0%{?suse_version} > 1500 || 0%{?sle_version} >= 150400
Requires: %{name}-plugin-modbus = %{version}-%{release}
%endif
%if 0%{?is_opensuse}
Requires: %{name}-plugin-mqtt = %{version}-%{release}
%endif
%if 0%{?sle_version} < 150000 || 0%{?is_opensuse}
Requires: %{name}-plugin-sigrok = %{version}-%{release}
%endif
%if 0%{?suse_version} >= 1330 %if 0%{?suse_version} >= 1330
Requires: %{name}-plugin-nut = %{version}-%{release} Requires: %{name}-plugin-nut = %{version}-%{release}
%endif %endif
@ -611,19 +609,7 @@ This package contains the required development environment
to write %{name} unixsock clients. to write %{name} unixsock clients.
%prep %prep
%setup -q -n "collectd-%{version}" %autosetup -p1
%patch1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6
%patch7 -p1
%if 0%{?suse_version} > 1320
%patch8 -p1
%endif
%patch11 -p1
%patch12 -p1
sed -i 's|@@VERSION@@|%{version}|g' configure.ac sed -i 's|@@VERSION@@|%{version}|g' configure.ac
@ -899,7 +885,6 @@ ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}
%endif %endif
%if 0%{?sle_version} < 150000 || 0%{?is_opensuse} %if 0%{?sle_version} < 150000 || 0%{?is_opensuse}
%files plugin-sigrok %files plugin-sigrok
%{_libdir}/collectd/sigrok.so %{_libdir}/collectd/sigrok.so
%{_libdir}/collectd/sigrok.la %{_libdir}/collectd/sigrok.la