diff --git a/checkpolicy-3.3.tar.gz b/checkpolicy-3.3.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..e86f551e0d82b7973f1a1d73303b37ecb4f0b0f1 Binary files /dev/null and b/checkpolicy-3.3.tar.gz differ diff --git a/checkpolicy.spec b/checkpolicy.spec new file mode 100644 index 0000000000000000000000000000000000000000..771b6de5ebee69190856bf0dc920c43ee21353f5 --- /dev/null +++ b/checkpolicy.spec @@ -0,0 +1,66 @@ +%define anolis_release 1 +%define libselinuxver 3.3-1 +%define libsepolver 3.3-1 + +Summary: SELinux policy compiler +Name: checkpolicy +Version: 3.3 +Release: %{anolis_release}%{?dist} +License: GPLv2 +Source0: https://github.com/SELinuxProject/selinux/releases/download/3.3/checkpolicy-3.3.tar.gz +# $ git clone https://github.com/fedora-selinux/selinux.git +# $ cd selinux +# $ git format-patch -N 3.3 -- 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 +Security-enhanced Linux is a feature of the Linux® kernel and a number +of utilities with enhanced security functionality designed to add +mandatory access controls to Linux. The Security-enhanced Linux +kernel contains new architectural components originally developed to +improve the security of the Flask operating system. These +architectural components provide general support for the enforcement +of many kinds of mandatory access control policies, including those +based on the concepts of Type Enforcement®, Role-based Access +Control, and Multi-level Security. + +This package contains checkpolicy, the SELinux policy compiler. +Only required for building policies. + +%prep +%autosetup -p 2 -n checkpolicy-%{version} + +%build + +%set_build_flags + +%make_build LIBDIR="%{_libdir}" +cd test +%make_build LIBDIR="%{_libdir}" + +%install +mkdir -p ${RPM_BUILD_ROOT}%{_bindir} +%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 +%{_bindir}/checkpolicy +%{_bindir}/checkmodule +%{_mandir}/man8/checkpolicy.8.gz +%{_mandir}/man8/checkmodule.8.gz +%{_mandir}/ru/man8/checkpolicy.8.gz +%{_mandir}/ru/man8/checkmodule.8.gz +%{_bindir}/sedismod +%{_bindir}/sedispol + +%changelog +* Wed Mar 09 2022 Yuanhong Peng - 3.3-1 +- Init from upstream v3.3