From 5e296267d23cb1d887e1b0af3e11ff566f8c2e1b Mon Sep 17 00:00:00 2001 From: lxpzero Date: Tue, 1 Apr 2025 16:48:33 +0800 Subject: [PATCH] Rebuild with new ruby --- ...d-error-because-of-swig-version-bump.patch | 22 +++++++++++++++++++ libselinux.spec | 8 ++++++- 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 0002-fix-build-error-because-of-swig-version-bump.patch diff --git a/0002-fix-build-error-because-of-swig-version-bump.patch b/0002-fix-build-error-because-of-swig-version-bump.patch new file mode 100644 index 0000000..2313f7e --- /dev/null +++ b/0002-fix-build-error-because-of-swig-version-bump.patch @@ -0,0 +1,22 @@ +diff --git "a/libselinux/src/selinuxswig_python.i" "b/libselinux/src/selinuxswig_python.i" +index 17e03b9e..03ed296d 100644 +--- "a/libselinux/src/selinuxswig_python.i" ++++ "b/libselinux/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_AppendOutput($result, list); + } + + /* 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_AppendOutput($result, plist); + } + + /* Makes functions in get_context_list.h return a Python list of contexts */ diff --git a/libselinux.spec b/libselinux.spec index 53f3c9f..8af1b28 100644 --- a/libselinux.spec +++ b/libselinux.spec @@ -1,4 +1,4 @@ -%define anolis_release 3 +%define anolis_release 4 %define ruby_inc %(pkg-config --cflags ruby) Name: libselinux @@ -13,6 +13,8 @@ Source1: selinuxconlist.8 Source2: selinuxdefcon.8 # Patch list start Patch0001: 0001-Use-SHA-2-instead-of-SHA-1.patch +# https://github.com/SELinuxProject/selinux/commit/8e0e718bae53fff30831b92cd784151d475a20da +Patch0002: 0002-fix-build-error-because-of-swig-version-bump.patch # Patch list end BuildRequires: gcc make BuildRequires: ruby-devel ruby libsepol-static >= %{version} swig pcre2-devel xz-devel @@ -199,6 +201,10 @@ rm -f %{buildroot}%{abidir}/selinux.dump %{ruby_vendorarchdir}/selinux.so %changelog +* Tue Apr 01 2025 Xiaoping Liu - 3.5-4 +- Rebuild with new ruby +- add patch to fix build error because of swig version bump + * Tue Mar 12 2024 Bo Ren - 3.5-3 - Rebuild with python3.11 - Fix build error -- Gitee