From 08e5ecd31ad1b05c50a2ddfb33a6c5f02dc87c89 Mon Sep 17 00:00:00 2001 From: xu_lei_123 Date: Sat, 24 Dec 2022 16:51:46 +0800 Subject: [PATCH] add apply-patches tool, and move patch files to patch directory --- ...nterface-temporarily-allow-builtable.patch | 0 apply-patches | 37 ++++++++++++++++++ moby.spec | 18 +++++++-- patch.tar.gz | Bin 0 -> 3584 bytes series.conf | 1 + 5 files changed, 52 insertions(+), 4 deletions(-) rename 0001-revert-any-to-interface-temporarily-allow-builtable.patch => .../0000-revert-any-to-interface-temporarily-allow-builtable.patch (100%) create mode 100755 apply-patches create mode 100644 patch.tar.gz create mode 100644 series.conf diff --git a/0001-revert-any-to-interface-temporarily-allow-builtable.patch b/.../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 .../0000-revert-any-to-interface-temporarily-allow-builtable.patch diff --git a/apply-patches b/apply-patches new file mode 100755 index 0000000..d86820d --- /dev/null +++ b/apply-patches @@ -0,0 +1,37 @@ +#!/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 +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 eb68cac..e8f0c78 100644 --- a/moby.spec +++ b/moby.spec @@ -7,7 +7,7 @@ Name: docker Version: 20.10.21 -Release: 2 +Release: 3 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.tar.gz +Source7: apply-patches +Source8: series.conf Requires: %{name}-engine = %{version}-%{release} Requires: %{name}-client = %{version}-%{release} @@ -70,7 +71,7 @@ BuildRequires: selinux-policy-devel BuildRequires: systemd-devel BuildRequires: tar BuildRequires: which -BuildRequires: golang >= 1.18 +BuildRequires: golang >= 1.17 %description engine Docker daemon binary and related utilities @@ -89,8 +90,14 @@ 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 %{SOURCE1} . +cp -r %{SOURCE6} . +cp %{SOURCE7} . +cp %{SOURCE8} . %build +sh ./apply-patches + export GO111MODULE=off # build docker daemon export DOCKER_GITCOMMIT=%{_gitcommit_engine} @@ -196,6 +203,9 @@ fi %systemd_postun_with_restart docker.service %changelog +* Sat Dec 24 2022 xulei - 20.10.21-3 +- DESC: Adapt to Euler Patching method + * Wed Dec 21 2022 wanglimin - 20.10.21-2 - DESC: revert any to interface{} temporarily to allow builtable with golang-1.17.x - it will be withdrawed if golang upgrade to 1.18.x in the branch diff --git a/patch.tar.gz b/patch.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..e5394a223b90547db8ece8817684b8de9053c0ae GIT binary patch literal 3584 zcmeHITWi}e6wb4L#d&OSrZcSl9DvfQoeq?`FdZrtAw|zXjFBh#gO_-b6dvY$Fn!s08oC3m~s~p{h0G3XobiyMD*qAYL zy~u7=?k4c<%ZHnfpT5I-Gyz8woPq6VK0Lyc;qSA*<_Oi|CBu501bu%lRIR!r?GsYyvII(}$WRXU2FUiR ziEavY4|$qqan8dqPUAw2BH-Oc^!yLtlOPD-K#a39pz&~gnn1ALP~cW`1(m|;*$Yhk zvMCL;&MtBX4+P3Zlfy}=|FY=Awf><_`o6D7a26^gtYBD$-U1%?KwP%x+9F0~ zOuY-@$`lwP{B5=m3QceH%oB3Bh5i|yv)Nc6A^Pu}RxKjW6YN@c5{@lsQE0zZP`p3->)q>6pQk0164r-O)4@Q@Mm5^vZe#<2p& N3LGnNtiT(rz%Qzjl+pkI literal 0 HcmV?d00001 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