diff --git a/0002-remove-the-trailing-newline-for-etc-syste.patch b/0002-remove-the-trailing-newline-for-etc-syste.patch new file mode 100644 index 0000000000000000000000000000000000000000..7d20801736be2f2bd79101999e7d0a33ffcb4d08 --- /dev/null +++ b/0002-remove-the-trailing-newline-for-etc-syste.patch @@ -0,0 +1,26 @@ +From 7572bbec8b6a422e722864348a53d5e0f855e7f6 Mon Sep 17 00:00:00 2001 +From: Miroslav Grepl +Date: Fri, 20 Feb 2015 16:42:01 +0100 +Subject: [PATCH] We want to remove the trailing newline for + /etc/system_release. + +--- + python/sepolicy/sepolicy/__init__.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/python/sepolicy/sepolicy/__init__.py b/python/sepolicy/sepolicy/__init__.py +index a2475d22547a..8055a12f6020 100644 +--- a/python/sepolicy/sepolicy/__init__.py ++++ b/python/sepolicy/sepolicy/__init__.py +@@ -1228,7 +1228,7 @@ def get_os_version(): + system_release = "" + try: + with open('/etc/system-release') as f: +- system_release = f.readline() ++ system_release = f.readline().rstrip() + except IOError: + system_release = "Misc" + +-- +2.32.0 + diff --git a/policycoreutils.spec b/policycoreutils.spec index 42744d1383d73b9aeca8ae05773a324e86edba95..08c0313eb9a9dd91b8466706ce14a8b73b42c3ad 100644 --- a/policycoreutils.spec +++ b/policycoreutils.spec @@ -1,4 +1,4 @@ -%define anolis_release 2 +%define anolis_release 3 %global libauditver 3.0 %global libsepolver 3.3-1 %global libsemanagever 3.3-1 @@ -19,6 +19,7 @@ Source0: https://github.com/SELinuxProject/selinux/releases/download/3.3/selinux URL: https://github.com/SELinuxProject/selinux Patch0001: 0001-Simplication-of-sepolicy-manpage-web-functionality.patch +Patch0002: 0002-remove-the-trailing-newline-for-etc-syste.patch Obsoletes: policycoreutils < 2.0.61-2 Conflicts: filesystem < 3, selinux-policy-base < 3.13.1-138 @@ -409,6 +410,9 @@ The policycoreutils-restorecond package contains the restorecond service. %systemd_postun_with_restart restorecond.service %changelog +* Thu Mar 17 2022 Chunmei Xu - 3.3-3 +- remove the trailing newline for /etc/system_release + * Thu Mar 17 2022 Liwei Ge - 3.3-2 - Simplication of sepolicy-manpage web functionality