Mock fails when /var/cache/mock is bind-mounted.

Chris Adams cmadams at hiwaay.net
Sun Feb 13 17:07:24 UTC 2011


Once upon a time, Björn Persson <bjorn at xn--rombobjrn-67a.se> said:
> I can imagine that the file permissions might be wrong, although they seem OK 
> to me, but the error is that the directory doesn't exist. Why are the 
> directories removed and not re-created?

You mention the probable cause, but you don't show the perms.  The best
way to get the perms correct is to:

- umount /var/cache/mock
- chown --reference=/var/cache/mock /disk/data/mock
- chmod --reference=/var/cache/mock /disk/data/mock
- chcon --reference=/var/cache/mock /disk/data/mock
- mount -t bind /disk/data/mock /var/cache/mock

Alternately, rather than using bind mounts, you could edit
/etc/mock/site-defaults.cfg to move from /var/{lib,cache}/mock to
/disk/data/mock.  You still need to get the permissions correct though.

It may be a bug in mock is not noticing that it failed to create the
necessary directories and then reports the problem as "directory not
found" (rather than "permission denied").
-- 
Chris Adams <cmadams at hiwaay.net>
Systems and Network Administrator - HiWAAY Internet Services
I don't speak for anybody but myself - that's enough trouble.


More information about the devel mailing list