void-packages/srcpkgs/python3-PyBrowserID/patches/m2_python3.patch
Đoàn Trần Công Danh 49cb564d14 srcpkgs/p*: convert patches to -Np1
* par is kept at -Np0

```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

19 lines
707 B
Diff

--- a/browserid/crypto/m2.py 2014-12-12 06:15:36.000000000 +0100
+++ b/browserid/crypto/m2.py 2018-10-12 18:55:28.450882271 +0200
@@ -21,6 +21,7 @@
from browserid.crypto._m2_monkeypatch import m2
from browserid.crypto._m2_monkeypatch import DSA as _DSA
from browserid.crypto._m2_monkeypatch import RSA as _RSA
+from browserid.utils import long
class Key(object):
@@ -33,7 +34,7 @@
"""Alternative constructor for loading from PEM format data."""
self = cls.__new__(cls)
if data is not None:
- bio = BIO.MemoryBuffer(str(data))
+ bio = BIO.MemoryBuffer(data)
elif filename is not None:
bio = BIO.openfile(filename)
else: