unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#55827] [PATCH] gnu: Add kismet.
@ 2022-06-07  7:41 phodina via Guix-patches via
  2022-06-07  7:50 ` Maxime Devos
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: phodina via Guix-patches via @ 2022-06-07  7:41 UTC (permalink / raw)
  To: 55827


[-- Attachment #1.1: Type: text/plain, Size: 47 bytes --]

Hi,

this patch adds Kismet package.

----
Petr

[-- Attachment #1.2: Type: text/html, Size: 146 bytes --]

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-Add-kismet.patch --]
[-- Type: text/x-patch; name=0001-gnu-Add-kismet.patch, Size: 2956 bytes --]

From 65af6af99389899c53ea57d5d15548b7a2bf3014 Mon Sep 17 00:00:00 2001
From: Petr Hodina <phodina@protonmail.com>
Date: Tue, 7 Jun 2022 08:11:33 +0200
Subject: [PATCH] gnu: Add kismet.

* gnu/packages/networking.scm (kismet): New variable.

diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm
index bfa956149d..3e8d3e1a08 100644
--- a/gnu/packages/networking.scm
+++ b/gnu/packages/networking.scm
@@ -49,6 +49,7 @@
 ;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
 ;;; Copyright © 2022 Simon South <simon@simonsouth.net>
 ;;; Copyright © 2022 Pierre Langlois <pierre.langlois@gmx.com>
+;;; Copyright © 2022 Petr Hodina <phodina@protonmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -114,6 +115,7 @@ (define-module (gnu packages networking)
   #:use-module (gnu packages image)
   #:use-module (gnu packages libevent)
   #:use-module (gnu packages libidn)
+  #:use-module (gnu packages libusb)
   #:use-module (gnu packages linux)
   #:use-module (gnu packages lua)
   #:use-module (gnu packages kerberos)
@@ -129,6 +131,7 @@ (define-module (gnu packages networking)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages polkit)
   #:use-module (gnu packages pretty-print)
+  #:use-module (gnu packages protobuf)
   #:use-module (gnu packages pulseaudio)
   #:use-module (gnu packages python)
   #:use-module (gnu packages python-crypto)
@@ -547,6 +550,42 @@ (define-public python-pysctp
 SCTP-aware kernel (most are).")
     (license license:lgpl2.1+)))
 
+(define-public kismet
+  (package
+    (name "kismet")
+    (version "2022-02")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+	   (url "https://github.com/kismetwireless/kismet")
+	   (commit (string-append "kismet-" version "-R1"))))
+       (sha256
+        (base32
+         "01q86hrgpai433sc65dlnqy91qd26w5dwyp37adszqxfb6d2an1r"))))
+    (build-system gnu-build-system)
+    (arguments
+     (list
+       #:tests? #f                      ; no test suite
+       #:phases
+       #~(modify-phases %standard-phases
+         (add-after 'unpack 'fix-install
+		 (lambda* _
+		 (substitute* "Makefile.in"
+		 (("-o \\$\\(INSTUSR\\) -g \\$\\(SUIDGROUP\\)") "")
+		 (("-o \\$\\(INSTUSR\\) -g \\$\\(INSTGRP\\)") "")))))))
+    (home-page "https://www.kismetwireless.net/")
+	(native-inputs (list pkg-config python python-2 perl))
+	(inputs (list openssl libpcap libusb protobuf protobuf-c libwebsockets sqlite zlib))
+    (synopsis "Wireless network and device detector")
+    (description
+     "This package provides a wireless network and device detector, sniffer,
+wardriving tool, and WIDS (wireless intrusion detection) framework.  Kismet
+works with Wi-Fi interfaces, Bluetooth interfaces, some SDR
+(software defined radio) hardware like the RTLSDR, and other specialized
+capture hardware")
+    (license license:gpl2+)))
+
 (define-public knockd
   (package
     (name "knockd")
-- 
2.35.1


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

* [bug#55827] [PATCH] gnu: Add kismet.
  2022-06-07  7:41 [bug#55827] [PATCH] gnu: Add kismet phodina via Guix-patches via
@ 2022-06-07  7:50 ` Maxime Devos
  2022-06-07  8:06 ` Maxime Devos
  2022-06-10 15:30 ` [bug#55827] " Maxime Devos
  2 siblings, 0 replies; 8+ messages in thread
From: Maxime Devos @ 2022-06-07  7:50 UTC (permalink / raw)
  To: phodina, 55827

[-- Attachment #1: Type: text/plain, Size: 330 bytes --]

phodina via Guix-patches via schreef op di 07-06-2022 om 07:41 [+0000]:
> +	   (url "https://github.com/kismetwireless/kismet")

According  to <https://www.kismetwireless.net/downloads/#kismet-git>,
the main location is https://www.kismetwireless.net/git/kismet.git, the
other one is only a mirror.

Greetings,
Maxime.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

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

* [bug#55827] [PATCH] gnu: Add kismet.
  2022-06-07  7:41 [bug#55827] [PATCH] gnu: Add kismet phodina via Guix-patches via
  2022-06-07  7:50 ` Maxime Devos
@ 2022-06-07  8:06 ` Maxime Devos
  2022-06-07  9:57   ` [bug#55827] [PATCH v2] " phodina via Guix-patches via
  2022-06-10 15:30 ` [bug#55827] " Maxime Devos
  2 siblings, 1 reply; 8+ messages in thread
From: Maxime Devos @ 2022-06-07  8:06 UTC (permalink / raw)
  To: phodina, 55827

[-- Attachment #1: Type: text/plain, Size: 778 bytes --]

phodina via Guix-patches via schreef op di 07-06-2022 om 07:41 [+0000]:
> +	(inputs (list openssl libpcap libusb protobuf protobuf-c
> libwebsockets sqlite zlib))
[...]
> +    (license license:gpl2+)))

libwebsockets is lgpl2.1 according to the package definition.
Its dependency openssl is asl2.0.  According to the FSF, asl2.0 and
gpl2.0 are incompatible.  So possibly asl2.0 and lgpl2.1 are
incompatible (though I haven't seen any reliable claim for
compatibility or incompatibility for _l_gpl, maybe it is compatible)
and hence libwebsockets needs to be removed from kismet and Guix.

However, according to v4.0.0 in the changelog, it is Expat (‘MIT’)
licensed, so maybe all that's needed is correcting the license
information?

Greetings,
Maxime.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

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

* [bug#55827] [PATCH v2] gnu: Add kismet.
  2022-06-07  8:06 ` Maxime Devos
@ 2022-06-07  9:57   ` phodina via Guix-patches via
  2022-06-07 11:04     ` Maxime Devos
  0 siblings, 1 reply; 8+ messages in thread
From: phodina via Guix-patches via @ 2022-06-07  9:57 UTC (permalink / raw)
  To: Maxime Devos; +Cc: 55827

[-- Attachment #1: Type: text/plain, Size: 1848 bytes --]

Hi Maxime,


sorry about the mirror, it's fixed in the patch.

> phodina via Guix-patches via schreef op di 07-06-2022 om 07:41 [+0000]:
>
> > + (inputs (list openssl libpcap libusb protobuf protobuf-c
> > libwebsockets sqlite zlib))
>
> [...]
>
> > +    (license license:gpl2+)))
>
>
> libwebsockets is lgpl2.1 according to the package definition.
> Its dependency openssl is asl2.0. According to the FSF, asl2.0 and
> gpl2.0 are incompatible. So possibly asl2.0 and lgpl2.1 are
> incompatible (though I haven't seen any reliable claim for
> compatibility or incompatibility for _l_gpl, maybe it is compatible)
> and hence libwebsockets needs to be removed from kismet and Guix.
>
> However, according to v4.0.0 in the changelog, it is Expat (‘MIT’)
> licensed, so maybe all that's needed is correcting the license
> information?
>
> Greetings,
> Maxime.

Well regarding the license. They have the following statement:

** UNLESS OTHERWISE NOTED IN THE FILE OR DIRECTORY, KISMET
   IS RELEASED UNDER THE GPL2 LICENSE

   SPECIFIC SUBCOMPONENTS AND FILES MAY BE UNDER LESS RESTRICTIVE
   LICENSES.  THESE DIFFERENCES ARE NOTED IN THE FILE OR IN THE
   LICENSE FILE OF THOSE SUBDIRECTORIES **

I'm not a laywer so can't really say if they are compatible or not in this case. Therefore the websockets are now removed by configuration flag.

However, if I think the best approach would be to create issue/bring this issue to the developers of Kismet.

The unfortunate thing with the current patch is it does not build as the boost library has been unbundled and the include headers fixed. What's missing is to add boost in the AutoConf scripts.

I don't have that kind of experience. If you know about some project that uses boost that could serve as reference it would be most welcome.

----
Petr

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: v2-0001-gnu-Add-kismet.patch --]
[-- Type: text/x-patch; name=v2-0001-gnu-Add-kismet.patch, Size: 7027 bytes --]

From a90149b12efd3ac8f43bfc79715ce20aa32467c2 Mon Sep 17 00:00:00 2001
From: Petr Hodina <phodina@protonmail.com>
Date: Tue, 7 Jun 2022 08:11:33 +0200
Subject: [PATCH v2] gnu: Add kismet.

* gnu/packages/networking.scm (kismet): New variable.
* gnu/local.mk: Add patch.
* gnu/packages/patches/kismet-unbundle-boost.patch: New file.

diff --git a/gnu/local.mk b/gnu/local.mk
index 68b317b32a..d6cf85d220 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1349,6 +1349,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/kinit-kdeinit-extra_libs.patch		\
   %D%/packages/patches/kinit-kdeinit-libpath.patch		\
   %D%/packages/patches/kio-search-smbd-on-PATH.patch		\
+  %D%/packages/patches/kismet-unbundle-boost.patch		\
   %D%/packages/patches/kmail-Fix-missing-link-libraries.patch \
   %D%/packages/patches/kmod-module-directory.patch		\
   %D%/packages/patches/kmscon-runtime-keymap-switch.patch	\
diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm
index bfa956149d..71f7bd4a41 100644
--- a/gnu/packages/networking.scm
+++ b/gnu/packages/networking.scm
@@ -49,6 +49,7 @@
 ;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
 ;;; Copyright © 2022 Simon South <simon@simonsouth.net>
 ;;; Copyright © 2022 Pierre Langlois <pierre.langlois@gmx.com>
+;;; Copyright © 2022 Petr Hodina <phodina@protonmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -114,6 +115,7 @@ (define-module (gnu packages networking)
   #:use-module (gnu packages image)
   #:use-module (gnu packages libevent)
   #:use-module (gnu packages libidn)
+  #:use-module (gnu packages libusb)
   #:use-module (gnu packages linux)
   #:use-module (gnu packages lua)
   #:use-module (gnu packages kerberos)
@@ -129,6 +131,7 @@ (define-module (gnu packages networking)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages polkit)
   #:use-module (gnu packages pretty-print)
+  #:use-module (gnu packages protobuf)
   #:use-module (gnu packages pulseaudio)
   #:use-module (gnu packages python)
   #:use-module (gnu packages python-crypto)
@@ -547,6 +550,56 @@ (define-public python-pysctp
 SCTP-aware kernel (most are).")
     (license license:lgpl2.1+)))
 
+(define-public kismet
+  (package
+    (name "kismet")
+    (version "2022-02")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://www.kismetwireless.net/git/kismet.git")
+                    (commit (string-append "kismet-" version "-R1"))))
+              (patches (search-patches "kismet-unbundle-boost.patch"))
+              (modules '((guix build utils)))
+              (snippet '(begin
+                          ;; Drop bundled libraries.
+                          (delete-file-recursively "boost")))
+              (sha256
+               (base32
+                "01q86hrgpai433sc65dlnqy91qd26w5dwyp37adszqxfb6d2an1r"))))
+    (build-system gnu-build-system)
+    (arguments
+     (list #:tests?
+           #f ;no test suite
+           ;; Disable C-based libwebsockets due to incompatibility
+           ;; between licenses with openssl (asl2.0 and lgpl2.1)
+           #:configure-flags
+           #~(list "--disable-libwebsockets")
+           #:phases
+           #~(modify-phases %standard-phases
+               (add-after 'unpack 'fix-install
+                 (lambda* _
+                   (substitute* "Makefile.in"
+                     (("-o \\$\\(INSTUSR\\) -g \\$\\(SUIDGROUP\\)") "")
+                     (("-o \\$\\(INSTUSR\\) -g \\$\\(INSTGRP\\)") "")))))))
+    (home-page "https://www.kismetwireless.net/")
+    (native-inputs (list perl pkg-config python python-2))
+    (inputs (list libusb
+                  libpcap
+                  openssl
+                  protobuf
+                  protobuf-c
+                  sqlite
+                  zlib))
+    (synopsis "Wireless network and device detector")
+    (description
+     "This package provides a wireless network and device detector, sniffer,
+wardriving tool, and WIDS (wireless intrusion detection) framework.  Kismet
+works with Wi-Fi interfaces, Bluetooth interfaces, some SDR
+(software defined radio) hardware like the RTLSDR, and other specialized
+capture hardware")
+    (license license:gpl2+)))
+
 (define-public knockd
   (package
     (name "knockd")
diff --git a/gnu/packages/patches/kismet-unbundle-boost.patch b/gnu/packages/patches/kismet-unbundle-boost.patch
new file mode 100644
index 0000000000..06e028bb23
--- /dev/null
+++ b/gnu/packages/patches/kismet-unbundle-boost.patch
@@ -0,0 +1,104 @@
+From 170ed96fe53531f93cdbca184faeda4bdf457169 Mon Sep 17 00:00:00 2001
+From: Petr Hodina <phodina@protonmail.com>
+Date: Tue, 7 Jun 2022 11:34:29 +0200
+Subject: [PATCH] Unbundle boost.
+
+
+diff --git a/globalregistry.h b/globalregistry.h
+index 1974f54..3d97364 100644
+--- a/globalregistry.h
++++ b/globalregistry.h
+@@ -34,7 +34,7 @@
+ #include "util.h"
+ #include "uuid.h"
+ 
+-#include "boost/asio.hpp"
++#include <boost/asio.hpp>
+ 
+ class global_registry;
+ 
+diff --git a/gpsgpsd_v3.h b/gpsgpsd_v3.h
+index 77acb14..8cb3cd4 100644
+--- a/gpsgpsd_v3.h
++++ b/gpsgpsd_v3.h
+@@ -25,7 +25,7 @@
+ #include "kis_gps.h"
+ #include "timetracker.h"
+ 
+-#include "boost/asio.hpp"
++#include <boost/asio.hpp>
+ 
+ using boost::asio::ip::tcp;
+ 
+diff --git a/gpsnmea_v2.h b/gpsnmea_v2.h
+index d761fd3..7518b94 100644
+--- a/gpsnmea_v2.h
++++ b/gpsnmea_v2.h
+@@ -28,7 +28,7 @@
+ #define ASIO_HAS_STD_CHRONO
+ #define ASIO_HAS_MOVE
+ 
+-#include "boost/asio.hpp"
++#include <boost/asio.hpp>
+ 
+ // Generic NMEA parser for GPS
+ 
+diff --git a/gpsserial_v3.h b/gpsserial_v3.h
+index c9f633f..2fa9acb 100644
+--- a/gpsserial_v3.h
++++ b/gpsserial_v3.h
+@@ -29,7 +29,7 @@
+ #define ASIO_HAS_STD_CHRONO
+ #define ASIO_HAS_MOVE
+ 
+-#include "boost/asio.hpp"
++#include <boost/asio.hpp>
+ 
+ // NMEA serial-attached GPS
+ // Implemented using ASIO serial
+diff --git a/gpstcp_v2.h b/gpstcp_v2.h
+index 75ec2e9..ab46216 100644
+--- a/gpstcp_v2.h
++++ b/gpstcp_v2.h
+@@ -29,7 +29,7 @@
+ #define ASIO_HAS_STD_CHRONO
+ #define ASIO_HAS_MOVE
+ 
+-#include "boost/asio.hpp"
++#include <boost/asio.hpp>
+ 
+ using boost::asio::ip::tcp;
+ 
+diff --git a/kis_external.h b/kis_external.h
+index 217f18a..af397b5 100644
+--- a/kis_external.h
++++ b/kis_external.h
+@@ -42,7 +42,7 @@
+ #include "kis_external_packet.h"
+ #include "kis_net_beast_httpd.h"
+ 
+-#include "boost/asio.hpp"
++#include <boost/asio.hpp>
+ using boost::asio::ip::tcp;
+ 
+ #include <google/protobuf/message_lite.h>
+diff --git a/kis_net_beast_httpd.h b/kis_net_beast_httpd.h
+index 355996c..989745e 100644
+--- a/kis_net_beast_httpd.h
++++ b/kis_net_beast_httpd.h
+@@ -28,9 +28,9 @@
+ #include <thread>
+ #include <unordered_map>
+ 
+-#include "boost/asio.hpp"
+-#include "boost/beast.hpp"
+-#include "boost/optional.hpp"
++#include <boost/asio.hpp>
++#include <boost/beast.hpp>
++#include <boost/optional.hpp>
+ 
+ #include "entrytracker.h"
+ #include "future_chainbuf.h"
+-- 
+2.35.1
+
-- 
2.35.1


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

* [bug#55827] [PATCH v2] gnu: Add kismet.
  2022-06-07  9:57   ` [bug#55827] [PATCH v2] " phodina via Guix-patches via
@ 2022-06-07 11:04     ` Maxime Devos
  2022-06-10  8:44       ` phodina via Guix-patches via
  0 siblings, 1 reply; 8+ messages in thread
From: Maxime Devos @ 2022-06-07 11:04 UTC (permalink / raw)
  To: phodina; +Cc: 55827

[-- Attachment #1: Type: text/plain, Size: 706 bytes --]

phodina schreef op di 07-06-2022 om 09:57 [+0000]:
> I'm not a laywer so can't really say if they are compatible or not in
> this case. Therefore the websockets are now removed by configuration
> flag.
> 
> However, if I think the best approach would be to create issue/bring
> this issue to the developers of Kismet.

I don't think this is necessary, because of ...

> However, according to v4.0.0 in the changelog, [libwebsockets] is
> Expat (‘MIT’) licensed, so maybe all that's needed is correcting the
> license information?

(basically, the license information in the package definition and the
LICENSE file of libwebsockets do not seem to agree).

WDYT?

Greetings,
Maxime.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

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

* [bug#55827] [PATCH v2] gnu: Add kismet.
  2022-06-07 11:04     ` Maxime Devos
@ 2022-06-10  8:44       ` phodina via Guix-patches via
  2022-06-15 20:19         ` bug#55827: [PATCH] " Ludovic Courtès
  0 siblings, 1 reply; 8+ messages in thread
From: phodina via Guix-patches via @ 2022-06-10  8:44 UTC (permalink / raw)
  To: Maxime Devos; +Cc: 55827, pierre.langlois@gmx.com

[-- Attachment #1: Type: text/plain, Size: 1121 bytes --]

Hi,

> phodina schreef op di 07-06-2022 om 09:57 [+0000]:
>
> > I'm not a laywer so can't really say if they are compatible or not in
> > this case. Therefore the websockets are now removed by configuration
> > flag.
> >
> > However, if I think the best approach would be to create issue/bring
> > this issue to the developers of Kismet.
>
>
> I don't think this is necessary, because of ...
>
> > However, according to v4.0.0 in the changelog, [libwebsockets] is
> > Expat (‘MIT’) licensed, so maybe all that's needed is correcting the
> > license information?
>
>
> (basically, the license information in the package definition and the
> LICENSE file of libwebsockets do not seem to agree).
>
> WDYT?
>
> Greetings,
> Maxime.

Yeah seems there isn't an issue since v4.0 libwebsockets license was changed to MIT as stated here [1].

It was last updated in commit acd953bd64b72cf7185f1d97f33cb6770ff8bfaf.

So I include libwesockets in kismet inputs and provide patch for license of libwesockets.

1 https://github.com/warmcat/libwebsockets/tree/v4.1.6#v40-is-released

----
Petr

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: v2-0002-gnu-libwesockets-Update-license.patch --]
[-- Type: text/x-patch; name=v2-0002-gnu-libwesockets-Update-license.patch, Size: 1162 bytes --]

From e62ddd99f36e5761beeb4fc89f293888e3056548 Mon Sep 17 00:00:00 2001
From: Petr Hodina <phodina@protonmail.com>
Date: Fri, 10 Jun 2022 10:41:14 +0200
Subject: [PATCH v2 2/2] gnu: libwesockets: Update license.

* gnu/packages/web.scm (libwebsockets)[license]: Change to expat.

diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
index 8306ea54fb..250267eb52 100644
--- a/gnu/packages/web.scm
+++ b/gnu/packages/web.scm
@@ -57,6 +57,7 @@
 ;;; Copyright © 2021 Vinicius Monego <monego@posteo.net>
 ;;; Copyright © 2022 cage <cage-dev@twistfold.it>
 ;;; Copyright © 2022 Pradana Aumars <paumars@courrier.dev>
+;;; Copyright © 2022 Petr Hodina <phodina@protonmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1451,9 +1452,7 @@ (define-public libwebsockets
 and server WebSockets connections---a protocol layered above HTTP that allows
 for efficient socket-like bidirectional reliable communication channels.")
     (home-page "https://libwebsockets.org")
-
-    ;; This is LGPLv2.1-only with extra exceptions specified in 'LICENSE'.
-    (license license:lgpl2.1)))
+    (license license:expat)))
 
 (define-public wabt
   (package
-- 
2.35.1


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: v2-0001-gnu-Add-kismet.patch --]
[-- Type: text/x-patch; name=v2-0001-gnu-Add-kismet.patch, Size: 7415 bytes --]

From 1127c7ba385bf2e55d1c84d8d46162eb461d7548 Mon Sep 17 00:00:00 2001
From: Petr Hodina <phodina@protonmail.com>
Date: Tue, 7 Jun 2022 08:11:33 +0200
Subject: [PATCH v2 1/2] gnu: Add kismet.

* gnu/packages/networking.scm (kismet): New variable.
* gnu/local.mk: Add patch.
* gnu/packages/patches/kismet-unbundle-boost.patch: New file.

diff --git a/gnu/local.mk b/gnu/local.mk
index 68b317b32a..d6cf85d220 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1349,6 +1349,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/kinit-kdeinit-extra_libs.patch		\
   %D%/packages/patches/kinit-kdeinit-libpath.patch		\
   %D%/packages/patches/kio-search-smbd-on-PATH.patch		\
+  %D%/packages/patches/kismet-unbundle-boost.patch		\
   %D%/packages/patches/kmail-Fix-missing-link-libraries.patch \
   %D%/packages/patches/kmod-module-directory.patch		\
   %D%/packages/patches/kmscon-runtime-keymap-switch.patch	\
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index b47afea0c6..734abbf205 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -9265,3 +9265,4 @@ (define-public touchegg
 gestures you make on your touchpad or touchscreen into visible actions in your
 desktop.")
     (license license:gpl3+)))
+
diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm
index bfa956149d..716fcd7b09 100644
--- a/gnu/packages/networking.scm
+++ b/gnu/packages/networking.scm
@@ -49,6 +49,7 @@
 ;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
 ;;; Copyright © 2022 Simon South <simon@simonsouth.net>
 ;;; Copyright © 2022 Pierre Langlois <pierre.langlois@gmx.com>
+;;; Copyright © 2022 Petr Hodina <phodina@protonmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -114,6 +115,7 @@ (define-module (gnu packages networking)
   #:use-module (gnu packages image)
   #:use-module (gnu packages libevent)
   #:use-module (gnu packages libidn)
+  #:use-module (gnu packages libusb)
   #:use-module (gnu packages linux)
   #:use-module (gnu packages lua)
   #:use-module (gnu packages kerberos)
@@ -129,6 +131,7 @@ (define-module (gnu packages networking)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages polkit)
   #:use-module (gnu packages pretty-print)
+  #:use-module (gnu packages protobuf)
   #:use-module (gnu packages pulseaudio)
   #:use-module (gnu packages python)
   #:use-module (gnu packages python-crypto)
@@ -547,6 +550,58 @@ (define-public python-pysctp
 SCTP-aware kernel (most are).")
     (license license:lgpl2.1+)))
 
+(define-public kismet
+  (package
+    (name "kismet")
+    (version "2022-02")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://www.kismetwireless.net/git/kismet.git")
+                    (commit (string-append "kismet-" version "-R1"))))
+              (patches (search-patches "kismet-unbundle-boost.patch"))
+              (modules '((guix build utils)))
+              (snippet '(begin
+                          ;; Drop bundled libraries.
+                          (delete-file-recursively "boost")))
+              (sha256
+               (base32
+                "01q86hrgpai433sc65dlnqy91qd26w5dwyp37adszqxfb6d2an1r"))))
+    (build-system gnu-build-system)
+    (arguments
+     (list #:tests?
+           #f ;no test suite
+           ;; Disable C-based libwebsockets due to incompatibility
+           ;; between licenses with openssl (asl2.0 and lgpl2.1)
+           #:configure-flags
+           #~(list "--disable-libwebsockets")
+           #:phases
+           #~(modify-phases %standard-phases
+               (add-after 'unpack 'fix-install
+                 (lambda* _
+                   (substitute* "Makefile.in"
+                     (("-o \\$\\(INSTUSR\\) -g \\$\\(SUIDGROUP\\)") "")
+                     (("-o \\$\\(INSTUSR\\) -g \\$\\(INSTGRP\\)") "")))))))
+    (home-page "https://www.kismetwireless.net/")
+    (native-inputs (list perl pkg-config python python-2))
+    (inputs (list boost
+                  libusb
+                  libpcap
+                  libwebsockets
+                  openssl
+                  protobuf
+                  protobuf-c
+                  sqlite
+                  zlib))
+    (synopsis "Wireless network and device detector")
+    (description
+     "This package provides a wireless network and device detector, sniffer,
+wardriving tool, and WIDS (wireless intrusion detection) framework.  Kismet
+works with Wi-Fi interfaces, Bluetooth interfaces, some SDR
+(software defined radio) hardware like the RTLSDR, and other specialized
+capture hardware")
+    (license license:gpl2+)))
+
 (define-public knockd
   (package
     (name "knockd")
diff --git a/gnu/packages/patches/kismet-unbundle-boost.patch b/gnu/packages/patches/kismet-unbundle-boost.patch
new file mode 100644
index 0000000000..06e028bb23
--- /dev/null
+++ b/gnu/packages/patches/kismet-unbundle-boost.patch
@@ -0,0 +1,104 @@
+From 170ed96fe53531f93cdbca184faeda4bdf457169 Mon Sep 17 00:00:00 2001
+From: Petr Hodina <phodina@protonmail.com>
+Date: Tue, 7 Jun 2022 11:34:29 +0200
+Subject: [PATCH] Unbundle boost.
+
+
+diff --git a/globalregistry.h b/globalregistry.h
+index 1974f54..3d97364 100644
+--- a/globalregistry.h
++++ b/globalregistry.h
+@@ -34,7 +34,7 @@
+ #include "util.h"
+ #include "uuid.h"
+ 
+-#include "boost/asio.hpp"
++#include <boost/asio.hpp>
+ 
+ class global_registry;
+ 
+diff --git a/gpsgpsd_v3.h b/gpsgpsd_v3.h
+index 77acb14..8cb3cd4 100644
+--- a/gpsgpsd_v3.h
++++ b/gpsgpsd_v3.h
+@@ -25,7 +25,7 @@
+ #include "kis_gps.h"
+ #include "timetracker.h"
+ 
+-#include "boost/asio.hpp"
++#include <boost/asio.hpp>
+ 
+ using boost::asio::ip::tcp;
+ 
+diff --git a/gpsnmea_v2.h b/gpsnmea_v2.h
+index d761fd3..7518b94 100644
+--- a/gpsnmea_v2.h
++++ b/gpsnmea_v2.h
+@@ -28,7 +28,7 @@
+ #define ASIO_HAS_STD_CHRONO
+ #define ASIO_HAS_MOVE
+ 
+-#include "boost/asio.hpp"
++#include <boost/asio.hpp>
+ 
+ // Generic NMEA parser for GPS
+ 
+diff --git a/gpsserial_v3.h b/gpsserial_v3.h
+index c9f633f..2fa9acb 100644
+--- a/gpsserial_v3.h
++++ b/gpsserial_v3.h
+@@ -29,7 +29,7 @@
+ #define ASIO_HAS_STD_CHRONO
+ #define ASIO_HAS_MOVE
+ 
+-#include "boost/asio.hpp"
++#include <boost/asio.hpp>
+ 
+ // NMEA serial-attached GPS
+ // Implemented using ASIO serial
+diff --git a/gpstcp_v2.h b/gpstcp_v2.h
+index 75ec2e9..ab46216 100644
+--- a/gpstcp_v2.h
++++ b/gpstcp_v2.h
+@@ -29,7 +29,7 @@
+ #define ASIO_HAS_STD_CHRONO
+ #define ASIO_HAS_MOVE
+ 
+-#include "boost/asio.hpp"
++#include <boost/asio.hpp>
+ 
+ using boost::asio::ip::tcp;
+ 
+diff --git a/kis_external.h b/kis_external.h
+index 217f18a..af397b5 100644
+--- a/kis_external.h
++++ b/kis_external.h
+@@ -42,7 +42,7 @@
+ #include "kis_external_packet.h"
+ #include "kis_net_beast_httpd.h"
+ 
+-#include "boost/asio.hpp"
++#include <boost/asio.hpp>
+ using boost::asio::ip::tcp;
+ 
+ #include <google/protobuf/message_lite.h>
+diff --git a/kis_net_beast_httpd.h b/kis_net_beast_httpd.h
+index 355996c..989745e 100644
+--- a/kis_net_beast_httpd.h
++++ b/kis_net_beast_httpd.h
+@@ -28,9 +28,9 @@
+ #include <thread>
+ #include <unordered_map>
+ 
+-#include "boost/asio.hpp"
+-#include "boost/beast.hpp"
+-#include "boost/optional.hpp"
++#include <boost/asio.hpp>
++#include <boost/beast.hpp>
++#include <boost/optional.hpp>
+ 
+ #include "entrytracker.h"
+ #include "future_chainbuf.h"
+-- 
+2.35.1
+
-- 
2.35.1


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

* [bug#55827] [PATCH] gnu: Add kismet.
  2022-06-07  7:41 [bug#55827] [PATCH] gnu: Add kismet phodina via Guix-patches via
  2022-06-07  7:50 ` Maxime Devos
  2022-06-07  8:06 ` Maxime Devos
@ 2022-06-10 15:30 ` Maxime Devos
  2 siblings, 0 replies; 8+ messages in thread
From: Maxime Devos @ 2022-06-10 15:30 UTC (permalink / raw)
  To: phodina, 55827

[-- Attachment #1: Type: text/plain, Size: 632 bytes --]

phodina via Guix-patches via schreef op di 07-06-2022 om 07:41 [+0000]:
> Hi,
> 
> this patch adds Kismet package.
> 
> ----
> Petr

I have looked at how other distros package it:

* http://deb.debian.org/debian/pool/main/k/kismet/kismet_2016.07.R1-1.debian.tar.xz

  has a fix_manpage, fix_typos patch, openssl_1.1.0.
  The 'copyright' file that says some of it is gpl-2-only or BSD3.
  Adds a .desktop file.
  Are they still relevant for the 2022 version?

* fedora has a patch

  https://src.fedoraproject.org/rpms/kismet/blob/rawhide/f/kismet-install.patch

  is it relevant to Guix?

Greetings,
Maxime

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

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

* bug#55827: [PATCH] gnu: Add kismet.
  2022-06-10  8:44       ` phodina via Guix-patches via
@ 2022-06-15 20:19         ` Ludovic Courtès
  0 siblings, 0 replies; 8+ messages in thread
From: Ludovic Courtès @ 2022-06-15 20:19 UTC (permalink / raw)
  To: phodina; +Cc: 55827-done, pierre.langlois@gmx.com, Maxime Devos

Hi,

Pushed!

  887b23a73c gnu: Add kismet.
  e51517d077 gnu: libwesockets: Update license.

I removed the “--disable-libwebsockets” configure flags for kismet.

Thanks,
Ludo’.




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

end of thread, other threads:[~2022-06-15 20:20 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-07  7:41 [bug#55827] [PATCH] gnu: Add kismet phodina via Guix-patches via
2022-06-07  7:50 ` Maxime Devos
2022-06-07  8:06 ` Maxime Devos
2022-06-07  9:57   ` [bug#55827] [PATCH v2] " phodina via Guix-patches via
2022-06-07 11:04     ` Maxime Devos
2022-06-10  8:44       ` phodina via Guix-patches via
2022-06-15 20:19         ` bug#55827: [PATCH] " Ludovic Courtès
2022-06-10 15:30 ` [bug#55827] " Maxime Devos

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).