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 0000000000000000000000000000000000000000..d86820d3bb9a486fc61c546e11e8362e761d9445 --- /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 eb68cacb0a9fcbe6d0daaba4a23b709a5d5d5fd6..e8f0c78010c93189002b8aa8b950a2dc0c35dfc8 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 Binary files /dev/null and b/patch.tar.gz differ diff --git a/series.conf b/series.conf new file mode 100644 index 0000000000000000000000000000000000000000..0d6b996eb007ac0a83688f679013a0a2066851b0 --- /dev/null +++ b/series.conf @@ -0,0 +1 @@ +patch/0000-revert-any-to-interface-temporarily-allow-builtable.patch