From c45e25b7dee3d4fbca0e6846b3a5056460bf1c1b835033e4e171f19b425f8ebd Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Thu, 29 Aug 2024 04:41:42 +0000 Subject: [PATCH] - Add patch fix-lxml-incompat.patch: * Cast to avoid an incompatibility with lxml. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-xmlsec?expand=0&rev=31 --- fix-lxml-incompat.patch | 24 ++++++++++++++++++++++++ python-xmlsec.changes | 6 ++++++ python-xmlsec.spec | 4 +++- 3 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 fix-lxml-incompat.patch diff --git a/fix-lxml-incompat.patch b/fix-lxml-incompat.patch new file mode 100644 index 0000000..cf248be --- /dev/null +++ b/fix-lxml-incompat.patch @@ -0,0 +1,24 @@ +From 67cd4ac73e4fceac4b4eb6a320067cad33f79213 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= +Date: Wed, 19 Jun 2024 17:43:07 +0200 +Subject: [PATCH] Explicitly cast the pointer type in + PyXmlSec_ClearReplacedNodes + +Fixes https://github.com/xmlsec/python-xmlsec/issues/323 +--- + src/enc.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/enc.c b/src/enc.c +index 5453ef9..c2bc94b 100644 +--- a/src/enc.c ++++ b/src/enc.c +@@ -204,7 +204,7 @@ static void PyXmlSec_ClearReplacedNodes(xmlSecEncCtxPtr ctx, PyXmlSec_LxmlDocume + PYXMLSEC_DEBUGF("clear replaced node %p", n); + nn = n->next; + // if n has references, it will not be deleted +- elem = PyXmlSec_elementFactory(doc, n); ++ elem = (PyXmlSec_LxmlElementPtr*)PyXmlSec_elementFactory(doc, n); + if (NULL == elem) + xmlFreeNode(n); + else diff --git a/python-xmlsec.changes b/python-xmlsec.changes index fee1918..adaa8d9 100644 --- a/python-xmlsec.changes +++ b/python-xmlsec.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Aug 29 04:40:55 UTC 2024 - Steve Kowalik + +- Add patch fix-lxml-incompat.patch: + * Cast to avoid an incompatibility with lxml. + ------------------------------------------------------------------- Mon Jun 10 08:20:00 UTC 2024 - Dirk Müller diff --git a/python-xmlsec.spec b/python-xmlsec.spec index 0cf1843..7fb4597 100644 --- a/python-xmlsec.spec +++ b/python-xmlsec.spec @@ -24,6 +24,8 @@ Summary: Python bindings for the XML Security Library License: MIT URL: https://github.com/mehcode/python-xmlsec Source: https://files.pythonhosted.org/packages/source/x/xmlsec/xmlsec-%{version}.tar.gz +# PATCH-FIX-UPSTREAM gh#xmlsec/python-xmlsec#325 +Patch0: fix-lxml-incompat.patch BuildRequires: %{python_module devel} BuildRequires: %{python_module hypothesis} BuildRequires: %{python_module lxml >= 3.8.0} @@ -74,7 +76,7 @@ donttest="test_sign_case5" %doc README.rst %license LICENSE %{python_sitearch}/xmlsec -%{python_sitearch}/xmlsec-%{version}*-info +%{python_sitearch}/xmlsec-%{version}.dist-info %{python_sitearch}/xmlsec*.so %changelog