Skip to contentSkip to conversation

Fix for runtime error for rescue mode

PATCH Superseded Chen Qi 3 participants 7 messages Mar 25, 2015 – Apr 9, 2015

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Chen Qi

author
#0 lore raw

cover Fix for runtime error for rescue mode

The following changes since commit d3fcfe346b3472170641d9194243c4bbe06b8585:

systemd: fix firmware path to match linux-firmware (2015-03-23 11:27:13 +0000)

are available in the git repository at:

git://git.openembedded.org/openembedded-core-contrib ChenQi/bug6698
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=ChenQi/bug6698

Chen Qi (2):
util-linux: split util-linux-sulogin
shadow: add 'util-linux-sulogin' to RDEPENDS

 meta/recipes-core/util-linux/util-linux.inc | 10 +++++++---
 meta/recipes-extended/shadow/shadow.inc     |  3 ++-
 2 files changed, 9 insertions(+), 4 deletions(-)
Signature · 1 line
1.9.1
author
#1 lore raw

PATCH 1/2 util-linux: split util-linux-sulogin

[YOCTO #6698]

---
 meta/recipes-core/util-linux/util-linux.inc | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
meta/recipes-core/util-linux/util-linux.inc +7 -3
index 10b14b3..d93505c 100644
@@ -32,7 +32,7 @@ PACKAGES =+ "util-linux-agetty util-linux-fdisk util-linux-cfdisk util-linux-sfd
              util-linux-mkfs util-linux-mcookie util-linux-reset \
              util-linux-mkfs.cramfs util-linux-fsck.cramfs util-linux-fstrim \
              util-linux-partx ${PN}-bash-completion util-linux-hwclock \
-             util-linux-findfs util-linux-getopt"
+             util-linux-findfs util-linux-getopt util-linux-sulogin"
 PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'pylibmount', 'util-linux-pylibmount', '', d)}"
 
 PACKAGES_DYNAMIC = "^util-linux-lib.*"
@@ -96,6 +96,8 @@ FILES_util-linux-mkfs = "${sbindir}/mkfs"
 FILES_util-linux-fsck.cramfs = "${sbindir}/fsck.cramfs"
 FILES_util-linux-mkfs.cramfs = "${sbindir}/mkfs.cramfs"
 
+FILES_util-linux-sulogin = "${base_sbindir}/sulogin*"
+
 # Util-linux' blkid replaces the e2fsprogs one
 FILES_util-linux-blkid = "${base_sbindir}/blkid*"
 RCONFLICTS_util-linux-blkid = "e2fsprogs-blkid"
@@ -173,7 +175,7 @@ ALTERNATIVE_PRIORITY = "100"
 
 ALTERNATIVE_${PN}  = "dmesg kill more mkswap blockdev pivot_root switch_root"
 ALTERNATIVE_${PN} += "mkfs.minix hexdump last logger mesg renice wall"
-ALTERNATIVE_${PN} += "setsid chrt flock utmpdump eject sulogin"
+ALTERNATIVE_${PN} += "setsid chrt flock utmpdump eject"
 
 ALTERNATIVE_LINK_NAME[dmesg] = "${base_bindir}/dmesg"
 ALTERNATIVE_LINK_NAME[kill] = "${base_bindir}/kill"
@@ -184,7 +186,6 @@ ALTERNATIVE_LINK_NAME[pivot_root] = "${base_sbindir}/pivot_root"
 ALTERNATIVE_LINK_NAME[switch_root] = "${base_sbindir}/switch_root"
 ALTERNATIVE_LINK_NAME[mkfs.minix] = "${base_sbindir}/mkfs.minix"
 ALTERNATIVE_LINK_NAME[eject] = "${bindir}/eject"
-ALTERNATIVE_LINK_NAME[sulogin] = "${base_sbindir}/sulogin"
 
 ALTERNATIVE_${PN}-doc = "mountpoint.1 last.1 mesg.1 wall.1 sulogin.8 utmpdump.1 reset.1"
 
@@ -239,6 +240,9 @@ ALTERNATIVE_TARGET[reset] = "${base_bindir}/reset"
 ALTERNATIVE_util-linux-getopt = "getopt"
 ALTERNATIVE_LINK_NAME[getopt] = "${base_bindir}/getopt"
 
+ALTERNATIVE_util-linux-sulogin = "sulogin"
+ALTERNATIVE_LINK_NAME[sulogin] = "${base_sbindir}/sulogin"
+
 BBCLASSEXTEND = "native nativesdk"
 
 python do_package_prepend () {
Signature · 1 line
1.9.1
author
#5 lore raw

PATCH 2/2 shadow: add 'util-linux-sulogin' to RDEPENDS

In reply to Chen Qi

If shadow is installed, sulogin from busybox cannot work correctly because it still assumes that /etc/shadow is not there. This leads to the problem when booting into rescue mode in an image with shadow installed but not sulogin from util-linux.

To fix this problem, we add 'util-linux-sulogin' to RDEPENDS of shadow. This runtime dependency is specific to OE, because we have to ensure that sulogin can work correctly and sulogin from busybox cannot because FEATURE_SHADOWPASSWORDS is not enabled by default. And we cannot enable it by default for busybox, because that would lead to utilities in busybox to assume the existence of /etc/shadow which is not always true in OE.

[YOCTO #6698]

---
 meta/recipes-extended/shadow/shadow.inc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
meta/recipes-extended/shadow/shadow.inc +2 -1
index bb3a927..a05ead3 100644
@@ -83,7 +83,8 @@ PACKAGECONFIG[attr] = "--with-attr,--without-attr,attr"
 PACKAGECONFIG[acl] = "--with-acl,--without-acl,acl"
 
 RDEPENDS_${PN} = "shadow-securetty \
-                  base-passwd"
+                  base-passwd \
+                  util-linux-sulogin"
 RDEPENDS_${PN}_class-native = ""
 RDEPENDS_${PN}_class-nativesdk = ""
 
Signature · 1 line
1.9.1
author
#6 lore raw
In reply to Chen Qi

ping

Any comment on this one?

//Chen Qi

Quoted 17 lines · Chen Qi

The following changes since commit d3fcfe346b3472170641d9194243c4bbe06b8585:

systemd: fix firmware path to match linux-firmware (2015-03-23 11:27:13 +0000)

are available in the git repository at:

git://git.openembedded.org/openembedded-core-contrib ChenQi/bug6698
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=ChenQi/bug6698

Chen Qi (2):
util-linux: split util-linux-sulogin
shadow: add 'util-linux-sulogin' to RDEPENDS

  meta/recipes-core/util-linux/util-linux.inc | 10 +++++++---
  meta/recipes-extended/shadow/shadow.inc     |  3 ++-
  2 files changed, 9 insertions(+), 4 deletions(-)
#2 lore raw

Re: [PATCH 1/2] util-linux: split util-linux-sulogin

In reply to Chen Qi

Hello Chen Qi,

Quoted 48 lines · Chen Qi

[YOCTO #6698]

---
 meta/recipes-core/util-linux/util-linux.inc | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
meta/recipes-core/util-linux/util-linux.inc +4 -3
index 10b14b3..d93505c 100644
@@ -32,7 +32,7 @@ PACKAGES =+ "util-linux-agetty util-linux-fdisk util-linux-cfdisk util-linux-sfd
              util-linux-mkfs util-linux-mcookie util-linux-reset \
              util-linux-mkfs.cramfs util-linux-fsck.cramfs util-linux-fstrim \
              util-linux-partx ${PN}-bash-completion util-linux-hwclock \
-             util-linux-findfs util-linux-getopt"
+             util-linux-findfs util-linux-getopt util-linux-sulogin"
 PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'pylibmount', 'util-linux-pylibmount', '', d)}"
 
 PACKAGES_DYNAMIC = "^util-linux-lib.*"
@@ -96,6 +96,8 @@ FILES_util-linux-mkfs = "${sbindir}/mkfs"
 FILES_util-linux-fsck.cramfs = "${sbindir}/fsck.cramfs"
 FILES_util-linux-mkfs.cramfs = "${sbindir}/mkfs.cramfs"
 
+FILES_util-linux-sulogin = "${base_sbindir}/sulogin*"
+
 # Util-linux' blkid replaces the e2fsprogs one
 FILES_util-linux-blkid = "${base_sbindir}/blkid*"
 RCONFLICTS_util-linux-blkid = "e2fsprogs-blkid"
@@ -173,7 +175,7 @@ ALTERNATIVE_PRIORITY = "100"
 
 ALTERNATIVE_${PN}  = "dmesg kill more mkswap blockdev pivot_root switch_root"
 ALTERNATIVE_${PN} += "mkfs.minix hexdump last logger mesg renice wall"
-ALTERNATIVE_${PN} += "setsid chrt flock utmpdump eject sulogin"
+ALTERNATIVE_${PN} += "setsid chrt flock utmpdump eject"
 
 ALTERNATIVE_LINK_NAME[dmesg] = "${base_bindir}/dmesg"
 ALTERNATIVE_LINK_NAME[kill] = "${base_bindir}/kill"
@@ -184,7 +186,6 @@ ALTERNATIVE_LINK_NAME[pivot_root] = "${base_sbindir}/pivot_root"
 ALTERNATIVE_LINK_NAME[switch_root] = "${base_sbindir}/switch_root"
 ALTERNATIVE_LINK_NAME[mkfs.minix] = "${base_sbindir}/mkfs.minix"
 ALTERNATIVE_LINK_NAME[eject] = "${bindir}/eject"
-ALTERNATIVE_LINK_NAME[sulogin] = "${base_sbindir}/sulogin"
 
 ALTERNATIVE_${PN}-doc = "mountpoint.1 last.1 mesg.1 wall.1 sulogin.8 utmpdump.1 reset.1"
 

meta/recipes-core/util-linux/util-linux.inc ALTERNATIVE_TARGET[reset] = "${base_bindir}/reset" · line 248

Quoted 9 lines
meta/recipes-core/util-linux/util-linux.inc +3 -0
@@ -239,6 +240,9 @@ ALTERNATIVE_TARGET[reset] = "${base_bindir}/reset"
 ALTERNATIVE_util-linux-getopt = "getopt"
 ALTERNATIVE_LINK_NAME[getopt] = "${base_bindir}/getopt"
 
+ALTERNATIVE_util-linux-sulogin = "sulogin"
+ALTERNATIVE_LINK_NAME[sulogin] = "${base_sbindir}/sulogin"
+
 BBCLASSEXTEND = "native nativesdk"
 
 python do_package_prepend () {

I think you should add RDEPENDS_${PN} = "util-linux-sulogin". I didn't check whether that was done for other split-out packages, but otherwise people installing util-linux might miss sulogin in the future.

Regards,
Andreas

#3 lore raw

Re: [PATCH 1/2] util-linux: split util-linux-sulogin

Quoted 73 lines · On Tuesday 07 April 2015 11:46:24 Andreas Oberritter wrote:

Hello Chen Qi,

Quoted 70 lines · Chen Qi

[YOCTO #6698]

---

 meta/recipes-core/util-linux/util-linux.inc | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
(quoted diff) +0 -0

b/meta/recipes-core/util-linux/util-linux.inc index 10b14b3..d93505c 100644

meta/recipes-core/util-linux/util-linux.inc +0 -0
@@ -32,7 +32,7 @@ PACKAGES =+ "util-linux-agetty util-linux-fdisk

util-linux-cfdisk util-linux-sfd>

              util-linux-mkfs util-linux-mcookie util-linux-reset \
              util-linux-mkfs.cramfs util-linux-fsck.cramfs
              util-linux-fstrim \
              util-linux-partx ${PN}-bash-completion util-linux-hwclock \
meta/recipes-core/util-linux/util-linux.inc +3 -1
-             util-linux-findfs util-linux-getopt"
+             util-linux-findfs util-linux-getopt util-linux-sulogin"
 
 PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'pylibmount',
 'util-linux-pylibmount', '', d)}"
 
 PACKAGES_DYNAMIC = "^util-linux-lib.*"
@@ -96,6 +96,8 @@ FILES_util-linux-mkfs = "${sbindir}/mkfs"
 
 FILES_util-linux-fsck.cramfs = "${sbindir}/fsck.cramfs"
 FILES_util-linux-mkfs.cramfs = "${sbindir}/mkfs.cramfs"
 
+FILES_util-linux-sulogin = "${base_sbindir}/sulogin*"
+
 
 # Util-linux' blkid replaces the e2fsprogs one

FILES_util-linux-blkid = "${base_sbindir}/blkid*" RCONFLICTS_util-linux-blkid = "e2fsprogs-blkid"

meta/recipes-core/util-linux/util-linux.inc +1 -1
@@ -173,7 +175,7 @@ ALTERNATIVE_PRIORITY = "100"
 
 ALTERNATIVE_${PN}  = "dmesg kill more mkswap blockdev pivot_root
 switch_root" ALTERNATIVE_${PN} += "mkfs.minix hexdump last logger mesg
 renice wall"> 
-ALTERNATIVE_${PN} += "setsid chrt flock utmpdump eject sulogin"
+ALTERNATIVE_${PN} += "setsid chrt flock utmpdump eject"
 
 ALTERNATIVE_LINK_NAME[dmesg] = "${base_bindir}/dmesg"

ALTERNATIVE_LINK_NAME[kill] = "${base_bindir}/kill"

meta/recipes-core/util-linux/util-linux.inc +0 -0
@@ -184,7 +186,6 @@ ALTERNATIVE_LINK_NAME[pivot_root] =

"${base_sbindir}/pivot_root">
ALTERNATIVE_LINK_NAME[switch_root] = "${base_sbindir}/switch_root" ALTERNATIVE_LINK_NAME[mkfs.minix] = "${base_sbindir}/mkfs.minix" ALTERNATIVE_LINK_NAME[eject] = "${bindir}/eject"

meta/recipes-core/util-linux/util-linux.inc +3 -1
-ALTERNATIVE_LINK_NAME[sulogin] = "${base_sbindir}/sulogin"
 
 ALTERNATIVE_${PN}-doc = "mountpoint.1 last.1 mesg.1 wall.1 sulogin.8
 utmpdump.1 reset.1"> 
@@ -239,6 +240,9 @@ ALTERNATIVE_TARGET[reset] = "${base_bindir}/reset"
 
 ALTERNATIVE_util-linux-getopt = "getopt"
 ALTERNATIVE_LINK_NAME[getopt] = "${base_bindir}/getopt"
 
+ALTERNATIVE_util-linux-sulogin = "sulogin"
+ALTERNATIVE_LINK_NAME[sulogin] = "${base_sbindir}/sulogin"
+
 
Quoted 7 lines
Quoted 3 lines
meta/recipes-core/util-linux/util-linux.inc +0 -0
 BBCLASSEXTEND = "native nativesdk"

python do_package_prepend () {

I think you should add RDEPENDS_${PN} = "util-linux-sulogin". I didn't check whether that was done for other split-out packages, but otherwise people installing util-linux might miss sulogin in the future.

Unless util-linux becomes just a meta-package that pulls in all of the split packages and itself contains nothing, that would seem to me to defeat the purpose of splitting out the package in the first place - you could never have util-linux installed without util-linux-sulogin.

Cheers,
Paul

Signature · 2 lines
Paul Eggleton
Intel Open Source Technology Centre
author
#4 lore raw

Re: [PATCH 1/2] util-linux: split util-linux-sulogin

Quoted 80 lines · Paul Eggleton
Quoted 73 lines · On Tuesday 07 April 2015 11:46:24 Andreas Oberritter wrote:

Hello Chen Qi,

Quoted 70 lines · Chen Qi

[YOCTO #6698]

---

  meta/recipes-core/util-linux/util-linux.inc | 10 +++++++---
  1 file changed, 7 insertions(+), 3 deletions(-)
(quoted diff) +0 -0

b/meta/recipes-core/util-linux/util-linux.inc index 10b14b3..d93505c 100644

meta/recipes-core/util-linux/util-linux.inc +0 -0
@@ -32,7 +32,7 @@ PACKAGES =+ "util-linux-agetty util-linux-fdisk

util-linux-cfdisk util-linux-sfd>

               util-linux-mkfs util-linux-mcookie util-linux-reset \
               util-linux-mkfs.cramfs util-linux-fsck.cramfs
               util-linux-fstrim \
               util-linux-partx ${PN}-bash-completion util-linux-hwclock \
meta/recipes-core/util-linux/util-linux.inc +3 -1
-             util-linux-findfs util-linux-getopt"
+             util-linux-findfs util-linux-getopt util-linux-sulogin"
 
  PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'pylibmount',
  'util-linux-pylibmount', '', d)}"
 
  PACKAGES_DYNAMIC = "^util-linux-lib.*"
@@ -96,6 +96,8 @@ FILES_util-linux-mkfs = "${sbindir}/mkfs"
 
  FILES_util-linux-fsck.cramfs = "${sbindir}/fsck.cramfs"
  FILES_util-linux-mkfs.cramfs = "${sbindir}/mkfs.cramfs"
 
+FILES_util-linux-sulogin = "${base_sbindir}/sulogin*"
+
 
  # Util-linux' blkid replaces the e2fsprogs one
  FILES_util-linux-blkid = "${base_sbindir}/blkid*"
  RCONFLICTS_util-linux-blkid = "e2fsprogs-blkid"
meta/recipes-core/util-linux/util-linux.inc +1 -1
@@ -173,7 +175,7 @@ ALTERNATIVE_PRIORITY = "100"
 
  ALTERNATIVE_${PN}  = "dmesg kill more mkswap blockdev pivot_root
  switch_root" ALTERNATIVE_${PN} += "mkfs.minix hexdump last logger mesg
  renice wall">
-ALTERNATIVE_${PN} += "setsid chrt flock utmpdump eject sulogin"
+ALTERNATIVE_${PN} += "setsid chrt flock utmpdump eject"
 
  ALTERNATIVE_LINK_NAME[dmesg] = "${base_bindir}/dmesg"
  ALTERNATIVE_LINK_NAME[kill] = "${base_bindir}/kill"
meta/recipes-core/util-linux/util-linux.inc +0 -0
@@ -184,7 +186,6 @@ ALTERNATIVE_LINK_NAME[pivot_root] =

"${base_sbindir}/pivot_root">
ALTERNATIVE_LINK_NAME[switch_root] = "${base_sbindir}/switch_root" ALTERNATIVE_LINK_NAME[mkfs.minix] = "${base_sbindir}/mkfs.minix" ALTERNATIVE_LINK_NAME[eject] = "${bindir}/eject"

meta/recipes-core/util-linux/util-linux.inc +3 -1
-ALTERNATIVE_LINK_NAME[sulogin] = "${base_sbindir}/sulogin"
 
  ALTERNATIVE_${PN}-doc = "mountpoint.1 last.1 mesg.1 wall.1 sulogin.8
  utmpdump.1 reset.1">
@@ -239,6 +240,9 @@ ALTERNATIVE_TARGET[reset] = "${base_bindir}/reset"
 
  ALTERNATIVE_util-linux-getopt = "getopt"
  ALTERNATIVE_LINK_NAME[getopt] = "${base_bindir}/getopt"
 
+ALTERNATIVE_util-linux-sulogin = "sulogin"
+ALTERNATIVE_LINK_NAME[sulogin] = "${base_sbindir}/sulogin"
+
 
Quoted 6 lines
Quoted 3 lines
meta/recipes-core/util-linux/util-linux.inc +0 -0
  BBCLASSEXTEND = "native nativesdk"
  
  python do_package_prepend () {

I think you should add RDEPENDS_${PN} = "util-linux-sulogin". I didn't check whether that was done for other split-out packages, but otherwise people installing util-linux might miss sulogin in the future.

Quoted 8 lines

Unless util-linux becomes just a meta-package that pulls in all of the split packages and itself contains nothing, that would seem to me to defeat the purpose of splitting out the package in the first place - you could never have util-linux installed without util-linux-sulogin.

Cheers,
Paul

Andreas and Paul,

Thank you for you comments. I'll send out V2.

Best Regards,
Chen Qi