Description of problem: mock crashes with "Permipython-test-1.0-1.fc17.src.rpmssion denied" using the --uniqueext option. Version-Release number of selected component:mock-1.2.8-1.fc22.noarch How reproducible: always Steps to Reproduce: 1. mock -r fedora-20-i386 --uniqueext=hugo --init 2. mkdir results 3. mock -r fedora-20-i386 --uniqueext=hugo --no-cleanup-after --no-clean --resultdir=results --rebuild python-test-1.0-1.fc17.src.rpm Actual results: INFO: mock.py version 1.2.8 starting (python version = 3.4.2)... Start: init plugins INFO: selinux enabled Finish: init plugins Start: run INFO: Start(python-test-1.0-1.fc17.src.rpm) Config(fedora-20-i386) Start: chroot init INFO: calling preinit hooks INFO: enabled root cache INFO: enabled yum cache Start: cleaning yum metadata Finish: cleaning yum metadata INFO: enabled ccache Mock Version: 1.2.8 INFO: Mock Version: 1.2.8 ERROR: Could not create dir /var/lib/mock/fedora-20-i386-hugo/root/builddir/build/RPMS. Error: [Errno 13] Permission denied: '/var/lib/mock/fedora-20-i386-hugo/root/builddir/build' Traceback (most recent call last): File "/usr/lib/python3.4/site-packages/mockbuild/util.py", line 111, in mkdirIfAbsent os.makedirs(dirName) File "/usr/lib/python3.4/os.py", line 227, in makedirs makedirs(head, mode, exist_ok) File "/usr/lib/python3.4/os.py", line 237, in makedirs mkdir(name, mode) PermissionError: [Errno 13] Permission denied: '/var/lib/mock/fedora-20-i386-hugo/root/builddir/build' ERROR: Exception(python-test-1.0-1.fc17.src.rpm) Config(fedora-20-i386) 0 minutes 2 seconds INFO: Results and/or logs in: results ERROR: Could not create dir /var/lib/mock/fedora-20-i386-hugo/root/builddir/build/RPMS. Error: [Errno 13] Permission denied: '/var/lib/mock/fedora-20-i386-hugo/root/bpython-test-1.0-1.fc17.src.rpmuilddir/build' Expected results: Something else.
Created attachment 1027222 [details] The srpm rebuilt (probably not significant, but just in case).
I wasn't able to duplicate the bug. Running these commands worked fine on my f22 install. 1. mock -r fedora-20-i386 --uniqueext=hugo --init 2. mkdir results 3. mock -r fedora-20-i386 --uniqueext=hugo --no-cleanup-after --no-clean --resultdir=results --rebuild python-test-1.0-1.fc17.src.rpm
Some bad state? But what could that possibly be, given that there is a --init done? yes, have tried more than once...
Can you post output of rpm -V mock I suspect that /var/lib/mock is missing setgid bit or has incorrect group, which is set during mock installation.
rpm -V mock is empty. /var/lib/mock looks OK: $ rpm -V mock $ ls -ld /var/lib/mock drwxrwsr-x. 6 root mock 4096 May 19 15:51 /var/lib/mock Other builds works fine, it's just this one using --uniqueext
Digging a little in another failure. $ sudo ls -ld /var/lib/mock/fedora-20-i386/root/builddir drwx--S---. 4 root mock 4096 May 19 16:48 /var/lib/mock/fedora-20-i386/root/builddir This seems to be the problem. No idea why it is this way, though. Obviously, it's *not* related the --uniqueext.
Looks like messed up cache. Can you try: mock -r fedora-20-i386 --scrub root_cache and then retry the build?
Something was indeed messed up. "mock -r fedora-20-i386 --scrub root_cache" didn't make it, but "rm -rf /var/lib/mock/*" made the trick. Sorry for the noise. Closing