Merge ~uralt/ubuntu/+source/libgtop2:merge-lp2130086-resolute into ubuntu/+source/libgtop2:debian/sid

Proposed by Ural Tunaboyu
Status: Needs review
Proposed branch: ~uralt/ubuntu/+source/libgtop2:merge-lp2130086-resolute
Merge into: ubuntu/+source/libgtop2:debian/sid
Diff against target: 167 lines (+129/-1)
4 files modified
debian/changelog (+40/-0)
debian/control (+2/-1)
debian/patches/add-model-name-gathering-from-lscpu.patch (+86/-0)
debian/patches/series (+1/-0)
Reviewer Review Type Date Requested Status
Nick Rosbrook (community) Approve
Nadzeya Hutsko (community) Approve
git-ubuntu import Pending
Review via email: mp+497177@code.launchpad.net

Description of the change

Builds in PPA: https://launchpad.net/~uralt/+archive/ubuntu/resolute-merges/+builds?build_text=libgtop2&build_state=built

There are no autopkgtests available, but tested upgrading from existing version and installing new version from scratch and both work as expected.

To post a comment you must log in.
Revision history for this message
Nadzeya Hutsko (nadzeya) wrote :

Looks like a pretty straightforward merge, so nothing much to complain about. I also left a comment regarding the number in the changelog; please verify that everything is correct there. Thanks!

question: Should the patch be forwarded to upstream, or is model gathering something we need only in Ubuntu?

nitpick: Commit 970a186 can be squashed with 844a733

review: Needs Information
0d25df4... by Ural Tunaboyu

merge-changelogs

8b14a28... by Ural Tunaboyu

reconstruct-changelog

1a317f6... by Ural Tunaboyu

update-maintainer

Revision history for this message
Ural Tunaboyu (uralt) wrote :

Oh oops, thanks for the catch. Updated things now.

Revision history for this message
Nadzeya Hutsko (nadzeya) wrote (last edit ):

Looks good, thanks for addressing the changes. Unfortunately I cannot sponsor the upload, but I think it's upload ready

review: Approve
Revision history for this message
Nick Rosbrook (enr0n) wrote :

Looks good, sponsoring.

review: Approve

Unmerged commits

1a317f6... by Ural Tunaboyu

update-maintainer

8b14a28... by Ural Tunaboyu

reconstruct-changelog

0d25df4... by Ural Tunaboyu

merge-changelogs

24865c1... by Ural Tunaboyu

d/p/add-model-name-gathering-from-lscpu.patch: add patch

Expand fields with data from lscpu (LP #2116763).

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 9884518..49f6300 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,11 @@
6+libgtop2 (2.41.3-2ubuntu1) resolute; urgency=medium
7+
8+ * Merge with Debian unstable (LP: #2130086). Remaining changes:
9+ - d/p/add-model-name-gathering-from-lscpu.patch: add patch to expand
10+ fields with data from lscpu (LP #2116763).
11+
12+ -- Ural Tunaboyu <ural.tunaboyu@canonical.com> Wed, 10 Dec 2025 07:59:30 -0800
13+
14 libgtop2 (2.41.3-2) unstable; urgency=medium
15
16 * Team upload
17@@ -26,6 +34,38 @@ libgtop2 (2.41.3-2) unstable; urgency=medium
18
19 -- Simon McVittie <smcv@debian.org> Tue, 02 Sep 2025 10:55:40 +0100
20
21+libgtop2 (2.41.3-1ubuntu1) questing; urgency=medium
22+
23+ [ Andreas Glinserer ]
24+ * d/p/add-model-name-gathering-from-lscpu.patch
25+ - Expand fields with data from lscpu (LP: #2116763)
26+
27+ -- Andreas Glinserer <andreas.glinserer@canonical.com> Thu, 04 Sep 2025 14:52:42 +0200
28+
29+libgtop2 (2.41.3-1build4) noble; urgency=medium
30+
31+ * No-change rebuild to restore i386 binaries.
32+
33+ -- Matthias Klose <doko@ubuntu.com> Wed, 17 Apr 2024 13:30:12 +0200
34+
35+libgtop2 (2.41.3-1build3) noble; urgency=medium
36+
37+ * No-change rebuild for CVE-2024-3094
38+
39+ -- Steve Langasek <steve.langasek@ubuntu.com> Sun, 31 Mar 2024 02:01:26 +0000
40+
41+libgtop2 (2.41.3-1build2) noble; urgency=medium
42+
43+ * No-change rebuild against libglib2.0-0t64
44+
45+ -- Steve Langasek <steve.langasek@ubuntu.com> Mon, 11 Mar 2024 23:02:27 +0000
46+
47+libgtop2 (2.41.3-1build1) noble; urgency=medium
48+
49+ * No-change rebuild against libglib2.0-0t64
50+
51+ -- Steve Langasek <steve.langasek@ubuntu.com> Fri, 08 Mar 2024 05:23:37 +0000
52+
53 libgtop2 (2.41.3-1) unstable; urgency=medium
54
55 * New upstream release
56diff --git a/debian/control b/debian/control
57index c0aac7c..c9cdfee 100644
58--- a/debian/control
59+++ b/debian/control
60@@ -1,7 +1,8 @@
61 Source: libgtop2
62 Section: libs
63 Priority: optional
64-Maintainer: Debian GNOME Maintainers <pkg-gnome-maintainers@lists.alioth.debian.org>
65+Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
66+XSBC-Original-Maintainer: Debian GNOME Maintainers <pkg-gnome-maintainers@lists.alioth.debian.org>
67 Uploaders: Emilio Pozuelo Monfort <pochu@debian.org>,
68 Jeremy BĂ­cha <jbicha@ubuntu.com>
69 Build-Depends: debhelper-compat (= 13),
70diff --git a/debian/patches/add-model-name-gathering-from-lscpu.patch b/debian/patches/add-model-name-gathering-from-lscpu.patch
71new file mode 100644
72index 0000000..c1ebcaa
73--- /dev/null
74+++ b/debian/patches/add-model-name-gathering-from-lscpu.patch
75@@ -0,0 +1,86 @@
76+From: Andreas Glinserer <andreas.glinserer@canonical.com>
77+Date: Mon, 11 Aug 2025 12:34:29 +0200
78+Subject: add model name gathering from lscpu
79+
80+Co-authored-by: Marco Trevisan <mail@3v1n0.net>
81+---
82+ sysdeps/linux/sysinfo.c | 59 +++++++++++++++++++++++++++++++++++++++++++++++++
83+ 1 file changed, 59 insertions(+)
84+
85+diff --git a/sysdeps/linux/sysinfo.c b/sysdeps/linux/sysinfo.c
86+index 7dbd5ee..a0d4e5a 100644
87+--- a/sysdeps/linux/sysinfo.c
88++++ b/sysdeps/linux/sysinfo.c
89+@@ -33,6 +33,64 @@ static const unsigned long _glibtop_sysdeps_sysinfo =
90+
91+ static glibtop_sysinfo sysinfo = { .flags = 0 };
92+
93++static void
94++extend_sysinfo (glibtop *server)
95++{
96++ /* expand the already retrieved information by augmenting the output of lscpu into it */
97++ const char* key = "model name";
98++ g_autofree char *output = NULL;
99++ g_autofree char *lscpu = NULL;
100++ gint exit_status;
101++ g_autoptr (GError) error = NULL;
102++ g_auto (GStrv) lines = NULL;
103++ g_auto (GStrv) fields = NULL;
104++ guint i;
105++ const char *command = "lscpu --parse=cpu,MODELNAME";
106++
107++ if (g_spawn_command_line_sync (command, &output, NULL, &exit_status, &error)) {
108++ if (!g_spawn_check_wait_status (exit_status, &error)) {
109++ glibtop_warn_r (server, "Could not execute \"%s\" (%i)", command, exit_status);
110++ return;
111++ }
112++ } else {
113++ glibtop_warn_r (server, "Failed to spawn \"lscpu\"");
114++ }
115++
116++ /* use output form here on */
117++ if (output == NULL)
118++ return;
119++
120++ lines = g_strsplit (output, "\n", 0);
121++ char *model;
122++ model = NULL;
123++
124++ for (i = 0; lines[i]; i++) {
125++ if (*lines[i] == '#')
126++ continue;
127++
128++ fields = g_strsplit (lines[i], ",", 3);
129++ if (g_strv_length (fields) < 2) {
130++ continue;
131++ }
132++
133++ /* parse cpu number and model name */
134++ guint cpu_num = g_ascii_strtoull (fields[0], NULL, 0);
135++
136++ if (cpu_num >= sysinfo.ncpu) {
137++ continue;
138++ }
139++
140++ /* check if model name field is already present */
141++ glibtop_entry * const cpuinfo = &sysinfo.cpuinfo[cpu_num];
142++ model = g_hash_table_lookup (cpuinfo->values, key);
143++
144++ if (model == NULL) {
145++ g_ptr_array_add (cpuinfo->labels, key);
146++ g_hash_table_insert (cpuinfo->values, g_strdup (key), g_strdup (fields[1]));
147++ }
148++ }
149++}
150++
151+ static void
152+ init_sysinfo (glibtop *server)
153+ {
154+@@ -100,6 +158,7 @@ init_sysinfo (glibtop *server)
155+ }
156+
157+ g_strfreev(processors);
158++ extend_sysinfo (server);
159+
160+ sysinfo.flags = _glibtop_sysdeps_sysinfo;
161+ }
162diff --git a/debian/patches/series b/debian/patches/series
163index e69de29..0bde4a6 100644
164--- a/debian/patches/series
165+++ b/debian/patches/series
166@@ -0,0 +1 @@
167+add-model-name-gathering-from-lscpu.patch

Subscribers

People subscribed via source and target branches