Bug 14406

Summary: Ubuntu 16.04 Builder is not able to clone when using buildtools tarball
Product: [Infrastructure] AutoBuilder Reporter: Khem Raj <raj.khem>
Component: autobuilderAssignee: Richard Purdie <richard.purdie>
Status: RESOLVED NOTABUG QA Contact:
Severity: normal    
Priority: Undecided CC: infras.ab.watcher, Infras.watcher, pidge, randy.macleod
Version: unspecified   
Target Milestone: ---   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Khem Raj 2021-05-23 06:10:47 UTC
There is one recipe in meta-oe sdbus-c++ which fetches from git during do_configure ( I know its bad but thats not the point ), the git fetch fails because its trying to find CAFile in path where it does not exist in the buildtools tarball install location. when using git. I am sure one can reproduce this by sourcing the buildtools tarball env on the builder and then doing any git clone operation over htttps.


| [1/9] Performing download step (git clone) for 'googletest-populate'
| Cloning into 'googletest-src'...
| fatal: unable to access 'https://github.com/google/googletest.git/': error setting certificate verify locations:  CAfile: /opt/poky/3.2+snapshot/sysroots/x86_64-pokysdk-linux/etc/ssl/certs/ca-certificates.crt CApath: none
| Cloning into 'googletest-src'...
| fatal: unable to access 'https://github.com/google/googletest.git/': error setting certificate verify locations:  CAfile: /opt/poky/3.2+snapshot/sysroots/x86_64-pokysdk-linux/etc/ssl/certs/ca-certificates.crt CApath: none
| Cloning into 'googletest-src'...
| fatal: unable to access 'https://github.com/google/googletest.git/': error setting certificate verify locations:  CAfile: /opt/poky/3.2+snapshot/sysroots/x86_64-pokysdk-linux/etc/ssl/certs/ca-certificates.crt CApath: none
| -- Had to git clone more than once:
Comment 1 Khem Raj 2021-05-23 14:40:05 UTC
I think buildtools tarball should include ca-certificates package as well for https to work
Comment 2 Randy MacLeod 2021-05-27 14:55:05 UTC
Trying to clone during do_configure should NOT work.
Build tools tarball does include the CA certs. 
bitbake is clearing env vars it breaks for you.
Comment 3 Richard Purdie 2021-05-27 14:56:58 UTC
buildtools-tarball already contains ca-certs. The environment script for buildtools-tarball sets up the pieces needed to enable this to work and this is preserved in do_fetch. The envvars are not preserved for other tasks, hence this error.
Comment 4 Khem Raj 2021-05-27 15:09:32 UTC
yes the bug was not about the package, we all know what it is doing. It was more for buildtools tarball, if it was missing the certs or not, so it seems we are good on tarball side so its fine to close it.