Bug 248362 - mock cache doesn't work properly for multiple users
Summary: mock cache doesn't work properly for multiple users
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora Hosted Projects
Classification: Retired
Component: mock (Show other bugs)
(Show other bugs)
Version: unspecified
Hardware: All Linux
low
low
Target Milestone: ---
Assignee: Clark Williams
QA Contact:
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-07-16 13:48 UTC by Jeff Sheltren
Modified: 2013-01-10 04:22 UTC (History)
1 user (show)

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 22:06:27 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

Description Jeff Sheltren 2007-07-16 13:48:56 UTC
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 21:08:08 UTC
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 21:31:26 UTC
ping?

Comment 3 Jeff Sheltren 2008-09-10 21:41:12 UTC
Working great now with mock-0.9.9-1.fc9.noarch

Thanks!

Comment 4 Clark Williams 2008-09-10 22:06:27 UTC
thanks, closing...


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