guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch master updated: gnu: onionshare: Update to 2.6.


From: guix-commits
Subject: branch master updated: gnu: onionshare: Update to 2.6.
Date: Tue, 14 Feb 2023 13:24:04 -0500

This is an automated email from the git hooks/post-receive script.

bavier pushed a commit to branch master
in repository guix.

The following commit(s) were added to refs/heads/master by this push:
     new a22b62b98e gnu: onionshare: Update to 2.6.
a22b62b98e is described below

commit a22b62b98e051cced363e7a363aa3847210aec50
Author: Eric Bavier <bavier@posteo.net>
AuthorDate: Mon Feb 13 22:24:36 2023 -0600

    gnu: onionshare: Update to 2.6.
    
    * gnu/packages/patches/onionshare-cli-async-mode.patch: New file.
    * gnu/local.mk (dist_patch_DATA): Add it.
    * gnu/packages/tor.scm (onionshare): Update to 2.6.
    [source]: Use patch.
    [inputs]: Add xdg-utils.  Move xvfb-run, used for tests, to ...
    [native-inputs]: here.
    [arguments]: Run tests.  Add "absolutize" phase for xdg-open.
---
 gnu/local.mk                                       |  1 +
 .../patches/onionshare-cli-async-mode.patch        | 25 ++++++++++++++++++++++
 gnu/packages/tor.scm                               | 25 +++++++++++-----------
 3 files changed, 39 insertions(+), 12 deletions(-)

diff --git a/gnu/local.mk b/gnu/local.mk
index cdb99813d0..07a7a0f527 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1597,6 +1597,7 @@ dist_patch_DATA =                                         
\
   %D%/packages/patches/ocaml-4.09-multiple-definitions.patch   \
   %D%/packages/patches/omake-fix-non-determinism.patch \
   %D%/packages/patches/oneko-remove-nonfree-characters.patch   \
+  %D%/packages/patches/onionshare-cli-async-mode.patch         \
   %D%/packages/patches/onnx-optimizer-system-library.patch     \
   %D%/packages/patches/onnx-use-system-googletest.patch        \
   %D%/packages/patches/onnx-shared-libraries.patch     \
diff --git a/gnu/packages/patches/onionshare-cli-async-mode.patch 
b/gnu/packages/patches/onionshare-cli-async-mode.patch
new file mode 100644
index 0000000000..b71b56046d
--- /dev/null
+++ b/gnu/packages/patches/onionshare-cli-async-mode.patch
@@ -0,0 +1,25 @@
+Specifying the `async_mode` parameter seems to have been a workaround for
+packaging on Windows and macOS.  If not given, flask_socketio.SocketIO will
+probe for an available asynchronous model, e.g. `eventlet`, and otherwise gets
+stuck if `gevent-socketio` is not available.
+
+c.f. 
https://github.com/onionshare/onionshare/commit/ec7fa4ef16c9e1ba6028ee927c23f76c399a17a6
+and  https://github.com/onionshare/onionshare/issues/1510
+
+diff --git a/cli/onionshare_cli/web/web.py b/cli/onionshare_cli/web/web.py
+index 64844b5..7e1b095 100644
+--- a/cli/onionshare_cli/web/web.py
++++ b/cli/onionshare_cli/web/web.py
+@@ -164,10 +164,10 @@ class Web:
+         elif self.mode == "chat":
+             if self.common.verbose:
+                 self.socketio = SocketIO(
+-                    async_mode="gevent", logger=True, engineio_logger=True
++                    logger=True, engineio_logger=True
+                 )
+             else:
+-                self.socketio = SocketIO(async_mode="gevent")
++                self.socketio = SocketIO()
+             self.socketio.init_app(self.app)
+             self.chat_mode = ChatModeWeb(self.common, self)
+ 
diff --git a/gnu/packages/tor.scm b/gnu/packages/tor.scm
index 6e5b3c0f60..9e26753857 100644
--- a/gnu/packages/tor.scm
+++ b/gnu/packages/tor.scm
@@ -4,7 +4,7 @@
 ;;; Copyright © 2016, 2017, 2018, 2020, 2021, 2022 Efraim Flashner 
<efraim@flashner.co.il>
 ;;; Copyright © 2016, 2017 Nikita <nikita@n0.is>
 ;;; Copyright © 2017–2021 Tobias Geerinckx-Rice <me@tobias.gr>
-;;; Copyright © 2017, 2018, 2019, 2021 Eric Bavier <bavier@posteo.net>
+;;; Copyright © 2017, 2018, 2019, 2021, 2023 Eric Bavier <bavier@posteo.net>
 ;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
 ;;; Copyright © 2018, 2022 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
@@ -46,6 +46,7 @@
   #:use-module (gnu packages check)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages pcre)
+  #:use-module (gnu packages freedesktop)
   #:use-module (gnu packages glib)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages python)
@@ -256,7 +257,7 @@ networks.")
 (define-public onionshare-cli
   (package
     (name "onionshare-cli")
-    (version "2.5")
+    (version "2.6")
     (source
      (origin
        (method git-fetch)
@@ -265,7 +266,8 @@ networks.")
              (commit (string-append "v" version))))
        (file-name (git-file-name name version))
        (sha256
-        (base32 "16m5ll0v0qjbirwwzbzxg53kq4ry1n3ay5x0h8zkij73v3x0q864"))))
+        (base32 "1bhrp019a0923h7dnfxhgvgvdp81blvnsbnvzy34hp827abxf3ic"))
+       (patches (search-patches "onionshare-cli-async-mode.patch"))))
     (build-system python-build-system)
     (native-inputs
      (list python-pytest))
@@ -329,6 +331,11 @@ OnionShare.")
      (substitute-keyword-arguments (package-arguments onionshare-cli)
        ((#:phases phases)
         #~(modify-phases #$phases
+            (add-after 'unpack 'absolutize
+              (lambda* (#:key inputs #:allow-other-keys)
+                (substitute* "desktop/onionshare/tab/mode/history.py"
+                  (("Popen\\(\\[\"xdg-open\"")
+                   (string-append "Popen([\"" (which "xdg-open") "\"")))))
             (replace 'change-directory
               (lambda _ (chdir "desktop/")))
             (add-after 'install 'install-data
@@ -353,15 +360,9 @@ OnionShare.")
                   (setenv "QT_QPA_PLATFORM" "offscreen")
                   (setenv "HOME" "/tmp")
                   (apply invoke "xvfb-run" "pytest" "-vv"
-                         (find-files "tests" "^test_gui.*\\.py$")))))))
-       ;; Most tests fail: "2 failed, 8 warnings, 44 errors in 6.06s", due to
-       ;; error "RuntimeError: Please destroy the Application singleton before
-       ;; creating a new Application instance." (see:
-       ;; https://github.com/onionshare/onionshare/issues/1603).
-       ((#:tests? _ #f)
-        #f)))
+                         (find-files "tests" "^test_gui.*\\.py$")))))))))
     (native-inputs
-     (list python-pytest))
+     (list python-pytest xvfb-run))
     (inputs
      ;; The desktop client uses onionshare-cli like a python module.  But
      ;; propagating onionshare-cli's inputs is not great, since a user would
@@ -372,7 +373,7 @@ OnionShare.")
                 python-shiboken-2
                 python-pyside-2
                 python-qrcode
-                xvfb-run)))
+                xdg-utils)))
     (description "OnionShare lets you securely and anonymously share files,
 host websites, and chat with friends using the Tor network.")))
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]