Merge ~paelzer/ubuntu/+source/collectd:lp1971093-bring-collectd-back-to-JAMMY-v2 into ubuntu/+source/collectd:ubuntu/jammy-devel

Proposed by Christian Ehrhardt 
Status: Merged
Approved by: git-ubuntu bot
Approved revision: not available
Merge reported by: Christian Ehrhardt 
Merged at revision: 4b3006fa1e0c8ca3faa24e3b09f5ea61dbe9168b
Proposed branch: ~paelzer/ubuntu/+source/collectd:lp1971093-bring-collectd-back-to-JAMMY-v2
Merge into: ubuntu/+source/collectd:ubuntu/jammy-devel
Diff against target: 183 lines (+95/-6)
7 files modified
debian/changelog (+22/-0)
debian/control (+3/-4)
debian/patches/fix-nut-integer-sizes (+22/-0)
debian/patches/fix-storing-local-variables (+43/-0)
debian/patches/series (+2/-0)
debian/po/templates.pot (+1/-1)
debian/rules (+2/-1)
Reviewer Review Type Date Requested Status
Trent Lloyd (community) Approve
git-ubuntu bot Approve
Andreas Hasenack Approve
Canonical Server Reporter Pending
Review via email: mp+435821@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Since nut is being disabled again in 14e10db2ce218eb58e2e4e85800c949943aceb08, isn't the minimal fix just these two:

      * [343f857] Don't use local variables in global pointers
        Closes: #1016187

and

      * [15098cc] Also fix local variables issue in write_prometheus

What were your considerations when pondering the above? That it's simpler and less error-prone to grab the -10 debian package and disable nut, like is done in -11?

From an SRU perspective, I would prefer the minimal fixes, but then again, this package does not exist in jammy, so there is technically no regression case, other then new rebuilds of other packages down the line which link to libcollectdclient1.

review: Needs Information
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

The consideration was to use something that really was built and used for a while (in Debian in this case) instead of manually selecting what I consider nice.

And since nothing is in Jammy right now that seemed to give our users the most, but at the same time avoiding to be -11 itself.

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Ok, thanks for the explanation.

+1

review: Approve
Revision history for this message
git-ubuntu bot (git-ubuntu-bot) wrote :

Approvers: paelzer, ahasenack
Uploaders: paelzer, ahasenack
MP auto-approved

review: Approve
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Thanks!

FYI - Now Uploaded

Revision history for this message
Trent Lloyd (lathiat) wrote :

Already merged but adding my feedback anyway. LGTM and also performed some basic testing including upgrade from focal with a few plugins enabled. Working OK.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/debian/changelog b/debian/changelog
index 34b79fd..3ef1ef4 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,25 @@
1collectd (5.12.0-10ubuntu0.1) jammy; urgency=medium
2
3 * Rebuild to get it back into the Archive as it was removed as
4 rdep for (LP: 1960612) but not added back. Yet despite being in
5 universe it is used by many monitoring components and should be
6 available (LP: #1971093).
7 - use 5.12.0-10 which has some useful fixes and is before 5.12.0-11
8 that is in kinetic.
9 - cherry-pick "[e1c67e5] Disable nut plugin again." from 5.12.0-11
10 Various RC bugs for a longer time, not waiting for that.
11
12 -- Christian Ehrhardt <christian.ehrhardt@canonical.com> Mon, 16 Jan 2023 10:33:01 +0100
13
14collectd (5.12.0-10) unstable; urgency=medium
15
16 * [343f857] Don't use local variables in global pointers
17 Closes: #1016187
18 * [254a859] Fix building with current nut version.
19 * [15098cc] Also fix local variables issue in write_prometheus
20
21 -- Bernd Zeimetz <bzed@debian.org> Sat, 20 Aug 2022 22:38:49 +0200
22
1collectd (5.12.0-9) unstable; urgency=medium23collectd (5.12.0-9) unstable; urgency=medium
224
3 * [577cd1f] Don't build mysql plugin on kfreebsd*25 * [577cd1f] Don't build mysql plugin on kfreebsd*
diff --git a/debian/control b/debian/control
index dad17df..5427a5f 100644
--- a/debian/control
+++ b/debian/control
@@ -1,7 +1,8 @@
1Source: collectd1Source: collectd
2Section: utils2Section: utils
3Priority: optional3Priority: optional
4Maintainer: Collectd Packaging Team <team+collectd@tracker.debian.org>4Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
5XSBC-Original-Maintainer: Collectd Packaging Team <team+collectd@tracker.debian.org>
5Uploaders: Sebastian Harl <tokkee@debian.org>, Marc Fournier <marc@bl.uem.li>, Bernd Zeimetz <bzed@debian.org>6Uploaders: Sebastian Harl <tokkee@debian.org>, Marc Fournier <marc@bl.uem.li>, Bernd Zeimetz <bzed@debian.org>
6Build-Depends: debhelper-compat (= 10), dpkg-dev (>= 1.14.10), po-debconf, dh-strip-nondeterminism, dh-autoreconf,7Build-Depends: debhelper-compat (= 10), dpkg-dev (>= 1.14.10), po-debconf, dh-strip-nondeterminism, dh-autoreconf,
7 bison, flex, autotools-dev, libltdl-dev, pkg-config,8 bison, flex, autotools-dev, libltdl-dev, pkg-config,
@@ -49,7 +50,6 @@ Build-Depends: debhelper-compat (= 10), dpkg-dev (>= 1.14.10), po-debconf, dh-st
49 libsnmp-dev (>= 5.4.2.1~dfsg-4~) | libsnmp-dev | libsnmp9-dev,50 libsnmp-dev (>= 5.4.2.1~dfsg-4~) | libsnmp-dev | libsnmp9-dev,
50 libsnmp-dev (>= 5.4.2.1~dfsg-4~) | perl (<< 5.10.1~rc2-1~),51 libsnmp-dev (>= 5.4.2.1~dfsg-4~) | perl (<< 5.10.1~rc2-1~),
51 libudev-dev [linux-any],52 libudev-dev [linux-any],
52 libupsclient-dev | libupsclient1-dev,
53 libvarnishapi-dev,53 libvarnishapi-dev,
54 libvirt-dev (>= 0.4.0-6) [!kfreebsd-i386 !kfreebsd-amd64 !sh4 !ia64 !alpha],54 libvirt-dev (>= 0.4.0-6) [!kfreebsd-i386 !kfreebsd-amd64 !sh4 !ia64 !alpha],
55 libxen-dev [amd64 arm64 armhf],55 libxen-dev [amd64 arm64 armhf],
@@ -82,7 +82,7 @@ Suggests: collectd-dev,
82# services providing data that may be collected by collectd82# services providing data that may be collected by collectd
83 apache2, apcupsd, bind9, ceph, chrony, default-mysql-server, gpsd,83 apache2, apcupsd, bind9, ceph, chrony, default-mysql-server, gpsd,
84 iptables, ipvsadm, lm-sensors, mbmon, memcached, nginx, notification-daemon,84 iptables, ipvsadm, lm-sensors, mbmon, memcached, nginx, notification-daemon,
85 nut, openvpn, olsrd, pdns-server, postgresql, redis-server, slapd,85 openvpn, olsrd, pdns-server, postgresql, redis-server, slapd,
86 time-daemon, varnish, zookeeper,86 time-daemon, varnish, zookeeper,
87 ${shlibs:Suggests}, default-jre-headless87 ${shlibs:Suggests}, default-jre-headless
88Replaces: collectd (<< 4.8.2-1~)88Replaces: collectd (<< 4.8.2-1~)
@@ -172,7 +172,6 @@ Description: statistics collection and monitoring daemon (core system)
172 * send notification E-mails: notify_email172 * send notification E-mails: notify_email
173 * send notifications to nagios: notify_nagios173 * send notifications to nagios: notify_nagios
174 * NTP daemon's local clock drift, offset to peers, etc.: ntpd174 * NTP daemon's local clock drift, offset to peers, etc.: ntpd
175 * UPS information: nut
176 * Optimized Link State Routing daemon statistics: olsrd175 * Optimized Link State Routing daemon statistics: olsrd
177 * OpenLDAP's cn=Monitor statistics: openldap176 * OpenLDAP's cn=Monitor statistics: openldap
178 * OpenVPN traffic and compression statistics: openvpn177 * OpenVPN traffic and compression statistics: openvpn
diff --git a/debian/patches/fix-nut-integer-sizes b/debian/patches/fix-nut-integer-sizes
179new file mode 100644178new file mode 100644
index 0000000..bc5308b
--- /dev/null
+++ b/debian/patches/fix-nut-integer-sizes
@@ -0,0 +1,22 @@
1Index: collectd/src/nut.c
2===================================================================
3--- collectd.orig/src/nut.c
4+++ collectd/src/nut.c
5@@ -46,7 +46,7 @@ struct nut_ups_s {
6 collectd_upsconn_t *conn;
7 char *upsname;
8 char *hostname;
9- int port;
10+ uint16_t port;
11 nut_ups_t *next;
12 };
13
14@@ -250,7 +250,7 @@ static int nut_read(user_data_t *user_da
15 const char *query[3] = {"VAR", ups->upsname, NULL};
16 unsigned int query_num = 2;
17 char **answer;
18- unsigned int answer_num;
19+ size_t answer_num;
20 int status;
21
22 /* (Re-)Connect if we have no connection */
diff --git a/debian/patches/fix-storing-local-variables b/debian/patches/fix-storing-local-variables
0new file mode 10064423new file mode 100644
index 0000000..9060ab7
--- /dev/null
+++ b/debian/patches/fix-storing-local-variables
@@ -0,0 +1,43 @@
1Index: collectd/src/capabilities.c
2===================================================================
3--- collectd.orig/src/capabilities.c
4+++ collectd/src/capabilities.c
5@@ -56,6 +56,8 @@ static char *httpd_host = NULL;
6 static unsigned short httpd_port = 9104;
7 static struct MHD_Daemon *httpd;
8
9+static int mhd_cls = 44;
10+
11 static dmi_type_name_t types_list[] = {
12 {BIOS, "BIOS"},
13 {SYSTEM, "SYSTEM"},
14@@ -206,7 +208,7 @@ static MHD_RESULT cap_http_handler(void
15 * round. The docs are not very specific on the issue. */
16 if (*connection_state == NULL) {
17 /* set to a random non-NULL pointer. */
18- *connection_state = &(int){44};
19+ *connection_state = &mhd_cls;
20 return MHD_YES;
21 }
22 DEBUG(CAP_PLUGIN ": formatted response: %s", g_cap_json);
23Index: collectd/src/write_prometheus.c
24===================================================================
25--- collectd.orig/src/write_prometheus.c
26+++ collectd/src/write_prometheus.c
27@@ -63,6 +63,7 @@ static pthread_mutex_t metrics_lock = PT
28 static char *httpd_host = NULL;
29 static unsigned short httpd_port = 9103;
30 static struct MHD_Daemon *httpd;
31+static int mhd_cls = 42;
32
33 static cdtime_t staleness_delta = PROMETHEUS_DEFAULT_STALENESS_DELTA;
34
35@@ -247,7 +248,7 @@ static MHD_RESULT http_handler(void *cls
36 * very specific on the issue. */
37 if (*connection_state == NULL) {
38 /* set to a random non-NULL pointer. */
39- *connection_state = &(int){42};
40+ *connection_state = &mhd_cls;
41 return MHD_YES;
42 }
43
diff --git a/debian/patches/series b/debian/patches/series
index 2d8aa9f..ef0e085 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,5 @@
1fix-nut-integer-sizes
2fix-storing-local-variables
1rrd_filter_path.patch3rrd_filter_path.patch
2collection_conf_path.patch4collection_conf_path.patch
3myplugin_includes.patch5myplugin_includes.patch
diff --git a/debian/po/templates.pot b/debian/po/templates.pot
index 4220a4c..b4739ec 100644
--- a/debian/po/templates.pot
+++ b/debian/po/templates.pot
@@ -8,7 +8,7 @@ msgid ""
8msgstr ""8msgstr ""
9"Project-Id-Version: collectd\n"9"Project-Id-Version: collectd\n"
10"Report-Msgid-Bugs-To: collectd@packages.debian.org\n"10"Report-Msgid-Bugs-To: collectd@packages.debian.org\n"
11"POT-Creation-Date: 2022-02-22 01:18+0100\n"11"POT-Creation-Date: 2022-08-20 22:50+0200\n"
12"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"12"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"13"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14"Language-Team: LANGUAGE <LL@li.org>\n"14"Language-Team: LANGUAGE <LL@li.org>\n"
diff --git a/debian/rules b/debian/rules
index db2a690..08dace3 100755
--- a/debian/rules
+++ b/debian/rules
@@ -113,7 +113,8 @@ confflags += --disable-sigrok
113# libnvidia-ml is non-free113# libnvidia-ml is non-free
114confflags += --disable-gpu_nvidia114confflags += --disable-gpu_nvidia
115115
116116# disable nut plugin for now.
117confflags += --disable-nut
117118
118# ganglia FTBS, disable it for now119# ganglia FTBS, disable it for now
119# see #964399120# see #964399

Subscribers

People subscribed via source and target branches