From ea213d0249cceffcb7ea1f0d553d0bae82f6e6bd Mon Sep 17 00:00:00 2001 From: Petr Lautrbach Date: Tue, 28 Jan 2020 13:07:09 +0100 Subject: [PATCH] Fix -fno-common issues discovered by GCC 10 --- ...ckpolicy-remove-unused-te_assertions.patch | 42 +++++++++++++++++++ checkpolicy.spec | 6 ++- 2 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 0001-checkpolicy-remove-unused-te_assertions.patch diff --git a/0001-checkpolicy-remove-unused-te_assertions.patch b/0001-checkpolicy-remove-unused-te_assertions.patch new file mode 100644 index 0000000..672f12c --- /dev/null +++ b/0001-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/checkpolicy.h | 14 -------------- + 1 file changed, 14 deletions(-) + +diff --git a/checkpolicy/checkpolicy.h b/checkpolicy/checkpolicy.h +index 3868f1fa023b..f127687e72a6 100644 +--- a/checkpolicy/checkpolicy.h ++++ b/checkpolicy/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 0e96e92..e515442 100644 --- a/checkpolicy.spec +++ b/checkpolicy.spec @@ -4,7 +4,7 @@ Summary: SELinux policy compiler Name: checkpolicy Version: 3.0 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2 Source0: https://github.com/SELinuxProject/selinux/releases/download/20191204/checkpolicy-3.0.tar.gz # $ git clone https://github.com/fedora-selinux/selinux.git @@ -12,6 +12,7 @@ Source0: https://github.com/SELinuxProject/selinux/releases/download/20191204/ch # $ git format-patch -N checkpolicy-3.0 -- checkpolicy # $ i=1; for j in 00*patch; do printf "Patch%04d: %s\n" $i $j; i=$((i+1));done # Patch list start +Patch0001: 0001-checkpolicy-remove-unused-te_assertions.patch # Patch list end BuildRequires: gcc BuildRequires: byacc bison flex flex-static libsepol-static >= %{libsepolver} libselinux-devel >= %{libselinuxver} @@ -61,6 +62,9 @@ install test/dispol ${RPM_BUILD_ROOT}%{_bindir}/sedispol %{_bindir}/sedispol %changelog +* 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