diff --git a/0001-Resolve-loongarch64-architecture-audit2allow-error.patch b/0001-Resolve-loongarch64-architecture-audit2allow-error.patch new file mode 100644 index 0000000000000000000000000000000000000000..4d47a55881ef3dbc4004e51758550d961f2ed0cb --- /dev/null +++ b/0001-Resolve-loongarch64-architecture-audit2allow-error.patch @@ -0,0 +1,31 @@ +From f7d8588d1e7bbb27deacc9accd1cceabb8c5f95b Mon Sep 17 00:00:00 2001 +From: doupengda +Date: Tue, 14 Nov 2023 19:36:35 +0800 +Subject: [PATCH] Resolve loongarch64 architecture audit2allow error + +--- + python/audit2allow/audit2allow | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/python/audit2allow/audit2allow b/python/audit2allow/audit2allow +index 09b06f6..86be67d 100644 +--- a/python/audit2allow/audit2allow ++++ b/python/audit2allow/audit2allow +@@ -359,10 +359,10 @@ class AuditToPolicy: + def main(self): + try: + self.__parse_options() +- if self.__options.policy: +- audit2why.init(self.__options.policy) +- else: +- audit2why.init() ++ #if self.__options.policy: ++ # audit2why.init(self.__options.policy) ++ #else: ++ # audit2why.init() + + self.__read_input() + self.__process_input() +-- +2.33.0 + diff --git a/policycoreutils.spec b/policycoreutils.spec index e52e5138abc17bf72939b4bed5459374b0b94cc6..fe782e18652d22e0b48036fc4e7baeab165488b9 100644 --- a/policycoreutils.spec +++ b/policycoreutils.spec @@ -3,7 +3,7 @@ Name: policycoreutils Version: 3.3 -Release: 6 +Release: 7 Summary: Policy core utilities of selinux License: GPLv2 URL: https://github.com/SELinuxProject @@ -29,6 +29,9 @@ Patch6008: backport-sepolicy-Call-os.makedirs-with-exist_ok-True.patch Patch6009: backport-policycoreutils-fix-potential-NULL-reference-in-load_checks.patch Patch6010: backport-python-sepolicy-add-missing-booleans-to-man-pages.patch Patch6011: backport-python-sepolicy-Cache-conditional-rule-queries.patch +%ifarch loongarch64 +Patch6012: 0001-Resolve-loongarch64-architecture-audit2allow-error.patch +%endif BuildRequires: gcc BuildRequires: pam-devel libsepol-static >= 3.3 libsemanage-static >= 3.3 libselinux-devel >= 3.3 libcap-devel audit-libs-devel gettext @@ -269,6 +272,9 @@ find %{buildroot}%{python3_sitelib} %{buildroot}%{python3_sitearch} \ %{_mandir}/* %changelog +* Tue Nov 14 2023 doupengda - 3.3-7 +- Resolve loongarch64 architecture audit2allow error + * Wed Mar 22 2023 zhangguangzhi - 3.3-6 - backport patches from upstream