schutzbot/mockbuild: stop running mock as root

Running mock as root is broken, this commit can be reverted once this is
fixed.

rhbz#2135203
This commit is contained in:
Sanne Raymaekers 2022-10-17 14:59:56 +02:00
parent a23b1c4b3e
commit 545ce3412e

View file

@ -101,10 +101,13 @@ greenprint "📤 RPMS will be uploaded to: ${REPO_URL}"
# override template repositories
template_override
greenprint "✏ Adding user to mock group"
sudo usermod -a -G mock "$(whoami)"
greenprint "🔧 Building source RPM"
git archive --prefix "osbuild-composer-${COMMIT}/" --output "osbuild-composer-${COMMIT}.tar.gz" HEAD
./tools/rpm_spec_add_provides_bundle.sh
sudo mock -r "$MOCK_CONFIG" --buildsrpm \
mock -r "$MOCK_CONFIG" --buildsrpm \
--define "commit ${COMMIT}" \
--spec ./osbuild-composer.spec \
--sources "./osbuild-composer-${COMMIT}.tar.gz" \
@ -115,7 +118,7 @@ if [ "${NIGHTLY:=false}" == "true" ]; then
fi
greenprint "🎁 Building RPMs"
sudo mock -r "$MOCK_CONFIG" \
mock -r "$MOCK_CONFIG" \
--define "commit ${COMMIT}" \
--with=tests \
${RELAX_REQUIRES:+"$RELAX_REQUIRES"} \