void-packages/srcpkgs/buku/patches/0001-Use-system-cacerts.patch
Đoàn Trần Công Danh c6ce65d3d0 srcpkgs/b*: convert patches to -Np1
```sh

git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" |
while read template; do
	for p in ${template%/template}/patches/*; do
		sed -i '
			\,^[+-][+-][+-] /dev/null,b
			/^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b
			s,^[*][*][*] ,&a/,
			/^--- /{
				s,\(^--- \)\(./\)*,\1a/,
				s,[.-][Oo][Rr][Ii][Gg]\([	/]\),\1,
				s/[.-][Oo][Rr][Ii][Gg]$//
				s/[.]patched[.]\([^.]\)/.\1/
				h
			}
			/^+++ -/{
				g
				s/^--- a/+++ b/
				b
			}
			s,\(^+++ \)\(./\)*,\1b/,
		' "$p"
	done
	sed -i '/^patch_args=/d' $template
done
```
2021-06-20 13:17:29 +07:00

57 lines
1.9 KiB
Diff

From 1f4c9edaedbc4bd270993c5a28ef6db3a378efed Mon Sep 17 00:00:00 2001
From: Nathan Owens <ndowens@artixlinux.org>
Date: Mon, 30 Nov 2020 15:43:56 -0600
Subject: [PATCH] Use system cacerts
---
buku | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git buku buku
index 936988a..079d3d2 100755
--- a/buku
+++ b/buku
@@ -45,7 +45,6 @@ import threading
import time
from typing import Any, Dict, Iterable, List, Optional, Tuple
import webbrowser
-import certifi
import urllib3
from urllib3.exceptions import LocationParseError
from urllib3.util import parse_url, make_headers, Retry
@@ -105,6 +104,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
@@ -2656,7 +2657,7 @@ class BukuDb:
if MYPROXY is None:
gen_headers()
- ca_certs = os.getenv('BUKU_CA_CERTS', default=certifi.where())
+ ca_certs = os.getenv('BUKU_CA_CERTS', default=where())
if MYPROXY:
manager = urllib3.ProxyManager(
MYPROXY,
@@ -3628,7 +3629,7 @@ def get_PoolManager():
ProxyManager or PoolManager
ProxyManager if https_proxy is defined, PoolManager otherwise.
"""
- ca_certs = os.getenv('BUKU_CA_CERTS', default=certifi.where())
+ ca_certs = os.getenv('BUKU_CA_CERTS', default=where())
if MYPROXY:
return urllib3.ProxyManager(MYPROXY, num_pools=1, headers=MYHEADERS, timeout=15,
cert_reqs='CERT_REQUIRED', ca_certs=ca_certs)
@@ -4523,7 +4524,7 @@ def check_upstream_release():
if MYPROXY is None:
gen_headers()
- ca_certs = os.getenv('BUKU_CA_CERTS', default=certifi.where())
+ ca_certs = os.getenv('BUKU_CA_CERTS', default=where())
if MYPROXY:
manager = urllib3.ProxyManager(
MYPROXY,