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 <[email protected]> --- .../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?= + <[email protected]> +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 <[email protected]> +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
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#233886): https://lists.openembedded.org/g/openembedded-core/message/233886 Mute This Topic: https://lists.openembedded.org/mt/118499160/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
