From d9f4b04fc69a960534f6224ef807eef5e9ca6c65 Mon Sep 17 00:00:00 2001 From: Arjan Mossel Date: Fri, 29 Jan 2021 17:22:13 +0100 Subject: [PATCH] electrum: update to 4.0.9. --- srcpkgs/electrum/patches/no-certifi.patch | 109 ---------------------- srcpkgs/electrum/template | 21 +++-- 2 files changed, 11 insertions(+), 119 deletions(-) delete mode 100644 srcpkgs/electrum/patches/no-certifi.patch diff --git a/srcpkgs/electrum/patches/no-certifi.patch b/srcpkgs/electrum/patches/no-certifi.patch deleted file mode 100644 index eb215543b2..0000000000 --- a/srcpkgs/electrum/patches/no-certifi.patch +++ /dev/null @@ -1,109 +0,0 @@ -Upstream: No -Reason: Avoid certifi dependency - -diff --git contrib/requirements/requirements.txt contrib/requirements/requirements.txt -index 1159a0469..9e406b56e 100644 ---- contrib/requirements/requirements.txt -+++ contrib/requirements/requirements.txt -@@ -8,4 +8,3 @@ qdarkstyle<2.7 - aiorpcx>=0.18,<0.19 - aiohttp>=3.3.0 - aiohttp_socks --certifi -diff --git electrum/interface.py electrum/interface.py -index b5eac439c..14bbd7ab9 100644 ---- electrum/interface.py -+++ electrum/interface.py -@@ -40,7 +40,6 @@ from aiorpcx import RPCSession, Notification, NetAddress - from aiorpcx.curio import timeout_after, TaskTimeout - from aiorpcx.jsonrpc import JSONRPC, CodeMessageError - from aiorpcx.rawsocket import RSClient --import certifi - - from .util import ignore_exceptions, log_exceptions, bfh, SilentTaskGroup - from . import util -@@ -57,7 +56,7 @@ if TYPE_CHECKING: - from .network import Network - - --ca_path = certifi.where() -+ca_path = '/etc/ssl/certs/ca-certificates.crt' - - BUCKET_NAME_OF_ONION_SERVERS = 'onion' - -diff --git electrum/paymentrequest.py electrum/paymentrequest.py -index fedcd1b3a..cba4879c7 100644 ---- electrum/paymentrequest.py -+++ electrum/paymentrequest.py -@@ -29,7 +29,6 @@ import traceback - import json - from typing import Optional - --import certifi - import urllib.parse - import aiohttp - -@@ -54,7 +53,7 @@ _logger = get_logger(__name__) - REQUEST_HEADERS = {'Accept': 'application/bitcoin-paymentrequest', 'User-Agent': 'Electrum'} - ACK_HEADERS = {'Content-Type':'application/bitcoin-payment','Accept':'application/bitcoin-paymentack','User-Agent':'Electrum'} - --ca_path = certifi.where() -+ca_path = '/etc/ssl/certs/ca-certificates.crt' - ca_list = None - ca_keyID = None - -diff --git electrum/util.py electrum/util.py -index 62df080a9..9c96055ba 100644 ---- electrum/util.py -+++ electrum/util.py -@@ -44,7 +44,6 @@ import ssl - import aiohttp - from aiohttp_socks import SocksConnector, SocksVer - from aiorpcx import TaskGroup --import certifi - - from .i18n import _ - from .logging import get_logger, Logger -@@ -62,7 +61,7 @@ def inv_dict(d): - return {v: k for k, v in d.items()} - - --ca_path = certifi.where() -+ca_path = '/etc/ssl/certs/ca-certificates.crt' - - - base_units = {'BTC':8, 'mBTC':5, 'bits':2, 'sat':0} -diff --git electrum/x509.py electrum/x509.py -index c38edc77a..1c4065444 100644 ---- electrum/x509.py -+++ electrum/x509.py -@@ -343,7 +343,5 @@ def load_certificates(ca_path): - - - if __name__ == "__main__": -- import certifi -- -- ca_path = certifi.where() -+ ca_path = '/etc/ssl/certs/ca-certificates.crt' - ca_list, ca_keyID = load_certificates(ca_path) -diff --git run_electrum run_electrum -index 1f5ee2f03..7891c50f0 100755 ---- run_electrum -+++ run_electrum -@@ -58,7 +58,6 @@ def check_imports(): - import dns - import pyaes - import ecdsa -- import certifi - import qrcode - import google.protobuf - import jsonrpclib -@@ -72,7 +71,7 @@ def check_imports(): - from google.protobuf import descriptor_pb2 - from jsonrpclib import SimpleJSONRPCServer - # make sure that certificates are here -- assert os.path.exists(certifi.where()) -+ assert os.path.exists('/etc/ssl/certs/ca-certificates.crt') - - - if not is_android: diff --git a/srcpkgs/electrum/template b/srcpkgs/electrum/template index 5c3016675e..c8f9aa4c6c 100644 --- a/srcpkgs/electrum/template +++ b/srcpkgs/electrum/template @@ -1,25 +1,26 @@ # Template file for 'electrum' pkgname=electrum -version=3.3.8 -revision=2 +version=4.0.9 +revision=1 build_style=python3-module -pycompile_module="electrum electrum_gui electrum_plugins" -hostmakedepends="python3-PyQt5-devel-tools python3-setuptools" -depends="python3-aiohttp python3-aiohttp_socks python3-aiorpcx>=0.18<0.19 - python3-dnspython python3-ecdsa python3-jsonrpclib python3-protobuf - python3-pyaes python3-pycryptodome python3-PyQt5 python3-qrcode" -# Missing optional dependencies: +hostmakedepends="python3-setuptools python3-PyQt5-devel-tools" +depends="python3-aiohttp python3-aiohttp_socks python3-aiorpcx + python3-bitstring python3-dnspython python3-ecdsa python3-jsonrpclib + python3-protobuf python3-pyaes python3-pycryptodomex python3-PyQt5 + python3-qrcode python3-socks python3-cryptography libbitcoin-secp256k1 + python3-certifi" +# Optional dependencies: # btchip - BTChip hardware wallet support # trezor - TREZOR hardware wallet support # keepkey - KeepKey hardware wallet support # qdarkstyle - Dark theme +checkdepends="$depends python3-pytest" short_desc="Lightweight Bitcoin wallet" maintainer="Charles E. Lehner " license="MIT" homepage="https://electrum.org/" -# patch doesn't apply for PyPI tarball distfiles="https://github.com/spesmilo/electrum/archive/${version}.tar.gz" -checksum=52addd8c0d08d3cc7cc34015efd67f7396fe30a74ac668b8fb77f6b3b927fd8b +checksum=67e63afe6a9d8944f872500fbf6312a3840f3fa8ebd0c1aadfbba3147d8b3c24 post_install() { sed -i -e 's|electrum %u|electrum|' \