Docker/oci and thus gitlab-runner, default to a root user inside the namespace, even if its an unprivileged one. This can cause issues and let permission bugs sneak in, as we are functionally root when running the build. Switch the build jobs to run with our new "containeruser" so we avoid much of it. Our user is still in the wheel/sudo group but that's fine as long we don't elevate the privileges unintentionally. Noticeably for the time being, we will need to chown the CI_PROJECT_DIR checkout as the gitlab runner might try to reuse pre-existing and cached volumes of the project checkout. Additionally we need to change the ccache path, so we will avoid the existing cache owned by "root". Close https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2433 Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8763>
38 lines
786 B
Bash
38 lines
786 B
Bash
#! /bin/bash
|
|
|
|
set -eux
|
|
|
|
sudo dnf install -y bc
|
|
|
|
# Install virtme-ng
|
|
pushd /tmp/
|
|
git clone https://github.com/arighi/virtme-ng.git
|
|
pushd virtme-ng
|
|
git fetch --tags
|
|
git checkout v1.8
|
|
sudo ./setup.py install --prefix=/usr
|
|
popd
|
|
popd
|
|
|
|
# Install fluster
|
|
pushd /opt/
|
|
sudo mkdir ./fluster
|
|
sudo chown containeruser:containeruser ./fluster/
|
|
|
|
git clone https://github.com/fluendo/fluster.git ./fluster
|
|
pushd fluster
|
|
git checkout 303a6edfda1701c8bc351909fb1173a0958810c2
|
|
./fluster.py download
|
|
popd
|
|
popd
|
|
|
|
# Build a linux image for virtme fluster tests
|
|
bash ./ci/scripts/build-linux.sh \
|
|
"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git" \
|
|
"v6.5.8" \
|
|
/opt/linux/bzImage \
|
|
'MEDIA_SUPPORT' \
|
|
'MEDIA_TEST_SUPPORT' \
|
|
'V4L_TEST_DRIVERS' \
|
|
'CONFIG_VIDEO_VISL'
|