Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 248362 - mock cache doesn't work properly for multiple users
mock cache doesn't work properly for multiple users
Product: Fedora Hosted Projects
Classification: Retired
Component: mock (Show other bugs)
All Linux
low Severity low
: ---
: ---
Assigned To: Clark Williams
Depends On:
  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:
Last Closed: 2008-09-10 18:06:27 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
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):

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:
This may take a while
unpack cache
Traceback (most recent call last):
  File "/usr/bin/mock", line 1140, in ?
  File "/usr/bin/mock", line 1137, in main
    do_rebuild(config_opts, srpms)
  File "/usr/bin/mock", line 997, in do_rebuild
  File "/usr/bin/mock", line 261, in prep
  File "/usr/bin/mock", line 707, in _prep_install
    yumconf_fo = open(yumconf, 'w+')
IOError: [Errno 13] Permission denied:

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
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
Comment 3 Jeff Sheltren 2008-09-10 17:41:12 EDT
Working great now with mock-0.9.9-1.fc9.noarch

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.