okay, running in a double chpst env does mess up the temp directory
root@skyliner-db:/tmp/fakewal-e# ./run
Python 2.7.3 (default, Apr 10 2013, 06:20:15)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> os.environ
{'TMP': '/mnt/wal-e/tmp', ...}
>>> import tempfile
>>> x = tempfile.NamedTemporaryFile()
>>> x
<open file '<fdopen>', mode 'w+b' at 0x7f4fc9618030>
>>> x.name
'/tmp/tmp3Rm6w5'
run
exec 2>&1
exec /usr/bin/chpst -u postgres /tmp/fakewal-e/wal-e
wal-e
chpst -e /etc/service/wal-e/env /opt/wal-e/current/bin/python $*
root@skyliner-db:/tmp/fakewal-e# chpst -e /etc/service/wal-e/env/ /opt/wal-e/current/bin/python
Python 2.7.3 (default, Apr 10 2013, 06:20:15)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> import tempfile
>>> os.environ
{'TMP': '/mnt/wal-e/tmp', ...}
>>> x = tempfile.NamedTemporaryFile()
>>> x.name
'/mnt/wal-e/tmp/tmpnAeGFR'
btw it's a permissions issue. the tmp dir needs to be x7xx and it was x6xx