[Top][All Lists]

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

Re: /run and needing a --rundir for configure

From: Eric Blake
Subject: Re: /run and needing a --rundir for configure
Date: Mon, 09 Sep 2013 06:36:20 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130805 Thunderbird/17.0.8

On 09/09/2013 01:59 AM, Paolo Bonzini wrote:
> Date: Sun, 08 Sep 2013 12:26:22 -0400
>> From: Richard Stallman <address@hidden>
>> To: address@hidden (Karl Berry)
>> Subject: Re: --rundir for coding standards
>>     + The directory for installing data files which the programs modify
>>     + while they run, that pertain to one specific machine, and which need
>>     + not persist longer than the execution of the program.
>> Those words are not clear to me.  Are these temp files?
>> If not, how do they differ from temp files?
> Temporary files are stored until their content is consumed, so they are
> usually tied to a short-running process.  /run is also tied to the lifetime
> of a process, but usually it is long-running.  For example, it could hold:
> * "state" files, like pid files for daemons
> * FIFOs and AF_UNIX sockets
> Another use for /run is to place mountpoints that are not persistent across
> reboot, for example removable devices or Hurd-style virtual filesystems
> (Linux implements them in FUSE, the "filesystem in userspace" module).
> Putting them into /run ensures that /mnt (or an equivalent directory under
> the user's home directory) does not get crowded.

As I see it, the key difference is that MOST of /var must persist across
reboots, but /var/run is a special subdirectory that need persist only
as long as the process is running (pid files are a perfect example of
common /var/run contents).  With the recent addition of systemd into the
GNU/Linux world, distros have moved to naming the two directories /var
and /run, rather than /var and /var/run, so that there is no instance of
a top-level directory whose subdirectories have different lifetimes on
their contents.

While 'make install' will generally never stick files into /run (as such
files make no sense until the program is running), it is common to have
programs that stick empty subdirectories under /run (so that they are
labeled correctly during distribution, rather than having to create and
relabel them on the fly).  Hence having --rundir available as an option
to specify /run/pkg via $(rundir)/pkg (rather than hard-coding to
$(localstate)/run/pkg) is desirable for installation of these directories.

Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

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