From patchwork Fri Jun 10 08:44:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: phodina X-Patchwork-Id: 39817 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id DD90E27BBEA; Fri, 10 Jun 2022 11:04:52 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,SPF_HELO_PASS, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 0DD3827BBE9 for ; Fri, 10 Jun 2022 11:04:52 +0100 (BST) Received: from localhost ([::1]:50252 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nzbVa-0007dc-Gl for patchwork@mira.cbaines.net; Fri, 10 Jun 2022 06:04:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43072) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nzaGO-0007Sc-T5 for guix-patches@gnu.org; Fri, 10 Jun 2022 04:45:08 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:54765) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nzaGN-0004YO-2q for guix-patches@gnu.org; Fri, 10 Jun 2022 04:45:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nzaGN-0003Y9-16 for guix-patches@gnu.org; Fri, 10 Jun 2022 04:45:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#55827] [PATCH v2] gnu: Add kismet. Resent-From: phodina Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 10 Jun 2022 08:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55827 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Maxime Devos Cc: 55827@debbugs.gnu.org, "pierre.langlois@gmx.com" Received: via spool by 55827-submit@debbugs.gnu.org id=B55827.165485068613585 (code B ref 55827); Fri, 10 Jun 2022 08:45:02 +0000 Received: (at 55827) by debbugs.gnu.org; 10 Jun 2022 08:44:46 +0000 Received: from localhost ([127.0.0.1]:48656 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nzaFx-0003Wm-H3 for submit@debbugs.gnu.org; Fri, 10 Jun 2022 04:44:46 -0400 Received: from mail-4316.protonmail.ch ([185.70.43.16]:22111) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nzaFu-0003WO-SQ for 55827@debbugs.gnu.org; Fri, 10 Jun 2022 04:44:36 -0400 Date: Fri, 10 Jun 2022 08:44:24 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1654850667; x=1655109867; bh=yH095BeWgi6+lwm6kHEJpfnzT3C573REv9kbI0PxjZk=; h=Date:To:From:Cc:Reply-To:Subject:Message-ID:In-Reply-To: References:Feedback-ID:From:To:Cc:Date:Subject:Reply-To: Feedback-ID:Message-ID; b=kRpYahJwCoWRzehqiTmx3SshJFdc5xDhDYGzYmsuaYgpTjupCbcvBTb8jm2MCor1A WNUR7Gn2AKa7yZ1pc5CxEhU8amNlFrR/EGZYq6ev7GG5OFuzvPwYGKBqZyw6EM5kQU aczQZt1K3eznMgyFfQZMAtVuyps/tV4Bm0BiFNhorCm/P1QRrElkUmfzwLvhhcxyaO ygwxt6oqzv5qI1JMiFhIhqHU4K+bi6pD8Ppzm0Op7ygmdYtcpXKUvH3m6Rd6q/0zo+ FZjyRtiWu5f4MimYFaNMHjgbZUNZuRyvQnpohXV3WytH5zR/CvCjnwFGlILImzH0PB gxoooll20nWww== Message-ID: In-Reply-To: <9a7cf69098315734ebdd3cb37de76a224abb7865.camel@telenet.be> References: <9a7cf69098315734ebdd3cb37de76a224abb7865.camel@telenet.be> Feedback-ID: 14143818:user:proton MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" Reply-to: phodina X-ACL-Warn: , phodina via Guix-patches X-Patchwork-Original-From: phodina via Guix-patches via From: phodina X-getmail-retrieved-from-mailbox: Patches 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 From 1127c7ba385bf2e55d1c84d8d46162eb461d7548 Mon Sep 17 00:00:00 2001 From: Petr Hodina 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 ;;; Copyright © 2022 Simon South ;;; Copyright © 2022 Pierre Langlois +;;; Copyright © 2022 Petr Hodina ;;; ;;; 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 +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 + + 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 + + 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 + + // 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 + + // 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 + + 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 + using boost::asio::ip::tcp; + + #include +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 + #include + +-#include "boost/asio.hpp" +-#include "boost/beast.hpp" +-#include "boost/optional.hpp" ++#include ++#include ++#include + + #include "entrytracker.h" + #include "future_chainbuf.h" +-- +2.35.1 + -- 2.35.1