Add validate target for monolithic policy.
This commit is contained in:
parent
1a1b3bd583
commit
bf1d9c5b83
24
.travis.yml
24
.travis.yml
|
@ -71,25 +71,9 @@ install:
|
|||
|
||||
# Use a heartbeat loop to produce output while compiling the policy, which takes a quite long time.
|
||||
script:
|
||||
- POLVER=$(checkpolicy -V | cut -d' ' -f1)
|
||||
- echo $TYPE $DISTRO $DIRECT_INITRC $MONOLITHIC $POLVER
|
||||
|
||||
# Prepare sources:
|
||||
- echo $TYPE $DISTRO $DIRECT_INITRC $MONOLITHIC
|
||||
- make bare
|
||||
- make conf
|
||||
|
||||
# Monolithic builds:
|
||||
- if [ "$MONOLITHIC" = y ]; then
|
||||
( for A in $(seq 8) ; do sleep 300 ; echo "Heartbeat $((A*5)) minutes" ; done ) &
|
||||
make ;
|
||||
fi
|
||||
- if [ "$MONOLITHIC" = y ]; then make file_contexts ; fi
|
||||
- if [ "$MONOLITHIC" = y ]; then setfiles -c policy.$POLVER file_contexts ; fi
|
||||
|
||||
# Modular builds:
|
||||
- if [ "$MONOLITHIC" = n ]; then make base ; fi
|
||||
- if [ "$MONOLITHIC" = n ]; then make modules ; fi
|
||||
- if [ "$MONOLITHIC" = n ]; then
|
||||
( for A in $(seq 8) ; do sleep 300 ; echo "Heartbeat $((A*5)) minutes" ; done ) &
|
||||
make validate ;
|
||||
fi
|
||||
- ( for A in $(seq 8) ; do sleep 300 ; echo "Heartbeat $((A*5)) minutes" ; done ) &
|
||||
- make
|
||||
- make validate
|
||||
|
|
|
@ -205,6 +205,15 @@ $(ncpath): $(net_contexts)
|
|||
@$(INSTALL) -d -m 0755 $(@D)
|
||||
$(verbose) $(INSTALL) -m 0644 $^ $@
|
||||
|
||||
########################################
|
||||
#
|
||||
# Validate file contexts
|
||||
#
|
||||
validate: $(fc) $(polver)
|
||||
@echo "Validating $(NAME) file_contexts."
|
||||
$(verbose) $(SETFILES) -q -c $(polver) $(fc)
|
||||
@echo "Success."
|
||||
|
||||
########################################
|
||||
#
|
||||
# Run policy source checks
|
||||
|
|
Loading…
Reference in New Issue