From 75caccc695e37a7cb01a055c842bdc65de1fe2a9 Mon Sep 17 00:00:00 2001 From: Petr Lautrbach Date: Thu, 13 Jul 2017 16:35:52 +0200 Subject: [PATCH] secilc-2.5-1.el7 - Initial EPEL-7 release with upstream release 2016-02-23 --- .gitignore | 1 + secilc-rhel.patch | 52 ++++++++++++++++++++++++++++++++++++++ secilc.spec | 63 +++++++++++++++++++++++++++++++++++++++++++++++ sources | 1 + 4 files changed, 117 insertions(+) create mode 100644 secilc-rhel.patch create mode 100644 secilc.spec diff --git a/.gitignore b/.gitignore index e69de29..e1df742 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/secilc-2.5.tar.gz diff --git a/secilc-rhel.patch b/secilc-rhel.patch new file mode 100644 index 0000000..fccbf83 --- /dev/null +++ b/secilc-rhel.patch @@ -0,0 +1,52 @@ +diff --git secilc-2.5/Android.mk secilc-2.5/Android.mk +index 3dd9023..6c7b9d3 100644 +--- secilc-2.5/Android.mk ++++ secilc-2.5/Android.mk +@@ -6,10 +6,6 @@ common_cflags := \ + -Wall -Wshadow -O2 \ + -pipe -fno-strict-aliasing \ + +-ifeq ($(HOST_OS), darwin) +-common_cflags += -DDARWIN +-endif +- + common_includes := \ + $(LOCAL_PATH)/../libsepol/cil/include/ \ + $(LOCAL_PATH)/../libsepol/include/ \ +diff --git secilc-2.5/ChangeLog secilc-2.5/ChangeLog +index a803f35..cddfd81 100644 +--- secilc-2.5/ChangeLog ++++ secilc-2.5/ChangeLog +@@ -1,3 +1,5 @@ ++ * Add documentation and test rule for portcon dccp protocol, from Richard Haines ++ + 2.5 2016-02-23 + * Convert DocBook documentation into github markdown, from Yuli Khodorkovskiy + * Add documentation for neverallowx rules, from Steve Lawrence +diff --git secilc-2.5/docs/cil_network_labeling_statements.md secilc-2.5/docs/cil_network_labeling_statements.md +index 183b350..b06dbcc 100644 +--- secilc-2.5/docs/cil_network_labeling_statements.md ++++ secilc-2.5/docs/cil_network_labeling_statements.md +@@ -155,7 +155,7 @@ These examples show named and anonymous [`nodecon`](cil_network_labeling_stateme + portcon + ------- + +-Label a udp or tcp port. ++Label a udp, tcp or dccp port. + + **Statement definition:** + +@@ -175,7 +175,7 @@ Label a udp or tcp port. + + +

protocol

+-

The protocol keyword tcp or udp.

++

The protocol keyword tcp, udp or dccp.

+ + +

port |

+@@ -199,3 +199,4 @@ These examples show named and anonymous [`portcon`](cil_network_labeling_stateme + (portcon tcp 3333 (unconfined.user object_r unconfined.object levelrange_1)) + (portcon udp 4444 (unconfined.user object_r unconfined.object ((s0) level_2))) + (portcon tcp (2000 20000) (unconfined.user object_r unconfined.object (systemlow level_3))) ++ (portcon dccp (6840 6880) (unconfined.user object_r unconfined.object ((s0) level_2))) diff --git a/secilc.spec b/secilc.spec new file mode 100644 index 0000000..06ef229 --- /dev/null +++ b/secilc.spec @@ -0,0 +1,63 @@ +%global libsepolver 2.5-0 + +Name: secilc +Version: 2.5 +Release: 1%{?dist} +Summary: The SELinux CIL Compiler + +License: BSD +URL: https://github.com/SELinuxProject/selinux/wiki +Source0: https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/20160223/secilc-2.5.tar.gz +Patch1: secilc-rhel.patch + +BuildRequires: libsepol-static >= %{libsepolver}, dblatex, flex, xmlto, pandoc + +%description +The SELinux CIL Compiler is a compiler that converts the CIL language as +described on the CIL design wiki into a kernel binary policy file. +Please see the CIL Design Wiki at: +http://github.com/SELinuxProject/cil/wiki/ +for more information about the goals and features on the CIL language. + +%package doc +Summary: Documentation for the SELinux CIL Compiler +BuildArch: noarch + +%description doc +The SELinux CIL Compiler is a compiler that converts the CIL language as +described on the CIL design wiki into a kernel binary policy file. +Please see the CIL Design Wiki at: +http://github.com/SELinuxProject/cil/wiki/ +for more information about the goals and features on the CIL language. + +%prep +%setup -q -n secilc-%{version} +%patch1 -p 1 + + +%build +make %{?_smp_mflags} CFLAGS="%{optflags}" LIBSEPOL_STATIC=%{_libdir}/libsepol.a +pushd docs +make %{?_smp_mflags} +popd + + +%install +rm -rf %{buildroot} +make %{?_smp_mflags} DESTDIR="%{buildroot}" SBINDIR="%{buildroot}%{_sbindir}" LIBDIR="%{buildroot}%{_libdir}" install + + +%files +%{_bindir}/secilc +%{_mandir}/man8/secilc.8.gz +%license COPYING + +%files doc +%doc docs/html +%doc docs/pdf +%license COPYING + +%changelog +* Thu Jul 13 2017 Petr Lautrbach - 2.5-1 +- Add documentation and test rule for portcon dccp protocol +- Initial EPEL-7 release with upstream release 2016-02-23 diff --git a/sources b/sources index e69de29..04f7d98 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +SHA512 (secilc-2.5.tar.gz) = 7f7b6fb72bee7018f7a591e6a7d8f58a81ed0e1ec914e0792ccd57a550756a5e21c6359e35ad2fe29225a0bd352637d01288721de3b95a9a175bb3ab052620b9