[kteam-tool][PATCH] git-build-kernel: Build packages in user's homedir
Kamal Mostafa
kamal at canonical.com
Thu Jan 25 16:47:22 UTC 2018
In my opinion, this would be an undesirable change. We specifically chose
to leave the build dirs in /tmp, so that they could be cleaned globally by
the sysadmin (via cron job, a reboot, or manually) -- its just that nobody
ever enabled a cron job. I think we should instead just implement a
one-line cron job to wipe out /tmp/kernel-{foo} builds older than 1 week
(or use a standard "clean-temp" daemon). Spreading the builds out to each
$HOME/tmp will, IMHO, actually make them *less* likely to get cleaned up by
anybody -- particularly since they won't get cleaned by reboot anymore.
-Kamal
On Thu, Jan 25, 2018 at 5:16 AM, Juerg Haefliger <
juerg.haefliger at canonical.com> wrote:
> 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
>
>
> --
> kernel-team mailing list
> kernel-team at lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/kernel-team
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20180125/b855d1f2/attachment.html>
More information about the kernel-team
mailing list