fix headers install path problem, segenxml.py variable problem, change set_tunables into a standalone awk script.
This commit is contained in:
parent
3a68d09f8b
commit
d6cf05b3e4
@ -67,7 +67,6 @@ GREP ?= egrep
|
||||
M4 ?= m4
|
||||
PYTHON ?= python
|
||||
SED ?= sed
|
||||
SH ?= sh
|
||||
|
||||
CFLAGS += -Wall
|
||||
|
||||
@ -91,7 +90,7 @@ GENXML := $(PYTHON) $(SUPPORT)/segenxml.py
|
||||
GENDOC := $(PYTHON) $(SUPPORT)/sedoctool.py
|
||||
GENPERM := $(PYTHON) $(SUPPORT)/genclassperms.py
|
||||
FCSORT := $(TMPDIR)/fc_sort
|
||||
SETTUN := $(SH) $(SUPPORT)/set_tunables
|
||||
SETBOOLS := $(AWK) -f $(SUPPORT)/set_bools_tuns.awk
|
||||
|
||||
# documentation paths
|
||||
DOCS = $(ROOT)/doc
|
||||
@ -134,7 +133,7 @@ CONTEXTPATH = $(INSTALLDIR)/contexts
|
||||
FCPATH = $(CONTEXTPATH)/files/file_contexts
|
||||
SHAREDIR = $(PREFIX)/share/selinux
|
||||
MODPKGDIR = $(SHAREDIR)/$(NAME)
|
||||
HEADERDIR = $(SHAREDIR)/refpolicy/include
|
||||
HEADERDIR = $(MODPKGDIR)/include
|
||||
DOCSDIR = $(PREFIX)/share/doc/$(PKGNAME)
|
||||
|
||||
# compile strict policy if requested.
|
||||
@ -433,7 +432,7 @@ install-headers: $(POLXML)
|
||||
$(verbose) install -m 644 $(TMPDIR)/global_{tunables,booleans}.xml $(HEADERDIR)
|
||||
$(verbose) m4 $(M4PARAM) $(ROLEMAP) > $(HEADERDIR)/$(notdir $(ROLEMAP))
|
||||
$(verbose) mkdir -p $(HEADERDIR)/support
|
||||
$(verbose) install -m 644 $(M4SUPPORT) $(GENXML) $(XMLDTD) $(HEADERDIR)/support
|
||||
$(verbose) install -m 644 $(M4SUPPORT) $(word $(words $(GENXML)),$(GENXML)) $(XMLDTD) $(HEADERDIR)/support
|
||||
$(verbose) $(GENPERM) $(AVS) $(SECCLASS) > $(HEADERDIR)/support/all_perms.spt
|
||||
$(verbose) for i in $(notdir $(ALL_LAYERS)); do \
|
||||
mkdir -p $(HEADERDIR)/$$i ;\
|
||||
|
@ -130,7 +130,7 @@ $(TMPDIR)/generated_definitions.conf: $(BASE_TE_FILES)
|
||||
$(verbose) for i in $(notdir $(BASE_TE_FILES)); do \
|
||||
echo "define(\`$$i')" >> $@ ;\
|
||||
done
|
||||
$(verbose) $(SETTUN) $(BOOLEANS) >> $@
|
||||
$(verbose) test -f $(BOOLEANS) && $(SETBOOLS) $(BOOLEANS) >> $@
|
||||
|
||||
$(TMPDIR)/all_interfaces.conf: $(M4SUPPORT) $(ALL_INTERFACES)
|
||||
ifeq ($(ALL_INTERFACES),)
|
||||
|
@ -118,7 +118,7 @@ $(TMPDIR)/generated_definitions.conf: $(ALL_LAYERS) $(ALL_TE_FILES)
|
||||
$(verbose) for i in $(notdir $(ALL_MODULES)); do \
|
||||
echo "define(\`$$i')" >> $@ ;\
|
||||
done
|
||||
$(verbose) $(SETTUN) $(BOOLEANS) >> $@
|
||||
$(verbose) test -f $(BOOLEANS) && $(SETBOOLS) $(BOOLEANS) >> $@
|
||||
|
||||
$(TMPDIR)/all_interfaces.conf: $(M4SUPPORT) $(ALL_INTERFACES)
|
||||
ifeq ($(ALL_INTERFACES),)
|
||||
|
11
refpolicy/support/set_bools_tuns.awk
Normal file
11
refpolicy/support/set_bools_tuns.awk
Normal file
@ -0,0 +1,11 @@
|
||||
# Read booleans.conf and output M4 directives to
|
||||
# override default settings in global_booleans
|
||||
|
||||
BEGIN {
|
||||
FS="="
|
||||
}
|
||||
|
||||
/^[[:blank:]]*[[:alpha:]]+/{
|
||||
gsub(/[[:blank:]]*/,"")
|
||||
print "define(`"$1"_conf',`"$2"')"
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# this file exists because this line is
|
||||
# too hard to escape correctly in a makefile
|
||||
|
||||
if test -f $1; then
|
||||
awk -F = '/^[[:blank:]]*[[:alpha:]]+/{ gsub(/[[:blank:]]*/,"") ; print "define(`"$1"_conf'\'',`"$2"'\'')" }' $1
|
||||
fi
|
Loading…
Reference in New Issue
Block a user