fetch2: add alternative fetch method based on curl
Get series with b4
b4 am [email protected] change-id 20260305-add_alt_fetch_method_curl-7a0bf96ad223Versions newest first
- v2 Latest4 patches 3 repliesIn review
- v14 patches 3 repliesSuperseded
Changes in v2 from the cover letter
- removed type hint unions and tested with Python 3.9, thanks Mathieu
Dubois-Briand for reporting this.
- curl tests are now skipped when curl cmdline tool is not found.
- Link to v1: https://lore.kernel.org/r/[email protected]
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | fetch2: add curl method to fetch web contentlib/ | +162 | 0 replies | |
| 2/4 | fetch2: make curl method activable with BB_FETCH_METHOD_HTTPlib/ lib/ | +12 | 0 replies | |
| 3/4 | lib/tests/fetch2: add tests for curl methodlib/ | +75 | 0 replies | |
| 4/4 | doc: bitbake-user-manual-ref-variables: describe BB_FETCH_METHOD_HTTP variabledoc/ | +5 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.
Cover letter [PATCH v2 0/4] fetch2: add alternative fetch method based on curl
wget fetch method is used for web downloads with http, https, ftp, ftps protocols. wget cmdline tool is missing some features such as hostname resolution by the proxy when using SOCKS5 proxy. SSH tunnel provides this feature for example.
This curl fetch method is based on curl cmdline tool and provides the same protocols as wget and supports SOCKS5 hostname resolution. This class inherits wget method in order to avoid code duplication as much as possible.
wget remains the default download method. curl fetch method can be enabled by setting a new bitbake variable:
BB_FETCH_METHOD_HTTP = "curl"
The hostname resolution by SOCKS5 proxy is activated by setting environment variable:
all_proxy="socks5h://...""
a patch on ce-core will be sent if this proposal is accepted to conditionnaly add curl to HOSTTOOLS variable in meta/conf/bitbake.conf:
HOSTTOOLS += "${@bb.utils.contains('BB_FETCH_METHOD_HTTP', 'curl', 'curl','', d)}"
---
Changes in v2:
- removed type hint unions and tested with Python 3.9, thanks Mathieu
Dubois-Briand for reporting this.
- curl tests are now skipped when curl cmdline tool is not found.
- Link to v1: https://lore.kernel.org/r/[email protected]
---
Pascal Eberhard (4):
fetch2: add curl method to fetch web content
fetch2: make curl method activable with BB_FETCH_METHOD_HTTP lib/tests/fetch2: add tests for curl method
doc: bitbake-user-manual-ref-variables: describe BB_FETCH_METHOD_HTTP variable
.../bitbake-user-manual-ref-variables.rst | 5 + lib/bb/fetch2/__init__.py | 2 + lib/bb/fetch2/curl.py | 162 +++++++++++++++++++++ lib/bb/fetch2/wget.py | 10 ++ lib/bb/tests/fetch.py | 75 ++++++++++ 5 files changed, 254 insertions(+)
---
base-commit: 48efc36b4e03f736e7521d269ced3417522784e9
change-id: 20260305-add_alt_fetch_method_curl-7a0bf96ad223
Best regards,
Signature · 1 line
Pascal Eberhard <[email protected]>