Skip to contentSkip to conversation

fix LSB Command Check failed

PATCH New Hongxu Jia 1 participant 5 messages Sep 13, 2013

lore
Share & tools
lore

Hongxu Jia

author
#0 lore raw

v2 cover fix LSB Command Check failed

Change in V2: Rebase to current branch.

*Problem
LSB Command Check failed
...
su 1 failed
install_initd 1 failed
remove_initd 1 failed
...

The journal shows the command didsn't exist.
...
Looking for command su
Looking for command install_initd
Looking for command remove_initd
...

//Hongxu

The following changes since commit dd36930f3f37b2e0e1258de28ac1b1fa99cf196f:

bitbake: data_smart: Account for changes in append/prepend/remove in the config hash (2013-09-12 17:03:17 +0100)

are available in the git repository at:

git://git.pokylinux.org/poky-contrib hongxu/fix-lsb-cmdchek
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=hongxu/fix-lsb-cmdchek

Hongxu Jia (4):
LSB Command Check: fix install_initd and remove_initd not found
busybox: move su to /bin for lsb command check test
shadow: move su to /bin for lsb command check test
util-linux: move su to /bin for lsb command check test

 .../busybox/busybox-1.21.1/su-usr-bin.patch        | 26 ----------------------
 meta/recipes-core/busybox/busybox_1.21.1.bb        |  1 -
 meta/recipes-core/util-linux/util-linux.inc        |  4 ++--
 meta/recipes-extended/lsb/lsb_4.1.bb               |  4 ++--
 meta/recipes-extended/shadow/shadow_4.1.4.3.bb     |  3 ++-
 5 files changed, 6 insertions(+), 32 deletions(-)
 delete mode 100644 meta/recipes-core/busybox/busybox-1.21.1/su-usr-bin.patch
Signature · 1 line
1.8.1.2
author
#1 lore raw

PATCH v2 1/4 LSB Command Check: fix install_initd and remove_initd not found

The install_initd and remove_initd are linked to /sbin/chkconfig for lsb core test, but chkconfig has been moved from /sbin to /usr/sbin in order to fix QA warning about unsafe references in binaries.
(In commit e486242db83297701803866bea971a2f1a1135fe)

Let install_initd and remove_initd link to /usr/sbin/chkconfig could fix this issue.

[YOCTO #5152]

---
 meta/recipes-extended/lsb/lsb_4.1.bb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
meta/recipes-extended/lsb/lsb_4.1.bb +2 -2
index 59d5bca..c80ff59 100644
@@ -79,8 +79,8 @@ do_install_append(){
 
        # creat links for LSB test
        install -d ${D}/${libdir}/lsb
-       ln -sf ${base_sbindir}/chkconfig ${D}/${libdir}/lsb/install_initd
-       ln -sf ${base_sbindir}/chkconfig ${D}/${libdir}/lsb/remove_initd
+       ln -sf ${sbindir}/chkconfig ${D}/${libdir}/lsb/install_initd
+       ln -sf ${sbindir}/chkconfig ${D}/${libdir}/lsb/remove_initd
        ln -sf ${sbindir}/sendmail ${D}/${libdir}/sendmail
 
        if [ "${TARGET_ARCH}" = "x86_64" ];then
Signature · 1 line
1.8.1.2
author
#2 lore raw

PATCH v2 2/4 busybox: move su to /bin for lsb command check test

In reply to Hongxu Jia

In busybox, util-linux and shadow, su has been moved to /usr/bin/, but lsb cmdchk needs su in /bin.

Move su to /bin could fix this issue.

[YOCTO#5175]

---
 .../busybox/busybox-1.21.1/su-usr-bin.patch        | 26 ----------------------
 meta/recipes-core/busybox/busybox_1.21.1.bb        |  1 -
 2 files changed, 27 deletions(-)
 delete mode 100644 meta/recipes-core/busybox/busybox-1.21.1/su-usr-bin.patch
meta/recipes-core/busybox/busybox-1.21.1/su-usr-bin.patch deleted +0 -26
deleted file mode 100644
index 0d5b558..0000000
@@ -1,26 +0,0 @@
-busybox: move /bin/su to /usr/bin/su to match util-linux and shadow
-
-Both of util-linux and shadow have su binary in /usr/bin, fix busybox
-to use the same path so they can be properly tracked by alternatives.
-
-Upstream-Status: Inappropriate [embedded]
-Signed-off-by: Hongxu Jia <[email protected]>
----
- include/applets.src.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/include/applets.src.h b/include/applets.src.h
---- a/include/applets.src.h
-+++ b/include/applets.src.h
-@@ -349,7 +349,7 @@ IF_STAT(APPLET(stat, BB_DIR_USR_BIN, BB_SUID_DROP))
- IF_STRINGS(APPLET(strings, BB_DIR_USR_BIN, BB_SUID_DROP))
- IF_STTY(APPLET(stty, BB_DIR_BIN, BB_SUID_DROP))
- /* Needs to be run by root or be suid root - needs to change uid and gid: */
--IF_SU(APPLET(su, BB_DIR_BIN, BB_SUID_REQUIRE))
-+IF_SU(APPLET(su, BB_DIR_USR_BIN, BB_SUID_REQUIRE))
- IF_SULOGIN(APPLET(sulogin, BB_DIR_SBIN, BB_SUID_DROP))
- IF_SUM(APPLET(sum, BB_DIR_USR_BIN, BB_SUID_DROP))
- IF_SV(APPLET(sv, BB_DIR_USR_BIN, BB_SUID_DROP))
--- 
-1.8.1.2
-
meta/recipes-core/busybox/busybox_1.21.1.bb +0 -1
index f766bee..5c05273 100644
@@ -24,7 +24,6 @@ SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \
            file://umount.busybox \
            file://defconfig \
            file://stat-usr-bin.patch \
-           file://su-usr-bin.patch \
            file://busybox-syslog.service.in \
            file://busybox-klogd.service.in \
            file://testsuite-du-du-k-works-fix-false-positive.patch \
Signature · 1 line
1.8.1.2
author
#3 lore raw

PATCH v2 3/4 shadow: move su to /bin for lsb command check test

In reply to Hongxu Jia

In busybox, util-linux and shadow, su has been moved to /usr/bin/, but lsb cmdchk needs su in /bin.

Move su to /bin could fix this issue.

[YOCTO#5175]

---
 meta/recipes-extended/shadow/shadow_4.1.4.3.bb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
meta/recipes-extended/shadow/shadow_4.1.4.3.bb +2 -1
index 31cef20..3abb325 100644
@@ -113,6 +113,7 @@ do_install() {
 	fi
 	if [ "${bindir}" != "${base_bindir}" ]; then
 		mv ${D}${bindir}/login ${D}${base_bindir}/login
+		mv ${D}${bindir}/su ${D}${base_bindir}/su
 	fi
 
 	# Handle link properly after rename, otherwise missing files would
@@ -129,7 +130,7 @@ ALTERNATIVE_LINK_NAME[chpasswd] = "${sbindir}/chpasswd"
 ALTERNATIVE_LINK_NAME[login] = "${base_bindir}/login"
 ALTERNATIVE_LINK_NAME[vipw] = "${base_sbindir}/vipw"
 ALTERNATIVE_LINK_NAME[vigr] = "${base_sbindir}/vigr"
-ALTERNATIVE_LINK_NAME[su] = "${bindir}/su"
+ALTERNATIVE_LINK_NAME[su] = "${base_bindir}/su"
 
 pkg_postinst_${PN} () {
 	if [ "x$D" != "x" ]; then
Signature · 1 line
1.8.1.2
author
#4 lore raw

PATCH v2 4/4 util-linux: move su to /bin for lsb command check test

In reply to Hongxu Jia

In busybox, util-linux and shadow, su has been moved to /usr/bin/, but lsb cmdchk needs su in /bin.

Move su to /bin could fix this issue.

[YOCTO#5175]

---
 meta/recipes-core/util-linux/util-linux.inc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
meta/recipes-core/util-linux/util-linux.inc +2 -2
index 8a14d16..15b6770 100644
@@ -129,7 +129,7 @@ do_install () {
         sbinprogs="agetty ctrlaltdel cfdisk vipw vigr"
         sbinprogs_a="pivot_root hwclock mkswap mkfs.minix fsck.minix losetup swapon swapoff fdisk readprofile fsck blkid blockdev"
         usrbinprogs_a="chfn chsh hexdump last logger mesg newgrp renice utmpdump wall setsid chrt flock getopt"
-        binprogs_a="dmesg kill more umount mount login reset"
+        binprogs_a="dmesg kill more umount mount login reset su"
 
         if [ "${base_sbindir}" != "${sbindir}" ]; then
         	mkdir -p ${D}${base_sbindir}
@@ -224,6 +224,6 @@ BBCLASSEXTEND = "native nativesdk"
 python do_package_prepend () {
     if '--enable-su' in d.getVar('EXTRA_OECONF', True).split():
         alt_name = "su"
-        d.setVarFlag('ALTERNATIVE_LINK_NAME', alt_name, '%s/%s' % (d.getVar('bindir', True), alt_name))
+        d.setVarFlag('ALTERNATIVE_LINK_NAME', alt_name, '%s/%s' % (d.getVar('base_bindir', True), alt_name))
         d.appendVar('ALTERNATIVE_%s' % (d.getVar('PN', True)), ' ' + alt_name)
 }
Signature · 1 line
1.8.1.2