bug-make
[Top][All Lists]
Advanced

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

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


From: Alejandro Colomar (man-pages)
Subject: Re: [BUG] inconsistency in $localstatedir and $runstatedir
Date: Fri, 15 Jul 2022 14:09:38 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.1

Hi Paul,

On 7/14/22 18:11, Paul Smith wrote:
On Thu, 2022-07-14 at 14:16 +0200, Alejandro Colomar 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.

This I don't know about: it might be a problem in the description.

Since the FHS doesn't define /usr/local/var, and my Debian system
lacks it, and I don't think people are going to start symlinking
/usr/local/var to /var, I guess the coding standard really intended
to define $localstatedir as /var.

No, I don't think this is the case.  The GNU standards assume that all
software is installed into /usr/local by default, and that would assume
/usr/local/var.

If you want your software installed into "system" directories such as
/usr/bin, /var, /lib, etc. instead of /usr/local then you're expected
to reset these values yourself to what you want them to be when you
configure the software.

I want to use /usr/local. Not "system directories". I was just trying to use the correct paths, and found some broken docs about it, and had a guess :)


The runstatedir is a special case because it's a system-managed
directory (in that the system will clean it), which is usually shared
by all services regardless of where they're installed.  Unless the
system is supposed to also manage /usr/local/run or similar?  I hadn't
heard that but I've not checked.

Hmm, it makes sense. /usr/local/var is persistent stuff, so should be in /usr/local for sure.

/var/run isn't, and so it can live there.

So, either the description should be fixed so that $runstatedir doesn't depend on $localstatedir, or so that it is /usr/local/var/run. I don't know which one should be preferred. Maybe using /usr/local/var/run is better, because it allows symlinking to /var/run/local or /var/run depending on preferences.

Cheers,

Alex

--
Alejandro Colomar
Linux man-pages comaintainer; http://www.kernel.org/doc/man-pages/
http://www.alejandro-colomar.es/



reply via email to

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