[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-trivial] [PATCH] configure: Put tempfiles in a subdir of the b

From: Eric Blake
Subject: Re: [Qemu-trivial] [PATCH] configure: Put tempfiles in a subdir of the build directory
Date: Mon, 19 May 2014 11:46:16 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0

On 05/19/2014 11:19 AM, Peter Maydell wrote:
> When libtool support was added to configure, the new temporary files
> were left out of the list of files cleaned up on exit; this results
> in a lot of stale .lo files being left around in /tmp. Worse, libtool
> creates a /tmp/.libs directory which we can't easily clean up.
> Put all our temporary files in a single temporary directory created
> as a subdirectory of the build directory, so we can easily clean it up,
> and don't need fragile or complicated code for creation to avoid it
> clashing with temporary directories from other instances of QEMU
> configure or being subject to attack from adversaries who can write
> to /tmp.
> Since the temporaries now live in the build tree, we have no
> need to jump through hoops with a trap handler to try to remove
> them when configure exits; this fixes some weird bugs where hitting
> ^C during a configure run wouldn't actually make it stop, because
> we would run the trap handler but then not stop. (It is possible
> to get the trap handler semantics right but it is convoluted largely
> because of bugs in dash, so it is simpler to just avoid it.)
> Note that "temporary files go in the build directory, not /tmp" is
> the way autoconf behaves.
> Signed-off-by: Peter Maydell <address@hidden>
> ---

Reviewed-by: Eric Blake <address@hidden>

> -# NB: do not call "exit" in the trap handler; this is buggy with some shells;
> -# see <address@hidden>

While we don't need a trap that jumps through hoops, it may still be
nice to have a 'rm -r ${TMPDIR1}' at the end of configure.  Just because
we cleanup a leftover config-temp on start from an earlier aborted run
doesn't mean that a clean run shouldn't clean up after itself.

Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]