From: Pascal Eberhard <pascal.eberhard@se.com>
To: bitbake-devel@lists.openembedded.org
Cc: Pascal Eberhard <pascal.eberhard@se.com>
Subject: [PATCH v2 0/4] fetch2: add alternative fetch method based on curl
Date: Tue, 10 Mar 2026 00:29:37 +0100 [thread overview]
Message-ID: <20260310-add_alt_fetch_method_curl-v2-0-4789639b28f1@se.com> (raw)
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)}"
Signed-off-by: Pascal Eberhard <pascal.eberhard@se.com>
---
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/20260305-add_alt_fetch_method_curl-v1-0-0d0220e5fa59@se.com
---
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,
--
Pascal Eberhard <pascal.eberhard@se.com>
WARNING: multiple messages have this Message-ID (diff)
From: Pascal Eberhard via B4 Relay <devnull+pascal.eberhard.se.com@kernel.org>
To: bitbake-devel@lists.openembedded.org
Cc: Pascal Eberhard <pascal.eberhard@se.com>
Subject: [PATCH v2 0/4] fetch2: add alternative fetch method based on curl
Date: Tue, 10 Mar 2026 00:29:37 +0100 [thread overview]
Message-ID: <20260310-add_alt_fetch_method_curl-v2-0-4789639b28f1@se.com> (raw)
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)}"
Signed-off-by: Pascal Eberhard <pascal.eberhard@se.com>
---
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/20260305-add_alt_fetch_method_curl-v1-0-0d0220e5fa59@se.com
---
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,
--
Pascal Eberhard <pascal.eberhard@se.com>
next reply other threads:[~2026-03-09 23:29 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-09 23:29 Pascal Eberhard [this message]
2026-03-09 23:29 ` [PATCH v2 0/4] fetch2: add alternative fetch method based on curl Pascal Eberhard via B4 Relay
2026-03-09 23:29 ` [PATCH v2 1/4] fetch2: add curl method to fetch web content Pascal Eberhard
2026-03-09 23:29 ` Pascal Eberhard via B4 Relay
2026-03-09 23:29 ` [PATCH v2 2/4] fetch2: make curl method activable with BB_FETCH_METHOD_HTTP Pascal Eberhard
2026-03-09 23:29 ` Pascal Eberhard via B4 Relay
2026-03-09 23:29 ` [PATCH v2 3/4] lib/tests/fetch2: add tests for curl method Pascal Eberhard
2026-03-09 23:29 ` Pascal Eberhard via B4 Relay
2026-03-09 23:29 ` [PATCH v2 4/4] doc: bitbake-user-manual-ref-variables: describe BB_FETCH_METHOD_HTTP variable Pascal Eberhard
2026-03-09 23:29 ` Pascal Eberhard via B4 Relay
2026-03-10 11:25 ` [bitbake-devel] [PATCH v2 0/4] fetch2: add alternative fetch method based on curl Alexander Kanavin
2026-03-12 11:34 ` Richard Purdie
2026-03-12 21:47 ` Pascal EBERHARD
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260310-add_alt_fetch_method_curl-v2-0-4789639b28f1@se.com \
--to=pascal.eberhard@se.com \
--cc=bitbake-devel@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.