From b6278f1e37a8c6617509e6906883aaf2d5c594fe Mon Sep 17 00:00:00 2001 From: doupengda Date: Tue, 14 Nov 2023 19:50:30 +0800 Subject: [PATCH] Resolve loongarch64 architecture audit2allow error --- ...rch64-architecture-audit2allow-error.patch | 31 +++++++++++++++++++ policycoreutils.spec | 8 ++++- 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 0001-Resolve-loongarch64-architecture-audit2allow-error.patch diff --git a/0001-Resolve-loongarch64-architecture-audit2allow-error.patch b/0001-Resolve-loongarch64-architecture-audit2allow-error.patch new file mode 100644 index 0000000..4d47a55 --- /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 e52e513..fe782e1 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 -- Gitee