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

Proposed by Christian Ehrhardt 
Status: Approved
Approved by: git-ubuntu bot
Approved revision: not available
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 (community) 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

Unmerged commits

4b3006f... by Christian Ehrhardt 

changelog: add FTBFS fix for nut

Signed-off-by: Christian Ehrhardt <email address hidden>

14e10db... by Bernd Zeimetz

Disable nut plugin again.

Various RC bugs for a longer time, not waiting for that.

227c432... by Christian Ehrhardt 

changelog: no change rebuild to add back to the archive (LP: #1971093)

Signed-off-by: Christian Ehrhardt <email address hidden>

69a0ef1... by Christian Ehrhardt 

update-maintainer

Signed-off-by: Christian Ehrhardt <email address hidden>

Preview Diff

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

Subscribers

People subscribed via source and target branches