profiles: add ssl USE flag to make libcurl fetch from https://

Now that Github rejects access to an unauthenticated URL with `git://`,
we have to make git and libcurl work with `https://`. However, during
the SDK stage2, curl is not explicitly installed, but just inherited
from the stage1. As a result, curl is built without the `ssl` USE flag.
So installation of baselayout fails with:

```
git fetch https://github.com/flatcar-linux/baselayout.git --prune +HEAD:refs/git-r3/HEAD

fatal: unable to access 'https://github.com/flatcar-linux/baselayout.git/':
Protocol "https" not supported or disabled in libcurl
```

To resolve the issue, we need to install curl with `BOOTSTRAP_USE=ssl`
before trying to install baselayout.

Also we need to set `CURL_SSL=openssl` as required by curl.
Using a USE_EXPAND variable `curl_ssl_openssl` in `BOOTSTRAP_USE`, we
can specify the correct `CURL_SSL` variable in curl.
This commit is contained in:
Dongsu Park 2021-11-03 07:20:00 +01:00 committed by Dongsu Park
parent 20ef77de27
commit e5790650a1

View File

@ -37,6 +37,9 @@ BOOTSTRAP_USE="${BOOTSTRAP_USE} curl"
# Add `minimal` useflag to prevent texinfo to pull dev-lang/perl with not required set of dependencies.
BOOTSTRAP_USE="${BOOTSTRAP_USE} minimal"
# Add `ssl` USE flag to make libcurl capable of fetching from https URLs.
BOOTSTRAP_USE="${BOOTSTRAP_USE} curl_ssl_openssl ssl"
# Set SELinux policy
POLICY_TYPES="targeted mcs mls"