aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSharlatan Hellseher <sharlatanus@gmail.com>2025-04-10 10:52:10 +0100
committerAndreas Enge <andreas@enge.fr>2025-04-16 11:46:33 +0200
commitebcf3311fa3b611984de09b06dec4b45677108e2 (patch)
treeca55ba747fc534e19b4aa6de03c628312ce8d8d6
parent4db0aaf4ad08b334fcde872fd7bbaf0b3a15009d (diff)
downloadguix-ebcf3311fa3b611984de09b06dec4b45677108e2.tar.gz
guix-ebcf3311fa3b611984de09b06dec4b45677108e2.zip
gnu: onionshare-cli: Update to 2.6.3.
* gnu/packages/tor.scm (onionshare-cli): Update to 2.6.3. [source] <patches>: Remove it. [build-system]: Switch to pyproject. [arguments] <phases>: Add 'relax-requirments and 'pre-check; use default 'check. [inputs]: Remove python-flask-httpauth, python-pycryptodome, and python-urllib3; add python-cffi, python-flask-compress, python-gevent, python-gevent-websocket, python-packaging, python-qrcode, python-setuptools, python-urllib3-next, python-waitress, and python-werkzeug. [native-inputs]: Add python-cython-3, python-poetry-core, and python-wheel. * gnu/packages/patches/onionshare-cli-async-mode.patch: Delete file. * gnu/local.mk: Deregister patch. Change-Id: If0ee795992dc5a91fabcd70b16646eb5cc7aab2c
-rw-r--r--gnu/local.mk1
-rw-r--r--gnu/packages/patches/onionshare-cli-async-mode.patch25
-rw-r--r--gnu/packages/tor.scm55
3 files changed, 38 insertions, 43 deletions
diff --git a/gnu/local.mk b/gnu/local.mk
index b23c53521c..d4b2d4ad51 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1926,7 +1926,6 @@ 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/online-judge-tools.patch \
%D%/packages/patches/onnx-optimizer-system-library.patch \
%D%/packages/patches/onnx-1.13.1-use-system-googletest.patch \
diff --git a/gnu/packages/patches/onionshare-cli-async-mode.patch b/gnu/packages/patches/onionshare-cli-async-mode.patch
deleted file mode 100644
index b71b56046d..0000000000
--- a/gnu/packages/patches/onionshare-cli-async-mode.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-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 1016f16318..6c029321d5 100644
--- a/gnu/packages/tor.scm
+++ b/gnu/packages/tor.scm
@@ -44,6 +44,7 @@
#:use-module (gnu packages)
#:use-module (gnu packages base)
#:use-module (gnu packages libevent)
+ #:use-module (gnu packages libffi)
#:use-module (gnu packages linux)
#:use-module (gnu packages check)
#:use-module (gnu packages compression)
@@ -261,7 +262,7 @@ networks.")
(define-public onionshare-cli
(package
(name "onionshare-cli")
- (version "2.6")
+ (version "2.6.3")
(source
(origin
(method git-fetch)
@@ -270,32 +271,53 @@ networks.")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
- (base32 "1bhrp019a0923h7dnfxhgvgvdp81blvnsbnvzy34hp827abxf3ic"))
- (patches (search-patches "onionshare-cli-async-mode.patch"))))
- (build-system python-build-system)
+ (base32 "16yr25llnbgl2iwk458ca0rhrxsmpfx72q4gdg4a52i6g546p3hd"))))
+ (build-system pyproject-build-system)
(native-inputs
- (list python-pytest))
+ (list python-cython-3
+ python-poetry-core
+ python-pytest
+ python-wheel))
(inputs
- ;; TODO: obfs4proxy
(list python-click
+ python-cffi
python-colorama
python-eventlet
python-flask
- python-flask-httpauth
+ python-flask-compress
python-flask-socketio
- python-pynacl
+ python-gevent
+ python-gevent-websocket
+ python-packaging
python-psutil
- python-pycryptodome
+ python-pynacl
python-pysocks
+ python-qrcode
python-requests
+ python-setuptools
python-stem
python-unidecode
- python-urllib3
+ python-urllib3-next
+ python-waitress
+ python-werkzeug
tor))
(arguments
(list
#:phases
#~(modify-phases %standard-phases
+ (add-after 'unpack 'relax-requirements
+ (lambda _
+ ;; All tests passed, and the CLI is working in runtime, relax
+ ;; Poetry way too strict requirements.
+ (substitute* "cli/pyproject.toml"
+ (("2.3.2") "^3.0.0") ; flask = "2.3.2"
+ (("5.3.4") "5.5.1") ; flask-socketio = "5.3.4"
+ (("23.9.1") "24.11.1") ; gevent = "^23.9.1"
+ (("7.4.2") "8.0.0") ; qrcode = "^7.4.2"
+ (("70.0.0") "67.6.1") ; setuptools = ">=70.0.0"
+ (("1.8.1") "^1.8.1") ; stem = "1.8.1"
+ (("3.0.6") "^3.0.6") ; werkzeug = "3.0.6"
+ (("0.41.2") "0.40.0")))) ; wheel = "^0.41.2"
(add-after 'unpack 'bake-tor
(lambda* (#:key inputs #:allow-other-keys)
(substitute* (list "cli/onionshare_cli/common.py"
@@ -307,16 +329,15 @@ networks.")
(search-input-directory inputs "share/tor")))))
(add-before 'build 'change-directory
(lambda _ (chdir "cli")))
- (replace 'check
+ (add-before 'check 'pre-check
(lambda* (#:key tests? #:allow-other-keys)
(when tests?
(setenv "HOME" "/tmp")
- ;; Greendns is not needed for testing, and if eventlet tries to
- ;; load it, an OSError is thrown when getprotobyname is called.
- ;; Thankfully there is an environment variable to disable the
- ;; greendns import, so use it:
- (setenv "EVENTLET_NO_GREENDNS" "yes")
- (invoke "pytest" "-v" "./tests")))))))
+ ;; Greendns is not needed for testing, and if eventlet tries
+ ;; to load it, an OSError is thrown when getprotobyname is
+ ;; called. Thankfully there is an environment variable to
+ ;; disable the greendns import, so use it:
+ (setenv "EVENTLET_NO_GREENDNS" "yes")))))))
(home-page "https://onionshare.org/")
(synopsis "Securely and anonymously share files")
(description "OnionShare lets you securely and anonymously share files,