[arch-general] pacman/libalpm/libfetch do not honor TMPDIR

Tom Gundersen teg at jklm.no
Tue Nov 29 14:07:19 EST 2011


2011/11/29 "Jérôme M. Berger" <jeberger at free.fr>:
> David Rosenstrauch wrote:
>> On 11/25/2011 11:55 AM, Leonid Isaev wrote:
>>> Actually, what is stupid is keeping /tmp in RAM. It is an important
>>> dir, where
>>> you might have an valuable info in case of a system crash. I could never
>>> understand the logic behind this choice.
>>
>> Actually, I think it makes a lot of sense.  It lets you truly use it as
>> a repository for "temporary" files.  Any files written there will get
>> automatically wiped out at the next boot.
>>
>        And if your machine only boots very rarely (because it runs
> continuously or because you hibernate it instead of rebooting) then
> your "temporary" folder is never cleaned up. The solution that makes
> the most sense is to have /tmp on a disk and to use tmpwatch [1][2]
> in a cron job to clean it up regularly.
>
>                Jerome
>
> [1] http://fedorahosted.org/tmpwatch/
> [2] http://aur.archlinux.org/packages.php?ID=23510


You should also be able to use /usr/lib/initscripts/arch-tmpfiles,
which is what we use at boot, and which should have a similar
functionality to tmpwatch (if you are using systemd you'll get a
similar functionality for free).

-t


More information about the arch-general mailing list