From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id BA80415808B for ; Sat, 5 Oct 2024 05:35:18 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E222FE29BE; Sat, 5 Oct 2024 05:35:17 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 9B15FE29BE for ; Sat, 5 Oct 2024 05:35:17 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id C6751340BDE for ; Sat, 5 Oct 2024 05:35:16 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 1AECD11DF for ; Sat, 5 Oct 2024 05:35:15 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1728106355.88f355bfa33622b26d1a9d958e1593527cf3dc97.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/bcrypt/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-python/bcrypt/bcrypt-4.2.0-r1.ebuild X-VCS-Directories: dev-python/bcrypt/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 88f355bfa33622b26d1a9d958e1593527cf3dc97 X-VCS-Branch: master Date: Sat, 5 Oct 2024 05:35:15 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: b922f020-bf4b-4996-9bdd-b1c4f51283b5 X-Archives-Hash: 4ecddfeaeb4e927cbf494526c03ab79e commit: 88f355bfa33622b26d1a9d958e1593527cf3dc97 Author: Sam James gentoo org> AuthorDate: Sat Oct 5 05:32:35 2024 +0000 Commit: Sam James gentoo org> CommitDate: Sat Oct 5 05:32:35 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=88f355bf dev-python/bcrypt: add workaround for sys-cluster/ceph Do as Fedora have done and enable the pyo3_unsafe_allow_subinterpreters feature temporarily for the benefit of sys-cluster/ceph. It's not ideal but it's only going to affect people who choose to use it in their applications and that should only be ceph. From what I've read, ceph was using these the whole time, just the check wasn't firing. Bug: https://bugs.gentoo.org/920906 Signed-off-by: Sam James gentoo.org> dev-python/bcrypt/bcrypt-4.2.0-r1.ebuild | 90 ++++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) diff --git a/dev-python/bcrypt/bcrypt-4.2.0-r1.ebuild b/dev-python/bcrypt/bcrypt-4.2.0-r1.ebuild new file mode 100644 index 000000000000..f2f6e6cf8b84 --- /dev/null +++ b/dev-python/bcrypt/bcrypt-4.2.0-r1.ebuild @@ -0,0 +1,90 @@ +# 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 + +python_configure() { + # 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 +}