diff --git a/1001-checkpolicy-remove-unused-te_assertions.patch b/1001-checkpolicy-remove-unused-te_assertions.patch deleted file mode 100644 index 01b567da81ebcf24be6ef9ec3c70d2ebbff06686..0000000000000000000000000000000000000000 --- a/1001-checkpolicy-remove-unused-te_assertions.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 95d8f16ece96829109eb75a605b1459a25b5a6be Mon Sep 17 00:00:00 2001 -From: Ondrej Mosnacek -Date: Thu, 23 Jan 2020 13:57:15 +0100 -Subject: [PATCH] checkpolicy: remove unused te_assertions - -This variable is declared in a header file, but never defined or used. -The te_assert structure definition is only used in this declaration, so -remove both. - -Signed-off-by: Ondrej Mosnacek ---- - checkpolicy.h | 14 -------------- - 1 file changed, 14 deletions(-) - -diff --git a/checkpolicy.h b/checkpolicy.h -index 3868f1fa023b..f127687e72a6 100644 ---- a/checkpolicy.h -+++ b/checkpolicy.h -@@ -1,20 +1,6 @@ - #ifndef _CHECKPOLICY_H_ - #define _CHECKPOLICY_H_ - --#include -- --typedef struct te_assert { -- ebitmap_t stypes; -- ebitmap_t ttypes; -- ebitmap_t tclasses; -- int self; -- sepol_access_vector_t *avp; -- unsigned long line; -- struct te_assert *next; --} te_assert_t; -- --te_assert_t *te_assertions; -- - extern unsigned int policyvers; - - #endif --- -2.24.1 - diff --git a/checkpolicy-2.9.tar.gz b/checkpolicy-2.9.tar.gz deleted file mode 100644 index dbc130fa2309e6f86216c7a37dcbd4bc4cd86864..0000000000000000000000000000000000000000 Binary files a/checkpolicy-2.9.tar.gz and /dev/null differ diff --git a/checkpolicy.spec b/checkpolicy.spec index 92b5165621c6be09f437641adc7fa78f0a35950a..84aa5127b482297d0d41e18f3330c8aa4535ec1c 100644 --- a/checkpolicy.spec +++ b/checkpolicy.spec @@ -1,22 +1,20 @@ -%define anolis_release .0.1 -%define libselinuxver 2.9-1 -%define libsepolver 2.9-1 +%define libselinuxver 3.5-1 +%define libsepolver 3.5-1 Summary: SELinux policy compiler Name: checkpolicy -Version: 2.9 -Release: 1%{anolis_release}%{?dist} +Version: 3.5 +Release: 1%{?dist} License: GPLv2 -Source: https://github.com/SELinuxProject/selinux/releases/download/20190315/checkpolicy-2.9.tar.gz -# git format-patch 20190315 -- checkpolicy -# i=1; for j in 00*patch; do printf "Patch%04d: %s\n" $i $j; i=$((i+1));done - -#Begin: Anolis customized patches -Patch1001: 1001-checkpolicy-remove-unused-te_assertions.patch -#End: Anolis customized patches - -Conflicts: selinux-policy-base < 3.13.1-138 +Source0: https://github.com/SELinuxProject/selinux/releases/download/3.5/checkpolicy-3.5.tar.gz +# $ git clone https://github.com/fedora-selinux/selinux.git +# $ cd selinux +# $ git format-patch -N 3.5 -- checkpolicy +# $ i=1; for j in 00*patch; do printf "Patch%04d: %s\n" $i $j; i=$((i+1));done +# Patch list start +# Patch list end BuildRequires: gcc +BuildRequires: make BuildRequires: byacc bison flex flex-static libsepol-static >= %{libsepolver} libselinux-devel >= %{libselinuxver} %description @@ -34,24 +32,25 @@ This package contains checkpolicy, the SELinux policy compiler. Only required for building policies. %prep -%autosetup -p 1 -n checkpolicy-%{version} +%autosetup -p 2 -n checkpolicy-%{version} %build + %set_build_flags -make LIBDIR="%{_libdir}" +%make_build LIBDIR="%{_libdir}" cd test -make LIBDIR="%{_libdir}" +%make_build LIBDIR="%{_libdir}" %install mkdir -p ${RPM_BUILD_ROOT}%{_bindir} -make LIBDIR="%{_libdir}" DESTDIR="${RPM_BUILD_ROOT}" install +%make_install LIBDIR="%{_libdir}" install test/dismod ${RPM_BUILD_ROOT}%{_bindir}/sedismod install test/dispol ${RPM_BUILD_ROOT}%{_bindir}/sedispol %files %{!?_licensedir:%global license %%doc} -%license COPYING +%license LICENSE %{_bindir}/checkpolicy %{_bindir}/checkmodule %{_mandir}/man8/checkpolicy.8.gz @@ -62,14 +61,100 @@ install test/dispol ${RPM_BUILD_ROOT}%{_bindir}/sedispol %{_bindir}/sedispol %changelog -* Thu Nov 18 2021 Weitao Zhou 2.9-1.0.1 -- Use extern in header files when declaring global variables for compatible gcc10 build +* Thu Feb 23 2023 Petr Lautrbach - 3.5-1 +- SELinux userspace 3.5 release + +* Wed Feb 15 2023 Petr Lautrbach - 3.5-0.rc3.1 +- SELinux userspace 3.5-rc3 release + +* Tue Jan 17 2023 Petr Lautrbach - 3.5-0.rc2.1 +- SELinux userspace 3.5-rc2 release + +* Mon Jan 2 2023 Petr Lautrbach - 3.5-0.rc1.1 +- SELinux userspace 3.5-rc1 release + +* Fri May 20 2022 Petr Lautrbach - 3.4-1 +- SELinux userspace 3.4 release + +* Fri Oct 22 2021 Petr Lautrbach - 3.3-1 +- SELinux userspace 3.3 release + +* Mon Oct 11 2021 Petr Lautrbach - 3.3-0.rc3.1 +- SELinux userspace 3.3-rc3 release + +* Wed Sep 29 2021 Petr Lautrbach - 3.3-0.rc2.1 +- SELinux userspace 3.3-rc2 release + +* Mon Aug 09 2021 Mohan Boddu - 3.2-4 +- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags + Related: rhbz#1991688 + +* Wed Jul 28 2021 Petr Lautrbach - 3.2-3 +- Rebase on upstream commit 32611aea6543 + +* Thu Apr 15 2021 Mohan Boddu - 3.2-2 +- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937 + +* Mon Mar 8 2021 Petr Lautrbach - 3.2-1 +- SELinux userspace 3.2 release + +* Fri Feb 5 2021 Petr Lautrbach - 3.2-0.rc2.1 +- SELinux userspace 3.2-rc2 release -* Mon Mar 25 2019 Petr Lautrbach - 2.9-1 +* Tue Jan 26 2021 Fedora Release Engineering - 3.2-0.rc1.1.1 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Thu Jan 21 2021 Petr Lautrbach - 3.2-0.rc1.1 +- SELinux userspace 3.2-rc1 release + +* Sun Nov 1 2020 Petr Lautrbach - 3.1-4 +- Fix signed overflow caused by using (1 << 31) - 1 +- Optimize storage of filename transitions +- Rebuild with libsepol.so.2 + +* Mon Jul 27 2020 Fedora Release Engineering - 3.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Mon Jul 13 2020 Tom Stellard - 3.1-2 +- Use make macros +- https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro + +* Fri Jul 10 2020 Petr Lautrbach - 3.1-1 +- SELinux userspace 3.1 release + +* Tue Jan 28 2020 Petr Lautrbach - 3.0-3 +- Fix -fno-common issues discovered by GCC 10 + +* Tue Jan 28 2020 Fedora Release Engineering - 3.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Fri Dec 6 2019 Petr Lautrbach - 3.0-1 +- SELinux userspace 3.0 release + +* Mon Nov 11 2019 Petr Lautrbach - 3.0-0.rc1.1 +- SELinux userspace 3.0-rc1 release candidate + +* Wed Jul 24 2019 Fedora Release Engineering - 2.9-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Mon Mar 18 2019 Petr Lautrbach - 2.9-1 - SELinux userspace 2.9 release -* Sun Dec 16 2018 Petr Lautrbach - 2.8-2 -- destroy the class datum if it fails to initialize +* Mon Mar 11 2019 Petr Lautrbach - 2.9-0.rc2.1 +- SELinux userspace 2.9-rc2 release + +* Thu Jan 31 2019 Fedora Release Engineering - 2.9-0.rc1.1.1 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Fri Jan 25 2019 Petr Lautrbach - 2.9-0.rc1.1 +- SELinux userspace 2.9-rc1 release + +* Mon Jan 21 2019 Petr Lautrbach - 2.8-3 +- Check the result value of hashtable_search +- Destroy the class datum if it fails to initialize + +* Thu Jul 12 2018 Fedora Release Engineering - 2.8-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild * Fri May 25 2018 Petr Lautrbach - 2.8-1 - SELinux userspace 2.8 release diff --git a/download b/download new file mode 100644 index 0000000000000000000000000000000000000000..acde7be0ccf8a11ac380a9b88dcec5c84b76215f --- /dev/null +++ b/download @@ -0,0 +1 @@ +87674a857ffcc6f0473a626aeee155d1 checkpolicy-3.5.tar.gz