Bug 633447

Summary: /var/cache/mock/ and /var/lib/mock/ are difficult to allocate to temporary space.
Product: [Fedora] Fedora EPEL Reporter: Nico Kadel-Garcia <nkadel>
Component: mockAssignee: Miroslav Suchý <msuchy>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: el5CC: mebrown, msuchy, williams
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-11-20 07:57:19 EST Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Nico Kadel-Garcia 2010-09-13 15:10:46 EDT
Description of problem:
     Mock can become extremely bulky, especially when working in multiple environments. It would help disk space allocations, backup, expiration, and exclusion of mock working copies from "updatedb" to keep all mock output in "/var/mock/cache/" and "/var/mock/lib/", instead of "/var/cache/mock/" and "/var/lib/mock/".

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

How reproducible:

Steps to Reproduce:
1.    Install mock
2.    Build software for several different OS configurations
3.    du -s /var/lib/mock/
4.    du -s /var/cache/mock/

Actual results:

Expected results:

Additional info:
    This might take some SELinux changes to support new location, and updates to the 'cachedir' and 'basedir' settings in /etc/mock/. But the ability to separate mock out in /etc/updatedb.conf and to designate an added partition or LVM for mock use, especially in virtualized environment migration, more than justify the work.
Comment 1 Jesse Keating 2010-09-13 16:56:04 EDT
What does FHS have to say on the manner?  I don't want to break FHS.
Comment 2 Clark Williams 2010-09-13 17:34:40 EDT
(In reply to comment #1)
> What does FHS have to say on the manner?  I don't want to break FHS.

That we're in the right place. 

Our cache data was moved from /var/lib/mock/cache to /var/cache/mock, per FHS.

Likewise the chroot dirs were placed in /var/lib/mock/<cfg> as "variable state information"

We were originally in /var/mock and moved out due to wanting to be compliant with FHS (which doesn't seem to have a provision for /var/<pkg>).
Comment 4 Nico Kadel-Garcia 2014-07-20 12:07:19 EDT
I see your point. I disagress with it for purely practical reasons. The upstream FHS was not written with this sort of tightly associated, dual, bulky, expiring components in mind. In particular I think that the "/var/lib/mock/[config] directory could be modified to also contain the pre-built cache of previous mock tarbaslls.

So please, either decide that ease of space allocation is more important than strict upstream FHS compliance, or close the ticket. It's over a year old.
Comment 5 Miroslav Suchý 2014-11-20 07:57:19 EST
Closing. This will not happen.

You can either create /srv/mock/lib /srv/mock/cache and make symlinks there.

Or even better use new lvm_root plugin and have cache in LVM, which is even better.