Add selinux policy per distro
This adds the ability to have different profiles for individual distros and versions of the distro because they all ship with and depend on different versions of policy packages. The `selinux` dir contains the unmodified policy that is being used today. The `selinux-fedora` dir contains the new policy for fedora 24 with the changes for it to compile and work on the system. The fedora policy is from commit https://github.com/projectatomic/docker-selinux/commit/4a6ce94da5e34868642ebcc7a67da937d4c73283 Signed-off-by: Michael Crosby <crosbymichael@gmail.com> Upstream-commit: 32b1f26c5111b22fe4277879c4f5e4687a6a72fc Component: engine
This commit is contained in:
@@ -135,8 +135,12 @@ set -e
|
||||
# selinux policy referencing systemd things won't work on non-systemd versions
|
||||
# of centos or rhel, which we don't support anyways
|
||||
if [ "${suite%.*}" -gt 6 ] && [[ "$version" != opensuse* ]]; then
|
||||
selinuxDir="selinux"
|
||||
if [ -d "./contrib/selinux-$version" ]; then
|
||||
selinuxDir="selinux-${version}"
|
||||
fi
|
||||
cat >> "$DEST/$version/Dockerfile.build" <<-EOF
|
||||
RUN tar -cz -C /usr/src/${rpmName}/contrib -f /root/rpmbuild/SOURCES/${rpmName}-selinux.tar.gz ${rpmName}-selinux
|
||||
RUN tar -cz -C /usr/src/${rpmName}/contrib/${selinuxDir} -f /root/rpmbuild/SOURCES/${rpmName}-selinux.tar.gz ${rpmName}-selinux
|
||||
RUN rpmbuild -ba \
|
||||
--define '_gitcommit $DOCKER_GITCOMMIT' \
|
||||
--define '_release $rpmRelease' \
|
||||
|
||||
Reference in New Issue
Block a user