summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-support/nmon
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2021-10-30 02:14:48 -0700
committerKhem Raj <raj.khem@gmail.com>2021-11-01 05:45:17 -0700
commit9c9c02d434a8ea7a2dd0dadc0ec130aec37f1ff3 (patch)
tree229b24f6055dfab19532070496931ac9610d7f8d /meta-oe/recipes-support/nmon
parenta1ac306208bb9f56fc6e311bd9ff87c46dc2182f (diff)
downloadmeta-openembedded-9c9c02d434a8ea7a2dd0dadc0ec130aec37f1ff3.tar.gz
nmon: Upgrade to 16m
Fix compile with ncurses 6.3+ Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-support/nmon')
-rw-r--r--meta-oe/recipes-support/nmon/nmon/0001-Fix-a-lot-of-Werror-format-security-errors-with-mvpr.patch175
-rw-r--r--meta-oe/recipes-support/nmon/nmon/0001-lmon16g.c-Adjust-system-headers.patch8
-rw-r--r--meta-oe/recipes-support/nmon/nmon_16m.bb (renamed from meta-oe/recipes-support/nmon/nmon_16g.bb)9
3 files changed, 183 insertions, 9 deletions
diff --git a/meta-oe/recipes-support/nmon/nmon/0001-Fix-a-lot-of-Werror-format-security-errors-with-mvpr.patch b/meta-oe/recipes-support/nmon/nmon/0001-Fix-a-lot-of-Werror-format-security-errors-with-mvpr.patch
new file mode 100644
index 000000000..af79efed9
--- /dev/null
+++ b/meta-oe/recipes-support/nmon/nmon/0001-Fix-a-lot-of-Werror-format-security-errors-with-mvpr.patch
@@ -0,0 +1,175 @@
1From eba852316735daec27d4ff11483018ca596312d0 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 30 Oct 2021 02:11:49 -0700
4Subject: [PATCH] Fix a lot of -Werror=format-security errors with
5 mvprintw/mvwprintw
6
7In all these places a non-constant is used as a format string which
8compiler complains about. Fix by using "%s" as format.
9
10Upstream-Status: Pending
11Signed-off-by: Khem Raj <raj.khem@gmail.com>
12---
13 lmon16m.c | 86 +++++++++++++++++++++++++++----------------------------
14 1 file changed, 43 insertions(+), 43 deletions(-)
15
16diff --git a/lmon16m.c b/lmon16m.c
17index 7e46642..1d53367 100644
18--- a/lmon16m.c
19+++ b/lmon16m.c
20@@ -5475,20 +5475,20 @@ int main(int argc, char **argv)
21 /*
22 *mvwprintw(padsmp,2, 0, "CPU User%% Sys%% Wait%% Idle|0 |25 |50 |75 100|");
23 */
24- mvwprintw(padsmp, 1, 0, cpu_line);
25- mvwprintw(padsmp, 2, 0, "CPU ");
26+ mvwprintw(padsmp, 1, 0, "%s", cpu_line);
27+ mvwprintw(padsmp, 2, 0, "%s", "CPU ");
28 COLOUR wattrset(padsmp, COLOR_PAIR(2)); /* Green */
29- mvwprintw(padsmp, 2, 4, "User%%");
30+ mvwprintw(padsmp, 2, 4, "%s", "User%%");
31 COLOUR wattrset(padsmp, COLOR_PAIR(1)); /* Red */
32- mvwprintw(padsmp, 2, 9, " Sys%%");
33+ mvwprintw(padsmp, 2, 9, "%s", " Sys%%");
34 COLOUR wattrset(padsmp, COLOR_PAIR(4)); /* Blue */
35- mvwprintw(padsmp, 2, 15, " Wait%%");
36+ mvwprintw(padsmp, 2, 15, "%s", " Wait%%");
37 if (p->cpu_total.steal != q->cpu_total.steal) {
38 COLOUR wattrset(padsmp, COLOR_PAIR(5));
39- mvwprintw(padsmp, 2, 22, "Steal");
40+ mvwprintw(padsmp, 2, 22, "%s", "Steal");
41 } else {
42 COLOUR wattrset(padsmp, COLOR_PAIR(0));
43- mvwprintw(padsmp, 2, 22, " Idle");
44+ mvwprintw(padsmp, 2, 22, "%s", " Idle");
45 }
46 COLOUR wattrset(padsmp, COLOR_PAIR(0));
47 mvwprintw(padsmp, 2, 27,
48@@ -5579,8 +5579,8 @@ int main(int argc, char **argv)
49 /* lparcfg gathered above */
50 if (lparcfg.smt_mode > 1
51 && i % lparcfg.smt_mode == 0) {
52- mvwprintw(padsmp, 3 + i, 27, "*");
53- mvwprintw(padsmp, 3 + i, 77, "*");
54+ mvwprintw(padsmp, 3 + i, 27, "%s", "*");
55+ mvwprintw(padsmp, 3 + i, 77, "%s", "*");
56 }
57 #endif
58
59@@ -5597,7 +5597,7 @@ int main(int argc, char **argv)
60 100.0);
61 }
62 } /* for (i = 0; i < cpus; i++) */
63- CURSE mvwprintw(padsmp, i + 3, 0, cpu_line);
64+ CURSE mvwprintw(padsmp, i + 3, 0, "%s", cpu_line);
65 #ifdef POWER
66 /* proc_lparcfg called above in previous ifdef
67 */
68@@ -5673,7 +5673,7 @@ int main(int argc, char **argv)
69 100.0);
70 }
71
72- CURSE mvwprintw(padsmp, i + 5, 0, cpu_line);
73+ CURSE mvwprintw(padsmp, i + 5, 0, "%s", cpu_line);
74 i = i + 2;
75 } /* if (cpus > 1 || !cursed) */
76 smp_first_time = 0;
77@@ -5704,16 +5704,16 @@ int main(int argc, char **argv)
78 char *wide10 =
79 " 10%%-| |-10%%";
80
81- mvwprintw(padwide, 1, 0, wide1);
82- mvwprintw(padwide, 2, 0, wide2);
83- mvwprintw(padwide, 3, 0, wide3);
84- mvwprintw(padwide, 4, 0, wide4);
85- mvwprintw(padwide, 5, 0, wide5);
86- mvwprintw(padwide, 6, 0, wide6);
87- mvwprintw(padwide, 7, 0, wide7);
88- mvwprintw(padwide, 8, 0, wide8);
89- mvwprintw(padwide, 9, 0, wide9);
90- mvwprintw(padwide, 10, 0, wide10);
91+ mvwprintw(padwide, 1, 0, "%s", wide1);
92+ mvwprintw(padwide, 2, 0, "%s", wide2);
93+ mvwprintw(padwide, 3, 0, "%s", wide3);
94+ mvwprintw(padwide, 4, 0, "%s", wide4);
95+ mvwprintw(padwide, 5, 0, "%s", wide5);
96+ mvwprintw(padwide, 6, 0, "%s", wide6);
97+ mvwprintw(padwide, 7, 0, "%s", wide7);
98+ mvwprintw(padwide, 8, 0, "%s", wide8);
99+ mvwprintw(padwide, 9, 0, "%s", wide9);
100+ mvwprintw(padwide, 10, 0, "%s", wide10);
101 mvwprintw(padwide, 11, 0,
102 " CPU +1--------+10-------+20-------+30-------+40-------+50-------+60--+--0%%");
103 mvwprintw(padwide, 1, 6, "CPU(s)=%d", cpus);
104@@ -5755,16 +5755,16 @@ int main(int argc, char **argv)
105 rows = 12;
106 }
107 if (cpus > 63) {
108- mvwprintw(padwide, rows + 0, 0, wide1);
109- mvwprintw(padwide, rows + 1, 0, wide2);
110- mvwprintw(padwide, rows + 2, 0, wide3);
111- mvwprintw(padwide, rows + 3, 0, wide4);
112- mvwprintw(padwide, rows + 4, 0, wide5);
113- mvwprintw(padwide, rows + 5, 0, wide6);
114- mvwprintw(padwide, rows + 6, 0, wide7);
115- mvwprintw(padwide, rows + 7, 0, wide8);
116- mvwprintw(padwide, rows + 8, 0, wide9);
117- mvwprintw(padwide, rows + 9, 0, wide10);
118+ mvwprintw(padwide, rows + 0, 0, "%s", wide1);
119+ mvwprintw(padwide, rows + 1, 0, "%s", wide2);
120+ mvwprintw(padwide, rows + 2, 0, "%s", wide3);
121+ mvwprintw(padwide, rows + 3, 0, "%s", wide4);
122+ mvwprintw(padwide, rows + 4, 0, "%s", wide5);
123+ mvwprintw(padwide, rows + 5, 0, "%s", wide6);
124+ mvwprintw(padwide, rows + 6, 0, "%s", wide7);
125+ mvwprintw(padwide, rows + 7, 0, "%s", wide8);
126+ mvwprintw(padwide, rows + 8, 0, "%s", wide9);
127+ mvwprintw(padwide, rows + 9, 0, "%s", wide10);
128 mvwprintw(padwide, rows + 10, 0,
129 " CPU +65---+70-------+80-------+90-------+100------+110------+120-----+--0%%");
130 if (wide_first_time) {
131@@ -5813,16 +5813,16 @@ int main(int argc, char **argv)
132 rows = 23;
133 }
134 if (cpus > 127) {
135- mvwprintw(padwide, rows + 0, 0, wide1);
136- mvwprintw(padwide, rows + 1, 0, wide2);
137- mvwprintw(padwide, rows + 2, 0, wide3);
138- mvwprintw(padwide, rows + 3, 0, wide4);
139- mvwprintw(padwide, rows + 4, 0, wide5);
140- mvwprintw(padwide, rows + 5, 0, wide6);
141- mvwprintw(padwide, rows + 6, 0, wide7);
142- mvwprintw(padwide, rows + 7, 0, wide8);
143- mvwprintw(padwide, rows + 8, 0, wide9);
144- mvwprintw(padwide, rows + 9, 0, wide10);
145+ mvwprintw(padwide, rows + 0, 0, "%s", wide1);
146+ mvwprintw(padwide, rows + 1, 0, "%s", wide2);
147+ mvwprintw(padwide, rows + 2, 0, "%s", wide3);
148+ mvwprintw(padwide, rows + 3, 0, "%s", wide4);
149+ mvwprintw(padwide, rows + 4, 0, "%s", wide5);
150+ mvwprintw(padwide, rows + 5, 0, "%s", wide6);
151+ mvwprintw(padwide, rows + 6, 0, "%s", wide7);
152+ mvwprintw(padwide, rows + 7, 0, "%s", wide8);
153+ mvwprintw(padwide, rows + 8, 0, "%s", wide9);
154+ mvwprintw(padwide, rows + 9, 0, "%s", wide10);
155 mvwprintw(padwide, rows + 10, 0,
156 " CPU +129--------+140------+150------+160------+170------+180------+190--0%%");
157 if (wide_first_time) {
158@@ -8274,7 +8274,7 @@ I/F Name Recv=KB/s Trans=KB/s packin packout insize outsize Peak->Recv Trans
159 formatstring =
160 " PID %%CPU Size Res Res Res Res Shared Faults Command";
161 }
162- CURSE mvwprintw(padtop, 1, y, formatstring);
163+ CURSE mvwprintw(padtop, 1, y, "%s", formatstring);
164
165 if (show_args == ARGS_ONLY) {
166 formatstring =
167@@ -8294,7 +8294,7 @@ I/F Name Recv=KB/s Trans=KB/s packin packout insize outsize Peak->Recv Trans
168 formatstring =
169 " Used KB Set Text Data Lib KB Min Maj ";
170 }
171- CURSE mvwprintw(padtop, 2, 1, formatstring);
172+ CURSE mvwprintw(padtop, 2, 1, "%s", formatstring);
173 for (j = 0; j < max_sorted; j++) {
174 i = topper[j].index;
175 if (!show_all) {
diff --git a/meta-oe/recipes-support/nmon/nmon/0001-lmon16g.c-Adjust-system-headers.patch b/meta-oe/recipes-support/nmon/nmon/0001-lmon16g.c-Adjust-system-headers.patch
index e8debe56a..5a8b04603 100644
--- a/meta-oe/recipes-support/nmon/nmon/0001-lmon16g.c-Adjust-system-headers.patch
+++ b/meta-oe/recipes-support/nmon/nmon/0001-lmon16g.c-Adjust-system-headers.patch
@@ -9,13 +9,13 @@ defines from sys/cdefs.h is used
9 9
10Signed-off-by: Khem Raj <raj.khem@gmail.com> 10Signed-off-by: Khem Raj <raj.khem@gmail.com>
11--- 11---
12 lmon16g.c | 4 ++-- 12 lmon16m.c | 4 ++--
13 1 file changed, 2 insertions(+), 2 deletions(-) 13 1 file changed, 2 insertions(+), 2 deletions(-)
14 14
15diff --git a/lmon16g.c b/lmon16g.c 15diff --git a/lmon16m.c b/lmon16m.c
16index cb27e09..d2a11c5 100644 16index cb27e09..d2a11c5 100644
17--- a/lmon16g.c 17--- a/lmon16m.c
18+++ b/lmon16g.c 18+++ b/lmon16m.c
19@@ -63,7 +63,7 @@ static char *SccsId = "nmon " VERSION; 19@@ -63,7 +63,7 @@ static char *SccsId = "nmon " VERSION;
20 #include <fcntl.h> 20 #include <fcntl.h>
21 #include <math.h> 21 #include <math.h>
diff --git a/meta-oe/recipes-support/nmon/nmon_16g.bb b/meta-oe/recipes-support/nmon/nmon_16m.bb
index 32b60fef9..723da85d0 100644
--- a/meta-oe/recipes-support/nmon/nmon_16g.bb
+++ b/meta-oe/recipes-support/nmon/nmon_16m.bb
@@ -2,17 +2,16 @@ SUMMARY = "nmon performance monitor"
2HOMEPAGE = "http://nmon.sf.net" 2HOMEPAGE = "http://nmon.sf.net"
3SECTION = "console/utils" 3SECTION = "console/utils"
4LICENSE = "GPLv3" 4LICENSE = "GPLv3"
5LIC_FILES_CHKSUM = "file://${WORKDIR}/Documentation.txt;md5=dbb13658cf55d687c4f2ff771a696d4a" 5LIC_FILES_CHKSUM = "file://Documentation.txt;md5=dbb13658cf55d687c4f2ff771a696d4a"
6DEPENDS = "ncurses" 6DEPENDS = "ncurses"
7DEPENDS:append:libc-musl = " bsd-headers" 7DEPENDS:append:libc-musl = " bsd-headers"
8 8
9SRC_URI = "${SOURCEFORGE_MIRROR}/nmon/lmon${PV}.c;name=lmon \ 9SRC_URI = "${SOURCEFORGE_MIRROR}/nmon/lmon${PV}.c;name=lmon \
10 ${SOURCEFORGE_MIRROR}/nmon/Documentation.txt;name=doc \ 10 ${SOURCEFORGE_MIRROR}/nmon/Documentation.txt;name=doc \
11 file://0001-lmon16g.c-Adjust-system-headers.patch \ 11 file://0001-lmon16g.c-Adjust-system-headers.patch \
12" 12 file://0001-Fix-a-lot-of-Werror-format-security-errors-with-mvpr.patch \
13SRC_URI[lmon.md5sum] = "246ccfc74d5af55d992601fc4d3d4a72" 13 "
14SRC_URI[lmon.sha256sum] = "da82dd693b503b062854dfe7dbb5d36b347872ab44a4aa05b97e9d577747f688" 14SRC_URI[lmon.sha256sum] = "2bed4d45fdfdf1d1387ec91e139c04975d5f838e3e0d53c0fe2d803a707e5fc1"
15SRC_URI[doc.md5sum] = "dbb13658cf55d687c4f2ff771a696d4a"
16SRC_URI[doc.sha256sum] = "1f7f83afe62a7210be5e83cd24157adb854c14599efe0b377a7ecca933869278" 15SRC_URI[doc.sha256sum] = "1f7f83afe62a7210be5e83cd24157adb854c14599efe0b377a7ecca933869278"
17 16
18CFLAGS += "-D JFS -D GETUSER -Wall -D LARGEMEM" 17CFLAGS += "-D JFS -D GETUSER -Wall -D LARGEMEM"