From eb8dc40360f0cfef56fb6947cc817a547d6d9bc6 Mon Sep 17 00:00:00 2001 From: Dave Cobbley Date: Tue, 14 Aug 2018 10:05:37 -0700 Subject: [Subtree] Removing import-layers directory As part of the move to subtrees, need to bring all the import layers content to the top level. Change-Id: I4a163d10898cbc6e11c27f776f60e1a470049d8f Signed-off-by: Dave Cobbley Signed-off-by: Brad Bishop --- .../0001-Fix-printd-formatting-strings.patch | 54 +++++++++++++++ .../iptraf/iptraf-ng/ncurses-config.patch | 81 ++++++++++++++++++++++ .../recipes-devtools/iptraf/iptraf-ng_1.1.4.bb | 42 +++++++++++ 3 files changed, 177 insertions(+) create mode 100644 meta-openembedded/meta-oe/recipes-devtools/iptraf/iptraf-ng/0001-Fix-printd-formatting-strings.patch create mode 100644 meta-openembedded/meta-oe/recipes-devtools/iptraf/iptraf-ng/ncurses-config.patch create mode 100644 meta-openembedded/meta-oe/recipes-devtools/iptraf/iptraf-ng_1.1.4.bb (limited to 'meta-openembedded/meta-oe/recipes-devtools/iptraf') diff --git a/meta-openembedded/meta-oe/recipes-devtools/iptraf/iptraf-ng/0001-Fix-printd-formatting-strings.patch b/meta-openembedded/meta-oe/recipes-devtools/iptraf/iptraf-ng/0001-Fix-printd-formatting-strings.patch new file mode 100644 index 000000000..5b9afd961 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-devtools/iptraf/iptraf-ng/0001-Fix-printd-formatting-strings.patch @@ -0,0 +1,54 @@ +From 86b4d398dbb95e2437b70eba3b30e995ec9be505 Mon Sep 17 00:00:00 2001 +From: Khem Raj +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 +--- + 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-openembedded/meta-oe/recipes-devtools/iptraf/iptraf-ng/ncurses-config.patch b/meta-openembedded/meta-oe/recipes-devtools/iptraf/iptraf-ng/ncurses-config.patch new file mode 100644 index 000000000..65b92dade --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-devtools/iptraf/iptraf-ng/ncurses-config.patch @@ -0,0 +1,81 @@ +Use pkg-config to search for ncurses libraries + +Signed-off-by: Khem Raj +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 + + ifndef NCURSES_LDFLAGS + ifdef NEEDS_NCURSES5 +- NCURSES_CFLAGS := $(shell ncurses5-config --cflags 2>/dev/null) +- NCURSES_LDFLAGS := $(shell ncurses5-config --libs 2>/dev/null) ++ NCURSES_CFLAGS := $(shell pkg-config ncurses --cflags 2>/dev/null) ++ NCURSES_LDFLAGS := $(shell pkg-config ncurses --libs 2>/dev/null) + ifndef NO_PANEL + NCURSES_LDFLAGS += -lpanel + endif +@@ -215,8 +215,8 @@ endif + + ifndef NCURSES_LDFLAGS + ifdef NEEDS_NCURSESW5 +- NCURSES_CFLAGS := $(shell ncursesw5-config --cflags 2>/dev/null) +- NCURSES_LDFLAGS := $(shell ncursesw5-config --libs 2>/dev/null) ++ 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 + endif +@@ -225,8 +225,8 @@ endif + + ifndef NCURSES_LDFLAGS + ifdef NEEDS_NCURSES6 +- NCURSES_CFLAGS := $(shell ncurses6-config --cflags 2>/dev/null) +- NCURSES_LDFLAGS := $(shell ncurses6-config --libs 2>/dev/null) ++ NCURSES_CFLAGS := $(shell pkg-config ncurses6 --cflags 2>/dev/null) ++ NCURSES_LDFLAGS := $(shell pkg-config ncurses6 --libs 2>/dev/null) + ifndef NO_PANEL + NCURSES_LDFLAGS += -lpanel + endif +@@ -235,8 +235,8 @@ endif + + ifndef NCURSES_LDFLAGS + ifdef NEEDS_NCURSESW6 +- NCURSES_CFLAGS := $(shell ncursesw6-config --cflags 2>/dev/null) +- NCURSES_LDFLAGS := $(shell ncursesw6-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) + ifndef NO_PANEL + NCURSES_LDFLAGS += -lpanel + endif +@@ -246,17 +246,17 @@ endif + # try find ncuses by autodetect + ifndef NCURSES_LDFLAGS + 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) +- 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 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 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),) diff --git a/meta-openembedded/meta-oe/recipes-devtools/iptraf/iptraf-ng_1.1.4.bb b/meta-openembedded/meta-oe/recipes-devtools/iptraf/iptraf-ng_1.1.4.bb new file mode 100644 index 000000000..c53e66300 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-devtools/iptraf/iptraf-ng_1.1.4.bb @@ -0,0 +1,42 @@ +# Copyright (C) 2017 Khem Raj +# Released under the MIT license (see COPYING.MIT for the terms) + +SUMMARY = "A console-based network monitoring utility" +DESCRIPTION = "IPTraf-ng is a console-based network monitoring utility. IPTraf gathers \ +data like TCP connection packet and byte counts, interface statistics \ +and activity indicators, TCP/UDP traffic breakdowns, and LAN station \ +packet and byte counts. IPTraf-ng features include an IP traffic monitor \ +which shows TCP flag information, packet and byte counts, ICMP \ +details, OSPF packet types, and oversized IP packet warnings; \ +interface statistics showing IP, TCP, UDP, ICMP, non-IP and other IP \ +packet counts, IP checksum errors, interface activity and packet size \ +counts; a TCP and UDP service monitor showing counts of incoming and \ +outgoing packets for common TCP and UDP application ports, a LAN \ +statistics module that discovers active hosts and displays statistics \ +about their activity; TCP, UDP and other protocol display filters so \ +you can view just the traffic you want; logging; support for Ethernet, \ +FDDI, ISDN, SLIP, PPP, and loopback interfaces; and utilization of the \ +built-in raw socket interface of the Linux kernel, so it can be used \ +on a wide variety of supported network cards." + +HOMEPAGE = "https://fedorahosted.org/iptraf-ng/" +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 \ + file://ncurses-config.patch \ + file://0001-Fix-printd-formatting-strings.patch \ + " +SRC_URI[md5sum] = "e0f8df3b7baf2b5106709abc4f8c029a" +SRC_URI[sha256sum] = "16b9b05bf5d3725d86409b901696639ad46944d02de6def87b1ceae5310dd35c" + +inherit autotools-brokensep pkgconfig + +CFLAGS += "-D_GNU_SOURCE" + +PROVIDES = "iptraf" +RPROVIDES_${PN} += "iptraf" +RREPLACES_${PN} += "iptraf" +RCONFLICTS_${PN} += "iptraf" + -- cgit v1.2.3