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 -> /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 'nativesdk' 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.
+ 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 '^#!.*perl' -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. "man grep" on centos: -R, -r, --recursive Read all files under each directory, recursively; this is equivalent to the -d recurse option. "man grep" 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.
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 "^#!.*perl" -rl $native_sysroot); do +for perl_script in $($SUDO_EXEC find $native_sysroot -type f -exec grep "^#!.*perl" -l '{}' \;); do $SUDO_EXEC sed -i -e "s:^#! */usr/bin/perl.*:#! /usr/bin/env perl:g" -e \ "s: /usr/bin/perl: /usr/bin/env perl:g" $perl_script done
http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=2d1660112e54653f7bb763939d0416472c49fe01