[kteam-tool][PATCH] git-build-kernel: Build packages in user's homedir

Juerg Haefliger juerg.haefliger at canonical.com
Thu Jan 25 13:16:42 UTC 2018


Rather than polluting the global /tmp directory, build the packages in
the user's home directory ~/tmp.

Signed-off-by: Juerg Haefliger <juerg.haefliger at canonical.com>
---
 git-build-kernel/git-build-kernel | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/git-build-kernel/git-build-kernel b/git-build-kernel/git-build-kernel
index df95e12e3c6e..44cba7257b29 100755
--- a/git-build-kernel/git-build-kernel
+++ b/git-build-kernel/git-build-kernel
@@ -106,9 +106,9 @@ VERSION=`echo "$chg" | sed -n -e '1s/^.*(\([^)]*\)).*$/\1/p'`
 
 ### Set up the /tmp work directory
 
-WORKDIR="kernel-$LOGNAME-$GITSHASHORT-XXXX"
-WORKDIR="`mktemp -u -d -t $WORKDIR`"
-mkdir "$WORKDIR" || exit
+WORKDIR="kernel-$GITSHASHORT-XXXX"
+WORKDIR="`mktemp -u -d -p /home/$LOGNAME/tmp -t $WORKDIR`"
+mkdir -p "$WORKDIR" || exit
 
 BUILDDIR="$WORKDIR/build"
 LOG="$WORKDIR/build.log"
-- 
2.14.1





More information about the kernel-team mailing list