diff --git a/secilc-fedora.patch b/secilc-fedora.patch index 4a6cf30..cd1a4b0 100644 --- a/secilc-fedora.patch +++ b/secilc-fedora.patch @@ -1,3 +1,68 @@ +diff --git secilc-2.7/Makefile secilc-2.7/Makefile +index 1cac53e..dfd79ce 100644 +--- secilc-2.7/Makefile ++++ secilc-2.7/Makefile +@@ -1,8 +1,6 @@ +-PREFIX ?= $(DESTDIR)/usr ++PREFIX ?= /usr + BINDIR ?= $(PREFIX)/bin + MANDIR ?= $(PREFIX)/share/man +-LIBDIR ?= $(PREFIX)/lib +-INCLUDEDIR ?= $(PREFIX)/include + + SECILC = secilc + SECILC_SRCS := secilc.c +@@ -41,12 +39,12 @@ $(SECIL2CONF_MANPAGE): $(SECIL2CONF_MANPAGE).xml + $(XMLTO) man $(SECIL2CONF_MANPAGE).xml + + install: all man +- -mkdir -p $(BINDIR) +- -mkdir -p $(MANDIR)/man8 +- install -m 755 $(SECILC) $(BINDIR) +- install -m 755 $(SECIL2CONF) $(BINDIR) +- install -m 644 $(SECILC_MANPAGE) $(MANDIR)/man8 +- install -m 644 $(SECIL2CONF_MANPAGE) $(MANDIR)/man8 ++ -mkdir -p $(DESTDIR)$(BINDIR) ++ -mkdir -p $(DESTDIR)$(MANDIR)/man8 ++ install -m 755 $(SECILC) $(DESTDIR)$(BINDIR) ++ install -m 755 $(SECIL2CONF) $(DESTDIR)$(BINDIR) ++ install -m 644 $(SECILC_MANPAGE) $(DESTDIR)$(MANDIR)/man8 ++ install -m 644 $(SECIL2CONF_MANPAGE) $(DESTDIR)$(MANDIR)/man8 + + doc: + $(MAKE) -C docs +diff --git secilc-2.7/docs/Makefile secilc-2.7/docs/Makefile +index c0fa6b7..6b07ce7 100644 +--- secilc-2.7/docs/Makefile ++++ secilc-2.7/docs/Makefile +@@ -31,6 +31,12 @@ PANDOC_FILE_LIST = $(addprefix $(TMPDIR)/,$(FILE_LIST)) + PDF_OUT=CIL_Reference_Guide.pdf + HTML_OUT=CIL_Reference_Guide.html + PANDOC = pandoc ++SED ?= sed ++ ++OS := $(shell uname) ++ifeq ($(OS), Darwin) ++ SED := gsed ++endif + + all: html pdf + +@@ -40,12 +46,12 @@ $(TMPDIR): + $(TMPDIR)/%.md: %.md | $(TMPDIR) + cp -f $< $(TMPDIR)/ + @# Substitute markdown links for conversion into PDF links +- sed -i -re 's:(\[`[^`]*`\])\([^#]*([^\)]):\1\(\2:g' $@ ++ $(SED) -i -re 's:(\[`[^`]*`\])\([^#]*([^\)]):\1\(\2:g' $@ + + $(TMPDIR)/policy.cil: $(TESTDIR)/policy.cil + cp -f $< $@ + @# add a title for the TOC to policy.cil. This is needed to play nicely with the PDF conversion. +- sed -i '1i Example Policy\n=========\n```' $@ ++ $(SED) -i '1i Example Policy\n=========\n```' $@ + echo '```' >> $@ + + html: $(PANDOC_FILE_LIST) $(TMPDIR)/policy.cil diff --git secilc-2.7/docs/cil_role_statements.md secilc-2.7/docs/cil_role_statements.md index 0c4cadb..d92f628 100644 --- secilc-2.7/docs/cil_role_statements.md @@ -11,6 +76,22 @@ index 0c4cadb..d92f628 100644 **Statement definition:** +diff --git secilc-2.7/secilc.8.xml secilc-2.7/secilc.8.xml +index 4c779b6..e08a962 100644 +--- secilc-2.7/secilc.8.xml ++++ secilc-2.7/secilc.8.xml +@@ -75,6 +75,11 @@ + Treat tunables as booleans. + + ++ ++ ++ Allow some statements to be re-declared. ++ ++ + + + Do not check neverallow rules. diff --git secilc-2.7/secilc.c secilc-2.7/secilc.c index f2232e7..0be6975 100644 --- secilc-2.7/secilc.c diff --git a/secilc.spec b/secilc.spec index 9d3e396..b6441ce 100644 --- a/secilc.spec +++ b/secilc.spec @@ -1,8 +1,8 @@ -%global libsepolver 2.7-3 +%global libsepolver 2.7-5 Name: secilc Version: 2.7 -Release: 4%{?dist} +Release: 5%{?dist} Summary: The SELinux CIL Compiler License: BSD @@ -11,7 +11,7 @@ Source0: https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/fi # download https://raw.githubusercontent.com/fedora-selinux/scripts/master/selinux/make-fedora-selinux-patch.sh # run: # $ VERSION=2.7 ./make-fedora-selinux-patch.sh secilc -# FIXME: HEAD https://github.com/fedora-selinux/selinux/commit/4bfb84c7ff7b33cf06b9a6b2317d24054b9db562 +# HEAD https://github.com/fedora-selinux/selinux/commit/4e253a0231ca085df03b55c4c0490ad6a0e261ebo Patch1: secilc-fedora.patch BuildRequires: gcc @@ -63,6 +63,10 @@ make %{?_smp_mflags} DESTDIR="%{buildroot}" SBINDIR="%{buildroot}%{_sbindir}" LI %license COPYING %changelog +* Tue Mar 13 2018 Petr Lautrbach - 2.7-5 +- build: follow standard semantics for DESTDIR and PREFIX +- Describe multiple-decls in secilc.8.xml + * Fri Feb 09 2018 Fedora Release Engineering - 2.7-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild