Bug 12921 - devtool fails because of missing ca-certificates.crt
Summary: devtool fails because of missing ca-certificates.crt
Status: RESOLVED NOTABUG
Alias: None
Product: eSDK
Classification: Yocto Project Subprojects
Component: eSDK (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 2.6 M4
Assignee: Krzysztof Kozlowski
QA Contact: Francisco Pedraza
URL:
Whiteboard:
Depends on:
Blocks: 12925
  Show dependency tree
 
Reported: 2018-09-12 10:59 UTC by Krzysztof Kozlowski
Modified: 2018-10-17 11:30 UTC (History)
2 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: New (Never tested)
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments
devtool build log error (3.57 KB, text/plain)
2018-09-12 10:59 UTC, Krzysztof Kozlowski
no flags Details
SDK install error (3.61 KB, text/plain)
2018-09-12 10:59 UTC, Krzysztof Kozlowski
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Krzysztof Kozlowski 2018-09-12 10:59:08 UTC
Created attachment 4369 [details]
devtool build log error

Yocto v2.3.4, Ubuntu 16.04.5

I have a recipe which builds the Linux kernel from current linux-next. Recently it seems it got included in to the extensible SDK (which is fine) and it brings back old problem with devtool - lack of ca-certificates.

After devtool update:
devtool build XXX
fatal: unable to access 'https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/': Problem with the SSL CA cert (path? access rights?)
The GIT_SSL_CAINFO points to non-existing /home/krzk/proceq17_sdk/buildtools/sysroots/x86_64-pokysdk-linux/etc/ssl/certs/ca-certificates.crt.

Running devtool with GIT_SSL_CAINFO="/etc/ssl/certs/ca-certificates.crt" helps... but this is annoying workaround. I already have to use it for the same error happening with devtool sdk-update (my sdk-update URL is https).

Installing new SDK also fails with the same error.
Comment 1 Krzysztof Kozlowski 2018-09-12 10:59:22 UTC
Created attachment 4370 [details]
SDK install error
Comment 2 Krzysztof Kozlowski 2018-09-12 11:32:26 UTC
New eSDK installs can be fixed by adding to machine conf file:

TOOLCHAIN_HOST_TASK += "nativesdk-ca-certificates"

However the updated SDK still fails because as usual the sdk-update does not properly populates sysroots with new changes.

Anyway, probably the nativesdk-ca-certificates should be part of default SDK packages.
Comment 3 Ross Burton 2018-09-13 15:06:43 UTC
Would you be able to test this with a newer release than 2.3.4?
Comment 4 Krzysztof Kozlowski 2018-09-17 14:45:47 UTC
I setup a Yocto with different, minimal configuration, without any custom machine... and I cannot reproduce the error. I tried v2.3.4, v2.4.3 and v2.5.1. In this new setup, in eSDK the file buildtools/sysroots/x86_64-pokysdk-linux/etc/ssl/certs/ca-certificates.crt exists.

There must be something different between the setups.
Comment 5 Krzysztof Kozlowski 2018-09-19 06:33:48 UTC
OK, I reproduced it also on v2.5.1 so no problem of testing it also later with a new release.

While trying to reproduce it on more vanilla-like configuration, I narrowed it to the presence of following in distro or machine conf:

TOOLCHAIN_HOST_TASK += "nativesdk-u-boot-mkimage"

Without this line - works.

I compared for example the glibc-x86_64-core-image-minimal-armv5e-toolchain-ext-2.3.4.testdata.json between such cases.
Working (without TOOLCHAIN_HOST_TASK above):
"SDK_REQUIRED_UTILITIES": "patch diffstat bzip2 gawk cpio perl file which gcc g++",

Broken (with TOOLCHAIN_HOST_TASK above):
"SDK_REQUIRED_UTILITIES": "patch diffstat makeinfo git bzip2 tar gzip gawk chrpath wget cpio perl file which gcc g++",
Comment 6 Ross Burton 2018-10-08 15:35:12 UTC
TOOLCHAIN_HOST_TASK is lazy assigned so if you want to extend it, use TOOLCHAIN_HOST_TASK_append.
Comment 7 Ross Burton 2018-10-16 13:41:53 UTC
Krzysztof, can you test as I said in comment 6?  I believe that will solve this issue but if not we need to reopen the bug.
Comment 8 Krzysztof Kozlowski 2018-10-17 11:30:37 UTC
Some more background - it seems that problem in my setup was caused by improper use of TOOLCHAIN_HOST_TASK at the first place. In my image recipe I had:
    TOOLCHAIN_HOST_TASK += "nativesdk-cmake"

Using TOOLCHAIN_HOST_TASK_append helps in such case. Moving TOOLCHAIN_HOST_TASK from image recipe to machine file (and using +=) solves the problem as well, without the need to add "nativesdk-ca-certificates" manually.

Therefore I think this bug should be marked invalid (unless something could be added to bitbake to warn about such case).

Best regards,
Krzysztof