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

Bug#620870: debian-policy: Please add /run as FHS exception



On Mon, Nov 28, 2011 at 09:08:18PM +0100, Bill Allombert wrote:
> Would anybody object to Roger patch being applied without the reference to
> /run/shm, and leave this particular topic to another bug report ?

> Beside, I attach an alternative patch by Thomas Hood that I found in the
> log but which was not send to the list.

One concern I have about this patch is that it replaces references to
/var/run and /var/lock with /run and /run/lock, but the only explanation
that /run should be used in place of /var/run is in a non-normative
footnote.  So we've effectively lifted the prohibition on shipping files
under /var/run with this change, which isn't really what we want.

Should it be spelled out in the normative bits of policy that packages
"should" use /run for anything that the FHS says should be in /var/run, and
that packages must not ship files under any of /run, /var/run, or /var/lock?

-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                                    http://www.debian.org/
slangasek@ubuntu.com                                     vorlon@debian.org

> --- policy.sgml_ORIG	2010-07-26 06:44:57.000000000 +0200
> +++ policy.sgml	2011-06-21 13:10:15.815787305 +0200
> @@ -5987,11 +5987,30 @@
>                <item>
>                  <p>
>                    The following directories in the root filesystem are
> -                  additionally allowed: <file>/sys</file> and
> -                  <file>/selinux</file>. <footnote>These directories
> -                  are used as mount points to mount virtual filesystems
> -                  to get access to kernel information.</footnote>
> -                </p>
> +                  additionally allowed: <file>/run</file>,
> +                  <footnote>
> +                    The purpose of the /run hierarchy is storage of ephemeral
> +                    system state, that is, state information that should
> +                    not be preserved across a reboot.
> +                    Files and directories residing in <file>/run</file>
> +                    should be stored on a temporary filesystem.
> +                    The <file>/run</file> directory is a
> +                    replacement for <file>/var/run</file>; its
> +                    subdirectory <file>/run/lock</file> is a replacement for
> +                    <file>/var/lock</file>.
> +                    /run/ and /run/lock/ have been introduced
> +                    by most distributions and are on track to be 
> +                    endorsed by the FHS.
> +                    Additionally, the subdirectory <file>/run/shm</file>
> +                    is a replacement for <file>/dev/shm</file>.
> +                  </footnote>
> +                  <file>/sys</file> and <file>/selinux</file>.
> +                  <footnote>
> +                    The <file>/sys</file> and <file>/selinux</file>
> +                    directories are mount points where
> +                    virtual filesystems are mounted which provide access
> +                    to kernel information.
> +                  </footnote>
>                </item>
>              </enumlist>
>  
> @@ -6489,15 +6508,17 @@
>  	  </p>
>  
>  	  <p>
> -	    <file>/var/run</file> and <file>/var/lock</file> may be mounted
> -	    as temporary filesystems<footnote>
> -		For example, using the <tt>RAMRUN</tt> and <tt>RAMLOCK</tt>
> -		options in <file>/etc/default/rcS</file>.
> -	    </footnote>, so the <file>init.d</file> scripts must handle this
> -	    correctly. This will typically amount to creating any required
> -	    subdirectories dynamically when the <file>init.d</file> script
> -	    is run, rather than including them in the package and relying on
> -	    <prgn>dpkg</prgn> to create them.
> +            Files and directories under <file>/run</file>, including those
> +            in directories <file>/var/run</file> and <file>/var/lock</file>
> +            which are symlinks or bind mounts to subdirectories of
> +            <file>/run</file>, are normally stored on a temporary
> +            filesystem and are normally not persistent across a reboot.
> +            Consequently, packages cannot assume that these files or
> +            directories are present at system boot time.
> +            Files and directories under <file>/run</file> must not be
> +            included in packages; such files or directories
> +            must be created dynamically, for example, in the
> +            <file>init.d</file> script.
>  	  </p>
>  	</sect1>
>  

Attachment: signature.asc
Description: Digital signature


Reply to: