All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-oe][PATCH 1/8] bitwise: Fix build with latest ncurses 6.3+
@ 2021-10-30 18:06 Khem Raj
  2021-10-30 18:06 ` [meta-oe][PATCH 2/8] libcdio: Fix build with " Khem Raj
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Khem Raj @ 2021-10-30 18:06 UTC (permalink / raw)
  To: openembedded-devel; +Cc: Khem Raj

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 .../recipes-extended/bitwise/bitwise_0.42.bb  |  1 +
 ...ormat-security-errors-with-mvwprintw.patch | 27 +++++++++++++++++++
 2 files changed, 28 insertions(+)
 create mode 100644 meta-oe/recipes-extended/bitwise/files/0001-Fix-Werror-format-security-errors-with-mvwprintw.patch

diff --git a/meta-oe/recipes-extended/bitwise/bitwise_0.42.bb b/meta-oe/recipes-extended/bitwise/bitwise_0.42.bb
index 04d4ca6e40..ebf4b3c5e6 100644
--- a/meta-oe/recipes-extended/bitwise/bitwise_0.42.bb
+++ b/meta-oe/recipes-extended/bitwise/bitwise_0.42.bb
@@ -12,6 +12,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=1ebbd3e34237af26da5dc08a4e440464"
 
 SRC_URI = "https://github.com/mellowcandle/bitwise/releases/download/v${PV}/bitwise-v${PV}.tar.gz \
            file://0001-makefile.am-Fix-build-when-build-dir-is-not-same-as-.patch \
+           file://0001-Fix-Werror-format-security-errors-with-mvwprintw.patch \
            "
 SRC_URI[sha256sum] = "d3d43cef47bf8f49e85f7ed381c3eaf1df921ca51805e0962f1a97a517e1d1d2"
 
diff --git a/meta-oe/recipes-extended/bitwise/files/0001-Fix-Werror-format-security-errors-with-mvwprintw.patch b/meta-oe/recipes-extended/bitwise/files/0001-Fix-Werror-format-security-errors-with-mvwprintw.patch
new file mode 100644
index 0000000000..ebcb0dd5ee
--- /dev/null
+++ b/meta-oe/recipes-extended/bitwise/files/0001-Fix-Werror-format-security-errors-with-mvwprintw.patch
@@ -0,0 +1,27 @@
+From 53237c103b06f58ad9c2ce3914fcc7fe73629f11 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 30 Oct 2021 01:11:33 -0700
+Subject: [PATCH] Fix -Werror=format-security errors with mvwprintw()
+
+Here a non-constant is used as a format string which
+compiler complains about. Fix by using "%s" as format.
+
+Upstream-Status: Submitted [https://github.com/mellowcandle/bitwise/pull/49]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/interactive.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/interactive.c b/src/interactive.c
+index cce418a..2c0b152 100644
+--- a/src/interactive.c
++++ b/src/interactive.c
+@@ -114,7 +114,7 @@ void update_history_win(void)
+ 				break;
+ 			}
+ 
+-		mvwprintw(history_win, j, 2, history[history_pos - i].line);
++		mvwprintw(history_win, j, 2, "%s", history[history_pos - i].line);
+ 	}
+ 
+ 	if (g_has_color)
-- 
2.33.1



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [meta-oe][PATCH 2/8] libcdio: Fix build with ncurses 6.3+
  2021-10-30 18:06 [meta-oe][PATCH 1/8] bitwise: Fix build with latest ncurses 6.3+ Khem Raj
@ 2021-10-30 18:06 ` Khem Raj
  2021-10-30 18:06 ` [meta-oe][PATCH 3/8] nmon: Upgrade to 16m Khem Raj
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Khem Raj @ 2021-10-30 18:06 UTC (permalink / raw)
  To: openembedded-devel; +Cc: Khem Raj

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 ...-format-security-errors-with-mvprint.patch | 40 +++++++++++++++++++
 .../libcdio/libcdio_2.1.0.bb                  |  4 +-
 2 files changed, 43 insertions(+), 1 deletion(-)
 create mode 100644 meta-oe/recipes-multimedia/libcdio/libcdio/0001-Fix-a-few-Werror-format-security-errors-with-mvprint.patch

diff --git a/meta-oe/recipes-multimedia/libcdio/libcdio/0001-Fix-a-few-Werror-format-security-errors-with-mvprint.patch b/meta-oe/recipes-multimedia/libcdio/libcdio/0001-Fix-a-few-Werror-format-security-errors-with-mvprint.patch
new file mode 100644
index 0000000000..09e7dc3dfb
--- /dev/null
+++ b/meta-oe/recipes-multimedia/libcdio/libcdio/0001-Fix-a-few-Werror-format-security-errors-with-mvprint.patch
@@ -0,0 +1,40 @@
+From e5e54be286bf6d8336b747503c803750bc674c57 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 30 Oct 2021 01:28:18 -0700
+Subject: [PATCH] Fix a few -Werror=format-security errors with mvprintw()
+
+In all these places a non-constant is used as a format string which
+compiler complains about. Fix by using "%s" as format.
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/cdda-player.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/cdda-player.c b/src/cdda-player.c
+index 69eddee..8834d60 100644
+--- a/src/cdda-player.c
++++ b/src/cdda-player.c
+@@ -298,7 +298,7 @@ action(const char *psz_action)
+              psz_action);
+   else
+     snprintf(psz_action_line, sizeof(psz_action_line), "%s", "" );
+-  mvprintw(LINE_ACTION, 0, psz_action_line);
++  mvprintw(LINE_ACTION, 0, "%s", psz_action_line);
+   clrtoeol();
+   refresh();
+ }
+@@ -1029,10 +1029,10 @@ display_tracks(void)
+       }
+       if (sub.track == i) {
+         attron(A_STANDOUT);
+-        mvprintw(i_line++, 0, line);
++        mvprintw(i_line++, 0, "%s", line);
+         attroff(A_STANDOUT);
+       } else
+-        mvprintw(i_line++, 0, line);
++        mvprintw(i_line++, 0, "%s", line);
+       clrtoeol();
+     }
+   }
diff --git a/meta-oe/recipes-multimedia/libcdio/libcdio_2.1.0.bb b/meta-oe/recipes-multimedia/libcdio/libcdio_2.1.0.bb
index 2340132984..2becafb2a4 100644
--- a/meta-oe/recipes-multimedia/libcdio/libcdio_2.1.0.bb
+++ b/meta-oe/recipes-multimedia/libcdio/libcdio_2.1.0.bb
@@ -4,7 +4,9 @@ SECTION = "libs"
 LICENSE = "GPLv3+"
 LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
 
-SRC_URI = "${GNU_MIRROR}/${BPN}/${BP}.tar.bz2"
+SRC_URI = "${GNU_MIRROR}/${BPN}/${BP}.tar.bz2 \
+           file://0001-Fix-a-few-Werror-format-security-errors-with-mvprint.patch \
+           "
 
 SRC_URI[md5sum] = "aa7629e8f73662a762f64c444b901055"
 SRC_URI[sha256sum] = "8550e9589dbd594bfac93b81ecf129b1dc9d0d51e90f9696f1b2f9b2af32712b"
-- 
2.33.1



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [meta-oe][PATCH 3/8] nmon: Upgrade to 16m
  2021-10-30 18:06 [meta-oe][PATCH 1/8] bitwise: Fix build with latest ncurses 6.3+ Khem Raj
  2021-10-30 18:06 ` [meta-oe][PATCH 2/8] libcdio: Fix build with " Khem Raj
@ 2021-10-30 18:06 ` Khem Raj
  2021-10-30 18:06 ` [meta-oe][PATCH 4/8] sysdig: Fix build with ncurses 6.3+ Khem Raj
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Khem Raj @ 2021-10-30 18:06 UTC (permalink / raw)
  To: openembedded-devel; +Cc: Khem Raj

Fix compile with ncurses 6.3+

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 ...ror-format-security-errors-with-mvpr.patch | 175 ++++++++++++++++++
 ...0001-lmon16g.c-Adjust-system-headers.patch |   8 +-
 .../nmon/{nmon_16g.bb => nmon_16m.bb}         |   9 +-
 3 files changed, 183 insertions(+), 9 deletions(-)
 create mode 100644 meta-oe/recipes-support/nmon/nmon/0001-Fix-a-lot-of-Werror-format-security-errors-with-mvpr.patch
 rename meta-oe/recipes-support/nmon/{nmon_16g.bb => nmon_16m.bb} (70%)

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 0000000000..af79efed96
--- /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 @@
+From eba852316735daec27d4ff11483018ca596312d0 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 30 Oct 2021 02:11:49 -0700
+Subject: [PATCH] Fix a lot of -Werror=format-security errors with
+ mvprintw/mvwprintw
+
+In all these places a non-constant is used as a format string which
+compiler complains about. Fix by using "%s" as format.
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ lmon16m.c | 86 +++++++++++++++++++++++++++----------------------------
+ 1 file changed, 43 insertions(+), 43 deletions(-)
+
+diff --git a/lmon16m.c b/lmon16m.c
+index 7e46642..1d53367 100644
+--- a/lmon16m.c
++++ b/lmon16m.c
+@@ -5475,20 +5475,20 @@ int main(int argc, char **argv)
+ 		    /*
+ 		     *mvwprintw(padsmp,2, 0, "CPU  User%%  Sys%% Wait%% Idle|0          |25         |50          |75       100|");
+ 		     */
+-		    mvwprintw(padsmp, 1, 0, cpu_line);
+-		    mvwprintw(padsmp, 2, 0, "CPU  ");
++		    mvwprintw(padsmp, 1, 0, "%s", cpu_line);
++		    mvwprintw(padsmp, 2, 0, "%s", "CPU  ");
+ 		    COLOUR wattrset(padsmp, COLOR_PAIR(2));	/* Green */
+-		    mvwprintw(padsmp, 2, 4, "User%%");
++		    mvwprintw(padsmp, 2, 4, "%s", "User%%");
+ 		    COLOUR wattrset(padsmp, COLOR_PAIR(1));	/* Red */
+-		    mvwprintw(padsmp, 2, 9, "  Sys%%");
++		    mvwprintw(padsmp, 2, 9, "%s", "  Sys%%");
+ 		    COLOUR wattrset(padsmp, COLOR_PAIR(4));	/* Blue */
+-		    mvwprintw(padsmp, 2, 15, " Wait%%");
++		    mvwprintw(padsmp, 2, 15, "%s", " Wait%%");
+ 		    if (p->cpu_total.steal != q->cpu_total.steal) {
+ 			COLOUR wattrset(padsmp, COLOR_PAIR(5));
+-			mvwprintw(padsmp, 2, 22, "Steal");
++			mvwprintw(padsmp, 2, 22, "%s", "Steal");
+ 		    } else {
+ 			COLOUR wattrset(padsmp, COLOR_PAIR(0));
+-			mvwprintw(padsmp, 2, 22, " Idle");
++			mvwprintw(padsmp, 2, 22, "%s", " Idle");
+ 		    }
+ 		    COLOUR wattrset(padsmp, COLOR_PAIR(0));
+ 		    mvwprintw(padsmp, 2, 27,
+@@ -5579,8 +5579,8 @@ int main(int argc, char **argv)
+ 			/* lparcfg gathered above */
+ 			if (lparcfg.smt_mode > 1
+ 			    && i % lparcfg.smt_mode == 0) {
+-			    mvwprintw(padsmp, 3 + i, 27, "*");
+-			    mvwprintw(padsmp, 3 + i, 77, "*");
++			    mvwprintw(padsmp, 3 + i, 27, "%s", "*");
++			    mvwprintw(padsmp, 3 + i, 77, "%s", "*");
+ 			}
+ #endif
+ 
+@@ -5597,7 +5597,7 @@ int main(int argc, char **argv)
+ 				    100.0);
+ 		    }
+ 		}		/* for (i = 0; i < cpus; i++) */
+-		CURSE mvwprintw(padsmp, i + 3, 0, cpu_line);
++		CURSE mvwprintw(padsmp, i + 3, 0, "%s", cpu_line);
+ #ifdef POWER
+ 		/* proc_lparcfg called above in previous ifdef
+ 		 */
+@@ -5673,7 +5673,7 @@ int main(int argc, char **argv)
+ 				 100.0);
+ 		    }
+ 
+-		    CURSE mvwprintw(padsmp, i + 5, 0, cpu_line);
++		    CURSE mvwprintw(padsmp, i + 5, 0, "%s", cpu_line);
+ 		    i = i + 2;
+ 		}		/* if (cpus > 1 || !cursed) */
+ 		smp_first_time = 0;
+@@ -5704,16 +5704,16 @@ int main(int argc, char **argv)
+ 		    char *wide10 =
+ 			" 10%%-|                                                                |-10%%";
+ 
+-		    mvwprintw(padwide, 1, 0, wide1);
+-		    mvwprintw(padwide, 2, 0, wide2);
+-		    mvwprintw(padwide, 3, 0, wide3);
+-		    mvwprintw(padwide, 4, 0, wide4);
+-		    mvwprintw(padwide, 5, 0, wide5);
+-		    mvwprintw(padwide, 6, 0, wide6);
+-		    mvwprintw(padwide, 7, 0, wide7);
+-		    mvwprintw(padwide, 8, 0, wide8);
+-		    mvwprintw(padwide, 9, 0, wide9);
+-		    mvwprintw(padwide, 10, 0, wide10);
++		    mvwprintw(padwide, 1, 0, "%s", wide1);
++		    mvwprintw(padwide, 2, 0, "%s", wide2);
++		    mvwprintw(padwide, 3, 0, "%s", wide3);
++		    mvwprintw(padwide, 4, 0, "%s", wide4);
++		    mvwprintw(padwide, 5, 0, "%s", wide5);
++		    mvwprintw(padwide, 6, 0, "%s", wide6);
++		    mvwprintw(padwide, 7, 0, "%s", wide7);
++		    mvwprintw(padwide, 8, 0, "%s", wide8);
++		    mvwprintw(padwide, 9, 0, "%s", wide9);
++		    mvwprintw(padwide, 10, 0, "%s", wide10);
+ 		    mvwprintw(padwide, 11, 0,
+ 			      " CPU +1--------+10-------+20-------+30-------+40-------+50-------+60--+--0%%");
+ 		    mvwprintw(padwide, 1, 6, "CPU(s)=%d", cpus);
+@@ -5755,16 +5755,16 @@ int main(int argc, char **argv)
+ 			rows = 12;
+ 		    }
+ 		    if (cpus > 63) {
+-			mvwprintw(padwide, rows + 0, 0, wide1);
+-			mvwprintw(padwide, rows + 1, 0, wide2);
+-			mvwprintw(padwide, rows + 2, 0, wide3);
+-			mvwprintw(padwide, rows + 3, 0, wide4);
+-			mvwprintw(padwide, rows + 4, 0, wide5);
+-			mvwprintw(padwide, rows + 5, 0, wide6);
+-			mvwprintw(padwide, rows + 6, 0, wide7);
+-			mvwprintw(padwide, rows + 7, 0, wide8);
+-			mvwprintw(padwide, rows + 8, 0, wide9);
+-			mvwprintw(padwide, rows + 9, 0, wide10);
++			mvwprintw(padwide, rows + 0, 0, "%s", wide1);
++			mvwprintw(padwide, rows + 1, 0, "%s", wide2);
++			mvwprintw(padwide, rows + 2, 0, "%s", wide3);
++			mvwprintw(padwide, rows + 3, 0, "%s", wide4);
++			mvwprintw(padwide, rows + 4, 0, "%s", wide5);
++			mvwprintw(padwide, rows + 5, 0, "%s", wide6);
++			mvwprintw(padwide, rows + 6, 0, "%s", wide7);
++			mvwprintw(padwide, rows + 7, 0, "%s", wide8);
++			mvwprintw(padwide, rows + 8, 0, "%s", wide9);
++			mvwprintw(padwide, rows + 9, 0, "%s", wide10);
+ 			mvwprintw(padwide, rows + 10, 0,
+ 				  " CPU +65---+70-------+80-------+90-------+100------+110------+120-----+--0%%");
+ 			if (wide_first_time) {
+@@ -5813,16 +5813,16 @@ int main(int argc, char **argv)
+ 			rows = 23;
+ 		    }
+ 		    if (cpus > 127) {
+-			mvwprintw(padwide, rows + 0, 0, wide1);
+-			mvwprintw(padwide, rows + 1, 0, wide2);
+-			mvwprintw(padwide, rows + 2, 0, wide3);
+-			mvwprintw(padwide, rows + 3, 0, wide4);
+-			mvwprintw(padwide, rows + 4, 0, wide5);
+-			mvwprintw(padwide, rows + 5, 0, wide6);
+-			mvwprintw(padwide, rows + 6, 0, wide7);
+-			mvwprintw(padwide, rows + 7, 0, wide8);
+-			mvwprintw(padwide, rows + 8, 0, wide9);
+-			mvwprintw(padwide, rows + 9, 0, wide10);
++			mvwprintw(padwide, rows + 0, 0, "%s", wide1);
++			mvwprintw(padwide, rows + 1, 0, "%s", wide2);
++			mvwprintw(padwide, rows + 2, 0, "%s", wide3);
++			mvwprintw(padwide, rows + 3, 0, "%s", wide4);
++			mvwprintw(padwide, rows + 4, 0, "%s", wide5);
++			mvwprintw(padwide, rows + 5, 0, "%s", wide6);
++			mvwprintw(padwide, rows + 6, 0, "%s", wide7);
++			mvwprintw(padwide, rows + 7, 0, "%s", wide8);
++			mvwprintw(padwide, rows + 8, 0, "%s", wide9);
++			mvwprintw(padwide, rows + 9, 0, "%s", wide10);
+ 			mvwprintw(padwide, rows + 10, 0,
+ 				  " CPU +129--------+140------+150------+160------+170------+180------+190--0%%");
+ 			if (wide_first_time) {
+@@ -8274,7 +8274,7 @@ I/F Name Recv=KB/s Trans=KB/s packin packout insize outsize Peak->Recv Trans
+ 			    formatstring =
+ 				"  PID    %%CPU  Size   Res   Res   Res   Res Shared   Faults  Command";
+ 		    }
+-		    CURSE mvwprintw(padtop, 1, y, formatstring);
++		    CURSE mvwprintw(padtop, 1, y, "%s", formatstring);
+ 
+ 		    if (show_args == ARGS_ONLY) {
+ 			formatstring =
+@@ -8294,7 +8294,7 @@ I/F Name Recv=KB/s Trans=KB/s packin packout insize outsize Peak->Recv Trans
+ 			    formatstring =
+ 				"         Used    KB   Set  Text  Data   Lib    KB  Min  Maj ";
+ 		    }
+-		    CURSE mvwprintw(padtop, 2, 1, formatstring);
++		    CURSE mvwprintw(padtop, 2, 1, "%s", formatstring);
+ 		    for (j = 0; j < max_sorted; j++) {
+ 			i = topper[j].index;
+ 			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 e8debe56af..5a8b046039 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
 
 Signed-off-by: Khem Raj <raj.khem@gmail.com>
 ---
- lmon16g.c | 4 ++--
+ lmon16m.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
 
-diff --git a/lmon16g.c b/lmon16g.c
+diff --git a/lmon16m.c b/lmon16m.c
 index cb27e09..d2a11c5 100644
---- a/lmon16g.c
-+++ b/lmon16g.c
+--- a/lmon16m.c
++++ b/lmon16m.c
 @@ -63,7 +63,7 @@ static char *SccsId = "nmon " VERSION;
  #include <fcntl.h>
  #include <math.h>
diff --git a/meta-oe/recipes-support/nmon/nmon_16g.bb b/meta-oe/recipes-support/nmon/nmon_16m.bb
similarity index 70%
rename from meta-oe/recipes-support/nmon/nmon_16g.bb
rename to meta-oe/recipes-support/nmon/nmon_16m.bb
index 32b60fef9c..723da85d0f 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"
 HOMEPAGE = "http://nmon.sf.net"
 SECTION = "console/utils"
 LICENSE = "GPLv3"
-LIC_FILES_CHKSUM = "file://${WORKDIR}/Documentation.txt;md5=dbb13658cf55d687c4f2ff771a696d4a"
+LIC_FILES_CHKSUM = "file://Documentation.txt;md5=dbb13658cf55d687c4f2ff771a696d4a"
 DEPENDS = "ncurses"
 DEPENDS:append:libc-musl = " bsd-headers"
 
 SRC_URI = "${SOURCEFORGE_MIRROR}/nmon/lmon${PV}.c;name=lmon \
            ${SOURCEFORGE_MIRROR}/nmon/Documentation.txt;name=doc \
            file://0001-lmon16g.c-Adjust-system-headers.patch \
-"
-SRC_URI[lmon.md5sum] = "246ccfc74d5af55d992601fc4d3d4a72"
-SRC_URI[lmon.sha256sum] = "da82dd693b503b062854dfe7dbb5d36b347872ab44a4aa05b97e9d577747f688"
-SRC_URI[doc.md5sum] = "dbb13658cf55d687c4f2ff771a696d4a"
+           file://0001-Fix-a-lot-of-Werror-format-security-errors-with-mvpr.patch \
+           "
+SRC_URI[lmon.sha256sum] = "2bed4d45fdfdf1d1387ec91e139c04975d5f838e3e0d53c0fe2d803a707e5fc1"
 SRC_URI[doc.sha256sum] = "1f7f83afe62a7210be5e83cd24157adb854c14599efe0b377a7ecca933869278"
 
 CFLAGS += "-D JFS -D GETUSER -Wall -D LARGEMEM"
-- 
2.33.1



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [meta-oe][PATCH 4/8] sysdig: Fix build with ncurses 6.3+
  2021-10-30 18:06 [meta-oe][PATCH 1/8] bitwise: Fix build with latest ncurses 6.3+ Khem Raj
  2021-10-30 18:06 ` [meta-oe][PATCH 2/8] libcdio: Fix build with " Khem Raj
  2021-10-30 18:06 ` [meta-oe][PATCH 3/8] nmon: Upgrade to 16m Khem Raj
@ 2021-10-30 18:06 ` Khem Raj
  2021-10-30 18:06 ` [meta-oe][PATCH 5/8] iptraf-ng: Upgrade to 1.2.1 Khem Raj
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Khem Raj @ 2021-10-30 18:06 UTC (permalink / raw)
  To: openembedded-devel; +Cc: Khem Raj

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 ...ot-of-Werror-format-security-errors-.patch | 155 ++++++++++++++++++
 meta-oe/recipes-extended/sysdig/sysdig_git.bb |   1 +
 2 files changed, 156 insertions(+)
 create mode 100644 meta-oe/recipes-extended/sysdig/sysdig/0001-libsinsp-Fix-a-lot-of-Werror-format-security-errors-.patch

diff --git a/meta-oe/recipes-extended/sysdig/sysdig/0001-libsinsp-Fix-a-lot-of-Werror-format-security-errors-.patch b/meta-oe/recipes-extended/sysdig/sysdig/0001-libsinsp-Fix-a-lot-of-Werror-format-security-errors-.patch
new file mode 100644
index 0000000000..055b0c1c29
--- /dev/null
+++ b/meta-oe/recipes-extended/sysdig/sysdig/0001-libsinsp-Fix-a-lot-of-Werror-format-security-errors-.patch
@@ -0,0 +1,155 @@
+From a5c8e2676b94d2ea41b44b4e05943bee6459f337 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 30 Oct 2021 09:46:35 -0700
+Subject: [PATCH] libsinsp: Fix a lot of -Werror=format-security errors with
+ mvprintw/mvwprintw
+
+In all these places a non-constant is used as a format string which
+compiler complains about. Fix by using "%s" as format.
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ userspace/libsinsp/cursescomponents.cpp |  4 ++--
+ userspace/libsinsp/cursesspectro.cpp    |  2 +-
+ userspace/libsinsp/cursestable.cpp      |  6 +++---
+ userspace/libsinsp/cursesui.cpp         | 14 +++++++-------
+ 4 files changed, 13 insertions(+), 13 deletions(-)
+
+diff --git a/userspace/libsinsp/cursescomponents.cpp b/userspace/libsinsp/cursescomponents.cpp
+index 4003cb4e..372b4526 100644
+--- a/userspace/libsinsp/cursescomponents.cpp
++++ b/userspace/libsinsp/cursescomponents.cpp
+@@ -877,7 +877,7 @@ void curses_textbox::print_no_data()
+ 	string wstr = "No Data For This Selection";
+ 	mvprintw(m_parent->m_screenh / 2,
+ 		m_parent->m_screenw / 2 - wstr.size() / 2,
+-		wstr.c_str());
++		"%s", wstr.c_str());
+ 
+ 	refresh();
+ }
+@@ -1100,7 +1100,7 @@ void curses_textbox::render()
+ 		attrset(m_parent->m_colors[sinsp_cursesui::LARGE_NUMBER]);
+ 		mvprintw(0,
+ 			m_parent->m_screenw / 2 - wstr.size() / 2,
+-			wstr.c_str());
++			"%s", wstr.c_str());
+ 	}
+ 
+ 	//
+diff --git a/userspace/libsinsp/cursesspectro.cpp b/userspace/libsinsp/cursesspectro.cpp
+index 6858bc95..32012963 100644
+--- a/userspace/libsinsp/cursesspectro.cpp
++++ b/userspace/libsinsp/cursesspectro.cpp
+@@ -227,7 +227,7 @@ void curses_spectro::print_error(string wstr)
+ 	mvwprintw(m_tblwin, 
+ 		m_parent->m_screenh / 2,
+ 		m_parent->m_screenw / 2 - wstr.size() / 2, 
+-		wstr.c_str());	
++		"%s", wstr.c_str());	
+ }
+ 
+ void curses_spectro::update_data(vector<sinsp_sample_row>* data, bool force_selection_change)
+diff --git a/userspace/libsinsp/cursestable.cpp b/userspace/libsinsp/cursestable.cpp
+index 69c2aa32..54667554 100644
+--- a/userspace/libsinsp/cursestable.cpp
++++ b/userspace/libsinsp/cursestable.cpp
+@@ -254,7 +254,7 @@ void curses_table::print_line_centered(string line, int32_t off)
+ 		mvwprintw(m_tblwin, 
+ 			m_parent->m_screenh / 2 + off,
+ 			m_parent->m_screenw / 2 - line.size() / 2, 
+-			line.c_str());
++			"%s", line.c_str());
+ 	}
+ 	else
+ 	{
+@@ -268,7 +268,7 @@ glogf("2, %d %s\n", spos, ss.c_str());
+ 			mvwprintw(m_tblwin, 
+ 				m_parent->m_screenh / 2 + off + j,
+ 				0,
+-				ss.c_str());
++				"%s", ss.c_str());
+ 
+ 			spos += m_parent->m_screenw;
+ 			if(spos >= line.size())
+@@ -328,7 +328,7 @@ void curses_table::print_error(string wstr)
+ 	mvwprintw(m_tblwin, 
+ 		m_parent->m_screenh / 2,
+ 		m_parent->m_screenw / 2 - wstr.size() / 2, 
+-		wstr.c_str());	
++		"%s", wstr.c_str());	
+ }
+ 
+ void curses_table::render(bool data_changed)
+diff --git a/userspace/libsinsp/cursesui.cpp b/userspace/libsinsp/cursesui.cpp
+index 1eeb0864..69652edc 100644
+--- a/userspace/libsinsp/cursesui.cpp
++++ b/userspace/libsinsp/cursesui.cpp
+@@ -825,7 +825,7 @@ void sinsp_cursesui::render_header()
+ 		attrset(m_colors[sinsp_cursesui::LARGE_NUMBER]);
+ 		mvprintw(0,
+ 			m_screenw / 2 - wstr.size() / 2, 
+-			wstr.c_str());	
++			"%s", wstr.c_str());	
+ 	}
+ 
+ 	//
+@@ -1123,7 +1123,7 @@ void sinsp_cursesui::render_filtersearch_main_menu()
+ 
+ 		m_cursor_pos = cursor_pos;
+ 
+-		mvprintw(m_screenh - 1, m_cursor_pos, str->c_str());
++		mvprintw(m_screenh - 1, m_cursor_pos, "%s", str->c_str());
+ 
+ 		m_cursor_pos += str->size();
+ 	}
+@@ -2189,7 +2189,7 @@ void sinsp_cursesui::print_progress(double progress)
+ 	string wstr = "Processing File";
+ 	mvprintw(m_screenh / 2,
+ 		m_screenw / 2 - wstr.size() / 2, 
+-		wstr.c_str());	
++		"%s", wstr.c_str());	
+ 
+ 	//
+ 	// Using sprintf because to_string doesn't support setting the precision 
+@@ -2199,7 +2199,7 @@ void sinsp_cursesui::print_progress(double progress)
+ 	wstr = "Progress: " + string(numbuf);
+ 	mvprintw(m_screenh / 2 + 1,
+ 		m_screenw / 2 - wstr.size() / 2, 
+-		wstr.c_str());
++		"%s", wstr.c_str());
+ 
+ 	refresh();
+ }
+@@ -2308,7 +2308,7 @@ sysdig_table_action sinsp_cursesui::handle_textbox_input(int ch)
+ 						attrset(m_colors[sinsp_cursesui::FAILED_SEARCH]);
+ 						mvprintw(m_screenh / 2,
+ 							m_screenw / 2 - wstr.size() / 2, 
+-							wstr.c_str());	
++							"%s", wstr.c_str());	
+ 
+ 						//
+ 						// Restore the cursor
+@@ -2363,7 +2363,7 @@ sysdig_table_action sinsp_cursesui::handle_textbox_input(int ch)
+ 
+ 					mvprintw(m_screenh / 2,
+ 						m_screenw / 2 - wstr.size() / 2, 
+-						wstr.c_str());
++						"%s", wstr.c_str());
+ 
+ 					render();
+ 				}
+@@ -2436,7 +2436,7 @@ sysdig_table_action sinsp_cursesui::handle_textbox_input(int ch)
+ 
+ 				mvprintw(m_screenh / 2,
+ 					m_screenw / 2 - wstr.size() / 2, 
+-					wstr.c_str());
++					"%s", wstr.c_str());
+ 
+ 				render();
+ 			}
+-- 
+2.33.1
+
diff --git a/meta-oe/recipes-extended/sysdig/sysdig_git.bb b/meta-oe/recipes-extended/sysdig/sysdig_git.bb
index a12f8ba5e1..90f375b665 100644
--- a/meta-oe/recipes-extended/sysdig/sysdig_git.bb
+++ b/meta-oe/recipes-extended/sysdig/sysdig_git.bb
@@ -24,6 +24,7 @@ RDEPENDS:${PN} = "bash"
 SRC_URI = "git://github.com/draios/sysdig.git;branch=dev \
            file://0001-fix-build-with-LuaJIT-2.1-betas.patch \
            file://aarch64.patch \
+           file://0001-libsinsp-Fix-a-lot-of-Werror-format-security-errors-.patch \
           "
 SRCREV = "67833b2aca06bd9d11cff7cb29f04fbf4ef96cad"
 PV = "0.27.1"
-- 
2.33.1



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [meta-oe][PATCH 5/8] iptraf-ng: Upgrade to 1.2.1
  2021-10-30 18:06 [meta-oe][PATCH 1/8] bitwise: Fix build with latest ncurses 6.3+ Khem Raj
                   ` (2 preceding siblings ...)
  2021-10-30 18:06 ` [meta-oe][PATCH 4/8] sysdig: Fix build with ncurses 6.3+ Khem Raj
@ 2021-10-30 18:06 ` Khem Raj
  2021-10-30 18:06 ` [meta-oe][PATCH 6/8] tiptop: Fix build with ncurses 6.3+ Khem Raj
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Khem Raj @ 2021-10-30 18:06 UTC (permalink / raw)
  To: openembedded-devel; +Cc: Khem Raj

Add patch to fix cross build
Fix runtime with systemd

Release notes
https://github.com/iptraf-ng/iptraf-ng/releases/tag/v1.2.0
https://github.com/iptraf-ng/iptraf-ng/releases/tag/v1.2.1

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 .../0001-Fix-printd-formatting-strings.patch  | 54 ------------------
 .../0001-make-Make-CC-weak-assignment.patch   | 35 ++++++++++++
 .../iptraf/iptraf-ng/iptraf-ng-tmpfiles.conf  |  1 +
 .../iptraf/iptraf-ng/ncurses-config.patch     | 55 +++++++++++--------
 ...{iptraf-ng_1.1.4.bb => iptraf-ng_1.2.1.bb} | 22 ++++++--
 5 files changed, 85 insertions(+), 82 deletions(-)
 delete mode 100644 meta-oe/recipes-devtools/iptraf/iptraf-ng/0001-Fix-printd-formatting-strings.patch
 create mode 100644 meta-oe/recipes-devtools/iptraf/iptraf-ng/0001-make-Make-CC-weak-assignment.patch
 create mode 100644 meta-oe/recipes-devtools/iptraf/iptraf-ng/iptraf-ng-tmpfiles.conf
 rename meta-oe/recipes-devtools/iptraf/{iptraf-ng_1.1.4.bb => iptraf-ng_1.2.1.bb} (66%)

diff --git a/meta-oe/recipes-devtools/iptraf/iptraf-ng/0001-Fix-printd-formatting-strings.patch b/meta-oe/recipes-devtools/iptraf/iptraf-ng/0001-Fix-printd-formatting-strings.patch
deleted file mode 100644
index 5b9afd9616..0000000000
--- a/meta-oe/recipes-devtools/iptraf/iptraf-ng/0001-Fix-printd-formatting-strings.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From 86b4d398dbb95e2437b70eba3b30e995ec9be505 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Thu, 31 Aug 2017 20:47:50 -0700
-Subject: [PATCH] Fix printd formatting strings
-
-Fixes
-error: format string is not a string literal (potentially insecure) [-Werror,-Wformat-security]
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- src/ipfilter.c | 2 +-
- src/othptab.c  | 4 ++--
- 2 files changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/src/ipfilter.c b/src/ipfilter.c
-index eb17ec7..8c76e4c 100644
---- a/src/ipfilter.c
-+++ b/src/ipfilter.c
-@@ -146,7 +146,7 @@ void gethostparams(struct hostparams *data, char *init_saddr, char *init_smask,
- 				snprintf(msgstr, 60,
- 					 "Invalid protocol input at or near token \"%s\"",
- 					 bptr);
--				tui_error(ANYKEY_MSG, msgstr);
-+				tui_error(ANYKEY_MSG, "%s", msgstr);
- 				doagain = 1;
- 			} else
- 				doagain = 0;
-diff --git a/src/othptab.c b/src/othptab.c
-index 142c9c2..fe395c2 100644
---- a/src/othptab.c
-+++ b/src/othptab.c
-@@ -410,7 +410,7 @@ void printothpentry(struct othptable *table, struct othptabent *entry,
- 				break;
- 			}
- 
--			sprintf(scratchpad, rarp_mac_addr);
-+			sprintf(scratchpad, "%s", rarp_mac_addr);
- 			strcat(msgstring, scratchpad);
- 			wattrset(table->othpwin, ARPATTR);
- 			break;
-@@ -485,7 +485,7 @@ void printothpentry(struct othptable *table, struct othptabent *entry,
- 		wattrset(table->othpwin, UNKNIPATTR);
- 		protptr = getprotobynumber(entry->protocol);
- 		if (protptr != NULL) {
--			sprintf(protname, protptr->p_aliases[0]);
-+			sprintf(protname, "%s", protptr->p_aliases[0]);
- 		} else {
- 			sprintf(protname, "IP protocol");
- 			unknown = 1;
--- 
-2.14.1
-
diff --git a/meta-oe/recipes-devtools/iptraf/iptraf-ng/0001-make-Make-CC-weak-assignment.patch b/meta-oe/recipes-devtools/iptraf/iptraf-ng/0001-make-Make-CC-weak-assignment.patch
new file mode 100644
index 0000000000..625989a14a
--- /dev/null
+++ b/meta-oe/recipes-devtools/iptraf/iptraf-ng/0001-make-Make-CC-weak-assignment.patch
@@ -0,0 +1,35 @@
+From 223de708552b1ab00ac1a119e82e13deed573036 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 30 Oct 2021 10:22:38 -0700
+Subject: [PATCH] make: Make CC weak assignment
+
+This ensures that if environment overrrides it then its respected, this
+helps cross-compiling cases
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/Makefile
++++ b/Makefile
+@@ -25,7 +25,7 @@ ALL_CFLAGS = $(CPPFLAGS) $(CFLAGS) $(IPT
+ ALL_LDFLAGS = $(LDFLAGS)
+ STRIP ?= strip
+ 
+-prefix = $(HOME)
++prefix ?= $(HOME)
+ sbindir_relative = sbin
+ sbindir = $(prefix)/$(sbindir_relative)
+ mandir = $(prefix)/share/man
+@@ -39,7 +39,7 @@ pathsep = :
+ 
+ export prefix bindir sharedir sysconfdir gitwebdir localedir
+ 
+-CC = cc
++CC ?= cc
+ RM = rm -f
+ INSTALL = install
+ RPMBUILD = rpmbuild
diff --git a/meta-oe/recipes-devtools/iptraf/iptraf-ng/iptraf-ng-tmpfiles.conf b/meta-oe/recipes-devtools/iptraf/iptraf-ng/iptraf-ng-tmpfiles.conf
new file mode 100644
index 0000000000..1c79f0d8c3
--- /dev/null
+++ b/meta-oe/recipes-devtools/iptraf/iptraf-ng/iptraf-ng-tmpfiles.conf
@@ -0,0 +1 @@
+d /run/iptraf-ng 0755 root root -
diff --git a/meta-oe/recipes-devtools/iptraf/iptraf-ng/ncurses-config.patch b/meta-oe/recipes-devtools/iptraf/iptraf-ng/ncurses-config.patch
index 65b92dade2..8704310406 100644
--- a/meta-oe/recipes-devtools/iptraf/iptraf-ng/ncurses-config.patch
+++ b/meta-oe/recipes-devtools/iptraf/iptraf-ng/ncurses-config.patch
@@ -2,11 +2,9 @@ Use pkg-config to search for ncurses libraries
 
 Signed-off-by: Khem Raj <raj.khem@gmail.com>
 Upstream-Status: Pending
-Index: iptraf-ng-1.1.4/Makefile
-===================================================================
---- iptraf-ng-1.1.4.orig/Makefile
-+++ iptraf-ng-1.1.4/Makefile
-@@ -205,8 +205,8 @@ endif
+--- a/Makefile
++++ b/Makefile
+@@ -201,8 +201,8 @@ endif
  
  ifndef NCURSES_LDFLAGS
  ifdef NEEDS_NCURSES5
@@ -17,7 +15,7 @@ Index: iptraf-ng-1.1.4/Makefile
  	ifndef NO_PANEL
  		NCURSES_LDFLAGS += -lpanel
  	endif
-@@ -215,8 +215,8 @@ endif
+@@ -211,8 +211,8 @@ endif
  
  ifndef NCURSES_LDFLAGS
  ifdef NEEDS_NCURSESW5
@@ -26,9 +24,9 @@ Index: iptraf-ng-1.1.4/Makefile
 +	NCURSES_CFLAGS := $(shell p[k-config ncursesw --cflags 2>/dev/null)
 +	NCURSES_LDFLAGS := $(shell pkg-config ncursesw --libs 2>/dev/null)
  	ifndef NO_PANEL
- 		NCURSES_LDFLAGS += -lpanel
+ 		NCURSES_LDFLAGS += -lpanelw
  	endif
-@@ -225,8 +225,8 @@ endif
+@@ -221,8 +221,8 @@ endif
  
  ifndef NCURSES_LDFLAGS
  ifdef NEEDS_NCURSES6
@@ -39,7 +37,7 @@ Index: iptraf-ng-1.1.4/Makefile
  	ifndef NO_PANEL
  		NCURSES_LDFLAGS += -lpanel
  	endif
-@@ -235,8 +235,8 @@ endif
+@@ -231,8 +231,8 @@ endif
  
  ifndef NCURSES_LDFLAGS
  ifdef NEEDS_NCURSESW6
@@ -48,34 +46,45 @@ Index: iptraf-ng-1.1.4/Makefile
 +	NCURSES_CFLAGS := $(shell pkg-config ncursesw --cflags 2>/dev/null)
 +	NCURSES_LDFLAGS := $(shell pkg-config ncursesw --libs 2>/dev/null)
  	ifndef NO_PANEL
- 		NCURSES_LDFLAGS += -lpanel
+ 		NCURSES_LDFLAGS += -lpanelw
  	endif
-@@ -246,17 +246,17 @@ endif
+@@ -241,27 +241,27 @@ endif
+ 
  # try find ncuses by autodetect
  ifndef NCURSES_LDFLAGS
- 	ifneq ($(shell ncursesw6-config --libs 2>/dev/null),)
+-	ifneq ($(shell ncursesw6-config --libs 2>/dev/null),)
 -		NCURSES_CFLAGS := $(shell ncursesw6-config --cflags 2>/dev/null)
 -		NCURSES_LDFLAGS := $(shell ncursesw6-config --libs 2>/dev/null)
++	ifneq ($(shell pkg-config ncursesw --libs 2>/dev/null),)
++		NCURSES_CFLAGS := $(shell pkg-config ncursesw --cflags 2>/dev/null)
++		NCURSES_LDFLAGS := $(shell pkg-config ncursesw --libs 2>/dev/null)
+ 		ifndef NO_PANEL
+ 			NCURSES_LDFLAGS += -lpanelw
+ 		endif
 -	else ifneq ($(shell ncurses6-config --libs 2>/dev/null),)
 -		NCURSES_CFLAGS := $(shell ncurses6-config --cflags 2>/dev/null)
 -		NCURSES_LDFLAGS := $(shell ncurses6-config --libs 2>/dev/null)
++	else ifneq ($(shell pkg-config ncursesw --libs 2>/dev/null),)
++		NCURSES_CFLAGS := $(shell pkg-config ncursesw --cflags 2>/dev/null)
++		NCURSES_LDFLAGS := $(shell pkg-config ncursesw --libs 2>/dev/null)
+ 		ifndef NO_PANEL
+ 			NCURSES_LDFLAGS += -lpanel
+ 		endif
 -	else ifneq ($(shell ncursesw5-config --libs 2>/dev/null),)
 -		NCURSES_CFLAGS := $(shell ncursesw5-config --cflags 2>/dev/null)
 -		NCURSES_LDFLAGS := $(shell ncursesw5-config --libs 2>/dev/null)
++	else ifneq ($(shell pkg-config ncursesw --libs 2>/dev/null),)
++		NCURSES_CFLAGS := $(shell pkg-config ncursesw --cflags 2>/dev/null)
++		NCURSES_LDFLAGS := $(shell pkg-config ncursesw --libs 2>/dev/null)
+ 		ifndef NO_PANEL
+ 			NCURSES_LDFLAGS += -lpanelw
+ 		endif
 -	else ifneq ($(shell ncurses5-config --libs 2>/dev/null),)
 -		NCURSES_CFLAGS := $(shell ncurses5-config --cflags 2>/dev/null)
 -		NCURSES_LDFLAGS := $(shell ncurses5-config --libs 2>/dev/null)
-+		NCURSES_CFLAGS := $(shell pkg-config ncursesw --cflags 2>/dev/null)
-+		NCURSES_LDFLAGS := $(shell pkg-config ncursesw --libs 2>/dev/null)
-+	else ifneq ($(shell pkg-config ncurses --libs 2>/dev/null),)
-+		NCURSES_CFLAGS := $(shell pkg-config ncurses --cflags 2>/dev/null)
-+		NCURSES_LDFLAGS := $(shell pkg-config ncurses --libs 2>/dev/null)
 +	else ifneq ($(shell pkg-config ncursesw --libs 2>/dev/null),)
 +		NCURSES_CFLAGS := $(shell pkg-config ncursesw --cflags 2>/dev/null)
 +		NCURSES_LDFLAGS := $(shell pkg-config ncursesw --libs 2>/dev/null)
-+	else ifneq ($(shell pkg-config ncurses --libs 2>/dev/null),)
-+		NCURSES_CFLAGS := $(shell pkg-config ncurses --cflags 2>/dev/null)
-+		NCURSES_LDFLAGS := $(shell pkg-config ncurses --libs 2>/dev/null)
- 	endif
- 
- 	ifneq ($(NCURSES_LDFLAGS),)
+ 		ifndef NO_PANEL
+ 			NCURSES_LDFLAGS += -lpanel
+ 		endif
diff --git a/meta-oe/recipes-devtools/iptraf/iptraf-ng_1.1.4.bb b/meta-oe/recipes-devtools/iptraf/iptraf-ng_1.2.1.bb
similarity index 66%
rename from meta-oe/recipes-devtools/iptraf/iptraf-ng_1.1.4.bb
rename to meta-oe/recipes-devtools/iptraf/iptraf-ng_1.2.1.bb
index 6b18953b30..115bbf082b 100644
--- a/meta-oe/recipes-devtools/iptraf/iptraf-ng_1.1.4.bb
+++ b/meta-oe/recipes-devtools/iptraf/iptraf-ng_1.2.1.bb
@@ -24,17 +24,29 @@ LICENSE = "GPL-2.0"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=e2b3850593b899b1a17594ed4cc4c731"
 DEPENDS = "ncurses"
 
-SRC_URI = "http://pkgs.fedoraproject.org/repo/pkgs/iptraf-ng/iptraf-ng-1.1.4.tar.gz/e0f8df3b7baf2b5106709abc4f8c029a/${BP}.tar.gz \
+SRC_URI = "https://src.fedoraproject.org/repo/pkgs/iptraf-ng/v${PV}.tar.gz/sha512/44d36fc92cdbf379f62cb63638663c3ee610225b9c28d60ee55e62e358f398a6b0db281129327b3472e45fb553ee3dd605af09c129f2233f8839ae3dbd799384/v${PV}.tar.gz \
+           file://iptraf-ng-tmpfiles.conf \
            file://ncurses-config.patch \
-           file://0001-Fix-printd-formatting-strings.patch \
+           file://0001-make-Make-CC-weak-assignment.patch \
            "
-SRC_URI[md5sum] = "e0f8df3b7baf2b5106709abc4f8c029a"
-SRC_URI[sha256sum] = "16b9b05bf5d3725d86409b901696639ad46944d02de6def87b1ceae5310dd35c"
+SRC_URI[sha256sum] = "9f5cef584065420dea1ba32c86126aede1fa9bd25b0f8362b0f9fd9754f00870"
 
-inherit autotools-brokensep pkgconfig
+inherit pkgconfig
 
 CFLAGS += "-D_GNU_SOURCE"
 
+do_compile() {
+    oe_runmake
+}
+
+do_install() {
+    oe_runmake DESTDIR=${D} install
+    install -d -m 0755 ${D}${localstatedir}/{log,lib}/iptraf-ng
+    install -D -m 0644 -p ${S}/iptraf-ng-logrotate.conf ${D}${sysconfdir}/logrotate.d/iptraf-ng
+    install -Dm 0644 ${WORKDIR}/iptraf-ng-tmpfiles.conf ${D}${libdir}/tmpfiles.d/iptraf-ng-tmpfiles.conf
+}
+
+FILES:${PN} += "${libdir}/tmpfiles.d"
 PROVIDES = "iptraf"
 RPROVIDES:${PN} += "iptraf"
 RREPLACES:${PN} += "iptraf"
-- 
2.33.1



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [meta-oe][PATCH 6/8] tiptop: Fix build with ncurses 6.3+
  2021-10-30 18:06 [meta-oe][PATCH 1/8] bitwise: Fix build with latest ncurses 6.3+ Khem Raj
                   ` (3 preceding siblings ...)
  2021-10-30 18:06 ` [meta-oe][PATCH 5/8] iptraf-ng: Upgrade to 1.2.1 Khem Raj
@ 2021-10-30 18:06 ` Khem Raj
  2021-10-30 18:06 ` [meta-networking][PATCH 7/8] mtr: " Khem Raj
  2021-10-30 18:06 ` [meta-networking][PATCH 8/8] mtr: Explicitly use branch= in SRC_URI Khem Raj
  6 siblings, 0 replies; 8+ messages in thread
From: Khem Raj @ 2021-10-30 18:06 UTC (permalink / raw)
  To: openembedded-devel; +Cc: Khem Raj

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 ...ror-format-security-errors-with-mvwp.patch | 31 +++++++++++++++++++
 .../recipes-extended/tiptop/tiptop_2.3.1.bb   |  2 +-
 2 files changed, 32 insertions(+), 1 deletion(-)
 create mode 100644 meta-oe/recipes-extended/tiptop/tiptop/0001-Fix-a-lot-of-Werror-format-security-errors-with-mvwp.patch

diff --git a/meta-oe/recipes-extended/tiptop/tiptop/0001-Fix-a-lot-of-Werror-format-security-errors-with-mvwp.patch b/meta-oe/recipes-extended/tiptop/tiptop/0001-Fix-a-lot-of-Werror-format-security-errors-with-mvwp.patch
new file mode 100644
index 0000000000..6d5e293c7f
--- /dev/null
+++ b/meta-oe/recipes-extended/tiptop/tiptop/0001-Fix-a-lot-of-Werror-format-security-errors-with-mvwp.patch
@@ -0,0 +1,31 @@
+From 42e99eb6c727df7c9d49586803a4bf9933a9796b Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 30 Oct 2021 10:52:42 -0700
+Subject: [PATCH] Fix a lot of -Werror=format-security errors with mvwprintw
+
+In all these places a non-constant is used as a format string which
+compiler complains about. Fix by using "%s" as format.
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/helpwin.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/helpwin.c b/src/helpwin.c
+index 0d660f9..1623d9c 100644
+--- a/src/helpwin.c
++++ b/src/helpwin.c
+@@ -61,7 +61,7 @@ void show_help_win(WINDOW* win, screen_t* screen)
+     wattroff(win, A_REVERSE);
+ 
+   /* screen description */
+-  mvwprintw(win, 2, 1, screen->desc);
++  mvwprintw(win, 2, 1, "%s", screen->desc);
+ 
+   /* max size of column headers */
+   for(i = 0; i < n; i++) {
+-- 
+2.33.1
+
diff --git a/meta-oe/recipes-extended/tiptop/tiptop_2.3.1.bb b/meta-oe/recipes-extended/tiptop/tiptop_2.3.1.bb
index 31d0dae25c..8334bc47d8 100644
--- a/meta-oe/recipes-extended/tiptop/tiptop_2.3.1.bb
+++ b/meta-oe/recipes-extended/tiptop/tiptop_2.3.1.bb
@@ -8,8 +8,8 @@ SRC_URI = "http://tiptop.gforge.inria.fr/releases/${BP}.tar.gz \
            file://0001-Fix-parallel-build-problems-by-Adrian-Bunk.patch \
            file://0002-fix-reproducibility-of-build-process.patch \
            file://0001-Fix-build-when-S-B.patch \
+           file://0001-Fix-a-lot-of-Werror-format-security-errors-with-mvwp.patch \
            "
-SRC_URI[md5sum] = "46ca0fdf0236f02dd2b96d347626d2a2"
 SRC_URI[sha256sum] = "51c4449c95bba34f16b429729c2f58431490665d8093efaa8643b2e1d1084182"
 
 inherit autotools
-- 
2.33.1



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [meta-networking][PATCH 7/8] mtr: Fix build with ncurses 6.3+
  2021-10-30 18:06 [meta-oe][PATCH 1/8] bitwise: Fix build with latest ncurses 6.3+ Khem Raj
                   ` (4 preceding siblings ...)
  2021-10-30 18:06 ` [meta-oe][PATCH 6/8] tiptop: Fix build with ncurses 6.3+ Khem Raj
@ 2021-10-30 18:06 ` Khem Raj
  2021-10-30 18:06 ` [meta-networking][PATCH 8/8] mtr: Explicitly use branch= in SRC_URI Khem Raj
  6 siblings, 0 replies; 8+ messages in thread
From: Khem Raj @ 2021-10-30 18:06 UTC (permalink / raw)
  To: openembedded-devel; +Cc: Khem Raj

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 ...ror-format-security-errors-in-printw.patch | 68 +++++++++++++++++++
 .../recipes-support/mtr/mtr_0.94.bb           |  4 +-
 2 files changed, 71 insertions(+), 1 deletion(-)
 create mode 100644 meta-networking/recipes-support/mtr/mtr/0001-Fix-a-lot-of-Werror-format-security-errors-in-printw.patch

diff --git a/meta-networking/recipes-support/mtr/mtr/0001-Fix-a-lot-of-Werror-format-security-errors-in-printw.patch b/meta-networking/recipes-support/mtr/mtr/0001-Fix-a-lot-of-Werror-format-security-errors-in-printw.patch
new file mode 100644
index 0000000000..5a8ee49d53
--- /dev/null
+++ b/meta-networking/recipes-support/mtr/mtr/0001-Fix-a-lot-of-Werror-format-security-errors-in-printw.patch
@@ -0,0 +1,68 @@
+From 628b4b3a16c5e3416aac3eea041ff03375fb495b Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 30 Oct 2021 11:00:59 -0700
+Subject: [PATCH] Fix a lot of -Werror=format-security errors in
+ printw/mvprintw
+
+In all these places a non-constant is used as a format string which
+compiler complains about. Fix by using "%s" as format.
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ ui/curses.c | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/ui/curses.c b/ui/curses.c
+index 34bf30d..c24cf28 100644
+--- a/ui/curses.c
++++ b/ui/curses.c
+@@ -432,7 +432,7 @@ static void mtr_curses_hosts(
+                 attron(A_BOLD);
+ #ifdef HAVE_IPINFO
+             if (is_printii(ctl))
+-                printw(fmt_ipinfo(ctl, addr));
++                printw("%s", fmt_ipinfo(ctl, addr));
+ #endif
+             if (name != NULL) {
+                 if (ctl->show_ips)
+@@ -485,7 +485,7 @@ static void mtr_curses_hosts(
+                 printw("\n    ");
+ #ifdef HAVE_IPINFO
+                 if (is_printii(ctl))
+-                    printw(fmt_ipinfo(ctl, addrs));
++                    printw("%s", fmt_ipinfo(ctl, addrs));
+ #endif
+                 if (name != NULL) {
+                     if (ctl->show_ips)
+@@ -650,7 +650,7 @@ static void mtr_curses_graph(
+ 
+ #ifdef HAVE_IPINFO
+             if (is_printii(ctl))
+-                printw(fmt_ipinfo(ctl, addr));
++                printw("%s", fmt_ipinfo(ctl, addr));
+ #endif
+             name = dns_lookup(ctl, addr);
+             printw("%s", name ? name : strlongip(ctl, addr));
+@@ -700,7 +700,7 @@ void mtr_curses_redraw(
+ 
+     mvprintw(1, 0, "%s (%s) -> %s", ctl->LocalHostname, net_localaddr(), ctl->Hostname);
+     t = time(NULL);
+-    mvprintw(1, maxx - 25, iso_time(&t));
++    mvprintw(1, maxx - 25, "%s", iso_time(&t));
+     printw("\n");
+ 
+     printw("Keys:  ");
+@@ -760,7 +760,7 @@ void mtr_curses_redraw(
+         startstat = padding - 2;
+ 
+         snprintf(msg, sizeof(msg), " Last %3d pings", max_cols);
+-        mvprintw(rowstat - 1, startstat, msg);
++        mvprintw(rowstat - 1, startstat, "%s", msg);
+ 
+         attroff(A_BOLD);
+         move(rowstat, 0);
+-- 
+2.33.1
+
diff --git a/meta-networking/recipes-support/mtr/mtr_0.94.bb b/meta-networking/recipes-support/mtr/mtr_0.94.bb
index c046499a2f..c066be1428 100644
--- a/meta-networking/recipes-support/mtr/mtr_0.94.bb
+++ b/meta-networking/recipes-support/mtr/mtr_0.94.bb
@@ -9,7 +9,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
                     file://ui/mtr.c;beginline=5;endline=16;md5=00a894a39d53726a27386534d1c4e468"
 
 SRCREV = "2c73cbf4094e4eed343ed11ae5bab2580f3122d1"
-SRC_URI = "git://github.com/traviscross/mtr"
+SRC_URI = "git://github.com/traviscross/mtr \
+           file://0001-Fix-a-lot-of-Werror-format-security-errors-in-printw.patch \
+          "
 
 S = "${WORKDIR}/git"
 
-- 
2.33.1



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [meta-networking][PATCH 8/8] mtr: Explicitly use branch= in SRC_URI
  2021-10-30 18:06 [meta-oe][PATCH 1/8] bitwise: Fix build with latest ncurses 6.3+ Khem Raj
                   ` (5 preceding siblings ...)
  2021-10-30 18:06 ` [meta-networking][PATCH 7/8] mtr: " Khem Raj
@ 2021-10-30 18:06 ` Khem Raj
  6 siblings, 0 replies; 8+ messages in thread
From: Khem Raj @ 2021-10-30 18:06 UTC (permalink / raw)
  To: openembedded-devel; +Cc: Khem Raj

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta-networking/recipes-support/mtr/mtr_0.94.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta-networking/recipes-support/mtr/mtr_0.94.bb b/meta-networking/recipes-support/mtr/mtr_0.94.bb
index c066be1428..0ee0b85be8 100644
--- a/meta-networking/recipes-support/mtr/mtr_0.94.bb
+++ b/meta-networking/recipes-support/mtr/mtr_0.94.bb
@@ -9,7 +9,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
                     file://ui/mtr.c;beginline=5;endline=16;md5=00a894a39d53726a27386534d1c4e468"
 
 SRCREV = "2c73cbf4094e4eed343ed11ae5bab2580f3122d1"
-SRC_URI = "git://github.com/traviscross/mtr \
+SRC_URI = "git://github.com/traviscross/mtr;branch=master \
            file://0001-Fix-a-lot-of-Werror-format-security-errors-in-printw.patch \
           "
 
-- 
2.33.1



^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-10-30 18:06 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-30 18:06 [meta-oe][PATCH 1/8] bitwise: Fix build with latest ncurses 6.3+ Khem Raj
2021-10-30 18:06 ` [meta-oe][PATCH 2/8] libcdio: Fix build with " Khem Raj
2021-10-30 18:06 ` [meta-oe][PATCH 3/8] nmon: Upgrade to 16m Khem Raj
2021-10-30 18:06 ` [meta-oe][PATCH 4/8] sysdig: Fix build with ncurses 6.3+ Khem Raj
2021-10-30 18:06 ` [meta-oe][PATCH 5/8] iptraf-ng: Upgrade to 1.2.1 Khem Raj
2021-10-30 18:06 ` [meta-oe][PATCH 6/8] tiptop: Fix build with ncurses 6.3+ Khem Raj
2021-10-30 18:06 ` [meta-networking][PATCH 7/8] mtr: " Khem Raj
2021-10-30 18:06 ` [meta-networking][PATCH 8/8] mtr: Explicitly use branch= in SRC_URI Khem Raj

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.