GNU bug report logs - #35169
[PATCH] gnu: Add urh.

Previous Next

Package: guix-patches;

Reported by: Arun Isaac <arunisaac <at> systemreboot.net>

Date: Sat, 6 Apr 2019 10:12:02 UTC

Severity: normal

Tags: patch

Done: Guillaume Le Vaillant <glv <at> posteo.net>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 35169 in the body.
You can then email your comments to 35169 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#35169; Package guix-patches. (Sat, 06 Apr 2019 10:12:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Arun Isaac <arunisaac <at> systemreboot.net>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sat, 06 Apr 2019 10:12:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Arun Isaac <arunisaac <at> systemreboot.net>
To: guix-patches <at> gnu.org
Cc: Arun Isaac <arunisaac <at> systemreboot.net>
Subject: [PATCH] gnu: Add urh.
Date: Sat,  6 Apr 2019 15:40:33 +0530
* gnu/packages/ham-radio.scm (urh): New variable.
---
 gnu/packages/ham-radio.scm | 40 +++++++++++++++++++++++++++++++++++++-
 1 file changed, 39 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/ham-radio.scm b/gnu/packages/ham-radio.scm
index 6e91866905..16965810fc 100644
--- a/gnu/packages/ham-radio.scm
+++ b/gnu/packages/ham-radio.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2017, 2018 Arun Isaac <arunisaac <at> systemreboot.net>
+;;; Copyright © 2017, 2018, 2019 Arun Isaac <arunisaac <at> systemreboot.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -20,11 +20,13 @@
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
   #:use-module (guix download)
+  #:use-module (guix git-download)
   #: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))
@@ -82,3 +84,39 @@ growing list of radios across several manufacturers and allows transferring of
 memory contents between them.")
     (license (list license:gpl3+
                    license:lgpl3+)))) ; chirp/elib_intl.py
+
+(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
+     `(("python-numpy" ,python-numpy)
+       ("python-psutil" ,python-psutil)
+       ("python-pyqt" ,python-pyqt)
+       ("python-pyzmq" ,python-pyzmq)))
+    (native-inputs
+     `(("python-cython" ,python-cython)))
+    (arguments
+     `(#:tests? #f)) ; tests require an X server
+    (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 overview of your data, customizable decodings
+to crack even sophisticated encodings like CC1101 data whitening, assign
+labels to reveal the logic of the protocol, fuzzing component to find security
+leaks, modulation support to inject the data back into the system, simulation
+environment to perform stateful attacks.")
+    (license license:gpl3)))
-- 
2.21.0





Information forwarded to guix-patches <at> gnu.org:
bug#35169; Package guix-patches. (Sat, 06 Apr 2019 10:23:01 GMT) Full text and rfc822 format available.

Message #8 received at 35169 <at> debbugs.gnu.org (full text, mbox):

From: Danny Milosavljevic <dannym <at> scratchpost.org>
To: Arun Isaac <arunisaac <at> systemreboot.net>
Cc: 35169 <at> debbugs.gnu.org
Subject: Re: [bug#35169] [PATCH] gnu: Add urh.
Date: Sat, 6 Apr 2019 12:22:40 +0200
[Message part 1 (text/plain, inline)]
On Sat,  6 Apr 2019 15:40:33 +0530
Arun Isaac <arunisaac <at> systemreboot.net> wrote:

> +     `(#:tests? #f)) ; tests require an X server

urh uses Qt as GUI library, so maybe

(setenv "QT_QPA_PLATFORM" "offscreen")

would be enough (in a phase before 'check).

Otherwise make it start an X server :)

Otherwise LGTM!
[Message part 2 (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#35169; Package guix-patches. (Tue, 09 Apr 2019 09:25:02 GMT) Full text and rfc822 format available.

Message #11 received at 35169 <at> debbugs.gnu.org (full text, mbox):

From: Arun Isaac <arunisaac <at> systemreboot.net>
To: Danny Milosavljevic <dannym <at> scratchpost.org>
Cc: 35169 <at> debbugs.gnu.org
Subject: Re: [bug#35169] [PATCH] gnu: Add urh.
Date: Tue, 09 Apr 2019 14:54:43 +0530
[Message part 1 (text/plain, inline)]
>> +     `(#:tests? #f)) ; tests require an X server
>
> urh uses Qt as GUI library, so maybe
>
> (setenv "QT_QPA_PLATFORM" "offscreen")
>
> would be enough (in a phase before 'check).
>
> Otherwise make it start an X server :)

I'll work on this over the weekend and get back to you.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#35169; Package guix-patches. (Tue, 16 Apr 2019 10:32:01 GMT) Full text and rfc822 format available.

Message #14 received at 35169 <at> debbugs.gnu.org (full text, mbox):

From: Arun Isaac <arunisaac <at> systemreboot.net>
To: Danny Milosavljevic <dannym <at> scratchpost.org>
Cc: 35169 <at> debbugs.gnu.org
Subject: Re: [bug#35169] [PATCH] gnu: Add urh.
Date: Tue, 16 Apr 2019 16:01:35 +0530
[Message part 1 (text/plain, inline)]
>> +     `(#:tests? #f)) ; tests require an X server
>
> urh uses Qt as GUI library, so maybe
>
> (setenv "QT_QPA_PLATFORM" "offscreen")

This works, but there are a lot of other failing tests. Many of them
appear to be upstream bugs. I'm trying to fix them one by one and get
this package ready.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#35169; Package guix-patches. (Thu, 25 Apr 2019 18:21:02 GMT) Full text and rfc822 format available.

Message #17 received at 35169 <at> debbugs.gnu.org (full text, mbox):

From: Arun Isaac <arunisaac <at> systemreboot.net>
To: Danny Milosavljevic <dannym <at> scratchpost.org>
Cc: 35169 <at> debbugs.gnu.org
Subject: Re: [bug#35169] [PATCH] gnu: Add urh.
Date: Thu, 25 Apr 2019 23:50:21 +0530
[Message part 1 (text/plain, inline)]
Finally got it working!

[0001-gnu-Add-hackrf.patch (text/x-patch, inline)]
From 81957a3ac8526eca7a27780e8c0fe1873123de53 Mon Sep 17 00:00:00 2001
From: Arun Isaac <arunisaac <at> systemreboot.net>
Date: Thu, 25 Apr 2019 20:32:13 +0530
Subject: [PATCH 1/2] gnu: Add hackrf.

* gnu/packages/ham-radio.scm (hackrf): New variable.
---
 gnu/packages/ham-radio.scm | 35 ++++++++++++++++++++++++++++++++++-
 1 file changed, 34 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/ham-radio.scm b/gnu/packages/ham-radio.scm
index 6e91866905..e9521032cc 100644
--- a/gnu/packages/ham-radio.scm
+++ b/gnu/packages/ham-radio.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2017, 2018 Arun Isaac <arunisaac <at> systemreboot.net>
+;;; Copyright © 2017, 2018, 2019 Arun Isaac <arunisaac <at> systemreboot.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -20,6 +20,7 @@
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
   #:use-module (guix download)
+  #:use-module (gnu packages algebra)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages libusb)
   #:use-module (gnu packages pkg-config)
@@ -82,3 +83,35 @@ growing list of radios across several manufacturers and allows transferring of
 memory contents between them.")
     (license (list license:gpl3+
                    license:lgpl3+)))) ; chirp/elib_intl.py
+
+(define-public hackrf
+  (package
+    (name "hackrf")
+    (version "2018.01.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://github.com/mossmann/hackrf/releases/download/v"
+                           version "/hackrf-" version ".tar.xz"))
+       (sha256
+        (base32
+         "054x08y02gfwax2yb95ajg7gdm8ab1sckcmkcy1s2bqxkb0av6x8"))))
+    (build-system cmake-build-system)
+    (inputs
+     `(("fftwf" ,fftwf)
+       ("libusb" ,libusb)))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
+    (arguments
+     `(#:tests? #f ; no tests
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'configure 'chdir-to-source
+           (lambda _
+             (chdir "host")
+             #t)))))
+    (home-page "https://github.com/mossmann/hackrf")
+    (synopsis "Driver for HackRF, a general purpose software defined radio")
+    (description "@code{hackrf} provides drivers for HackRF, a general purpose
+software defined radio (SDR).")
+    (license license:gpl2+)))
-- 
2.21.0

[0002-gnu-Add-urh.patch (text/x-patch, inline)]
From 4693278e0b249d3edb0556d507d8eeb6ee5d2c4b Mon Sep 17 00:00:00 2001
From: Arun Isaac <arunisaac <at> systemreboot.net>
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

[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#35169; Package guix-patches. (Thu, 25 Apr 2019 18:46:02 GMT) Full text and rfc822 format available.

Message #20 received at 35169 <at> debbugs.gnu.org (full text, mbox):

From: Tobias Geerinckx-Rice <me <at> tobias.gr>
To: 35169 <at> debbugs.gnu.org
Subject: Re: [bug#35169] [PATCH] gnu: Add urh.
Date: Thu, 25 Apr 2019 20:45:21 +0200
[Message part 1 (text/plain, inline)]
Arun,

Arun Isaac wrote:
> +    (home-page "https://github.com/mossmann/hackrf")
> +    (synopsis "Driver for HackRF, a general purpose software 
> defined radio")
> +    (description "@code{hackrf} provides drivers for HackRF, a 
> general purpose
> +software defined radio (SDR).")

Drivers for…  Linux?  CUSE?  Something else?  (URH?)

Kind regards,

T G-R
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#35169; Package guix-patches. (Fri, 26 Apr 2019 07:01:01 GMT) Full text and rfc822 format available.

Message #23 received at 35169 <at> debbugs.gnu.org (full text, mbox):

From: Arun Isaac <arunisaac <at> systemreboot.net>
To: Tobias Geerinckx-Rice <me <at> tobias.gr>
Cc: 35169 <at> debbugs.gnu.org
Subject: Re: [bug#35169] [PATCH] gnu: Add urh.
Date: Fri, 26 Apr 2019 12:30:06 +0530
[Message part 1 (text/plain, inline)]
>> +    (synopsis "Driver for HackRF, a general purpose software 
>> defined radio")
>> +    (description "@code{hackrf} provides drivers for HackRF, a 
>> general purpose
>> +software defined radio (SDR).")
>
> Drivers for…  Linux?  CUSE?  Something else?  (URH?)

Actually, this package provides a library that uses libusb to interface
with the HackRF software defined radio. Shall I rewrite the synopsis and
description as follows, replacing "driver" with "library"? Or, should I
say "userspace driver" instead of "library"?

synopsis:

Interface library for the HackRF software defined radio

description:

@code{hackrf} provides a library to interface with HackRF, a general
purpose software defined radio.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#35169; Package guix-patches. (Thu, 07 Apr 2022 12:50:02 GMT) Full text and rfc822 format available.

Message #26 received at 35169 <at> debbugs.gnu.org (full text, mbox):

From: zimoun <zimon.toutoune <at> gmail.com>
To: Arun Isaac <arunisaac <at> systemreboot.net>
Cc: Tobias Geerinckx-Rice <me <at> tobias.gr>, 35169 <at> debbugs.gnu.org
Subject: Re: bug#35169: [PATCH] gnu: Add urh.
Date: Thu, 07 Apr 2022 14:41:01 +0200
Hi,

Looking at old patch submission, I hit this:

        <http://issues.guix.gnu.org/issue/35169>

and I miss why it is not merged…

On Fri, 26 Apr 2019 at 12:30, Arun Isaac <arunisaac <at> systemreboot.net> wrote:
>>> +    (synopsis "Driver for HackRF, a general purpose software
>>> defined radio")
>>> +    (description "@code{hackrf} provides drivers for HackRF, a
>>> general purpose
>>> +software defined radio (SDR).")
>>
>> Drivers for…  Linux?  CUSE?  Something else?  (URH?)
>
> Actually, this package provides a library that uses libusb to interface
> with the HackRF software defined radio. Shall I rewrite the synopsis and
> description as follows, replacing "driver" with "library"? Or, should I
> say "userspace driver" instead of "library"?
>
> synopsis:
>
> Interface library for the HackRF software defined radio
>
> description:
>
> @code{hackrf} provides a library to interface with HackRF, a general
> purpose software defined radio.

…I mean, description and synopsis are important but they should not be a
blocker here. :-)

Arun, could you rebase and merge it?


Cheers,
simon




Information forwarded to guix-patches <at> gnu.org:
bug#35169; Package guix-patches. (Tue, 19 Apr 2022 10:10:02 GMT) Full text and rfc822 format available.

Message #29 received at 35169 <at> debbugs.gnu.org (full text, mbox):

From: Arun Isaac <arunisaac <at> systemreboot.net>
To: zimoun <zimon.toutoune <at> gmail.com>
Cc: Tobias Geerinckx-Rice <me <at> tobias.gr>, 35169 <at> debbugs.gnu.org
Subject: Re: bug#35169: [PATCH] gnu: Add urh.
Date: Tue, 19 Apr 2022 15:39:14 +0530
Hi zimoun,

Sorry for the very late response! hackrf is already packaged for Guix
thanks to an unrelated commit by Christopher Howard in
79c4fb4f366cff3ad75982b4a09c6bd82e604674. urh is many new versions ahead
and my old patch no longer works. On casual inspection, I found that it
might take significantly more work to get working again. But, I'm not
using urh any longer and I'm not interested in it any more. Would it be
ok to close this issue without merging?

Regards,
Arun




Reply sent to Guillaume Le Vaillant <glv <at> posteo.net>:
You have taken responsibility. (Fri, 29 Apr 2022 12:50:02 GMT) Full text and rfc822 format available.

Notification sent to Arun Isaac <arunisaac <at> systemreboot.net>:
bug acknowledged by developer. (Fri, 29 Apr 2022 12:50:02 GMT) Full text and rfc822 format available.

Message #34 received at 35169-done <at> debbugs.gnu.org (full text, mbox):

From: Guillaume Le Vaillant <glv <at> posteo.net>
To: Arun Isaac <arunisaac <at> systemreboot.net>
Cc: 35169-done <at> debbugs.gnu.org
Subject: Re: bug#35169: [PATCH] gnu: Add urh.
Date: Fri, 29 Apr 2022 12:45:32 +0000
[Message part 1 (text/plain, inline)]
Hi Arun,

I made an updated package definition for urh based on yours and pushed
it as 653eef9b41ad74cb0e0aa10ed4ca691359b2515a.
Thanks.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#35169; Package guix-patches. (Mon, 02 May 2022 05:56:01 GMT) Full text and rfc822 format available.

Message #37 received at 35169-done <at> debbugs.gnu.org (full text, mbox):

From: Arun Isaac <arunisaac <at> systemreboot.net>
To: Guillaume Le Vaillant <glv <at> posteo.net>
Cc: 35169-done <at> debbugs.gnu.org
Subject: Re: bug#35169: [PATCH] gnu: Add urh.
Date: Mon, 02 May 2022 11:24:57 +0530
Thanks, Guillaume!




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 30 May 2022 11:24:08 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 303 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.