public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/trace-cmd] rawhide: Replace removed Python 2 C API macros for SWIG 4.5.0 compatibility
@ 2026-08-10  9:22 Jitka Plesnikova
  0 siblings, 0 replies; only message in thread
From: Jitka Plesnikova @ 2026-08-10  9:22 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/trace-cmd
Branch : rawhide
Commit : eff667a072e69238efc469775585b1b30c056187
Author : Jitka Plesnikova <jplesnik@redhat.com>
Date   : 2026-07-28T15:29:18+02:00
Stats  : +21/-2 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/trace-cmd/c/eff667a072e69238efc469775585b1b30c056187?branch=rawhide

Log:
Replace removed Python 2 C API macros for SWIG 4.5.0 compatibility

---
diff --git a/trace-cmd-swig45.patch b/trace-cmd-swig45.patch
new file mode 100644
index 0000000..c4303f1
--- /dev/null
+++ b/trace-cmd-swig45.patch
@@ -0,0 +1,12 @@
+diff -up trace-cmd-v3.3.1/python/ctracecmd.i.swig45 trace-cmd-v3.3.1/python/ctracecmd.i
+--- trace-cmd-v3.3.1/python/ctracecmd.i.swig45	2026-07-28 10:30:15.183770171 +0200
++++ trace-cmd-v3.3.1/python/ctracecmd.i	2026-07-28 10:30:15.188043290 +0200
+@@ -218,7 +218,7 @@ static int python_callback(struct trace_
+ 	result = PyObject_Call(context, arglist, NULL);
+ 	Py_XDECREF(arglist);
+ 	if (result && result != Py_None) {
+-		if (!PyInt_Check(result)) {
++		if (!PyLong_Check(result)) {
+ 			PyErr_SetString(PyExc_TypeError,
+ 					"callback must return int");
+ 			PyErr_Print();

diff --git a/trace-cmd.spec b/trace-cmd.spec
index 081c597..774c923 100644
--- a/trace-cmd.spec
+++ b/trace-cmd.spec
@@ -6,7 +6,7 @@
 
 Name: trace-cmd
 Version: %{srcversion}
-Release: 6%{?dist}
+Release: 7%{?dist}
 License: LGPL-2.1-only AND LGPL-2.1-or-later AND GPL-2.0-only AND GPL-2.0-or-later
 Summary: A user interface to Ftrace
 
@@ -22,6 +22,10 @@ Source1: trace-cmd.conf
 Source2: trace-cmd.service
 Source3: 98-trace-cmd.rules
 
+# Replace removed Python 2 C API macros with Python 3 equivalents
+# for compatibility with SWIG 4.5.0
+Patch0: trace-cmd-swig45.patch
+
 BuildRequires: make
 BuildRequires: gcc
 BuildRequires: xmlto
@@ -52,7 +56,7 @@ BuildRequires: python3-devel
 Python plugin support for trace-cmd
 
 %prep
-%autosetup -n %{name}-v%{srcversion}
+%autosetup -p1 -n %{name}-v%{srcversion}
 cp %{SOURCE1} .
 cp %{SOURCE2} .
 cp %{SOURCE3} .
@@ -102,6 +106,9 @@ rm -rf %{buildroot}/%{_mandir}/man3/*
 %{_libdir}/%{name}/python/
 
 %changelog
+* Tue Jul 28 2026 Jitka Plesnikova <jplesnik@redhat.com> - 3.3.1-7
+- Replace removed Python 2 C API macros for SWIG 4.5.0 compatibility
+
 * Fri Jul 17 2026 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.1-6
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild
 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-08-10  9:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-10  9:22 [rpms/trace-cmd] rawhide: Replace removed Python 2 C API macros for SWIG 4.5.0 compatibility Jitka Plesnikova

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox