Skip to contentSkip to conversation

package/nethogs: new package

PATCH In review Marcus Hoffmann via buildroot 1 participant 3 messages Feb 13, 2024 – Aug 5, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/nethogs: new package

---
 package/Config.in            |  1 +
 package/nethogs/Config.in    | 10 ++++++++++
 package/nethogs/nethogs.hash |  3 +++
 package/nethogs/nethogs.mk   | 21 +++++++++++++++++++++
 4 files changed, 35 insertions(+)
 create mode 100644 package/nethogs/Config.in
 create mode 100644 package/nethogs/nethogs.hash
 create mode 100644 package/nethogs/nethogs.mk
package/Config.in +1 -0
index bf0fe078b9..2d352dd8cc 100644
@@ -2476,6 +2476,7 @@ endif
 	source "package/ndisc6/Config.in"
 	source "package/net-tools/Config.in"
 	source "package/netatalk/Config.in"
+	source "package/nethogs/Config.in"
 	source "package/netcalc/Config.in"
 	source "package/netcat/Config.in"
 	source "package/netcat-openbsd/Config.in"
package/nethogs/Config.in new file +10 -0
new file mode 100644
index 0000000000..2d6b44739c
@@ -0,0 +1,10 @@
+config BR2_PACKAGE_NETHOGS
+	bool "nethogs"
+	select BR2_PACKAGE_LIBPCAP
+	select BR2_PACKAGE_NCURSES
+	help
+	  NetHogs is a small 'net top' tool. Instead of breaking the
+	  traffic down per protocol or per subnet, like most tools
+	  do, it groups bandwidth by process.
+
+          https://github.com/raboof/nethogs
package/nethogs/nethogs.hash new file +3 -0
new file mode 100644
index 0000000000..fd1f236250
@@ -0,0 +1,3 @@
+# Locally computed
+sha256  957d6afcc220dfbba44c819162f44818051c5b4fb793c47ba98294393986617d  nethogs-0.8.7.tar.gz
+sha256  8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643  COPYING
package/nethogs/nethogs.mk new file +21 -0
new file mode 100644
index 0000000000..69dabda191
@@ -0,0 +1,21 @@
+################################################################################
+#
+# nethogs
+#
+################################################################################
+
+NETHOGS_VERSION = 0.8.7
+NETHOGS_SITE = $(call github,raboof,nethogs,v$(NETHOGS_VERSION))
+NETHOGS_LICENSE = GPL-2.0
+NETHOGS_LICENSE_FILES = COPYING
+NETHOGS_DEPENDENCIES = libpcap ncurses
+
+define NETHOGS_BUILD_CMDS
+	$(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) nethogs
+endef
+
+define NETHOGS_INSTALL_TARGET_CMDS
+	$(INSTALL) -D -m 0755 $(@D)/src/nethogs $(TARGET_DIR)/usr/sbin
+endef
+
+$(eval $(generic-package))
Signature · 6 lines
2.34.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw
Quoted 16 lines · Marcus Hoffmann via buildroot
---
  package/Config.in            |  1 +
  package/nethogs/Config.in    | 10 ++++++++++
  package/nethogs/nethogs.hash |  3 +++
  package/nethogs/nethogs.mk   | 21 +++++++++++++++++++++
  4 files changed, 35 insertions(+)

create mode 100644 package/nethogs/Config.in
create mode 100644 package/nethogs/nethogs.hash
create mode 100644 package/nethogs/nethogs.mk

package/Config.in +0 -0
index bf0fe078b9..2d352dd8cc 100644

package/Config.in endif · line 2479

Quoted 4 lines
package/Config.in +1 -0
@@ -2476,6 +2476,7 @@ endif
  	source "package/ndisc6/Config.in"
  	source "package/net-tools/Config.in"
  	source "package/netatalk/Config.in"
+	source "package/nethogs/Config.in"

Oops, that is not quite alphabetically sorted here...

Quoted 45 lines
package/Config.in +0 -0
  	source "package/netcalc/Config.in"
  	source "package/netcat/Config.in"
  	source "package/netcat-openbsd/Config.in"
package/nethogs/Config.in new file +10 -0
new file mode 100644
index 0000000000..2d6b44739c
@@ -0,0 +1,10 @@
+config BR2_PACKAGE_NETHOGS
+	bool "nethogs"
+	select BR2_PACKAGE_LIBPCAP
+	select BR2_PACKAGE_NCURSES
+	help
+	  NetHogs is a small 'net top' tool. Instead of breaking the
+	  traffic down per protocol or per subnet, like most tools
+	  do, it groups bandwidth by process.
+
+          https://github.com/raboof/nethogs
package/nethogs/nethogs.hash new file +3 -0
new file mode 100644
index 0000000000..fd1f236250
@@ -0,0 +1,3 @@
+# Locally computed
+sha256  957d6afcc220dfbba44c819162f44818051c5b4fb793c47ba98294393986617d  nethogs-0.8.7.tar.gz
+sha256  8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643  COPYING
package/nethogs/nethogs.mk new file +11 -0
new file mode 100644
index 0000000000..69dabda191
@@ -0,0 +1,21 @@
+################################################################################
+#
+# nethogs
+#
+################################################################################
+
+NETHOGS_VERSION = 0.8.7
+NETHOGS_SITE = $(call github,raboof,nethogs,v$(NETHOGS_VERSION))
+NETHOGS_LICENSE = GPL-2.0
+NETHOGS_LICENSE_FILES = COPYING
+NETHOGS_DEPENDENCIES = libpcap ncurses

package/nethogs/nethogs.mk line 21

Quoted 10 lines
package/nethogs/nethogs.mk new file +10 -0
+
+define NETHOGS_BUILD_CMDS
+	$(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) nethogs
+endef
+
+define NETHOGS_INSTALL_TARGET_CMDS
+	$(INSTALL) -D -m 0755 $(@D)/src/nethogs $(TARGET_DIR)/usr/sbin
+endef
+
+$(eval $(generic-package))

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#2 lore raw
In reply to Marcus Hoffmann via buildroot

Hello Marcus,

Quoted 1 line · On Tue, 13 Feb 2024 13:04:51 +0100 Marcus Hoffmann via buildroot…

Thanks for the patch, which I have applied, after making a few changes. See below.

Quoted 6 lines
---
 package/Config.in            |  1 +
 package/nethogs/Config.in    | 10 ++++++++++
 package/nethogs/nethogs.hash |  3 +++
 package/nethogs/nethogs.mk   | 21 +++++++++++++++++++++
 4 files changed, 35 insertions(+)

Entry in the DEVELOPERS file was missing.

package/Config.in endif · line 2482

Quoted 12 lines
package/Config.in +1 -0
index bf0fe078b9..2d352dd8cc 100644
@@ -2476,6 +2476,7 @@ endif
 	source "package/ndisc6/Config.in"
 	source "package/net-tools/Config.in"
 	source "package/netatalk/Config.in"
+	source "package/nethogs/Config.in"
 	source "package/netcalc/Config.in"
 	source "package/netcat/Config.in"
 	source "package/netcat-openbsd/Config.in"

As you noted in your replied, alphabetic ordering was not correct here.

package/Config.in

Quoted 3 lines
package/Config.in +3 -0
+NETHOGS_VERSION = 0.8.7
+NETHOGS_SITE = $(call github,raboof,nethogs,v$(NETHOGS_VERSION))
+NETHOGS_LICENSE = GPL-2.0

License is GPL-2.0+ (they use the "or later")

package/Config.in

Quoted 9 lines
package/Config.in +9 -0
+NETHOGS_LICENSE_FILES = COPYING
+NETHOGS_DEPENDENCIES = libpcap ncurses
+
+define NETHOGS_BUILD_CMDS
+	$(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) nethogs
+endef
+
+define NETHOGS_INSTALL_TARGET_CMDS
+	$(INSTALL) -D -m 0755 $(@D)/src/nethogs $(TARGET_DIR)/usr/sbin

$(TARGET_DIR)/usr/sbin should have been $(TARGET_DIR)/usr/sbin/nethogs, to avoid having 'nethogs' installed as a file called 'sbin' in $(TARGET_DIR)/usr if by lack of luck $(TARGET_DIR)/usr/sbin doesn't already exist as a directory.

Thanks a lot for this contribution!

Thomas

Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot