From 185e4443d7aa2d40f40e5476f50bdf0f52a2aab2 Mon Sep 17 00:00:00 2001 From: lixuebing Date: Mon, 19 Aug 2024 15:51:51 +0800 Subject: [PATCH 1/5] Add "Buildarch: noarch" to the help sub --- policycoreutils.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/policycoreutils.spec b/policycoreutils.spec index c1ef009..43fe5cf 100644 --- a/policycoreutils.spec +++ b/policycoreutils.spec @@ -3,7 +3,7 @@ Name: policycoreutils Version: 3.3 -Release: 11 +Release: 12 Summary: Policy core utilities of selinux License: GPLv2 URL: https://github.com/SELinuxProject @@ -112,6 +112,7 @@ It contains sandbox utilities for selinux %package help Summary: Including man files for selinux +Buildarch: noarch Requires: man %description help @@ -278,6 +279,9 @@ find %{buildroot}%{python3_sitelib} %{buildroot}%{python3_sitearch} \ %{_mandir}/* %changelog +* Mon Aug 19 2024 Xuebing Li -3.3-12 +- Add "Buildarch: noarch" to the help sub + * Wed Mar 20 2024 yixiangzhike -3.3-11 - backport patch from upstream to avoid unsigned integer underflow -- Gitee From 7f85b5b60411c179a54f8c5f45443d8ce14ded26 Mon Sep 17 00:00:00 2001 From: lixuebing Date: Mon, 19 Aug 2024 16:24:19 +0800 Subject: [PATCH 2/5] Replaced declaration of help subpackage with the 'package_help' macro. --- policycoreutils.spec | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/policycoreutils.spec b/policycoreutils.spec index 43fe5cf..7e2ec3e 100644 --- a/policycoreutils.spec +++ b/policycoreutils.spec @@ -110,14 +110,13 @@ Requires: openbox It contains sandbox utilities for selinux %endif -%package help -Summary: Including man files for selinux -Buildarch: noarch -Requires: man - -%description help -This contains man files for the using of selinux. +%package help +Summary: Documents for policycoreutils +Buildarch: noarch +Requires: man info +%description help +Man pages and other related documents for policycoreutils. %prep %autosetup -p 1 -n selinux-policycoreutils-%{version} @@ -280,7 +279,7 @@ find %{buildroot}%{python3_sitelib} %{buildroot}%{python3_sitearch} \ %changelog * Mon Aug 19 2024 Xuebing Li -3.3-12 -- Add "Buildarch: noarch" to the help sub +- Replaced declaration of help subpackage with the 'package_help' macro. * Wed Mar 20 2024 yixiangzhike -3.3-11 - backport patch from upstream to avoid unsigned integer underflow -- Gitee From f845c486a034817f7c3700b432979649ac2c5619 Mon Sep 17 00:00:00 2001 From: lixuebing Date: Mon, 19 Aug 2024 16:35:09 +0800 Subject: [PATCH 3/5] Replaced declaration of help subpackage with the 'package_help' macro. --- policycoreutils.spec | 78 ++++++++++++++------------------------------ 1 file changed, 25 insertions(+), 53 deletions(-) diff --git a/policycoreutils.spec b/policycoreutils.spec index 7e2ec3e..a5e5a99 100644 --- a/policycoreutils.spec +++ b/policycoreutils.spec @@ -2,8 +2,8 @@ %bcond_with sandbox Name: policycoreutils -Version: 3.3 -Release: 12 +Version: 3.5 +Release: 4 Summary: Policy core utilities of selinux License: GPLv2 URL: https://github.com/SELinuxProject @@ -16,33 +16,12 @@ Source11: selinux-autorelabel-generator.sh Patch0: fix-fixfiles-N-date-function.patch Patch1: fix-fixfiles-N-date-function-two.patch - -Patch6000: backport-policycoreutils-handle-argument-counter-of-zero.patch -Patch6001: backport-newrole-check-for-crypt-3-failure.patch -Patch6002: backport-newrole-ensure-password-memory-erasure.patch -Patch6003: backport-semodule_package-Close-leaking-fd.patch -Patch6004: backport-python-Split-semanage-import-into-two-transactions.patch -Patch6005: backport-python-audit2allow-close-file-stream-on-error.patch -Patch6006: backport-python-Do-not-query-the-local-database-if-the-fcontext-is-non-local.patch -Patch6007: backport-fixfiles-Unmount-temporary-bind-mounts-on-SIGINT.patch -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 -Patch6012: backport-restorecond-add-check-for-strdup-in-strings_list_add.patch -Patch6013: backport-python-Use-isinstance-instead-of-type.patch -Patch6014: backport-restorecond-compatible-with-the-use-of-EUID.patch -Patch6015: backport-sepolicy-manpage.py-make-output-deterministic.patch -Patch6016: restorecond-remove-dependency-of-glib2.patch -Patch6017: backport-newrole-silence-compiler-warnings.patch -Patch6018: backport-newrole-use-DJB2a-string-hash-function.patch -Patch6019: backport-python-Harden-more-tools-against-rogue-modules.patch -Patch6020: backport-setfiles-avoid-unsigned-integer-underflow.patch +Patch2: backport-setfiles-avoid-unsigned-integer-underflow.patch BuildRequires: gcc -BuildRequires: pam-devel libsepol-static >= 3.3 libsemanage-static >= 3.3 libselinux-devel >= 3.3 libcap-devel audit-libs-devel gettext -BuildRequires: desktop-file-utils dbus-devel glib2-devel python3-devel libcap-ng-devel -BuildRequires: systemd systemd-units +BuildRequires: pam-devel libsepol-static >= %{version} libsemanage-static >= %{version} libselinux-devel >= %{version} libcap-devel audit-libs-devel gettext +BuildRequires: desktop-file-utils dbus-devel dbus-glib-devel python3-devel libcap-ng-devel +BuildRequires: systemd systemd-units python3-pip python3-wheel Requires: libsepol >= 3.3 libselinux-utils util-linux grep gawk diffutils rpm sed coreutils Provides: %{name}-restorecond = %{version}-%{release} @@ -54,13 +33,13 @@ Provides: /sbin/fixfiles Provides: /sbin/restorecon %description -It contains the selinux policy core utilities required by basic operation of SElinux systems. These utilities include load_policy to load policies, setfiles to label filesystems, newrole to switch roles. +It contains the selinux policy core utilities %package -n python3-policycoreutils Summary: python3 utilities for seLinux policy core %{?python_provide:%python_provide python3-policycoreutils} Requires: policycoreutils = %{version}-%{release} -Requires: python3-libselinux python3-libsemanage >= 3.3 +Requires: python3-libselinux python3-libsemanage >= %{version} Requires: audit-libs-python3 >= 2.8.5 Requires: python3-IPy Requires: checkpolicy @@ -118,6 +97,7 @@ Requires: man info %description help Man pages and other related documents for policycoreutils. + %prep %autosetup -p 1 -n selinux-policycoreutils-%{version} @@ -180,6 +160,7 @@ find %{buildroot}%{python3_sitelib} %{buildroot}%{python3_sitearch} \ %py_byte_compile %{__python3} %{buildroot}%{_datadir}/system-config-selinux %find_lang policycoreutils +%find_lang selinux-python %post %systemd_post selinux-autorelabel-mark.service restorecond.service @@ -192,7 +173,7 @@ find %{buildroot}%{python3_sitelib} %{buildroot}%{python3_sitearch} \ %files -f %{name}.lang -%license policycoreutils/COPYING +%license policycoreutils/LICENSE %doc %{_usr}/share/doc/%{name} %config(noreplace) %{_sysconfdir}/sestatus.conf %config(noreplace) %{_sysconfdir}/pam.d/newrole @@ -239,7 +220,7 @@ find %{buildroot}%{python3_sitelib} %{buildroot}%{python3_sitearch} \ %dir %{_datadir}/system-config-selinux/__pycache__ %{_datadir}/system-config-selinux/__pycache__/selinux_server.* -%files -n python3-policycoreutils +%files -f selinux-python.lang -n python3-policycoreutils %{python3_sitelib}/__pycache__ %{python3_sitelib}/sepolgen %dir %{python3_sitelib}/sepolicy @@ -252,7 +233,7 @@ find %{buildroot}%{python3_sitelib} %{buildroot}%{python3_sitearch} \ %{python3_sitelib}/sepolicy/network.py* %{python3_sitelib}/sepolicy/transition.py* %{python3_sitelib}/sepolicy/sedbus.py* -%{python3_sitelib}/sepolicy*.egg-info +%{python3_sitelib}/sepolicy*.dist-info %{python3_sitelib}/sepolicy/booleans.py* %{python3_sitelib}/sepolicy/communicate.py* %{python3_sitelib}/sepolicy/generate.py* @@ -278,40 +259,31 @@ find %{buildroot}%{python3_sitelib} %{buildroot}%{python3_sitearch} \ %{_mandir}/* %changelog -* Mon Aug 19 2024 Xuebing Li -3.3-12 +* Mon Aug 19 2024 Xuebing Li - 3.5-4 - Replaced declaration of help subpackage with the 'package_help' macro. -* Wed Mar 20 2024 yixiangzhike -3.3-11 -- backport patch from upstream to avoid unsigned integer underflow - -* Wed Jan 31 2024 zhangruifang -3.3-10 -- backport patches from upstream +* Tue Apr 16 2024 zhangzikang - 3.5-3 +- add BuildRequires python3-wheel, fix compilation error -* Tue Dec 26 2023 wanghuizhao -3.3-9 -- submit self-developed patch +* Wed Mar 20 2024 yixiangzhike - 3.5-2 +- backport patch from upstream to avoid unsigned integer underflow -* Thu Dec 14 2023 yixiangzhike -3.3-8 -- backport patches from upstream +* Mon Jul 17 2023 zhangguangzhi - 3.5-1 +- update version to 3.5 -* Mon Sep 11 2023 zhangguangzhi -3.3-7 -- backport patches from upstream +* Thu Feb 2 2023 zhangguangzhi - 3.4-1 +- update version to 3.4 -* Wed Mar 22 2023 zhangguangzhi -3.3-6 +* Thu Dec 1 2022 wanghuizhao - 3.3-4 - backport patches from upstream -* Mon Dec 19 2022 shenxiangwei - 3.3-5 -- update patch list - -* Sat Dec 17 2022 ExtinctFire - 3.3-4 +* Tue Nov 15 2022 shenxiangwei - 3.3-3 - backport patches from upstream -* Sat Dec 17 2022 ExtinctFire - 3.3-3 -- update policycoreutils description - * Thu Jun 30 2022 lujie - 3.3-2 - update policycoreutils tar.gz -* Tue Dec 14 2021 panxiaohe - 3.3-1 +* Thu Feb 17 2022 panxiaohe - 3.3-1 - update to 3.3 * Tue Sep 7 2021 yangzhuangzhuang - 3.1-8 -- Gitee From 6f38517221925f41d50798ff42405a814e2d6af5 Mon Sep 17 00:00:00 2001 From: lixuebing Date: Mon, 19 Aug 2024 16:41:47 +0800 Subject: [PATCH 4/5] Replaced declaration of help subpackage with the 'package_help' macro. --- policycoreutils.spec | 78 ++++++++++++++++++++++++++++++-------------- 1 file changed, 53 insertions(+), 25 deletions(-) diff --git a/policycoreutils.spec b/policycoreutils.spec index a5e5a99..7e2ec3e 100644 --- a/policycoreutils.spec +++ b/policycoreutils.spec @@ -2,8 +2,8 @@ %bcond_with sandbox Name: policycoreutils -Version: 3.5 -Release: 4 +Version: 3.3 +Release: 12 Summary: Policy core utilities of selinux License: GPLv2 URL: https://github.com/SELinuxProject @@ -16,12 +16,33 @@ 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 + +Patch6000: backport-policycoreutils-handle-argument-counter-of-zero.patch +Patch6001: backport-newrole-check-for-crypt-3-failure.patch +Patch6002: backport-newrole-ensure-password-memory-erasure.patch +Patch6003: backport-semodule_package-Close-leaking-fd.patch +Patch6004: backport-python-Split-semanage-import-into-two-transactions.patch +Patch6005: backport-python-audit2allow-close-file-stream-on-error.patch +Patch6006: backport-python-Do-not-query-the-local-database-if-the-fcontext-is-non-local.patch +Patch6007: backport-fixfiles-Unmount-temporary-bind-mounts-on-SIGINT.patch +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 +Patch6012: backport-restorecond-add-check-for-strdup-in-strings_list_add.patch +Patch6013: backport-python-Use-isinstance-instead-of-type.patch +Patch6014: backport-restorecond-compatible-with-the-use-of-EUID.patch +Patch6015: backport-sepolicy-manpage.py-make-output-deterministic.patch +Patch6016: restorecond-remove-dependency-of-glib2.patch +Patch6017: backport-newrole-silence-compiler-warnings.patch +Patch6018: backport-newrole-use-DJB2a-string-hash-function.patch +Patch6019: backport-python-Harden-more-tools-against-rogue-modules.patch +Patch6020: backport-setfiles-avoid-unsigned-integer-underflow.patch BuildRequires: gcc -BuildRequires: pam-devel libsepol-static >= %{version} libsemanage-static >= %{version} libselinux-devel >= %{version} libcap-devel audit-libs-devel gettext -BuildRequires: desktop-file-utils dbus-devel dbus-glib-devel python3-devel libcap-ng-devel -BuildRequires: systemd systemd-units python3-pip python3-wheel +BuildRequires: pam-devel libsepol-static >= 3.3 libsemanage-static >= 3.3 libselinux-devel >= 3.3 libcap-devel audit-libs-devel gettext +BuildRequires: desktop-file-utils dbus-devel glib2-devel python3-devel libcap-ng-devel +BuildRequires: systemd systemd-units Requires: libsepol >= 3.3 libselinux-utils util-linux grep gawk diffutils rpm sed coreutils Provides: %{name}-restorecond = %{version}-%{release} @@ -33,13 +54,13 @@ Provides: /sbin/fixfiles Provides: /sbin/restorecon %description -It contains the selinux policy core utilities +It contains the selinux policy core utilities required by basic operation of SElinux systems. These utilities include load_policy to load policies, setfiles to label filesystems, newrole to switch roles. %package -n python3-policycoreutils Summary: python3 utilities for seLinux policy core %{?python_provide:%python_provide python3-policycoreutils} Requires: policycoreutils = %{version}-%{release} -Requires: python3-libselinux python3-libsemanage >= %{version} +Requires: python3-libselinux python3-libsemanage >= 3.3 Requires: audit-libs-python3 >= 2.8.5 Requires: python3-IPy Requires: checkpolicy @@ -97,7 +118,6 @@ Requires: man info %description help Man pages and other related documents for policycoreutils. - %prep %autosetup -p 1 -n selinux-policycoreutils-%{version} @@ -160,7 +180,6 @@ find %{buildroot}%{python3_sitelib} %{buildroot}%{python3_sitearch} \ %py_byte_compile %{__python3} %{buildroot}%{_datadir}/system-config-selinux %find_lang policycoreutils -%find_lang selinux-python %post %systemd_post selinux-autorelabel-mark.service restorecond.service @@ -173,7 +192,7 @@ find %{buildroot}%{python3_sitelib} %{buildroot}%{python3_sitearch} \ %files -f %{name}.lang -%license policycoreutils/LICENSE +%license policycoreutils/COPYING %doc %{_usr}/share/doc/%{name} %config(noreplace) %{_sysconfdir}/sestatus.conf %config(noreplace) %{_sysconfdir}/pam.d/newrole @@ -220,7 +239,7 @@ find %{buildroot}%{python3_sitelib} %{buildroot}%{python3_sitearch} \ %dir %{_datadir}/system-config-selinux/__pycache__ %{_datadir}/system-config-selinux/__pycache__/selinux_server.* -%files -f selinux-python.lang -n python3-policycoreutils +%files -n python3-policycoreutils %{python3_sitelib}/__pycache__ %{python3_sitelib}/sepolgen %dir %{python3_sitelib}/sepolicy @@ -233,7 +252,7 @@ find %{buildroot}%{python3_sitelib} %{buildroot}%{python3_sitearch} \ %{python3_sitelib}/sepolicy/network.py* %{python3_sitelib}/sepolicy/transition.py* %{python3_sitelib}/sepolicy/sedbus.py* -%{python3_sitelib}/sepolicy*.dist-info +%{python3_sitelib}/sepolicy*.egg-info %{python3_sitelib}/sepolicy/booleans.py* %{python3_sitelib}/sepolicy/communicate.py* %{python3_sitelib}/sepolicy/generate.py* @@ -259,31 +278,40 @@ find %{buildroot}%{python3_sitelib} %{buildroot}%{python3_sitearch} \ %{_mandir}/* %changelog -* Mon Aug 19 2024 Xuebing Li - 3.5-4 +* Mon Aug 19 2024 Xuebing Li -3.3-12 - Replaced declaration of help subpackage with the 'package_help' macro. -* Tue Apr 16 2024 zhangzikang - 3.5-3 -- add BuildRequires python3-wheel, fix compilation error - -* Wed Mar 20 2024 yixiangzhike - 3.5-2 +* Wed Mar 20 2024 yixiangzhike -3.3-11 - backport patch from upstream to avoid unsigned integer underflow -* Mon Jul 17 2023 zhangguangzhi - 3.5-1 -- update version to 3.5 +* Wed Jan 31 2024 zhangruifang -3.3-10 +- backport patches from upstream + +* Tue Dec 26 2023 wanghuizhao -3.3-9 +- submit self-developed patch -* Thu Feb 2 2023 zhangguangzhi - 3.4-1 -- update version to 3.4 +* Thu Dec 14 2023 yixiangzhike -3.3-8 +- backport patches from upstream -* Thu Dec 1 2022 wanghuizhao - 3.3-4 +* Mon Sep 11 2023 zhangguangzhi -3.3-7 - backport patches from upstream -* Tue Nov 15 2022 shenxiangwei - 3.3-3 +* Wed Mar 22 2023 zhangguangzhi -3.3-6 - backport patches from upstream +* Mon Dec 19 2022 shenxiangwei - 3.3-5 +- update patch list + +* Sat Dec 17 2022 ExtinctFire - 3.3-4 +- backport patches from upstream + +* Sat Dec 17 2022 ExtinctFire - 3.3-3 +- update policycoreutils description + * Thu Jun 30 2022 lujie - 3.3-2 - update policycoreutils tar.gz -* Thu Feb 17 2022 panxiaohe - 3.3-1 +* Tue Dec 14 2021 panxiaohe - 3.3-1 - update to 3.3 * Tue Sep 7 2021 yangzhuangzhuang - 3.1-8 -- Gitee From 3e89babc5ae389ae29caf1621bbbc4d77f963c29 Mon Sep 17 00:00:00 2001 From: lixuebing Date: Tue, 20 Aug 2024 09:44:08 +0800 Subject: [PATCH 5/5] Replaced declaration of help subpackage with the 'package_help' macro. --- policycoreutils.spec | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/policycoreutils.spec b/policycoreutils.spec index 7e2ec3e..6405f91 100644 --- a/policycoreutils.spec +++ b/policycoreutils.spec @@ -110,13 +110,7 @@ Requires: openbox It contains sandbox utilities for selinux %endif -%package help -Summary: Documents for policycoreutils -Buildarch: noarch -Requires: man info - -%description help -Man pages and other related documents for policycoreutils. +%package_help %prep %autosetup -p 1 -n selinux-policycoreutils-%{version} -- Gitee