From 32c92ea8f7843461e7d84a8d8d5ee7e927b241d2 Mon Sep 17 00:00:00 2001 From: "Kyle J. McKay" Date: Sat, 2 Jul 2016 07:05:21 -0700 Subject: [PATCH] tmpdir: make sure temp files end up in /tmp Signed-off-by: Kyle J. McKay --- Girocco/Config.pm | 1 + shlib.sh | 2 ++ 2 files changed, 3 insertions(+) diff --git a/Girocco/Config.pm b/Girocco/Config.pm index 8ab3e42..e1f8ece 100644 --- a/Girocco/Config.pm +++ b/Girocco/Config.pm @@ -820,6 +820,7 @@ our $httpsdnsname = ($httpspushurl =~ m,https://([A-Za-z0-9.-]+),i) ? lc($1) : u $ENV{'XDG_CONFIG_HOME'} = $chroot.'/var/empty'; $ENV{'HOME'} = $chroot.'/etc/girocco'; +$ENV{'TMPDIR'} = '/tmp'; $ENV{'GIT_CONFIG_NOSYSTEM'} = 1; $ENV{'GIT_ATTR_NOSYSTEM'} = 1; $ENV{'GIT_NO_REPLACE_OBJECTS'} = 1; diff --git a/shlib.sh b/shlib.sh index 0976c35..2fb6e78 100644 --- a/shlib.sh +++ b/shlib.sh @@ -147,6 +147,7 @@ git_add_config() { # Make sure we have a reproducible environment by using a controlled HOME dir XDG_CONFIG_HOME="$cfg_chroot/var/empty" HOME="$cfg_chroot/etc/girocco" +TMPDIR="/tmp" GIT_CONFIG_NOSYSTEM=1 GIT_ATTR_NOSYSTEM=1 GIT_NO_REPLACE_OBJECTS=1 @@ -154,6 +155,7 @@ GIT_TERMINAL_PROMPT=0 GIT_ASKPASS="$cfg_basedir/bin/git-askpass-password" export XDG_CONFIG_HOME export HOME +export TMPDIR export GIT_CONFIG_NOSYSTEM export GIT_ATTR_NOSYSTEM export GIT_NO_REPLACE_OBJECTS -- 2.11.4.GIT