Skip to contentSkip to conversation

initscripts/urandom: create directory before staging into it

PATCH Superseded Ming Liu 3 participants 5 messages Dec 5, 2012 – Dec 7, 2012

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Ming Liu

author
#0 lore raw

PATCH 1/1 initscripts/urandom: create directory before staging into it

/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 creating /var/lib/urandom at do_install time.

---
 meta/recipes-core/initscripts/initscripts_1.0.bb | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
meta/recipes-core/initscripts/initscripts_1.0.bb +3 -1
index d25838b..39be9a8 100644
@@ -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"
 
@@ -133,4 +133,6 @@ do_install () {
 	fi
 
 	install -m 0755		${WORKDIR}/device_table.txt		${D}${sysconfdir}/device_table
+	# Holds state information pertaining to urandom
+	install -d ${D}/var/lib/urandom
 }
Signature · 1 line
1.7.11
#1 lore raw
Quoted 25 lines · Ming Liu

/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 creating /var/lib/urandom at do_install time.

---
  meta/recipes-core/initscripts/initscripts_1.0.bb | 4 +++-
  1 file changed, 3 insertions(+), 1 deletion(-)
meta/recipes-core/initscripts/initscripts_1.0.bb +1 -1
index d25838b..39be9a8 100644
@@ -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"
 

meta/recipes-core/initscripts/initscripts_1.0.bb do_install () { · line 137

Quoted 5 lines
meta/recipes-core/initscripts/initscripts_1.0.bb +2 -0
@@ -133,4 +133,6 @@ do_install () {
  	fi
 
  	install -m 0755		${WORKDIR}/device_table.txt		${D}${sysconfdir}/device_table
+	# Holds state information pertaining to urandom
+	install -d ${D}/var/lib/urandom

I thought this would go in volatiles, not here.

Sau!

Quoted 2 lines
meta/recipes-core/initscripts/initscripts_1.0.bb +0 -0
  }
author
#2 lore raw
Quoted 30 lines · Saul Wold
Quoted 29 lines · Ming Liu

/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 creating /var/lib/urandom at do_install time.

---
  meta/recipes-core/initscripts/initscripts_1.0.bb | 4 +++-
  1 file changed, 3 insertions(+), 1 deletion(-)
meta/recipes-core/initscripts/initscripts_1.0.bb +0 -0
index d25838b..39be9a8 100644
@@ -3,7 +3,7 @@ DESCRIPTION = "Initscripts provide the basic system 

startup initialization scrip
SECTION = "base"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM =
"file://COPYING;md5=751419260aa954499f7abaabaa882bbe"

meta/recipes-core/initscripts/initscripts_1.0.bb +1 -1
-PR = "r137"
+PR = "r138"
 
  INHIBIT_DEFAULT_DEPS = "1"
@@ -133,4 +133,6 @@ do_install () {
      fi
 
Quoted 6 lines

meta/recipes-core/initscripts/initscripts_1.0.bb do_install () { · line 137

Quoted 4 lines
meta/recipes-core/initscripts/initscripts_1.0.bb +0 -0
      install -m 0755        ${WORKDIR}/device_table.txt 

${D}${sysconfdir}/device_table

meta/recipes-core/initscripts/initscripts_1.0.bb +2 -0
+    # Holds state information pertaining to urandom
+    install -d ${D}/var/lib/urandom

I thought this would go in volatiles, not here.

Yes, it's a alternative solution or maybe better.
I was going to put it into volatiles, but considering it's a urandom specific directory, so I eventually put it here. OK, I will send the V2 as you suggest.

Quoted 7 lines

Sau!

Quoted 2 lines
  }
#3 lore raw
In reply to Saul Wold
Quoted 30 lines · Saul Wold
Quoted 29 lines · Ming Liu

/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 creating /var/lib/urandom at do_install time.

---
  meta/recipes-core/initscripts/initscripts_1.0.bb | 4 +++-
  1 file changed, 3 insertions(+), 1 deletion(-)
meta/recipes-core/initscripts/initscripts_1.0.bb +0 -0
index d25838b..39be9a8 100644
@@ -3,7 +3,7 @@ DESCRIPTION = "Initscripts provide the basic system 

startup initialization scrip
SECTION = "base"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM =
"file://COPYING;md5=751419260aa954499f7abaabaa882bbe"

meta/recipes-core/initscripts/initscripts_1.0.bb +1 -1
-PR = "r137"
+PR = "r138"
 
  INHIBIT_DEFAULT_DEPS = "1"
@@ -133,4 +133,6 @@ do_install () {
      fi
 
Quoted 9 lines

meta/recipes-core/initscripts/initscripts_1.0.bb do_install () { · line 137

Quoted 4 lines
meta/recipes-core/initscripts/initscripts_1.0.bb +0 -0
      install -m 0755        ${WORKDIR}/device_table.txt        

${D}${sysconfdir}/device_table

meta/recipes-core/initscripts/initscripts_1.0.bb +2 -0
+    # Holds state information pertaining to urandom
+    install -d ${D}/var/lib/urandom

I thought this would go in volatiles, not here.

Sau!

Hi Saul,

From my understanding, volatiles is a configuration file which deals with files related with volatile storage.
Files, directories and links related to volatile storage should be in this file, as it's a final method to check and make sure they are created properly. But files under /var/lib should not there.

So in my option, this patch is ok.

Thanks,
Chen Qi

Quoted 8 lines
Quoted 2 lines
  }

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

author
#4 lore raw
Quoted 38 lines · ChenQi
Quoted 37 lines · Saul Wold
Quoted 31 lines · Ming Liu

/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 creating /var/lib/urandom at do_install time.

---
  meta/recipes-core/initscripts/initscripts_1.0.bb | 4 +++-
  1 file changed, 3 insertions(+), 1 deletion(-)
meta/recipes-core/initscripts/initscripts_1.0.bb +0 -0
index d25838b..39be9a8 100644
@@ -3,7 +3,7 @@ DESCRIPTION = "Initscripts provide the basic system 

startup initialization scrip
SECTION = "base"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM =
"file://COPYING;md5=751419260aa954499f7abaabaa882bbe"

meta/recipes-core/initscripts/initscripts_1.0.bb +1 -1
-PR = "r137"
+PR = "r138"
 
  INHIBIT_DEFAULT_DEPS = "1"
@@ -133,4 +133,6 @@ do_install () {
      fi
 
      install -m 0755 ${WORKDIR}/device_table.txt 

${D}${sysconfdir}/device_table

meta/recipes-core/initscripts/initscripts_1.0.bb do_install () { · line 137

Quoted 2 lines
meta/recipes-core/initscripts/initscripts_1.0.bb +2 -0
+    # Holds state information pertaining to urandom
+    install -d ${D}/var/lib/urandom

I thought this would go in volatiles, not here.

Quoted 6 lines
Quoted 2 lines

Sau!

Hi Saul,

From my understanding, volatiles is a configuration file which deals with files related with volatile storage.
Files, directories and links related to volatile storage should be in this file, as it's a final method to check and make sure they are created properly. But files under /var/lib should not there.

Hi, Saul:

Any comments? Should I send the V2 (put it into volatiles)?

the best,
thank you

Quoted 22 lines

So in my option, this patch is ok.

Thanks,
Chen Qi

Quoted 8 lines
Quoted 2 lines
  }

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core