From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id h+dyLnvYiV9fLQAA0tVLHw (envelope-from ) for ; Fri, 16 Oct 2020 17:29:31 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id AL2gKXvYiV8aYgAAB5/wlQ (envelope-from ) for ; Fri, 16 Oct 2020 17:29:31 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id B93F6940539 for ; Fri, 16 Oct 2020 17:29:30 +0000 (UTC) Received: from localhost ([::1]:51986 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kTTXl-0003je-8H for larch@yhetil.org; Fri, 16 Oct 2020 13:29:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37444) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kTTNe-0001aS-PZ for guix-patches@gnu.org; Fri, 16 Oct 2020 13:19:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:49200) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kTTNe-0008EG-F8 for guix-patches@gnu.org; Fri, 16 Oct 2020 13:19:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kTTNe-0001GR-8t for guix-patches@gnu.org; Fri, 16 Oct 2020 13:19:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#44036] [PATCH] Fix xpra HTML server Resent-From: Lars-Dominik Braun Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 16 Oct 2020 17:19:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 44036 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 44036@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16028686994805 (code B ref -1); Fri, 16 Oct 2020 17:19:02 +0000 Received: (at submit) by debbugs.gnu.org; 16 Oct 2020 17:18:19 +0000 Received: from localhost ([127.0.0.1]:60746 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kTTMr-0001FK-5S for submit@debbugs.gnu.org; Fri, 16 Oct 2020 13:18:19 -0400 Received: from lists.gnu.org ([209.51.188.17]:41484) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kTTMn-0001FB-GB for submit@debbugs.gnu.org; Fri, 16 Oct 2020 13:18:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37150) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kTTMn-0000QK-8U for guix-patches@gnu.org; Fri, 16 Oct 2020 13:18:09 -0400 Received: from mout-p-201.mailbox.org ([80.241.56.171]:57374) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1kTTMh-00088H-Kk for guix-patches@gnu.org; Fri, 16 Oct 2020 13:18:08 -0400 Received: from smtp1.mailbox.org (smtp1.mailbox.org [IPv6:2001:67c:2050:105:465:1:1:0]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4CCXsf4jXRzQlKq for ; Fri, 16 Oct 2020 19:17:58 +0200 (CEST) X-Virus-Scanned: amavisd-new at heinlein-support.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6xq.net; s=MBO0001; t=1602868676; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=jdm9mBMxKdAsoQZoFxNOC8jtqNd6+g04OI6FW8Vrk5Y=; b=YUQxCv3PGLWDt620B8RhGog8kqcpQSgAS6BHKsSdm7CYs4RSF4MnrihKDfaV06wCW+bmJY DaR+QnynoGLy5UTdhOIGVcC0+P59DSOYnHJb5NhoFJYlAYJ4ilGt574uPt+JxsCloMZCdI c8CMg+CM5hasWV5dinPLyv57AOsdL4CMn7AOaQ0qDQzLq9oImZ7mUAdSl5IyK/5anMc9EX 4+Q92ZmDhXOz/Abue3FYDmWpi5U4MJNEQcpWvtz7iqptf21BpyevEh13cFn61pDtESOdYW hIbcltReNClY5rhYTnCNvjDnuT1v7HiMS4cKkz++GurxSJrBKVmgBjf+YMLdLA== Received: from smtp1.mailbox.org ([80.241.60.240]) by hefe.heinlein-support.de (hefe.heinlein-support.de [91.198.250.172]) (amavisd-new, port 10030) with ESMTP id YR94WciNXijk for ; Fri, 16 Oct 2020 19:17:54 +0200 (CEST) Date: Fri, 16 Oct 2020 19:17:53 +0200 From: Lars-Dominik Braun Message-ID: <20201016171753.GB1315@noor.fritz.box> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="gBBFr7Ir9EOA20Yy" Content-Disposition: inline X-MBO-SPAM-Probability: X-Rspamd-Score: -6.16 / 15.00 / 15.00 X-Rspamd-Queue-Id: 60BCC182A X-Rspamd-UID: 54882b Received-SPF: pass client-ip=80.241.56.171; envelope-from=lars@6xq.net; helo=mout-p-201.mailbox.org X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/16 13:17:58 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.6 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -2.6 (--) X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=fail (rsa verify failed) header.d=6xq.net header.s=MBO0001 header.b=YUQxCv3P; dmarc=fail reason="SPF not aligned (relaxed)" header.from=6xq.net (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Spam-Score: 0.09 X-TUID: OksS7owzSifA --gBBFr7Ir9EOA20Yy Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi, version 4.0.4 of xpra broke the builtin HTML server, causing ``--html=on`` to display the following error message: 2020-10-16 12:31:01,810 Error: cannot import websocket connection handler: 2020-10-16 12:31:01,810 No module named 'requests' 2020-10-16 12:31:01,810 the html server will not be available The attached patch applies an upstream fix, until upstream releases a new version. Cheers, Lars --gBBFr7Ir9EOA20Yy Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="0001-gnu-xpra-Fix-HTML-server.patch" >From a033826b12bd06e523dbe06ad23e6cc62ca18ed6 Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Fri, 16 Oct 2020 19:15:41 +0200 Subject: [PATCH] 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. --- gnu/local.mk | 1 + .../patches/xpra-4.0.4-norequests.patch | 39 +++++++++++++++++++ gnu/packages/xorg.scm | 3 +- 3 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/xpra-4.0.4-norequests.patch diff --git a/gnu/local.mk b/gnu/local.mk index d41b65957e..111206f34e 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 0000000000..e545be7f1d --- /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 0eda94bc47..e912eb1be9 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 `( -- 2.26.2 --gBBFr7Ir9EOA20Yy--