clone old passlib-1.7.2.ebuild, removed from main repo
This commit is contained in:
parent
9496251f3a
commit
ef2ac0f5e1
|
@ -1,3 +1,6 @@
|
|||
2020-05-20
|
||||
* clone old passlib-1.7.2.ebuild, removed from main repo
|
||||
|
||||
2020-05-17 homeassistant-0.110.0_beta3
|
||||
* add gogogate2-api-1.0.3
|
||||
* bump pyhomematic-0.1.67
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
AUX passlib-1.7.1-tests.patch 1552 BLAKE2B 86cfedd409d6aff983c31ec33362577e5e353fa00fafed47927cec318d79d79fea75af80a283ef23b6453fb2da1bb5c46ae513b784e97941a8a45dfd4089bb26 SHA512 ccdf6814890e1c25b5eed9b2685ca2778fe155c3f7d75f2b76433a91785baa93b692aa6ee0f3a85b768f3b0189be185acce1e570961d28540d8f9dd12a81db7d
|
||||
AUX passlib-1.7.2-pypy3.patch 3117 BLAKE2B c68b96cddf48038198e7d5d35da33c581c2abcf1aef75e6ca556c39a87e242e9990ed17235596ffb68a4154eec9acb6fcb0d651a04856a93f79a993865d702f7 SHA512 808fc0f3067f30f23118b5222d90f86910b3e681c585d1bdb237a2b954ff99936105042f2a0fce8f4ae2b0301cd201be68905be316fed5ebfd81ccc1cf29fd1a
|
||||
DIST passlib-1.7.1.tar.gz 645724 BLAKE2B f34e3bbc5a61ff71cc989fa26edb9f992909bfdcc6ca1b094ebc02fc9942eb1db1ea18fc3dd5bb7d9fcecf6b4bd82e93aba07c7ce63ec85452b5d7117a6e1968 SHA512 3d5f069cd4e44e5e87cdabc46845acbdd6c1eeedb7ce1f611aebee87b0f7af19009b6a47a10ec555fd84260b9f5c933c6429e325d30326de3869f05031674168
|
||||
EBUILD passlib-1.7.1-r2.ebuild 1015 BLAKE2B e7dd0f347873e24f8c2e57a1c2b8238a297cf9c4ab52eba334b9657792d52698de8f7904a331d0bb8d071d44827da2907fe02649203b2108d97d9e90c21a88c2 SHA512 1edbd6c8d88e503ad86b70f79d0e9954f57cee8187c1175e155e5932bb834edd40fcbf89c12be2b458148fb3cbdf7a08d003bcc3edf6ee0d58b62cbf3544292b
|
||||
MISC metadata.xml 794 BLAKE2B 717057e0abe888ef6c692a0777d9c106426238d690934a852fea3084154dfa190546c1779c6da9fbda61f6b204bfb152cf391727c4225baf2f0d6030d4ad6be5 SHA512 baf29cb74e295119b984f3acc3470f63811f9ee49849e97b1808354c15be121e723fabafb053a0a7c94032faa7747d149d000b68acfccd919ea4ec9d28d2f930
|
|
@ -0,0 +1,33 @@
|
|||
Only in passlib-1.7.1.orig/passlib/tests: .utils.py.swp
|
||||
Only in passlib-1.7.1/passlib/tests: .utils.py.un~
|
||||
diff -ur passlib-1.7.1.orig/passlib/tests/utils.py passlib-1.7.1/passlib/tests/utils.py
|
||||
--- passlib-1.7.1.orig/passlib/tests/utils.py 2019-11-19 21:39:07.373344777 -0800
|
||||
+++ passlib-1.7.1/passlib/tests/utils.py 2019-11-19 21:39:13.525351120 -0800
|
||||
@@ -16,6 +16,7 @@
|
||||
import tempfile
|
||||
import threading
|
||||
import time
|
||||
+import unittest
|
||||
from passlib.exc import PasslibHashWarning, PasslibConfigWarning
|
||||
from passlib.utils.compat import PY3, JYTHON
|
||||
import warnings
|
||||
@@ -3149,6 +3150,7 @@
|
||||
self.assertRaises(MissingBackendError, self.do_genhash, 'stub', hash)
|
||||
self.assertRaises(MissingBackendError, self.do_verify, 'stub', hash)
|
||||
|
||||
+ @unittest.skip("fails due to unexpected support on linux, probably out of date")
|
||||
def test_82_crypt_support(self):
|
||||
"""test platform-specific crypt() support detection"""
|
||||
# NOTE: this is mainly just a sanity check to ensure the runtime
|
||||
diff -ur passlib-1.7.1.orig/passlib/utils/__init__.py passlib-1.7.1/passlib/utils/__init__.py
|
||||
--- passlib-1.7.1.orig/passlib/utils/__init__.py 2019-11-19 22:55:46.438000094 -0800
|
||||
+++ passlib-1.7.1/passlib/utils/__init__.py 2019-11-19 22:56:37.144958345 -0800
|
||||
@@ -903,7 +903,7 @@
|
||||
|
||||
# the current time, to whatever precision os uses
|
||||
time.time(),
|
||||
- time.clock(),
|
||||
+ tick(),
|
||||
|
||||
# if urandom available, might as well mix some bytes in.
|
||||
os.urandom(32).decode("latin-1") if has_urandom else 0,
|
|
@ -0,0 +1,65 @@
|
|||
diff -ur a/passlib/utils/__init__.py b/passlib/utils/__init__.py
|
||||
--- a/passlib/utils/__init__.py 2019-11-19 11:41:26.000000000 -0800
|
||||
+++ b/passlib/utils/__init__.py 2019-12-03 14:16:15.153791186 -0800
|
||||
@@ -57,7 +57,7 @@
|
||||
)
|
||||
from passlib.exc import ExpectedStringError
|
||||
from passlib.utils.compat import (add_doc, join_bytes, join_byte_values,
|
||||
- join_byte_elems, irange, imap, PY3, u,
|
||||
+ join_byte_elems, irange, imap, PY3, PYPY, u,
|
||||
join_unicode, unicode, byte_elem_value, nextgetter,
|
||||
unicode_or_bytes_types,
|
||||
get_method_function, suppress_cause)
|
||||
@@ -776,23 +776,41 @@
|
||||
|
||||
if PY3:
|
||||
def safe_crypt(secret, hash):
|
||||
- if isinstance(secret, bytes):
|
||||
- # Python 3's crypt() only accepts unicode, which is then
|
||||
- # encoding using utf-8 before passing to the C-level crypt().
|
||||
- # so we have to decode the secret.
|
||||
- orig = secret
|
||||
+ if not PYPY:
|
||||
+ if isinstance(secret, bytes):
|
||||
+ # Python 3's crypt() only accepts unicode, which is then
|
||||
+ # encoding using utf-8 before passing to the C-level crypt().
|
||||
+ # so we have to decode the secret.
|
||||
+ orig = secret
|
||||
+ try:
|
||||
+ secret = secret.decode("utf-8")
|
||||
+ except UnicodeDecodeError:
|
||||
+ return None
|
||||
+ assert secret.encode("utf-8") == orig, \
|
||||
+ "utf-8 spec says this can't happen!"
|
||||
+ if _NULL in secret:
|
||||
+ raise ValueError("null character in secret")
|
||||
+ else:
|
||||
+ if isinstance(secret, str):
|
||||
+ orig = secret
|
||||
+ try:
|
||||
+ secret = secret.encode("utf-8")
|
||||
+ except UnicodeEncodeError:
|
||||
+ return None
|
||||
+ assert secret.decode("utf-8") == orig, \
|
||||
+ "utf-8 spec says this can't happen!"
|
||||
try:
|
||||
- secret = secret.decode("utf-8")
|
||||
+ if _NULL in secret.decode("utf-8"):
|
||||
+ raise ValueError("null character in secret")
|
||||
except UnicodeDecodeError:
|
||||
return None
|
||||
- assert secret.encode("utf-8") == orig, \
|
||||
- "utf-8 spec says this can't happen!"
|
||||
- if _NULL in secret:
|
||||
- raise ValueError("null character in secret")
|
||||
+
|
||||
if isinstance(hash, bytes):
|
||||
hash = hash.decode("ascii")
|
||||
result = _crypt(secret, hash)
|
||||
- if not result or result[0] in _invalid_prefixes:
|
||||
+ if PYPY and isinstance(result, bytes):
|
||||
+ result = result.decode("utf-8")
|
||||
+ if not result or result[0:1] in _invalid_prefixes:
|
||||
return None
|
||||
return result
|
||||
else:
|
|
@ -0,0 +1,25 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="person">
|
||||
<email>prometheanfire@gentoo.org</email>
|
||||
<name>Matthew Thode</name>
|
||||
</maintainer>
|
||||
<maintainer type="project">
|
||||
<email>openstack@gentoo.org</email>
|
||||
<name>Openstack</name>
|
||||
</maintainer>
|
||||
<maintainer type="project">
|
||||
<email>python@gentoo.org</email>
|
||||
<name>Python</name>
|
||||
</maintainer>
|
||||
<use>
|
||||
<flag name="bcrypt">bcrpyt hash algoryptm support</flag>
|
||||
<flag name="totp">time based one time password support</flag>
|
||||
<flag name="scrypt">accelerated scrypt algoythm support</flag>
|
||||
</use>
|
||||
<upstream>
|
||||
<remote-id type="pypi">passlib</remote-id>
|
||||
<remote-id type="bitbucket">ecollins/passlib</remote-id>
|
||||
</upstream>
|
||||
</pkgmetadata>
|
|
@ -0,0 +1,38 @@
|
|||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
PYTHON_COMPAT=( python{2_7,3_{6,7,8}} )
|
||||
|
||||
inherit distutils-r1
|
||||
|
||||
DESCRIPTION="Password hashing framework supporting over 20 schemes"
|
||||
HOMEPAGE="https://bitbucket.org/ecollins/passlib/wiki/Home/"
|
||||
SRC_URI="mirror://pypi/p/${PN}/${P}.tar.gz"
|
||||
|
||||
LICENSE="BSD-2"
|
||||
KEYWORDS="amd64 ~arm ~arm64 ~hppa ~sparc x86"
|
||||
SLOT="0"
|
||||
IUSE="+bcrypt doc +scrypt test +totp"
|
||||
|
||||
RDEPEND="bcrypt? ( dev-python/bcrypt[${PYTHON_USEDEP}] )
|
||||
totp? ( dev-python/cryptography[${PYTHON_USEDEP}] )
|
||||
scrypt? ( dev-python/scrypt[${PYTHON_USEDEP}] )"
|
||||
DEPEND="${RDEPEND}
|
||||
dev-python/setuptools[${PYTHON_USEDEP}]
|
||||
test? ( dev-python/nose[${PYTHON_USEDEP}] )"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/passlib-1.7.1-tests.patch"
|
||||
)
|
||||
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
python_test() {
|
||||
nosetests -v -w "${BUILD_DIR}"/lib || die "Tests fail with ${EPYTHON}"
|
||||
}
|
||||
|
||||
python_install_all() {
|
||||
distutils-r1_python_install_all
|
||||
use doc && dodoc docs/{*.rst,requirements.txt,lib/*.rst}
|
||||
}
|
Loading…
Reference in New Issue