From fb3ac490d548858d0892c52cdf2fbcfac90c6540 Mon Sep 17 00:00:00 2001 From: Sanne Raymaekers Date: Mon, 17 Oct 2022 15:49:05 +0200 Subject: [PATCH] schutzbot/mockbuild: stop running mock as root Running mock as root is broken, this commit can be reverted once rhbz#2135203 is fixed. --- schutzbot/mockbuild.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/schutzbot/mockbuild.sh b/schutzbot/mockbuild.sh index 7838bef9..b6ef7439 100755 --- a/schutzbot/mockbuild.sh +++ b/schutzbot/mockbuild.sh @@ -109,9 +109,12 @@ make srpm # override template repositories template_override +greenprint "🎟 Adding user to mock group" +sudo usermod -a -G mock "$(whoami)" + # Compile RPMs in a mock chroot greenprint "🎁 Building RPMs with mock" -sudo mock -r $MOCK_CONFIG --no-bootstrap-chroot \ +mock -r $MOCK_CONFIG --no-bootstrap-chroot \ --resultdir $REPO_DIR \ rpmbuild/SRPMS/*.src.rpm sudo chown -R $USER ${REPO_DIR}