Bug 248362 - mock cache doesn't work properly for multiple users
mock cache doesn't work properly for multiple users
Status: CLOSED CURRENTRELEASE
Product: Fedora Hosted Projects
Classification: Retired
Component: mock (Show other bugs)
unspecified
All Linux
low Severity low
: ---
: ---
Assigned To: Clark Williams
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-07-16 09:48 EDT by Jeff Sheltren
Modified: 2013-01-09 23:22 EST (History)
1 user (show)

See Also:
Fixed In Version: mock-0.9.11-1.fc10.noarch
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-09-10 18:06:27 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jeff Sheltren 2007-07-16 09:48:56 EDT
Description of problem:
When using mock's cache, buildroot setup fails if the cache was created by a
different user.

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



Steps to Reproduce:
1. As a user, 'usera', Build a package in mock with 'use_cache' enabled.
2. Let build complete and mock exit.
3. As a user, 'userb', attempt to build a package in the same chroot.  mock
tries to use the cache created by 'usera', but there are permission problems.
  
Actual results:
init
clean
prep
This may take a while
unpack cache
Traceback (most recent call last):
  File "/usr/bin/mock", line 1140, in ?
    main()
  File "/usr/bin/mock", line 1137, in main
    do_rebuild(config_opts, srpms)
  File "/usr/bin/mock", line 997, in do_rebuild
    my.prep()
  File "/usr/bin/mock", line 261, in prep
    self._prep_install()
  File "/usr/bin/mock", line 707, in _prep_install
    yumconf_fo = open(yumconf, 'w+')
IOError: [Errno 13] Permission denied:
'/var/lib/mock/centos-5-x86_64/root/etc/yum.conf'


Expected results:
Permissions should be corrected to allow multiple users to use the same mock
root cache, or if that is not possible, mock should ignore the unusable cache
file and re-create the build root from scratch.

Additional info:
This happens, for example, because I have a machine setup as a plague builder
which calls mock as the plague-builder user.  If I try to call mock from my
account for a build root which plague has created the cache for, I will see the
error.
Comment 1 Clark Williams 2008-03-07 16:08:08 EST
Jeff, we've been through a fairly massive rework of mock and part of what we did
was to try and make it handle multiple users and caching sanely. Would you try
the 0.9.7+ version of mock and see if has fixed this problem?

Comment 2 Clark Williams 2008-09-10 17:31:26 EDT
ping?
Comment 3 Jeff Sheltren 2008-09-10 17:41:12 EDT
Working great now with mock-0.9.9-1.fc9.noarch

Thanks!
Comment 4 Clark Williams 2008-09-10 18:06:27 EDT
thanks, closing...

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