From d1380f5863e4927936d12ea98417de9ddbc9903f Mon Sep 17 00:00:00 2001 From: Adam Duskett Date: Tue, 4 Nov 2025 12:30:32 +0100 Subject: [PATCH] package/depot-tools: fix running gclient.py As of Buildroot commit [1] which updated the python-httplib2 package from 0.22.0 to 0.31.0, gclient.py has been broken due to the internal socks.py file being removed from the httplib directory (in upstream commit [2]). As the depot-tools package doesn't have a build step, and is only used when generating a flutter-engine tarball, no autobuild failures have occured. Add a simple patch that changes `import httplib2.socks` to `import socks` and depend on the host-python-pysocks package. [1] https://gitlab.com/buildroot.org/buildroot/-/commit/55a80f89d7321000591de349c7083a94c0349187 [2] https://github.com/httplib2/httplib2/commit/1a6ff781792099e9e14d7beb610bd99112b17b07 Fixes: https://gitlab.com/buildroot.org/buildroot/-/jobs/12188741354 Signed-off-by: Adam Duskett [Julien: - change commit id to urls - add "Fixes:" link ] Signed-off-by: Julien Olivain --- ...1-gerrit_util.py-fix-importing-socks.patch | 32 +++++++++++++++++++ package/depot-tools/depot-tools.mk | 1 + 2 files changed, 33 insertions(+) create mode 100644 package/depot-tools/0001-gerrit_util.py-fix-importing-socks.patch diff --git a/package/depot-tools/0001-gerrit_util.py-fix-importing-socks.patch b/package/depot-tools/0001-gerrit_util.py-fix-importing-socks.patch new file mode 100644 index 0000000000..46a1fe78d0 --- /dev/null +++ b/package/depot-tools/0001-gerrit_util.py-fix-importing-socks.patch @@ -0,0 +1,32 @@ +From e52f67026d7ce5b30887e1cfe486ed994169119d Mon Sep 17 00:00:00 2001 +From: Adam Duskett +Date: Tue, 4 Nov 2025 11:58:37 +0100 +Subject: [PATCH] gerrit_util.py: fix importing socks + +As of commit 1a6ff781792099e9e14d7beb610bd99112b17b07, +httplib2 removed the internal copy of socksipy module. + +The commit message specifically states to install pysocks. + +Upstream: unsubmitted +Signed-off-by: Adam Duskett +--- + gerrit_util.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/gerrit_util.py b/gerrit_util.py +index eef2f5749..d866bc47a 100644 +--- a/gerrit_util.py ++++ b/gerrit_util.py +@@ -35,7 +35,7 @@ from typing import NamedTuple, List, Optional + from typing import Tuple, TypedDict, cast + + import httplib2 +-import httplib2.socks ++import socks + + import auth + import gclient_utils +-- +2.51.1 + diff --git a/package/depot-tools/depot-tools.mk b/package/depot-tools/depot-tools.mk index b62f844b90..a6d57a6e3b 100644 --- a/package/depot-tools/depot-tools.mk +++ b/package/depot-tools/depot-tools.mk @@ -14,6 +14,7 @@ HOST_DEPOT_TOOLS_DEPENDENCIES = \ host-python3 \ host-python-httplib2 \ host-python-pyparsing \ + host-python-pysocks \ host-python-six define HOST_DEPOT_TOOLS_INSTALL_CMDS