* [PATCH V2 1/2] util-linux: split out util-linux-sulogin
2015-04-09 5:49 [PATCH V2 0/2] Fix for runtime error for rescue mode Chen Qi
@ 2015-04-09 5:49 ` Chen Qi
2015-04-09 5:49 ` [PATCH V2 2/2] shadow: add 'util-linux-sulogin' to RDEPENDS Chen Qi
1 sibling, 0 replies; 3+ messages in thread
From: Chen Qi @ 2015-04-09 5:49 UTC (permalink / raw)
To: openembedded-core
[YOCTO #6698]
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
meta/recipes-core/util-linux/util-linux.inc | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/meta/recipes-core/util-linux/util-linux.inc b/meta/recipes-core/util-linux/util-linux.inc
index 2d17fa2..80065e3 100644
--- a/meta/recipes-core/util-linux/util-linux.inc
+++ b/meta/recipes-core/util-linux/util-linux.inc
@@ -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"
@@ -104,7 +106,7 @@ RREPLACES_util-linux-blkid = "e2fsprogs-blkid"
# reset calls 'tput'
RDEPENDS_util-linux-reset += "ncurses"
-RDEPENDS_${PN} = "util-linux-umount util-linux-swaponoff util-linux-losetup"
+RDEPENDS_${PN} = "util-linux-umount util-linux-swaponoff util-linux-losetup util-linux-sulogin"
RRECOMMENDS_${PN} = "util-linux-fdisk util-linux-cfdisk util-linux-sfdisk util-linux-mount util-linux-readprofile util-linux-mkfs "
RRECOMMENDS_${PN}_class-native = ""
@@ -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 lastb.1 mesg.1 wall.1 nologin.8 sulogin.8 utmpdump.1 reset.1"
@@ -241,6 +242,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 () {
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* [PATCH V2 2/2] shadow: add 'util-linux-sulogin' to RDEPENDS
2015-04-09 5:49 [PATCH V2 0/2] Fix for runtime error for rescue mode Chen Qi
2015-04-09 5:49 ` [PATCH V2 1/2] util-linux: split out util-linux-sulogin Chen Qi
@ 2015-04-09 5:49 ` Chen Qi
1 sibling, 0 replies; 3+ messages in thread
From: Chen Qi @ 2015-04-09 5:49 UTC (permalink / raw)
To: openembedded-core
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]
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
meta/recipes-extended/shadow/shadow.inc | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/meta/recipes-extended/shadow/shadow.inc b/meta/recipes-extended/shadow/shadow.inc
index bb3a927..a05ead3 100644
--- a/meta/recipes-extended/shadow/shadow.inc
+++ b/meta/recipes-extended/shadow/shadow.inc
@@ -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 = ""
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread