ebuild from versions in fedora package
This commit is contained in:
parent
182fa63a90
commit
e829eb9a72
4 changed files with 7 additions and 132 deletions
|
@ -1,5 +1,6 @@
|
|||
AUX read-stdin-as-binary-in-get_input_msg.patch 2751 BLAKE2B c348d28eeb703ff9b257c915ba6c6ac62e95a1f389173ff2fcd034dbcfdf8b9d9fd075365b9033fe13a3f5ec6a24dad5110c468f54dc5417241cf5cb95e5933f SHA512 424d7b640e4f297bde5e98c92b7fec48c79998b07a710f685f786c673ef10981efc71647973fdd05ac84879387ab5eb97d5c734bf5b03827dd998cf292948d5b
|
||||
AUX unfix-configparser-compat-for-2to3.patch 1210 BLAKE2B 1ad8b2528cbf723d46d18c25163f68738281c48638b86c8809b5dab8f6f3c0058f17b1e2232d7c704b4aa777aaaf43c63170478da95272e75492bbbaec696789 SHA512 d9f5308d1f9280db5a0556fcaf3927e261b6cd1d01ff42c05a912335c6f9343f78096eed645aab5c741c221adf5ece00137aa3ae6f950cafbeb77db1908949b9
|
||||
AUX 65.patch 1686 BLAKE2B c17a654af98c1493b343e18ebd9d4acebe0e7e4973cad021f509680744456c9b8230ba953c9804fdd7498c4096b0629d55aa51057cfe6c440f9ed3722dd3f0c7 SHA512 3b87b479be52ee39e981b88106f45a30a4ce38215ae9f1d2614e942319a09e876237930b74eb5ff191ae722083b3fd4aab1c4d92f4f59f09b99e26f2c0a3369a
|
||||
AUX commit-2b8d76d6b86ea2e9076a9c34ffd4651909d214b7.diff 93952 BLAKE2B 839142dcf70f045552d53caa4769da0a48c780b0bcf22f16a949d5a10717a6600c41725b61fcca058e78f0e7b38d4088ffb5cc82a8ad7f5558de23f4ff18450e SHA512 5f2e25d6c173b4587c3329af97ce6f6836a070015d16ae2d1023572e2d58255abc88ff0fcbb4409b653a5d3994f9a8d03784748d94e905a62ffdee8ded60ec4c
|
||||
DIST pyzor-1.0.0.tar.gz 126276 BLAKE2B c60f26c53bf118c88dacbc49ddd414473748af1868b383a9c937ecf3cfe426ecdd60f64388fe7e555bd4641ef445769600e40879279dd544ef9ea32bd0dab6b9 SHA512 b3fb8b2c5261e187a2ab3a5a3b12d221df7de08766c6bb2ad9990c0f23517534871ecc9d5ad529e79b0d0aef8b2b800728320c57435a8c0d8c3f80a4ba0f7e4a
|
||||
EBUILD pyzor-1.0.0-r1.ebuild 2015 BLAKE2B bcbd30619b39d43b93ce6445cf986bff42dd1e7d4d1afd1f0c24aea1dc7a456de2840280c5455cacca55c90fdec80ca61fc36091676a800cf3a61b20fe975d88 SHA512 e2a0e1cb9be39ce9f3c1e44ee6de79ecb62d1ac66fd32e75c0b340ffaa5de842f945203fb58fb5723ebb8c12392d07567971d37fcbd744afa92d9e89dc2e8466
|
||||
EBUILD pyzor-1.0.0-r20.ebuild 2012 BLAKE2B 425718e65efdd76e45b6b1ca688284912a738fb604c30991222353bff0ec07beda5a67fefbe8c8108bc55a8367dc1261db22b0a3ad88d19fde87ce7ae95586ec SHA512 dd0f91e4de5ed39baffe04826137e747fcd240dd1bc0d77da2fd34697ea4ab03b5dc2c215efd2f2220135767413832e71c072c61fb0e3e8ee051a708195ab321
|
||||
EBUILD pyzor-9999.ebuild 1890 BLAKE2B a0edb78cf3ad8045a98956021d650933d2fb540f0418b748d25c58d14e63becf5ed38028c1dfbf071b20319f3b3cc5126990e8a72c3e11059b2bb129104b1ce6 SHA512 a2dec1d223df5e310aadccfde67e22abe64f19e5eb8477857a33a3c4672c4bc115b545320e81437a70be26a45af4934a82af923c7a21f00606023cb57e754179
|
||||
MISC metadata.xml 808 BLAKE2B 4c49c0d23d504122e7bb2d603f74cf5468cc84c212342dce3ca36b1fd5ec54b2b1aa65e8966ffb94a19a49d08eb8614af5f082faee32f94a315a8d51c9235ccc SHA512 8547153e5e1cd014039d497440197df6144d0dc1be2ebc31dca25551cb4ca1bd7399c2aac7e1c521e9c6b1d4172a6a88c1a98047f4a6bf49e58ac11671388230
|
||||
|
|
|
@ -1,85 +0,0 @@
|
|||
From 66225b32d2774cf37fa7f702f7eb26cd94094482 Mon Sep 17 00:00:00 2001
|
||||
From: Michael Orlitzky <michael@orlitzky.com>
|
||||
Date: Sun, 4 Mar 2018 17:27:01 -0500
|
||||
Subject: [PATCH 1/1] scripts/pyzor: replace the client with the git (+ issue
|
||||
64 fix) version.
|
||||
|
||||
---
|
||||
scripts/pyzor | 33 +++++++++++++++++++++++++++------
|
||||
1 file changed, 27 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/scripts/pyzor b/scripts/pyzor
|
||||
index 19b1d21..86c6f7d 100755
|
||||
--- a/scripts/pyzor
|
||||
+++ b/scripts/pyzor
|
||||
@@ -17,9 +17,9 @@ import tempfile
|
||||
import threading
|
||||
|
||||
try:
|
||||
- import ConfigParser
|
||||
-except ImportError:
|
||||
import configparser as ConfigParser
|
||||
+except ImportError:
|
||||
+ import ConfigParser
|
||||
|
||||
import pyzor.digest
|
||||
import pyzor.client
|
||||
@@ -110,7 +110,7 @@ def load_configuration():
|
||||
config = ConfigParser.ConfigParser()
|
||||
# Set the defaults.
|
||||
config.add_section("client")
|
||||
- for key, value in defaults.iteritems():
|
||||
+ for key, value in defaults.items():
|
||||
config.set("client", key, value)
|
||||
# Override with the configuration.
|
||||
config.read(os.path.join(options.homedir, "config"))
|
||||
@@ -171,14 +171,35 @@ def _get_input_digests(dummy):
|
||||
|
||||
|
||||
def _get_input_msg(digester):
|
||||
- msg = email.message_from_file(sys.stdin)
|
||||
+ msg = email.message_from_bytes(get_binary_stdin().read())
|
||||
digested = digester(msg).value
|
||||
yield digested
|
||||
|
||||
|
||||
+def _is_binary_reader(stream, default=False):
|
||||
+ try:
|
||||
+ return isinstance(stream.read(0), bytes)
|
||||
+ except Exception:
|
||||
+ return default
|
||||
+
|
||||
+
|
||||
+def get_binary_stdin():
|
||||
+ # sys.stdin might or might not be binary in some extra cases. By
|
||||
+ # default it's obviously non binary which is the core of the
|
||||
+ # problem but the docs recommend changing it to binary for such
|
||||
+ # cases so we need to deal with it.
|
||||
+ is_binary = _is_binary_reader(sys.stdin, False)
|
||||
+ if is_binary:
|
||||
+ return sys.stdin
|
||||
+ buf = getattr(sys.stdin, 'buffer', None)
|
||||
+ if buf is not None and _is_binary_reader(buf, True):
|
||||
+ return buf
|
||||
+ raise RuntimeError('Did not manage to get binary stdin')
|
||||
+
|
||||
+
|
||||
def _get_input_mbox(digester):
|
||||
tfile = tempfile.NamedTemporaryFile()
|
||||
- tfile.write(sys.stdin.read().encode("utf8"))
|
||||
+ tfile.write(get_binary_stdin().read())
|
||||
tfile.seek(0)
|
||||
mbox = mailbox.mbox(tfile.name)
|
||||
for msg in mbox:
|
||||
@@ -372,7 +393,7 @@ def genkey(client, servers, config, hash_func=hashlib.sha1):
|
||||
return False
|
||||
# pylint: disable-msg=W0612
|
||||
salt = "".join([chr(random.randint(0, 255))
|
||||
- for unused in xrange(hash_func(b"").digest_size)])
|
||||
+ for unused in range(hash_func(b"").digest_size)])
|
||||
if sys.version_info >= (3, 0):
|
||||
salt = salt.encode("utf8")
|
||||
salt_digest = hash_func(salt)
|
||||
--
|
||||
2.13.6
|
||||
|
|
@ -1,41 +0,0 @@
|
|||
From e4f06e21f697b863fa45a50e535ff0c6e3621a60 Mon Sep 17 00:00:00 2001
|
||||
From: Michael Orlitzky <michael@orlitzky.com>
|
||||
Date: Sun, 25 Mar 2018 10:14:21 -0400
|
||||
Subject: [PATCH 1/1] scripts/pyzor: undo ConfigParser python-3.x
|
||||
compatibility.
|
||||
|
||||
The build system for pyzor-1.0.0 still runs the 2to3 utility on the
|
||||
scripts to be installed. As an unintended side-effect, the python-3.x
|
||||
"try... import... except" compatibility block for the ConfigParser <->
|
||||
configparser module gets modified (the module name gets mistakenly
|
||||
lowercased).
|
||||
|
||||
This commit puts back the python-2.x "import ConfigParser" line
|
||||
unconditionally, and we'll have to rely on 2to3 to fix it when run
|
||||
under python-3.x. In newer versions of pyzor, the automatic 2to3 will
|
||||
not happen.
|
||||
|
||||
Bug: https://bugs.gentoo.org/643692
|
||||
---
|
||||
scripts/pyzor | 5 +----
|
||||
1 file changed, 1 insertion(+), 4 deletions(-)
|
||||
|
||||
diff --git a/scripts/pyzor b/scripts/pyzor
|
||||
index 86c6f7d..2750d92 100755
|
||||
--- a/scripts/pyzor
|
||||
+++ b/scripts/pyzor
|
||||
@@ -16,10 +16,7 @@ import optparse
|
||||
import tempfile
|
||||
import threading
|
||||
|
||||
-try:
|
||||
- import configparser as ConfigParser
|
||||
-except ImportError:
|
||||
- import ConfigParser
|
||||
+import ConfigParser
|
||||
|
||||
import pyzor.digest
|
||||
import pyzor.client
|
||||
--
|
||||
2.16.1
|
||||
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
EAPI=6
|
||||
|
||||
PYTHON_COMPAT=( python3_6 )
|
||||
PYTHON_COMPAT=( python3_6 python3_7 python3_8 )
|
||||
inherit distutils-r1
|
||||
|
||||
MY_PV="1-0-0"
|
||||
|
@ -41,8 +41,8 @@ REQUIRED_USE="pyzord? ( || ( gdbm redis ) )
|
|||
S="${WORKDIR}/${PN}-release-${MY_PV}"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/read-stdin-as-binary-in-get_input_msg.patch"
|
||||
"${FILESDIR}/unfix-configparser-compat-for-2to3.patch"
|
||||
"${FILESDIR}/commit-2b8d76d6b86ea2e9076a9c34ffd4651909d214b7.diff"
|
||||
"${FILESDIR}/65.patch"
|
||||
)
|
||||
|
||||
python_test() {
|
Loading…
Reference in a new issue