diff options
| -rw-r--r-- | meta-oe/recipes-devtools/iptraf/iptraf-ng/0001-Fix-printd-formatting-strings.patch | 54 | ||||
| -rw-r--r-- | meta-oe/recipes-devtools/iptraf/iptraf-ng/0001-make-Make-CC-weak-assignment.patch | 44 | ||||
| -rw-r--r-- | meta-oe/recipes-devtools/iptraf/iptraf-ng/iptraf-ng-tmpfiles.conf | 1 | ||||
| -rw-r--r-- | meta-oe/recipes-devtools/iptraf/iptraf-ng/ncurses-config.patch | 55 | ||||
| -rw-r--r-- | meta-oe/recipes-devtools/iptraf/iptraf-ng_1.2.1.bb (renamed from meta-oe/recipes-devtools/iptraf/iptraf-ng_1.1.4.bb) | 22 |
5 files changed, 94 insertions, 82 deletions
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 @@ | |||
| 1 | From 86b4d398dbb95e2437b70eba3b30e995ec9be505 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Thu, 31 Aug 2017 20:47:50 -0700 | ||
| 4 | Subject: [PATCH] Fix printd formatting strings | ||
| 5 | |||
| 6 | Fixes | ||
| 7 | error: format string is not a string literal (potentially insecure) [-Werror,-Wformat-security] | ||
| 8 | |||
| 9 | Upstream-Status: Pending | ||
| 10 | |||
| 11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 12 | --- | ||
| 13 | src/ipfilter.c | 2 +- | ||
| 14 | src/othptab.c | 4 ++-- | ||
| 15 | 2 files changed, 3 insertions(+), 3 deletions(-) | ||
| 16 | |||
| 17 | diff --git a/src/ipfilter.c b/src/ipfilter.c | ||
| 18 | index eb17ec7..8c76e4c 100644 | ||
| 19 | --- a/src/ipfilter.c | ||
| 20 | +++ b/src/ipfilter.c | ||
| 21 | @@ -146,7 +146,7 @@ void gethostparams(struct hostparams *data, char *init_saddr, char *init_smask, | ||
| 22 | snprintf(msgstr, 60, | ||
| 23 | "Invalid protocol input at or near token \"%s\"", | ||
| 24 | bptr); | ||
| 25 | - tui_error(ANYKEY_MSG, msgstr); | ||
| 26 | + tui_error(ANYKEY_MSG, "%s", msgstr); | ||
| 27 | doagain = 1; | ||
| 28 | } else | ||
| 29 | doagain = 0; | ||
| 30 | diff --git a/src/othptab.c b/src/othptab.c | ||
| 31 | index 142c9c2..fe395c2 100644 | ||
| 32 | --- a/src/othptab.c | ||
| 33 | +++ b/src/othptab.c | ||
| 34 | @@ -410,7 +410,7 @@ void printothpentry(struct othptable *table, struct othptabent *entry, | ||
| 35 | break; | ||
| 36 | } | ||
| 37 | |||
| 38 | - sprintf(scratchpad, rarp_mac_addr); | ||
| 39 | + sprintf(scratchpad, "%s", rarp_mac_addr); | ||
| 40 | strcat(msgstring, scratchpad); | ||
| 41 | wattrset(table->othpwin, ARPATTR); | ||
| 42 | break; | ||
| 43 | @@ -485,7 +485,7 @@ void printothpentry(struct othptable *table, struct othptabent *entry, | ||
| 44 | wattrset(table->othpwin, UNKNIPATTR); | ||
| 45 | protptr = getprotobynumber(entry->protocol); | ||
| 46 | if (protptr != NULL) { | ||
| 47 | - sprintf(protname, protptr->p_aliases[0]); | ||
| 48 | + sprintf(protname, "%s", protptr->p_aliases[0]); | ||
| 49 | } else { | ||
| 50 | sprintf(protname, "IP protocol"); | ||
| 51 | unknown = 1; | ||
| 52 | -- | ||
| 53 | 2.14.1 | ||
| 54 | |||
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..342c78f0f1 --- /dev/null +++ b/meta-oe/recipes-devtools/iptraf/iptraf-ng/0001-make-Make-CC-weak-assignment.patch | |||
| @@ -0,0 +1,44 @@ | |||
| 1 | From 223de708552b1ab00ac1a119e82e13deed573036 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Sat, 30 Oct 2021 10:22:38 -0700 | ||
| 4 | Subject: [PATCH] make: Make CC weak assignment | ||
| 5 | |||
| 6 | This ensures that if environment overrrides it then its respected, this | ||
| 7 | helps cross-compiling cases | ||
| 8 | |||
| 9 | Upstream-Status: Pending | ||
| 10 | |||
| 11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 12 | --- | ||
| 13 | Makefile | 2 +- | ||
| 14 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 15 | |||
| 16 | --- a/Makefile | ||
| 17 | +++ b/Makefile | ||
| 18 | @@ -18,14 +18,14 @@ VERSION-FILE: FORCE | ||
| 19 | @$(SHELL_PATH) ./GEN-VERSION-FILE | ||
| 20 | -include VERSION-FILE | ||
| 21 | |||
| 22 | -CFLAGS = -g -O2 -Wall -W -Werror=format-security | ||
| 23 | -LDFLAGS = | ||
| 24 | +CFLAGS += -g -O2 -Wall -W -Werror=format-security | ||
| 25 | +LDFLAGS ?= | ||
| 26 | IPTRAF_CFLAGS := -std=gnu99 -D_GNU_SOURCE | ||
| 27 | ALL_CFLAGS = $(CPPFLAGS) $(CFLAGS) $(IPTRAF_CFLAGS) | ||
| 28 | ALL_LDFLAGS = $(LDFLAGS) | ||
| 29 | STRIP ?= strip | ||
| 30 | |||
| 31 | -prefix = $(HOME) | ||
| 32 | +prefix ?= $(HOME) | ||
| 33 | sbindir_relative = sbin | ||
| 34 | sbindir = $(prefix)/$(sbindir_relative) | ||
| 35 | mandir = $(prefix)/share/man | ||
| 36 | @@ -39,7 +39,7 @@ pathsep = : | ||
| 37 | |||
| 38 | export prefix bindir sharedir sysconfdir gitwebdir localedir | ||
| 39 | |||
| 40 | -CC = cc | ||
| 41 | +CC ?= cc | ||
| 42 | RM = rm -f | ||
| 43 | INSTALL = install | ||
| 44 | 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 | |||
| 2 | 2 | ||
| 3 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | 3 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
| 4 | Upstream-Status: Pending | 4 | Upstream-Status: Pending |
| 5 | Index: iptraf-ng-1.1.4/Makefile | 5 | --- a/Makefile |
| 6 | =================================================================== | 6 | +++ b/Makefile |
| 7 | --- iptraf-ng-1.1.4.orig/Makefile | 7 | @@ -201,8 +201,8 @@ endif |
| 8 | +++ iptraf-ng-1.1.4/Makefile | ||
| 9 | @@ -205,8 +205,8 @@ endif | ||
| 10 | 8 | ||
| 11 | ifndef NCURSES_LDFLAGS | 9 | ifndef NCURSES_LDFLAGS |
| 12 | ifdef NEEDS_NCURSES5 | 10 | ifdef NEEDS_NCURSES5 |
| @@ -17,7 +15,7 @@ Index: iptraf-ng-1.1.4/Makefile | |||
| 17 | ifndef NO_PANEL | 15 | ifndef NO_PANEL |
| 18 | NCURSES_LDFLAGS += -lpanel | 16 | NCURSES_LDFLAGS += -lpanel |
| 19 | endif | 17 | endif |
| 20 | @@ -215,8 +215,8 @@ endif | 18 | @@ -211,8 +211,8 @@ endif |
| 21 | 19 | ||
| 22 | ifndef NCURSES_LDFLAGS | 20 | ifndef NCURSES_LDFLAGS |
| 23 | ifdef NEEDS_NCURSESW5 | 21 | ifdef NEEDS_NCURSESW5 |
| @@ -26,9 +24,9 @@ Index: iptraf-ng-1.1.4/Makefile | |||
| 26 | + NCURSES_CFLAGS := $(shell p[k-config ncursesw --cflags 2>/dev/null) | 24 | + NCURSES_CFLAGS := $(shell p[k-config ncursesw --cflags 2>/dev/null) |
| 27 | + NCURSES_LDFLAGS := $(shell pkg-config ncursesw --libs 2>/dev/null) | 25 | + NCURSES_LDFLAGS := $(shell pkg-config ncursesw --libs 2>/dev/null) |
| 28 | ifndef NO_PANEL | 26 | ifndef NO_PANEL |
| 29 | NCURSES_LDFLAGS += -lpanel | 27 | NCURSES_LDFLAGS += -lpanelw |
| 30 | endif | 28 | endif |
| 31 | @@ -225,8 +225,8 @@ endif | 29 | @@ -221,8 +221,8 @@ endif |
| 32 | 30 | ||
| 33 | ifndef NCURSES_LDFLAGS | 31 | ifndef NCURSES_LDFLAGS |
| 34 | ifdef NEEDS_NCURSES6 | 32 | ifdef NEEDS_NCURSES6 |
| @@ -39,7 +37,7 @@ Index: iptraf-ng-1.1.4/Makefile | |||
| 39 | ifndef NO_PANEL | 37 | ifndef NO_PANEL |
| 40 | NCURSES_LDFLAGS += -lpanel | 38 | NCURSES_LDFLAGS += -lpanel |
| 41 | endif | 39 | endif |
| 42 | @@ -235,8 +235,8 @@ endif | 40 | @@ -231,8 +231,8 @@ endif |
| 43 | 41 | ||
| 44 | ifndef NCURSES_LDFLAGS | 42 | ifndef NCURSES_LDFLAGS |
| 45 | ifdef NEEDS_NCURSESW6 | 43 | ifdef NEEDS_NCURSESW6 |
| @@ -48,34 +46,45 @@ Index: iptraf-ng-1.1.4/Makefile | |||
| 48 | + NCURSES_CFLAGS := $(shell pkg-config ncursesw --cflags 2>/dev/null) | 46 | + NCURSES_CFLAGS := $(shell pkg-config ncursesw --cflags 2>/dev/null) |
| 49 | + NCURSES_LDFLAGS := $(shell pkg-config ncursesw --libs 2>/dev/null) | 47 | + NCURSES_LDFLAGS := $(shell pkg-config ncursesw --libs 2>/dev/null) |
| 50 | ifndef NO_PANEL | 48 | ifndef NO_PANEL |
| 51 | NCURSES_LDFLAGS += -lpanel | 49 | NCURSES_LDFLAGS += -lpanelw |
| 52 | endif | 50 | endif |
| 53 | @@ -246,17 +246,17 @@ endif | 51 | @@ -241,27 +241,27 @@ endif |
| 52 | |||
| 54 | # try find ncuses by autodetect | 53 | # try find ncuses by autodetect |
| 55 | ifndef NCURSES_LDFLAGS | 54 | ifndef NCURSES_LDFLAGS |
| 56 | ifneq ($(shell ncursesw6-config --libs 2>/dev/null),) | 55 | - ifneq ($(shell ncursesw6-config --libs 2>/dev/null),) |
| 57 | - NCURSES_CFLAGS := $(shell ncursesw6-config --cflags 2>/dev/null) | 56 | - NCURSES_CFLAGS := $(shell ncursesw6-config --cflags 2>/dev/null) |
| 58 | - NCURSES_LDFLAGS := $(shell ncursesw6-config --libs 2>/dev/null) | 57 | - NCURSES_LDFLAGS := $(shell ncursesw6-config --libs 2>/dev/null) |
| 58 | + ifneq ($(shell pkg-config ncursesw --libs 2>/dev/null),) | ||
| 59 | + NCURSES_CFLAGS := $(shell pkg-config ncursesw --cflags 2>/dev/null) | ||
| 60 | + NCURSES_LDFLAGS := $(shell pkg-config ncursesw --libs 2>/dev/null) | ||
| 61 | ifndef NO_PANEL | ||
| 62 | NCURSES_LDFLAGS += -lpanelw | ||
| 63 | endif | ||
| 59 | - else ifneq ($(shell ncurses6-config --libs 2>/dev/null),) | 64 | - else ifneq ($(shell ncurses6-config --libs 2>/dev/null),) |
| 60 | - NCURSES_CFLAGS := $(shell ncurses6-config --cflags 2>/dev/null) | 65 | - NCURSES_CFLAGS := $(shell ncurses6-config --cflags 2>/dev/null) |
| 61 | - NCURSES_LDFLAGS := $(shell ncurses6-config --libs 2>/dev/null) | 66 | - NCURSES_LDFLAGS := $(shell ncurses6-config --libs 2>/dev/null) |
| 67 | + else ifneq ($(shell pkg-config ncursesw --libs 2>/dev/null),) | ||
| 68 | + NCURSES_CFLAGS := $(shell pkg-config ncursesw --cflags 2>/dev/null) | ||
| 69 | + NCURSES_LDFLAGS := $(shell pkg-config ncursesw --libs 2>/dev/null) | ||
| 70 | ifndef NO_PANEL | ||
| 71 | NCURSES_LDFLAGS += -lpanel | ||
| 72 | endif | ||
| 62 | - else ifneq ($(shell ncursesw5-config --libs 2>/dev/null),) | 73 | - else ifneq ($(shell ncursesw5-config --libs 2>/dev/null),) |
| 63 | - NCURSES_CFLAGS := $(shell ncursesw5-config --cflags 2>/dev/null) | 74 | - NCURSES_CFLAGS := $(shell ncursesw5-config --cflags 2>/dev/null) |
| 64 | - NCURSES_LDFLAGS := $(shell ncursesw5-config --libs 2>/dev/null) | 75 | - NCURSES_LDFLAGS := $(shell ncursesw5-config --libs 2>/dev/null) |
| 76 | + else ifneq ($(shell pkg-config ncursesw --libs 2>/dev/null),) | ||
| 77 | + NCURSES_CFLAGS := $(shell pkg-config ncursesw --cflags 2>/dev/null) | ||
| 78 | + NCURSES_LDFLAGS := $(shell pkg-config ncursesw --libs 2>/dev/null) | ||
| 79 | ifndef NO_PANEL | ||
| 80 | NCURSES_LDFLAGS += -lpanelw | ||
| 81 | endif | ||
| 65 | - else ifneq ($(shell ncurses5-config --libs 2>/dev/null),) | 82 | - else ifneq ($(shell ncurses5-config --libs 2>/dev/null),) |
| 66 | - NCURSES_CFLAGS := $(shell ncurses5-config --cflags 2>/dev/null) | 83 | - NCURSES_CFLAGS := $(shell ncurses5-config --cflags 2>/dev/null) |
| 67 | - NCURSES_LDFLAGS := $(shell ncurses5-config --libs 2>/dev/null) | 84 | - NCURSES_LDFLAGS := $(shell ncurses5-config --libs 2>/dev/null) |
| 68 | + NCURSES_CFLAGS := $(shell pkg-config ncursesw --cflags 2>/dev/null) | ||
| 69 | + NCURSES_LDFLAGS := $(shell pkg-config ncursesw --libs 2>/dev/null) | ||
| 70 | + else ifneq ($(shell pkg-config ncurses --libs 2>/dev/null),) | ||
| 71 | + NCURSES_CFLAGS := $(shell pkg-config ncurses --cflags 2>/dev/null) | ||
| 72 | + NCURSES_LDFLAGS := $(shell pkg-config ncurses --libs 2>/dev/null) | ||
| 73 | + else ifneq ($(shell pkg-config ncursesw --libs 2>/dev/null),) | 85 | + else ifneq ($(shell pkg-config ncursesw --libs 2>/dev/null),) |
| 74 | + NCURSES_CFLAGS := $(shell pkg-config ncursesw --cflags 2>/dev/null) | 86 | + NCURSES_CFLAGS := $(shell pkg-config ncursesw --cflags 2>/dev/null) |
| 75 | + NCURSES_LDFLAGS := $(shell pkg-config ncursesw --libs 2>/dev/null) | 87 | + NCURSES_LDFLAGS := $(shell pkg-config ncursesw --libs 2>/dev/null) |
| 76 | + else ifneq ($(shell pkg-config ncurses --libs 2>/dev/null),) | 88 | ifndef NO_PANEL |
| 77 | + NCURSES_CFLAGS := $(shell pkg-config ncurses --cflags 2>/dev/null) | 89 | NCURSES_LDFLAGS += -lpanel |
| 78 | + NCURSES_LDFLAGS := $(shell pkg-config ncurses --libs 2>/dev/null) | 90 | endif |
| 79 | endif | ||
| 80 | |||
| 81 | ifneq ($(NCURSES_LDFLAGS),) | ||
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 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" | |||
| 24 | LIC_FILES_CHKSUM = "file://LICENSE;md5=e2b3850593b899b1a17594ed4cc4c731" | 24 | LIC_FILES_CHKSUM = "file://LICENSE;md5=e2b3850593b899b1a17594ed4cc4c731" |
| 25 | DEPENDS = "ncurses" | 25 | DEPENDS = "ncurses" |
| 26 | 26 | ||
| 27 | SRC_URI = "http://pkgs.fedoraproject.org/repo/pkgs/iptraf-ng/iptraf-ng-1.1.4.tar.gz/e0f8df3b7baf2b5106709abc4f8c029a/${BP}.tar.gz \ | 27 | SRC_URI = "https://src.fedoraproject.org/repo/pkgs/iptraf-ng/v${PV}.tar.gz/sha512/44d36fc92cdbf379f62cb63638663c3ee610225b9c28d60ee55e62e358f398a6b0db281129327b3472e45fb553ee3dd605af09c129f2233f8839ae3dbd799384/v${PV}.tar.gz \ |
| 28 | file://iptraf-ng-tmpfiles.conf \ | ||
| 28 | file://ncurses-config.patch \ | 29 | file://ncurses-config.patch \ |
| 29 | file://0001-Fix-printd-formatting-strings.patch \ | 30 | file://0001-make-Make-CC-weak-assignment.patch \ |
| 30 | " | 31 | " |
| 31 | SRC_URI[md5sum] = "e0f8df3b7baf2b5106709abc4f8c029a" | 32 | SRC_URI[sha256sum] = "9f5cef584065420dea1ba32c86126aede1fa9bd25b0f8362b0f9fd9754f00870" |
| 32 | SRC_URI[sha256sum] = "16b9b05bf5d3725d86409b901696639ad46944d02de6def87b1ceae5310dd35c" | ||
| 33 | 33 | ||
| 34 | inherit autotools-brokensep pkgconfig | 34 | inherit pkgconfig |
| 35 | 35 | ||
| 36 | CFLAGS += "-D_GNU_SOURCE" | 36 | CFLAGS += "-D_GNU_SOURCE" |
| 37 | 37 | ||
| 38 | do_compile() { | ||
| 39 | oe_runmake | ||
| 40 | } | ||
| 41 | |||
| 42 | do_install() { | ||
| 43 | oe_runmake DESTDIR=${D} install | ||
| 44 | install -d -m 0755 ${D}${localstatedir}/{log,lib}/iptraf-ng | ||
| 45 | install -D -m 0644 -p ${S}/iptraf-ng-logrotate.conf ${D}${sysconfdir}/logrotate.d/iptraf-ng | ||
| 46 | install -Dm 0644 ${WORKDIR}/iptraf-ng-tmpfiles.conf ${D}${libdir}/tmpfiles.d/iptraf-ng-tmpfiles.conf | ||
| 47 | } | ||
| 48 | |||
| 49 | FILES:${PN} += "${libdir}/tmpfiles.d" | ||
| 38 | PROVIDES = "iptraf" | 50 | PROVIDES = "iptraf" |
| 39 | RPROVIDES:${PN} += "iptraf" | 51 | RPROVIDES:${PN} += "iptraf" |
| 40 | RREPLACES:${PN} += "iptraf" | 52 | RREPLACES:${PN} += "iptraf" |
