All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/3] netsniff-ng: use upstream provided tarball
@ 2017-04-19 18:31 Baruch Siach
  2017-04-19 18:31 ` [Buildroot] [PATCH 2/3] netsniff-ng: fix static build with netfilter_conntrack Baruch Siach
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Baruch Siach @ 2017-04-19 18:31 UTC (permalink / raw)
  To: buildroot

Cc: Joris Lijssens <joris.lijssens@gmail.com>
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
---
 package/netsniff-ng/netsniff-ng.hash | 4 ++--
 package/netsniff-ng/netsniff-ng.mk   | 5 +++--
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/package/netsniff-ng/netsniff-ng.hash b/package/netsniff-ng/netsniff-ng.hash
index 67b3331a92d9..79dc686174d7 100644
--- a/package/netsniff-ng/netsniff-ng.hash
+++ b/package/netsniff-ng/netsniff-ng.hash
@@ -1,2 +1,2 @@
-# Locally calculated
-sha256 62e8aa970a4f46cdaddf54daf8ea26e7ae9f9f358efaf0651799c8c4e937c286 netsniff-ng-v0.6.2.tar.gz
+# Locally calculated after checking signature
+sha256 4f2f7afc96b5044b5ccd3b671d0c3b8cb166bfa7f1063cea6c2d5e0fd5a13cf5 netsniff-ng-0.6.2.tar.xz
diff --git a/package/netsniff-ng/netsniff-ng.mk b/package/netsniff-ng/netsniff-ng.mk
index 1a4017e76dba..5d5974731d00 100644
--- a/package/netsniff-ng/netsniff-ng.mk
+++ b/package/netsniff-ng/netsniff-ng.mk
@@ -4,8 +4,9 @@
 #
 ################################################################################
 
-NETSNIFF_NG_VERSION = v0.6.2
-NETSNIFF_NG_SITE = $(call github,netsniff-ng,netsniff-ng,$(NETSNIFF_NG_VERSION))
+NETSNIFF_NG_VERSION = 0.6.2
+NETSNIFF_NG_SITE = http://pub.netsniff-ng.org/netsniff-ng
+NETSNIFF_NG_SOURCE = netsniff-ng-$(NETSNIFF_NG_VERSION).tar.xz
 NETSNIFF_NG_LICENSE = GPL-2.0
 NETSNIFF_NG_LICENSE_FILES = README COPYING
 # Prevent netsniff-ng configure script from finding a host installed nacl
-- 
2.11.0

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

* [Buildroot] [PATCH 2/3] netsniff-ng: fix static build with netfilter_conntrack
  2017-04-19 18:31 [Buildroot] [PATCH 1/3] netsniff-ng: use upstream provided tarball Baruch Siach
@ 2017-04-19 18:31 ` Baruch Siach
  2017-04-19 18:31 ` [Buildroot] [PATCH 3/3] netsniff-ng: bump to version 0.6.3 Baruch Siach
  2017-04-20 21:31 ` [Buildroot] [PATCH 1/3] netsniff-ng: use upstream provided tarball Thomas Petazzoni
  2 siblings, 0 replies; 4+ messages in thread
From: Baruch Siach @ 2017-04-19 18:31 UTC (permalink / raw)
  To: buildroot

Use pkg-config to determine link flags.

Fixes:
http://autobuild.buildroot.net/results/0ef/0efb90d69fdffafe0630e6507d40198bfb1c5818/
http://autobuild.buildroot.net/results/0ea/0eaf15dd387961641b42d977c49804fe8872074b/
http://autobuild.buildroot.net/results/43d/43d3f2d54deb9d095a4f8cbf70a7b933c09ed618/

Cc: Joris Lijssens <joris.lijssens@gmail.com>
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
---
 ...e-PKG_CONFIG-into-account-for-libnetfilte.patch | 43 ++++++++++++++++++++++
 1 file changed, 43 insertions(+)
 create mode 100644 package/netsniff-ng/0002-flowtop-take-PKG_CONFIG-into-account-for-libnetfilte.patch

diff --git a/package/netsniff-ng/0002-flowtop-take-PKG_CONFIG-into-account-for-libnetfilte.patch b/package/netsniff-ng/0002-flowtop-take-PKG_CONFIG-into-account-for-libnetfilte.patch
new file mode 100644
index 000000000000..bd7619ba7af0
--- /dev/null
+++ b/package/netsniff-ng/0002-flowtop-take-PKG_CONFIG-into-account-for-libnetfilte.patch
@@ -0,0 +1,43 @@
+From 2d38d16d86db941fcb4d4fb8ad761e7e163c01e5 Mon Sep 17 00:00:00 2001
+From: Baruch Siach <baruch@tkos.co.il>
+Date: Sun, 16 Apr 2017 07:41:38 +0300
+Subject: [PATCH] flowtop: take PKG_CONFIG into account for
+ libnetfilter_conntrack
+
+Use $PKG_CONFIG to determine the linker flags for libnetfilter_conntrack. This
+fixes static link failure like the following:
+
+  LD	flowtop
+.../usr/x86_64-buildroot-linux-musl/sysroot/usr/lib/../lib64/libnetfilter_conntrack.a(main.o): In function `nfct_open_nfnl':
+main.c:(.text+0x52): undefined reference to `nfnl_subsys_open'
+main.c:(.text+0x69): undefined reference to `nfnl_subsys_close'
+main.c:(.text+0x87): undefined reference to `nfnl_subsys_open'
+main.c:(.text+0xa3): undefined reference to `nfnl_subsys_close'
+.../usr/x86_64-buildroot-linux-musl/sysroot/usr/lib/../lib64/libnetfilter_conntrack.a(main.o): In function `nfct_open':
+main.c:(.text+0xc9): undefined reference to `nfnl_open'
+main.c:(.text+0xf0): undefined reference to `nfnl_close'
+...
+
+Signed-off-by: Baruch Siach <baruch@tkos.co.il>
+---
+
+Patch status: sent upstream
+http://www.mail-archive.com/netsniff-ng%40googlegroups.com/msg01971.html
+
+ flowtop/Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/flowtop/Makefile b/flowtop/Makefile
+index effe7eb33fc3..e001ce8aaf13 100644
+--- a/flowtop/Makefile
++++ b/flowtop/Makefile
+@@ -1,5 +1,5 @@
+ flowtop-libs =	-lurcu \
+-		-lnetfilter_conntrack \
++		$(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(PKG_CONFIG) --libs libnetfilter_conntrack 2> /dev/null ) \
+ 		$(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(PKG_CONFIG) --libs ncurses 2> /dev/null \
+ 			|| echo '-lncurses') \
+ 		$(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(PKG_CONFIG) --libs tinfo 2> /dev/null ) \
+-- 
+2.11.0
+
-- 
2.11.0

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

* [Buildroot] [PATCH 3/3] netsniff-ng: bump to version 0.6.3
  2017-04-19 18:31 [Buildroot] [PATCH 1/3] netsniff-ng: use upstream provided tarball Baruch Siach
  2017-04-19 18:31 ` [Buildroot] [PATCH 2/3] netsniff-ng: fix static build with netfilter_conntrack Baruch Siach
@ 2017-04-19 18:31 ` Baruch Siach
  2017-04-20 21:31 ` [Buildroot] [PATCH 1/3] netsniff-ng: use upstream provided tarball Thomas Petazzoni
  2 siblings, 0 replies; 4+ messages in thread
From: Baruch Siach @ 2017-04-19 18:31 UTC (permalink / raw)
  To: buildroot

Drop upstream patch.

Add two more patches to deal with musl build issues.

Cc: Joris Lijssens <joris.lijssens@gmail.com>
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
---
 ...-PKG_CONFIG-into-account-for-libnetfilte.patch} |  0
 ...-nlmsg-Drop-dissection-of-GENL_ID_GENERAT.patch | 48 -----------------
 .../0002-proc.h-add-missing-headers.patch          | 44 +++++++++++++++
 ...ix-if_arp.h-musl-libc-kernel-headers-conf.patch | 62 ++++++++++++++++++++++
 package/netsniff-ng/netsniff-ng.hash               |  2 +-
 package/netsniff-ng/netsniff-ng.mk                 |  2 +-
 6 files changed, 108 insertions(+), 50 deletions(-)
 rename package/netsniff-ng/{0002-flowtop-take-PKG_CONFIG-into-account-for-libnetfilte.patch => 0001-flowtop-take-PKG_CONFIG-into-account-for-libnetfilte.patch} (100%)
 delete mode 100644 package/netsniff-ng/0001-netsniff-ng-nlmsg-Drop-dissection-of-GENL_ID_GENERAT.patch
 create mode 100644 package/netsniff-ng/0002-proc.h-add-missing-headers.patch
 create mode 100644 package/netsniff-ng/0003-pcap_io.h-fix-if_arp.h-musl-libc-kernel-headers-conf.patch

diff --git a/package/netsniff-ng/0002-flowtop-take-PKG_CONFIG-into-account-for-libnetfilte.patch b/package/netsniff-ng/0001-flowtop-take-PKG_CONFIG-into-account-for-libnetfilte.patch
similarity index 100%
rename from package/netsniff-ng/0002-flowtop-take-PKG_CONFIG-into-account-for-libnetfilte.patch
rename to package/netsniff-ng/0001-flowtop-take-PKG_CONFIG-into-account-for-libnetfilte.patch
diff --git a/package/netsniff-ng/0001-netsniff-ng-nlmsg-Drop-dissection-of-GENL_ID_GENERAT.patch b/package/netsniff-ng/0001-netsniff-ng-nlmsg-Drop-dissection-of-GENL_ID_GENERAT.patch
deleted file mode 100644
index 4ccf9d643c16..000000000000
--- a/package/netsniff-ng/0001-netsniff-ng-nlmsg-Drop-dissection-of-GENL_ID_GENERAT.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-From 88ec2ad37cabb3d3b7ca0e8e5ea3d682c083618d Mon Sep 17 00:00:00 2001
-From: Tobias Klauser <tklauser@distanz.ch>
-Date: Mon, 6 Mar 2017 12:22:57 +0100
-Subject: [PATCH] netsniff-ng: nlmsg: Drop dissection of GENL_ID_GENERATE type
-
-After kernel commit a07ea4d9941a ("genetlink: no longer support using
-static family IDs"), GENL_ID_GENERATE is no longer exposed to userspace
-(and actually should never have been). Change the genl nlmsg dissector
-to only consider the nlctrl family and the two other static family IDs
-needed for workarounds. All other family IDs are considered dynamically
-generated.
-
-Fixes #171
-Reported-by: Jaroslav ?karvada <jskarvad@redhat.com>
-Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
-Signed-off-by: Baruch Siach <baruch@tkos.co.il>
----
-Patch status: upstream commit 88ec2ad37cabb
-
- proto_nlmsg.c | 12 +++++++++---
- 1 file changed, 9 insertions(+), 3 deletions(-)
-
-diff --git a/proto_nlmsg.c b/proto_nlmsg.c
-index f8993e794a54..f2064059be08 100644
---- a/proto_nlmsg.c
-+++ b/proto_nlmsg.c
-@@ -242,9 +242,15 @@ static const char *nlmsg_rtnl_type2str(uint16_t type)
- static const char *nlmsg_genl_type2str(uint16_t type)
- {
- 	switch (type) {
--	case GENL_ID_GENERATE:	return "id gen";
--	case GENL_ID_CTRL:	return "id ctrl";
--	default:		return NULL;
-+	case GENL_ID_CTRL:	return "nlctrl";
-+#if defined(GENL_ID_PCMRAID)
-+	case GENL_ID_PCMRAID:	return "pcmraid";
-+#endif
-+#if defined(GENL_ID_VFS_DQUOT)
-+	case GENL_ID_VFS_DQUOT:	return "vfs dquot";
-+#endif
-+	/* only dynamic family IDs should be used starting with Linux 4.10 */
-+	default:		return "dynamic";
- 	}
- }
- 
--- 
-2.11.0
-
diff --git a/package/netsniff-ng/0002-proc.h-add-missing-headers.patch b/package/netsniff-ng/0002-proc.h-add-missing-headers.patch
new file mode 100644
index 000000000000..696844565947
--- /dev/null
+++ b/package/netsniff-ng/0002-proc.h-add-missing-headers.patch
@@ -0,0 +1,44 @@
+From 28773ac06d0e0f00d6a56973eacae4f5df9e8cc2 Mon Sep 17 00:00:00 2001
+From: Baruch Siach <baruch@tkos.co.il>
+Date: Sun, 16 Apr 2017 08:11:20 +0300
+Subject: [PATCH] proc.h: add missing headers
+
+ino_t and pid_t require stat.h and types.h, respectively. Fixes the following
+build failure with musl libc:
+
+In file included from cpp.c:7:0:
+proc.h:11:31: error: unknown type name ?ino_t?
+ extern int proc_find_by_inode(ino_t ino, char *cmdline, size_t len, pid_t *pid);
+                               ^
+proc.h:11:69: error: unknown type name ?pid_t?
+ extern int proc_find_by_inode(ino_t ino, char *cmdline, size_t len, pid_t *pid);
+                                                                     ^
+proc.h:12:25: error: unknown type name ?pid_t?
+ extern bool proc_exists(pid_t pid);
+                         ^
+
+Signed-off-by: Baruch Siach <baruch@tkos.co.il>
+---
+
+Patch status: sent upstream
+http://www.mail-archive.com/netsniff-ng%40googlegroups.com/msg01972.html
+
+ proc.h | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/proc.h b/proc.h
+index 4c34a6412a81..2ce0c6e7a932 100644
+--- a/proc.h
++++ b/proc.h
+@@ -2,6 +2,8 @@
+ #define PROC_H
+ 
+ #include <stdbool.h>
++#include <sys/stat.h>
++#include <sys/types.h>
+ 
+ extern void cpu_affinity(int cpu);
+ extern int set_proc_prio(int prio);
+-- 
+2.11.0
+
diff --git a/package/netsniff-ng/0003-pcap_io.h-fix-if_arp.h-musl-libc-kernel-headers-conf.patch b/package/netsniff-ng/0003-pcap_io.h-fix-if_arp.h-musl-libc-kernel-headers-conf.patch
new file mode 100644
index 000000000000..23b02848e235
--- /dev/null
+++ b/package/netsniff-ng/0003-pcap_io.h-fix-if_arp.h-musl-libc-kernel-headers-conf.patch
@@ -0,0 +1,62 @@
+From f937049ea82ac74635861b3a780d1372f681cc6b Mon Sep 17 00:00:00 2001
+From: Baruch Siach <baruch@tkos.co.il>
+Date: Sun, 16 Apr 2017 08:18:10 +0300
+Subject: [PATCH] pcap_io.h: fix if_arp.h musl libc/kernel headers conflict
+
+Use libc provided arp definitions to avoid build failure with musl libc:
+
+In file included from pcap_io.h:19:0,
+                 from trafgen.c:59:
+.../usr/x86_64-buildroot-linux-musl/sysroot/usr/include/linux/if_arp.h:113:8: error: redefinition of ?struct arpreq?
+ struct arpreq {
+        ^
+In file included from .../usr/x86_64-buildroot-linux-musl/sysroot/usr/include/netinet/if_ether.h:111:0,
+                 from .../usr/x86_64-buildroot-linux-musl/sysroot/usr/include/net/ethernet.h:10,
+                 from trafgen.c:23:
+.../usr/x86_64-buildroot-linux-musl/sysroot/usr/include/net/if_arp.h:99:8: note: originally defined here
+ struct arpreq {
+        ^
+
+Add a local definition of the ARPHRD_CAN macro that glibc does not provide.
+
+Signed-off-by: Baruch Siach <baruch@tkos.co.il>
+---
+
+Patch status: sent upstream
+http://www.mail-archive.com/netsniff-ng%40googlegroups.com/msg01974.html
+
+ built_in.h | 4 ++++
+ pcap_io.h  | 2 +-
+ 2 files changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/built_in.h b/built_in.h
+index d10579abd689..fa8af60d6029 100644
+--- a/built_in.h
++++ b/built_in.h
+@@ -382,6 +382,10 @@ static inline u64 cpu_to_le64(u64 val)
+ # define PACKET_QDISC_BYPASS 20
+ #endif
+ 
++#ifndef ARPHRD_CAN
++# define ARPHRD_CAN			280
++#endif
++
+ #ifndef ARPHRD_IEEE802154_MONITOR
+ # define ARPHRD_IEEE802154_MONITOR	805
+ #endif
+diff --git a/pcap_io.h b/pcap_io.h
+index 3d70b217ada6..088858e89ccd 100644
+--- a/pcap_io.h
++++ b/pcap_io.h
+@@ -16,7 +16,7 @@
+ #include <sys/socket.h>
+ #include <linux/if.h>
+ #include <linux/if_packet.h>
+-#include <linux/if_arp.h>
++#include <net/if_arp.h>
+ 
+ #include "built_in.h"
+ #include "die.h"
+-- 
+2.11.0
+
diff --git a/package/netsniff-ng/netsniff-ng.hash b/package/netsniff-ng/netsniff-ng.hash
index 79dc686174d7..fea2dada1463 100644
--- a/package/netsniff-ng/netsniff-ng.hash
+++ b/package/netsniff-ng/netsniff-ng.hash
@@ -1,2 +1,2 @@
 # Locally calculated after checking signature
-sha256 4f2f7afc96b5044b5ccd3b671d0c3b8cb166bfa7f1063cea6c2d5e0fd5a13cf5 netsniff-ng-0.6.2.tar.xz
+sha256 f8e0094f77de8a70f91240bfa77137d5631ac48138cb29fcf962c0bcbe81f04a netsniff-ng-0.6.3.tar.xz
diff --git a/package/netsniff-ng/netsniff-ng.mk b/package/netsniff-ng/netsniff-ng.mk
index 5d5974731d00..73c840cf0fa1 100644
--- a/package/netsniff-ng/netsniff-ng.mk
+++ b/package/netsniff-ng/netsniff-ng.mk
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-NETSNIFF_NG_VERSION = 0.6.2
+NETSNIFF_NG_VERSION = 0.6.3
 NETSNIFF_NG_SITE = http://pub.netsniff-ng.org/netsniff-ng
 NETSNIFF_NG_SOURCE = netsniff-ng-$(NETSNIFF_NG_VERSION).tar.xz
 NETSNIFF_NG_LICENSE = GPL-2.0
-- 
2.11.0

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

* [Buildroot] [PATCH 1/3] netsniff-ng: use upstream provided tarball
  2017-04-19 18:31 [Buildroot] [PATCH 1/3] netsniff-ng: use upstream provided tarball Baruch Siach
  2017-04-19 18:31 ` [Buildroot] [PATCH 2/3] netsniff-ng: fix static build with netfilter_conntrack Baruch Siach
  2017-04-19 18:31 ` [Buildroot] [PATCH 3/3] netsniff-ng: bump to version 0.6.3 Baruch Siach
@ 2017-04-20 21:31 ` Thomas Petazzoni
  2 siblings, 0 replies; 4+ messages in thread
From: Thomas Petazzoni @ 2017-04-20 21:31 UTC (permalink / raw)
  To: buildroot

Hello,

On Wed, 19 Apr 2017 21:31:45 +0300, Baruch Siach wrote:
> Cc: Joris Lijssens <joris.lijssens@gmail.com>
> Signed-off-by: Baruch Siach <baruch@tkos.co.il>
> ---
>  package/netsniff-ng/netsniff-ng.hash | 4 ++--
>  package/netsniff-ng/netsniff-ng.mk   | 5 +++--
>  2 files changed, 5 insertions(+), 4 deletions(-)

Series applied. Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

end of thread, other threads:[~2017-04-20 21:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-19 18:31 [Buildroot] [PATCH 1/3] netsniff-ng: use upstream provided tarball Baruch Siach
2017-04-19 18:31 ` [Buildroot] [PATCH 2/3] netsniff-ng: fix static build with netfilter_conntrack Baruch Siach
2017-04-19 18:31 ` [Buildroot] [PATCH 3/3] netsniff-ng: bump to version 0.6.3 Baruch Siach
2017-04-20 21:31 ` [Buildroot] [PATCH 1/3] netsniff-ng: use upstream provided tarball Thomas Petazzoni

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.