Patchwork [V2] initscripts: add urandom directory into volatiles

login
register
mail settings
Submitter Ming Liu
Date Dec. 18, 2012, 6:23 a.m.
Message ID <1355811791-4681-1-git-send-email-ming.liu@windriver.com>
Download mbox | patch
Permalink /patch/41223/
State New
Headers show

Comments

Ming Liu - Dec. 18, 2012, 6:23 a.m.
/etc/init.d/urandom fails to start/stop because it tries to save
random-seed into /var/lib/urandom folder which does not exist in the
file system.

Fixed by adding /var/lib/urandom into volatiles.

[YOCTO #3518]
[ CQID: WIND00384168 ]

Signed-off-by: Ming Liu <ming.liu@windriver.com>
---
 meta/recipes-core/initscripts/initscripts-1.0/volatiles | 1 +
 meta/recipes-core/initscripts/initscripts_1.0.bb        | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)
Ross Burton - Dec. 18, 2012, 11:23 a.m.
On 18 December 2012 06:23, Ming Liu <ming.liu@windriver.com> wrote:
> /etc/init.d/urandom fails to start/stop because it tries to save
> random-seed into /var/lib/urandom folder which does not exist in the
> file system.
>
> Fixed by adding /var/lib/urandom into volatiles.

Doesn't this mean that the persistent state of urandom will be saved
to a ramdisk?

Mixing up persistent and transient state in /var is exactly why /run
exists, and why we should switch to support /run as soon as
possible...

Ross
Saul Wold - Dec. 18, 2012, 7:30 p.m.
On 12/18/2012 03:23 AM, Burton, Ross wrote:
> On 18 December 2012 06:23, Ming Liu <ming.liu@windriver.com> wrote:
>> /etc/init.d/urandom fails to start/stop because it tries to save
>> random-seed into /var/lib/urandom folder which does not exist in the
>> file system.
>>
>> Fixed by adding /var/lib/urandom into volatiles.
>
> Doesn't this mean that the persistent state of urandom will be saved
> to a ramdisk?
>
> Mixing up persistent and transient state in /var is exactly why /run
> exists, and why we should switch to support /run as soon as
> possible...
>
Sorry, this was my suggestion, It actually is creating /var/lib/urandom 
which should be a persistent sub-dir of /var

I was bouncing back and for about it being in the the recipe's 
do_install vs  populate volaties file, I did not see any other 
/var/lib/<dir> being created so I leaned toward this solution.  This was 
on the list a week or so ago, we could go back to itbeing created in the 
do_install()

Sau!


> Ross
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>
>
Ming Liu - Dec. 19, 2012, 1:44 a.m.
On 12/19/2012 03:30 AM, Saul Wold wrote:
> On 12/18/2012 03:23 AM, Burton, Ross wrote:
>> On 18 December 2012 06:23, Ming Liu <ming.liu@windriver.com> wrote:
>>> /etc/init.d/urandom fails to start/stop because it tries to save
>>> random-seed into /var/lib/urandom folder which does not exist in the
>>> file system.
>>>
>>> Fixed by adding /var/lib/urandom into volatiles.
>>
>> Doesn't this mean that the persistent state of urandom will be saved
>> to a ramdisk?
>>
>> Mixing up persistent and transient state in /var is exactly why /run
>> exists, and why we should switch to support /run as soon as
>> possible...
>>
> Sorry, this was my suggestion, It actually is creating 
> /var/lib/urandom which should be a persistent sub-dir of /var
>
> I was bouncing back and for about it being in the the recipe's 
> do_install vs  populate volaties file, I did not see any other 
> /var/lib/<dir> being created so I leaned toward this solution.  This 
> was on the list a week or so ago, we could go back to itbeing created 
> in the do_install()

OK, so I will resend the patch creating it in do_install() as V3 since 
it's a bit long time ago.

the best,
thank you

>
> Sau!
>
>
>> Ross
>>
>> _______________________________________________
>> Openembedded-core mailing list
>> Openembedded-core@lists.openembedded.org
>> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>>
>>
>
>
Qi.Chen@windriver.com - Dec. 19, 2012, 2:20 a.m.
On 12/18/2012 07:23 PM, Burton, Ross wrote:
> On 18 December 2012 06:23, Ming Liu<ming.liu@windriver.com>  wrote:
>> /etc/init.d/urandom fails to start/stop because it tries to save
>> random-seed into /var/lib/urandom folder which does not exist in the
>> file system.
>>
>> Fixed by adding /var/lib/urandom into volatiles.
> Doesn't this mean that the persistent state of urandom will be saved
> to a ramdisk?
>
> Mixing up persistent and transient state in /var is exactly why /run
> exists, and why we should switch to support /run as soon as
> possible...
FWIW, there's bug about /run directory support -- 
https://bugzilla.yoctoproject.org/show_bug.cgi?id=3181.

Cheers,
Chen Qi
> Ross
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>

Patch

diff --git a/meta/recipes-core/initscripts/initscripts-1.0/volatiles b/meta/recipes-core/initscripts/initscripts-1.0/volatiles
index e0741aa..66b2ed0 100644
--- a/meta/recipes-core/initscripts/initscripts-1.0/volatiles
+++ b/meta/recipes-core/initscripts/initscripts-1.0/volatiles
@@ -37,3 +37,4 @@  f root root 0664 /var/run/utmp none
 l root root 0644 /etc/resolv.conf /var/run/resolv.conf
 f root root 0644 /var/run/resolv.conf none
 l root root 0755 /run /var/run
+d root root 0755 /var/lib/urandom none
diff --git a/meta/recipes-core/initscripts/initscripts_1.0.bb b/meta/recipes-core/initscripts/initscripts_1.0.bb
index d25838b..251dd06 100644
--- a/meta/recipes-core/initscripts/initscripts_1.0.bb
+++ b/meta/recipes-core/initscripts/initscripts_1.0.bb
@@ -3,7 +3,7 @@  DESCRIPTION = "Initscripts provide the basic system startup initialization scrip
 SECTION = "base"
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
-PR = "r137"
+PR = "r138"
 
 INHIBIT_DEFAULT_DEPS = "1"