summaryrefslogtreecommitdiff
path: root/dev-python/passlib
diff options
context:
space:
mode:
authorroot <root@alpha.trunkmasters.com>2026-06-12 19:09:37 -0500
committerroot <root@alpha.trunkmasters.com>2026-06-12 19:09:37 -0500
commitb590c8d7572b727d565cc0b8ff660d43569845de (patch)
tree06f7a4102ea4e845df8b66660f252920d52952f9 /dev-python/passlib
parent24f9cbfc4c34fdb6a6e03311674414e881ceab47 (diff)
downloadbaldeagleos-repo-b590c8d7572b727d565cc0b8ff660d43569845de.tar.gz
baldeagleos-repo-b590c8d7572b727d565cc0b8ff660d43569845de.tar.xz
baldeagleos-repo-b590c8d7572b727d565cc0b8ff660d43569845de.zip
Adding metadata
Diffstat (limited to 'dev-python/passlib')
-rw-r--r--dev-python/passlib/Manifest2
-rw-r--r--dev-python/passlib/files/passlib-1.7.4-bcrypt.patch21
-rw-r--r--dev-python/passlib/metadata.xml18
-rw-r--r--dev-python/passlib/passlib-1.7.4-r5.ebuild85
-rw-r--r--dev-python/passlib/passlib-1.9.3.ebuild63
5 files changed, 189 insertions, 0 deletions
diff --git a/dev-python/passlib/Manifest b/dev-python/passlib/Manifest
new file mode 100644
index 000000000000..67c0ac3ae6e4
--- /dev/null
+++ b/dev-python/passlib/Manifest
@@ -0,0 +1,2 @@
+DIST libpass-1.9.3.tar.gz 692901 BLAKE2B b7b19ae4a9e7e2d65062d8d51e11fb8caec1da7bedacf88b9b2114013d2a578e64a5ca195d168982a52f7ca143eea5adbc5b33c955e175b7f2dda07bd93e24a2 SHA512 2581412ed18d3b2953f2679a05ce7158095850fb37e16a744a1c80bd1afbcf2d0852619ff9b06322b38004ff01e0d335cefaecb49cf9552a6a478566067aa0bc
+DIST passlib-1.7.4.tar.gz 689844 BLAKE2B 38f616105ba70cf93cf36383c73f2a4da7bf66ced2844effffe74d9f7c29ee0aece5652974dd1414f16e32fbe6957e2e921cf01bc59daa70195a6d50a4a3bf2f SHA512 350bd6da5ac57e6c266ffe8bf9684c8c2cce3fc6b513eb6c7bc1b302d2d8a1b701e9c01c953782520a2ac37b7ec1f6d7bd5855f99f6ee0e2dbbf33f2d49a9530
diff --git a/dev-python/passlib/files/passlib-1.7.4-bcrypt.patch b/dev-python/passlib/files/passlib-1.7.4-bcrypt.patch
new file mode 100644
index 000000000000..19bb604dbef4
--- /dev/null
+++ b/dev-python/passlib/files/passlib-1.7.4-bcrypt.patch
@@ -0,0 +1,21 @@
+diff -r 7aafcc60b4f5 passlib/handlers/bcrypt.py
+--- a/passlib/handlers/bcrypt.py Thu Oct 08 15:01:32 2020 -0400
++++ b/passlib/handlers/bcrypt.py Wed Oct 01 09:04:12 2025 +0200
+@@ -366,6 +366,8 @@
+ NOTE: if in future we need to deliberately create hashes which have this bug,
+ can use something like 'hashpw(repeat_string(secret[:((1+secret) % 256) or 1]), 72)'
+ """
++ return False
++
+ # check if it exhibits wraparound bug
+ secret = (b"0123456789"*26)[:255]
+ bug_hash = ident.encode("ascii") + b"04$R1lJ2gkNaoPGdafE.H.16.nVyh2niHsGJhayOHLMiXlI45o8/DU.6"
+@@ -609,7 +611,7 @@
+ except ImportError: # pragma: no cover
+ return False
+ try:
+- version = _bcrypt.__about__.__version__
++ version = _bcrypt.__version__
+ except:
+ log.warning("(trapped) error reading bcrypt version", exc_info=True)
+ version = '<unknown>'
diff --git a/dev-python/passlib/metadata.xml b/dev-python/passlib/metadata.xml
new file mode 100644
index 000000000000..606c1115c64a
--- /dev/null
+++ b/dev-python/passlib/metadata.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://docs.baldeagleos.com/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>
+ <stabilize-allarches />
+ <origin>baldeagleos-repo</origin>
+</pkgmetadata>
diff --git a/dev-python/passlib/passlib-1.7.4-r5.ebuild b/dev-python/passlib/passlib-1.7.4-r5.ebuild
new file mode 100644
index 000000000000..3cc6320df1ca
--- /dev/null
+++ b/dev-python/passlib/passlib-1.7.4-r5.ebuild
@@ -0,0 +1,85 @@
+# Copyright 1999-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{13..14} )
+
+inherit distutils-r1 optfeature pypi
+
+DESCRIPTION="Password hashing framework supporting over 20 schemes"
+HOMEPAGE="
+ https://foss.heptapod.net/python-libs/passlib/-/wikis/home
+ https://pypi.org/project/passlib/
+"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~x64-macos"
+IUSE="doc test-rust"
+
+RDEPEND="
+ dev-python/pkg-resources[${PYTHON_USEDEP}]
+"
+BDEPEND="
+ test? (
+ dev-python/scrypt[${PYTHON_USEDEP}]
+ test-rust? (
+ dev-python/bcrypt[${PYTHON_USEDEP}]
+ dev-python/cryptography[${PYTHON_USEDEP}]
+ )
+ )
+"
+
+EPYTEST_PLUGINS=()
+EPYTEST_XDIST=1
+distutils_enable_tests pytest
+
+src_prepare() {
+ local PATCHES=(
+ # combined bcrypt compatibility fixes
+ # https://foss.heptapod.net/python-libs/passlib/-/issues/190
+ # https://foss.heptapod.net/python-libs/passlib/-/issues/196
+ "${FILESDIR}/${P}-bcrypt.patch"
+ )
+
+ distutils-r1_src_prepare
+}
+
+python_test() {
+ local EPYTEST_DESELECT=(
+ # broken all the time by new django releases
+ passlib/tests/test_ext_django.py
+
+ # bcrypt now disallows implicit password truncation
+ passlib/tests/test_handlers_bcrypt.py::bcrypt_bcrypt_test::test_70_hashes
+ passlib/tests/test_handlers_bcrypt.py::bcrypt_bcrypt_test::test_secret_w_truncate_size
+ passlib/tests/test_handlers_django.py::django_bcrypt_test::test_secret_w_truncate_size
+ )
+
+ case ${EPYTHON} in
+ python3.13*|python3.14*)
+ EPYTEST_DESELECT+=(
+ # crypt module has been removed, so the platform backend
+ # does not work anymore
+ passlib/tests/test_handlers.py::{des,md5,sha256,sha512}_crypt_os_crypt_test
+ )
+ ;;
+ esac
+
+ # skip fuzzing tests, they are very slow
+ epytest -k "not fuzz_input"
+}
+
+python_install_all() {
+ distutils-r1_python_install_all
+ use doc && dodoc docs/{*.rst,requirements.txt,lib/*.rst}
+}
+
+pkg_postinst() {
+ optfeature "Argon2 support" dev-python/argon2-cffi
+ optfeature "bcrypt support" dev-python/bcrypt
+ optfeature "scrypt support" dev-python/scrypt
+ optfeature "Time-based One-Time Password (TOTP) support" dev-python/cryptography
+}
diff --git a/dev-python/passlib/passlib-1.9.3.ebuild b/dev-python/passlib/passlib-1.9.3.ebuild
new file mode 100644
index 000000000000..fc2caba459bb
--- /dev/null
+++ b/dev-python/passlib/passlib-1.9.3.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=hatchling
+PYPI_PN=libpass
+PYTHON_COMPAT=( python3_{13..14} )
+
+inherit distutils-r1 optfeature pypi
+
+DESCRIPTION="Fork of passlib, a password hashing framework"
+HOMEPAGE="
+ https://github.com/notypecheck/passlib/
+ https://pypi.org/project/libpass/
+"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~x64-macos"
+IUSE="doc test-rust"
+
+BDEPEND="
+ test? (
+ dev-python/scrypt[${PYTHON_USEDEP}]
+ test-rust? (
+ >=dev-python/bcrypt-3.1.0[${PYTHON_USEDEP}]
+ >=dev-python/cryptography-43.0.1[${PYTHON_USEDEP}]
+ )
+ )
+"
+
+EPYTEST_PLUGINS=()
+EPYTEST_XDIST=1
+distutils_enable_tests pytest
+
+python_test() {
+ local EPYTEST_DESELECT=(
+ # bcrypt now disallows implicit password truncation
+ # https://github.com/notypecheck/passlib/pull/25
+ tests/test_handlers_bcrypt.py::bcrypt_bcrypt_test::test_70_hashes
+ tests/test_handlers_bcrypt.py::bcrypt_bcrypt_test::test_secret_w_truncate_size
+ tests/test_handlers_django.py::django_bcrypt_test::test_secret_w_truncate_size
+
+ # assumes scrypt dep is not installed
+ tests/test_crypto_scrypt.py::BuiltinScryptTest::test_missing_backend
+ )
+
+ # skip fuzzing tests, they are very slow
+ epytest -k "not fuzz_input"
+}
+
+python_install_all() {
+ distutils-r1_python_install_all
+ use doc && dodoc docs/{*.rst,requirements.txt,lib/*.rst}
+}
+
+pkg_postinst() {
+ optfeature "Argon2 support" dev-python/argon2-cffi
+ optfeature "bcrypt support" dev-python/bcrypt
+ optfeature "scrypt support" dev-python/scrypt
+ optfeature "Time-based One-Time Password (TOTP) support" dev-python/cryptography
+}