Vagrantfile: remove older installed modules before "make install"

When testing issues in older versions of refpolicy (for example when
git-bisecting a regression), the newer policy modules are kept in
/usr/share/selinux/refpolicy/ and trigger errors when they fail to be
loaded by "semodule -s refpolicy -i /usr/share/selinux/refpolicy/*.pp".

Avoid this situation by removed old modules from
/usr/share/selinux/refpolicy/ before running "make install".

Signed-off-by: Nicolas Iooss <nicolas.iooss@m4x.org>
This commit is contained in:
Nicolas Iooss 2020-04-14 22:09:54 +02:00
parent acd45b66b4
commit 2b2b5bad06
No known key found for this signature in database
GPG Key ID: C191415F340DAAA0
1 changed files with 1 additions and 0 deletions

1
Vagrantfile vendored
View File

@ -15,6 +15,7 @@ $install_refpolicy = <<-SHELL
sudo -su vagrant make -C /vagrant conf
sudo -su vagrant make -C /vagrant all
sudo -su vagrant make -C /vagrant validate
rm -f /usr/share/selinux/refpolicy/*.pp
make -C /vagrant install
make -C /vagrant install-headers
semodule -s refpolicy -i /usr/share/selinux/refpolicy/*.pp