aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Göttsche <cgzones@googlemail.com>2019-10-03 22:38:39 +0200
committerJason Zaman <perfinion@gentoo.org>2019-12-16 21:13:11 +0800
commit2733f39a4996c8023e3e39ac8a65e2ca92d758de (patch)
treef97f8c99b515437def85c37214c26313d0bfecf2 /Makefile
parenttravis: run check_fc_files linter with python 3.7 (diff)
downloadhardened-refpolicy-2733f39a4996c8023e3e39ac8a65e2ca92d758de.tar.gz
hardened-refpolicy-2733f39a4996c8023e3e39ac8a65e2ca92d758de.tar.bz2
hardened-refpolicy-2733f39a4996c8023e3e39ac8a65e2ca92d758de.zip
re-implement fc_sort in python
fc_sort is the only/last build tool that requires a C compiler Re-implement it in python, so that gcc dependencies can be dropped The output of the C and the python version differ slightly in the order of equally specific file contexts old: /.* system_u:object_r:default_t /sys(/.*)? system_u:object_r:sysfs_t /mnt(/[^/]*) -l system_u:object_r:mnt_t /mnt(/[^/]*)? -d system_u:object_r:mnt_t /opt/.* system_u:object_r:usr_t /var/.* system_u:object_r:var_t /usr/.* system_u:object_r:usr_t /srv/.* system_u:object_r:var_t /tmp/.* <<none>> /run/.* <<none>> /dev/.* system_u:object_r:device_t /etc/.* system_u:object_r:etc_t new: /.* system_u:object_r:default_t /sys(/.*)? system_u:object_r:sysfs_t /mnt(/[^/]*) -l system_u:object_r:mnt_t /mnt(/[^/]*)? -d system_u:object_r:mnt_t /dev/.* system_u:object_r:device_t /etc/.* system_u:object_r:etc_t /opt/.* system_u:object_r:usr_t /run/.* <<none>> /srv/.* system_u:object_r:var_t /tmp/.* <<none>> /usr/.* system_u:object_r:usr_t /var/.* system_u:object_r:var_t Signed-off-by: Jason Zaman <perfinion@gentoo.org>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile12
1 files changed, 1 insertions, 11 deletions
diff --git a/Makefile b/Makefile
index ea5f11cd..3f586465 100644
--- a/Makefile
+++ b/Makefile
@@ -76,8 +76,6 @@ SED ?= sed
SORT ?= LC_ALL=C sort
UMASK ?= umask
-CFLAGS += -Wall -Wextra -O2
-
# policy source layout
poldir := policy
moddir := $(poldir)/modules
@@ -98,7 +96,7 @@ genxml := $(PYTHON) $(support)/segenxml.py
gendoc := $(PYTHON) $(support)/sedoctool.py
genperm := $(PYTHON) $(support)/genclassperms.py
policyvers := $(PYTHON) $(support)/policyvers.py
-fcsort := $(tmpdir)/fc_sort
+fcsort := $(PYTHON) $(support)/fc_sort.py
setbools := $(AWK) -f $(support)/set_bools_tuns.awk
get_type_attr_decl := $(SED) -r -f $(support)/get_type_attr_decl.sed
comment_move_decl := $(SED) -r -f $(support)/comment_move_decl.sed
@@ -408,13 +406,6 @@ conf.intermediate: $(polxml)
########################################
#
-# Generate the fc_sort program
-#
-$(fcsort) : $(support)/fc_sort.c
- $(verbose) $(CC) $(CFLAGS) $^ -o $@
-
-########################################
-#
# Documentation generation
#
iftemplates: $(tmpdir)/iftemplates
@@ -646,7 +637,6 @@ bare: clean
$(verbose) rm -f $(tags)
# don't remove these files if we're given a local root
ifndef LOCAL_ROOT
- $(verbose) rm -f $(fcsort)
$(verbose) rm -f $(support)/*.pyc
$(verbose) rm -Rf $(support)/__pycache__/
ifneq ($(generated_te),)