Mockbuild: workaround a SELinux policy issue on c10s.
SELinux policy forbids systemd-machined from creating a varlink socket, which it does since v256. This makes it fail to start. Subsequently, mock fails to build the RPM, because it uses systemd-nspawn as an isolation and it fails to register the machine with systemd-machined. Signed-off-by: Tomáš Hozza <thozza@redhat.com>
This commit is contained in:
parent
dcc08d8bd4
commit
df83c62920
1 changed files with 8 additions and 0 deletions
|
|
@ -135,6 +135,14 @@ if [[ ($ID == rhel || $ID == centos) && ${VERSION_ID%.*} == 10 ]]; then
|
|||
sudo dnf copr enable -y @osbuild/centpkg "centos-stream-10-$(uname -m)"
|
||||
fi
|
||||
|
||||
# TODO: Remove this workaround, once https://issues.redhat.com/browse/RHEL-49567 is fixed
|
||||
# We can't workaround this in mock config due to https://github.com/rpm-software-management/mock/pull/1410
|
||||
if [[ $ID == centos && ${VERSION_ID%.*} == 10 ]]; then
|
||||
sudo setenforce 0
|
||||
sudo systemctl restart systemd-machined.service
|
||||
sudo setenforce 1
|
||||
fi
|
||||
|
||||
# Install requirements for building RPMs in mock.
|
||||
greenprint "📦 Installing mock requirements"
|
||||
dnf_install_with_retry createrepo_c make mock python3-pip rpm-build s3cmd
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue