All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/iptraf-ng: bump to version 1.2.1
@ 2020-08-14 14:39 Jugurtha BELKALEM
  2020-08-14 19:35 ` Thomas Petazzoni
  0 siblings, 1 reply; 9+ messages in thread
From: Jugurtha BELKALEM @ 2020-08-14 14:39 UTC (permalink / raw)
  To: buildroot

IPTraf-ng is a console-based network monitoring program for Linux that
displays information about IP traffic. It returns such information as:

- Current TCP connections
- UDP, ICMP, OSPF, and other types of IP packets
- Packet and byte counts on TCP connections
- IP, TCP, UDP, ICMP, non-IP, and other packet and byte counts
- TCP/UDP counts by ports
- Packet counts by packet sizes
- Packet and byte counts by IP address
- Interface activity
- Flag statuses on TCP packets
- LAN station statistics

Version 1.1.4 is deprecated (2013) which must be updated by current version.

Note : old download link (https://fedorahosted.org/)
       has been stopped from being maintained as the project moved to
       https://github.com/iptraf-ng/iptraf-ng.

Signed-off-by: Jugurtha BELKALEM <jugurtha.belkalem@smile.fr>
---
 ...-not-found-issue-during-cross-compilation.patch | 102 +++++++++++++++++++++
 package/iptraf-ng/Config.in                        |   7 +-
 package/iptraf-ng/iptraf-ng.hash                   |   3 +-
 package/iptraf-ng/iptraf-ng.mk                     |  19 +++-
 4 files changed, 120 insertions(+), 11 deletions(-)
 create mode 100644 package/iptraf-ng/0001-Fix-file-not-found-issue-during-cross-compilation.patch

diff --git a/package/iptraf-ng/0001-Fix-file-not-found-issue-during-cross-compilation.patch b/package/iptraf-ng/0001-Fix-file-not-found-issue-during-cross-compilation.patch
new file mode 100644
index 0000000..609403e
--- /dev/null
+++ b/package/iptraf-ng/0001-Fix-file-not-found-issue-during-cross-compilation.patch
@@ -0,0 +1,102 @@
+From e4fde25079ac22bd26e4583bf696bc11cca038f8 Mon Sep 17 00:00:00 2001
+From: Jugurtha BELKALEM <jugurtha.belkalem@smile.fr>
+Date: Fri, 14 Aug 2020 15:54:18 +0200
+Subject: [PATCH 1/1] Fix file not found issue during cross compilation
+
+Files in src/tui include iptraf-ng-compat.h as if it was in
+the same folder. Header's relative location must be explicitly
+defined otherwise compilation throws error : NO SUCH FILE.
+
+PR : https://github.com/iptraf-ng/iptraf-ng/pull/30.
+
+Signed-off-by: Jugurtha BELKALEM <jugurtha.belkalem@smile.fr>
+---
+ src/tui/input.c    | 2 +-
+ src/tui/labels.c   | 2 +-
+ src/tui/listbox.c  | 2 +-
+ src/tui/menurt.c   | 2 +-
+ src/tui/msgboxes.c | 2 +-
+ src/tui/winops.c   | 2 +-
+ 6 files changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/src/tui/input.c b/src/tui/input.c
+index 8ed6081..a5f63ea 100644
+--- a/src/tui/input.c
++++ b/src/tui/input.c
+@@ -7,7 +7,7 @@ input.c - a custom keyboard input module
+ 
+ ***/
+ 
+-#include "iptraf-ng-compat.h"
++#include "../iptraf-ng-compat.h"
+ 
+ #include "input.h"
+ 
+diff --git a/src/tui/labels.c b/src/tui/labels.c
+index e4e11fb..4dd8991 100644
+--- a/src/tui/labels.c
++++ b/src/tui/labels.c
+@@ -6,7 +6,7 @@
+  * user interface library
+  */
+ 
+-#include "iptraf-ng-compat.h"
++#include "../iptraf-ng-compat.h"
+ 
+ #include "winops.h"
+ 
+diff --git a/src/tui/listbox.c b/src/tui/listbox.c
+index daecf66..31c394c 100644
+--- a/src/tui/listbox.c
++++ b/src/tui/listbox.c
+@@ -5,7 +5,7 @@
+  * listbox.c - scrollable listbox management module
+  */
+ 
+-#include "iptraf-ng-compat.h"
++#include "../iptraf-ng-compat.h"
+ 
+ #include "winops.h"
+ #include "labels.h"
+diff --git a/src/tui/menurt.c b/src/tui/menurt.c
+index fb3f002..49e6754 100644
+--- a/src/tui/menurt.c
++++ b/src/tui/menurt.c
+@@ -7,7 +7,7 @@ menurt.c - ncurses-based menu definition module
+ 
+ ***/
+ 
+-#include "iptraf-ng-compat.h"
++#include "../iptraf-ng-compat.h"
+ 
+ #include "menurt.h"
+ #include "winops.h"
+diff --git a/src/tui/msgboxes.c b/src/tui/msgboxes.c
+index 76ae4fa..3e29282 100644
+--- a/src/tui/msgboxes.c
++++ b/src/tui/msgboxes.c
+@@ -5,7 +5,7 @@
+  * msgboxes.c - message and error box display functions
+  */
+ 
+-#include "iptraf-ng-compat.h"
++#include "../iptraf-ng-compat.h"
+ 
+ #include "winops.h"
+ 
+diff --git a/src/tui/winops.c b/src/tui/winops.c
+index d866281..36ac663 100644
+--- a/src/tui/winops.c
++++ b/src/tui/winops.c
+@@ -7,7 +7,7 @@ winops.c - screen configuration and setup functions
+ 
+ ***/
+ 
+-#include "iptraf-ng-compat.h"
++#include "../iptraf-ng-compat.h"
+ 
+ void tx_stdwinset(WINDOW * win)
+ {
+-- 
+2.7.4
+
diff --git a/package/iptraf-ng/Config.in b/package/iptraf-ng/Config.in
index 5c3b484..f240daf 100644
--- a/package/iptraf-ng/Config.in
+++ b/package/iptraf-ng/Config.in
@@ -3,11 +3,10 @@ config BR2_PACKAGE_IPTRAF_NG
 	depends on BR2_USE_MMU # fork()
 	select BR2_PACKAGE_NCURSES
 	help
-	  IPTraf-ng is a ncurses-based network monitoring utility. It
-	  gathers data like TCP connection packet and byte counts,
-	  interface statistics and activity indicators.
+	  IPTraf-ng is a console-based network monitoring program for
+	  Linux that gathers displays information about IP traffic.
 
-	  https://fedorahosted.org/iptraf-ng/
+	  https://github.com/iptraf-ng/iptraf-ng
 
 	  IPTraf-ng is a fork of original IPTraf v3.0.0
 	  (http://iptraf.seul.org).
diff --git a/package/iptraf-ng/iptraf-ng.hash b/package/iptraf-ng/iptraf-ng.hash
index 0a257ec..67f0ee2 100644
--- a/package/iptraf-ng/iptraf-ng.hash
+++ b/package/iptraf-ng/iptraf-ng.hash
@@ -1,4 +1,3 @@
-# From https://fedorahosted.org/releases/i/p/iptraf-ng/iptraf-ng-1.1.4.tar.gz.sum
-sha1	a2e51b0dd6b8c80583fc25d055850c96b3d2f544	iptraf-ng-1.1.4.tar.gz
 # Locally computed
+sha256	a53fa7bd5472e7103c5922e067912432c2a2f2a549a49334d2d1727f2e98e1ec  iptraf-ng-v1.2.1.tar.gz
 sha256  4e49bef38f621aac4a870da4b30011c7b7abc7256b218daec1c425b08448ae1e  LICENSE
diff --git a/package/iptraf-ng/iptraf-ng.mk b/package/iptraf-ng/iptraf-ng.mk
index ac572b9..1138b7a 100644
--- a/package/iptraf-ng/iptraf-ng.mk
+++ b/package/iptraf-ng/iptraf-ng.mk
@@ -4,16 +4,25 @@
 #
 ################################################################################
 
-IPTRAF_NG_VERSION = 1.1.4
-IPTRAF_NG_SITE = https://fedorahosted.org/releases/i/p/iptraf-ng
+IPTRAF_NG_VERSION = v1.2.1
+IPTRAF_NG_SITE = https://github.com/iptraf-ng/iptraf-ng.git
+IPTRAF_NG_SITE_METHOD = git
 IPTRAF_NG_LICENSE = GPL-2.0+
 IPTRAF_NG_LICENSE_FILES = LICENSE
+IPTRAF_NG_INSTALL_TARGET = YES
 IPTRAF_NG_DEPENDENCIES = ncurses
 
+
 IPTRAF_NG_MAKE_ENV = \
 	NCURSES_LDFLAGS="-lpanel -lncurses"
 
-IPTRAF_NG_CONF_ENV = \
-	CFLAGS="$(TARGET_CFLAGS) -D_GNU_SOURCE"
 
-$(eval $(autotools-package))
+define IPTRAF_NG_BUILD_CMDS
+	$(MAKE) HOME=$(HOST_DIR)/usr/ $(TARGET_CONFIGURE_OPTS) \
+	$(IPTRAF_NG_MAKE_ENV) -C $(@D) all
+endef
+define IPTRAF_NG_INSTALL_TARGET_CMDS
+	$(INSTALL) -D -m 0755 $(@D)/iptraf-ng $(TARGET_DIR)/usr/bin/iptraf-ng
+endef
+
+$(eval $(generic-package))
-- 
2.7.4

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

* [Buildroot] [PATCH 1/1] package/iptraf-ng: bump to version 1.2.1
  2020-08-14 14:39 [Buildroot] [PATCH 1/1] package/iptraf-ng: bump to version 1.2.1 Jugurtha BELKALEM
@ 2020-08-14 19:35 ` Thomas Petazzoni
  0 siblings, 0 replies; 9+ messages in thread
From: Thomas Petazzoni @ 2020-08-14 19:35 UTC (permalink / raw)
  To: buildroot

Hello,

On Fri, 14 Aug 2020 16:39:23 +0200
Jugurtha BELKALEM <jugurtha.belkalem@smile.fr> wrote:

> IPTraf-ng is a console-based network monitoring program for Linux that
> displays information about IP traffic. It returns such information as:
> 
> - Current TCP connections
> - UDP, ICMP, OSPF, and other types of IP packets
> - Packet and byte counts on TCP connections
> - IP, TCP, UDP, ICMP, non-IP, and other packet and byte counts
> - TCP/UDP counts by ports
> - Packet counts by packet sizes
> - Packet and byte counts by IP address
> - Interface activity
> - Flag statuses on TCP packets
> - LAN station statistics
> 
> Version 1.1.4 is deprecated (2013) which must be updated by current version.

I'm not sure why it "must" be updated. Could you clarify ?

> diff --git a/package/iptraf-ng/0001-Fix-file-not-found-issue-during-cross-compilation.patch b/package/iptraf-ng/0001-Fix-file-not-found-issue-during-cross-compilation.patch
> new file mode 100644
> index 0000000..609403e
> --- /dev/null
> +++ b/package/iptraf-ng/0001-Fix-file-not-found-issue-during-cross-compilation.patch
> @@ -0,0 +1,102 @@
> +From e4fde25079ac22bd26e4583bf696bc11cca038f8 Mon Sep 17 00:00:00 2001
> +From: Jugurtha BELKALEM <jugurtha.belkalem@smile.fr>
> +Date: Fri, 14 Aug 2020 15:54:18 +0200
> +Subject: [PATCH 1/1] Fix file not found issue during cross compilation

Please generate patches with "git format-patch -N".

> +Files in src/tui include iptraf-ng-compat.h as if it was in
> +the same folder. Header's relative location must be explicitly
> +defined otherwise compilation throws error : NO SUCH FILE.
> +
> +PR : https://github.com/iptraf-ng/iptraf-ng/pull/30.
> +
> +Signed-off-by: Jugurtha BELKALEM <jugurtha.belkalem@smile.fr>

I don't think this patch is needed. The Makefile has this:

BASIC_CFLAGS = -I. -Isrc/

So the headers in the top-level directory of the project are properly
covered by -I.

I believe your issue is that you're passing $(TARGET_CONFIGURE_OPTS),
which overrides the CFLAGS from the Makefile of the upstream project.

> -IPTRAF_NG_VERSION = 1.1.4
> -IPTRAF_NG_SITE = https://fedorahosted.org/releases/i/p/iptraf-ng
> +IPTRAF_NG_VERSION = v1.2.1

Please drop the "v" in the version, i.e the version should be just
1.2.1. See how other github-fetched packages do this in Buildroot.

> +IPTRAF_NG_SITE = https://github.com/iptraf-ng/iptraf-ng.git
> +IPTRAF_NG_SITE_METHOD = git

Please use the "github" helper macro to download from Github. See other
Buildroot packages as well.

>  IPTRAF_NG_LICENSE = GPL-2.0+
>  IPTRAF_NG_LICENSE_FILES = LICENSE
> +IPTRAF_NG_INSTALL_TARGET = YES

Not needed, and actually triggers a "make check-package" warning.

>  IPTRAF_NG_DEPENDENCIES = ncurses
>  
> +

Spurious change.

>  IPTRAF_NG_MAKE_ENV = \
>  	NCURSES_LDFLAGS="-lpanel -lncurses"
>  
> -IPTRAF_NG_CONF_ENV = \
> -	CFLAGS="$(TARGET_CFLAGS) -D_GNU_SOURCE"
>  
> -$(eval $(autotools-package))
> +define IPTRAF_NG_BUILD_CMDS
> +	$(MAKE) HOME=$(HOST_DIR)/usr/ $(TARGET_CONFIGURE_OPTS) \

I'm not sure what the HOME variable is about, but pointing to
$(HOST_DIR)/usr when building a target package doesn't seem very good.

> +	$(IPTRAF_NG_MAKE_ENV) -C $(@D) all

This IPTRAF_NG_MAKE_ENV is not passed in the environment, so it is
quite confusing. What about just passing NCURSES_LDFLAGS within the
build commands ?

> +endef

One empty line to separate the build and install target commands please.

> +define IPTRAF_NG_INSTALL_TARGET_CMDS
> +	$(INSTALL) -D -m 0755 $(@D)/iptraf-ng $(TARGET_DIR)/usr/bin/iptraf-ng
> +endef

Could you use the "make install" target of the upstream Makefile
instead ?

Thanks,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

* [Buildroot] [PATCH 1/1] package/iptraf-ng: bump to version 1.2.1
  2020-08-26 21:27 ` Thomas Petazzoni
@ 2020-08-27  8:10   ` Jugurtha BELKALEM
  0 siblings, 0 replies; 9+ messages in thread
From: Jugurtha BELKALEM @ 2020-08-27  8:10 UTC (permalink / raw)
  To: buildroot

Hi Thomas,

On Wed, Aug 26, 2020 at 11:27 PM Thomas Petazzoni <
thomas.petazzoni@bootlin.com> wrote:

> On Wed, 19 Aug 2020 12:41:31 +0200
> Jugurtha BELKALEM <jugurtha.belkalem@smile.fr> wrote:
>
> > PTraf-ng is a console-based network monitoring program for Linux that
> > displays information about IP traffic. It returns such information as:
> >
> > - Current TCP connections
> > - UDP, ICMP, OSPF, and other types of IP packets
> > - Packet and byte counts on TCP connections
> > - IP, TCP, UDP, ICMP, non-IP, and other packet and byte counts
> > - TCP/UDP counts by ports
> > - Packet counts by packet sizes
> > - Packet and byte counts by IP address
> > - Interface activity
> > - Flag statuses on TCP packets
> > - LAN station statistics
>
> This change is causing one build failure:
>
>   http://autobuild.buildroot.net/?reason=iptraf-ng-1.2.1
>
>
Actually, there was a missing : depends on
"BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_14"
as PACKET_USER and PACKET_KERNEL were introduced in kernel 3.14 :
https://elixir.bootlin.com/linux/v3.14-rc1/source/include/uapi/linux/if_packet.h
.

I will send the fix.

Hope this answers the question.

Could you have a look ?
>
> Thanks,
>
> Thomas
> --
> Thomas Petazzoni, CTO, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com
>

Best regards.

Jugurtha.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20200827/eb4e216d/attachment.html>

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

* [Buildroot] [PATCH 1/1] package/iptraf-ng: bump to version 1.2.1
  2020-08-19 10:41 Jugurtha BELKALEM
  2020-08-25  8:09 ` Thomas Petazzoni
@ 2020-08-26 21:27 ` Thomas Petazzoni
  2020-08-27  8:10   ` Jugurtha BELKALEM
  1 sibling, 1 reply; 9+ messages in thread
From: Thomas Petazzoni @ 2020-08-26 21:27 UTC (permalink / raw)
  To: buildroot

On Wed, 19 Aug 2020 12:41:31 +0200
Jugurtha BELKALEM <jugurtha.belkalem@smile.fr> wrote:

> PTraf-ng is a console-based network monitoring program for Linux that
> displays information about IP traffic. It returns such information as:
> 
> - Current TCP connections
> - UDP, ICMP, OSPF, and other types of IP packets
> - Packet and byte counts on TCP connections
> - IP, TCP, UDP, ICMP, non-IP, and other packet and byte counts
> - TCP/UDP counts by ports
> - Packet counts by packet sizes
> - Packet and byte counts by IP address
> - Interface activity
> - Flag statuses on TCP packets
> - LAN station statistics

This change is causing one build failure:

  http://autobuild.buildroot.net/?reason=iptraf-ng-1.2.1

Could you have a look ?

Thanks,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

* [Buildroot] [PATCH 1/1] package/iptraf-ng: bump to version 1.2.1
  2020-08-19 10:41 Jugurtha BELKALEM
@ 2020-08-25  8:09 ` Thomas Petazzoni
  2020-08-26 21:27 ` Thomas Petazzoni
  1 sibling, 0 replies; 9+ messages in thread
From: Thomas Petazzoni @ 2020-08-25  8:09 UTC (permalink / raw)
  To: buildroot

Hello Jugurtha,

On Wed, 19 Aug 2020 12:41:31 +0200
Jugurtha BELKALEM <jugurtha.belkalem@smile.fr> wrote:

> PTraf-ng is a console-based network monitoring program for Linux that
> displays information about IP traffic. It returns such information as:
> 
> - Current TCP connections
> - UDP, ICMP, OSPF, and other types of IP packets
> - Packet and byte counts on TCP connections
> - IP, TCP, UDP, ICMP, non-IP, and other packet and byte counts
> - TCP/UDP counts by ports
> - Packet counts by packet sizes
> - Packet and byte counts by IP address
> - Interface activity
> - Flag statuses on TCP packets
> - LAN station statistics
> 
> V1.2.1 fixed multiple issues in V1.1.4 like :
> - Introduce packet capturing abstraction: add recvmmsg(),
>   TPACKET_V2 and TPACKET_V3 to capture in multigigabit speeds.
> - Handling mlock() failures and carry on execution (without
>   crashing iptraf-ng).
> - Properly account non-IP packets.
> - Show dropped packet count.
> 
> Signed-off-by: Jugurtha BELKALEM <jugurtha.belkalem@smile.fr>

I've applied to next, with a few changes, see below.

> -IPTRAF_NG_MAKE_ENV = \
> -	NCURSES_LDFLAGS="-lpanel -lncurses"

I had to keep NCURSES_LDFLAGS, otherwise the iptraf build system calls
the host ncurses5-config (or similar) script, and gets linker flags
suitable for the host ncurses, and not the target ncurses. In my case,
it caused the build to fail.

> +# HOME should be overwritten, otherwise it falls on the value of
> +# the cross compiling machine.
> +define IPTRAF_NG_INSTALL_TARGET_CMDS
> +	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \
> +			   HOME=$(TARGET_DIR)/usr install

Instead of overriding HOME, I've done it like this:

		prefix=/usr DESTDIR=$(TARGET_DIR)

which looks a bit more "standard".

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

* [Buildroot] [PATCH 1/1] package/iptraf-ng: bump to version 1.2.1
@ 2020-08-19 10:41 Jugurtha BELKALEM
  2020-08-25  8:09 ` Thomas Petazzoni
  2020-08-26 21:27 ` Thomas Petazzoni
  0 siblings, 2 replies; 9+ messages in thread
From: Jugurtha BELKALEM @ 2020-08-19 10:41 UTC (permalink / raw)
  To: buildroot

PTraf-ng is a console-based network monitoring program for Linux that
displays information about IP traffic. It returns such information as:

- Current TCP connections
- UDP, ICMP, OSPF, and other types of IP packets
- Packet and byte counts on TCP connections
- IP, TCP, UDP, ICMP, non-IP, and other packet and byte counts
- TCP/UDP counts by ports
- Packet counts by packet sizes
- Packet and byte counts by IP address
- Interface activity
- Flag statuses on TCP packets
- LAN station statistics

V1.2.1 fixed multiple issues in V1.1.4 like :
- Introduce packet capturing abstraction: add recvmmsg(),
  TPACKET_V2 and TPACKET_V3 to capture in multigigabit speeds.
- Handling mlock() failures and carry on execution (without
  crashing iptraf-ng).
- Properly account non-IP packets.
- Show dropped packet count.

Signed-off-by: Jugurtha BELKALEM <jugurtha.belkalem@smile.fr>
---
 package/iptraf-ng/Config.in      |  7 +++----
 package/iptraf-ng/iptraf-ng.hash |  3 +--
 package/iptraf-ng/iptraf-ng.mk   | 19 ++++++++++++-------
 3 files changed, 16 insertions(+), 13 deletions(-)

diff --git a/package/iptraf-ng/Config.in b/package/iptraf-ng/Config.in
index 5c3b484..f240daf 100644
--- a/package/iptraf-ng/Config.in
+++ b/package/iptraf-ng/Config.in
@@ -3,11 +3,10 @@ config BR2_PACKAGE_IPTRAF_NG
 	depends on BR2_USE_MMU # fork()
 	select BR2_PACKAGE_NCURSES
 	help
-	  IPTraf-ng is a ncurses-based network monitoring utility. It
-	  gathers data like TCP connection packet and byte counts,
-	  interface statistics and activity indicators.
+	  IPTraf-ng is a console-based network monitoring program for
+	  Linux that gathers displays information about IP traffic.
 
-	  https://fedorahosted.org/iptraf-ng/
+	  https://github.com/iptraf-ng/iptraf-ng
 
 	  IPTraf-ng is a fork of original IPTraf v3.0.0
 	  (http://iptraf.seul.org).
diff --git a/package/iptraf-ng/iptraf-ng.hash b/package/iptraf-ng/iptraf-ng.hash
index 0a257ec..278816f 100644
--- a/package/iptraf-ng/iptraf-ng.hash
+++ b/package/iptraf-ng/iptraf-ng.hash
@@ -1,4 +1,3 @@
-# From https://fedorahosted.org/releases/i/p/iptraf-ng/iptraf-ng-1.1.4.tar.gz.sum
-sha1	a2e51b0dd6b8c80583fc25d055850c96b3d2f544	iptraf-ng-1.1.4.tar.gz
 # Locally computed
+sha256	9f5cef584065420dea1ba32c86126aede1fa9bd25b0f8362b0f9fd9754f00870  iptraf-ng-1.2.1.tar.gz
 sha256  4e49bef38f621aac4a870da4b30011c7b7abc7256b218daec1c425b08448ae1e  LICENSE
diff --git a/package/iptraf-ng/iptraf-ng.mk b/package/iptraf-ng/iptraf-ng.mk
index ac572b9..4504ea1 100644
--- a/package/iptraf-ng/iptraf-ng.mk
+++ b/package/iptraf-ng/iptraf-ng.mk
@@ -4,16 +4,21 @@
 #
 ################################################################################
 
-IPTRAF_NG_VERSION = 1.1.4
-IPTRAF_NG_SITE = https://fedorahosted.org/releases/i/p/iptraf-ng
+IPTRAF_NG_VERSION = 1.2.1
+IPTRAF_NG_SITE = $(call github,iptraf-ng,iptraf-ng,v$(IPTRAF_NG_VERSION))
 IPTRAF_NG_LICENSE = GPL-2.0+
 IPTRAF_NG_LICENSE_FILES = LICENSE
 IPTRAF_NG_DEPENDENCIES = ncurses
 
-IPTRAF_NG_MAKE_ENV = \
-	NCURSES_LDFLAGS="-lpanel -lncurses"
+define IPTRAF_NG_BUILD_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D)
+endef
 
-IPTRAF_NG_CONF_ENV = \
-	CFLAGS="$(TARGET_CFLAGS) -D_GNU_SOURCE"
+# HOME should be overwritten, otherwise it falls on the value of
+# the cross compiling machine.
+define IPTRAF_NG_INSTALL_TARGET_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \
+			   HOME=$(TARGET_DIR)/usr install
+endef
 
-$(eval $(autotools-package))
+$(eval $(generic-package))
-- 
2.7.4

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

* [Buildroot] [PATCH 1/1] package/iptraf-ng: bump to version 1.2.1
  2020-08-17 15:08 Jugurtha BELKALEM
@ 2020-08-18 21:22 ` Thomas Petazzoni
  0 siblings, 0 replies; 9+ messages in thread
From: Thomas Petazzoni @ 2020-08-18 21:22 UTC (permalink / raw)
  To: buildroot

Hello Jugurtha,

On Mon, 17 Aug 2020 17:08:41 +0200
Jugurtha BELKALEM <jugurtha.belkalem@smile.fr> wrote:

> diff --git a/package/iptraf-ng/iptraf-ng.hash b/package/iptraf-ng/iptraf-ng.hash
> index 0a257ec..67f0ee2 100644
> --- a/package/iptraf-ng/iptraf-ng.hash
> +++ b/package/iptraf-ng/iptraf-ng.hash
> @@ -1,4 +1,3 @@
> -# From https://fedorahosted.org/releases/i/p/iptraf-ng/iptraf-ng-1.1.4.tar.gz.sum
> -sha1	a2e51b0dd6b8c80583fc25d055850c96b3d2f544	iptraf-ng-1.1.4.tar.gz
>  # Locally computed
> +sha256	a53fa7bd5472e7103c5922e067912432c2a2f2a549a49334d2d1727f2e98e1ec  iptraf-ng-v1.2.1.tar.gz

I'm not getting the same hash here:

ERROR: iptraf-ng-v1.2.1.tar.gz has wrong sha256 hash:
ERROR: expected: a53fa7bd5472e7103c5922e067912432c2a2f2a549a49334d2d1727f2e98e1ec
ERROR: got     : 9f5cef584065420dea1ba32c86126aede1fa9bd25b0f8362b0f9fd9754f00870

Also, please use two spaces to separate the hash type from the hash,
and the hash from the file name.

> -IPTRAF_NG_VERSION = 1.1.4
> -IPTRAF_NG_SITE = https://fedorahosted.org/releases/i/p/iptraf-ng
> +IPTRAF_NG_VERSION = v1.2.1

Please use:

IPTRAF_NG_VERSION = 1.2.1

> +IPTRAF_NG_SITE = $(call github,iptraf-ng,iptraf-ng,$(IPTRAF_NG_VERSION))

and:

IPTRAF_NG_SITE = $(call github,iptraf-ng,iptraf-ng,v$(IPTRAF_NG_VERSION))

>  IPTRAF_NG_LICENSE = GPL-2.0+
>  IPTRAF_NG_LICENSE_FILES = LICENSE
>  IPTRAF_NG_DEPENDENCIES = ncurses
>  
> -IPTRAF_NG_MAKE_ENV = \
> -	NCURSES_LDFLAGS="-lpanel -lncurses"
> +define IPTRAF_NG_BUILD_CMDS
> +	$(TARGET_MAKE_ENV) $(MAKE) CC="$(TARGET_CC)" \
> +			   LD="$(TARGET_CC)" \
> +			   CFLAGS="$(TARGET_CFLAGS)" \
> +			   LDFLAGS="$(TARGET_LDFLAGS)" -C $(@D)

Can you try to replace CC, LD, CFLAGS and LDFLAGS by $(TARGET_CONFIGURE_OPTS) ?

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

* [Buildroot] [PATCH 1/1] package/iptraf-ng: bump to version 1.2.1
@ 2020-08-17 15:08 Jugurtha BELKALEM
  2020-08-18 21:22 ` Thomas Petazzoni
  0 siblings, 1 reply; 9+ messages in thread
From: Jugurtha BELKALEM @ 2020-08-17 15:08 UTC (permalink / raw)
  To: buildroot

IPTraf-ng is a console-based network monitoring program for Linux that
displays information about IP traffic. It returns such information as:

- Current TCP connections
- UDP, ICMP, OSPF, and other types of IP packets
- Packet and byte counts on TCP connections
- IP, TCP, UDP, ICMP, non-IP, and other packet and byte counts
- TCP/UDP counts by ports
- Packet counts by packet sizes
- Packet and byte counts by IP address
- Interface activity
- Flag statuses on TCP packets
- LAN station statistics

V1.2.1 fixed multiple issues in V1.1.4 like :
- Introduce packet capturing abstraction: add recvmmsg(),
  TPACKET_V2 and TPACKET_V3 to capture in multigigabit speeds.
- Handling mlock() failures and carry on execution (without
  crashing iptraf-ng).
- Properly account non-IP packets.
- Show dropped packet count.

Signed-off-by: Jugurtha BELKALEM <jugurtha.belkalem@smile.fr>
---
 package/iptraf-ng/Config.in      |  7 +++----
 package/iptraf-ng/iptraf-ng.hash |  3 +--
 package/iptraf-ng/iptraf-ng.mk   | 22 +++++++++++++++-------
 3 files changed, 19 insertions(+), 13 deletions(-)

diff --git a/package/iptraf-ng/Config.in b/package/iptraf-ng/Config.in
index 5c3b484..f240daf 100644
--- a/package/iptraf-ng/Config.in
+++ b/package/iptraf-ng/Config.in
@@ -3,11 +3,10 @@ config BR2_PACKAGE_IPTRAF_NG
 	depends on BR2_USE_MMU # fork()
 	select BR2_PACKAGE_NCURSES
 	help
-	  IPTraf-ng is a ncurses-based network monitoring utility. It
-	  gathers data like TCP connection packet and byte counts,
-	  interface statistics and activity indicators.
+	  IPTraf-ng is a console-based network monitoring program for
+	  Linux that gathers displays information about IP traffic.
 
-	  https://fedorahosted.org/iptraf-ng/
+	  https://github.com/iptraf-ng/iptraf-ng
 
 	  IPTraf-ng is a fork of original IPTraf v3.0.0
 	  (http://iptraf.seul.org).
diff --git a/package/iptraf-ng/iptraf-ng.hash b/package/iptraf-ng/iptraf-ng.hash
index 0a257ec..67f0ee2 100644
--- a/package/iptraf-ng/iptraf-ng.hash
+++ b/package/iptraf-ng/iptraf-ng.hash
@@ -1,4 +1,3 @@
-# From https://fedorahosted.org/releases/i/p/iptraf-ng/iptraf-ng-1.1.4.tar.gz.sum
-sha1	a2e51b0dd6b8c80583fc25d055850c96b3d2f544	iptraf-ng-1.1.4.tar.gz
 # Locally computed
+sha256	a53fa7bd5472e7103c5922e067912432c2a2f2a549a49334d2d1727f2e98e1ec  iptraf-ng-v1.2.1.tar.gz
 sha256  4e49bef38f621aac4a870da4b30011c7b7abc7256b218daec1c425b08448ae1e  LICENSE
diff --git a/package/iptraf-ng/iptraf-ng.mk b/package/iptraf-ng/iptraf-ng.mk
index ac572b9..cc34e54 100644
--- a/package/iptraf-ng/iptraf-ng.mk
+++ b/package/iptraf-ng/iptraf-ng.mk
@@ -4,16 +4,24 @@
 #
 ################################################################################
 
-IPTRAF_NG_VERSION = 1.1.4
-IPTRAF_NG_SITE = https://fedorahosted.org/releases/i/p/iptraf-ng
+IPTRAF_NG_VERSION = v1.2.1
+IPTRAF_NG_SITE = $(call github,iptraf-ng,iptraf-ng,$(IPTRAF_NG_VERSION))
 IPTRAF_NG_LICENSE = GPL-2.0+
 IPTRAF_NG_LICENSE_FILES = LICENSE
 IPTRAF_NG_DEPENDENCIES = ncurses
 
-IPTRAF_NG_MAKE_ENV = \
-	NCURSES_LDFLAGS="-lpanel -lncurses"
+define IPTRAF_NG_BUILD_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) CC="$(TARGET_CC)" \
+			   LD="$(TARGET_CC)" \
+			   CFLAGS="$(TARGET_CFLAGS)" \
+			   LDFLAGS="$(TARGET_LDFLAGS)" -C $(@D)
+endef
 
-IPTRAF_NG_CONF_ENV = \
-	CFLAGS="$(TARGET_CFLAGS) -D_GNU_SOURCE"
+# HOME should be overwritten, otherwise it falls on the value of
+# the cross compiling machine.
+define IPTRAF_NG_INSTALL_TARGET_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \
+			   HOME=$(TARGET_DIR)/usr install
+endef
 
-$(eval $(autotools-package))
+$(eval $(generic-package))
-- 
2.7.4

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

* [Buildroot] [PATCH 1/1] package/iptraf-ng: bump to version 1.2.1
@ 2020-08-14 14:38 Jugurtha BELKALEM
  0 siblings, 0 replies; 9+ messages in thread
From: Jugurtha BELKALEM @ 2020-08-14 14:38 UTC (permalink / raw)
  To: buildroot

IPTraf-ng is a console-based network monitoring program for Linux that
displays information about IP traffic. It returns such information as:

- Current TCP connections
- UDP, ICMP, OSPF, and other types of IP packets
- Packet and byte counts on TCP connections
- IP, TCP, UDP, ICMP, non-IP, and other packet and byte counts
- TCP/UDP counts by ports
- Packet counts by packet sizes
- Packet and byte counts by IP address
- Interface activity
- Flag statuses on TCP packets
- LAN station statistics

Version 1.1.4 is deprecated (2013) which must be updated by current version.

Note : old download link (https://fedorahosted.org/)
       has been stopped from being maintained as the project moved to
       https://fedorahosted.org/releases/i/p/iptraf-ng.

Signed-off-by: Jugurtha BELKALEM <jugurtha.belkalem@smile.fr>
---
 ...-not-found-issue-during-cross-compilation.patch | 102 +++++++++++++++++++++
 package/iptraf-ng/Config.in                        |   7 +-
 package/iptraf-ng/iptraf-ng.hash                   |   3 +-
 package/iptraf-ng/iptraf-ng.mk                     |  19 +++-
 4 files changed, 120 insertions(+), 11 deletions(-)
 create mode 100644 package/iptraf-ng/0001-Fix-file-not-found-issue-during-cross-compilation.patch

diff --git a/package/iptraf-ng/0001-Fix-file-not-found-issue-during-cross-compilation.patch b/package/iptraf-ng/0001-Fix-file-not-found-issue-during-cross-compilation.patch
new file mode 100644
index 0000000..609403e
--- /dev/null
+++ b/package/iptraf-ng/0001-Fix-file-not-found-issue-during-cross-compilation.patch
@@ -0,0 +1,102 @@
+From e4fde25079ac22bd26e4583bf696bc11cca038f8 Mon Sep 17 00:00:00 2001
+From: Jugurtha BELKALEM <jugurtha.belkalem@smile.fr>
+Date: Fri, 14 Aug 2020 15:54:18 +0200
+Subject: [PATCH 1/1] Fix file not found issue during cross compilation
+
+Files in src/tui include iptraf-ng-compat.h as if it was in
+the same folder. Header's relative location must be explicitly
+defined otherwise compilation throws error : NO SUCH FILE.
+
+PR : https://github.com/iptraf-ng/iptraf-ng/pull/30.
+
+Signed-off-by: Jugurtha BELKALEM <jugurtha.belkalem@smile.fr>
+---
+ src/tui/input.c    | 2 +-
+ src/tui/labels.c   | 2 +-
+ src/tui/listbox.c  | 2 +-
+ src/tui/menurt.c   | 2 +-
+ src/tui/msgboxes.c | 2 +-
+ src/tui/winops.c   | 2 +-
+ 6 files changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/src/tui/input.c b/src/tui/input.c
+index 8ed6081..a5f63ea 100644
+--- a/src/tui/input.c
++++ b/src/tui/input.c
+@@ -7,7 +7,7 @@ input.c - a custom keyboard input module
+ 
+ ***/
+ 
+-#include "iptraf-ng-compat.h"
++#include "../iptraf-ng-compat.h"
+ 
+ #include "input.h"
+ 
+diff --git a/src/tui/labels.c b/src/tui/labels.c
+index e4e11fb..4dd8991 100644
+--- a/src/tui/labels.c
++++ b/src/tui/labels.c
+@@ -6,7 +6,7 @@
+  * user interface library
+  */
+ 
+-#include "iptraf-ng-compat.h"
++#include "../iptraf-ng-compat.h"
+ 
+ #include "winops.h"
+ 
+diff --git a/src/tui/listbox.c b/src/tui/listbox.c
+index daecf66..31c394c 100644
+--- a/src/tui/listbox.c
++++ b/src/tui/listbox.c
+@@ -5,7 +5,7 @@
+  * listbox.c - scrollable listbox management module
+  */
+ 
+-#include "iptraf-ng-compat.h"
++#include "../iptraf-ng-compat.h"
+ 
+ #include "winops.h"
+ #include "labels.h"
+diff --git a/src/tui/menurt.c b/src/tui/menurt.c
+index fb3f002..49e6754 100644
+--- a/src/tui/menurt.c
++++ b/src/tui/menurt.c
+@@ -7,7 +7,7 @@ menurt.c - ncurses-based menu definition module
+ 
+ ***/
+ 
+-#include "iptraf-ng-compat.h"
++#include "../iptraf-ng-compat.h"
+ 
+ #include "menurt.h"
+ #include "winops.h"
+diff --git a/src/tui/msgboxes.c b/src/tui/msgboxes.c
+index 76ae4fa..3e29282 100644
+--- a/src/tui/msgboxes.c
++++ b/src/tui/msgboxes.c
+@@ -5,7 +5,7 @@
+  * msgboxes.c - message and error box display functions
+  */
+ 
+-#include "iptraf-ng-compat.h"
++#include "../iptraf-ng-compat.h"
+ 
+ #include "winops.h"
+ 
+diff --git a/src/tui/winops.c b/src/tui/winops.c
+index d866281..36ac663 100644
+--- a/src/tui/winops.c
++++ b/src/tui/winops.c
+@@ -7,7 +7,7 @@ winops.c - screen configuration and setup functions
+ 
+ ***/
+ 
+-#include "iptraf-ng-compat.h"
++#include "../iptraf-ng-compat.h"
+ 
+ void tx_stdwinset(WINDOW * win)
+ {
+-- 
+2.7.4
+
diff --git a/package/iptraf-ng/Config.in b/package/iptraf-ng/Config.in
index 5c3b484..f240daf 100644
--- a/package/iptraf-ng/Config.in
+++ b/package/iptraf-ng/Config.in
@@ -3,11 +3,10 @@ config BR2_PACKAGE_IPTRAF_NG
 	depends on BR2_USE_MMU # fork()
 	select BR2_PACKAGE_NCURSES
 	help
-	  IPTraf-ng is a ncurses-based network monitoring utility. It
-	  gathers data like TCP connection packet and byte counts,
-	  interface statistics and activity indicators.
+	  IPTraf-ng is a console-based network monitoring program for
+	  Linux that gathers displays information about IP traffic.
 
-	  https://fedorahosted.org/iptraf-ng/
+	  https://github.com/iptraf-ng/iptraf-ng
 
 	  IPTraf-ng is a fork of original IPTraf v3.0.0
 	  (http://iptraf.seul.org).
diff --git a/package/iptraf-ng/iptraf-ng.hash b/package/iptraf-ng/iptraf-ng.hash
index 0a257ec..67f0ee2 100644
--- a/package/iptraf-ng/iptraf-ng.hash
+++ b/package/iptraf-ng/iptraf-ng.hash
@@ -1,4 +1,3 @@
-# From https://fedorahosted.org/releases/i/p/iptraf-ng/iptraf-ng-1.1.4.tar.gz.sum
-sha1	a2e51b0dd6b8c80583fc25d055850c96b3d2f544	iptraf-ng-1.1.4.tar.gz
 # Locally computed
+sha256	a53fa7bd5472e7103c5922e067912432c2a2f2a549a49334d2d1727f2e98e1ec  iptraf-ng-v1.2.1.tar.gz
 sha256  4e49bef38f621aac4a870da4b30011c7b7abc7256b218daec1c425b08448ae1e  LICENSE
diff --git a/package/iptraf-ng/iptraf-ng.mk b/package/iptraf-ng/iptraf-ng.mk
index ac572b9..1138b7a 100644
--- a/package/iptraf-ng/iptraf-ng.mk
+++ b/package/iptraf-ng/iptraf-ng.mk
@@ -4,16 +4,25 @@
 #
 ################################################################################
 
-IPTRAF_NG_VERSION = 1.1.4
-IPTRAF_NG_SITE = https://fedorahosted.org/releases/i/p/iptraf-ng
+IPTRAF_NG_VERSION = v1.2.1
+IPTRAF_NG_SITE = https://github.com/iptraf-ng/iptraf-ng.git
+IPTRAF_NG_SITE_METHOD = git
 IPTRAF_NG_LICENSE = GPL-2.0+
 IPTRAF_NG_LICENSE_FILES = LICENSE
+IPTRAF_NG_INSTALL_TARGET = YES
 IPTRAF_NG_DEPENDENCIES = ncurses
 
+
 IPTRAF_NG_MAKE_ENV = \
 	NCURSES_LDFLAGS="-lpanel -lncurses"
 
-IPTRAF_NG_CONF_ENV = \
-	CFLAGS="$(TARGET_CFLAGS) -D_GNU_SOURCE"
 
-$(eval $(autotools-package))
+define IPTRAF_NG_BUILD_CMDS
+	$(MAKE) HOME=$(HOST_DIR)/usr/ $(TARGET_CONFIGURE_OPTS) \
+	$(IPTRAF_NG_MAKE_ENV) -C $(@D) all
+endef
+define IPTRAF_NG_INSTALL_TARGET_CMDS
+	$(INSTALL) -D -m 0755 $(@D)/iptraf-ng $(TARGET_DIR)/usr/bin/iptraf-ng
+endef
+
+$(eval $(generic-package))
-- 
2.7.4

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

end of thread, other threads:[~2020-08-27  8:10 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-14 14:39 [Buildroot] [PATCH 1/1] package/iptraf-ng: bump to version 1.2.1 Jugurtha BELKALEM
2020-08-14 19:35 ` Thomas Petazzoni
  -- strict thread matches above, loose matches on Subject: below --
2020-08-19 10:41 Jugurtha BELKALEM
2020-08-25  8:09 ` Thomas Petazzoni
2020-08-26 21:27 ` Thomas Petazzoni
2020-08-27  8:10   ` Jugurtha BELKALEM
2020-08-17 15:08 Jugurtha BELKALEM
2020-08-18 21:22 ` Thomas Petazzoni
2020-08-14 14:38 Jugurtha BELKALEM

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.