diff --git a/1231587-build-libselinux-with-swig-4.3.0.patch b/1231587-build-libselinux-with-swig-4.3.0.patch new file mode 100644 index 0000000..c949640 --- /dev/null +++ b/1231587-build-libselinux-with-swig-4.3.0.patch @@ -0,0 +1,22 @@ +Index: libselinux-3.7/src/selinuxswig_python.i +=================================================================== +--- libselinux-3.7.orig/src/selinuxswig_python.i ++++ libselinux-3.7/src/selinuxswig_python.i +@@ -71,7 +71,7 @@ def install(src, dest): + for (i = 0; i < *$2; i++) { + PyList_SetItem(list, i, PyString_FromString((*$1)[i])); + } +- $result = SWIG_Python_AppendOutput($result, list); ++ $result = SWIG_Python_AppendOutput($result, list, $isvoid); + } + + /* return a sid along with the result */ +@@ -108,7 +108,7 @@ def install(src, dest): + plist = PyList_New(0); + } + +- $result = SWIG_Python_AppendOutput($result, plist); ++ $result = SWIG_Python_AppendOutput($result, plist, $isvoid); + } + + /* Makes functions in get_context_list.h return a Python list of contexts */ diff --git a/libselinux-bindings.changes b/libselinux-bindings.changes index 5a1d312..cb5dd1b 100644 --- a/libselinux-bindings.changes +++ b/libselinux-bindings.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Oct 15 11:42:31 UTC 2024 - Cathy Hu + +- Add 1231587-build-libselinux-with-swig-4.3.0.patch to fix build + failure with swig 4.3.0 (bsc#1231587) + ------------------------------------------------------------------- Mon Jul 1 07:53:14 UTC 2024 - Cathy Hu diff --git a/libselinux-bindings.spec b/libselinux-bindings.spec index a3cee3e..1f3baab 100644 --- a/libselinux-bindings.spec +++ b/libselinux-bindings.spec @@ -39,6 +39,9 @@ Patch5: skip_cycles.patch # Make linking working even when default pkg-config doesn’t provide -lpython Patch6: python3.8-compat.patch Patch7: swig4_moduleimport.patch +%if %{pkg_vcmp swig > 4.2.1} +Patch8: 1231587-build-libselinux-with-swig-4.3.0.patch +%endif BuildRequires: %{python_module devel} BuildRequires: %{python_module pip} BuildRequires: %{python_module setuptools}