diff --git a/1001-checkpolicy-remove-unused-te_assertions.patch b/1001-checkpolicy-remove-unused-te_assertions.patch new file mode 100644 index 0000000000000000000000000000000000000000..01b567da81ebcf24be6ef9ec3c70d2ebbff06686 --- /dev/null +++ b/1001-checkpolicy-remove-unused-te_assertions.patch @@ -0,0 +1,42 @@ +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.spec b/checkpolicy.spec index ddee7849087c005d7e5857fe472193d0faa3528c..92b5165621c6be09f437641adc7fa78f0a35950a 100644 --- a/checkpolicy.spec +++ b/checkpolicy.spec @@ -1,14 +1,20 @@ +%define anolis_release .0.1 %define libselinuxver 2.9-1 %define libsepolver 2.9-1 Summary: SELinux policy compiler Name: checkpolicy Version: 2.9 -Release: 1%{?dist} +Release: 1%{anolis_release}%{?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 BuildRequires: gcc BuildRequires: byacc bison flex flex-static libsepol-static >= %{libsepolver} libselinux-devel >= %{libselinuxver} @@ -56,6 +62,9 @@ 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 + * Mon Mar 25 2019 Petr Lautrbach - 2.9-1 - SELinux userspace 2.9 release