Fix Fedora builds on Ubuntu
Change Ibffa1b986b52a1dc28de8d3b8056eed92aae9ee7 broke Fedora builds on Ubuntu. The problem is load_policy has no policy to load in Ubuntu. Using the -N option with semanage fcontext removes the need to load the SELinux policy. Change-Id: Ie2289e75bb4a7f1240916c613e500f512937283d Closes-Bug: 1347295
This commit is contained in:
parent
e2cd5fa267
commit
e1e755b207
|
@ -47,7 +47,7 @@ fi
|
|||
|
||||
# Add the path if it doesn't already exist
|
||||
if [ "`semanage fcontext -l | grep $TARGET_PATH`" == "" ]; then
|
||||
semanage fcontext -a -e $SOURCE_PATH $TARGET_PATH
|
||||
semanage fcontext -N -a -e $SOURCE_PATH $TARGET_PATH
|
||||
fi
|
||||
|
||||
restorecon -Rv $TARGET_PATH
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
#!/bin/bash
|
||||
set -eux
|
||||
set -o pipefail
|
||||
|
||||
[ -x /usr/sbin/semanage ] || exit 0
|
||||
|
||||
# Updates the selinux-policy if one is available. We should
|
||||
# be loading the latest version.
|
||||
install-packages selinux-policy selinux-policy-targeted
|
||||
|
||||
# Loads the selinux policy during image build.
|
||||
# This allows commands like setsebool and semange to work
|
||||
# during image build.
|
||||
load_policy -i
|
Loading…
Reference in New Issue