From 664a72c4d626b5c4728a858d01fae91452d6029d Mon Sep 17 00:00:00 2001 From: yixiangzhike Date: Tue, 16 Sep 2025 11:03:16 +0800 Subject: [PATCH] enable macro AGGRESSIVE_FREE_AFTER_REGEX_MATCH to free match_data immediately (cherry picked from commit ae878458434fad92eb5003a2c350162f7b1f700f) --- libselinux.spec | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/libselinux.spec b/libselinux.spec index d7bf619..0483944 100644 --- a/libselinux.spec +++ b/libselinux.spec @@ -3,7 +3,7 @@ Name: libselinux Version: 3.5 -Release: 7 +Release: 8 License: Public Domain Summary: SELinux library and simple utilities Url: https://github.com/SELinuxProject/selinux/wiki @@ -30,10 +30,10 @@ Patch0018: backport-selinux-free-memory-in-error-branch.patch Patch9000: do-malloc-trim-after-load-policy.patch -BuildRequires: gcc python3-devel systemd swig pcre2-devel xz-devel +BuildRequires: gcc python3-devel systemd swig pcre2-devel >= 10.42 xz-devel BuildRequires: ruby-devel libsepol-static python3-pip python3-setuptools python3-wheel -Requires: libsepol >= %{libsepol_version} pcre2 +Requires: libsepol >= %{libsepol_version} pcre2 >= 10.42 Conflicts: filesystem < 3, selinux-policy-base < 3.13.1-138 Provides: %{name}-utils = %{version}-%{release} @@ -85,10 +85,10 @@ export DISABLE_RPM="y" export USE_PCRE2="y" make clean -%make_build LIBDIR="%{_libdir}" CFLAGS="-g %{optflags}" swigify -%make_build LIBDIR="%{_libdir}" CFLAGS="-g %{optflags}" all -%make_build %{__python3} LIBDIR="%{_libdir}" CFLAGS="-g %{optflags}" pywrap -%make_build RUBYINC="%{ruby_inc}" SHLIBDIR="%{_libdir}" LIBDIR="%{_libdir}" LIBSEPOLA="%{_libdir}/libsepol.a" CFLAGS="-g %{optflags}" rubywrap +%make_build LIBDIR="%{_libdir}" CFLAGS="-g %{optflags} -DAGGRESSIVE_FREE_AFTER_REGEX_MATCH" swigify +%make_build LIBDIR="%{_libdir}" CFLAGS="-g %{optflags} -DAGGRESSIVE_FREE_AFTER_REGEX_MATCH" all +%make_build %{__python3} LIBDIR="%{_libdir}" CFLAGS="-g %{optflags} -DAGGRESSIVE_FREE_AFTER_REGEX_MATCH" pywrap +%make_build RUBYINC="%{ruby_inc}" SHLIBDIR="%{_libdir}" LIBDIR="%{_libdir}" LIBSEPOLA="%{_libdir}/libsepol.a" CFLAGS="-g %{optflags} -DAGGRESSIVE_FREE_AFTER_REGEX_MATCH" rubywrap %install mkdir -p %{buildroot}%{_tmpfilesdir} @@ -144,6 +144,9 @@ mv %{buildroot}%{_sbindir}/getconlist %{buildroot}%{_sbindir}/selinuxconlist %lang(ru) %{_mandir}/ru/man8/* %changelog +* Tue Sep 16 2025 yixiangzhike - 3.5-8 +- enable macro AGGRESSIVE_FREE_AFTER_REGEX_MATCH to free match_data immediately + * Tue Sep 09 2025 wangjiang - 3.5-7 - backport upstream patch -- Gitee