public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: Mark Hatle <mark.hatle@windriver.com>
To: <openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH 08/12] initscripts: let populate-volatile.sh create the /tmp link
Date: Thu, 24 Jan 2013 11:39:03 -0600	[thread overview]
Message-ID: <510171B7.6050000@windriver.com> (raw)
In-Reply-To: <202617fa712665192de55285dc8ea3f4699315bc.1359014474.git.Qi.Chen@windriver.com>

On 1/24/13 2:16 AM, Qi.Chen@windriver.com wrote:
> From: Chen Qi <Qi.Chen@windriver.com>
>
> Previously, the /tmp link (/tmp -> /var/tmp) was created by the
> bootmisc.sh script. So in case of a read-only rootfs, this symlink
> would not be created correctly.
>
> The populate-volatile.sh script is intended to handle all directories
> and files related to volatile storage, so we should let it create
> the /tmp link.
>
> In addition, because of the improments of populate-volatile.sh, the data
> loss problem of bug#3404 is also resolved by this patch.
>
> [YOCTO #3406]
> [YOCTO #3404]
>
> Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
> ---
>   .../initscripts/initscripts-1.0/bootmisc.sh        |    9 +--------
>   .../initscripts/initscripts-1.0/volatiles          |    1 +
>   2 files changed, 2 insertions(+), 8 deletions(-)
>
> diff --git a/meta/recipes-core/initscripts/initscripts-1.0/bootmisc.sh b/meta/recipes-core/initscripts/initscripts-1.0/bootmisc.sh
> index 4f76cb4..3b5a47f 100755
> --- a/meta/recipes-core/initscripts/initscripts-1.0/bootmisc.sh
> +++ b/meta/recipes-core/initscripts/initscripts-1.0/bootmisc.sh
> @@ -54,14 +54,7 @@ fi
>
>   #
>   # This is as good a place as any for a sanity check
> -# /tmp should be a symlink to /var/tmp to cut down on the number
> -# of mounted ramdisks.
> -if test ! -L /tmp && test -d /var/tmp
> -then
> -	rm -rf /tmp
> -	ln -sf /var/tmp /tmp
> -fi
> -

I saw this the other day.  It seems like the wrong solution, if the expectation 
is that all systems want this linked behavior.  Instead the link should be 
configured in the meta/files/fs-perms.txt

Something like:

-/tmp                            01777   root    root    false - - -
+/tmp                            link    /var/tmp

Making that change would avoid this patch, and then all of the filesystems could 
inherit this behavior.  (Other distributions that don't want it can provide 
their own custom fs-perms.txt file, and simply set the older value, which will 
append to the default.)

> +#
>   # Set the system clock from hardware clock
>   # If the timestamp is more recent than the current time,
>   # use the timestamp instead.
> diff --git a/meta/recipes-core/initscripts/initscripts-1.0/volatiles b/meta/recipes-core/initscripts/initscripts-1.0/volatiles
> index e0741aa..f7e2ef7 100644
> --- a/meta/recipes-core/initscripts/initscripts-1.0/volatiles
> +++ b/meta/recipes-core/initscripts/initscripts-1.0/volatiles
> @@ -31,6 +31,7 @@ l root root 1777 /var/lock /var/volatile/lock
>   l root root 0755 /var/log /var/volatile/log
>   l root root 0755 /var/run /var/volatile/run
>   l root root 1777 /var/tmp /var/volatile/tmp
> +l root root 1777 /tmp /var/tmp
>   d root root 0755 /var/lock/subsys none
>   f root root 0664 /var/log/wtmp none
>   f root root 0664 /var/run/utmp none
>




  parent reply	other threads:[~2013-01-24 17:54 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-24  8:16 [PATCH 00/12] read-only rootfs support Qi.Chen
2013-01-24  8:16 ` [PATCH 01/12] sysvinit: add ROOTFS_READ_ONLY variable to rcS-default Qi.Chen
2013-01-24  8:16 ` [PATCH 02/12] image.bbclass: add a hook funtion to support readonly rootfs Qi.Chen
2013-01-24 19:44   ` Mark Hatle
2013-01-25  2:49     ` ChenQi
2013-01-24  8:16 ` [PATCH 03/12] core-image.bbclass: support read-only rootfs Qi.Chen
2013-01-24  8:16 ` [PATCH 04/12] package.bbclass: add VOLATILE_DIR and VOLATILE_LINK to PACKAGEVARS Qi.Chen
2013-01-24  8:16 ` [PATCH 05/12] volatiles.bbclass: add recipe Qi.Chen
2013-01-24 10:31   ` Martin Jansa
2013-01-24 11:37     ` Richard Purdie
2013-01-24 11:45       ` Burton, Ross
2013-01-25  8:58         ` ChenQi
2013-01-25 14:05           ` Burton, Ross
2013-01-28  3:32             ` ChenQi
2013-01-24  8:16 ` [PATCH 06/12] volatiles_sysvinit.bbclass: " Qi.Chen
2013-01-24  8:16 ` [PATCH 07/12] populate-volatile.sh: improve this script Qi.Chen
2013-01-24  8:16 ` [PATCH 08/12] initscripts: let populate-volatile.sh create the /tmp link Qi.Chen
2013-01-24 16:11   ` Mark Hatle
2013-01-24 17:39   ` Mark Hatle [this message]
2013-01-25  6:17     ` ChenQi
2013-01-24  8:16 ` [PATCH 09/12] initscripts: inherit volatiles to support read-only rootfs Qi.Chen
2013-01-25 13:11   ` Burton, Ross
2013-01-25 14:14     ` Richard Purdie
2013-01-28  2:11       ` ChenQi
2013-01-28  1:45     ` ChenQi
2013-01-24  8:16 ` [PATCH 10/12] dropbear: " Qi.Chen
2013-01-24  8:16 ` [PATCH 11/12] nfs-utils: " Qi.Chen
2013-01-24  8:16 ` [PATCH 12/12] dbus: " Qi.Chen
2013-01-24 10:45   ` Burton, Ross
2013-01-25  3:05     ` ChenQi
2013-01-25 13:02       ` Burton, Ross

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=510171B7.6050000@windriver.com \
    --to=mark.hatle@windriver.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox