summaryrefslogtreecommitdiff
path: root/dev-python/bcrypt
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-10-06 04:27:04 +0100
committerV3n3RiX <venerix@koprulu.sector>2024-10-06 04:27:04 +0100
commitd6106fb0c1ab8f79024ab6a9ac2062ddc85d4e07 (patch)
treef3a4ad4dcf443e9351fa5dec88afeeec86c9b642 /dev-python/bcrypt
parentf3f72d0d5f1ae9ee74acaa63ccb7a247468e73bf (diff)
gentoo auto-resync : 06:10:2024 - 04:27:04
Diffstat (limited to 'dev-python/bcrypt')
-rw-r--r--dev-python/bcrypt/Manifest2
-rw-r--r--dev-python/bcrypt/bcrypt-4.2.0-r2.ebuild97
-rw-r--r--dev-python/bcrypt/files/bcrypt-4.2.0-patch-pyo3-subinterp.patch23
3 files changed, 122 insertions, 0 deletions
diff --git a/dev-python/bcrypt/Manifest b/dev-python/bcrypt/Manifest
index 58671f11ee71..cd8a0f958fc7 100644
--- a/dev-python/bcrypt/Manifest
+++ b/dev-python/bcrypt/Manifest
@@ -1,3 +1,4 @@
+AUX bcrypt-4.2.0-patch-pyo3-subinterp.patch 1013 BLAKE2B d5ddee059e0e9d853dfd21b619dbdbe7c95e41907dae02c842d4b7c38b142e84105b6d5e5cca801b792e1a4e14cf582e4a652cc3766747ebd9bf361383388b15 SHA512 116cf225de7de09a231b6386db2df3b7b1a7c9685c89c04b4e370255c45a6f3d09da19e02b62df506751a9644aa368309be297952751a5c6a93d680eb27f9945
DIST autocfg-1.3.0.crate 16524 BLAKE2B 7d5a03853d6b4f0da08d8e139fb200da21e47fa7e50d1956270d0ff0cc496f660f8f800122c95eee9ba98d9210ab200c3010b782097483d12d6be4ac0df0e7c9 SHA512 a5570b955d57a7183ba148b335837dc5af24b202e80681027536d33fe2822509ba644fc70c29f018c893285ced2bf6774f44ca6c59f7c7e2226d5349cf7c3635
DIST base64-0.22.1.crate 81597 BLAKE2B 6f216a560bd36e6e6b74e908344b457594cc768d9763070e269b56a14b150cbfc4b7f599d4c2a0a5f783638170ee132f0796fefb14fcac7fd73c58db0791007a SHA512 91cf2e4e7fc8815f9b8a86a7fa722a20eee3dc1dd57111b29e420de87ce7836bcdb1db01d3cafb9a977710ef63e7cc41b7772762323e68e0e832156858aace20
DIST bcrypt-0.15.1.crate 11628 BLAKE2B 71072e92ac88393d5e7676f5afeb16ef8588232f390f02ad15b5ad31ca3a96daa431f867aa6cd52aff81be0cea43c46dbcf53edbf7db571556ea746a5b1713dc SHA512 40d4bec4a7a52a54b3be16e9fe52b8f2734c0f1e36bfa76059d5edb75339b125d70416919ad1c47df569f4abe6723470731bded3b7335c77b4967ea024cc7217
@@ -38,5 +39,6 @@ DIST unindent-0.2.3.crate 7306 BLAKE2B a57407b117e99c230750c7d4a2a0899586c8271e4
DIST version_check-0.9.4.crate 14895 BLAKE2B fa1fa4008af165bfc1fdbe560488afd9d232cfafee94104fbcc4cbc52f234849bff9ddfa88109a1ac682f6d9c1d86b0459893d223f64e65adc08966aaf93dc89 SHA512 b172dc9a3759a4a683ffc39b9a40b03b9974b626a088217de87090466cef695226557c226cf3e469b2b25ee7297b7eb0d7719878cab42457f80146a81943c0c8
DIST wasi-0.11.0+wasi-snapshot-preview1.crate 28131 BLAKE2B fe501889f25d65e2d032f885cc50c4f8bf7dd70fd5cbc438de349838370d8699e9627b0a4fc76030ea9fe6d508f41d0c9928a875fdbc47e73bfb17241cf7b155 SHA512 043500ab28cd9cb779475255da5d109ebab7fccca72b64873dc28d77bc5a157ba8d96b9e8f05223b5b36c7089bb7b4ba87657fc69bac16b78972f897294a865f
DIST zeroize-1.8.1.crate 20029 BLAKE2B 092eba034cd35ec47290020e0c2b213177ff5dbe14ab9e7f0b4ef3cb1ecbc42fbec2b951414e26ab00bc65aaddc2c93eddd5a1963b27c6cd613ac71c65d5cc24 SHA512 dd40ebe98b98fd742608d4066b5ab66caba94b2e679428fcaff9fe547d8cd6ff2360dc85d671ee9183e32fb79cb554d00d6aef9eb8f3d8ad0ec92d0435aa4ebe
+EBUILD bcrypt-4.2.0-r2.ebuild 2006 BLAKE2B d9a598c72b4fbfb62cc132c08ce2a8a0bb34544af1dff653a3f04e354ef259b5771209f314f04878d70687aed4dc269b9fffa6ede3257cd6e1db6fdeb91dea63 SHA512 2cbcae1d5c698755b6014a0cca5f634186c4775f0ee0840005211bb9c6932d92cf7030ac2a9e24f75d682efefe85269eda87cc792ee51db54d163969aba9259b
EBUILD bcrypt-4.2.0.ebuild 1613 BLAKE2B a515247a1d4963e3d9e9db1ca866afb58e6bb0fbc9941cea739be7cb71ba032a70a9de0c7759a737af7e4e51b57bab38bda93a5a7831d0e870c7e80ea5f3591d SHA512 95f5e9c19ceadfff11d037d4fbf0178d431091c4df4eb1dce09a4640f7b9e9f5c00a4cc3bfd11c083706bf73fffbe838afd1380f349957f95375883e6fc79d0f
MISC metadata.xml 486 BLAKE2B 874ef427438f2a2adc0529010628dd40505fd2597e267b8e51641d95b4c3bd8dab28d0fcd86c23f24c3abc866bd049d5e44438b282a5a13b023320491303a5b5 SHA512 de2e0a2a60b83a660a7c51315816a2762d9ebdb031656b8968da641d4e3897e4f5eb7a3432f828182f733ee4ffd17f11e8fb97d9a72f1a7eec56bb2f46978293
diff --git a/dev-python/bcrypt/bcrypt-4.2.0-r2.ebuild b/dev-python/bcrypt/bcrypt-4.2.0-r2.ebuild
new file mode 100644
index 000000000000..7399455166ac
--- /dev/null
+++ b/dev-python/bcrypt/bcrypt-4.2.0-r2.ebuild
@@ -0,0 +1,97 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_EXT=1
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{10..13} pypy3 )
+
+CRATES="
+ autocfg@1.3.0
+ base64@0.22.1
+ bcrypt-pbkdf@0.10.0
+ bcrypt@0.15.1
+ block-buffer@0.10.4
+ blowfish@0.9.1
+ byteorder@1.5.0
+ cfg-if@1.0.0
+ cipher@0.4.4
+ cpufeatures@0.2.12
+ crypto-common@0.1.6
+ digest@0.10.7
+ generic-array@0.14.7
+ getrandom@0.2.15
+ heck@0.5.0
+ indoc@2.0.5
+ inout@0.1.3
+ libc@0.2.155
+ memoffset@0.9.1
+ once_cell@1.19.0
+ pbkdf2@0.12.2
+ portable-atomic@1.7.0
+ proc-macro2@1.0.86
+ pyo3-build-config@0.22.2
+ pyo3-ffi@0.22.2
+ pyo3-macros-backend@0.22.2
+ pyo3-macros@0.22.2
+ pyo3@0.22.2
+ quote@1.0.36
+ sha2@0.10.8
+ subtle@2.6.1
+ syn@2.0.72
+ target-lexicon@0.12.15
+ typenum@1.17.0
+ unicode-ident@1.0.12
+ unindent@0.2.3
+ version_check@0.9.4
+ wasi@0.11.0+wasi-snapshot-preview1
+ zeroize@1.8.1
+"
+
+inherit cargo distutils-r1 pypi
+
+DESCRIPTION="Modern password hashing for software and servers"
+HOMEPAGE="
+ https://github.com/pyca/bcrypt/
+ https://pypi.org/project/bcrypt/
+"
+SRC_URI+="
+ ${CARGO_CRATE_URIS}
+"
+
+LICENSE="Apache-2.0"
+# Dependent crate licenses
+LICENSE+=" Apache-2.0-with-LLVM-exceptions BSD MIT Unicode-DFS-2016"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+
+BDEPEND="
+ >=dev-python/setuptools-rust-1.7.0[${PYTHON_USEDEP}]
+"
+
+# Rust
+QA_FLAGS_IGNORED="usr/lib.*/py.*/site-packages/bcrypt/_bcrypt.*.so"
+
+distutils_enable_tests pytest
+
+export UNSAFE_PYO3_SKIP_VERSION_CHECK=1
+
+src_prepare() {
+ distutils-r1_src_prepare
+
+ cd "${ECARGO_VENDOR}"/pyo3-0*/ || die
+ eapply "${FILESDIR}/bcrypt-4.2.0-patch-pyo3-subinterp.patch"
+}
+
+python_configure_all() {
+ # Workaround for sys-cluster/ceph (bug #920906)
+ # https://github.com/pyca/bcrypt/issues/694
+ # https://github.com/PyO3/pyo3/issues/3451
+ export RUSTFLAGS="${RUSTFLAGS} --cfg pyo3_unsafe_allow_subinterpreters"
+}
+
+python_test() {
+ local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
+ epytest tests
+}
diff --git a/dev-python/bcrypt/files/bcrypt-4.2.0-patch-pyo3-subinterp.patch b/dev-python/bcrypt/files/bcrypt-4.2.0-patch-pyo3-subinterp.patch
new file mode 100644
index 000000000000..964dd964fa93
--- /dev/null
+++ b/dev-python/bcrypt/files/bcrypt-4.2.0-patch-pyo3-subinterp.patch
@@ -0,0 +1,23 @@
+https://bugs.gentoo.org/920906
+https://github.com/pyca/bcrypt/issues/694
+https://github.com/PyO3/pyo3/issues/3451
+https://src.fedoraproject.org/rpms/rust-pyo3/raw/rawhide/f/0001-Make-unsafe-subinterpreter-support-available-via-cfg.patch
+
+From d59176bc05aa37838fd4a8dd253f47c962f61118 Mon Sep 17 00:00:00 2001
+From: Fabio Valentini <decathorpe@gmail.com>
+Date: Tue, 23 Jul 2024 14:41:04 +0200
+Subject: [PATCH] Make unsafe subinterpreter support available via cfg flag
+
+--- a/src/impl_/pymodule.rs
++++ b/src/impl_/pymodule.rs
+@@ -107,7 +107,7 @@ impl ModuleDef {
+ // that static data is not reused across interpreters.
+ //
+ // PyPy does not have subinterpreters, so no need to check interpreter ID.
+- #[cfg(not(any(PyPy, GraalPy)))]
++ #[cfg(not(any(PyPy, GraalPy, pyo3_unsafe_allow_subinterpreters)))]
+ {
+ // PyInterpreterState_Get is only available on 3.9 and later, but is missing
+ // from python3.dll for Windows stable API on 3.9
+--
+2.45.2