<?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>6577</bug_id>
          
          <creation_ts>2014-07-25 16:38:52 +0000</creation_ts>
          <short_desc>buildtools-tarball (buildtools-standalone) installer produces error on install</short_desc>
          <delta_ts>2014-07-29 09:00:44 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>11</classification_id>
          <classification>Runtime</classification>
          <product>General Runtime</product>
          <component>General Runtime</component>
          <version>1.7</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Undecided</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>1.7 M2</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Mark Hatle">mark.hatle</reporter>
          <assigned_to name="Chen Qi">Qi.Chen</assigned_to>
          <cc>Qi.Chen</cc>
    
    <cc>richard.purdie</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>44719</commentid>
    <comment_count>0</comment_count>
    <who name="Mark Hatle">mark.hatle</who>
    <bug_when>2014-07-25 16:38:52 +0000</bug_when>
    <thetext>I built a buildtools-tarball (SDK) on my regular build machine and went to install it on a fresh CentOS 6.4 machine.  This resulted in a number of error messages about unable to grep certain components, for example:

grep: /usr/local/sdk/sysroots/x86_64-oesdk-linux/etc/ssl/certs/RSA_Security_2048_v3.pem: No such file or directory

The cause of this is the file in question is actually a symbolic link back into the main system:

etc/ssl/certs/RSA_Security_2048_v3.pem -&gt; /usr/share/ca-certificates/mozilla/RSA_Security_2048_v3.crt


The installer should detect that this is a symbolic link and avoid evaluating or modifying components outside of the installed SDK.

The &apos;nativesdk&apos; package that populates the etc/ssl/certs directory is probably doing so incorrectly and should be investigated.  The location of the ssl certs may be host-system dependent, a relative link should be used instead.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>44753</commentid>
    <comment_count>1</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2014-07-28 12:40:07 +0000</bug_when>
    <thetext>+ ln -sfn /usr/share/ca-certificates/mozilla/Atos_TrustedRoot_2011.crt /home/rpurdie/test/sysroots/x86_64-pokysdk-linux/etc/ssl/certs/Atos_TrustedRoot_2011.pem
++ grep &apos;^#!.*perl&apos; -rl /home/rpurdie/test/sysroots/x86_64-pokysdk-linux
grep: /home/rpurdie/test/sysroots/x86_64-pokysdk-linux/etc/ssl/certs/TWCA_Root_Certification_Authority.pem: No such file or directory
grep: /home/rpurdie/test/sysroots/x86_64-pokysdk-linux/etc/ssl/certs/Starfield_Services_Root_Certificate_Authority_-_G2.pem: No such file or directory
grep: /home/rpurdie/test/sysroots/x86_64-pokysdk-linux/etc/ssl/certs/DST_ACES_CA_X6.pem: No such file or directory
grep: /home/rpurdie/test/sysroots/x86_64-pokysdk-linux/etc/ssl/certs/StartCom_Certification_Authority_2.pem: No such file or directory
grep: /home/rpurdie/test/sysroots/x86_64-pokysdk-linux/etc/ssl/certs/QuoVadis_Root_CA_2.pem: No such file or directory
grep: /home/rpurdie/test/sysroots/x86_64-pokysdk-linux/etc/ssl/certs/Go_Daddy_Root_Certificate_Authority_-_G2.pem: No such file or directory

So this is coming from the perl script handling code. It looks like it may be a change in the behaviour of grep -r.

&quot;man grep&quot; on centos:

       -R, -r, --recursive
              Read all files under each directory, recursively; this is equivalent to the -d recurse option.

&quot;man grep&quot; on a more recent ubuntu system:

       -r, --recursive
              Read all files under each directory, recursively, following symbolic links only if they are on the command line.  This
              is equivalent to the -d recurse option.

So we need to patch the script only to look at real files.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>44754</commentid>
    <comment_count>2</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2014-07-28 13:12:08 +0000</bug_when>
    <thetext>diff --git a/meta/classes/populate_sdk_base.bbclass b/meta/classes/populate_sdk_base.bbclass
index 893afbb..06112dc 100644
--- a/meta/classes/populate_sdk_base.bbclass
+++ b/meta/classes/populate_sdk_base.bbclass
@@ -285,7 +285,7 @@ done
 
 # find out all perl scripts in $native_sysroot and modify them replacing the
 # host perl with SDK perl.
-for perl_script in $($SUDO_EXEC grep &quot;^#!.*perl&quot; -rl $native_sysroot); do
+for perl_script in $($SUDO_EXEC find $native_sysroot -type f -exec grep &quot;^#!.*perl&quot; -l &apos;{}&apos; \;); do
        $SUDO_EXEC sed -i -e &quot;s:^#! */usr/bin/perl.*:#! /usr/bin/env perl:g&quot; -e \
                &quot;s: /usr/bin/perl: /usr/bin/env perl:g&quot; $perl_script
 done</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>44799</commentid>
    <comment_count>3</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2014-07-29 09:00:44 +0000</bug_when>
    <thetext>http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=2d1660112e54653f7bb763939d0416472c49fe01</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>