[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
06/09: gnu: xpra: Fix HTML server
From: |
guix-commits |
Subject: |
06/09: gnu: xpra: Fix HTML server |
Date: |
Sat, 17 Oct 2020 16:40:52 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit 21fdf429a7bb6a7d371fcf1d5b5a892fb9c5cdfc
Author: Lars-Dominik Braun <lars@6xq.net>
AuthorDate: Fri Oct 16 19:15:41 2020 +0200
gnu: xpra: Fix HTML server
* gnu/packages/patches/xpra-4.0.4-norequests.patch: Add file.
* gnu/local.mk (dist_patch_DATA): Add it.
* gnu/packages/xorg.scm (xpra)[patches]: Apply it.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
---
gnu/local.mk | 1 +
gnu/packages/patches/xpra-4.0.4-norequests.patch | 39 ++++++++++++++++++++++++
gnu/packages/xorg.scm | 3 +-
3 files changed, 42 insertions(+), 1 deletion(-)
diff --git a/gnu/local.mk b/gnu/local.mk
index d41b659..111206f 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1705,6 +1705,7 @@ dist_patch_DATA =
\
%D%/packages/patches/xplanet-1.3.1-libimage_gif.c.patch \
%D%/packages/patches/xplanet-1.3.1-xpUtil-Add2017LeapSecond.cpp.patch
\
%D%/packages/patches/xpra-4.0.1-systemd-run.patch \
+ %D%/packages/patches/xpra-4.0.4-norequests.patch \
%D%/packages/patches/xsane-fix-memory-leak.patch \
%D%/packages/patches/xsane-fix-pdf-floats.patch \
%D%/packages/patches/xsane-fix-snprintf-buffer-length.patch \
diff --git a/gnu/packages/patches/xpra-4.0.4-norequests.patch
b/gnu/packages/patches/xpra-4.0.4-norequests.patch
new file mode 100644
index 0000000..e545be7
--- /dev/null
+++ b/gnu/packages/patches/xpra-4.0.4-norequests.patch
@@ -0,0 +1,39 @@
+Remove python-requests dependency, r27626 upstream.
+
+--- a/xpra/net/websockets/common.py (revision 27625)
++++ b/xpra/net/websockets/common.py (revision 27626)
+@@ -7,7 +7,6 @@
+ import uuid
+ from hashlib import sha1
+ from base64 import b64encode
+-from requests.structures import CaseInsensitiveDict
+
+ from xpra.os_util import strtobytes, bytestostr, monotonic_time
+ from xpra.log import Logger
+@@ -77,7 +76,7 @@
+ for line in lines:
+ parts = line.split(b": ", 1)
+ if len(parts)==2:
+- headers[parts[0]] = parts[1]
++ headers[parts[0].lower()] = parts[1]
+ return headers
+
+ def verify_response_headers(headers, key):
+@@ -84,14 +83,13 @@
+ log("verify_response_headers(%s)", headers)
+ if not headers:
+ raise Exception("no http headers found in response")
+- headers = CaseInsensitiveDict(headers)
+- upgrade = headers.get(b"Upgrade", b"")
++ upgrade = headers.get(b"upgrade", b"")
+ if upgrade!=b"websocket":
+ raise Exception("invalid http upgrade: '%s'" % upgrade)
+- protocol = headers.get(b"Sec-WebSocket-Protocol", b"")
++ protocol = headers.get(b"sec-websocket-protocol", b"")
+ if protocol!=b"binary":
+ raise Exception("invalid websocket protocol: '%s'" % protocol)
+- accept_key = headers.get(b"Sec-WebSocket-Accept", b"")
++ accept_key = headers.get(b"sec-websocket-accept", b"")
+ if not accept_key:
+ raise Exception("websocket accept key is missing")
+ expected_key = make_websocket_accept_hash(key)
diff --git a/gnu/packages/xorg.scm b/gnu/packages/xorg.scm
index 0eda94b..e912eb1 100644
--- a/gnu/packages/xorg.scm
+++ b/gnu/packages/xorg.scm
@@ -6312,7 +6312,8 @@ basic eye-candy effects.")
version ".tar.xz"))
(sha256
(base32 "10alqdfmgml9ixdi1nyd9xlw8a5q0j8m2sv4g9p83pd6z1a0rpv2"))
- (patches (search-patches "xpra-4.0.1-systemd-run.patch"))))
+ (patches (search-patches "xpra-4.0.1-systemd-run.patch"
+ "xpra-4.0.4-norequests.patch"))))
(build-system python-build-system)
;; see also http://xpra.org/trac/wiki/Dependencies
(inputs `(
- branch master updated (a1b8821 -> 633b024), guix-commits, 2020/10/17
- 01/09: doc: Remove 'build.scm' from the source of the manual., guix-commits, 2020/10/17
- 06/09: gnu: xpra: Fix HTML server,
guix-commits <=
- 07/09: import: utils: Fix license name mismatches and define CUA-OPL-1.0., guix-commits, 2020/10/17
- 02/09: doc: Move manual index creation to a separate derivation., guix-commits, 2020/10/17
- 04/09: doc: Generate cross-references in code snippets to the Guile manual., guix-commits, 2020/10/17
- 05/09: doc: cookbook: Balance parens in custom kernel examples., guix-commits, 2020/10/17
- 09/09: gnu: Add r-calculus., guix-commits, 2020/10/17
- 03/09: doc: Allow code snippets in the cookbook to link to the manual., guix-commits, 2020/10/17
- 08/09: doc: Fix typo., guix-commits, 2020/10/17