From 2afb480854b634d836c10e45a3522d87ee308fd9 Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Wed, 1 Apr 2020 09:32:35 -0400 Subject: [PATCH] Fix build against Python 3.9 Resolves: rhbz#1817665 Signed-off-by: Stephen Gallagher --- ...-valgrind-suppression-for-Python-3.9.patch | 37 +++++++++++++++++++ libmodulemd.spec | 7 +++- 2 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 0001-additional-valgrind-suppression-for-Python-3.9.patch diff --git a/0001-additional-valgrind-suppression-for-Python-3.9.patch b/0001-additional-valgrind-suppression-for-Python-3.9.patch new file mode 100644 index 0000000..1eafb6b --- /dev/null +++ b/0001-additional-valgrind-suppression-for-Python-3.9.patch @@ -0,0 +1,37 @@ +From b1feeb990f536147d5c49c6d002b04a9436eeea2 Mon Sep 17 00:00:00 2001 +From: Merlin Mathesius +Date: Fri, 27 Mar 2020 13:53:13 -0500 +Subject: [PATCH] additional valgrind suppression for Python 3.9 + +--- + contrib/valgrind/libmodulemd-python.supp | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +diff --git a/contrib/valgrind/libmodulemd-python.supp b/contrib/valgrind/libmodulemd-python.supp +index fe9814d86daa340ec1283becee78514d1d93e3ff..080669825eab28459e032488f348cf8a90455e23 100644 +--- a/contrib/valgrind/libmodulemd-python.supp ++++ b/contrib/valgrind/libmodulemd-python.supp +@@ -54,10 +54,20 @@ + fun:g_malloc + fun:g_strdup + ... + fun:PyObject_SetAttr + } ++{ ++ Handle Python 3.9 PyMalloc confusing valgrind ++ Memcheck:Leak ++ fun:malloc ++ fun:PyThread_allocate_lock ++ ... ++ fun:Py_InitializeFromConfig ++ ... ++ fun:Py_BytesMain ++} + { + Python3 Unicode uninitialized value + Memcheck:Cond + fun:PyUnicode_Decode + ... +-- +2.25.1 + diff --git a/libmodulemd.spec b/libmodulemd.spec index 75c1677..a62f3c9 100644 --- a/libmodulemd.spec +++ b/libmodulemd.spec @@ -15,7 +15,7 @@ Name: %{upstream_name}%{?v2_suffix} Version: 2.9.2 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Module metadata manipulation library License: MIT @@ -46,6 +46,7 @@ BuildRequires: help2man # Patches +Patch0001: 0001-additional-valgrind-suppression-for-Python-3.9.patch %description @@ -177,6 +178,10 @@ mv %{buildroot}%{_mandir}/man1/modulemd-validator.1 \ %changelog +* Wed Apr 01 2020 Stephen Gallagher - 2.9.2-3 +- Fix build against Python 3.9 +- Resolves: rhbz#1817665 + * Wed Mar 11 2020 Stephen Gallagher - 2.9.2-2 - new upstream release: 2.9.2