[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Quilt-dev] [PATCH] inspect: Don't let TMPDIR take over /var/tmp
From: |
Jean Delvare |
Subject: |
[Quilt-dev] [PATCH] inspect: Don't let TMPDIR take over /var/tmp |
Date: |
Fri, 9 Dec 2011 22:28:29 +0100 |
User-agent: |
KMail/1.12.4 (Linux/2.6.32.46-0.3-pae; KDE/4.3.5; i686; ; ) |
Don't let TMPDIR take over /var/tmp. TMPDIR is set to /tmp by default
on some systems [1], in this case letting it take over /var/tmp voids
the point of using /var/tmp for data size reasons in the first place
[2]. I'd rather hardcode /var/tmp. But in case someone really wants
to control this, we can check if VARTMPDIR is set and use that if it
is set [3].
[1] I tried to track down how it was happening and I am far from
certain that this is on purpose. I've seen it happen only on local
graphical login, not on text console login nor remote login. This
suggests a leak from some piece of the graphical desktop stack. And
I've seen it on both KDE and Gnome, but not Xfce. Go figure.
[2] This is the reason given in commit
d4074d26276b9a2d452563dbf57ed497afa7b710 for using /var/tmp:
Author: Andreas Gruenbacher
Date: Sun Sep 12 15:11:15 2004 +0000
- scripts/inspect.in: Run the RPM %prep section in /var/tmp and
not in /tmp: the sources can become large.
[3] Idea taken from:
http://markmail.org/thread/5ydqokxouuddfvar
---
quilt/scripts/inspect.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/quilt/scripts/inspect.in
+++ b/quilt/scripts/inspect.in
@@ -61,7 +61,7 @@ else
specdir=$PWD
fi
-tmpdir="$(gen_tempfile -d ${TMPDIR:-/var/tmp}/${0##*/})"
+tmpdir="$(gen_tempfile -d ${VARTMPDIR:-/var/tmp}/${0##*/})"
mkdir -p $tmpdir || exit 1
add_exit_handler "rm -rf $tmpdir"
mkdir -p $tmpdir/build
--
Jean Delvare
Suse L3
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Quilt-dev] [PATCH] inspect: Don't let TMPDIR take over /var/tmp,
Jean Delvare <=