Skip to contentSkip to conversation

fix LSB Command Check failed

PATCH Superseded Hongxu Jia 2 participants 7 messages Sep 13, 2013

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Hongxu Jia

author
#0 lore raw

cover fix LSB Command Check failed

*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 1b814498b60d5f354d8cc5bdf568b91baf0745dc:

bitbake: bitbake/cooker: fix some calls of cookerdata.findConfigFile method (2013-09-02 12:26:20 +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 ++--
 .../recipes-extended/chkconfig/chkconfig_1.3.58.bb |  4 ++--
 meta/recipes-extended/lsb/lsb_4.1.bb               |  4 ++--
 meta/recipes-extended/shadow/shadow_4.1.4.3.bb     |  3 ++-
 6 files changed, 8 insertions(+), 34 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 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, and 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/chkconfig/chkconfig_1.3.58.bb | 4 ++--
 meta/recipes-extended/lsb/lsb_4.1.bb                | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
meta/recipes-extended/chkconfig/chkconfig_1.3.58.bb +2 -2
index c6f8b1d..38c3cdf 100644
@@ -50,8 +50,8 @@ do_install() {
 
 do_install_append_linuxstdbase() {
 	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
 }
 
 PACKAGES =+ "${PN}-alternatives ${PN}-alternatives-doc"
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
#2 lore raw

Re: [PATCH 1/4] LSB Command Check: fix install_initd and remove_initd not found

Quoted 21 lines · Hongxu Jia

The install_initd and remove_initd are linked to /sbin/chkconfig for lsb core test, and 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/chkconfig/chkconfig_1.3.58.bb | 4 ++--
  meta/recipes-extended/lsb/lsb_4.1.bb                | 4 ++--
  2 files changed, 4 insertions(+), 4 deletions(-)
meta/recipes-extended/chkconfig/chkconfig_1.3.58.bb +0 -0
index c6f8b1d..38c3cdf 100644

meta/recipes-extended/chkconfig/chkconfig_1.3.58.bb do_install() { · line 56

Quoted 9 lines
meta/recipes-extended/chkconfig/chkconfig_1.3.58.bb +2 -2
@@ -50,8 +50,8 @@ do_install() {
 
  do_install_append_linuxstdbase() {
  	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
  }
 

Your repository appears to be out of date; this append was removed in oe-core 77a0b904e18688ecf81a35544f3a5d6ba0aa61a8

Quoted 16 lines
meta/recipes-extended/chkconfig/chkconfig_1.3.58.bb +0 -0
  PACKAGES =+ "${PN}-alternatives ${PN}-alternatives-doc"
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
author
#3 lore raw

Re: [PATCH 1/4] LSB Command Check: fix install_initd and remove_initd not found

Quoted 17 lines · Peter A. Bigot
Quoted 16 lines · Hongxu Jia

The install_initd and remove_initd are linked to /sbin/chkconfig for lsb core test, and 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/chkconfig/chkconfig_1.3.58.bb | 4 ++--
  meta/recipes-extended/lsb/lsb_4.1.bb                | 4 ++--
  2 files changed, 4 insertions(+), 4 deletions(-)
Quoted 15 lines

meta/recipes-extended/chkconfig/chkconfig_1.3.58.bb do_install() { · line 54

Quoted 12 lines
meta/recipes-extended/chkconfig/chkconfig_1.3.58.bb +2 -2
index c6f8b1d..38c3cdf 100644
@@ -50,8 +50,8 @@ do_install() {
    do_install_append_linuxstdbase() {
      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
  }

Your repository appears to be out of date; this append was removed in oe-core 77a0b904e18688ecf81a35544f3a5d6ba0aa61a8

Ok, I will rebase it.

Thanks,
Hongxu

Quoted 20 lines
Quoted 10 lines
meta/recipes-extended/chkconfig/chkconfig_1.3.58.bb +0 -0
  PACKAGES =+ "${PN}-alternatives ${PN}-alternatives-doc"
meta/recipes-extended/lsb/lsb_4.1.bb +0 -1
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

meta/recipes-extended/lsb/lsb_4.1.bb do_install_append(){ · line 86

Quoted 5 lines
meta/recipes-extended/lsb/lsb_4.1.bb +2 -1
-       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

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

author
#4 lore raw

PATCH 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 784c924..44e507e 100644
@@ -23,7 +23,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
#5 lore raw

PATCH 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
#6 lore raw

PATCH 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