Support custom build location for large AUR builds
Created by: polarathene
TL;DR: Some AUR packages require greater than 16GB(some over 100GB) to build. This isn't feasible with the default location of /tmp mounted in RAM with tmpfs.
Please support a way to specify/change build and download location for AUR packages.
My system has 32GB of RAM, systemd by default mounts /tmp with tmpfs allocating 50% of the RAM as a maximum size for /tmp. Some packages such as unity-editor can exceed this, I just found my build fail with the following error:
cat: write error: No space left on device
bsdtar: Write error
==> ERROR: Failed to create package file.
All 16GB was in use, I'm not sure how much more it needed. A similar package unreal-engine mentions using up to 105GB to build via the ArchWiki.
Would it be possible to temporarily set the build location from the default /tmp location, or specifically for certain packages(better, but I'd rather just flag these packages or disable them from a regular update knowing I'll need to switch to a disk location for building them).
yaourt has support for building a package with a different location as described here. Since pamac doesn't permit much flexibility anymore with it's native AUR support, it'd be nice to have a way to do this.
I've also seen advice to edit /etc/makepkg.conf where a location can be changed here:
#-- Specify a directory for package building.
#BUILDDIR=/tmp/makepkg