From patchwork Thu Jan 25 13:16:42 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Juerg Haefliger X-Patchwork-Id: 865893 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) by ozlabs.org (Postfix) with ESMTP id 3zS2cj1QmHz9t2x; Fri, 26 Jan 2018 00:16:53 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1eehOa-0000v2-8k; Thu, 25 Jan 2018 13:16:48 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.86_2) (envelope-from ) id 1eehOY-0000uv-Jn for kernel-team@lists.ubuntu.com; Thu, 25 Jan 2018 13:16:46 +0000 Received: from mail-wr0-f197.google.com ([209.85.128.197]) by youngberry.canonical.com with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1eehOY-0001l6-Ce for kernel-team@lists.ubuntu.com; Thu, 25 Jan 2018 13:16:46 +0000 Received: by mail-wr0-f197.google.com with SMTP id a63so4539504wrc.15 for ; Thu, 25 Jan 2018 05:16:46 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id; bh=gLLdXJa3S4SF/ZDs87nwhi9KgJW1n6g5YEjDMpvtS9U=; b=Fhxoqe5iipBQysp7tH4Rpnk0NGtBuzh1oVP5oj98ZvemCSvg/RkC+hlCIb7b1RgZvP NVbhF+eAc1RgyT8+y8tPKooHHrGADqqXT54cyRHubb3ltsSCLSTy3WuIFnezquY81ybg c/3z74IgwNSv/hg6sOc+veBRJkULD5QY8zdZS0TJwGGYWYkrQIHT8Y4xbNFhYse8EmXt 9AgIqYy3DS56vxbH6koV4fEhO+AVTrgFlTPYxB2XqMxBSn/3nwEHTtlLBDHpzFU/QE/h sAaqH79bFOS9enUf66wWkmrxTWnj7rE9vgfn/N2D44NZuiAoFlC40TyBxCckI079m5mn 77Sw== X-Gm-Message-State: AKwxyteSO9+1gu7AA08d6+zVvDu5TDP/gNcMdhMzJsEPi9cHpjvpQNdA UtNwkk9pq5axayeC9HuanWVf9Rf1niKoEqbEd8RZyqSR5ei6v1j4IcR3qVubFsxcA99+YGSXdiQ eKDi+br91ub2jTGVNWeeU0duAQe/2RlUQNQxG1gcvQg== X-Received: by 10.80.181.197 with SMTP id a63mr19602964ede.138.1516886205868; Thu, 25 Jan 2018 05:16:45 -0800 (PST) X-Google-Smtp-Source: AH8x226apU0kfxJt5uiPTUbZdgsEoVAsNmbej8IipeZamWnuF7X9CcVrGK6RdJXfBcBc86bFNA6llw== X-Received: by 10.80.181.197 with SMTP id a63mr19602951ede.138.1516886205692; Thu, 25 Jan 2018 05:16:45 -0800 (PST) Received: from localhost.localdomain ([81.221.205.149]) by smtp.gmail.com with ESMTPSA id x25sm1352738eda.8.2018.01.25.05.16.44 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 Jan 2018 05:16:45 -0800 (PST) From: Juerg Haefliger To: kernel-team@lists.ubuntu.com Subject: [kteam-tool][PATCH] git-build-kernel: Build packages in user's homedir Date: Thu, 25 Jan 2018 14:16:42 +0100 Message-Id: <20180125131642.28918-1-juerg.haefliger@canonical.com> X-Mailer: git-send-email 2.14.1 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" Rather than polluting the global /tmp directory, build the packages in the user's home directory ~/tmp. Signed-off-by: Juerg Haefliger Acked-by: Colin Ian King Signed-off-by: Juerg Haefliger <juerg.haefliger@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"