From 548d06762d777be13b2b5bbf97f4af128524ed5f Mon Sep 17 00:00:00 2001 From: xu_lei_123 Date: Thu, 29 Dec 2022 11:26:20 +0800 Subject: [PATCH 1/9] add apply-patches tool, and move patch files to patch directory --- apply-patches | 38 +++++++++++++++++++ moby.spec | 19 ++++++++-- ...nterface-temporarily-allow-builtable.patch | 0 series.conf | 1 + 4 files changed, 54 insertions(+), 4 deletions(-) create mode 100755 apply-patches rename 0001-revert-any-to-interface-temporarily-allow-builtable.patch => patch/0000-revert-any-to-interface-temporarily-allow-builtable.patch (100%) create mode 100644 series.conf diff --git a/apply-patches b/apply-patches new file mode 100755 index 0000000..5f663b6 --- /dev/null +++ b/apply-patches @@ -0,0 +1,38 @@ +#!/bin/bash + +# Description: This shell script is used to apply patches for the project +# Author: xulei@xfusion.com +# Create: 2021-12-24 + +set -ex + +pkg=moby-20.10.21 +cd .. +cwd=$PWD +src=$cwd/$pkg + +tar -xzvf moby-20.10.21.tar.gz +if [! -d patch];then + tar -zxf patch.tar.gz +fi + +cd $src +git init +git add . +git config user.name 'build' +git config user.email 'build@obs.com' +git commit -m 'init build' +cd $cwd + +series=$cwd/series.conf +while IPF= read -r line +do + if [[ "$line" =~ ^patch* ]]; then + echo git apply $cwd/$line + cd $src && git apply $cwd/$line + fi +done <"$series" + +cd $cwd + +mv $src/.git $src/git diff --git a/moby.spec b/moby.spec index 8db65cf..bc97311 100644 --- a/moby.spec +++ b/moby.spec @@ -7,7 +7,7 @@ Name: docker Version: 20.10.21 -Release: 3 +Release: 4 Summary: The open-source application container engine License: ASL 2.0 URL: https://www.docker.com @@ -21,8 +21,9 @@ Source2: tini-0.19.0.tar.gz Source3: libnetwork-dcdf8f17.tar.gz Source4: docker.service Source5: docker.socket - -Patch0001: 0001-revert-any-to-interface-temporarily-allow-builtable.patch +Source6: patch +Source7: apply-patches +Source8: series.conf Requires: %{name}-engine = %{version}-%{release} Requires: %{name}-client = %{version}-%{release} @@ -87,11 +88,18 @@ Docker client binary and related utilities %prep %setup -q -n %{_source_client} %setup -q -T -n %{_source_engine} -b 1 -%patch0001 -p1 %setup -q -T -n %{_source_docker_init} -b 2 %setup -q -T -n %{_source_docker_proxy} -b 3 +cp %{SOURCE7} . +cp %{SOURCE1} ../ +tar -cvf patch.tar.gz %{SOURCE6} +cp patch.tar.gz ../ +#cp -r %{SOURCE6} ../ +cp %{SOURCE8} ../ %build +sh ./apply-patches + export GO111MODULE=off # build docker daemon export DOCKER_GITCOMMIT=%{_gitcommit_engine} @@ -197,6 +205,9 @@ fi %systemd_postun_with_restart docker.service %changelog +* Tue Dec 29 2022 xulei - 20.10.21-4 +- DESC: add apply-patches tool, and move patch files to patch directory + * Wed Dec 28 2022 xulei - 20.10.21-3 - DESC: change to BuildRequires golang-1.17.3 diff --git a/0001-revert-any-to-interface-temporarily-allow-builtable.patch b/patch/0000-revert-any-to-interface-temporarily-allow-builtable.patch similarity index 100% rename from 0001-revert-any-to-interface-temporarily-allow-builtable.patch rename to patch/0000-revert-any-to-interface-temporarily-allow-builtable.patch diff --git a/series.conf b/series.conf new file mode 100644 index 0000000..0d6b996 --- /dev/null +++ b/series.conf @@ -0,0 +1 @@ +patch/0000-revert-any-to-interface-temporarily-allow-builtable.patch -- Gitee From eb8062acf630eb7f691ed624b87d04f47f72c21c Mon Sep 17 00:00:00 2001 From: xulei Date: Tue, 3 Jan 2023 09:14:37 +0000 Subject: [PATCH 2/9] update moby.spec. Signed-off-by: xulei --- moby.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/moby.spec b/moby.spec index bc97311..feb0745 100644 --- a/moby.spec +++ b/moby.spec @@ -21,7 +21,7 @@ Source2: tini-0.19.0.tar.gz Source3: libnetwork-dcdf8f17.tar.gz Source4: docker.service Source5: docker.socket -Source6: patch +Source6: patch.tar.gz Source7: apply-patches Source8: series.conf @@ -93,7 +93,7 @@ Docker client binary and related utilities cp %{SOURCE7} . cp %{SOURCE1} ../ tar -cvf patch.tar.gz %{SOURCE6} -cp patch.tar.gz ../ +cp %{SOURCE6} ../ #cp -r %{SOURCE6} ../ cp %{SOURCE8} ../ -- Gitee From 6b79a5ecfd58aec16cde6753f96585849c9cf1ae Mon Sep 17 00:00:00 2001 From: xulei Date: Tue, 3 Jan 2023 09:23:02 +0000 Subject: [PATCH 3/9] update moby.spec. Signed-off-by: xulei --- moby.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/moby.spec b/moby.spec index feb0745..b0f9b76 100644 --- a/moby.spec +++ b/moby.spec @@ -92,7 +92,7 @@ Docker client binary and related utilities %setup -q -T -n %{_source_docker_proxy} -b 3 cp %{SOURCE7} . cp %{SOURCE1} ../ -tar -cvf patch.tar.gz %{SOURCE6} +#tar -cvf patch.tar.gz %{SOURCE6} cp %{SOURCE6} ../ #cp -r %{SOURCE6} ../ cp %{SOURCE8} ../ -- Gitee From 2b72562c24071367506f1c5a631e448979b70b22 Mon Sep 17 00:00:00 2001 From: xulei Date: Tue, 3 Jan 2023 09:33:16 +0000 Subject: [PATCH 4/9] update moby.spec. Signed-off-by: xulei --- moby.spec | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/moby.spec b/moby.spec index b0f9b76..83aa8ee 100644 --- a/moby.spec +++ b/moby.spec @@ -90,12 +90,15 @@ Docker client binary and related utilities %setup -q -T -n %{_source_engine} -b 1 %setup -q -T -n %{_source_docker_init} -b 2 %setup -q -T -n %{_source_docker_proxy} -b 3 +cp %{SOURCE0} . +cp %{SOURCE1} . +cp %{SOURCE2} . +cp %{SOURCE3} . +cp %{SOURCE4} . +cp %{SOURCE5} . +cp %{SOURCE6} . cp %{SOURCE7} . -cp %{SOURCE1} ../ -#tar -cvf patch.tar.gz %{SOURCE6} -cp %{SOURCE6} ../ -#cp -r %{SOURCE6} ../ -cp %{SOURCE8} ../ +cp %{SOURCE8} . %build sh ./apply-patches -- Gitee From cc32130e14a9aab702c04ea861bb89f78f5a09cb Mon Sep 17 00:00:00 2001 From: xulei Date: Tue, 3 Jan 2023 09:54:43 +0000 Subject: [PATCH 5/9] update apply-patches. Signed-off-by: xulei --- apply-patches | 1 - 1 file changed, 1 deletion(-) diff --git a/apply-patches b/apply-patches index 5f663b6..d86820d 100755 --- a/apply-patches +++ b/apply-patches @@ -7,7 +7,6 @@ set -ex pkg=moby-20.10.21 -cd .. cwd=$PWD src=$cwd/$pkg -- Gitee From 63e5337a03a33f88511afd4dcb56d2a69ce4e242 Mon Sep 17 00:00:00 2001 From: xulei Date: Tue, 3 Jan 2023 09:56:36 +0000 Subject: [PATCH 6/9] update moby.spec. Signed-off-by: xulei --- moby.spec | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/moby.spec b/moby.spec index 83aa8ee..0710f4e 100644 --- a/moby.spec +++ b/moby.spec @@ -86,10 +86,6 @@ BuildRequires: libtool-ltdl-devel Docker client binary and related utilities %prep -%setup -q -n %{_source_client} -%setup -q -T -n %{_source_engine} -b 1 -%setup -q -T -n %{_source_docker_init} -b 2 -%setup -q -T -n %{_source_docker_proxy} -b 3 cp %{SOURCE0} . cp %{SOURCE1} . cp %{SOURCE2} . @@ -99,6 +95,10 @@ cp %{SOURCE5} . cp %{SOURCE6} . cp %{SOURCE7} . cp %{SOURCE8} . +%setup -q -n %{_source_client} +%setup -q -T -n %{_source_engine} -b 1 +%setup -q -T -n %{_source_docker_init} -b 2 +%setup -q -T -n %{_source_docker_proxy} -b 3 %build sh ./apply-patches -- Gitee From b004abc81abc9453bc0bdaf7ff3d00f32d6ca8c5 Mon Sep 17 00:00:00 2001 From: xulei Date: Mon, 9 Jan 2023 06:19:39 +0000 Subject: [PATCH 7/9] =?UTF-8?q?=E6=96=B0=E5=BB=BA=20patch1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- patch1/.keep | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 patch1/.keep diff --git a/patch1/.keep b/patch1/.keep new file mode 100644 index 0000000..e69de29 -- Gitee From 5fde4155f18ec758457245782b4d3688351d201a Mon Sep 17 00:00:00 2001 From: xulei Date: Mon, 9 Jan 2023 06:20:10 +0000 Subject: [PATCH 8/9] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=96=87=E4=BB=B6=20patc?= =?UTF-8?q?h1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- patch1/.keep | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 patch1/.keep diff --git a/patch1/.keep b/patch1/.keep deleted file mode 100644 index e69de29..0000000 -- Gitee From fdd501627288c9f154bbec0b9fb825e72aee7e93 Mon Sep 17 00:00:00 2001 From: xulei Date: Mon, 9 Jan 2023 06:20:40 +0000 Subject: [PATCH 9/9] add patch/0001-xxx.patch. Signed-off-by: xulei --- patch/0001-xxx.patch | 1 + 1 file changed, 1 insertion(+) create mode 100644 patch/0001-xxx.patch diff --git a/patch/0001-xxx.patch b/patch/0001-xxx.patch new file mode 100644 index 0000000..8f01f5d --- /dev/null +++ b/patch/0001-xxx.patch @@ -0,0 +1 @@ +11111111111111111111111111111111111111111111111111111111 \ No newline at end of file -- Gitee