Skip to contentSkip to conversation

dropwatch: new package

PATCH Superseded Tzu-Jung Lee 2 participants 6 messages Jul 20, 2013 – Jul 22, 2013

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 dropwatch: new package

---
 package/Config.in                           |  1 +
 package/dropwatch/Config.in                 |  7 +++++++
 package/dropwatch/dropwatch-1.4-build.patch | 27 ++++++++++++++++++++++++++
 package/dropwatch/dropwatch.mk              | 30 +++++++++++++++++++++++++++++
 4 files changed, 65 insertions(+)
 create mode 100644 package/dropwatch/Config.in
 create mode 100644 package/dropwatch/dropwatch-1.4-build.patch
 create mode 100644 package/dropwatch/dropwatch.mk
package/Config.in +1 -0
index 286a605..7730317 100644
@@ -22,6 +22,7 @@ source "package/cache-calibrator/Config.in"
 source "package/dhrystone/Config.in"
 source "package/dstat/Config.in"
 source "package/dmalloc/Config.in"
+source "package/dropwatch/Config.in"
 source "package/gdb/Config.in"
 source "package/iozone/Config.in"
 source "package/kexec/Config.in"
package/dropwatch/Config.in new file +7 -0
new file mode 100644
index 0000000..69d7cd5
@@ -0,0 +1,7 @@
+config BR2_PACKAGE_DROPWATCH
+	bool "dropwatch"
+	help
+	  Dropwatch is a project I am tinkering with to improve the visibility
+	  developers and sysadmins have into the Linux networking stack.
+
+	  https://git.fedorahosted.org/git/dropwatch.git
package/dropwatch/dropwatch-1.4-build.patch new file +27 -0
new file mode 100644
index 0000000..eed43e8
@@ -0,0 +1,27 @@
+From 03bab84ca3f102274837e83ee6da4c997a9da018 Mon Sep 17 00:00:00 2001
+From: Tzu-Jung Lee <[email protected]>
+Date: Fri, 12 Jul 2013 20:00:57 +0800
+Subject: [PATCH] build: modify hardcoded gcc to support buildroot
+
+Signed-off-by: Tzu-Jung Lee <[email protected]>
+
+diff --git a/src/Makefile b/src/Makefile
+index 026b6ba..b87ae9f 100644
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -5,10 +5,10 @@ OBJFILES := main.o lookup.o\
+ 	 lookup_bfd.o lookup_kas.o
+ 
+ dropwatch: $(OBJFILES) 
+-	gcc -g -o dropwatch $(OBJFILES) $(LDFLAGS) 
++	$(CC) -g -o dropwatch $(OBJFILES) $(LDFLAGS)
+ 
+ %.o: %.c
+-	gcc $(CFLAGS) $<
++	$(CC) $(CFLAGS) $<
+ clean:
+ 	rm -f dropwatch *.o
+ 
+-- 
+1.8.3.2
+
package/dropwatch/dropwatch.mk new file +30 -0
new file mode 100644
index 0000000..b9676cb
@@ -0,0 +1,30 @@
+#############################################################
+#
+# dropwatch
+#
+#############################################################
+
+DROPWATCH_VERSION = 1.4
+DROPWATCH_SOURCE = dropwatch-$(DROPWATCH_VERSION).tar.bz2
+DROPWATCH_SITE = https://git.fedorahosted.org/cgit/dropwatch.git/snapshot/
+DROPWATCH_DEPENDENCIES = readline libnl binutils
+DROPWATCH_LICENSE = GPLv2+
+DROPWATCH_LICENSE_FILE = COPYING
+
+define DROPWATCH_INSTALL_TARGET_CMDS
+  cp $(@D)/src/dropwatch $(TARGET_DIR)/usr/bin
+endef
+
+define DROPWATCH_BUILD_CMDS
+  $(TARGET_CONFIGURE_OPTS) $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) build
+endef
+
+define DROPWATCH_CLEAN_CMDS
+  $(TARGET_CONFIGURE_OPTS) $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) clean
+endef
+
+define DROPWATCH_UNINSTALL_CMDS
+  rm -f $(TARGET_DIR)/usr/bin/dropwatch
+endef
+
+$(eval $(generic-package))
Signature · 1 line
1.8.3.2
#1 lore raw

PATCH v2 1/1 dropwatch: new package

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"T" == Tzu-Jung Lee <[email protected]> writes:

T> Signed-off-by: Tzu-Jung Lee <[email protected]> T> ---

 T>  package/Config.in                           |  1 +
 T>  package/dropwatch/Config.in                 |  7 +++++++
 T>  package/dropwatch/dropwatch-1.4-build.patch | 27 ++++++++++++++++++++++++++
 T>  package/dropwatch/dropwatch.mk              | 30 +++++++++++++++++++++++++++++
 T>  4 files changed, 65 insertions(+)
 T>  create mode 100644 package/dropwatch/Config.in
 T>  create mode 100644 package/dropwatch/dropwatch-1.4-build.patch
 T>  create mode 100644 package/dropwatch/dropwatch.mk

T> diff --git a/package/Config.in b/package/Config.in T> index 286a605..7730317 100644
T> --- a/package/Config.in
T> +++ b/package/Config.in
T> @@ -22,6 +22,7 @@ source "package/cache-calibrator/Config.in"

 T>  source "package/dhrystone/Config.in"
 T>  source "package/dstat/Config.in"
 T>  source "package/dmalloc/Config.in"
 T> +source "package/dropwatch/Config.in"
 T>  source "package/gdb/Config.in"
 T>  source "package/iozone/Config.in"
 T>  source "package/kexec/Config.in"

T> diff --git a/package/dropwatch/Config.in b/package/dropwatch/Config.in T> new file mode 100644
T> index 0000000..69d7cd5
T> --- /dev/null
T> +++ b/package/dropwatch/Config.in
T> @@ -0,0 +1,7 @@
T> +config BR2_PACKAGE_DROPWATCH
T> + bool "dropwatch"
T> + help
T> + Dropwatch is a project I am tinkering with to improve the visibility
T> + developers and sysadmins have into the Linux networking stack.

That doesn't really explain what it is about.

How about using the description from the man page instead?
(http://linux.die.net/man/1/dropwatch)

Dropwatch is an interactive utility for monitoring and recording packets that are dropped by the kernel

T> +
T> + https://git.fedorahosted.org/git/dropwatch.git

Please use https://fedorahosted.org/dropwatch/ instead.

T> diff --git a/package/dropwatch/dropwatch-1.4-build.patch b/package/dropwatch/dropwatch-1.4-build.patch T> new file mode 100644
T> index 0000000..eed43e8
T> --- /dev/null
T> +++ b/package/dropwatch/dropwatch-1.4-build.patch
T> @@ -0,0 +1,27 @@
T> +From 03bab84ca3f102274837e83ee6da4c997a9da018 Mon Sep 17 00:00:00 2001
T> +From: Tzu-Jung Lee <[email protected]>
T> +Date: Fri, 12 Jul 2013 20:00:57 +0800
T> +Subject: [PATCH] build: modify hardcoded gcc to support buildroot
T> +

It isn't just about buildroot, it is for everything not just using 'gcc'.

Did you send this patch upstream?

T> +Signed-off-by: Tzu-Jung Lee <[email protected]>
T> +
T> +diff --git a/src/Makefile b/src/Makefile
T> +index 026b6ba..b87ae9f 100644
T> +--- a/src/Makefile
T> ++++ b/src/Makefile
T> +@@ -5,10 +5,10 @@ OBJFILES := main.o lookup.o\
T> + lookup_bfd.o lookup_kas.o
T> +
T> + dropwatch: $(OBJFILES)
T> +- gcc -g -o dropwatch $(OBJFILES) $(LDFLAGS)
T> ++ $(CC) -g -o dropwatch $(OBJFILES) $(LDFLAGS)
T> +
T> + %.o: %.c
T> +- gcc $(CFLAGS) $<
T> ++ $(CC) $(CFLAGS) $<
T> + clean:
T> + rm -f dropwatch *.o
T> +
T> +--
T> +1.8.3.2
T> +
T> diff --git a/package/dropwatch/dropwatch.mk b/package/dropwatch/dropwatch.mk T> new file mode 100644
T> index 0000000..b9676cb
T> --- /dev/null
T> +++ b/package/dropwatch/dropwatch.mk
T> @@ -0,0 +1,30 @@
T> +############################################################# T> +#
T> +# dropwatch
T> +#
T> +#############################################################

Nit: These ##### lines should be 80 chars.

T> +
T> +DROPWATCH_VERSION = 1.4
T> +DROPWATCH_SOURCE = dropwatch-$(DROPWATCH_VERSION).tar.bz2
T> +DROPWATCH_SITE = https://git.fedorahosted.org/cgit/dropwatch.git/snapshot/
T> +DROPWATCH_DEPENDENCIES = readline libnl binutils

You should select those packages in Config.in as well then.

T> +DROPWATCH_LICENSE = GPLv2+
T> +DROPWATCH_LICENSE_FILE = COPYING
T> +
T> +define DROPWATCH_INSTALL_TARGET_CMDS T> + cp $(@D)/src/dropwatch $(TARGET_DIR)/usr/bin

We normally use
$(INSTALL) -D -m 0755 $(@D)/src/dropwatch $(TARGET_DIR)/usr/bin/dropwatch

And normally put it below the build step.

Does it really make sense to put in usr/bin? Don't you need root permissions to listen for these events?

From the website I see it apparently relies on some out of tree netlink patches:

Normally, monitoring for dropped packets requires the creation of a script that periodically polls all the aformentioned interfaces, checking for a change in various counter values. Dropwatch instead listens on a netlink socket for the kernel to inform userspace (apps like dropwatch and any others), that a packet has been dropped. This of course implies that the kernel has some sort of functionality to this end. That functionality (called the netlink Drop Monitor protocol), is currently being reviewed upstream. For those who would like to experiment with dropwatch now, you can either retrieve the appropriate kernel patches from the netdev mailing list, or download them here

Is that still the case? Have these been reviewed on the netdev list? Have they been accepted/rejected?

T> +endef
T> +
T> +define DROPWATCH_BUILD_CMDS
T> + $(TARGET_CONFIGURE_OPTS) $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) build T> +endef
T> +
T> +define DROPWATCH_CLEAN_CMDS
T> + $(TARGET_CONFIGURE_OPTS) $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) clean T> +endef
T> +
T> +define DROPWATCH_UNINSTALL_CMDS
T> + rm -f $(TARGET_DIR)/usr/bin/dropwatch
T> +endef
T> +
T> +$(eval $(generic-package))

Signature · 1 line
Bye, Peter Korsgaard
#2 lore raw

PATCH v2 1/1 dropwatch: new package

Hi Peter,

Quoted 37 lines · Peter Korsgaard
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"T" == Tzu-Jung Lee <[email protected]> writes:

T> Signed-off-by: Tzu-Jung Lee <[email protected]> T> ---

 T>  package/Config.in                           |  1 +
 T>  package/dropwatch/Config.in                 |  7 +++++++
 T>  package/dropwatch/dropwatch-1.4-build.patch | 27 ++++++++++++++++++++++++++
 T>  package/dropwatch/dropwatch.mk              | 30 +++++++++++++++++++++++++++++
 T>  4 files changed, 65 insertions(+)
 T>  create mode 100644 package/dropwatch/Config.in
 T>  create mode 100644 package/dropwatch/dropwatch-1.4-build.patch
 T>  create mode 100644 package/dropwatch/dropwatch.mk

T> diff --git a/package/Config.in b/package/Config.in T> index 286a605..7730317 100644
T> --- a/package/Config.in
T> +++ b/package/Config.in
T> @@ -22,6 +22,7 @@ source "package/cache-calibrator/Config.in"

 T>  source "package/dhrystone/Config.in"
 T>  source "package/dstat/Config.in"
 T>  source "package/dmalloc/Config.in"
 T> +source "package/dropwatch/Config.in"
 T>  source "package/gdb/Config.in"
 T>  source "package/iozone/Config.in"
 T>  source "package/kexec/Config.in"

T> diff --git a/package/dropwatch/Config.in b/package/dropwatch/Config.in T> new file mode 100644
T> index 0000000..69d7cd5
T> --- /dev/null
T> +++ b/package/dropwatch/Config.in
T> @@ -0,0 +1,7 @@
T> +config BR2_PACKAGE_DROPWATCH
T> + bool "dropwatch"
T> + help
T> + Dropwatch is a project I am tinkering with to improve the visibility
T> + developers and sysadmins have into the Linux networking stack.

Quoted 7 lines

That doesn't really explain what it is about.

How about using the description from the man page instead?
(http://linux.die.net/man/1/dropwatch)

Dropwatch is an interactive utility for monitoring and recording packets that are dropped by the kernel

done.

Quoted 4 lines

T> +
T> + https://git.fedorahosted.org/git/dropwatch.git

Please use https://fedorahosted.org/dropwatch/ instead.

done.

Quoted 12 lines

T> diff --git a/package/dropwatch/dropwatch-1.4-build.patch b/package/dropwatch/dropwatch-1.4-build.patch T> new file mode 100644
T> index 0000000..eed43e8
T> --- /dev/null
T> +++ b/package/dropwatch/dropwatch-1.4-build.patch
T> @@ -0,0 +1,27 @@
T> +From 03bab84ca3f102274837e83ee6da4c997a9da018 Mon Sep 17 00:00:00 2001
T> +From: Tzu-Jung Lee <[email protected]>
T> +Date: Fri, 12 Jul 2013 20:00:57 +0800
T> +Subject: [PATCH] build: modify hardcoded gcc to support buildroot
T> +

Quoted 3 lines

It isn't just about buildroot, it is for everything not just using 'gcc'.
Did you send this patch upstream?

I'm sending one now, and will feedback once I got ... feedback :-)

Quoted 44 lines

T> +Signed-off-by: Tzu-Jung Lee <[email protected]>
T> +
T> +diff --git a/src/Makefile b/src/Makefile
T> +index 026b6ba..b87ae9f 100644
T> +--- a/src/Makefile
T> ++++ b/src/Makefile
T> +@@ -5,10 +5,10 @@ OBJFILES := main.o lookup.o\
T> + lookup_bfd.o lookup_kas.o
T> +
T> + dropwatch: $(OBJFILES)
T> +- gcc -g -o dropwatch $(OBJFILES) $(LDFLAGS)
T> ++ $(CC) -g -o dropwatch $(OBJFILES) $(LDFLAGS)
T> +
T> + %.o: %.c
T> +- gcc $(CFLAGS) $<
T> ++ $(CC) $(CFLAGS) $<
T> + clean:
T> + rm -f dropwatch *.o
T> +
T> +--
T> +1.8.3.2
T> +
T> diff --git a/package/dropwatch/dropwatch.mk b/package/dropwatch/dropwatch.mk T> new file mode 100644
T> index 0000000..b9676cb
T> --- /dev/null
T> +++ b/package/dropwatch/dropwatch.mk
T> @@ -0,0 +1,30 @@
T> +############################################################# T> +#
T> +# dropwatch
T> +#
T> +#############################################################

Nit: These ##### lines should be 80 chars.

T> +
T> +DROPWATCH_VERSION = 1.4
T> +DROPWATCH_SOURCE = dropwatch-$(DROPWATCH_VERSION).tar.bz2
T> +DROPWATCH_SITE = https://git.fedorahosted.org/cgit/dropwatch.git/snapshot/
T> +DROPWATCH_DEPENDENCIES = readline libnl binutils

You should select those packages in Config.in as well then.

Quoted 8 lines

T> +DROPWATCH_LICENSE = GPLv2+
T> +DROPWATCH_LICENSE_FILE = COPYING
T> +
T> +define DROPWATCH_INSTALL_TARGET_CMDS T> + cp $(@D)/src/dropwatch $(TARGET_DIR)/usr/bin

We normally use
$(INSTALL) -D -m 0755 $(@D)/src/dropwatch $(TARGET_DIR)/usr/bin/dropwatch

done.

Quoted 1 line

And normally put it below the build step.

Do you mean to put it under BUILD_CMD, instead, or both BUILD and INSTALL_TARGET

Quoted 2 lines

Does it really make sense to put in usr/bin? Don't you need root permissions to listen for these events?

Not really. It doesn't require root permission.

Quoted 15 lines

From the website I see it apparently relies on some out of tree netlink patches:

Normally, monitoring for dropped packets requires the creation of a script that periodically polls all the aformentioned interfaces, checking for a change in various counter values. Dropwatch instead listens on a netlink socket for the kernel to inform userspace (apps like dropwatch and any others), that a packet has been dropped. This of course implies that the kernel has some sort of functionality to this end. That functionality (called the netlink Drop Monitor protocol), is currently being reviewed upstream. For those who would like to experiment with dropwatch now, you can either retrieve the appropriate kernel patches from the netdev mailing list, or download them here

Quoted 2 lines

Is that still the case? Have these been reviewed on the netdev list? Have they been accepted/rejected?

Yes, they've been merged for quite some time.

Quote:
Mar 14 2009: Kernel bits have been accepted and will be available
starting with 2.6.30!
I'm going to start working on adding some packaging code and getting
the userspace
bits into fedora in time for F11. Then I'll start working on the Roadmap items

Quoted 17 lines

T> +endef
T> +
T> +define DROPWATCH_BUILD_CMDS
T> + $(TARGET_CONFIGURE_OPTS) $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) build T> +endef
T> +
T> +define DROPWATCH_CLEAN_CMDS
T> + $(TARGET_CONFIGURE_OPTS) $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) clean T> +endef
T> +
T> +define DROPWATCH_UNINSTALL_CMDS
T> + rm -f $(TARGET_DIR)/usr/bin/dropwatch
T> +endef
T> +
T> +$(eval $(generic-package))

Quoted 2 lines

--
Bye, Peter Korsgaard

I'm re-submitting v3, which should include all the above comments.

Thanks.

Roy

#3 lore raw

PATCH v3 1/1 dropwatch: new package

---

v3 adopts all the review comments against v2 from Peter.

 package/Config.in                           |  1 +
 package/dropwatch/Config.in                 | 10 ++++++++++
 package/dropwatch/dropwatch-1.4-build.patch | 27 ++++++++++++++++++++++++++
 package/dropwatch/dropwatch.mk              | 30 +++++++++++++++++++++++++++++
 4 files changed, 68 insertions(+)
 create mode 100644 package/dropwatch/Config.in
 create mode 100644 package/dropwatch/dropwatch-1.4-build.patch
 create mode 100644 package/dropwatch/dropwatch.mk
package/Config.in +1 -0
index b8011c7..1216450 100644
@@ -22,6 +22,7 @@ source "package/cache-calibrator/Config.in"
 source "package/dhrystone/Config.in"
 source "package/dstat/Config.in"
 source "package/dmalloc/Config.in"
+source "package/dropwatch/Config.in"
 source "package/gdb/Config.in"
 source "package/iozone/Config.in"
 source "package/kexec/Config.in"
package/dropwatch/Config.in new file +10 -0
new file mode 100644
index 0000000..c7fc933
@@ -0,0 +1,10 @@
+config BR2_PACKAGE_DROPWATCH
+	bool "dropwatch"
+	select BR2_PACKAGE_BINUTILS
+	select BR2_PACKAGE_READLINE
+	select BR2_PACKAGE_LIBNL
+	help
+	  Dropwatch is an interactive utility for monitoring and recording packets
+	  that are dropped by the kernel
+
+	  https://fedorahosted.org/dropwatch/
package/dropwatch/dropwatch-1.4-build.patch new file +27 -0
new file mode 100644
index 0000000..eed43e8
@@ -0,0 +1,27 @@
+From 03bab84ca3f102274837e83ee6da4c997a9da018 Mon Sep 17 00:00:00 2001
+From: Tzu-Jung Lee <[email protected]>
+Date: Fri, 12 Jul 2013 20:00:57 +0800
+Subject: [PATCH] build: modify hardcoded gcc to support buildroot
+
+Signed-off-by: Tzu-Jung Lee <[email protected]>
+
+diff --git a/src/Makefile b/src/Makefile
+index 026b6ba..b87ae9f 100644
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -5,10 +5,10 @@ OBJFILES := main.o lookup.o\
+ 	 lookup_bfd.o lookup_kas.o
+ 
+ dropwatch: $(OBJFILES) 
+-	gcc -g -o dropwatch $(OBJFILES) $(LDFLAGS) 
++	$(CC) -g -o dropwatch $(OBJFILES) $(LDFLAGS)
+ 
+ %.o: %.c
+-	gcc $(CFLAGS) $<
++	$(CC) $(CFLAGS) $<
+ clean:
+ 	rm -f dropwatch *.o
+ 
+-- 
+1.8.3.2
+
package/dropwatch/dropwatch.mk new file +30 -0
new file mode 100644
index 0000000..549e3bb
@@ -0,0 +1,30 @@
+################################################################################
+#
+# dropwatch
+#
+################################################################################
+
+DROPWATCH_VERSION = 1.4
+DROPWATCH_SOURCE = dropwatch-$(DROPWATCH_VERSION).tar.bz2
+DROPWATCH_SITE = https://git.fedorahosted.org/cgit/dropwatch.git/snapshot/
+DROPWATCH_DEPENDENCIES = binutils libnl readline
+DROPWATCH_LICENSE = GPLv2+
+DROPWATCH_LICENSE_FILE = COPYING
+
+define DROPWATCH_BUILD_CMDS
+  $(TARGET_CONFIGURE_OPTS) $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) build
+endef
+
+define DROPWATCH_CLEAN_CMDS
+  $(TARGET_CONFIGURE_OPTS) $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) clean
+endef
+
+define DROPWATCH_INSTALL_TARGET_CMDS
+  $(INSTALL) -D -m 0755 $(@D)/src/dropwatch $(TARGET_DIR)/usr/bin/dropwatch
+endef
+
+define DROPWATCH_UNINSTALL_CMDS
+  rm -f $(TARGET_DIR)/usr/bin/dropwatch
+endef
+
+$(eval $(generic-package))
Signature · 1 line
1.8.3.2
#4 lore raw

PATCH v3 1/1 dropwatch: new package

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"T" == Tzu-Jung Lee <[email protected]> writes:

T> Signed-off-by: Tzu-Jung Lee <[email protected]> T> ---

T> v3 adopts all the review comments against v2 from Peter.

 T>  package/Config.in                           |  1 +
 T>  package/dropwatch/Config.in                 | 10 ++++++++++
 T>  package/dropwatch/dropwatch-1.4-build.patch | 27 ++++++++++++++++++++++++++
 T>  package/dropwatch/dropwatch.mk              | 30 +++++++++++++++++++++++++++++
 T>  4 files changed, 68 insertions(+)
 T>  create mode 100644 package/dropwatch/Config.in
 T>  create mode 100644 package/dropwatch/dropwatch-1.4-build.patch
 T>  create mode 100644 package/dropwatch/dropwatch.mk

T> diff --git a/package/Config.in b/package/Config.in T> index b8011c7..1216450 100644
T> --- a/package/Config.in
T> +++ b/package/Config.in
T> @@ -22,6 +22,7 @@ source "package/cache-calibrator/Config.in"

 T>  source "package/dhrystone/Config.in"
 T>  source "package/dstat/Config.in"
 T>  source "package/dmalloc/Config.in"
 T> +source "package/dropwatch/Config.in"
 T>  source "package/gdb/Config.in"
 T>  source "package/iozone/Config.in"
 T>  source "package/kexec/Config.in"

T> diff --git a/package/dropwatch/Config.in b/package/dropwatch/Config.in T> new file mode 100644
T> index 0000000..c7fc933
T> --- /dev/null
T> +++ b/package/dropwatch/Config.in
T> @@ -0,0 +1,10 @@
T> +config BR2_PACKAGE_DROPWATCH
T> + bool "dropwatch"
T> + select BR2_PACKAGE_BINUTILS
T> + select BR2_PACKAGE_READLINE
T> + select BR2_PACKAGE_LIBNL
T> + help
T> + Dropwatch is an interactive utility for monitoring and recording packets
T> + that are dropped by the kernel

Line too long. It should be wrapped around column 70 to fit menuconfig in a normal 80x24 terminal.

T> +++ b/package/dropwatch/dropwatch.mk
T> @@ -0,0 +1,30 @@
T> +################################################################################ T> +#
T> +# dropwatch
T> +#
T> +################################################################################ T> +
T> +DROPWATCH_VERSION = 1.4
T> +DROPWATCH_SOURCE = dropwatch-$(DROPWATCH_VERSION).tar.bz2
T> +DROPWATCH_SITE = https://git.fedorahosted.org/cgit/dropwatch.git/snapshot/
T> +DROPWATCH_DEPENDENCIES = binutils libnl readline

It uses pkg-config to find the libnl headers, so you also need host-pkgconf.

T> +DROPWATCH_LICENSE = GPLv2+

main.c explicitly says GPLv2, and the only reference to the typical 'any later version' is in COPYING, so it should be GPLv2

T> +DROPWATCH_LICENSE_FILE = COPYING

The variable is called ..FILES (S at the end).

Committed with these fixes, thanks.

Signature · 1 line
Bye, Peter Korsgaard
#5 lore raw

PATCH v2 1/1 dropwatch: new package

In reply to Tzu-Jung Lee
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Tzu-Jung" == Tzu-Jung Lee <[email protected]> writes:

Hi,

T> +++ b/package/dropwatch/dropwatch-1.4-build.patch
T> @@ -0,0 +1,27 @@
T> +From 03bab84ca3f102274837e83ee6da4c997a9da018 Mon Sep 17 00:00:00 2001 T> +From: Tzu-Jung Lee <[email protected]>
T> +Date: Fri, 12 Jul 2013 20:00:57 +0800
T> +Subject: [PATCH] build: modify hardcoded gcc to support buildroot T> +

Quoted 4 lines
Quoted 4 lines

It isn't just about buildroot, it is for everything not just using 'gcc'.
Did you send this patch upstream?

T> I'm sending one now, and will feedback once I got ... feedback :-)

Great, thanks.

T> +define DROPWATCH_INSTALL_TARGET_CMDS T> + cp $(@D)/src/dropwatch $(TARGET_DIR)/usr/bin

Quoted 3 lines
Quoted 3 lines

We normally use
$(INSTALL) -D -m 0755 $(@D)/src/dropwatch $(TARGET_DIR)/usr/bin/dropwatch

T> done.

Quoted 1 line
Quoted 1 line

And normally put it below the build step.

T> Do you mean to put it under BUILD_CMD, instead, or both BUILD and INSTALL_TARGET

Under BUILD_CMDS, so they are listed in the order that they get executed.

Quoted 2 lines
Quoted 2 lines

Does it really make sense to put in usr/bin? Don't you need root permissions to listen for these events?

T> Not really. It doesn't require root permission.

Ahh, ok.

Quoted 15 lines
Quoted 15 lines

From the website I see it apparently relies on some out of tree netlink patches:

Normally, monitoring for dropped packets requires the creation of a script that periodically polls all the aformentioned interfaces, checking for a change in various counter values. Dropwatch instead listens on a netlink socket for the kernel to inform userspace (apps like dropwatch and any others), that a packet has been dropped. This of course implies that the kernel has some sort of functionality to this end. That functionality (called the netlink Drop Monitor protocol), is currently being reviewed upstream. For those who would like to experiment with dropwatch now, you can either retrieve the appropriate kernel patches from the netdev mailing list, or download them here

Quoted 2 lines
Quoted 2 lines

Is that still the case? Have these been reviewed on the netdev list? Have they been accepted/rejected?

T> Yes, they've been merged for quite some time.

Ahh, great!

Signature · 1 line
Bye, Peter Korsgaard