From patchwork Thu Apr 25 18:20:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arun Isaac X-Patchwork-Id: 13753 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 8217F16F3A; Thu, 25 Apr 2019 19:21:09 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_DKIM_INVALID, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id 9442E16F37 for ; Thu, 25 Apr 2019 19:21:08 +0100 (BST) Received: from localhost ([127.0.0.1]:33570 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hJizb-0007bl-Ur for patchwork@mira.cbaines.net; Thu, 25 Apr 2019 14:21:07 -0400 Received: from eggs.gnu.org ([209.51.188.92]:47674) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hJizY-0007bS-Pu for guix-patches@gnu.org; Thu, 25 Apr 2019 14:21:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hJizX-0006Q7-7d for guix-patches@gnu.org; Thu, 25 Apr 2019 14:21:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:45765) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hJizW-0006N4-8i for guix-patches@gnu.org; Thu, 25 Apr 2019 14:21:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hJizW-00024N-37 for guix-patches@gnu.org; Thu, 25 Apr 2019 14:21:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#35169] [PATCH] gnu: Add urh. Resent-From: Arun Isaac Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 25 Apr 2019 18:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 35169 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Danny Milosavljevic Received: via spool by 35169-submit@debbugs.gnu.org id=B35169.15562164417912 (code B ref 35169); Thu, 25 Apr 2019 18:21:02 +0000 Received: (at 35169) by debbugs.gnu.org; 25 Apr 2019 18:20:41 +0000 Received: from localhost ([127.0.0.1]:59309 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hJiz3-00023Q-4J for submit@debbugs.gnu.org; Thu, 25 Apr 2019 14:20:40 -0400 Received: from mugam.systemreboot.net ([139.59.75.54]:53064) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hJiyz-00023E-Df for 35169@debbugs.gnu.org; Thu, 25 Apr 2019 14:20:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=systemreboot.net; s=default; h=Content-Type:MIME-Version:Message-ID:Date: References:In-Reply-To:Subject:Cc:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=6BgniiMi2QnAbLftOXPSEkDUJxoDn95Lqvni2bQ/Y2w=; b=INUVylMvgLv/ZVUsK357cp9Vr i24vdnR9aBgblnpG9T6CBr64l8uOgb0n9ppSMuTaHlxS25/+Gv8AjW9LizqpckhVGbYPLyqcu3g4b ZOicWYO6EJjgLDthExRpkqmMWx7FDPVE4VBWBnINYCN3il6ZfZl3L2gQ8vv60I7e+R9VA=; Received: from [49.206.11.150] (helo=steel) by systemreboot.net with esmtpsa (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1hJiyv-0000Dt-HG; Thu, 25 Apr 2019 23:50:25 +0530 From: Arun Isaac In-Reply-To: <20190406122240.2a140630@scratchpost.org> References: <20190406101033.24342-1-arunisaac@systemreboot.net> <20190406122240.2a140630@scratchpost.org> Date: Thu, 25 Apr 2019 23:50:21 +0530 Message-ID: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 35169@debbugs.gnu.org Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches Finally got it working! From 4693278e0b249d3edb0556d507d8eeb6ee5d2c4b Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Sat, 6 Apr 2019 14:44:44 +0530 Subject: [PATCH 2/2] gnu: Add urh. * gnu/packages/ham-radio.scm (urh): New variable. --- gnu/packages/ham-radio.scm | 68 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) diff --git a/gnu/packages/ham-radio.scm b/gnu/packages/ham-radio.scm index e9521032cc..58a8161851 100644 --- a/gnu/packages/ham-radio.scm +++ b/gnu/packages/ham-radio.scm @@ -20,12 +20,15 @@ #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (guix download) + #:use-module (guix git-download) #:use-module (gnu packages algebra) + #:use-module (gnu packages check) #:use-module (gnu packages gtk) #:use-module (gnu packages libusb) #:use-module (gnu packages pkg-config) #:use-module (gnu packages python) #:use-module (gnu packages python-xyz) + #:use-module (gnu packages qt) #:use-module (gnu packages xml) #:use-module (guix build-system cmake) #:use-module (guix build-system python)) @@ -115,3 +118,68 @@ memory contents between them.") (description "@code{hackrf} provides drivers for HackRF, a general purpose software defined radio (SDR).") (license license:gpl2+))) + +(define-public urh + (package + (name "urh") + (version "2.5.7") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/jopohl/urh") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "110fwlj2fw8jgrsgqfkha7lx8f06w0ymh51mgpckx8a0wycznhcy")))) + (build-system python-build-system) + (inputs + `(("hackrf" ,hackrf) + ("python-numpy" ,python-numpy) + ("python-psutil" ,python-psutil) + ("python-pyqt" ,python-pyqt) + ("python-pyzmq" ,python-pyzmq) + ("rtl-sdr" ,rtl-sdr))) + (native-inputs + `(("python-cython" ,python-cython) + ("python-pytest" ,python-pytest))) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'configure-compiler + (lambda _ + ;; Use gcc as compiler + (substitute* "src/urh/dev/native/ExtensionHelper.py" + (("compiler = ccompiler\\.new_compiler\\(\\)\n" all) + (string-append + all " compiler.set_executables(compiler='gcc'," + " compiler_so='gcc', linker_exe='gcc', linker_so='gcc -shared')\n"))) + #t)) + (replace 'build + (lambda _ + (invoke "python" "setup.py" "build" "build_ext") + (invoke "python" "src/urh/cythonext/build.py"))) + (replace 'check + (lambda _ + ;; Run X server tests offscreen in headless mode + (setenv "QT_QPA_PLATFORM" "offscreen") + (setenv "HOME" "/tmp") + ;; Fix permissions + (with-directory-excursion "tests/data" + (for-each (lambda (file) + (chmod file #o755)) + (list "decode.py" "encode.py"))) + ;; Run tests + (invoke "pytest")))))) + (home-page "https://github.com/jopohl/urh") + (synopsis "Investigate unknown wireless protocols") + (description "The Universal Radio Hacker (URH) is a software for +investigating unknown wireless protocols. Features include hardware +interfaces for common software defined radios, easy demodulation of signals, +assigning participants to keep an overview of your data, customizable +decodings to crack even sophisticated encodings like CC1101 data whitening, +assigning labels to reveal the logic of the protocol, a fuzzing component to +find security leaks, modulation support to inject data back into the system +and a simulation environment to perform stateful attacks.") + (license license:gpl3+))) -- 2.21.0