unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#29130] [PATCH] gnu: networking: Add websockify.
@ 2017-11-03 10:06 Rutger Helling
  2017-11-05 15:46 ` Marius Bakke
  0 siblings, 1 reply; 4+ messages in thread
From: Rutger Helling @ 2017-11-03 10:06 UTC (permalink / raw)
  To: 29130


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

Hey Guix, 

here's a patch that adds websockify.

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

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

From 9b48ec6cc2bad8283436a5770902b799114034d3 Mon Sep 17 00:00:00 2001
From: Rutger Helling <rhelling@mykolab.com>
Date: Fri, 3 Nov 2017 10:49:05 +0100
Subject: [PATCH] gnu: networking: Add websockify.

* gnu/packages/networking.scm (websockify): New variable.
---
 gnu/packages/networking.scm | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm
index 57b32c252..1eab245e6 100644
--- a/gnu/packages/networking.scm
+++ b/gnu/packages/networking.scm
@@ -1535,3 +1535,32 @@ at the IP layer and link layer, as well as a host of supplementary
 functionality.  Using libnet, quick and simple packet assembly applications
 can be whipped up with little effort.")
     (license license:bsd-2)))
+
+(define-public websockify
+  (package
+    (name "websockify")
+    (version "0.8.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://github.com/novnc/websockify/archive/v"
+                                  version "/archive.tar.gz"))
+              (file-name (string-append name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "1kjq6gibsvbb6zx5gi8hgh7110x62pbwcqkwapf3k7s27w5y907h"))))
+    (build-system python-build-system)
+    (inputs `(("python-numpy", python-numpy)))
+    (home-page "https://github.com/novnc/websockify")
+    (synopsis "WebSockets support for any application/server")
+    (description "Websockify translates WebSockets traffic to normal socket
+traffic.  Websockify accepts the WebSockets handshake, parses it, and then
+begins forwarding traffic between the client and the target in both
+directions.")
+;; websockify is licensed under the LGPL version 3 with the following
+;; exceptions:
+;; include/websock.js : MPL 2.0
+;; include/base64.js : MPL 2.0
+;; include/des.js : Various BSD style licenses
+;; include/web-socket-js/ : New BSD license (3-clause).
+;; other/kumina.c : Simplified BSD license (2 clause).
+    (license license:lgpl3)))
-- 
2.15.0


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

* [bug#29130] [PATCH] gnu: networking: Add websockify.
  2017-11-03 10:06 [bug#29130] [PATCH] gnu: networking: Add websockify Rutger Helling
@ 2017-11-05 15:46 ` Marius Bakke
  2017-11-06  9:39   ` Rutger Helling
  0 siblings, 1 reply; 4+ messages in thread
From: Marius Bakke @ 2017-11-05 15:46 UTC (permalink / raw)
  To: Rutger Helling, 29130

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

Rutger Helling <rhelling@mykolab.com> writes:

> Hey Guix, 
>
> here's a patch that adds websockify.

Thanks for this!

[...]

> +(define-public websockify
> +  (package
> +    (name "websockify")
> +    (version "0.8.0")
> +    (source (origin
> +              (method url-fetch)
> +              (uri (string-append "https://github.com/novnc/websockify/archive/v"
> +                                  version "/archive.tar.gz"))
> +              (file-name (string-append name "-" version ".tar.gz"))
> +              (sha256
> +               (base32
> +                "1kjq6gibsvbb6zx5gi8hgh7110x62pbwcqkwapf3k7s27w5y907h"))))
> +    (build-system python-build-system)
> +    (inputs `(("python-numpy", python-numpy)))

"python-numpy" needs to be a propagated-input, since it is imported by
the installed library.  Otherwise packages using the websockify library
won't be able to find 'numpy'.

> +    (home-page "https://github.com/novnc/websockify")

I noticed this package has a '.travis.yml' that runs 'python setup.py
nosetests' for tests -- currently the 'check' phase just prints "Ran 0
tests in 0.00s".  Can you try overriding the check phase with one that
runs the same command?

> +    (synopsis "WebSockets support for any application/server")
> +    (description "Websockify translates WebSockets traffic to normal socket
> +traffic.  Websockify accepts the WebSockets handshake, parses it, and then
> +begins forwarding traffic between the client and the target in both
> +directions.")
> +;; websockify is licensed under the LGPL version 3 with the following
> +;; exceptions:
> +;; include/websock.js : MPL 2.0
> +;; include/base64.js : MPL 2.0
> +;; include/des.js : Various BSD style licenses
> +;; include/web-socket-js/ : New BSD license (3-clause).
> +;; other/kumina.c : Simplified BSD license (2 clause).
> +    (license license:lgpl3)))

Indeed version 3 only.

Can you send an updated patch please? :)

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

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

* [bug#29130] [PATCH] gnu: networking: Add websockify.
  2017-11-05 15:46 ` Marius Bakke
@ 2017-11-06  9:39   ` Rutger Helling
  2017-11-07 21:00     ` bug#29130: " Marius Bakke
  0 siblings, 1 reply; 4+ messages in thread
From: Rutger Helling @ 2017-11-06  9:39 UTC (permalink / raw)
  To: Marius Bakke; +Cc: 29130


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

Hey Marius, 

thanks for the review. Here's an updated patch. Unfortunately two out of
six tests fail due to an ImportError.
The module 'stubout' should be imported from python-mox3 but for some
reason isn't.
I'll try and find a solution at a later date, but for now I've disabled
the tests and added a FIXME. 

On 2017-11-05 16:46, Marius Bakke wrote:

> Rutger Helling <rhelling@mykolab.com> writes:
> 
>> Hey Guix, 
>> 
>> here's a patch that adds websockify.
> 
> Thanks for this!
> 
> [...]
> 
>> +(define-public websockify
>> +  (package
>> +    (name "websockify")
>> +    (version "0.8.0")
>> +    (source (origin
>> +              (method url-fetch)
>> +              (uri (string-append "https://github.com/novnc/websockify/archive/v"
>> +                                  version "/archive.tar.gz"))
>> +              (file-name (string-append name "-" version ".tar.gz"))
>> +              (sha256
>> +               (base32
>> +                "1kjq6gibsvbb6zx5gi8hgh7110x62pbwcqkwapf3k7s27w5y907h"))))
>> +    (build-system python-build-system)
>> +    (inputs `(("python-numpy", python-numpy)))
> 
> "python-numpy" needs to be a propagated-input, since it is imported by
> the installed library.  Otherwise packages using the websockify library
> won't be able to find 'numpy'.
> 
>> +    (home-page "https://github.com/novnc/websockify")
> 
> I noticed this package has a '.travis.yml' that runs 'python setup.py
> nosetests' for tests -- currently the 'check' phase just prints "Ran 0
> tests in 0.00s".  Can you try overriding the check phase with one that
> runs the same command?
> 
>> +    (synopsis "WebSockets support for any application/server")
>> +    (description "Websockify translates WebSockets traffic to normal socket
>> +traffic.  Websockify accepts the WebSockets handshake, parses it, and then
>> +begins forwarding traffic between the client and the target in both
>> +directions.")
>> +;; websockify is licensed under the LGPL version 3 with the following
>> +;; exceptions:
>> +;; include/websock.js : MPL 2.0
>> +;; include/base64.js : MPL 2.0
>> +;; include/des.js : Various BSD style licenses
>> +;; include/web-socket-js/ : New BSD license (3-clause).
>> +;; other/kumina.c : Simplified BSD license (2 clause).
>> +    (license license:lgpl3)))
> 
> Indeed version 3 only.
> 
> Can you send an updated patch please? :)

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

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

From eac151a0c5c82f50c94b3581af0679e33d127805 Mon Sep 17 00:00:00 2001
From: Rutger Helling <rhelling@mykolab.com>
Date: Mon, 6 Nov 2017 10:32:05 +0100
Subject: [PATCH] gnu: networking: Add websockify.

* gnu/packages/networking.scm (websockify): New variable.
---
 gnu/packages/networking.scm | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm
index 57b32c252..3f7d0a74c 100644
--- a/gnu/packages/networking.scm
+++ b/gnu/packages/networking.scm
@@ -68,6 +68,7 @@
   #:use-module (gnu packages lua)
   #:use-module (gnu packages kerberos)
   #:use-module (gnu packages ncurses)
+  #:use-module (gnu packages openstack)
   #:use-module (gnu packages pcre)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
@@ -1535,3 +1536,32 @@ at the IP layer and link layer, as well as a host of supplementary
 functionality.  Using libnet, quick and simple packet assembly applications
 can be whipped up with little effort.")
     (license license:bsd-2)))
+
+(define-public websockify
+  (package
+    (name "websockify")
+    (version "0.8.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://github.com/novnc/websockify/archive/v"
+                                  version "/archive.tar.gz"))
+              (file-name (string-append name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "1kjq6gibsvbb6zx5gi8hgh7110x62pbwcqkwapf3k7s27w5y907h"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:tests? #f)) ; FIXME: 2 out of 6 tests fail with "ImportError: No module
+     ; named 'stubout'". The tests can be run by replacing the check phase with
+     ; the command "python setup.py nosetests --verbosity=3".
+    (native-inputs `(; Required for tests:
+                     ("python-mox3", python-mox3)
+                     ("python-nose", python-nose)))
+    (propagated-inputs `(("python-numpy", python-numpy)))
+    (home-page "https://github.com/novnc/websockify")
+    (synopsis "WebSockets support for any application/server")
+    (description "Websockify translates WebSockets traffic to normal socket
+traffic.  Websockify accepts the WebSockets handshake, parses it, and then
+begins forwarding traffic between the client and the target in both
+directions.")
+    (license license:lgpl3)))
-- 
2.15.0


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

* bug#29130: [PATCH] gnu: networking: Add websockify.
  2017-11-06  9:39   ` Rutger Helling
@ 2017-11-07 21:00     ` Marius Bakke
  0 siblings, 0 replies; 4+ messages in thread
From: Marius Bakke @ 2017-11-07 21:00 UTC (permalink / raw)
  To: Rutger Helling; +Cc: 29130-done

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

Rutger Helling <rhelling@mykolab.com> writes:

> Hey Marius, 
>
> thanks for the review. Here's an updated patch. Unfortunately two out of
> six tests fail due to an ImportError.
> The module 'stubout' should be imported from python-mox3 but for some
> reason isn't.
> I'll try and find a solution at a later date, but for now I've disabled
> the tests and added a FIXME. 

OK, thanks for checking.  Could it be that our version of mox3 is too
old?  Anyway I moved it to 'web.scm' since we already have a few
websocket-related packages in there and added a copyright line for you,
hope that was okay.  Pushed as a67f0946717420f264646556812cbd0d197bb3.

Thank you!

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

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

end of thread, other threads:[~2017-11-07 21:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-03 10:06 [bug#29130] [PATCH] gnu: networking: Add websockify Rutger Helling
2017-11-05 15:46 ` Marius Bakke
2017-11-06  9:39   ` Rutger Helling
2017-11-07 21:00     ` bug#29130: " Marius Bakke

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).