* [PATCH v2 0/4] fetch2: add alternative fetch method based on curl
@ 2026-03-09 23:29 ` Pascal Eberhard via B4 Relay
0 siblings, 0 replies; 13+ messages in thread
From: Pascal Eberhard @ 2026-03-09 23:29 UTC (permalink / raw)
To: bitbake-devel; +Cc: Pascal Eberhard
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>
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH v2 0/4] fetch2: add alternative fetch method based on curl
@ 2026-03-09 23:29 ` Pascal Eberhard via B4 Relay
0 siblings, 0 replies; 13+ messages in thread
From: Pascal Eberhard via B4 Relay @ 2026-03-09 23:29 UTC (permalink / raw)
To: bitbake-devel; +Cc: Pascal Eberhard
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>
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH v2 1/4] fetch2: add curl method to fetch web content
2026-03-09 23:29 ` Pascal Eberhard via B4 Relay
@ 2026-03-09 23:29 ` Pascal Eberhard via B4 Relay
-1 siblings, 0 replies; 13+ messages in thread
From: Pascal Eberhard @ 2026-03-09 23:29 UTC (permalink / raw)
To: bitbake-devel; +Cc: Pascal Eberhard
curl fetch method is an alternative fetch method for web downloads. It
is based on curl cmdline tool and provides the same http, https, ftp
and ftps protocols as wget. It supports some new features as well such
as hostname resolution by the proxy when using SOCKS5 proxy.
Signed-off-by: Pascal Eberhard <pascal.eberhard@se.com>
---
lib/bb/fetch2/curl.py | 162 ++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 162 insertions(+)
diff --git a/lib/bb/fetch2/curl.py b/lib/bb/fetch2/curl.py
new file mode 100644
index 000000000..ad32372fb
--- /dev/null
+++ b/lib/bb/fetch2/curl.py
@@ -0,0 +1,162 @@
+"""
+BitBake 'Fetch' implementations for web downloads based on curl.
+
+curl fetch method is an alternative to existing wget method and can be enabled
+by setting bitbake variable:
+ BB_FETCH_METHOD_HTTP = "curl"
+
+curl fetch method provides new features such as hostname resolution by the
+proxy itself when using SOCKS5 proxy. It can be set with environment variable:
+ all_proxy="socks5h://...""
+"""
+
+# Copyright (C) 2026, Schneider Electric
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+# Based on the wget fetcher method, Copyright 2003 Holger Schurig
+
+import os
+import re
+import shlex
+import tempfile
+
+import bb
+import bb.fetch2
+import bb.progress
+import bb.utils
+from bb.data_smart import DataSmart
+from bb.fetch2 import FetchData, FetchError, logger, runfetchcmd
+from bb.fetch2.wget import Wget
+
+
+class CurlProgressHandler(bb.progress.LineFilterProgressHandler):
+ """
+ Extract progress information from curl commandline output.
+ Note: relies on --progress-bar being specified on the curl command line.
+ """
+
+ def __init__(self, d: DataSmart):
+ super(CurlProgressHandler, self).__init__(d)
+ # Send an initial progress event so the bar gets shown
+ self._fire_progress(0)
+
+ def writeline(self, line: str):
+ matches = re.findall(r' ([\d]+)\.\d%', line)
+ if matches:
+ progress = int(matches[0])
+ self.update(progress)
+ return False
+ return True
+
+
+class Curl(Wget):
+ """
+ Class to fetch urls via curl cmdline tool.
+ The code not related to the cmdline is the same between wget and curl.
+ Curl class inherits Wget class to avoid code duplication.
+ """
+
+ def is_enabled(self, d) -> bool:
+ """
+ curl method is enabled when BB_FETCH_METHOD_HTTP = "curl" only.
+ """
+ method_http: str = d.getVar("BB_FETCH_METHOD_HTTP")
+ return method_http == "curl"
+
+ def supports(self, ud: FetchData, d: DataSmart) -> bool:
+ """
+ Check if a given url can be fetched with curl.
+ """
+ if not self.is_enabled(d):
+ return False
+ if ud.type not in ['http', 'https', 'ftp', 'ftps']:
+ return False
+ logger.debug2("Fetch method 'curl' enabled")
+ return True
+
+ def urldata_init(self, ud: FetchData, d: DataSmart):
+ if 'protocol' in ud.parm:
+ if ud.parm['protocol'] == 'git':
+ raise bb.fetch2.ParameterError("Invalid protocol - if you wish to fetch from a git repository using http, you need to instead use the git:// prefix with protocol=http", ud.url)
+
+ if 'downloadfilename' in ud.parm:
+ ud.basename: str = ud.parm['downloadfilename']
+ else:
+ ud.basename: str = os.path.basename(ud.path)
+
+ ud.localfile = ud.basename
+ if not ud.localfile:
+ ud.localfile = ud.host + ud.path.replace("/", ".")
+
+ # --retry 1: equivalent to --tries=2 of wget.
+ # --speed-limit 1 --speed-time 100 --connect-timeout 100: equivalent to --timeout=100 option of wget.
+ # --location: redo request on new location when a page as moved, indicated with 3xx response code.
+ # --fail: fails with exit code when server generates HTML error rather than writing HTML error to output.
+ self.basecmd: str = d.getVar("FETCHCMD_curl") or "/usr/bin/env curl --retry 1 --speed-limit 1 --speed-time 100 --connect-timeout 100 --location --fail"
+
+ if ud.type == 'ftp' or ud.type == 'ftps':
+ self.basecmd += " --ftp-pasv"
+
+ if not self.check_certs(d):
+ self.basecmd += " --insecure"
+
+ def _runcurl(self, ud: FetchData, d: DataSmart, command: str, quiet: bool, workdir: str = None):
+ progresshandler = CurlProgressHandler(d)
+
+ logger.debug2("Fetching %s using command '%s'" % (ud.url, command))
+ bb.fetch2.check_network_access(d, command, ud.url)
+ runfetchcmd(command + " --progress-bar", d, quiet, log=progresshandler, workdir=workdir)
+
+ def download(self, ud: FetchData, d: DataSmart):
+ """Fetch urls"""
+ fetchcmd: str = self.basecmd
+ dldir: str = os.path.realpath(d.getVar("DL_DIR"))
+ localpath: str = os.path.join(dldir, ud.localfile) + ".tmp"
+ bb.utils.mkdirhier(os.path.dirname(localpath))
+ fetchcmd += " --output %s" % shlex.quote(localpath)
+
+ if ud.user and ud.pswd:
+ fetchcmd += " --anyauth"
+ if ud.parm.get("redirectauth", "1") == "1":
+ fetchcmd += f" --user={ud.user}:{ud.pswd}"
+
+ uri: str = ud.url.split(";")[0]
+ fetchcmd += f" --continue-at - '{uri}'"
+
+ self._runcurl(ud, d, fetchcmd, False)
+
+ # Sanity check since curl can pretend it succeed when it didn't
+ # Also, this used to happen if sourceforge sent us to the mirror page
+ if not os.path.exists(localpath):
+ raise FetchError(f"The fetch command returned success for url {uri} but {localpath} doesn't exist?!", uri)
+
+ if os.path.getsize(localpath) == 0:
+ os.remove(localpath)
+ raise FetchError(f"The fetch of {uri} resulted in a zero size file?! Deleting and failing since this isn't right.", uri)
+
+ # Try and verify any checksum now, meaning if it isn't correct, we don't remove the
+ # original file, which might be a race (imagine two recipes referencing the same
+ # source, one with an incorrect checksum)
+ bb.fetch2.verify_checksum(ud, d, localpath=localpath, fatal_nochecksum=False)
+
+ # Remove the ".tmp" and move the file into position atomically
+ # Our lock prevents multiple writers but mirroring code may grab incomplete files
+ os.rename(localpath, localpath[:-4])
+
+ return True
+
+ def _fetch_index(self, uri: str, ud: FetchData, d: DataSmart):
+ """
+ Run fetch checkstatus to get directory information
+ """
+ with tempfile.TemporaryDirectory(prefix="curl-index-") as workdir, tempfile.NamedTemporaryFile(dir=workdir, prefix="curl-listing-") as f:
+ fetchcmd: str = self.basecmd
+ fetchcmd += f" --output {f.name} '{uri}'"
+ try:
+ self._runcurl(ud, d, fetchcmd, True, workdir=workdir)
+ fetchresult = f.read()
+ except bb.fetch2.BBFetchException:
+ fetchresult = ""
+
+ return fetchresult
--
2.43.0
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH v2 1/4] fetch2: add curl method to fetch web content
@ 2026-03-09 23:29 ` Pascal Eberhard via B4 Relay
0 siblings, 0 replies; 13+ messages in thread
From: Pascal Eberhard via B4 Relay @ 2026-03-09 23:29 UTC (permalink / raw)
To: bitbake-devel; +Cc: Pascal Eberhard
From: Pascal Eberhard <pascal.eberhard@se.com>
curl fetch method is an alternative fetch method for web downloads. It
is based on curl cmdline tool and provides the same http, https, ftp
and ftps protocols as wget. It supports some new features as well such
as hostname resolution by the proxy when using SOCKS5 proxy.
Signed-off-by: Pascal Eberhard <pascal.eberhard@se.com>
---
lib/bb/fetch2/curl.py | 162 ++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 162 insertions(+)
diff --git a/lib/bb/fetch2/curl.py b/lib/bb/fetch2/curl.py
new file mode 100644
index 000000000..ad32372fb
--- /dev/null
+++ b/lib/bb/fetch2/curl.py
@@ -0,0 +1,162 @@
+"""
+BitBake 'Fetch' implementations for web downloads based on curl.
+
+curl fetch method is an alternative to existing wget method and can be enabled
+by setting bitbake variable:
+ BB_FETCH_METHOD_HTTP = "curl"
+
+curl fetch method provides new features such as hostname resolution by the
+proxy itself when using SOCKS5 proxy. It can be set with environment variable:
+ all_proxy="socks5h://...""
+"""
+
+# Copyright (C) 2026, Schneider Electric
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+# Based on the wget fetcher method, Copyright 2003 Holger Schurig
+
+import os
+import re
+import shlex
+import tempfile
+
+import bb
+import bb.fetch2
+import bb.progress
+import bb.utils
+from bb.data_smart import DataSmart
+from bb.fetch2 import FetchData, FetchError, logger, runfetchcmd
+from bb.fetch2.wget import Wget
+
+
+class CurlProgressHandler(bb.progress.LineFilterProgressHandler):
+ """
+ Extract progress information from curl commandline output.
+ Note: relies on --progress-bar being specified on the curl command line.
+ """
+
+ def __init__(self, d: DataSmart):
+ super(CurlProgressHandler, self).__init__(d)
+ # Send an initial progress event so the bar gets shown
+ self._fire_progress(0)
+
+ def writeline(self, line: str):
+ matches = re.findall(r' ([\d]+)\.\d%', line)
+ if matches:
+ progress = int(matches[0])
+ self.update(progress)
+ return False
+ return True
+
+
+class Curl(Wget):
+ """
+ Class to fetch urls via curl cmdline tool.
+ The code not related to the cmdline is the same between wget and curl.
+ Curl class inherits Wget class to avoid code duplication.
+ """
+
+ def is_enabled(self, d) -> bool:
+ """
+ curl method is enabled when BB_FETCH_METHOD_HTTP = "curl" only.
+ """
+ method_http: str = d.getVar("BB_FETCH_METHOD_HTTP")
+ return method_http == "curl"
+
+ def supports(self, ud: FetchData, d: DataSmart) -> bool:
+ """
+ Check if a given url can be fetched with curl.
+ """
+ if not self.is_enabled(d):
+ return False
+ if ud.type not in ['http', 'https', 'ftp', 'ftps']:
+ return False
+ logger.debug2("Fetch method 'curl' enabled")
+ return True
+
+ def urldata_init(self, ud: FetchData, d: DataSmart):
+ if 'protocol' in ud.parm:
+ if ud.parm['protocol'] == 'git':
+ raise bb.fetch2.ParameterError("Invalid protocol - if you wish to fetch from a git repository using http, you need to instead use the git:// prefix with protocol=http", ud.url)
+
+ if 'downloadfilename' in ud.parm:
+ ud.basename: str = ud.parm['downloadfilename']
+ else:
+ ud.basename: str = os.path.basename(ud.path)
+
+ ud.localfile = ud.basename
+ if not ud.localfile:
+ ud.localfile = ud.host + ud.path.replace("/", ".")
+
+ # --retry 1: equivalent to --tries=2 of wget.
+ # --speed-limit 1 --speed-time 100 --connect-timeout 100: equivalent to --timeout=100 option of wget.
+ # --location: redo request on new location when a page as moved, indicated with 3xx response code.
+ # --fail: fails with exit code when server generates HTML error rather than writing HTML error to output.
+ self.basecmd: str = d.getVar("FETCHCMD_curl") or "/usr/bin/env curl --retry 1 --speed-limit 1 --speed-time 100 --connect-timeout 100 --location --fail"
+
+ if ud.type == 'ftp' or ud.type == 'ftps':
+ self.basecmd += " --ftp-pasv"
+
+ if not self.check_certs(d):
+ self.basecmd += " --insecure"
+
+ def _runcurl(self, ud: FetchData, d: DataSmart, command: str, quiet: bool, workdir: str = None):
+ progresshandler = CurlProgressHandler(d)
+
+ logger.debug2("Fetching %s using command '%s'" % (ud.url, command))
+ bb.fetch2.check_network_access(d, command, ud.url)
+ runfetchcmd(command + " --progress-bar", d, quiet, log=progresshandler, workdir=workdir)
+
+ def download(self, ud: FetchData, d: DataSmart):
+ """Fetch urls"""
+ fetchcmd: str = self.basecmd
+ dldir: str = os.path.realpath(d.getVar("DL_DIR"))
+ localpath: str = os.path.join(dldir, ud.localfile) + ".tmp"
+ bb.utils.mkdirhier(os.path.dirname(localpath))
+ fetchcmd += " --output %s" % shlex.quote(localpath)
+
+ if ud.user and ud.pswd:
+ fetchcmd += " --anyauth"
+ if ud.parm.get("redirectauth", "1") == "1":
+ fetchcmd += f" --user={ud.user}:{ud.pswd}"
+
+ uri: str = ud.url.split(";")[0]
+ fetchcmd += f" --continue-at - '{uri}'"
+
+ self._runcurl(ud, d, fetchcmd, False)
+
+ # Sanity check since curl can pretend it succeed when it didn't
+ # Also, this used to happen if sourceforge sent us to the mirror page
+ if not os.path.exists(localpath):
+ raise FetchError(f"The fetch command returned success for url {uri} but {localpath} doesn't exist?!", uri)
+
+ if os.path.getsize(localpath) == 0:
+ os.remove(localpath)
+ raise FetchError(f"The fetch of {uri} resulted in a zero size file?! Deleting and failing since this isn't right.", uri)
+
+ # Try and verify any checksum now, meaning if it isn't correct, we don't remove the
+ # original file, which might be a race (imagine two recipes referencing the same
+ # source, one with an incorrect checksum)
+ bb.fetch2.verify_checksum(ud, d, localpath=localpath, fatal_nochecksum=False)
+
+ # Remove the ".tmp" and move the file into position atomically
+ # Our lock prevents multiple writers but mirroring code may grab incomplete files
+ os.rename(localpath, localpath[:-4])
+
+ return True
+
+ def _fetch_index(self, uri: str, ud: FetchData, d: DataSmart):
+ """
+ Run fetch checkstatus to get directory information
+ """
+ with tempfile.TemporaryDirectory(prefix="curl-index-") as workdir, tempfile.NamedTemporaryFile(dir=workdir, prefix="curl-listing-") as f:
+ fetchcmd: str = self.basecmd
+ fetchcmd += f" --output {f.name} '{uri}'"
+ try:
+ self._runcurl(ud, d, fetchcmd, True, workdir=workdir)
+ fetchresult = f.read()
+ except bb.fetch2.BBFetchException:
+ fetchresult = ""
+
+ return fetchresult
--
2.43.0
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH v2 2/4] fetch2: make curl method activable with BB_FETCH_METHOD_HTTP
2026-03-09 23:29 ` Pascal Eberhard via B4 Relay
@ 2026-03-09 23:29 ` Pascal Eberhard via B4 Relay
-1 siblings, 0 replies; 13+ messages in thread
From: Pascal Eberhard @ 2026-03-09 23:29 UTC (permalink / raw)
To: bitbake-devel; +Cc: Pascal Eberhard
wget is the default fetch method. curl fetch method can be activated by
setting bitbake variable:
BB_FETCH_METHOD_HTTP = "curl"
Signed-off-by: Pascal Eberhard <pascal.eberhard@se.com>
---
lib/bb/fetch2/__init__.py | 2 ++
lib/bb/fetch2/wget.py | 10 ++++++++++
2 files changed, 12 insertions(+)
diff --git a/lib/bb/fetch2/__init__.py b/lib/bb/fetch2/__init__.py
index aaefd8602..dc1158b38 100644
--- a/lib/bb/fetch2/__init__.py
+++ b/lib/bb/fetch2/__init__.py
@@ -2107,6 +2107,7 @@ from . import gitannex
from . import local
from . import svn
from . import wget
+from . import curl
from . import ssh
from . import sftp
from . import s3
@@ -2123,6 +2124,7 @@ from . import gomod
methods.append(local.Local())
methods.append(wget.Wget())
+methods.append(curl.Curl())
methods.append(svn.Svn())
methods.append(git.Git())
methods.append(gitsm.GitSM())
diff --git a/lib/bb/fetch2/wget.py b/lib/bb/fetch2/wget.py
index 4e3505599..3b1993f29 100644
--- a/lib/bb/fetch2/wget.py
+++ b/lib/bb/fetch2/wget.py
@@ -60,10 +60,20 @@ class Wget(FetchMethod):
"""
return (d.getVar("BB_CHECK_SSL_CERTS") or "1") != "0"
+ def is_enabled(self, d):
+ """
+ wget method is enabled when BB_FETCH_METHOD_HTTP = "wget" or by default
+ when BB_FETCH_METHOD_HTTP variable is not set.
+ """
+ method_http: str = d.getVar("BB_FETCH_METHOD_HTTP") or "wget"
+ return method_http == "wget"
+
def supports(self, ud, d):
"""
Check to see if a given url can be fetched with wget.
"""
+ if not self.is_enabled(d):
+ return False
return ud.type in ['http', 'https', 'ftp', 'ftps']
def recommends_checksum(self, urldata):
--
2.43.0
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH v2 2/4] fetch2: make curl method activable with BB_FETCH_METHOD_HTTP
@ 2026-03-09 23:29 ` Pascal Eberhard via B4 Relay
0 siblings, 0 replies; 13+ messages in thread
From: Pascal Eberhard via B4 Relay @ 2026-03-09 23:29 UTC (permalink / raw)
To: bitbake-devel; +Cc: Pascal Eberhard
From: Pascal Eberhard <pascal.eberhard@se.com>
wget is the default fetch method. curl fetch method can be activated by
setting bitbake variable:
BB_FETCH_METHOD_HTTP = "curl"
Signed-off-by: Pascal Eberhard <pascal.eberhard@se.com>
---
lib/bb/fetch2/__init__.py | 2 ++
lib/bb/fetch2/wget.py | 10 ++++++++++
2 files changed, 12 insertions(+)
diff --git a/lib/bb/fetch2/__init__.py b/lib/bb/fetch2/__init__.py
index aaefd8602..dc1158b38 100644
--- a/lib/bb/fetch2/__init__.py
+++ b/lib/bb/fetch2/__init__.py
@@ -2107,6 +2107,7 @@ from . import gitannex
from . import local
from . import svn
from . import wget
+from . import curl
from . import ssh
from . import sftp
from . import s3
@@ -2123,6 +2124,7 @@ from . import gomod
methods.append(local.Local())
methods.append(wget.Wget())
+methods.append(curl.Curl())
methods.append(svn.Svn())
methods.append(git.Git())
methods.append(gitsm.GitSM())
diff --git a/lib/bb/fetch2/wget.py b/lib/bb/fetch2/wget.py
index 4e3505599..3b1993f29 100644
--- a/lib/bb/fetch2/wget.py
+++ b/lib/bb/fetch2/wget.py
@@ -60,10 +60,20 @@ class Wget(FetchMethod):
"""
return (d.getVar("BB_CHECK_SSL_CERTS") or "1") != "0"
+ def is_enabled(self, d):
+ """
+ wget method is enabled when BB_FETCH_METHOD_HTTP = "wget" or by default
+ when BB_FETCH_METHOD_HTTP variable is not set.
+ """
+ method_http: str = d.getVar("BB_FETCH_METHOD_HTTP") or "wget"
+ return method_http == "wget"
+
def supports(self, ud, d):
"""
Check to see if a given url can be fetched with wget.
"""
+ if not self.is_enabled(d):
+ return False
return ud.type in ['http', 'https', 'ftp', 'ftps']
def recommends_checksum(self, urldata):
--
2.43.0
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH v2 3/4] lib/tests/fetch2: add tests for curl method
2026-03-09 23:29 ` Pascal Eberhard via B4 Relay
@ 2026-03-09 23:29 ` Pascal Eberhard via B4 Relay
-1 siblings, 0 replies; 13+ messages in thread
From: Pascal Eberhard @ 2026-03-09 23:29 UTC (permalink / raw)
To: bitbake-devel; +Cc: Pascal Eberhard
Duplicate wget fetch method test cases to test curl fetch method.
Signed-off-by: Pascal Eberhard <pascal.eberhard@se.com>
---
lib/bb/tests/fetch.py | 75 +++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 75 insertions(+)
diff --git a/lib/bb/tests/fetch.py b/lib/bb/tests/fetch.py
index 74eb73472..72257a130 100644
--- a/lib/bb/tests/fetch.py
+++ b/lib/bb/tests/fetch.py
@@ -28,6 +28,10 @@ def skipIfNoNetwork():
return unittest.skip("network test")
return lambda f: f
+def skipIfNoCurl():
+ if not shutil.which("curl"):
+ return unittest.skip("'curl' not found")
+ return lambda f: f
@contextlib.contextmanager
def hide_directory(directory):
@@ -1550,6 +1554,7 @@ class FetchLatestVersionTest(FetcherTest):
url = "http://127.0.0.1:%s/%s" % (port, data.path)
ud = bb.fetch2.FetchData(url, self.d)
+ self.assertEqual(ud.method.__class__.__name__, "Wget")
pupver = ud.method.latest_versionstring(ud, self.d)
verstring = pupver[0]
self.assertTrue(verstring, msg="Could not find upstream version for %s" % data.pn)
@@ -1558,6 +1563,36 @@ class FetchLatestVersionTest(FetcherTest):
finally:
server.stop()
+ @skipIfNoCurl()
+ def test_curl_latest_versionstring(self):
+ self.d.setVar("BB_FETCH_METHOD_HTTP", "curl")
+ testdata = os.path.dirname(os.path.abspath(__file__)) + "/fetch-testdata"
+ server = HTTPService(testdata, host="127.0.0.1")
+ server.start()
+ port = server.port
+ try:
+ for data, v in self.test_wget_uris.items():
+ with self.subTest(pn=data.pn):
+ self.d.setVar("PN", data.pn)
+ self.d.setVar("PV", data.pv)
+ if data.check_uri:
+ checkuri = "http://127.0.0.1:%s/%s" % (port, data.check_uri)
+ self.d.setVar("UPSTREAM_CHECK_URI", checkuri)
+ if data.check_regex:
+ self.d.setVar("UPSTREAM_CHECK_REGEX", data.check_regex)
+
+ url = "http://127.0.0.1:%s/%s" % (port, data.path)
+ ud = bb.fetch2.FetchData(url, self.d)
+ self.assertEqual(ud.method.__class__.__name__, "Curl")
+ pupver = ud.method.latest_versionstring(ud, self.d)
+ verstring = pupver[0]
+ self.assertTrue(verstring, msg="Could not find upstream version for %s" % data.pn)
+ r = bb.utils.vercmp_string(v, verstring)
+ self.assertTrue(r == -1 or r == 0, msg="Package %s, version: %s <= %s" % (data.pn, v, verstring))
+ finally:
+ server.stop()
+ self.d.delVar("BB_FETCH_METHOD_HTTP")
+
@skipIfNoNetwork()
def test_crate_latest_versionstring(self):
for k, v in self.test_crate_uris.items():
@@ -1590,6 +1625,7 @@ class FetchCheckStatusTest(FetcherTest):
with self.subTest(url=u):
ud = fetch.ud[u]
m = ud.method
+ self.assertEqual(ud.method.__class__.__name__, "Wget")
ret = m.checkstatus(fetch, ud, self.d)
self.assertTrue(ret, msg="URI %s, can't check status" % (u))
@@ -1605,10 +1641,49 @@ class FetchCheckStatusTest(FetcherTest):
with self.subTest(url=u):
ud = fetch.ud[u]
m = ud.method
+ self.assertEqual(ud.method.__class__.__name__, "Wget")
+ ret = m.checkstatus(fetch, ud, self.d)
+ self.assertTrue(ret, msg="URI %s, can't check status" % (u))
+
+ connection_cache.close_connections()
+
+ @skipIfNoCurl()
+ @skipIfNoNetwork()
+ def test_curl_checkstatus(self):
+ self.d.setVar("BB_FETCH_METHOD_HTTP", "curl")
+
+ fetch = bb.fetch2.Fetch(self.test_wget_uris, self.d)
+ for u in self.test_wget_uris:
+ with self.subTest(url=u):
+ ud = fetch.ud[u]
+ m = ud.method
+ self.assertEqual(ud.method.__class__.__name__, "Curl")
+ ret = m.checkstatus(fetch, ud, self.d)
+ self.assertTrue(ret, msg="URI %s, can't check status" % (u))
+
+ self.d.delVar("BB_FETCH_METHOD_HTTP")
+
+ @skipIfNoCurl()
+ @skipIfNoNetwork()
+ def test_curl_checkstatus_connection_cache(self):
+ from bb.fetch2 import FetchConnectionCache
+
+ self.d.setVar("BB_FETCH_METHOD_HTTP", "curl")
+
+ connection_cache = FetchConnectionCache()
+ fetch = bb.fetch2.Fetch(self.test_wget_uris, self.d,
+ connection_cache = connection_cache)
+
+ for u in self.test_wget_uris:
+ with self.subTest(url=u):
+ ud = fetch.ud[u]
+ m = ud.method
+ self.assertEqual(ud.method.__class__.__name__, "Curl")
ret = m.checkstatus(fetch, ud, self.d)
self.assertTrue(ret, msg="URI %s, can't check status" % (u))
connection_cache.close_connections()
+ self.d.delVar("BB_FETCH_METHOD_HTTP")
class GitMakeShallowTest(FetcherTest):
--
2.43.0
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH v2 3/4] lib/tests/fetch2: add tests for curl method
@ 2026-03-09 23:29 ` Pascal Eberhard via B4 Relay
0 siblings, 0 replies; 13+ messages in thread
From: Pascal Eberhard via B4 Relay @ 2026-03-09 23:29 UTC (permalink / raw)
To: bitbake-devel; +Cc: Pascal Eberhard
From: Pascal Eberhard <pascal.eberhard@se.com>
Duplicate wget fetch method test cases to test curl fetch method.
Signed-off-by: Pascal Eberhard <pascal.eberhard@se.com>
---
lib/bb/tests/fetch.py | 75 +++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 75 insertions(+)
diff --git a/lib/bb/tests/fetch.py b/lib/bb/tests/fetch.py
index 74eb73472..72257a130 100644
--- a/lib/bb/tests/fetch.py
+++ b/lib/bb/tests/fetch.py
@@ -28,6 +28,10 @@ def skipIfNoNetwork():
return unittest.skip("network test")
return lambda f: f
+def skipIfNoCurl():
+ if not shutil.which("curl"):
+ return unittest.skip("'curl' not found")
+ return lambda f: f
@contextlib.contextmanager
def hide_directory(directory):
@@ -1550,6 +1554,7 @@ class FetchLatestVersionTest(FetcherTest):
url = "http://127.0.0.1:%s/%s" % (port, data.path)
ud = bb.fetch2.FetchData(url, self.d)
+ self.assertEqual(ud.method.__class__.__name__, "Wget")
pupver = ud.method.latest_versionstring(ud, self.d)
verstring = pupver[0]
self.assertTrue(verstring, msg="Could not find upstream version for %s" % data.pn)
@@ -1558,6 +1563,36 @@ class FetchLatestVersionTest(FetcherTest):
finally:
server.stop()
+ @skipIfNoCurl()
+ def test_curl_latest_versionstring(self):
+ self.d.setVar("BB_FETCH_METHOD_HTTP", "curl")
+ testdata = os.path.dirname(os.path.abspath(__file__)) + "/fetch-testdata"
+ server = HTTPService(testdata, host="127.0.0.1")
+ server.start()
+ port = server.port
+ try:
+ for data, v in self.test_wget_uris.items():
+ with self.subTest(pn=data.pn):
+ self.d.setVar("PN", data.pn)
+ self.d.setVar("PV", data.pv)
+ if data.check_uri:
+ checkuri = "http://127.0.0.1:%s/%s" % (port, data.check_uri)
+ self.d.setVar("UPSTREAM_CHECK_URI", checkuri)
+ if data.check_regex:
+ self.d.setVar("UPSTREAM_CHECK_REGEX", data.check_regex)
+
+ url = "http://127.0.0.1:%s/%s" % (port, data.path)
+ ud = bb.fetch2.FetchData(url, self.d)
+ self.assertEqual(ud.method.__class__.__name__, "Curl")
+ pupver = ud.method.latest_versionstring(ud, self.d)
+ verstring = pupver[0]
+ self.assertTrue(verstring, msg="Could not find upstream version for %s" % data.pn)
+ r = bb.utils.vercmp_string(v, verstring)
+ self.assertTrue(r == -1 or r == 0, msg="Package %s, version: %s <= %s" % (data.pn, v, verstring))
+ finally:
+ server.stop()
+ self.d.delVar("BB_FETCH_METHOD_HTTP")
+
@skipIfNoNetwork()
def test_crate_latest_versionstring(self):
for k, v in self.test_crate_uris.items():
@@ -1590,6 +1625,7 @@ class FetchCheckStatusTest(FetcherTest):
with self.subTest(url=u):
ud = fetch.ud[u]
m = ud.method
+ self.assertEqual(ud.method.__class__.__name__, "Wget")
ret = m.checkstatus(fetch, ud, self.d)
self.assertTrue(ret, msg="URI %s, can't check status" % (u))
@@ -1605,10 +1641,49 @@ class FetchCheckStatusTest(FetcherTest):
with self.subTest(url=u):
ud = fetch.ud[u]
m = ud.method
+ self.assertEqual(ud.method.__class__.__name__, "Wget")
+ ret = m.checkstatus(fetch, ud, self.d)
+ self.assertTrue(ret, msg="URI %s, can't check status" % (u))
+
+ connection_cache.close_connections()
+
+ @skipIfNoCurl()
+ @skipIfNoNetwork()
+ def test_curl_checkstatus(self):
+ self.d.setVar("BB_FETCH_METHOD_HTTP", "curl")
+
+ fetch = bb.fetch2.Fetch(self.test_wget_uris, self.d)
+ for u in self.test_wget_uris:
+ with self.subTest(url=u):
+ ud = fetch.ud[u]
+ m = ud.method
+ self.assertEqual(ud.method.__class__.__name__, "Curl")
+ ret = m.checkstatus(fetch, ud, self.d)
+ self.assertTrue(ret, msg="URI %s, can't check status" % (u))
+
+ self.d.delVar("BB_FETCH_METHOD_HTTP")
+
+ @skipIfNoCurl()
+ @skipIfNoNetwork()
+ def test_curl_checkstatus_connection_cache(self):
+ from bb.fetch2 import FetchConnectionCache
+
+ self.d.setVar("BB_FETCH_METHOD_HTTP", "curl")
+
+ connection_cache = FetchConnectionCache()
+ fetch = bb.fetch2.Fetch(self.test_wget_uris, self.d,
+ connection_cache = connection_cache)
+
+ for u in self.test_wget_uris:
+ with self.subTest(url=u):
+ ud = fetch.ud[u]
+ m = ud.method
+ self.assertEqual(ud.method.__class__.__name__, "Curl")
ret = m.checkstatus(fetch, ud, self.d)
self.assertTrue(ret, msg="URI %s, can't check status" % (u))
connection_cache.close_connections()
+ self.d.delVar("BB_FETCH_METHOD_HTTP")
class GitMakeShallowTest(FetcherTest):
--
2.43.0
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH v2 4/4] doc: bitbake-user-manual-ref-variables: describe BB_FETCH_METHOD_HTTP variable
2026-03-09 23:29 ` Pascal Eberhard via B4 Relay
@ 2026-03-09 23:29 ` Pascal Eberhard via B4 Relay
-1 siblings, 0 replies; 13+ messages in thread
From: Pascal Eberhard @ 2026-03-09 23:29 UTC (permalink / raw)
To: bitbake-devel; +Cc: Pascal Eberhard
add BB_FETCH_METHOD_HTTP variable to select between wget and curl method
for http, https, ftp, ftps protocols.
Signed-off-by: Pascal Eberhard <pascal.eberhard@se.com>
---
doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst b/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst
index 06bd53619..c459ed3af 100644
--- a/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst
+++ b/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst
@@ -311,6 +311,11 @@ overview of their function and contents.
search the main :term:`SRC_URI` or
:term:`MIRRORS`.
+ :term:`BB_FETCH_METHOD_HTTP`
+ When set to "curl", cause BitBake's fetcher to use curl method for
+ downloading web artifacts via http, https, ftp or ftps.
+ When not set (default) or set to "wget", wget method is used.
+
:term:`BB_FILENAME`
Contains the filename of the recipe that owns the currently running
task. For example, if the ``do_fetch`` task that resides in the
--
2.43.0
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH v2 4/4] doc: bitbake-user-manual-ref-variables: describe BB_FETCH_METHOD_HTTP variable
@ 2026-03-09 23:29 ` Pascal Eberhard via B4 Relay
0 siblings, 0 replies; 13+ messages in thread
From: Pascal Eberhard via B4 Relay @ 2026-03-09 23:29 UTC (permalink / raw)
To: bitbake-devel; +Cc: Pascal Eberhard
From: Pascal Eberhard <pascal.eberhard@se.com>
add BB_FETCH_METHOD_HTTP variable to select between wget and curl method
for http, https, ftp, ftps protocols.
Signed-off-by: Pascal Eberhard <pascal.eberhard@se.com>
---
doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst b/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst
index 06bd53619..c459ed3af 100644
--- a/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst
+++ b/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst
@@ -311,6 +311,11 @@ overview of their function and contents.
search the main :term:`SRC_URI` or
:term:`MIRRORS`.
+ :term:`BB_FETCH_METHOD_HTTP`
+ When set to "curl", cause BitBake's fetcher to use curl method for
+ downloading web artifacts via http, https, ftp or ftps.
+ When not set (default) or set to "wget", wget method is used.
+
:term:`BB_FILENAME`
Contains the filename of the recipe that owns the currently running
task. For example, if the ``do_fetch`` task that resides in the
--
2.43.0
^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [bitbake-devel] [PATCH v2 0/4] fetch2: add alternative fetch method based on curl
2026-03-09 23:29 ` Pascal Eberhard via B4 Relay
` (4 preceding siblings ...)
(?)
@ 2026-03-10 11:25 ` Alexander Kanavin
-1 siblings, 0 replies; 13+ messages in thread
From: Alexander Kanavin @ 2026-03-10 11:25 UTC (permalink / raw)
To: pascal.eberhard; +Cc: bitbake-devel, Pascal Eberhard
On Tue, 10 Mar 2026 at 00:31, Pascal Eberhard via B4 Relay via
lists.openembedded.org
<pascal.eberhard=gmail.com@lists.openembedded.org> wrote:
> 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.
There has not been much demand for adding curl support (meaning, none :)
Would you be okay with just setting FETCHCMD_wget to a translation
wrapper to curl?
Alex
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [bitbake-devel] [PATCH v2 0/4] fetch2: add alternative fetch method based on curl
2026-03-09 23:29 ` Pascal Eberhard via B4 Relay
` (5 preceding siblings ...)
(?)
@ 2026-03-12 11:34 ` Richard Purdie
2026-03-12 21:47 ` Pascal EBERHARD
-1 siblings, 1 reply; 13+ messages in thread
From: Richard Purdie @ 2026-03-12 11:34 UTC (permalink / raw)
To: pascal.eberhard, bitbake-devel; +Cc: Pascal Eberhard
Hi Pascal,
On Tue, 2026-03-10 at 00:29 +0100, Pascal Eberhard via B4 Relay via lists.openembedded.org wrote:
> 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
We discussed this today a bit on the review call and we're all very
nervous about this change.
One of our guiding principles is not to have multiple ways of doing the
same thing. The reason is simple, so that we don't end up with two semi
functional things instead of one good one. Adding this "curl" mode to
the fetcher creates this scenario where one thing works for some and
the other works for everyone else. We'd then have to document when to
use one, when to use the other and potentially which functionalities
work in each different case.
The fetcher changes don't appear to change everything, they look like
you changed just enough to get your use cases to work.
The "wget" fetcher is already a hybrid where it uses wget for some
things and urllib for others. It does do that consistently though,
always using wget for certain operations and urllib for the status
tests.
We're not wedded to using wget, what we do want to do is provide a
strong stable and single API to enable fetching of http/https urls.
Given this, adding in the switch isn't an approach the project wants to
take. Equally, we've used wget reliably for a long time and it is the
thing we know. Swapping it for something else isn't something we'd
undertake lightly either. There are likely things that wget does better
than curl too for example. There are also factors like documentation to
consider if we were to switch to curl, our prerequisites would need
updating for all the distros, our autobuilder workers would need to be
reconfigured and so on.
I think we therefore need to have a wider discussion about how to move
forward here and work out what the best solution would be to aim for
long term, then come up with a plan to get there.
I'm conscious the LTS/feature freeze is looming but this isn't the kind
of change we can rush in before then unfortunately, we are simply too
late for that.
I'm also really aware of the limited bandwidth many of us have to
contribute to discussions like this. I personally find that really
frustrating as I want to try and help but there simply aren't enough
hours in the day :/.
So whilst I appreciate this isn't the answer you wanted to hear, I
don't think we can take these changes right now and we need to find a
different way to help you solve your issue.
Cheers,
Richard
^ permalink raw reply [flat|nested] 13+ messages in thread
* RE: [bitbake-devel] [PATCH v2 0/4] fetch2: add alternative fetch method based on curl
2026-03-12 11:34 ` Richard Purdie
@ 2026-03-12 21:47 ` Pascal EBERHARD
0 siblings, 0 replies; 13+ messages in thread
From: Pascal EBERHARD @ 2026-03-12 21:47 UTC (permalink / raw)
To: Richard Purdie, bitbake-devel@lists.openembedded.org
On Thu, Mar 12, 2026 at 12:34 Richard Purdie <richard.purdie@linuxfoundation.org> wrote:
> Hi Pascal,
Hi Richard,
> On Tue, 2026-03-10 at 00:29 +0100, Pascal Eberhard via B4 Relay via lists.openembedded.org wrote:
> > 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
>
> We discussed this today a bit on the review call and we're all very
> nervous about this change.
>
> One of our guiding principles is not to have multiple ways of doing the
> same thing. The reason is simple, so that we don't end up with two semi
> functional things instead of one good one. Adding this "curl" mode to
> the fetcher creates this scenario where one thing works for some and
> the other works for everyone else. We'd then have to document when to
> use one, when to use the other and potentially which functionalities
> work in each different case.
>
> The fetcher changes don't appear to change everything, they look like
> you changed just enough to get your use cases to work.
>
> The "wget" fetcher is already a hybrid where it uses wget for some
> things and urllib for others. It does do that consistently though,
> always using wget for certain operations and urllib for the status
> tests.
>
> We're not wedded to using wget, what we do want to do is provide a
> strong stable and single API to enable fetching of http/https urls.
>
> Given this, adding in the switch isn't an approach the project wants to
> take. Equally, we've used wget reliably for a long time and it is the
> thing we know. Swapping it for something else isn't something we'd
> undertake lightly either. There are likely things that wget does better
> than curl too for example. There are also factors like documentation to
> consider if we were to switch to curl, our prerequisites would need
> updating for all the distros, our autobuilder workers would need to be
> reconfigured and so on.
>
> I think we therefore need to have a wider discussion about how to move
> forward here and work out what the best solution would be to aim for
> long term, then come up with a plan to get there.
>
> I'm conscious the LTS/feature freeze is looming but this isn't the kind
> of change we can rush in before then unfortunately, we are simply too
> late for that.
>
> I'm also really aware of the limited bandwidth many of us have to
> contribute to discussions like this. I personally find that really
> frustrating as I want to try and help but there simply aren't enough
> hours in the day :/.
>
> So whilst I appreciate this isn't the answer you wanted to hear, I
> don't think we can take these changes right now and we need to find a
> different way to help you solve your issue.
>
I guess coming up with an RFC after the release would have been more
appropriate to start this discussion :). Thank you for taking the time
to provide the rationale behind the answer, it is appreciated.
Cheers,
Pascal
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2026-03-12 21:48 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-09 23:29 [PATCH v2 0/4] fetch2: add alternative fetch method based on curl Pascal Eberhard
2026-03-09 23:29 ` 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
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.