<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>3910</bug_id>
          
          <creation_ts>2013-02-19 16:46:22 +0000</creation_ts>
          <short_desc>[Test Case 278] Sanity check for userspace dependency</short_desc>
          <delta_ts>2013-03-12 18:06:55 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>core</component>
          <version>1.4</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>VERIFIED</bug_status>
          <resolution>WORKSFORME</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Undecided</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Stoicescu Cornel">corneliux.stoicescu</reporter>
          <assigned_to name="Saul Wold">sgw</assigned_to>
          <cc>alexandrux.palalau</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>---</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>29967</commentid>
    <comment_count>0</comment_count>
    <who name="Stoicescu Cornel">corneliux.stoicescu</who>
    <bug_when>2013-02-19 16:46:22 +0000</bug_when>
    <thetext>STATUS: FAILED
BUILD: master:3ec4df57540421df2cda6b83c615bfb7cebccefd
ENVIRONMENT: Multiple environments
STEPS TO REPRODUCE: Test if sanity check could report warning if there are packages 
installed under /bin or /sbin, but depends on something under /usr/lib


1. prepare yocto build environment
2. modify or add a recipe, which is installed under /bin or /sbin, but 
depends on something under /usr/lib. For example, we could revert 
following patch against recipe libusb and build udev#####

diff --git a/meta/recipes-support/libusb/libusb-compat_0.1.3.bb b/meta/recipes-support/libusb/libusb-compat_0.1.3.bb
index ef8552b..e070463 100644
--- a/meta/recipes-support/libusb/libusb-compat_0.1.3.bb
+++ b/meta/recipes-support/libusb/libusb-compat_0.1.3.bb
            @@ -15,7 +15,7 @@ DEPENDS = &quot;libusb1&quot;
            PROVIDES = &quot;libusb&quot;
             
            PE = &quot;1&quot;
            -PR = &quot;r0&quot;
            +PR = &quot;r1&quot;
             
            SRC_URI = &quot;${SOURCEFORGE_MIRROR}/libusb/libusb-compat-${PV}.tar.bz2 \
            file://0.1.0-beta1-gcc3.4-fix.patch&quot;
            @@ -24,3 +24,13 @@ SRC_URI[md5sum] = &quot;570ac2ea085b80d1f74ddc7c6a93c0eb&quot;
            SRC_URI[sha256sum] = &quot;a590a03b6188030ee1ca1a0af55685fcde005ca807b963970f839be776031d94&quot;
             
            inherit autotools pkgconfig binconfig
            +
            +EXTRA_OECONF = &quot;--libdir=${base_libdir}&quot;
            +
            +do_install_append() {
            + install -d ${D}${libdir}
            + mv ${D}${base_libdir}/*.la ${D}${libdir}
            + mv ${D}${base_libdir}/pkgconfig ${D}${libdir}+
            +FILES_${PN}-dev += &quot;${base_libdir}/*.so&quot;
#####

3. check if yocto build will report warning for udev


EXPECTED OUTCOME: Sanity check should report warning if there are packages 
installed under /bin or /sbin, but depends on something under /usr/lib

ACTUAL OUTCOME: Even though some are expected, no such warning are shown for the following commands:
&quot;bitbake libusb-compat&quot;
&quot;bitbake core-image-sato&quot;
&quot;bitbake udev&quot;

PS: After a talk with Richard, the fact that the test case asks to build &quot;udev&quot; in order to test this patch is unnecessary. Udev does pull in libusb-compat though so it should be relevant. Also a core-image-sato should give off at least a few warnings like the ones described even without the patch.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>30046</commentid>
    <comment_count>1</comment_count>
    <who name="Saul Wold">sgw</who>
    <bug_when>2013-02-22 17:15:10 +0000</bug_when>
    <thetext>I believe that we have disabled those checks by default, is this a new failure?  Has this test been run on past milestones?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>30062</commentid>
    <comment_count>2</comment_count>
    <who name="Stoicescu Cornel">corneliux.stoicescu</who>
    <bug_when>2013-02-25 08:57:02 +0000</bug_when>
    <thetext>Indeed. I forgot to mention I also added WARN_QA_append = &quot; unsafe-references-in-binaries unsafe-references-in-scripts&quot; in local.conf . This should trigger those warnings. The test case was updated.

I tested this issue for the last month and because I was not getting any warnings I believed I was doing something wrong and that I did not have enough information. I will come back with details about the last working build.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>30069</commentid>
    <comment_count>3</comment_count>
    <who name="Stoicescu Cornel">corneliux.stoicescu</who>
    <bug_when>2013-02-25 10:43:17 +0000</bug_when>
    <thetext>The last known working build for this feature: 1.3 M4 RC2</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>30140</commentid>
    <comment_count>4</comment_count>
    <who name="Saul Wold">sgw</who>
    <bug_when>2013-02-26 20:23:22 +0000</bug_when>
    <thetext>This seems to work correctly for the existing packages, it might be your libusb is no longer valid.

WARNING: QA Issue: nfs-utils: Found a reference to /usr/ in /home/sgw/yocto/builds/world/tmp/work/x86_64-poky-linux/nfs-utils/1.2.7-r0/packages-split/nfs-utils/sbin/osd_login
WARNING: QA Issue: Shell scripts in base_bindir and base_sbindir should not reference anything in exec_prefix
WARNING: QA Issue: gzip: Found a reference to /usr/ in /home/sgw/yocto/builds/world/tmp/work/x86_64-poky-linux/gzip/1.5-r0/packages-split/gzip/bin/zcat.gzip
WARNING: QA Issue: Shell scripts in base_bindir and base_sbindir should not reference anything in exec_prefix
WARNING: QA Issue: gzip: Found a reference to /usr/ in /home/sgw/yocto/builds/world/tmp/work/x86_64-poky-linux/gzip/1.5-r0/packages-split/gzip/bin/gunzip.gzip
WARNING: QA Issue: Shell scripts in base_bindir and base_sbindir should not reference anything in exec_prefix

Please try to use an unmodified recipe for this test.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>30165</commentid>
    <comment_count>5</comment_count>
    <who name="Stoicescu Cornel">corneliux.stoicescu</who>
    <bug_when>2013-02-27 12:28:45 +0000</bug_when>
    <thetext>I am still not able to make this work. I made a core-image-sato and core-image-sato-sdk with WARN_QA_append = &quot; unsafe-references-in-binaries unsafe-references-in-scripts&quot; in local.conf and I got no such warnings.

My setup:
Machine: Ubuntu 12.04 x86-64
branch: master
commit:7d22ef28e64de06b6238d0ef9b664c0bee6efa46
Extra options: download mirror in local.conf

Saul, can you please give us your steps to reproduce and setup? Maybe we are missing something.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>30649</commentid>
    <comment_count>6</comment_count>
    <who name="Alexandru Palalau">alexandrux.palalau</who>
    <bug_when>2013-03-12 15:32:00 +0000</bug_when>
    <thetext>Switching to reopened as no qa-warns are available, although WARN_QA_append = &quot; unsafe-references-in-binaries unsafe-references-in-scripts&quot; is mentioned in local.conf.
Waiting for steps from Saul.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>30653</commentid>
    <comment_count>7</comment_count>
    <who name="Saul Wold">sgw</who>
    <bug_when>2013-03-12 16:19:37 +0000</bug_when>
    <thetext>
1) Clean sstate of gzip and nfs-utils
   bitbake -c cleansstate gzip nfs-utils

2) Add correct warning to local.conf
   WARN_QA_append = &quot; unsafe-references-in-binaries unsafe-references-in-scripts&quot;

3) rebuild gzip and nfs-utils
   bitbake gzip nfs-utils

4) Observe warnings</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>30655</commentid>
    <comment_count>8</comment_count>
    <who name="Saul Wold">sgw</who>
    <bug_when>2013-03-12 16:21:32 +0000</bug_when>
    <thetext>I suggest using existing recipes and not modifying the udev recipe.  The gzip and nfs-utils are packages that should show this issue as I reported above.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>30660</commentid>
    <comment_count>9</comment_count>
    <who name="Alexandru Palalau">alexandrux.palalau</who>
    <bug_when>2013-03-12 17:33:32 +0000</bug_when>
    <thetext>Verified on danny branch, commit ID:955827af15f611189c66850fd077de344e1285c3</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>30661</commentid>
    <comment_count>10</comment_count>
    <who name="Alexandru Palalau">alexandrux.palalau</who>
    <bug_when>2013-03-12 18:06:33 +0000</bug_when>
    <thetext>Verified on master branch also.
Commit ID:365eb9b5d22208c967dcd91d8ab52faed20f04b5</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>30662</commentid>
    <comment_count>11</comment_count>
    <who name="Alexandru Palalau">alexandrux.palalau</who>
    <bug_when>2013-03-12 18:06:55 +0000</bug_when>
    <thetext>Switching to verified</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>