Also set TMPDIR and TEMP environment variables
@gabriel and I experienced build failures in a machine where /tmp was full, but the partition for slapos still had some space available.
2017-03-09 20:32:45,201 testsuite : INFO slapgrid_sr : 2017-03-09 20:32:45 slapos[17669] INFO checking whether make sets $(MAKE)... ./configure: line 3007: cannot create temp file for here-document: No space left on device
I noticed that slapos.recipe.cmmi sets $TMP before building, even though there is no reference of the "why".
In our case configure was failing creating temp documents. This configure uses #!/bin/sh which will be probably bash ( which according to manpage uses $TMPDIR to create temporary files) or dash if debian (could not find reference for dash, but it's hopefuly $TMPDIR too).
Also, mktemp which is used in configure "creates temp files in $TMPDIR if set, else /tmp", so in our case, /tmp.
To make things harder, slapos.core removes TMP TMPDIR and TEMP from environment before running buildout, so setting $TMPDIR did not work either before running slapos node software.
I could not confirm this really fixes our problem, but my attempts at setting $TMPDIR at a higher level all failed.