summaryrefslogtreecommitdiff
path: root/dev-python/setproctitle
diff options
context:
space:
mode:
authorroot <root@alpha.trunkmasters.com>2026-07-05 03:04:45 -0500
committerroot <root@alpha.trunkmasters.com>2026-07-05 03:04:45 -0500
commit7d0655e0f85be0eec06807898321a634968f9336 (patch)
tree92e9bb71bf8517948f78ab1d52a1b06717367c62 /dev-python/setproctitle
parentd5f9077fde66bffd2bc6d193ae7c967e352a5562 (diff)
downloadbaldeagleos-repo-7d0655e0f85be0eec06807898321a634968f9336.tar.gz
baldeagleos-repo-7d0655e0f85be0eec06807898321a634968f9336.tar.xz
baldeagleos-repo-7d0655e0f85be0eec06807898321a634968f9336.zip
Adding metadata
Diffstat (limited to 'dev-python/setproctitle')
-rw-r--r--dev-python/setproctitle/files/setproctitle-1.3.7-py315.patch31
-rw-r--r--dev-python/setproctitle/setproctitle-1.3.7-r1.ebuild37
2 files changed, 68 insertions, 0 deletions
diff --git a/dev-python/setproctitle/files/setproctitle-1.3.7-py315.patch b/dev-python/setproctitle/files/setproctitle-1.3.7-py315.patch
new file mode 100644
index 000000000000..99a4fa11c4af
--- /dev/null
+++ b/dev-python/setproctitle/files/setproctitle-1.3.7-py315.patch
@@ -0,0 +1,31 @@
+From 68125abf821ee6ebfb4a4eb86ffe655a4c072c9e Mon Sep 17 00:00:00 2001
+From: Victor Stinner <vstinner@python.org>
+Date: Thu, 30 Oct 2025 15:12:24 +0100
+Subject: [PATCH] fix: fix segfault after clearenv() on Python 3.15
+
+Fix find_argv_from_env() if clearenv() has been called. Python 3.15
+implements os.environ.clear() as clearenv().
+
+Co-Authored-By: Karolina Surma <ksurma@redhat.com>
+---
+ src/spt_setup.c | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/src/spt_setup.c b/src/spt_setup.c
+index ba7a7a6..4078d36 100644
+--- a/src/spt_setup.c
++++ b/src/spt_setup.c
+@@ -139,6 +139,13 @@ find_argv_from_env(int argc, char *arg0)
+ }
+ buf[argc] = NULL;
+
++ /* environ can be NULL if clearenv() has been called.
++ * Python 3.15 implements os.environ.clear() as clearenv(). */
++ if (!environ) {
++ spt_debug("environ pointer is NULL");
++ goto exit;
++ }
++
+ /* Walk back from environ until you find argc-1 null-terminated strings.
+ * Don't look for argv[0] as it's probably not preceded by 0. */
+ ptr = environ[0];
diff --git a/dev-python/setproctitle/setproctitle-1.3.7-r1.ebuild b/dev-python/setproctitle/setproctitle-1.3.7-r1.ebuild
new file mode 100644
index 000000000000..d10d62a52cb0
--- /dev/null
+++ b/dev-python/setproctitle/setproctitle-1.3.7-r1.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+# The package has a fallback implementation which is a noop but warns
+# if the extensions weren't built, so we always build them.
+DISTUTILS_EXT=1
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{13..14} )
+
+inherit distutils-r1 pypi
+
+DESCRIPTION="Allow customization of the process title"
+HOMEPAGE="
+ https://github.com/dvarrazzo/py-setproctitle/
+ https://pypi.org/project/setproctitle/
+"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-macos ~x64-solaris"
+
+EPYTEST_PLUGINS=()
+distutils_enable_tests pytest
+
+src_prepare() {
+ local PATCHES=(
+ # https://github.com/dvarrazzo/py-setproctitle/commit/68125abf821ee6ebfb4a4eb86ffe655a4c072c9e
+ "${FILESDIR}/${P}-py315.patch"
+ )
+
+ distutils-r1_src_prepare
+
+ # remove the override that makes extension builds non-fatal
+ sed -i -e '/cmdclass/d' setup.py || die
+}