=================================================================== $ mock -r fedora-29-x86_64 clean INFO: mock.py version 1.4.20 starting (python version = 3.7.4)... Start: init plugins INFO: selinux disabled Finish: init plugins INFO: Signal handler active Start: run Start: clean chroot ERROR: [Errno 1] Operation not permitted: '/var/lib/mock/fedora-29-x86_64/root/proc/fb' ERROR: The most common cause for this error is trying to run /usr/libexec/mock/mock as an unprivileged user. ERROR: You should not run /usr/libexec/mock/mock directly. =================================================================== I'm, not running /usr/libexec/mock/mock directly. Something is probably broken with that mock (other mocks are OK). 1. Is it safe to `sudo rm -rf /var/lib/mock/fedora-29-x86_64`? 2. Why is mock thinking I'm running /usr/libexec/mock/mock as an unprivileged user? I have mock-1.4.20-1.fc30, mock-core-configs-31.6-1.fc30.
Seems like duplicate to 1756972. Can you please try mock from dnf copr enable praiskup/mock-fixes? (mock-1.4.20-1.git.5.fe9bfeb)
Hmm, but wait - I see 'selinux disabled'. Is that expected? Not sure now. If you can reproduce the problem with version 1.git.5.fe9bfeb (even after reboot, because your box can be in invalid state), I'll probably need more info (full configuration, etc., plus --verbose --trace output). > 1. Is it safe to `sudo rm -rf /var/lib/mock/fedora-29-x86_64`? This most likely will fail, there likely are some mount points. > 2. Why is mock thinking I'm running /usr/libexec/mock/mock as an unprivileged user? Because some OSError permission exception was raised, and bubbled up to main() function for some reason. This is hint for users who don't know they should be in 'mock' group, IIUC.
Hmm, this is weird: $ sudo setenforce 1 setenforce: SELinux is disabled
Yes, looks like bug 1756972; and the fix is IMO https://github.com/rpm-software-management/mock/pull/371 The thing is that installing `selinux-policy-*` packages into nspawn chroot broke host's selinux before. And any other attempt to work with chroot can fail with EPERM, because of selinux. I think you need to restore your selinux (reboot does the job).
Rebooted, selinux is up, and I can clean. *** This bug has been marked as a duplicate of bug 1756972 ***