Bug 181521 - restrictive umask breaks mock
Summary: restrictive umask breaks mock
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: mock
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Seth Vidal
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-02-14 19:58 UTC by Jason Corley
Modified: 2007-11-30 22:11 UTC (History)
1 user (show)

Fixed In Version: 0.7.0
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-06-14 20:24:47 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Jason Corley 2006-02-14 19:58:38 UTC
Description of problem:
Default umask at NCSU is 0077 and I've discovered this doesn't play well with mock.

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

How reproducible:
always

Steps to Reproduce:
$ umask
77
$ mock /path/to/srpm
init
clean
prep
setup
Traceback (most recent call last):
  File "/usr/bin/mock", line 786, in ?
    main()
  File "/usr/bin/mock", line 774, in main
    my.build(srpm)
  File "/usr/bin/mock", line 308, in build
    srpm_out = self.install_build_deps(srpm)
  File "/usr/bin/mock", line 233, in install_build_deps
    shutil.copy2(srpm, dest)
  File "/usr/lib/python2.3/shutil.py", line 82, in copy2
    copyfile(src, dst)
  File "/usr/lib/python2.3/shutil.py", line 38, in copyfile
    fdst = open(dst, 'wb')
IOError: [Errno 13] Permission denied:
'/var/lib/mock/centos-3-i386/root//builddir/build/originals'  
$ umask 0022
$ mock /path/to/srpm
init
clean
prep
setup
build
ending
done
Results and/or logs in: /var/lib/mock/centos-3-i386/result
$

Comment 1 Clark Williams 2006-04-18 15:06:18 UTC
I tried your test case above with the current mock and didn't have a permissions
problem. 

I notice that there is an explicit umask setting (os.umask(022))in the main
build section of main() in mock.py, but I don't see any note in CVS when that
was added. It's quite possible it was added in response to this bug, just not
annotated such. 

Would you try this again and see if it still fails?

Clark 

Comment 2 Michael E Brown 2007-06-14 20:24:47 UTC
Should be fixed for quite a while now. Closing.


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