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

2022-07-18 Thread Jeffrey Walton
On Mon, Jul 18, 2022 at 10:22 AM Bruno Haible wrote: > > Jeffrey Walton wrote: > > I believe MacOS maps /etc and /tmp to a private area for the user. > > They are not world readable/writable. I believe Apple did it for > > hardening. > > > > Here's from a MacOS X 10.5 machine I have: > > > >

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

2022-07-18 Thread Bruno Haible
Jeffrey Walton wrote: > I believe MacOS maps /etc and /tmp to a private area for the user. > They are not world readable/writable. I believe Apple did it for > hardening. > > Here's from a MacOS X 10.5 machine I have: > > $ ls -l /etc /tmp > lrwxr-xr-x@ 1 root wheel 11 Feb 10 2015

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

2022-07-18 Thread Jeffrey Walton
On Mon, Jul 18, 2022 at 8:18 AM Edward Welbourne wrote: > > Alejandro Colomar (Monday, July 18, 2022 14:07) > > 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

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

2022-07-18 Thread Alejandro Colomar
Hi Eddy, On 7/18/22 14:17, Edward Welbourne wrote: Alejandro Colomar (Monday, July 18, 2022 14:07) 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.

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

2022-07-18 Thread Alejandro Colomar
Hi Alfred, On 7/18/22 13:51, Alfred M. Szmidt wrote: I'm improving a Makefile for a project which uses [/usr/local]/var/lib and [/usr/local]/tmp. I see there's no standard in the GNU coding standards for directory variables. I used the following: tmpdir := $(prefix)/tmp

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

2022-07-18 Thread Edward Welbourne
Alejandro Colomar (Monday, July 18, 2022 14:07) > 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. Then I think the way you're using tmpdir

Re: [BUG] inconsistency in $localstatedir and $runstatedir

2022-07-18 Thread Alejandro Colomar
Hi Alfred, On 7/18/22 13:51, Alfred M. Szmidt wrote: So you're saying that "should normally be" doesn't mean the "the default value should normally be", but rather that "commonly, people use". Right, the _default_ value depends on _your_ system. On some systems, it is one thing,

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

2022-07-18 Thread Alejandro Colomar
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

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

2022-07-18 Thread Alfred M. Szmidt
I'm improving a Makefile for a project which uses [/usr/local]/var/lib and [/usr/local]/tmp. I see there's no standard in the GNU coding standards for directory variables. I used the following: tmpdir := $(prefix)/tmp libstatedir := $(localstatedir)/lib I developed the

Re: [BUG] inconsistency in $localstatedir and $runstatedir

2022-07-18 Thread Alfred M. Szmidt
So you're saying that "should normally be" doesn't mean the "the default value should normally be", but rather that "commonly, people use". Right, the _default_ value depends on _your_ system. On some systems, it is one thing, and on other it is something else. Which is why "you" (you

Re: [BUG] inconsistency in $localstatedir and $runstatedir

2022-07-18 Thread Alfred M. Szmidt
Hi Alejandro, I think the source of the confusion is that "Should normally be" and how you should write a default value don't match up because it is normal to use non-default values. So systems are commonly set up with localstatedir=/usr/var and runstatedir=/var/run, despite

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

2022-07-18 Thread Bruno Haible
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

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

2022-07-18 Thread Alejandro Colomar
Hi, I'm improving a Makefile for a project which uses [/usr/local]/var/lib and [/usr/local]/tmp. I see there's no standard in the GNU coding standards for directory variables. I used the following: tmpdir := $(prefix)/tmp libstatedir := $(localstatedir)/lib I developed the name

Re: [BUG] inconsistency in $localstatedir and $runstatedir

2022-07-18 Thread Alejandro Colomar
Hi Edward, On 7/18/22 12:25, Edward Welbourne wrote: Hi Alejandro, I think the source of the confusion is that "Should normally be" and how you should write a default value don't match up because it is normal to use non-default values. So systems are commonly set up with

Re: [BUG] inconsistency in $localstatedir and $runstatedir

2022-07-18 Thread Edward Welbourne
Hi Alejandro, I think the source of the confusion is that "Should normally be" and how you should write a default value don't match up because it is normal to use non-default values. So systems are commonly set up with localstatedir=/usr/var and runstatedir=/var/run, despite the fact that their

Re: [BUG] inconsistency in $localstatedir and $runstatedir

2022-07-18 Thread Alejandro Colomar
On 7/18/22 11:17, Alfred M. Szmidt wrote: Oh, there _is_ a bug. Compare what the documentation says, with a bit of variable expansion that I did to show the bug (between parentheses): Documentation says: $prefix Should normally be */usr/local*

Re: [BUG] inconsistency in $localstatedir and $runstatedir

2022-07-18 Thread Alfred M. Szmidt
Oh, there _is_ a bug. Compare what the documentation says, with a bit of variable expansion that I did to show the bug (between parentheses): Documentation says: $prefix Should normally be */usr/local* $localstatedir Should normally be */usr/local/var*

Re: [BUG] inconsistency in $localstatedir and $runstatedir

2022-07-18 Thread Alejandro Colomar
Hi Alfred, On 7/17/22 16:18, Alfred M. Szmidt wrote: How can $localstatedir be $prefix/var and at the same time $runstatedir be /var/run (notice no prefix) if it is defined as $localstatedir/run. Because prefix is normally /usr, and it was/is common to use /usr/var for exactly that