From a3e43c8ab2155b780fc91bc7fd7dce4f80e91166 Mon Sep 17 00:00:00 2001 From: Funda Wang Date: Fri, 15 Nov 2024 22:48:42 +0800 Subject: [PATCH] fix perm of newrole --- fix-perm-of-newrole.patch | 29 +++++++++++++++++++++++++++++ policycoreutils.spec | 21 +++++++++++---------- 2 files changed, 40 insertions(+), 10 deletions(-) create mode 100644 fix-perm-of-newrole.patch diff --git a/fix-perm-of-newrole.patch b/fix-perm-of-newrole.patch new file mode 100644 index 0000000..9093685 --- /dev/null +++ b/fix-perm-of-newrole.patch @@ -0,0 +1,29 @@ +From 5488e68779a51a28ea168bb0017b87dd52b6ee38 Mon Sep 17 00:00:00 2001 +From: Funda Wang +Date: Fri, 15 Nov 2024 22:07:31 +0800 +Subject: [PATCH] fix perm of newrole, as it confuses new debugedit + +--- + policycoreutils/newrole/Makefile | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/policycoreutils/newrole/Makefile b/policycoreutils/newrole/Makefile +index b3ccf67..b74cba8 100644 +--- a/policycoreutils/newrole/Makefile ++++ b/policycoreutils/newrole/Makefile +@@ -51,10 +51,10 @@ ifeq ($(NAMESPACE_PRIV),y) + IS_SUID=y + endif + ifeq ($(IS_SUID),y) +- MODE := 4555 ++ MODE := 4755 + override LDLIBS += -lcap-ng + else +- MODE := 0555 ++ MODE := 0755 + endif + + all: newrole +-- +2.46.0 + diff --git a/policycoreutils.spec b/policycoreutils.spec index 1d1afa3..9b225a5 100644 --- a/policycoreutils.spec +++ b/policycoreutils.spec @@ -3,9 +3,9 @@ Name: policycoreutils Version: 3.5 -Release: 3 +Release: 4 Summary: Policy core utilities of selinux -License: GPLv2 +License: GPL-2.0-or-later URL: https://github.com/SELinuxProject Source0: https://github.com/SELinuxProject/selinux/archive/refs/tags/policycoreutils-%{version}.tar.gz Source7: selinux-autorelabel @@ -17,6 +17,7 @@ Source11: selinux-autorelabel-generator.sh Patch0: fix-fixfiles-N-date-function.patch Patch1: fix-fixfiles-N-date-function-two.patch Patch2: backport-setfiles-avoid-unsigned-integer-underflow.patch +Patch3: fix-perm-of-newrole.patch BuildRequires: gcc BuildRequires: pam-devel libsepol-static >= %{version} libsemanage-static >= %{version} libselinux-devel >= %{version} libcap-devel audit-libs-devel gettext @@ -31,6 +32,7 @@ Obsoletes: %{name}-newrole < %{version}-%{release} Obsoletes: python2-policycoreutils Provides: /sbin/fixfiles Provides: /sbin/restorecon +%{?systemd_requires} %description It contains the selinux policy core utilities @@ -89,12 +91,7 @@ Requires: openbox It contains sandbox utilities for selinux %endif -%package help -Summary: Including man files for selinux -Requires: man - -%description help -This contains man files for the using of selinux. +%package_help %prep @@ -243,7 +240,7 @@ find %{buildroot}%{python3_sitelib} %{buildroot}%{python3_sitearch} \ %{_bindir}/sepolicy %{_bindir}/sepolgen %{_bindir}/sepolgen-* -%{_usr}/share/bash-completion/completions/sepolicy +%{_datadir}/bash-completion/completions/sepolicy %dir /var/lib/sepolgen /var/lib/sepolgen/perm_map @@ -255,9 +252,13 @@ find %{buildroot}%{python3_sitelib} %{buildroot}%{python3_sitearch} \ %endif %files help -%{_mandir}/* +%{_mandir}/man?/* +%lang(ru) %{_mandir}/ru/man?/* %changelog +* Fri Nov 15 2024 Funda Wang - 3.5-4 +- fix perm of newrole + * Tue Apr 16 2024 zhangzikang - 3.5-3 - add BuildRequires python3-wheel, fix compilation error -- Gitee