Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/kismet: bump version to 2020-09-R2
@ 2020-09-18 17:59 Francois Gervais
  2020-09-19 12:21 ` Thomas Petazzoni
  0 siblings, 1 reply; 5+ messages in thread
From: Francois Gervais @ 2020-09-18 17:59 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Francois Gervais <fgervais@distech-controls.com>
---
 package/kismet/0001-ncurses.patch             | 11 ----
 package/kismet/0002-nobsd.patch               | 44 ----------------
 .../0003-fix-curses-libs-ordering.patch       | 44 ----------------
 .../kismet/0004-no-include-host-paths.patch   | 25 ---------
 ...don-t-include-linux-if_tun.h-kernel-.patch | 51 -------------------
 package/kismet/Config.in                      | 13 ++---
 package/kismet/kismet.hash                    |  2 +-
 package/kismet/kismet.mk                      | 30 +++++++----
 8 files changed, 28 insertions(+), 192 deletions(-)
 delete mode 100644 package/kismet/0001-ncurses.patch
 delete mode 100644 package/kismet/0002-nobsd.patch
 delete mode 100644 package/kismet/0003-fix-curses-libs-ordering.patch
 delete mode 100644 package/kismet/0004-no-include-host-paths.patch
 delete mode 100644 package/kismet/0005-dumpfile_tuntap-don-t-include-linux-if_tun.h-kernel-.patch

diff --git a/package/kismet/0001-ncurses.patch b/package/kismet/0001-ncurses.patch
deleted file mode 100644
index af8fba52b7..0000000000
--- a/package/kismet/0001-ncurses.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- kismet-2009-06-R1/configure	2009-06-12 04:26:32.000000000 +0100
-+++ kismet-2009-06-R1.mod/configure	2009-08-05 11:27:43.000000000 +0100
-@@ -6981,7 +6981,7 @@
- 
- 
- # Add additional cflags since some distros bury panel.h
--CPPFLAGS="$CPPFLAGS -I/usr/include/ncurses"
-+#CPPFLAGS="$CPPFLAGS -I/usr/include/ncurses"
- 
- termcontrol="none";
- 
diff --git a/package/kismet/0002-nobsd.patch b/package/kismet/0002-nobsd.patch
deleted file mode 100644
index 451d9ce4a1..0000000000
--- a/package/kismet/0002-nobsd.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-diff -Nura kismet-2009-06-R1/ifcontrol.cc kismet-2009-06-R1-nobsd/ifcontrol.cc
---- kismet-2009-06-R1/ifcontrol.cc	2009-04-08 16:57:44.000000000 -0300
-+++ kismet-2009-06-R1-nobsd/ifcontrol.cc	2009-09-01 12:54:44.000000000 -0300
-@@ -148,7 +148,7 @@
- 	devlinklen = readlink(devlink.c_str(), devlinktarget, 511);
- 	if (devlinklen > 0) {
- 		devlinktarget[devlinklen] = '\0';
--		rind = rindex(devlinktarget, '/');
-+		rind = strrchr(devlinktarget, '/');
- 		// If we found it and not at the end of the line
- 		if (rind != NULL && (rind - devlinktarget) + 1 < devlinklen)
- 			return string(rind + 1);
-diff -Nura kismet-2009-06-R1/iwcontrol.cc kismet-2009-06-R1-nobsd/iwcontrol.cc
---- kismet-2009-06-R1/iwcontrol.cc	2009-04-20 00:22:55.000000000 -0300
-+++ kismet-2009-06-R1-nobsd/iwcontrol.cc	2009-09-01 12:54:44.000000000 -0300
-@@ -697,7 +697,7 @@
- 		return -1;
- 	}
- 
--	bzero(buffer, sizeof(buffer));
-+	memset(buffer, 0, sizeof(buffer));
- 
- 	memset(&wrq, 0, sizeof(struct iwreq));
- 
-@@ -732,7 +732,7 @@
- 		memcpy((char *) &range, buffer, sizeof(iw_range));
- 	} else {
- 		/* Zero unknown fields */
--		bzero((char *) &range, sizeof(struct iw_range));
-+		memset((char *) &range, 0, sizeof(struct iw_range));
- 
- 		/* Initial part unmoved */
- 		memcpy((char *) &range, buffer, iwr15_off(num_channels));
-diff -Nura kismet-2009-06-R1/madwifing_control.cc kismet-2009-06-R1-nobsd/madwifing_control.cc
---- kismet-2009-06-R1/madwifing_control.cc	2009-03-22 23:19:19.000000000 -0300
-+++ kismet-2009-06-R1-nobsd/madwifing_control.cc	2009-09-01 12:54:42.000000000 -0300
-@@ -34,7 +34,6 @@
- #include <stdint.h>
- #include <ctype.h>
- #include <getopt.h>
--#include <err.h>
- #include <dirent.h>
- #include <fcntl.h>
- #include <errno.h>
diff --git a/package/kismet/0003-fix-curses-libs-ordering.patch b/package/kismet/0003-fix-curses-libs-ordering.patch
deleted file mode 100644
index 8d2b911404..0000000000
--- a/package/kismet/0003-fix-curses-libs-ordering.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-configure: fix ordering of ncurses libraries
-
-Says Vicente:
-    [T]he order is very important when doing static builds.
-    Otherwise we will see errors like this one:
-
-    [...]/sysroot/usr/lib/libpanel.a(p_delete.o):
-    In function `del_panel':
-    p_delete.c:(.text+0x68): undefined reference to `_nc_panelhook'
-
-Fix the order configure adds libraries: new libraries should be added
-at the *front* of the list, not at the end.
-
-Reported-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
-Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
-Cc: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
-[bernd.kuhls at t-online.de: update for 2016-07-R1]
-Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
-
-diff -durN kismet-Kismet-2014-02-R1.orig/configure.in kismet-Kismet-2014-02-R1/configure.in
---- kismet-Kismet-2014-02-R1.orig/configure.ac	2014-02-19 05:37:43.000000000 +0100
-+++ kismet-Kismet-2014-02-R1/configure.ac	2014-12-26 16:46:55.770692349 +0100
-@@ -437,10 +434,10 @@
- 		AC_MSG_ERROR(Failed to find curses.h or ncurses.h.  You probably need to install the curses-devel package from your distribution)
- 	fi
- 
--	LIBS="$LIBS $curseaux"
-+	LIBS="$curseaux $LIBS"
- 	AC_CHECK_LIB([panel], [new_panel],
- 				 AC_DEFINE(HAVE_LIBPANEL, 1, Panel terminal lib)
--				 curseaux="$curseaux -lpanel",
-+				 curseaux="-lpanel $curseaux",
- 				 AC_MSG_ERROR(Failed to find libpanel extension to curses/ncurses.  Install it, or disable building the Kismet client with --disable-client.  Disabling the client is probably not something you want to do normally.))
- 
- 	AC_CHECK_HEADER([panel.h], [foundhpanel=yes])
-@@ -450,7 +447,7 @@
- 
- 	LIBS="$OLIBS"
- 
--	CLIENTCLIBS="$CLIENTCLIBS $curseaux"
-+	CLIENTCLIBS="$curseaux $CLIENTCLIBS"
- fi
- 
- AC_SUBST(CLIBS)
diff --git a/package/kismet/0004-no-include-host-paths.patch b/package/kismet/0004-no-include-host-paths.patch
deleted file mode 100644
index 6819bf425e..0000000000
--- a/package/kismet/0004-no-include-host-paths.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-configure: do not hard-code host paths
-
-configure hard-codes include dirs to contain /usr/include/ncurses.
-Needless to say this does not work well for cross-compilation.
-
-Remove that directory from the include search dirs.
-
-Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
-Cc: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
-[bernd.kuhls at t-online.de: update for 2016-07-R1]
-Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
-
-diff -durN kismet-Kismet-2014-02-R1.orig/configure.in kismet-Kismet-2014-02-R1/configure.in
---- kismet-Kismet-2014-02-R1.orig/configure.ac	2014-02-19 05:37:43.000000000 +0100
-+++ kismet-Kismet-2014-02-R1/configure.ac	2014-12-26 16:46:55.770692349 +0100
-@@ -406,9 +406,6 @@
- )
- AC_SUBST(wantclient)
- 
--# Add additional cflags since some distros bury panel.h
--CPPFLAGS="$CPPFLAGS -I/usr/include/ncurses"
--
- termcontrol="none";
- 
- if test "$wantclient" = "yes"; then
diff --git a/package/kismet/0005-dumpfile_tuntap-don-t-include-linux-if_tun.h-kernel-.patch b/package/kismet/0005-dumpfile_tuntap-don-t-include-linux-if_tun.h-kernel-.patch
deleted file mode 100644
index be694345d2..0000000000
--- a/package/kismet/0005-dumpfile_tuntap-don-t-include-linux-if_tun.h-kernel-.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-From 1466cbbdef835634366b2eb3a284fdff5833338c Mon Sep 17 00:00:00 2001
-From: Romain Naour <romain.naour@gmail.com>
-Date: Fri, 19 Aug 2016 23:30:06 +0200
-Subject: [PATCH] dumpfile_tuntap: don't include linux/if_tun.h kernel header
-
-dumpfile_tuntap.h mixes userspace and kernel headers.
-
-As suggested in the musl wiki [1], remove the linux/include directives
-and copy the required definitions.
-
-[1] http://wiki.musl-libc.org/wiki/FAQ
-
-Signed-off-by: Romain Naour <romain.naour@gmail.com>
----
- dumpfile_tuntap.h | 17 +++++++++--------
- 1 file changed, 9 insertions(+), 8 deletions(-)
-
-diff --git a/dumpfile_tuntap.h b/dumpfile_tuntap.h
-index 37f50b6..8b23a2a 100644
---- a/dumpfile_tuntap.h
-+++ b/dumpfile_tuntap.h
-@@ -64,17 +64,18 @@
- #include "packetchain.h"
- #include "dumpfile.h"
- 
--#ifdef SYS_LINUX 
--#include <linux/if_tun.h>
-+#ifdef SYS_LINUX
-+/* TUNSETIFF ifr flags */
-+#define IFF_TUN		0x0001
-+#define IFF_TAP		0x0002
-+#define IFF_NO_PI	0x1000
- 
- // Linux IEEE80211 link typ to set
- #define LNX_LINKTYPE_80211		801
--// If the system headers don't have the TUNSETLINK ioctl, define it here,
--// and we'll figure it out at runtime
--#ifndef TUNSETLINK
--#define TUNSETLINK				_IOW('T', 205, int)
--#endif
--
-+/* Ioctl defines */
-+#define TUNSETNOCSUM	_IOW('T', 200, int)
-+#define TUNSETIFF		_IOW('T', 202, int)
-+#define TUNSETLINK		_IOW('T', 205, int)
- #endif
- 
- struct ipc_dft_open {
--- 
-2.5.5
-
diff --git a/package/kismet/Config.in b/package/kismet/Config.in
index ab91c0e6fb..9e51356e79 100644
--- a/package/kismet/Config.in
+++ b/package/kismet/Config.in
@@ -12,6 +12,10 @@ config BR2_PACKAGE_KISMET
 	select BR2_PACKAGE_NCURSES
 	select BR2_PACKAGE_LIBPCAP
 	select BR2_PACKAGE_LIBNL
+	select BR2_PACKAGE_LIBMICROHTTPD
+	select BR2_PACKAGE_SQLITE
+	select BR2_PACKAGE_PROTOBUF
+	select BR2_PACKAGE_PROTOBUF_C
 	help
 	  Kismet - 802.11 layer2 wireless network detector, sniffer,
 	  and intrusion detection system.
@@ -29,14 +33,11 @@ config BR2_PACKAGE_KISMET
 
 if BR2_PACKAGE_KISMET
 
-config BR2_PACKAGE_KISMET_CLIENT
-	bool "Install client"
-
-config BR2_PACKAGE_KISMET_DRONE
-	bool "Install drone"
-
 config BR2_PACKAGE_KISMET_SERVER
 	bool "Install server"
 	default y
 
+config BR2_PACKAGE_KISMET_REMOTE_CAPTURE
+	bool "Install remote capture"
+
 endif
diff --git a/package/kismet/kismet.hash b/package/kismet/kismet.hash
index 30780b1cc3..676f4304b1 100644
--- a/package/kismet/kismet.hash
+++ b/package/kismet/kismet.hash
@@ -1,3 +1,3 @@
 # Locally computed
-sha256  bdb21f153311f1ff3b16621bf0d6740f66369bf0982b0a289c9a12af8847e237  kismet-2016-07-R1.tar.xz
+sha256  ef737fb4801c1d258e575893627625612ac043161a5660d1b30b14879f36ded8  kismet-2020-09-R2.tar.xz
 sha256  92b9eae679d8efbcd7514f7ff1346e4c1d42d272cd10bcb724d1511d35e28cd1  debian/copyright
diff --git a/package/kismet/kismet.mk b/package/kismet/kismet.mk
index d3946d65f3..6b88958791 100644
--- a/package/kismet/kismet.mk
+++ b/package/kismet/kismet.mk
@@ -4,10 +4,11 @@
 #
 ################################################################################
 
-KISMET_VERSION = 2016-07-R1
+KISMET_VERSION = 2020-09-R2
 KISMET_SOURCE = kismet-$(KISMET_VERSION).tar.xz
 KISMET_SITE = http://www.kismetwireless.net/code
-KISMET_DEPENDENCIES = host-pkgconf libpcap ncurses libnl
+KISMET_DEPENDENCIES = host-pkgconf libpcap ncurses libnl libmicrohttpd sqlite \
+					  protobuf protobuf-c
 KISMET_CONF_OPTS += --with-netlink-version=3
 KISMET_LICENSE = GPL-2.0+
 KISMET_LICENSE_FILES = debian/copyright
@@ -31,18 +32,26 @@ ifeq ($(BR2_PACKAGE_PCRE),y)
 KISMET_DEPENDENCIES += pcre
 endif
 
-ifeq ($(BR2_PACKAGE_KISMET_CLIENT),y)
-KISMET_TARGET_BINARIES += kismet_client
-endif
-
 ifeq ($(BR2_PACKAGE_KISMET_SERVER),y)
-KISMET_TARGET_BINARIES += kismet_server
+KISMET_TARGET_BINARIES += kismet
 KISMET_TARGET_CONFIGS += kismet.conf
+KISMET_TARGET_CONFIGS += kismet_80211.conf
+KISMET_TARGET_CONFIGS += kismet_alerts.conf
+KISMET_TARGET_CONFIGS += kismet_filter.conf
+KISMET_TARGET_CONFIGS += kismet_httpd.conf
+KISMET_TARGET_CONFIGS += kismet_logging.conf
+KISMET_TARGET_CONFIGS += kismet_memory.conf
+KISMET_TARGET_CONFIGS += kismet_uav.conf
+define KISMET_INSTALL_TARGET_HTTP_DATA
+	$(INSTALL) -d -m 0755 $(TARGET_DIR)/usr/share/kismet/httpd
+    cp -r $(KISMET_DIR)/http_data/* $(TARGET_DIR)/usr/share/kismet/httpd
+endef
 endif
 
-ifeq ($(BR2_PACKAGE_KISMET_DRONE),y)
-KISMET_TARGET_BINARIES += kismet_drone
-KISMET_TARGET_CONFIGS += kismet_drone.conf
+ifeq ($(BR2_PACKAGE_KISMET_REMOTE_CAPTURE),y)
+KISMET_TARGET_BINARIES += kismet_cap_pcapfile
+KISMET_TARGET_BINARIES += capture_linux_wifi/kismet_cap_linux_wifi
+KISMET_TARGET_BINARIES += capture_linux_bluetooth/kismet_cap_linux_bluetooth
 endif
 
 ifdef KISMET_TARGET_BINARIES
@@ -60,6 +69,7 @@ endif
 define KISMET_INSTALL_TARGET_CMDS
 	$(KISMET_INSTALL_TARGET_BINARIES)
 	$(KISMET_INSTALL_TARGET_CONFIGS)
+	$(KISMET_INSTALL_TARGET_HTTP_DATA)
 endef
 
 $(eval $(autotools-package))
-- 
2.17.1

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

* [Buildroot] [PATCH 1/1] package/kismet: bump version to 2020-09-R2
  2020-09-18 17:59 [Buildroot] [PATCH 1/1] package/kismet: bump version to 2020-09-R2 Francois Gervais
@ 2020-09-19 12:21 ` Thomas Petazzoni
  2020-09-19 17:42   ` Gervais, Francois
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas Petazzoni @ 2020-09-19 12:21 UTC (permalink / raw)
  To: buildroot

Hello Fran?ois,

On Fri, 18 Sep 2020 13:59:53 -0400
Francois Gervais via buildroot <buildroot@busybox.net> wrote:

> Signed-off-by: Francois Gervais <fgervais@distech-controls.com>

Thanks for this patch! It turns out that today, Fabrice Fontaine has
also sent a patch also bumping the kismet package.

However, your changes are quite radically different. Could you
synchronize, compare your changes, and propose a common solution ?

Fabrice: in your patch, it would at least be nice to split the addition
of python tools support into a separate patch, i.e the first patch
should have an unconditional --disable-python-tools, with the second
patch adding the option to enable python tools.

Thanks,

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

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

* [Buildroot] [PATCH 1/1] package/kismet: bump version to 2020-09-R2
  2020-09-19 12:21 ` Thomas Petazzoni
@ 2020-09-19 17:42   ` Gervais, Francois
  2020-09-19 19:59     ` Thomas Petazzoni
  0 siblings, 1 reply; 5+ messages in thread
From: Gervais, Francois @ 2020-09-19 17:42 UTC (permalink / raw)
  To: buildroot

From what I can see, Fabrice seems to have the better patch.
I'll give it a try on monday, see if it works on my end and report here.

From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Sent: September 19, 2020 8:21 AM
To: Gervais, Francois <FGervais@distech-controls.com>
Cc: buildroot at buildroot.org <buildroot@buildroot.org>; Fabrice Fontaine <fontaine.fabrice@gmail.com>
Subject: Re: [Buildroot] [PATCH 1/1] package/kismet: bump version to 2020-09-R2 
?
Hello Fran?ois,

On Fri, 18 Sep 2020 13:59:53 -0400
Francois Gervais via buildroot <buildroot@busybox.net> wrote:

> Signed-off-by: Francois Gervais <fgervais@distech-controls.com>

Thanks for this patch! It turns out that today, Fabrice Fontaine has
also sent a patch also bumping the kismet package.

However, your changes are quite radically different. Could you
synchronize, compare your changes, and propose a common solution ?

Fabrice: in your patch, it would at least be nice to split the addition
of python tools support into a separate patch, i.e the first patch
should have an unconditional --disable-python-tools, with the second
patch adding the option to enable python tools.

Thanks,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://urldefense.com/v3/__https://bootlin.com__;!!Po4YltK3bPMkYw!j8Wm5n3iF1ibtKcxFpnIhX9UjwZJR2ivXQEarg2LQPSGTqBIcLGOFvW9fOgPqZWMbDNynRU$ 

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

* [Buildroot] [PATCH 1/1] package/kismet: bump version to 2020-09-R2
  2020-09-19 17:42   ` Gervais, Francois
@ 2020-09-19 19:59     ` Thomas Petazzoni
  2020-09-22 15:16       ` Gervais, Francois
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas Petazzoni @ 2020-09-19 19:59 UTC (permalink / raw)
  To: buildroot

Hello,

On Sat, 19 Sep 2020 17:42:13 +0000
"Gervais, Francois" <FGervais@distech-controls.com> wrote:

> From what I can see, Fabrice seems to have the better patch.
> I'll give it a try on monday, see if it works on my end and report here.

Well, your patch did contain a number of other changes that Fabrice's
version did not, so it would be good to compare them, and pick the best
of both :-)

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

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

* [Buildroot] [PATCH 1/1] package/kismet: bump version to 2020-09-R2
  2020-09-19 19:59     ` Thomas Petazzoni
@ 2020-09-22 15:16       ` Gervais, Francois
  0 siblings, 0 replies; 5+ messages in thread
From: Gervais, Francois @ 2020-09-22 15:16 UTC (permalink / raw)
  To: buildroot

I'm flattered that my patch could complement a patch from one of the top contributors but I must
say, I fail to see what.

I tried Fabrice's patch, first it works. So that's out of the way.

It also adds obsolete parameters to the Config.in.legacy which I forgot.

Like me it can install just the capture tools or the whole thing. His config layout is better though
as on my side you could disable everything so kismet would get built but nothing would get installed
which is kinda weird. In his case when you select kismet you'll get the capture tools, then you get the
option to install the server or not.

In my patch I would just build everything and do a partial install. In his case he actually uses a config
option to disable building things that won't get installed. Obviously better.

He also changes the installation so when you install the capture tools only they are setuid so you
don't have to run them as root. To me setuid seems unsecure but kismet has a clear message stating
that this is actually more secure so nothing to say here.

I cannot comment on the python tools though as my target doesn't have python so I didn't try them.

Did I miss something?


From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Sent: September 19, 2020 3:59 PM
To: Gervais, Francois <FGervais@distech-controls.com>
Cc: buildroot at buildroot.org <buildroot@buildroot.org>; Fabrice Fontaine <fontaine.fabrice@gmail.com>
Subject: Re: [Buildroot] [PATCH 1/1] package/kismet: bump version to 2020-09-R2 
?
Hello,

On Sat, 19 Sep 2020 17:42:13 +0000
"Gervais, Francois" <FGervais@distech-controls.com> wrote:

> From what I can see, Fabrice seems to have the better patch.
> I'll give it a try on monday, see if it works on my end and report here.

Well, your patch did contain a number of other changes that Fabrice's
version did not, so it would be good to compare them, and pick the best
of both :-)

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering

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

end of thread, other threads:[~2020-09-22 15:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-18 17:59 [Buildroot] [PATCH 1/1] package/kismet: bump version to 2020-09-R2 Francois Gervais
2020-09-19 12:21 ` Thomas Petazzoni
2020-09-19 17:42   ` Gervais, Francois
2020-09-19 19:59     ` Thomas Petazzoni
2020-09-22 15:16       ` Gervais, Francois

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox