diff options
author | Jan Vcelak <jvcelak@redhat.com> | 2010-07-30 16:14:55 -0500 |
---|---|---|
committer | Clark Williams <williams@redhat.com> | 2010-07-31 14:17:58 -0500 |
commit | 1b3c32a75fb70e9a0ff062ed1b57a6e7f4067f6c (patch) | |
tree | d94a995cebbb012970962bf1636ada46e60dd3f0 /Makefile.am | |
parent | ef1a8749b9ca89546ff9384137c1b5ef91adcdbb (diff) | |
download | mock-1b3c32a75fb70e9a0ff062ed1b57a6e7f4067f6c.tar.gz mock-1b3c32a75fb70e9a0ff062ed1b57a6e7f4067f6c.tar.xz mock-1b3c32a75fb70e9a0ff062ed1b57a6e7f4067f6c.zip |
add selinux plugin
This patch adds an selinux plugin that sets up an environment with
selinux turned *off* in the build chroot. How does this work? From the
author's description:
It is done the same as the patch sent by Thomas Liu in bz 614440 does.
Actually, this proceeding was suggested by Dan Walsh in bz 573111.
1.) Fake /proc/filesystems is created in conf["cachedir"]. It includes the
same content as the same file in host environment, except line with selinuxfs.
This file is bind mounted into build environment.
2.) Option '--setopt=tsflags=nocontext' is added to yum commands. This is done
by wrapping mock.util.do with _selinuxDoYum in "preyum" hook. This function
just adds the option and passes the command to original mock.util.do function.
The wrapping is removed in "postyum" hook.
I didn't find cleaner method, without modifying main code.
Signed-off-by: Clark Williams <williams@redhat.com>
Diffstat (limited to 'Makefile.am')
-rw-r--r-- | Makefile.am | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am index 25e6bf5..a26be37 100644 --- a/Makefile.am +++ b/Makefile.am @@ -44,7 +44,9 @@ plugins_PYTHON = \ py/mock/plugins/ccache.py \ py/mock/plugins/root_cache.py \ py/mock/plugins/tmpfs.py \ - py/mock/plugins/yum_cache.py + py/mock/plugins/yum_cache.py \ + py/mock/plugins/selinux.py + pkgpython_PYTHON = \ py/mock/__init__.py \ |