Bug 1222970 - Build error using --uniqueext
Summary: Build error using --uniqueext
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: mock
Version: 22
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Clark Williams
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-05-19 14:02 UTC by Alec Leamas
Modified: 2015-05-19 20:24 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-05-19 20:24:34 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
The srpm rebuilt (probably not significant, but just in case). (10.33 KB, application/octet-stream)
2015-05-19 14:03 UTC, Alec Leamas
no flags Details

Description Alec Leamas 2015-05-19 14:02:54 UTC
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.

Comment 1 Alec Leamas 2015-05-19 14:03:53 UTC
Created attachment 1027222 [details]
The srpm rebuilt (probably not significant,  but just in case).

Comment 2 Ralph Bean 2015-05-19 14:21:34 UTC
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

Comment 3 Alec Leamas 2015-05-19 14:27:39 UTC
Some bad state? But what could that possibly be, given that there is a --init done?

yes, have tried more than once...

Comment 4 Michael Simacek 2015-05-19 14:30:13 UTC
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.

Comment 5 Alec Leamas 2015-05-19 14:34:58 UTC
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

Comment 6 Alec Leamas 2015-05-19 15:16:50 UTC
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.

Comment 7 Michael Simacek 2015-05-19 15:24:46 UTC
Looks like messed up cache.
Can you try: mock -r fedora-20-i386 --scrub root_cache
and then retry the build?

Comment 8 Alec Leamas 2015-05-19 20:24:34 UTC
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


Note You need to log in before you can comment on or make changes to this bug.