Skip to contentSkip to conversation

package/dropwatch: bump to version 1.5.2

Buildroot Yann E. MORIN 1 participant 1 message Mar 13, 2020

lore
Share & tools
lore
#0 lore raw

commit: https://git.buildroot.net/buildroot/commit/?id=3a630c5759a9e63bf7807cb48e392b32a3574676
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master

The new version comes with some new features and minor fixes. The two previously included patches were merged upstream. A new patch was added to fix build on 32-bit systems. There's a new dependency to the pcap library.

---
 .../0001-Fix-build-on-32-bit-systems.patch         |  87 ++++++++++++
 package/dropwatch/0001-binutils-2.23.1.patch       |  60 ---------
 .../dropwatch/0002-Make-binutils-optional.patch    | 146 ---------------------
 package/dropwatch/Config.in                        |   1 +
 package/dropwatch/dropwatch.hash                   |   2 +-
 package/dropwatch/dropwatch.mk                     |   4 +-
 6 files changed, 91 insertions(+), 209 deletions(-)
package/dropwatch/0001-Fix-build-on-32-bit-systems.patch new file +87 -0
new file mode 100644
index 0000000000..355a01c99f
@@ -0,0 +1,87 @@
+From 3004f23d38400cd4a8619bcacd55a625d3bd7e1f Mon Sep 17 00:00:00 2001
+From: Alexander Dahl <[email protected]>
+Date: Fri, 13 Mar 2020 13:20:27 +0100
+Subject: [PATCH] Fix build on 32-bit systems
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Because -Werror is set, some printf statements caused build errors on
+32-bit systems when printing uint64_t. This can be handled in a portable
+way by using the macros from inttypes.h ???
+
+Fixes: #12
+Signed-off-by: Alexander Dahl <[email protected]>
+---
+PR upstream: https://github.com/nhorman/dropwatch/pull/24
+---
+ src/dwdump.c | 3 ++-
+ src/main.c   | 9 +++++----
+ 2 files changed, 7 insertions(+), 5 deletions(-)
+
+diff --git a/src/dwdump.c b/src/dwdump.c
+index 0c3ba6f..0ea9fd0 100644
+--- a/src/dwdump.c
++++ b/src/dwdump.c
+@@ -3,6 +3,7 @@
+  */
+ 
+ #include <errno.h>
++#include <inttypes.h>
+ #include <getopt.h>
+ #include <pcap.h>
+ #include <signal.h>
+@@ -246,7 +247,7 @@ static void dwdump_nested_stats_print(struct nlattr *attr)
+ 		return;
+ 
+ 	if (attrs[NET_DM_ATTR_STATS_DROPPED])
+-		printf("Tail dropped: %lu\n",
++		printf("Tail dropped: %" PRIu64 "\n",
+ 		       nla_get_u64(attrs[NET_DM_ATTR_STATS_DROPPED]));
+ }
+ 
+diff --git a/src/main.c b/src/main.c
+index 1a1515c..bd87085 100644
+--- a/src/main.c
++++ b/src/main.c
+@@ -10,6 +10,7 @@
+ #include <stdlib.h>
+ #include <stdio.h>
+ #include <errno.h>
++#include <inttypes.h>
+ #include <signal.h>
+ #include <stdint.h>
+ #include <stdbool.h>
+@@ -486,9 +487,9 @@ void handle_dm_packet_alert_msg(struct netlink_message *msg, int err)
+ 		goto out_free;
+ 
+ 	if (attrs[NET_DM_ATTR_PC] && attrs[NET_DM_ATTR_SYMBOL])
+-		printf("drop at: %s (%p)\n",
++		printf("drop at: %s (0x%" PRIx64 ")\n",
+ 		       nla_get_string(attrs[NET_DM_ATTR_SYMBOL]),
+-		       (void *) nla_get_u64(attrs[NET_DM_ATTR_PC]));
++		       nla_get_u64(attrs[NET_DM_ATTR_PC]));
+ 	else if (attrs[NET_DM_ATTR_HW_TRAP_GROUP_NAME] &&
+ 		 attrs[NET_DM_ATTR_HW_TRAP_NAME])
+ 		printf("drop at: %s (%s)\n",
+@@ -524,7 +525,7 @@ void handle_dm_packet_alert_msg(struct netlink_message *msg, int err)
+ 
+ 		tstr = asctime(tm);
+ 		tstr[strlen(tstr) - 1] = 0;
+-		printf("timestamp: %s %09ld nsec\n", tstr, ts % 1000000000);
++		printf("timestamp: %s %09" PRId64 " nsec\n", tstr, ts % 1000000000);
+ 	}
+ 
+ 	if (attrs[NET_DM_ATTR_PROTO])
+@@ -599,7 +600,7 @@ void print_nested_stats(struct nlattr *attr)
+ 		return;
+ 
+ 	if (attrs[NET_DM_ATTR_STATS_DROPPED])
+-		printf("Tail dropped: %lu\n",
++		printf("Tail dropped: %" PRIu64 "\n",
+ 		       nla_get_u64(attrs[NET_DM_ATTR_STATS_DROPPED]));
+ }
+ 
+-- 
+2.20.1
+
package/dropwatch/0001-binutils-2.23.1.patch deleted +0 -60

60 lines not on this page · raw message

package/dropwatch/0002-Make-binutils-optional.patch deleted +0 -146

146 lines not on this page · raw message

package/dropwatch/Config.in +1 -0
index cf11a03d43..8dfb4ace56 100644
@@ -3,6 +3,7 @@ config BR2_PACKAGE_DROPWATCH
 	depends on BR2_TOOLCHAIN_HAS_THREADS # libnl
 	select BR2_PACKAGE_READLINE
 	select BR2_PACKAGE_LIBNL
+	select BR2_PACKAGE_LIBPCAP
 	help
 	  Dropwatch is an interactive utility for monitoring and
 	  recording packets that are dropped by the kernel
package/dropwatch/dropwatch.hash +1 -1
index e0e03ad883..e4b687ae75 100644
@@ -1,3 +1,3 @@
 # Locally calculated
-sha256 3a95b7ff0d609f581c120a4072e6a97d044f900824b4f4d3ac83fdcc5f3e96cf  dropwatch-1.5.1.tar.gz
+sha256 a2049a68d2cc2f81df977c7a732f50de3ec71283bc7bd94389ba33574af9aaa6  dropwatch-1.5.2.tar.gz
 sha256 e6d6a009505e345fe949e1310334fcb0747f28dae2856759de102ab66b722cb4  COPYING
package/dropwatch/dropwatch.mk +2 -2
index c5873ccf76..0ee9e5e0f6 100644
@@ -4,9 +4,9 @@
 #
 ################################################################################
 
-DROPWATCH_VERSION = 1.5.1
+DROPWATCH_VERSION = 1.5.2
 DROPWATCH_SITE = $(call github,nhorman,dropwatch,v$(DROPWATCH_VERSION))
-DROPWATCH_DEPENDENCIES = libnl readline host-pkgconf $(TARGET_NLS_DEPENDENCIES)
+DROPWATCH_DEPENDENCIES = libnl readline libpcap host-pkgconf $(TARGET_NLS_DEPENDENCIES)
 # Until upstream updates their tree with a proper license
 # blurb: https://github.com/nhorman/dropwatch/issues/14
 DROPWATCH_LICENSE = GPL-2.0+