[OE-core] [PATCH v3] base-files: add /run directory from FHS 3 draft specification

Jonathan Liu net147 at gmail.com
Thu May 23 03:20:27 UTC 2013


On 23 May 2013 02:33, Burton, Ross <ross.burton at intel.com> wrote:

> Hi Jonathan
>
> On 22 May 2013 02:47, Jonathan Liu <net147 at gmail.com> wrote:
> > This adds the /run directory from the Filesystem Hierarchy Standard 3.0
> > Draft [1] and refactors the filesystem as follows:
>
> Good start!
>
> > - Remove /var/run from dbus package as it is created on startup
> > - Remove /var/volatile/run/resolvconf/interface from resolvconf package
> >   as resolvconf package uses /etc/resolvconf/run/interface
>
> Can these be separate patches, as they're essentially unrelated cleanups.
>
Ok.


> Please also drop all PR changes, they're not needed in oe-core.
>

Ok.

>
> > diff --git a/meta/files/fs-perms.txt b/meta/files/fs-perms.txt
> > index becb85c..c829bec 100644
> > --- a/meta/files/fs-perms.txt
> > +++ b/meta/files/fs-perms.txt
> > @@ -45,15 +45,14 @@ ${oldincludedir}    0755    root    root    true
>  0644    root    root
> >
> >  # Items from base-files
> >  # Links
> > -${localstatedir}/run   link    volatile/run
> > +${localstatedir}/run   link    /run
> >  ${localstatedir}/log   link    volatile/log
> > -${localstatedir}/lock  link    volatile/lock
> > +${localstatedir}/lock  link    /run/lock
> >  ${localstatedir}/tmp   link    volatile/tmp
> >
> >  # Special permissions from base-files
> >  # Set 1777
> >  /tmp                           01777   root    root    false - - -
> > -${localstatedir}/volatile/lock 01777   root    root    false - - -
> >  ${localstatedir}/volatile/tmp  01777   root    root    false - - -
>
> Nothing appears to sets mode 1777 on /run/lock.  Then again Fedora
> thinks that 0755 is sufficient, although Debian uses 1777.  We should
> probably keep the permissions as 1777.
>
For sysvinit case, /run/lock is created with root:root owner and 1777
permissions by populate-volatiles.sh.
For systemd case, /run/lock is created with root:root owner and 0755
permissions by /usr/lib/tmpfiles.d/legacy.conf -
http://cgit.freedesktop.org/systemd/systemd/tree/tmpfiles.d/legacy.conf.
Presumably any system using the stock systemd legacy.conf, it would be
using 0755 permissions. This is true on Arch Linux and Fedora for example.
I would generally prefer to stick with permissions from systemd upstream.
What is your opinion on the matter?


> diff --git a/meta/recipes-core/dbus/dbus.inc
> b/meta/recipes-core/dbus/dbus.inc
> index 2be5bda..8055824 100644
> --- a/meta/recipes-core/dbus/dbus.inc
> +++ b/meta/recipes-core/dbus/dbus.inc
> @@ -101,9 +101,9 @@ do_install() {
>              > ${D}${sysconfdir}/default/volatiles/99_dbus
>
>
> -       mkdir -p ${D}${localstatedir}/run/dbus
> ${D}${localstatedir}/lib/dbus
> +       mkdir -p ${D}${localstatedir}/lib/dbus
>
> Presumably dbus will create /run/dbus if required?
>
> Ross
>
/run/dbus is created automatically on boot.
For sysvinit case, it is created by populate-volatiles.sh which also sets
messagebus:messagebus owner.
For systemd case, it is created when dbus.socket (a dependency of
dbus.service) is started by systemd. dbus.socket implicitly creates it when
specifying:
[Socket]
ListenStream=/var/run/dbus/system_bus_socket

Regards,
Jonathan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20130523/e4a9f72d/attachment-0002.html>


More information about the Openembedded-core mailing list