From c4948449c7b1fc3424305647f8eda22dac6825d1 Mon Sep 17 00:00:00 2001 From: yixiangzhike Date: Tue, 16 Sep 2025 10:52:52 +0800 Subject: [PATCH] enable macro AGGRESSIVE_FREE_AFTER_REGEX_MATCH to free match_data immediately (cherry picked from commit 755593b429aa37c8441179209cf24c39ac764e63) --- libselinux.spec | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/libselinux.spec b/libselinux.spec index 9a849da..aa3c4a8 100644 --- a/libselinux.spec +++ b/libselinux.spec @@ -3,7 +3,7 @@ Name: libselinux Version: 3.5 -Release: 6 +Release: 7 License: Public Domain Summary: SELinux library and simple utilities Url: https://github.com/SELinuxProject/selinux/wiki @@ -29,10 +29,10 @@ Patch0017: 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} @@ -84,10 +84,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 rm -rf %{buildroot} @@ -146,6 +146,9 @@ mv %{buildroot}%{_sbindir}/getconlist %{buildroot}%{_sbindir}/selinuxconlist %{_mandir}/ru/man8/* %changelog +* Tue Sep 16 2025 yixiangzhike - 3.5-7 +- enable macro AGGRESSIVE_FREE_AFTER_REGEX_MATCH to free match_data immediately + * Mon Sep 01 2025 yanglongkang - 3.5-6 - backport upstream patches -- Gitee