parent
ac210355b2
commit
b6b8f5c58b
2 changed files with 87 additions and 12 deletions
81
srcpkgs/buku/patches/use-system-cacerts.patch
Normal file
81
srcpkgs/buku/patches/use-system-cacerts.patch
Normal file
|
@ -0,0 +1,81 @@
|
|||
diff --git buku buku
|
||||
index b93bdb4..1a55f76 100755
|
||||
--- buku
|
||||
+++ buku
|
||||
@@ -41,7 +41,6 @@ try:
|
||||
except ImportError:
|
||||
pass
|
||||
from bs4 import BeautifulSoup
|
||||
-import certifi
|
||||
import urllib3
|
||||
from urllib3.exceptions import LocationParseError
|
||||
from urllib3.util import parse_url, make_headers
|
||||
@@ -88,6 +87,8 @@ LOGGER = logging.getLogger()
|
||||
LOGDBG = LOGGER.debug
|
||||
LOGERR = LOGGER.error
|
||||
|
||||
+def where():
|
||||
+ return '/etc/ssl/certs/ca-certificates.crt'
|
||||
|
||||
class BukuCrypt:
|
||||
"""Class to handle encryption and decryption of
|
||||
@@ -2553,12 +2554,12 @@ class BukuDb:
|
||||
num_pools=1,
|
||||
headers=MYHEADERS,
|
||||
cert_reqs='CERT_REQUIRED',
|
||||
- ca_certs=certifi.where())
|
||||
+ ca_certs=where())
|
||||
else:
|
||||
manager = urllib3.PoolManager(num_pools=1,
|
||||
headers={'User-Agent': USER_AGENT},
|
||||
cert_reqs='CERT_REQUIRED',
|
||||
- ca_certs=certifi.where())
|
||||
+ ca_certs=where())
|
||||
|
||||
try:
|
||||
r = manager.request(
|
||||
@@ -3395,14 +3396,14 @@ def get_PoolManager():
|
||||
|
||||
if MYPROXY:
|
||||
return urllib3.ProxyManager(MYPROXY, num_pools=1, headers=MYHEADERS, timeout=15,
|
||||
- cert_reqs='CERT_REQUIRED', ca_certs=certifi.where())
|
||||
+ cert_reqs='CERT_REQUIRED', ca_certs=where())
|
||||
|
||||
return urllib3.PoolManager(
|
||||
num_pools=1,
|
||||
headers=MYHEADERS,
|
||||
timeout=15,
|
||||
cert_reqs='CERT_REQUIRED',
|
||||
- ca_certs=certifi.where())
|
||||
+ ca_certs=where())
|
||||
|
||||
|
||||
def network_handler(url, http_head=False):
|
||||
@@ -4224,13 +4225,13 @@ def check_upstream_release():
|
||||
num_pools=1,
|
||||
headers=MYHEADERS,
|
||||
cert_reqs='CERT_REQUIRED',
|
||||
- ca_certs=certifi.where()
|
||||
+ ca_certs=where()
|
||||
)
|
||||
else:
|
||||
manager = urllib3.PoolManager(num_pools=1,
|
||||
headers={'User-Agent': USER_AGENT},
|
||||
cert_reqs='CERT_REQUIRED',
|
||||
- ca_certs=certifi.where())
|
||||
+ ca_certs=where())
|
||||
|
||||
try:
|
||||
r = manager.request(
|
||||
diff --git setup.py setup.py
|
||||
index 91f9fbb..b6f4cfa 100644
|
||||
--- setup.py
|
||||
+++ setup.py
|
||||
@@ -57,7 +57,6 @@ setup(
|
||||
py_modules=['buku'],
|
||||
install_requires=[
|
||||
'beautifulsoup4>=4.4.1',
|
||||
- 'certifi',
|
||||
'cryptography>=1.2.3',
|
||||
'urllib3>=1.23',
|
||||
'html5lib>=1.0.1',
|
|
@ -1,24 +1,18 @@
|
|||
# Template file for 'buku'
|
||||
pkgname=buku
|
||||
version=3.8
|
||||
revision=2
|
||||
noarch=yes
|
||||
version=4.1
|
||||
revision=1
|
||||
archs=noarch
|
||||
wrksrc="Buku-${version}"
|
||||
checkdepends="python3-BeautifulSoup4 python3-cryptography python3-hypothesis
|
||||
python3-pytest python3-urllib3 python3-yaml"
|
||||
depends="python3-urllib3"
|
||||
depends="python3-urllib3 python3-BeautifulSoup4 python3-cryptography python3-html5lib"
|
||||
short_desc="Cmdline bookmark management utility"
|
||||
maintainer="Diogo Leal <diogo@diogoleal.com>"
|
||||
license="GPL-3.0-or-later"
|
||||
homepage="https://github.com/jarun/Buku"
|
||||
distfiles="https://github.com/jarun/Buku/archive/v${version}.tar.gz"
|
||||
checksum=bca35fe1b7dbf88ed3af07e0daa4bc0a736d2f85b3103efcb18d542eebb2eebe
|
||||
|
||||
do_check() {
|
||||
pytest3
|
||||
}
|
||||
checksum=a66a423f837c4daed1b4a4084fc58ee6e37ec58f42b9edd2d61c7af0e3d4f343
|
||||
|
||||
do_install() {
|
||||
vbin buku.py buku
|
||||
vbin buku
|
||||
vman buku.1
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue