rpm-software-management / mock

Mock is a tool for a reproducible build of RPM packages.
GNU General Public License v2.0
381 stars 227 forks source link

Don't waste / (root) directory with mock caches and buildroot, use /home by default #601

Open praiskup opened 4 years ago

praiskup commented 4 years ago

This may be configuration-only change, I am not sure. It is a follow up for fedora workstation discussions.

xsuchy commented 4 years ago

We can use ~/.cache/mock but, it will cache the files for every user running mock. Which at the end may allocate more space then system-wide /var/cache/mock.

My view is that home is more precious and more important. I usually store it on some RAID and backup it. Mock cache and even '/var/lib/mock` are not important data. And storing them in home dir is overkill. IMO.

BTW on my workstation, I have both /var/cache/mock and /var/lib/mock/ mounted as tmpfs. :)

xsuchy commented 3 years ago

This can be resolved on user side by putting: config_opts['cache_topdir'] = '/home/FOO/.cache/mock' into ~/.config/mock.cfg

I vote to close this issue as there is nothing to do in default settings.

praiskup commented 3 years ago

I vote to close this issue as there is nothing to do in default settings.

Well, I can certainly confirm that I like how podman works, and that IMO it is more convenient to put stuff (not only the cache_topdir) under /home. The fact that user's data don't collide with each other is the major thing, and the fact that it doesn't eat storage below usually small / mount point is a benefit.

But I fear I won't have time to finish the idea in reasonable time. So my plan now is to document how to configure mock to do this manually.

nkadel commented 2 years ago

Shoving mock builds under "/home" is a pretty direct violation of the File System Hierarchy. I'd also expect SELinux adventures, and /etc/fstab issues when "/home" is mounted with options like "nodev" or "noexec". It's also much more likely to accidentally leave subdirectories mounted in /home to create chaos and accidents with "ls -lR" or "find" executed in the home directory. I'd also expect SELinux adventures, and prone to even larger maintenance or system cleanup issues wheon home directories are NFS mounted.

I could perhaps see enhanding the documentation for those who feel such a need, but I'd not recommend it as a general practice.