FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > ArchLinux > ArchLinux General Discussion

 
 
LinkBack Thread Tools
 
Old 11-24-2011, 10:18 PM
clemens fischer
 
Default pacman/libalpm/libfetch do not honor TMPDIR

Hi,

would it be possible to let pacman, libalpm and libfetch honor the
environment variable TMPDIR?

I mean, this is stupid. Many people keep /tmp in RAM, on a tmpfs, and
make it big enough, but not too big, as it takes away RAM when getting
loaded.

#define TMP_LOC "TMPDIR"
#include <stdlib.h> /* getenv(3) */
#include <string.h> /* strncat(3) */
td = getenv(TMP_LOC);
/* cleanup for safety: td = cleanup(td); */
tmpdir = strncat(td, "/", 1);

What can be so difficult about this?

I got this pesty "warning: warning given when extracting .INSTALL (Write
failed)" today, and when looking at pacman, libalpm and libfetch with
strings(1), none of them seem to check TMPDIR!


clemens
 
Old 11-24-2011, 11:12 PM
Gaetan Bisson
 
Default pacman/libalpm/libfetch do not honor TMPDIR

[2011-11-25 00:18:43 +0100] clemens fischer:
> would it be possible to let pacman, libalpm and libfetch honor the
> environment variable TMPDIR?
>
> I mean, this is stupid. Many people keep /tmp in RAM, on a tmpfs, and
> make it big enough, but not too big, as it takes away RAM when getting
> loaded.
>
> #define TMP_LOC "TMPDIR"
> #include <stdlib.h> /* getenv(3) */
> #include <string.h> /* strncat(3) */
> td = getenv(TMP_LOC);
> /* cleanup for safety: td = cleanup(td); */
> tmpdir = strncat(td, "/", 1);
>
> What can be so difficult about this?

If that's easy then it shouldn't be too hard for you to open a bug
report on the tracker and submit a patch.

--
Gaetan
 
Old 11-24-2011, 11:28 PM
Allan McRae
 
Default pacman/libalpm/libfetch do not honor TMPDIR

On 25/11/11 09:18, clemens fischer wrote:

Hi,

would it be possible to let pacman, libalpm and libfetch honor the
environment variable TMPDIR?

I mean, this is stupid. Many people keep /tmp in RAM, on a tmpfs, and
make it big enough, but not too big, as it takes away RAM when getting
loaded.

#define TMP_LOC "TMPDIR"
#include<stdlib.h> /* getenv(3) */
#include<string.h> /* strncat(3) */
td = getenv(TMP_LOC);
/* cleanup for safety: td = cleanup(td); */
tmpdir = strncat(td, "/", 1);

What can be so difficult about this?

I got this pesty "warning: warning given when extracting .INSTALL (Write
failed)" today, and when looking at pacman, libalpm and libfetch with
strings(1), none of them seem to check TMPDIR!




File a bug report or at least post to the pacman-dev list. Then
relevant people might actually see your request.


But I do not get it... what is the point of having /tmp in RAM and
then setting TMPDIR elsewhere?


Allan
 
Old 11-25-2011, 05:04 AM
Hector Martinez-Seara
 
Default pacman/libalpm/libfetch do not honor TMPDIR

Hi,
Sometimes you simply need more space that the one available in /tmp.
In all my systems /tmp is in ram and as some machines have only 4Gb
memory the available space in /tmp is about 2Gb only which is
sufficient for most of the stuff but some compilations need more.
Hector

On 25 November 2011 02:28, Allan McRae <allan@archlinux.org> wrote:
> On 25/11/11 09:18, clemens fischer wrote:
>>
>> Hi,
>>
>> would it be possible to let pacman, libalpm and libfetch honor the
>> environment variable TMPDIR?
>>
>> I mean, this is stupid. *Many people keep /tmp in RAM, on a tmpfs, and
>> make it big enough, but not too big, as it takes away RAM when getting
>> loaded.
>>
>> * #define TMP_LOC "TMPDIR"
>> * #include<stdlib.h> */* getenv(3) */
>> * #include<string.h> */* strncat(3) */
>> * td = getenv(TMP_LOC);
>> * /* cleanup for safety: td = cleanup(td); */
>> * tmpdir = strncat(td, "/", 1);
>>
>> What can be so difficult about this?
>>
>> I got this pesty "warning: warning given when extracting .INSTALL (Write
>> failed)" today, and when looking at pacman, libalpm and libfetch with
>> strings(1), none of them seem to check TMPDIR!
>>
>
>
> File a bug report or at least post to the pacman-dev list. *Then relevant
> people might actually see your request.
>
> But I do not get it... * what is the point of having /tmp in RAM and then
> setting TMPDIR elsewhere?
>
> Allan
>



--
Hector Martínez-Seara Monné
mail: hseara@gmail.com
Tel: +34656271145
Tel: +358442709253
 
Old 11-25-2011, 06:46 AM
C Anthony Risinger
 
Default pacman/libalpm/libfetch do not honor TMPDIR

On Thu, Nov 24, 2011 at 5:18 PM, clemens fischer
<ino-news@spotteswoode.dnsalias.org> wrote:
>
> I mean, this is stupid. *Many people keep /tmp in RAM, on a tmpfs, and
> make it big enough, but not too big, as it takes away RAM when getting
> loaded.

there isn't much reason to limit tmpfs or /tmp ... you should be using
a swap device/file/etc to ensure files residing in tmpfs are properly
swapped out in the event memory becomes constrained, or the files are
not in use. however, i would consider it a bug for applications to
store *very* large files (exceeding 50-100M or so) in /tmp -- /var/tmp
would be more appropriate, even for ephemeral/transient files -- idk
what pacman is using /tmp for specifically, but i doubt it's extremely
large *anything* (briefly extract/read the .INSTALL?).

see: http://www.mjmwired.net/kernel/Documentation/filesystems/tmpfs.txt

"Some people (including me) find it very convenient to mount it e.g.
on /tmp and /var/tmp and have a big swap partition."

... are you memory constrained? in reality, you want your RAM 90%+
maxed at ALL times (cache/etc) ... the only time RAM is "wasted" is
when it's not being used at all.

--

C Anthony
 
Old 11-25-2011, 09:19 AM
Tom Gundersen
 
Default pacman/libalpm/libfetch do not honor TMPDIR

On Fri, Nov 25, 2011 at 7:04 AM, Hector Martinez-Seara <hseara@gmail.com> wrote:
> Sometimes you simply need more space that the one available in /tmp.
> In all my systems /tmp is in ram and as some machines have only 4Gb
> memory the available space in /tmp is *about *2Gb only which is
> sufficient for most of the stuff but some compilations need more.

I think the correct solution is to use swap (unless it is truly a
one-off case). [But I'm sure the patch would also make sense].

-t
 
Old 11-25-2011, 09:32 AM
Mauro Santos
 
Default pacman/libalpm/libfetch do not honor TMPDIR

On 25-11-2011 07:46, C Anthony Risinger wrote:
> ... however, i would consider it a bug for applications to
> store *very* large files (exceeding 50-100M or so) in /tmp -- /var/tmp
> would be more appropriate, even for ephemeral/transient files -- idk

Just out of curiosity, why do you say that? Is it a good practice rule
or something like that?

--
Mauro Santos
 
Old 11-25-2011, 03:35 PM
clemens fischer
 
Default pacman/libalpm/libfetch do not honor TMPDIR

Allan McRae wrote:

> On 25/11/11 09:18, clemens fischer wrote:
>
>> would it be possible to let pacman, libalpm and libfetch honor the
>> environment variable TMPDIR?
>
> File a bug report or at least post to the pacman-dev list. Then
> relevant people might actually see your request.

I'm not "relevant" enough to post to any dev lists.

> But I do not get it... what is the point of having /tmp in RAM and
> then setting TMPDIR elsewhere?

This has been answered by Hector Martinez-Seara. Sometimes, there's not
enough space in /tmp ...


clemens
 
Old 11-25-2011, 03:40 PM
clemens fischer
 
Default pacman/libalpm/libfetch do not honor TMPDIR

Gaetan Bisson wrote:

> If that's easy then it shouldn't be too hard for you to open a bug
> report on the tracker and submit a patch.

Then what component does the actual extracting? Is it libfetch? That
would be an upstream moving target, because it comes from netbsd. Do
you guys accept patches against libfetch in this case?


clemens
 
Old 11-25-2011, 03:55 PM
Leonid Isaev
 
Default pacman/libalpm/libfetch do not honor TMPDIR

On Fri, 25 Nov 2011 00:18:43 +0100
clemens fischer <ino-news@spotteswoode.dnsalias.org> wrote:

> Hi,
>
> would it be possible to let pacman, libalpm and libfetch honor the
> environment variable TMPDIR?
>
> I mean, this is stupid. Many people keep /tmp in RAM, on a tmpfs, and
> make it big enough, but not too big, as it takes away RAM when getting
> loaded.
>

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.

--
Leonid Isaev
GnuPG key ID: 164B5A6D
Key fingerprint: C0DF 20D0 C075 C3F1 E1BE 775A A7AE F6CB 164B 5A6D
 

Thread Tools




All times are GMT. The time now is 04:21 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org