From 999fcb6e5979b5d749b8cba7fb840616389ffa69 Mon Sep 17 00:00:00 2001 From: Yue Tao Date: Fri, 17 Sep 2021 18:43:24 +0800 Subject: [PATCH] Add debian package for python-docker Porting 0001-Update-client-close-socket.patch from CentOS Ignore 0002-Add-auth_config-to-api.image.inspect_distribution.patch which is already in debian version Story: 2009221 Task: 43358 Signed-off-by: Yue Tao Change-Id: Ib4e58ce2de0219d964e2bde78e171acb030c7ff2 --- docker/python-docker/debian/meta_data.yaml | 9 ++++++ .../0001-Update-client-close-socket.patch | 30 +++++++++++++++++++ docker/python-docker/debian/patches/series | 1 + 3 files changed, 40 insertions(+) create mode 100644 docker/python-docker/debian/meta_data.yaml create mode 100644 docker/python-docker/debian/patches/0001-Update-client-close-socket.patch create mode 100644 docker/python-docker/debian/patches/series diff --git a/docker/python-docker/debian/meta_data.yaml b/docker/python-docker/debian/meta_data.yaml new file mode 100644 index 000000000..a2019c994 --- /dev/null +++ b/docker/python-docker/debian/meta_data.yaml @@ -0,0 +1,9 @@ +--- +debver: 4.1.0-1.2 +dl_path: + name: python-docker-debian-4.1.0-1.tar.gz + url: https://salsa.debian.org/docker-compose-team/python-docker/-/archive/debian/4.1.0-1/python-docker-debian-4.1.0-1.tar.gz + md5sum: 234c4ab71eec74778c7bc26afb2a04a5 +revision: + dist: $STX_DIST + PKG_GITREVCOUNT: true diff --git a/docker/python-docker/debian/patches/0001-Update-client-close-socket.patch b/docker/python-docker/debian/patches/0001-Update-client-close-socket.patch new file mode 100644 index 000000000..fd6bfeb24 --- /dev/null +++ b/docker/python-docker/debian/patches/0001-Update-client-close-socket.patch @@ -0,0 +1,30 @@ +From cbe001760e9893015b1576cba05ebce0938038e4 Mon Sep 17 00:00:00 2001 +From: John Kung +Date: Wed, 7 Aug 2019 14:06:04 -0400 +Subject: [PATCH 1/1] Update client close socket + +--- + docker/api/client.py | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/docker/api/client.py b/docker/api/client.py +index 13c292a..7df5eb1 100644 +--- a/docker/api/client.py ++++ b/docker/api/client.py +@@ -411,8 +411,11 @@ class APIClient( + if stream: + return gen + else: +- # Wait for all the frames, concatenate them, and return the result +- return consume_socket_output(gen, demux=demux) ++ try: ++ # Wait for all the frames, concatenate them, and return the result ++ return consume_socket_output(gen, demux=demux) ++ finally: ++ response.close() + + def _disable_socket_timeout(self, socket): + """ Depending on the combination of python version and whether we're +-- +1.8.3.1 + diff --git a/docker/python-docker/debian/patches/series b/docker/python-docker/debian/patches/series new file mode 100644 index 000000000..d62d7ef9c --- /dev/null +++ b/docker/python-docker/debian/patches/series @@ -0,0 +1 @@ +0001-Update-client-close-socket.patch