Bug 1235144 - mock fails to create directories
Summary: mock fails to create directories
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: mock
Version: el6
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Miroslav Suchý
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1235141 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-06-24 07:15 UTC by Stephen Collier
Modified: 2015-10-08 06:37 UTC (History)
6 users (show)

Fixed In Version: 1.2.13-2.fc22 mock-1.2.13-2.fc21 mock-1.2.13-2.el7 mock-1.2.13-2.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-09-23 04:11:03 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Stephen Collier 2015-06-24 07:15:46 UTC
Description of problem:
ERROR: Could not create dir /var/lib/mock/fedora-21-x86_64/root/builddir/build/RPMS. Error: [Errno 13] Permission denied: '/var/lib/mock/fedora-21-x86_64/root/builddir/build'
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/mockbuild/util.py", line 99, in mkdirIfAbsent
    os.makedirs(dirName)
  File "/usr/lib64/python2.6/os.py", line 150, in makedirs
    makedirs(head, mode)
  File "/usr/lib64/python2.6/os.py", line 157, in makedirs
    mkdir(name, mode)
OSError: [Errno 13] Permission denied: '/var/lib/mock/fedora-21-x86_64/root/builddir/build'
ERROR: Could not create dir /var/lib/mock/fedora-21-x86_64/root/builddir/build/RPMS. Error: [Errno 13] Permission denied: '/var/lib/mock/fedora-21-x86_64/root/builddir/build'


Version-Release number of selected component (if applicable):
1.2.10

How reproducible:
always

Steps to Reproduce:
1.mock --init -r fedora-21-x86_64
2.gives error
3.

Actual results:
Fails to create directories

Expected results:


Additional info:
user is in mock group
drwxrwsr-x 12 root mock 4096 Jun 24 03:01 /var/lib/mock

Comment 1 Stephen Collier 2015-06-24 07:17:16 UTC
Build system was correctly working before update to 1.2.10
update applied to build f22

Comment 2 Stephen Collier 2015-06-24 07:39:20 UTC
*** Bug 1235141 has been marked as a duplicate of this bug. ***

Comment 3 Stephen Collier 2015-06-25 00:26:04 UTC
Commenting out line 388 buildroot.py where it drops privileges fixes the problem as it needs privilegs to create directories when the builddir is 
drwx------ 3 root mock 4096 Jun 24 20:16 /var/lib/mock/fedora-22-x86_64/root/builddir/

Comment 4 Miroslav Suchý 2015-07-07 15:19:26 UTC
I am really curious how you  created the directory as:
  drwx------ 3 root mock
It should be:
  drwx--S--- 3 root mock

An no matter how I am trying I could not get that directory without S attribute.

Can you please provide more data so I can reproduce? Feel free to reopen once you have reproducer.

Comment 5 Stephen Collier 2015-09-07 07:49:02 UTC
Sorry for the delay - its on a centos VM on Centos 6.7. The directory was created by mock on first build session.

Comment 6 Stephen Collier 2015-09-07 07:56:41 UTC
I just deleted the whole directory structure and it came back with directory as before with no S. Just upgraded to mock-1.2.12-1.el6.noarch and still same problem

Comment 7 Fedora Update System 2015-09-16 20:01:48 UTC
mock-1.2.13-2.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2015-16053

Comment 8 Fedora Update System 2015-09-16 20:04:48 UTC
mock-1.2.13-2.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2015-16054

Comment 9 Fedora Update System 2015-09-16 20:06:48 UTC
mock-1.2.13-2.fc21 has been submitted as an update to Fedora 21. https://bodhi.fedoraproject.org/updates/FEDORA-2015-16056

Comment 10 Fedora Update System 2015-09-16 20:08:31 UTC
mock-1.2.13-2.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2015-8114

Comment 11 Fedora Update System 2015-09-16 20:09:37 UTC
mock-1.2.13-2.el6 has been submitted as an update to Fedora EPEL 6. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2015-8115

Comment 12 Fedora Update System 2015-09-17 21:30:00 UTC
mock-1.2.13-2.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.\nIf you want to test the update, you can install it with \n su -c 'yum --enablerepo=updates-testing update mock'. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-16054

Comment 13 Fedora Update System 2015-09-18 05:20:55 UTC
mock-1.2.13-2.fc21 has been pushed to the Fedora 21 testing repository. If problems still persist, please make note of it in this bug report.\nIf you want to test the update, you can install it with \n su -c 'yum --enablerepo=updates-testing update mock'. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-16056

Comment 14 Stephen Collier 2015-09-18 05:25:56 UTC
Unfortunately I'm using epel and its not in epel or epel-testing yet

Comment 15 Fedora Update System 2015-09-18 16:24:32 UTC
mock-1.2.13-2.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report.\nIf you want to test the update, you can install it with \n su -c 'yum --enablerepo=updates-testing update mock'. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-16053

Comment 16 Fedora Update System 2015-09-19 03:19:50 UTC
mock-1.2.13-2.el6 has been pushed to the Fedora EPEL 6 testing repository. If problems still persist, please make note of it in this bug report.\nIf you want to test the update, you can install it with \n su -c 'yum --enablerepo=updates-testing update mock'. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2015-8115

Comment 17 Fedora Update System 2015-09-19 03:21:40 UTC
mock-1.2.13-2.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report.\nIf you want to test the update, you can install it with \n su -c 'yum --enablerepo=updates-testing update mock'. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2015-8114

Comment 18 Fedora Update System 2015-09-23 04:09:55 UTC
mock-1.2.13-2.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.

Comment 19 Fedora Update System 2015-09-24 08:22:38 UTC
mock-1.2.13-2.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.

Comment 20 Fedora Update System 2015-10-05 22:50:25 UTC
mock-1.2.13-2.fc21 has been pushed to the Fedora 21 stable repository. If problems still persist, please make note of it in this bug report.

Comment 21 Fedora Update System 2015-10-07 03:04:55 UTC
mock-1.2.13-2.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.

Comment 22 Fedora Update System 2015-10-07 04:04:31 UTC
mock-1.2.13-2.el6 has been pushed to the Fedora EPEL 6 stable repository. If problems still persist, please make note of it in this bug report.

Comment 23 Stephen Collier 2015-10-08 06:37:46 UTC
Finish: yum install
ERROR: Could not create dir /var/lib/mock/sc-atrpms-7-x86_64/root/builddir/build/RPMS. Error: [Errno 13] Permission denied: '/var/lib/mock/sc-atrpms-7-x86_64/root/builddir/build'
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/mockbuild/util.py", line 100, in mkdirIfAbsent
    os.makedirs(dirName)
  File "/usr/lib64/python2.6/os.py", line 150, in makedirs
    makedirs(head, mode)
  File "/usr/lib64/python2.6/os.py", line 157, in makedirs
    mkdir(name, mode)
OSError: [Errno 13] Permission denied: '/var/lib/mock/sc-atrpms-7-x86_64/root/builddir/build'
ERROR: Exception(/var/ftp/pub/home/SRPMS/mythtv-0.27.5-9.src.rpm) Config(sc-atrpms-7-x86_64) 8 minutes 18 seconds
INFO: Results and/or logs in: /var/lib/mock//sc-atrpms-7-x86_64/result
ERROR: Could not create dir /var/lib/mock/sc-atrpms-7-x86_64/root/builddir/build/RPMS. Error: [Errno 13] Permission denied: '/var/lib/mock/sc-atrpms-7-x86_64/root/builddir/build'

This is with mock-1.2.13-2.el6.noarch


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