Fix mock: use --root with name instead of -r path for mockbuild user

When using -r /path/to/custom.cfg, mock fails to resolve the mockbuild
user because the config isn't in the standard /etc/mock/ directory.
Copy the generated config to /etc/mock/custom.cfg and reference it with
--root custom instead.
This commit is contained in:
Anders da Silva Rytter Hansen 2026-05-27 13:18:54 -03:00
commit 7c3341d729

View file

@ -70,8 +70,9 @@ jobs:
enabled=1
"""
MOCKEOF
cp /tmp/mock-custom.cfg /etc/mock/custom.cfg
mock \
-r /tmp/mock-custom.cfg \
--root custom \
--resultdir "${HOME}/mock-results" \
--rebuild "${{ env.SRPM_PATH }}"