bug-make
[Top][All Lists]
Advanced

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

Re: Missing [/usr/local]/var/lib and [/usr/local]/tmp


From: Alejandro Colomar
Subject: Re: Missing [/usr/local]/var/lib and [/usr/local]/tmp
Date: Mon, 18 Jul 2022 14:07:47 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0



On 7/18/22 13:41, Bruno Haible wrote:
Alejandro Colomar wrote:
I used the following:

tmpdir := $(prefix)/tmp

Writing it like this has two drawbacks:
   1) The user cannot force a specific temporary directory by setting
      the TMPDIR environment variable. This may be blocking if the
      default temporary directory has not enough room.
   2) It creates one more directory that requires either regular attention
      (so that it does not fill up over time) or a fascist policy of the
      kind "let's remove the contents of this directory regularly".

Suggestion: Use ${TMPDIR-/tmp} instead.

Thanks for the suggestion.  That was indeed my first implementation.
But, MacOS seems to be setting TMPDIR (or at least some script run at startup seems to be setting it in my system), and it's set to something really weird that I don't trust will exist after reboot.

That's why I wasn't comfortable setting $tmpdir to ${TMPDIR-/tmp}.

Although... now that I think, the program shouldn't have a hardcoded $tmpdir at install time, at all. It should probably have the ${TMPDIR-/tmp} behavior inside the program.

So maybe I should patch the program in that sense.

Right?


See also [1].

Bruno

[1] 
https://superuser.com/questions/332610/where-is-the-temporary-directory-in-linux




What about $libstatedir?

Cheers,

Alex

--
Alejandro Colomar
<http://www.alejandro-colomar.es/>

Attachment: OpenPGP_signature
Description: OpenPGP digital signature


reply via email to

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