public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: "Zoltán Böszörményi" <zboszor@gmail.com>
To: openembedded-core@lists.openembedded.org
Cc: "Bartosz Golaszewski" <brgl@kernel.org>,
	"Trevor Gamblin" <tgamblin@baylibre.com>,
	"Alexander Kanavin" <alex.kanavin@gmail.com>,
	"Zoltán Böszörményi" <zboszor@gmail.com>
Subject: [RFC][PATCH 12/14] rpm: Support Python freethreading
Date: Wed, 25 Mar 2026 12:24:22 +0100	[thread overview]
Message-ID: <20260325113112.1163632-13-zboszor@gmail.com> (raw)
In-Reply-To: <20260325113112.1163632-1-zboszor@gmail.com>

Added a patch to stop using the stable CPython API (of 3.7!)
as it prevents building rpm against a Python build with
freethreading enabled.

Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com>
---
 .../files/0001-rpm-Don-t-use-stable-API.patch | 37 +++++++++++++++++++
 meta/recipes-devtools/rpm/rpm_4.20.1.bb       |  1 +
 2 files changed, 38 insertions(+)
 create mode 100644 meta/recipes-devtools/rpm/files/0001-rpm-Don-t-use-stable-API.patch

diff --git a/meta/recipes-devtools/rpm/files/0001-rpm-Don-t-use-stable-API.patch b/meta/recipes-devtools/rpm/files/0001-rpm-Don-t-use-stable-API.patch
new file mode 100644
index 0000000000..3d82fdab3f
--- /dev/null
+++ b/meta/recipes-devtools/rpm/files/0001-rpm-Don-t-use-stable-API.patch
@@ -0,0 +1,37 @@
+From 2fb202730b49538bbe6d1439d419c18a89eb4c91 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Zolt=C3=A1n=20B=C3=B6sz=C3=B6rm=C3=A9nyi?=
+ <zboszor@gmail.com>
+Date: Wed, 25 Mar 2026 08:20:13 +0100
+Subject: [PATCH] rpm: Don't use stable API
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+With Python freethreading enabled, these explicit errors are
+triggered in the Python headers:
+
+  #error "The limited API is not currently supported in the free-threaded build"
+
+Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com>
+Upstream-Status: Inappropriate [python freethreading specific]
+---
+ python/CMakeLists.txt | 3 ---
+ 1 file changed, 3 deletions(-)
+
+diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt
+index acc003ad6..3f21205c8 100644
+--- a/python/CMakeLists.txt
++++ b/python/CMakeLists.txt
+@@ -18,9 +18,6 @@ Python3_add_library(_rpm
+ 	spec-py.c spec-py.h
+ )
+ 
+-# Select Python stable ABI
+-target_compile_definitions(_rpm PRIVATE Py_LIMITED_API=0x03070000)
+-
+ target_link_libraries(_rpm PRIVATE librpmio librpm librpmbuild librpmsign)
+ 
+ install(TARGETS _rpm
+-- 
+2.53.0
+
diff --git a/meta/recipes-devtools/rpm/rpm_4.20.1.bb b/meta/recipes-devtools/rpm/rpm_4.20.1.bb
index ba967ec1fa..05be3933e0 100644
--- a/meta/recipes-devtools/rpm/rpm_4.20.1.bb
+++ b/meta/recipes-devtools/rpm/rpm_4.20.1.bb
@@ -39,6 +39,7 @@ SRC_URI = "git://github.com/rpm-software-management/rpm;branch=rpm-4.20.x;protoc
            file://0002-rpmio-rpmglob.c-avoid-using-GLOB_BRACE-if-undefined-.patch \
            file://0001-CMakeLists.txt-set-libdir-to-CMAKE_INSTALL_FULL_LIBD.patch \
            file://0001-CMakeLists.txt-Fix-checking-for-CFLAGS.patch \
+           file://0001-rpm-Don-t-use-stable-API.patch \
            "
 
 PE = "1"
-- 
2.53.0



  parent reply	other threads:[~2026-03-25 11:32 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-25 11:24 [RFC][PATCH 00/14] Support Python freethreading Zoltán Böszörményi
2026-03-25 11:24 ` [RFC][PATCH 01/14] python3-dir.bbclass: Support python freethreading Zoltán Böszörményi
2026-03-25 11:24 ` [RFC][PATCH 02/14] python3: Adapt recipe to freethreading Zoltán Böszörményi
2026-03-25 11:24 ` [RFC][PATCH 03/14] python3native.bbclass: Fix settings Zoltán Böszörményi
2026-03-25 11:24 ` [RFC][PATCH 04/14] python_pyo3.bbclass: Pass ABI flag and PYTHON_MAINVERSION Zoltán Böszörményi
2026-03-25 11:24 ` [RFC][PATCH 05/14] clang: Use PYTHON_MAINVERSION for python module versioning Zoltán Böszörményi
2026-03-25 11:24 ` [RFC][PATCH 06/14] gdb, gdb-cross-canadian: Fix settings for python freethreading Zoltán Böszörményi
2026-03-25 11:24 ` [RFC][PATCH 07/14] boost: " Zoltán Böszörményi
2026-03-25 11:24 ` [RFC][PATCH 08/14] lttng-tools: Simplify setting PYTHON_INCLUDE Zoltán Böszörményi
2026-03-25 11:24 ` [RFC][PATCH 09/14] lttng-ust: " Zoltán Böszörményi
2026-03-25 11:24 ` [RFC][PATCH 10/14] libcap-ng-python: Use PYTHON_DIR for FILES Zoltán Böszörményi
2026-03-25 11:24 ` [RFC][PATCH 11/14] hwlatdetect: Use PYTHON_DIR to support python freethreading Zoltán Böszörményi
2026-03-25 11:24 ` Zoltán Böszörményi [this message]
2026-03-25 11:24 ` [RFC][PATCH 13/14] xcb-proto: Support Python freethreading Zoltán Böszörményi
2026-03-25 11:24 ` [RFC][PATCH 14/14] libxcb: " Zoltán Böszörményi
2026-03-25 12:58 ` [RFC][PATCH 00/14] " Alexander Kanavin
2026-03-25 13:08   ` Böszörményi Zoltán
2026-03-25 13:01 ` [OE-core] " Bruce Ashfield
2026-03-25 13:13   ` Böszörményi Zoltán
2026-03-25 13:17     ` Bruce Ashfield
2026-03-25 13:51       ` Böszörményi Zoltán
2026-03-25 14:17         ` Bruce Ashfield
2026-03-26  5:29           ` Böszörményi Zoltán
     [not found]           ` <18A04D0ADBD32036.57592@lists.openembedded.org>
2026-03-26  5:41             ` Böszörményi Zoltán

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260325113112.1163632-13-zboszor@gmail.com \
    --to=zboszor@gmail.com \
    --cc=alex.kanavin@gmail.com \
    --cc=brgl@kernel.org \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=tgamblin@baylibre.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox